diff --git a/pc4mobx/hrmSalary/apis/standingBook.js b/pc4mobx/hrmSalary/apis/standingBook.js index 745b3706..9f8b28b1 100644 --- a/pc4mobx/hrmSalary/apis/standingBook.js +++ b/pc4mobx/hrmSalary/apis/standingBook.js @@ -202,6 +202,14 @@ export const getWelfareList = () => { {} ); }; +// 补差表单字段对应的接口 +export const getBalanceWelfareList = () => { + return WeaTools.callApi( + "/api/bs/hrmsalary/siaccount/getBalanceWelfareList", + "get", + {} + ); +}; // 社保福利台账-导入预览 export const welfarePreview = (params) => { @@ -226,6 +234,17 @@ export const importInsuranceAcctDetail = (params) => { body: JSON.stringify(params) }).then((res) => res.json()); }; +// 社保福利台账-补差数据导入 +export const importBalanceInsuranceDetail = (params) => { + return fetch("/api/bs/hrmsalary/siaccount/welfare/importBalanceInsuranceDetail", { + method: "post", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then((res) => res.json()); +}; // 社保福利台账-线下对比数据导入 export const importExcelInsuranceDetail = (params) => { @@ -251,10 +270,18 @@ export const saveRecession = (params) => { export const recessionList = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params); }; +//查询补差列表 +export const balanceList = (params) => { + return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list", params); +}; //删除退差数据 export const delRecession = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/delRecession", params); }; +//删除补差数据 +export const delBalance = (params) => { + return postFetch("/api/bs/hrmsalary/siaccount/delBalance", params); +}; //编辑社保福利缴纳数据 export const editAccount = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/editAccount", params); diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js index 5c1a1b48..974ed260 100644 --- a/pc4mobx/hrmSalary/apis/welfareArchive.js +++ b/pc4mobx/hrmSalary/apis/welfareArchive.js @@ -17,10 +17,14 @@ export const queryList = (params) => { export const queryInsuranceTabTotal = (params) => { return WeaTools.callApi('/api/bs/hrmsalary/archives/queryInsuranceTabTotal', params); }; -//删除待办 +//删除待办-待增员 export const updateRunStatus = (params) => { return postFetch('/api/bs/hrmsalary/archives/updateRunStatus', params); }; +//删除待办-待减员 +export const cancelStayDel = (params) => { + return postFetch('/api/bs/hrmsalary/archives/cancelStayDel', params); +}; //全量增员 export const allStayAddToPay = (params) => { return WeaTools.callApi('/api/bs/hrmsalary/archives/allStayAddToPay', 'GET', params); diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js index 44d0a208..86b4be54 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js @@ -37,7 +37,7 @@ export default class AcctResultImportModal extends React.Component { // 获取模板 handleAccResultTemplateLink() { - const { isStandingBook, standingBookTabKey } = this.props; + const { isStandingBook, standingBookTabKey, standingBookType } = this.props; let url = ""; if (_.isEmpty(this.state.modalParam.salaryItemIds)) { message.warning("请选择表单字段"); @@ -52,6 +52,8 @@ export default class AcctResultImportModal extends React.Component { url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/importtemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`; } else if (standingBookTabKey === "3") { url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/supplyimporttemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`; + } else if (standingBookType === "difference") { + url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/balanceimporttemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`; } } window.open(url, "_self"); @@ -162,8 +164,10 @@ export default class AcctResultImportModal extends React.Component { } render() { + const billMonth = getQueryString("billMonth"); //isStandingBook: 是否是社保福利台账核算的导入标识 - const { calculateStore, standingBookStore, isStandingBook, visiable } = this.props; + //standingBookType: 是否是补差的导入标识 + const { calculateStore, standingBookStore, isStandingBook, visiable, standingBookType } = this.props; const { fetchPreviewAcctResult, previewAcctResultColumns, @@ -176,7 +180,8 @@ export default class AcctResultImportModal extends React.Component { previewStandingBookAcctResultColumns, previewStandingBookAcctResultDataSource, importStandingBookAcctResult, - importInsuranceAcctDetail + importInsuranceAcctDetail, + importBalanceInsuranceDetail } = standingBookStore; const { step, selectFieldVisible, modalParam } = this.state; return ( @@ -184,6 +189,7 @@ export default class AcctResultImportModal extends React.Component { { visiable && { this.handleImportModalInit(); }} @@ -200,7 +206,11 @@ export default class AcctResultImportModal extends React.Component { !isStandingBook ? fetchPreviewAcctResult(params) : welfarePreview(params); }} importFile={(params) => { - !isStandingBook ? fetchImportAcctResult(params) : importInsuranceAcctDetail(params); + !isStandingBook ? + fetchImportAcctResult(params) : + standingBookType === "difference" ? + importBalanceInsuranceDetail({...params, billMonth}) : + importInsuranceAcctDetail(params); }} templateLink={() => { this.handleAccResultTemplateLink(); @@ -215,6 +225,7 @@ export default class AcctResultImportModal extends React.Component { { selectFieldVisible && { let fieldData = {}; @@ -43,7 +49,8 @@ export default class SelectFieldModal extends React.Component { this.fieldData = fieldData; }); } else { - getWelfareList().then(result => { + const APIFox = standingBookType === "difference" ? getBalanceWelfareList : getWelfareList; + APIFox().then(result => { let fieldData = {}; let formulaItems = []; formulaItems = _.map(result, it => ({ ...it, salaryItemId: it.salaryItemName })); @@ -146,9 +153,9 @@ export default class SelectFieldModal extends React.Component { const { isStandingBook } = this.props; return ( { this.props.onCancel(); }} @@ -161,7 +168,7 @@ export default class SelectFieldModal extends React.Component {
{ !_.isEmpty(fieldData.formulaItems) && -
+
{ this.handleTitleCheckboxChange(value, "formula"); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index 0bc55999..c288edd4 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -174,17 +174,17 @@ export default class Archives extends React.Component { placement="bottomRight" content={ { if (key === "stopSalary") { - Modal.warning({ + Modal.confirm({ title: "信息确认", content: `确定要删除该条待办人员吗?`, - onOk: () => this.deleteTodoList({ runStatus: "5", ids: [record.baseInfo] }) + onOk: () => this.cancelStayDel({ runStatus: "3", ids: [record.baseInfo] }) }); } else { this.stayDelToStop([record.baseInfo]); } }}> 减员 - {/*删除待办*/} + 删除待办 } title=""> @@ -401,6 +401,8 @@ export default class Archives extends React.Component { case "suspend": if (key === "1") { this.stayDelToStop(selectedRowKeys); + } else if (key === "2") { + this.cancelStayDel({ runStatus: "3", ids: selectedRowKeys }); } break; default: @@ -454,7 +456,7 @@ export default class Archives extends React.Component { } }); }; - //删除待办 + //删除待办-待增员 deleteTodoList = (payload) => { API.updateRunStatus(payload).then(({ status, errormsg }) => { if (status) { @@ -466,6 +468,18 @@ export default class Archives extends React.Component { } }); }; + //删除待办-待减员 + cancelStayDel = (payload) => { + API.cancelStayDel(payload).then(({ status, errormsg }) => { + if (status) { + message.success("操作成功"); + this.query(); + this.onSelectChange([]); + } else { + message.error(errormsg || "操作失败"); + } + }); + }; getTipChildren = () => { const { selectedKey } = this.state; @@ -649,6 +663,7 @@ export default class Archives extends React.Component { overlay={ 批量减员 + 批量删除待办 } type="primary" diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index dda48291..79cb2d45 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -9,6 +9,7 @@ import CustomPaginationTable from "../../../components/customPaginationTable"; import moment from "moment"; import _ from "lodash"; import ProgressModal from "../../../components/progressModal"; +import { getCalculateProgress } from "../../../apis/calculate"; import "./index.less"; const MonthPicker = DatePicker.MonthPicker; @@ -318,39 +319,54 @@ export default class StandingBook extends React.Component { break; } }; - handleOk = (formVal) => { + handleOk = async (formVal) => { const { save } = this.props.standingBookStore; const { billMonth, ...extra } = formVal; const payload = { billMonth: moment(billMonth).format("YYYY-MM"), ...extra }; - save(payload).then(({ data }) => { - this.setState({ - progressVisible: true - }, () => { - this.timer = setInterval(() => { - if (this.state.progress !== 100) { - this.setState({ - progress: this.state.progress + 10 - }); + const { data: saveData } = await save(payload); + this.setState({ + progressVisible: true + }, () => { + this.timer = setInterval(() => { + getCalculateProgress(moment(billMonth).format("YYYY-MM")).then(({ status, data }) => { + if (status) { + if (this.state.progress !== 100) { + this.setState({ + progress: (Number(data.progress).toFixed(2)) * 100 + }); + } else { + clearInterval(this.timer); + this.setState({ + progressVisible: false, + progress: 0 + }, () => { + message.success("核算成功"); + this.handleClose(); + this.getCommonList({ + ...this.state.tableParams, + current: this.state.current + }); + this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : "", saveData); + }); + } } else { clearInterval(this.timer); this.setState({ progressVisible: false, progress: 0 - }, () => { - message.success("核算成功"); - this.handleClose(); - this.getCommonList({ - ...this.state.tableParams, - current: this.state.current - }); - this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : "", data); }); } - }, 1000); - }); + }).catch(() => { + clearInterval(this.timer); + this.setState({ + progressVisible: false, + progress: 0 + }); + }); + }, 600); }); }; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less index c3f0ab99..e266ce39 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less @@ -37,10 +37,18 @@ margin-right: 0px; } } + + .tdEllipsis { + display: inline-block; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } -//退差 -.regressionWrapper { +//退差;补差 +.regressionWrapper, .differenceWrapper { height: calc(100vh - 47px); overflow: auto; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js new file mode 100644 index 00000000..0541af88 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js @@ -0,0 +1,136 @@ +/* + * Author: 黎永顺 + * name: 补差 + * Description: + * Date: 2022/12/16 + */ +import React, { Component } from "react"; +import RegTop from "./regTop"; +import { message, Modal } from "antd"; +import { getQueryString } from "../../../../util/url"; +import RegList from "./regList"; +import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal"; +import * as API from "../../../../apis/standingBook"; +import "./index.less"; +import RegEditDetial from "./regEditDetial"; + +class MakeupDifference extends Component { + constructor(props) { + super(props); + this.state = { + selectKey: [], + fieldData: {}, + returnEditPersonSlide: { + title: "", + editId: "", + visible: false + }, + importDiffModal: { + visible: false + }, + loading: { save: false } + }; + this.diffListRef = null; + this.regTopRef = null; + } + + delBalance = () => { + const { selectKey: ids } = this.state; + const billMonth = getQueryString("billMonth"); + const paymentOrganization = getQueryString("paymentOrganization"); + const payload = { ids, billMonth, paymentOrganization }; + API.delBalance(payload).then(({ status, errormsg }) => { + if (status) { + message.success("删除成功"); + this.diffListRef.recessionList(); + this.diffListRef.handleResetSelectRowKeys([]); + this.setState({ selectKey: [] }); + } else { + message.error(errormsg || "删除失败"); + } + }); + }; + handleChangeOpt = (key) => { + const { importDiffModal } = this.state; + const name = this.regTopRef.state.name; + const billMonth = getQueryString("billMonth"); + const paymentOrganization = getQueryString("paymentOrganization"); + switch (key) { + case "delete": + Modal.confirm({ + title: "信息确认", + content: "确定删除数据吗?", + onOk: () => this.delBalance() + }); + break; + case "import": + this.setState({ importDiffModal: { ...importDiffModal, visible: true } }); + break; + case "export": + const url = `${window.location.origin}/api/bs/hrmsalary/welfare/balance/export?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`; + window.open(url, "_self"); + break; + case "search": + this.diffListRef.recessionList(name); + break; + default: + break; + } + }; + handleEdit = (record) => { + const { userName, id: editId } = record; + const { returnEditPersonSlide } = this.state; + this.setState({ + returnEditPersonSlide: { ...returnEditPersonSlide, visible: true, title: userName, editId } + }); + }; + handleCloseModal = () => { + const { returnEditPersonSlide } = this.state; + this.setState({ + returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" } + }); + }; + + render() { + const billMonth = getQueryString("billMonth"); + const { selectKey, importDiffModal, fieldData, returnEditPersonSlide } = this.state; + return ( +
+ this.regTopRef = dom} + billMonth={billMonth} + onChange={this.handleChangeOpt} + selectKey={selectKey} + /> + this.diffListRef = dom} + onChangeRowkey={(selectKey) => this.setState({ selectKey })} + onEdit={this.handleEdit} + /> + {/*编辑弹框*/} + + {/*导入补差*/} + { + importDiffModal.visible && + this.setState({ fieldData })} + onCancel={() => { + this.setState({ importDiffModal: { ...importDiffModal, visible: false }, fieldData: {} }, () => { + const name = this.regTopRef.state.name; + this.diffListRef.recessionList(name); + }); + }} + isStandingBook + standingBookType="difference" + /> + } +
+ ); + } +} + +export default MakeupDifference; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index 5892b500..e3859fa6 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -14,8 +14,10 @@ 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 _ from "lodash"; import "./index.less"; +import RegEditDetial from "./regEditDetial"; @inject("standingBookStore") @observer @@ -46,6 +48,11 @@ export default class NormalIndex extends Component { fieldData: {}, //选中的表单头信息 importParams: { //导入信息的弹框表示 visible: false + }, + returnEditPersonSlide: { + title: "", + editId: "", + visible: false } }; this.timer = null; @@ -192,7 +199,6 @@ export default class NormalIndex extends Component { ...it, width: 150, fixed: "left", - render: (text, r) => { const { userName, employeeId } = r; return ( @@ -362,40 +368,52 @@ export default class NormalIndex extends Component { handleCommonAccountClick() { const { billMonth, selectedKey, paymentOrganization } = this.props; const { commonAccount } = this.props.standingBookStore; - commonAccount({ - billMonth, - paymentOrganization, - includes: [] - }).then(() => { - this.setState({ - progressVisible: true - }, () => { - this.timer = setInterval(() => { - if (this.state.progress !== 100) { - this.setState({ - progress: this.state.progress + 10 - }); + commonAccount({ billMonth, paymentOrganization, includes: [] }); + this.setState({ + progressVisible: true + }, () => { + this.timer = setInterval(() => { + getCalculateProgress(billMonth).then(({ status, data }) => { + if (status) { + if (this.state.progress !== 100) { + this.setState({ + progress: (Number(data.progress).toFixed(2)) * 100 + }); + } else { + clearInterval(this.timer); + this.setState({ + progressVisible: false, + progress: 0 + }, () => { + message.success("核算成功"); + selectedKey === "1" + ? this.getNormalList({ + billMonth, + paymentOrganization, + current: this.state.current + }) + : this.getSupplementaryList({ + billMonth, + paymentOrganization, + current: this.state.current + }); + }); + } } else { clearInterval(this.timer); - message.success("核算成功"); this.setState({ progressVisible: false, progress: 0 }); - selectedKey === "1" - ? this.getNormalList({ - billMonth, - paymentOrganization, - current: this.state.current - }) - : this.getSupplementaryList({ - billMonth, - paymentOrganization, - current: this.state.current - }); } - }, 1000); - }); + }).catch(() => { + clearInterval(this.timer); + this.setState({ + progressVisible: false, + progress: 0 + }); + }); + }, 600); }); } @@ -410,15 +428,25 @@ export default class NormalIndex extends Component { window.open(url, "_self"); }; + handleEditNormalStandingBook = (record) => { + const { userName, id: editId } = record; + const { returnEditPersonSlide } = this.state; + this.setState({ + returnEditPersonSlide: { ...returnEditPersonSlide, visible: true, title: userName, editId } + }); + }; + handleCloseNormalStandingBookModal = () => { + const { returnPersonModal, returnEditPersonSlide } = this.state; + this.setState({ + returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" } + }, () => { + }); + }; + render() { const { remarks, billMonth, selectedKey, paymentOrganization } = this.props; - const { selectedRowKeys, addProps, adjustSlide, importParams } = this.state; - const { - loading, - form, - condition, - saveLoading - } = this.props.standingBookStore; + const { selectedRowKeys, addProps, adjustSlide, importParams, returnEditPersonSlide } = this.state; + const { loading, form, condition, saveLoading } = this.props.standingBookStore; let { list, columns, total } = this.state.tableData; const rowSelection = { selectedRowKeys, @@ -457,9 +485,44 @@ export default class NormalIndex extends Component { }); } }; + columns = _.map(toJS(columns), item => { + if (item.dataIndex === "employeeId") { + return { ...item }; + } + return { + ...item, + render: (text) => { + return {text}; + } + }; + }); + columns = [ + ...columns, + { + title: "操作", + dataIndex: "operate", + fixed: "right", + width: "120px", + render: (text, record) => { + return ( +
+ { + selectedKey === '3' && + this.handleEditNormalStandingBook(record)} + >编辑 + } +
+ ); + } + } + ]; return (
- {selectedKey === "1" && + { + selectedKey === "1" &&
@@ -478,7 +541,8 @@ export default class NormalIndex extends Component { {remarks}
-
} +
+ }
{this.props.type !== "detail" && this.props.selectedKey == "3" ? @@ -624,6 +688,8 @@ export default class NormalIndex extends Component { scroll={{ x: 1200, y: "calc(100vh - 233px)" }} /> + {/*编辑弹框*/} + { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js index 822cc0c7..c311d035 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js @@ -30,33 +30,6 @@ class RegAddEmployee extends Component { }; } - componentDidMount() { - this.getEmployeeListByTaxAgent(); - } - - getEmployeeListByTaxAgent = () => { - const { returnPersonInfo, selectPersonInfo } = this.state; - const payload = { - pageNum: 1, - pageSize: 10000, - name: null - }; - API.getEmployeeListByTaxAgent(payload).then(({ status, data }) => { - if (status) { - const { list } = data; - this.setState({ - returnPersonInfo: { - ...returnPersonInfo, - employeeOptions: _.map(list || [], it => ({ key: String(it.employeeId), showname: it.username })) - }, - selectPersonInfo: { - ...selectPersonInfo, - employeeOptions: _.map(list || [], it => ({ key: String(it.employeeId), showname: it.username })) - } - }); - } - }); - }; handleReset = () => { this.setState({ baseInfo: { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js index 94d6ebad..0aeca243 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js @@ -10,6 +10,11 @@ import { getQueryString } from "../../../../util/url"; import * as API from "../../../../apis/standingBook"; import "./index.less"; +const APIFox = { + "regression": API.recessionList, + "difference": API.balanceList +}; + class RegList extends Component { constructor(props) { super(props); @@ -41,7 +46,8 @@ class RegList extends Component { handleResetSelectRowKeys = (selectedRowKeys) => { this.setState({ selectedRowKeys }); }; - recessionList = (module = {}) => { + recessionList = (userName = "") => { + const { type } = this.props; const { loading, pageInfo } = this.state; const billMonth = getQueryString("billMonth"); const paymentOrganization = getQueryString("paymentOrganization"); @@ -54,7 +60,7 @@ class RegList extends Component { ...module }; this.setState({ loading: { ...loading, query: true } }); - API.recessionList(payload).then(({ status, data }) => { + APIFox[type](payload).then(({ status, data }) => { this.setState({ loading: { ...loading, query: false } }); if (status) { const { pageInfo: list } = data; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js index 96107ed0..78a837b9 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js @@ -13,7 +13,7 @@ class RegTop extends Component { renderTopBtns = () => { const { name } = this.state; - const { onChange, selectKey } = this.props; + const { onChange, selectKey, type: regtopType } = this.props; const type = getQueryString("type"); let dom = [ onChange("add")}> + + : + ; dom = [ dom1, , - , - ...extra + , domBtn, ...extra ]; } return dom; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js index ac795562..42db2275 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js @@ -125,12 +125,14 @@ class Regression extends Component { return (
this.regTopRef = dom} billMonth={billMonth} onChange={this.handleChangeOpt} selectKey={selectKey} /> this.regListRef = dom} visible={returnPersonModal.visible} onChangeRowkey={(selectKey) => this.setState({ selectKey })} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js index 75b41a1b..a5ae1a93 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js @@ -11,6 +11,7 @@ import NormalIndex from "./components/normal"; import OverViewIndex from "./components/overView"; import AbnormalListIndex from "./components/abnormalList"; import Regression from "./components/regression"; +import MakeupDifference from "./components/makeupDifference"; @inject("standingBookStore") @observer @@ -39,7 +40,7 @@ class StandingBookDetail extends Component { getTabList({ billMonth, paymentOrganization: this.paymentOrganization }).then(({ data }) => { const { tabList, remarks, billMonth } = data; let newTabList = tabList.filter(item => item.id != "2"); - newTabList[newTabList.length - 2] = newTabList.splice(newTabList.length - 1, 1, newTabList[newTabList.length - 2])[0] + newTabList.push(newTabList.splice(_.findIndex(newTabList, it => it.id === "4"), 1)[0]); this.setState({ selectedKey: newTabList[0].id, tabList: _.map(newTabList, it => ({ title: it.content, viewcondition: it.id })), @@ -74,7 +75,10 @@ class StandingBookDetail extends Component { } { - selectedKey === "5" && + selectedKey === "5" && + } + { + selectedKey === "6" && }
); diff --git a/pc4mobx/hrmSalary/stores/StandingBook.js b/pc4mobx/hrmSalary/stores/StandingBook.js index 083914f8..d74c1c5c 100644 --- a/pc4mobx/hrmSalary/stores/StandingBook.js +++ b/pc4mobx/hrmSalary/stores/StandingBook.js @@ -1,11 +1,8 @@ -import { observable, action, toJS } from "mobx"; +import { action, observable } from "mobx"; import { message } from "antd"; import { WeaForm, WeaTableNew } from "comsMobx"; import { removePropertyCondition } from "../util/response"; -import _ from "lodash"; - import * as API from "../apis/standingBook"; -import { importExcelInsuranceDetail } from "../apis/standingBook"; const { TableStore } = WeaTableNew; @@ -44,7 +41,7 @@ export class StandingBookStore { if (status) { // 接口请求成功/失败处理 const { - pageInfo: { list, columns, total, pageNum }, + pageInfo: { list, columns, total, pageNum } } = data; resolve({ list, columns, total, pageNum }); } else { @@ -66,7 +63,7 @@ export class StandingBookStore { if (status) { // 接口请求成功/失败处理 const { - pageInfo: { list, columns, total }, + pageInfo: { list, columns, total } } = data; resolve({ list, columns, total }); } else { @@ -88,7 +85,7 @@ export class StandingBookStore { if (status) { // 接口请求成功/失败处理 const { - pageInfo: { list, columns, total }, + pageInfo: { list, columns, total } } = data; resolve({ list, columns, total }); } else { @@ -131,7 +128,7 @@ export class StandingBookStore { // 接口请求成功/失败处理 const { dataKey: { datas }, - pageInfo: { list, total }, + pageInfo: { list, total } } = data; this.tableStore.getDatas(datas); resolve({ list, total }); @@ -229,7 +226,7 @@ export class StandingBookStore { // 接口请求成功/失败处理 const { dataKey: { datas }, - pageInfo: { list, total }, + pageInfo: { list, total } } = data; this.tableStore.getDatas(datas); resolve({ list, total }); @@ -302,7 +299,7 @@ export class StandingBookStore { action((res) => { if (res.status) { // 接口请求成功/失败处理 - let condition = removePropertyCondition(res.data.condition) + let condition = removePropertyCondition(res.data.condition); this.condition = condition; this.form.initFormFields(condition); // 渲染高级搜索form表单 } else { @@ -318,7 +315,7 @@ export class StandingBookStore { action((res) => { if (res.status) { // 接口请求成功/失败处理 - let condition = removePropertyCondition(res.data.condition) + let condition = removePropertyCondition(res.data.condition); this.condition = condition; this.form.initFormFields(condition); // 渲染高级搜索form表单 } else { @@ -361,57 +358,70 @@ export class StandingBookStore { commonAccount = (params) => { return new Promise((resolve, reject) => { API.commonAccount(params).then(res => { - if(res.status) { + if (res.status) { resolve(); } else { - message.error(res.errormsg || "接口调用失败!") + message.error(res.errormsg || "接口调用失败!"); reject(); } - }) - }) - } + }); + }); + }; @action("社保福利台账重新核算") socialSecurityBenefitsRecalculate = (params) => { return new Promise((resolve, reject) => { API.socialSecurityBenefitsRecalculate(params).then(res => { - if(res.status) { + if (res.status) { resolve(); } else { reject(res.errormsg || "接口调用失败!"); } - }) - }) - } + }); + }); + }; // 获取当前管理员下的所有个税扣缴义务人 @action getAdminTaxAgentList = () => { return new Promise((resolve, reject) => { API.getAdminTaxAgentList().then(res => { - if(res.status) { + if (res.status) { resolve(res.data); } else { - message.error(res.errormsg || "接口调用失败!") + message.error(res.errormsg || "接口调用失败!"); reject(); } - }) - }) - } + }); + }); + }; @action("社保福利台账核算导入信息表头信息列表") getWelfareList = () => { return new Promise((resolve, reject) => { API.getWelfareList().then(res => { - if(res.status) { + if (res.status) { resolve(res.data); } else { - message.error(res.errormsg || "接口调用失败!") + message.error(res.errormsg || "接口调用失败!"); reject(); } - }) - }) - } + }); + }); + }; + @action("社保福利台账补差导入信息表头信息列表") + getBalanceWelfareList = () => { + return new Promise((resolve, reject) => { + API.getBalanceWelfareList().then(res => { + if (res.status) { + resolve(res.data); + } else { + message.error(res.errormsg || "接口调用失败!"); + reject(); + } + }); + }); + }; @action setPreviewStandingBookAcctResultDataSource = previewAcctResultDataSource => { @@ -452,6 +462,16 @@ export class StandingBookStore { }); }; + @action("社保福利台账-补差数据导入") + importBalanceInsuranceDetail = (params) => { + API.importBalanceInsuranceDetail(params).then(res => { + if (res.status) { + this.importStandingBookAcctResult = res.data; + } else { + message.error(res.errormsg || "导入失败"); + } + }); + }; @action("社保福利台账-核算数据导入") importInsuranceAcctDetail = (params) => { API.importInsuranceAcctDetail(params).then(res => {