- 账单月份
-
+ {getLabel(111, "账单月份")}
+
@@ -113,20 +75,14 @@ export default class OverViewIndex extends Component {
-
+
{/* table */}
-
+
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js
index c311d035..793b5acc 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js
@@ -8,7 +8,6 @@ import React, { Component } from "react";
import { WeaDatePicker, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
import { Button, Modal } from "antd";
import RegSelect from "./regSelect";
-import * as API from "../../../../apis/standingBook";
class RegAddEmployee extends Component {
constructor(props) {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
index 979cccc9..c37db36c 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
@@ -5,10 +5,9 @@
* Date: 2022/11/23
*/
import React, { Component } from "react";
-import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom";
-import { message } from "antd";
+import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
+import { Button, message } from "antd";
import * as API from "../../../../apis/standingBook";
-import SlideModalTitle from "../../../../components/slideModalTitle";
import { regColumns } from "../constant";
import { toDecimal_n } from "../../../../util";
@@ -20,37 +19,19 @@ class RegEditDetial extends Component {
this.state = {
loading: false,
listMap: [
- {
- key: "social",
- label: "社保",
- dataSource: [],
- columns: []
- },
- {
- key: "fund",
- label: "公积金",
- dataSource: [],
- columns: []
- },
- {
- key: "other",
- label: "企业年金及其他福利",
- dataSource: [],
- columns: []
- }
+ { key: "social", label: getLabel(111, "社保"), dataSource: [], columns: [] },
+ { key: "fund", label: getLabel(111, "公积金"), dataSource: [], columns: [] },
+ { key: "other", label: getLabel(111, "企业年金及其他福利"), dataSource: [], columns: [] }
]
};
}
componentWillReceiveProps(nextProps, nextContext) {
- if (nextProps.editId !== this.props.editId && nextProps.editId) {
- this.getPaymentById(nextProps.editId);
- }
+ if (nextProps.editId !== this.props.editId && nextProps.editId) this.getPaymentById(nextProps.editId);
}
handleSave = () => {
- const { editId, onCancel } = this.props;
- const { listMap } = this.state;
+ const { editId, onCancel } = this.props, { listMap } = this.state;
const [socialData, foundData, otherData] = listMap;
let payload = {
id: editId,
@@ -100,8 +81,7 @@ class RegEditDetial extends Component {
});
};
handleChange = (type, dataIndex, value, record) => {
- const { listMap } = this.state;
- const [socialData, foundData, otherData] = listMap;
+ const { listMap } = this.state, [socialData, foundData, otherData] = listMap;
switch (type) {
case "social":
const sociallist = _.map(socialData.dataSource, item => {
@@ -139,7 +119,6 @@ class RegEditDetial extends Component {
default:
break;
}
-
};
getPaymentById = (id) => {
const payload = { id };
@@ -257,39 +236,26 @@ class RegEditDetial extends Component {
const { visible, title, onCancel } = this.props;
const { listMap, loading } = this.state;
return (
-
- }
- content={
-
- {
- _.map(listMap, item => {
- const { key, label, dataSource, columns } = item;
- return
-
- ;
- })
- }
-
- }
- onClose={() => onCancel()}
- showMask={true}
- />
- );
+
} iconBgcolor="#F14A2D"
+ buttons={[
]}/>
+ }
+ content={
+
+ {
+ _.map(listMap, item => {
+ const { key, label, dataSource, columns } = item;
+ return
+
+ ;
+ })
+ }
+
+ }
+ onClose={() => onCancel()}/>);
}
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js
index 849cb407..08f65301 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js
@@ -6,36 +6,27 @@
*/
import React, { Component } from "react";
import { Spin } from "antd";
-import { getQueryString } from "../../../../util/url";
+import { sysConfCodeRule } from "../../../../apis/ruleconfig";
import * as API from "../../../../apis/standingBook";
import "./index.less";
const APIFox = {
"regression": API.recessionList,
- "difference": API.balanceList
+ "regressionSum": API.recessionListSum,
+ "difference": API.balanceList,
+ "differenceSum": API.balanceListSum
};
class RegList extends Component {
constructor(props) {
super(props);
this.state = {
- columns: [],
- dataSource: [],
- selectedRowKeys: [],
- loading: {
- query: false
- },
- datalistPayload: {},
- pageInfo: {
- current: 1,
- pageSize: 10,
- total: 0
- }
+ columns: [], dataSource: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
+ loading: false, sumRow: {}
};
}
componentDidMount() {
- this.recessionList();
window.addEventListener("message", this.handleReceive, false);
}
@@ -43,11 +34,11 @@ class RegList extends Component {
const { onEdit, onChangeRowkey } = this.props;
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
- this.postMessageToChild();
+ this.recessionList();
} else if (type === "turn") {
if (id === "PAGEINFO") {
const { pageNum: current, size: pageSize } = params;
- this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => this.recessionList());
+ this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => this.recessionList({}, true));
} else if (id === "ROWSELECT") {
const { selectedRowKeys } = params;
this.setState({ selectedRowKeys });
@@ -58,24 +49,15 @@ class RegList extends Component {
}
};
postMessageToChild = () => {
- const paymentStatus = this.props.type === "difference" ? "4" : "3";
- const creator = Number(getQueryString("creator"));
- const billMonth = getQueryString("billMonth");
- const paymentOrganization = getQueryString("paymentOrganization");
const childFrameObj = document.getElementById("atdTable");
- const { pageInfo, dataSource, columns, selectedRowKeys, datalistPayload } = this.state;
- childFrameObj.contentWindow.postMessage(JSON.stringify({
- dataSource, columns, pageInfo,
- selectedRowKeys, selectedKey: this.props.type,
- sumpayload: { billMonth, paymentOrganization, creator, paymentStatus, ...datalistPayload },
- showOperates: !getQueryString("type")
+ childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
+ ..._.pick(this.state, ["dataSource", "columns", "pageInfo", "selectedRowKeys", "sumRow"]),
+ showOperates: !this.props.type
}), "*");
};
componentWillReceiveProps(nextProps, nextContext) {
- if (nextProps.visible !== this.props.visible) {
- this.recessionList();
- }
+ if (nextProps.visible !== this.props.visible) this.recessionList();
}
componentWillUnmount() {
@@ -85,41 +67,37 @@ class RegList extends Component {
handleResetSelectRowKeys = (selectedRowKeys) => {
this.setState({ selectedRowKeys });
};
- recessionList = (module) => {
- const { type } = this.props;
- const { loading, pageInfo } = this.state;
- const billMonth = getQueryString("billMonth");
- const paymentOrganization = getQueryString("paymentOrganization");
- const creator = Number(getQueryString("creator"));
- const paymentStatus = type === "difference" ? "4" : "3";
+ recessionList = (module, pageTurning = false) => {
+ const { regType } = this.props, { pageInfo } = this.state;
+ const paymentStatus = regType === "difference" ? "4" : "3";
const payload = {
- billMonth, paymentStatus,
- creator, paymentOrganization,
- ...pageInfo,
- ...module
+ ...pageInfo, ...module, paymentStatus,
+ ..._.pick(this.props, ["billMonth", "paymentOrganization", "creator"])
};
- this.setState({ loading: { ...loading, query: true } });
- APIFox[type](payload).then(({ status, data }) => {
- this.setState({ loading: { ...loading, query: false } });
+ this.setState({ loading: true });
+ APIFox[regType](payload).then(({ status, data }) => {
+ this.setState({ loading: false });
if (status) {
const { pageInfo: list } = data;
const { columns, list: dataSource, pageNum: current, pageSize, total } = list;
this.setState({
- pageInfo: { ...pageInfo, current, pageSize, total },
- dataSource,
- columns,
- datalistPayload: module
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns
}, () => this.postMessageToChild());
}
- }).catch(() => {
- this.setState({ loading: { ...loading, query: false } });
+ });
+ sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" }).then(({ status, data }) => {
+ if (status && data === "1" && !pageTurning) {
+ APIFox[`${regType}Sum`](payload).then(({ status: sumStatus, data: sumData }) => {
+ if (sumStatus) this.setState({ sumRow: sumData.sumRow }, () => this.postMessageToChild());
+ });
+ }
});
};
render() {
const { loading } = this.state;
return (
-
+