From 25b7a2341ef798968ad06cdd40f951713b988353 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, 5 Aug 2024 11:05:25 +0800 Subject: [PATCH 01/23] hotfix/2.15.1.2407.01 --- .../doCalc/components/salaryEditCalc/index.less | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less index 3d23810b..e2d8ce9b 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less @@ -28,6 +28,15 @@ display: flex; align-items: center; width: 100%; + + & > span:first-child { + display: inline-block; + min-width: 44px; + } + + & > span:last-child { + flex: 1; + } } } From 334a582d62ab274d3b01bbc6bd0c8fd0be90c712 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, 7 Aug 2024 11:11:53 +0800 Subject: [PATCH 02/23] =?UTF-8?q?hotfix/2.15.1.2407.01=20=E8=80=83?= =?UTF-8?q?=E5=8B=A4=E5=BC=95=E7=94=A8=EF=BC=8C=E8=96=AA=E8=B5=84=E8=B4=A6?= =?UTF-8?q?=E5=A5=97=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataAcquisition/attendance/columns.js | 7 ++-- .../components/attendanceRefrenceDataModal.js | 30 +++++++++------- pc4mobx/hrmSalary/style/index.less | 34 +++++++++++++++++++ pc4mobx/hrmSalary/util/index.js | 4 +-- 4 files changed, 57 insertions(+), 18 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js index dc082d76..658d0808 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js @@ -128,7 +128,7 @@ export const conditions = [ isQuickSearch: false, label: "类型", labelcol: 6, - valueList:[], + valueList: [], options: [ { key: "NUMBER", @@ -185,13 +185,14 @@ export const reFrenceConditions = [ { colSpan: 1, conditionType: "SELECT", - domkey: ["salarySobId"], + domkey: ["salarySobIds"], fieldcol: 18, isQuickSearch: false, label: "薪资账套", labelcol: 6, - valueList:[], + valueList: [], options: [], + multiple: true, rules: "required|string", viewAttr: 3 }, diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js index 14de4956..c8fdb4b9 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js @@ -55,7 +55,7 @@ class AttendanceRefrenceDataModal extends Component { ...item, items: _.map(items, child => { const { domkey } = child; - if (domkey[0] === "salarySobId") { + if (domkey[0] === "salarySobIds") { return { ...child, options: _.map(data, it => ({ key: it.id, showname: it.content })) }; } return { ...child }; @@ -77,19 +77,23 @@ class AttendanceRefrenceDataModal extends Component { refenceform.validateForm().then(f => { if (f.isValid) { const payload = refenceform.getFormParams(); - const checkPayload = { salaryYearMonthStr: payload.salaryYearMonth, salarySobId: payload.salarySobId }; + const checkPayload = { + salaryYearMonthStr: payload.salaryYearMonth, + salarySobIds: payload.salarySobIds.split(",") + }; this.setState({ loading: true }); checkOperation(checkPayload).then(({ status, errormsg: errormessage }) => { if (status) { - syncAttendanceRefer(payload).then(({ status, errormsg }) => { - this.setState({ loading: false }); - if (status) { - message.success("同步成功"); - onCancel(true); - } else { - message.error(errormsg || "同步失败"); - } - }).catch(() => this.setState({ loading: false })); + syncAttendanceRefer({ ...payload, salarySobIds: payload.salarySobIds.split(",") }) + .then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success("同步成功"); + onCancel(true); + } else { + message.error(errormsg || "同步失败"); + } + }).catch(() => this.setState({ loading: false })); } else { this.setState({ loading: false }); message.error(errormessage); @@ -212,9 +216,9 @@ class AttendanceRefrenceDataModal extends Component { ]; return ( - +
- {getSearchs(refenceform, condition, 1)} + {getSearchs(refenceform, condition, 1, false, null, "", "multiple_select")}
{/* 表头设置 */} { }; // 渲染form表单: 一般对form的渲染都统一使用该方法 -export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title) => { +export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title, classnames = "") => { const { isFormInit } = form; const formParams = form.getFormParams(); let group = []; @@ -41,7 +41,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例 error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验 tipPosition="bottom" // 错误提示的显示位置: top/bottom - className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : ""} + className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : classnames} > Date: Wed, 7 Aug 2024 14:05:32 +0800 Subject: [PATCH 03/23] hotfix/2.15.1.2407.01 --- .../attendance/components/attendanceDataViewSlide.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js index 634d36fe..f1e9b4fd 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js @@ -27,6 +27,7 @@ class AttendanceDataViewSlide extends Component { this.viewAttendQuote({}, nextProps); } else if (nextProps.visible !== this.props.visible && !nextProps.visible) { document.querySelector(".attendanceRefWrapper").classList.remove("zIndex0-attendance"); + this.setState({ pageInfo: { current: 1, pageSize: 10, total: 0 } }); } } @@ -41,7 +42,7 @@ class AttendanceDataViewSlide extends Component { this.setState({ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, // o.dataIndex === "username" ? "left" : - columns: _.map(columns, o => ({ ...o, width: 150, fixed: null })) + columns: _.map(columns, o => ({ ...o, width: 150, fixed: null })) }); } }).catch(() => this.setState({ loading: { ...loading, query: false } })); From 75b6c0969a94e56211e2a9a67b767577045fee87 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, 7 Aug 2024 15:22:10 +0800 Subject: [PATCH 04/23] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/item.js | 18 ++- pc4mobx/hrmSalary/pages/salaryItem/index.js | 127 ++++++++++-------- .../salaryItem/salaryItemImport/index.js | 87 ++++++++++++ 3 files changed, 174 insertions(+), 58 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/salaryItem/salaryItemImport/index.js diff --git a/pc4mobx/hrmSalary/apis/item.js b/pc4mobx/hrmSalary/apis/item.js index ab4ff6c2..180b22d0 100644 --- a/pc4mobx/hrmSalary/apis/item.js +++ b/pc4mobx/hrmSalary/apis/item.js @@ -1,5 +1,5 @@ import { WeaTools } from "ecCom"; -import { postFetch } from "../util/request"; +import { postExportFetch, postFetch } from "../util/request"; // 薪资项目-获取列表 export const getItemList = params => { @@ -84,3 +84,19 @@ export const getSalarySobBySalaryItem = params => { export const syncSalaryItemToSalarySobItem = params => { return postFetch("/api/bs/hrmsalary/salaryitem/syncSalaryItemToSalarySobItem", params); }; + +// 导出薪资项目 +export const exportSalaryitem = (params) => { + return postExportFetch("/api/bs/hrmsalary/salaryitem/export", params); +}; +// 下载模板 +export const downloadTemplate = (params) => { + return postExportFetch("/api/bs/hrmsalary/salaryitem/downloadTemplate", params); +}; + +// 导入薪资项目 +export const importSalaryitem = (params) => { + return postFetch("/api/bs/hrmsalary/salaryitem/import", params); +}; + + diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index 09875add..f6898090 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -1,9 +1,8 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, Dropdown, Menu, message, Modal, Switch } from "antd"; -import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom"; import { renderLoading, toDecimal_n } from "../../util"; -import CustomTab from "../../components/customTab"; import SystemSalaryItemModal from "./systemSalaryItemModal"; import { columns } from "./columns"; import SlideModalTitle from "../../components/slideModalTitle"; @@ -12,6 +11,8 @@ import CustomPaginationTable from "../../components/customPaginationTable"; import SyncToSalaryAccountSetDialog from "./syncToSalaryAccountSetDialog"; import "../socialSecurityBenefits/programme/index.less"; import LogDialog from "../../components/logViewModal"; +import SalaryItemImportDialog from "./salaryItemImport"; +import * as API from "../../apis/item"; const { getLabel } = WeaLocaleProvider; @inject("salaryItemStore", "taxAgentStore", "salaryFileStore") @@ -29,7 +30,8 @@ export default class SalaryItem extends React.Component { searchParams: { current: 1, pageSize: 10, total: 0 }, selectedRowKeys: [], syncSalarySetDialog: { visible: false, title: "", id: "" }, - logDialogVisible: false, filterConditions: "[]" + logDialogVisible: false, filterConditions: "[]", + salaryItemImpDialog: { visible: false, title: getLabel(24023, "数据导入") } }; columns.map(item => { if (item.dataIndex == "refere") { @@ -213,6 +215,19 @@ export default class SalaryItem extends React.Component { filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]" }); break; + case "export": + WeaLoadingGlobal.start(); + const { selectedRowKeys } = this.state; + const promise = API.exportSalaryitem({ ids: selectedRowKeys }); + WeaLoadingGlobal.destroy(); + break; + case "import": + this.setState({ + salaryItemImpDialog: { + ...this.state.salaryItemImpDialog, visible: true + } + }); + break; default: break; } @@ -220,12 +235,10 @@ export default class SalaryItem extends React.Component { render() { const { - salaryItemStore, - salaryFileStore, - taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption } + salaryItemStore, salaryFileStore, taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption } } = this.props; const { userStatusList } = salaryFileStore; - const { selectedRowKeys, logDialogVisible, filterConditions } = this.state; + const { selectedRowKeys, logDialogVisible, filterConditions, salaryItemImpDialog } = this.state; const { loading, deleteItemRequest, getTableDatas } = salaryItemStore; const { tableDataSource, @@ -257,51 +270,36 @@ export default class SalaryItem extends React.Component { ); - const renderRightOperation = () => { - return (
- { - (showOperateBtn || showSalaryItemBtn) && - handleMenuClick({ key: "1" })} - style={{ marginRight: "10px" }}>{getLabel(111, "新增自定义薪资项")} + const buttons = [ + handleMenuClick({ key: "1" })}>{getLabel(111, "新增自定义薪资项")}, + - } - { - this.setState({ searchValue: value }); - }} onSearch={(value) => { - this.handleSearch(value); - }}/> -
); - - }; - + }); + } + }); + }}>{getLabel(32136, "批量删除")}, + this.setState({ searchValue: value })} + onSearch={value => this.handleSearch(value)}/> + ]; // 新建和修改保存的回调 const handleSlideSave = (continueFlag) => { const { salaryItemStore: { saveItem, request, getTableDatas } } = this.props; @@ -367,23 +365,31 @@ export default class SalaryItem extends React.Component { }; const rowSelection = { selectedRowKeys, - onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }), - getCheckboxProps: record => ({ - disabled: !record.canDelete // Column configuration not to be checked - }) + onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }) + // getCheckboxProps: record => ({ + // disabled: !record.canDelete // Column configuration not to be checked + // }) }; return (
} iconBgcolor="#F14A2D" showDropIcon onDropMenuClick={this.onDropMenuClick} dropMenuDatas={[ + { + key: "import", + icon: , + content: getLabel(111, "导入") + }, + { + key: "export", + icon: , + content: getLabel(111, "导出") + }, { key: "log", icon: , content: getLabel(545781, "操作日志") } - ]} - > - + ]} buttons={(showOperateBtn || showSalaryItemBtn) ? buttons : buttons.slice(-1)}>
this.setState({ logDialogVisible: false })}/> + {/* 导入*/} + { + this.setState({ + salaryItemImpDialog: { ...salaryItemImpDialog, visible: false } + }, () => callback && this.handleSearch(this.state.searchValue)); + }}/> { systemItemVisible && { + const { importDialog } = this.state; + const { hasData } = importDialog; + WeaLoadingGlobal.start(); + const promise = API.downloadTemplate({ hasData }); + WeaLoadingGlobal.destroy(); + }; + handleImport = (payload) => { + const { importDialog } = this.state, { isExtEmp } = this.props; + const { extraPreview } = importDialog; + this.setState({ importDialog: { ...importDialog, nextloading: true } }); + API.importSalaryitem({ ...payload, ...extraPreview, isExtEmp }).then(({ data, status }) => { + this.setState({ importDialog: { ...importDialog, nextloading: false } }); + if (status) { + this.setState({ + importDialog: { ...importDialog, ...payload, importResult: data } + }); + } + }).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } })); + }; + + render() { + const { importDialog } = this.state; + return ( + this.setState({ + importDialog: { ...importDialog, importResult: {}, imageId: "", link: null } + })} + exportDataDom={ + { + this.setState({ importDialog: { ...importDialog, hasData: val === "1" } }); + }} + /> + } + nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })} + nextUplaodCallback={imageId => this.handleImport({ imageId })} + /> + ); + } +} + +export default Index; From 74ba398c90f8f3b3c18894fb1118d93962784725 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, 12 Aug 2024 16:56:51 +0800 Subject: [PATCH 05/23] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ruleconfig.js | 8 +++ .../importDialog/components/impStep1.js | 66 ++++++++++--------- .../importDialog/components/impStep3.js | 2 +- .../components/importDialog/index.js | 10 ++- pc4mobx/hrmSalary/pages/appConfig/index.js | 41 ++++++++++-- .../hrmSalary/pages/appConfig/moveInDialog.js | 62 +++++++++++++++++ 6 files changed, 150 insertions(+), 39 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index f52953bb..eebd320f 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -79,3 +79,11 @@ export const saveSalarySendFeedback = (params) => { export const exportDataReport = (params) => { return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportData", params); }; +//迁入配置 +export const uploadConfig = (params) => { + return postFetch("/api/bs/hrmsalary/sys/uploadConfig", params); +}; +//迁入配置 +export const downloadConfig = (params) => { + return postExportFetch("/api/bs/hrmsalary/sys/downloadConfig", params); +}; diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js index 209125fb..b2ac42b0 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js @@ -33,7 +33,8 @@ class ImpStep1 extends Component { multiple: false, action: "/api/doc/upload/uploadFile", fileList, - onChange: this.handleChange + onChange: this.handleChange, + ...this.props.customDragger }; return (
@@ -45,7 +46,7 @@ class ImpStep1 extends Component { {this.props.importParams}
} -
{getLabel(543202, "导入Excel")}
+ {_.isEmpty(this.props.customDragger) &&
{getLabel(543202, "导入Excel")}
}

@@ -56,36 +57,39 @@ class ImpStep1 extends Component {

+ { + (_.isNil(this.props.customDragger) || this.props.customDragger.showOperateDesc) && + +
+
{getLabel(27577, "操作步骤")}
+

+ {`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}   + { + typeof this.props.link === "string" ? + {getLabel(543207, "点击这里下载模板")} : + {getLabel(543207, "点击这里下载模板")} + } +    + {this.props.exportDataDom} +

+

{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}

+

{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}

+

+ {`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}。${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}。`} +

+
-
-
{getLabel(27577, "操作步骤")}
-

- {`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}   - { - typeof this.props.link === "string" ? - {getLabel(543207, "点击这里下载模板")} : - {getLabel(543207, "点击这里下载模板")} - } -    - {this.props.exportDataDom} -

-

{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}

-

{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}

-

- {`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}。${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}。`} -

-
- -
-
{getLabel(543223, "Excel文件说明")}
-

{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}

-

{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}

-

{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}

-
- +
+
{getLabel(543223, "Excel文件说明")}
+

{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}

+

{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}

+

{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}

+
+
+ }
); } diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js index df9575ef..3ea07724 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js @@ -31,7 +31,7 @@ class ImpStep3 extends Component {
} { - (!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) && + !_.isEmpty(importResult) && (!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) && { - const { current } = this.state, { importParams, link, excludeKey, importResult, exportDataDom = null } = this.props; + const { current } = this.state, { + importParams, link, excludeKey, importResult, + exportDataDom = null, customDragger + } = this.props; const scrollHeight = this.importRef ? this.importRef.state.height - 232 : 606.6; let CurrentDom = null; switch (current) { case 0: - CurrentDom = this.step1Ref = dom}/>; + CurrentDom = + this.step1Ref = dom}/>; break; case 1: CurrentDom = ; diff --git a/pc4mobx/hrmSalary/pages/appConfig/index.js b/pc4mobx/hrmSalary/pages/appConfig/index.js index a7b3d7ce..e13000eb 100644 --- a/pc4mobx/hrmSalary/pages/appConfig/index.js +++ b/pc4mobx/hrmSalary/pages/appConfig/index.js @@ -5,7 +5,17 @@ * Date: 2022-09-27 18:17:02 */ import React, { Component } from "react"; -import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaSearchGroup, WeaTop } from "ecCom"; +import { + WeaCheckbox, + WeaDatePicker, + WeaFormItem, + WeaInput, + WeaLoadingGlobal, + WeaLocaleProvider, + WeaSearchGroup, + WeaTop +} from "ecCom"; +import MoveInDialog from "./moveInDialog"; import * as API from "../../apis/ruleconfig"; import { Button, message } from "antd"; import "./index.less"; @@ -18,6 +28,7 @@ const Input = (props) => { ); }; +const getLabel = WeaLocaleProvider.getLabel; class AppConfig extends Component { constructor(props) { @@ -28,7 +39,8 @@ class AppConfig extends Component { isLog: "0", openFormulaForcedEditing: "0", version: "", - loading: false + loading: false, + moveInDialog: { visible: false, title: getLabel(111, "数据迁入") } }; } @@ -62,10 +74,29 @@ class AppConfig extends Component { } }); }; + handleOperate = (type) => { + switch (type) { + case "import": + this.setState({ moveInDialog: { ...this.state.moveInDialog, visible: true } }); + break; + case "export": + WeaLoadingGlobal.start(); + const promise = API.downloadConfig(); + break; + default: + break; + } + }; render() { - const { openAcctResultSum, displayEmpInfoReport, loading, openFormulaForcedEditing, isLog, version } = this.state; - const btns = []; + const { + openAcctResultSum, displayEmpInfoReport, loading, openFormulaForcedEditing, isLog, version, moveInDialog + } = this.state; + const btns = [ + , + , + + ]; const items = [ { com: Input({ @@ -115,6 +146,8 @@ class AppConfig extends Component { buttons={btns} /> + this.setState({ moveInDialog: { ...this.state.moveInDialog, visible: false } })}/> ); } diff --git a/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js b/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js new file mode 100644 index 00000000..7fcc32cc --- /dev/null +++ b/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js @@ -0,0 +1,62 @@ +/* + * 数据迁入 + * + * @Author: 黎永顺 + * @Date: 2024/8/12 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { message } from "antd"; +import ImportDialog from "../../components/importDialog"; +import * as API from "../../apis/ruleconfig"; + +const getLabel = WeaLocaleProvider.getLabel; + +class MoveInDialog extends Component { + constructor(props) { + super(props); + this.state = { + importDialog: { + nextloading: false, importResult: {}, imageId: "", + customDragger: { showOperateDesc: false, accept: ".xml" } + } + }; + } + + + handleImport = (payload) => { + const { importDialog } = this.state = this.props; + this.setState({ importDialog: { ...importDialog, nextloading: true } }); + API.uploadConfig({ ...payload }).then(({ data, status, errormsg }) => { + this.setState({ importDialog: { ...importDialog, nextloading: false } }); + if (status) { + this.setState({ + importDialog: { ...importDialog, ...payload, importResult: data } + }); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } })); + }; + + render() { + const { importDialog } = this.state; + return ( + this.setState({ + importDialog: { + ...importDialog, importResult: {}, imageId: "", link: "" + } + })} + nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })} + nextUplaodCallback={imageId => this.handleImport({ imageId })} + /> + ); + } +} + +export default MoveInDialog; From 9479a4ba9a2c3550036a33eb4772402bb0da23ed 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, 13 Aug 2024 14:33:10 +0800 Subject: [PATCH 06/23] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../importDialog/components/impStep3.js | 16 ++++++++++------ .../hrmSalary/pages/appConfig/moveInDialog.js | 11 +++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js index 3ea07724..888cc763 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js @@ -19,12 +19,16 @@ class ImpStep3 extends Component { !_.isEmpty(importResult) ?

-

- {getLabel(389249, "已导入")} - {importResult.successCount}   - {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`} - {importResult.errorCount}  {getLabel(30690, "条数据")} -

+ { + importResult.successCount && +

+ {getLabel(389249, "已导入")} + {importResult.successCount}   + {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`} + {importResult.errorCount}  {getLabel(30690, "条数据")} +

+ }
:

{getLabel(111, "导入失败")}

diff --git a/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js b/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js index 7fcc32cc..7707cc6c 100644 --- a/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js +++ b/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js @@ -26,6 +26,17 @@ class MoveInDialog extends Component { }; } + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && !nextProps.visible) { + this.setState({ + importDialog: { + ...this.state.importDialog, + importResult: {}, imageId: "", + customDragger: { showOperateDesc: false, accept: ".xml" } + } + }); + } + } handleImport = (payload) => { const { importDialog } = this.state = this.props; From d9fc1645040d0952adc9c6578201e15319a941cc 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, 13 Aug 2024 16:12:43 +0800 Subject: [PATCH 07/23] hotfix/2.15.1.2407.01 --- pc4mobx/hrmSalary/apis/index.js | 2 +- .../reportView/components/statisticalMicroSettingsSlide.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js index 92514839..2a7d00d9 100644 --- a/pc4mobx/hrmSalary/apis/index.js +++ b/pc4mobx/hrmSalary/apis/index.js @@ -37,7 +37,7 @@ export const getDetailChanges = params => { }; //获取薪资账套全列表 export const getSalarysobListAll = params => { - return postFetch("/api/bs/hrmsalary/salarysob/listAll", params); + return postFetch("/api/bs/hrmsalary/salarysob/listAllByAuth", params); }; //补算 export const supplementAcctRecord = (params) => { diff --git a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js index a3da8363..50be41e5 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js @@ -71,7 +71,7 @@ class StatisticalMicroSettingsSlide extends Component { getTaxAgentSelectList = async (props) => { const [salarySobList, empStatusList] = await Promise.all([getSalarysobListAll(), commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })]); - getTaxAgentSelectList(true).then(({ status, data }) => { + getTaxAgentSelectList(props.isShare).then(({ status, data }) => { if (status) { const conditions = _.map(condition, item => { return { From 23e9a6ba421943a32db5f3b5ff239937ea9161f6 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, 15 Aug 2024 10:28:18 +0800 Subject: [PATCH 08/23] hotfix/2.15.1.2407.01 --- .../components/PersonalScopeModal/index.js | 14 ++++++++-- .../pages/taxAgent/addTaxAgentModal.js | 28 +++++++++++++------ 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index b6fd6ffb..4678b86d 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -5,7 +5,7 @@ * Date: 2022/11/30 */ import React, { Component } from "react"; -import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom"; +import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect, WeaTextarea } from "ecCom"; import { Button, message, Modal } from "antd"; import { getTaxAgentRangeForm } from "../../apis/taxAgent"; import { commonEnumList } from "../../apis/ruleconfig"; @@ -91,6 +91,11 @@ class PersonalScopeModal extends Component { key: "POSITION", showname: "岗位", selected: false + }, + { + key: "SQL", + showname: "SQL", + selected: false } ]; this.setState({ @@ -124,7 +129,9 @@ class PersonalScopeModal extends Component { const payload = { employeeStatus: status.split(","), includeType, - targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })), + targetParams: targetType !== "SQL" ? + _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it, target: "" })) : + [{ targetType, targetId: "0", target: targetTypeIds }], [saveKeyVal["key"]]: saveKeyVal["value"] }; this.setState({ loading: true }); @@ -156,6 +163,9 @@ class PersonalScopeModal extends Component { case "POSITION": browserType = { ...browserType, type: 278, title: "岗位选择" }; break; + case "SQL": + return this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>; default: break; } diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js index 23d14a23..8f3ea971 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -1,8 +1,9 @@ import React from "react"; import { Button, Col, Row } from "antd"; -import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaSelect } from "ecCom"; +import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaLocaleProvider, WeaSelect, WeaTextarea } from "ecCom"; import "../ledger/index.less"; +const { getLabel } = WeaLocaleProvider; export default class AddTaxAgentModal extends React.Component { constructor(props) { super(props); @@ -24,7 +25,7 @@ export default class AddTaxAgentModal extends React.Component { this.setState({ checkAll: "1" }); - }else{ + } else { this.setState({ checkAll: "0" }); @@ -38,10 +39,10 @@ export default class AddTaxAgentModal extends React.Component { const { checkboxValue, ids, selectedKey } = this.state; const payload = { employeeStatus: checkboxValue.split(","), - targetParams: _.map(ids.split(","), (it) => ({ - targetType: selectedKey, + targetParams: selectedKey !== "SQL" ? _.map(ids.split(","), (it) => ({ + targetType: selectedKey, target: "", targetId: it - })) + })) : [{ targetType: selectedKey, targetId: "0", target: ids }] }; if (_.isEmpty(ids) && _.isEmpty(checkboxValue)) { this.refs.weaError.showError(); @@ -64,7 +65,7 @@ export default class AddTaxAgentModal extends React.Component { this.setState({ selectedKey: "EMPLOYEE", checkboxValue: "", - checkAll: '0', + checkAll: "0", ids: "" }); }; @@ -182,6 +183,15 @@ export default class AddTaxAgentModal extends React.Component { /> )} + {this.state.selectedKey === "SQL" && ( + + this.setState({ ids })}/> + + )}
@@ -197,13 +207,13 @@ export default class AddTaxAgentModal extends React.Component { if (checkAll === "1") { const checked = _.map(employeeStatus, it => it.id); this.setState({ - checkAll: '1', + checkAll: "1", checkboxValue: checked.join(",") }); } else { this.setState({ - checkAll: '0', - checkboxValue: '' + checkAll: "0", + checkboxValue: "" }); } }}/> From f984cd3f59602b32425f37c560d8922db88cd633 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, 15 Aug 2024 11:01:26 +0800 Subject: [PATCH 09/23] hotfix/2.15.1.2407.01 --- .../components/PersonalScopeModal/index.js | 30 +++++++++++++++++-- .../pages/taxAgent/addTaxAgentModal.js | 19 ++++++++++-- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 4678b86d..6155c670 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -5,13 +5,24 @@ * Date: 2022/11/30 */ import React, { Component } from "react"; -import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect, WeaTextarea } from "ecCom"; +import { + WeaBrowser, + WeaDialog, + WeaFormItem, + WeaHelpfulTip, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect, + WeaTextarea +} 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"; +const getLabel = WeaLocaleProvider.getLabel; + class PersonalScopeModal extends Component { constructor(props) { super(props); @@ -164,8 +175,11 @@ class PersonalScopeModal extends Component { browserType = { ...browserType, type: 278, title: "岗位选择" }; break; case "SQL": - return this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>; + return
+ this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/> + }/> +
; default: break; } @@ -269,3 +283,13 @@ class PersonalScopeModal extends Component { } export default PersonalScopeModal; + +export const SQLHelpTip = () => { + return
+

{getLabel(111, "注意事项:")}

+

{getLabel(111, "1、sql需返回人员id")}

+

{getLabel(111, "2、sql结尾不需要 ; go /等符号")}

+

{getLabel(111, "使用例子:定义获取岗位是开发的人员")}

+

{getLabel(111, "select id from hrmresource where JOBTITLE = 17")}

+
; +}; diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js index 8f3ea971..8125cb97 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -1,6 +1,16 @@ import React from "react"; import { Button, Col, Row } from "antd"; -import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaLocaleProvider, WeaSelect, WeaTextarea } from "ecCom"; +import { + WeaBrowser, + WeaCheckbox, + WeaDialog, + WeaError, + WeaHelpfulTip, + WeaLocaleProvider, + WeaSelect, + WeaTextarea +} from "ecCom"; +import { SQLHelpTip } from "../../components/PersonalScopeModal"; import "../ledger/index.less"; const { getLabel } = WeaLocaleProvider; @@ -188,8 +198,11 @@ export default class AddTaxAgentModal extends React.Component { style={{ width: "100%" }} ref="weaError" error={getLabel(111, "请输入SQL")}> - this.setState({ ids })}/> +
+ this.setState({ ids })}/> + }/> +
)} From 5c9f954adb2977e353aea8dc613ed54d8a340abe 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, 15 Aug 2024 11:04:14 +0800 Subject: [PATCH 10/23] hotfix/2.15.1.2407.01 --- pc4mobx/hrmSalary/components/PersonalScopeModal/index.js | 4 ++-- pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 6155c670..d0718a2f 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -176,9 +176,9 @@ class PersonalScopeModal extends Component { break; case "SQL": return
- this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/> - }/> + }/>
; default: break; diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js index 8125cb97..fae1b5c6 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -201,7 +201,7 @@ export default class AddTaxAgentModal extends React.Component {
this.setState({ ids })}/> - }/> + }/>
)} From 5009cd59557d52a2bd4e90f55e6c1cf395be14b2 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, 15 Aug 2024 15:43:52 +0800 Subject: [PATCH 11/23] hotfix/2.15.1.2407.01 --- .../pages/salaryFile/salaryArchiveEditAdjLogRecord.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js index a46b7129..6975ee63 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js @@ -16,7 +16,7 @@ import { } from "../../apis/archive"; import { inject, observer } from "mobx-react"; import { adjCondition } from "./columns"; -import { getDomkes, getSearchs } from "../../util"; +import { getDomkes, getSearchs, toDecimal_n } from "../../util"; import moment from "moment"; const { getLabel } = WeaLocaleProvider; @@ -149,7 +149,10 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { let payload = { ...adjForm.getFormParams(), salaryArchiveId, effectiveTime: moment(new Date(adjForm.getFormParams().effectiveTime)).format("YYYY-MM-DD"), - salaryArchiveItems: _.map(list, o => ({ salaryItemId: o.salaryItem, adjustValue: o.adjustAfter })) + salaryArchiveItems: _.map(list, o => ({ + salaryItemId: o.salaryItem, + adjustValue: o.dataType === "number" ? toDecimal_n(o.adjustAfter, o.pattern) : o.adjustAfter + })) }; if (salaryArchiveItemId) { payload = { ...payload, canOperator, salaryArchiveItemId }; From e8625fd0ef6adb1a36fce542efbb3d2d59e69362 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, 15 Aug 2024 16:29:21 +0800 Subject: [PATCH 12/23] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/components/importDialog/index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/components/importDialog/index.js b/pc4mobx/hrmSalary/components/importDialog/index.js index 01ef6493..633df0ee 100644 --- a/pc4mobx/hrmSalary/components/importDialog/index.js +++ b/pc4mobx/hrmSalary/components/importDialog/index.js @@ -103,13 +103,16 @@ class Index extends Component { } const [file] = fileList; const { response } = file; - this.setState({ - current: this.state.current + 1, - fileid: response.data.fileid - }, () => { - !excludeKey && this.props.nextCallback && this.props.nextCallback(this.state.fileid); - excludeKey && this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid); - }); + if (!excludeKey) { + this.setState({ + current: this.state.current + 1, + fileid: response.data.fileid + }, () => { + this.props.nextCallback && this.props.nextCallback(this.state.fileid); + }); + } else { + this.props.nextUplaodCallback && this.props.nextUplaodCallback(response.data.fileid); + } } else { this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid); } From 3d5561981323e402f39ff40db3f7d14d9b9a7d6d 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, 15 Aug 2024 17:43:03 +0800 Subject: [PATCH 13/23] hotfix/2.15.1.2407.01 --- pc4mobx/hrmSalary/index.js | 9 ++++--- pc4mobx/hrmSalary/layout.js | 53 +++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 pc4mobx/hrmSalary/layout.js diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index fff7a3d1..8c605118 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -52,6 +52,7 @@ import ExternalPersonManage from "./pages/externalPersonManage"; import AdjustSalaryManage from "./pages/adjustSalaryManage"; import TopologyMap from "./pages/topologyMap"; import SupplementaryCalc from "./pages/supplementaryCalc"; +import Layout from "./layout"; import stores from "./stores"; import "./style/index"; @@ -114,7 +115,7 @@ const DataAcquisition = (props) => props.children; // supplementaryCalc 补算 const Routes = ( - + @@ -124,8 +125,8 @@ const Routes = ( - - + + @@ -152,7 +153,7 @@ const Routes = ( - + diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js new file mode 100644 index 00000000..f1ad9a67 --- /dev/null +++ b/pc4mobx/hrmSalary/layout.js @@ -0,0 +1,53 @@ +/* + * 薪酬管理- + * layout组件 + * @Author: 黎永顺 + * @Date: 2024/8/15 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTools } from "ecCom"; +import stores from "./stores"; + +const { ls } = WeaTools; +const { getLabel } = WeaLocaleProvider; + +class Layout extends Component { + constructor(props) { + super(props); + this.state = {}; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) { + if (window.location.hash.indexOf("payroll") !== -1) { + window.localStorage.removeItem("template-basedata"); + window.localStorage.removeItem("salary-showset"); + } + } + } + + componentDidMount() { + if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) { + const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css"; + const link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("type", "text/css"); + link.setAttribute("href", src); + let header = document.getElementById("container"); + header.appendChild(link); + top.$(".ant-message").remove(); + window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission(); + } + } + + render() { + return ( + {this.props.children} + ); + } +} + +export default Layout; From f730cba8decc76a7326d49197c7705be3210379a 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, 16 Aug 2024 16:37:45 +0800 Subject: [PATCH 14/23] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../importDialog/components/impStep3.js | 3 +++ .../importDialog/components/moveInResult.js | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js index 888cc763..f42c7ef2 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js @@ -7,6 +7,7 @@ import React, { Component } from "react"; import { WeaLocaleProvider, WeaTable } from "ecCom"; import successImg from "../../importModal/success.svg"; +import MoveInResult from "./moveInResult"; const getLabel = WeaLocaleProvider.getLabel; @@ -15,6 +16,8 @@ class ImpStep3 extends Component { const { importResult } = this.props; return (
+ + { !_.isEmpty(importResult) ?
diff --git a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js new file mode 100644 index 00000000..db1d3fef --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js @@ -0,0 +1,25 @@ +/* + * 薪酬迁入结果展示 + * + * @Author: 黎永顺 + * @Date: 2024/8/16 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; + +class MoveInResult extends Component { + render() { + return ( +
+ +
+ ); + } +} + +export default MoveInResult; From 1d26ef81760acc22e68da8268a5fa3e665be0f9b 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, 19 Aug 2024 10:27:02 +0800 Subject: [PATCH 15/23] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../importDialog/components/impStep3.js | 59 ++++++++++--------- .../importDialog/components/moveInResult.js | 39 ++++++++++-- 2 files changed, 65 insertions(+), 33 deletions(-) diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js index f42c7ef2..82ed0adb 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js @@ -16,39 +16,42 @@ class ImpStep3 extends Component { const { importResult } = this.props; return (
- - { - !_.isEmpty(importResult) ? -
-

+ importResult.results ? : + { - importResult.successCount && -

- {getLabel(389249, "已导入")} - {importResult.successCount}   - {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`} - {importResult.errorCount}  {getLabel(30690, "条数据")} -

+ !_.isEmpty(importResult) ? +
+

+ { + importResult.successCount && +

+ {getLabel(389249, "已导入")} + {importResult.successCount}   + {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`} + {importResult.errorCount}  {getLabel(30690, "条数据")} +

+ } +
: +
+

{getLabel(111, "导入失败")}

+
} -
: -
-

{getLabel(111, "导入失败")}

-
- } - { - !_.isEmpty(importResult) && (!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) && - } - ]} - dataSource={importResult.errorData || importResult.errorNotice} pagination={false} - scroll={{ y: `calc(100vh - 387px)` }} - /> + }
); diff --git a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js index db1d3fef..ab3bc675 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js @@ -8,16 +8,45 @@ * @description: */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; const getLabel = WeaLocaleProvider.getLabel; class MoveInResult extends Component { - render() { - return ( -
+ downloadTxtfile = (value, type) => { + if (!value) return; + const element = document.createElement("a"); + const file = new Blob([value], { type: "text/plain" }); + element.href = URL.createObjectURL(file); + element.download = `导入${type}信息.txt`; + document.body.appendChild(element); + element.click(); + }; -
+ render() { + const { dataSource } = this.props; + return ( + ( + this.downloadTxtfile(record.success.join("\n"), getLabel(111, "成功"))}> + {record.success.length} + this.downloadTxtfile(record.warning.join("\n"), getLabel(111, "警告"))}>{record.warning.length} + this.downloadTxtfile(record.error.join("\n"), getLabel(111, "错误"))}>{record.error.length} + ) + } + ]} + dataSource={dataSource} pagination={false} bordered scroll={{ y: `calc(100vh - 333px)` }} + /> ); } } From 6a56cee09086b5ddbc34b9e2c611cf212245ae85 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, 19 Aug 2024 10:42:54 +0800 Subject: [PATCH 16/23] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/importDialog/components/impStep1.js | 1 + .../importDialog/components/moveInResult.js | 14 ++++++++------ pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js index b2ac42b0..9d52e70f 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js @@ -36,6 +36,7 @@ class ImpStep1 extends Component { onChange: this.handleChange, ...this.props.customDragger }; + console.log("this.props.customDragger", this.props.customDragger) return (
{/* 导入选项 */} diff --git a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js index ab3bc675..6a448ec2 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js @@ -30,16 +30,18 @@ class MoveInResult extends Component { columns={[ { title: getLabel(111, "导入信息"), dataIndex: "message" }, { - title: getLabel(111, "下载信息"), dataIndex: "download", width: 200, + title: getLabel(111, "下载信息"), dataIndex: "download", width: 225, render: (text, record) => ( - this.downloadTxtfile(record.success.join("\n"), getLabel(111, "成功"))}> + this.downloadTxtfile(record.success.join("\n"), getLabel(111, "成功"))}> {record.success.length} - this.downloadTxtfile(record.warning.join("\n"), getLabel(111, "警告"))}> this.downloadTxtfile(record.warning.join("\n"), getLabel(111, "警告"))}>{record.warning.length} - this.downloadTxtfile(record.error.join("\n"), getLabel(111, "错误"))}>{record.error.length} ) diff --git a/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js b/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js index 7707cc6c..afdf3765 100644 --- a/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js +++ b/pc4mobx/hrmSalary/pages/appConfig/moveInDialog.js @@ -39,7 +39,7 @@ class MoveInDialog extends Component { } handleImport = (payload) => { - const { importDialog } = this.state = this.props; + const { importDialog } = this.state; this.setState({ importDialog: { ...importDialog, nextloading: true } }); API.uploadConfig({ ...payload }).then(({ data, status, errormsg }) => { this.setState({ importDialog: { ...importDialog, nextloading: false } }); From d31ae5a030d42b21d50897dc0473c38614fccc27 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, 19 Aug 2024 10:43:30 +0800 Subject: [PATCH 17/23] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/components/importDialog/components/impStep1.js | 1 - 1 file changed, 1 deletion(-) diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js index 9d52e70f..b2ac42b0 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js @@ -36,7 +36,6 @@ class ImpStep1 extends Component { onChange: this.handleChange, ...this.props.customDragger }; - console.log("this.props.customDragger", this.props.customDragger) return (
{/* 导入选项 */} From a3f40f506dd37e710b146a5df9c88a68bd520888 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, 19 Aug 2024 16:28:53 +0800 Subject: [PATCH 18/23] hotfix/2.15.1.2407.01 --- .../doCalc/components/salaryEditCalc/editSalaryCalcSlide.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js index 0943bd38..235bac13 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js @@ -104,14 +104,14 @@ class EditSalaryCalcSlide extends Component { ..._.map(cur.salaryItems, it => { return { salaryItemId: it.salaryItemId, - resultValue: (it.dataType === "number" && !!it.resultValue) ? toDecimal_n(it.resultValue, it.pattern || 2) : it.resultValue + resultValue: (it.dataType === "number" && !!it.resultValue) ? toDecimal_n(it.resultValue, !_.isNil(it.pattern) ? it.pattern : 2) : it.resultValue }; }) ]; }, []), ...issuedAndReissueItems.map(item => ({ salaryItemId: item.salaryItemId, - resultValue: (item.dataType === "number" && !!item.resultValue) ? toDecimal_n(item.resultValue, item.pattern || 2) : item.resultValue + resultValue: (item.dataType === "number" && !!item.resultValue) ? toDecimal_n(item.resultValue, !_.isNil(item.pattern) ? item.pattern : 2) : item.resultValue })) ] }; From b7e29df7815159305e663ca24c5c4603d90a3268 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, 19 Aug 2024 16:39:14 +0800 Subject: [PATCH 19/23] =?UTF-8?q?feature/2.15.1.2407.01-=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/importDialog/components/moveInResult.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js index 6a448ec2..2a6358a6 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/moveInResult.js @@ -30,7 +30,7 @@ class MoveInResult extends Component { columns={[ { title: getLabel(111, "导入信息"), dataIndex: "message" }, { - title: getLabel(111, "下载信息"), dataIndex: "download", width: 225, + title: getLabel(111, "下载信息"), dataIndex: "download", width: 250, render: (text, record) => ( Date: Mon, 19 Aug 2024 17:32:49 +0800 Subject: [PATCH 20/23] hotfix/2.15.1.2407.01 --- .../reportView/components/statisticalMicroSettingsSlide.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js index 50be41e5..66a38aeb 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js @@ -412,6 +412,8 @@ const StatisticalScopePicker = (props) => { { + console.log(current, moment(current).format("YYYY-MM")) + console.log(startDate, endDate) if (!current || !endDate) return false; const start = moment(startDate || endDate).subtract(11, "months").format("YYYY-MM"); const end = moment(startDate).add(12, "months").format("YYYY-MM"); From 63eb3730251f7e3468d40b7daf583131ccdf1f1e 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, 20 Aug 2024 09:23:41 +0800 Subject: [PATCH 21/23] hotfix/2.15.1.2407.01 --- .../components/statisticalMicroSettingsSlide.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js index 66a38aeb..e82f2eaa 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js @@ -412,12 +412,10 @@ const StatisticalScopePicker = (props) => { { - console.log(current, moment(current).format("YYYY-MM")) - console.log(startDate, endDate) if (!current || !endDate) return false; - const start = moment(startDate || endDate).subtract(11, "months").format("YYYY-MM"); - const end = moment(startDate).add(12, "months").format("YYYY-MM"); - return current.getTime() < new Date(start).getTime() || current.getTime() > new Date(endDate || end).getTime(); + const tooEarly = moment(current.getTime()).isBefore(moment(endDate).subtract(12, "month")); + const tooLate = moment(current.getTime()).isAfter(moment(endDate)); + return !!tooEarly || !!tooLate; }} format="YYYY-MM" onChange={(val) => onChange([val, endDate], timeType)} @@ -428,10 +426,9 @@ const StatisticalScopePicker = (props) => { value={endDate} disabled={disabled} disabledDate={(current) => { if (!current || !startDate) return false; - const start = moment(endDate).subtract(12, "months").format("YYYY-MM"); - const end = moment(endDate || startDate).add(12, "months").format("YYYY-MM"); - - return current.getTime() > new Date(end).getTime() || current.getTime() < new Date(startDate || start).getTime(); + const tooEarly = moment(current.getTime()).isAfter(moment(startDate).add(12, "month")); + const tooLate = moment(current.getTime()).isBefore(moment(startDate)); + return !!tooEarly || !!tooLate; }} format="YYYY-MM" viewAttr={viewAttr} From f1290a90431583018d26e8ba6e3605489508a7be 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, 28 Aug 2024 15:07:05 +0800 Subject: [PATCH 22/23] =?UTF-8?q?release/2.15.1.2407.01-=E4=B8=AA=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/declare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/apis/declare.js b/pc4mobx/hrmSalary/apis/declare.js index 7574b18a..746bcf99 100644 --- a/pc4mobx/hrmSalary/apis/declare.js +++ b/pc4mobx/hrmSalary/apis/declare.js @@ -254,7 +254,7 @@ export const employeedeclareExportTemplate = params => { }; //个税申报表申报数据-下载申报内置算税结果 export const exportGetDeclareTaxResultFeedback = params => { - return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportGetCompanyIncomes", params); + return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportGetDeclareTaxResultFeedback", params); }; //个税申报表申报数据-数据导入 export const taxdeclarationImportData = (params) => { From 70ff8325e2ae7b76619dbbcebf948d945e958576 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, 2 Sep 2024 14:24:53 +0800 Subject: [PATCH 23/23] =?UTF-8?q?release/2.15.1.2407.01-=E4=B8=AA=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/declareDetail/components/paymentBtn.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js index aed803a0..6fca282a 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js @@ -5,7 +5,7 @@ * Date: 2023/8/22 */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaLocaleProvider, WeaLoadingGlobal } from "ecCom"; import { inject, observer } from "mobx-react"; import { Button, message, Modal } from "antd"; import PaymentDialog from "./paymentDialog"; @@ -122,6 +122,7 @@ class PaymentBtn extends Component { }; getBankAccountInfo = (payload) => { let loop = () => { + WeaLoadingGlobal.start({ tip: getLabel(111, "获取三方信息中...") }); clearTimeout(this.timer); this.timer = setTimeout(async () => { let response = await taxPaymentgetAgreementFeedback(payload); @@ -129,6 +130,7 @@ class PaymentBtn extends Component { if (status) { const { finish, form } = data; if (finish) { + WeaLoadingGlobal.destroy(); const { feedbacks, bankForm } = form; const { paymentDialog } = this.state; this.setState({ @@ -174,6 +176,7 @@ class PaymentBtn extends Component { } else { message.warning(errormsg); clearTimeout(this.timer); + WeaLoadingGlobal.destroy(); } }, 800); };