From 2e613014fef558633d6da498ea98175e4bb5929b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 17 Oct 2023 09:17:37 +0800
Subject: [PATCH] =?UTF-8?q?feature/2.9.42310.01-=E5=B7=A5=E8=B5=84?=
=?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../payrollRelease/components/conditions.js | 6 +-
.../components/payrollTempBaseSet/index.js | 26 ++++++--
.../updatePayrollTemplateSlide/index.js | 61 ++++++++++++++++---
.../hrmSalary/pages/payrollRelease/index.less | 4 ++
4 files changed, 80 insertions(+), 17 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/conditions.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/conditions.js
index fbc2d3d1..6ff6e05e 100644
--- a/pc4mobx/hrmSalary/pages/payrollRelease/components/conditions.js
+++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/conditions.js
@@ -83,9 +83,7 @@ export const tempBaseSetConditions = [
labelcol: 6,
options: [],
value: "",
- rules: "required|string",
- hide: true,
- viewAttr: 3
+ hide: true
},
{
colSpan: 1,
@@ -167,7 +165,7 @@ export const tempBaseSetFbConditions = [
value: 7,
viewAttr: 3,
hide: false,
- rules: "required|string"
+ rules: "required"
},
{
colSpan: 1,
diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js
index 43394b17..6482a04f 100644
--- a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js
@@ -21,15 +21,16 @@ class Index extends Component {
this.state = {
conditions: [], salaryMonthOptions: [], fbConditions: [],
formData: {
- autoSendDayOfMonth: "",
- autoSendTimeOfDay: "",
- autoSendCycleType: ""
+ autoSendDayOfMonth: "1",
+ autoSendTimeOfDay: "09:00",
+ autoSendCycleType: "1"
}
};
}
componentDidMount() {
this.commonEnumList();
+ this.props.visible && this.getPayrollBaseForm(this.props);
}
componentWillReceiveProps(nextProps, nextContext) {
@@ -129,6 +130,8 @@ class Index extends Component {
if (getKey(o) === "replenishRule") {
return {
...o, hide: params[key].value === "0",
+ rules: (!_.isEmpty(replenishRuleOptions) && reissueRule === "1") ? "required|string" : "",
+ viewAttr: (!_.isEmpty(replenishRuleOptions) && reissueRule === "1") ? 3 : 2,
options: _.map(replenishRuleOptions, t => ({ key: t.id, showname: t.content }))
};
}
@@ -140,6 +143,7 @@ class Index extends Component {
})
}, () => {
payrollTempForm.initFormFields(this.state.conditions);
+ this.resetRequiredForm();
});
} else if (key === "salarySobId") {
this.setState({
@@ -149,7 +153,9 @@ class Index extends Component {
...it, items: _.map(it.items, o => {
if (getKey(o) === "replenishRule") {
return {
- ...o, options: _.map(replenishRuleOptions, t => ({ key: t.id, showname: t.content }))
+ ...o, options: _.map(replenishRuleOptions, t => ({ key: t.id, showname: t.content })),
+ rules: (!_.isEmpty(replenishRuleOptions) && reissueRule === "1") ? "required|string" : "",
+ viewAttr: (!_.isEmpty(replenishRuleOptions) && reissueRule === "1") ? 3 : 2
};
}
return { ...o };
@@ -165,12 +171,17 @@ class Index extends Component {
name: salarySob.valueSpan,
replenishName: salarySob.valueSpan + "-补发工资单"
});
+ this.resetRequiredForm();
});
- } else if (key === "autoSendStatus") {
-
}
this.forceUpdate();
};
+ resetRequiredForm = () => {
+ const { payrollStore: { payrollTempForm } } = this.props;
+ const reissueRule = payrollTempForm.getFormParams().reissueRule;
+ if (reissueRule === "0") payrollTempForm.updateFields({ replenishRule: "0" });
+ if (reissueRule === "1") payrollTempForm.updateFields({ replenishRule: "" });
+ };
handleFbChange = (params) => {
const { payrollStore: { payrollTempFeedbackForm } } = this.props;
const key = _.keys(params)[0];
@@ -193,6 +204,8 @@ class Index extends Component {
})
}, () => {
payrollTempFeedbackForm.initFormFields(this.state.fbConditions);
+ const ackFeedbackStatus = payrollTempFeedbackForm.getFormParams().ackFeedbackStatus;
+ if (ackFeedbackStatus === "0") payrollTempFeedbackForm.updateFields({ autoAckDays: "7", feedbackUrl: "/" });
});
}
this.forceUpdate();
@@ -210,6 +223,7 @@ class Index extends Component {