diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 8e4a2d5e..009a9bd8 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -218,8 +218,9 @@ export const exportComparisonResult = (salaryAcctRecordId) => { }; // 核算进度条 -export const getCalculateProgress = (id) => { - return WeaTools.callApi("/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_" + id, "get", {}); +export const getCalculateProgress = (id = "", paymentOrganization = "") => { + const extra= paymentOrganization ? `_${paymentOrganization}` : paymentOrganization + return WeaTools.callApi(`/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_${id}${extra}`, "get", {}); }; // 核算进度条 diff --git a/pc4mobx/hrmSalary/apis/statistics.js b/pc4mobx/hrmSalary/apis/statistics.js index 71166256..a4d16bbc 100644 --- a/pc4mobx/hrmSalary/apis/statistics.js +++ b/pc4mobx/hrmSalary/apis/statistics.js @@ -150,7 +150,7 @@ export const getPageListTemplatelist = (params) => { export const changePageListTemplate = (params) => { return postFetch("/api/bs/hrmsalary/common/pageList/template/change", params); }; -//薪酬统计报表-重置自定义列 -export const resetPageListSetting = (params) => { - return postFetch("/api/bs/hrmsalary/common/pageList/reset/setting", params); +//薪酬统计报表-删除模板 +export const deleteTemplatePageList = (params) => { + return postFetch("/api/bs/hrmsalary/common/pageList/template/delete", params); }; diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js index 7bcf1f88..5714241e 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js @@ -8,7 +8,7 @@ * @description: */ import React, { Component } from "react"; -import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll } from "ecCom"; +import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaTable } from "ecCom"; import { Button, Col, Row, Spin } from "antd"; import CustomBrowserMutiLeft from "./customBrowserMutiLeft"; import CustomBrowserMutiRight from "./customBrowserMutiRight"; @@ -22,8 +22,8 @@ class CustomTransferDialog extends Component { constructor(props) { super(props); this.state = { - loading: false, listDatas: [], - query: { [props.searchParamsKey]: "" }, + loading: false, listDatas: [], columns: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, + query: props.searchParamsKey ? { [props.searchParamsKey]: "" } : {}, leftListSelectedKeys: [], // 左侧table选择的keys leftListSelectedData: [], // 左侧table选择的数据 rightCheckedKeys: [], //右侧选择的keys @@ -42,24 +42,27 @@ class CustomTransferDialog extends Component { } } else if (nextProps.visible !== this.props.visible && !nextProps.visible) { this.setState({ - query: { [this.props.searchParamsKey]: "" }, - rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: [] + query: { [this.props.searchParamsKey]: "" }, selectedRowKeys: [], + rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: [], + pageInfo: { current: 1, pageSize: 10, total: 0 } }); this.selectedData = {}; } } getData = (init = false, props) => { - const { query } = this.state; - const { completeURL, convertDatasource, dataParams = {} } = props || this.props; + const { query, pageInfo } = this.state; + const { completeURL, convertDatasource, dataParams = {}, dialogType } = props || this.props; let payload = { ...dataParams, ...query }; + dialogType === "table" && (payload = { ...payload, ...pageInfo }); 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 + listDatas: convertDatasource ? convertDatasource(data.list) : data.list, columns: data.columns, + pageInfo: { ...pageInfo, current, pageSize, total } }); } else { this.setState({ @@ -132,19 +135,23 @@ class CustomTransferDialog extends Component { }; renderTitle = () => { return (
- {getLabel(111, "数据选择")} -
+ {this.props.title || getLabel(111, "数据选择")} +
{this.props.titleOptsComs}
); }; render() { - const { loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys } = this.state; - const { searchParamsKey, saveLoading, btns = [] } = this.props; - const buttons = [ - , - ...btns, - ]; + const { + loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys, pageInfo, selectedRowKeys, + columns + } = this.state; + const { + searchParamsKey, saveLoading, dialogType = "", rowKey, tableOpts = {}, buttons = [ + , + + ] + } = this.props; let rightActive = false, leftActive = false, rightAllActive = false; if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true; if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true; @@ -196,10 +203,38 @@ class CustomTransferDialog extends Component {
; + if (dialogType === "table") { + const sheight = this.dialog ? this.dialog.state.height - 156 : 260; + 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.getData()); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getData()); + } + }; + const rowSelection = { + selectedRowKeys, + onChange: selectedRowKeys => this.setState({ selectedRowKeys }, () => this.props.onSelect(selectedRowKeys)) + }; + dom =
+ {this.props.children} + +
; + } return ( this.dialog = dom} title={this.renderTitle()} - className="custom_browser_dialog" draggable={false} style={{ + className="custom_browser_dialog" draggable={true} style={{ width: 784, height: 460, minHeight: 200, minWidth: 380, maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" }} buttons={buttons}>{dom} diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/index.less b/pc4mobx/hrmSalary/components/CustomBrowser/index.less index d4d61a16..e49d982a 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/index.less +++ b/pc4mobx/hrmSalary/components/CustomBrowser/index.less @@ -3,6 +3,20 @@ display: flex; justify-content: space-between; align-items: center; + + .wea-select, .ant-select-selection, .ant-select { + width: 100%; + } + + .wea-select { + display: inline-block; + position: relative; + } + + .ant-select-selection { + height: 30px; + border-radius: 0; + } } .wea-hr-muti-input-table { @@ -10,6 +24,19 @@ padding: 8px 16px; height: 100%; + .table_opts { + display: flex; + align-items: center; + justify-content: flex-end; + width: 100%; + height: 40px; + background: #FFF; + + .wea-button-icon { + margin-right: 10px; + } + } + .wea-new-table { background: #FFF; } diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 219b5e4f..657c4dfb 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -8,16 +8,16 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaTableNew } from "comsMobx"; import { WeaLoadingGlobal, WeaLocaleProvider, WeaSelect } from "ecCom"; -import { Button, message, Spin } from "antd"; +import { Button, message, Modal, Spin } from "antd"; import { getIframeParentHeight } from "../../../util"; import { sysConfCodeRule } from "../../../apis/ruleconfig"; import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog"; import SalaryDetailsTempDialog from "./salaryDetailsTempDialog"; +import SalaryTempMangerDialog from "./salaryTempMangerDialog"; import { MonthRangePicker } from "../../reportView/components/statisticalMicroSettingsSlide"; import AdvanceInputBtn from "../components/advanceInputBtn"; import SearchPannel from "../components/searchPannel"; import * as API from "../../../apis/statistics"; -import { resetPageListSetting } from "../../../apis/statistics"; import cs from "classnames"; import "../index.less"; @@ -31,27 +31,28 @@ class SalaryDetails extends Component { super(props); this.state = { loading: false, dataSource: [], columns: [], selectedRowKeys: [], tempPageList: [], sumRow: {}, - pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", + pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", tempManageQuery: false, showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} }, transferDialog: { visible: false, searchParamsKey: "name", saveLoading: false, - dataParams: { page: "salary_details_report", defaultSetting: "0" }, + dataParams: { page: "salary_details_report" }, completeURL: "", convertDatasource: datas => { return { listDatas: _.map(datas.setting, o => ({ id: o.id || o.column, name: o.name || o.text })), - checked: this.converCheckedCol(datas) + checked: converCheckedCol(datas) }; }, - type: "default" + dialogType: "temp" + }, + tempManageDialog: { //模板管理 + visible: false, completeURL: "", dialogType: "table", dataParams: { page: "salary_details_report" } } }; } async componentDidMount() { const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]); - this.setState({ showTotalCell: confCode === "1" }, () => { - this.props.salaryDetailShowType === "1" && this.getPageListTemplatelist(); - }); + this.setState({ showTotalCell: confCode === "1" }); window.addEventListener("message", this.handleReceive, false); window.addEventListener("resize", () => this.forceUpdate(), false); } @@ -73,8 +74,7 @@ class SalaryDetails extends Component { if (status) { this.setState({ tempPageList: _.map(data, o => ({ ...o, key: String(o.id), showname: o.name })), - templateId: !_.isEmpty(_.find(data, o => !!o.checked)) ? String(_.find(data, o => !!o.checked).id) : "", - transferDialog: { ...this.state.transferDialog, visible: false, type: "default" } + templateId: !_.isEmpty(_.find(data, o => !!o.checked)) ? String(_.find(data, o => !!o.checked).id) : "" }); } }); @@ -173,27 +173,15 @@ class SalaryDetails extends Component { } return []; }; - handleSetDefCols = (params) => this.setState({ + handleSetDefCols = (params = {}) => this.setState({ transferDialog: { - ...this.state.transferDialog, completeURL: "/api/bs/hrmsalary/common/pageList/get/setting", visible: true, - dataParams: { ...this.state.transferDialog.dataParams, ...params } + ...this.state.transferDialog, visible: true, dataParams: { ...this.state.transferDialog.dataParams, ...params }, + completeURL: "/api/bs/hrmsalary/common/pageList/template/get", dialogType: "temp" } - }); - converCheckedCol = (data) => { - return _.reduce(data.checked || [], (pre, cur) => { - const item = _.find(data.setting, k => k.column === cur.column); - if (!_.isEmpty(item)) return [...pre, { ...item, id: item.id || item.column, name: item.name || item.text }]; - return pre; - }, []); - }; + }, () => this.getPageListTemplatelist()); + savePageListSetting = (values) => { - const { transferDialog, tempDialog } = this.state, { type } = transferDialog; - if (type === "temp") { - this.setState({ - tempDialog: { ...tempDialog, visible: true, setting: _.map(values, o => o.id) } - }); - return; - } + const { transferDialog } = this.state; const payload = { ...transferDialog.dataParams, setting: _.map(values, o => o.id) }; @@ -203,70 +191,68 @@ class SalaryDetails extends Component { if (status) { message.success(getLabel(111, "操作成功!")); this.setState({ - transferDialog: { ...this.state.transferDialog, visible: false, type: "default" } + transferDialog: { ...this.state.transferDialog, visible: false, dialogType: "temp" } }, () => this.getSalaryList()); } else { message.error(errormsg); } }); }; - handelAddTemp = (templateId) => { - const { transferDialog, tempDialog, tempPageList } = this.state; + handelAddTemp = (templateId = "") => { + const { tempDialog, tempPageList } = this.state; this.setState({ - transferDialog: { - ...transferDialog, visible: true, type: "temp", - dataParams: { ...transferDialog.dataParams, id: templateId }, - completeURL: "/api/bs/hrmsalary/common/pageList/template/get" - }, - tempDialog: { ...tempDialog, id: templateId, template: _.find(tempPageList, o => o.key === templateId) } + tempDialog: { + ...tempDialog, visible: true, setting: _.map(this.transferRef.state.rightDatas, o => o.id) + // template: _.find(tempPageList, o => o.key === templateId) + } }); }; changePageListTemplate = (templateId) => { this.setState({ templateId }, () => { - API.changePageListTemplate({ page: "salary_details_report", templateId }).then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(111, "操作成功!")); - this.getSalaryList(); - } else { - message.error(errormsg); - } - }); + API.changePageListTemplate({ page: "salary_details_report", templateId }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "操作成功!")); + this.setState({ + transferDialog: { + ...this.state.transferDialog, + dataParams: { ...this.state.transferDialog.dataParams, id: templateId } + } + }, () => { + this.transferRef.getData(true); + this.getSalaryList(); + }); + } else { + message.error(errormsg); + } + }); }); }; - resetColsSetting = () => { - resetPageListSetting({ page: "salary_details_report" }).then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(111, "操作成功!")); - this.setState({ - transferDialog: { ...this.state.transferDialog, visible: false, type: "default" } - }, () => this.getSalaryList()); - } else { - message.error(errormsg); + handleDelTemp = (ids) => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确认删除吗?"), + onOk: () => { + API.deleteTemplatePageList({ ids }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "操作成功!")); + this.setState({ tempManageQuery: !this.state.tempManageQuery }, () => this.getPageListTemplatelist()); + } else { + message.error(errormsg); + } + }); } }); }; render() { - const { loading, dataSource, transferDialog, tempDialog, tempPageList, templateId } = this.state; - const { attendanceStore: { tableStore }, dateRange, showSearchAd, salaryDetailShowType } = this.props; - const { dataParams: { defaultSetting } } = transferDialog; + const { + loading, dataSource, transferDialog, tempDialog, tempPageList, templateId, tempManageDialog, tempManageQuery + } = this.state; + const { dateRange, showSearchAd } = this.props; + const { dialogType } = transferDialog; return (
- { - salaryDetailShowType === "1" && -
- - { - templateId && - this.handelAddTemp(templateId)}> - - - } -
- } @@ -291,24 +277,40 @@ class SalaryDetails extends Component { {/* columns={this.getColumns()}*/} {/*/>*/} {/*默认显示列,薪资模板列表*/} - {getLabel(111, "恢复默认显示列")}] : []} + this.transferRef = dom} onCancel={() => this.setState({ - transferDialog: { - ...transferDialog, completeURL: "", visible: false, type: "default" - } - })}/> + transferDialog: { ...transferDialog, completeURL: "", visible: false } + })} + buttons={ + dialogType === "temp" ? [ + , + + ] : [] + } + titleOptsComs={ + dialogType === "temp" ? + : null + }/> {/*薪资明细模板设置*/} this.setState({ tempDialog: { ...tempDialog, visible: false, setting: [] } }, () => callback && callback())} - onSuccess={() => { - this.getPageListTemplatelist(); - this.getSalaryList(); - }}/> + onSuccess={this.getPageListTemplatelist}/> + {/*薪资明细自定义列模板管理*/} + this.setState({ + tempManageDialog: { ...tempManageDialog, completeURL: "", visible: false } + })}/>
); @@ -316,3 +318,11 @@ class SalaryDetails extends Component { } export default SalaryDetails; + +export const converCheckedCol = (data) => { + return _.reduce(data.checked || [], (pre, cur) => { + const item = _.find(data.setting, k => k.column === cur.column); + if (!_.isEmpty(item)) return [...pre, { ...item, id: item.id || item.column, name: item.name || item.text }]; + return pre; + }, []); +}; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetailsTempDialog.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetailsTempDialog.js index f89e5969..5fc57e80 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetailsTempDialog.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetailsTempDialog.js @@ -45,15 +45,15 @@ class SalaryDetailTempDialog extends Component { ...item, items: _.map(item.items, o => { if (getKey(o) === "sharedType") { return { - ...o, label: getLabel(o.lanId, o.label), value: id ? String(template["sharedType"]) : "0", + ...o, label: getLabel(o.lanId, o.label), value: id ? String(template["sharedType"]) : "1", options: [ - { key: "0", showname: getLabel(111, "公共") }, - { key: "1", showname: getLabel(111, "私有") } + { key: "1", showname: getLabel(111, "私有") }, + { key: "0", showname: getLabel(111, "共享") } ] }; } else if (getKey(o) === "limitIds") { return { - ...o, label: getLabel(o.lanId, o.label), hide: !id || (id && template["sharedType"] === 0), + ...o, label: getLabel(o.lanId, o.label), hide: !id || (id && template["sharedType"] === 1), value: id ? template["limitIds"].join(",") : "", options: _.map(data, o => ({ key: o.id, showname: o.content })) }; @@ -98,8 +98,8 @@ class SalaryDetailTempDialog extends Component { ...item, items: _.map(item.items, o => { if (key === "sharedType" && getKey(o) === "limitIds") { return { - ...o, hide: value !== "1", viewAttr: value === "1" ? 3 : 1, - rules: value === "1" ? "required|string" : "" + ...o, hide: value !== "0", viewAttr: value === "0" ? 3 : 1, + rules: value === "0" ? "required|string" : "" }; } return { ...o }; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js new file mode 100644 index 00000000..0006cac0 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js @@ -0,0 +1,59 @@ +/* + * 薪酬报表-薪酬明细 + * 模板管理新增编辑弹框 + * @Author: 黎永顺 + * @Date: 2024/12/4 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom"; +import { postFetch } from "../../../util/request"; +import { Button } from "antd"; + +const getLabel = WeaLocaleProvider.getLabel; + +class SalaryTempAdminDialog extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, selectedKeys: [], dataSource: [] + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + const { dataParams = {} } = nextProps; + this.setState({ loading: true }); + postFetch("/api/bs/hrmsalary/common/pageList/template/get", { ...dataParams }) + .then(({ status, data }) => { + if (status) { + this.setState({ + dataSource: _.map(data.setting, o => ({ id: o.column, name: o.text })), + selectedKeys: _.map(data.checked, o => o.column) + }); + } + }); + } + } + + render() { + const { dataSource, selectedKeys } = this.state, { dataParams } = this.props; + return ( this.dialog = dom} title={getLabel(111, "模板管理")} + className="temp_admin_dialog" style={{ + width: 784, height: 460, minHeight: 200, minWidth: 380, + maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" + }} buttons={[ + , + + ]}> + this.setState({ selectedKeys: v })} + height={this.dialog ? this.dialog.state.height - 10 : 260}/> + ); + } +} + +export default SalaryTempAdminDialog; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js new file mode 100644 index 00000000..4f5696c9 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js @@ -0,0 +1,91 @@ +/* + * 薪酬报表-薪酬明细 + * 模板管理弹框 + * @Author: 黎永顺 + * @Date: 2024/12/4 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaButtonIcon, WeaLocaleProvider } from "ecCom"; +import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog"; +import SalaryTempAdminDialog from "./salaryTempAdminDialog"; +import SalaryDetailsTempDialog from "./salaryDetailsTempDialog"; + +const getLabel = WeaLocaleProvider.getLabel; + +class SalaryTempMangerDialog extends Component { + constructor(props) { + super(props); + this.state = { + selectedRowKeys: [], tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } }, + tempDialog: { visible: false, setting: [], id: "", template: {} } + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.isQuery !== this.props.isQuery) this.setState({ selectedRowKeys: [] }, () => this.tempManageRef.getData()); + } + + handleTempAdminCols = (params = {}) => this.setState({ + tempAdminDialog: { visible: true, dataParams: { ...this.state.tempAdminDialog.dataParams, ...params } } + }); + handelAddTemp = (id = "", setting = []) => { + this.setState({ + tempDialog: { + visible: true, setting, id, template: _.find(this.tempManageRef.state.listDatas, o => o.id === id) + } + }); + }; + + render() { + const { selectedRowKeys, tempAdminDialog, tempDialog } = this.state; + return ( this.tempManageRef = dom} {...this.props} buttons={[]} + title={getLabel(111, "模板管理")} + onSelect={v => this.setState({ selectedRowKeys: v })} + tableOpts={{ + title: getLabel(111, "操作"), + dataIndex: "options", + width: 120, + render: (text, record) => ( + { + record.canEdit && + this.handleTempAdminCols({ id: record.id })} + style={{ marginRight: 10 }}>{getLabel(111, "编辑")} + } + { + record.canEdit && + this.props.onDelete([record.id])}>{getLabel(111, "删除")} + } + + ) + }}> +
+ this.handleTempAdminCols()}/> + this.props.onDelete(selectedRowKeys)} disabled={_.isEmpty(selectedRowKeys)}/> +
+ {/*模板管理*/} + this.setState({ + tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } } + })}/> + {/*薪资明细模板设置*/} + this.setState({ + tempDialog: { ...tempDialog, visible: false, setting: [] } + }, () => callback && callback())} + onSuccess={() => this.setState({ + tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } } + }, () => { + this.props.onSuccess(); + this.tempManageRef.getData(); + })}/> +
); + } +} + +export default SalaryTempMangerDialog; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js index 2d0dca9e..ad620f88 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js @@ -9,7 +9,7 @@ import { inject, observer } from "mobx-react"; import { WeaDatePicker, WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom"; import { Button, Dropdown, Menu } from "antd"; import { condition, reportCondition } from "./components/conditions"; -import { commonEnumList, reportGetForm, sysinfo } from "../../apis/ruleconfig"; +import { commonEnumList, reportGetForm } from "../../apis/ruleconfig"; import { dimensionGetForm } from "../../apis/statistics"; import EmployeeDetails from "./components/employeeDetails"; import SalaryDetails from "./components/salaryDetails"; @@ -50,16 +50,12 @@ class Index extends Component { title: "", visible: false, typeKey: "", id: "" }, - logDialogVisible: false, filterConditions: "[]", - salaryDetailShowType: "0" //薪资明细列表显示方式 + logDialogVisible: false, filterConditions: "[]" }; } componentDidMount() { this.initReportFormCondition(); - sysinfo().then(({ status, data }) => { - if (status) this.setState({ salaryDetailShowType: data.SALARY_DETAILS_REPORT_SHOW_TYPE }); - }); } initReportFormCondition = (payload = {}) => { @@ -281,7 +277,7 @@ class Index extends Component { const { selectedKey, modalReq, slideReq, conditions, reportConditions, reportName, keyword, year, logDialogVisible, filterConditions, - dateRange, showSearchAd, isQuery, salaryDetailShowType + dateRange, showSearchAd, isQuery } = this.state; const statisticsReportBtn = PageAndOptAuth.opts.includes("admin"); const buttons = selectedKey === "statistics" ? [ @@ -320,7 +316,7 @@ class Index extends Component { icon: , content: getLabel(111, "显示列定制"), onClick: () => { - this.salaryRef.wrappedInstance.handleSetDefCols({ defaultSetting: "0" }); + this.salaryRef.wrappedInstance.handleSetDefCols(); // tableStore.setColSetVisible(true); // tableStore.tableColSet(true); } @@ -332,18 +328,13 @@ class Index extends Component { { 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({ defaultSetting: "1" }) - }]); return ( } selectedKey={selectedKey} iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper" buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10} onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())} - showDropIcon={(selectedKey === "statistics") || (selectedKey === "salaryDetail" && salaryDetailShowType !== "1")} - onDropMenuClick={this.onDropMenuClick} dropMenuDatas={dropMenuDatas}> + showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick} dropMenuDatas={dropMenuDatas}> { selectedKey === "statistics" ? this.onDropMenuClick(type, targetid)} /> : this.salaryRef = dom} dateRange={dateRange} isQuery={isQuery} - salaryDetailShowType={salaryDetailShowType} showSearchAd={showSearchAd} handleOpenAdvanceSearch={this.handleOpenAdvanceSearch} handleAdvanceSearch={this.handleAdvanceSearch} onAdSearch={this.onAdSearch} onCancel={() => this.setState({ showSearchAd: false })} diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js index 56cbb675..e06144ba 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js @@ -73,7 +73,7 @@ class Index extends Component { }, () => { const { calculateStore: { PCSearchForm } } = this.props; PCSearchForm.initFormFields(this.state.searchConditions); - this.handleRefresh(true); + this.queryPCList(); }); } @@ -185,13 +185,13 @@ class Index extends Component { } }); }; - handleRefresh = (init = false) => { + handleRefresh = () => { if (!this.handleDebounce) { this.handleDebounce = _.debounce(() => { const { routeParams: { salaryAcctRecordId } } = this.props; refreshAcctemployee({ salaryAcctRecordId }).then(({ status, errormsg }) => { if (status) { - !init && message.success(getLabel(111, "操作成功!")); + message.success(getLabel(111, "操作成功!")); this.queryPCList(); } else { message.error(errormsg); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js index f1e9b4fd..be64c8e8 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js @@ -41,8 +41,7 @@ class AttendanceDataViewSlide extends Component { const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo; 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, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null })) }); } }).catch(() => this.setState({ loading: { ...loading, query: false } })); @@ -103,7 +102,7 @@ class AttendanceDataViewSlide extends Component { + loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 240px)` }}/> } /> diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index a8d9c48c..549817d2 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -29,6 +29,7 @@ import { dataCollectCondition } from "./columns"; import { removePropertyCondition } from "../../../util/response"; import { convertToUrlString } from "../../../util/url"; import { postFetch } from "../../../util/request"; +import { getDomkes } from "../../../util"; import Layout from "../layout"; import moment from "moment"; @@ -246,6 +247,7 @@ class Index extends Component { addForm.validateForm().then(f => { if (f.isValid) { const payload = { + ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}), ...addForm.getFormParams(), taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 06d57d9d..dbd9da42 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -28,6 +28,7 @@ import AddItems from "../addItems"; import TableRecord from "../components/tableRecord"; import { convertToUrlString } from "../../../util/url"; import { postFetch } from "../../../util/request"; +import { getDomkes } from "../../../util"; const getKey = WeaTools.getKey; const getLabel = WeaLocaleProvider.getLabel; @@ -399,6 +400,7 @@ class Index extends Component { addForm.validateForm().then(f => { if (f.isValid) { const payload = { + ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}), ...addForm.getFormParams(), taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index 4f1a92a7..03ae9ae7 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -30,6 +30,7 @@ import AddItems from "../addItems"; import TableRecord from "../components/tableRecord"; import { convertToUrlString } from "../../../util/url"; import { postFetch } from "../../../util/request"; +import { getDomkes } from "../../../util"; const getKey = WeaTools.getKey; const getLabel = WeaLocaleProvider.getLabel; @@ -414,6 +415,7 @@ class Index extends Component { addForm.validateForm().then(f => { if (f.isValid) { const payload = { + ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}), ...addForm.getFormParams(), taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index d68e6812..f9c2134d 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -21,6 +21,7 @@ import AddItems from "../addItems"; import TableRecord from "../components/tableRecord"; import { convertToUrlString } from "../../../util/url"; import { postFetch } from "../../../util/request"; +import { getDomkes } from "../../../util"; const getKey = WeaTools.getKey; const getLabel = WeaLocaleProvider.getLabel; @@ -352,6 +353,7 @@ class Index extends Component { addForm.validateForm().then(f => { if (f.isValid) { const payload = { + ..._.reduce(getDomkes(condition), (pre, cur) => ({ ...pre, [cur]: "" }), {}), ...addForm.getFormParams(), taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname }; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js index f340fb3e..663aff22 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js @@ -116,12 +116,15 @@ export default class LedgerSalaryItemAddModal extends React.Component { showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => this.listSalaryItem()); + }, onChange: current => { this.setState({ pageInfo: { ...pageInfo, current } - }, () => { - this.listSalaryItem(); - }); + }, () => this.listSalaryItem()); } }; const rowSelection = { @@ -134,7 +137,11 @@ export default class LedgerSalaryItemAddModal extends React.Component { return ( 添加]} >
diff --git a/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js b/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js index 69bac121..78a2c045 100644 --- a/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js +++ b/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js @@ -28,7 +28,7 @@ class Index extends Component { {moment(it.sendTime).format("YYYY-MM")}
{`${getLabel(33564, "查看")}>`} diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js index 22135a29..c5701013 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js @@ -152,6 +152,22 @@ export const conditions = [ lanId: 538004, defaultshow: true }, + { + items: [ + { + conditionType: "SWITCH", + domkey: ["ATTENDANCE_SERIAL_COLLECTION_BTN"], + fieldcol: 10, + label: "考勤引用是否采集班次数据", + lanId: 111, + labelcol: 8, + viewAttr: 2 + } + ], + title: "数据采集", + lanId: 111, + defaultshow: true + }, { items: [ { @@ -215,16 +231,16 @@ export const conditions = [ labelcol: 8, viewAttr: 2 }, - { - conditionType: "SELECT", - domkey: ["SALARY_DETAILS_REPORT_SHOW_TYPE"], - fieldcol: 10, - label: "薪资明细显示模式", - lanId: 111, - options: [], - labelcol: 8, - viewAttr: 2 - } + // { + // conditionType: "SELECT", + // domkey: ["SALARY_DETAILS_REPORT_SHOW_TYPE"], + // fieldcol: 10, + // label: "薪资明细显示模式", + // lanId: 111, + // options: [], + // labelcol: 8, + // viewAttr: 2 + // } ], title: "薪资报表", lanId: 111, diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js index f84987cb..573bc864 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js @@ -153,6 +153,7 @@ class RuleConfig extends Component { case "APPROVAL_CAN_MANUAL_FILE_STATUS": case "APPROVAL_CAN_RE_CALC_STATUS": case "APPROVAL_CAN_EDIT_RESULT_STATUS": + case "ATTENDANCE_SERIAL_COLLECTION_BTN": if (!this.handleDebounce) { this.handleDebounce = _.debounce(() => { const confTitle = { @@ -169,7 +170,8 @@ class RuleConfig extends Component { SALARY_APPROVAL_STATUS: getLabel(111, "是否开启薪资审批"), APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"), APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"), - APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据") + APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据"), + ATTENDANCE_SERIAL_COLLECTION_BTN: getLabel(111, "考勤引用是否采集班次数据") }; this.unifiedSettings(key, confTitle[key]); this.handleDebounce = null; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js index ca615429..be9cd463 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js @@ -60,7 +60,7 @@ class StandingBook extends Component { progressVisible: true }, () => { this.timer = setInterval(() => { - getCalculateProgress(moment(billMonth).format("YYYY-MM")).then(({ status, data }) => { + getCalculateProgress(moment(billMonth).format("YYYY-MM"), payload.paymentOrganization).then(({ status, data }) => { if (status) { if (!data.status) { clearInterval(this.timer); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index d7366471..aa2ea15d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -359,7 +359,7 @@ export default class NormalIndex extends Component { progressVisible: true }, () => { this.timer = setInterval(() => { - getCalculateProgress(billMonth).then(({ status, data }) => { + getCalculateProgress(billMonth, paymentOrganization).then(({ status, data }) => { if (status) { if (!data.status) { clearInterval(this.timer);