feature/2.10.1.2401.01-工资单配置反馈开关
This commit is contained in:
parent
c260c31bf8
commit
817f9767fc
|
|
@ -201,7 +201,7 @@ export default class MobilePayroll extends React.Component {
|
|||
</div>;
|
||||
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 {
|
|||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||
store={this.props.mySalaryStore}>
|
||||
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
|
||||
{
|
||||
(_.isNil(confirmStatus) || confirmStatus === "0") &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
}
|
||||
<ConfirmBtns
|
||||
showAck={showAck} showFeedback={showFeedback}
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
</MobileTemplate>
|
||||
</Authority>
|
||||
:
|
||||
|
|
@ -229,13 +227,11 @@ export default class MobilePayroll extends React.Component {
|
|||
store={this.props.mySalaryStore}>
|
||||
<div className="weapp-salary-my-salary-view-payroll">
|
||||
<Content {...salaryProps}>
|
||||
{
|
||||
(_.isNil(confirmStatus) || confirmStatus === "0") &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
}
|
||||
<ConfirmBtns
|
||||
showAck={showAck} showFeedback={showFeedback}
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
</Content>
|
||||
</div>
|
||||
</Authority>
|
||||
|
|
|
|||
|
|
@ -96,13 +96,11 @@ class MySalaryView extends Component {
|
|||
store={this.props.mySalaryStore}>
|
||||
<div className="weapp-salary-my-salary-view-payroll">
|
||||
<Content {...salaryProps}>
|
||||
{
|
||||
(_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
}
|
||||
<ConfirmBtns
|
||||
showAck={mySalaryStore.showAck} showFeedback={mySalaryStore.showFeedback}
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
</Content>
|
||||
</div>
|
||||
</Authority>
|
||||
|
|
@ -120,7 +118,13 @@ export default MySalaryView;
|
|||
|
||||
export const ConfirmBtns = (props) => {
|
||||
return <div className="space">
|
||||
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
||||
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
||||
{
|
||||
props.showAck === "1" &&
|
||||
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
||||
}
|
||||
{
|
||||
props.showFeedback === "1" &&
|
||||
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
||||
}
|
||||
</div>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<React.Fragment>
|
||||
|
|
@ -156,9 +157,22 @@ class TemplateBaseSettings extends Component {
|
|||
})}/>
|
||||
<WeaHelpfulTip
|
||||
title={getLabel(111, "开启后,还需在计划任务中配置定时任务,执行自动确认任务;邮箱端查看工资单暂不支持确认及反馈;")}
|
||||
style={{ marginLeft: 10 }}
|
||||
style={{ marginLeft: 5 }}
|
||||
placement="top" width={200}/>
|
||||
</WeaFormItem>
|
||||
</React.Fragment>
|
||||
}
|
||||
<WeaFormItem label={getLabel(111, "启用工资单反馈")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaCheckbox value={feedbackStatus} display="switch"
|
||||
onChange={feedbackStatus => this.setState({
|
||||
ackFeedbackSetting: {
|
||||
...ackFeedbackSetting, feedbackStatus
|
||||
}
|
||||
})}/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
feedbackStatus === "1" &&
|
||||
<React.Fragment>
|
||||
<WeaFormItem label={getLabel(111, "PC端反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaInput
|
||||
value={feedBackUrl} viewAttr={3}
|
||||
|
|
|
|||
|
|
@ -202,6 +202,17 @@ export const tempBaseSetFbConditions = [
|
|||
hide: false,
|
||||
rules: "required"
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["feedbackStatus"],
|
||||
fieldcol: 2,
|
||||
label: "启用工资单反馈",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "1",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class Index extends Component {
|
|||
} else if (getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") {
|
||||
return {
|
||||
...o,
|
||||
hide: _.isNil(fieldsEchoData["ackFeedbackStatus"]) ? o.hide : !fieldsEchoData["ackFeedbackStatus"]
|
||||
hide: _.isNil(fieldsEchoData["feedbackStatus"]) ? o.hide : !fieldsEchoData["feedbackStatus"]
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
|
|
@ -171,7 +171,7 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
_.map(tempBaseSetFbDomkeys, it => {
|
||||
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: "/"
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue