diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js index a38f22ce..e86e909e 100644 --- a/pc4mobx/hrmSalary/apis/welfareArchive.js +++ b/pc4mobx/hrmSalary/apis/welfareArchive.js @@ -13,6 +13,10 @@ export const getCondition = params => { export const queryList = (params) => { return postFetch("/api/bs/hrmsalary/archives/getTable", params); }; +//社保福利档案_非系统人员列表 +export const getExtTable = (params) => { + return postFetch("/api/bs/hrmsalary/archives/getExtTable", params); +}; //社保福利档案列表 export const queryInsuranceTabTotal = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/archives/queryInsuranceTabTotal", params); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js index de89e096..84bcb6ff 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js @@ -26,5 +26,12 @@ export const tabCondition = [ showcount: true, title: "停缴员工", viewcondition: "stop" - } + }, + { + color: "#000000", + groupid: "ext", + showcount: true, + title: "非系统人员", + viewcondition: "ext" + }, ]; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index cab89a87..4caa10dc 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -2,7 +2,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { Button, Dropdown, Menu, message, Modal, Popover } from "antd"; -import { WeaHelpfulTip, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom"; +import { WeaCheckbox, WeaHelpfulTip, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom"; import { getSearchs, renderLoading } from "../../../util"; import BaseForm from "./baseForm"; import SlideModalTitle from "../../../components/slideModalTitle"; @@ -14,11 +14,16 @@ import * as API from "../../../apis/welfareArchive"; import ImportModal from "../../../components/importModal"; import TipLabel from "../../../components/TipLabel"; import UnifiedTable from "../../../components/UnifiedTable"; -import { convertToUrlString } from "../../../util/url"; +import { convertToUrlString, getURLParameters } from "../../../util/url"; import { salaryArchiveDelete } from "../../../apis/payrollFiles"; +import ImportDialog from "../../../components/importDialog"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; +const APILIST = { + runStatuses: API["queryList"], + extWelArchiveList: API["getExtTable"] +}; @inject("archivesStore", "taxAgentStore") @observer export default class Archives extends React.Component { @@ -46,14 +51,20 @@ export default class Archives extends React.Component { stayAdd: 0, paying: 0, stayDel: 0, - stopPay: 0 + stopPay: 0, + ext: 0 }, pageInfo: { current: 1, pageSize: 10, total: 0 }, - salaryArchiveDelete: "" //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是 + salaryArchiveDelete: "", //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是 + importDialog: { + visible: false, title: "", nextloading: false, + link: "", importResult: {}, imageId: "", + previewUrl: "/api/bs/hrmsalary/scheme/preview" + } }; this.record = {}; } @@ -78,7 +89,7 @@ export default class Archives extends React.Component { const formParams = form.getFormParams() || {}; const payload = { ...pageInfo }; this.setState({ loading: { ...loading, query: true } }); - API.queryList({ ...formParams, ...payload, ...params }).then(({ data, status }) => { + APILIST[_.keys(params)[0]]({ ...formParams, ...payload, ...params }).then(({ data, status }) => { this.setState({ loading: { ...loading, query: false } }); if (status) { const { pageInfo: paganition, columns, datas: dataSource } = data; @@ -309,8 +320,19 @@ export default class Archives extends React.Component { // 导入 handleImport = (params) => { const { archivesStore: { importBatch } } = this.props; - const { runStatus } = this.state; - importBatch({ ...params, runStatus }); + const { runStatus, importDialog } = this.state; + this.setState(({ + importDialog: { + ...importDialog, nextloading: true, ...params + } + })); + importBatch({ ...params, runStatus }).then(({ status, data }) => { + this.setState(({ + importDialog: { + ...importDialog, nextloading: false, importResult: data, ...params + } + })); + }); }; // 导入完成 @@ -375,9 +397,12 @@ export default class Archives extends React.Component { case "suspend": this.queryList({ runStatuses: ["3"] }); break; - default: + case "stop": this.queryList({ runStatuses: ["4", "5"] }); break; + default: + this.queryList({ extWelArchiveList: true }); + break; } }; handleMenuBtnClick = () => { @@ -564,13 +589,15 @@ export default class Archives extends React.Component { {/*