feature/2.14.5.2406.03-工资单查看详情列表添加自定义列的功能

This commit is contained in:
黎永顺 2024-07-16 11:10:48 +08:00
parent adf8b1bddc
commit cff964c7f1
2 changed files with 13 additions and 5 deletions

View File

@ -1,5 +1,5 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
import { postExportFetch, postFetch } from "../util/request";
import { convertToUrlString } from "../util/url";
//工资单-工资单发放列表
@ -248,3 +248,8 @@ export const genPdfBeforeExport = (params) => {
export const salaryBillPreview = (params) => {
return postFetch("/api/bs/hrmsalary/salaryBill/preview", params);
};
// 工资单查看详情导出-重构
export const exportDetailList_reconfig = (params) => {
return postExportFetch("/api/bs/hrmsalary/salaryBill/send/exportDetailList", params);
};

View File

@ -9,7 +9,8 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaTop } from "ecCom";
import { toJS } from "mobx";
import { WeaLoadingGlobal, WeaLocaleProvider, WeaTop } from "ecCom";
import { Button } from "antd";
import AdvanceInputBtn from "./components/advanceInputBtn";
import SalaryMonthHelpfulTip from "./components/salaryMonthHelpfulTip";
@ -50,14 +51,16 @@ class PayrollDetail extends Component {
}
handleExportAll = () => {
const { payrollStore: { salaryTableStore } } = this.props;
const columns = _.filter(toJS(salaryTableStore.columns), (item) => item.display === "true");
WeaLoadingGlobal.start();
const salarySendId = getQueryString("id");
const url = `${window.location.origin}/api/bs/hrmsalary/salaryBill/send/exportDetailList?salarySendId=${salarySendId}`;
window.open(url, "_blank");
const promise = API.exportDetailList_reconfig({ salarySendId, columns: _.map(columns, it => it.dataIndex) });
};
render() {
const { salarySendDetailBaseInfo, showSearchAd, conditions, isQuery, showTotalCell } = this.state;
const { taxAgentStore: { showOperateBtn }, payrollStore: { salaryTableStore } } = this.props;
const { taxAgentStore: { showOperateBtn } } = this.props;
const { salaryMonth, template } = salarySendDetailBaseInfo;
const dropMenuDatas = [
{