Merge branch 'hotfix/3.00.0.2403.01' into release/3.0.0.2403.01
This commit is contained in:
commit
77cdcf2356
|
|
@ -5,26 +5,19 @@
|
|||
* Date: 2023/3/7
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaFormItem, WeaInput, WeaInputSearch, WeaSlideModal } from "ecCom";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||
import { viewAttendQuote } from "../../../../apis/attendance";
|
||||
import UnifiedTable from "../../../../components/UnifiedTable";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class AttendanceDataViewSlide extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: {
|
||||
query: false
|
||||
},
|
||||
keyword: "",
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
pageInfo: {
|
||||
current: 1, pageSize: 10, total: 0
|
||||
}
|
||||
loading: { query: false }, keyword: "", dataSource: [], columns: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -46,29 +39,12 @@ class AttendanceDataViewSlide extends Component {
|
|||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
columns: _.map(columns, o => ({ ...o, width: 150, fixed: o.dataIndex === "username" ? "left" : null }))
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
renderCustomOperate = () => {
|
||||
const { keyword } = this.state;
|
||||
const { showOperateBtn } = this.props;
|
||||
return ([
|
||||
<div style={{ display: "inline-block" }}>
|
||||
{showOperateBtn && <Button type="primary" onClick={this.handleExportAttendQuote}>导出全部</Button>}
|
||||
<WeaInputSearch
|
||||
value={keyword}
|
||||
style={{ marginLeft: 10 }}
|
||||
placeholder="请输入姓名/部门/工号/手机号"
|
||||
onChange={keyword => this.setState({ keyword })}
|
||||
onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)}
|
||||
/>
|
||||
</div>
|
||||
]);
|
||||
};
|
||||
handleExportAttendQuote = () => {
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
|
|
@ -83,7 +59,7 @@ class AttendanceDataViewSlide extends Component {
|
|||
|
||||
render() {
|
||||
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
||||
const { columns, dataSource, loading, pageInfo } = this.state;
|
||||
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
|
|
@ -101,45 +77,33 @@ class AttendanceDataViewSlide extends Component {
|
|||
}, () => this.viewAttendQuote({}, this.props));
|
||||
}
|
||||
};
|
||||
const btns = [
|
||||
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
||||
<WeaInputSearch
|
||||
value={keyword} placeholder={getLabel(543380, "请输入姓名/部门/工号/手机号")}
|
||||
onChange={keyword => this.setState({ keyword })}
|
||||
onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)}
|
||||
/>
|
||||
];
|
||||
return (
|
||||
<WeaSlideModal
|
||||
{...extra}
|
||||
className="attendanceSlideWrapper"
|
||||
top={0}
|
||||
measureT="%"
|
||||
width={80}
|
||||
measureX="%"
|
||||
height={100}
|
||||
measureY="%"
|
||||
direction="right"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle="考勤数据"
|
||||
editable={false}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={this.renderCustomOperate()}
|
||||
/>
|
||||
}
|
||||
content={
|
||||
<div>
|
||||
<WeaFormItem label="考勤周期" labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} underline>
|
||||
<WeaInput value={salaryYearMonth} viewAttr={1}/>
|
||||
</WeaFormItem>
|
||||
<UnifiedTable
|
||||
rowKey="id"
|
||||
columns={_.map(columns, item => ({
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}> {text} </span>;
|
||||
}
|
||||
}))}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
xWidth={columns.length * 180}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
<WeaSlideModal {...extra} className="attendanceSlideWrapper"
|
||||
top={0} height={100} width={800} measureT="%" measureX="px" measureY="%" direction="right"
|
||||
title={
|
||||
<WeaTop title={getLabel(525196, "考勤数据")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
buttons={showOperateBtn ? btns : btns.slice(1)}/>
|
||||
}
|
||||
content={
|
||||
<div className="attendance-slide-body">
|
||||
<div className="attendance-tb-tip">
|
||||
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource} bordered pagination={pagination}
|
||||
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 225px)` }}/>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,18 @@
|
|||
}
|
||||
|
||||
.attendanceSlideWrapper {
|
||||
.wea-slide-modal-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wea-slide-modal-title {
|
||||
height: initial;
|
||||
line-height: initial;
|
||||
text-align: left;
|
||||
|
||||
.wea-new-top > div:last-child {
|
||||
padding-right: 50px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.rodal-close {
|
||||
|
|
@ -30,6 +38,28 @@
|
|||
top: 10px !important;
|
||||
}
|
||||
|
||||
.attendance-slide-body {
|
||||
background: #f6f6f6;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 16px;
|
||||
|
||||
.attendance-tb-tip {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 4px 0;
|
||||
min-height: 32px;
|
||||
line-height: 18px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 1260px) {
|
||||
|
|
|
|||
|
|
@ -825,7 +825,7 @@ const BenefitBaseComponent = (props) => {
|
|||
customComponent={<div className="welfare-same-box">
|
||||
<span>{getLabel(543195, "各项福利基数一致")}</span>
|
||||
<WeaInputNumber style={{ width: 100 }} onBlur={v => onSameChange(items, v)}
|
||||
disabled={runStatuses === "4,5" || !showOperateBtn}/>
|
||||
disabled={runStatuses === "4,5" || !showOperateBtn} precision={2}/>
|
||||
</div>}
|
||||
title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
|
||||
/>;
|
||||
|
|
|
|||
Loading…
Reference in New Issue