Merge branch 'release/2.16.1.2410.01' into feature/2.16.1.2410.01-数据采集重构
This commit is contained in:
commit
5df1e3f0c1
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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.targetType,
|
||||
targetTypeIds: String(nextProps.record.targetId),
|
||||
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("保存成功");
|
||||
|
|
@ -159,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) {
|
||||
|
|
@ -186,9 +178,9 @@ class PersonalScopeModal extends Component {
|
|||
return <WeaBrowser
|
||||
{...browserType}
|
||||
viewAttr={3}
|
||||
isSingle={false}
|
||||
isSingle={!_.isEmpty(record)}
|
||||
value={targetTypeIds}
|
||||
valueSpan={targetTypeIdsNames}
|
||||
replaceDatas={[{ id: targetTypeIds, name: targetTypeIdsNames }]}
|
||||
inputStyle={{ width: 200 }}
|
||||
onChange={(targetTypeIds, targetTypeIdsNames) => {
|
||||
this.setState({ targetTypeIds, targetTypeIdsNames });
|
||||
|
|
@ -197,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: ""
|
||||
|
|
@ -205,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 = [
|
||||
<Button type="primary" onClick={this.handleSubmit} loading={loading}>确定</Button>,
|
||||
|
|
@ -233,6 +225,7 @@ class PersonalScopeModal extends Component {
|
|||
<div style={{ display: "flex", alignItems: "center" }}>
|
||||
<WeaSelect
|
||||
style={{ width: 60, marginRight: 12 }}
|
||||
disabled={!_.isEmpty(record)}
|
||||
value={targetType}
|
||||
options={targetTypeList}
|
||||
onChange={(targetType) => this.setState({ targetType })}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,10 @@ class PersonalScopeTable extends Component {
|
|||
columns: _.map(columns, item => {
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
render: (text, record) => {
|
||||
if (item.dataIndex === "targetName") {
|
||||
return <a href="javascript:void(0);" onClick={() => this.props.onEditScope(record)}>{text}</a>;
|
||||
}
|
||||
return <span className="tdEllipsis" title={text}>{text}</span>;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@
|
|||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
font-size: 20px!important;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>,
|
||||
<WeaButtonIcon buttonType="add" type="primary" onClick={this.handleAddPersonal}/>,
|
||||
<WeaButtonIcon buttonType="add" type="primary" onClick={() => this.handleAddPersonal()}/>,
|
||||
<WeaInputSearch
|
||||
style={{ width: 220 }}
|
||||
value={searchValue}
|
||||
|
|
@ -287,6 +290,7 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
tabActive={selectedKey}
|
||||
searchValue={searchValue}
|
||||
onChangeSelectKey={rowKeys => this.setState({ rowKeys })}
|
||||
onEditScope={this.handleAddPersonal}
|
||||
/>
|
||||
{/*关联人员范围导入*/}
|
||||
{importParams.visible && (
|
||||
|
|
@ -336,9 +340,7 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
onCancel={() =>
|
||||
this.setState({
|
||||
personalAddModal: {
|
||||
...personalAddModal,
|
||||
visible: false,
|
||||
includeType: ""
|
||||
...personalAddModal, record: {}, includeType: "", visible: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,10 +21,30 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
selectedKey: "EMPLOYEE",
|
||||
checkboxValue: "",
|
||||
checkAll: "0",
|
||||
ids: ""
|
||||
ids: "",
|
||||
idsName: ""
|
||||
};
|
||||
}
|
||||
|
||||
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.targetType === "SQL" ? nextProps.scopeRecord.target : String(nextProps.scopeRecord.targetId),
|
||||
idsName: nextProps.scopeRecord.targetName
|
||||
});
|
||||
} else {
|
||||
this.handleReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onCheckboxChange = (checkboxValue) => {
|
||||
const { employeeStatus } = this.props;
|
||||
const checked = _.map(employeeStatus, it => it.id);
|
||||
|
|
@ -45,7 +65,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,21 +87,22 @@ 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) ? this.props.scopeRecord.targetType : "EMPLOYEE",
|
||||
checkboxValue: "",
|
||||
checkAll: "0",
|
||||
ids: ""
|
||||
ids: "",
|
||||
idsName: ""
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { employeeStatus, targetTypeList, visible, onCancel, loading } = this.props;
|
||||
const { employeeStatus, targetTypeList, visible, onCancel, loading, scopeRecord } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
visible={visible}
|
||||
|
|
@ -107,7 +128,7 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
<Col span={16}>
|
||||
<div style={{ display: "inline-block", marginRight: 12 }}>
|
||||
<WeaSelect
|
||||
style={{ height: "30px" }}
|
||||
style={{ height: "30px" }} disabled={!_.isEmpty(scopeRecord)}
|
||||
options={_.map(targetTypeList, (it) => ({
|
||||
...it,
|
||||
key: it.id,
|
||||
|
|
@ -130,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 });
|
||||
}}
|
||||
/>
|
||||
</WeaError>
|
||||
|
|
@ -148,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 });
|
||||
}}
|
||||
/>
|
||||
</WeaError>
|
||||
|
|
@ -166,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 });
|
||||
}}
|
||||
/>
|
||||
</WeaError>
|
||||
|
|
@ -184,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 });
|
||||
}}
|
||||
/>
|
||||
</WeaError>
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
showSearchAd: false,
|
||||
externalPersonModalVisible: false, //外部人员关联弹框
|
||||
addTaxagentModalVisible: false,
|
||||
scopeRecord: {},
|
||||
includeType: "1",
|
||||
selectedRowKeys: [],
|
||||
searchValue: "",
|
||||
|
|
@ -72,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();
|
||||
});
|
||||
|
|
@ -131,7 +133,8 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
externalPersonModalVisible,
|
||||
importParams,
|
||||
previewDataSource,
|
||||
showSearchAd, extEmpsWitch
|
||||
showSearchAd, extEmpsWitch,
|
||||
scopeRecord
|
||||
} = this.state;
|
||||
const {
|
||||
submitLoading,
|
||||
|
|
@ -224,106 +227,33 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
onSearchChange={searchValue => this.setState({ searchValue })}
|
||||
onChange={v => this.setState({ includeType: v }, () => onChangeTab && onChangeTab(this.state.includeType))}
|
||||
/>
|
||||
{/*<div*/}
|
||||
{/* style={{*/}
|
||||
{/* height: "47px",*/}
|
||||
{/* lineHeight: "47px",*/}
|
||||
{/* paddingLeft: "10px",*/}
|
||||
{/* paddingRight: "10px",*/}
|
||||
{/* display: "flex",*/}
|
||||
{/* justifyContent: "space-between"*/}
|
||||
{/* }}>*/}
|
||||
{/* <div*/}
|
||||
{/* style={{*/}
|
||||
{/* display: "inlineBlock",*/}
|
||||
{/* color: "#666"*/}
|
||||
{/* }}>*/}
|
||||
{/* <span*/}
|
||||
{/* style={{*/}
|
||||
{/* cursor: "pointer",*/}
|
||||
{/* color: includeType == 1 ? "#4ba9f2" : "#000"*/}
|
||||
{/* }}*/}
|
||||
{/* onClick={() => {*/}
|
||||
{/* this.handleTabClick(1);*/}
|
||||
{/* }}>*/}
|
||||
{/* 人员范围*/}
|
||||
{/* </span>|<span*/}
|
||||
{/* style={{*/}
|
||||
{/* cursor: "pointer",*/}
|
||||
{/* color: includeType == 0 ? "#4ba9f2" : "#000"*/}
|
||||
{/* }}*/}
|
||||
{/* onClick={() => {*/}
|
||||
{/* this.handleTabClick(0);*/}
|
||||
{/* }}>*/}
|
||||
{/* 从范围中排除*/}
|
||||
{/* </span>*/}
|
||||
{/* </div>*/}
|
||||
{/* <div>*/}
|
||||
{/* <div*/}
|
||||
{/* style={{*/}
|
||||
{/* color: "#4ba9f2",*/}
|
||||
{/* display: "inlineBlock",*/}
|
||||
{/* float: "left"*/}
|
||||
{/* }}>*/}
|
||||
{/* {*/}
|
||||
{/* (hideIconInTax || showSalaryItemBtn) && <div className="operateBtn">*/}
|
||||
{/* {*/}
|
||||
{/* includeType == "1" &&*/}
|
||||
{/* <Button*/}
|
||||
{/* type="primary"*/}
|
||||
{/* size="small"*/}
|
||||
{/* onClick={() => {*/}
|
||||
{/* this.setState({ importParams: { ...importParams, visible: true, step: 0 } });*/}
|
||||
{/* }}*/}
|
||||
{/* ><span className="icon-coms-leading-in" title="导入"></span></Button>*/}
|
||||
{/* }*/}
|
||||
{/* <div className="addOrDelBtn">*/}
|
||||
{/* <Button type="primary"*/}
|
||||
{/* size="small"*/}
|
||||
{/* onClick={() => {*/}
|
||||
{/* this.handleTabDelete();*/}
|
||||
{/* }}*/}
|
||||
{/* ><span className="icon-coms-form-delete-hot" title="删除"></span></Button>*/}
|
||||
{/* <Button type="primary"*/}
|
||||
{/* size="small"*/}
|
||||
{/* style={{ marginRight: 10 }}*/}
|
||||
{/* onClick={() => this.setState({ addTaxagentModalVisible: true })}*/}
|
||||
{/* ><span className="icon-coms-Add-to-hot" title="添加"></span></Button>*/}
|
||||
{/* </div>*/}
|
||||
{/* </div>*/}
|
||||
{/* }*/}
|
||||
{/* </div>*/}
|
||||
{/* <WeaInputSearch*/}
|
||||
{/* style={{ marginTop: "8px", float: "right" }}*/}
|
||||
{/* value={searchValue}*/}
|
||||
{/* onChange={value => {*/}
|
||||
{/* this.setState({ searchValue: value });*/}
|
||||
{/* }}*/}
|
||||
{/* onSearch={value => {*/}
|
||||
{/* this.handleSearch(value);*/}
|
||||
{/* }}*/}
|
||||
{/* />*/}
|
||||
{/* </div>*/}
|
||||
{/*</div>*/}
|
||||
|
||||
<div style={{ maxHeight: "500px", scrollY: "scroll" }}>
|
||||
<WeaTable
|
||||
rowKey="id"
|
||||
loading={queryLoading}
|
||||
rowSelection={rowSelection}
|
||||
dataSource={dataSource}
|
||||
columns={taxAgentColumns}
|
||||
pagination={pagination}
|
||||
/>
|
||||
<WeaTable rowKey="id" loading={queryLoading} rowSelection={rowSelection} dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
columns={_.map(taxAgentColumns, o => {
|
||||
return {
|
||||
...o, render: (text, record) => {
|
||||
if (o.dataIndex === "targetName") {
|
||||
return <a href="javascript:void(0);" onClick={() => {
|
||||
const key = includeType === "2" ? "externalPersonModalVisible" : "addTaxagentModalVisible";
|
||||
this.setState({ [key]: true, scopeRecord: record });
|
||||
}}>{text}</a>;
|
||||
}
|
||||
return <span>{text}</span>;
|
||||
}
|
||||
};
|
||||
})}/>
|
||||
</div>
|
||||
<ExternalPersonModal
|
||||
visible={externalPersonModalVisible}
|
||||
loading={submitLoading}
|
||||
onCancel={() => this.setState({ externalPersonModalVisible: false })}
|
||||
onCancel={() => this.setState({ externalPersonModalVisible: false, scopeRecord: {} })}
|
||||
onExternalPersonSave={val => onTaxAgentSave({ ...val, includeType: includeType })}
|
||||
/>
|
||||
<AddTaxAgentModal
|
||||
ref={(ref) => this.addTaxRef = ref}
|
||||
scopeRecord={scopeRecord}
|
||||
loading={submitLoading}
|
||||
employeeStatus={employeeStatus}
|
||||
targetTypeList={targetTypeList}
|
||||
|
|
@ -332,7 +262,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 && (
|
||||
|
|
|
|||
Loading…
Reference in New Issue