diff --git a/pc4mobx/hrmSalary/apis/archive.js b/pc4mobx/hrmSalary/apis/archive.js
index a8a0516b..6faaad01 100644
--- a/pc4mobx/hrmSalary/apis/archive.js
+++ b/pc4mobx/hrmSalary/apis/archive.js
@@ -1,9 +1,14 @@
import { WeaTools } from "ecCom";
+import { postFetch } from "../util/request";
//薪资档案-薪资档案列表
export const getArchiveList = params => {
return postFetch("/api/bs/hrmsalary/salaryArchive/list", params);
};
+//薪资档案的高级搜索
+export const getSaCondition = params => {
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/getSearchCondition", "get", params);
+};
//薪资档案-获取薪资档案详情表单
export const getArchiveForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getForm", "get", params);
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
index 6a2bf87a..893afa11 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
@@ -38,7 +38,8 @@ export default class Index extends Component {
confValue: "0",
withDrawTaxDeclaration: "0",
extEmpsWitch: "0",
- salaryAcctFixedColumns: 0
+ salaryAcctFixedColumns: 0,
+ welBaseDiffByPerAndCom: "0",
},
showEncryptOperationButton: "",
progressVisible: false,
@@ -66,7 +67,8 @@ export default class Index extends Component {
ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "",
taxDeclarationFunction: operateTaxDeclaration = "1", salaryArchiveDelete: confValue,
salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0",
- OPEN_APPLICATION_ENCRYPT: enctry = "1", extEmpsWitch = "0", salaryAcctFixedColumns = "0"
+ OPEN_APPLICATION_ENCRYPT: enctry = "1", extEmpsWitch = "0", salaryAcctFixedColumns = "0",
+ welBaseDiffByPerAndCom = "0",
}
} = sysInfo;
// const { data: { ascOrDesc, orderRule } } = orderRules;
@@ -87,7 +89,8 @@ export default class Index extends Component {
saveParams: {
...saveParams,
ascOrDesc, orderRule, rule, enctry, matchRule, confValue, withDrawTaxDeclaration, salaryAcctFixedColumns,
- extEmpsWitch, operateTaxDeclaration: (operateTaxDeclaration && operateTaxDeclaration !== "0") ? "1" : "0"
+ extEmpsWitch, operateTaxDeclaration: (operateTaxDeclaration && operateTaxDeclaration !== "0") ? "1" : "0",
+ welBaseDiffByPerAndCom
}
});
}
@@ -307,6 +310,13 @@ export default class Index extends Component {
confValue: !_.isNil(val) ? val.toString() : "0"
});
break;
+ case "welBaseDiffByPerAndCom":
+ this.saveSysOperate({
+ title: getLabel(111, "福利档案基数区分个人和公司"),
+ module: "basic", confKey: key,
+ confValue: val
+ });
+ break;
default:
break;
}
@@ -342,7 +352,8 @@ export default class Index extends Component {
confValue,
withDrawTaxDeclaration,
extEmpsWitch,
- salaryAcctFixedColumns
+ salaryAcctFixedColumns,
+ welBaseDiffByPerAndCom
} = saveParams;
return (
@@ -398,6 +409,12 @@ export default class Index extends Component {
onChange={val => this.handleChange("confValue", val)}/>
+
+
+ this.handleChange("welBaseDiffByPerAndCom", val)}/>
+
+
{
+ socialComData = {
+ ...socialComData,
+ [`${o}_com`]: socialBase.comData[o]
+ };
+ });
+ }
+ if (!_.isNil(fundBase.comItems) && !_.isNil(fundBase.comData)) {
+ _.forEach(getConditionDomkeys(fundBase.comItems), o => {
+ fundComData = {
+ ...fundComData,
+ [`${o}_com`]: fundBase.comData[o]
+ };
+ });
+ }
+ if (!_.isNil(otherBase.comItems) && !_.isNil(otherBase.comData)) {
+ _.forEach(getConditionDomkeys(otherBase.comItems), o => {
+ otherComData = {
+ ...otherComData,
+ [`${o}_com`]: otherBase.comData[o]
+ };
+ });
+ }
const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
API.getBaseForm(payload).then(({ status, data }) => {
if (status) {
const { data: result } = data;
const formData = {
...result, ...socialBaseData, ...fundBaseData, ...othersBaseData,
- ...socialBase.data, ...fundBase.data, ...otherBase.data
+ ...socialBase.data, ...fundBase.data, ...otherBase.data,
+ ...socialComData, ...fundComData, ...otherComData
};
this.setState({
formData,
@@ -120,7 +146,7 @@ class Index extends Component {
}
});
};
- covertPayload = (welfareType, underTakeType, paymentForm) => {
+ covertPayload = (welfareType, underTakeType, paymentForm, paymentComForm) => {
const { archivesStore: { welfareProfileForm } } = this.props;
const welfareData = welfareProfileForm.getFormParams();
const { formData } = this.state;
@@ -136,13 +162,20 @@ class Index extends Component {
if (formData[cur] || formData[cur] === 0) return { ...pre, [cur]: toDecimal_n(formData[cur], 2).toString() };
return { ...pre, [cur]: "0" };
}, {})) : "",
+ paymentComForm: !_.isEmpty(paymentComForm) ? JSON.stringify(_.reduce(paymentComForm, (pre, cur) => {
+ if (formData[`${cur}_com`] || formData[`${cur}_com`] === 0) return {
+ ...pre,
+ [cur]: toDecimal_n(formData[`${cur}_com`], 2).toString()
+ };
+ return { ...pre, [cur]: "0" };
+ }, {})) : "",
welfareType, validate: welfareData[`${underTakeType}SchemeId`] ? !!welfareData[`${underTakeType}StartTime`] : true
};
};
save = async () => {
- const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items)),
- fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items)),
- otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items));
+ const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items), getConditionDomkeys(this.props.socialBase.comItems || [])),
+ fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items), getConditionDomkeys(this.props.fundBase.comItems || [])),
+ otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items), getConditionDomkeys(this.props.otherBase.comItems || []));
if (!(socailPayload.validate && fundPayload.validate && otherPayload.validate)) {
message.warning(getLabel(111, "请维护起始缴纳月!"));
return;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 7abea7c9..ae5ed977 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -240,11 +240,11 @@ class Index extends Component {
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId })
.then(({ status, data }) => {
if (status) {
- const { data: defVal, items } = data;
+ const { data: defVal, items, comData, comItems } = data;
this.setState({
welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
}, () => {
- this.archiveSlideRef.wrappedInstance.updateFormData(_.reduce(getConditionDomkeys(items), (pre, cur) => {
+ const perData = _.reduce(getConditionDomkeys(items), (pre, cur) => {
const minNum = !_.isNil(getConditionFields(items)[cur].min) ? Number(getConditionFields(items)[cur].min) : undefined,
maxNum = !_.isNil(getConditionFields(items)[cur].max) ? Number(getConditionFields(items)[cur].max) : undefined;
const val = !_.isNil(defVal) ? Number(defVal[cur]) : 0;
@@ -252,7 +252,21 @@ class Index extends Component {
...pre,
[cur]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val
};
- }, {}));
+ }, {});
+ if (!_.isNil(comItems)) {
+ const comDataTmpv = _.reduce(getConditionDomkeys(comItems), (pre, cur) => {
+ const minNum = !_.isNil(getConditionFields(comItems)[cur].min) ? Number(getConditionFields(comItems)[cur].min) : undefined,
+ maxNum = !_.isNil(getConditionFields(comItems)[cur].max) ? Number(getConditionFields(comItems)[cur].max) : undefined;
+ const val = !_.isNil(comData) ? Number(comData[cur]) : 0;
+ return {
+ ...pre,
+ [`${cur}_com`]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val
+ };
+ }, {});
+ this.archiveSlideRef.wrappedInstance.updateFormData({ ...perData, ...comDataTmpv });
+ return;
+ }
+ this.archiveSlideRef.wrappedInstance.updateFormData({ ...perData });
});
}
});
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index b87b8299..911e5913 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -694,17 +694,62 @@ export const getWelfareSearchsForm = (form, condition, onChange = () => void (0)
});
return _.reduce(group, (pre, cur) => {
if (cur.props.title === getLabel(543194, "社保基础信息") && _.every(socialBase.items, o => o.items.length > 0)) {
- return [...pre, cur,
- ];
+ if (!_.isNil(socialBase.comItems) && _.every(socialBase.comItems, o => o.items.length > 0)) {
+ return [
+ ...pre, cur,
+ ({ ...o, title: `${o.title}(${getLabel(500201, "个人")})` }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>,
+ ({
+ ...o, title: `${o.title}(${getLabel(1851, "公司")})`,
+ items: _.map(o.items, g => ({ ...g, domkey: [`${getKey(g)}_com`] }))
+ }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>
+ ];
+ } else {
+ return [...pre, cur,
+ ];
+ }
} else if (cur.props.title === getLabel(543197, "公积金基础信息") && _.every(fundBase.items, o => o.items.length > 0)) {
- return [...pre, cur,
- ];
+ if (!_.isNil(fundBase.comItems) && _.every(fundBase.comItems, o => o.items.length > 0)) {
+ return [
+ ...pre, cur,
+ ({ ...o, title: `${o.title}(${getLabel(500201, "个人")})` }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>,
+ ({
+ ...o, title: `${o.title}(${getLabel(1851, "公司")})`,
+ items: _.map(o.items, g => ({ ...g, domkey: [`${getKey(g)}_com`] }))
+ }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>
+ ];
+ } else {
+ return [...pre, cur,
+ ];
+ }
} else if (cur.props.title === getLabel(543198, "其他福利基础信息") && _.every(otherBase.items, o => o.items.length > 0)) {
- return [...pre, cur,
- ];
+ if (!_.isNil(otherBase.comItems) && _.every(otherBase.comItems, o => o.items.length > 0)) {
+ return [
+ ...pre, cur,
+ ({ ...o, title: `${o.title}(${getLabel(500201, "个人")})` }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>,
+ ({
+ ...o, title: `${o.title}(${getLabel(1851, "公司")})`,
+ items: _.map(o.items, g => ({ ...g, domkey: [`${getKey(g)}_com`] }))
+ }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>
+ ];
+ } else {
+ return [...pre, cur,
+ ];
+ }
}
return [...pre, cur];
}, []);