diff --git a/pc4mobx/hrmSalary/apis/statistics.js b/pc4mobx/hrmSalary/apis/statistics.js index 76056002..17323093 100644 --- a/pc4mobx/hrmSalary/apis/statistics.js +++ b/pc4mobx/hrmSalary/apis/statistics.js @@ -134,3 +134,7 @@ export const getSalaryListSum = (params) => { export const exportSalaryList = (params) => { return postExportFetch("/api/bs/hrmsalary/report/statistics/employee/exportSalaryList", params); }; +//薪酬统计报表-保存全局自定义列配置 +export const savePageListSetting = (params) => { + return postFetch("/api/bs/hrmsalary/common/pageList/save/setting", params); +}; diff --git a/pc4mobx/hrmSalary/apis/variableSalary.js b/pc4mobx/hrmSalary/apis/variableSalary.js index 8cd818b5..1bd063d0 100644 --- a/pc4mobx/hrmSalary/apis/variableSalary.js +++ b/pc4mobx/hrmSalary/apis/variableSalary.js @@ -44,7 +44,7 @@ export const getVariableSalaryDetail = params => { }; // 获取当前管理员下的所有的个税扣缴义务人 export const getAdminTaxAgentList = () => { - return WeaTools.callApi("/api/bs/hrmsalary/siaccount/getAdminTaxAgentList", "get", {}); + return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/selectList", "GET", { isShare: false }); }; // 浮动薪酬档案导出 export const exportVariableSalary = (params) => { diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js new file mode 100644 index 00000000..919ec05c --- /dev/null +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js @@ -0,0 +1,206 @@ +/* + * 自定义穿梭框组件 + * 弹框选择 + * @Author: 黎永顺 + * @Date: 2024/8/30 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll } from "ecCom"; +import { Button, Col, Row, Spin } from "antd"; +import CustomBrowserMutiLeft from "./customBrowserMutiLeft"; +import CustomBrowserMutiRight from "./customBrowserMutiRight"; +import CustomBrowserOperation from "./customBrowserOperation"; +import { postFetch } from "../../../util/request"; +import "../index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class CustomTransferDialog extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, listDatas: [], + query: { [props.searchParamsKey]: "" }, + leftListSelectedKeys: [], // 左侧table选择的keys + leftListSelectedData: [], // 左侧table选择的数据 + rightCheckedKeys: [], //右侧选择的keys + rightDatas: [] // 右侧展示的数据 + }; + this.selectedData = {}; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + this.getData(true); + if (nextProps.datas) { + this.setState({ + leftListSelectedData: _.values(nextProps.datas), rightDatas: _.values(nextProps.datas) + }); + } + } else if (nextProps.visible !== this.props.visible && !nextProps.visible) { + this.setState({ + query: { [this.props.searchParamsKey]: "" }, + rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: [] + }); + this.selectedData = {}; + } + } + + getData = (init = false) => { + const { query } = this.state; + const { completeURL, convertDatasource, dataParams = {} } = this.props; + let payload = { ...dataParams, ...query }; + this.setState({ loading: true }); + postFetch(completeURL, payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status && data.list) { + const { pageNum: current, pageSize, total } = data; + this.setState({ + listDatas: convertDatasource ? convertDatasource(data.list) : data.list + }); + } else { + this.setState({ + listDatas: convertDatasource ? convertDatasource(data).listDatas : [], + leftListSelectedData: (init && convertDatasource) ? convertDatasource(data).checked : this.state.leftListSelectedData, + rightDatas: (init && convertDatasource) ? convertDatasource(data).checked : this.state.rightDatas + }); + } + }); + }; + handleOk = () => { + const { rightDatas } = this.state; + this.props.onChange && this.props.onChange(rightDatas); + }; + onLeftListCheck = (keys, datas) => { + const { leftListSelectedData } = this.state; + let targets = leftListSelectedData.concat(datas); + targets = _.uniqBy(targets, "id"); + targets = targets.filter((t) => keys.indexOf(t["id"]) > -1); + this.setState({ leftListSelectedKeys: keys, leftListSelectedData: targets }); + }; + onleftDoubleClick = (data) => { + const { rightDatas } = this.state; + this.setState({ + rightDatas: rightDatas.concat(data), + rightCheckedKeys: [], + leftListSelectedData: [], + leftListSelectedKeys: [] + }); + }; + onRightDoubleClick = (key) => { + const { rightDatas } = this.state; + const newRightDatas = rightDatas.filter(item => String(item.id) !== key); + this.setState({ rightDatas: newRightDatas, rightCheckedKeys: [] }); + }; + moveTo = (direction) => { + const { rightDatas, rightCheckedKeys, listDatas, leftListSelectedData } = this.state; + if (direction === "right") { + this.setState({ + rightDatas: rightDatas.concat(leftListSelectedData), + leftListSelectedData: [], + leftListSelectedKeys: [] + }); + } else if (direction === "left") { + this.setState({ + rightDatas: rightDatas.filter(item => !rightCheckedKeys.some(checkedKey => String(item.id) === checkedKey)), + rightCheckedKeys: [] + }); + } else if (direction === "allToLeft") { + this.setState({ rightDatas: [], rightCheckedKeys: [] }); + } else if (direction === "allToRight") { + if (this.leftListAllActive()) { + this.setState({ + rightDatas: rightDatas.concat(listDatas), + rightCheckedKeys: [], + leftListSelectedData: [], + leftListSelectedKeys: [] + }); + } + } + }; + leftListAllActive = () => { + const { rightDatas, listDatas } = this.state; + let bool = true; + if (_.isEmpty(listDatas)) bool = false; + if (!_.isEmpty(listDatas) && !_.isEmpty(rightDatas)) { + bool = listDatas.filter((l) => !rightDatas.some(r => l.id === r.id)).length !== 0; + } + return bool; + }; + renderTitle = () => { + return (
+ {getLabel(111, "数据选择")} +
+
); + }; + + render() { + const { loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys } = this.state; + const { searchParamsKey, saveLoading } = this.props; + const buttons = [ + , + ]; + let rightActive = false, leftActive = false, rightAllActive = false; + if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true; + if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true; + if (rightDatas && rightDatas.length > 0) rightAllActive = true; + let dom = +
+
+ + + this.getData()} + onChange={value => this.setState({ query: { ...query, [searchParamsKey]: value } })} + /> + + +
+ + + +
+
+
+ this.moveTo("right")} + moveToLeft={() => this.moveTo("left")} + moveAllToRight={() => this.moveTo("allToRight")} + moveAllToLeft={() => this.moveTo("allToLeft")} + /> +
+
+ this.setState({ rightCheckedKeys })} + onDoubleClick={this.onRightDoubleClick} + /> +
+
+
; + return ( + this.dialog = dom} title={this.renderTitle()} + className="custom_browser_dialog" draggable={false} style={{ + width: 784, height: 460, minHeight: 200, minWidth: 380, + maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" + }} buttons={buttons}>{dom} + ); + } +} + +export default CustomTransferDialog; diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js index 73fc3cca..111c7d10 100644 --- a/pc4mobx/hrmSalary/layout.js +++ b/pc4mobx/hrmSalary/layout.js @@ -34,6 +34,7 @@ class Layout extends Component { } componentDidMount() { + this.setFontSize(); 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"); @@ -46,8 +47,31 @@ class Layout extends Component { window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission(); window.location.hash.indexOf("mobilepayroll") !== -1 && stores.taxAgentStore.initPageAndOptAuth(); } + window.addEventListener("storage", this.setFontSize); } + componentWillUnmount() { + window.removeEventListener("storage", this.setFontSize); + } + + setFontSize = () => { + const { themeFontSize } = JSON.parse(localStorage.getItem("theme-themeInfo")) || { themeFontSize: "12" }; + if (window.location.href.indexOf("/spa/hrmSalary/") !== -1) { + const href = `/cloudstore/resource/pc/com/font-size/${themeFontSize}px.css`; + jQuery("#theme-font").remove(); + window.parent.jQuery("#theme-font1").remove(); + jQuery(jQuery("head")[0]).append(``); + const link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("type", "text/css"); + link.setAttribute("href", href); + link.setAttribute("id", "theme-font1"); + setTimeout(() => { + window.parent.document.head.appendChild(link); + }, 500); + } + }; + render() { const { taxAgentStore: { PageAndOptAuth, loading } } = this.props; return ( diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 3f01a8bf..59995acd 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -6,13 +6,14 @@ */ 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 { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom"; import { message, Spin } from "antd"; -import * as API from "../../../apis/statistics"; +import { toJS } from "mobx"; import { getIframeParentHeight } from "../../../util"; import { sysConfCodeRule } from "../../../apis/ruleconfig"; +import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog"; +import * as API from "../../../apis/statistics"; import "../index.less"; const WeaTableComx = WeaTableNew.WeaTable; @@ -26,7 +27,16 @@ class SalaryDetails extends Component { this.state = { loading: false, dataSource: [], columns: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, - showTotalCell: false, updateSum: true + showTotalCell: false, updateSum: true, + transferDialog: { + visible: false, searchParamsKey: "name", dataParams: { page: "salary_details_report" }, saveLoading: false, + completeURL: "/api/bs/hrmsalary/common/pageList/get/setting", convertDatasource: datas => { + return { + listDatas: _.map(datas.setting, o => ({ id: o.id, name: o.name })), + checked: this.converCheckedCol(datas) + }; + } + } }; } @@ -73,10 +83,10 @@ class SalaryDetails extends Component { childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); }; getSalaryList = (props) => { - const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props; + const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props || this.props; const [startDateStr, endDateStr] = dateRange; const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams(); - const { pageInfo } = this.state; + const { pageInfo, transferDialog } = this.state; const payload = { taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [], departmentIds: departmentIds ? departmentIds.split(",") : [], @@ -93,7 +103,7 @@ class SalaryDetails extends Component { const { list: dataSource, pageNum: current, total, pageSize } = pageparams; this.setState({ dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload, - showTotalCell: confCode === "1" + showTotalCell: confCode === "1", transferDialog: { ...transferDialog, cancel: false } }, () => tableStore.getDatas(dataKey.datas)); } }).catch(() => this.setState({ loading: false })); @@ -113,10 +123,10 @@ class SalaryDetails extends Component { }; getColumns = () => { const { attendanceStore: { tableStore } } = this.props; - const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum } = this.state; + const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum, transferDialog } = 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)) { + if (!_.isEmpty(columns) && !transferDialog.visible && !transferDialog.cancel) { this.postMessageToChild({ dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRowlistUrl, payload: { ...payload, updateSum }, @@ -130,9 +140,33 @@ class SalaryDetails extends Component { } return []; }; + handleSetDefCols = () => this.setState({ transferDialog: { ...this.state.transferDialog, visible: true } }); + converCheckedCol = (data) => { + return _.reduce(data.checked, (pre, cur) => { + const item = _.find(data.setting, k => k.id === cur); + if (!_.isEmpty(item)) return [...pre, item]; + return pre; + }, []); + }; + savePageListSetting = (values) => { + const payload = { + page: "salary_details_report", + setting: _.map(values, o => o.id) + }; + this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: true } }); + API.savePageListSetting(payload).then(({ status, errormsg }) => { + this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: false } }); + if (status) { + message.success(getLabel(111, "操作成功!")); + this.setState({ transferDialog: { ...this.state.transferDialog, visible: false } }, () => this.getSalaryList()); + } else { + message.error(errormsg); + } + }); + }; render() { - const { loading, dataSource } = this.state; + const { loading, dataSource, transferDialog } = this.state; const { attendanceStore: { tableStore } } = this.props; return (
+ {/*默认显示列*/} + this.setState({ + transferDialog: { ...transferDialog, visible: false, cancel: true } + })}/>
); } diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js index 77f2921a..a763e445 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js @@ -314,7 +314,7 @@ class Index extends Component { ]; - const dropMenuDatas = [ + let dropMenuDatas = [ { key: "log", icon: , content: getLabel(545781, "操作日志") @@ -334,6 +334,11 @@ class Index extends Component { { key: "detail", title: getLabel(111, "员工明细") }, { key: "salaryDetail", title: getLabel(111, "薪资明细") } ]; + dropMenuDatas = selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1); + (PageAndOptAuth.isChief && selectedKey === "salaryDetail") && (dropMenuDatas = [...dropMenuDatas, { + key: "DEF_COLUMN", icon: , content: getLabel(111, "默认显示列"), + onClick: () => this.salaryRef.wrappedInstance.handleSetDefCols() + }]); return ( } selectedKey={selectedKey} @@ -341,8 +346,7 @@ class Index extends Component { buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10} onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())} showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick} - dropMenuDatas={selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1)} - > + dropMenuDatas={dropMenuDatas}>
this.setState({ showSearchAd: false })} onAdSearch={this.onAdSearch}/>
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js index ce58c616..901cb803 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js @@ -156,7 +156,7 @@ class Index extends Component { } }, () => { const { selectItems: salaryItems } = this.state.headerFieldsDialog; - cacheImportField({ salaryItems: salaryItems ? salaryItems.split(",") : [] }) + cacheImportField({ salaryAcctRecordId, salaryItemIds: salaryItems ? salaryItems.split(",") : [] }) .then(({ status, errormsg }) => { if (status) { const payload = { diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index 0d1c87fc..fc07e2f2 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -125,6 +125,15 @@ class Index extends Component { case "offlineCompare": window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calcOc/${salaryAcctRecordId}`, "_blank"); break; + case "LOCK": + case "UNLOCK": + const { selectedRowKeys } = this.calc.calcTableRef.wrappedInstance.state; + if (_.isEmpty(selectedRowKeys)) { + message.warning(getLabel(543303, "请选择表格数据!")); + return; + } + this.calc.calcTableRef.wrappedInstance.updateEmpLockStatus({ lockStatus: key, acctEmpIds: selectedRowKeys }); + break; default: break; } @@ -145,6 +154,8 @@ class Index extends Component { {getLabel(81272, "导出全部")} {getLabel(544270, "自定义导出")} {getLabel(543249, "线下对比")} + {getLabel(111, "批量锁定")} + {getLabel(111, "批量解锁")} ); reqBtns = [ diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileList/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileList/index.js index 65488f6a..f687683a 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileList/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileList/index.js @@ -150,7 +150,7 @@ class Index extends Component { "操作日志": getLabel(545781, "操作日志") }; const childFrameObj = document.getElementById("atdTable"); - childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); + childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); }; getSalaryFileList = (props, init = false) => { const { pageInfo } = this.state; diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js index 904d9ca4..fbb75a46 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js @@ -174,7 +174,7 @@ class Index extends Component { if (it === "ackFeedbackStatus" || it === "feedbackStatus") { payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" }); } else { - payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" }); + payrollTempFeedbackForm.updateFields({ [it]: (!_.isNil(fieldsEchoData[it]) && fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" }); } }); this.setState({ diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js index d7340658..bb22f65e 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js @@ -1,16 +1,29 @@ -import React from "react"; -import { WeaLocaleProvider } from "ecCom"; - -const getLabel = WeaLocaleProvider.getLabel; - export const conditions = [ + { + items: [ + { + conditionType: "SELECT", + domkey: ["rule"], + fieldcol: 10, + label: "人员字段", + lanId: 543352, + labelcol: 8, + options: [], + viewAttr: 2 + } + ], + title: "人员校验规则", + lanId: 543357, + defaultshow: true + }, { items: [ { conditionType: "SELECT", domkey: ["orderRule"], fieldcol: 10, - label: getLabel(15512, "排序字段"), + label: "排序字段", + lanId: 15512, labelcol: 8, options: [], viewAttr: 2 @@ -19,28 +32,15 @@ export const conditions = [ conditionType: "SELECT", domkey: ["ascOrDesc"], fieldcol: 10, - label: getLabel(543351, "正序/倒序"), + label: "正序/倒序", + lanId: 543351, labelcol: 8, options: [], viewAttr: 2 } ], - title: getLabel(543356, "排序规则"), - defaultshow: true - }, - { - items: [ - { - conditionType: "SELECT", - domkey: ["rule"], - fieldcol: 10, - label: getLabel(543352, "人员字段"), - labelcol: 8, - options: [], - viewAttr: 2 - } - ], - title: getLabel(543357, "人员校验规则"), + title: "排序规则", + lanId: 543356, defaultshow: true }, { @@ -49,48 +49,48 @@ export const conditions = [ conditionType: "SWITCH", domkey: ["OPEN_APPLICATION_ENCRYPT"], fieldcol: 10, - label: getLabel(526997, "加密设置"), + label: "加密设置", + lanId: 526997, labelcol: 8, viewAttr: 2 } ], - title: getLabel(543358, "加密规则"), + title: "加密规则", + lanId: 543358, defaultshow: true }, { items: [ { conditionType: "SWITCH", - domkey: ["taxDeclarationFunction"], + domkey: ["salaryShowStatus"], fieldcol: 10, - label: getLabel(111, "系统算税"), + label: "显示工资单页签", + lanId: 111, labelcol: 8, - viewAttr: 1 + viewAttr: 2 }, { conditionType: "SWITCH", - domkey: ["WITHDRAW_TAX_DECLARATION"], + domkey: ["adjustShowStatus"], fieldcol: 10, - label: getLabel(111, "撤回申报表"), + label: "显示调薪记录页签", + lanId: 111, labelcol: 8, viewAttr: 2 - } - ], - title: getLabel(111, "算税规则"), - defaultshow: true - }, - { - items: [ + }, { conditionType: "SWITCH", - domkey: ["salaryArchiveDelete"], + domkey: ["taxAgentShowStatus"], fieldcol: 10, - label: getLabel(111, "允许删除档案"), + label: "显示【个税扣缴义务人】信息", + lanId: 111, labelcol: 8, viewAttr: 2 } ], - title: getLabel(538004, "薪资档案"), + title: "我的薪资福利设置", + lanId: 111, defaultshow: true }, { @@ -99,7 +99,8 @@ export const conditions = [ conditionType: "SWITCH", domkey: ["welBaseDiffByPerAndCom"], fieldcol: 10, - label: getLabel(111, "区分个人和公司"), + label: "区分个人和公司", + lanId: 111, labelcol: 8, viewAttr: 2 }, @@ -107,12 +108,30 @@ export const conditions = [ conditionType: "SWITCH", domkey: ["welBaseAutoAdjust"], fieldcol: 10, - label: getLabel(111, "导入基数自动调整上/下限"), + label: "导入基数自动调整上/下限", + lanId: 111, labelcol: 8, viewAttr: 2 } ], - title: getLabel(111, "福利档案基数"), + title: "福利档案基数", + lanId: 111, + defaultshow: true + }, + { + items: [ + { + conditionType: "SWITCH", + domkey: ["salaryArchiveDelete"], + fieldcol: 10, + label: "允许删除档案", + lanId: 111, + labelcol: 8, + viewAttr: 2 + } + ], + title: "薪资档案", + lanId: 538004, defaultshow: true }, { @@ -121,73 +140,84 @@ export const conditions = [ conditionType: "SELECT", domkey: ["matchRule"], fieldcol: 10, - label: getLabel(111, "匹配规则"), + label: "匹配规则", + lanId: 111, options: [], labelcol: 8, viewAttr: 2 + }, + { + conditionType: "INPUTNUMBER", + domkey: ["salaryAcctFixedColumns"], + fieldcol: 10, + label: "固定数", + lanId: 111, + labelcol: 8, + viewAttr: 2 } ], - title: getLabel(111, "薪资核算人员匹配规则"), + title: "薪资核算", + lanId: 111, defaultshow: true }, { items: [ { - conditionType: "INPUTNUMBER", - domkey: ["salaryAcctFixedColumns"], + conditionType: "SWITCH", + domkey: ["taxDeclarationFunction"], fieldcol: 10, - label: getLabel(111, "固定数"), + label: "系统算税", + lanId: 111, + labelcol: 8, + viewAttr: 1 + }, + { + conditionType: "SWITCH", + domkey: ["WITHDRAW_TAX_DECLARATION"], + fieldcol: 10, + label: "撤回申报表", + lanId: 111, labelcol: 8, viewAttr: 2 } ], - title: getLabel(111, "薪资核算固定列头数"), + title: "算税规则", + lanId: 111, defaultshow: true }, + { + items: [ + { + conditionType: "SELECT", + domkey: ["REPORT_ORGANIZATIN_TYPE"], + fieldcol: 10, + label: "组织信息", + lanId: 111, + options: [], + labelcol: 8, + viewAttr: 2 + } + ], + title: "薪资报表", + lanId: 111, + defaultshow: true + } // { // items: [ // { // conditionType: "SWITCH", // domkey: ["extEmpsWitch"], // fieldcol: 10, - // label: getLabel(111, "开启非系统人员"), + // label: "开启非系统人员", + // lanId: 111, // labelcol: 8, // viewAttr: 2 // } // ], - // title: getLabel(111, "非系统人员"), + // title: "非系统人员", + // lanId: 111, // defaultshow: true // }, - { - items: [ - { - conditionType: "SWITCH", - domkey: ["salaryShowStatus"], - fieldcol: 10, - label: getLabel(111, "显示工资单页签"), - labelcol: 8, - viewAttr: 2 - }, - { - conditionType: "SWITCH", - domkey: ["adjustShowStatus"], - fieldcol: 10, - label: getLabel(111, "显示调薪记录页签"), - labelcol: 8, - viewAttr: 2 - }, - { - conditionType: "SWITCH", - domkey: ["taxAgentShowStatus"], - fieldcol: 10, - label: getLabel(111, "显示【个税扣缴义务人】信息"), - labelcol: 8, - viewAttr: 2 - } - ], - title: getLabel(111, "我的薪资福利设置"), - defaultshow: true - } ]; export const payloadList = [ { enumClass: "com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum" }, diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.less b/pc4mobx/hrmSalary/pages/ruleConfig/index.less index a4599477..a7a7c267 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.less +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.less @@ -3,7 +3,7 @@ overflow: hidden !important; .ruleWrapper { - padding: 16px; + padding: 8px 16px 0; background: #e5e5e5; height: 100%; overflow: hidden auto; diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js index d1dcdc12..8c56b847 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js @@ -39,10 +39,18 @@ class RuleConfig extends Component { const optionsList = { matchRule, orderRule, ascOrDesc, rule }; this.setState({ sysinfo, conditions: _.map(conditions, item => ({ - ...item, + ...item, title: getLabel(item.lanId, item.title), items: _.map(item.items, o => { + o = { ...o, label: getLabel(o.lanId, o.label) }; if (getKey(o) === "matchRule" || getKey(o) === "orderRule" || getKey(o) === "ascOrDesc" || getKey(o) === "rule") { return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) }; + } else if (getKey(o) === "REPORT_ORGANIZATIN_TYPE") { + return { + ...o, options: [ + { key: "0", showname: getLabel(111, "核算时组织信息"), selected: true }, + { key: "1", showname: getLabel(111, "实时组织信息"), selected: false } + ] + }; } else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") { return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 }; } else if (getKey(o) === "taxDeclarationFunction") { @@ -69,7 +77,9 @@ class RuleConfig extends Component { } else if (item === "matchRule") { form.updateFields({ [item]: { value: sysinfo["salaryAcctEmployeeRule"] || "" } }); } else if (item === "taxDeclarationFunction") { - form.updateFields({ [item]: { value: sysinfo["taxDeclarationFunction"] === "0" ? "0" : "1" } }); + form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "1") } }); + } else if (item === "REPORT_ORGANIZATIN_TYPE") { + form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "0") } }); } else if (item === "taxAgentShowStatus" || item === "salaryShowStatus" || item === "adjustShowStatus") { form.updateFields({ [item]: { value: sysinfo[item] || "1" } }); } else if (item === "OPEN_APPLICATION_ENCRYPT") { @@ -117,6 +127,7 @@ class RuleConfig extends Component { case "taxAgentShowStatus": case "salaryShowStatus": case "adjustShowStatus": + case "REPORT_ORGANIZATIN_TYPE": if (!this.handleDebounce) { this.handleDebounce = _.debounce(() => { const confTitle = { @@ -126,7 +137,8 @@ class RuleConfig extends Component { extEmpsWitch: getLabel(544097, "开启非系统人员"), taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"), salaryShowStatus: getLabel(111, "显示工资单页签"), - adjustShowStatus: getLabel(111, "显示调薪记录页签") + adjustShowStatus: getLabel(111, "显示调薪记录页签"), + REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息") }; this.unifiedSettings(key, confTitle[key]); this.handleDebounce = null; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js index 52bc2061..92a240d2 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js @@ -236,7 +236,7 @@ class Index extends Component { "操作日志": getLabel(545781, "操作日志") }; const childFrameObj = document.getElementById("atdTable"); - childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); + childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); }; handleChangeProgramme = (type, schemeId, payload) => { this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId })