diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 98912d8a..d53d8fc7 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -201,7 +201,7 @@ export default class MobilePayroll extends React.Component { ; const { salaryTemplate, salaryGroups, employeeInformation, - sendTime, confirmStatus + sendTime, confirmStatus, showAck, showFeedback } = toJS(this.props.mySalaryStore.mySalaryBill); const salaryProps = { theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime, @@ -215,13 +215,11 @@ export default class MobilePayroll extends React.Component { - { - (_.isNil(confirmStatus) || confirmStatus === "0") && - - } + : @@ -229,13 +227,11 @@ export default class MobilePayroll extends React.Component { store={this.props.mySalaryStore}>
- { - (_.isNil(confirmStatus) || confirmStatus === "0") && - - } +
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index 0ddd835d..5fa76f93 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -96,13 +96,11 @@ class MySalaryView extends Component { store={this.props.mySalaryStore}>
- { - (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") && - - } +
@@ -120,7 +118,13 @@ export default MySalaryView; export const ConfirmBtns = (props) => { return
- - + { + props.showAck === "1" && + + } + { + props.showFeedback === "1" && + + }
; }; diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js index f64ad003..d8a1eeb2 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js @@ -34,6 +34,7 @@ class TemplateBaseSettings extends Component { }, ackFeedbackSetting: { ackStatus: "0", + feedbackStatus: "0", autoAckDays: 7, feedBackUrl: "", mobileFeedbackUrl: "" @@ -97,7 +98,7 @@ class TemplateBaseSettings extends Component { render() { const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state; - const { ackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting; + const { ackStatus, feedbackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting; const { limitMonth = 0 } = salaryBillViewingLimitSetting; return ( @@ -156,9 +157,22 @@ class TemplateBaseSettings extends Component { })}/> + + } + + this.setState({ + ackFeedbackSetting: { + ...ackFeedbackSetting, feedbackStatus + } + })}/> + + { + feedbackStatus === "1" && + { - if (it === "ackFeedbackStatus") { + if (it === "ackFeedbackStatus" || it === "feedbackStatus") { payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" }); } else { payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" }); @@ -292,15 +292,19 @@ class Index extends Component { handleFbChange = (params) => { const { payrollStore: { payrollTempFeedbackForm, setHasBeenModify } } = this.props; const key = _.keys(params)[0]; - if (key === "ackFeedbackStatus") { + if (key === "ackFeedbackStatus" || key === "feedbackStatus") { this.setState({ fbConditions: _.map(this.state.fbConditions, it => { if (it.title === getLabel(544092, "工资单确认反馈设置")) { return { ...it, items: _.map(it.items, o => { - if (getKey(o) === "autoAckDays" || getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") { + if (getKey(o) === "autoAckDays") { return { - ...o, hide: params[key].value === "0" + ...o, hide: key === "ackFeedbackStatus" && params["ackFeedbackStatus"].value === "0" + }; + } else if (getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") { + return { + ...o, hide: key === "feedbackStatus" && params["feedbackStatus"].value === "0" }; } return { ...o }; @@ -312,8 +316,11 @@ class Index extends Component { }, () => { payrollTempFeedbackForm.initFormFields(this.state.fbConditions); const ackFeedbackStatus = payrollTempFeedbackForm.getFormParams().ackFeedbackStatus; + const feedbackStatus = payrollTempFeedbackForm.getFormParams().feedbackStatus; if (ackFeedbackStatus === "0") payrollTempFeedbackForm.updateFields({ - autoAckDays: "7", + autoAckDays: "7" + }); + if (feedbackStatus === "0") payrollTempFeedbackForm.updateFields({ feedbackUrl: "/", mobileFeedbackUrl: "/" }); diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js index ac2cb87c..9b0a1c53 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js @@ -46,11 +46,12 @@ class Index extends Component { const { replenishRule, autoSendStatus, emailStatus, msgStatus, smsStatus, ...extraBs } = payrollTempForm.getFormParams(), - { ackFeedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(), + { ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(), { formData, smsSettingDialog } = this.tmpBaseSetRef.state; const payload = { ...toJS(tmplDataSource), ...extraFb, ...formData, ...extraBs, ackFeedbackStatus: ackFeedbackStatus === "1", + feedbackStatus: feedbackStatus === "1", autoSendStatus: autoSendStatus === "1", emailStatus: emailStatus === "1", msgStatus: msgStatus === "1",