Merge branch 'release/3.0.0.2403.01' into release/3.0.0.2403.01-个税
# Conflicts: # pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js # pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
This commit is contained in:
commit
21ef40db3e
|
|
@ -24,16 +24,16 @@ export const getTableDatas = (params) => {
|
||||||
export const getLogs = params => {
|
export const getLogs = params => {
|
||||||
const payload = {
|
const payload = {
|
||||||
...params, module: "hrsa", dataset: "dataset", authParams: "{}", transMethod: "hrsa",
|
...params, module: "hrsa", dataset: "dataset", authParams: "{}", transMethod: "hrsa",
|
||||||
showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"}]"
|
showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"}]"
|
||||||
};
|
};
|
||||||
return postFetch("/api/bs/hrmsalary/elog/getLogs", payload);
|
return postFetch("/api/bs/hrmelog/elog/getLogs", payload);
|
||||||
};
|
};
|
||||||
//获取单条操作记录的更新明细
|
//获取单条操作记录的更新明细
|
||||||
export const getDetailChanges = params => {
|
export const getDetailChanges = params => {
|
||||||
const payload = {
|
const payload = {
|
||||||
...params, module: "hrsa", detailTransMethod: "elogDemoDetail"
|
...params, module: "hrsa", detailTransMethod: "elogDemoDetail"
|
||||||
};
|
};
|
||||||
return postFetch("/api/bs/hrmsalary/elog/getDetailChanges", payload);
|
return postFetch("/api/bs/hrmelog/elog/getDetailChanges", payload);
|
||||||
};
|
};
|
||||||
//获取薪资账套全列表
|
//获取薪资账套全列表
|
||||||
export const getSalarysobListAll = params => {
|
export const getSalarysobListAll = params => {
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,54 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.import-option {
|
||||||
|
.screenWrapper {
|
||||||
|
padding: 0;
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
|
||||||
|
.wea-content {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-form-cell {
|
||||||
|
padding: 0 16px;
|
||||||
|
|
||||||
|
.wea-date-picker {
|
||||||
|
width: 85%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-helpful-tip {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.attendanceFormWrapper {
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 10px 0;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
|
||||||
|
.wea-form-cell {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select, .ant-select-selection, .ant-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-select-selection {
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import { WeaCheckbox, WeaDialog, WeaInputSearch } from "ecCom";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
||||||
export default class SelectItemModal extends React.Component {
|
export default class SelectItemModal extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -58,10 +57,19 @@ export default class SelectItemModal extends React.Component {
|
||||||
const bottomLeft = <WeaCheckbox content="只显示已选中字段" onChange={onShowOnlyChecked}/>;
|
const bottomLeft = <WeaCheckbox content="只显示已选中字段" onChange={onShowOnlyChecked}/>;
|
||||||
return (
|
return (
|
||||||
<WeaDialog {...extra} hasScroll title={titleComp}
|
<WeaDialog {...extra} hasScroll title={titleComp}
|
||||||
style={{ width: 592, height: 248 }}
|
|
||||||
buttons={btns} moreBtn={moreBtn}
|
buttons={btns} moreBtn={moreBtn}
|
||||||
initLoadCss className="setWrapper"
|
initLoadCss className="setWrapper"
|
||||||
bottomLeft={bottomLeft}
|
bottomLeft={bottomLeft}
|
||||||
|
style={{
|
||||||
|
width: 800,
|
||||||
|
height: 606.6,
|
||||||
|
minHeight: 200,
|
||||||
|
minWidth: 380,
|
||||||
|
maxHeight: "90%",
|
||||||
|
maxWidth: "90%",
|
||||||
|
overflow: "hidden",
|
||||||
|
transform: "translate(0px, 0px)"
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
width: 124px;
|
width: 140px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,21 +11,22 @@ class SelectItemsWrapper extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
searchVal: "",
|
searchVal: "", selectItem: [], groupItem: [], showOnlyChecked: false
|
||||||
selectItem: [],
|
|
||||||
groupItem: [],
|
|
||||||
showOnlyChecked: false
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { dataSource } = this.props
|
this.initSelectItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
initSelectItem = () => {
|
||||||
|
const { dataSource } = this.props;
|
||||||
this.setState({
|
this.setState({
|
||||||
selectItem: _.map(_.filter(_.reduce(dataSource, (pre, cur) => {
|
selectItem: _.map(_.filter(_.reduce(dataSource, (pre, cur) => {
|
||||||
return [...pre, ...cur.items];
|
return [...pre, ...cur.items];
|
||||||
}, []), item => !!item.checked), it => it.id)
|
}, []), item => !!item.checked), it => it.id)
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
handleSearchItemSet = (searchVal) => this.setState({ searchVal });
|
handleSearchItemSet = (searchVal) => this.setState({ searchVal });
|
||||||
handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) });
|
handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) });
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class Index extends Component {
|
||||||
effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [],
|
effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [],
|
||||||
operateTime: operateTime1 ? [operateTime1, operateTime2] : []
|
operateTime: operateTime1 ? [operateTime1, operateTime2] : []
|
||||||
};
|
};
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true, showSearchAd: false });
|
||||||
adjustRecordItemList(payload).then(({ status, data }) => {
|
adjustRecordItemList(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
|
|
|
||||||
|
|
@ -173,10 +173,10 @@ class Index extends Component {
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
saveAcctemployee({ salaryAcctRecordId, employeeIds }).then(({ status, errormsg }) => {
|
saveAcctemployee({ salaryAcctRecordId, employeeIds }).then(({ status, errormsg }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success(getLabel(541531, "添加成功!"));
|
message.success(getLabel(26712, "添加成功!"));
|
||||||
this.queryPCList();
|
this.queryPCList();
|
||||||
} else {
|
} else {
|
||||||
message.error(errormsg || getLabel(111, "添加失败!"));
|
message.error(errormsg || getLabel(545246, "添加失败!"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,9 @@ class AttendanceCustomFieldsModal extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
const { attendanceStore: { initForm } } = nextProps;
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.handleResetForm();
|
if (nextProps.visible !== this.props.visible && nextProps.visible) this.handleResetForm();
|
||||||
|
if (nextProps.visible !== this.props.visible && !nextProps.visible) initForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -62,12 +64,8 @@ class AttendanceCustomFieldsModal extends Component {
|
||||||
<Button type="primary" onClick={this.handleSubmitFields}>保存</Button>
|
<Button type="primary" onClick={this.handleSubmitFields}>保存</Button>
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<WeaDialog
|
<WeaDialog {...this.props} style={{ width: 480, height: 202 }} buttons={buttons} initLoadCss>
|
||||||
{...this.props} style={{ width: 440, height: 202 }}
|
<div className="form-dialog-layout"> {getSearchs(form, conditions, 1)}</div>
|
||||||
buttons={buttons} hasScroll initLoadCss
|
|
||||||
className="modalWrapper"
|
|
||||||
>
|
|
||||||
{getSearchs(form, conditions, 1)}
|
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,13 @@ import {
|
||||||
getLedgerList,
|
getLedgerList,
|
||||||
getSalaryCycleAndAttendCycle,
|
getSalaryCycleAndAttendCycle,
|
||||||
importAttendQuoteData,
|
importAttendQuoteData,
|
||||||
previewAttendQuote,
|
|
||||||
returnToAttendanceFieldSettingDefault,
|
returnToAttendanceFieldSettingDefault,
|
||||||
saveAttendanceFieldSetting,
|
saveAttendanceFieldSetting,
|
||||||
saveAttendanceFieldSettingAsDefault
|
saveAttendanceFieldSettingAsDefault
|
||||||
} from "../../../../apis/attendance";
|
} from "../../../../apis/attendance";
|
||||||
import ImportModal from "../../../../components/importModal";
|
import ImportModal from "./importDialog";
|
||||||
import HeaderSet from "../../../../components/importModal/headerSet";
|
// import HeaderSet from "../../../../components/importModal/headerSet";
|
||||||
import ImportFormOptions from "./importFormOptions";
|
// import ImportFormOptions from "./importFormOptions";
|
||||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
||||||
|
|
@ -45,10 +44,7 @@ class AttendanceDataComp extends Component {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0
|
total: 0
|
||||||
},
|
},
|
||||||
importData: {
|
importData: { visible: false, params: {} },
|
||||||
visiable: false, params: {}, step: 0,
|
|
||||||
columns: [], slideDataSource: [], importResult: []
|
|
||||||
},
|
|
||||||
importFormPayload: {
|
importFormPayload: {
|
||||||
salaryYearMonth: moment().format("YYYY-MM"), salarySobList: [],
|
salaryYearMonth: moment().format("YYYY-MM"), salarySobList: [],
|
||||||
salarySobId: "", salaryCycle: "", attendCycle: ""
|
salarySobId: "", salaryCycle: "", attendCycle: ""
|
||||||
|
|
@ -87,15 +83,24 @@ class AttendanceDataComp extends Component {
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||||
};
|
};
|
||||||
getLedgerList = () => {
|
getLedgerList = (importData) => {
|
||||||
const { importFormPayload } = this.state;
|
const { importFormPayload } = this.state;
|
||||||
getLedgerList().then(({ status, data }) => {
|
getLedgerList().then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
this.setState({
|
this.setState({
|
||||||
importFormPayload: {
|
importFormPayload: {
|
||||||
...importFormPayload,
|
...importFormPayload, salarySobId: _.head(data).id,
|
||||||
salarySobList: _.map(data, it => ({ key: it.id, showname: it.content }))
|
salarySobList: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||||
}
|
}
|
||||||
|
}, async () => {
|
||||||
|
const { importFormPayload } = this.state;
|
||||||
|
const { salaryYearMonth, salarySobId } = importFormPayload;
|
||||||
|
const payload = { salaryYearMonthStr: salaryYearMonth, salarySobId };
|
||||||
|
const { data } = await getSalaryCycleAndAttendCycle(payload);
|
||||||
|
this.setState({
|
||||||
|
importData: { ...importData, params: { salaryYearMonth, salarySobId } },
|
||||||
|
importFormPayload: { ...importFormPayload, ...data }
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -154,64 +159,12 @@ class AttendanceDataComp extends Component {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleImportAttendanceData = (importData) => {
|
handleImportAttendanceData = (importData) => this.getLedgerList(importData);
|
||||||
const { importFormPayload } = this.state;
|
handleFinish = (isFresh) => {
|
||||||
const { salaryYearMonth, salarySobId } = importFormPayload;
|
|
||||||
this.getLedgerList();
|
|
||||||
this.setState({ importData: { ...importData, params: { salaryYearMonth, salarySobId } } });
|
|
||||||
};
|
|
||||||
setStep = step => this.setState({ importData: { ...this.state.importData, step } });
|
|
||||||
handleFinish = () => {
|
|
||||||
const { importData } = this.state;
|
const { importData } = this.state;
|
||||||
const { step } = importData;
|
|
||||||
this.setState({
|
this.setState({
|
||||||
importData: {
|
importData: { ...importData, visible: false, params: {} }
|
||||||
...importData, visiable: false, params: {}, step: 0,
|
}, () => isFresh && this.getAttendanceList());
|
||||||
columns: [], slideDataSource: [], importResult: []
|
|
||||||
}
|
|
||||||
});
|
|
||||||
step === 2 && this.getAttendanceList();
|
|
||||||
};
|
|
||||||
handlePreviewImport = (params) => {
|
|
||||||
const { importData } = this.state;
|
|
||||||
previewAttendQuote(params).then(({ status, data }) => {
|
|
||||||
if (status) {
|
|
||||||
const { headers, list } = data;
|
|
||||||
this.setState({
|
|
||||||
importData: {
|
|
||||||
...importData,
|
|
||||||
columns: _.map(headers, (it, dataIndex) => ({ title: it, dataIndex })),
|
|
||||||
slideDataSource: _.map(list, item => {
|
|
||||||
return _.reduce(item, (pre, cur, key) => (_.assign(pre, { [key]: cur })), {});
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
handleImport = (params) => {
|
|
||||||
const { importData } = this.state;
|
|
||||||
const { step } = importData;
|
|
||||||
importAttendQuoteData(params).then(({ status, data }) => {
|
|
||||||
if (status) {
|
|
||||||
this.setState({
|
|
||||||
importData: {
|
|
||||||
...importData,
|
|
||||||
step: step + 1,
|
|
||||||
importResult: data
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
handleTemplateLinkClick = () => {
|
|
||||||
const { importFormPayload } = this.state;
|
|
||||||
const { salarySobId, salaryYearMonth } = importFormPayload;
|
|
||||||
if (!salarySobId || !salaryYearMonth) {
|
|
||||||
message.warning("请完善导入选项,再下载");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`);
|
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
|
|
@ -236,7 +189,7 @@ class AttendanceDataComp extends Component {
|
||||||
onSelectItem={this.handleSelectItem}
|
onSelectItem={this.handleSelectItem}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
});
|
}, () => this.setItemRef && this.setItemRef.initSelectItem());
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: { ...loading, headset: false } }));
|
}).catch(() => this.setState({ loading: { ...loading, headset: false } }));
|
||||||
};
|
};
|
||||||
|
|
@ -392,46 +345,30 @@ class AttendanceDataComp extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource} pagination={pagination} loading={loading.query}/>
|
||||||
pagination={pagination}
|
|
||||||
loading={loading.query}
|
|
||||||
/>
|
|
||||||
{/* 考勤引用导入 */}
|
{/* 考勤引用导入 */}
|
||||||
<ImportModal {...importData} setStep={this.setStep} onFinish={this.handleFinish}
|
<ImportModal {...importData} importFormPayload={importFormPayload} onCancel={this.handleFinish}
|
||||||
previewImport={this.handlePreviewImport} importFile={this.handleImport}
|
onChangeImportForm={this.handleChangeImportPayload} onHeaderSettings={this.handleHeaderSettings}
|
||||||
templateLink={this.handleTemplateLinkClick} onCancel={this.handleFinish}
|
loading={loading.headset} previewUrl="/api/bs/hrmsalary/attendQuote/preview"
|
||||||
headerSetCompoent={<HeaderSet
|
importAttendQuoteData={importAttendQuoteData}
|
||||||
loading={loading.headset}
|
|
||||||
onSetClick={() => this.handleHeaderSettings({ sourceType: "IMPORT" })}/>}
|
|
||||||
renderFormComponent={() => <ImportFormOptions
|
|
||||||
{...importFormPayload}
|
|
||||||
onChangeImportForm={this.handleChangeImportPayload}/>
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
{/* 表头设置 */}
|
{/* 表头设置 */}
|
||||||
<SelectItemModal {...fieldSetPayload}
|
<SelectItemModal {...fieldSetPayload}
|
||||||
onCancel={this.handleCloseSettings}
|
onCancel={this.handleCloseSettings}
|
||||||
onSearchItemSet={this.handleSearchItemSet}
|
onSearchItemSet={this.handleSearchItemSet}
|
||||||
onShowOnlyChecked={this.handleShowOnlyChecked}
|
onShowOnlyChecked={this.handleShowOnlyChecked}
|
||||||
onMoreOpts={this.handleMoreOpts} onSave={this.handleSave}
|
onMoreOpts={this.handleMoreOpts} onSave={this.handleSave}/>
|
||||||
/>
|
|
||||||
{/* 考勤数据引用 */}
|
{/* 考勤数据引用 */}
|
||||||
<AttendanceRefrenceDataModal
|
<AttendanceRefrenceDataModal {...attendanceReferencePayload} onCancel={this.handleCloseQuoteModal}/>
|
||||||
{...attendanceReferencePayload}
|
|
||||||
onCancel={this.handleCloseQuoteModal}
|
|
||||||
/>
|
|
||||||
{/* 考勤数据查看 */}
|
{/* 考勤数据查看 */}
|
||||||
<AttendanceDataViewSlide
|
<AttendanceDataViewSlide {...attendanceViewPayload} showOperateBtn={showOperateBtn}
|
||||||
{...attendanceViewPayload}
|
onClose={() => this.setState({
|
||||||
showOperateBtn={showOperateBtn}
|
attendanceViewPayload: {
|
||||||
onClose={() => this.setState({
|
...attendanceViewPayload,
|
||||||
attendanceViewPayload: {
|
visible: false,
|
||||||
...attendanceViewPayload,
|
attendQuoteId: ""
|
||||||
visible: false,
|
}
|
||||||
attendQuoteId: ""
|
})}/>
|
||||||
}
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,26 +5,19 @@
|
||||||
* Date: 2023/3/7
|
* Date: 2023/3/7
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
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 { Button } from "antd";
|
||||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
|
||||||
import { viewAttendQuote } from "../../../../apis/attendance";
|
import { viewAttendQuote } from "../../../../apis/attendance";
|
||||||
import UnifiedTable from "../../../../components/UnifiedTable";
|
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
class AttendanceDataViewSlide extends Component {
|
class AttendanceDataViewSlide extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: {
|
loading: { query: false }, keyword: "", dataSource: [], columns: [],
|
||||||
query: false
|
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||||
},
|
|
||||||
keyword: "",
|
|
||||||
dataSource: [],
|
|
||||||
columns: [],
|
|
||||||
pageInfo: {
|
|
||||||
current: 1, pageSize: 10, total: 0
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,29 +39,12 @@ class AttendanceDataViewSlide extends Component {
|
||||||
if (status) {
|
if (status) {
|
||||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||||
this.setState({
|
this.setState({
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||||
dataSource,
|
columns: _.map(columns, o => ({ ...o, width: 150, fixed: o.dataIndex === "username" ? "left" : null }))
|
||||||
columns
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
}).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 = () => {
|
handleExportAttendQuote = () => {
|
||||||
if (!this.handleDebounce) {
|
if (!this.handleDebounce) {
|
||||||
this.handleDebounce = _.debounce(() => {
|
this.handleDebounce = _.debounce(() => {
|
||||||
|
|
@ -83,7 +59,7 @@ class AttendanceDataViewSlide extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
||||||
const { columns, dataSource, loading, pageInfo } = this.state;
|
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
|
||||||
const pagination = {
|
const pagination = {
|
||||||
...pageInfo,
|
...pageInfo,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
|
|
@ -101,45 +77,33 @@ class AttendanceDataViewSlide extends Component {
|
||||||
}, () => this.viewAttendQuote({}, this.props));
|
}, () => 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 (
|
return (
|
||||||
<WeaSlideModal
|
<WeaSlideModal {...extra} className="attendanceSlideWrapper"
|
||||||
{...extra}
|
top={0} height={100} width={800} measureT="%" measureX="px" measureY="%" direction="right"
|
||||||
className="attendanceSlideWrapper"
|
title={
|
||||||
top={0}
|
<WeaTop title={getLabel(525196, "考勤数据")} icon={<i className="icon-coms-fa"/>}
|
||||||
measureT="%"
|
iconBgcolor="#F14A2D"
|
||||||
width={80}
|
buttons={showOperateBtn ? btns : btns.slice(1)}/>
|
||||||
measureX="%"
|
}
|
||||||
height={100}
|
content={
|
||||||
measureY="%"
|
<div className="attendance-slide-body">
|
||||||
direction="right"
|
<div className="attendance-tb-tip">
|
||||||
title={
|
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
||||||
<SlideModalTitle
|
<div></div>
|
||||||
subtitle="考勤数据"
|
</div>
|
||||||
editable={false}
|
<WeaTable
|
||||||
showOperateBtn={showOperateBtn}
|
columns={columns} dataSource={dataSource} bordered pagination={pagination}
|
||||||
customOperate={this.renderCustomOperate()}
|
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 225px)` }}/>
|
||||||
/>
|
</div>
|
||||||
}
|
}
|
||||||
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>
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,10 @@ import { getSearchs } from "../../../../util";
|
||||||
import {
|
import {
|
||||||
checkOperation,
|
checkOperation,
|
||||||
getAttendanceFieldSettingList,
|
getAttendanceFieldSettingList,
|
||||||
getLedgerList, returnToAttendanceFieldSettingDefault, saveAttendanceFieldSetting, saveAttendanceFieldSettingAsDefault,
|
getLedgerList,
|
||||||
|
returnToAttendanceFieldSettingDefault,
|
||||||
|
saveAttendanceFieldSetting,
|
||||||
|
saveAttendanceFieldSettingAsDefault,
|
||||||
syncAttendanceRefer
|
syncAttendanceRefer
|
||||||
} from "../../../../apis/attendance";
|
} from "../../../../apis/attendance";
|
||||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||||
|
|
@ -124,7 +127,7 @@ class AttendanceRefrenceDataModal extends Component {
|
||||||
onSelectItem={this.handleSelectItem}
|
onSelectItem={this.handleSelectItem}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
});
|
}, () => this.setItemRef && this.setItemRef.initSelectItem());
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ headerSetLoading: false }));
|
}).catch(() => this.setState({ headerSetLoading: false }));
|
||||||
};
|
};
|
||||||
|
|
@ -209,12 +212,10 @@ class AttendanceRefrenceDataModal extends Component {
|
||||||
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
|
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<WeaDialog
|
<WeaDialog {...this.props} style={{ width: 480, height: 174 }} buttons={buttons} initLoadCss>
|
||||||
{...this.props} style={{ width: 440, height: 156 }}
|
<div className="form-dialog-layout">
|
||||||
buttons={buttons} hasScroll initLoadCss
|
{getSearchs(refenceform, condition, 1)}
|
||||||
className="modalWrapper"
|
</div>
|
||||||
>
|
|
||||||
{getSearchs(refenceform, condition, 1)}
|
|
||||||
{/* 表头设置 */}
|
{/* 表头设置 */}
|
||||||
<SelectItemModal {...headerSetPayload}
|
<SelectItemModal {...headerSetPayload}
|
||||||
onCancel={this.handleCloseSettings}
|
onCancel={this.handleCloseSettings}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:考勤数据-导入
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/3/14
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Modal } from "antd";
|
||||||
|
import ImportDialog from "../../../../components/importDialog";
|
||||||
|
import HeaderSet from "../../../../components/importModal/headerSet";
|
||||||
|
import ImportFormOptions from "./importFormOptions";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
hasData: false,
|
||||||
|
importDialog: {
|
||||||
|
nextloading: false, link: null, importResult: {}, imageId: "", params: {},
|
||||||
|
previewUrl: ""
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
const { hasData, importDialog } = this.state;
|
||||||
|
const { params, previewUrl } = nextProps;
|
||||||
|
this.setState({
|
||||||
|
importDialog: { ...importDialog, link: this.handleExportTemp, params, previewUrl, extraPreview: params }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleExportTemp = () => {
|
||||||
|
const { hasData } = this.state;
|
||||||
|
const { importFormPayload } = this.props;
|
||||||
|
const { salarySobId, salaryYearMonth } = importFormPayload;
|
||||||
|
if (!salarySobId || !salaryYearMonth) {
|
||||||
|
Modal.warning({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`);
|
||||||
|
};
|
||||||
|
handleImport = (payload) => {
|
||||||
|
const { importDialog } = this.state, { importAttendQuoteData, params } = this.props;
|
||||||
|
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||||
|
importAttendQuoteData({ ...payload, ...params }).then(({ data, status }) => {
|
||||||
|
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||||
|
if (status) {
|
||||||
|
this.setState({
|
||||||
|
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { importDialog } = this.state;
|
||||||
|
const {
|
||||||
|
visible, onCancel, importFormPayload, onChangeImportForm, onHeaderSettings, loading
|
||||||
|
} = this.props;
|
||||||
|
return (
|
||||||
|
<ImportDialog
|
||||||
|
visible={visible} onCancel={onCancel} {...importDialog} title={getLabel(24023, "数据导入")}
|
||||||
|
onResetImportResult={() => this.setState({
|
||||||
|
importDialog: { ...importDialog, importResult: {}, imageId: "", link: "" }
|
||||||
|
})}
|
||||||
|
importParams={<ImportFormOptions {...importFormPayload} onChangeImportForm={onChangeImportForm}/>}
|
||||||
|
exportDataDom={<HeaderSet loading={loading} onSetClick={() => onHeaderSettings({ sourceType: "IMPORT" })}/>}
|
||||||
|
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||||
|
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -40,8 +40,9 @@ class ImportFormOptions extends Component {
|
||||||
label: "薪资账套",
|
label: "薪资账套",
|
||||||
value: salarySobId || "",
|
value: salarySobId || "",
|
||||||
onChange: this.screenChange,
|
onChange: this.screenChange,
|
||||||
options: [{ key: "", showname: "" }, ...salarySobList],
|
options: salarySobList,
|
||||||
key: "salarySobId"
|
key: "salarySobId",
|
||||||
|
viewAttr: 3
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{ com: Input("薪资周期", salaryCycle) },
|
{ com: Input("薪资周期", salaryCycle) },
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.attendanceFormWrapper {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.attendanceSlideWrapper {
|
.attendanceSlideWrapper {
|
||||||
|
.wea-slide-modal-content {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.wea-slide-modal-title {
|
.wea-slide-modal-title {
|
||||||
height: initial;
|
height: initial;
|
||||||
line-height: initial;
|
line-height: initial;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
|
.wea-new-top > div:last-child {
|
||||||
|
padding-right: 50px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.rodal-close {
|
.rodal-close {
|
||||||
|
|
@ -34,6 +38,28 @@
|
||||||
top: 10px !important;
|
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) {
|
@media (min-width: 1260px) {
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,7 @@ class Index extends Component {
|
||||||
};
|
};
|
||||||
handleChangeSalaryMonth = (salaryMonth) => this.setState({ salaryMonth }, () => this.attendanceTableRef.getAttendanceList({ salaryYearMonth: _.compact(this.state.salaryMonth) }));
|
handleChangeSalaryMonth = (salaryMonth) => this.setState({ salaryMonth }, () => this.attendanceTableRef.getAttendanceList({ salaryYearMonth: _.compact(this.state.salaryMonth) }));
|
||||||
handleAddAttendFileds = () => this.fieldMangRef.handleTriggerAttendFileds();
|
handleAddAttendFileds = () => this.fieldMangRef.handleTriggerAttendFileds();
|
||||||
handleImportAttendanceData = () => {
|
handleImportAttendanceData = () => this.attendanceTableRef.handleImportAttendanceData({ visible: true, params: {} });
|
||||||
this.attendanceTableRef.handleImportAttendanceData({
|
|
||||||
visiable: true, params: {}, step: 0,
|
|
||||||
columns: [], slideDataSource: [], importResult: []
|
|
||||||
});
|
|
||||||
};
|
|
||||||
handleQuoteAttendanceData = () => {
|
handleQuoteAttendanceData = () => {
|
||||||
this.attendanceTableRef.handleQuoteAttendanceData({
|
this.attendanceTableRef.handleQuoteAttendanceData({
|
||||||
visible: true, title: "引用考勤数据"
|
visible: true, title: "引用考勤数据"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.wea-form-item {
|
.wea-form-item {
|
||||||
padding: 8px 16px;
|
padding: 8px 16px 0 16px;
|
||||||
|
|
||||||
.to {
|
.to {
|
||||||
padding: 0 10px
|
padding: 0 10px
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class ImportFormCom extends Component {
|
||||||
value: taxAgentId || "",
|
value: taxAgentId || "",
|
||||||
onChange: this.screenChange,
|
onChange: this.screenChange,
|
||||||
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
|
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
|
||||||
key: "taxAgentId"
|
key: "taxAgentId", viewAttr: 3
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@ import {
|
||||||
editAddUpDeduction,
|
editAddUpDeduction,
|
||||||
getAddUpDeduction,
|
getAddUpDeduction,
|
||||||
getCumDeductSaCondition,
|
getCumDeductSaCondition,
|
||||||
importCumDeductParam,
|
importCumDeductParam
|
||||||
importCumDeductPreview,
|
|
||||||
onlineFeedback
|
onlineFeedback
|
||||||
} from "../../../apis/cumDeduct";
|
} from "../../../apis/cumDeduct";
|
||||||
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
||||||
|
|
@ -28,7 +27,7 @@ import DataTables from "../dataTables";
|
||||||
import AddItems from "../addItems";
|
import AddItems from "../addItems";
|
||||||
import ImportFormCom from "./components/importFormCom";
|
import ImportFormCom from "./components/importFormCom";
|
||||||
import TableRecord from "../components/tableRecord";
|
import TableRecord from "../components/tableRecord";
|
||||||
import { dataCollectCondition, modalColumns } from "./columns";
|
import { dataCollectCondition } from "./columns";
|
||||||
import { removePropertyCondition } from "../../../util/response";
|
import { removePropertyCondition } from "../../../util/response";
|
||||||
import { convertToUrlString } from "../../../util/url";
|
import { convertToUrlString } from "../../../util/url";
|
||||||
import Layout from "../layout";
|
import Layout from "../layout";
|
||||||
|
|
@ -62,10 +61,9 @@ class Index extends Component {
|
||||||
taxAgentId: ""
|
taxAgentId: ""
|
||||||
},
|
},
|
||||||
importFormComponent: null,
|
importFormComponent: null,
|
||||||
step: 0,
|
|
||||||
templateLink: "/api/bs/hrmsalary/addUpDeduction/downloadTemplate",
|
templateLink: "/api/bs/hrmsalary/addUpDeduction/downloadTemplate",
|
||||||
importResult: {},
|
importResult: {},
|
||||||
slideDataSource: []
|
previewUrl: "/api/bs/hrmsalary/addUpDeduction/preview"
|
||||||
},
|
},
|
||||||
exportPayloadUrl: "",
|
exportPayloadUrl: "",
|
||||||
exportPayloadType: false,
|
exportPayloadType: false,
|
||||||
|
|
@ -214,41 +212,6 @@ class Index extends Component {
|
||||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
* Author: 黎永顺
|
|
||||||
* Description: 导入数据采集数据
|
|
||||||
* Params:
|
|
||||||
* Date: 2023/2/20
|
|
||||||
*/
|
|
||||||
handleImportFile = (params) => {
|
|
||||||
importCumDeductParam(params).then(({ status, data }) => {
|
|
||||||
if (status) {
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, importResult: data }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
|
||||||
* Author: 黎永顺
|
|
||||||
* Description: 导入数据采集-数据查看
|
|
||||||
* Params:
|
|
||||||
* Date: 2023/2/20
|
|
||||||
*/
|
|
||||||
handlePreviewImport = (params) => {
|
|
||||||
importCumDeductPreview(params).then(({ status, data, errormsg }) => {
|
|
||||||
if (status) {
|
|
||||||
const { preview = [] } = data;
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, slideDataSource: preview }
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
message.error(errormsg || "预览失败");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description: 数据采集-信息保存
|
* Description: 数据采集-信息保存
|
||||||
|
|
@ -556,12 +519,6 @@ class Index extends Component {
|
||||||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleImportSetStep = (step) => {
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, step }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
onlineFeedback = () => {
|
onlineFeedback = () => {
|
||||||
this.setState({ feedbackLoading: true });
|
this.setState({ feedbackLoading: true });
|
||||||
|
|
@ -592,11 +549,9 @@ class Index extends Component {
|
||||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||||
exportPayloadType={exportPayloadType} logFunction="addupdeduction"
|
exportPayloadType={exportPayloadType} logFunction="addupdeduction"
|
||||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
onCancel={this.handleCloseImport} onImportFile={importCumDeductParam}
|
||||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
importPayload={importPayload} detailOptBtns={this.getDetailOptBtns()}
|
||||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
|
||||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||||
columns={modalColumns}
|
|
||||||
>
|
>
|
||||||
<DataTables
|
<DataTables
|
||||||
ref={dom => this.tableRef = dom}
|
ref={dom => this.tableRef = dom}
|
||||||
|
|
@ -635,9 +590,10 @@ export const DataCollectionDatePicker = (props) => {
|
||||||
</WeaFormItem>;
|
</WeaFormItem>;
|
||||||
};
|
};
|
||||||
export const DataCollectionSelect = (props) => {
|
export const DataCollectionSelect = (props) => {
|
||||||
const { value, label, onChange, options, key, labelCol = 10, wrapperCol = 14 } = props;
|
const { value, label, onChange, options, key, labelCol = 10, wrapperCol = 14, viewAttr = 2 } = props;
|
||||||
return <WeaFormItem label={label} labelCol={{ span: labelCol }} wrapperCol={{ span: wrapperCol }}>
|
return <WeaFormItem label={label} labelCol={{ span: labelCol }} wrapperCol={{ span: wrapperCol }}>
|
||||||
<WeaSelect value={value} onChange={(val) => onChange({ key, value: val })} options={options}/>
|
<WeaSelect style={{ width: 200 }} value={value} onChange={(val) => onChange({ key, value: val })} options={options}
|
||||||
|
viewAttr={viewAttr}/>
|
||||||
</WeaFormItem>;
|
</WeaFormItem>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,7 @@ import {
|
||||||
editAddUpSituation,
|
editAddUpSituation,
|
||||||
getAddUpSituation,
|
getAddUpSituation,
|
||||||
getCumSituationSaCondition,
|
getCumSituationSaCondition,
|
||||||
importCumSituationParam,
|
importCumSituationParam
|
||||||
importCumSituationPreview
|
|
||||||
} from "../../../apis/cumSituation";
|
} from "../../../apis/cumSituation";
|
||||||
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
||||||
import { removePropertyCondition } from "../../../util/response";
|
import { removePropertyCondition } from "../../../util/response";
|
||||||
|
|
@ -28,7 +27,6 @@ import moment from "moment";
|
||||||
import { dataCollectCondition, taxOptions } from "./columns";
|
import { dataCollectCondition, taxOptions } from "./columns";
|
||||||
import AddItems from "../addItems";
|
import AddItems from "../addItems";
|
||||||
import TableRecord from "../components/tableRecord";
|
import TableRecord from "../components/tableRecord";
|
||||||
import { situationModalColumns } from "../cumDeduct/columns";
|
|
||||||
import { convertToUrlString } from "../../../util/url";
|
import { convertToUrlString } from "../../../util/url";
|
||||||
import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog";
|
import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog";
|
||||||
|
|
||||||
|
|
@ -59,10 +57,9 @@ class Index extends Component {
|
||||||
declareMonth: moment(new Date()).format("YYYY-MM")
|
declareMonth: moment(new Date()).format("YYYY-MM")
|
||||||
},
|
},
|
||||||
importFormComponent: null,
|
importFormComponent: null,
|
||||||
step: 0,
|
|
||||||
templateLink: "/api/bs/hrmsalary/addUpSituation/downloadTemplate",
|
templateLink: "/api/bs/hrmsalary/addUpSituation/downloadTemplate",
|
||||||
importResult: {},
|
importResult: {},
|
||||||
slideDataSource: []
|
previewUrl: "/api/bs/hrmsalary/addUpSituation/preview"
|
||||||
},
|
},
|
||||||
exportPayloadUrl: "",
|
exportPayloadUrl: "",
|
||||||
exportPayloadType: false,
|
exportPayloadType: false,
|
||||||
|
|
@ -138,46 +135,6 @@ class Index extends Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
* Author: 黎永顺
|
|
||||||
* Description: 导入数据采集数据
|
|
||||||
* Params:
|
|
||||||
* Date: 2023/2/20
|
|
||||||
*/
|
|
||||||
handleImportFile = (params) => {
|
|
||||||
const { declareMonth, ...extra } = params;
|
|
||||||
const payload = {
|
|
||||||
taxYearMonth: declareMonth,
|
|
||||||
...extra
|
|
||||||
};
|
|
||||||
importCumSituationParam(payload).then(({ status, data }) => {
|
|
||||||
if (status) {
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, importResult: data }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
|
||||||
* Author: 黎永顺
|
|
||||||
* Description: 导入数据采集-数据查看
|
|
||||||
* Params:
|
|
||||||
* Date: 2023/2/20
|
|
||||||
*/
|
|
||||||
handlePreviewImport = (params) => {
|
|
||||||
importCumSituationPreview(params).then(({ status, data, errormsg }) => {
|
|
||||||
if (status) {
|
|
||||||
const { preview = [] } = data;
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, slideDataSource: preview }
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
message.error(errormsg || "预览失败");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description:列表操作
|
* Description:列表操作
|
||||||
|
|
@ -522,12 +479,6 @@ class Index extends Component {
|
||||||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleImportSetStep = (step) => {
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, step }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description:详情页面-操作按钮
|
* Description:详情页面-操作按钮
|
||||||
|
|
@ -592,10 +543,9 @@ class Index extends Component {
|
||||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||||
exportPayloadType={exportPayloadType} logFunction="addupsituation"
|
exportPayloadType={exportPayloadType} logFunction="addupsituation"
|
||||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
onCancel={this.handleCloseImport} onImportFile={importCumSituationParam}
|
||||||
|
detailOptBtns={this.getDetailOptBtns()}
|
||||||
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}
|
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}
|
||||||
onImportFile={this.handleImportFile} columns={situationModalColumns}
|
|
||||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
|
||||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||||
>
|
>
|
||||||
<SalaryCumDeductChooseTaxPeriodDialog
|
<SalaryCumDeductChooseTaxPeriodDialog
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,10 @@ class DataTables extends Component {
|
||||||
getTableDate = (extraPayload = {}) => {
|
getTableDate = (extraPayload = {}) => {
|
||||||
const { loading, pageInfo } = this.state;
|
const { loading, pageInfo } = this.state;
|
||||||
const { url, payload } = this.props;
|
const { url, payload } = this.props;
|
||||||
const module = { ...pageInfo, url, ...payload, ...extraPayload };
|
const module = {
|
||||||
|
...pageInfo, url, ...payload, ...extraPayload,
|
||||||
|
departmentIds: extraPayload.departmentIds ? extraPayload.departmentIds.split(",") : []
|
||||||
|
};
|
||||||
this.setState({ loading: { ...loading, query: true } });
|
this.setState({ loading: { ...loading, query: true } });
|
||||||
getTableDate(module).then(({ status, data }) => {
|
getTableDate(module).then(({ status, data }) => {
|
||||||
this.setState({ loading: { ...loading, query: false } });
|
this.setState({ loading: { ...loading, query: false } });
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name:数据采集四个基础项-导入
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/3/14
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
|
||||||
|
import ImportDialog from "../../components/importDialog";
|
||||||
|
import { convertToUrlString } from "../../util/url";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
hasData: false,
|
||||||
|
importDialog: {
|
||||||
|
nextloading: false, link: "", importResult: {}, imageId: "", params: {},
|
||||||
|
previewUrl: ""
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
const { hasData, importDialog } = this.state;
|
||||||
|
const { templateLink, importOpts, importResult, previewUrl } = nextProps;
|
||||||
|
this.setState({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog, link: `${templateLink}?${convertToUrlString({ ...importOpts, hasData })}`,
|
||||||
|
importResult, params: importOpts, previewUrl, extraPreview: importOpts
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleExportTemp = () => {
|
||||||
|
const { hasData } = this.state;
|
||||||
|
const { templateLink, importOpts } = this.props;
|
||||||
|
if (!Object.values(importOpts).every(o => !!o)) {
|
||||||
|
Modal.warning({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const payload = { ...importOpts, hasData };
|
||||||
|
window.open(`${templateLink}?${convertToUrlString(payload)}`, "_blank");
|
||||||
|
};
|
||||||
|
handleImport = (payload) => {
|
||||||
|
const { importDialog } = this.state, { onImportFile, importOpts } = this.props;
|
||||||
|
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||||
|
onImportFile({ ...payload, ...importOpts }).then(({ data, status }) => {
|
||||||
|
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||||
|
if (status) {
|
||||||
|
this.setState({
|
||||||
|
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { importDialog, hasData } = this.state;
|
||||||
|
const { visible, onCancel, importParams, templateLink, importOpts } = this.props;
|
||||||
|
return (
|
||||||
|
<ImportDialog
|
||||||
|
visible={visible} onCancel={onCancel} {...importDialog} title={getLabel(24023, "数据导入")}
|
||||||
|
importParams={importParams} onResetImportResult={() => this.setState({
|
||||||
|
importDialog: { ...importDialog, importResult: {}, imageId: "", link: "" }
|
||||||
|
})}
|
||||||
|
exportDataDom={
|
||||||
|
<WeaCheckbox
|
||||||
|
value={hasData ? "1" : "0"}
|
||||||
|
content={getLabel(543208, "导出现有数据")}
|
||||||
|
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||||
|
onChange={val => this.setState({ hasData: val === "1" }, () => {
|
||||||
|
this.setState({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog,
|
||||||
|
link: `${templateLink}?${convertToUrlString({ ...importOpts, hasData: this.state.hasData })}`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||||
|
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -8,11 +8,11 @@ import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { toJS } from "mobx";
|
import { toJS } from "mobx";
|
||||||
import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||||
import ImportModal from "../../components/importModal";
|
import ImportModal from "./importDialog";
|
||||||
|
import LogDialog from "../../components/logViewModal";
|
||||||
import SlideModalTitle from "../../components/slideModalTitle";
|
import SlideModalTitle from "../../components/slideModalTitle";
|
||||||
import { getSearchs } from "../../util";
|
import { getSearchs } from "../../util";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
import LogDialog from "../../components/logViewModal";
|
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -78,14 +78,13 @@ class Layout extends Component {
|
||||||
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||||
const {
|
const {
|
||||||
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
|
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
|
||||||
slidePayload, onClose, onSave, slideLoading, form, condition,
|
slidePayload, onClose, onSave, slideLoading, form, condition, onImportFile,
|
||||||
onAdSearch, onCancel, importPayload, onImportSetStep, onImportFile,
|
onAdSearch, onCancel, importPayload, detailOptBtns, tabBtns = [], logFunction, onClearTargrtid
|
||||||
onPreviewImport, detailOptBtns, columns, tabBtns = [], logFunction, onClearTargrtid
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { visible, title: subtitle, children: slideChildren } = slidePayload;
|
const { visible, title: subtitle, children: slideChildren } = slidePayload;
|
||||||
const {
|
const {
|
||||||
visible: importVisiable, step, importFormComponent, importOpts,
|
visible: importVisiable, importFormComponent, importOpts,
|
||||||
importResult, slideDataSource, templateLink
|
importResult, templateLink, previewUrl
|
||||||
} = importPayload;
|
} = importPayload;
|
||||||
return (
|
return (
|
||||||
<div className="layoutWrapper">
|
<div className="layoutWrapper">
|
||||||
|
|
@ -116,21 +115,26 @@ class Layout extends Component {
|
||||||
<WeaNewScroll height="100%">{children}</WeaNewScroll>
|
<WeaNewScroll height="100%">{children}</WeaNewScroll>
|
||||||
{/*导入弹框*/}
|
{/*导入弹框*/}
|
||||||
<ImportModal
|
<ImportModal
|
||||||
needimportSelected //下载模板需要带上导入所选项
|
visible={importVisiable} onCancel={onCancel} importParams={importFormComponent}
|
||||||
columns={columns}
|
importOpts={importOpts} importResult={importResult} templateLink={templateLink}
|
||||||
params={importOpts}
|
previewUrl={previewUrl} onImportFile={onImportFile}
|
||||||
step={step}
|
|
||||||
setStep={onImportSetStep}
|
|
||||||
importResult={importResult}
|
|
||||||
onFinish={() => onCancel(true)}
|
|
||||||
slideDataSource={slideDataSource}
|
|
||||||
previewImport={onPreviewImport}
|
|
||||||
importFile={onImportFile}
|
|
||||||
templateLink={templateLink}
|
|
||||||
renderFormComponent={() => importFormComponent}
|
|
||||||
visiable={importVisiable}
|
|
||||||
onCancel={onCancel}
|
|
||||||
/>
|
/>
|
||||||
|
{/*<ImportModal*/}
|
||||||
|
{/* needimportSelected //下载模板需要带上导入所选项*/}
|
||||||
|
{/* columns={columns}*/}
|
||||||
|
{/* params={importOpts}*/}
|
||||||
|
{/* step={step}*/}
|
||||||
|
{/* setStep={onImportSetStep}*/}
|
||||||
|
{/* importResult={importResult}*/}
|
||||||
|
{/* onFinish={() => onCancel(true)}*/}
|
||||||
|
{/* slideDataSource={slideDataSource}*/}
|
||||||
|
{/* previewImport={onPreviewImport}*/}
|
||||||
|
{/* importFile={onImportFile}*/}
|
||||||
|
{/* templateLink={templateLink}*/}
|
||||||
|
{/* renderFormComponent={() => importFormComponent}*/}
|
||||||
|
{/* visiable={importVisiable}*/}
|
||||||
|
{/* onCancel={onCancel}*/}
|
||||||
|
{/*/>*/}
|
||||||
{/* 新增-编辑-详情弹框 */}
|
{/* 新增-编辑-详情弹框 */}
|
||||||
<WeaSlideModal
|
<WeaSlideModal
|
||||||
className="slideOuterWrapper"
|
className="slideOuterWrapper"
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ import { DataCollectionDatePicker, DataCollectionSelect } from "../cumDeduct";
|
||||||
import { dataCollectCondition } from "./columns";
|
import { dataCollectCondition } from "./columns";
|
||||||
import AddItems from "../addItems";
|
import AddItems from "../addItems";
|
||||||
import TableRecord from "../components/tableRecord";
|
import TableRecord from "../components/tableRecord";
|
||||||
import { otherModalColumns } from "../cumDeduct/columns";
|
|
||||||
import { convertToUrlString } from "../../../util/url";
|
import { convertToUrlString } from "../../../util/url";
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
const getKey = WeaTools.getKey;
|
||||||
|
|
@ -57,10 +56,9 @@ class Index extends Component {
|
||||||
declareMonth: moment(new Date()).format("YYYY-MM")
|
declareMonth: moment(new Date()).format("YYYY-MM")
|
||||||
},
|
},
|
||||||
importFormComponent: null,
|
importFormComponent: null,
|
||||||
step: 0,
|
|
||||||
templateLink: "/api/bs/hrmsalary/otherDeduction/downloadTemplate",
|
templateLink: "/api/bs/hrmsalary/otherDeduction/downloadTemplate",
|
||||||
importResult: {},
|
importResult: {},
|
||||||
slideDataSource: []
|
previewUrl: "/api/bs/hrmsalary/otherDeduction/preview"
|
||||||
},
|
},
|
||||||
exportPayloadUrl: "",
|
exportPayloadUrl: "",
|
||||||
exportPayloadType: false,
|
exportPayloadType: false,
|
||||||
|
|
@ -146,22 +144,6 @@ class Index extends Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
* Author: 黎永顺
|
|
||||||
* Description: 导入数据采集数据
|
|
||||||
* Params:
|
|
||||||
* Date: 2023/2/20
|
|
||||||
*/
|
|
||||||
handleImportFile = (params) => {
|
|
||||||
importOtherDeductionParam(params).then(({ status, data }) => {
|
|
||||||
if (status) {
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, importResult: data }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description: 导入数据采集-数据查看
|
* Description: 导入数据采集-数据查看
|
||||||
|
|
@ -479,12 +461,6 @@ class Index extends Component {
|
||||||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleImportSetStep = (step) => {
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, step }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description:详情页面-操作按钮
|
* Description:详情页面-操作按钮
|
||||||
|
|
@ -549,11 +525,9 @@ class Index extends Component {
|
||||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||||
exportPayloadType={exportPayloadType} logFunction="otherdeduction"
|
exportPayloadType={exportPayloadType} logFunction="otherdeduction"
|
||||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
onCancel={this.handleCloseImport} importPayload={importPayload}
|
||||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
detailOptBtns={this.getDetailOptBtns()} onImportFile={importOtherDeductionParam}
|
||||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
|
||||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||||
columns={otherModalColumns}
|
|
||||||
>
|
>
|
||||||
<DataTables
|
<DataTables
|
||||||
ref={dom => this.tableRef = dom}
|
ref={dom => this.tableRef = dom}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,7 @@ import {
|
||||||
specialAddDeductionDeleteAllData,
|
specialAddDeductionDeleteAllData,
|
||||||
specialAddDeductionDeleteSelectData,
|
specialAddDeductionDeleteSelectData,
|
||||||
specialAddDeductionEditData,
|
specialAddDeductionEditData,
|
||||||
specialAddDeductionImportData,
|
specialAddDeductionImportData
|
||||||
specialAddDeductionPreview
|
|
||||||
} from "../../../apis/special";
|
} from "../../../apis/special";
|
||||||
import { removePropertyCondition } from "../../../util/response";
|
import { removePropertyCondition } from "../../../util/response";
|
||||||
import { DataCollectionSelect } from "../cumDeduct";
|
import { DataCollectionSelect } from "../cumDeduct";
|
||||||
|
|
@ -20,7 +19,6 @@ import ImportFormCom from "../cumDeduct/components/importFormCom";
|
||||||
import { condition } from "./components/condition";
|
import { condition } from "./components/condition";
|
||||||
import AddItems from "../addItems";
|
import AddItems from "../addItems";
|
||||||
import TableRecord from "../components/tableRecord";
|
import TableRecord from "../components/tableRecord";
|
||||||
import { specialModalColumns } from "../cumDeduct/columns";
|
|
||||||
import { convertToUrlString } from "../../../util/url";
|
import { convertToUrlString } from "../../../util/url";
|
||||||
|
|
||||||
const getKey = WeaTools.getKey;
|
const getKey = WeaTools.getKey;
|
||||||
|
|
@ -47,10 +45,9 @@ class Index extends Component {
|
||||||
taxAgentId: ""
|
taxAgentId: ""
|
||||||
},
|
},
|
||||||
importFormComponent: null,
|
importFormComponent: null,
|
||||||
step: 0,
|
|
||||||
templateLink: "/api/bs/hrmsalary/specialAddDeduction/downloadTemplate",
|
templateLink: "/api/bs/hrmsalary/specialAddDeduction/downloadTemplate",
|
||||||
importResult: {},
|
importResult: {},
|
||||||
slideDataSource: []
|
previewUrl: "/api/bs/hrmsalary/specialAddDeduction/preview"
|
||||||
},
|
},
|
||||||
exportPayloadUrl: "",
|
exportPayloadUrl: "",
|
||||||
exportPayloadType: false,
|
exportPayloadType: false,
|
||||||
|
|
@ -101,41 +98,6 @@ class Index extends Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
* Author: 黎永顺
|
|
||||||
* Description: 导入数据采集数据
|
|
||||||
* Params:
|
|
||||||
* Date: 2023/2/20
|
|
||||||
*/
|
|
||||||
handleImportFile = (params) => {
|
|
||||||
specialAddDeductionImportData(params).then(({ status, data }) => {
|
|
||||||
if (status) {
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, importResult: data }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
|
||||||
* Author: 黎永顺
|
|
||||||
* Description: 导入数据采集-数据查看
|
|
||||||
* Params:
|
|
||||||
* Date: 2023/2/20
|
|
||||||
*/
|
|
||||||
handlePreviewImport = (params) => {
|
|
||||||
specialAddDeductionPreview(params).then(({ status, data, errormsg }) => {
|
|
||||||
if (status) {
|
|
||||||
const { preview = [] } = data;
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, slideDataSource: preview }
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
message.error(errormsg || "预览失败");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description: 高级搜素框-表单项
|
* Description: 高级搜素框-表单项
|
||||||
|
|
@ -439,12 +401,6 @@ class Index extends Component {
|
||||||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleImportSetStep = (step) => {
|
|
||||||
const { importPayload } = this.state;
|
|
||||||
this.setState({
|
|
||||||
importPayload: { ...importPayload, step }
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
|
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
|
||||||
|
|
@ -460,11 +416,9 @@ class Index extends Component {
|
||||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||||
exportPayloadType={exportPayloadType} logFunction="specialAddDeduction"
|
exportPayloadType={exportPayloadType} logFunction="specialAddDeduction"
|
||||||
form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
onCancel={this.handleCloseImport} detailOptBtns={[]}
|
||||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
importPayload={importPayload} onImportFile={specialAddDeductionImportData}
|
||||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={[]}
|
|
||||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||||
columns={specialModalColumns}
|
|
||||||
>
|
>
|
||||||
<DataTables
|
<DataTables
|
||||||
ref={dom => this.tableRef = dom}
|
ref={dom => this.tableRef = dom}
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ class TemplateBaseSettings extends Component {
|
||||||
})}/>
|
})}/>
|
||||||
<span>{getLabel(111, "分钟后无法查看工资单")}</span>
|
<span>{getLabel(111, "分钟后无法查看工资单")}</span>
|
||||||
<WeaHelpfulTip
|
<WeaHelpfulTip
|
||||||
title={getLabel(111, "空代表不控制,0代表只能查看一次工资单!")}
|
title={getLabel(111, "空代表不控制,0代表只能查看一次工资单!设置后对所有工资单(包含已发工资单)立即生效!")}
|
||||||
style={{ marginLeft: 10 }}
|
style={{ marginLeft: 10 }}
|
||||||
placement="top"/>
|
placement="top"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,11 @@ class RuleConfig extends Component {
|
||||||
return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
|
return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
|
||||||
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
|
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
|
||||||
return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 };
|
return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 };
|
||||||
|
} else if (getKey(o) === "taxDeclarationFunction") {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
viewAttr: (_.isNil(sysinfo.taxDeclarationFunction) || sysinfo.taxDeclarationFunction !== "0") ? 2 : 1
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return { ...o };
|
return { ...o };
|
||||||
})
|
})
|
||||||
|
|
@ -189,6 +194,7 @@ class RuleConfig extends Component {
|
||||||
API.operateTaxDeclarationFunction({ operateTaxDeclaration }).then(({ status, errormsg }) => {
|
API.operateTaxDeclarationFunction({ operateTaxDeclaration }).then(({ status, errormsg }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success(getLabel(22619, "保存成功!"));
|
message.success(getLabel(22619, "保存成功!"));
|
||||||
|
const promise = this.init();
|
||||||
} else {
|
} else {
|
||||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -825,7 +825,7 @@ const BenefitBaseComponent = (props) => {
|
||||||
customComponent={<div className="welfare-same-box">
|
customComponent={<div className="welfare-same-box">
|
||||||
<span>{getLabel(543195, "各项福利基数一致")}</span>
|
<span>{getLabel(543195, "各项福利基数一致")}</span>
|
||||||
<WeaInputNumber style={{ width: 100 }} onBlur={v => onSameChange(items, v)}
|
<WeaInputNumber style={{ width: 100 }} onBlur={v => onSameChange(items, v)}
|
||||||
disabled={runStatuses === "4,5" || !showOperateBtn}/>
|
disabled={runStatuses === "4,5" || !showOperateBtn} precision={2}/>
|
||||||
</div>}
|
</div>}
|
||||||
title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
|
title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
|
||||||
/>;
|
/>;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import { WeaForm } from "comsMobx";
|
||||||
|
|
||||||
export class AttendanceStore {
|
export class AttendanceStore {
|
||||||
@observable form = new WeaForm();
|
@observable form = new WeaForm();
|
||||||
|
@action("字段管理-新建字段表单初始化")
|
||||||
|
initForm = () => this.form = new WeaForm();
|
||||||
@observable refenceform = new WeaForm();
|
@observable refenceform = new WeaForm();
|
||||||
//薪酬统计 新增form
|
//薪酬统计 新增form
|
||||||
@observable statisticsForm = new WeaForm();
|
@observable statisticsForm = new WeaForm();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue