From a65e31f38682b60995be4df27ccc033c17d0ea58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B1=BC=E4=B8=8D=E5=90=90=E6=B3=A1=E6=B3=A1?= <1224928501@qq.com> Date: Wed, 11 Feb 2026 11:59:18 +0800 Subject: [PATCH] =?UTF-8?q?*=201=E3=80=81=E8=96=AA=E8=B5=84=E6=A0=B8?= =?UTF-8?q?=E7=AE=97=E6=96=B0=E5=A2=9E=E7=8E=AF=E6=AF=94=E4=B8=8A=E6=9C=88?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=202=E3=80=81=E6=A0=B8=E7=AE=97=E5=BD=92?= =?UTF-8?q?=E6=A1=A3=E5=90=8E=E4=BE=9D=E6=97=A7=E5=8F=AF=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E4=B8=8A=E6=9C=88=E7=8E=AF=E6=AF=94=E6=95=B0=E6=8D=AE=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=203=E3=80=81=E4=B8=AA=E7=A8=8E=E7=94=B3=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E6=89=B9=E9=87=8F=E5=A4=9A=E9=80=89=E7=94=B3=E6=8A=A5?= =?UTF-8?q?=E3=80=90=E7=8E=B0=E9=98=B6=E6=AE=B5=E4=BB=85=E8=83=BD=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=B8=80=E4=B8=AA=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E6=9D=A5=E7=94=9F=E6=88=90=E7=94=B3?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E3=80=91=204=E3=80=81=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E7=94=B3=E6=8A=A5=E8=A1=A8=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=20=E6=89=B9=E9=87=8F=E6=92=A4=E5=9B=9E=E6=8C=89=E9=92=AE=20?= =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80=E7=BA=A7?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E8=BF=9B=E8=A1=8C=E5=AF=B9=E5=BA=94=E3=80=90?= =?UTF-8?q?=E7=8E=B0=E9=98=B6=E6=AE=B5=E5=91=98=E5=B7=A5=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=94=B1=E5=AF=BC=E5=85=A5=E4=B8=8Esql?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=B8=A6=E5=87=BA=E4=B8=A4=E4=B8=AA=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E8=8B=A5=E4=B8=BA=E5=91=98=E5=B7=A5=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E5=AF=BC=E5=85=A5=EF=BC=8C=E5=88=99=E9=9C=80=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E3=80=91=E5=9B=BE2=E4=B8=BA=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/salaryEditCalc/condition.js | 187 +++++++++++++++ .../editCalcAdvanceSearchPannel.js | 217 ++++++++++++++++++ .../salaryEditCalc/editCalcTable.js | 30 +-- 3 files changed, 419 insertions(+), 15 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/condition.js create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcAdvanceSearchPannel.js diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/condition.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/condition.js new file mode 100644 index 00000000..c2887cc3 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/condition.js @@ -0,0 +1,187 @@ +export const editCalcSearchConditions = [ + { + items: [ + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["employeeName"], + fieldcol: 12, + label: "姓名", + lanId: 25034, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["workcode"], + fieldcol: 12, + label: "工号", + lanId: 1933, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "164", + viewAttr: 2 + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["subcompanyIds"], + fieldcol: 12, + label: "分部", + lanId: 33553, + labelcol: 6, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "57", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["departmentIds"], + fieldcol: 12, + label: "部门", + lanId: 27511, + labelcol: 6, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "24", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["positionIds"], + fieldcol: 12, + label: "岗位", + lanId: 6086, + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "SELECT", + domkey: ["statuses"], + fieldcol: 12, + multiple: true, + label: "状态", + lanId: 535101, + labelcol: 6, + options: [], + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "CHECKBOX", + domkey: ["consolidatedTaxation"], + fieldcol: 12, + isQuickSearch: false, + label: "合并计税", + labelcol: 6, + viewAttr: 2 + },{ + colSpan: 2, + conditionType: "SELECT", + domkey: ["taxAgentIds"], + fieldcol: 12, + multiple: true, + label: "个税扣缴义务人", + lanId: 537996, + labelcol: 6, + options: [], + viewAttr: 2 + } + ], + defaultshow: true, + title: "常用条件" + } +]; +export const batchUpdateConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["salaryItemName"], + fieldcol: 14, + label: "批量编辑项目", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 1 + }, + { + colSpan: 1, + conditionType: "INPUTNUMBER", + domkey: ["value"], + fieldcol: 14, + label: "批量编辑为", + lanId: 111, + labelcol: 6, + value: "", + rules: "required", + viewAttr: 3 + } + ], + defaultshow: true, + title: "" + } +]; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcAdvanceSearchPannel.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcAdvanceSearchPannel.js new file mode 100644 index 00000000..26ac2251 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcAdvanceSearchPannel.js @@ -0,0 +1,217 @@ +/* + * Author: 黎永顺 + * name: 薪资核算-高级搜索面板 + * Description: + * Date: 2023/9/14 + */ +import React, { Component } from "react"; +import { WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaTools } from "ecCom"; +import { Button, Col, Row } from "antd"; +import { inject, observer } from "mobx-react"; +import uuidV4 from "uuid/v4"; +import { editCalcSearchConditions } from "./condition"; +import { getExportField } from "../../../../../apis/calculate"; +import { commonEnumList } from "../../../../../apis/ruleconfig"; +import { getSearchs } from "../../../../../util"; +import {postFetch} from "../../../../../util/request"; +import {declareConditions} from "../../../../declare/components/declareDialog/condition"; + +const getKey = WeaTools.getKey; +const getLabel = WeaLocaleProvider.getLabel; + +@inject("calculateStore") +@observer +class EditCalcAdvanceSearchPannel extends Component { + constructor(props) { + super(props); + this.state = { + searchConditions: [], salaryItems: [], + customSearchConditions: [], filterEnum: [] + }; + } + + componentDidMount() { + this.getExportField(); + this.getFilterEnumList(); + // 薪资核算高级搜索新增个税扣缴义务人 + postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" }) + .then(({ status, data }) => { + if (status) { + this.setState({ + searchConditions: _.map(editCalcSearchConditions, item => ({ + ...item, + items: _.map(item.items, o => { + if (getKey(o) === "taxAgentIds") { + return { + ...o, label: getLabel(o.lanId, o.label), + options: _.map(data, g => ({ key: String(g.id), showname: g.name })) + }; + } else if (getKey(o) === "statuses") { + return { + ...o, + options: [ + { key: "0", showname: getLabel(18883, "试用") }, { key: "1", showname: getLabel(15711, "正式") }, + { key: "2", showname: getLabel(480, "临时") }, { key: "3", showname: getLabel(15844, "试用延期") }, + { key: "4", showname: getLabel(542707, "解雇") }, { key: "5", showname: getLabel(6091, "离职") }, + { key: "6", showname: getLabel(6092, "退休") } + ] + }; + } + return { ...o }; + }), + title: getLabel(32905, "常用条件") + })) + }, () => { + const { calculateStore: { ECSearchForm } } = this.props; + ECSearchForm.initFormFields(this.state.searchConditions); + }); + } + }); + } + + getFilterEnumList = () => { + commonEnumList({ enumClass: "com.engine.salary.enums.common.FilterEnum" }) + .then(({ status, data }) => { + if (status) { + this.setState({ + filterEnum: _.map(data, item => ({ + key: item.value, + showname: item.defaultLabel + })) + }); + } + }); + }; + getExportField = () => { + getExportField({ salaryAcctRecordId: this.props.salaryAcctRecordId }) + .then(({ status, data }) => { + if (status) { + const { itemsByGroup } = data; + this.setState({ + salaryItems: _.map(itemsByGroup, item => ({ + key: item.salarySobItemGroupId.toString(), + label: item.salarySobItemGroupName, + options: _.map(item.salaryItems, o => ({ + key: o.salaryItemId.toString(), showname: o.salaryItemName + })) + })) + }); + } + }); + }; + handleAddCustomSearchForm = () => { + const { calculateStore: { setOtherConditions } } = this.props; + const { customSearchConditions, salaryItems, filterEnum } = this.state; + const uuid = uuidV4(); + this.setState({ + customSearchConditions: [ + ...customSearchConditions, + { + com: CustomFormFields({ + uuid, salaryItems, filterEnum, onDelete: this.handleDelete, onChange: this.handleChange + }), + uuid, itemId: "", filter: "", params: "" + } + ] + }, () => { + setOtherConditions(_.map(this.state.customSearchConditions, o => ({ + itemId: o.itemId, filter: o.filter, params: o.params + }))); + }); + }; + handleChange = (uuid, params) => { + const { calculateStore: { setOtherConditions } } = this.props; + const { customSearchConditions } = this.state; + this.setState({ + customSearchConditions: _.map(customSearchConditions, o => { + if (o.uuid === uuid) { + return { ...o, ...params }; + } + return { ...o }; + }) + }, () => { + setOtherConditions(_.map(this.state.customSearchConditions, o => ({ + itemId: o.itemId, filter: o.filter, params: o.params + }))); + }); + }; + handleDelete = (uuid) => { + const { calculateStore: { setOtherConditions } } = this.props; + const { customSearchConditions } = this.state; + this.setState({ + customSearchConditions: _.filter(customSearchConditions, o => o.uuid !== uuid) + }, () => { + setOtherConditions(_.map(this.state.customSearchConditions, o => ({ + itemId: o.itemId, filter: o.filter, params: o.params + }))); + }); + }; + + render() { + const { searchConditions, customSearchConditions } = this.state; + const { calculateStore: { ECSearchForm, setOtherConditions } } = this.props; + return ( + + + {getSearchs(ECSearchForm, searchConditions, 2, false)} + + + {getLabel(111, "添加搜索条件")} + + + {/*{getLabel(111, "保存常用筛选")}*/} + + + + + {getLabel(388113, "搜索")} + { + this.setState({ + customSearchConditions: [] + }, () => { + ECSearchForm.resetForm(); + setOtherConditions([]); + }); + }}>{getLabel(2022, "重置")} + {getLabel(31129, "取消")} + + + + ); + } +} + +export default EditCalcAdvanceSearchPannel; + +const CustomFormFields = (props) => { + const { uuid, onDelete, salaryItems, filterEnum, onChange } = props; + return + + + onChange(uuid, { itemId: v })} + /> + + + + + onChange(uuid, { filter: v })}/> + + + onChange(uuid, { params: v })}/> + onDelete(uuid)} + /> + + + + + ; +}; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js index c7798e3f..ab752675 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js @@ -125,18 +125,17 @@ class EditCalcTable extends Component { }, 500); }); const { routeParams: { salaryAcctRecordId } } = this.props; - updateLockStatus({ ...payload, salaryAcctRecordId, acctEmpIds: this.state.selectedRowKeys }) - .then(({ status, errormsg }) => { - if (status) { - clearInterval(this.timerLock); - this.setState({ - progressVisible: false, - progress: 0 - }, () => this.queryCalcResultList()); - } else { - message.error(errormsg); - } - }); + updateLockStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => { + if (status) { + clearInterval(this.timerLock); + this.setState({ + progressVisible: false, + progress: 0 + }, () => this.queryCalcResultList()); + } else { + message.error(errormsg); + } + }); } }); }; @@ -251,13 +250,14 @@ class EditCalcTable extends Component { calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId }, calcDetail = false } = this.props; - const { subcompanyIds, departmentIds, positionIds, statuses, ...extra } = ECSearchForm.getFormParams(); + const { subcompanyIds, departmentIds, positionIds, statuses, taxAgentIds, ...extra } = ECSearchForm.getFormParams(); const payload = { salaryAcctRecordId, ...pageInfo, ...extra, otherConditions, departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : [], positionIds: !_.isEmpty(positionIds) ? positionIds.split(",") : [], subcompanyIds: !_.isEmpty(subcompanyIds) ? subcompanyIds.split(",") : [], - statuses: !_.isEmpty(statuses) ? statuses.split(",") : [] + statuses: !_.isEmpty(statuses) ? statuses.split(",") : [], + taxAgentIds: !_.isEmpty(taxAgentIds) ? taxAgentIds.split(",") : [] }; this.setState({ loading: true }); acctResultList(payload).then(({ status, data }) => { @@ -342,4 +342,4 @@ const traverse = (arr, calcDetail) => { }; } }); -}; \ No newline at end of file +};