custom/汇通建设

This commit is contained in:
lys 2024-10-31 17:05:24 +08:00
parent f126179d1d
commit b461a2c801
2 changed files with 27 additions and 8 deletions

View File

@ -20,8 +20,8 @@ import { salaryApprovalSaveForm, saveAdjustmentRule, saveLedgerBasic, saveLedger
import { sysConfCodeRule } from "../../../apis/ruleconfig";
import "./index.less";
const Step = WeaSteps.Step;
const { getLabel } = WeaLocaleProvider;
const Step = WeaSteps.Step;
@inject("taxAgentStore", "ledgerStore")
@observer
@ -96,7 +96,6 @@ class LedgerSlide extends Component {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
this.handleClose();
} else {
message.success(errormsg || "保存失败");
}
@ -160,6 +159,7 @@ class LedgerSlide extends Component {
* Date: 2022/12/14
*/
handleSaveSalaryItemParams = (empFields, itemGroups) => this.setState({ empFields, itemGroups });
handleDefaultSave = () => {
const { saveSalarySobId } = this.state;
const { state: { approvalId } } = this.approRef.wrappedInstance;
@ -189,14 +189,16 @@ class LedgerSlide extends Component {
this.setState({ loading: false });
if (status) {
message.success(getLabel(111, "保存成功!"));
saveSalarySobId && this.handleClose();
} else {
message.error(errormsg);
}
});
};
render() {
const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
const { current, saveSalarySobId, loading } = this.state;
const { current, saveSalarySobId, loading, salaryApprovalStatus } = this.state;
let tabs = [
{
key: 0, title: getLabel(82751, "基础设置"),
@ -253,9 +255,11 @@ class LedgerSlide extends Component {
{
key: 4, title: getLabel(543469, "调薪计薪规则"),
createBtns: [
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>{getLabel(111, "完成")}</Button>
<Button type="primary"
onClick={() => this.setState({ current: current + 1 }, () => this.saveLedgerAdjustRule())}>{getLabel(111, "保存并进入下一步")}</Button>
],
editBtns: [
<Button type="primary" loading={loading}
@ -263,8 +267,23 @@ class LedgerSlide extends Component {
],
children: <LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>
},
{
key: 5, title: getLabel(111, "核算审批规则"),
createBtns: [
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" loading={loading} onClick={this.handleDefaultSave}>{getLabel(111, "完成")}</Button>
],
editBtns: [
<Button type="primary" loading={loading}
onClick={this.handleDefaultSave}>{getLabel(111, "保存")}</Button>
],
children: <LedgerAccountApprRule {...this.props} ref={dom => this.approRef = dom}
saveSalarySobId={saveSalarySobId}/>
}
];
!salaryApprovalStatus && tabs.pop();
return (
<WeaSlideModal
className="ledgerSlideLayout slideOuterWrapper"

View File

@ -62,7 +62,7 @@ class RuleConfig extends Component {
getKey(o) === "APPROVAL_CAN_MANUAL_FILE_STATUS" || getKey(o) === "APPROVAL_CAN_RE_CALC_STATUS" || getKey(o) === "APPROVAL_CAN_EDIT_RESULT_STATUS"
) {
return {
...o, label: getLabel(o.lanId, o.label),
...o,
hide: sysinfo["SALARY_APPROVAL_STATUS"] === "0" || _.isNil(sysinfo["SALARY_APPROVAL_STATUS"])
};
}
@ -138,11 +138,11 @@ class RuleConfig extends Component {
case "taxAgentShowStatus":
case "salaryShowStatus":
case "adjustShowStatus":
case "REPORT_ORGANIZATIN_TYPE":
case "SALARY_APPROVAL_STATUS":
case "APPROVAL_CAN_MANUAL_FILE_STATUS":
case "APPROVAL_CAN_RE_CALC_STATUS":
case "APPROVAL_CAN_EDIT_RESULT_STATUS":
case "REPORT_ORGANIZATIN_TYPE":
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const confTitle = {
@ -153,11 +153,11 @@ class RuleConfig extends Component {
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
salaryShowStatus: getLabel(111, "显示工资单页签"),
adjustShowStatus: getLabel(111, "显示调薪记录页签"),
REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息"),
SALARY_APPROVAL_STATUS: getLabel(111, "是否开启薪资审批"),
APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"),
APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"),
APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据"),
REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息")
APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据")
};
this.unifiedSettings(key, confTitle[key]);
this.handleDebounce = null;