专项附加扣除导入字段的匹配
This commit is contained in:
parent
8e133ea43a
commit
0e4587d18d
|
|
@ -139,6 +139,78 @@ export const modalColumns = [
|
|||
key: "addUpIllnessMedical"
|
||||
}
|
||||
];
|
||||
export const specialModalColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "taxAgentName",
|
||||
key: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departmentName",
|
||||
key: "departmentName"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "mobile",
|
||||
key: "mobile"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobNum",
|
||||
key: "jobNum"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "idNo",
|
||||
key: "idNo"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "hiredate",
|
||||
key: "hiredate"
|
||||
},
|
||||
{
|
||||
title: "子女教育",
|
||||
dataIndex: "childrenEducation",
|
||||
key: "childrenEducation"
|
||||
},
|
||||
{
|
||||
title: "继续教育",
|
||||
dataIndex: "continuingEducation",
|
||||
key: "continuingEducation"
|
||||
},
|
||||
{
|
||||
title: "住房贷款利息",
|
||||
dataIndex: "housingLoanInterest",
|
||||
key: "housingLoanInterest"
|
||||
},
|
||||
{
|
||||
title: "住房租金",
|
||||
dataIndex: "housingRent",
|
||||
key: "housingRent"
|
||||
},
|
||||
{
|
||||
title: "赡养老人",
|
||||
dataIndex: "supportingElder",
|
||||
key: "supportingElder"
|
||||
},
|
||||
{
|
||||
title: "婴幼儿照护",
|
||||
dataIndex: "infantCare",
|
||||
key: "infantCare"
|
||||
},
|
||||
{
|
||||
title: "大病医疗",
|
||||
dataIndex: "seriousIllnessTreatment",
|
||||
key: "seriousIllnessTreatment"
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
export const dataSource = [];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, Col, Dropdown, Menu, message, Modal, Popover, Row } from "antd";
|
||||
import { WeaPopoverHrm, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom";
|
||||
import { WeaPopoverHrm, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTools, WeaTop } from "ecCom";
|
||||
import InlineForm from "./components/inlineForm";
|
||||
import { getSearchs, renderLoading } from "../../../util";
|
||||
import * as API from "../../../apis/special";
|
||||
|
|
@ -10,7 +10,7 @@ import AddItems from "../addItems";
|
|||
import SpecialAddContent from "./components/specialAddContent";
|
||||
import { condition } from "./components/condition";
|
||||
import ImportModal from "../../../components/importModal";
|
||||
import { modalColumns } from "../cumDeduct/columns";
|
||||
import { specialModalColumns } from "../cumDeduct/columns";
|
||||
import "./index.less";
|
||||
|
||||
@inject("specialAddStore", "taxAgentStore")
|
||||
|
|
@ -87,6 +87,7 @@ class SpecialAddDeduction extends Component {
|
|||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
const { userid } = WeaTools.ls.getJSONObj("theme-account") || {};
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
|
|
@ -123,6 +124,17 @@ class SpecialAddDeduction extends Component {
|
|||
}}>
|
||||
查看明细
|
||||
</a>
|
||||
{
|
||||
(!this.props.taxAgentStore.showOperateBtn && userid == record.employeeId) &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleOperate(e, record)}>
|
||||
<Menu.Item key="edit">编辑</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
{
|
||||
this.props.taxAgentStore.showOperateBtn &&
|
||||
<Popover
|
||||
|
|
@ -383,6 +395,7 @@ class SpecialAddDeduction extends Component {
|
|||
drawerParams,
|
||||
importParams
|
||||
} = this.state;
|
||||
const { userid } = WeaTools.ls.getJSONObj("theme-account") || {};
|
||||
const { taxAgentStore, specialAddStore: { advanceForm, addForm } } = this.props;
|
||||
const { showOperateBtn, taxAgentAdminOption } = taxAgentStore;
|
||||
const rowSelection = {
|
||||
|
|
@ -504,6 +517,12 @@ class SpecialAddDeduction extends Component {
|
|||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
/>
|
||||
{
|
||||
console.log(drawerParams.editId.employeeId, userid)
|
||||
}
|
||||
{
|
||||
console.log((showOperateBtn && !drawerParams.isView) || (!showOperateBtn && userid == drawerParams.editId.employeeId))
|
||||
}
|
||||
<WeaSlideModal
|
||||
className="specialAddSlideWrapper"
|
||||
{...drawerParams}
|
||||
|
|
@ -532,9 +551,26 @@ class SpecialAddDeduction extends Component {
|
|||
};
|
||||
this.handleSaveSpecialList(payload);
|
||||
}}
|
||||
editable={showOperateBtn && !drawerParams.isView}
|
||||
editable={(showOperateBtn && !drawerParams.isView)}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={(showOperateBtn && drawerParams.isView) ? customBtns : []}
|
||||
customOperate={(showOperateBtn && drawerParams.isView) ? customBtns : (!showOperateBtn && userid == drawerParams.editId.employeeId) ? [
|
||||
<Button type="primary" className="saveBtn" onClick={() => {
|
||||
const { baseInfo } = this.addItemRef.state;
|
||||
const bool = _.every(_.pick(baseInfo, ["taxAgentId", "employeeId"]), v => !_.isEmpty(v));
|
||||
if (!bool && _.isEmpty(drawerParams.editId)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
..._.pick(baseInfo, ["taxAgentId", "employeeId", "taxAgentName"]),
|
||||
...addForm.getFormParams()
|
||||
};
|
||||
this.handleSaveSpecialList(payload);
|
||||
}} loading={drawerParams.loading}>保存</Button>
|
||||
] : []}
|
||||
/>
|
||||
}
|
||||
content={
|
||||
|
|
@ -575,7 +611,7 @@ class SpecialAddDeduction extends Component {
|
|||
<ImportModal
|
||||
needimportSelected //下载模板需要带上导入所选项
|
||||
params={importParams.payload}
|
||||
columns={modalColumns}
|
||||
columns={specialModalColumns}
|
||||
step={importParams.step}
|
||||
setStep={(step) => this.setState({ importParams: { ...importParams, step } })}
|
||||
slideDataSource={importParams.slideDataSource}
|
||||
|
|
|
|||
Loading…
Reference in New Issue