diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js
index 371a8763..013bddee 100644
--- a/pc4mobx/hrmSalary/apis/calculate.js
+++ b/pc4mobx/hrmSalary/apis/calculate.js
@@ -509,3 +509,58 @@ export const updateLockStatus = (params) => {
body: JSON.stringify(params)
}).then(res => res.json());
};
+// 社保福利台账合计接口
+export const siaccountDetailCommonListSum = (params) => {
+ return fetch("/api/bs/hrmsalary/siaccount/detail/common/list/sum", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json());
+};
+// 社保福利台账补缴合计接口
+export const siaccountDetailSupplementaryListSum = (params) => {
+ return fetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list/sum", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json());
+};
+// 社保福利台账退差合计接口
+export const siaccountDetailRecessionListSum = (params) => {
+ return fetch("/api/bs/hrmsalary/siaccount/detail/recession/list/sum", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json());
+};
+// 社保福利台账补差合计接口
+export const siaccountDetailBalanceListSum = (params) => {
+ return fetch("/api/bs/hrmsalary/siaccount/detail/balance/list/sum", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json());
+};
+// 导入薪资核算添加表头字段缓存
+export const cacheImportField = (params) => {
+ return fetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json"
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json());
+};
diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js
index 785c2791..58c2ec3d 100644
--- a/pc4mobx/hrmSalary/apis/payroll.js
+++ b/pc4mobx/hrmSalary/apis/payroll.js
@@ -359,3 +359,7 @@ export const getAvailableSalaryGroupSet = (params) => {
export const getAvailableSalaryItemSet = (params) => {
return postFetch("/api/bs/hrmsalary/salaryBill/template/getAvailableSalaryItemSet", params);
};
+//工资单发放-查看详情页面列表合计行数据
+export const salaryBillSendSum = (params) => {
+ return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params);
+};
diff --git a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js
index fcb80bf7..8b38ba01 100644
--- a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js
+++ b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js
@@ -97,7 +97,15 @@ class PersonalScopeTable extends Component {
...pageInfo,
showTotal: total => `共 ${total} 条`,
showQuickJumper: true,
+ showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize }
+ }, () => {
+ this.getPersonalScopeList();
+ });
+ },
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js
index 86b4be54..cd2c9c44 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js
@@ -23,11 +23,12 @@ export default class AcctResultImportModal extends React.Component {
componentWillMount() {
const { id } = this.props;
if (id) {
- let modalParam = { ...this.state.modalParam };
- modalParam.salaryAcctRecordId = id;
- this.setState({
- modalParam
- });
+ this.getImportField();
+ // let modalParam = { ...this.state.modalParam };
+ // modalParam.salaryAcctRecordId = id;
+ // this.setState({
+ // modalParam
+ // });
} else {
this.setState({
modalParam: { ...this.state.modalParam, salaryAcctRecordId: "123" }
@@ -35,6 +36,19 @@ export default class AcctResultImportModal extends React.Component {
}
}
+ getImportField=()=>{
+ const { calculateStore: { getImportField }, id } = this.props;
+ getImportField(id).then(data => {
+ this.setState({
+ modalParam:{
+ ...this.state.modalParam,
+ salaryAcctRecordId: id,
+ salaryItemIds: data.checkItems.join(",")
+ }
+ });
+ });
+ }
+
// 获取模板
handleAccResultTemplateLink() {
const { isStandingBook, standingBookTabKey, standingBookType } = this.props;
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js
index d6353ffc..f288cc35 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js
@@ -2,8 +2,7 @@ import React from "react";
import { Button, Col, Row } from "antd";
import { inject, observer } from "mobx-react";
import { WeaCheckbox, WeaDialog } from "ecCom";
-
-const APIFox = {};
+import { cacheImportField } from "../../../../apis/calculate";
@inject("calculateStore", "standingBookStore")
@observer
@@ -39,13 +38,25 @@ export default class SelectFieldModal extends React.Component {
if (this.props.fieldData.inputItems) {
sqlItems = this.props.fieldData.sqlItems;
}
- fieldData.formulaItems = formulaItems;
- fieldData.inputItems = inputItems;
- fieldData.sqlItems = sqlItems;
-
- this.setState({
- fieldData
+ fieldData.formulaItems = _.map(formulaItems, item => {
+ if (data.checkItems.includes(item.salaryItemId)) {
+ return { ...item, checked: true };
+ }
+ return { ...item };
});
+ fieldData.inputItems = _.map(inputItems, item => {
+ if (data.checkItems.includes(item.salaryItemId)) {
+ return { ...item, checked: true };
+ }
+ return { ...item };
+ });
+ fieldData.sqlItems = _.map(sqlItems, item => {
+ if (data.checkItems.includes(item.salaryItemId)) {
+ return { ...item, checked: true };
+ }
+ return { ...item };
+ });
+ this.setState({ fieldData });
this.fieldData = fieldData;
});
} else {
@@ -97,10 +108,19 @@ export default class SelectFieldModal extends React.Component {
}
// 添加按钮点击回调
- handleAddClick() {
+ handleAddClick = async () => {
+ //薪资核算详情页面的导入表单字段缓存功能
+ if (window.location.hash.indexOf("calculateDetail") !== -1) {
+ const { status } = await this.cacheImportField();
+ }
this.props.onAdd(this.fieldData);
this.props.onCancel();
- }
+ };
+ cacheImportField = () => {
+ const salaryItemList = _.reduce(_.keys(this.fieldData), (pre, cur) => ([...pre, ...this.fieldData[cur]]), []);
+ const salaryItems = _.map(_.filter(salaryItemList, it => !!it.checked), item => item.salaryItemId);
+ return cacheImportField({ salaryItems });
+ };
// 标题checkbox点击
handleTitleCheckboxChange(value, flag) {
@@ -160,9 +180,7 @@ export default class SelectFieldModal extends React.Component {
this.props.onCancel();
}}
buttons={[
-
+
]}
>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js
index 668a798e..0f857405 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js
@@ -4,7 +4,7 @@ import { inject, observer } from "mobx-react";
import SalaryDetail from "./salaryDetail";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import { WeaBrowser, WeaCheckbox, WeaDropdown, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
-import { getQueryString } from "../../util/url";
+import { convertToUrlString, getQueryString } from "../../util/url";
import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal";
import ProgressModal from "../../components/progressModal";
@@ -172,7 +172,7 @@ export default class CalculateDetail extends React.Component {
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
selectedRowKeys: [],
queryParams: {
- salaryAcctRecordId,
+ salaryAcctRecordId
}
};
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
@@ -209,7 +209,7 @@ export default class CalculateDetail extends React.Component {
);
} else if (e.key == "3") {
window.open(
- "/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=" + this.id + "&ids="
+ `/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=${this.id}&ids=&${convertToUrlString(this.state.searchItemsValue)}`
);
}
};
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index 731b6cc9..0e106ae3 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -19,6 +19,7 @@ import ImportFormCom from "./components/importFormCom";
import TableRecord from "../components/tableRecord";
import { dataCollectCondition, modalColumns } from "./columns";
import { removePropertyCondition } from "../../../util/response";
+import { convertToUrlString } from "../../../util/url";
import Layout from "../layout";
import moment from "moment";
@@ -52,6 +53,7 @@ class Index extends Component {
slideDataSource: []
},
exportPayloadUrl: "",
+ exportPayloadType: false,
advanceCondition: null
};
this.tableRef = null;
@@ -160,9 +162,11 @@ class Index extends Component {
* Date: 2023/2/20
*/
handleExportAll = () => {
- const { declareMonth, taxAgentId } = this.state;
+ const { cumDeductStore: { form } } = this.props;
+ const { declareMonth, taxAgentId, exportPayloadType } = this.state;
this.setState({
- exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
+ exportPayloadType: !exportPayloadType,
+ exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
});
};
/*
@@ -173,12 +177,13 @@ class Index extends Component {
*/
handleExportSelect = () => {
const { selectedRowKeys: ids } = this.tableRef.state;
- const { declareMonth, taxAgentId } = this.state;
+ const { declareMonth, taxAgentId, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
return;
}
this.setState({
+ exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
});
};
@@ -497,7 +502,7 @@ class Index extends Component {
const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props;
const {
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
- importPayload
+ importPayload, exportPayloadType
} = this.state;
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
return (
@@ -505,6 +510,7 @@ class Index extends Component {
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
+ exportPayloadType={exportPayloadType}
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
importPayload={importPayload} onImportFile={this.handleImportFile}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
index ef5e134b..78c77a40 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
@@ -28,6 +28,7 @@ import { dataCollectCondition, taxOptions } from "./columns";
import AddItems from "../addItems";
import TableRecord from "../components/tableRecord";
import { situationModalColumns } from "../cumDeduct/columns";
+import { convertToUrlString } from "../../../util/url";
@inject("taxAgentStore", "cumSituationStore")
@observer
@@ -59,6 +60,7 @@ class Index extends Component {
slideDataSource: []
},
exportPayloadUrl: "",
+ exportPayloadType: false,
advanceCondition: null
};
this.tableRef = null;
@@ -277,9 +279,11 @@ class Index extends Component {
* Date: 2023/2/20
*/
handleExportAll = () => {
- const { declareMonth, taxAgentId, year } = this.state;
+ const { cumSituationStore: { form } } = this.props;
+ const { declareMonth, taxAgentId, year, exportPayloadType } = this.state;
this.setState({
- exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}`
+ exportPayloadType: !exportPayloadType,
+ exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
});
};
/*
@@ -290,12 +294,13 @@ class Index extends Component {
*/
handleExportSelect = () => {
const { selectedRowKeys: ids } = this.tableRef.state;
- const { declareMonth, taxAgentId, year } = this.state;
+ const { declareMonth, taxAgentId, year, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
return;
}
this.setState({
+ exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=${ids.join(",")}&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}`
});
};
@@ -511,7 +516,7 @@ class Index extends Component {
const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props;
const {
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
- importPayload, year
+ importPayload, year, exportPayloadType
} = this.state;
const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId };
return (
@@ -519,6 +524,7 @@ class Index extends Component {
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
+ exportPayloadType={exportPayloadType}
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
index 2034ceda..579cb872 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
@@ -82,77 +82,79 @@ class DataTables extends Component {
});
}
};
+ const getColumns = _.map(columns, item => {
+ const { dataIndex } = item;
+ if (dataIndex === "username") {
+ return {
+ ...item,
+ render: (text, record) => {
+ return
window.pointerXY(e)}
+ title={text}
+ >
+ {text}
+ ;
+ }
+ };
+ } else if (dataIndex === "operate") {
+ return {
+ ...item,
+ render: (text, record) => (
+
+ )
+ };
+ } else {
+ return {
+ ...item,
+ render: (text) => {
+ return
{text} ;
+ }
+ };
+ }
+ });
return
{
- const { dataIndex } = item;
- if (dataIndex === "username") {
- return {
- ...item,
- render: (text, record) => {
- return window.pointerXY(e)}
- title={text}
- >
- {text}
- ;
- }
- };
- } else if (dataIndex === "operate") {
- return {
- ...item,
- render: (text, record) => (
-
- )
- };
- } else {
- return {
- ...item,
- render: (text) => {
- return {text} ;
- }
- };
- }
- })}
+ columns={getColumns}
dataSource={dataSource}
pagination={pagination}
loading={loading.query}
+ xWidth={getColumns.length * 150}
/>;
}
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
index ed2969e8..631d0586 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
@@ -30,7 +30,7 @@ class Layout extends Component {
}
componentWillReceiveProps(nextProps, nextContext) {
- if (nextProps.exportPayloadUrl !== this.props.exportPayloadUrl) {
+ if (nextProps.exportPayloadType !== this.props.exportPayloadType) {
/*
* Author: 黎永顺
* Description:导出数据采集数据
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js
index cb2efd8f..6f542381 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js
@@ -103,6 +103,15 @@ export const dataCollectCondition = [
labelcol: 8,
value: "",
viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["privatePension"],
+ fieldcol: 14,
+ label: "个人养老金",
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
}
],
title: "数据采集",
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
index caa24c1f..5e5aec09 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
@@ -29,6 +29,7 @@ import { dataCollectCondition } from "./columns";
import AddItems from "../addItems";
import TableRecord from "../components/tableRecord";
import { otherModalColumns } from "../cumDeduct/columns";
+import { convertToUrlString } from "../../../util/url";
@inject("taxAgentStore", "otherDeductStore")
@observer
@@ -59,6 +60,7 @@ class Index extends Component {
slideDataSource: []
},
exportPayloadUrl: "",
+ exportPayloadType: false,
advanceCondition: null
};
this.tableRef = null;
@@ -250,9 +252,11 @@ class Index extends Component {
* Date: 2023/2/20
*/
handleExportAll = () => {
- const { declareMonth, taxAgentId } = this.state;
+ const { otherDeductStore: { form } } = this.props;
+ const { declareMonth, taxAgentId, exportPayloadType } = this.state;
this.setState({
- exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
+ exportPayloadType: !exportPayloadType,
+ exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
});
};
/*
@@ -263,12 +267,13 @@ class Index extends Component {
*/
handleExportSelect = () => {
const { selectedRowKeys: ids } = this.tableRef.state;
- const { declareMonth, taxAgentId } = this.state;
+ const { declareMonth, taxAgentId, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
return;
}
this.setState({
+ exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
});
};
@@ -504,7 +509,7 @@ class Index extends Component {
const { taxAgentStore: { showOperateBtn }, otherDeductStore: { form } } = this.props;
const {
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
- importPayload
+ importPayload, exportPayloadType
} = this.state;
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
return (
@@ -512,6 +517,7 @@ class Index extends Component {
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
+ exportPayloadType={exportPayloadType}
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
importPayload={importPayload} onImportFile={this.handleImportFile}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
index 2629381c..5ea6f81c 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
@@ -21,6 +21,7 @@ import { condition } from "./components/condition";
import AddItems from "../addItems";
import TableRecord from "../components/tableRecord";
import { specialModalColumns } from "../cumDeduct/columns";
+import { convertToUrlString } from "../../../util/url";
@inject("taxAgentStore", "specialAddStore")
@observer
@@ -49,6 +50,7 @@ class Index extends Component {
slideDataSource: []
},
exportPayloadUrl: "",
+ exportPayloadType: false,
advanceCondition: null
};
this.tableRef = null;
@@ -207,9 +209,11 @@ class Index extends Component {
* Date: 2023/2/20
*/
handleExportAll = () => {
- const { taxAgentId } = this.state;
+ const { specialAddStore: { advanceForm } } = this.props;
+ const { taxAgentId, exportPayloadType } = this.state;
this.setState({
- exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${taxAgentId}`
+ exportPayloadType: !exportPayloadType,
+ exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${taxAgentId}&${convertToUrlString(advanceForm.getFormParams())}`
});
};
/*
@@ -220,12 +224,13 @@ class Index extends Component {
*/
handleExportSelect = () => {
const { selectedRowKeys: ids } = this.tableRef.state;
- const { taxAgentId } = this.state;
+ const { taxAgentId, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
return;
}
this.setState({
+ exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=${ids.join(",")}&taxAgentId=${taxAgentId}`
});
};
@@ -414,7 +419,8 @@ class Index extends Component {
render() {
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
const {
- taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload
+ taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload,
+ exportPayloadType
} = this.state;
const tablePayload = { taxAgentId };
return (
@@ -422,6 +428,7 @@ class Index extends Component {
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
+ exportPayloadType={exportPayloadType}
form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch}
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
importPayload={importPayload} onImportFile={this.handleImportFile}
diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
index b72af3c1..cdfe5a73 100644
--- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
+++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
@@ -1,72 +1,95 @@
import React from "react";
import CustomTab from "../../components/customTab";
-import { Button } from "antd";
-import "./index.less";
import { inject, observer } from "mobx-react";
import { getQueryString } from "../../util/url";
-import CustomPaginationTable from "../../components/customPaginationTable";
+import * as API from "../../apis/declare";
+import { Button } from "antd";
+import UnifiedTable from "../../components/UnifiedTable";
+import "./index.less";
-@inject("declareStore")
+@inject("taxAgentStore")
@observer
export default class GenerateDeclarationDetail extends React.Component {
constructor(props) {
super(props);
- this.id = getQueryString("id");
- this.pageInfo = { current: 1, pageSize: 10 };
+ this.state = {
+ loading: false,
+ dataSource: [],
+ columns: [],
+ pageInfo: { current: 1, pageSize: 10, total: 0 },
+ declareInfo: {}
+ };
}
componentWillMount() {
- const { declareStore: { getDetailList, getDeclareInfo } } = this.props;
- getDetailList(this.id);
- getDeclareInfo(this.id);
+ this.getDetailList();
+ this.getDeclareInfo();
}
- // 导出
- handleExport() {
- const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${this.id}`;
- window.open(url, "_self");
- }
-
- getColumns() {
- const { declareStore: { datailColumns } } = this.props;
- let columns = [...datailColumns];
- return columns.map(item => {
- item = { ...item };
- item.width = "150px";
- if (item.dataIndex == "employeeName") {
- item.fixed = "left";
+ getDetailList = () => {
+ const { pageInfo } = this.state;
+ const payload = {
+ ...pageInfo, taxDeclarationIdStr: getQueryString("id")
+ };
+ this.setState({ loading: true });
+ API.getDetailList(payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
+ this.setState({
+ dataSource,
+ pageInfo: {
+ ...pageInfo,
+ current, pageSize, total
+ },
+ columns: _.map(_.filter(columns, it => it.dataIndex !== "jobNum"), item => {
+ if (item.dataIndex === "username") {
+ return {
+ ...item,
+ render: (text, record) => {
+ return window.pointerXY(e)}
+ title={text}
+ >
+ {text}
+ ;
+ }
+ };
+ }
+ return {
+ ...item,
+ render: (text) => {
+ return {text};
+ }
+ };
+ })
+ });
}
- return item;
});
- }
-
- handlePageChange() {
- const { declareStore: { getDetailList, getDeclareInfo } } = this.props;
- getDetailList(this.id, this.pageInfo);
- }
-
+ };
+ getDeclareInfo = () => {
+ API.getDeclareInfo({ taxDeclarationId: getQueryString("id") }).then(({ status, data: declareInfo }) => {
+ if (status) this.setState({ declareInfo });
+ });
+ };
+ // 导出
+ handleExport = () => {
+ const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${getQueryString("id")}`;
+ window.open(url, "_self");
+ };
render() {
- const {
- declareStore: {
- detailDataSource,
- detailTableStore,
- declareInfo,
- datailColumns,
- detailPageInfo
- }
- } = this.props;
+ const { declareInfo, loading, pageInfo, columns, dataSource } = this.state;
+ const { taxAgentStore: { showOperateBtn } } = this.props;
const renderRightOperation = () => {
return (
-
+
);
};
-
const renderLeftOperation = () => {
return (
@@ -75,32 +98,37 @@ export default class GenerateDeclarationDetail extends React.Component {
);
};
+ const pagination = {
+ ...pageInfo,
+ showTotal: (total) => `共 ${total} 条`,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ showSizeChanger: true,
+ showQuickJumper: true,
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize }
+ }, () => this.getDetailList());
+ },
+ onChange: (current) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current }
+ }, () => this.getDetailList());
+ }
+ };
return (
- {
- this.pageInfo.current = value;
- this.handlePageChange();
- }}
- onShowSizeChange={(current, pageSize) => {
- this.pageInfo = { current, pageSize };
- this.handlePageChange();
- }}
+
diff --git a/pc4mobx/hrmSalary/pages/declare/index.js b/pc4mobx/hrmSalary/pages/declare/index.js
index b0ec9c95..b56d1f1a 100644
--- a/pc4mobx/hrmSalary/pages/declare/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/index.js
@@ -47,7 +47,11 @@ export default class Declare extends React.Component {
if (status) {
const { columns, list: dataSource, total, pageNum: current, pageSize } = data;
this.setState({
- columns, dataSource, total, current, pageSize
+ columns, dataSource,
+ pageInfo: {
+ ...pageInfo,
+ total, current, pageSize
+ }
});
}
}).catch(() => this.setState({ loading: false }));
@@ -67,9 +71,11 @@ export default class Declare extends React.Component {
};
handleDataPageChange = (current, pageSize = 10) => {
this.setState({
- ...this.state.pageInfo,
- current,
- pageSize
+ pageInfo: {
+ ...this.state.pageInfo,
+ current,
+ pageSize
+ }
}, () => this.getDeclareList());
};
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js
index 63d31658..cfe0f90b 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js
@@ -290,7 +290,7 @@ const initPeriodStr = (periodStrType, types, fromDay) => {
str = `至上上月最后一天`;
} else {
tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`))
- .add(is_31H ? 30 : 29, "days");
+ .add(is_31H ? 30 : 27, "days");
str = `至上月${moment(tmpDate).date()}号`;
}
break;
@@ -302,7 +302,7 @@ const initPeriodStr = (periodStrType, types, fromDay) => {
str = `至上月最后一天`;
} else {
tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`))
- .add(is_31 ? 30 : 29, "days");
+ .add(is_31 ? 30 : 27, "days");
str = `至本月${moment(tmpDate).date()}号`;
}
break;
@@ -314,7 +314,7 @@ const initPeriodStr = (periodStrType, types, fromDay) => {
str = `至本月最后一天`;
} else {
tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`))
- .add(is_31K ? 30 : 29, "days");
+ .add(is_31K ? 30 : 27, "days");
str = `至下月${moment(tmpDate).date()}号`;
}
break;
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
index 736867cf..abcf4aa1 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
@@ -301,10 +301,10 @@ class LedgerSalaryItem extends Component {
* Params:
* Date: 2023/3/8
*/
- handleMoveSalaryItem = (moveToItemId, items) => {
+ handleMoveSalaryItem = (moveToItemId, items, titleName) => {
const { itemGroups } = this.state;
const { salaryItemGroupId: deleteItemId, id, key } = items;
- if (moveToItemId === deleteItemId) return;
+ if (moveToItemId === deleteItemId || (deleteItemId === "0" && titleName === "未分类")) return;
this.setState({
itemGroups: _.map(itemGroups, it => {
if (moveToItemId === it.uuid) {
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
index d1017f60..f6e4e295 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
@@ -175,11 +175,11 @@ class LedgerSalaryItemNormal extends Component {
});
};
handleSubmitMoveTo = () => {
- const { onMoveSalaryItem } = this.props;
+ const { onMoveSalaryItem, dataSource } = this.props;
const { moveModalPayload } = this.state;
const { record, value } = moveModalPayload;
this.handleCancelMove();
- onMoveSalaryItem(value, record);
+ onMoveSalaryItem(value, record, _.find(dataSource, it => (it.id === value || it.uuid === value)).name);
};
render() {
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
index 28508dce..925e04e7 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
@@ -25,7 +25,7 @@ class LedgerSalaryItemTable extends Component {
const { dataSource, onHandleItemhide } = this.props;
onHandleItemhide(
_.map([...dataSource], item => {
- if (id === item.id) {
+ if (id === item.id || id === item.key) {
return {
...item,
itemHide: String(value)
@@ -48,7 +48,14 @@ class LedgerSalaryItemTable extends Component {
};
render() {
- const { dataSource, onDropCategoryItem, onChangeSelectedRowKeys, onEditFormnul, selectedRowKeys, onMoveTo } = this.props;
+ const {
+ dataSource,
+ onDropCategoryItem,
+ onChangeSelectedRowKeys,
+ onEditFormnul,
+ selectedRowKeys,
+ onMoveTo
+ } = this.props;
const rowSelection = {
selectedRowKeys,
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }, () => {
@@ -58,7 +65,7 @@ class LedgerSalaryItemTable extends Component {
disabled: !record.canDelete
})
};
- const checkValue = _.every(dataSource, it => it.itemHide && it.itemHide === "1") ? "1" : "0";
+ const checkValue = (!_.isEmpty(dataSource) && _.every(dataSource, it => it.itemHide && it.itemHide === "1")) ? "1" : "0";
const columns = [
{
title: "名称",
@@ -102,7 +109,7 @@ class LedgerSalaryItemTable extends Component {
width: 80,
render: (text, record) => this.handleChangeItem(value, record.id)}
+ onChange={value => this.handleChangeItem(value, record.id || record.key)}
/>
},
{
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index dc79d451..4d08a972 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -24,7 +24,8 @@ export default class MobilePayroll extends React.Component {
const type = getQueryString("type");
this.id = getQueryString("id");
const { mySalaryStore: { init } } = this.props;
- type !== "phone" && init(false);
+ // type !== "phone" && init(false);
+ init(false);
this.getMySalaryBill(this.id);
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js
index c4edde49..6c0a5a3f 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js
@@ -1,12 +1,13 @@
import React from "react";
import { inject, observer } from "mobx-react";
-import { toJS } from "mobx";
-import { WeaHelpfulTip, WeaTab, WeaTop } from "ecCom";
-import { Button, Menu } from "antd";
-import "./index.less";
+import { WeaHelpfulTip, WeaTab } from "ecCom";
+import { Button, Spin } from "antd";
import { getQueryString } from "../../../util/url";
+import { removePropertyCondition } from "../../../util/response";
import { getSearchs } from "../../../util";
-import CustomPaginationTable from "../../../components/customPaginationTable";
+import { getPayrollDetailList, getPayrollDetailSa, getPayrollInfo, salaryBillSendSum } from "../../../apis/payroll";
+import { sysConfCodeRule } from "../../../apis/ruleconfig";
+import "./index.less";
@inject("payrollStore")
@observer
@@ -14,226 +15,193 @@ export default class PayrollDetail extends React.Component {
constructor(props) {
super(props);
this.state = {
- currentId: "",
- current: 1
+ salarySendDetailBaseInfo: {}, loading: false,
+ condition: [], dataSource: [], columns: [],
+ pageInfo: { current: 1, pageSize: 10, total: 0 },
+ salaryBillSendSum: {}, showSum: false
};
- this.pageInfo = { current: 1, pageSize: 10 };
}
componentWillMount() {
- let id = getQueryString("id");
- this.setState({ currentId: id });
- const { payrollStore: { getPayrollInfo, getPayrollDetailList, getPayrollDetailSa } } = this.props;
- getPayrollInfo(id);
- getPayrollDetailList({ salarySendId: id });
- getPayrollDetailSa();
+ this.getPayrollDetailList();
}
- // 撤回
- handleWithdraw(record) {
- const { payrollStore } = this.props;
- const { withdrawPayroll, getInfoList } = payrollStore;
- withdrawPayroll({
- ids: [record.id],
- salarySendId: this.state.currentId
- }).then(() => {
- getInfoList({
- salarySendId: this.state.currentId
- });
- });
+ componentDidMount() {
+ this.getPayrollInfo();
+ this.getPayrollDetailSa();
+ window.addEventListener("message", this.handleReceiveMessage, false);
}
- // 发送
- handleGrant(record) {
- const { payrollStore } = this.props;
- const { grantPayroll, getInfoList } = payrollStore;
- grantPayroll({
- ids: [record.id],
- salarySendId: this.state.currentId
- }).then(() => {
- getInfoList({
- salarySendId: this.state.currentId
- });
- });
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceiveMessage, false);
}
- getColumns() {
- const { payrollStore } = this.props;
- const { salarySendDetailTableStore } = payrollStore;
- const { columns } = salarySendDetailTableStore;
- if (!columns) {
- return [];
- }
- let result = columns.filter(item => item.hide == "false").map(item => {
- item = { ...item };
- if (item.dataIndex == "operation") {
- item.render = (text, record) => {
- if (text == "ALREADYSEND") {
- return (
- {
- this.handleWithdraw(record);
- }}>撤回
- );
- } else {
- return (
- {
- this.handleGrant(record);
- }}>发送
- );
+ handleReceiveMessage = async ({ data }) => {
+ const { dataSource, columns, pageInfo } = this.state;
+ const childFrameObj = document.getElementById("atdTable");
+ const { type, payload } = data;
+ if (type === "turn") {
+ const { id, params: { size: pageSize, pageNum: current, total } } = payload;
+ if (id && id === "PAGEINFO") {
+ this.setState({
+ pageInfo: {
+ ...pageInfo,
+ current,
+ pageSize,
+ total
}
- };
+ }, () => this.getPayrollDetailList({ child: id }));
+ }
+ }
+ if (type === "init") {
+ const { status, data: sysData } = await this.sysConfCodeRule();
+ const { data: { sumRow } } = await this.salaryBillSendSum();
+ const salaryBillSendSum = _.reduce(_.keys(sumRow), (pre, cur) => (_.assign(pre, { [`${cur}_salaryItem`]: sumRow[cur] })), {});
+ this.setState({ showSum: status && sysData === "1", salaryBillSendSum });
+ childFrameObj.contentWindow.postMessage(JSON.stringify({
+ dataSource,
+ columns,
+ pageInfo,
+ showSum: status && sysData === "1",
+ salaryBillSendSum
+ }), "*");
+ this.getPayrollDetailList({ child: type });
+ }
+ };
+ getPayrollInfo = () => {
+ const id = getQueryString("id");
+ getPayrollInfo({ id }).then(({ status, data }) => {
+ if (status) {
+ this.setState({ salarySendDetailBaseInfo: data });
}
- return item;
});
- return result;
- }
-
- // 导出所选
- handleExportSelected() {
-
- }
-
- // 导出全部
+ };
+ getPayrollDetailSa = () => {
+ const { payrollStore } = this.props;
+ const { detailListConditionForm } = payrollStore;
+ getPayrollDetailSa().then(({ status, data }) => {
+ if (status) {
+ const condition = removePropertyCondition(data.condition);
+ this.setState({ condition }, () => {
+ detailListConditionForm.initFormFields(this.state.condition);
+ });
+ }
+ });
+ };
+ getPayrollDetailList = (extra = {}) => {
+ const childFrameObj = document.getElementById("atdTable");
+ const { pageInfo } = this.state;
+ const { child, ...extraParams } = extra;
+ const salarySendId = getQueryString("id");
+ const { payrollStore } = this.props;
+ const { detailListConditionForm: form } = payrollStore;
+ const payload = { salarySendId, ...pageInfo, ...extraParams, ...form.getFormParams() };
+ this.setState({ loading: true });
+ getPayrollDetailList(payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { columns, datas: dataSource, pageInfo: pages } = data;
+ const { pageNum: current, pageSize, total } = pages;
+ this.setState({
+ dataSource,
+ columns: _.map(columns, (item, index) => ({
+ dataIndex: item.column, title: item.text, width: item.width,
+ fixed: index <= 2 ? "left" : null
+ })),
+ pageInfo: { ...pageInfo, current, pageSize, total }
+ }, () => {
+ const { pageInfo, dataSource, columns, salaryBillSendSum, showSum } = this.state;
+ (child === "PAGEINFO" || child === "init") &&
+ childFrameObj.contentWindow.postMessage(JSON.stringify({
+ dataSource,
+ columns,
+ pageInfo, showSum,
+ salaryBillSendSum
+ }), "*");
+ });
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+ salaryBillSendSum = () => {
+ const salarySendId = getQueryString("id");
+ return salaryBillSendSum({ salarySendId });
+ };
+ sysConfCodeRule = () => {
+ return sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" });
+ };
handleExportAll = () => {
- // const { payrollStore } = this.props;
- // const { exportDetailList } = payrollStore
- // exportDetailList({salarySendId: this.state.currentId})
- const url = `${window.location.origin}/api/bs/hrmsalary/salaryBill/send/exportDetailList?salarySendId=${this.state.currentId}`;
+ const salarySendId = getQueryString("id");
+ const url = `${window.location.origin}/api/bs/hrmsalary/salaryBill/send/exportDetailList?salarySendId=${salarySendId}`;
window.open(url, "_self");
};
-
- getSearchsAdQuick() {
- const handleMenuClick = (e) => {
- switch (e.key) {
- case "1":
- this.handleExportSelected();
- break;
- }
- };
- const menu = (
-
- );
- return (
- // {this.handleExportAll()}}>导出全部
-
- );
- // return ()
- }
-
-
- // 分页
- handleDataPageChange(value) {
- const { payrollStore: { getPayrollInfo, getPayrollDetailList, getPayrollDetailSa } } = this.props;
- getPayrollDetailList({ salarySendId: this.state.currentId, ...this.pageInfo });
- }
-
-
- handleShowSizeChange(pageInfo) {
- const { payrollStore: { getPayrollInfo, getPayrollDetailList, getPayrollDetailSa } } = this.props;
- getPayrollDetailList({ salarySendId: this.state.currentId, ...pageInfo });
- }
-
- handleSearch=()=> {
- const { payrollStore: { getPayrollDetailList, setDetailListShowSearchAd } } = this.props;
- setDetailListShowSearchAd(false);
- getPayrollDetailList({ salarySendId: this.state.currentId, ...this.pageInfo });
- }
+ handleSearch = () => this.getPayrollDetailList({ child: "PAGEINFO", current: 1 });
render() {
+ const { salarySendDetailBaseInfo, condition, loading } = this.state;
const { payrollStore } = this.props;
- const {
- setDetailListShowSearchAd,
- detailListShowSearchAd,
- getPayrollDetailList,
- detailListCondition,
- detailListConditionForm,
- salarySendDetailBaseInfo,
- salarySendDetailTableStore,
- salarySendDetailDataSource,
- salarySendDetailPageInfo
- } = payrollStore;
+ const { setDetailListShowSearchAd, detailListShowSearchAd, detailListConditionForm } = payrollStore;
+ const { salaryMonth, template, sendNum, sendTotal } = salarySendDetailBaseInfo;
const adBtn = [
- // 高级搜索内部按钮
- ,
- ,
-
+ ,
+ ,
+
];
return (
-
} // 左侧图标
- iconBgcolor="#F14A2D" // 左侧图标背景色
- showDropIcon={true} // 是否显示下拉按钮
- buttons={[this.getSearchsAdQuick()]}
- >
setDetailListShowSearchAd(bool)} //高级搜索面板受控
- searchsAd={getSearchs(detailListConditionForm, toJS(detailListCondition), 2)} // 高级搜索内部数据
- buttonsAd={adBtn} // 高级搜索内部按钮
- onSearch={() => {
- this.handleSearch();
- }} // 点搜索按钮时的回调
- // searchsAdQuick={this.getSearchsAdQuick()}
- onSearchChange={v => detailListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
- searchsBaseValue={detailListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
+ searchType={["base", "advanced"]} searchsBasePlaceHolder="请输入姓名"
+ buttons={[]}
+ showSearchAd={detailListShowSearchAd} setShowSearchAd={bool => setDetailListShowSearchAd(bool)}
+ searchsAd={getSearchs(detailListConditionForm, condition, 2)}
+ buttonsAd={adBtn} onSearch={this.handleSearch}
+ onSearchChange={v => detailListConditionForm.updateFields({ username: v })}
+ searchsBaseValue={detailListConditionForm.getFormParams().username}
/>
- 薪资所属月:{salarySendDetailBaseInfo.salaryMonth}
+ 薪资所属月:{salaryMonth}
}
placement="topLeft"
/>
- 工资单模板:{salarySendDetailBaseInfo.template}
+ 工资单模板:{template}
- 已发放:{salarySendDetailBaseInfo.sendNum}/{salarySendDetailBaseInfo.sendTotal}
+ 已发放:{sendNum}/{sendTotal}
-
- {
- this.pageInfo.current = value;
- this.handleDataPageChange(value);
- }}
- onShowSizeChange={(current, pageSize) => {
- this.pageInfo = { current, pageSize };
- this.handleShowSizeChange(this.pageInfo);
- }}
- />
+
+
+
);
}
}
+
+export const PayrollTips = (props) => {
+ const { salarySendDetailBaseInfo = {} } = props;
+ const { salarySobCycle: { salaryCycle, taxCycle, attendCycle, socialSecurityCycle } } = salarySendDetailBaseInfo;
+ const { fromDate, endDate } = salaryCycle;
+ const { fromDate: aFromDate, endDate: aEndDate } = attendCycle;
+ return
+
薪资周期
+
{fromDate}至{endDate}
+
税款所属期
+
{taxCycle}
+
考勤取值周期
+
{aFromDate}至{aEndDate}
+
福利台账月份
+
{`引用的${socialSecurityCycle}福利台账数据`}
+
;
+};
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less
index bdc41900..9bb70233 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less
@@ -1,4 +1,8 @@
.payrollGrant {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+
.titleBar {
height: 47px;
line-height: 47px;
@@ -12,4 +16,12 @@
float: right;
}
}
+
+ .tableWrapper {
+ flex: 1;
+
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100%;
+ }
+ }
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
index a90c108b..71327ee1 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
@@ -250,7 +250,7 @@ export default class PayrollGrant extends React.Component {
getSearchsAdQuick() {
const { payrollStore } = this.props;
- const { salarySendDetailBaseInfo } = payrollStore;
+ const { salarySendDetailBaseInfo, btnLoading } = payrollStore;
const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0";
const { selectedKey } = this.state;
const handleMenuClick = e => {
@@ -284,6 +284,7 @@ export default class PayrollGrant extends React.Component {
{ key: "SELECT", show: "发放所选", selected: false },
{ key: "PART", show: "部分发放", selected: false }
]}
+ btnProps={{loading: btnLoading}}
btnOnClick={this.sendPayroll}
menuOnClick={(key) => this.sendPayroll(key)}
/>,
@@ -297,6 +298,7 @@ export default class PayrollGrant extends React.Component {
{ key: "recallSelected", show: "撤回所选", selected: false },
{ key: "partialWithdrawal", show: "部分撤回", selected: false }
]}
+ btnProps={{loading: btnLoading}}
btnOnClick={this.withdrawalPayroll}
menuOnClick={(key) => this.withdrawalPayroll(key)}
/>,
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
index aa20841e..f72b86f2 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
@@ -287,6 +287,7 @@ class Index extends Component {
selectedRowKeys: []
}, () => {
this.query();
+ this.queryTabTotal();
});
} else {
message.error(errormsg || "操作失败!");
@@ -397,14 +398,14 @@ class Index extends Component {
verticalAlign: "middle"
}}/>
,
- // ,
+ ,
,
@@ -517,7 +518,7 @@ class Index extends Component {
placement="bottomRight"
content={} title="">
@@ -612,6 +613,7 @@ class Index extends Component {
handleChangeTab = (selectedKey) => {
const { slideParams, pageInfo } = this.state;
this.setState({
+ selectedRowKeys: [],
slideParams: { ...slideParams, visible: false, id: "" },
selectedKey,
pageInfo: {
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js
index a2295b59..3bf2d4a9 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js
@@ -39,7 +39,7 @@ export default class FormalFormModal extends React.Component {
const { salaryItemStore } = this.props;
const { salaryAcctImportTemplateParam, setSearchFields, detailFormual } = salaryItemStore;
setSearchFields([]);
- if (this.props.formulaId) {
+ if (!!this.props.formulaId && this.props.formulaId != 0) {
detailFormual(this.props.formulaId).then(data => {
this.setState({
value: data.formula,
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
index ccd3ddc5..3f2465ab 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
@@ -149,7 +149,7 @@ export default class AccumulationFundForm extends React.Component {
}
items={foundItems} col={2} showGroup needTigger={false}/>
{
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
index f489835e..4516e770 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
@@ -129,7 +129,7 @@ export default class OtherForm extends React.Component {
}
items={otherItems} col={2} showGroup needTigger={false}/>
{
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index 8cc679c8..0d96be4e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -139,7 +139,7 @@ export default class SocialSecurityForm extends React.Component {
}
items={socialItems} col={2} showGroup needTigger={false}/>
{
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js
index 79ade76e..58b51944 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js
@@ -61,6 +61,10 @@ class CustomBenefitsTable extends Component {
onChange={value => this.handleCustomBenefitsSwitch(record, value)}
/>
);
+ case "welfareType":
+ return {record.welfareTypeSpan};
+ case "paymentScopt":
+ return {record.paymentScopeSpan};
default:
return ;
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less
index 9a76c465..9ed9d668 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less
@@ -12,6 +12,10 @@
.tableWrapper {
flex: 1;
overflow: hidden;
+
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100%;
+ }
}
.topContent {
@@ -73,6 +77,9 @@
.tableWrapper {
flex: 1;
overflow: hidden;
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100%;
+ }
}
.tdEllipsis {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
index 4ba30018..9f67ea87 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
@@ -7,14 +7,18 @@
import React, { Component } from "react";
import { Button, Icon, message, Modal, Spin, Tooltip } from "antd";
import { inject, observer } from "mobx-react";
-import { toJS } from "mobx";
-import { WeaInputSearch, WeaNewScroll, WeaTable } from "ecCom";
+import { WeaInputSearch } from "ecCom";
import { calcPageNo } from "../../../../util";
import { getQueryString } from "../../../../util/url";
import ProgressModal from "../../../../components/progressModal";
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
import AdjustmentSlide from "./adjustmentSlide";
-import { getCalculateProgress } from "../../../../apis/calculate";
+import {
+ getCalculateProgress,
+ siaccountDetailCommonListSum,
+ siaccountDetailSupplementaryListSum
+} from "../../../../apis/calculate";
+import { sysConfCodeRule } from "../../../../apis/ruleconfig";
import RegEditDetial from "./regEditDetial";
import SupplementarySlide from "./supplementarySlide";
import _ from "lodash";
@@ -54,7 +58,9 @@ export default class NormalIndex extends Component {
title: "",
editId: "",
visible: false
- }
+ },
+ showSum: false,
+ siaccountSum: {}
};
this.timer = null;
this.timerDelete = null;
@@ -68,36 +74,95 @@ export default class NormalIndex extends Component {
selectedKey === "1"
? this.getNormalList({ billMonth, current, paymentOrganization })
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
+ window.addEventListener("message", this.handleReceive, false);
}
+ handleReceive = async ({ data }) => {
+ const { type, payload: { id, params } = {} } = data;
+ if (type === "init") {
+ const { selectedKey } = this.props;
+ const { status, data: sysData } = await this.sysConfCodeRule();
+ const { data: { sumRow: siaccountSum } } = selectedKey === "1" ?
+ await this.siaccountDetailCommonListSum() :
+ await this.siaccountDetailSupplementaryListSum();
+ this.setState({
+ showSum: status && sysData === "1",
+ siaccountSum
+ }, () => this.postMessageToChild());
+ } else if (type === "turn") {
+ if (id === "PAGEINFO") {
+ const { pageNum: current, size: pageSize } = params;
+ this.setState({ current, pageSize }, () => {
+ const { billMonth, paymentOrganization, selectedKey } = this.props;
+ const { current, pageSize } = this.state;
+ selectedKey === "1" ?
+ this.getNormalList({
+ billMonth, current, pageSize, paymentOrganization
+ }) :
+ this.getSupplementaryList({
+ billMonth, current, pageSize, paymentOrganization
+ });
+ });
+ } else if (id === "ROWSELECT") {
+ const { selectedRowKeys } = params;
+ this.setState({ selectedRowKeys });
+ } else if (id === "EDIT") {
+ this.handleEditNormalStandingBook(params);
+ }
+ }
+ };
+ sysConfCodeRule = () => {
+ return sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" });
+ };
+ siaccountDetailCommonListSum = () => {
+ const { searchValue: userName } = this.state;
+ const billMonth = getQueryString("billMonth");
+ const paymentOrganization = getQueryString("paymentOrganization");
+ return siaccountDetailCommonListSum({ billMonth, paymentOrganization, userName });
+ };
+ siaccountDetailSupplementaryListSum = () => {
+ const { searchValue: userName } = this.state;
+ const billMonth = getQueryString("billMonth");
+ const paymentOrganization = getQueryString("paymentOrganization");
+ return siaccountDetailSupplementaryListSum({ billMonth, paymentOrganization, userName });
+ };
+
componentWillUnmount() {
- // 清除轮询
if (this.timer) {
clearInterval(this.timer);
}
if (this.timerDelete) {
clearInterval(this.timerDelete);
}
+ window.removeEventListener("message", this.handleReceive, false);
}
componentWillReceiveProps(nextProps) {
if (nextProps.selectedKey != this.props.selectedKey) {
const { billMonth, paymentOrganization } = nextProps;
this.setState({
- current: 1
+ current: 1, selectedRowKeys: []
}, () => {
const { current } = this.state;
nextProps.selectedKey === "1"
? this.getNormalList({ billMonth, current, paymentOrganization })
- : this.getSupplementaryList({
- billMonth,
- current,
- paymentOrganization
- });
+ : this.getSupplementaryList({ billMonth, current, paymentOrganization });
});
}
}
+ postMessageToChild = () => {
+ const childFrameObj = document.getElementById("atdTable");
+ const { current, pageSize, tableData, selectedRowKeys, showSum, siaccountSum } = this.state;
+ const { list: dataSource, total, columns } = tableData;
+ const pageInfo = { current, pageSize, total };
+ childFrameObj.contentWindow.postMessage(JSON.stringify({
+ dataSource, columns, pageInfo,
+ selectedRowKeys, showSum, siaccountSum,
+ showOperates: !getQueryString("type")
+ }), "*");
+ };
+
handleSearch(value) {
const { billMonth, selectedKey, paymentOrganization } = this.props;
const { current } = this.state;
@@ -190,77 +255,30 @@ export default class NormalIndex extends Component {
});
}
};
-
- getNormalList = (payload = {}) => {
+ getNormalList = async (payload = {}) => {
+ const { status, data: sysData } = await this.sysConfCodeRule();
+ const { data: { sumRow: siaccountSum } } = await this.siaccountDetailCommonListSum();
const { getNormalList } = this.props.standingBookStore;
getNormalList({ ...payload }).then(({ list, columns = [], total }) => {
- columns = _.map(_.filter(columns, it => it.dataIndex !== "id"), it => {
- if (it.dataIndex === "employeeId") {
- it = {
- ...it,
- width: 150,
- fixed: "left",
- render: (text, r) => {
- const { userName, employeeId } = r;
- return (
-
- {userName}
-
- );
- }
- };
- it.title = "姓名";
- }
- return {
- ...it,
- title: ,
- width: 150
- };
- });
this.setState({
- tableData: {
- list,
- columns,
- total
- }
- });
+ showSum: status && sysData === "1",
+ siaccountSum,
+ tableData: { list, total, columns }
+ }, () => this.postMessageToChild());
});
};
- getSupplementaryList = (payload = {}) => {
+ getSupplementaryList = async (payload = {}) => {
+ const { status, data: sysData } = await this.sysConfCodeRule();
+ const { data: { sumRow: siaccountSum } } = await this.siaccountDetailSupplementaryListSum();
const { getSupplementaryList } = this.props.standingBookStore;
getSupplementaryList({
...payload
}).then(({ list, columns = [], total }) => {
- columns = _.map(_.filter(columns, it => it.dataIndex !== "id"), it => {
- if (it.dataIndex === "employeeId") {
- it = {
- ...it,
- width: 150,
- fixed: "left",
- render: (text, r) => {
- const { userName, employeeId } = r;
- return (
-
- {userName}
-
- );
- }
- };
- it.title = "姓名";
- }
- return {
- ...it,
- title: ,
- width: 150
- };
- });
this.setState({
- tableData: {
- list,
- columns,
- total
- }
- });
+ showSum: status && sysData === "1",
+ siaccountSum,
+ tableData: { list, columns, total }
+ }, () => this.postMessageToChild());
});
};
onSelectChange = selectedRowKeys => {
@@ -355,7 +373,6 @@ export default class NormalIndex extends Component {
});
};
- // 核算按钮点击
handleCommonAccountClick() {
const { billMonth, selectedKey, paymentOrganization } = this.props;
const { commonAccount } = this.props.standingBookStore;
@@ -426,7 +443,6 @@ export default class NormalIndex extends Component {
.origin}${urlObj[selectedKey]}?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
window.open(url, "_self");
};
-
handleEditNormalStandingBook = (record) => {
const { userName, id: editId } = record;
const { returnEditPersonSlide } = this.state;
@@ -459,85 +475,8 @@ export default class NormalIndex extends Component {
render() {
const { remarks, billMonth, selectedKey, paymentOrganization, standingBookStore } = this.props;
- const { selectedRowKeys, addProps, adjustSlide, importParams, returnEditPersonSlide } = this.state;
+ const { addProps, adjustSlide, importParams, returnEditPersonSlide } = this.state;
const { loading } = standingBookStore;
- let { list, columns, total } = this.state.tableData;
- const rowSelection = {
- selectedRowKeys,
- onChange: this.onSelectChange
- };
- const pagination = {
- total,
- current: this.state.current,
- showTotal: total => `共 ${total} 条`,
- showSizeChanger: true,
- showQuickJumper: true,
- pageSizeOptions: ["10", "20", "50", "100"],
- onShowSizeChange: (current, pageSize) => {
- this.setState({ current, pageSize });
- selectedKey === "1"
- ? this.getNormalList({ billMonth, current, pageSize, paymentOrganization })
- : this.getSupplementaryList({
- billMonth,
- current,
- pageSize,
- paymentOrganization
- });
- },
- onChange: current => {
- this.setState({ current });
- selectedKey === "1"
- ? this.getNormalList({
- billMonth, current,
- pageSize: this.state.pageSize, paymentOrganization
- })
- : this.getSupplementaryList({
- billMonth,
- current,
- pageSize: this.state.pageSize,
- paymentOrganization
- });
- }
- };
- columns = _.map(toJS(columns), item => {
- if (item.dataIndex === "employeeId") {
- return { ...item };
- } else if (item.dataIndex === "costCenter") {
- return {
- ...item,
- render: (text, record) => {
- const { costCenter } = record;
- return {costCenter.name || ""};
- }
- };
- }
- return {
- ...item,
- render: (text) => {
- return {text};
- }
- };
- });
- !getQueryString("type") && (columns = [
- ...columns,
- {
- title: "操作",
- dataIndex: "operate",
- fixed: "right",
- width: "120px",
- render: (text, record) => {
- return (
-
- );
- }
- }
- ]);
return (
{
@@ -683,19 +622,14 @@ export default class NormalIndex extends Component {
{/* table */}
-
-
-
-
-
+
+
+
{/*编辑弹框*/}
{
+ const { type: listType, onEdit, onChangeRowkey } = this.props;
+ const { type, payload: { id, params } = {} } = data;
+ if (type === "init") {
+ const { status, data: sysData } = await this.sysConfCodeRule();
+ const { data: { sumRow: siaccountSum } } = listType === "regression" ?
+ await this.siaccountDetailRecessionListSum() :
+ await this.siaccountDetailBalanceListSum();
+ this.setState({
+ showSum: status && sysData === "1",
+ siaccountSum
+ }, () => this.postMessageToChild());
+ } else if (type === "turn") {
+ if (id === "PAGEINFO") {
+ const { pageNum: current, size: pageSize } = params;
+ this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => this.recessionList());
+ } else if (id === "ROWSELECT") {
+ const { selectedRowKeys } = params;
+ this.setState({ selectedRowKeys });
+ onChangeRowkey(selectedRowKeys);
+ } else if (id === "EDIT") {
+ onEdit(params);
+ }
+ }
+ };
+ postMessageToChild = () => {
+ const childFrameObj = document.getElementById("atdTable");
+ const { pageInfo, dataSource, columns, selectedRowKeys, showSum, siaccountSum } = this.state;
+ childFrameObj.contentWindow.postMessage(JSON.stringify({
+ dataSource, columns, pageInfo,
+ selectedRowKeys, showSum, siaccountSum,
+ showOperates: !getQueryString("type")
+ }), "*");
+ };
+ sysConfCodeRule = () => {
+ return sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" });
+ };
+ siaccountDetailRecessionListSum = (module = {}) => {
+ const paymentStatus = "3";
+ const creator = Number(getQueryString("creator"));
+ const billMonth = getQueryString("billMonth");
+ const paymentOrganization = getQueryString("paymentOrganization");
+ return siaccountDetailRecessionListSum({ creator, paymentStatus, billMonth, paymentOrganization, ...module });
+ };
+ siaccountDetailBalanceListSum = (module = {}) => {
+ const paymentStatus = "3";
+ const creator = Number(getQueryString("creator"));
+ const billMonth = getQueryString("billMonth");
+ const paymentOrganization = getQueryString("paymentOrganization");
+ return siaccountDetailBalanceListSum({ creator, paymentStatus, billMonth, paymentOrganization, ...module });
+ };
+
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible) {
this.recessionList();
}
}
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
+ }
+
handleResetSelectRowKeys = (selectedRowKeys) => {
this.setState({ selectedRowKeys });
};
- recessionList = (module) => {
+ recessionList = async (module) => {
const { type } = this.props;
+ const { status: sysStatus, data: sysData } = await this.sysConfCodeRule();
+ const { data: { sumRow: siaccountSum } } = type === "regression" ?
+ await this.siaccountDetailRecessionListSum({ ...module }) :
+ await this.siaccountDetailBalanceListSum({ ...module });
const { loading, pageInfo } = this.state;
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
@@ -68,105 +133,27 @@ class RegList extends Component {
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total },
dataSource,
- columns: _.map(_.filter(columns, it => it.dataIndex !== "id"), items => {
- if (items.dataIndex === "employeeId") {
- return {
- ...items,
- width: 110,
- title: "姓名",
- render: (text, r) => {
- const { userName } = r;
- return (
- {userName}
- );
- }
- };
- } else if (items.dataIndex === "costCenter") {
- return {
- ...items,
- width: 110,
- render: (text, r) => {
- const { costCenter } = r;
- return (
- {costCenter.name || ""}
- );
- }
- };
- }
- return {
- ...items,
- title: ,
- width: 120,
- render: (text) => {
- return {text};
- }
- };
- })
- });
+ columns,
+ showSum: sysStatus && sysData === "1",
+ siaccountSum
+ }, () => this.postMessageToChild());
}
}).catch(() => {
this.setState({ loading: { ...loading, query: false } });
});
};
- handleChangeRow = (selectedRowKeys) => {
- const { onChangeRowkey } = this.props;
- this.setState({ selectedRowKeys });
- onChangeRowkey(selectedRowKeys);
- };
render() {
- const { loading, pageInfo, selectedRowKeys, dataSource, columns } = this.state;
- const { onEdit } = this.props;
- const pagination = {
- ...pageInfo,
- showTotal: total => `共 ${total} 条`,
- showQuickJumper: true,
- showSizeChanger: true,
- pageSizeOptions: ["10", "20", "50", "100"],
- onShowSizeChange: (current, pageSize) => {
- this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => {
- this.recessionList();
- });
- },
- onChange: (current) => {
- this.setState({ pageInfo: { ...pageInfo, current } }, () => {
- this.recessionList();
- });
- }
- };
- const rowSelection = {
- selectedRowKeys,
- onChange: this.handleChangeRow
- };
+ const { loading } = this.state;
return (
- {
- return (
-
- );
- }
- }
- ] : [...columns]}
- dataSource={dataSource}
- loading={loading.query}
- pagination={pagination}
- rowSelection={rowSelection}
- scroll={{ x: 900 }}
- />
+
+
+
);
}
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js
index 841500e9..e525dd28 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js
@@ -134,7 +134,7 @@ class Regression extends Component {
selectKey={selectKey}
/>
-
+ {/**/}
this.regListRef = dom}
@@ -152,7 +152,7 @@ class Regression extends Component {
onCancel={this.handleCloseModal}
onSave={this.handleSave}
/>
-
+ {/**/}
);
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js
index 9823bc49..7c20ded9 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js
@@ -138,6 +138,8 @@ export default class SlideTaxagentUser extends React.Component {
...pageObj,
total: pageObj.total,
showTotal: total => `共 ${total} 条`,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ showQuickJumper: true,
showSizeChanger: true,
onShowSizeChange: (current, pageSize) => {
setPageObj &&
diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js
index 6f98abe1..7a31dbd4 100644
--- a/pc4mobx/hrmSalary/stores/payroll.js
+++ b/pc4mobx/hrmSalary/stores/payroll.js
@@ -1,5 +1,6 @@
import { action, observable, toJS } from "mobx";
import { message } from "antd";
+import { WeaLoadingGlobal } from "ecCom";
import { WeaForm, WeaTableNew } from "comsMobx";
import * as API from "../apis/payroll"; // 引入API接口文件
@@ -14,6 +15,7 @@ export class payrollStore {
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
@observable showSearchAd = false; // 高级搜索面板显示
@observable loading = true; // 数据加载状态
+ @observable btnLoading = false; // 数据加载状态
// **** 模板页面 ****
@observable templateStore = new TableStore(); // 模板设置列表
@@ -506,7 +508,15 @@ export class payrollStore {
@action
grantPayroll = (params = {}) => {
return new Promise((resolve, reject) => {
+ message.destroy();
+ message.loading("正在发放中...", 0);
+ this.btnLoading = true;
+ WeaLoadingGlobal.start();
API.grantPayroll(params).then(res => {
+ this.btnLoading = false;
+ WeaLoadingGlobal.end();
+ WeaLoadingGlobal.destroy();
+ message.destroy();
if (res.status) {
message.success("发送成功");
resolve();
@@ -514,6 +524,10 @@ export class payrollStore {
message.error(res.errormsg || "发送失败");
reject();
}
+ }).catch(() => {
+ this.btnLoading = false
+ WeaLoadingGlobal.end();
+ WeaLoadingGlobal.destroy();
});
});
};
@@ -522,7 +536,15 @@ export class payrollStore {
@action
withdrawPayroll = (params = {}) => {
return new Promise((resolve, reject) => {
+ message.destroy();
+ message.loading("正在撤回中...", 0);
+ this.btnLoading = true;
+ WeaLoadingGlobal.start();
API.withdrawPayroll(params).then(res => {
+ this.btnLoading = false;
+ WeaLoadingGlobal.end();
+ WeaLoadingGlobal.destroy();
+ message.destroy();
if (res.status) {
message.success("撤回成功");
resolve();
@@ -530,6 +552,10 @@ export class payrollStore {
message.error(res.errormsg || "撤回失败");
reject();
}
+ }).catch(() => {
+ this.btnLoading = false
+ WeaLoadingGlobal.end();
+ WeaLoadingGlobal.destroy();
});
});
};
diff --git a/pc4mobx/hrmSalary/stores/taxRate.js b/pc4mobx/hrmSalary/stores/taxRate.js
index fc3c4cd7..24db06e9 100644
--- a/pc4mobx/hrmSalary/stores/taxRate.js
+++ b/pc4mobx/hrmSalary/stores/taxRate.js
@@ -2,7 +2,7 @@ import { observable, action, toJS } from 'mobx';
import { message } from 'antd';
import { WeaForm, WeaTableNew } from 'comsMobx';
-import * as API from '../apis/taxRate'; // 引入API接口文件
+import * as API from '../apis/taxrate'; // 引入API接口文件
const { TableStore } = WeaTableNew;
@@ -28,7 +28,7 @@ export class taxRateStore {
@observable loading = true; // 数据加载状态
@observable dataSource = [];
@observable nameValue = "";
- @observable remarkValue = "";
+ @observable remarkValue = "";
@observable slideVisiable = false; // 侧边划入是否展示
currentId = ""; // 当前编辑的数据id
@@ -110,7 +110,7 @@ export class taxRateStore {
this.setNameValue("");
this.setRemarkValue("");
}
-
+
// 获取表单数据
@action getItemInform = (id) => {
this.currentId= id;
@@ -174,6 +174,6 @@ export class taxRateStore {
}
this.doDelete(toJS(this.tableStore.selectedRowKeys))
}
-
-}
\ No newline at end of file
+
+}
diff --git a/pc4mobx/hrmSalary/util/url.js b/pc4mobx/hrmSalary/util/url.js
index 0ef96e1b..a69b4f81 100644
--- a/pc4mobx/hrmSalary/util/url.js
+++ b/pc4mobx/hrmSalary/util/url.js
@@ -22,3 +22,18 @@ export const getQueryString = (variable) => {
}
return null;
};
+
+export const convertToUrlString = (data) => {
+ const _result = [];
+ for (const key in data) {
+ const value = data[key];
+ if (value.constructor === Array) {
+ value.forEach(function (_value) {
+ _result.push(key + "=" + _value);
+ });
+ } else {
+ _result.push(key + "=" + value);
+ }
+ }
+ return _result.join("&");
+};