diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js index fed2a7cb..8bb48c16 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js @@ -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 = []; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index a9b7d33c..bd97ff8b 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -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 { }}> 查看明细 + { + (!this.props.taxAgentStore.showOperateBtn && userid == record.employeeId) && + this.handleOperate(e, record)}> + 编辑 + } title=""> + + + } { this.props.taxAgentStore.showOperateBtn && + { + console.log(drawerParams.editId.employeeId, userid) + } + { + console.log((showOperateBtn && !drawerParams.isView) || (!showOperateBtn && userid == drawerParams.editId.employeeId)) + } { + 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}>保存 + ] : []} /> } content={ @@ -575,7 +611,7 @@ class SpecialAddDeduction extends Component { this.setState({ importParams: { ...importParams, step } })} slideDataSource={importParams.slideDataSource}