非系统人员配置功能
This commit is contained in:
parent
dc27a3e491
commit
cf33419bc3
|
|
@ -6,6 +6,10 @@ export const commonEnumList = (params) => {
|
|||
return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params);
|
||||
};
|
||||
|
||||
export const sysinfo = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/info", "GET", params);
|
||||
};
|
||||
|
||||
export const sysOrderRule = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/orderRule", "GET", params);
|
||||
};
|
||||
|
|
@ -43,6 +47,18 @@ export const getEncryptProgress = params => {
|
|||
export const operateTaxDeclarationFunction = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/operateTaxDeclarationFunction", params);
|
||||
};
|
||||
//保存档案删除规则
|
||||
export const saveArchiveDelete = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/saveArchiveDelete", params);
|
||||
};
|
||||
//保存系统规则开关
|
||||
export const saveSysOperate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/operate", params);
|
||||
};
|
||||
//保存个税申报撤回规则
|
||||
export const saveWithDrawTaxDeclaration = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/saveWithDrawTaxDeclaration", params);
|
||||
};
|
||||
//保存匹配规则
|
||||
export const saveSalaryAcctEmployeeRule = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/saveSalaryAcctEmployeeRule", params);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@ export default class Index extends Component {
|
|||
rule: "",
|
||||
enctry: "",
|
||||
operateTaxDeclaration: "",
|
||||
matchRule: ""
|
||||
matchRule: "",
|
||||
confValue: "0",
|
||||
withDrawTaxDeclaration: "0",
|
||||
extEmpsWitch: "0"
|
||||
},
|
||||
showEncryptOperationButton: "",
|
||||
progressVisible: false,
|
||||
|
|
@ -37,35 +40,52 @@ export default class Index extends Component {
|
|||
const { saveParams } = this.state;
|
||||
const [
|
||||
matchRuleEnum, orderRuleEnum, ascOrDescEnum, matchEmployeeModeEnum,
|
||||
orderRules, codeRule, appSettings
|
||||
// orderRules, codeRule, appSettings,
|
||||
sysInfo
|
||||
] = await Promise.all([
|
||||
this.matchRuleEnum(), this.orderRuleEnum(), this.ascOrDescEnum(), this.matchEmployeeModeEnum(),
|
||||
this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting()
|
||||
// this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting(),
|
||||
this.sysinfo()
|
||||
]);
|
||||
const matchRuleOptions = _.map(matchRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
|
||||
const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
|
||||
const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
|
||||
const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
|
||||
const { data: { ascOrDesc, orderRule } } = orderRules;
|
||||
const { data: rule } = codeRule;
|
||||
const {
|
||||
data: {
|
||||
showEncryptOperationButton,
|
||||
isOpenEncrypt: enctry,
|
||||
isOpenTaxDeclaration: operateTaxDeclaration,
|
||||
salaryAcctEmployeeRule: matchRule
|
||||
ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "",
|
||||
taxDeclarationFunction: operateTaxDeclaration = "0", salaryArchiveDelete: confValue,
|
||||
salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0",
|
||||
OPEN_APPLICATION_ENCRYPT: enctry = "0", extEmpsWitch = "0"
|
||||
}
|
||||
} = appSettings;
|
||||
} = sysInfo;
|
||||
// const { data: { ascOrDesc, orderRule } } = orderRules;
|
||||
// const { data: rule } = codeRule;
|
||||
// const {
|
||||
// data: {
|
||||
// showEncryptOperationButton,
|
||||
// isOpenEncrypt: enctry
|
||||
// isOpenTaxDeclaration: operateTaxDeclaration,
|
||||
// salaryAcctEmployeeRule: matchRule,
|
||||
// salaryArchiveDelete: confValue,
|
||||
// withDrawTaxDeclaration
|
||||
// }
|
||||
// } = appSettings;
|
||||
this.setState({
|
||||
matchRuleOptions, orderOptions, ascOptions, employeeOptions,
|
||||
showEncryptOperationButton,
|
||||
saveParams: {
|
||||
...saveParams,
|
||||
ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule
|
||||
ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration,
|
||||
extEmpsWitch
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
sysinfo = () => {
|
||||
return API.sysinfo();
|
||||
};
|
||||
|
||||
sysOrderRule = () => {
|
||||
return API.sysOrderRule();
|
||||
};
|
||||
|
|
@ -197,6 +217,36 @@ export default class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
saveArchiveDelete = () => {
|
||||
API.saveArchiveDelete(_.pick(this.state.saveParams, ["confValue"]))
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
saveSysOperate = (payload) => {
|
||||
API.saveSysOperate({ ...payload, confValue: this.state.saveParams.extEmpsWitch })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
withDrawTaxDeclaration = () => {
|
||||
API.saveWithDrawTaxDeclaration({ confValue: _.pick(this.state.saveParams, ["withDrawTaxDeclaration"]).withDrawTaxDeclaration })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleChange = (key, val) => {
|
||||
const { saveParams } = this.state;
|
||||
|
|
@ -227,6 +277,18 @@ export default class Index extends Component {
|
|||
case "enctry":
|
||||
this.saveEncryptSetting();
|
||||
break;
|
||||
case "confValue":
|
||||
this.saveArchiveDelete();
|
||||
break;
|
||||
case "withDrawTaxDeclaration":
|
||||
this.withDrawTaxDeclaration();
|
||||
break;
|
||||
case "extEmpsWitch":
|
||||
this.saveSysOperate({
|
||||
title: getLabel(111, "开启非系统人员"),
|
||||
module: "basic", confKey: key
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -252,7 +314,17 @@ 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,
|
||||
confValue,
|
||||
withDrawTaxDeclaration,
|
||||
extEmpsWitch
|
||||
} = saveParams;
|
||||
return (
|
||||
<div className="ruleWrapper">
|
||||
<WeaTop
|
||||
|
|
@ -292,9 +364,19 @@ export default class Index extends Component {
|
|||
}
|
||||
<WeaSearchGroup title={getLabel(543359, "报税规则")} showGroup center>
|
||||
<WeaFormItem label={getLabel(543353, "个税申报")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaCheckbox display="switch" value={operateTaxDeclaration}
|
||||
<WeaCheckbox display="switch" value={operateTaxDeclaration !== "0" ? "1" : "0"}
|
||||
onChange={val => this.handleChange("operateTaxDeclaration", val)}/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(111, "允许个税申报撤回")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaCheckbox display="switch" value={withDrawTaxDeclaration}
|
||||
onChange={val => this.handleChange("withDrawTaxDeclaration", val)}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(111, "档案删除规则")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "允许删除档案")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaCheckbox display="switch" value={confValue}
|
||||
onChange={val => this.handleChange("confValue", val)}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(111, "薪资核算人员匹配规则")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "匹配规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
|
|
@ -303,6 +385,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={extEmpsWitch}
|
||||
onChange={val => this.handleChange("extEmpsWitch", val)}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
|
|
|
|||
Loading…
Reference in New Issue