From 1f7fe615beb61cbe4d079ae5aa08557585ec4164 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 1 Nov 2024 14:50:37 +0800 Subject: [PATCH 1/4] 1release/2.16.1.2410.01 --- pc4mobx/hrmSalary/apis/ledger.js | 4 + pc4mobx/hrmSalary/apis/taxAgent.js | 4 + .../components/PersonalScopeModal/index.js | 73 +++++------ .../components/PersonalScopeTable/index.js | 5 +- .../components/ledgerAssociatedPersonnel.js | 14 ++- .../pages/taxAgent/addTaxAgentModal.js | 28 ++++- .../hrmSalary/pages/taxAgent/personalScope.js | 42 +++---- .../pages/taxAgent/slideTaxagentUser.js | 113 ++++-------------- 8 files changed, 118 insertions(+), 165 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/ledger.js b/pc4mobx/hrmSalary/apis/ledger.js index 487181bc..71e0b3db 100644 --- a/pc4mobx/hrmSalary/apis/ledger.js +++ b/pc4mobx/hrmSalary/apis/ledger.js @@ -57,6 +57,10 @@ export const deleteLedgerPersonExtRange = params => { export const saveLedgerPersonRange = params => { return postFetch("/api/bs/hrmsalary/salarysob/range/save", params); }; +//编辑薪资帐套人员范围 +export const editLedgerPersonRange = params => { + return postFetch("/api/bs/hrmsalary/salarysob/range/edit", params); +}; //删除薪资帐套人员范围 export const deleteLedgerPersonRange = params => { diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js index f3c527b1..4e38cf8d 100644 --- a/pc4mobx/hrmSalary/apis/taxAgent.js +++ b/pc4mobx/hrmSalary/apis/taxAgent.js @@ -48,6 +48,10 @@ export const deleteTaxAgent = (params) => { export const taxAgentRangeSave = (params) => { return postFetch("/api/bs/hrmsalary/taxAgent/range/save", params); }; +//编辑人员范围 +export const taxAgentRangeEdit = (params) => { + return postFetch("/api/bs/hrmsalary/taxAgent/range/edit", params); +}; //非系统人员范围查询 export const taxAgentRangelistExt = (params) => { return postFetch("/api/bs/hrmsalary/taxAgent/range/listExt", params); diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index d0718a2f..a13fe88e 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -39,47 +39,33 @@ class PersonalScopeModal extends Component { } componentDidMount() { - const { isTaxgent = true } = this.props; - if (isTaxgent) { - this.getTaxAgentRangeForm(); - } else { - this.commonEnumList(); - // const employeeStatus = [ - // { key: "TRIAL", showname: "试用" }, - // { key: "FORMAL", showname: "正式" }, - // { key: "TEMPORARY", showname: "临时" }, - // { key: "DELAY", showname: "试用延期" }, - // { key: "FIRE", showname: "解雇" }, - // { key: "DEPARTURE", showname: "离职" }, - // { key: "RETIRED", showname: "退休" } - // ]; - // const targetTypeList = [ - // { - // key: "EMPLOYEE", - // showname: "人员", - // selected: false - // }, - // { - // key: "SUBCOMPANY", - // showname: "分部", - // selected: false - // }, - // { - // key: "DEPT", - // showname: "部门", - // selected: false - // }, - // { - // key: "POSITION", - // showname: "岗位", - // selected: false - // } - // ]; - // this.setState({ targetTypeList, employeeStatus }); + + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + const { isTaxgent = true } = nextProps; + if (isTaxgent) { + this.getTaxAgentRangeForm(); + } else { + this.commonEnumList(nextProps); + } + if (!_.isEmpty(nextProps.record)) { + this.setState({ + targetType: nextProps.record.targetTypeName, + targetTypeIds: nextProps.record.target, + targetTypeIdsNames: nextProps.record.targetName, + status: nextProps.record.status, + statusAll: "" + }); + } else { + this.handleReset(); + } } } - commonEnumList = () => { + commonEnumList = (props) => { + const { record } = props; commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }).then(({ status, data }) => { if (status) { const targetTypeList = [ @@ -112,6 +98,11 @@ class PersonalScopeModal extends Component { this.setState({ targetTypeList, employeeStatus: _.map(_.filter(data, o => o.value !== 7), it => ({ key: it.enum, showname: it.defaultLabel })) + }, () => { + if (!_.isEmpty(record)) { + const bool = _.every(_.map(this.state.employeeStatus, it => it.key), item => record.status.split(",").includes(item)); + this.setState({ statusAll: bool ? "0" : "" }); + } }); } }); @@ -129,7 +120,7 @@ class PersonalScopeModal extends Component { }; handleSubmit = () => { const { status, targetTypeIds, targetType } = this.state; - const { includeType, saveKeyVal, onSuccess, onCancel, APISaveFox } = this.props; + const { includeType, saveKeyVal, onSuccess, onCancel, APISaveFox, record } = this.props; if (_.isEmpty(status) || _.isEmpty(targetTypeIds)) { Modal.warning({ title: "信息确认", @@ -139,14 +130,14 @@ class PersonalScopeModal extends Component { } const payload = { employeeStatus: status.split(","), - includeType, + includeType, id: record.id, targetParams: targetType !== "SQL" ? _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it, target: "" })) : [{ targetType, targetId: "0", target: targetTypeIds }], [saveKeyVal["key"]]: saveKeyVal["value"] }; this.setState({ loading: true }); - APISaveFox["save"](payload).then(({ status, errormsg }) => { + APISaveFox[_.isEmpty(record) ? "save" : "edit"](payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { message.success("保存成功"); diff --git a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js index 8b38ba01..21a55e0d 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js @@ -59,7 +59,10 @@ class PersonalScopeTable extends Component { columns: _.map(columns, item => { return { ...item, - render: (text) => { + render: (text, record) => { + if (record.targetTypeName === "SQL" && item.dataIndex === "targetName") { + return this.props.onEditScope(record)}>{text}; + } return {text}; } }; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index 8b7af5a4..92d65289 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -13,6 +13,7 @@ import PersonalScopeModal from "../../../components/PersonalScopeModal"; import { deleteLedgerPersonExtRange, deleteLedgerPersonRange, + editLedgerPersonRange, getLedgerPersonRangeExclude, getLedgerPersonRangeExtList, getLedgerPersonRangeInclude, @@ -32,7 +33,8 @@ const APIFox = { externalList: getLedgerPersonRangeExtList }; const APISaveFox = { - save: saveLedgerPersonRange + save: saveLedgerPersonRange, + edit: editLedgerPersonRange }; @inject("taxAgentStore") @@ -55,7 +57,8 @@ class LedgerAssociatedPersonnel extends Component { personalAddModal: { visible: false, title: "关联人员", - includeType: "" + includeType: "", + record: {} }, extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭 }; @@ -157,7 +160,7 @@ class LedgerAssociatedPersonnel extends Component { * Params: * Date: 2022/11/30 */ - handleAddPersonal = () => { + handleAddPersonal = (record = {}) => { const { personalAddModal, selectedKey } = this.state; if (selectedKey === "externalList") { this.setState({ externalPersonModalVisible: true }); @@ -165,7 +168,7 @@ class LedgerAssociatedPersonnel extends Component { this.setState({ personalAddModal: { ...personalAddModal, - visible: true, + visible: true, record, includeType: selectedKey === "listInclude" ? 1 : 0 } }); @@ -256,7 +259,7 @@ class LedgerAssociatedPersonnel extends Component { disabled={_.isEmpty(rowKeys)} onClick={this.taxAgentRangeDelete} />, - , + this.handleAddPersonal()}/>, this.setState({ rowKeys })} + onEditScope={this.handleAddPersonal} /> {/*关联人员范围导入*/} {importParams.visible && ( diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js index fae1b5c6..93dbc6d3 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -25,6 +25,24 @@ export default class AddTaxAgentModal extends React.Component { }; } + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + if (!_.isEmpty(nextProps.scopeRecord)) { + const { employeeStatus } = nextProps; + const checked = _.map(employeeStatus, it => it.id); + const bool = _.every(checked, it => nextProps.scopeRecord.status.indexOf(it) !== -1); + this.setState({ + selectedKey: nextProps.scopeRecord.targetType, + checkboxValue: nextProps.scopeRecord.status, + checkAll: bool ? "1" : "0", + ids: nextProps.scopeRecord.target + }); + } else { + this.handleReset(); + } + } + } + onCheckboxChange = (checkboxValue) => { const { employeeStatus } = this.props; const checked = _.map(employeeStatus, it => it.id); @@ -45,7 +63,7 @@ export default class AddTaxAgentModal extends React.Component { // 保存 handleSave = () => { - const { onTaxAgentSave } = this.props; + const { onTaxAgentSave, scopeRecord } = this.props; const { checkboxValue, ids, selectedKey } = this.state; const payload = { employeeStatus: checkboxValue.split(","), @@ -67,13 +85,13 @@ export default class AddTaxAgentModal extends React.Component { this.refs.weaError1.showError(); return; } - onTaxAgentSave && onTaxAgentSave(payload); + onTaxAgentSave && onTaxAgentSave({ ...payload, id: scopeRecord.id }); }; // 重置 handleReset = () => { this.setState({ - selectedKey: "EMPLOYEE", + selectedKey: !_.isEmpty(this.props.scopeRecord) ? "SQL" : "EMPLOYEE", checkboxValue: "", checkAll: "0", ids: "" @@ -81,7 +99,7 @@ export default class AddTaxAgentModal extends React.Component { }; render() { - const { employeeStatus, targetTypeList, visible, onCancel, loading } = this.props; + const { employeeStatus, targetTypeList, visible, onCancel, loading, scopeRecord } = this.props; return (
({ ...it, key: it.id, diff --git a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js index da0bd2bb..81e8fb55 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js @@ -8,6 +8,7 @@ import React, { Component } from "react"; import { message, Modal } from "antd"; import { inject, observer } from "mobx-react"; import SlideTaxagentUser from "./slideTaxagentUser"; +import { taxAgentRangeEdit } from "../../apis/taxAgent"; import "./index.less"; const personScopeWarrper = {}; @@ -199,7 +200,7 @@ export default class PersonalScope extends Component { taxAgentRangeSave = (module) => { const { taxAgentId } = this.props; const { pageObj } = this.state; - const { includeType } = module; + const { includeType, id } = module; const { taxAgentRangeSave, taxAgentRangeExtSave } = this.props.taxAgentStore; this.setState({ submitLoading: true }); if (includeType === "2") { @@ -214,26 +215,25 @@ export default class PersonalScope extends Component { } }); } else { - taxAgentRangeSave({ ...module, taxAgentId }).then( - ({ status, errormsg }) => { - this.setState({ submitLoading: false }); - if (status) { - this.tagAgentRef.closeModal(); - message.success("新增成功"); - includeType == "1" - ? this.getTaxAgentRangeListInclude({ - current: pageObj.current, - pageSize: pageObj.pageSize - }) - : this.getTaxAgentRangeListExclude({ - current: pageObj.current, - pageSize: pageObj.pageSize - }); - } else { - message.error(errormsg || "新增失败"); - } + const API= id ? taxAgentRangeEdit : taxAgentRangeSave; + API({ ...module, taxAgentId }).then(({ status, errormsg }) => { + this.setState({ submitLoading: false }); + if (status) { + this.tagAgentRef.closeModal(); + message.success("操作成功"); + includeType == "1" + ? this.getTaxAgentRangeListInclude({ + current: pageObj.current, + pageSize: pageObj.pageSize + }) + : this.getTaxAgentRangeListExclude({ + current: pageObj.current, + pageSize: pageObj.pageSize + }); + } else { + message.error(errormsg); } - ); + }); } }; @@ -285,7 +285,7 @@ export default class PersonalScope extends Component { onTaxAngetSearch={({ targetName, targetWorkcode, tab }) => { tab == "1" ? this.getTaxAgentRangeListInclude({ targetName, targetWorkcode }) - : tab == "0" ? this.getTaxAgentRangeListExclude({ targetName, targetWorkcode }): + : tab == "0" ? this.getTaxAgentRangeListExclude({ targetName, targetWorkcode }) : this.taxAgentRangelistExt({ targetName, targetWorkcode }); }} onChangeTab={(tab) => { diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index d60cc7f4..4f842810 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -15,6 +15,7 @@ export default class SlideTaxagentUser extends React.Component { showSearchAd: false, externalPersonModalVisible: false, //外部人员关联弹框 addTaxagentModalVisible: false, + scopeRecord: {}, includeType: "1", selectedRowKeys: [], searchValue: "", @@ -131,7 +132,8 @@ export default class SlideTaxagentUser extends React.Component { externalPersonModalVisible, importParams, previewDataSource, - showSearchAd, extEmpsWitch + showSearchAd, extEmpsWitch, + scopeRecord } = this.state; const { submitLoading, @@ -224,106 +226,33 @@ export default class SlideTaxagentUser extends React.Component { onSearchChange={searchValue => this.setState({ searchValue })} onChange={v => this.setState({ includeType: v }, () => onChangeTab && onChangeTab(this.state.includeType))} /> - {/**/} - {/* */} - {/* {*/} - {/* this.handleTabClick(1);*/} - {/* }}>*/} - {/* 人员范围*/} - {/* | {*/} - {/* this.handleTabClick(0);*/} - {/* }}>*/} - {/* 从范围中排除*/} - {/* */} - {/*
*/} - {/*
*/} - {/* */} - {/* {*/} - {/* (hideIconInTax || showSalaryItemBtn) &&
*/} - {/* {*/} - {/* includeType == "1" &&*/} - {/* {*/} - {/* this.setState({ importParams: { ...importParams, visible: true, step: 0 } });*/} - {/* }}*/} - {/* >*/} - {/* }*/} - {/*
*/} - {/* */} - {/* */} - {/*
*/} - {/*
*/} - {/* }*/} - {/*
*/} - {/* {*/} - {/* this.setState({ searchValue: value });*/} - {/* }}*/} - {/* onSearch={value => {*/} - {/* this.handleSearch(value);*/} - {/* }}*/} - {/* />*/} - {/* */} - {/**/}
- + { + return { + ...o, render: (text, record) => { + if (record.targetType === "SQL" && o.dataIndex === "targetName") { + return { + const key = includeType === "2" ? "externalPersonModalVisible" : "addTaxagentModalVisible"; + this.setState({ [key]: true, scopeRecord: record }); + }}>{text}; + } + return {text}; + } + }; + })}/>
this.setState({ externalPersonModalVisible: false })} + onCancel={() => this.setState({ externalPersonModalVisible: false, scopeRecord: {} })} onExternalPersonSave={val => onTaxAgentSave({ ...val, includeType: includeType })} /> this.addTaxRef = ref} + scopeRecord={scopeRecord} loading={submitLoading} employeeStatus={employeeStatus} targetTypeList={targetTypeList} @@ -332,7 +261,7 @@ export default class SlideTaxagentUser extends React.Component { onTaxAgentSave({ ...val, includeType: includeType })} visible={addTaxagentModalVisible} onCancel={() => { - this.setState({ addTaxagentModalVisible: false }); + this.setState({ addTaxagentModalVisible: false, scopeRecord: {} }); }} /> {importParams.visible && ( From df4971fd27cbe2e7e04986f54695b341d8b088f0 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 1 Nov 2024 18:28:12 +0800 Subject: [PATCH 2/4] release/2.16.1.2410.01 --- .../components/PersonalScopeModal/index.js | 14 +++++---- .../components/PersonalScopeTable/index.js | 2 +- .../pages/ledgerPage/components/index.less | 2 +- .../components/ledgerAssociatedPersonnel.js | 4 +-- .../pages/taxAgent/addTaxAgentModal.js | 31 ++++++++++++------- .../pages/taxAgent/slideTaxagentUser.js | 5 +-- 6 files changed, 33 insertions(+), 25 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index a13fe88e..b51b5a63 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -52,8 +52,8 @@ class PersonalScopeModal extends Component { } if (!_.isEmpty(nextProps.record)) { this.setState({ - targetType: nextProps.record.targetTypeName, - targetTypeIds: nextProps.record.target, + targetType: nextProps.record.targetType, + targetTypeIds: String(nextProps.record.targetId), targetTypeIdsNames: nextProps.record.targetName, status: nextProps.record.status, statusAll: "" @@ -150,6 +150,7 @@ class PersonalScopeModal extends Component { }).catch(() => this.setState({ loading: true })); }; renderBrowser = () => { + const { record } = this.props; const { targetType, targetTypeIds, targetTypeIdsNames } = this.state; let browserType = {}; switch (targetType) { @@ -177,9 +178,9 @@ class PersonalScopeModal extends Component { return { this.setState({ targetTypeIds, targetTypeIdsNames }); @@ -188,7 +189,7 @@ class PersonalScopeModal extends Component { }; handleReset = () => { this.setState({ - targetType: "EMPLOYEE", + targetType: !_.isEmpty(this.props.record) ? this.props.record.targetType : "EMPLOYEE", targetTypeIds: "", status: "", statusAll: "" @@ -196,7 +197,7 @@ class PersonalScopeModal extends Component { }; render() { - const { onCancel, title, visible } = this.props; + const { onCancel, title, visible, record } = this.props; const { employeeStatus, targetTypeList, targetType, status, statusAll, loading } = this.state; const buttons = [ , @@ -224,6 +225,7 @@ class PersonalScopeModal extends Component {
this.setState({ targetType })} diff --git a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js index 21a55e0d..5faaf8a9 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js @@ -60,7 +60,7 @@ class PersonalScopeTable extends Component { return { ...item, render: (text, record) => { - if (record.targetTypeName === "SQL" && item.dataIndex === "targetName") { + if (item.dataIndex === "targetName") { return this.props.onEditScope(record)}>{text}; } return {text}; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less index ba7c1af7..96d0463d 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less @@ -249,7 +249,7 @@ padding: 0; background: transparent; border: none; - font-size: 20px; + font-size: 20px!important; line-height: 20px; } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index 92d65289..0b71af53 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -340,9 +340,7 @@ class LedgerAssociatedPersonnel extends Component { onCancel={() => this.setState({ personalAddModal: { - ...personalAddModal, - visible: false, - includeType: "" + ...personalAddModal, record: {}, includeType: "", visible: false } }) } diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js index 93dbc6d3..59ad23fa 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -21,7 +21,8 @@ export default class AddTaxAgentModal extends React.Component { selectedKey: "EMPLOYEE", checkboxValue: "", checkAll: "0", - ids: "" + ids: "", + idsName: "" }; } @@ -35,7 +36,8 @@ export default class AddTaxAgentModal extends React.Component { selectedKey: nextProps.scopeRecord.targetType, checkboxValue: nextProps.scopeRecord.status, checkAll: bool ? "1" : "0", - ids: nextProps.scopeRecord.target + ids: nextProps.scopeRecord.targetType === "SQL" ? nextProps.scopeRecord.target : String(nextProps.scopeRecord.targetId), + idsName: nextProps.scopeRecord.targetName }); } else { this.handleReset(); @@ -91,10 +93,11 @@ export default class AddTaxAgentModal extends React.Component { // 重置 handleReset = () => { this.setState({ - selectedKey: !_.isEmpty(this.props.scopeRecord) ? "SQL" : "EMPLOYEE", + selectedKey: !_.isEmpty(this.props.scopeRecord) ? this.props.scopeRecord.targetType : "EMPLOYEE", checkboxValue: "", checkAll: "0", - ids: "" + ids: "", + idsName: "" }); }; @@ -148,11 +151,12 @@ export default class AddTaxAgentModal extends React.Component { type={17} viewAttr={3} value={this.state.ids} + replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]} title={"人员选择"} - isSingle={false} + isSingle={!_.isEmpty(scopeRecord)} inputStyle={{ width: 200 }} onChange={(ids, names, datas) => { - this.setState({ ids }); + this.setState({ ids, idsName: names }); }} /> @@ -166,11 +170,12 @@ export default class AddTaxAgentModal extends React.Component { type={57} viewAttr={3} title="部门选择" - isSingle={false} + isSingle={!_.isEmpty(scopeRecord)} inputStyle={{ width: 200 }} value={this.state.ids} + replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]} onChange={(ids, names, datas) => { - this.setState({ ids }); + this.setState({ ids, idsName: names }); }} /> @@ -184,11 +189,12 @@ export default class AddTaxAgentModal extends React.Component { type={164} viewAttr={3} title={"分部选择"} - isSingle={false} + isSingle={!_.isEmpty(scopeRecord)} inputStyle={{ width: 200 }} value={this.state.ids} + replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]} onChange={(ids, names, datas) => { - this.setState({ ids }); + this.setState({ ids, idsName: names }); }} /> @@ -202,11 +208,12 @@ export default class AddTaxAgentModal extends React.Component { type={278} viewAttr={3} title={"岗位选择"} - isSingle={false} + isSingle={!_.isEmpty(scopeRecord)} value={this.state.ids} + replaceDatas={[{ id: this.state.ids, name: this.state.idsName }]} inputStyle={{ width: 200 }} onChange={(ids, names, datas) => { - this.setState({ ids }); + this.setState({ ids, idsName: names }); }} /> diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index 4f842810..78168514 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -73,7 +73,8 @@ export default class SlideTaxagentUser extends React.Component { closeModal = () => { this.setState({ addTaxagentModalVisible: false, - externalPersonModalVisible: false + externalPersonModalVisible: false, + scopeRecord: {} }, () => { this.addTaxRef && this.addTaxRef.handleReset(); }); @@ -233,7 +234,7 @@ export default class SlideTaxagentUser extends React.Component { columns={_.map(taxAgentColumns, o => { return { ...o, render: (text, record) => { - if (record.targetType === "SQL" && o.dataIndex === "targetName") { + if (o.dataIndex === "targetName") { return { const key = includeType === "2" ? "externalPersonModalVisible" : "addTaxagentModalVisible"; this.setState({ [key]: true, scopeRecord: record }); From 6563e6b5df5416a83404b74ca209b426bb27be35 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 5 Nov 2024 16:26:17 +0800 Subject: [PATCH 3/4] release/2.16.1.2410.01 --- .../standingBookDetail/components/regEditDetial.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js index b1271972..979cccc9 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js @@ -62,7 +62,6 @@ class RegEditDetial extends Component { otherComJson: {} }; _.forEach(socialData.dataSource, item => { - console.log(item) if (item.personalPaymentAmount) { payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2); } @@ -164,7 +163,6 @@ class RegEditDetial extends Component { const social = this.combinedData(socialSecurity, result); const fund = this.combinedData(accumulationFund, result); const other = this.combinedData(otherBenefits, result); - console.log(social) this.setState({ listMap: [ { From 83d14f6d82c2760e4576e320065eaac51e2e0673 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 5 Nov 2024 17:33:34 +0800 Subject: [PATCH 4/4] =?UTF-8?q?release/2.16.1.2410.01=20=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/components/logViewModal/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/components/logViewModal/index.js b/pc4mobx/hrmSalary/components/logViewModal/index.js index 1867b765..6df7b5b8 100644 --- a/pc4mobx/hrmSalary/components/logViewModal/index.js +++ b/pc4mobx/hrmSalary/components/logViewModal/index.js @@ -40,7 +40,7 @@ class Index extends Component { this.setState({ dataSource: [], columns: [], pageInfo: { current: 0, pageSize: 10, total: 0 }, loading: false - }); + }, () => this.props.baseFormStore.form.resetForm()); } }