From 5f893b1eb040364950670cd82e5819714a6fb9bf Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Mon, 9 Dec 2024 17:37:44 +0800 Subject: [PATCH 01/13] release/2.18.1.2412.01 --- pc4mobx/hrmSalary/apis/calculate.js | 4 +- .../standingBook/standingBook.js | 55 ++++++++++--------- .../standingBookDetail/components/normal.js | 2 +- 3 files changed, 31 insertions(+), 30 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 8e4a2d5e..fbc8abb9 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -218,8 +218,8 @@ export const exportComparisonResult = (salaryAcctRecordId) => { }; // 核算进度条 -export const getCalculateProgress = (id) => { - return WeaTools.callApi("/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_" + id, "get", {}); +export const getCalculateProgress = (id = "", paymentOrganization = "") => { + return WeaTools.callApi(`/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_${id}_${paymentOrganization}`, "get", {}); }; // 核算进度条 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js index 80083d56..55e0bc78 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js @@ -60,36 +60,37 @@ class StandingBook extends Component { progressVisible: true }, () => { this.timer = setInterval(() => { - getCalculateProgress(moment(billMonth).format("YYYY-MM")).then(({ status, data }) => { - if (status) { - if (!data.status) { - clearInterval(this.timer); - this.setState({ progressVisible: false, progress: 0 }); - message.error(data.message); - return; - } - if (this.state.progress !== 100) { - this.setState({ - progress: (Number(data.progress).toFixed(2)) * 100 - }); + getCalculateProgress(moment(billMonth).format("YYYY-MM"), payload.paymentOrganization) + .then(({ status, data }) => { + if (status) { + if (!data.status) { + clearInterval(this.timer); + this.setState({ progressVisible: false, progress: 0 }); + message.error(data.message); + return; + } + if (this.state.progress !== 100) { + this.setState({ + progress: (Number(data.progress).toFixed(2)) * 100 + }); + } else { + clearInterval(this.timer); + this.setState({ progressVisible: false, progress: 0 }, () => { + message.success(getLabel(543232, "核算成功")); + this.setState({ + accountDialog: { ...this.state.accountDialog, visible: false } + }, () => { + this.wfListRef.wrappedInstance.getWelfareRecordList(); + const calcPayload = { ...payload, creator }; + window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(calcPayload)}`); + }); + }); + } } else { clearInterval(this.timer); - this.setState({ progressVisible: false, progress: 0 }, () => { - message.success(getLabel(543232, "核算成功")); - this.setState({ - accountDialog: { ...this.state.accountDialog, visible: false } - }, () => { - this.wfListRef.wrappedInstance.getWelfareRecordList(); - const calcPayload = { ...payload, creator }; - window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(calcPayload)}`); - }); - }); + this.setState({ progressVisible: false, progress: 0 }); } - } else { - clearInterval(this.timer); - this.setState({ progressVisible: false, progress: 0 }); - } - }).catch(() => { + }).catch(() => { clearInterval(this.timer); this.setState({ progressVisible: false, progress: 0 }); }); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index d7366471..aa2ea15d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -359,7 +359,7 @@ export default class NormalIndex extends Component { progressVisible: true }, () => { this.timer = setInterval(() => { - getCalculateProgress(billMonth).then(({ status, data }) => { + getCalculateProgress(billMonth, paymentOrganization).then(({ status, data }) => { if (status) { if (!data.status) { clearInterval(this.timer); From 3871eb276a0ad1fc41979ff3afe16757877086c6 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Mon, 9 Dec 2024 17:58:24 +0800 Subject: [PATCH 02/13] 1release/2.18.1.2412.01 --- .../components/ledgerSalaryItemAddModal.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js index f340fb3e..e0707394 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js @@ -116,12 +116,15 @@ export default class LedgerSalaryItemAddModal extends React.Component { showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => this.listSalaryItem()); + }, onChange: current => { this.setState({ pageInfo: { ...pageInfo, current } - }, () => { - this.listSalaryItem(); - }); + }, () => this.listSalaryItem()); } }; const rowSelection = { @@ -134,7 +137,11 @@ export default class LedgerSalaryItemAddModal extends React.Component { return ( 添加]} >
From 89b9e6110eb45fc5b5d6d6954f4b17539c655355 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Mon, 9 Dec 2024 18:01:05 +0800 Subject: [PATCH 03/13] release/2.18.1.2412.01 --- .../pages/ledgerPage/components/ledgerSalaryItemAddModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js index e0707394..663aff22 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js @@ -138,7 +138,7 @@ export default class LedgerSalaryItemAddModal extends React.Component { Date: Mon, 9 Dec 2024 18:14:41 +0800 Subject: [PATCH 04/13] release/2.18.1.2412.01 --- pc4mobx/hrmSalary/apis/calculate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index fbc8abb9..009a9bd8 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -219,7 +219,8 @@ export const exportComparisonResult = (salaryAcctRecordId) => { // 核算进度条 export const getCalculateProgress = (id = "", paymentOrganization = "") => { - return WeaTools.callApi(`/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_${id}_${paymentOrganization}`, "get", {}); + const extra= paymentOrganization ? `_${paymentOrganization}` : paymentOrganization + return WeaTools.callApi(`/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_${id}${extra}`, "get", {}); }; // 核算进度条 From 02a367befb1c9c004b7b4b0c2e555c4abde4aa14 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 10 Dec 2024 09:11:12 +0800 Subject: [PATCH 05/13] =?UTF-8?q?release/2.18.1.2412.01=20=E8=96=AA?= =?UTF-8?q?=E8=B5=84=E6=A0=B8=E7=AE=97=E8=BF=9B=E5=BA=A6=E6=9D=A1=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/calculate/doCalc/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index 602e48b5..4f4944c7 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -77,7 +77,8 @@ class Index extends Component { if (this.timer) clearInterval(this.timer); this.timer = setInterval(() => { getCalculateProgress(salaryAcctRecordId).then(({ data }) => { - if ((_.isNil(data) || data.progress === 1) && this.timer) { + let progress = data.progress; + if (progress === 1 && this.timer) { clearInterval(this.timer); this.timer = null; this.setState({ @@ -95,7 +96,7 @@ class Index extends Component { }); message.error(data.message); } - this.setState({ progress: Number(data.progress) * 100 }); + this.setState({ progress: Number(progress) * 100 }); }); }, 1000); }); From d2bd5befe70998b679ce7fea02feed22b3a6c395 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 10 Dec 2024 14:07:12 +0800 Subject: [PATCH 06/13] =?UTF-8?q?feature/2.15.2.2411.01=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/socialSecurityBenefits/standingBook/standingBook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js index a1ae06c7..be9cd463 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js @@ -79,7 +79,7 @@ class StandingBook extends Component { this.setState({ accountDialog: { ...this.state.accountDialog, visible: false } }, () => { - this.wfListRef.wrappedInstance.getWelfareRecordList(); + this.wfListRef.getWelfareRecordList(); const calcPayload = { ...payload, creator }; window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(calcPayload)}`); }); From d9844eed9bea223e330b89d7703992a1b03a88d7 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 11 Dec 2024 15:28:14 +0800 Subject: [PATCH 07/13] release/2.18.1.2412.01 --- .../pages/mySalaryMobile/components/payrollList/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js b/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js index 69bac121..78a2c045 100644 --- a/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js +++ b/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js @@ -28,7 +28,7 @@ class Index extends Component { {moment(it.sendTime).format("YYYY-MM")}
{`${getLabel(33564, "查看")}>`} From ef1c529941d23c3c9a9db99e44f7b8a6acc5a1c9 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 17 Dec 2024 16:03:52 +0800 Subject: [PATCH 08/13] release/2.18.1.2412.01 --- pc4mobx/hrmSalary/pages/ruleConfig/conditions.js | 16 ++++++++++++++++ pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js index 51759130..c5701013 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js @@ -152,6 +152,22 @@ export const conditions = [ lanId: 538004, defaultshow: true }, + { + items: [ + { + conditionType: "SWITCH", + domkey: ["ATTENDANCE_SERIAL_COLLECTION_BTN"], + fieldcol: 10, + label: "考勤引用是否采集班次数据", + lanId: 111, + labelcol: 8, + viewAttr: 2 + } + ], + title: "数据采集", + lanId: 111, + defaultshow: true + }, { items: [ { diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js index f84987cb..573bc864 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js @@ -153,6 +153,7 @@ class RuleConfig extends Component { case "APPROVAL_CAN_MANUAL_FILE_STATUS": case "APPROVAL_CAN_RE_CALC_STATUS": case "APPROVAL_CAN_EDIT_RESULT_STATUS": + case "ATTENDANCE_SERIAL_COLLECTION_BTN": if (!this.handleDebounce) { this.handleDebounce = _.debounce(() => { const confTitle = { @@ -169,7 +170,8 @@ class RuleConfig extends Component { SALARY_APPROVAL_STATUS: getLabel(111, "是否开启薪资审批"), APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"), APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"), - APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据") + APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据"), + ATTENDANCE_SERIAL_COLLECTION_BTN: getLabel(111, "考勤引用是否采集班次数据") }; this.unifiedSettings(key, confTitle[key]); this.handleDebounce = null; From cdd98ea6027c33157ae7a3799a5506bf57467720 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 20 Dec 2024 16:36:50 +0800 Subject: [PATCH 09/13] release/2.18.1.2412.01 --- .../ledgerPage/components/ledgerSalaryItem.js | 17 ++- .../components/ledgerSalaryItemAddModal.js | 103 +++++++----------- .../components/ledgerSalaryItemNormal.js | 13 ++- .../components/ledgerSalaryItemTable.js | 4 +- .../ledgerPage/components/ledgerSlide.js | 5 +- .../pages/salaryItem/systemSalaryItemModal.js | 4 +- 6 files changed, 64 insertions(+), 82 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js index 66134f24..934b777e 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js @@ -254,20 +254,19 @@ class LedgerSalaryItem extends Component { * Params: * Date: 2022/12/14 */ - handleAddSalaryItems = (id, items) => { + handleAddSalaryItems = (id, items, insertId) => { const { itemGroups } = this.state; this.setState({ itemGroups: _.map(itemGroups, it => { if (id === it.uuid) { + items = _.map(items, child => { + const { id: itemsId, ...extraItems } = child; + return { ...extraItems, salaryItemGroupId: it.uuid }; + }); + if (insertId) it.items.splice(_.findIndex(it.items, k => (k.id === insertId) || (k.key === insertId)) + 1, 0, ...items); return { - ...it, items: _.map([..._.map(items, child => { - const { id: itemsId, ...extraItems } = child; - return { ...extraItems, salaryItemGroupId: it.uuid }; - }), ...it.items], (childItem, childItemIndex) => { - return { - ...childItem, - sortedIndex: childItemIndex - }; + ...it, items: _.map(insertId ? it.items : [...items, ...it.items], (childItem, childItemIndex) => { + return { ...childItem, sortedIndex: childItemIndex }; }) }; } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js index 663aff22..7830fbe5 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js @@ -1,25 +1,15 @@ import React from "react"; -import { Button, Switch } from "antd"; -import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom"; +import { Button, Spin } from "antd"; +import { WeaCheckbox, WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaTable } from "ecCom"; import { listSalaryItem } from "../../../apis/ledger"; +const getLabel = WeaLocaleProvider.getLabel; export default class LedgerSalaryItemAddModal extends React.Component { constructor(props) { super(props); this.state = { - loading: { - query: false - }, - name: "", - selectedRowKeys: [], - dataSource: [], - dataSourceCopy: [], - columns: [], - pageInfo: { - current: 1, - pageSize: 10, - total: 0 - } + loading: { query: false }, name: "", selectedRowKeys: [], dataSource: [], + dataSourceCopy: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 } }; } @@ -42,12 +32,7 @@ export default class LedgerSalaryItemAddModal extends React.Component { excludeIds.push(i.salaryItemId); }); }); - const payload = { - excludeIds, - name, - ...pageInfo, - ...extra - }; + const payload = { excludeIds, name, ...pageInfo, ...extra }; this.setState({ loading: { ...loading, query: true } }); listSalaryItem(payload).then(({ status, data }) => { this.setState({ loading: { ...loading, query: false } }); @@ -56,9 +41,7 @@ export default class LedgerSalaryItemAddModal extends React.Component { const tmpV = !_.isEmpty(dataSource) ? dataSource : []; this.setState({ dataSourceCopy: [...dataSourceCopy, ...tmpV], - pageInfo: { ...pageInfo, current, pageSize, total }, - dataSource: tmpV, - columns + pageInfo: { ...pageInfo, current, pageSize, total }, dataSource: tmpV, columns }); } }).catch(() => { @@ -76,7 +59,7 @@ export default class LedgerSalaryItemAddModal extends React.Component { case "useDefault": case "hideDefault": case "useInEmployeeSalary": - return ; + return ; default: return
; } @@ -85,10 +68,9 @@ export default class LedgerSalaryItemAddModal extends React.Component { }); return newColumns; }; - handleAdd = () => { const { dataSourceCopy, selectedRowKeys } = this.state; - const { onAddSalaryItems, id, onCancel, itemGroups } = this.props; + const { onAddSalaryItems, id, onCancel, itemGroups, record } = this.props; const arrItems = _.find(itemGroups, it => it.uuid === id).items || []; let selectItems = []; _.uniqWith(dataSourceCopy, _.isEqual).map((item) => { @@ -104,12 +86,21 @@ export default class LedgerSalaryItemAddModal extends React.Component { }); }); onCancel(); - onAddSalaryItems(id, selectItems); + onAddSalaryItems(id, selectItems, record.id || record.key); + }; + renderTitle = () => { + const { name, pageInfo } = this.state; + return
+ {getLabel(111, "添加薪资项目")} + this.setState({ name: val })} style={{ width: 200 }} + placeholder={getLabel(111, "请输入薪资项目名称")} onSearch={() => this.setState({ + pageInfo: { ...pageInfo, current: 1 } + }, () => this.listSalaryItem())}/> +
; }; render() { - const { onCancel, visible } = this.props; - const { name, selectedRowKeys, pageInfo, dataSource, loading } = this.state; + const { selectedRowKeys, pageInfo, dataSource, loading } = this.state; const pagination = { ...pageInfo, showTotal: total => `共 ${total} 条`, @@ -117,49 +108,31 @@ export default class LedgerSalaryItemAddModal extends React.Component { showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], onShowSizeChange: (current, pageSize) => { - this.setState({ - pageInfo: { ...pageInfo, current, pageSize } - }, () => this.listSalaryItem()); + this.setState({ pageInfo: { ...pageInfo, current: 1, pageSize } }, () => this.listSalaryItem()); }, onChange: current => { - this.setState({ - pageInfo: { ...pageInfo, current } - }, () => this.listSalaryItem()); + this.setState({ pageInfo: { ...pageInfo, current } }, () => this.listSalaryItem()); } }; const rowSelection = { - selectedRowKeys, - onChange: (selectedRowKeys) => { - this.setState({ selectedRowKeys }, () => { - }); - } + selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }) }; return ( - 添加]} - > -
- this.setState({ name })} - onSearch={() => this.listSalaryItem({ current: 1 })} - /> + this.sysItemRef = dom} + title={this.renderTitle()} + buttons={[]} + style={{ + width: "60vw", height: 600, minHeight: 200, minWidth: 380, + maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" + }}> +
+ + record.id || record.key} rowSelection={rowSelection}/> +
- record.id || record.key} - rowSelection={rowSelection} - dataSource={dataSource} - pagination={pagination} - loading={loading.query} - columns={this.getSalaryItemAddColumns()} - />
); } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js index 1c176f06..82cbdfbf 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js @@ -22,7 +22,7 @@ class LedgerSalaryItemNormal extends Component { constructor(props) { super(props); this.state = { - addCategoryItemsVisible: false, + addCategoryItemsVisible: { visible: false, id: "", record: {} }, categoryModal: { visible: false, title: "新增分类", @@ -170,7 +170,11 @@ class LedgerSalaryItemNormal extends Component { onEditCategory={this.handleAddCategory} onDeleteCategory={this.handleDeleteCategory} onDeleteCategoryItems={this.handleDeleteCategoryItems} - onAddCategoryItems={(id) => this.setState({ addCategoryItemsVisible: { visible: true, id } })} + onAddCategoryItems={(id) => this.setState({ + addCategoryItemsVisible: { + ...addCategoryItemsVisible, visible: true, id + } + })} onUpgo={this.handleUpgo} onDowngo={this.handleDowngo} /> @@ -185,6 +189,9 @@ class LedgerSalaryItemNormal extends Component { onHandleItemhide={(data) => onHandleItemhide(field, data)} onChangeSelectedRowKeys={(data) => onChangeSelectedRowKeys(field, data)} onMoveTo={this.handleMoveTo} + onAddCategoryItems={(record) => this.setState({ + addCategoryItemsVisible: { visible: true, record, id: uuid } + })} /> ; }) @@ -198,7 +205,7 @@ class LedgerSalaryItemNormal extends Component { this.setState({ addCategoryItemsVisible: { visible: false, id: "" } })} + onCancel={() => this.setState({ addCategoryItemsVisible: { visible: false, id: "", record: {} } })} onAddSalaryItems={onAddSalaryItems} /> ( this.handleEditSalaryItem(record)} style={{ marginRight: 10 }}>编辑 + this.props.onAddCategoryItems(record)} + style={{ marginRight: 10 }}>{getLabel(111, "插入")} onMoveTo(record)}>移动到 ) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js index 2529bce9..c5ead666 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js @@ -86,7 +86,7 @@ class LedgerSlide extends Component { * Date: 2022/12/12 */ saveLedgerAdjustRule = () => { - const { adjustRules, saveSalarySobId } = this.state; + const { adjustRules, saveSalarySobId, salaryApprovalStatus } = this.state; const payload = { salarySobId: this.props.editId || saveSalarySobId, ruleParams: adjustRules @@ -96,6 +96,7 @@ class LedgerSlide extends Component { this.setState({ loading: false }); if (status) { message.success("保存成功"); + !salaryApprovalStatus && this.handleClose(); } else { message.success(errormsg || "保存失败"); } @@ -259,7 +260,7 @@ class LedgerSlide extends Component { , + onClick={() => this.setState({ current: !salaryApprovalStatus ? current : current + 1 }, () => this.saveLedgerAdjustRule())}>{!salaryApprovalStatus ? getLabel(111, "完成") : getLabel(111, "保存并进入下一步")} ], editBtns: [
; @@ -92,7 +92,7 @@ export default class SystemSalaryItemModal extends React.Component {
From c04cc1de7611ff5e5f7072a5c36eb6e201d96be6 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Mon, 23 Dec 2024 15:28:05 +0800 Subject: [PATCH 10/13] release/2.18.2.2412.02 --- .../welfareArchive/components/welfareEditArchiveSlide/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js index e2342e93..e00b4f83 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js @@ -116,7 +116,7 @@ class Index extends Component { } else if (getKey(g).indexOf("StartTime") !== -1) { return { ...g, label: getLabel(g.lanId, g.label), - viewAttr: (formData[o["typename"]][`${o.title}Name`] && showOperateBtn) ? 3 : g.viewAttr + viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : (formData[o["typename"]][`${o.title}Name`] && showOperateBtn) ? 3 : g.viewAttr }; } return { From cec22dc89f59a65969d12107e32b8e3965e59253 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 24 Dec 2024 15:41:15 +0800 Subject: [PATCH 11/13] release/2.18.2.2412.02 --- .../hrmSalary/components/FormInfo/index.js | 96 +++++++++++++++++++ .../pages/adjustSalaryManage/index.js | 4 +- 2 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 pc4mobx/hrmSalary/components/FormInfo/index.js diff --git a/pc4mobx/hrmSalary/components/FormInfo/index.js b/pc4mobx/hrmSalary/components/FormInfo/index.js new file mode 100644 index 00000000..5c14f828 --- /dev/null +++ b/pc4mobx/hrmSalary/components/FormInfo/index.js @@ -0,0 +1,96 @@ +import React, { Component } from "react"; +import { WeaCheckbox, WeaFormItem, WeaSearchGroup } from "ecCom"; +import { observer } from "mobx-react"; +import { WeaSwitch } from "comsMobx"; + +@observer +export default class FormInfo extends Component { + renderForm = () => { + const { + formFields, form, colCount, itemRender, onSelectedChangeHandle, + showLabel, multiColumn, custLabelCol, childrenComponents + } = this.props; + + let groupArr = []; + const formParams = form.getFormParams(); + const labelVisible = showLabel == null || showLabel == true; + const col = colCount ? colCount : 1; + const labelCol = labelVisible ? (custLabelCol || `${window.HrmEngineLabelCol}`) : 0; + const itemProps = { + ratio1to2: labelVisible && custLabelCol == null, + style: { marginLeft: 0 }, + tipPosition: "bottom", + labelCol: { span: labelCol }, + wrapperCol: { span: 24 - labelCol } + }; + const textAreaProps = { minRows: 4, maxRows: 4 }; + + formFields.map((fields, i) => { + let formItems = []; + fields.items.map((field, j) => { + const customerRender = itemRender != null ? itemRender[field.domkey[0]] : null; + const showCheckbox = field.checkbox || false; + let label = field.label; + if (showCheckbox) + label = { + field.checkboxValue = v === "1"; + onSelectedChangeHandle && onSelectedChangeHandle(field, v); + }}/>; + let coms; + if (customerRender == null) { + coms = ; + } else { + coms = customerRender(field, textAreaProps, form, formParams); + } + Object.assign(itemProps, { label, error: form.getError(field) }); + let col = 1; + if (multiColumn != null) {//检查有哪些字段需要一行显示多个 + const idx = _.findIndex(multiColumn, item => item.key === field.domkey[0]); + if (idx > -1) { + col = field.colSpan || 1; + if (multiColumn[idx].labelCol != null)//检查字段是否有配置标题宽度 + Object.assign(itemProps, { + labelCol: { span: multiColumn[idx].labelCol }, + wrapperCol: { span: 24 - multiColumn[idx].labelCol } + }); + } else { + Object.assign(itemProps, { + labelCol: { span: labelCol }, + wrapperCol: { span: 24 - labelCol } + }); + } + } + + coms != null && formItems.push({ + com: ({coms}), + col + }); + + if (childrenComponents && childrenComponents[field.domkey[0]]) { + childrenComponents[field.domkey[0]]().map(child => formItems.push(child)); + } + }); + + groupArr.push(); + }); + return groupArr; + }; + + render() { + const { formFields, className } = this.props; + if (formFields == null) return (
); + return ( +
+ {this.renderForm()} +
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js index d1fd2bb9..a58245c7 100644 --- a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js +++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js @@ -46,8 +46,8 @@ class Index extends Component { const payload = { ...pageInfo, ...extra, departmentIds: departmentIds ? departmentIds.split(",") : [], - positionIds: departmentIds ? departmentIds.split(",") : [], - operatorIds: departmentIds ? departmentIds.split(",") : [], + positionIds: positionIds ? positionIds.split(",") : [], + operatorIds: operatorIds ? operatorIds.split(",") : [], effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [], operateTime: operateTime1 ? [operateTime1, operateTime2] : [] }; From 8b8f4cd6106fa1f0a66956c096582010111c71ed Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 25 Dec 2024 17:20:55 +0800 Subject: [PATCH 12/13] release/2.18.2.2412.02 --- .../pages/ledgerPage/components/ledgerSalaryItemNormal.js | 2 +- .../components/welfarePlanEditSlide/planSetTable.js | 2 +- .../pages/socialSecurityBenefits/welfarePlan/index.less | 8 ++++++++ pc4mobx/hrmSalary/style/index.less | 7 +++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js index 82cbdfbf..4b9b42ec 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js @@ -182,7 +182,7 @@ class LedgerSalaryItemNormal extends Component { > childItem.id === id || childItem.uuid === uuid).items} + dataSource={_.find(newDateSource, childItem => childItem.uuid === uuid).items} salarySobId={editId || saveSalarySobId} selectedRowKeys={field.selectedRowKeys || []} onDropCategoryItem={(data) => onDropCategoryItem(field, data)} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js index 10751d50..aa3942b0 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js @@ -84,7 +84,7 @@ class PlanSetTable extends Component { com: [{ type: "custom", key: "custom", - render: text => ({text}) + render: text => ({text}) }] }, { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less index 5566cc8e..0c19ca25 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less @@ -232,6 +232,14 @@ text-overflow: ellipsis; overflow: hidden; } + + .text-td-elli { + display: inline-block; + width: 120px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } } } diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less index 02955b0b..6bc0127b 100644 --- a/pc4mobx/hrmSalary/style/index.less +++ b/pc4mobx/hrmSalary/style/index.less @@ -128,3 +128,10 @@ } } +//公共表格操作按钮间距 +.space_div { + a:not(:last-child) { + margin-right: 8px; + } +} + From 8aa696fee514fa5c2a13fa442574468989809cb3 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 27 Dec 2024 09:12:09 +0800 Subject: [PATCH 13/13] release/2.18.2.2412.02 --- pc4mobx/hrmSalary/components/PersonalScopeTable/index.js | 4 ++-- .../pages/ledgerPage/components/ledgerAssociatedPersonnel.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js index 5faaf8a9..d8824c8b 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js @@ -41,7 +41,7 @@ class PersonalScopeTable extends Component { } getPersonalScopeList = (tabActive = this.props.tabActive) => { - const { searchValue, searchKeyVal, APIFox } = this.props; + const { searchValue, searchKeyVal, APIFox, showOperateBtn } = this.props; const { pageInfo, loading } = this.state; const payload = { [searchKeyVal["key"]]: searchKeyVal["value"], @@ -60,7 +60,7 @@ class PersonalScopeTable extends Component { return { ...item, render: (text, record) => { - if (item.dataIndex === "targetName") { + if (item.dataIndex === "targetName" && showOperateBtn) { return this.props.onEditScope(record)}>{text}; } return {text}; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index 0b71af53..905c2f3b 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -289,6 +289,7 @@ class LedgerAssociatedPersonnel extends Component { APIFox={APIFox} tabActive={selectedKey} searchValue={searchValue} + showOperateBtn={showOperateBtn} onChangeSelectKey={rowKeys => this.setState({ rowKeys })} onEditScope={this.handleAddPersonal} />