From dc49211090d08c69aa416f6781c1774b5b306400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 13 Mar 2024 09:26:29 +0800 Subject: [PATCH 1/7] =?UTF-8?q?hotfix/3.0.0.2403.01=20=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E8=AE=BE=E7=BD=AE=E6=B7=BB=E5=8A=A0=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/index.js | 4 ++-- pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js index 668d2591..007bb6e6 100644 --- a/pc4mobx/hrmSalary/apis/index.js +++ b/pc4mobx/hrmSalary/apis/index.js @@ -26,14 +26,14 @@ export const getLogs = params => { ...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%\"}]" }; - return postFetch("/api/bs/hrmsalary/elog/getLogs", payload); + return postFetch("/api/bs/hrmelog/elog/getLogs", payload); }; //获取单条操作记录的更新明细 export const getDetailChanges = params => { const payload = { ...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 => { diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js index ec910237..9eaa2ece 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js @@ -226,7 +226,7 @@ class TemplateBaseSettings extends Component { })}/> {getLabel(111, "分钟后无法查看工资单")} From b1ddea5305f96022d50cf6e428d5bee93ef78f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 13 Mar 2024 11:22:54 +0800 Subject: [PATCH 2/7] =?UTF-8?q?hotfix/3.0.0.2403.01=20=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E8=AE=BE=E7=BD=AE=E6=B7=BB=E5=8A=A0=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js index e57ffa58..cb1b28d3 100644 --- a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js +++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js @@ -50,7 +50,7 @@ class Index extends Component { effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [], operateTime: operateTime1 ? [operateTime1, operateTime2] : [] }; - this.setState({ loading: true }); + this.setState({ loading: true, showSearchAd: false }); adjustRecordItemList(payload).then(({ status, data }) => { this.setState({ loading: false }); if (status) { From ffaf5dc036e80e6bc2bf7e8bf6748921f6251724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 13 Mar 2024 14:23:08 +0800 Subject: [PATCH 3/7] hotfix/3.0.0.2403.01 --- .../doCalc/components/salaryCalcPersonConfirm/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js index 83588d5b..68b7245f 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js @@ -173,10 +173,10 @@ class Index extends Component { const { routeParams: { salaryAcctRecordId } } = this.props; saveAcctemployee({ salaryAcctRecordId, employeeIds }).then(({ status, errormsg }) => { if (status) { - message.success(getLabel(541531, "添加成功!")); + message.success(getLabel(26712, "添加成功!")); this.queryPCList(); } else { - message.error(errormsg || getLabel(111, "添加失败!")); + message.error(errormsg || getLabel(545246, "添加失败!")); } }); }; From 0771ad9ed3e8530bdcf3aa3badffdc4809569872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 13 Mar 2024 17:27:49 +0800 Subject: [PATCH 4/7] =?UTF-8?q?hotfix/3.0.0.2403.01=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=E9=A1=B5=E9=9D=A2=E5=AF=BC=E5=85=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/importDialog/index.less | 24 ++++++ .../cumDeduct/components/importFormCom.js | 2 +- .../pages/dataAcquisition/cumDeduct/index.js | 59 ++----------- .../dataAcquisition/cumSituation/index.js | 58 +------------ .../pages/dataAcquisition/importDialog.js | 84 +++++++++++++++++++ .../hrmSalary/pages/dataAcquisition/layout.js | 46 +++++----- .../dataAcquisition/otherDeduct/index.js | 32 +------ .../specialAddDeduction/index.js | 54 +----------- 8 files changed, 152 insertions(+), 207 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/dataAcquisition/importDialog.js diff --git a/pc4mobx/hrmSalary/components/importDialog/index.less b/pc4mobx/hrmSalary/components/importDialog/index.less index 95cee40b..21d314d9 100644 --- a/pc4mobx/hrmSalary/components/importDialog/index.less +++ b/pc4mobx/hrmSalary/components/importDialog/index.less @@ -120,6 +120,30 @@ } } + .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; + } + } + } + } } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/importFormCom.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/importFormCom.js index 0044f630..4746d846 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/importFormCom.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/importFormCom.js @@ -32,7 +32,7 @@ class ImportFormCom extends Component { value: taxAgentId || "", onChange: this.screenChange, options: [{ key: "", showname: "全部" }, ...taxAgentOption], - key: "taxAgentId" + key: "taxAgentId", viewAttr: 3 }) } ]; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index 5c3658fb..eaba3e5b 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -19,14 +19,13 @@ import { editAddUpDeduction, getAddUpDeduction, getCumDeductSaCondition, - importCumDeductParam, - importCumDeductPreview + importCumDeductParam } from "../../../apis/cumDeduct"; import DataTables from "../dataTables"; import AddItems from "../addItems"; import ImportFormCom from "./components/importFormCom"; import TableRecord from "../components/tableRecord"; -import { dataCollectCondition, modalColumns } from "./columns"; +import { dataCollectCondition } from "./columns"; import { removePropertyCondition } from "../../../util/response"; import { convertToUrlString } from "../../../util/url"; import Layout from "../layout"; @@ -59,10 +58,9 @@ class Index extends Component { taxAgentId: "" }, importFormComponent: null, - step: 0, templateLink: "/api/bs/hrmsalary/addUpDeduction/downloadTemplate", importResult: {}, - slideDataSource: [] + previewUrl: "/api/bs/hrmsalary/addUpDeduction/preview" }, exportPayloadUrl: "", exportPayloadType: false, @@ -200,41 +198,6 @@ class Index extends Component { 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: 黎永顺 * Description: 数据采集-信息保存 @@ -530,12 +493,6 @@ class Index extends Component { importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } } }); }; - handleImportSetStep = (step) => { - const { importPayload } = this.state; - this.setState({ - importPayload: { ...importPayload, step } - }); - }; render() { const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props; @@ -551,11 +508,9 @@ class Index extends Component { slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl} exportPayloadType={exportPayloadType} logFunction="addupdeduction" form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch} - onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport} - importPayload={importPayload} onImportFile={this.handleImportFile} - onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()} + onCancel={this.handleCloseImport} onImportFile={importCumDeductParam} + importPayload={importPayload} detailOptBtns={this.getDetailOptBtns()} targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })} - columns={modalColumns} > this.tableRef = dom} @@ -588,9 +543,9 @@ export const DataCollectionDatePicker = (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 - onChange({ key, value: val })} options={options}/> + onChange({ key, value: val })} options={options} viewAttr={viewAttr}/> ; }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index d6b70c9c..dd32ab7c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -15,8 +15,7 @@ import { editAddUpSituation, getAddUpSituation, getCumSituationSaCondition, - importCumSituationParam, - importCumSituationPreview + importCumSituationParam } from "../../../apis/cumSituation"; import { removePropertyCondition } from "../../../util/response"; import DataTables from "../dataTables"; @@ -27,7 +26,6 @@ import moment from "moment"; import { dataCollectCondition, taxOptions } from "./columns"; import AddItems from "../addItems"; import TableRecord from "../components/tableRecord"; -import { situationModalColumns } from "../cumDeduct/columns"; import { convertToUrlString } from "../../../util/url"; const getKey = WeaTools.getKey; @@ -57,10 +55,9 @@ class Index extends Component { declareMonth: moment(new Date()).format("YYYY-MM") }, importFormComponent: null, - step: 0, templateLink: "/api/bs/hrmsalary/addUpSituation/downloadTemplate", importResult: {}, - slideDataSource: [] + previewUrl: "/api/bs/hrmsalary/addUpSituation/preview" }, exportPayloadUrl: "", exportPayloadType: false, @@ -126,46 +123,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: 黎永顺 * Description:列表操作 @@ -485,12 +442,6 @@ class Index extends Component { importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } } }); }; - handleImportSetStep = (step) => { - const { importPayload } = this.state; - this.setState({ - importPayload: { ...importPayload, step } - }); - }; /* * Author: 黎永顺 * Description:详情页面-操作按钮 @@ -555,10 +506,9 @@ class Index extends Component { slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl} exportPayloadType={exportPayloadType} logFunction="addupsituation" 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 } }} - onImportFile={this.handleImportFile} columns={situationModalColumns} - onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()} targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })} > { + 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 ( + this.setState({ + importDialog: { ...importDialog, importResult: {}, imageId: "", link: "" } + })} + exportDataDom={ + 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; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js index 587f2785..0c42281c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js @@ -8,11 +8,11 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; 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 { getSearchs } from "../../util"; import "./index.less"; -import LogDialog from "../../components/logViewModal"; const getLabel = WeaLocaleProvider.getLabel; @@ -78,14 +78,13 @@ class Layout extends Component { const { showSearchAd, logDialogVisible, filterConditions } = this.state; const { title, btns, leftComp, children, taxAgentStore: { showOperateBtn }, - slidePayload, onClose, onSave, slideLoading, form, condition, - onAdSearch, onCancel, importPayload, onImportSetStep, onImportFile, - onPreviewImport, detailOptBtns, columns, logFunction, onClearTargrtid + slidePayload, onClose, onSave, slideLoading, form, condition, onImportFile, + onAdSearch, onCancel, importPayload, detailOptBtns, logFunction, onClearTargrtid } = this.props; const { visible, title: subtitle, children: slideChildren } = slidePayload; const { - visible: importVisiable, step, importFormComponent, importOpts, - importResult, slideDataSource, templateLink + visible: importVisiable, importFormComponent, importOpts, + importResult, templateLink, previewUrl } = importPayload; return (
@@ -115,21 +114,26 @@ class Layout extends Component { {children} {/*导入弹框*/} onCancel(true)} - slideDataSource={slideDataSource} - previewImport={onPreviewImport} - importFile={onImportFile} - templateLink={templateLink} - renderFormComponent={() => importFormComponent} - visiable={importVisiable} - onCancel={onCancel} + visible={importVisiable} onCancel={onCancel} importParams={importFormComponent} + importOpts={importOpts} importResult={importResult} templateLink={templateLink} + previewUrl={previewUrl} onImportFile={onImportFile} /> + {/* onCancel(true)}*/} + {/* slideDataSource={slideDataSource}*/} + {/* previewImport={onPreviewImport}*/} + {/* importFile={onImportFile}*/} + {/* templateLink={templateLink}*/} + {/* renderFormComponent={() => importFormComponent}*/} + {/* visiable={importVisiable}*/} + {/* onCancel={onCancel}*/} + {/*/>*/} {/* 新增-编辑-详情弹框 */} { - importOtherDeductionParam(params).then(({ status, data }) => { - if (status) { - const { importPayload } = this.state; - this.setState({ - importPayload: { ...importPayload, importResult: data } - }); - } - }); - }; /* * Author: 黎永顺 * Description: 导入数据采集-数据查看 @@ -479,12 +461,6 @@ class Index extends Component { importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } } }); }; - handleImportSetStep = (step) => { - const { importPayload } = this.state; - this.setState({ - importPayload: { ...importPayload, step } - }); - }; /* * Author: 黎永顺 * Description:详情页面-操作按钮 @@ -549,11 +525,9 @@ class Index extends Component { slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl} exportPayloadType={exportPayloadType} logFunction="otherdeduction" form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch} - onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport} - importPayload={importPayload} onImportFile={this.handleImportFile} - onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()} + onCancel={this.handleCloseImport} importPayload={importPayload} + detailOptBtns={this.getDetailOptBtns()} onImportFile={importOtherDeductionParam} targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })} - columns={otherModalColumns} > this.tableRef = dom} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index 25288174..fe79d45f 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -11,8 +11,7 @@ import { specialAddDeductionDeleteAllData, specialAddDeductionDeleteSelectData, specialAddDeductionEditData, - specialAddDeductionImportData, - specialAddDeductionPreview + specialAddDeductionImportData } from "../../../apis/special"; import { removePropertyCondition } from "../../../util/response"; import { DataCollectionSelect } from "../cumDeduct"; @@ -20,7 +19,6 @@ import ImportFormCom from "../cumDeduct/components/importFormCom"; import { condition } from "./components/condition"; import AddItems from "../addItems"; import TableRecord from "../components/tableRecord"; -import { specialModalColumns } from "../cumDeduct/columns"; import { convertToUrlString } from "../../../util/url"; const getKey = WeaTools.getKey; @@ -47,10 +45,9 @@ class Index extends Component { taxAgentId: "" }, importFormComponent: null, - step: 0, templateLink: "/api/bs/hrmsalary/specialAddDeduction/downloadTemplate", importResult: {}, - slideDataSource: [] + previewUrl: "/api/bs/hrmsalary/specialAddDeduction/preview" }, exportPayloadUrl: "", 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: 黎永顺 * Description: 高级搜素框-表单项 @@ -439,12 +401,6 @@ class Index extends Component { importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } } }); }; - handleImportSetStep = (step) => { - const { importPayload } = this.state; - this.setState({ - importPayload: { ...importPayload, step } - }); - }; render() { const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props; @@ -460,11 +416,9 @@ class Index extends Component { slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl} exportPayloadType={exportPayloadType} logFunction="specialAddDeduction" form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch} - onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport} - importPayload={importPayload} onImportFile={this.handleImportFile} - onPreviewImport={this.handlePreviewImport} detailOptBtns={[]} + onCancel={this.handleCloseImport} detailOptBtns={[]} + importPayload={importPayload} onImportFile={specialAddDeductionImportData} targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })} - columns={specialModalColumns} > this.tableRef = dom} From 0a23b261b198e250c2fc03d3d02060f151910041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 14 Mar 2024 10:14:06 +0800 Subject: [PATCH 5/7] release/3.0.0.2403.01 --- pc4mobx/hrmSalary/apis/index.js | 2 +- pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js index 007bb6e6..4cb3b93c 100644 --- a/pc4mobx/hrmSalary/apis/index.js +++ b/pc4mobx/hrmSalary/apis/index.js @@ -24,7 +24,7 @@ export const getTableDatas = (params) => { export const getLogs = params => { const payload = { ...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/hrmelog/elog/getLogs", payload); }; diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js index 45049a14..3e50d8ad 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js @@ -43,6 +43,11 @@ class RuleConfig extends Component { return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) }; } else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") { 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 }; }) @@ -189,6 +194,7 @@ class RuleConfig extends Component { API.operateTaxDeclarationFunction({ operateTaxDeclaration }).then(({ status, errormsg }) => { if (status) { message.success(getLabel(22619, "保存成功!")); + const promise = this.init(); } else { message.error(errormsg || getLabel(22620, "保存失败!")); } From 5e3c20edc072ba092c0b8fa634e1a0b205dad30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 15 Mar 2024 09:19:59 +0800 Subject: [PATCH 6/7] release/3.0.0.2403.01 --- pc4mobx/hrmSalary/apis/index.js | 2 +- .../components/importDialog/index.less | 24 ++++ .../components/selectItemsModal/index.js | 12 +- .../components/selectItemsModal/index.less | 2 +- .../selectItemsModal/selectItemsWrapper.js | 13 +- .../components/attendanceCustomFieldsModal.js | 10 +- .../components/attendanceDataComp.js | 133 +++++------------- .../components/attendanceRefrenceDataModal.js | 17 +-- .../attendance/components/importDialog.js | 82 +++++++++++ .../components/importFormOptions.js | 5 +- .../attendance/components/index.less | 4 - .../pages/dataAcquisition/attendance/index.js | 7 +- .../dataAcquisition/attendance/index.less | 2 +- .../pages/dataAcquisition/cumDeduct/index.js | 3 +- .../pages/dataAcquisition/dataTables.js | 5 +- .../pages/dataAcquisition/importDialog.js | 22 ++- pc4mobx/hrmSalary/stores/attendanceStore.js | 2 + 17 files changed, 202 insertions(+), 143 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importDialog.js diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js index 007bb6e6..4cb3b93c 100644 --- a/pc4mobx/hrmSalary/apis/index.js +++ b/pc4mobx/hrmSalary/apis/index.js @@ -24,7 +24,7 @@ export const getTableDatas = (params) => { export const getLogs = params => { const payload = { ...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/hrmelog/elog/getLogs", payload); }; diff --git a/pc4mobx/hrmSalary/components/importDialog/index.less b/pc4mobx/hrmSalary/components/importDialog/index.less index 21d314d9..4c9430f2 100644 --- a/pc4mobx/hrmSalary/components/importDialog/index.less +++ b/pc4mobx/hrmSalary/components/importDialog/index.less @@ -142,6 +142,30 @@ 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; + } + } } } diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/index.js b/pc4mobx/hrmSalary/components/selectItemsModal/index.js index b7d01a5d..cae0464d 100644 --- a/pc4mobx/hrmSalary/components/selectItemsModal/index.js +++ b/pc4mobx/hrmSalary/components/selectItemsModal/index.js @@ -9,7 +9,6 @@ import { WeaCheckbox, WeaDialog, WeaInputSearch } from "ecCom"; import { Button } from "antd"; import "./index.less"; - export default class SelectItemModal extends React.Component { constructor(props) { super(props); @@ -58,10 +57,19 @@ export default class SelectItemModal extends React.Component { const bottomLeft = ; return ( {children} diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/index.less b/pc4mobx/hrmSalary/components/selectItemsModal/index.less index 6486a98c..7572d9da 100644 --- a/pc4mobx/hrmSalary/components/selectItemsModal/index.less +++ b/pc4mobx/hrmSalary/components/selectItemsModal/index.less @@ -19,7 +19,7 @@ flex-wrap: wrap; li { - width: 124px; + width: 140px; overflow: hidden; padding: 4px 0; diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js b/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js index 1a0d44d0..81c29aed 100644 --- a/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js +++ b/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js @@ -11,21 +11,22 @@ class SelectItemsWrapper extends Component { constructor(props) { super(props); this.state = { - searchVal: "", - selectItem: [], - groupItem: [], - showOnlyChecked: false + searchVal: "", selectItem: [], groupItem: [], showOnlyChecked: false }; } componentDidMount() { - const { dataSource } = this.props + this.initSelectItem(); + } + + initSelectItem = () => { + const { dataSource } = this.props; this.setState({ selectItem: _.map(_.filter(_.reduce(dataSource, (pre, cur) => { return [...pre, ...cur.items]; }, []), item => !!item.checked), it => it.id) }); - } + }; handleSearchItemSet = (searchVal) => this.setState({ searchVal }); handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) }); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceCustomFieldsModal.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceCustomFieldsModal.js index 0bbc46f0..aa7fd242 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceCustomFieldsModal.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceCustomFieldsModal.js @@ -22,7 +22,9 @@ class AttendanceCustomFieldsModal extends Component { } 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) initForm(); } @@ -62,12 +64,8 @@ class AttendanceCustomFieldsModal extends Component { ]; return ( - - {getSearchs(form, conditions, 1)} + +
{getSearchs(form, conditions, 1)}
); } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataComp.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataComp.js index cd8ec31a..dd103159 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataComp.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataComp.js @@ -14,14 +14,13 @@ import { getLedgerList, getSalaryCycleAndAttendCycle, importAttendQuoteData, - previewAttendQuote, returnToAttendanceFieldSettingDefault, saveAttendanceFieldSetting, saveAttendanceFieldSettingAsDefault } from "../../../../apis/attendance"; -import ImportModal from "../../../../components/importModal"; -import HeaderSet from "../../../../components/importModal/headerSet"; -import ImportFormOptions from "./importFormOptions"; +import ImportModal from "./importDialog"; +// import HeaderSet from "../../../../components/importModal/headerSet"; +// import ImportFormOptions from "./importFormOptions"; import SelectItemModal from "../../../../components/selectItemsModal"; import moment from "moment"; import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper"; @@ -45,10 +44,7 @@ class AttendanceDataComp extends Component { pageSize: 10, total: 0 }, - importData: { - visiable: false, params: {}, step: 0, - columns: [], slideDataSource: [], importResult: [] - }, + importData: { visible: false, params: {} }, importFormPayload: { salaryYearMonth: moment().format("YYYY-MM"), salarySobList: [], salarySobId: "", salaryCycle: "", attendCycle: "" @@ -87,15 +83,24 @@ class AttendanceDataComp extends Component { } }).catch(() => this.setState({ loading: { ...loading, query: false } })); }; - getLedgerList = () => { + getLedgerList = (importData) => { const { importFormPayload } = this.state; getLedgerList().then(({ status, data }) => { if (status) { this.setState({ importFormPayload: { - ...importFormPayload, + ...importFormPayload, salarySobId: _.head(data).id, 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) => { - const { importFormPayload } = this.state; - const { salaryYearMonth, salarySobId } = importFormPayload; - this.getLedgerList(); - this.setState({ importData: { ...importData, params: { salaryYearMonth, salarySobId } } }); - }; - setStep = step => this.setState({ importData: { ...this.state.importData, step } }); - handleFinish = () => { + handleImportAttendanceData = (importData) => this.getLedgerList(importData); + handleFinish = (isFresh) => { const { importData } = this.state; - const { step } = importData; this.setState({ - importData: { - ...importData, visiable: false, params: {}, step: 0, - 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}`); + importData: { ...importData, visible: false, params: {} } + }, () => isFresh && this.getAttendanceList()); }; /* * Author: 黎永顺 @@ -236,7 +189,7 @@ class AttendanceDataComp extends Component { onSelectItem={this.handleSelectItem} /> } - }); + }, () => this.setItemRef && this.setItemRef.initSelectItem()); } }).catch(() => this.setState({ loading: { ...loading, headset: false } })); }; @@ -392,46 +345,30 @@ class AttendanceDataComp extends Component { } } ]} - dataSource={dataSource} - pagination={pagination} - loading={loading.query} - /> + dataSource={dataSource} pagination={pagination} loading={loading.query}/> {/* 考勤引用导入 */} - this.handleHeaderSettings({ sourceType: "IMPORT" })}/>} - renderFormComponent={() => - } + {/* 表头设置 */} + onMoreOpts={this.handleMoreOpts} onSave={this.handleSave}/> {/* 考勤数据引用 */} - + {/* 考勤数据查看 */} - this.setState({ - attendanceViewPayload: { - ...attendanceViewPayload, - visible: false, - attendQuoteId: "" - } - })} - /> + this.setState({ + attendanceViewPayload: { + ...attendanceViewPayload, + visible: false, + attendQuoteId: "" + } + })}/> ); } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js index 2308b556..14de4956 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js @@ -13,7 +13,10 @@ import { getSearchs } from "../../../../util"; import { checkOperation, getAttendanceFieldSettingList, - getLedgerList, returnToAttendanceFieldSettingDefault, saveAttendanceFieldSetting, saveAttendanceFieldSettingAsDefault, + getLedgerList, + returnToAttendanceFieldSettingDefault, + saveAttendanceFieldSetting, + saveAttendanceFieldSettingAsDefault, syncAttendanceRefer } from "../../../../apis/attendance"; import SelectItemModal from "../../../../components/selectItemsModal"; @@ -124,7 +127,7 @@ class AttendanceRefrenceDataModal extends Component { onSelectItem={this.handleSelectItem} /> } - }); + }, () => this.setItemRef && this.setItemRef.initSelectItem()); } }).catch(() => this.setState({ headerSetLoading: false })); }; @@ -209,12 +212,10 @@ class AttendanceRefrenceDataModal extends Component { ]; return ( - - {getSearchs(refenceform, condition, 1)} + +
+ {getSearchs(refenceform, condition, 1)} +
{/* 表头设置 */} { + 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 ( + this.setState({ + importDialog: { ...importDialog, importResult: {}, imageId: "", link: "" } + })} + importParams={} + exportDataDom={ onHeaderSettings({ sourceType: "IMPORT" })}/>} + nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })} + nextUplaodCallback={imageId => this.handleImport({ imageId })} + /> + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importFormOptions.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importFormOptions.js index f16d18f3..08dfe2c2 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importFormOptions.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importFormOptions.js @@ -40,8 +40,9 @@ class ImportFormOptions extends Component { label: "薪资账套", value: salarySobId || "", onChange: this.screenChange, - options: [{ key: "", showname: "" }, ...salarySobList], - key: "salarySobId" + options: salarySobList, + key: "salarySobId", + viewAttr: 3 }) }, { com: Input("薪资周期", salaryCycle) }, diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less index 6e340057..640d1b83 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less @@ -18,10 +18,6 @@ } } -.attendanceFormWrapper { - padding: 0; -} - .attendanceSlideWrapper { .wea-slide-modal-title { height: initial; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index 7f4c67c1..e27fc31e 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -57,12 +57,7 @@ class Index extends Component { }; handleChangeSalaryMonth = (salaryMonth) => this.setState({ salaryMonth }, () => this.attendanceTableRef.getAttendanceList({ salaryYearMonth: _.compact(this.state.salaryMonth) })); handleAddAttendFileds = () => this.fieldMangRef.handleTriggerAttendFileds(); - handleImportAttendanceData = () => { - this.attendanceTableRef.handleImportAttendanceData({ - visiable: true, params: {}, step: 0, - columns: [], slideDataSource: [], importResult: [] - }); - }; + handleImportAttendanceData = () => this.attendanceTableRef.handleImportAttendanceData({ visible: true, params: {} }); handleQuoteAttendanceData = () => { this.attendanceTableRef.handleQuoteAttendanceData({ visible: true, title: "引用考勤数据" diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less index e4dae347..fafbff7c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less @@ -4,7 +4,7 @@ flex-direction: column; .wea-form-item { - padding: 8px 16px; + padding: 8px 16px 0 16px; .to { padding: 0 10px diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index eaba3e5b..5d9db24e 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -545,7 +545,8 @@ export const DataCollectionDatePicker = (props) => { export const DataCollectionSelect = (props) => { const { value, label, onChange, options, key, labelCol = 10, wrapperCol = 14, viewAttr = 2 } = props; return - onChange({ key, value: val })} options={options} viewAttr={viewAttr}/> + onChange({ key, value: val })} options={options} + viewAttr={viewAttr}/> ; }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js index 742c7894..e677d531 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js @@ -35,7 +35,10 @@ class DataTables extends Component { getTableDate = (extraPayload = {}) => { const { loading, pageInfo } = this.state; 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 } }); getTableDate(module).then(({ status, data }) => { this.setState({ loading: { ...loading, query: false } }); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/importDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/importDialog.js index 1cc14192..0e1777e9 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/importDialog.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/importDialog.js @@ -1,19 +1,16 @@ /* * Author: 黎永顺 - * name: 最优年终奖计税方案-策略-导入 + * name:数据采集四个基础项-导入 * Description: - * Date: 2024/3/1 + * Date: 2024/3/14 */ import React, { Component } from "react"; -import { inject, observer } from "mobx-react"; import { WeaCheckbox, WeaLocaleProvider } from "ecCom"; import ImportDialog from "../../components/importDialog"; import { convertToUrlString } from "../../util/url"; const getLabel = WeaLocaleProvider.getLabel; -@inject("specialAddStore") -@observer class Index extends Component { constructor(props) { super(props); @@ -32,11 +29,24 @@ class Index extends Component { this.setState({ importDialog: { ...importDialog, link: `${templateLink}?${convertToUrlString({ ...importOpts, hasData })}`, - importResult, params: importOpts, previewUrl + 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 } }); diff --git a/pc4mobx/hrmSalary/stores/attendanceStore.js b/pc4mobx/hrmSalary/stores/attendanceStore.js index f309619e..d34866d3 100644 --- a/pc4mobx/hrmSalary/stores/attendanceStore.js +++ b/pc4mobx/hrmSalary/stores/attendanceStore.js @@ -4,6 +4,8 @@ import { WeaForm } from "comsMobx"; export class AttendanceStore { @observable form = new WeaForm(); + @action("字段管理-新建字段表单初始化") + initForm = () => this.form = new WeaForm(); @observable refenceform = new WeaForm(); //薪酬统计 新增form @observable statisticsForm = new WeaForm(); From 689c837749fc24be4abc59498bd7d6d3f7994f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 15 Mar 2024 15:09:16 +0800 Subject: [PATCH 7/7] =?UTF-8?q?hotfix/3.00.0.2403.01=20=E8=80=83=E6=83=85?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/attendanceDataViewSlide.js | 104 ++++++------------ .../attendance/components/index.less | 30 +++++ .../welfareArchive/config.js | 2 +- 3 files changed, 65 insertions(+), 71 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js index 1011398c..4e2735aa 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js @@ -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 ([ -
- {showOperateBtn && } - this.setState({ keyword })} - onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)} - /> -
- ]); - }; 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 = [ + , + this.setState({ keyword })} + onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)} + /> + ]; return ( - - } - content={ -
- - - - ({ - ...item, - render: (text) => { - return {text} ; - } - }))} - dataSource={dataSource} - pagination={pagination} - loading={loading.query} - xWidth={columns.length * 180} - /> -
- } + } + iconBgcolor="#F14A2D" + buttons={showOperateBtn ? btns : btns.slice(1)}/> + } + content={ +
+
+
{getLabel(543376, "考勤周期")}:{salaryYearMonth}
+
+
+ +
+ } /> ); } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less index 640d1b83..51316cab 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/index.less @@ -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) { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js index ea717c4f..2c0a760d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js @@ -825,7 +825,7 @@ const BenefitBaseComponent = (props) => { customComponent={
{getLabel(543195, "各项福利基数一致")} onSameChange(items, v)} - disabled={runStatuses === "4,5" || !showOperateBtn}/> + disabled={runStatuses === "4,5" || !showOperateBtn} precision={2}/>
} title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper" />;