@@ -77,7 +80,7 @@ class LedgerSalaryItemBaseInfo extends Component {
/>
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
index 2fccbadf..6a2bf87a 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
@@ -5,7 +5,16 @@
* Date: 2022-09-19 18:15:32
*/
import React, { Component } from "react";
-import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
+import {
+ WeaCheckbox,
+ WeaFormItem,
+ WeaInputNumber,
+ WeaLocaleProvider,
+ WeaNewScroll,
+ WeaSearchGroup,
+ WeaSelect,
+ WeaTop
+} from "ecCom";
import { message, Modal } from "antd";
import * as API from "../../apis/ruleconfig";
import "./index.less";
@@ -28,7 +37,8 @@ export default class Index extends Component {
matchRule: "",
confValue: "0",
withDrawTaxDeclaration: "0",
- extEmpsWitch: "0"
+ extEmpsWitch: "0",
+ salaryAcctFixedColumns: 0
},
showEncryptOperationButton: "",
progressVisible: false,
@@ -56,7 +66,7 @@ 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"
+ OPEN_APPLICATION_ENCRYPT: enctry = "1", extEmpsWitch = "0", salaryAcctFixedColumns = "0"
}
} = sysInfo;
// const { data: { ascOrDesc, orderRule } } = orderRules;
@@ -76,7 +86,7 @@ export default class Index extends Component {
showEncryptOperationButton,
saveParams: {
...saveParams,
- ascOrDesc, orderRule, rule, enctry, matchRule, confValue, withDrawTaxDeclaration,
+ ascOrDesc, orderRule, rule, enctry, matchRule, confValue, withDrawTaxDeclaration, salaryAcctFixedColumns,
extEmpsWitch, operateTaxDeclaration: (operateTaxDeclaration && operateTaxDeclaration !== "0") ? "1" : "0"
}
});
@@ -228,7 +238,7 @@ export default class Index extends Component {
});
};
saveSysOperate = (payload) => {
- API.saveSysOperate({ ...payload, confValue: this.state.saveParams.extEmpsWitch })
+ API.saveSysOperate({ ...payload })
.then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(22619, "保存成功!"));
@@ -286,7 +296,15 @@ export default class Index extends Component {
case "extEmpsWitch":
this.saveSysOperate({
title: getLabel(111, "开启非系统人员"),
- module: "basic", confKey: key
+ module: "basic", confKey: key,
+ confValue: val
+ });
+ break;
+ case "salaryAcctFixedColumns":
+ this.saveSysOperate({
+ title: getLabel(111, "薪资核算固定列头数"),
+ module: "basic", confKey: key,
+ confValue: !_.isNil(val) ? val.toString() : "0"
});
break;
default:
@@ -323,7 +341,8 @@ export default class Index extends Component {
matchRule,
confValue,
withDrawTaxDeclaration,
- extEmpsWitch
+ extEmpsWitch,
+ salaryAcctFixedColumns
} = saveParams;
return (
@@ -386,6 +405,16 @@ export default class Index extends Component {
/>
+
+
+ this.setState({
+ saveParams: { ...saveParams, salaryAcctFixedColumns: v }
+ })}
+ onBlur={val => this.handleChange("salaryAcctFixedColumns", val)}
+ />
+
+
{
+ return {
+ ...o,
+ items: _.map(o.items, g => ({
+ ...g, label: getLabel(g.lanId, g.label)
+ })),
+ title: getLabel(111, "补差人员")
+ };
+ })
+ }, () => addCPForm.initFormFields(this.state.conditions));
+ }
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.standingBookStore.initAddCPForm();
+ }
+
+ getBalancePaymentGroup = () => {
+ const { standingBookStore: { addCPForm }, paymentOrganization } = this.props;
+ const payload = { ...addCPForm.getFormParams(), paymentOrganization };
+ API.getBalancePaymentGroup(payload).then(({ status, data }) => {
+ if (status && !_.isEmpty(data)) {
+ this.setState({
+ paymentList: [
+ {
+ title: getLabel(538967, "社保"), titleSign: "social",
+ payment: convertData(_.filter(data, it => it.titleSign === "social"))
+ },
+ {
+ title: getLabel(538969, "公积金"), titleSign: "fund",
+ payment: convertData(_.filter(data, it => it.titleSign === "fund"))
+ },
+ {
+ title: getLabel(542518, "企业年金及其它福利"), titleSign: "other",
+ payment: convertData(_.filter(data, it => it.titleSign === "other"))
+ }
+ ]
+ });
+ } else {
+ message.error(getLabel(111, "数据不存在!"));
+ this.setState({
+ paymentList: [
+ { title: getLabel(538967, "社保"), titleSign: "social", payment: [] },
+ { title: getLabel(538969, "公积金"), titleSign: "fund", payment: [] },
+ { title: getLabel(542518, "企业年金及其它福利"), titleSign: "other", payment: [] }
+ ]
+ });
+ }
+ });
+ };
+ renderColumns = () => {
+ return [
+ {
+ title: getLabel(543262, "福利项"),
+ dataIndex: "insuranceName",
+ key: "insuranceName",
+ com: [
+ { label: "", type: "INPUT", viewAttr: 1, key: "insuranceName" }
+ ],
+ colSpan: 1,
+ width: "33%"
+ },
+ {
+ title: getLabel(543263, "个人缴纳金额"),
+ dataIndex: "custom",
+ key: "custom",
+ com: [
+ {
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, [`${record.insuranceId}_per`]: v },
+ index, key: "per", value: v
+ })}
+ />
+ )
+ }
+ ],
+ colSpan: 1,
+ width: "33%"
+ },
+ {
+ title: getLabel(543264, "单位缴纳金额"),
+ dataIndex: "custom",
+ key: "custom",
+ com: [
+ {
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, [`${record.insuranceId}_com`]: v },
+ index, key: "com", value: v
+ })}
+ />
+ )
+ }
+ ],
+ colSpan: 1,
+ width: "33%"
+ }
+ ];
+ };
+ save = () => {
+ const { standingBookStore: { addCPForm }, paymentOrganization, billMonth } = this.props;
+ const { paymentList } = this.state;
+ addCPForm.validateForm().then(f => {
+ if (f.isValid) {
+ const payload = {
+ billMonth, paymentOrganization, ...addCPForm.getFormParams(),
+ ...this.convertItemJSON(_.find(paymentList, i => i.titleSign === "social").payment, "social"),
+ ...this.convertItemJSON(_.find(paymentList, i => i.titleSign === "fund").payment, "fund"),
+ ...this.convertItemJSON(_.find(paymentList, i => i.titleSign === "other").payment, "other")
+ };
+ this.setState({ loading: true });
+ API.addNewBalance(payload).then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(30700, "操作成功!"));
+ this.props.onCancel(true);
+ } else {
+ message.error(errormsg);
+ }
+ }).catch(() => this.setState({ loading: false }));
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+ convertItemJSON = (list, type) => {
+ let perJson = {}, comJson = {};
+ _.forEach(list, o => {
+ if (!_.isNil(o.per)) {
+ perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, 2) });
+ }
+ if (!_.isNil(o.com)) {
+ comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, 2) });
+ }
+ });
+ return { [`${type}PerJson`]: JSON.stringify(perJson), [`${type}ComJson`]: JSON.stringify(comJson) };
+ };
+ getRowSelection = (rowSelection) => {
+ let sel = { ...rowSelection };
+ sel.getCheckboxProps = (record) => {
+ return { disabled: true };
+ };
+ return sel;
+ };
+
+ render() {
+ const { conditions, paymentList, loading } = this.state;
+ const { standingBookStore: { addCPForm } } = this.props;
+ return (
+ {getLabel(826, "确定")}]}
+ style={{
+ width: 800, height: 600, minHeight: 200, minWidth: 380, maxHeight: "90%",
+ maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
+ }}
+ >
+
+
{getSearchs(addCPForm, conditions, 1, false, this.getBalancePaymentGroup)}
+ {
+ _.map(paymentList, item => (
+
+ this.setState({
+ paymentList: _.map(paymentList, o => {
+ if (o.titleSign === item.titleSign) {
+ return { ...o, payment };
+ }
+ return { ...o };
+ })
+ })}
+ />
+
+ ))
+ }
+
+
+ );
+ }
+}
+
+export default AddCompensationPersonnelDialog;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less
index 0481abfb..2ceecea0 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less
@@ -150,6 +150,67 @@
}
}
+//补差添加人员弹框
+.add-comp-per-dialog {
+ .wea-dialog-body {
+ overflow: hidden;
+
+ .add-comp-per-content {
+ height: 100%;
+ background: #F6F6F6;
+ padding: 16px;
+ overflow-y: auto;
+
+ .form {
+ margin-bottom: 10px;
+
+ .wea-search-group {
+ padding: 0;
+ background: #FFF;
+
+ .wea-title {
+ background: #f6f6f6;
+ border-bottom: none;
+
+ .text-elli {
+ font-weight: bold;
+ }
+ }
+
+ .wea-content {
+ padding: 0;
+
+ .wea-form-cell {
+ padding: 0;
+
+ .wea-form-item {
+ padding: 4px 16px;
+ border: 1px solid #e5e5e5;
+ }
+ }
+ }
+ }
+ }
+
+ .wea-search-group {
+ padding: 0;
+
+ .wea-title {
+ background: #f6f6f6;
+
+ .text-elli {
+ font-weight: bold;
+ }
+ }
+
+ .wea-table-edit {
+ background: #fff;
+ }
+ }
+ }
+ }
+}
+
//退差人员选择框
.regSelectWrapper {
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js
index 1924606a..44eddfe0 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js
@@ -10,7 +10,6 @@ import { WeaInputNumber, WeaSearchGroup, WeaTable } from "ecCom";
class InputPaymentAmount extends Component {
renderInputItem = (dataSource = [], type) => {
- console.log(dataSource, type);
const columns = [
{
dataIndex: "insuranceName", title: "福利项"
@@ -20,7 +19,7 @@ class InputPaymentAmount extends Component {
render: (text, record) => {
return (
this.handleChangeBaseItem(record, val, type, "per")}
/>
);
@@ -31,7 +30,7 @@ class InputPaymentAmount extends Component {
render: (text, record) => {
return (
this.handleChangeBaseItem(record, val, type, "com")}
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js
index c616f946..057f8379 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js
@@ -14,23 +14,20 @@ import { calcPageNo } from "../../../../util";
import RegList from "./regList";
import RegEditDetial from "./regEditDetial";
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
+import AddCompensationPersonnelDialog from "./addCompensationPersonnelDialog";
import "./index.less";
class MakeupDifference extends Component {
constructor(props) {
super(props);
this.state = {
- selectKey: [],
- fieldData: {},
+ selectKey: [], fieldData: {}, loading: { save: false }, importDiffModal: { visible: false },
returnEditPersonSlide: {
- title: "",
- editId: "",
- visible: false
+ title: "", editId: "", visible: false
},
- importDiffModal: {
- visible: false
- },
- loading: { save: false }
+ addPersonalDialog: {
+ visible: false, paymentOrganization: "", billMonth: ""
+ }
};
this.diffListRef = null;
this.regTopRef = null;
@@ -54,7 +51,7 @@ class MakeupDifference extends Component {
});
};
handleChangeOpt = (key) => {
- const { importDiffModal } = this.state;
+ const { importDiffModal, addPersonalDialog } = this.state;
const name = this.regTopRef.state.name;
const workcode = this.regTopRef.state.workcode;
const billMonth = getQueryString("billMonth");
@@ -77,6 +74,13 @@ class MakeupDifference extends Component {
case "search":
this.diffListRef.recessionList({ userName: name, workcode, current: 1 });
break;
+ case "add":
+ this.setState({
+ addPersonalDialog: {
+ ...addPersonalDialog, visible: true, paymentOrganization, billMonth
+ }
+ });
+ break;
default:
break;
}
@@ -99,7 +103,7 @@ class MakeupDifference extends Component {
render() {
const billMonth = getQueryString("billMonth");
- const { selectKey, importDiffModal, fieldData, returnEditPersonSlide } = this.state;
+ const { selectKey, importDiffModal, fieldData, returnEditPersonSlide, addPersonalDialog } = this.state;
return (
{/*编辑弹框*/}
+ {/*添加补差人员*/}
+ this.setState({
+ addPersonalDialog: {
+ ...addPersonalDialog,
+ visible: false
+ }
+ }, () => isRefresh && this.diffListRef.recessionList())}
+ />
{/*导入补差*/}
{
importDiffModal.visible &&
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
index e904adb9..ef41880a 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
@@ -5,11 +5,14 @@
* Date: 2022/11/23
*/
import React, { Component } from "react";
-import { WeaInputNumber, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom";
+import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom";
import { message } from "antd";
import * as API from "../../../../apis/standingBook";
import SlideModalTitle from "../../../../components/slideModalTitle";
import { regColumns } from "../constant";
+import { toDecimal_n } from "../../../../util";
+
+const getLabel = WeaLocaleProvider.getLabel;
class RegEditDetial extends Component {
constructor(props) {
@@ -111,26 +114,26 @@ class RegEditDetial extends Component {
};
_.forEach(socialData.dataSource, item => {
if (item.personalPaymentAmount) {
- payload["socialPerJson"][item["insuranceId"]] = item.personalPaymentAmount;
+ payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
}
if (item.companyPaymentAmount) {
- payload["socialComJson"][item["insuranceId"]] = item.companyPaymentAmount;
+ payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
}
});
_.forEach(foundData.dataSource, item => {
if (item.personalPaymentAmount) {
- payload["fundPerJson"][item["insuranceId"]] = item.personalPaymentAmount;
+ payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
}
if (item.companyPaymentAmount) {
- payload["fundComJson"][item["insuranceId"]] = item.companyPaymentAmount;
+ payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
}
});
_.forEach(otherData.dataSource, item => {
if (item.personalPaymentAmount) {
- payload["otherPerJson"][item["insuranceId"]] = item.personalPaymentAmount;
+ payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
}
if (item.companyPaymentAmount) {
- payload["otherComJson"][item["insuranceId"]] = item.companyPaymentAmount;
+ payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
}
});
_.forEach(Object.keys(payload), item => {
@@ -198,13 +201,13 @@ class RegEditDetial extends Component {
let socialSecurity = [], accumulationFund = [], otherBenefits = [];
const { data: result } = data;
_.map(result, it => {
- if (it.title.indexOf("社保") !== -1) {
+ if (it.titleSign === "social") {
socialSecurity.push(it);
}
- if (it.title.indexOf("公积金") !== -1) {
+ if (it.titleSign === "fund") {
accumulationFund.push(it);
}
- if (it.title.indexOf("其他") !== -1) {
+ if (it.titleSign === "other") {
otherBenefits.push(it);
}
});
@@ -226,9 +229,9 @@ class RegEditDetial extends Component {
result = _.map(_.uniqWith(fieldItems, _.isEqual), item => {
let obj = { benefits: item };
_.forEach(data, it => {
- if (item === it.insuranceName && it.paymentScope === "个人") {
+ if (item === it.insuranceName && it.paymentScopeSign === "per") {
obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue });
- } else if (item === it.insuranceName && it.paymentScope === "公司") {
+ } else if (item === it.insuranceName && it.paymentScopeSign === "com") {
obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue });
}
});
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js
index 8971946d..72acc3f1 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js
@@ -1,8 +1,10 @@
import React, { Component } from "react";
import { Button } from "antd";
-import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaTab } from "ecCom";
+import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
import { getQueryString } from "../../../../util/url";
+const getLabel = WeaLocaleProvider.getLabel;
+
class RegTop extends Component {
constructor(props) {
super(props);
@@ -38,13 +40,16 @@ class RegTop extends Component {
if (!type) {
const [dom1, ...extra] = dom;
const domBtn = regtopType === "regression" ?
- :
- ;
+ [] :
+ [
+ ,
+
+ ];
dom = [
dom1,
, domBtn, ...extra
+ , ...domBtn, ...extra
];
}
return dom;
@@ -69,7 +74,7 @@ class RegTop extends Component {
{
title: `账单月份: ${billMonth}`,
viewcondition: "1"
- },
+ }
]}
keyParam="viewcondition" selectedKey="" advanceHeight={200} searchsAd={this.getSearchs()}
searchType={["base", "advanced"]} showSearchAd={showSearchAd}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
index 7f1ef3f7..ea06d727 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
@@ -7,7 +7,7 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { message, Modal } from "antd";
-import { WeaFormItem, WeaSearchGroup, WeaSelect, WeaSlideModal } from "ecCom";
+import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaSlideModal } from "ecCom";
import SlideModalTitle from "../../../../components/slideModalTitle";
import { Picker, SelectWithAll } from "./regAddEmployee";
import { Browser } from "../../../dataAcquisition/addItems";
@@ -16,6 +16,8 @@ import "./index.less";
import BusinessAccounting from "./businessAccounting";
import InputPaymentAmount from "./inputPaymentAmount";
+const getLabel = WeaLocaleProvider.getLabel;
+
@inject("taxAgentStore")
@observer
class SupplementarySlide extends Component {
@@ -97,25 +99,6 @@ class SupplementarySlide extends Component {
}
return payload;
};
- convertData = (dataSource) => {
- let endList = [];
- _.values(_.groupBy(dataSource, "insuranceName")).forEach((itemList) => {
- let data = {};
- itemList.forEach(d => {
- const perKey = `${d.insuranceId}_per`, comKey = `${d.insuranceId}_com`;
- console.log(106,d);
- data = _.assign(data, {
- ...d,
- [perKey]: "",
- [comKey]: "",
- perDisabled: !d.paymentScope,
- comDisabled: !d.paymentScope
- });
- });
- return endList.push(data);
- });
- return endList;
- };
handleSaveSupplementSalary = () => {
const { billMonth, paymentOrganization, onCancel } = this.props;
const { baseInfo } = this.state;
@@ -188,9 +171,9 @@ class SupplementarySlide extends Component {
if (status) {
this.setState({
businessAccounting: {
- socialSecurityBase: _.filter(data, it => it.title === "社保"),
- fundBase: _.filter(data, it => it.title === "公积金"),
- otherBase: _.filter(data, it => it.title === "企业年金及其它福利")
+ socialSecurityBase: _.filter(data, it => it.titleSign === "social"),
+ fundBase: _.filter(data, it => it.titleSign === "fund"),
+ otherBase: _.filter(data, it => it.titleSign === "other")
}
});
} else {
@@ -217,9 +200,9 @@ class SupplementarySlide extends Component {
if (status) {
this.setState({
inputPaymentAmount: {
- socialPayment: this.convertData(_.filter(data, it => it.title === "社保")),
- fundPayment: this.convertData(_.filter(data, it => it.title === "公积金")),
- otherPayment: this.convertData(_.filter(data, it => it.title === "企业年金及其它福利"))
+ socialPayment: convertData(_.filter(data, it => it.titleSign === "social")),
+ fundPayment: convertData(_.filter(data, it => it.titleSign === "fund")),
+ otherPayment: convertData(_.filter(data, it => it.titleSign === "other"))
}
});
} else {
@@ -434,3 +417,22 @@ export const SelectDetailType = payload => {
);
};
+
+export const convertData = (dataSource) => {
+ let endList = [];
+ _.values(_.groupBy(dataSource, "insuranceName")).forEach((itemList) => {
+ let data = {};
+ itemList.forEach(d => {
+ const perKey = `${d.insuranceId}_per`, comKey = `${d.insuranceId}_com`;
+ data = _.assign(data, {
+ ...d,
+ [perKey]: "",
+ [comKey]: "",
+ perDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "per"),
+ comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com")
+ });
+ });
+ return endList.push(data);
+ });
+ return endList;
+};
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/constant.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/constant.js
index 6b2634c3..276072e3 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/constant.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/constant.js
@@ -1,50 +1,56 @@
-export const unArchiveTabs = [
- {
- title: "正常缴纳",
- viewcondition: "NORMAL",
- },
- {
- title: "异动清单",
- viewcondition: "LIST",
- },
- {
- title: "补缴",
- viewcondition: "PAY",
- },
- {
- title: "总览",
- viewcondition: "OVERVIEW",
- },
-];
-export const archiveTabs = [
- {
- title: "正常缴纳",
- viewcondition: "NORMAL",
- },
- {
- title: "补缴",
- viewcondition: "PAY",
- },
- {
- title: "总览",
- viewcondition: "OVERVIEW",
- },
-];
-
export const regColumns = [
{
- title: '福利项',
- dataIndex: 'benefits',
- key: 'benefits',
+ title: "福利项",
+ dataIndex: "benefits",
+ key: "benefits"
},
{
- title: '个人缴纳金额',
- dataIndex: 'personalPaymentAmount',
- key: 'personalPaymentAmount',
+ title: "个人缴纳金额",
+ dataIndex: "personalPaymentAmount",
+ key: "personalPaymentAmount"
},
{
- title: '单位缴纳金额',
- dataIndex: 'companyPaymentAmount',
- key: 'companyPaymentAmount',
- },
+ title: "单位缴纳金额",
+ dataIndex: "companyPaymentAmount",
+ key: "companyPaymentAmount"
+ }
+];
+export const addPersonConditions = [
+ {
+ items: [
+ {
+ colSpan: 1,
+ conditionType: "BROWSER",
+ browserConditionParam: {
+ completeParams: {},
+ conditionDataParams: {},
+ dataParams: {},
+ destDataParams: {},
+ hasAddBtn: false,
+ hasAdvanceSerach: true,
+ idSeparator: ",",
+ isAutoComplete: 1,
+ isDetail: 0,
+ isMultCheckbox: false,
+ isSingle: true,
+ linkUrl: "/hrm/resource/HrmResource.jsp?id=",
+ pageSize: 10,
+ quickSearchName: "",
+ replaceDatas: [],
+ title: "",
+ type: "1"
+ },
+ domkey: ["employeeId"],
+ fieldcol: 14,
+ label: "对象",
+ lanId: 106,
+ labelcol: 7,
+ rules: "required|string",
+ viewAttr: 3,
+ value: ""
+ }
+ ],
+ defaultshow: true,
+ title: ""
+ }
];
diff --git a/pc4mobx/hrmSalary/stores/StandingBook.js b/pc4mobx/hrmSalary/stores/StandingBook.js
index dbc50671..1288da0f 100644
--- a/pc4mobx/hrmSalary/stores/StandingBook.js
+++ b/pc4mobx/hrmSalary/stores/StandingBook.js
@@ -9,6 +9,8 @@ const { TableStore } = WeaTableNew;
export class StandingBookStore {
@observable accountForm = new WeaForm(); // 社保台账核算Form
@action initAccountForm = () => this.accountForm = new WeaForm();
+ @observable addCPForm = new WeaForm(); // 社保台账详情页面,添加补差人员form
+ @action initAddCPForm = () => this.addCPForm = new WeaForm();
@observable tableStore = new TableStore(); // new table
From 84d4df6d3d84b82d99dc1507d78c5079b9ac4d62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Wed, 29 Nov 2023 18:29:55 +0800
Subject: [PATCH 5/8] =?UTF-8?q?feature/2.9.9.2312.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E6=A0=B8=E7=AE=97=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E8=B4=A6?=
=?UTF-8?q?=E5=A5=97=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../calculate/calcOc/components/salaryCalcOcList.js | 4 +---
.../pages/ledgerPage/components/ledgerSlide.js | 2 +-
.../components/supplementarySlide.js | 12 ++++++++++--
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js b/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js
index 2d68ddd5..fb0f3166 100644
--- a/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js
+++ b/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js
@@ -102,9 +102,7 @@ class SalaryCalcOcList extends Component {
return _.map(cols, (item, index) => {
const col = { title: item.text, dataIndex: item.column };
if (_.isNaN(parseInt(item.column))) {
- return item.fixed ? { ...col, width: 150, fixed: item.fixed } : index < 2 ? {
- ...col, width: 150, fixed: "left"
- } : { ...col, width: 150 };
+ return { ...col, width: 150, fixed: item.fixed || false };
} else {
return { ...col, width: 180, children: this.convertColumns(item.children) };
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
index 8b2e350e..36bf1bec 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
@@ -112,7 +112,7 @@ class LedgerSlide extends Component {
const { editId: salarySobId } = this.props;
const payload = {
empFields: _.map(empFields, it => {
- if (Object.prototype.toString.call(it.id) === "[object Number]") delete it.id;
+ if (!it.salarySobId) delete it.id;
return { ...it };
}),
itemGroups: _.map(_.filter(itemGroups, it => it.name !== "未分类"), item => {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
index ea06d727..84a23912 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
@@ -15,6 +15,7 @@ import { getPaymentGroup, getSupplementPaymentForm, siaccountSupplementarySave }
import "./index.less";
import BusinessAccounting from "./businessAccounting";
import InputPaymentAmount from "./inputPaymentAmount";
+import { toDecimal_n } from "../../../../util";
const getLabel = WeaLocaleProvider.getLabel;
@@ -90,8 +91,13 @@ class SupplementarySlide extends Component {
_.map(inputPaymentAmount[item], child => {
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
valueCom = child[`${child.insuranceId}_com`];
- _.assign(payload[`${item}PerString`], { [key]: valuePer ? valuePer.toString() : "0" });
- _.assign(payload[`${item}ComString`], { [key]: valueCom ? valueCom.toString() : "0" });
+ console.log(child);
+ if (!_.isNil(valuePer) && valuePer !== "") {
+ _.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) });
+ }
+ if (!_.isNil(valueCom) && valuePer !== "") {
+ _.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) });
+ }
});
});
for (let i in payload) {
@@ -127,6 +133,8 @@ class SupplementarySlide extends Component {
...this.convertBusinessAccounting(),
...this.convertInputPaymentAmount()
};
+ console.log(payload);
+ return;
this.setState({ loading: true });
siaccountSupplementarySave(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
From 9949df47fbfdbe4a0a2ad548c43fcd8f71cd3f85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 30 Nov 2023 09:10:59 +0800
Subject: [PATCH 6/8] =?UTF-8?q?feature/2.9.9.2312.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E6=A0=B8=E7=AE=97=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E8=B4=A6?=
=?UTF-8?q?=E5=A5=97=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/supplementarySlide.js | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
index 84a23912..e280052b 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
@@ -91,12 +91,11 @@ class SupplementarySlide extends Component {
_.map(inputPaymentAmount[item], child => {
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
valueCom = child[`${child.insuranceId}_com`];
- console.log(child);
- if (!_.isNil(valuePer) && valuePer !== "") {
- _.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) });
+ if (!_.isNil(valuePer) && !child.perDisabled) {
+ _.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) || "0" });
}
- if (!_.isNil(valueCom) && valuePer !== "") {
- _.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) });
+ if (!_.isNil(valueCom) && !child.comDisabled) {
+ _.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) || "0" });
}
});
});
@@ -133,8 +132,6 @@ class SupplementarySlide extends Component {
...this.convertBusinessAccounting(),
...this.convertInputPaymentAmount()
};
- console.log(payload);
- return;
this.setState({ loading: true });
siaccountSupplementarySave(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
From 49eab113255519610b54e6b0b27ba891550c4b58 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 30 Nov 2023 15:41:55 +0800
Subject: [PATCH 7/8] =?UTF-8?q?feature/2.9.9.2312.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E6=A0=B8=E7=AE=97=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E8=B4=A6?=
=?UTF-8?q?=E5=A5=97=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/supplementarySlide.js | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
index e280052b..4cbc6a67 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
@@ -339,6 +339,16 @@ class SupplementarySlide extends Component {
...baseInfo,
supplementType,
historyMonth: ""
+ },
+ businessAccounting: {
+ socialSecurityBase: [],
+ fundBase: [],
+ otherBase: []
+ },
+ inputPaymentAmount: {
+ socialPayment: [],
+ fundPayment: [],
+ otherPayment: []
}
}, () => this.handleChangeItem());
}
From 66392e6e10d002db36aa076b7eae3dc68eef0332 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Fri, 1 Dec 2023 09:25:33 +0800
Subject: [PATCH 8/8] =?UTF-8?q?feature/2.9.9.2312.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E6=A0=B8=E7=AE=97=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E8=B4=A6?=
=?UTF-8?q?=E5=A5=97=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../standingBookDetail/components/supplementarySlide.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
index 4cbc6a67..8881cc39 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
@@ -91,10 +91,10 @@ class SupplementarySlide extends Component {
_.map(inputPaymentAmount[item], child => {
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
valueCom = child[`${child.insuranceId}_com`];
- if (!_.isNil(valuePer) && !child.perDisabled) {
+ if (!child.perDisabled) {
_.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) || "0" });
}
- if (!_.isNil(valueCom) && !child.comDisabled) {
+ if (!child.comDisabled) {
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) || "0" });
}
});