From 9471a5a737695fc39b98eba8e673fe95a3e19284 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, 28 Mar 2024 16:49:44 +0800 Subject: [PATCH 1/9] =?UTF-8?q?feature/2.12.1.2403.02-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../doCalc/components/customCalcExportDialog/index.js | 10 ++++++++-- .../components/customCalcExportDialog/index.less | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js index c3e1f838..7dedaa0d 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js @@ -8,7 +8,7 @@ import React, { Component } from "react"; import { Button, Col, message, Row } from "antd"; import { inject, observer } from "mobx-react"; -import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; import { customCacheExportField } from "../../../../../apis/calculate"; import { convertToUrlString } from "../../../../../util/url"; import "./index.less"; @@ -84,10 +84,14 @@ class Index extends Component { return { ...item, salaryItems: _.filter(item.salaryItems, it => !!it.checked) }; }); } + const titleComp =
+ {getLabel(111, "选择字段")} + +
; return ( {getLabel(17416, "导出")}, + , + , ]} bottomLeft={ Date: Fri, 29 Mar 2024 10:19:33 +0800 Subject: [PATCH 2/9] =?UTF-8?q?feature/2.12.1.2403.02-=E4=B8=AA=E7=A8=8E-?= =?UTF-8?q?=E5=A4=96=E7=B1=8D=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF=E6=8A=A5?= =?UTF-8?q?=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/calculate.js | 8 ++ pc4mobx/hrmSalary/common/columns.js | 77 ------------ pc4mobx/hrmSalary/common/conditions.js | 24 ++++ .../customCalcExportDialog/index.js | 26 +++- .../components/expFieldsSetDialog/index.js | 117 ++++++++++++++++++ .../expFieldsSetDialog/tempDialog.js | 73 +++++++++++ .../expTempManagementDialog/index.js | 96 ++++++++++++++ pc4mobx/hrmSalary/stores/calculate.js | 2 + 8 files changed, 340 insertions(+), 83 deletions(-) delete mode 100644 pc4mobx/hrmSalary/common/columns.js create mode 100644 pc4mobx/hrmSalary/common/conditions.js create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/expFieldsSetDialog/index.js create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/expFieldsSetDialog/tempDialog.js create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/expTempManagementDialog/index.js diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 1cfca645..38c0c08b 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -250,3 +250,11 @@ export const customCacheExportField = (params) => { export const salaryacctBatchUpdate = (params) => { return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/batchUpdate", params); }; +//薪资核算-自定义导出模板保存新建 +export const saveExportTemplate = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/saveExportTemplate", params); +}; +//薪资核算-获取自定义导出模板列表 +export const getExportTemplateList = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/exportTemplateList", params); +}; diff --git a/pc4mobx/hrmSalary/common/columns.js b/pc4mobx/hrmSalary/common/columns.js deleted file mode 100644 index 4c9dc027..00000000 --- a/pc4mobx/hrmSalary/common/columns.js +++ /dev/null @@ -1,77 +0,0 @@ -export const logColumns = [ - { - 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: "客户端IP", - dataIndex: 'title', - key: 'title', - } -] - -export const testColumns = [ - { - 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 = []; \ No newline at end of file diff --git a/pc4mobx/hrmSalary/common/conditions.js b/pc4mobx/hrmSalary/common/conditions.js new file mode 100644 index 00000000..81e041a6 --- /dev/null +++ b/pc4mobx/hrmSalary/common/conditions.js @@ -0,0 +1,24 @@ +import React from "react"; +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; +//薪资核算-自定义导出-模板设置 +export const tempConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["templateName"], + fieldcol: 16, + label: getLabel(111, "导出模板名称"), + labelcol: 8, + value: "", + rules: "required|string", + viewAttr: 3 + } + ], + defaultshow: true, + title: "" + } +]; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js index 7dedaa0d..2a4f2390 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js @@ -9,9 +9,11 @@ import React, { Component } from "react"; import { Button, Col, message, Row } from "antd"; import { inject, observer } from "mobx-react"; import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; +import ExpTempManagementDialog from "../expTempManagementDialog"; import { customCacheExportField } from "../../../../../apis/calculate"; import { convertToUrlString } from "../../../../../util/url"; import "./index.less"; +import TempDialog from "../expFieldsSetDialog/tempDialog"; const { getLabel } = WeaLocaleProvider; @@ -21,8 +23,8 @@ class Index extends Component { constructor(props) { super(props); this.state = { - itemsCheckeds: [], - showOnlyChecked: false + itemsCheckeds: [], showOnlyChecked: false, tempMangeDialog: { visible: false, salaryAcctRecordId: "" }, + tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] } }; } @@ -69,8 +71,8 @@ class Index extends Component { }; render() { - const { showOnlyChecked, itemsCheckeds } = this.state; - const { itemsByGroup } = this.props; + const { showOnlyChecked, itemsCheckeds, tempMangeDialog, tempDialog } = this.state; + const { itemsByGroup, salaryAcctRecordId } = this.props; let dataSource = _.map(itemsByGroup, item => { return { ...item, @@ -104,8 +106,13 @@ class Index extends Component { }} buttons={[ , - , - , + , + , ]} bottomLeft={; }) } + this.setState({ tempMangeDialog: { visible: false } })} + /> + {/*模板保存*/} + this.setState({ + tempDialog: { ...tempDialog, visible: false } + })}/> ); } diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/expFieldsSetDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/expFieldsSetDialog/index.js new file mode 100644 index 00000000..6ffcfa93 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/expFieldsSetDialog/index.js @@ -0,0 +1,117 @@ +/* + * Author: 黎永顺 + * name:自定义导出-导出字段设置 + * Description: + * Date: 2024/3/28 + */ +import React, { Component } from "react"; +import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { Button, Col, Row } from "antd"; +import * as API from "../../../../../apis/calculate"; +import TempDialog from "./tempDialog"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + itemsCheckeds: [], itemsByGroup: [], + tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] } + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.getExportField(nextProps); + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ + itemsCheckeds: [], itemsByGroup: [] + }); + } + + getExportField = (props) => { + const { salaryAcctRecordId } = props; + API.getExportField({ salaryAcctRecordId }).then(({ status, data }) => { + if (status) { + const { itemsByGroup } = data; + this.setState({ itemsByGroup }); + } + }); + }; + handleSelectGroupAll = (groupId, checked) => { + const { itemsCheckeds, itemsByGroup } = this.state; + _.map(itemsByGroup, item => { + if (item.salarySobItemGroupId === groupId) { + if (!!Number(checked)) { + this.setState({ + itemsCheckeds: [...itemsCheckeds, ..._.map(item.salaryItems, child => child.salaryItemId)] + }); + } else { + this.setState({ + itemsCheckeds: _.differenceWith(itemsCheckeds, _.map(item.salaryItems, child => child.salaryItemId), _.isEqual) + }); + } + } + }); + }; + + render() { + const { itemsCheckeds, itemsByGroup, tempDialog } = this.state; + const { salaryAcctRecordId, tempId: id } = this.props; + let dataSource = _.map(itemsByGroup, item => { + return { + ...item, salaryItems: _.map(item.salaryItems, child => { + return { ...child, checked: itemsCheckeds.includes(child.salaryItemId) }; + }) + }; + }); + return ( + this.setState({ + tempDialog: { + visible: true, salaryAcctRecordId, id, salaryItemIds: itemsCheckeds + } + })}>{getLabel(111, "保存")}]} + > + { + _.map(dataSource, item => { + const { salarySobItemGroupName, salaryItems, salarySobItemGroupId } = item; + const value = _.every(salaryItems, it => !!it.checked) ? "1" : "0"; + return this.handleSelectGroupAll(salarySobItemGroupId, val)} + />}> + + { + !_.isEmpty(salaryItems) ? + _.map(salaryItems, it => { + const { salaryItemId, salaryItemName, checked } = it; + return + this.setState({ itemsCheckeds: _.xorWith(itemsCheckeds, [salaryItemId], _.isEqual) })} + /> + ; + }) : {getLabel(83553, "暂无数据")} + } + + ; + }) + } + this.setState({ + tempDialog: { ...tempDialog, visible: false } + }, () => isRefresh && this.props.onCancel(true))}/> + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/expFieldsSetDialog/tempDialog.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/expFieldsSetDialog/tempDialog.js new file mode 100644 index 00000000..c6c9d754 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/expFieldsSetDialog/tempDialog.js @@ -0,0 +1,73 @@ +/* + * Author: 黎永顺 + * name: 导出模板保存框 + * Description: + * Date: 2024/3/29 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; +import { Button, message } from "antd"; +import { getSearchs } from "../../../../../util"; +import { tempConditions } from "../../../../../common/conditions"; +import * as API from "../../../../../apis/calculate"; + +const getLabel = WeaLocaleProvider.getLabel; + +@inject("calculateStore") +@observer +class TempDialog extends Component { + constructor(props) { + super(props); + this.state = { + loading: false + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + nextProps.calculateStore.tempForm.initFormFields(tempConditions); + } else { + nextProps.calculateStore.initTempForm(); + } + } + + save = () => { + const { calculateStore: { tempForm }, salaryAcctRecordId, id, salaryItemIds } = this.props; + tempForm.validateForm().then(f => { + if (f.isValid) { + const payload = tempForm.getFormParams(); + this.setState({ loading: true }); + API.saveExportTemplate({ ...payload, salaryAcctRecordId, id, salaryItemIds }) + .then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(111, "操作成功!")); + this.props.onCancel(true); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ loading: false })); + } else { + f.showErrors(); + } + }); + }; + + render() { + const { loading } = this.state; + const { calculateStore: { tempForm } } = this.props; + return ( + {getLabel(111, "保存")} + ]} + > +
{getSearchs(tempForm, tempConditions, 1, false)}
+
+ ); + } +} + +export default TempDialog; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/expTempManagementDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/expTempManagementDialog/index.js new file mode 100644 index 00000000..8e19670e --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/expTempManagementDialog/index.js @@ -0,0 +1,96 @@ +/* + * Author: 黎永顺 + * name: 自定义导出-导出模板管理 + * Description: + * Date: 2024/3/28 + */ +import React, { Component } from "react"; +import { WeaButtonIcon, WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaTab, WeaTable } from "ecCom"; +import ExpFieldsSetDialog from "../expFieldsSetDialog"; +import * as API from "../../../../../apis/calculate"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + pageInfo: { current: 1, pageSize: 10, total: 0 }, dataSource: [], columns: [], loading: false, + fieldsSetDialog: { visible: false, salaryAcctRecordId: "" }, query: { templateName: "" }, + selectedRowKeys: [] + }; + this.dialogRef = null; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.getExportTemplateList(nextProps); + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ selectedRowKeys: [] }); + } + + getExportTemplateList = (props) => { + const { pageInfo, query } = this.state; + const { salaryAcctRecordId } = props; + const payload = { ...pageInfo, ...query, salaryAcctRecordId }; + this.setState({ loading: true }); + API.getExportTemplateList(payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const {} = data; + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { fieldsSetDialog, query, pageInfo, selectedRowKeys, dataSource, columns } = this.state; + const { salaryAcctRecordId } = this.props; + const dialogBodyHeight = this.dialogRef ? this.dialogRef.state.height : 600; + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => this.getExportTemplateList(this.props)); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.getExportTemplateList(this.props)); + } + }; + const rowSelection = { + selectedRowKeys, onChange: selectedRowKeys => this.setState({ selectedRowKeys }) + }; + return ( + this.dialogRef = dom} initLoadCss className="tempManageDialogLayout" + style={{ + width: 700, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "70%", + maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" + }} + > + this.setState({ fieldsSetDialog: { visible: true, salaryAcctRecordId } })}/>, + , + this.setState({ query: { ...query, templateName: val } })} + onSearch={() => this.getExportTemplateList(this.props)}/> + ]}/> + + this.setState({ + fieldsSetDialog: { ...fieldsSetDialog, visible: false } + }, () => isRefresh && this.getExportTemplateList(this.props))}/> + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/stores/calculate.js b/pc4mobx/hrmSalary/stores/calculate.js index 86d3b498..262488ad 100644 --- a/pc4mobx/hrmSalary/stores/calculate.js +++ b/pc4mobx/hrmSalary/stores/calculate.js @@ -14,6 +14,8 @@ export class calculateStore { @observable calculateForm = new WeaForm(); //薪资核算重构-核算form @observable batchUpdateForm = new WeaForm(); //批量更新薪资项目-批量更新form @action initBatchUpdateForm = () => this.batchUpdateForm = new WeaForm(); + @observable tempForm = new WeaForm(); //导出模板设置-模板form + @action initTempForm = () => this.tempForm = new WeaForm(); @observable tableStore = new TableStore(); // new table @observable form = new WeaForm(); // nrew 一个form From 8a7f3fcb7a77614cd982da57ba6545452607392c 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, 29 Mar 2024 14:37:49 +0800 Subject: [PATCH 3/9] =?UTF-8?q?feature/2.12.1.2403.02-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/calculate.js | 9 +++ .../customCalcExportDialog/index.js | 62 ++++++++++++++-- .../components/expFieldsSetDialog/index.js | 43 +++++++---- .../expTempManagementDialog/index.js | 74 +++++++++++++++++-- 4 files changed, 160 insertions(+), 28 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 38c0c08b..0abda464 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -258,3 +258,12 @@ export const saveExportTemplate = (params) => { export const getExportTemplateList = (params) => { return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/exportTemplateList", params); }; +//薪资核算-删除自定义导出模板列表 +export const deleteExportTemplate = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/deleteExportTemplate", params); +}; +//薪资核算-获取导出模板详细信息 +export const getExportTemplateForm = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/getExportTemplateForm", params); +}; + diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js index 2a4f2390..d90e5830 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js @@ -10,7 +10,12 @@ import { Button, Col, message, Row } from "antd"; import { inject, observer } from "mobx-react"; import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; import ExpTempManagementDialog from "../expTempManagementDialog"; -import { customCacheExportField } from "../../../../../apis/calculate"; +import { + customCacheExportField, + getExportField, + getExportTemplateForm, + getExportTemplateList +} from "../../../../../apis/calculate"; import { convertToUrlString } from "../../../../../util/url"; import "./index.less"; import TempDialog from "../expFieldsSetDialog/tempDialog"; @@ -24,18 +29,43 @@ class Index extends Component { super(props); this.state = { itemsCheckeds: [], showOnlyChecked: false, tempMangeDialog: { visible: false, salaryAcctRecordId: "" }, - tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] } + tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] }, + tempOptions: [ + { key: "", showname: "" }, + { key: "system", showname: getLabel(111, "系统模板") } + ] }; } - componentWillReceiveProps(nextProps, nextContext) { + async componentWillReceiveProps(nextProps, nextContext) { if (nextProps.visible !== this.props.visible && nextProps.visible) { this.setState({ itemsCheckeds: !_.isEmpty(nextProps.checkItems) ? nextProps.checkItems : [] + }, () => this.getExportTemplateList(nextProps)); + } else { + this.setState({ + tempOptions: [ + { key: "", showname: "" }, + { key: "system", showname: getLabel(111, "系统模板") } + ] }); } } + getExportTemplateList = (props) => { + const { salaryAcctRecordId } = props; + getExportTemplateList({ salaryAcctRecordId }).then(({ status, data }) => { + if (status) { + const { pageInfo: { list } } = data; + this.setState({ + tempOptions: [ + ...this.state.tempOptions, ..._.map(list, o => ({ key: String(o.id), showname: o.templateName })) + ] + }); + } + }); + }; + customExportClick = () => { const { calculateStore: { ECSearchForm }, salaryAcctRecordId } = this.props; const { itemsCheckeds } = this.state; @@ -69,9 +99,25 @@ class Index extends Component { } }); }; + handleChangeExpTemp = async (id) => { + switch (id) { + case "system": + const { salaryAcctRecordId } = this.props; + const { data: { checkItems: checkeds } } = await getExportField({ salaryAcctRecordId }); + this.setState({ itemsCheckeds: checkeds }); + break; + case "": + this.setState({ itemsCheckeds: "" }); + break; + default: + const { data: { checkItems } } = await getExportTemplateForm({ id }); + this.setState({ itemsCheckeds: _.map(checkItems, o => parseInt(o)) }); + break; + } + }; render() { - const { showOnlyChecked, itemsCheckeds, tempMangeDialog, tempDialog } = this.state; + const { showOnlyChecked, itemsCheckeds, tempMangeDialog, tempDialog, tempOptions } = this.state; const { itemsByGroup, salaryAcctRecordId } = this.props; let dataSource = _.map(itemsByGroup, item => { return { @@ -88,7 +134,7 @@ class Index extends Component { } const titleComp =
{getLabel(111, "选择字段")} - +
; return ( {getLabel(17416, "导出")}, , ]} + buttons={[]} > { _.map(dataSource, item => { @@ -93,7 +110,7 @@ class Index extends Component { const { salaryItemId, salaryItemName, checked } = it; return this.setState({ itemsCheckeds: _.xorWith(itemsCheckeds, [salaryItemId], _.isEqual) })} + onChange={() => this.setState({ itemsCheckeds: _.xorWith(itemsCheckeds, [String(salaryItemId)], _.isEqual) })} /> ; }) : { this.setState({ loading: false }); if (status) { - const {} = data; + const { pageInfo: { columns, list: dataSource, pageNum: current, pageSize, total } } = data; + this.setState({ + dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, + columns: [...columns, { + dataIndex: "operate", title: getLabel(111, "操作"), width: 120, + render: (__, record) => ( + this.getExportTemplateForm(record)}>{getLabel(111, "编辑")} + this.deleteExportTemplate([record.id])}>{getLabel(111, "删除")} + ) + }] + }); } }).catch(() => this.setState({ loading: false })); }; + getExportTemplateForm = (record) => { + const { id, templateName } = record; + const { fieldsSetDialog } = this.state; + const { salaryAcctRecordId } = this.props; + API.getExportTemplateForm({ id }).then(({ status, data }) => { + if (status) { + const { checkItems } = data; + this.setState({ + fieldsSetDialog: { + ...fieldsSetDialog, tempId: id, templateName, visible: true, salaryAcctRecordId, checkItems + } + }); + } else { + this.setState({ + fieldsSetDialog: { + ...fieldsSetDialog, tempId: id, templateName, visible: true, salaryAcctRecordId, checkItems: [] + } + }); + } + }); + }; + deleteExportTemplate = (ids) => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确定要删除吗?"), + onOk: () => { + API.deleteExportTemplate({ ids }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "操作成功!")); + this.setState({ selectedRowKeys: [] }, () => this.getExportTemplateList(this.props)); + } else { + message.error(errormsg); + } + }); + } + }); + }; render() { const { fieldsSetDialog, query, pageInfo, selectedRowKeys, dataSource, columns } = this.state; @@ -75,18 +125,26 @@ class Index extends Component { > this.setState({ fieldsSetDialog: { visible: true, salaryAcctRecordId } })}/>, + onClick={() => this.setState({ + fieldsSetDialog: { + ...fieldsSetDialog, visible: true, tempId: "", templateName: "", + salaryAcctRecordId, checkItems: [] + } + })}/>, , + disabled={_.isEmpty(selectedRowKeys)} + onClick={() => this.deleteExportTemplate(selectedRowKeys)}/>, this.setState({ query: { ...query, templateName: val } })} - onSearch={() => this.getExportTemplateList(this.props)}/> + onSearch={() => this.setState({ + pageInfo: { ...pageInfo, current: 1 } + }, () => this.getExportTemplateList(this.props))}/> ]}/> + scroll={{ y: `calc(${dialogBodyHeight}px - 148px)` }}/> this.setState({ - fieldsSetDialog: { ...fieldsSetDialog, visible: false } + fieldsSetDialog: { ...fieldsSetDialog, visible: false, checkItems: [] } }, () => isRefresh && this.getExportTemplateList(this.props))}/> ); From 3ab97c5a709fd9a59b7901e2bf253c098bac3c19 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, 29 Mar 2024 16:15:11 +0800 Subject: [PATCH 4/9] =?UTF-8?q?feature/2.12.1.2403.02-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customCalcExportDialog/index.js | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js index d90e5830..b1ca3ffb 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js @@ -31,7 +31,7 @@ class Index extends Component { itemsCheckeds: [], showOnlyChecked: false, tempMangeDialog: { visible: false, salaryAcctRecordId: "" }, tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] }, tempOptions: [ - { key: "", showname: "" }, + { key: "NULL", showname: "" }, { key: "system", showname: getLabel(111, "系统模板") } ] }; @@ -45,7 +45,7 @@ class Index extends Component { } else { this.setState({ tempOptions: [ - { key: "", showname: "" }, + { key: "NULL", showname: "" }, { key: "system", showname: getLabel(111, "系统模板") } ] }); @@ -106,8 +106,8 @@ class Index extends Component { const { data: { checkItems: checkeds } } = await getExportField({ salaryAcctRecordId }); this.setState({ itemsCheckeds: checkeds }); break; - case "": - this.setState({ itemsCheckeds: "" }); + case "NULL": + this.setState({ itemsCheckeds: [] }); break; default: const { data: { checkItems } } = await getExportTemplateForm({ id }); @@ -134,7 +134,8 @@ class Index extends Component { } const titleComp =
{getLabel(111, "选择字段")} - +
; return ( {getLabel(17416, "导出")}, , , ]} @@ -196,9 +205,9 @@ class Index extends Component { }, () => this.getExportTemplateList(this.props))} /> {/*模板保存*/} - this.setState({ + this.setState({ tempDialog: { ...tempDialog, visible: false } - })}/> + }, () => this.getExportTemplateList(this.props))}/> ); } From 8dac6eab6b26960d04a633f6971b63fed97f8d1e 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, 29 Mar 2024 16:52:28 +0800 Subject: [PATCH 5/9] =?UTF-8?q?feature/2.12.1.2403.02-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../doCalc/components/customCalcExportDialog/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js index b1ca3ffb..eb96a45b 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/customCalcExportDialog/index.js @@ -32,7 +32,7 @@ class Index extends Component { tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] }, tempOptions: [ { key: "NULL", showname: "" }, - { key: "system", showname: getLabel(111, "系统模板") } + { key: "system", selected: true, showname: getLabel(111, "系统模板") } ] }; } @@ -46,7 +46,7 @@ class Index extends Component { this.setState({ tempOptions: [ { key: "NULL", showname: "" }, - { key: "system", showname: getLabel(111, "系统模板") } + { key: "system", selected: true, showname: getLabel(111, "系统模板") } ] }); } @@ -134,7 +134,7 @@ class Index extends Component { } const titleComp =
{getLabel(111, "选择字段")} -
; return ( @@ -157,7 +157,7 @@ class Index extends Component { tempDialog: { visible: true, salaryAcctRecordId, id: "", salaryItemIds: itemsCheckeds }, tempOptions: [ { key: "NULL", showname: "" }, - { key: "system", showname: getLabel(111, "系统模板") } + { key: "system", selected: true, showname: getLabel(111, "系统模板") } ] })}>{getLabel(111, "存为模板")}, , From 75bb200e9dc9acb0bfe8656dc372fa1e2422f3a4 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, 1 Apr 2024 14:00:50 +0800 Subject: [PATCH 6/9] =?UTF-8?q?release/2.12.1.2403.02=20=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E6=A0=B8?= =?UTF-8?q?=E7=AE=97=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js index a653e118..d4681ac2 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js @@ -331,7 +331,7 @@ class Index extends Component { const tabs = [ { key: "statistics", title: getLabel(111, "统计表") }, { key: "detail", title: getLabel(111, "员工明细") }, - // { key: "salaryDetail", title: getLabel(111, "薪资明细") } + { key: "salaryDetail", title: getLabel(111, "薪资明细") } ]; return ( Date: Tue, 2 Apr 2024 17:45:59 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/salaryFilesEditSlide/index.js | 5 ++- .../pages/payrollFiles/config/index.js | 17 ++++---- .../pages/payrollFiles/salaryFiles.js | 3 +- .../pages/reportView/components/index.less | 1 + pc4mobx/hrmSalary/pages/salaryItem/index.less | 1 + .../standingBook/index.less | 1 + .../welfareArchive/config.js | 12 +++--- .../welfareArchive/index.js | 3 +- .../welfarePlanAdvanceSearchPannel/index.js | 18 +++++++- .../components/welfarePlanCopyDialog/index.js | 2 +- .../components/welfarePlanEditSlide/index.js | 13 ++++-- .../components/welfarePlanList/index.js | 14 ++++-- .../welfarePlan/config.js | 43 +++++++++++++------ .../welfarePlan/index.js | 4 +- .../welfarePlan/index.less | 1 + 15 files changed, 96 insertions(+), 42 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js index d4eaf520..d93c4aba 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js @@ -62,7 +62,8 @@ class Index extends Component { conditions: _.map(salaryFilesConditions, o => { if (o.salaryFile) { return { - ...o, items: _.map(adjustSalaryItems, g => { + ...o, title: getLabel(o.lanId, o.title), titleHelpful: getLabel(o.titleHelpfulLanId, o.titleHelpful), + items: _.map(adjustSalaryItems, g => { const otherParams = g.dataType === "number" ? { precision: g.pattern } : {}; return { colSpan: 3, fieldcol: 14, label: g.name, labelcol: 10, ...otherParams, @@ -73,7 +74,7 @@ class Index extends Component { }; } return { - ...o, items: _.map(o.items, g => { + ...o, title: getLabel(o.lanId, o.title), items: _.map(o.items, g => { if (getKey(g) === "payStartDate") { return { ...g, label: getLabel(g.lanId, g.label), diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js index ffd98075..46bce19e 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js @@ -43,11 +43,11 @@ export const tabCondition = [ } ]; export const tabList = [ - { viewcondition: "pending", title: getLabel(542689, "待定薪"), showcount: true, groupid: "PENDING" }, - { viewcondition: "fixed", title: getLabel(544638, "发薪员工"), showcount: true, groupid: "FIXED" }, - { viewcondition: "suspend", title: getLabel(542691, "待停薪"), showcount: true, groupid: "SUSPEND" }, - { viewcondition: "stop", title: getLabel(544637, "停薪员工"), showcount: true, groupid: "STOP" }, - { viewcondition: "ext", title: getLabel(542679, "非系统人员"), showcount: true, groupid: "EXT" } + { viewcondition: "pending", title: "待定薪", lanId: 542689, showcount: true, groupid: "PENDING" }, + { viewcondition: "fixed", title: "发薪员工", lanId: 544638, showcount: true, groupid: "FIXED" }, + { viewcondition: "suspend", title: "待停薪", lanId: 542691, showcount: true, groupid: "SUSPEND" }, + { viewcondition: "stop", title: "停薪员工", lanId: 544637, showcount: true, groupid: "STOP" }, + { viewcondition: "ext", title: "非系统人员", lanId: 542679, showcount: true, groupid: "EXT" } ]; export const renderReqBtns = (selectedKey, salaryImportTypes, onSalaryOpts, showOperateBtn) => { let reqBtns = [ @@ -367,7 +367,7 @@ export const salaryFileSearchConditions = [ export const salaryFilesConditions = [ { defaultshow: true, title: getLabel(1361, "基本信息"), - col: 3, + col: 3, lanId: 1361, items: [ { colSpan: 3, @@ -439,7 +439,7 @@ export const salaryFilesConditions = [ }, { defaultshow: true, title: getLabel(543329, "发薪设置"), - col: 1, + col: 1,lanId: 543329, items: [ { colSpan: 1, @@ -469,7 +469,8 @@ export const salaryFilesConditions = [ { defaultshow: true, title: getLabel(538004, "薪资档案"), titleHelpful: getLabel(543330, "提示:显示已生效的最新数据"), - col: 2, salaryFile: true, + titleHelpfulLanId: 543330, + col: 2, salaryFile: true,lanId: 538004, items: [] } ]; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/salaryFiles.js b/pc4mobx/hrmSalary/pages/payrollFiles/salaryFiles.js index 596b79c1..59fed35e 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/salaryFiles.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/salaryFiles.js @@ -242,6 +242,7 @@ class SalaryFiles extends Component { salaryFileImpDialog, salaryImportTypes, logDialogVisible, filterConditions } = this.state; const { taxAgentStore: { showOperateBtn } } = this.props; + const tabs = _.map(tabList, o => ({ ...o, title: getLabel(o.lanId, o.title) })); return (
this.setState({ selectedKey: key })} /> diff --git a/pc4mobx/hrmSalary/pages/reportView/components/index.less b/pc4mobx/hrmSalary/pages/reportView/components/index.less index 53e93a64..f4a8496f 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/index.less +++ b/pc4mobx/hrmSalary/pages/reportView/components/index.less @@ -106,6 +106,7 @@ .wea-select .wdb { word-break: break-all !important; word-wrap: break-word !important; + white-space: nowrap !important; } .wea-select .wea-select-input { diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.less b/pc4mobx/hrmSalary/pages/salaryItem/index.less index 90870f6c..1d28f1ca 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.less +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.less @@ -139,6 +139,7 @@ .wea-select .wdb { word-break: break-all !important; word-wrap: break-word !important; + white-space: nowrap !important; } .wea-select .wea-select-input { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less index bd34d5bd..38dae0ed 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less @@ -104,6 +104,7 @@ .wea-select .wdb { word-break: break-all !important; word-wrap: break-word !important; + white-space: nowrap !important; } .wea-select .wea-select-input { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js index 2c0a760d..7431c2d7 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js @@ -54,11 +54,11 @@ export const optTypeEnum = [ } ]; export const tabList = [ - { viewcondition: "1", title: getLabel(542711, "待增员"), showcount: true, groupid: "stayAdd" }, - { viewcondition: "2,3", title: getLabel(542504, "在缴员工"), showcount: true, groupid: "paying" }, - { viewcondition: "3", title: getLabel(542713, "待减员"), showcount: true, groupid: "stayDel" }, - { viewcondition: "4,5", title: getLabel(542505, "停缴员工"), showcount: true, groupid: "stopPay" }, - { viewcondition: "ext", title: getLabel(542679, "非系统人员"), showcount: true, groupid: "ext" } + { viewcondition: "1", title: "待增员", lanId: 542711, showcount: true, groupid: "stayAdd" }, + { viewcondition: "2,3", title: "在缴员工", lanId: 542504, showcount: true, groupid: "paying" }, + { viewcondition: "3", title: "待减员", lanId: 542713, showcount: true, groupid: "stayDel" }, + { viewcondition: "4,5", title: "停缴员工", lanId: 542505, showcount: true, groupid: "stopPay" }, + { viewcondition: "ext", title: "非系统人员", lanId: 542679, showcount: true, groupid: "ext" } ]; export const welfareTipList = [ { @@ -143,7 +143,7 @@ export const renderDropMenuDatas = (selectedKey, getLabel, showOperateBtn) => { key: "record", icon: , content: getLabel(111, "基数调整记录") - },{ + }, { key: "log", icon: , content: getLabel(545781, "操作日志") diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js index f2844ef5..76d00398 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js @@ -147,6 +147,7 @@ class Index extends Component { } = this.state; const { taxAgentStore: { showOperateBtn } } = this.props; const tipList = _.find(welfareTipList, o => o.viewcondition === selectedKey).list; + const tabs = _.map(tabList, o => ({ ...o, title: getLabel(o.lanId, o.title) })); return (
this.setState({ selectedKey: key })} /> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js index 0ea2dcc2..7e28cdbf 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js @@ -5,12 +5,13 @@ * Date: 2024/2/2 */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaLocaleProvider, WeaTools } from "ecCom"; import { Button } from "antd"; import { inject, observer } from "mobx-react"; import { getSearchs } from "../../../../../util"; import { searchConditons } from "../../config"; +const getKey = WeaTools.getKey; const getLabel = WeaLocaleProvider.getLabel; @inject("programmeStore") @@ -27,7 +28,20 @@ class WelfarePlanAdvanceSearchPannel extends Component { return (
- {getSearchs(planSearchForm, searchConditons, 2, false)} + {getSearchs(planSearchForm, _.map(searchConditons, item => ({ + ...item, title: getLabel(item.lanId, item.title), + items: _.map(item.items, o => { + if (getKey(o) === "paymentTypeEnum") { + return { + ...o, label: getLabel(o.lanId, o.label), + options: _.map(o.options, k => ({ ...k, showname: getLabel(k.lanId, k.showname) })) + }; + } + return { + ...o, label: getLabel(o.lanId, o.label) + }; + }) + })), 2, false)}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js index 59af2d46..79685e74 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js @@ -54,7 +54,7 @@ class Index extends Component { const { programmeStore: { planCopyForm }, conditions } = this.props; return ( {getLabel(537558, "保存")} ]} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js index a70da52f..d97654e6 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js @@ -48,15 +48,22 @@ class Index extends Component { this.setState({ planDatas: schemeDetailList, conditions: _.map(planConditons, item => ({ - ...item, items: _.map(item.items, o => { + ...item, title: getLabel(item.lanId, item.title), + items: _.map(item.items, o => { if (getKey(o) === "taxAgentIds") { return { ...o, hide: schemeBatch["sharedType"] === "0" || _.isNil(schemeBatch["sharedType"]), viewAttr: (schemeBatch["sharedType"] === "1" && showOperateBtn) ? 3 : showOperateBtn ? o.viewAttr : 1, - options: _.map(result, k => ({ key: k.id, showname: k.content })) + options: _.map(result, k => ({ key: k.id, showname: k.content })), + label: getLabel(o.lanId, o.label) + }; + } else if (getKey(o) === "paymentType" || getKey(o) === "sharedType") { + return { + ...o, label: getLabel(o.lanId, o.label), + options: _.map(o.options, k => ({ ...k, showname: getLabel(k.lanId, k.showname) })) }; } - return { ...o, viewAttr: showOperateBtn ? o.viewAttr : 1 }; + return { ...o, viewAttr: showOperateBtn ? o.viewAttr : 1, label: getLabel(o.lanId, o.label) }; }) })) }, () => { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js index 8b661ed0..1035015a 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js @@ -178,12 +178,18 @@ class Index extends Component { this.setState({ copyDialog: { visible: true, copyId: id, copyName: `${schemeName}-${getLabel(77, "复制")}`, - title: `${getLabel(77, "复制")}-${_.find(tabWelfarePlanList, o => o.key === selectedKey).title}`, + title: `${getLabel(77, "复制")}-${ + getLabel(_.find(tabWelfarePlanList, o => o.key === selectedKey).lanId, _.find(tabWelfarePlanList, o => o.key === selectedKey).title) + }`, conditions: welfarePlanCopyConditions[selectedKey] } }, () => { const { copyDialog: { conditions, copyName } } = this.state; - planCopyForm.initFormFields(conditions); + planCopyForm.initFormFields(_.map(conditions, item => ({ + ...item, items: _.map(item.items, o => { + return { ...o, label: getLabel(o.lanId, o.label) }; + }) + }))); planCopyForm.updateFields({ [`${selectedKey}_schemeName`]: { value: copyName } }); }); break; @@ -311,7 +317,9 @@ class Index extends Component {
{ selectedKey === "CUSTOM" && -
+
+ getLabel(o.lanId, o.title))}/> +
} {/*复制方案*/} onSalaryOpts("SEARCH", v)} value={customQuery} options={[ - { key: "", showname: getLabel(111, "全部"), selected: true }, + { key: "", showname: getLabel(332, "全部"), selected: true }, { key: "SOCIAL_SECURITY", showname: getLabel(538967, "社保") }, { key: "ACCUMULATION_FUND", showname: getLabel(538969, "公积金") }, { key: "OTHER", showname: getLabel(542717, "企业年金及其他福利") } @@ -63,6 +66,7 @@ export const searchConditons = [ fieldcol: 16, isQuickSearch: true, label: getLabel(33162, "方案名称"), + lanId: 33162, labelcol: 8, value: "", viewAttr: 2 @@ -74,16 +78,18 @@ export const searchConditons = [ fieldcol: 16, isQuickSearch: true, label: getLabel(543163, "缴纳类型"), + lanId: 543163, labelcol: 8, value: "", options: [ - { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") }, - { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") } + { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇"), lanId: 19702 }, + { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村"), lanId: 19703 } ], viewAttr: 2 } ], title: getLabel(82743, "基础信息"), + lanId: 82743, defaultshow: true } ]; @@ -96,6 +102,7 @@ export const welfarePlanCopyConditions = { domkey: ["SOCIAL_SECURITY_schemeName"], fieldcol: 16, label: getLabel(111, "社保名称"), + lanId: 111, labelcol: 8, value: "", rules: "required|string", @@ -115,6 +122,7 @@ export const welfarePlanCopyConditions = { domkey: ["ACCUMULATION_FUND_schemeName"], fieldcol: 16, label: getLabel(111, "公积金名称"), + lanId: 111, labelcol: 8, value: "", rules: "required|string", @@ -134,6 +142,7 @@ export const welfarePlanCopyConditions = { domkey: ["OTHER_schemeName"], fieldcol: 16, label: getLabel(111, "企业年金及其他福利名称"), + lanId: 111, labelcol: 8, value: "", rules: "required|string", @@ -154,10 +163,11 @@ export const planConditons = [ domkey: ["paymentType"], fieldcol: 14, label: getLabel(543163, "缴纳类型"), + lanId: 543163, labelcol: 6, options: [ - { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") }, - { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") } + { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇"), lanId: 19702 }, + { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村"), lanId: 19703 } ], value: "SCHEME_TOWN", rules: "required|string", @@ -168,6 +178,7 @@ export const planConditons = [ domkey: ["schemeName"], fieldcol: 14, label: getLabel(33162, "方案名称"), + lanId: 33162, labelcol: 6, value: "", rules: "required|string", @@ -178,10 +189,11 @@ export const planConditons = [ domkey: ["sharedType"], fieldcol: 14, label: getLabel(543164, "可见性"), + lanId: 543164, labelcol: 6, options: [ - { key: "0", showname: getLabel(111, "公共") }, - { key: "1", showname: getLabel(111, "私有") } + { key: "0", showname: getLabel(111, "公共"), lanId: 111 }, + { key: "1", showname: getLabel(111, "私有"), lanId: 111 } ], value: "0", rules: "required|string", @@ -192,6 +204,7 @@ export const planConditons = [ domkey: ["taxAgentIds"], fieldcol: 14, label: getLabel(543165, "可见性范围"), + lanId: 543165, labelcol: 6, multiple: true, options: [], @@ -204,12 +217,14 @@ export const planConditons = [ domkey: ["remarks"], fieldcol: 14, label: getLabel(536726, "备注"), + lanId: 536726, labelcol: 6, value: "", viewAttr: 2 } ], title: getLabel(82743, "基础信息"), + lanId: 82743, defaultshow: true } ]; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js index d1bd4b81..20d50c88 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js @@ -13,6 +13,7 @@ import WelfarePlanList from "./components/welfarePlanList"; import LogDialog from "../../../components/logViewModal"; import cs from "classnames"; import "./index.less"; +import { tabList } from "../welfareArchive/config"; const getLabel = WeaLocaleProvider.getLabel; @@ -64,12 +65,13 @@ class Index extends Component { render() { const { taxAgentStore: { showOperateBtn } } = this.props; const { logDialogVisible, filterConditions, selectedKey, showSearchAd, isQuery, customQuery } = this.state; + const tabs = _.map(tabWelfarePlanList, o => ({ ...o, title: getLabel(o.lanId, o.title) })); return (
} iconBgcolor="#F14A2D" showDropIcon dropMenuDatas={renderDropMenuDatas(selectedKey, showOperateBtn)} - onDropMenuClick={this.onDropMenuClick} tabDatas={tabWelfarePlanList} selectedKey={selectedKey} + onDropMenuClick={this.onDropMenuClick} tabDatas={tabs} selectedKey={selectedKey} onChange={selectedKey => this.setState({ selectedKey, showSearchAd: false, customQuery: "" })} buttons={renderReqBtns(selectedKey, this.handleReqBtnsCLick, showOperateBtn, customQuery)} > diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less index dc2ed68b..5a057203 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less @@ -210,6 +210,7 @@ .wea-select .wdb { word-break: break-all !important; word-wrap: break-word !important; + white-space: nowrap !important; } .wea-select .wea-select-input { From bd3aa05c29934279538222347a9ee2ac0f007e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Sun, 7 Apr 2024 13:59:51 +0800 Subject: [PATCH 8/9] hotfix/2.12.1.2403.02 --- pc4mobx/hrmSalary/components/pcTemplate/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/components/pcTemplate/index.js b/pc4mobx/hrmSalary/components/pcTemplate/index.js index ba6cd4a0..d0d0a123 100644 --- a/pc4mobx/hrmSalary/components/pcTemplate/index.js +++ b/pc4mobx/hrmSalary/components/pcTemplate/index.js @@ -24,7 +24,7 @@ export const dealTemplate = (itemTypeList, type) => { const { items, groupName, groupId } = group; if (items.length !== 0) { items.forEach((item) => { - item.salaryItemValue = !_.isNil(item.salaryItemValue) ? item.salaryItemValue : "100"; + item.salaryItemValue = !_.isNil(item.salaryItemValue) ? item.salaryItemValue : ""; }); if (items.length % 2 && type === "pc") items.push({}); // 未分类不展示标题 From f8e78a97ac85db2bf9be273b478dc9d2eb76323e 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, 11 Apr 2024 15:15:26 +0800 Subject: [PATCH 9/9] =?UTF-8?q?hotfix/2.12.1.2403.02=20=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E9=A1=B5=E9=9D=A2=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=AF=BC=E5=87=BAPDF=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index ff091152..4e44a75f 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -398,10 +398,10 @@ export default class PayrollGrant extends React.Component { 全部导出 导出选中 - { - selectedKey === "1" && salarySendDetailBaseInfo.showPdfBtn && - {getLabel(111, "导出PDF")} - } + {/*{*/} + {/* selectedKey === "1" && salarySendDetailBaseInfo.showPdfBtn &&*/} + {/* {getLabel(111, "导出PDF")}*/} + {/*}*/} ); let btnDom = [