From cae8d86cd616dd6eb969090cbe11269f93e0a815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 1 Sep 2023 09:29:49 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E8=A7=84=E5=88=99=E8=AE=BE=E7=BD=AE-?= =?UTF-8?q?=E5=8A=A0=E8=A7=A3=E5=AF=86=E4=BF=AE=E6=94=B9=E4=B8=BA=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=BC=80=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 3ac96bf9..2fccbadf 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -23,7 +23,7 @@ export default class Index extends Component { orderRule: "", ascOrDesc: "", rule: "", - enctry: "", + enctry: "1", operateTaxDeclaration: "1", matchRule: "", confValue: "0", @@ -56,7 +56,7 @@ export default class Index extends Component { ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "", taxDeclarationFunction: operateTaxDeclaration = "1", salaryArchiveDelete: confValue, salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0", - OPEN_APPLICATION_ENCRYPT: enctry = "0", extEmpsWitch = "0" + OPEN_APPLICATION_ENCRYPT: enctry = "1", extEmpsWitch = "0" } } = sysInfo; // const { data: { ascOrDesc, orderRule } } = orderRules; From 5b6480f07660e571aa9b04d31356fca0524d330a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 1 Sep 2023 11:08:35 +0800 Subject: [PATCH 02/14] =?UTF-8?q?hotfix/2.9.42308.02-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=A8=A1=E6=9D=BF=E8=AE=BE=E7=BD=AE=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/payroll/stepForm/salaryItemSettings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js index 0113ecd5..53802244 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js @@ -86,9 +86,11 @@ class SalaryItemSettings extends Component { } }); this.setState({ - dataList: resultSalaryItemSet + dataList: resultSalaryItemSet, + itemShowNamesetting: _.filter(this.state.itemShowNamesetting, it => it.salaryItemId !== item.id) }, () => { this.props.onChangeSalaryItem(resultSalaryItemSet); + this.props.onChangeSalaryItemShowNamesetting(this.state.itemShowNamesetting); }); }; handleCloseModal = () => { From 242b96321a643d2e847635496f938a58a96633cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 1 Sep 2023 14:06:32 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/payrollDetail/index.js | 2 +- .../pages/payroll/payrollDetail/index.less | 10 ++++++++-- .../pages/payroll/payrollGrant/index.js | 1 + .../pages/payroll/payrollGrant/index.less | 16 +++++++++++++--- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js index 03ff17c6..6e6479c0 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js @@ -133,7 +133,7 @@ export default class PayrollDetail extends React.Component { ]; return ( -
+
导出全部]} diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less index 9bb70233..01a180a0 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less @@ -1,12 +1,17 @@ -.payrollGrant { +.payrollDetail { display: flex; flex-direction: column; height: 100%; + background: #f6f6f6; + + .wea-tab .wea-tab-right, .wea-input-focus { + background: #f6f6f6; + } .titleBar { height: 47px; line-height: 47px; - padding: 0 10px; + padding: 0 16px; .titleBarLeft { float: left; @@ -19,6 +24,7 @@ .tableWrapper { flex: 1; + padding: 0 16px; .ant-spin-nested-loading, .ant-spin-container { height: 100%; diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 9582c550..d52797f0 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -595,6 +595,7 @@ export default class PayrollGrant extends React.Component { this.pageInfo = { current, pageSize }; this.handleShowSizeChange(this.pageInfo); }} + scroll={{ y: `calc(100vh - 236px)` }} /> : renderLoading() }
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.less b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.less index 9699454a..cd2ce262 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.less @@ -1,8 +1,15 @@ .payrollGrant_new { + background: #f6f6f6; + height: 100%; + + .wea-tab .wea-tab-right, .wea-input-focus { + background: #f6f6f6; + } + .titleBar { height: 47px; line-height: 47px; - padding: 0 10px; + padding: 0 16px; .titleBarLeft { float: left; @@ -14,8 +21,11 @@ } .tableWrapper { - height: calc(100vh - 180.22px); - overflow: auto; + padding: 0 16px; + + .wea-new-table { + background: #FFF; + } } } From 60431599766be3587ad7a8f75b41aa3fff9da0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 4 Sep 2023 16:48:36 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E5=8F=91=E8=96=AA=E5=91=98=E5=B7=A5=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E8=96=AA=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 32 +- pc4mobx/hrmSalary/pages/salaryFile/columns.js | 354 ++++++++++-------- pc4mobx/hrmSalary/pages/salaryFile/index.less | 54 ++- .../salaryArchiveEditAdjLogRecord.js | 220 +++++++++++ .../pages/salaryFile/salaryItemChangeList.js | 97 ++--- pc4mobx/hrmSalary/stores/salaryFile.js | 5 + pc4mobx/hrmSalary/util/index.js | 3 + 7 files changed, 542 insertions(+), 223 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 74326a8f..db623a70 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -30,8 +30,8 @@ import AllWithoutPay from "./components/allWithoutPay"; 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 SalaryArchiveEditAdjLogRecord from "../salaryFile/salaryArchiveEditAdjLogRecord"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -77,7 +77,9 @@ class Index extends Component { subcompanyIds: "" }, salaryAdjustmentInfo: {}, - changeSalaryVisible: false, + adjLogRecordDialog: { + visible: false, title: "", id: "", salaryArchiveId: "" + }, noPayDate: "", slideParams: { visible: false, @@ -624,7 +626,12 @@ class Index extends Component { } if (showOperateBtn && (selectedKey === "fixed" || selectedKey === "ext")) { arrList.push(); } selectedKey !== "stop" && arrList.push(); @@ -719,7 +726,7 @@ class Index extends Component { pageInfo, showSearchAd, slideParams, - changeSalaryVisible, + adjLogRecordDialog, paysetParams, extEmpsWitch } = this.state; @@ -884,15 +891,14 @@ class Index extends Component { }} /> )} - {changeSalaryVisible && ( - { - this.setState({ changeSalaryVisible: false }); - }} - /> - )} + this.setState({ + adjLogRecordDialog: { + adjLogRecordDialog, visible: false, title: "", id: "", salaryArchiveId: "" + } + })} + />
); } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/columns.js b/pc4mobx/hrmSalary/pages/salaryFile/columns.js index 7cfdb4d9..a34d95bf 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/columns.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/columns.js @@ -1,175 +1,203 @@ export const columns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title', - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title', - }, - { - title: "部门", - dataIndex: 'title', - key: 'title', - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title', - }, - { - title: "员工状态", - dataIndex: 'title', - key: 'title', - }, - { - title: "基本工资", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'cz', - key: 'cz', - } -] + { + title: "姓名", + dataIndex: "title", + key: "title" + }, + { + title: "个税扣缴义务人", + dataIndex: "title", + key: "title" + }, + { + title: "部门", + dataIndex: "title", + key: "title" + }, + { + title: "手机号", + dataIndex: "title", + key: "title" + }, + { + title: "员工状态", + dataIndex: "title", + key: "title" + }, + { + title: "基本工资", + dataIndex: "title", + key: "title" + }, + { + title: "操作", + dataIndex: "cz", + key: "cz" + } +]; -export const changeSalaryModalColumns = [ - { - title: '薪资项目', - dataIndex: 'title', - key: 'title' - }, - { - title: '调整前', - dataIndex: 'title', - key: 'title' - }, - { - title: '调整后', - dataIndex: 'title', - key: 'title' - } -] +export const adjCondition = [ + { + items: [ + { + colSpan: 1, + conditionType: "DATEPICKER", + domkey: ["effectiveTime"], + fieldcol: 18, + label: "生效日期", + lanId: 19548, + labelcol: 6, + rules: "required", + value: "", + viewAttr: 3 + }, + { + colSpan: 1, + checkbox: false, + checkboxValue: false, + conditionType: "SELECT", + domkey: ["adjustReason"], + fieldcol: 18, + label: "调整原因", + lanId: 1897, + labelcol: 6, + options: [], + rules: "required", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["description"], + fieldcol: 18, + label: "说明", + lanId: 25734, + labelcol: 6, + value: "", + viewAttr: 2 + } + ], + title: "调薪信息", + defaultshow: true + } +]; export const slideSalaryItemColumns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title' - }, - { - title: "员工状态", - dataIndex: 'title', - key: 'title' - }, - { - title: "部门", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目", - dataIndex: 'title', - key: 'title' - }, - { - title: "调整前", - dataIndex: 'title', - key: 'title' - }, - { - title: "调整后", - dataIndex: 'title', - key: 'title' - }, - { - title: "调整原因", - dataIndex: 'title', - key: 'title' - }, - { - title: "生效日期", - dataIndex: 'title', - key: 'title' - }, - { - title: "操作人", - dataIndex: 'title', - key: 'title' - }, - { - title: "操作日期", - dataIndex: 'title', - key: 'title' - }, - { - title: "说明", - dataIndex: 'title', - key: 'title' - } -] + { + title: "姓名", + dataIndex: "title", + key: "title" + }, + { + title: "员工状态", + dataIndex: "title", + key: "title" + }, + { + title: "部门", + dataIndex: "title", + key: "title" + }, + { + title: "薪资项目", + dataIndex: "title", + key: "title" + }, + { + title: "调整前", + dataIndex: "title", + key: "title" + }, + { + title: "调整后", + dataIndex: "title", + key: "title" + }, + { + title: "调整原因", + dataIndex: "title", + key: "title" + }, + { + title: "生效日期", + dataIndex: "title", + key: "title" + }, + { + title: "操作人", + dataIndex: "title", + key: "title" + }, + { + title: "操作日期", + dataIndex: "title", + key: "title" + }, + { + title: "说明", + dataIndex: "title", + key: "title" + } +]; export const slieAgentColumns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title' - }, - { - title: "员工状态", - dataIndex: 'title', - key: 'title' - }, - { - title: "部门", - dataIndex: 'title', - key: 'title' - }, - { - title: "调整前", - dataIndex: 'title', - key: 'title' - }, - { - title: "调整后", - dataIndex: 'title', - key: 'title' - }, - { - title: "调整原因", - dataIndex: 'title', - key: 'title' - }, - { - title: "生效日期", - dataIndex: 'title', - key: 'title' - }, - { - title: "操作人", - dataIndex: 'title', - key: 'title' - }, - { - title: "操作日期", - dataIndex: 'title', - key: 'title' - }, - { - title: "说明", - dataIndex: 'title', - key: 'title' - } -] + { + title: "姓名", + dataIndex: "title", + key: "title" + }, + { + title: "员工状态", + dataIndex: "title", + key: "title" + }, + { + title: "部门", + dataIndex: "title", + key: "title" + }, + { + title: "调整前", + dataIndex: "title", + key: "title" + }, + { + title: "调整后", + dataIndex: "title", + key: "title" + }, + { + title: "调整原因", + dataIndex: "title", + key: "title" + }, + { + title: "生效日期", + dataIndex: "title", + key: "title" + }, + { + title: "操作人", + dataIndex: "title", + key: "title" + }, + { + title: "操作日期", + dataIndex: "title", + key: "title" + }, + { + title: "说明", + dataIndex: "title", + key: "title" + } +]; export const dataSource = [ - { - title: "测试" - } + { + title: "测试" + } ]; diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.less b/pc4mobx/hrmSalary/pages/salaryFile/index.less index 506beb63..ebc4a8a4 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/index.less +++ b/pc4mobx/hrmSalary/pages/salaryFile/index.less @@ -73,7 +73,6 @@ } } - .salaryFileSlide { padding: 10px 20px; @@ -125,7 +124,6 @@ } } - .salaryFileTabWrapper { .searchPanel { position: absolute; @@ -169,3 +167,55 @@ } } } + +.adjustItem-layout { + .ant-table-fixed td { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } +} + +.adjLogRecordDialogContent { + background: #f6f6f6; + padding: 16px; + height: 100%; + overflow-y: auto; + + .empty { + text-align: center; + background: transparent; + margin-bottom: 20px; + padding: 30px 50px; + } + + .wea-search-group:first-child { + margin-bottom: 16px; + } + + .wea-search-group { + background: #FFF; + padding: 0; + border: 1px solid #e5e5e5; + border-bottom: none; + } + + .wea-content, .wea-form-cell { + padding: 0; + } + + .wea-form-item { + padding: 5px 16px; + border-bottom: 1px solid #e5e5e5; + } + + .wea-select, .ant-select { + width: 100%; + } + + .ant-select-selection { + width: 100%; + height: 30px; + border-radius: 0; + } +} diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js new file mode 100644 index 00000000..cceb5f89 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js @@ -0,0 +1,220 @@ +/* + * Author: 黎永顺 + * name: 薪资档案-调薪 + * Description: + * Date: 2023/9/4 + */ +import React, { Component } from "react"; +import { WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaTableEdit, WeaTools } from "ecCom"; +import { Button, message, Spin } from "antd"; +import { + editSingleSalaryItem, + getSalaryItemAdjustBeforeValue, + getSalaryItemForm, + getSingleSalaryItemInfo, + saveSalaryItem +} from "../../apis/archive"; +import { inject, observer } from "mobx-react"; +import { adjCondition } from "./columns"; +import { getDomkes, getSearchs } from "../../util"; +import moment from "moment"; + +const { getLabel } = WeaLocaleProvider; +const getKey = WeaTools.getKey; +const APIFox = { + save: saveSalaryItem, + edit: editSingleSalaryItem, + saveForm: getSalaryItemForm, + editForm: getSingleSalaryItemInfo +}; + +@inject("salaryFileStore") +@observer +class SalaryArchiveEditAdjLogRecordDialog extends Component { + constructor(props) { + super(props); + this.state = { + conditions: [], loading: false, saveLoading: false, + salaryArchiveItemDetail: {}, canOperator: false + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + const { id, visible, salaryFileStore: { adjForm, initAdjForm } } = nextProps; + if (nextProps.visible !== this.props.visible && visible) { + this.getSingleSalaryItemInfo(nextProps); + } else { + adjForm.resetForm(); + initAdjForm(); + } + } + + getSingleSalaryItemInfo = (props) => { + const { salaryFileStore: { adjForm }, id, salaryArchiveId: salaryArchiveItemId } = props; + this.setState({ loading: true }); + APIFox[id ? "editForm" : "saveForm"](id ? { id } : { salaryArchiveItemId }) + .then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { salaryArchiveItemForm, salaryArchiveItemDetail, canOperator } = data; + const { adjustReasonList } = salaryArchiveItemForm; + this.setState({ + canOperator, salaryArchiveItemDetail, + conditions: _.map(adjCondition, item => { + return { + ...item, + title: getLabel(111, "调薪信息"), + items: _.map(item.items, o => { + if (getKey(o) === "adjustReason") { + return { + ...o, + options: _.map(adjustReasonList, it => ({ key: it.id, showname: it.content })) + }; + } + return { ...o }; + }) + }; + }) + }, () => { + adjForm.initFormFields(this.state.conditions); + _.map(getDomkes(this.state.conditions), domkey => { + adjForm.updateFields({ + [domkey]: salaryArchiveItemForm[domkey] || "" + }); + }); + }); + } + }).catch(() => this.setState({ loading: false })); + }; + getSalaryItemAdjustBeforeValue = (salaryItemId) => { + const payload = { + salaryArchiveId: this.props.salaryArchiveId, + salaryItemId + }; + getSalaryItemAdjustBeforeValue(payload).then(({ status, data }) => { + if (status) { + const { salaryArchiveItemDetail } = this.state; + const { list } = salaryArchiveItemDetail; + this.setState({ + salaryArchiveItemDetail: { + ...salaryArchiveItemDetail, + list: _.map(list, o => { + if (o.salaryItem === salaryItemId) { + return { ...o, salaryBefore: data }; + } + return { ...o }; + }) + } + }); + } + }); + }; + save = () => { + const { salaryFileStore: { adjForm, fetchSingleSalaryItemList, getArchiveForm } } = this.props; + const { pass } = this.tableEdit.refs.edit.doRequiredCheck(); + adjForm.validateForm().then(f => { + if (f.isValid) { + if (!pass) return; + const { salaryArchiveId, id: salaryArchiveItemId } = this.props; + const { salaryArchiveItemDetail, canOperator } = this.state; + const { list } = salaryArchiveItemDetail; + let payload = { + ...adjForm.getFormParams(), salaryArchiveId, + effectiveTime: moment(adjForm.getFormParams().effectiveTime).format("YYYY-MM-DD"), + salaryArchiveItems: _.map(list, o => ({ salaryItemId: o.salaryItem, adjustValue: o.adjustAfter })) + }; + if (salaryArchiveItemId) { + payload = { ...payload, canOperator, salaryArchiveItemId }; + } + this.setState({ saveLoading: true }); + APIFox[salaryArchiveItemId ? "edit" : "save"](payload).then(({ status, errormsg }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success(getLabel(22619, "保存成功!")); + this.props.onCancel(); + fetchSingleSalaryItemList({ salaryArchiveId }); + getArchiveForm(salaryArchiveId); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ saveLoading: false })); + } else { + f.showErrors(); + } + }); + }; + + render() { + const { salaryFileStore: { adjForm }, id } = this.props; + const { loading, saveLoading, salaryArchiveItemDetail, conditions } = this.state; + const { salaryItemList, list } = salaryArchiveItemDetail; + const adjColumns = [ + { + title: "薪资项目", + dataIndex: "salaryItem", + key: "salaryItem", + com: [{ + options: _.map(salaryItemList, o => ({ key: o.id, showname: o.content })), + type: "SELECT", viewAttr: id ? 1 : 3, key: "salaryItem", + onChange: (v) => this.getSalaryItemAdjustBeforeValue(v) + }], + colSpan: 1, + width: "40%" + }, + { + title: getLabel(111, "调整前"), + dataIndex: "salaryBefore", + key: "salaryBefore", + com: [{ label: "", type: "INPUT", viewAttr: 1, key: "salaryBefore" }], + colSpan: 1, + width: "30%" + }, + { + title: getLabel(111, "调整后"), + dataIndex: "adjustAfter", + key: "adjustAfter", + com: [{ label: "", type: "INPUTNUMBER", precision: 3, viewAttr: 3, key: "adjustAfter" }], + colSpan: 1, + width: "30%" + } + ]; + return ( + {getLabel(537558, "保存")}]} + > +
+ { + !loading ? + {getSearchs(adjForm, conditions, 1)} + + this.tableEdit = dom} deleteConfirm + columns={adjColumns} datas={list} showCopy={false} + onChange={o => this.setState({ + salaryArchiveItemDetail: { + ...salaryArchiveItemDetail, list: o + } + })} + /> + + :
+ } +
+
+ ); + } +} + +export default SalaryArchiveEditAdjLogRecordDialog; diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js index 49d82cd8..410e4a6d 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js @@ -1,10 +1,11 @@ import React from "react"; import { Menu, message, Modal, Popover } from "antd"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; import { inject, observer } from "mobx-react"; -import ChangeSalaryModal from "./changeSalaryModal"; import { deleteSalaryItem } from "../../apis/archive"; -import UnifiedTable from "../../components/UnifiedTable"; +import SalaryArchiveEditAdjLogRecord from "./salaryArchiveEditAdjLogRecord"; +const { getLabel } = WeaLocaleProvider; @inject("salaryFileStore") @observer export default class SalaryItemChangeList extends React.Component { @@ -12,6 +13,9 @@ export default class SalaryItemChangeList extends React.Component { super(props); this.state = { changeSalaryVisible: false, + adjLogRecordDialog: { + visible: false, title: "", id: "", salaryArchiveId: "" + }, recordId: "" }; this.searchParams = {}; @@ -25,11 +29,11 @@ export default class SalaryItemChangeList extends React.Component { handleEdit = (record) => { this.setState({ - recordId: record.id - }, () => { - this.setState({ - changeSalaryVisible: true - }); + adjLogRecordDialog: { + ...this.state.adjLogRecordDialog, + visible: true, title: getLabel(542686, "调薪"), id: record.id, + salaryArchiveId: this.props.id + } }); }; deleteSalaryItem = (salaryArchiveItemId) => { @@ -58,11 +62,30 @@ export default class SalaryItemChangeList extends React.Component { const { salaryFileStore: { singleSalaryItemList }, selectedKey } = this.props; let columns = []; if (singleSalaryItemList.columns) { - columns = [...singleSalaryItemList.columns]; + columns = _.map([...singleSalaryItemList.columns], o => { + const { dataIndex } = o; + if (dataIndex === "adjustItem") { + return { ...o, width: 100, fixed: "left", render: text => ({text}) }; + } + let width = ""; + switch (o) { + case "adjustBefore": + case "adjustAfter": + case "operateTime": + width = "20%"; + break; + case "effectiveTime": + width = "15%"; + break; + default: + width = "10%"; + break; + } + return { ...o, width, render: text => ({text}) }; + }); if (selectedKey === "fixed") { columns = [...columns, { - dataIndex: "operate", - title: "操作", + dataIndex: "operate", fixed: "right", width: 120, title: "操作", render: (text, record) => { return
this.handleEdit(record)}>编辑 @@ -90,45 +113,29 @@ export default class SalaryItemChangeList extends React.Component { } render() { - const { salaryFileStore } = this.props; + const { salaryFileStore } = this.props, { adjLogRecordDialog } = this.state; const { singleSalaryItemList } = salaryFileStore; + const pageInfo = { current: singleSalaryItemList.pageNum, pageSize: 10, total: singleSalaryItemList.total }; + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + onChange: current => this.handlePageChange(current) + }; return (
- { - if (item.dataIndex !== "operate") { - return { - ...item, - render: (text) => { - return {text}; - } - }; - } - return { ...item }; - }) - } - dataSource={singleSalaryItemList.list ? singleSalaryItemList.list : []} - pagination={{ - onChange: (value) => { - this.handlePageChange(value); - }, - total: singleSalaryItemList.total, - showTotal: (total) => `共 ${total} 条`, - current: singleSalaryItemList.pageNum - }} - xWidth={this.getColumns().length * 100} + + this.setState({ + adjLogRecordDialog: { + adjLogRecordDialog, visible: false, title: "", id: "", salaryArchiveId: "" + } + })} /> - { - this.state.changeSalaryVisible && { - this.setState({ changeSalaryVisible: false }); - }} - /> - }
); } diff --git a/pc4mobx/hrmSalary/stores/salaryFile.js b/pc4mobx/hrmSalary/stores/salaryFile.js index a0e213c7..de262e8f 100644 --- a/pc4mobx/hrmSalary/stores/salaryFile.js +++ b/pc4mobx/hrmSalary/stores/salaryFile.js @@ -9,6 +9,9 @@ import { notNull } from "../util/validate"; const { TableStore } = WeaTableNew; export class salaryFileStore { + @observable adjForm = new WeaForm(); // 调薪form + + @observable tableStore = new TableStore(); // new table @observable form = new WeaForm(); // nrew 一个form @observable condition = []; // 存储后台得到的form数据 @@ -41,6 +44,8 @@ export class salaryFileStore { setSalaryIncreaseUrl = data => (this.salaryIncreaseUrl = data); @action("设置薪资档案项") setAdjustSalaryItems = data => (this.adjustSalaryItems = data); + @action("调薪初始化form") + initAdjForm = () => (this.adjForm = new WeaForm()); // ** 设置导入参数 start ** @action setPreviewDataSource = (previewDataSource) => { diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index 702a281b..6e864a59 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -106,3 +106,6 @@ export const format_with_regex = (number) => { }); }; +export const getDomkes = (conditions) => { + return _.map(conditions[0].items, it => it.domkey[0]); +}; From bc3632e0542967c4450d42a9dab8a51488fff39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 4 Sep 2023 18:13:19 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E5=8F=91=E8=96=AA=E5=91=98=E5=B7=A5=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E8=96=AA=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salaryFile/salaryArchiveEditAdjLogRecord.js | 7 ++++--- .../pages/salaryFile/salaryItemChangeList.js | 12 +++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js index cceb5f89..a1656d53 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js @@ -120,7 +120,7 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { const { list } = salaryArchiveItemDetail; let payload = { ...adjForm.getFormParams(), salaryArchiveId, - effectiveTime: moment(adjForm.getFormParams().effectiveTime).format("YYYY-MM-DD"), + effectiveTime: moment(new Date(adjForm.getFormParams().effectiveTime)).format("YYYY-MM-DD"), salaryArchiveItems: _.map(list, o => ({ salaryItemId: o.salaryItem, adjustValue: o.adjustAfter })) }; if (salaryArchiveItemId) { @@ -173,7 +173,7 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { title: getLabel(111, "调整后"), dataIndex: "adjustAfter", key: "adjustAfter", - com: [{ label: "", type: "INPUTNUMBER", precision: 3, viewAttr: 3, key: "adjustAfter" }], + com: [{ label: "", type: "INPUTNUMBER", otherParams: { precision: 3 }, viewAttr: 3, key: "adjustAfter" }], colSpan: 1, width: "30%" } @@ -184,7 +184,7 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { scalable hasScroll className="declareResultDialog" initLoadCss style={{ width: 800, - height: 606.6, + height: 406.6, minHeight: 200, minWidth: 380, maxHeight: "80%", @@ -202,6 +202,7 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { this.tableEdit = dom} deleteConfirm columns={adjColumns} datas={list} showCopy={false} + showAdd={!id} showDelete={!id} onChange={o => this.setState({ salaryArchiveItemDetail: { ...salaryArchiveItemDetail, list: o diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js index 410e4a6d..21b8042a 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js @@ -1,5 +1,5 @@ import React from "react"; -import { Menu, message, Modal, Popover } from "antd"; +import { message, Modal } from "antd"; import { WeaLocaleProvider, WeaTable } from "ecCom"; import { inject, observer } from "mobx-react"; import { deleteSalaryItem } from "../../apis/archive"; @@ -89,14 +89,8 @@ export default class SalaryItemChangeList extends React.Component { render: (text, record) => { return
this.handleEdit(record)}>编辑 - this.deleteSalaryItem(record.id)}> - 删除 - } title=""> - - + this.deleteSalaryItem(record.id)}>{getLabel(535052, "删除")}
; } }]; From ce462fe51a1792fd00cd1823396db5efc65d093a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 6 Sep 2023 14:27:23 +0800 Subject: [PATCH 06/14] hotfix/2.9.42308.02 --- .../pages/salaryItem/salaryItemForm.js | 3 ++- pc4mobx/hrmSalary/stores/calculate.js | 5 +++-- pc4mobx/hrmSalary/util/index.js | 21 +++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 16a8a099..bf80c8f8 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -36,7 +36,6 @@ class SalaryItemForm extends Component { const { key } = item; switch (key) { case "useDefault": - case "sortedIndex": case "dataType": case "description": return { @@ -44,6 +43,8 @@ class SalaryItemForm extends Component { viewAttr: (!isLedger && ((editable && record.canEdit) || isAdd)) ? 2 : 1, display: !isLedger }; + case "sortedIndex": + return { ...item }; case "useInEmployeeSalary": return { ...item, diff --git a/pc4mobx/hrmSalary/stores/calculate.js b/pc4mobx/hrmSalary/stores/calculate.js index f842d9f0..5b270ddf 100644 --- a/pc4mobx/hrmSalary/stores/calculate.js +++ b/pc4mobx/hrmSalary/stores/calculate.js @@ -3,6 +3,7 @@ import { message } from "antd"; import { WeaForm, WeaTableNew } from "comsMobx"; import * as API from "../apis/calculate"; +import { toDecimal_n } from "../util"; const { TableStore } = WeaTableNew; @@ -492,7 +493,7 @@ export class calculateStore { ..._.map(cur.salaryItems, it => { return { salaryItemId: it.salaryItemId, - resultValue: it.resultValue + resultValue: (it.dataType === "number" && !!it.resultValue) ? toDecimal_n(it.resultValue, it.pattern || 2) : it.resultValue }; }) ]; @@ -501,7 +502,7 @@ export class calculateStore { const issuedAndReissueItems = this.acctresultDetailForm.issuedAndReissueItems.map(item => { let record = {}; record.salaryItemId = item.salaryItemId; - record.resultValue = item.resultValue; + record.resultValue = (item.dataType === "number" && !!item.resultValue) ? toDecimal_n(item.resultValue, item.pattern || 2) : item.resultValue; return record; }); diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index 6e864a59..a3cc81bf 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -109,3 +109,24 @@ export const format_with_regex = (number) => { export const getDomkes = (conditions) => { return _.map(conditions[0].items, it => it.domkey[0]); }; + +export const padding0 = (num, length) => { + for (let len = ("" + num).length; len < length; len++) { + num = "0" + num; + } + return "0." + num; +}; +export const toDecimal_n = (x, num) => { + if (isNaN(parseFloat(x))) return false; + let f = Math.round(x * 100) / 100; + let s = f.toString(); + let rs = s.indexOf("."); + if (rs < 0) { + rs = s.length; + s += "."; + } + while (s.length <= rs + num) { + s += "0"; + } + return s; +}; From 8da781193a1227842d3561db7cb69df38393ceae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 8 Sep 2023 13:53:11 +0800 Subject: [PATCH 07/14] hotfix/2.9.42308.02 --- pc4mobx/hrmSalary/pages/mobilePayroll/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 8116c06a..dc72e97c 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -93,7 +93,7 @@ export default class MobilePayroll extends React.Component { const params = this.getUrlkey(); const payload = { salaryInfoId, - ..._.omit(params, ["id", "_key", "type"]) + ..._.pick(params, ["recipient"]) }; getMySalaryBill(payload).then(result => { this.setState({ From 5ce2f5bf3148c315debc64d9bc02c7ab834a7588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 12 Sep 2023 11:14:51 +0800 Subject: [PATCH 08/14] hotfix/2.9.42308.02 --- .../standingBookDetail/components/normal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index 4a2b5783..2fe404a5 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -235,7 +235,7 @@ export default class NormalIndex extends Component { }; getNormalList = async (payload = {}) => { const { getNormalList } = this.props.standingBookStore; - getNormalList({ ...payload }).then(({ list, columns = [], total }) => { + getNormalList({ ...payload, pageSize: this.state.pageSize }).then(({ list, columns = [], total }) => { this.setState({ tableData: { list, total, columns } }, () => this.postMessageToChild()); @@ -244,7 +244,7 @@ export default class NormalIndex extends Component { getSupplementaryList = async (payload = {}) => { const { getSupplementaryList } = this.props.standingBookStore; getSupplementaryList({ - ...payload + ...payload, pageSize: this.state.pageSize }).then(({ list, columns = [], total }) => { this.setState({ tableData: { list, columns, total } From 2b282b42113ae39f957d943eef48091ddde75cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 14 Sep 2023 10:37:39 +0800 Subject: [PATCH 09/14] hotfix/2.9.42309.01 --- .../pages/ledgerPage/components/ledgerAssociatedPersonnel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index 8b7af5a4..c8bb5f25 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -330,7 +330,7 @@ class LedgerAssociatedPersonnel extends Component { this.personalScopeTableRef.getPersonalScopeList()} onCancel={() => From f18bda74f4e6f75ff4fa7ffe7cd4c431de0f371f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 14 Sep 2023 11:50:22 +0800 Subject: [PATCH 10/14] hotfix/2.9.42309.01 --- .../components/PersonalScopeModal/index.js | 103 ++++++++++++------ .../components/ledgerAssociatedPersonnel.js | 2 +- 2 files changed, 71 insertions(+), 34 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 1668de36..079190f8 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -8,6 +8,7 @@ import React, { Component } from "react"; import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom"; import { Button, message, Modal } from "antd"; import { getTaxAgentRangeForm } from "../../apis/taxAgent"; +import { commonEnumList } from "../../apis/ruleconfig"; import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee"; import "./index.less"; @@ -31,41 +32,77 @@ class PersonalScopeModal extends Component { if (isTaxgent) { this.getTaxAgentRangeForm(); } else { - 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 }); + 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 }); } } + commonEnumList = () => { + commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }).then(({ status, data }) => { + if (status) { + 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: _.map(_.filter(data, o => o.value !== 7), it => ({ + key: it.value.toString(), + showname: it.defaultLabel + })) + }); + } + }); + }; getTaxAgentRangeForm = () => { getTaxAgentRangeForm().then(({ status, data }) => { if (status) { @@ -91,7 +128,7 @@ class PersonalScopeModal extends Component { employeeStatus: status.split(","), includeType, targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })), - [saveKeyVal["key"]]: saveKeyVal["value"], + [saveKeyVal["key"]]: saveKeyVal["value"] }; this.setState({ loading: true }); APISaveFox["save"](payload).then(({ status, errormsg }) => { diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index c8bb5f25..8b7af5a4 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -330,7 +330,7 @@ class LedgerAssociatedPersonnel extends Component { this.personalScopeTableRef.getPersonalScopeList()} onCancel={() => From 85867da080721affc4e194e744e71c7380125fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 14 Sep 2023 14:19:08 +0800 Subject: [PATCH 11/14] hotfix/2.9.42309.01 --- pc4mobx/hrmSalary/components/PersonalScopeModal/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 079190f8..b6fd6ffb 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -95,10 +95,7 @@ class PersonalScopeModal extends Component { ]; this.setState({ targetTypeList, - employeeStatus: _.map(_.filter(data, o => o.value !== 7), it => ({ - key: it.value.toString(), - showname: it.defaultLabel - })) + employeeStatus: _.map(_.filter(data, o => o.value !== 7), it => ({ key: it.enum, showname: it.defaultLabel })) }); } }); From a58da11dc339be3dc80da46c1b9cb8db31a0d6a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 20 Sep 2023 14:20:51 +0800 Subject: [PATCH 12/14] hotfix/2.9.42309.01 20230920 --- .../payroll/templatePreview/computerTemplate/index.js | 2 +- .../pages/payroll/templatePreview/phoneTemplate/index.js | 2 +- .../pages/payrollFiles/components/allWithoutPay.js | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js index 8bcb6aa8..aeb6db18 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js @@ -94,7 +94,7 @@ export default class ComputerTemplate extends React.Component {
{ salaryItemSet.length > 0 && - salaryItemSet.map((group, index) => { + _.filter(salaryItemSet, it => (!_.isNil(it) && !_.isEmpty(it))).map((group, index) => { return
{group.groupName}
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js index 01730ef7..67c1ebef 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js @@ -75,7 +75,7 @@ export default class PhoneTemplate extends React.Component {
{ salaryItemSet.length > 0 && - salaryItemSet.map((group, index) => ( + _.filter(salaryItemSet, it => (!_.isNil(it) && !_.isEmpty(it))).map((group, index) => (
{group.groupName}
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js index c9d85ff8..5b2ca302 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js @@ -11,15 +11,16 @@ class AllWithoutPay extends Component { message.warning("未选择条目"); return; } - API.gotoStop(selectedRowKeys).then(({ status, errormsg }) => { + API.gotoStop(selectedRowKeys).then(({ status, data, errormsg }) => { if (status) { - message.success("操作成功!"); + const { msg } = data; + message.info(msg || "操作成功!"); refreshList(); } else { message.error(errormsg || "操作失败!"); } }); - }else{ + } else { const { pageInfo } = this.props; if (pageInfo.total === 0) { message.warning("您没有需要处理的待停薪人员!"); @@ -31,7 +32,7 @@ class AllWithoutPay extends Component { onOk: () => { API.allGotoStop({}).then(({ status, data, errormsg }) => { if (status) { - const { msg }= data; + const { msg } = data; message.info(msg || "操作成功!"); refreshList(); } else { From b22b41382f4ba8339eb93a0b6345fab079a261a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 20 Sep 2023 16:51:00 +0800 Subject: [PATCH 13/14] =?UTF-8?q?hotfix/2.9.42309.01=2020230920-=E7=A4=BE?= =?UTF-8?q?=E4=BF=9D=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../programme/columns.js | 141 +++++------------- .../programme/defaultSlideForm.js | 5 + .../socialSecurityBenefits/programme/index.js | 123 +++++++++------ pc4mobx/hrmSalary/stores/programme.js | 30 ++-- 4 files changed, 130 insertions(+), 169 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js index 5acd68bf..b20698b6 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js @@ -1,114 +1,10 @@ -// 社保 -export const socialSecurityColumns = [{ - title: "方案名称", - dataIndex: "title", - key: "title" -}, { - title: "缴纳类型", - dataIndex: "username", - key: "username" -}, { - title: "缴纳范围", - dataIndex: "projectName", - key: "projectName" -}, { - title: "备注", - dataIndex: "customer", - key: "customer" -}, { - title: "操作", - dataIndex: "customer", - key: "customer" -}]; - -// 公积金 -export const accumulationFundColumns = [{ - title: "方案名称", - dataIndex: "title", - key: "title" -}, { - title: "缴纳类型", - dataIndex: "username", - key: "username" -}, { - title: "缴纳范围", - dataIndex: "projectName", - key: "projectName" -}, { - title: "备注", - dataIndex: "customer", - key: "customer" -}, { - title: "操作", - dataIndex: "customer", - key: "customer" -}]; - -// 企业年金及其他福利 -export const otherBenefitsColumns = [ - { - title: "方案名称", - dataIndex: "title", - key: "title" - - }, - { - title: "缴纳类型", - dataIndex: "title", - key: "title" - }, - { - title: "缴纳范围", - dataIndex: "title", - key: "title" - }, - { - title: "备注", - dataIndex: "title", - key: "title" - }, - { - title: "操作", - dataIndex: "title", - key: "title" - } -]; - -export const CustomBenefitsColumns = [ - { - title: "福利名称", - dataIndex: "title", - key: "title" - }, - { - title: "启用", - dataIndex: "title", - key: "title" - }, - { - title: "类型", - dataIndex: "title", - key: "title" - }, - { - title: "缴纳对象", - dataIndex: "title", - key: "title" - }, - { - title: "操作", - dataIndex: "title", - key: "title" - } -]; - export const insertUpdateColumns = [ { title: "类型名称", dataIndex: "insuranceName", key: "insuranceName", width: 120, - fixed: 'left' + fixed: "left" }, { title: "是否缴费", @@ -172,8 +68,39 @@ export const insertUpdateColumns = [ } ]; - -export const dataSource = []; +export const conditons = [ + { + items: [ + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["schemeName"], + fieldcol: 12, + isQuickSearch: true, + label: "方案名称", + lanId: 33162, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "SELECT", + domkey: ["paymentType"], + fieldcol: 12, + isQuickSearch: true, + label: "缴纳类型", + lanId: 543163, + labelcol: 6, + value: "", + options: [], + viewAttr: 2 + } + ], + title: "", + defaultshow: true + } +]; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js index fabf6a86..e7c215c2 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js @@ -141,6 +141,11 @@ export default class DefaultSlideForm extends React.Component { key: "2", selected: true, showname: "2" + }, + { + key: "3", + selected: false, + showname: "3" } ]; item.render = (text, record) => { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index 1181f8a0..8ef780b3 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -2,9 +2,8 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { Button, Dropdown, Menu, message, Modal } from "antd"; -import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; -import { renderNoright } from "../../../util"; -import CustomTab from "../../../components/customTab"; +import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTab, WeaTools, WeaTop } from "ecCom"; +import { getSearchs, renderNoright } from "../../../util"; import SlideModalTitle from "../../../components/slideModalTitle"; import TipLabel from "../../../components/TipLabel"; import DefaultSlideForm from "./defaultSlideForm"; @@ -14,8 +13,10 @@ import CustomPaginationTable from "../../../components/customPaginationTable"; import TwoColContent from "../../../components/twoColContent"; import CopySchemaModal from "./copySchemaModal"; import CustomBenefitsTable from "./customBenefitsTable"; +import { conditons } from "./columns"; import "./index.less"; +const getKey = WeaTools.getKey; const { getLabel } = WeaLocaleProvider; @inject("programmeStore", "taxAgentStore", "salaryFileStore") @observer @@ -30,7 +31,8 @@ export default class Programme extends React.Component { copyModalValue: "", copyId: "", customNewVisible: false, - customEdit: false + customEdit: false, + showSearchAd: false }; this.pageInfo = { current: 1, pageSize: 10 }; @@ -38,12 +40,29 @@ export default class Programme extends React.Component { componentWillMount() { const { programmeStore, salaryFileStore, taxAgentStore } = this.props; - const { doInit } = programmeStore; + const { doInit, planSearchForm } = programmeStore; doInit(); const { commonEnumList } = salaryFileStore; commonEnumList("user", { enumClass: "com.engine.salary.enums.sicategory.SharedTypeEnum" }); const { getTaxAgentSelectListAsAdmin } = taxAgentStore; getTaxAgentSelectListAsAdmin(); + planSearchForm.initFormFields(_.map(conditons, item => { + return { + ...item, + items: _.map(item.items, o => { + if (getKey(o) === "paymentType") { + return { + ...o, + options: [ + { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") }, + { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") } + ] + }; + } + return { ...o }; + }) + }; + })); } // 增加编辑功能,重写columns绑定事件 @@ -173,6 +192,7 @@ export default class Programme extends React.Component { } render() { + const { showSearchAd } = this.state; const { programmeStore, taxAgentStore: { showOperateBtn } } = this.props; const { loading, hasRight, form, getTableDatas } = programmeStore; const { @@ -187,7 +207,8 @@ export default class Programme extends React.Component { customNewVisible, tableDataSource, tableColumns, - tablePageInfo + tablePageInfo, + planSearchForm } = programmeStore; if (!hasRight && !loading) return renderNoright(); @@ -317,59 +338,65 @@ export default class Programme extends React.Component { const { programmeStore: { initSlideParms } } = this.props; initSlideParms(); }; - + const customButtons = [ + { + setCustomSelectkey(v); + this.customBenefitsTableRef.getCustomCategoryList({ current: 1, welfareTypeEnum: v }); + }} + /> + ]; + const tabButtons = [ + + ]; return (
} // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 + title="社保福利方案" icon={} + iconBgcolor="#F14A2D" showDropIcon={false} > - - {/* 操作按钮权限 */} - {showOperateBtn && - } - - {selectedKey == "custom" && - { - setCustomSelectkey(v); - this.customBenefitsTableRef.getCustomCategoryList({ current: 1, welfareTypeEnum: v }); - }} - />} -
- } + this.setState({ showSearchAd: bool })} + advanceHeight={200} searchsAd={getSearchs(planSearchForm, _.map(conditons, item => { + return { + ...item, + items: _.map(item.items, o => { + if (getKey(o) === "paymentType") { + return { + ...o, + options: [ + { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") }, + { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") } + ] + }; + } + return { ...o }; + }) + }; + }), 2, false)} + onAdSearch={() => getTableDatas(selectedKey)} + onAdReset={v => planSearchForm.resetForm()} + onSearch={() => getTableDatas(selectedKey)} onChange={v => { setSelectedKey(v); handleSlideClose(); - if (v == "custom") { - // 自定义福利 - } else { - getTableDatas(v); - } + v !== "custom" && getTableDatas(v); }} + onSearchChange={v => planSearchForm.updateFields({ schemeName: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 + searchsBaseValue={planSearchForm.getFormParams().schemeName} + buttons={!showOperateBtn ? [] : selectedKey !== "custom" ? tabButtons : [...tabButtons, ...customButtons]} />
- {selectedKey == "custom" + {selectedKey === "custom" ? { this.loading = true; - const formParams = this.form.getFormParams() || {}; - params = params || formParams; - params.welfareTypeEnum = selectKey; - API.getTable(params).then(action(res => { - if (res.status) { // 接口请求成功/失败处理 - // this.tableStore.getDatas(res.data.datas); // table 请求数据 - this.tableDataSource = res.data.list ? res.data.list : []; - this.tableColumns = res.data.columns; - this.tablePageInfo = res.data; - } else { - message.error(res.errormsg || "接口调用失败!"); - } - this.loading = false; - })); + API.getTable({ ...params, ...this.planSearchForm.getFormParams(), welfareTypeEnum: selectKey }) + .then(action(res => { + if (res.status) { // 接口请求成功/失败处理 + // this.tableStore.getDatas(res.data.datas); // table 请求数据 + this.tableDataSource = res.data.list ? res.data.list : []; + this.tableColumns = res.data.columns; + this.tablePageInfo = res.data; + } else { + message.error(res.errormsg || "接口调用失败!"); + } + this.loading = false; + })); }; From 26fdf624bbc82e1b6db5f48401a83897011df6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 20 Sep 2023 17:25:56 +0800 Subject: [PATCH 14/14] hotfix/2.9.42309.01 --- .../standingBookDetail/components/adjustmentSlide.js | 2 +- .../standingBookDetail/components/index.less | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js index 90fe32b1..2fb3f37c 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js @@ -73,7 +73,7 @@ class AdjustmentSlide extends Component { const { data: dataMsg, errorMessage = [] } = data; const msg = dataMsg + errorMessage.join(","); !_.isEmpty(errorMessage) ? message.error(msg) : message.success(msg || "保存成功"); - _.isEmpty(errorMessage) && + // _.isEmpty(errorMessage) && this.adjustTableRef.getCompensationList().then(r => { }); } else { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less index 7bb28208..0481abfb 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less @@ -4,10 +4,6 @@ height: 100%; background: #f6f6f6; - .wea-new-top-req-wapper .wea-new-top-req-main { - background: #f6f6f6 !important; - } - .wea-new-top-req-wapper .wea-new-top-req { z-index: 0 !important; }