From 8fd6579dfdcd6635888b18a6aad721dd9dc13a4a 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, 13 Jan 2023 17:30:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E8=B5=84=E8=B4=A6=E5=A5=97=E6=8A=A5?= =?UTF-8?q?=E9=94=99bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/calculate/index.js | 10 ++--- .../pages/dataAcquisition/cumDeduct/index.js | 2 +- .../dataAcquisition/cumSituation/index.js | 2 +- .../dataAcquisition/otherDeduct/index.js | 2 +- .../specialAddDeduction/index.js | 4 +- .../components/ledgerAdjustRuleAddModal.js | 18 ++++++--- .../ledgerPage/components/ledgerSalaryItem.js | 2 +- .../ledgerPage/components/ledgerTable.js | 6 +-- pc4mobx/hrmSalary/pages/payroll/index.js | 2 +- .../pages/payroll/payrollGrant/index.js | 3 +- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 23 +++++++++-- .../pages/salaryItem/customSalaryItemSlide.js | 40 +++++++++---------- pc4mobx/hrmSalary/pages/salaryItem/index.js | 2 +- .../socialSecurityBenefits/archives/index.js | 22 +++++++++- .../components/abnormalList.js | 3 +- .../components/makeupDifference.js | 2 +- .../components/regression.js | 2 +- pc4mobx/hrmSalary/pages/taxAgent/index.js | 2 +- pc4mobx/hrmSalary/stores/cumDeduct.js | 4 +- pc4mobx/hrmSalary/stores/programme.js | 2 +- 20 files changed, 97 insertions(+), 56 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index cf287595..426b4219 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -9,7 +9,6 @@ import BaseFormModal from "./baseFormModal"; import CustomPaginationTable from "../../components/customPaginationTable"; import ProgressModal from "../../components/progressModal"; import "./index.less"; -import { deleteLedgerPersonRange } from "../../apis/ledger"; const MonthPicker = DatePicker.MonthPicker; @@ -42,16 +41,17 @@ export default class Calculate extends React.Component { } // 搜索 - handleSearch(value) { + handleSearch = (value, extra = {}) => { const { calculateStore } = this.props; const { getSalaryAcctList } = calculateStore; getSalaryAcctList({ name: value, startMonthStr: this.state.startDate, endMonthStr: this.state.endDate, - current: this.state.current + current: this.state.current, + ...extra }); - } + }; handleRangePickerChange(type, value) { const { calculateStore: { getSalaryAcctList } } = this.props; @@ -382,7 +382,7 @@ export default class Calculate extends React.Component { this.setState({ searchValue: value }); }} onSearch={value => { - this.handleSearch(value); + this.handleSearch(value, { current: 1 }); }} /> diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index ba28884e..ceb6c463 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -267,7 +267,7 @@ export default class CumDeduct extends React.Component { if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") { params.taxAgentId = taxAgentId; } - getTableDatas(params); + getTableDatas({ ...params, current: 1 }); }; //新功能 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 229d556b..03bd911e 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -258,7 +258,7 @@ export default class CumSituation extends React.Component { if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") { params.taxAgentId = taxAgentId; } - getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth }); + getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth, current: 1 }); }; //新功能 handleCreateUpSituation = (payload) => { diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index 38d2de7d..b8dd3903 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -238,7 +238,7 @@ export default class OtherDeduct extends React.Component { if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") { params.taxAgentId = taxAgentId; } - getTableDatas(params); + getTableDatas({...params, current: 1}); }; //新功能 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index dfbb56f9..074f5706 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -518,8 +518,8 @@ class SpecialAddDeduction extends Component { searchsBaseValue={advanceForm.getFormParams().username} onSearchChange={(v) => advanceForm.updateFields({ username: v })} onAdReset={() => advanceForm.reset()} - onAdSearch={() => this.specialAddDeductionList()} - onSearch={() => this.specialAddDeductionList()} + onAdSearch={() => this.specialAddDeductionList({ current: 1 })} + onSearch={() => this.specialAddDeductionList({ current: 1 })} searchsAdQuick={this.getSearchsAdQuick()} searchsAd={this.getSearchsAdQuick(true)} setShowSearchAd={bool => this.setState({ advanceParams: { ...advanceParams, visible: bool } })} diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js index 38552ba7..b81b506e 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js @@ -52,12 +52,18 @@ class LedgerAdjustRuleAddModal extends Component { }); return; } - const items = { - ...extraItems, - salaryItemName: this.state.salaryItemName - }; + const items = { ...extraItems, salaryItemName: this.state.salaryItemName }; + const { salaryItemName, salaryItemId, ...extraFileds } = items; + const salaryItemNameFiled = salaryItemName.split(","), salaryItemIdFiled = salaryItemId.split(","); + const fields = _.map(salaryItemNameFiled, (item, index) => { + return { + ...extraFileds, + salaryItemName: item, + salaryItemId: salaryItemIdFiled[index] + }; + }); this.handleReset(); - onSave([...salaryRuleItemsList, items]); + onSave([...salaryRuleItemsList, ...fields]); }; handleReset = () => { this.setState({ @@ -100,7 +106,7 @@ class LedgerAdjustRuleAddModal extends Component { this.setState({ salaryItemId, salaryItemName })} diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js index cc6444fb..a5a4aa9e 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js @@ -84,7 +84,7 @@ class LedgerSalaryItem extends Component { }); } else { const obj = { - id: itemGroups.length, + id: new Date().getTime(), itemHide: null, items: [], name: payload.name diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js index f0e38407..97fa0829 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js @@ -38,13 +38,13 @@ class LedgerTable extends Component { } componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList(); + if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({current: 1}); } - getLedgerList = () => { + getLedgerList = (extra={}) => { const { name } = this.props; const { pageInfo } = this.state; - const payload = { name, ...pageInfo }; + const payload = { name, ...pageInfo, ...extra }; this.setState({ loading: true }); getLedgerList(payload).then(({ status, data }) => { this.setState({ loading: false }); diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index ed0c68ab..f026277b 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -101,7 +101,7 @@ export default class Payroll extends React.Component { // 模板搜索 handleTemplateSearch() { const { templateSearchValue, templateSelect } = this.state; - let params = { name: templateSearchValue, salarySobId: templateSelect }; + let params = { name: templateSearchValue, salarySobId: templateSelect,current: 1 }; const { payrollStore: { getPayrollTemplateList } } = this.props; getPayrollTemplateList(params); } diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index af00f377..68dad7a7 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -355,7 +355,8 @@ export default class PayrollGrant extends React.Component { getInfoList({ salarySendId: currentId, isGranted: selectedKey !== "0", - ...this.pageInfo + ...this.pageInfo, + current: 1 }); }; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 48acd3e7..62c1d78c 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -614,7 +614,7 @@ class Index extends Component { }); if (!this.handleChangeDebounce) { this.handleChangeDebounce = _.debounce(() => { - this.query() + this.query(); }, 500); } this.handleChangeDebounce(); @@ -724,7 +724,14 @@ class Index extends Component { const adBtn = [ // 高级搜索内部按钮 , , , @@ -738,7 +746,17 @@ export default class Archives extends React.Component { searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 buttonsAd={adBtn} // 高级搜索内部按钮 searchsBasePlaceHolder={"请输入姓名"} - onSearch={this.query} // 点搜索按钮时的回调 + onSearch={() => { + this.setState({ + pageInfo: { + ...pageInfo, + current: 1, + pageSize: 10 + } + }, () => { + this.query(); + }); + }} // 点搜索按钮时的回调 onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 /> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js index aad88508..4d386d06 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js @@ -47,8 +47,7 @@ export default class AbnormalListIndex extends Component { handleSearch(value) { const { billMonth } = this.props; - const { current } = this.state; - this.getChangeList({ billMonth, current, userName: value }); + this.getChangeList({ billMonth, current: 1, userName: value }); } render() { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js index c560bb00..bcb2ea05 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js @@ -73,7 +73,7 @@ class MakeupDifference extends Component { window.open(url, "_self"); break; case "search": - this.diffListRef.recessionList({ userName: name }); + this.diffListRef.recessionList({ userName: name, current: 1 }); break; default: break; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js index 34f11cd5..f36b76ef 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js @@ -96,7 +96,7 @@ class Regression extends Component { window.open(url, "_self"); break; case "search": - this.regListRef.recessionList({ userName: name }); + this.regListRef.recessionList({ userName: name, current: 1 }); break; default: break; diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.js b/pc4mobx/hrmSalary/pages/taxAgent/index.js index ef782627..dbfcd749 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.js @@ -318,7 +318,7 @@ export default class TaxAgent extends React.Component { style={{ width: 250 }} placeholder="请输入个税扣缴义务人名称" onChange={name => this.setState({ name })} - onSearch={() => getTaxAgentList({ name })} + onSearch={() => getTaxAgentList({ name, current: 1 })} /> ]; const renderTipsLabel = () => { diff --git a/pc4mobx/hrmSalary/stores/cumDeduct.js b/pc4mobx/hrmSalary/stores/cumDeduct.js index 44b46552..55d2cf60 100644 --- a/pc4mobx/hrmSalary/stores/cumDeduct.js +++ b/pc4mobx/hrmSalary/stores/cumDeduct.js @@ -106,9 +106,9 @@ export class CumDeductStore { let requestParams = this.form.getFormParams() || {}; requestParams = { ...requestParams, - ...params, current: this.pageObj.current, - pageSize: this.pageObj.pageSize + pageSize: this.pageObj.pageSize, + ...params, }; API.getCumDeductList(requestParams).then( action(({ status, data, errormsg }) => { diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js index 41cb208a..4a857dd9 100644 --- a/pc4mobx/hrmSalary/stores/programme.js +++ b/pc4mobx/hrmSalary/stores/programme.js @@ -120,7 +120,7 @@ export class ProgrammeStore { params.welfareTypeEnum = selectKey API.getCustomCategoryList(params).then(action(res => { if (res.status) { // 接口请求成功/失败处理 - this.tableStore.getDatas(res.data.datas); // table 请求数据 + this.tableStore.getDatas(res.data.datas, 1); // table 请求数据 } else { message.error(res.errormsg || '接口调用失败!') }