diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index 1f9b1d64..6f48f359 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -375,6 +375,10 @@ export const sendMobileCode = (params) => { export const payrollCheckType = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params); }; +//工资单-确认 +export const confirmSalaryBill = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params); +}; // 工资单基础设置-获取设置列表 export const getSalaryBillBaseSetForm = (id) => { diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index 2e3c0c4f..c041b4d3 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -63,3 +63,7 @@ export const reportStatisticsReportSave = (params) => { export const reportGetForm = params => { return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/getForm", "GET", params); }; +//工资单反馈 +export const saveSalarySendFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params); +}; diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 5a41f8ac..565af168 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -8,12 +8,13 @@ import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; import PhoneTemplate from "../payroll/templatePreview/phoneTemplate"; import "../payroll/templatePreview/index.less"; import * as API from "../../apis/mySalaryBenefits"; -import { payrollCheckType } from "../../apis/payroll"; +import { payrollCheckType, confirmSalaryBill } from "../../apis/payroll"; import CaptchaModal from "../../components/captchaModal"; +import { ConfirmBtns } from "../mySalary/mySalaryView"; import PassSetDialog from "./passSetDialog"; import "./index.less"; -const getLabel = WeaLocaleProvider.getLabel; +const { getLabel } = WeaLocaleProvider; @inject("mySalaryStore") @observer @@ -113,6 +114,21 @@ 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, "操作失败")); + } + }); + }; + handleGoFeedback = () => { + const { mySalaryBillData } = this.state; + const { feedbackWorkflowId } = mySalaryBillData; + window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`); + }; render() { const { mySalaryStore: { clearLoading, pwdForm } } = this.props; @@ -156,7 +172,15 @@ export default class MobilePayroll extends React.Component { isPreview salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)} salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []} - /> + > + { + (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") && + + } + @@ -169,7 +193,15 @@ export default class MobilePayroll extends React.Component { isPreview salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)} salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])} - /> + > + { + (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") && + + } + diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index bda458fb..dd16b25f 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -6,12 +6,16 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; +import { Button, message } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import Authority from "./authority"; import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; -import { payrollCheckType } from "../../apis/payroll"; +import { confirmSalaryBill, payrollCheckType } from "../../apis/payroll"; import CaptchaModal from "../../components/captchaModal"; import "../payroll/templatePreview/index.less"; +const { getLabel } = WeaLocaleProvider; + @inject("mySalaryStore") @observer class MySalaryView extends Component { @@ -37,6 +41,25 @@ class MySalaryView extends Component { } } + confirmSalaryBill = () => { + const { mySalaryStore: { getMySalaryBill }, params: { salaryInfoId } } = this.props; + confirmSalaryBill({ salaryInfoId }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功")); + getMySalaryBill(Number(salaryInfoId)).then(data => { + this.setState({ mySalaryStore: data }); + }); + } else { + message.error(errormsg || getLabel(30651, "操作失败")); + } + }); + }; + handleGoFeedback = () => { + const { mySalaryStore } = this.state; + const { feedbackWorkflowId } = mySalaryStore; + window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`); + }; + render() { const { captchaVisible, mySalaryStore } = this.state; const { params: { salaryInfoId } } = this.props; @@ -56,7 +79,15 @@ class MySalaryView extends Component { isPreview isMsgPreview salaryTemplateShowSet={salaryTemplateShowSet ? JSON.stringify(salaryTemplateShowSet) : []} salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []} - /> + > + { + (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") && + + } + @@ -71,3 +102,10 @@ class MySalaryView extends Component { } export default MySalaryView; + +export const ConfirmBtns = (props) => { + return
+ + +
; +}; diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 0be427d5..da625880 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -9,6 +9,7 @@ import { getSearchs, renderLoading } from "../../../util"; import CustomPaginationTable from "../../../components/customPaginationTable"; import PayrollPartTable from "./payrollPartTable"; import { getPayrollIssuanceProgressBar } from "../../../apis/payroll"; +import { sysConfCodeRule } from "../../../apis/ruleconfig"; import ProgressModal from "../../../components/progressModal"; const getLabel = WeaLocaleProvider.getLabel; @@ -25,6 +26,7 @@ export default class PayrollGrant extends React.Component { selectedKey: "0", progressVisible: false, progress: 0, + showFeedbackColumn: false, payrollPartModalParams: { visible: false, title: "工资单发放", @@ -49,8 +51,15 @@ export default class PayrollGrant extends React.Component { isGranted: selectedKey !== "0" }); getPaySa(); + this.sysConfCodeRule(); } + sysConfCodeRule = () => { + sysConfCodeRule({ code: "SALARY_SEND_FEEDBACK" }).then(({ status, data }) => { + if (status && data === "1") this.setState({ showFeedbackColumn: data === "1" }); + }); + }; + // 撤回 handleWithdraw = (record) => { const { payrollStore } = this.props; @@ -299,11 +308,12 @@ export default class PayrollGrant extends React.Component { }; getColumns = () => { + const { selectedKey, showFeedbackColumn } = this.state; const { payrollStore } = this.props; const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore; const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0"; return _.map([ - ...toJS(columns), + ..._.filter(toJS(columns), it => ((selectedKey === "0" && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && !showFeedbackColumn && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && showFeedbackColumn))), { title: "操作", key: "", @@ -602,6 +612,7 @@ export default class PayrollGrant extends React.Component { { this.state.progressVisible && { this.setState({ progressVisible: false, progress: 0 }); diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js index 6f2e68c2..0c4c8c07 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js @@ -109,6 +109,7 @@ export default class ComputerTemplate extends React.Component { salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent } + {this.props.children} ); } diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less index 52517511..0d2d5dda 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less @@ -85,7 +85,8 @@ margin: 10px; background-color: #FFF; padding: 10px; - .descript-title{ + + .descript-title { display: flex; align-items: center; margin-bottom: 10px; @@ -100,15 +101,18 @@ border: 1px solid #fafafa; border-bottom: none; } - .descriptions-view{ + + .descriptions-view { width: 100%; - table{ + + table { table-layout: fixed; border-collapse: collapse; width: 100%; - border: 1px solid rgba(0,0,0,.06); - .descriptions-row{ - .descriptions-item-label{ + border: 1px solid rgba(0, 0, 0, .06); + + .descriptions-row { + .descriptions-item-label { background-color: #fafafa; padding: 16px 24px; color: #000000d9; @@ -116,11 +120,12 @@ font-size: 12px; line-height: 1.5715; text-align: start; - border: 1px solid rgba(0,0,0,.06); + border: 1px solid rgba(0, 0, 0, .06); min-width: 100px; max-width: 100px; } - .descriptions-item-content{ + + .descriptions-item-content { padding: 16px 24px; display: table-cell; flex: 1; @@ -130,10 +135,20 @@ word-break: break-word; overflow-wrap: break-word; border-collapse: collapse; - border: 1px solid rgba(0,0,0,.06); + border: 1px solid rgba(0, 0, 0, .06); } } } } } + + .space { + display: flex; + align-items: center; + justify-content: flex-end; + + .ant-btn { + margin-right: 10px; + } + } } diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js index 0f85d51d..2a572966 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js @@ -100,6 +100,7 @@ export default class PhoneTemplate extends React.Component { salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent } + {this.props.children} ); } diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 363531bd..fd064300 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -27,7 +27,8 @@ export default class Index extends Component { operateTaxDeclaration: "", matchRule: "", confValue: "0", - withDrawTaxDeclaration: "0" + withDrawTaxDeclaration: "0", + salarySendFeedback: "" }, showEncryptOperationButton: "", progressVisible: false, @@ -56,7 +57,8 @@ export default class Index extends Component { isOpenEncrypt: enctry, isOpenTaxDeclaration: operateTaxDeclaration, salaryAcctEmployeeRule: matchRule, - salaryArchiveDelete: confValue, withDrawTaxDeclaration + salaryArchiveDelete: confValue, withDrawTaxDeclaration, + salarySendFeedback } } = appSettings; this.setState({ @@ -64,7 +66,7 @@ export default class Index extends Component { showEncryptOperationButton, saveParams: { ...saveParams, - ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration + ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration, salarySendFeedback } }); } @@ -131,6 +133,16 @@ export default class Index extends Component { } }); }; + saveSalarySendFeedback = () => { + API.saveSalarySendFeedback({ confValue: this.state.saveParams.salarySendFeedback }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; operateTaxDeclarationFunction = () => { API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"])) .then(({ status, errormsg }) => { @@ -256,6 +268,9 @@ export default class Index extends Component { case "withDrawTaxDeclaration": this.withDrawTaxDeclaration(); break; + case "salarySendFeedback": + this.saveSalarySendFeedback(); + break; default: break; } @@ -289,7 +304,8 @@ export default class Index extends Component { operateTaxDeclaration, matchRule, confValue, - withDrawTaxDeclaration + withDrawTaxDeclaration, + salarySendFeedback } = saveParams; return (
@@ -351,6 +367,12 @@ export default class Index extends Component { /> + + + this.handleChange("salarySendFeedback", val)}/> + + { this.state.progressVisible &&