diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 9d8d2816..3f01a8bf 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -99,13 +99,17 @@ class SalaryDetails extends Component { }).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 : [] }); + 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; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js index d7b43cd5..3f164873 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js @@ -41,7 +41,7 @@ class salaryFileAdvanceSearchPannel extends Component { ...child, options: _.map(userStatusList, o => ({ key: String(o.value), showname: o.defaultLabel })) }; - } else if (getKey(child) === "taxAgentId") { + } else if (getKey(child) === "taxAgentIds") { return { ...child, options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content })) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js index 25b815a0..e1ee1288 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js @@ -324,10 +324,11 @@ export const salaryFileSearchConditions = [ }, { conditionType: "SELECT", - domkey: ["taxAgentId"], + domkey: ["taxAgentIds"], fieldcol: 16, label: getLabel(537996, "个税扣缴义务人"), labelcol: 8, + multiple: true, options: [], viewAttr: 2 }, diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js index a7808410..2fc4c28b 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { Spin } from "antd"; -import { WeaEchart } from "ecCom"; +import { WeaEchart, WeaLocaleProvider } from "ecCom"; import RightOptions from "./rightOptions"; import ChartsRangeSettingsModal from "./chartsRangeSettingsModal"; import { mapBarOptions, mapLineOptions, mapPieOptions } from "./condition"; @@ -15,6 +15,8 @@ import PovitpivotChartModal from "./povitpivotChartModal"; import { getSalaryMonthValue } from "./statisticalMicroSettingsSlide"; import "../index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class ReportContent extends Component { constructor(props) { super(props); @@ -33,7 +35,8 @@ class ReportContent extends Component { rangSet: { visible: false, reportId: "", rangeVal: {} - } + }, + pageInfo: { current: 1, pageSize: 10, total: 0 } }; } @@ -56,9 +59,9 @@ class ReportContent extends Component { handleReceive = ({ data }) => { const { type, payload: { id, params } = {} } = data; if (type === "init") { - const { columns, countResult, dataSource } = this.state; + const { columns, countResult, dataSource, pageInfo } = this.state; this.postMessageToChild({ - columns, countResult, dataSource, + columns, countResult, dataSource, pageInfo, showSum: !_.isEmpty(countResult) }); } else if (type === "turn") { @@ -72,30 +75,38 @@ class ReportContent extends Component { visible: true, id: pivotId, dimensionId, dimensionValue, isShare } }); + } else if (id === "PAGEINFO") { + this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.reportStatisticsReportGetData(this.props.report)); } } }; postMessageToChild = (payload) => { + const i18n = { + "共": getLabel(18609, "共"), "条": getLabel(18256, "条"), + "总计": getLabel(523, "总计") + }; const childFrameObj = document.getElementById("atdTable"); - const { dataSource, columns, showSum, countResult } = payload; + const { dataSource, columns, showSum, countResult, pageInfo } = payload; childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ - dataSource, columns, showSum, countResult + dataSource, columns, showSum, countResult, i18n, pageInfo }), "*"); }; reportStatisticsReportGetData = (params) => { - const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params; + const { pageInfo } = this.state; + const { id, dimension, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params; const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType); const payload = { - id, dimensionId, isShare, + id, dimensionId, isShare, ...pageInfo, salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01" }; this.setState({ loading: true }); reportStatisticsReportGetData(payload).then(({ status, data }) => { this.setState({ loading: false }); if (status && id.toString() === data.reportId.toString()) { - const { countResult, columns, pageInfo: { list } } = data; + const { countResult, columns, pageInfo: { list, pageNum, pageSize, total } } = data; this.setState({ - countResult, + countResult, dataSource: list || [], + pageInfo: dimension === getLabel(111, "人员") ? { ...pageInfo, current: pageNum, pageSize, total } : null, columns: _.map(columns, it => ({ ...it, dataIndex: it.column, width: it.width ? it.width + "px" : 150, @@ -105,12 +116,11 @@ class ReportContent extends Component { dataIndex: child.column, width: child.width ? child.width + "px" : 150, title: child.text, align: "center" })) : [] - })), - dataSource: list || [] + })) }, () => { this.postMessageToChild({ columns: this.state.columns, countResult: this.state.countResult, - dataSource: this.state.dataSource, + dataSource: this.state.dataSource, pageInfo: this.state.pageInfo, showSum: !_.isEmpty(this.state.countResult) }); }); diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/form.js b/pc4mobx/hrmSalary/pages/ruleConfig/form.js index c1308ec4..9b17f248 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/form.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/form.js @@ -1,7 +1,9 @@ import React from "react"; -import { WeaFormItem, WeaSearchGroup } from "ecCom"; +import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom"; import { WeaSwitch } from "comsMobx"; +const getKey = WeaTools.getKey; + export const renderRuleForm = (form, condition, onChange) => { const { isFormInit } = form; const formParams = form.getFormParams(); @@ -15,7 +17,11 @@ export const renderRuleForm = (form, condition, onChange) => { label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }} wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)} tipPosition="bottom"> - + getKey(fields) !== "salaryAcctFixedColumns" && onChange(v)} + onBlur={(v) => getKey(fields) === "salaryAcctFixedColumns" && onChange({ salaryAcctFixedColumns: { value: v } })} + /> ), colSpan: 1, hide: fields.hide diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js index efda13dd..3f24a0d6 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js @@ -25,6 +25,7 @@ class RuleConfig extends Component { super(props); this.state = { conditions: [], sysinfo: {}, progressVisible: false, progress: 50 }; this.timer = null; + this.handleDebounce = null; } componentDidMount() { @@ -116,16 +117,22 @@ class RuleConfig extends Component { case "taxAgentShowStatus": case "salaryShowStatus": case "adjustShowStatus": - const confTitle = { - welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"), - welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"), - salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"), - extEmpsWitch: getLabel(544097, "开启非系统人员"), - taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"), - salaryShowStatus: getLabel(111, "显示工资单页签"), - adjustShowStatus: getLabel(111, "显示调薪记录页签") - }; - this.unifiedSettings(key, confTitle[key]); + if (!this.handleDebounce) { + this.handleDebounce = _.debounce(() => { + const confTitle = { + welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"), + welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"), + salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"), + extEmpsWitch: getLabel(544097, "开启非系统人员"), + taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"), + salaryShowStatus: getLabel(111, "显示工资单页签"), + adjustShowStatus: getLabel(111, "显示调薪记录页签") + }; + this.unifiedSettings(key, confTitle[key]); + this.handleDebounce = null; + }, 500); + } + this.handleDebounce(); break; default: break; diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 12d0c7bf..4a1ed275 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -88,7 +88,7 @@ class SalaryItemForm extends Component { return { ...item, type: dataType === "number" ? "INPUTNUMBER" : "INPUT", - display: valueType && valueType.toString() === "1", + display: valueType && valueType.toString() === "1" && useInEmployeeSalary == 0, viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1 }; case "formulaContent": diff --git a/pc4mobx/hrmSalary/stores/payrollFiles.js b/pc4mobx/hrmSalary/stores/payrollFiles.js index 947549b2..62edcb2e 100644 --- a/pc4mobx/hrmSalary/stores/payrollFiles.js +++ b/pc4mobx/hrmSalary/stores/payrollFiles.js @@ -26,11 +26,12 @@ export class PayrollFilesStore { @action("薪资档案-列表查询") queryList = (payload = {}, searchItemsValue = {}, url = "") => { return new Promise((resolve, reject) => { - const { departmentIds, positionIds, subcompanyIds, statuses, ...extra } = searchItemsValue; + const { departmentIds, positionIds, subcompanyIds, statuses, taxAgentIds, ...extra } = searchItemsValue; API.queryList({ departmentIds: departmentIds ? departmentIds.split(",") : [], positionIds: positionIds ? positionIds.split(",") : [], subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [], + taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [], statuses: statuses ? statuses.split(",") : [], ...payload, ...extra, url }).then(res => {