diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index 48fcecb2..c322c94f 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -210,18 +210,26 @@ export const payrollCheckType = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params); }; //工资单-反馈验证 -export const feedBackSalaryBill = params => { +export const feedBackSalaryBill = async params => { const { header, ...payload } = params; - return fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, { + const res = await fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, { method: "GET", mode: "cors", headers: { "Content-Type": "application/json", ...header } - }).then(res => res.json()); + }); + return await res.json(); // return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params); }; //工资单-确认 -export const confirmSalaryBill = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params); +export const confirmSalaryBill = async params => { + const { header, ...payload } = params; + const res = await fetch(`/api/bs/hrmsalary/salaryBill/confirmSalaryBill?${convertToUrlString(payload)}`, { + method: "GET", + mode: "cors", + headers: { "Content-Type": "application/json", ...header } + }); + return await res.json(); + // return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params); }; // 工资单基础设置-获取设置列表 diff --git a/pc4mobx/hrmSalary/components/FormInfo/index.js b/pc4mobx/hrmSalary/components/FormInfo/index.js index d6940489..d0d87963 100644 --- a/pc4mobx/hrmSalary/components/FormInfo/index.js +++ b/pc4mobx/hrmSalary/components/FormInfo/index.js @@ -67,7 +67,7 @@ export default class FormInfo extends Component { } } coms != null && formItems.push({ - com: ({coms}), + com: ({coms}), hide: field.hide, col }); diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js index 5deeaecd..239ccb9e 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js @@ -99,7 +99,8 @@ class EditSalaryCalcSlide extends Component { return; } const payload = { - salaryAcctEmpId, employeeInfos: baseInfo, + salaryAcctEmpId, + employeeInfos: _.map(baseInfo, o => ({ ...o, fieldValue: o.fieldValue.id || o.fieldValue })), items: [ ..._.reduce(itemsByGroup, (pre, cur) => { return [ diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less index facb4273..669f1ba1 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less @@ -155,6 +155,10 @@ .esf-base-info-form, .wea-title, .wea-content { padding: 0; + + .ant-row { + height: 100%; + } } .esf-form-content { diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 1b598371..69d84928 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -144,14 +144,16 @@ export default class MobilePayroll extends React.Component { return params; }; confirmSalaryBill = () => { - confirmSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(30700, "操作成功")); - this.getMySalaryBill(getQueryString("id")); - } else { - message.error(errormsg || getLabel(30651, "操作失败")); - } - }); + const { salaryBillToken } = this.state; + confirmSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功")); + this.getMySalaryBill(getQueryString("id")); + } else { + message.error(errormsg || getLabel(30651, "操作失败")); + } + }); }; handleGoFeedback = () => { Modal.confirm({ diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartTable.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartTable.js index 552a7122..df034794 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartTable.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartTable.js @@ -32,10 +32,10 @@ class PayrollPartTable extends Component { } componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.visible !== this.props.visible) { - nextProps.visible && this.sendRangeList(nextProps); - this.setState({ selectedRowKeys: [] }); - } + if (nextProps.visible !== this.props.visible && nextProps.visible) this.sendRangeList(nextProps); + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ + selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 } + }); } sendRangeList = (props) => { @@ -52,9 +52,9 @@ class PayrollPartTable extends Component { sendRangeList(payload).then(({ status, data }) => { this.setState({ loading: { ...loading, query: false } }); if (status) { - const { pageNum: current, pageSize, total, columns, list: dataSource } = data; + const { pageNum: current, total, columns, list: dataSource } = data; this.setState({ - pageInfo: { ...pageInfo, current, pageSize, total }, + pageInfo: { ...pageInfo, current, total }, dataSource: _.map(dataSource, it => ({ ...it, includeObj: _.map(it.includeObj, child => child.targetName || child.targetTypeName).join(","), @@ -125,8 +125,7 @@ class PayrollPartTable extends Component { onChange: current => { this.setState({ pageInfo: { ...pageInfo, current } - }, () => { - }); + }, () => this.sendRangeList({ grantType, salarySendId })); } }; const rowSelection = { diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js index 132a7dbb..6616f55f 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js @@ -407,7 +407,7 @@ export const salaryFilesConditions = [ domkey: ["position"], fieldcol: 14, label: "岗位", - lanId: 6086, + lanId: 111, labelcol: 10, value: "", viewAttr: 1