diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js b/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js index 601890a1..62b0b617 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js @@ -36,7 +36,7 @@ class CustomExportDialog extends Component { const { itemsCheckeds } = this.state; customCacheExportField({ salaryItems: _.map(itemsCheckeds, it => it.toString()) }).then(({ status, errorMsg }) => { if (status) { - const { consolidatedTaxation, ...extra } = searchItemsValue; + const { consolidatedTaxation = "0", ...extra } = searchItemsValue; const payload = { ...extra, consolidatedTaxation: consolidatedTaxation === "0" ? "" : consolidatedTaxation }; window.open( `/api/bs/hrmsalary/salaryacct/acctresult/exportWithCustomFields?salaryAcctRecordId=${getQueryString("id")}&ids=&${convertToUrlString(payload)}&salaryItemIds=${itemsCheckeds.join(",")}` diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js index 8ab69098..e3c795e8 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js @@ -2,13 +2,16 @@ import React from "react"; import { toJS } from "mobx"; import CustomTab from "../../components/customTab"; import { Dropdown, Menu, message } from "antd"; -import { WeaHelpfulTip, WeaInputSearch, WeaSlideModal } from "ecCom"; +import { WeaHelpfulTip, WeaInputSearch, WeaLocaleProvider, WeaSlideModal } from "ecCom"; import SlideModalTitle from "../../components/slideModalTitle"; import FileMergeDetail from "./fileMergeDetail"; import { getQueryString } from "../../util/url"; import { inject, observer } from "mobx-react"; +import { getExportField } from "../../apis/calculate"; import "./index.less"; +import CustomExportDialog from "./customExportDialog"; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore") @observer export default class PlaceOnFileDetail extends React.Component { @@ -18,7 +21,10 @@ export default class PlaceOnFileDetail extends React.Component { slideVisiable: false, selectedRowKeys: [], searchValue: "", - columnIndex: "" + columnIndex: "", + customExportParams: { + visible: false, checkItems: [], itemsByGroup: [] + } }; this.id = ""; } @@ -95,15 +101,33 @@ export default class PlaceOnFileDetail extends React.Component { childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); }; - handleMenuClick() { - const { calculateStore: { exportAll } } = this.props; - const { selectedRowKeys } = this.state; - if (selectedRowKeys.length === 0) { - message.warning("未选择条目"); - return; + handleMenuClick = ({ key }) => { + if (key === "3") { + const { calculateStore: { exportAll } } = this.props; + const { selectedRowKeys } = this.state; + if (selectedRowKeys.length === 0) { + message.warning("未选择条目"); + return; + } + exportAll(this.id, selectedRowKeys.join(",")); + } else if (key === "4") { + this.getExportField(); } - exportAll(this.id, selectedRowKeys.join(",")); - } + }; + + getExportField = () => { + getExportField({ salaryAcctRecordId: getQueryString("id") }).then(({ status, data }) => { + if (status) { + const { checkItems, itemsByGroup } = data; + this.setState({ + customExportParams: { + visible: true, + checkItems, itemsByGroup + } + }); + } + }); + }; handleExportAll = () => { const { calculateStore: { exportAll } } = this.props; @@ -113,11 +137,12 @@ export default class PlaceOnFileDetail extends React.Component { render() { const { calculateStore } = this.props; const { baseSalarySobCycle, columnDescList } = calculateStore; - const { slideVisiable, columnIndex } = this.state; + const { slideVisiable, columnIndex, customExportParams } = this.state; const menu = ( this.handleMenuClick(e)}> 导出所选 + {getLabel(111, "自定义导出")} ); @@ -171,6 +196,17 @@ export default class PlaceOnFileDetail extends React.Component { id="atdTable" /> + { + this.setState({ + customExportParams: { + visible: false, checkItems: [], itemsByGroup: [] + } + }); + }} + /> { slideVisiable &&
this.handleAdd()}>新建 ] : []} searchType={["base", "advanced"]} showSearchAd={showSearchAd} @@ -143,7 +146,7 @@ class Index extends Component {
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index 76913307..8b7af5a4 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -274,7 +274,7 @@ class LedgerAssociatedPersonnel extends Component { return (
{ notSetting && -
+ } diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index 24bf675e..67374438 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -59,13 +59,17 @@ class MySalaryView extends Component { title: getLabel(131329, "信息确认"), content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"), onOk: () => { - const { params: { salaryInfoId } } = this.props; + const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props; feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => { if (status) { const { mySalaryStore } = this.state; const { salaryTemplate } = mySalaryStore; const { feedbackUrl } = salaryTemplate; - window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); + getMySalaryBill(Number(salaryInfoId)).then(data => { + this.setState({ mySalaryStore: data }, () => { + window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); + }); + }); } else { message.error(errorMsg); } diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 73f7e302..1cf37553 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -778,7 +778,7 @@ class Index extends Component { dropMenuDatas={rightMenu} >