diff --git a/pc4mobx/hrmSalary/apis/externalPersonManage.js b/pc4mobx/hrmSalary/apis/externalPersonManage.js new file mode 100644 index 00000000..91854ebb --- /dev/null +++ b/pc4mobx/hrmSalary/apis/externalPersonManage.js @@ -0,0 +1,27 @@ +import { postFetch } from "../util/request"; +import { WeaTools } from "ecCom"; + +//非系统人员-保存 +export const save = (params) => { + return postFetch("/api/bs/hrmsalary/extEmp/save", params); +}; + +//非系统人员-修改 +export const update = (params) => { + return postFetch("/api/bs/hrmsalary/extEmp/update", params); +}; + +//非系统人员-列表 +export const listPage = (params) => { + return postFetch("/api/bs/hrmsalary/extEmp/listPage", params); +}; + +//非系统人员-删除 +export const deleteExtEmp = (params) => { + return postFetch("/api/bs/hrmsalary/extEmp/delete", params); +}; + +//非系统人员-详情 +export const detail = params => { + return WeaTools.callApi("/api/bs/hrmsalary/extEmp/detail", "get", params); +}; diff --git a/pc4mobx/hrmSalary/apis/ledger.js b/pc4mobx/hrmSalary/apis/ledger.js index b04e881e..834a6c47 100644 --- a/pc4mobx/hrmSalary/apis/ledger.js +++ b/pc4mobx/hrmSalary/apis/ledger.js @@ -71,6 +71,17 @@ export const saveLedgerBasic = params => { }).then(res => res.json()); }; +//薪资帐套外部人员范围(包含)列表 +export const getLedgerPersonRangeExtList = params => { + return fetch("/api/bs/hrmsalary/salarysob/range/ext/list", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资帐套人员范围(包含)列表 export const getLedgerPersonRangeInclude = params => { return fetch("/api/bs/hrmsalary/salarysob/range/listInclude", { @@ -104,6 +115,28 @@ export const getLedgerPersonRangeForm = params => { ); }; +//保存薪资帐套外部人员范围 +export const saveLedgerPersonExtRange = params => { + return fetch("/api/bs/hrmsalary/salarysob/ext/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; +//删除薪资帐套外部人员范围 +export const deleteLedgerPersonExtRange = params => { + return fetch("/api/bs/hrmsalary/salarysob/range/ext/delete", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //保存薪资帐套人员范围 export const saveLedgerPersonRange = params => { return fetch("/api/bs/hrmsalary/salarysob/range/save", { diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index c041b4d3..b5f4f87f 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -6,6 +6,10 @@ export const commonEnumList = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params); }; +export const sysinfo = params => { + return WeaTools.callApi("/api/bs/hrmsalary/sys/info", "GET", params); +}; + export const sysOrderRule = params => { return WeaTools.callApi("/api/bs/hrmsalary/sys/orderRule", "GET", params); }; @@ -47,6 +51,10 @@ export const operateTaxDeclarationFunction = (params) => { export const saveArchiveDelete = (params) => { return postFetch("/api/bs/hrmsalary/sys/saveArchiveDelete", params); }; +//保存系统规则开关 +export const saveSysOperate = (params) => { + return postFetch("/api/bs/hrmsalary/sys/operate", params); +}; //保存个税申报撤回规则 export const saveWithDrawTaxDeclaration = (params) => { return postFetch("/api/bs/hrmsalary/sys/saveWithDrawTaxDeclaration", params); diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js index 5f2b86ee..25747f12 100644 --- a/pc4mobx/hrmSalary/apis/taxAgent.js +++ b/pc4mobx/hrmSalary/apis/taxAgent.js @@ -70,6 +70,18 @@ export const deleteTaxAgent = (params) => { export const taxAgentRangeSave = (params) => { return postFetch("/api/bs/hrmsalary/taxAgent/range/save", params); }; +//非系统人员范围查询 +export const taxAgentRangelistExt = (params) => { + return postFetch("/api/bs/hrmsalary/taxAgent/range/listExt", params); +}; +//非系统人员范围删除 +export const taxAgentRangeExtDelete = (params) => { + return postFetch("/api/bs/hrmsalary/taxAgent/range/ext/delete", params); +}; +//非系统人员范围保存 +export const taxAgentRangeExtSave = (params) => { + return postFetch("/api/bs/hrmsalary/taxAgent/range/ext/save", params); +}; //人员范围删除 export const taxAgentRangeDelete = (params) => { return postFetch("/api/bs/hrmsalary/taxAgent/range/delete", params); diff --git a/pc4mobx/hrmSalary/components/externalPersonModal/index.js b/pc4mobx/hrmSalary/components/externalPersonModal/index.js new file mode 100644 index 00000000..64f21fbf --- /dev/null +++ b/pc4mobx/hrmSalary/components/externalPersonModal/index.js @@ -0,0 +1,86 @@ +/* + * Author: 黎永顺 + * name: 外部人员添加弹框 + * Description: + * Date: 2023/3/14 + */ +import React, { Component } from "react"; +import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup } from "ecCom"; +import { Button, Modal } from "antd"; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + targetIds: "", + targetNames: "" + }; + } + + handleExternalPersonSave = () => { + const { targetIds } = this.state; + const { onExternalPersonSave } = this.props; + if (!_.isEmpty(targetIds)) { + onExternalPersonSave({ targetIds: targetIds.split(",") }); + } else { + Modal.warning({ + title: "信息确认", + content: "必要信息不完整,红色*为必填项!" + }); + } + }; + + render() { + const { targetIds, targetNames } = this.state; + const { onCancel, visible, loading } = this.props; + const buttons = [ + , + + ]; + return ( + + + + this.setState({ targetIds, targetNames })} + /> + + + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 6c0597da..d004267c 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -37,6 +37,7 @@ import EmployeeList from "./pages/employeeView"; import ReportView from "./pages/reportView"; import MySalaryView from "./pages/mySalary/mySalaryView"; import WatermarkPreview from "./pages/payroll/watermarkPreview"; +import ExternalPersonManage from "./pages/externalPersonManage"; import stores from "./stores"; import "./style/index"; @@ -86,6 +87,7 @@ const DataAcquisition = (props) => props.children; // fieldManagement 字段管理 // analysisOfSalaryStatistics 薪酬统计分析 // reportView 薪酬报表查看 +// externalPersonManage 非系统人员管理 const Routes = ( + ); diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js new file mode 100644 index 00000000..c564b29e --- /dev/null +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js @@ -0,0 +1,133 @@ +/* + * Author: 黎永顺 + * name: 非系统人员管理表单项 + * Description: + * Date: 2023/3/13 + */ +import React, { Component } from "react"; +import { WeaSlideModal } from "ecCom"; +import { message } from "antd"; +import { getConditionDomkeys, getSearchs } from "../../../util"; +import SlideModalTitle from "../../../components/slideModalTitle"; +import { detail, save, update } from "../../../apis/externalPersonManage"; + +class ExternalPersonManageEditSlide extends Component { + constructor(props) { + super(props); + this.state = { + date: "", + loading: false + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible && nextProps.id) this.detail(nextProps); + } + + detail = (props) => { + const { form, id, condition } = props; + detail({ id }).then(({ status, data }) => { + if (status) { + form.updateFields({ + "departmentId": { + value: data["departmentId"], + valueSpan: data["departmentOrgName"], + valueObj: [{ id: data["departmentId"], name: data["departmentOrgName"] }] + } + }); + form.updateFields({ + "subcompanyId": { + value: data["subcompanyId"], + valueSpan: data["subcompanyOrgName"], + valueObj: [{ id: data["subcompanyId"], name: data["subcompanyOrgName"] }] + } + }); + // form.updateFields({ + // "jobtitleId": { + // value: jobtitleId, + // valueSpan: data["jobtitleOrgName"], + // valueObj: [{ id: jobtitleId, name: data["jobtitleOrgName"] }] + // } + // }); + _.map(_.without(getConditionDomkeys(condition), "departmentId", "subcompanyId"), item => { + form.updateFields({ [item]: { value: data[item] } }, false); + }); + } + }); + }; + + handleSubmit = () => { + const { form, id, onCancel, title } = this.props; + form.validateForm().then(f => { + if (f.isValid) { + const tmpV = _.reduce(_.keys(form.getFormDatas()), (pre, cur) => { + if (cur === "departmentId") { + return _.assign(pre, { + [cur]: form.getFormDatas()[cur].value, + departmentName: form.getFormDatas()["departmentId"].valueSpan + }); + } else if (cur === "subcompanyId") { + return _.assign(pre, { + [cur]: form.getFormDatas()[cur].value, + subcompanyName: form.getFormDatas()["subcompanyId"].valueSpan + }); + } + return _.assign(pre, { [cur]: form.getFormDatas()[cur].value }); + }, {}); + const payload = _.omitBy(form.getFormParams(), _.isNil); + this.setState({ loading: true }); + const APIFOX = !id ? save : update; + APIFOX(id ? { ...payload, id } : payload).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(`${title}成功`); + onCancel(true); + } else { + message.error(errormsg || `${title}失败`); + } + }).catch(() => this.setState({ loading: false })); + } else { + f.showErrors(); + this.setState({ date: new Date() }); + } + }); + }; + handleFormChange = (res) => { + const { form, id } = this.props; + if (_.keys(res)[0] === "departmentId" || _.keys(res)[0] === "subcompanyId") { + const key = _.replace(_.keys(res)[0], "Id", "Name"); + form.updateFields({ [key]: res[_.keys(res)[0]].valueSpan || "" }); + } + }; + + render() { + const { loading } = this.state; + const { visible, title, onCancel, showOperateBtn, form, condition } = this.props; + return ( + + } + content={getSearchs(form, condition, 1, false, this.handleFormChange)} + onClose={onCancel} + /> + ); + } +} + +export default ExternalPersonManageEditSlide; diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js new file mode 100644 index 00000000..c208e585 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js @@ -0,0 +1,208 @@ +export const searchCondition = [ + { + items: [ + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["username"], + fieldcol: 16, + label: "姓名", + labelcol: 8, + value: "", + viewAttr: 2 + } + ], + defaultshow: true + } +]; +export const condition = [ + { + items: [ + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["username"], + rules: "required|string", + fieldcol: 18, + label: "姓名", + labelcol: 6, + value: "", + viewAttr: 3 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: true, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "部门", + type: "57", + viewAttr: 2 + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["departmentId"], + fieldcol: 18, + label: "部门", + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["departmentName"], + fieldcol: 18, + label: "部门名称", + labelcol: 6, + value: "", + hasBorder: true, + viewAttr: 1 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: true, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "分部", + type: "164", + viewAttr: 2 + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["subcompanyId"], + fieldcol: 18, + label: "分部", + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["subcompanyName"], + fieldcol: 18, + label: "分部名称", + labelcol: 6, + value: "", + hasBorder: true, + viewAttr: 1 + }, + // { + // browserConditionParam: { + // completeParams: {}, + // conditionDataParams: {}, + // dataParams: {}, + // destDataParams: {}, + // hasAddBtn: false, + // hasAdvanceSerach: false, + // idSeparator: ",", + // isAutoComplete: 1, + // isDetail: 0, + // isMultCheckbox: false, + // isSingle: true, + // icon: "icon-coms-hrm", + // linkUrl: "", + // pageSize: 10, + // quickSearchName: "", + // replaceDatas: [], + // title: "岗位", + // type: "24", + // viewAttr: 2, + // }, + // colSpan: 1, + // conditionType: "BROWSER", + // domkey: ["jobtitleId"], + // fieldcol: 18, + // label: "岗位", + // labelcol: 6, + // viewAttr: 2, + // }, + { + colSpan: 1, + conditionType: "DATEPICKER", + domkey: ["companystartdate"], + fieldcol: 18, + label: "入职日期", + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["mobile"], + fieldcol: 18, + label: "手机", + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["workcode"], + fieldcol: 18, + label: "工号", + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["idNo"], + fieldcol: 18, + label: "身份证号码", + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["bankCardNum"], + fieldcol: 18, + label: "本人开户的银行卡卡号", + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["bankName"], + fieldcol: 18, + label: "本人开户的银行卡开户支行全称", + labelcol: 6, + value: "", + viewAttr: 2 + } + ], + defaultshow: true, + title: "基本信息" + } +]; diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/index.js b/pc4mobx/hrmSalary/pages/externalPersonManage/index.js new file mode 100644 index 00000000..265f5e0b --- /dev/null +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/index.js @@ -0,0 +1,177 @@ +/* + * Author: 黎永顺 + * name: 非系统人员管理 + * Description: + * Date: 2023/3/13 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaTab, WeaTable, WeaTop } from "ecCom"; +import ExternalPersonManageEditSlide from "./components/externalPersonManageEditSlide"; +import { Button, message, Modal } from "antd"; +import { getSearchs } from "../../util"; +import { condition, searchCondition } from "./conditions"; +import { deleteExtEmp, listPage } from "../../apis/externalPersonManage"; +import "./index.less"; + +@inject("externalPersonManageStore", "taxAgentStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, + selectedRowKeys: [], + pageInfo: { current: 1, pageSize: 10, total: 0 }, + showSearchAd: false, + externalPersonManagePayload: { + visible: false, title: "新建", id: "" + } + }; + } + + componentDidMount() { + const { externalPersonManageStore: { form, addForm } } = this.props; + form.initFormFields(searchCondition); + addForm.initFormFields(condition); + this.listPage(); + } + + listPage = () => { + const { pageInfo } = this.state; + const { externalPersonManageStore: { form } } = this.props; + const payload = { ...pageInfo, ...form.getFormParams() }; + listPage(payload).then(({ status, data }) => { + if (status) { + const { list: dataSource, columns, pageNum: current, pageSize, total } = data; + this.setState({ + dataSource, columns, + pageInfo: { ...pageInfo, current, pageSize, total } + }); + } + }); + }; + deleteExtEmp = (ids) => { + deleteExtEmp(ids).then(({ status, errormsg }) => { + if (status) { + message.success("删除成功"); + this.listPage(); + } else { + message.error(errormsg || "删除失败"); + } + }); + }; + handleDelete = (id) => { + Modal.confirm({ + title: "信息确认", + content: "确定删除吗", + onOk: () => this.deleteExtEmp([id]) + }); + }; + handleCancel = (isRefresh) => { + const { externalPersonManagePayload } = this.state; + const { externalPersonManageStore: { addForm } } = this.props; + addForm.resetForm(); + this.setState({ + externalPersonManagePayload: { + ...externalPersonManagePayload, + visible: false, title: "新建", id: "" + } + }, () => isRefresh && this.listPage()); + }; + handleAdd = (id = "") => { + const { externalPersonManagePayload } = this.state; + this.setState({ + externalPersonManagePayload: { + ...externalPersonManagePayload, + visible: true, id, title: id ? "编辑" : "新建" + } + }); + }; + getColumns = () => { + const { columns } = this.state; + return _.map(_.filter(columns, item => !!item.display), child => ({ + ...child, + render: (text) => { + return {text}; + } + })); + }; + + render() { + const { showSearchAd, externalPersonManagePayload, loading, pageInfo, selectedRowKeys, dataSource } = this.state; + const { externalPersonManageStore: { form, addForm }, taxAgentStore: { showOperateBtn } } = this.props; + const pagination = { + current: pageInfo.current, + pageSize: pageInfo.pageSize, + total: pageInfo.total, + showTotal: total => `共 ${total} 条`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.listPage()); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => this.listPage()); + } + }; + const rowSelection = { + selectedRowKeys, + onChange: selectedRowKeys => this.setState({ selectedRowKeys }) + }; + return ( +
+ } + iconBgcolor="#F14A2D" showDropIcon={false} + > +
+ this.handleAdd()}>新建 + ] : []} + searchType={["base", "advanced"]} showSearchAd={showSearchAd} + setShowSearchAd={(showSearchAd) => this.setState({ showSearchAd })} + searchsAd={getSearchs(form, searchCondition, 2)} + searchsBasePlaceHolder="请输入姓名" onSearch={this.listPage} + onSearchChange={username => form.updateFields({ username })} + searchsBaseValue={form.getFormParams().username} + onAdSearch={() => this.setState({ showSearchAd: false }, () => this.listPage())} + onAdReset={() => form.resetForm()} onAdCancel={() => this.setState({ showSearchAd: false })} + /> + ( + + this.handleAdd(id)} + style={{ paddingRight: 8 }}>编辑 + {/* this.handleDelete(id)}>删除*/} + + ) + } + ] : []} + dataSource={dataSource} + pagination={pagination} + rowSelection={rowSelection} + xWidth={800} + /> + +
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/index.less b/pc4mobx/hrmSalary/pages/externalPersonManage/index.less new file mode 100644 index 00000000..8b13dd6f --- /dev/null +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/index.less @@ -0,0 +1,14 @@ +.externalPerWrapper { + width: 100%; + height: 100%; + + .externalPerCont { + height: 100%; + } +} + +.slideOuterWrapper { + .hideFormItem { + display: none !important; + } +} diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index d3660ebe..76913307 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -11,19 +11,25 @@ import { WeaButtonIcon, WeaInputSearch, WeaTab } from "ecCom"; import PersonalScopeTable from "../../../components/PersonalScopeTable"; import PersonalScopeModal from "../../../components/PersonalScopeModal"; import { + deleteLedgerPersonExtRange, deleteLedgerPersonRange, getLedgerPersonRangeExclude, + getLedgerPersonRangeExtList, getLedgerPersonRangeInclude, salarysobRangeImportData, salarysobRangePreview, + saveLedgerPersonExtRange, saveLedgerPersonRange } from "../../../apis/ledger"; import ImportModal from "../../../components/importModal"; import { importEmployColumns } from "../../taxAgent/columns"; +import ExternalPersonModal from "../../../components/externalPersonModal"; +import { sysinfo } from "../../../apis/ruleconfig"; const APIFox = { listInclude: getLedgerPersonRangeInclude, - listExclude: getLedgerPersonRangeExclude + listExclude: getLedgerPersonRangeExclude, + externalList: getLedgerPersonRangeExtList }; const APISaveFox = { save: saveLedgerPersonRange @@ -39,6 +45,8 @@ class LedgerAssociatedPersonnel extends Component { selectedKey: "listInclude", rowKeys: [], previewDataSource: [], + externalPersonModalVisible: false, + loading: false, importParams: { visible: false, step: 0, @@ -48,10 +56,45 @@ class LedgerAssociatedPersonnel extends Component { visible: false, title: "关联人员", includeType: "" - } + }, + extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭 }; } + componentDidMount() { + this.getSysinfo(); + } + + /* + * Author: 黎永顺 + * Description: 非系统人员开关查询 + * Params: + * Date: 2023/7/14 + */ + getSysinfo = () => { + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; + /* + * Author: 黎永顺 + * Description:外部人员保存 + * Params: + * Date: 2023/3/14 + */ + handleSaveExternalPerson = (val) => { + const { editId: salarySobId, saveSalarySobId } = this.props; + saveLedgerPersonExtRange({ ...val, salarySobId: salarySobId || saveSalarySobId }).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success("保存成功"); + this.setState({ externalPersonModalVisible: false }); + this.personalScopeTableRef.getPersonalScopeList(); + } else { + message.error(errormsg || "保存失败"); + } + }).catch(() => this.setState({ loading: true })); + }; /* * Author: 黎永顺 * Description: 删除人员范围 @@ -59,23 +102,55 @@ class LedgerAssociatedPersonnel extends Component { * Date: 2022/11/30 */ taxAgentRangeDelete = () => { + const { selectedKey } = this.state; Modal.confirm({ title: "信息确认", content: "确认要删除吗?", onOk: () => { - deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => { - if (status) { - message.success("删除成功"); - this.setState({ rowKeys: [] }, () => { - this.personalScopeTableRef.clearRowkeys(); - }); - } else { - message.error(errormsg || "删除失败"); - } - }); + return new Promise((resolve, reject) => { + return selectedKey === "externalList" ? this.deleteLedgerPersonExtRange(resolve, reject) : this.deleteLedgerPersonRange(resolve, reject); + }).catch(() => console.log("出错!")); } }); }; + deleteLedgerPersonExtRange = (resolve, reject) => { + message.destroy(); + message.loading("正在删除中...", 0); + deleteLedgerPersonExtRange(this.state.rowKeys).then(({ status, errormsg }) => { + message.destroy(); + resolve(); + if (status) { + message.success("删除成功"); + this.setState({ rowKeys: [] }, () => { + this.personalScopeTableRef.clearRowkeys(); + }); + } else { + message.error(errormsg || "删除失败"); + } + }).catch(() => { + message.destroy(); + reject(); + }); + }; + deleteLedgerPersonRange = (resolve, reject) => { + message.destroy(); + message.loading("正在删除中...", 0); + deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => { + message.destroy(); + resolve(); + if (status) { + message.success("删除成功"); + this.setState({ rowKeys: [] }, () => { + this.personalScopeTableRef.clearRowkeys(); + }); + } else { + message.error(errormsg || "删除失败"); + } + }).catch(() => { + message.destroy(); + reject(); + }); + }; /* * Author: 黎永顺 * Description:新增人员范围 @@ -84,13 +159,17 @@ class LedgerAssociatedPersonnel extends Component { */ handleAddPersonal = () => { const { personalAddModal, selectedKey } = this.state; - this.setState({ - personalAddModal: { - ...personalAddModal, - visible: true, - includeType: selectedKey === "listInclude" ? 1 : 0 - } - }); + if (selectedKey === "externalList") { + this.setState({ externalPersonModalVisible: true }); + } else { + this.setState({ + personalAddModal: { + ...personalAddModal, + visible: true, + includeType: selectedKey === "listInclude" ? 1 : 0 + } + }); + } }; /* * Author: 黎永顺 @@ -138,7 +217,9 @@ class LedgerAssociatedPersonnel extends Component { rowKeys, personalAddModal, importParams, - previewDataSource + previewDataSource, + externalPersonModalVisible, + loading, extEmpsWitch } = this.state; const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props; const topTab = [ @@ -149,6 +230,10 @@ class LedgerAssociatedPersonnel extends Component { { title: "从范围中排除", viewcondition: "listExclude" + }, + { + title: "非系统人员范围", + viewcondition: "externalList" } ]; const btns = showOperateBtn ? [ @@ -189,10 +274,10 @@ class LedgerAssociatedPersonnel extends Component { return (
this.setState({ selectedKey })} /> )} + {/*非系统人员添加*/} + this.setState({ externalPersonModalVisible: false })} + onExternalPersonSave={this.handleSaveExternalPerson} + /> {/*新增人员范围*/} { if (status) { @@ -92,14 +92,15 @@ class ImportMenu extends Component { }; // 导入档案 handleImportFile = (params) => { + const { isExtEmp = false } = this.props; if (this.state.importParams.importType === "init" || this.state.importParams.importType === "salaryItemAdjust") { params.importType = this.state.importParams.importType; params.listType = "FIXED"; } else { - params.importType = ''; + params.importType = ""; params.listType = this.state.importParams.importType; } - API.importSalaryArchive(params).then(({ status, data }) => { + API.importSalaryArchive({ ...params, isExtEmp }).then(({ status, data }) => { if (status) { data.errorData = data.errorNotice; this.setState({ @@ -113,7 +114,7 @@ class ImportMenu extends Component { }; render() { - const { importType, refreshList } = this.props; + const { importType, refreshList, isExtEmp } = this.props; const { importParams, previewColumns, previewDataSource } = this.state; let params = ""; if (importParams.importType === "init" || importParams.importType === "salaryItemAdjust") { @@ -121,6 +122,7 @@ class ImportMenu extends Component { } else { params = "" + "&listType=" + importParams.importType; } + if (isExtEmp) params = params + "&extSalaryArchiveList=true"; return ( diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js index 5440dcd5..22a80218 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js @@ -26,5 +26,12 @@ export const tabCondition = [ showcount: true, title: "停薪员工", viewcondition: "stop" + }, + { + color: "#000000", + groupid: "EXT", + showcount: true, + title: "非系统人员", + viewcondition: "ext" } ]; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index c5de58f5..73f7e302 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -31,6 +31,7 @@ import BatchSuspendsPay from "./components/batchSuspendsPay"; import SlideModalTitle from "../../components/slideModalTitle"; import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide"; import ChangeSalaryModal from "../salaryFile/changeSalaryModal"; +import { sysinfo } from "../../apis/ruleconfig"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -86,7 +87,8 @@ class Index extends Component { payStartDate: "", payEndDate: "" }, - salaryArchiveDelete: "" //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是 + salaryArchiveDelete: "", //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是, + extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭 }; } @@ -155,6 +157,7 @@ class Index extends Component { fetchTaxAgentOption(); this.queryTabTotal(); this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList"); + this.getSysinfo(); const init = this.init(); window.addEventListener("message", this.handleReceive, false); } @@ -163,6 +166,18 @@ class Index extends Component { window.removeEventListener("message", this.handleReceive, false); } + /* + * Author: 黎永顺 + * Description: 非系统人员开关查询 + * Params: + * Date: 2023/7/14 + */ + getSysinfo = () => { + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; + handleReceive = ({ data }) => { const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props; const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({ @@ -498,6 +513,27 @@ class Index extends Component { }}/> ]; + } else if (selectedKey === "ext" && showOperateBtn) { + return [ + } + placement="topLeft" + />, + { + this.query(); + this.setState({ selectedRowKeys: [] }); + }}/> + }> + + + ]; } return []; }; @@ -584,7 +620,7 @@ class Index extends Component { window.open(`${linkUrl}&salaryArchiveId=${id}`); }}>发起调薪); } - if (showOperateBtn && selectedKey === "fixed") { + if (showOperateBtn && (selectedKey === "fixed" || selectedKey === "ext")) { arrList.push(); @@ -631,7 +667,7 @@ class Index extends Component { salaryItemId: it.id, adjustValue: String(it.value || "") })), - status: _.upperCase(selectedKey) + status: selectedKey === "ext" ? "FIXED" : _.upperCase(selectedKey) }; API.savePaySet(payload).then(({ status, errormsg }) => { if (status) { @@ -664,9 +700,12 @@ class Index extends Component { case "suspend": this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList"); break; - default: + case "stop": this.queryList("/api/bs/hrmsalary/salaryArchive/stopList"); break; + default: + this.queryList("/api/bs/hrmsalary/salaryArchive/extList"); + break; } }; @@ -679,7 +718,8 @@ class Index extends Component { showSearchAd, slideParams, changeSalaryVisible, - paysetParams + paysetParams, + extEmpsWitch } = this.state; const { payrollFilesStore: { tableStore } } = this.props; const renderSearch = () => { @@ -738,7 +778,7 @@ class Index extends Component { dropMenuDatas={rightMenu} > ({ key: it.value, showname: it.defaultLabel })); const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); - const { data: { ascOrDesc, orderRule } } = orderRules; - const { data: rule } = codeRule; const { data: { - showEncryptOperationButton, - isOpenEncrypt: enctry, - isOpenTaxDeclaration: operateTaxDeclaration, - salaryAcctEmployeeRule: matchRule, - salaryArchiveDelete: confValue, withDrawTaxDeclaration + ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "", + taxDeclarationFunction: operateTaxDeclaration = "0", salaryArchiveDelete: confValue, + salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0", + OPEN_APPLICATION_ENCRYPT: enctry = "0", extEmpsWitch = "0" } - } = appSettings; + } = sysInfo; + // const { data: { ascOrDesc, orderRule } } = orderRules; + // const { data: rule } = codeRule; + // const { + // data: { + // showEncryptOperationButton, + // isOpenEncrypt: enctry + // isOpenTaxDeclaration: operateTaxDeclaration, + // salaryAcctEmployeeRule: matchRule, + // salaryArchiveDelete: confValue, + // withDrawTaxDeclaration + // } + // } = appSettings; this.setState({ matchRuleOptions, orderOptions, ascOptions, employeeOptions, showEncryptOperationButton, saveParams: { ...saveParams, - ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration + ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration, + extEmpsWitch } }); } + sysinfo = () => { + return API.sysinfo(); + }; + sysOrderRule = () => { return API.sysOrderRule(); }; @@ -210,6 +227,16 @@ export default class Index extends Component { } }); }; + saveSysOperate = (payload) => { + API.saveSysOperate({ ...payload, confValue: this.state.saveParams.extEmpsWitch }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; withDrawTaxDeclaration = () => { API.saveWithDrawTaxDeclaration({ confValue: _.pick(this.state.saveParams, ["withDrawTaxDeclaration"]).withDrawTaxDeclaration }) .then(({ status, errormsg }) => { @@ -256,6 +283,12 @@ export default class Index extends Component { case "withDrawTaxDeclaration": this.withDrawTaxDeclaration(); break; + case "extEmpsWitch": + this.saveSysOperate({ + title: getLabel(111, "开启非系统人员"), + module: "basic", confKey: key + }); + break; default: break; } @@ -289,7 +322,8 @@ export default class Index extends Component { operateTaxDeclaration, matchRule, confValue, - withDrawTaxDeclaration + withDrawTaxDeclaration, + extEmpsWitch } = saveParams; return (
@@ -352,6 +386,12 @@ export default class Index extends Component { /> + + + this.handleChange("extEmpsWitch", val)}/> + + { this.state.progressVisible && } initLoadCss + className="taxagentModalWrapper" visible={visible} style={{ width: 800, height: 450 }} hasScroll> diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.less b/pc4mobx/hrmSalary/pages/taxAgent/index.less index 6bfafdb0..67902f49 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.less +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.less @@ -113,3 +113,46 @@ } } } + +.taxagentModalWrapper { + .topMenuWrapper { + height: 47px; + line-height: 47px; + padding: 0 10px; + display: flex; + justify-content: space-between; + + .topMenuTabWrapper { + display: flex; + align-items: center; + + .menuTabItem { + height: 24px; + padding: 0 16px; + border-radius: 3px; + margin-right: 6px; + display: flex; + align-items: center; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + flex: 1 1 auto; + line-height: normal; + } + + .menuTabItem:hover { + color: #5d9cec; + background: #e9f7ff; + } + + .active { + color: #5d9cec; + background: #e9f7ff; + } + } + } +} diff --git a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js index 94dbe860..da0bd2bb 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js @@ -18,6 +18,7 @@ export default class PersonalScope extends Component { constructor(props) { super(props); this.state = { + deleteLoading: false, queryLoading: false, submitLoading: false, targetTypeList: [], @@ -46,7 +47,6 @@ export default class PersonalScope extends Component { } }); }; - getTaxAgentRangeListInclude = (pageModule = {}) => { const { taxAgentId } = this.props; const { getTaxAgentRangeListInclude } = this.props.taxAgentStore; @@ -75,6 +75,35 @@ export default class PersonalScope extends Component { } ); }; + + taxAgentRangelistExt = (pageModule = {}) => { + const { taxAgentId } = this.props; + const { taxAgentRangelistExt } = this.props.taxAgentStore; + this.setState({ queryLoading: true }); + taxAgentRangelistExt({ ...pageModule, taxAgentId }).then( + ({ status, data }) => { + this.setState({ queryLoading: false }); + if (status && !_.isEmpty(data)) { + const { + columns, + list: dataSource, + pageNum: current, + pageSize, + total + } = data; + this.setState({ + columns, + dataSource, + pageObj: { + current, + pageSize, + total + } + }); + } + } + ); + }; getTaxAgentRangeListExclude = (pageModule = {}) => { const { taxAgentId } = this.props; const { getTaxAgentRangeListExclude } = this.props.taxAgentStore; @@ -105,17 +134,93 @@ export default class PersonalScope extends Component { }; taxAgentRangeDelete = ({ ids, tab }) => { - const { taxAgentRangeDelete } = this.props.taxAgentStore; - const { pageObj } = this.state; Modal.confirm({ title: "信息确认", content: `确认删除该条数据吗?`, onOk: () => { - taxAgentRangeDelete(ids).then(({ status, errorMsg }) => { + return new Promise((resolve, reject) => { + return tab === "2" ? this.taxAgentExtRangeDeleteComfirm(resolve, reject, ids) : this.taxAgentRangeDeleteComfirm(resolve, reject, ids, tab); + }).catch(() => console.log("出错!")); + } + }); + }; + taxAgentExtRangeDeleteComfirm = (resolve, reject, ids) => { + const { taxAgentRangeExtDelete } = this.props.taxAgentStore; + const { pageObj } = this.state; + message.destroy(); + message.loading("正在删除中...", 0); + taxAgentRangeExtDelete(ids).then(({ status, errormsg }) => { + message.destroy(); + resolve(); + if (status) { + this.tagAgentRef.onSelectChange([]); + message.success("删除成功"); + this.taxAgentRangelistExt({ + current: pageObj.current, + pageSize: pageObj.pageSize + }); + } else { + message.error(errormsg || "删除失败"); + } + }).catch(() => { + message.destroy(); + reject(); + }); + }; + taxAgentRangeDeleteComfirm = (resolve, reject, ids, tab) => { + const { taxAgentRangeDelete } = this.props.taxAgentStore; + const { pageObj } = this.state; + message.destroy(); + message.loading("正在删除中...", 0); + taxAgentRangeDelete(ids).then(({ status, errormsg }) => { + message.destroy(); + resolve(); + if (status) { + this.tagAgentRef.onSelectChange([]); + message.success("删除成功"); + tab == "1" + ? this.getTaxAgentRangeListInclude({ + current: pageObj.current, + pageSize: pageObj.pageSize + }) + : this.getTaxAgentRangeListExclude({ + current: pageObj.current, + pageSize: pageObj.pageSize + }); + } else { + message.error(errormsg || "删除失败"); + } + }).catch(() => { + message.destroy(); + reject(); + }); + }; + + taxAgentRangeSave = (module) => { + const { taxAgentId } = this.props; + const { pageObj } = this.state; + const { includeType } = module; + const { taxAgentRangeSave, taxAgentRangeExtSave } = this.props.taxAgentStore; + this.setState({ submitLoading: true }); + if (includeType === "2") { + taxAgentRangeExtSave({ taxAgentId, ..._.pick(module, "targetIds") }).then(({ status, errormsg }) => { + this.setState({ submitLoading: false }); + if (status) { + this.tagAgentRef.closeModal(); + message.success("新增成功"); + this.taxAgentRangelistExt({ current: pageObj.current, pageSize: pageObj.pageSize }); + } else { + message.error(errormsg || "新增失败"); + } + }); + } else { + taxAgentRangeSave({ ...module, taxAgentId }).then( + ({ status, errormsg }) => { + this.setState({ submitLoading: false }); if (status) { - this.tagAgentRef.onSelectChange([]); - message.success("删除成功"); - tab == "1" + this.tagAgentRef.closeModal(); + message.success("新增成功"); + includeType == "1" ? this.getTaxAgentRangeListInclude({ current: pageObj.current, pageSize: pageObj.pageSize @@ -125,41 +230,11 @@ export default class PersonalScope extends Component { pageSize: pageObj.pageSize }); } else { - message.error(errorMsg || "删除失败"); + message.error(errormsg || "新增失败"); } - }); - }, - onCancel() { - } - }); - }; - - taxAgentRangeSave = (module) => { - const { taxAgentId } = this.props; - const { pageObj } = this.state; - const { includeType } = module; - const { taxAgentRangeSave } = this.props.taxAgentStore; - this.setState({ submitLoading: true }); - 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 || "新增失败"); } - } - ); + ); + } }; render() { @@ -198,7 +273,8 @@ export default class PersonalScope extends Component { () => { tab == "1" ? this.getTaxAgentRangeListInclude({ ...pageObj, ...params }) - : this.getTaxAgentRangeListExclude({ ...pageObj, ...params }); + : tab == "0" ? this.getTaxAgentRangeListExclude({ ...pageObj, ...params }) : + this.taxAgentRangelistExt({ ...pageObj, ...params }); } ); }} @@ -209,12 +285,14 @@ export default class PersonalScope extends Component { onTaxAngetSearch={({ targetName, targetWorkcode, tab }) => { tab == "1" ? this.getTaxAgentRangeListInclude({ targetName, targetWorkcode }) - : this.getTaxAgentRangeListExclude({ targetName, targetWorkcode }); + : tab == "0" ? this.getTaxAgentRangeListExclude({ targetName, targetWorkcode }): + this.taxAgentRangelistExt({ targetName, targetWorkcode }); }} onChangeTab={(tab) => { + this.tagAgentRef.onSelectChange([]); tab == "1" ? this.getTaxAgentRangeListInclude() - : this.getTaxAgentRangeListExclude(); + : tab == "0" ? this.getTaxAgentRangeListExclude() : this.taxAgentRangelistExt(); }} />
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index 6ee6b5f7..f144e14b 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -4,14 +4,16 @@ import { WeaButtonIcon, WeaFormItem, WeaInput, WeaSearchGroup, WeaTab, WeaTable import AddTaxAgentModal from "./addTaxAgentModal"; import ImportModal from "../../components/importModal"; import { taxAgentRangeImportData, taxAgentRangePreview } from "../../apis/taxAgent"; +import { sysinfo } from "../../apis/ruleconfig"; import { importEmployColumns } from "./columns"; - +import ExternalPersonModal from "../../components/externalPersonModal"; export default class SlideTaxagentUser extends React.Component { constructor(props) { super(props); this.state = { showSearchAd: false, + externalPersonModalVisible: false, //外部人员关联弹框 addTaxagentModalVisible: false, includeType: "1", selectedRowKeys: [], @@ -22,30 +24,34 @@ export default class SlideTaxagentUser extends React.Component { visible: false, step: 0, importResult: {} - } + }, + extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭 }; } - - handleTabClick(includeType) { - const { onChangeTab } = this.props; - this.setState( - { - includeType - }, - () => { - onChangeTab && onChangeTab(includeType); - } - ); + componentDidMount() { + this.getSysinfo(); } + /* + * Author: 黎永顺 + * Description: 非系统人员开关查询 + * Params: + * Date: 2023/7/14 + */ + getSysinfo = () => { + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; + onSelectChange = selectedRowKeys => { this.setState({ selectedRowKeys }); }; handleTabDelete = () => { const { onDeleteTaxAgent } = this.props; - const { includeType } = this.state; - if (this.state.selectedRowKeys.length == 0) { + const { includeType, selectedRowKeys } = this.state; + if (selectedRowKeys.length === 0) { message.warning("未选择条目"); return; } @@ -64,9 +70,10 @@ export default class SlideTaxagentUser extends React.Component { closeModal = () => { this.setState({ - addTaxagentModalVisible: false + addTaxagentModalVisible: false, + externalPersonModalVisible: false }, () => { - this.addTaxRef.handleReset(); + this.addTaxRef && this.addTaxRef.handleReset(); }); }; handleInitModal = () => { @@ -120,9 +127,10 @@ export default class SlideTaxagentUser extends React.Component { selectedRowKeys, searchValue, addTaxagentModalVisible, + externalPersonModalVisible, importParams, previewDataSource, - showSearchAd + showSearchAd, extEmpsWitch } = this.state; const { submitLoading, @@ -146,6 +154,7 @@ export default class SlideTaxagentUser extends React.Component { onChange: this.onSelectChange }; const pagination = { + ...pageObj, total: pageObj.total, showTotal: total => `共 ${total} 条`, pageSizeOptions: ["10", "20", "50", "100"], @@ -177,16 +186,30 @@ export default class SlideTaxagentUser extends React.Component { >, , - this.setState({ addTaxagentModalVisible: true })}/> + { + const key = includeType === "2" ? "externalPersonModalVisible" : "addTaxagentModalVisible"; + this.setState({ [key]: true }); + }} + /> ]; - includeType === "0" && btns.shift(); + (includeType === "0" || includeType === "2") && btns.shift(); return (
- + this.setState({ externalPersonModalVisible: false })} + onExternalPersonSave={val => onTaxAgentSave({ ...val, includeType: includeType })} + /> this.addTaxRef = ref} loading={submitLoading} diff --git a/pc4mobx/hrmSalary/stores/externalPersonManage.js b/pc4mobx/hrmSalary/stores/externalPersonManage.js new file mode 100644 index 00000000..7640bd04 --- /dev/null +++ b/pc4mobx/hrmSalary/stores/externalPersonManage.js @@ -0,0 +1,7 @@ +import { observable } from "mobx"; +import { WeaForm } from "comsMobx"; + +export class ExternalPersonManageStore { + @observable form = new WeaForm(); + @observable addForm = new WeaForm(); +} diff --git a/pc4mobx/hrmSalary/stores/index.js b/pc4mobx/hrmSalary/stores/index.js index 6b7af8e1..c9590ab3 100644 --- a/pc4mobx/hrmSalary/stores/index.js +++ b/pc4mobx/hrmSalary/stores/index.js @@ -18,6 +18,7 @@ import { DeclareStore } from "./declare"; import { StandingBookStore } from "./StandingBook"; import { PayrollFilesStore } from "./payrollFiles"; import { SpecialAddStore } from "./specialAdd"; +import { ExternalPersonManageStore } from "./externalPersonManage"; module.exports = { baseFormStore: new BaseFormStore(), @@ -39,5 +40,6 @@ module.exports = { declareStore: new DeclareStore(), standingBookStore: new StandingBookStore(), payrollFilesStore: new PayrollFilesStore(), - specialAddStore: new SpecialAddStore() + specialAddStore: new SpecialAddStore(), + externalPersonManageStore: new ExternalPersonManageStore() }; diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js index aff71ae6..2f555120 100644 --- a/pc4mobx/hrmSalary/stores/taxAgent.js +++ b/pc4mobx/hrmSalary/stores/taxAgent.js @@ -4,6 +4,7 @@ import { WeaForm, WeaTableNew } from "comsMobx"; import * as API from "../apis/taxAgent"; // 引入API接口文件 import { decentralizationConditions, editConditions } from "../pages/taxAgent/editConditions"; +import { taxAgentRangeExtDelete } from "../apis/taxAgent"; const { TableStore } = WeaTableNew; @@ -171,6 +172,21 @@ export class TaxAgentStore { getTaxAgentRangeForm = params => { return API.getTaxAgentRangeForm(params); }; + // 非系统人员范围保存 + @action + taxAgentRangeExtSave = params => { + return API.taxAgentRangeExtSave(params); + }; + // 非系统人员范围查询 + @action + taxAgentRangelistExt = params => { + return API.taxAgentRangelistExt(params); + }; + // 非系统人员范围删除 + @action + taxAgentRangeExtDelete = params => { + return API.taxAgentRangeExtDelete(params); + }; // 人员范围保存 @action taxAgentRangeSave = params => { diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index de115ede..702a281b 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -32,6 +32,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例 error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验 tipPosition="bottom" // 错误提示的显示位置: top/bottom + className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : ""} >