diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 6f7f1ad1..1cd1c390 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -228,6 +228,10 @@ export const getColumnDesc = (params) => { export const updateLockStatus = (params) => { return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/updateLockStatus", params); }; +// 更新薪资核算结果的锁定状态 +export const updateLockEmpStatus = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/lockEmp", params); +}; // 导入薪资核算添加表头字段缓存 export const cacheImportField = (params) => { return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", params); @@ -250,6 +254,32 @@ 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); +}; +//薪资核算-删除自定义导出模板列表 +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); +}; +//薪资核算-薪资项目改变否 +export const getCompareSobConfig = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/compareSobConfig", "GET", params); +}; +//薪资核算-更新薪资账套 +export const updateSobConfig = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params); +}; + + //陕西万众-保存或新建模板 export const saveTemplate = (params) => { return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/saveTemplate", params); diff --git a/pc4mobx/hrmSalary/apis/custom-apis/index.js b/pc4mobx/hrmSalary/apis/custom-apis/index.js new file mode 100644 index 00000000..e69de29b diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js index 854c9bf6..92514839 100644 --- a/pc4mobx/hrmSalary/apis/index.js +++ b/pc4mobx/hrmSalary/apis/index.js @@ -1,4 +1,5 @@ import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; // form基础数据 export const getBaseForm = (params) => { @@ -19,3 +20,26 @@ export const getCondition = (params) => { export const getTableDatas = (params) => { return WeaTools.callApi("/api/demo03/weatableDemo", "GET", params); }; +//获取日志列表 +export const getLogs = params => { + const payload = { + ...params, module: "hrsa", dataset: "dataset", authParams: "{}", transMethod: "hrsa", + showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"}]" + }; + return postFetch("/api/bs/hrmelog/elog/getLogs", payload); +}; +//获取单条操作记录的更新明细 +export const getDetailChanges = params => { + const payload = { + ...params, module: "hrsa", detailTransMethod: "elogDemoDetail" + }; + return postFetch("/api/bs/hrmelog/elog/getDetailChanges", payload); +}; +//获取薪资账套全列表 +export const getSalarysobListAll = params => { + return postFetch("/api/bs/hrmsalary/salarysob/listAll", params); +}; +//补算 +export const supplementAcctRecord = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/supplementAcctRecord", params); +}; diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js index 0cb56cfe..b79a6718 100644 --- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js +++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js @@ -42,6 +42,9 @@ export const doSecondAuth = (params, headers) => { return formHeaderPost("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params, headers); // return WeaTools.callApi("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params); }; +export const getPasswordForm = params => { + return WeaTools.callApi("/api/hrm/secondarypwd/getPasswordForm", "GET", params); +}; export const checkPassword = params => { return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params); }; diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index 01048186..8ca9fab7 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -240,3 +240,11 @@ export const salaryBillBaseSetPreviewWaterMark = (params) => { export const getSmsSalaryItemSet = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/template/getSmsSalaryItemSet", "GET", params); }; +// 工资单导出PDF-检查 +export const genPdfBeforeExport = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/genPdfBeforeExport", "GET", params); +}; +//工资单预览 +export const salaryBillPreview = (params) => { + return postFetch("/api/bs/hrmsalary/salaryBill/preview", params); +}; diff --git a/pc4mobx/hrmSalary/apis/payrollFiles.js b/pc4mobx/hrmSalary/apis/payrollFiles.js index 7ebdb6bb..f2516b5a 100644 --- a/pc4mobx/hrmSalary/apis/payrollFiles.js +++ b/pc4mobx/hrmSalary/apis/payrollFiles.js @@ -1,5 +1,5 @@ import { WeaTools } from "ecCom"; -import { postFetch } from "../util/request"; +import { postExportFetch, postFetch } from "../util/request"; //获取薪资档案各tab的人数 export const queryTabTotal = (params) => { @@ -11,65 +11,69 @@ export const queryList = ({ url, ...params }) => { }; // 导入档案 export const importSalaryArchive = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/importSalaryArchive', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/importSalaryArchive", params); +}; // 薪资档案预览 export const salaryArchivePreview = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/preview', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/preview", params); +}; // 公共枚举接口 export const commonEnumList = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params); +}; // 获取导入类型 export const getImportTypes = () => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getImportTypes', 'GET', {}); -} + return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getImportTypes", "GET", {}); +}; // 发起调薪地址 export const salaryAdjustmentInfo = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/process/salaryAdjustmentInfo', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/process/salaryAdjustmentInfo", "GET", params); +}; // 停薪 export const stopSalary = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/stopSalary', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/stopSalary", params); +}; // 一键全部设为定薪员工 export const allGotoFixed = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoFixed', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoFixed", params); +}; // 设为定薪员工 export const gotoFixed = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/gotoFixed', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/gotoFixed", params); +}; // 停薪 export const gotoStop = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/gotoStop', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/gotoStop", params); +}; //全部停薪 export const allGotoStop = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoStop', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoStop", params); +}; // 取消停薪 export const cancelStop = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/cancelStop', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/cancelStop", params); +}; // 保存发薪设置 export const savePaySet = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/savePaySet', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/savePaySet", params); +}; // 待定薪删除待办 export const deletePendingTodo = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/deletePendingTodo', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/deletePendingTodo", params); +}; // 待停薪删除待办 export const deleteSuspendTodo = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo", params); +}; // 待定薪、停薪员工 是否允许删除薪资档案 export const salaryArchiveDelete = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete", "GET", params); +}; // 删除薪资档案 export const deleteSalaryArchive = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive", params); +}; +// 数据透视列表导出 +export const exportDataPerspective = (params) => { + return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportDataPerspective", params); +}; diff --git a/pc4mobx/hrmSalary/apis/standingBook.js b/pc4mobx/hrmSalary/apis/standingBook.js index 8cf772a5..5182ea00 100644 --- a/pc4mobx/hrmSalary/apis/standingBook.js +++ b/pc4mobx/hrmSalary/apis/standingBook.js @@ -43,7 +43,7 @@ export const inspectList = (params) => { }; //社会福利台账-删除正常缴纳人员 export const siaccountCommonDelete = (params) => { - return postFetch("/api/bs/hrmsalary/siaccount/common/delete", params); + return postFetch("/api/bs/hrmsalary/siaccount/supplementary/delete", params); }; //社会福利台账-添加正常缴纳人员 export const siaccountCommonSave = (params) => { @@ -197,3 +197,11 @@ export const getBalancePaymentGroup = params => { export const addNewBalance = params => { return postFetch("/api/bs/hrmsalary/siaccount/detail/addNewBalance", params); }; +// 导入社保台账添加表头字段缓存-正常缴纳以及补缴 +export const cacheWelfareListField = (params) => { + return postFetch("/api/bs/hrmsalary/siaccount/cacheWelfareList", params); +}; +// 导入社保台账添加表头字段缓存-补差缓存 +export const cacheBalanceWelfareList = (params) => { + return postFetch("/api/bs/hrmsalary/siaccount/cacheBalanceWelfareList", params); +}; diff --git a/pc4mobx/hrmSalary/apis/statistics.js b/pc4mobx/hrmSalary/apis/statistics.js index 3b70ee59..76056002 100644 --- a/pc4mobx/hrmSalary/apis/statistics.js +++ b/pc4mobx/hrmSalary/apis/statistics.js @@ -1,5 +1,5 @@ import { WeaTools } from "ecCom"; -import { postFetch } from "../util/request"; +import { postExportFetch, postFetch } from "../util/request"; //薪酬统计维度下拉列表 export const dimensionGetForm = (params) => { @@ -122,3 +122,15 @@ export const getExpandFieldSettings = (params) => { export const statisticsReportDuplicate = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/duplicate", "GET", params); }; +//薪酬统计报表-薪资明细列表 +export const getSalaryList = (params) => { + return postFetch("/api/bs/hrmsalary/report/statistics/employee/salaryList", params); +}; +//薪酬统计报表-薪资明细列表总计行 +export const getSalaryListSum = (params) => { + return postFetch("/api/bs/hrmsalary/report/statistics/employee/salaryListSum", params); +}; +// 薪酬统计报表-薪资明细导出 +export const exportSalaryList = (params) => { + return postExportFetch("/api/bs/hrmsalary/report/statistics/employee/exportSalaryList", 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/components/captchaModal/index.js b/pc4mobx/hrmSalary/components/captchaModal/index.js index 35661772..a7f00b9b 100644 --- a/pc4mobx/hrmSalary/components/captchaModal/index.js +++ b/pc4mobx/hrmSalary/components/captchaModal/index.js @@ -36,7 +36,6 @@ class Index extends Component { handleSendCaptcha = () => { sendMobileCode({ id: this.props.id }).then(({ status, data }) => { if (status) { - console.log(data); this.timeRef = setInterval(() => { const { time } = this.state; this.setState({ time: time - 1 }, () => { diff --git a/pc4mobx/hrmSalary/components/custom-title/weaReqTitle/index.js b/pc4mobx/hrmSalary/components/custom-title/weaReqTitle/index.js new file mode 100644 index 00000000..69766076 --- /dev/null +++ b/pc4mobx/hrmSalary/components/custom-title/weaReqTitle/index.js @@ -0,0 +1,17 @@ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaReqTop } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + render() { + return ( + } iconBgcolor="#F14A2D" + showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props} + /> + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/custom-title/weaTopTitle/index.js b/pc4mobx/hrmSalary/components/custom-title/weaTopTitle/index.js new file mode 100644 index 00000000..d265c8eb --- /dev/null +++ b/pc4mobx/hrmSalary/components/custom-title/weaTopTitle/index.js @@ -0,0 +1,15 @@ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTop } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + render() { + return ( + } + iconBgcolor="#F14A2D" {...this.props}/> + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js index 91f3e690..0afc13f4 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js @@ -5,9 +5,11 @@ * Date: 2023/9/5 */ import React, { Component } from "react"; -import { WeaTable } from "ecCom"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; import { postFetch } from "../../../util/request"; +const { getLabel } = WeaLocaleProvider; + class ImpStep2 extends Component { constructor(props) { super(props); @@ -41,9 +43,15 @@ class ImpStep2 extends Component { render() { const { dataSource, columns, loading } = this.state; const { scrollHeight } = this.props; + const pagination = { + showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, + total: dataSource.length, + showSizeChanger: true + }; return ( ); } diff --git a/pc4mobx/hrmSalary/components/importDialog/index.less b/pc4mobx/hrmSalary/components/importDialog/index.less index 95cee40b..d37389ea 100644 --- a/pc4mobx/hrmSalary/components/importDialog/index.less +++ b/pc4mobx/hrmSalary/components/importDialog/index.less @@ -120,6 +120,58 @@ } } + .import-option { + .screenWrapper { + padding: 0; + margin: 10px; + border: 1px solid #e5e5e5; + + .wea-content { + padding: 0; + } + + .wea-form-cell { + padding: 0 16px; + + .wea-date-picker { + width: 85%; + } + } + + .wea-helpful-tip { + padding-left: 10px; + } + } + + .attendanceFormWrapper { + padding: 0 10px; + margin: 10px 0; + border: 1px solid #e5e5e5; + + .wea-form-cell { + padding: 0 !important; + } + + .wea-select { + width: 200px !important; + } + + .ant-select-selection, .ant-select { + width: 100%; + } + + .wea-select { + display: inline-block; + position: relative; + } + + .ant-select-selection { + height: 30px; + border-radius: 0; + } + } + } + } } diff --git a/pc4mobx/hrmSalary/components/logViewModal/components/detailLogView/index.js b/pc4mobx/hrmSalary/components/logViewModal/components/detailLogView/index.js new file mode 100644 index 00000000..f19e1c05 --- /dev/null +++ b/pc4mobx/hrmSalary/components/logViewModal/components/detailLogView/index.js @@ -0,0 +1,80 @@ +/* + * Author: 黎永顺 + * name: 日志查看-详情 + * Description: + * Date: 2024/1/25 + */ +import React, { Component } from "react"; +import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom"; +import * as API from "../../../../apis"; + +const getLabel = WeaLocaleProvider.getLabel; +const WeaTransferList = WeaTransfer.list; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + dataSource: [], loading: false + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.getDetailChanges(nextProps); + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ + dataSource: [], + loading: false + }); + } + + getDetailChanges = (props) => { + const { mainid, logFunction } = props; + const payload = { function: logFunction, mainid }; + this.setState({ loading: true }); + API.getDetailChanges(payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + this.setState({ + dataSource: _.map(data, (o, i) => ({ + ...o, index: i + 1, + valueschanges: _.map(o.valueschanges, (g, gi) => ({ id: gi + 1, name: g })) + })) + }); + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { dataSource } = this.state; + const scrollHeight = this.logDetailRef ? this.logDetailRef.state.height - 32 : 606.6; + return ( + this.logDetailRef = dom} + style={{ + width: 750, + height: 606.6, + minHeight: 200, + minWidth: 380, + maxHeight: "90%", + maxWidth: "90%", + overflow: "hidden", + transform: "translate(0px, 0px)" + }} + > +
+ { + _.map(dataSource, item => (!_.isEmpty(item.valueschanges) ? (
+
{it.id}
+
{it.name}
+
)} + height={scrollHeight} checkedCb={() => ({})} checkedKeys={[]} + /> :
{getLabel(111, "无数据变更记录")}
)) + } +
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/logViewModal/config.js b/pc4mobx/hrmSalary/components/logViewModal/config.js new file mode 100644 index 00000000..f3b3189a --- /dev/null +++ b/pc4mobx/hrmSalary/components/logViewModal/config.js @@ -0,0 +1,88 @@ +import React from "react"; +import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom"; +import { WeaSwitch } from "comsMobx"; +import { Button } from "antd"; + +const getKey = WeaTools.getKey; +const getLabel = WeaLocaleProvider.getLabel; +export const logConditions = [ + { + items: [ + { + conditionType: "RANGEPICKER", + domkey: ["date"], + fieldcol: 18, + label: "操作时间", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["operator"], + fieldcol: 18, + label: "操作人", + lanId: 17482, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["targetname"], + fieldcol: 18, + label: "对象", + lanId: 106, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["operatetypename"], + fieldcol: 18, + label: "操作类型", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + } + ], + defaultshow: true, + title: "" + } +]; + +export const renderLogSearchsForm = (form, condition, onSearch = () => void (0), onReset = () => void (0)) => { + const { isFormInit } = form; + const formParams = form.getFormParams(); + let group = []; + isFormInit && condition && condition.map(c => { + let items = []; + c.items.map(fields => { + items.push({ + com: ( + + + { + getKey(fields) === "operatetypename" && +
+ + +
+ } +
), + colSpan: 1 + }); + }); + group.push( + ); + }); + return group; +}; diff --git a/pc4mobx/hrmSalary/components/logViewModal/index.js b/pc4mobx/hrmSalary/components/logViewModal/index.js index d95ceb25..1867b765 100644 --- a/pc4mobx/hrmSalary/components/logViewModal/index.js +++ b/pc4mobx/hrmSalary/components/logViewModal/index.js @@ -1,99 +1,130 @@ -import React from 'react' -import { Button, Modal } from 'antd'; -import { WeaInput, WeaRangePicker, WeaTable} from 'ecCom' -import { logColumns, dataSource } from "../../common/columns" +/* + * Author: 黎永顺 + * name: 薪酬日志查看 + * Description: + * Date: 2024/1/24 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom"; +import DetailLogView from "./components/detailLogView"; +import { logConditions, renderLogSearchsForm } from "./config"; +import * as API from "../../apis/index"; +import "./index.less"; -export default class LogViewModal extends React.Component { - constructor(props) { - super(props) - this.state ={ - value: "" - } +const getLabel = WeaLocaleProvider.getLabel; + +@inject("baseFormStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, + loading: false, conditions: [], logDetailDialog: { visible: false, title: "", logFunction: "", mainid: "" } + }; + } + + componentDidMount() { + const { baseFormStore: { form } } = this.props; + this.setState({ + conditions: _.map(logConditions, it => ({ + ...it, items: _.map(it.items, o => ({ ...o, label: getLabel(o.lanId, o.label) })) + })) + }, () => form.initFormFields(this.state.conditions)); + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.getLogs({}, nextProps); + if (nextProps.visible !== this.props.visible && !nextProps.visible) { + this.setState({ + dataSource: [], columns: [], pageInfo: { current: 0, pageSize: 10, total: 0 }, + loading: false + }); } - render() { - return ( - alert("ok")} onCancel={this.props.onCancel} - className="logViewModal" - style={{ top: 150 }} - width={'80%'} height={'50%'} - > -
-
-
操作时间
-
- this.setState({ value: v })} - /> -
-
-
-
操作人
-
- { - console.log(value); - this.setState({ value }); - }} - customBlur={v => { - console.log("custom blur", v); - }} - onFocus={v => console.log("focus", v)} - onBlur={v => console.log("blur", v)} - /> -
-
+ } -
-
对象
-
- { - console.log(value); - this.setState({ value }); - }} - customBlur={v => { - console.log("custom blur", v); - }} - onFocus={v => console.log("focus", v)} - onBlur={v => console.log("blur", v)} - /> -
-
+ getLogs = (extra = {}, props) => { + const { pageInfo } = this.state; + const { baseFormStore: { form }, logFunction, filterConditions } = props; + const payload = { + ...pageInfo, ...extra, searchMap: { ...form.getFormParams() }, + function: logFunction, showColums: "", filterConditions + }; + this.setState({ loading: true }); + API.getLogs(payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, list: dataSource, pageNum: current, pageSize, total } = data; + this.setState({ + pageInfo: { ...pageInfo, current, pageSize, total }, + dataSource, columns: _.map(columns, it => { + if (it.dataIndex === "operatedesc") { + return { + ...it, render: (__, record) => ( { + const { operatedesc: title, uuid: mainid } = record; + this.setState({ logDetailDialog: { visible: true, title, logFunction, mainid } }); + }}>{getLabel(33564, "查看")}) + }; + } + return { ...it }; + }) + }); + } + }).catch(() => this.setState({ loading: false })); + }; -
-
操作类型
-
- { - console.log(value); - this.setState({ value }); - }} - customBlur={v => { - console.log("custom blur", v); - }} - onFocus={v => console.log("focus", v)} - onBlur={v => console.log("blur", v)} - /> -
-
- -
- -
-
- -
- ) - } -} \ No newline at end of file + render() { + const { loading, dataSource, columns, pageInfo, conditions, logDetailDialog } = this.state; + const { baseFormStore: { form } } = this.props; + 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.getLogs({}, this.props)); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.getLogs({}, this.props)); + } + }; + const scrollHeight = this.logRef ? this.logRef.state.height - 254 : 606.6; + return ( + this.logRef = dom} className="logDialog" initLoadCss + style={{ + width: 1150, + height: 606.6, + minHeight: 200, + minWidth: 380, + maxHeight: "90%", + maxWidth: "90%", + overflow: "hidden", + transform: "translate(0px, 0px)" + }} + > +
+ {renderLogSearchsForm(form, conditions, () => this.getLogs({ current: 1 }, this.props), () => { + form.resetForm(); + this.getLogs({ current: 1 }, this.props); + })} + + this.setState({ logDetailDialog: { ...logDetailDialog, visible: false } })}/> +
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/logViewModal/index.less b/pc4mobx/hrmSalary/components/logViewModal/index.less new file mode 100644 index 00000000..1d54174f --- /dev/null +++ b/pc4mobx/hrmSalary/components/logViewModal/index.less @@ -0,0 +1,85 @@ +.logDialog { + .wea-dialog-body { + overflow-y: hidden; + } + + .logDialogContent { + background: #F6F6F6; + padding: 16px; + width: 100%; + height: 100%; + + .empty { + width: 100%; + display: flex; + height: 100%; + justify-content: center; + align-items: center; + background: #ffff; + } + + .wea-search-group { + padding: 0; + margin-bottom: 10px; + background: #FFF; + + .wea-form-cell { + padding: 0; + + .wea-form-item { + padding: 10px; + } + } + } + + .logTable { + background: #FFFFFF; + } + + .wea-transfer-list-wrapper { + border: none; + + .ant-tree-switcher { + display: none; + } + + .transfer-tree { + background: #FFF; + border: 1px solid #dadada; + padding: 0; + + & > li:not(:last-child) { + .detailBox .content { + border-bottom: 1px solid #dadada; + } + } + + & > li { + margin: 0 !important; + + .detailBox { + display: flex; + align-items: center; + + .order { + width: 35px; + color: #999; + text-align: center; + } + + .content { + position: relative; + flex: 1; + min-height: 40px; + line-height: 40px; + color: #000; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + } + } + } + } +} diff --git a/pc4mobx/hrmSalary/components/mobileTemplate/index.js b/pc4mobx/hrmSalary/components/mobileTemplate/index.js index 18de0574..ca9c8b63 100644 --- a/pc4mobx/hrmSalary/components/mobileTemplate/index.js +++ b/pc4mobx/hrmSalary/components/mobileTemplate/index.js @@ -14,7 +14,7 @@ const getLabel = WeaLocaleProvider.getLabel; class Index extends Component { render() { const { theme, background, tip, tipPosi, itemTypeList, title } = this.props; - const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "mobile"); + const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "mobile"); return ( {/*
{title || getLabel(111, "薪酬预览")}
*/} diff --git a/pc4mobx/hrmSalary/components/moreBtnMenu/index.js b/pc4mobx/hrmSalary/components/moreBtnMenu/index.js new file mode 100644 index 00000000..003705c9 --- /dev/null +++ b/pc4mobx/hrmSalary/components/moreBtnMenu/index.js @@ -0,0 +1,62 @@ +/* + * Author: 黎永顺 + * name: 更多菜单列表 + * Description: + * Date: 2023/12/28 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Menu } from "antd"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + showDrop: false + }; + } + + render() { + const { showDrop } = this.state; + const { dropMenuDatas } = this.props; + const menu = dropMenuDatas ? + { + dropMenuDatas.forEach(d => d.key === o.key && typeof d.onClick === "function" && d.onClick(o.key)); + }}> + { + dropMenuDatas && dropMenuDatas.map((d, i) => { + return ( + + {d.icon} + {d.content} + + ); + })} + : ""; + return ( +
+ { + !_.isEmpty(dropMenuDatas) && + this.setState({ showDrop: true })}> + + + } +
this.setState({ showDrop: false })} + style={{ display: showDrop ? "block" : "none" }}> + this.setState({ showDrop: false })}> + + +
+ {menu} +
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/moreBtnMenu/index.less b/pc4mobx/hrmSalary/components/moreBtnMenu/index.less new file mode 100644 index 00000000..9954df06 --- /dev/null +++ b/pc4mobx/hrmSalary/components/moreBtnMenu/index.less @@ -0,0 +1,86 @@ +.more-btn-menu-wrapper { + position: relative; + + .more-btn { + display: inline-block; + padding-left: 20px; + line-height: 40px; + vertical-align: middle; + cursor: pointer; + + .more-btn-icon { + font-size: 16px; + color: #484848; + cursor: pointer; + } + } + + .more-btn-menu { + max-width: 200px; + position: absolute; + right: -14px; + top: 45px; + border: 1px solid #dadada; + -webkit-box-shadow: 0 0 2px #dadada; + box-shadow: 0 0 2px #dadada; + z-index: 99; + -webkit-box-sizing: border-box; + box-sizing: border-box; + background: #FFF; + + .more-btn { + display: block; + -webkit-box-sizing: border-box; + box-sizing: border-box; + height: 44px; + line-height: 35px; + position: absolute; + right: -1px; + top: -44px; + padding: 0 13px; + border: 1px solid #dadada; + border-bottom: 0; + -webkit-box-shadow: 0 -1px 2px -1px #dadada; + box-shadow: 0 -1px 2px -1px #dadada; + background-color: #fff; + } + + .more-btn-menu-icon-background { + width: 36px; + height: 100%; + background-color: #f2f5f7; + border: 1px solid #dadada; + border-right: 0; + position: absolute; + top: -1px; + left: -1px; + z-index: 0; + -webkit-box-sizing: content-box; + box-sizing: content-box; + } + + .ant-menu { + margin: 10px 0; + border: 0; + text-align: left; + min-width: 120px; + + .ant-menu-item { + height: 30px; + line-height: 30px; + padding: 0 5px 0 0; + overflow: hidden; + white-space: nowrap; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + + .menu-icon { + display: inline-block; + width: 36px; + margin-right: 6px; + text-align: center; + } + } + } + } +} diff --git a/pc4mobx/hrmSalary/components/pcTemplate/content.js b/pc4mobx/hrmSalary/components/pcTemplate/content.js index 310999d6..6bc3c60e 100644 --- a/pc4mobx/hrmSalary/components/pcTemplate/content.js +++ b/pc4mobx/hrmSalary/components/pcTemplate/content.js @@ -7,7 +7,7 @@ const getLabel = WeaLocaleProvider.getLabel; class Content extends Component { render() { const { theme, background, tip, tipPosi, itemTypeList, sendTime = new Date() } = this.props; - const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "pc"); + const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc"); return (
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({}); // 未分类不展示标题 diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/index.js b/pc4mobx/hrmSalary/components/selectItemsModal/index.js index b7d01a5d..cae0464d 100644 --- a/pc4mobx/hrmSalary/components/selectItemsModal/index.js +++ b/pc4mobx/hrmSalary/components/selectItemsModal/index.js @@ -9,7 +9,6 @@ import { WeaCheckbox, WeaDialog, WeaInputSearch } from "ecCom"; import { Button } from "antd"; import "./index.less"; - export default class SelectItemModal extends React.Component { constructor(props) { super(props); @@ -58,10 +57,19 @@ export default class SelectItemModal extends React.Component { const bottomLeft = ; return ( {children} diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/index.less b/pc4mobx/hrmSalary/components/selectItemsModal/index.less index 6486a98c..7572d9da 100644 --- a/pc4mobx/hrmSalary/components/selectItemsModal/index.less +++ b/pc4mobx/hrmSalary/components/selectItemsModal/index.less @@ -19,7 +19,7 @@ flex-wrap: wrap; li { - width: 124px; + width: 140px; overflow: hidden; padding: 4px 0; diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js b/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js index 1a0d44d0..81c29aed 100644 --- a/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js +++ b/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js @@ -11,21 +11,22 @@ class SelectItemsWrapper extends Component { constructor(props) { super(props); this.state = { - searchVal: "", - selectItem: [], - groupItem: [], - showOnlyChecked: false + searchVal: "", selectItem: [], groupItem: [], showOnlyChecked: false }; } componentDidMount() { - const { dataSource } = this.props + this.initSelectItem(); + } + + initSelectItem = () => { + const { dataSource } = this.props; this.setState({ selectItem: _.map(_.filter(_.reduce(dataSource, (pre, cur) => { return [...pre, ...cur.items]; }, []), item => !!item.checked), it => it.id) }); - } + }; handleSearchItemSet = (searchVal) => this.setState({ searchVal }); handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) }); diff --git a/pc4mobx/hrmSalary/custom-components/index.js b/pc4mobx/hrmSalary/custom-components/index.js new file mode 100644 index 00000000..e69de29b diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 8935c086..aff0d014 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -40,7 +40,7 @@ import TemplatePreview from "./pages/payroll/templatePreview"; import PayrollTemplatePreview from "./pages/payroll/templatePreview/tmpPreview"; //重构的工资单模板预览页面 import MobilePayroll from "./pages/mobilePayroll"; import SysConfig from "./pages/sysConfig"; -import RuleConfig from "./pages/ruleConfig"; +import RuleConfig from "./pages/ruleConfig/ruleConfig"; import Appconfig from "./pages/appConfig"; import FieldManagement from "./pages/fieldManagement"; import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics"; @@ -51,6 +51,7 @@ import WatermarkPreview from "./pages/payroll/watermarkPreview"; import ExternalPersonManage from "./pages/externalPersonManage"; import AdjustSalaryManage from "./pages/adjustSalaryManage"; import TopologyMap from "./pages/topologyMap"; +import SupplementaryCalc from "./pages/supplementaryCalc"; import stores from "./stores"; import "./style/index"; @@ -110,43 +111,26 @@ const DataAcquisition = (props) => props.children; // reportView 薪酬报表查看 // externalPersonManage 非系统人员管理 // adjustSalaryManage 档案管理 +// supplementaryCalc 补算 const Routes = ( - + - + - - + + - + @@ -168,11 +152,7 @@ const Routes = ( - + @@ -185,6 +165,7 @@ const Routes = ( + ); diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js index e57ffa58..d2c71fb3 100644 --- a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js +++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js @@ -11,10 +11,10 @@ import { adjustRecordItemList } from "../../apis/adjustManage"; import AdvanceInputBtn from "./components/advanceInputBtn"; import AdjustAdvanceSearchPannel from "./components/adjustAdvanceSearchPannel"; import cs from "classnames"; -import { Button } from "antd"; -import "./index.less"; +import { Button, Dropdown, Menu } from "antd"; import { convertToUrlString } from "../../util/url"; - +import LogDialog from "../../components/logViewModal"; +import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -25,7 +25,8 @@ class Index extends Component { super(props); this.state = { loading: false, columns: [], dataSource: [], showSearchAd: false, - pageInfo: { current: 1, pageSize: 10, total: 0 } + pageInfo: { current: 1, pageSize: 10, total: 0 }, logDialogVisible: false, + filterConditions: "[]" }; } @@ -50,19 +51,33 @@ class Index extends Component { effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [], operateTime: operateTime1 ? [operateTime1, operateTime2] : [] }; - this.setState({ loading: true }); + this.setState({ loading: true, showSearchAd: false }); adjustRecordItemList(payload).then(({ status, data }) => { this.setState({ loading: false }); if (status) { const { columns, list: dataSource, pageNum, pageSize, total } = data; this.setState({ dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total }, - columns: _.map(columns, o => { + columns: [..._.map(columns, o => { if (o.dataIndex === "username") { return { ...o, width: 150, fixed: "left" }; } return { ...o, width: 150 }; - }) + }), { + dataIndex: "options", title: getLabel(30585, "操作"), + width: 120, render: (_, record) => ( + + + this.onDropMenuClick("log", record.id)}>{getLabel(545781, "操作日志")} + + + }> + + ) + }] }); } }).catch(() => this.setState({ loading: false })); @@ -88,9 +103,21 @@ class Index extends Component { } this.handleDebounce(); }; + onDropMenuClick = (key, targetid = "") => { + switch (key) { + case "log": + this.setState({ + logDialogVisible: true, + filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]" + }); + break; + default: + break; + } + }; render() { - const { loading, dataSource, columns, pageInfo, showSearchAd } = this.state; + const { loading, dataSource, columns, pageInfo, showSearchAd, logDialogVisible, filterConditions } = this.state; const pagination = { ...pageInfo, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, @@ -111,11 +138,17 @@ class Index extends Component { return ( } iconBgcolor="#F14A2D" + icon={} iconBgcolor="#F14A2D" showDropIcon buttons={[ , this.openAdvanceSearch()} onAdvanceSearch={this.adjustRecordItemList}/> + ]} onDropMenuClick={this.onDropMenuClick} + dropMenuDatas={[ + { + key: "log", icon: , + content: getLabel(545781, "操作日志") + } ]} >
@@ -129,6 +162,9 @@ class Index extends Component { dataSource={dataSource} loading={loading} pagination={pagination} columns={columns} /> + {/*操作日志*/} + this.setState({ logDialogVisible: false })}/> ); } diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.js new file mode 100644 index 00000000..86a5f416 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.js @@ -0,0 +1,33 @@ +/* + * Author: 黎永顺 + * name:薪酬统计报表-高级搜索 + * Description: + * Date: 2024/3/26 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { Button } from "antd"; +import { WeaInputSearch, WeaLocaleProvider } from "ecCom"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +@inject("attendanceStore") +@observer +class Index extends Component { + render() { + const { attendanceStore: { salaryDetailSearchForm } } = this.props; + return ( +
+ salaryDetailSearchForm.updateFields({ keyword: v })} + onSearch={this.props.onAdvanceSearch} + /> + +
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.less new file mode 100644 index 00000000..9081d39f --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.less @@ -0,0 +1,29 @@ +.achrive-advance-search { + display: flex; + align-items: center; + position: relative; + top: -1.5px; + + .wea-advanced-search { + top: 2px; + left: -1px; + height: 28px; + line-height: 1; + border-radius: 0; + position: relative; + color: #474747; + padding: 4px 15px; + } + + .wea-advanced-search:hover { + border: 1px solid #dadada; + color: #474747; + } + + .text-elli { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + top: 1px; + } +} diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js index fe2554e4..6a19614c 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js @@ -1,3 +1,4 @@ +import React from "react"; import { WeaLocaleProvider } from "ecCom"; const { getLabel } = WeaLocaleProvider; @@ -27,7 +28,10 @@ export const condition = [ labelcol: 6, options: [], rules: "required|string", - viewAttr: 3 + viewAttr: 3, + otherParams: { + showSearch: true, optionFilterProp: "children" + } }, { colSpan: 1, @@ -128,3 +132,90 @@ export const extensionCondition = [ defaultshow: true } ]; +export const salaryDetailSearchConditions = [ + { + items: [ + { + conditionType: "INPUT", + domkey: ["keyword"], + fieldcol: 16, + label: getLabel(111, "姓名/工号"), + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "SELECT", + domkey: ["taxAgentIds"], + fieldcol: 16, + label: getLabel(537996, "个税扣缴义务人"), + labelcol: 8, + options: [], + multiple: true, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "164", + viewAttr: 2 + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["subcompanyIds"], + fieldcol: 16, + label: getLabel(33553, "分部"), + labelcol: 8, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "57", + viewAttr: 2 + }, + conditionType: "BROWSER", + domkey: ["departmentIds"], + fieldcol: 16, + label: getLabel(27511, "部门"), + labelcol: 8, + viewAttr: 2 + } + ], + defaultshow: true, + title: getLabel(1361, "基本信息"), + col: 2 + } +]; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js index dc89547d..48816b74 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js @@ -6,6 +6,7 @@ */ import React, { Component } from "react"; import { WeaLocaleProvider, WeaTable } from "ecCom"; +import { Dropdown, Menu } from "antd"; import { statisticsEmployeeList } from "../../../apis/statistics"; import "../index.less"; @@ -52,10 +53,23 @@ class EmployeeDetails extends Component { columns: [...columns, { title: "操作", dataIndex: "operate", - width: 80, + width: 120, render: (_, record) => { - return {getLabel(111, "查看")}; + return + {getLabel(111, "查看")} + + + this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")} + + + }> + + + ; } }] }); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js index ba66eec2..dccae63f 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js @@ -44,6 +44,8 @@ class ReportList extends Component { message.error(errormsg); } }); + } else if (key === "log") { + this.props.onFilterLog(key, id); } }; reportStatisticsReportDelete = (payload) => { @@ -106,6 +108,7 @@ class ReportList extends Component { {getLabel(111, "编辑")} {getLabel(77, "复制")} {getLabel(111, "删除")} + {getLabel(545781, "操作日志")} }> diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js new file mode 100644 index 00000000..3f01a8bf --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -0,0 +1,159 @@ +/* + * Author: 黎永顺 + * name:薪资明细列表 + * Description: + * Date: 2024/3/26 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { toJS } from "mobx"; +import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom"; +import { WeaTableNew } from "comsMobx"; +import { message, Spin } from "antd"; +import * as API from "../../../apis/statistics"; +import { getIframeParentHeight } from "../../../util"; +import { sysConfCodeRule } from "../../../apis/ruleconfig"; +import "../index.less"; + +const WeaTableComx = WeaTableNew.WeaTable; +const { getLabel } = WeaLocaleProvider; + +@inject("attendanceStore") +@observer +class SalaryDetails extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, dataSource: [], columns: [], selectedRowKeys: [], + pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, + showTotalCell: false, updateSum: true + }; + } + + componentDidMount() { + this.getSalaryList(this.props); + window.addEventListener("message", this.handleReceive, false); + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.isQuery !== this.props.isQuery) this.setState({ + pageInfo: { ...this.state.pageInfo, current: 1 }, updateSum: true + }, () => this.getSalaryList(nextProps)); + } + + componentWillUnmount() { + window.removeEventListener("message", this.handleReceive, false); + this.setState(({ selectedRowKeys: [] })); + } + + handleReceive = ({ data }) => { + const { type, payload: { id, params } = {} } = data; + const { pageInfo } = this.state; + if (type === "init") { + this.getColumns(); + } else if (type === "turn") { + if (id === "PAGEINFO") { + const { pageNum: current, size: pageSize } = params; + this.setState({ + pageInfo: { ...pageInfo, current, pageSize }, + updateSum: false + }, () => this.getSalaryList(this.props)); + } else if (id === "CHECKBOX") { + const { selectedRowKeys: checkBox } = params; + this.setState({ selectedRowKeys: checkBox, updateSum: false }); + } + } + }; + postMessageToChild = (payload) => { + const i18n = { + "共": getLabel(18609, "共"), "条": getLabel(18256, "条"), + "总计": getLabel(523, "总计") + }; + const childFrameObj = document.getElementById("atdTable"); + childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); + }; + getSalaryList = (props) => { + const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props; + const [startDateStr, endDateStr] = dateRange; + const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams(); + const { pageInfo } = this.state; + const payload = { + taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [], + departmentIds: departmentIds ? departmentIds.split(",") : [], + subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [], + ...extra, ...pageInfo, startDateStr, endDateStr + }; + this.setState({ loading: true }); + API.getSalaryList(payload).then(async ({ status, data }) => { + // API.getSalaryListSum(payload), + const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]); + this.setState({ loading: false }); + if (status) { + const { dataKey, pageInfo: pageparams } = data; + const { list: dataSource, pageNum: current, total, pageSize } = pageparams; + this.setState({ + dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload, + showTotalCell: confCode === "1" + }, () => tableStore.getDatas(dataKey.datas)); + } + }).catch(() => this.setState({ loading: false })); + }; + handleExportSalaryList = (key) => { + const { attendanceStore: { tableStore } } = this.props; + let { selectedRowKeys, payload } = this.state; + if (key === "SELECTED" && selectedRowKeys.length === 0) { + message.warning(getLabel(543345, "请选择需要导出的数据!")); + return; + } + WeaLoadingGlobal.start(); + const promise = API.exportSalaryList({ + ...payload, ids: key === "SELECTED" ? selectedRowKeys : [], + columns: _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"), o => o.dataIndex) + }); + }; + getColumns = () => { + const { attendanceStore: { tableStore } } = this.props; + const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum } = this.state; + const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); + const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/report/statistics/employee/salaryListSum" : ""; + if (!_.isEmpty(columns)) { + this.postMessageToChild({ + dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, + sumRowlistUrl, payload: { ...payload, updateSum }, + columns: _.map(columns, (it, idx) => ({ + ...it, + width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth, + fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "", + ellipsis: true + })) + }); + } + return []; + }; + + render() { + const { loading, dataSource } = this.state; + const { attendanceStore: { tableStore } } = this.props; + return ( +
+ +