产品-工资单反馈

This commit is contained in:
黎永顺 2023-07-11 17:27:45 +08:00
parent dc27a3e491
commit eb2d77e399
3 changed files with 40 additions and 5 deletions

View File

@ -55,3 +55,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);
};

View File

@ -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: "",

View File

@ -25,7 +25,8 @@ export default class Index extends Component {
rule: "",
enctry: "",
operateTaxDeclaration: "",
matchRule: ""
matchRule: "",
salarySendFeedback: ""
},
showEncryptOperationButton: "",
progressVisible: false,
@ -53,7 +54,8 @@ export default class Index extends Component {
showEncryptOperationButton,
isOpenEncrypt: enctry,
isOpenTaxDeclaration: operateTaxDeclaration,
salaryAcctEmployeeRule: matchRule
salaryAcctEmployeeRule: matchRule,
salarySendFeedback
}
} = appSettings;
this.setState({
@ -61,7 +63,7 @@ export default class Index extends Component {
showEncryptOperationButton,
saveParams: {
...saveParams,
ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule
ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, salarySendFeedback
}
});
}
@ -128,6 +130,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 }) => {
@ -227,6 +239,9 @@ export default class Index extends Component {
case "enctry":
this.saveEncryptSetting();
break;
case "salarySendFeedback":
this.saveSalarySendFeedback();
break;
default:
break;
}
@ -252,7 +267,7 @@ export default class Index extends Component {
employeeOptions,
showEncryptOperationButton
} = this.state;
const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule } = saveParams;
const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule, salarySendFeedback } = saveParams;
return (
<div className="ruleWrapper">
<WeaTop
@ -303,6 +318,12 @@ export default class Index extends Component {
/>
</WeaFormItem>
</WeaSearchGroup>
<WeaSearchGroup title={getLabel(111, "工资单反馈")} showGroup center>
<WeaFormItem label={getLabel(111, "工资单反馈")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
<WeaCheckbox display="switch" value={salarySendFeedback}
onChange={val => this.handleChange("salarySendFeedback", val)}/>
</WeaFormItem>
</WeaSearchGroup>
{
this.state.progressVisible &&
<ProgressModal