Merge branch 'release/2.14.4.2406.02-个税' into custom-艾志工业-合并个税
This commit is contained in:
commit
b3d287af96
|
|
@ -228,6 +228,10 @@ export const getColumnDesc = (params) => {
|
|||
export const updateLockStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/updateLockStatus", params);
|
||||
};
|
||||
// 更新薪资核算结果的锁定状态
|
||||
export const updateLockEmpStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/lockEmp", params);
|
||||
};
|
||||
// 导入薪资核算添加表头字段缓存
|
||||
export const cacheImportField = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", params);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
|||
class Index extends Component {
|
||||
render() {
|
||||
const { theme, background, tip, tipPosi, itemTypeList, title } = this.props;
|
||||
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "mobile");
|
||||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "mobile");
|
||||
return (
|
||||
<React.Fragment>
|
||||
{/*<div className="pbmc-head">{title || getLabel(111, "薪酬预览")}</div>*/}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
|||
class Content extends Component {
|
||||
render() {
|
||||
const { theme, background, tip, tipPosi, itemTypeList, sendTime = new Date() } = this.props;
|
||||
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "pc");
|
||||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
|
||||
return (
|
||||
<div className="salary-preview-container">
|
||||
<div style={{ border: "10px solid #F3F9FF" }}>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class SalaryDetails extends Component {
|
|||
return;
|
||||
}
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = API.exportSalaryList({ ...payload, ids: selectedRowKeys });
|
||||
const promise = API.exportSalaryList({ ...payload, ids: key === "SELECTED" ? selectedRowKeys : [] });
|
||||
};
|
||||
getColumns = () => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
|||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { acctResultList, updateLockStatus } from "../../../../../apis/calculate";
|
||||
import { acctResultList, updateLockEmpStatus, updateLockStatus } from "../../../../../apis/calculate";
|
||||
import ProgressModal from "../../../../../components/progressModal";
|
||||
import BatchUpdateSalaryItemValDialog from "./batchUpdateSalaryItemValDialog";
|
||||
import EditSalaryCalcSlide from "./editSalaryCalcSlide";
|
||||
|
|
@ -57,12 +57,15 @@ class EditCalcTable extends Component {
|
|||
this.props.onShowFormulaTd(dataIndex);
|
||||
break;
|
||||
case "LOCKING":
|
||||
const { salaryItemId, lockType: lockStatus } = params;
|
||||
if (lockStatus === "BATCHUPDATE") {
|
||||
const { salaryItemId, lockType } = params;
|
||||
if (lockType === "BATCHUPDATE") {
|
||||
this.batchUpdateSalaryItemVal(params);
|
||||
return;
|
||||
}
|
||||
this.updateLockStatus({ lockStatus, salaryItemId });
|
||||
this.updateLockStatus({ lockStatus: lockType, salaryItemId });
|
||||
break;
|
||||
case "LOCKEMP":
|
||||
this.updateEmpLockStatus({ ...params });
|
||||
break;
|
||||
case "EDIT":
|
||||
const { id: salaryCalcId } = params;
|
||||
|
|
@ -131,6 +134,52 @@ class EditCalcTable extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
updateEmpLockStatus = (payload) => {
|
||||
const { lockStatus } = payload;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: <div>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
{lockStatus === "LOCK" ? getLabel(111, "确定要锁定该人员核算数据吗?") : getLabel(111, "确定要解锁该人员核算数据吗?")}
|
||||
</div>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
{lockStatus === "LOCK" ? getLabel(111, "确定后,核算数据锁定,项目公式失效;点击核算将跳过该人员已核算的项目!") :
|
||||
getLabel(111, "确定后,则项目公式生效,页面仍显示手动修改的项目值;点击核算将按公式重新核算,不再显示解锁标识!")}
|
||||
</div>
|
||||
</div>,
|
||||
onOk: () => {
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timerLock = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 1
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
updateLockEmpStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => this.queryCalcResultList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
batchUpdateSalaryItemVal = (payload) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
|
|
@ -180,7 +229,8 @@ class EditCalcTable extends Component {
|
|||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
|
||||
"批量锁定": getLabel(111, "批量锁定"), "批量更新": getLabel(111, "批量更新"),
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图")
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图"), "锁定": getLabel(111, "锁定"),
|
||||
"解锁": getLabel(111, "解锁")
|
||||
};
|
||||
this.setState({ originPayloadData: { ...payload, i18n } });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ class AttendanceDataViewSlide extends Component {
|
|||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
columns: _.map(columns, o => ({ ...o, width: 150, fixed: o.dataIndex === "username" ? "left" : null }))
|
||||
// o.dataIndex === "username" ? "left" :
|
||||
columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
|
|
|
|||
|
|
@ -550,6 +550,17 @@ export const cumTaxPeriodCondition = [
|
|||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
multiple: true,
|
||||
fieldcol: 18,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { cumTaxPeriodCondition } from "../columns";
|
||||
|
|
@ -14,6 +15,7 @@ import { onlineRequest } from "../../../../apis/cumDeduct";
|
|||
import { onlineActualAddUpAdvanceTax } from "../../../../apis/cumSituation";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
const APIFox = {
|
||||
online: onlineRequest,
|
||||
advance: onlineActualAddUpAdvanceTax
|
||||
|
|
@ -25,13 +27,23 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false
|
||||
loading: false, conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { cumDeductStore: { cumTaxPeriodForm, changeCumTaxPeriodForm } } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({
|
||||
conditions: _.map(cumTaxPeriodCondition, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return { ...o, lable: getLabel(o.lanId, o.label), options: toJS(nextProps.taxAgentOption) };
|
||||
}
|
||||
return { ...o, lable: getLabel(o.lanId, o.label) };
|
||||
})
|
||||
}))
|
||||
});
|
||||
cumTaxPeriodForm.initFormFields(cumTaxPeriodCondition);
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
|
|
@ -43,18 +55,19 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
save = () => {
|
||||
const { cumDeductStore: { cumTaxPeriodForm }, type } = this.props;
|
||||
cumTaxPeriodForm.validateForm().then(f => {
|
||||
const { declareMonth } = cumTaxPeriodForm.getFormParams();
|
||||
const { declareMonth, taxAgentIds } = cumTaxPeriodForm.getFormParams();
|
||||
if (f.isValid) {
|
||||
this.setState({ loading: true });
|
||||
APIFox[type]({ declareMonth: declareMonth + "-01" }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.props.onCancel();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
APIFox[type]({ declareMonth: declareMonth + "-01", taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [] })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.props.onCancel();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
|
|
@ -62,17 +75,17 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
const { loading, conditions } = this.state;
|
||||
const { cumDeductStore: { cumTaxPeriodForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} className="paymentDialog" initLoadCss
|
||||
{...this.props} className="paymentDialog mulSelectDialog" initLoadCss
|
||||
style={{ width: 550 }}
|
||||
buttons={[<Button type="primary" loading={loading} onClick={this.save}>{getLabel(33703, "确认")}</Button>]}
|
||||
bottomLeft={getLabel(111, "点击保存后,稍后请点击【获取结果下载】下载获取结果。获取的数据将覆盖列表原本数据(有则覆盖无则新增)。")}
|
||||
>
|
||||
<div className="paymentDialogContent">
|
||||
{getSearchs(cumTaxPeriodForm, cumTaxPeriodCondition, 1, false)}
|
||||
{getSearchs(cumTaxPeriodForm, conditions, 1, false)}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class Index extends Component {
|
|||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
cumTaxPeriodDialog: {
|
||||
visible: false, title: "", type: ""
|
||||
visible: false, title: "", type: "", taxAgentOption: []
|
||||
},
|
||||
feedbackLoading: false,
|
||||
incomeTaxStatus: false,
|
||||
|
|
@ -401,6 +401,7 @@ class Index extends Component {
|
|||
*/
|
||||
getTopBtns = () => {
|
||||
const { addAllLoading, cumTaxPeriodDialog, feedbackLoading, incomeTaxStatus } = this.state;
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const commonBtns = [
|
||||
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
|
||||
|
|
@ -421,7 +422,7 @@ class Index extends Component {
|
|||
const incomeTaxBtns = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
cumTaxPeriodDialog: {
|
||||
...cumTaxPeriodDialog,
|
||||
...cumTaxPeriodDialog, taxAgentOption,
|
||||
visible: true, type: "online",
|
||||
title: getLabel(542240, "税款所属期")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,6 +232,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mulSelectDialog {
|
||||
.wea-form-item .wea-form-item-wrapper {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.wea-date-picker {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.incomeTaxDecPerSlideWrapper {
|
||||
.wea-slide-modal-content {
|
||||
background: #f6f6f6;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,8 @@ class AddCompensationPersonnelDialog extends Component {
|
|||
type: "custom",
|
||||
key: "custom",
|
||||
render: (text, record, index, onEdit) => (
|
||||
<WeaInputNumber precision={2} value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||
<WeaInputNumber precision={parseFloat(record.perValidNum || 2)}
|
||||
value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||
onChange={v => onEdit({
|
||||
record: { ...record, [`${record.insuranceId}_per`]: v },
|
||||
index, key: "per", value: v
|
||||
|
|
@ -122,7 +123,8 @@ class AddCompensationPersonnelDialog extends Component {
|
|||
type: "custom",
|
||||
key: "custom",
|
||||
render: (text, record, index, onEdit) => (
|
||||
<WeaInputNumber precision={2} value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||
<WeaInputNumber precision={parseFloat(record.comValidNum || 2)}
|
||||
value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||
onChange={v => onEdit({
|
||||
record: { ...record, [`${record.insuranceId}_com`]: v },
|
||||
index, key: "com", value: v
|
||||
|
|
@ -166,10 +168,10 @@ class AddCompensationPersonnelDialog extends Component {
|
|||
let perJson = {}, comJson = {};
|
||||
_.forEach(list, o => {
|
||||
if (!_.isNil(o.per)) {
|
||||
perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, 2) });
|
||||
perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, o.perValidNum || 2) });
|
||||
}
|
||||
if (!_.isNil(o.com)) {
|
||||
comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, 2) });
|
||||
comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, o.comValidNum ||2) });
|
||||
}
|
||||
});
|
||||
return { [`${type}PerJson`]: JSON.stringify(perJson), [`${type}ComJson`]: JSON.stringify(comJson) };
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ class InputPaymentAmount extends Component {
|
|||
return (
|
||||
<WeaInputNumber
|
||||
value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")}
|
||||
precision={parseFloat(record.perValidNum || 2)}
|
||||
onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
@ -31,7 +32,8 @@ class InputPaymentAmount extends Component {
|
|||
return (
|
||||
<WeaInputNumber
|
||||
value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "com")}
|
||||
precision={parseFloat(record.comValidNum || 2)}
|
||||
onChange={(val) => this.handleChangeBaseItem(record, val, type, "com")}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,70 +24,19 @@ class RegEditDetial extends Component {
|
|||
key: "social",
|
||||
label: "社保",
|
||||
dataSource: [],
|
||||
columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={2}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("social", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
columns: []
|
||||
},
|
||||
{
|
||||
key: "fund",
|
||||
label: "公积金",
|
||||
dataSource: [],
|
||||
columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={2}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("fund", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
columns: []
|
||||
},
|
||||
{
|
||||
key: "other",
|
||||
label: "劳务固定费",
|
||||
dataSource: [],
|
||||
columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
precision={2}
|
||||
disabled={_.isNil(text)}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("other", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
columns: []
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -113,27 +62,28 @@ class RegEditDetial extends Component {
|
|||
otherComJson: {}
|
||||
};
|
||||
_.forEach(socialData.dataSource, item => {
|
||||
console.log(item)
|
||||
if (item.personalPaymentAmount) {
|
||||
payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
||||
payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
|
||||
}
|
||||
if (item.companyPaymentAmount) {
|
||||
payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||
payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||
}
|
||||
});
|
||||
_.forEach(foundData.dataSource, item => {
|
||||
if (item.personalPaymentAmount) {
|
||||
payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
||||
payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
|
||||
}
|
||||
if (item.companyPaymentAmount) {
|
||||
payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||
payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||
}
|
||||
});
|
||||
_.forEach(otherData.dataSource, item => {
|
||||
if (item.personalPaymentAmount) {
|
||||
payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
||||
payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
|
||||
}
|
||||
if (item.companyPaymentAmount) {
|
||||
payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||
payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||
}
|
||||
});
|
||||
_.forEach(Object.keys(payload), item => {
|
||||
|
|
@ -214,11 +164,70 @@ class RegEditDetial extends Component {
|
|||
const social = this.combinedData(socialSecurity, result);
|
||||
const fund = this.combinedData(accumulationFund, result);
|
||||
const other = this.combinedData(otherBenefits, result);
|
||||
console.log(social)
|
||||
this.setState({
|
||||
listMap: [{ ...socialData, dataSource: social }, { ...foundData, dataSource: fund }, {
|
||||
...otherData,
|
||||
dataSource: other
|
||||
}]
|
||||
listMap: [
|
||||
{
|
||||
...socialData, dataSource: social, columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={parseFloat(record[`${item.dataIndex}ValidNum`] || 2)}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("social", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
},
|
||||
{
|
||||
...foundData, dataSource: fund, columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={parseFloat(record[`${item.dataIndex}ValidNum`] || 2)}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("fund", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
},
|
||||
{
|
||||
...otherData, dataSource: other, columns: _.map(regColumns, item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
disabled={_.isNil(text)}
|
||||
precision={parseFloat(record[`${item.dataIndex}ValidNum`] || 2)}
|
||||
value={text}
|
||||
onChange={v => this.handleChange("other", item.dataIndex, v, record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -230,9 +239,15 @@ class RegEditDetial extends Component {
|
|||
let obj = { benefits: item };
|
||||
_.forEach(data, it => {
|
||||
if (item === it.insuranceName && it.paymentScopeSign === "per") {
|
||||
obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue });
|
||||
obj = _.assign(obj, {
|
||||
...it, personalPaymentAmount: it.insuranceValue,
|
||||
personalPaymentAmountValidNum: it.validNum
|
||||
});
|
||||
} else if (item === it.insuranceName && it.paymentScopeSign === "com") {
|
||||
obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue });
|
||||
obj = _.assign(obj, {
|
||||
...it, companyPaymentAmount: it.insuranceValue,
|
||||
companyPaymentAmountValidNum: it.validNum
|
||||
});
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
|
|
|
|||
|
|
@ -92,10 +92,10 @@ class SupplementarySlide extends Component {
|
|||
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
|
||||
valueCom = child[`${child.insuranceId}_com`];
|
||||
if (!child.perDisabled) {
|
||||
_.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) || "0" });
|
||||
_.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, parseFloat(child.perValidNum || 2)) || "0" });
|
||||
}
|
||||
if (!child.comDisabled) {
|
||||
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) || "0" });
|
||||
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, parseFloat(child.comValidNum || 2)) || "0" });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -444,7 +444,9 @@ export const convertData = (dataSource) => {
|
|||
[perKey]: "",
|
||||
[comKey]: "",
|
||||
perDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "per"),
|
||||
comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com")
|
||||
perValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "per")) ? _.filter(itemList, i => i.paymentScopeSign === "per")[0].validNum : 2,
|
||||
comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com"),
|
||||
comValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "com")) ? _.filter(itemList, i => i.paymentScopeSign === "com")[0].validNum : 2,
|
||||
});
|
||||
});
|
||||
return endList.push(data);
|
||||
|
|
|
|||
|
|
@ -71,3 +71,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//公式编辑框样式
|
||||
.excel-codeBox {
|
||||
.cm-variable {
|
||||
}
|
||||
|
||||
.cm-string-2 {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue