From 66debb47087afcbdaa062623820f7edbe7c645a6 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 2 Nov 2022 10:41:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=BC=96=E8=BE=91=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=20=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/dataAcquisition/cumDeduct/index.js | 22 +++++++++---------- .../dataAcquisition/cumSituation/columns.js | 4 ---- .../dataAcquisition/cumSituation/index.js | 20 ++++++++--------- .../dataAcquisition/otherDeduct/index.js | 20 ++++++++--------- 4 files changed, 31 insertions(+), 35 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index b345f310..f3861c66 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -274,7 +274,7 @@ export default class CumDeduct extends React.Component { const { editId } = this.state; this.setState({ saveLoading: true }); if (!_.isEmpty(editId)) { - API.editAddUpDeduction({ ...payload, id: editId.id }).then(({ status }) => { + API.editAddUpDeduction({ ...payload, id: editId.id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("编辑成功"); @@ -291,11 +291,11 @@ export default class CumDeduct extends React.Component { addForm.resetForm(); }); } else { - message.error("编辑成功"); + message.error(errormsg || "编辑失败"); } }); } else { - API.createAddUpDeduction(payload).then(({ status }) => { + API.createAddUpDeduction(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("新增成功"); @@ -312,7 +312,7 @@ export default class CumDeduct extends React.Component { addForm.resetForm(); }); } else { - message.error("新增失败"); + message.error(errormsg || "新增失败"); } }); } @@ -332,7 +332,7 @@ export default class CumDeduct extends React.Component { title: "信息确认", content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。", onOk: () => { - API.deleteSelectAddUpDeduction(payload).then(({ status }) => { + API.deleteSelectAddUpDeduction(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -340,7 +340,7 @@ export default class CumDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); }, @@ -360,7 +360,7 @@ export default class CumDeduct extends React.Component { title: "信息确认", content: `确定清空税款所属期为${declareMonth}的所有累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteAllAddUpDeduction(payload).then(({ status }) => { + API.deleteAllAddUpDeduction(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -368,7 +368,7 @@ export default class CumDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } @@ -396,7 +396,7 @@ export default class CumDeduct extends React.Component { title: "信息确认", content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteSelectAddUpDeduction(payload).then(({ status }) => { + API.deleteSelectAddUpDeduction(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -404,7 +404,7 @@ export default class CumDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } @@ -533,7 +533,7 @@ export default class CumDeduct extends React.Component { this.setState({ addVisible: true, editId: {} - },()=>addForm.resetForm()); + }, () => addForm.resetForm()); }}> 新建 , diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js index 0f825cfd..45fab4e4 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js @@ -355,10 +355,6 @@ export const dataCollectCondition = [ ]; export const taxOptions = [ - { - key: "", - showname: "" - }, { key: "01", showname: "一月", diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index be8a4c86..98a90fa4 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -265,7 +265,7 @@ export default class CumSituation extends React.Component { const { editId } = this.state; this.setState({ saveLoading: true }); if (!_.isEmpty(editId)) { - API.editAddUpSituation({ ...payload, id: editId.id }).then(({ status }) => { + API.editAddUpSituation({ ...payload, id: editId.id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("编辑成功"); @@ -278,11 +278,11 @@ export default class CumSituation extends React.Component { addForm.resetForm(); }); } else { - message.error("编辑失败"); + message.error(errormsg || "编辑失败"); } }); } else { - API.createAddUpSituation(payload).then(({ status }) => { + API.createAddUpSituation(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("新增成功"); @@ -295,7 +295,7 @@ export default class CumSituation extends React.Component { addForm.resetForm(); }); } else { - message.error("新增失败"); + message.error(errormsg || "新增失败"); } }); } @@ -321,12 +321,12 @@ export default class CumSituation extends React.Component { title: "信息确认", content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的往期累计情况数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteSelectAddUpSituation(payload).then(({ status }) => { + API.deleteSelectAddUpSituation(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); this.handleSearch(); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } @@ -347,12 +347,12 @@ export default class CumSituation extends React.Component { title: "信息确认", content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。", onOk: () => { - API.deleteSelectAddUpSituation(payload).then(({ status }) => { + API.deleteSelectAddUpSituation(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); this.handleSearch(); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); }, @@ -370,12 +370,12 @@ export default class CumSituation extends React.Component { title: "信息确认", content: `确定清空税款所属期为${declareMonth}的所有往期累计情况的数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteAllAddUpSituation(payload).then(({ status }) => { + API.deleteAllAddUpSituation(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); this.handleSearch(); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index ca12c043..4534eafa 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -245,7 +245,7 @@ export default class OtherDeduct extends React.Component { const { editId }= this.state; this.setState({ saveLoading: true }); if (!_.isEmpty(editId)) { - API.editData({ ...payload, id: editId.id }).then(({ status }) => { + API.editData({ ...payload, id: editId.id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("编辑成功"); @@ -262,11 +262,11 @@ export default class OtherDeduct extends React.Component { addForm.resetForm(); }); } else { - message.error("编辑失败"); + message.error(errormsg || "编辑失败"); } }); } else { - API.createData(payload).then(({ status }) => { + API.createData(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("新增成功"); @@ -283,7 +283,7 @@ export default class OtherDeduct extends React.Component { addForm.resetForm(); }); } else { - message.error("新增失败"); + message.error(errormsg || "新增失败"); } }); } @@ -310,7 +310,7 @@ export default class OtherDeduct extends React.Component { title: "信息确认", content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteSelectData(payload).then(({ status }) => { + API.deleteSelectData(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -318,7 +318,7 @@ export default class OtherDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } @@ -340,7 +340,7 @@ export default class OtherDeduct extends React.Component { title: "信息确认", content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。", onOk: () => { - API.deleteSelectData(payload).then(({ status }) => { + API.deleteSelectData(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -348,7 +348,7 @@ export default class OtherDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); }, @@ -368,7 +368,7 @@ export default class OtherDeduct extends React.Component { title: "信息确认", content: `确定清空税款所属期为${declareMonth}的所有其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteAllData(payload).then(({ status }) => { + API.deleteAllData(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -376,7 +376,7 @@ export default class OtherDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); }