@@ -404,8 +399,8 @@ export default class SalaryItem extends React.Component {
}
content={
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js
index d5601a1c..9980fb14 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js
@@ -22,6 +22,97 @@ export default class DefaultSlideForm extends React.Component {
cycleSetting: "000000000000"
}
};
+ }
+
+ updateDataSource = (record, e, key) => {
+ const {
+ programmeStore: {
+ defaultCompanyDataSource,
+ defaultPersonDataSource,
+ setDefaultPersonDataSource,
+ setDefaultCompanyDataSource
+ }
+ } = this.props;
+ let result = { ...record };
+ if (key === "paymentCycle" && e === "1") {
+ result["accountType"] = "1";
+ } else if (key === "paymentCycle" && e === "0") {
+ result["accountType"] = record.accountType;
+ }
+ result[key] = e;
+ if (key === "upperLimit" || key === "lowerLimit") {
+ let dataSource = [...defaultPersonDataSource],
+ dataSource_company = [...defaultCompanyDataSource];
+ dataSource = dataSource.map(item => {
+ if (item.insuranceName === result.insuranceName) return { ...item, [key]: e };
+ else return item;
+ });
+ dataSource_company = dataSource_company.map(item => {
+ if (item.insuranceName === result.insuranceName) return { ...item, [key]: e };
+ else return item;
+ });
+ setDefaultPersonDataSource(dataSource);
+ setDefaultCompanyDataSource(dataSource_company);
+ } else {
+ if (this.state.selectedKey === "PERSONAL") {
+ let dataSource = [...defaultPersonDataSource];
+ dataSource = dataSource.map(item => {
+ if (item.id == result.id) return result;
+ else return item;
+ });
+ setDefaultPersonDataSource(dataSource);
+ } else {
+ let dataSource = [...defaultCompanyDataSource];
+ dataSource = dataSource.map(item => {
+ if (item.id == result.id) return result;
+ else return item;
+ });
+ setDefaultCompanyDataSource(dataSource);
+ }
+ }
+ };
+
+ handleSetPaymentPeriod = (cycleSetting) => {
+ let cycleObj = {
+ 1: "0",
+ 2: "0",
+ 3: "0",
+ 4: "0",
+ 5: "0",
+ 6: "0",
+ 7: "0",
+ 8: "0",
+ 9: "0",
+ 10: "0",
+ 11: "0",
+ 12: "0"
+ };
+ if (!_.isEmpty(cycleSetting)) {
+ _.forEach(cycleSetting, item => {
+ _.assign(cycleObj, { [item]: "1" });
+ });
+ } else {
+ _.forEach(Object.keys(cycleObj), item => {
+ _.assign(cycleObj, { [item]: "0" });
+ });
+ }
+ const tmpVStr = _.reduce(Object.values(cycleObj), (pre, cur) => {
+ return pre + cur;
+ }, "");
+ this.setState({
+ paymentPeriodModal: {
+ ...this.state.paymentPeriodModal,
+ cycleSetting: tmpVStr
+ }
+ }, () => {
+ this.updateDataSource(this.state.paymentPeriodModal.record, tmpVStr, "cycleSetting");
+ });
+ };
+
+ render() {
+ const { paymentPeriodModal } = this.state;
+ const { programmeStore, requestParams, onChange } = this.props;
+ const { defaultPersonDataSource, defaultCompanyDataSource } = programmeStore;
insertUpdateColumns.map(item => {
if (item.dataIndex == "isPayment") {
item.render = (text, record) => {
@@ -137,7 +228,7 @@ export default class DefaultSlideForm extends React.Component {
item.render = (text, record) => {
return (
{
@@ -151,6 +242,7 @@ export default class DefaultSlideForm extends React.Component {
return (
{
@@ -243,207 +335,8 @@ export default class DefaultSlideForm extends React.Component {
};
}
});
- }
-
- updateDataSource = (record, e, key) => {
- const {
- programmeStore: {
- defaultCompanyDataSource,
- defaultPersonDataSource,
- setDefaultPersonDataSource,
- setDefaultCompanyDataSource
- }
- } = this.props;
- let result = { ...record };
- if (key === "paymentCycle" && e === "1") {
- result["accountType"] = "1";
- } else if (key === "paymentCycle" && e === "0") {
- result["accountType"] = record.accountType;
- }
- result[key] = e;
- if (key === "upperLimit" || key === "lowerLimit") {
- let dataSource = [...defaultPersonDataSource],
- dataSource_company = [...defaultCompanyDataSource];
- dataSource = dataSource.map(item => {
- if (item.insuranceName === result.insuranceName) return { ...item, [key]: e };
- else return item;
- });
- dataSource_company = dataSource_company.map(item => {
- if (item.insuranceName === result.insuranceName) return { ...item, [key]: e };
- else return item;
- });
- setDefaultPersonDataSource(dataSource);
- setDefaultCompanyDataSource(dataSource_company);
- } else {
- if (this.state.selectedKey === "PERSONAL") {
- let dataSource = [...defaultPersonDataSource];
- dataSource = dataSource.map(item => {
- if (item.id == result.id) return result;
- else return item;
- });
- setDefaultPersonDataSource(dataSource);
- } else {
- let dataSource = [...defaultCompanyDataSource];
- dataSource = dataSource.map(item => {
- if (item.id == result.id) return result;
- else return item;
- });
- setDefaultCompanyDataSource(dataSource);
- }
- }
- };
-
- handleSetPaymentPeriod = (cycleSetting) => {
- let cycleObj = {
- 1: "0",
- 2: "0",
- 3: "0",
- 4: "0",
- 5: "0",
- 6: "0",
- 7: "0",
- 8: "0",
- 9: "0",
- 10: "0",
- 11: "0",
- 12: "0"
- };
- if (!_.isEmpty(cycleSetting)) {
- _.forEach(cycleSetting, item => {
- _.assign(cycleObj, { [item]: "1" });
- });
- } else {
- _.forEach(Object.keys(cycleObj), item => {
- _.assign(cycleObj, { [item]: "0" });
- });
- }
- const tmpVStr = _.reduce(Object.values(cycleObj), (pre, cur) => {
- return pre + cur;
- }, "");
- this.setState({
- paymentPeriodModal: {
- ...this.state.paymentPeriodModal,
- cycleSetting: tmpVStr
- }
- }, () => {
- this.updateDataSource(this.state.paymentPeriodModal.record, tmpVStr, "cycleSetting");
- });
- };
-
- render() {
- const { paymentPeriodModal } = this.state;
- const { programmeStore, salaryFileStore, taxAgentStore, requestParams, onChange } = this.props;
- const { userStatusList } = salaryFileStore;
- const { taxAgentAdminOption, getTaxAgentSelectListAsAdmin } = taxAgentStore;
- const { defaultPersonDataSource, defaultCompanyDataSource } = programmeStore;
- const options = [
- {
- key: "",
- selected: false,
- showname: ""
- },
- {
- key: "SCHEME_TOWN",
- selected: true,
- showname: "城镇"
- },
- {
- key: "SCHEME_VILLAGE",
- selected: false,
- showname: "农村"
- }
- ];
return (
- {/*
*/}
- {/* */}
- {/* */}
- {/* 缴纳类型*/}
- {/* */}
- {/* */}
- {/* {*/}
- {/* let requestParams = { ...this.props.requestParams };*/}
- {/* requestParams.paymentType = v;*/}
- {/* this.props.onChange(requestParams);*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/*
*/}
-
- {/* */}
- {/* */}
- {/* 方案名称*/}
- {/* */}
- {/* */}
- {/* {*/}
- {/* let requestParams = { ...this.props.requestParams };*/}
- {/* requestParams.schemeName = value;*/}
- {/* this.props.onChange(requestParams);*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/*
*/}
- {/* */}
- {/* 可见性*/}
- {/* */}
- {/* {*/}
- {/* let requestParams = { ...this.props.requestParams };*/}
- {/* visibleVal === "1" && getTaxAgentSelectListAsAdmin();*/}
- {/* (visibleVal === "0" || visibleVal === "") && (requestParams.taxAgentIds = "");*/}
- {/* requestParams.sharedType = visibleVal;*/}
- {/* this.props.onChange(requestParams);*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/*
*/}
- {/* {*/}
- {/* this.props.requestParams.sharedType === "1" &&*/}
- {/* */}
- {/* 可见性范围*/}
- {/* */}
- {/* {*/}
- {/* let requestParams = { ...this.props.requestParams };*/}
- {/* requestParams.taxAgentIds = value;*/}
- {/* this.props.onChange(requestParams);*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/*
*/}
- {/* }*/}
- {/* */}
- {/* 备注*/}
- {/* */}
- {/* {*/}
- {/* let requestParams = { ...this.props.requestParams };*/}
- {/* requestParams.remarks = value;*/}
- {/* this.props.onChange(requestParams);*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/*
*/}
- {/*
*/}
onChange({ ...requestParams, ...val })}/>
diff --git a/pc4mobx/hrmSalary/stores/mySalary.js b/pc4mobx/hrmSalary/stores/mySalary.js
index d7a05f1b..0bba9f52 100644
--- a/pc4mobx/hrmSalary/stores/mySalary.js
+++ b/pc4mobx/hrmSalary/stores/mySalary.js
@@ -62,7 +62,7 @@ export class MySalaryStore {
// Object.assign(this._reqParams, { token });
// this.getFormData({ viewAttr: 1 });
this.hasRight = true;
- isRoot && this.mySalaryBillList();
+ isRoot && this.mySalaryBillList([moment().format("YYYY-MM"), moment().format("YYYY-MM")]);
} else {
this.hasRight = false;
}
diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js
index 3624a583..7d95a81a 100644
--- a/pc4mobx/hrmSalary/stores/taxAgent.js
+++ b/pc4mobx/hrmSalary/stores/taxAgent.js
@@ -140,7 +140,7 @@ export class TaxAgentStore {
this.setShowOperateBtn(
!isOpenDevolution ? true : isAdminEnable ? true : false
);
- this.setSalaryItemBtn(isChief);
+ this.setSalaryItemBtn((isOpenDevolution && (isChief || isAdminEnable)));
resolve({ status, data });
} else {
reject();
@@ -218,7 +218,7 @@ export class TaxAgentStore {
API.hasIconInTax().then(
action(res => {
if (res.status) {
- this.hideIconInTax= res.data !== "true";
+ this.hideIconInTax = res.data !== "true";
resolve(res);
} else {
message.error(res.errormsg || "获取失败");