Merge branch 'feature/工资单反馈' into develop

# Conflicts:
#	pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js
This commit is contained in:
黎永顺 2023-07-13 14:49:42 +08:00
commit 92edd14872
5 changed files with 51 additions and 31 deletions

View File

@ -126,8 +126,8 @@ export default class MobilePayroll extends React.Component {
};
handleGoFeedback = () => {
const { mySalaryBillData } = this.state;
const { feedbackWorkflowId } = mySalaryBillData;
window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`);
const { feedbackUrl } = mySalaryBillData;
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
};
render() {

View File

@ -56,8 +56,8 @@ class MySalaryView extends Component {
};
handleGoFeedback = () => {
const { mySalaryStore } = this.state;
const { feedbackWorkflowId } = mySalaryStore;
window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`);
const { feedbackUrl } = mySalaryStore;
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
};
render() {

View File

@ -21,10 +21,7 @@ export default class SalarySendList extends React.Component {
// 发放回调
handleGrant(record) {
window.open(
"/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=" +
record.id
);
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=${record.id}&ackFeedbackStatus=${record.ackFeedbackStatus}`);
}
// 查看详情

View File

@ -9,7 +9,6 @@ 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;
@ -41,7 +40,10 @@ export default class PayrollGrant extends React.Component {
componentWillMount() {
const { selectedKey } = this.state;
let id = getQueryString("id");
this.setState({ currentId: id });
this.setState({
currentId: id,
showFeedbackColumn: getQueryString("ackFeedbackStatus") === "1"
});
const {
payrollStore: { getPayrollInfo, getInfoList, getPaySa }
} = this.props;
@ -51,15 +53,8 @@ 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;

View File

@ -1,5 +1,14 @@
import React from "react";
import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaTimePicker } from "ecCom";
import {
WeaCheckbox,
WeaFormItem,
WeaInput,
WeaInputNumber,
WeaLocaleProvider,
WeaSearchGroup,
WeaSelect,
WeaTimePicker
} from "ecCom";
import { inject, observer } from "mobx-react";
import { getReplenishRuleSetOptions } from "../../../apis/payroll";
import { commonEnumList } from "../../../apis/payrollFiles";
@ -89,20 +98,11 @@ export default class BaseInformForm extends React.Component {
};
render() {
const { request, options, replenishRuleOptions, salaryMonthOptions } = this.state;
const { request, options, replenishRuleOptions } = this.state;
const {
salarySob,
name,
description,
replenishName,
replenishRule,
reissueRule,
msgStatus,
emailStatus,
autoSendStatus,
autoSendDayOfMonth,
autoSendTimeOfDay,
autoSendCycleType
salarySob, name, description, replenishName, replenishRule, reissueRule, msgStatus, emailStatus,
ackFeedbackStatus, autoAckDays, feedbackUrl, autoSendStatus, autoSendDayOfMonth,
autoSendTimeOfDay, autoSendCycleType
} = request;
return (
@ -220,6 +220,34 @@ export default class BaseInformForm extends React.Component {
</WeaFormItem>
}
</WeaSearchGroup>
<WeaSearchGroup title={getLabel(111, "工资单确认反馈设置")} showGroup needTigger col={1}
className="payrollBaseInfoWrapper">
<WeaFormItem label={getLabel(111, "启用工资单确认")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaCheckbox value={ackFeedbackStatus ? "1" : "0"} display="switch"
onChange={value => this.handleChange({
ackFeedbackStatus: value === "1",
autoAckDays: 7,
feedbackUrl: "/"
})}/>
</WeaFormItem>
{
ackFeedbackStatus &&
<React.Fragment>
<WeaFormItem label={getLabel(111, "自动确认超时天数")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaInputNumber
min={1} value={autoAckDays} viewAttr={3}
onChange={autoAckDays => this.handleChange({ autoAckDays })}
/>
</WeaFormItem>
<WeaFormItem label={getLabel(111, "反馈流程地址")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaInput
value={feedbackUrl} viewAttr={3}
onChange={feedbackUrl => this.handleChange({ feedbackUrl })}
/>
</WeaFormItem>
</React.Fragment>
}
</WeaSearchGroup>
</React.Fragment>
);
}