From 7ea5936829ff17630e676eb2baf51a0490337b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 10 Apr 2023 15:53:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E8=96=AA=E8=B5=84=E8=B4=A6?= =?UTF-8?q?=E5=A5=97-=E8=96=AA=E8=B5=84=E8=B4=A6=E5=A5=97=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AEbug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/dataAcquisition/cumDeduct/index.js | 10 +++++++--- .../pages/dataAcquisition/cumSituation/index.js | 10 +++++++--- pc4mobx/hrmSalary/pages/dataAcquisition/layout.js | 2 +- .../pages/dataAcquisition/otherDeduct/index.js | 10 +++++++--- .../dataAcquisition/specialAddDeduction/index.js | 11 ++++++++--- .../pages/ledgerPage/components/ledgerSalaryItem.js | 4 ++-- .../ledgerPage/components/ledgerSalaryItemNormal.js | 4 ++-- pc4mobx/hrmSalary/pages/mobilePayroll/index.js | 3 ++- 8 files changed, 36 insertions(+), 18 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index 3e839bd0..0e106ae3 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -53,6 +53,7 @@ class Index extends Component { slideDataSource: [] }, exportPayloadUrl: "", + exportPayloadType: false, advanceCondition: null }; this.tableRef = null; @@ -162,8 +163,9 @@ class Index extends Component { */ handleExportAll = () => { const { cumDeductStore: { form } } = this.props; - const { declareMonth, taxAgentId } = this.state; + const { declareMonth, taxAgentId, exportPayloadType } = this.state; this.setState({ + exportPayloadType: !exportPayloadType, exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}` }); }; @@ -175,12 +177,13 @@ class Index extends Component { */ handleExportSelect = () => { const { selectedRowKeys: ids } = this.tableRef.state; - const { declareMonth, taxAgentId } = this.state; + const { declareMonth, taxAgentId, exportPayloadType } = this.state; if (ids.length === 0) { message.warning("请选择需要导出的数据"); return; } this.setState({ + exportPayloadType: !exportPayloadType, exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}` }); }; @@ -499,7 +502,7 @@ class Index extends Component { const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props; const { declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, - importPayload + importPayload, exportPayloadType } = this.state; const tablePayload = { declareMonth: [declareMonth], taxAgentId }; return ( @@ -507,6 +510,7 @@ class Index extends Component { onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload} onClose={this.handleCloseSlide} onSave={this.handleSaveData} slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl} + exportPayloadType={exportPayloadType} form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch} onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport} importPayload={importPayload} onImportFile={this.handleImportFile} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index ea3e56e8..78c77a40 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -60,6 +60,7 @@ class Index extends Component { slideDataSource: [] }, exportPayloadUrl: "", + exportPayloadType: false, advanceCondition: null }; this.tableRef = null; @@ -279,8 +280,9 @@ class Index extends Component { */ handleExportAll = () => { const { cumSituationStore: { form } } = this.props; - const { declareMonth, taxAgentId, year } = this.state; + const { declareMonth, taxAgentId, year, exportPayloadType } = this.state; this.setState({ + exportPayloadType: !exportPayloadType, exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}` }); }; @@ -292,12 +294,13 @@ class Index extends Component { */ handleExportSelect = () => { const { selectedRowKeys: ids } = this.tableRef.state; - const { declareMonth, taxAgentId, year } = this.state; + const { declareMonth, taxAgentId, year, exportPayloadType } = this.state; if (ids.length === 0) { message.warning("请选择需要导出的数据"); return; } this.setState({ + exportPayloadType: !exportPayloadType, exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=${ids.join(",")}&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}` }); }; @@ -513,7 +516,7 @@ class Index extends Component { const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props; const { declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, - importPayload, year + importPayload, year, exportPayloadType } = this.state; const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId }; return ( @@ -521,6 +524,7 @@ class Index extends Component { onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload} onClose={this.handleCloseSlide} onSave={this.handleSaveData} slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl} + exportPayloadType={exportPayloadType} form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch} onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport} importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js index ed2969e8..631d0586 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js @@ -30,7 +30,7 @@ class Layout extends Component { } componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.exportPayloadUrl !== this.props.exportPayloadUrl) { + if (nextProps.exportPayloadType !== this.props.exportPayloadType) { /* * Author: 黎永顺 * Description:导出数据采集数据 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index aafc7674..5e5aec09 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -60,6 +60,7 @@ class Index extends Component { slideDataSource: [] }, exportPayloadUrl: "", + exportPayloadType: false, advanceCondition: null }; this.tableRef = null; @@ -252,8 +253,9 @@ class Index extends Component { */ handleExportAll = () => { const { otherDeductStore: { form } } = this.props; - const { declareMonth, taxAgentId } = this.state; + const { declareMonth, taxAgentId, exportPayloadType } = this.state; this.setState({ + exportPayloadType: !exportPayloadType, exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}` }); }; @@ -265,12 +267,13 @@ class Index extends Component { */ handleExportSelect = () => { const { selectedRowKeys: ids } = this.tableRef.state; - const { declareMonth, taxAgentId } = this.state; + const { declareMonth, taxAgentId, exportPayloadType } = this.state; if (ids.length === 0) { message.warning("请选择需要导出的数据"); return; } this.setState({ + exportPayloadType: !exportPayloadType, exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}` }); }; @@ -506,7 +509,7 @@ class Index extends Component { const { taxAgentStore: { showOperateBtn }, otherDeductStore: { form } } = this.props; const { declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, - importPayload + importPayload, exportPayloadType } = this.state; const tablePayload = { declareMonth: [declareMonth], taxAgentId }; return ( @@ -514,6 +517,7 @@ class Index extends Component { onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload} onClose={this.handleCloseSlide} onSave={this.handleSaveData} slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl} + exportPayloadType={exportPayloadType} form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch} onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport} importPayload={importPayload} onImportFile={this.handleImportFile} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index 0a33af1d..5ea6f81c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -50,6 +50,7 @@ class Index extends Component { slideDataSource: [] }, exportPayloadUrl: "", + exportPayloadType: false, advanceCondition: null }; this.tableRef = null; @@ -209,8 +210,9 @@ class Index extends Component { */ handleExportAll = () => { const { specialAddStore: { advanceForm } } = this.props; - const { taxAgentId } = this.state; + const { taxAgentId, exportPayloadType } = this.state; this.setState({ + exportPayloadType: !exportPayloadType, exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${taxAgentId}&${convertToUrlString(advanceForm.getFormParams())}` }); }; @@ -222,12 +224,13 @@ class Index extends Component { */ handleExportSelect = () => { const { selectedRowKeys: ids } = this.tableRef.state; - const { taxAgentId } = this.state; + const { taxAgentId, exportPayloadType } = this.state; if (ids.length === 0) { message.warning("请选择需要导出的数据"); return; } this.setState({ + exportPayloadType: !exportPayloadType, exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=${ids.join(",")}&taxAgentId=${taxAgentId}` }); }; @@ -416,7 +419,8 @@ class Index extends Component { render() { const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props; const { - taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload + taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload, + exportPayloadType } = this.state; const tablePayload = { taxAgentId }; return ( @@ -424,6 +428,7 @@ class Index extends Component { onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload} onClose={this.handleCloseSlide} onSave={this.handleSaveData} slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl} + exportPayloadType={exportPayloadType} form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch} onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport} importPayload={importPayload} onImportFile={this.handleImportFile} diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js index 736867cf..abcf4aa1 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js @@ -301,10 +301,10 @@ class LedgerSalaryItem extends Component { * Params: * Date: 2023/3/8 */ - handleMoveSalaryItem = (moveToItemId, items) => { + handleMoveSalaryItem = (moveToItemId, items, titleName) => { const { itemGroups } = this.state; const { salaryItemGroupId: deleteItemId, id, key } = items; - if (moveToItemId === deleteItemId) return; + if (moveToItemId === deleteItemId || (deleteItemId === "0" && titleName === "未分类")) return; this.setState({ itemGroups: _.map(itemGroups, it => { if (moveToItemId === it.uuid) { diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js index d1017f60..f6e4e295 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js @@ -175,11 +175,11 @@ class LedgerSalaryItemNormal extends Component { }); }; handleSubmitMoveTo = () => { - const { onMoveSalaryItem } = this.props; + const { onMoveSalaryItem, dataSource } = this.props; const { moveModalPayload } = this.state; const { record, value } = moveModalPayload; this.handleCancelMove(); - onMoveSalaryItem(value, record); + onMoveSalaryItem(value, record, _.find(dataSource, it => (it.id === value || it.uuid === value)).name); }; render() { diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index dc79d451..4d08a972 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -24,7 +24,8 @@ export default class MobilePayroll extends React.Component { const type = getQueryString("type"); this.id = getQueryString("id"); const { mySalaryStore: { init } } = this.props; - type !== "phone" && init(false); + // type !== "phone" && init(false); + init(false); this.getMySalaryBill(this.id); }