调整业务模块
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
<script>
|
||||
import { ArrowDown, ArrowUp, Refresh } from '@element-plus/icons-vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import * as XLSX from 'xlsx';
|
||||
import { downloadFile } from '@/utils/util';
|
||||
import * as api from '@/api/settlement/transportReconciliation';
|
||||
import { transportReconciliationSearchFields } from '@/option/settlement/transportReconciliationSearch';
|
||||
import { transportReconciliationTableColumns } from '@/option/settlement/transportReconciliationTable';
|
||||
@@ -217,30 +217,13 @@ export default {
|
||||
this.loadTable();
|
||||
},
|
||||
async handleExport() {
|
||||
const response = await api.getList(1, 100000, {
|
||||
...this.query,
|
||||
const params = {
|
||||
...this.normalizeOrganizationSearch({ ...this.query }, 'deptName'),
|
||||
settlementType: this.settlementType,
|
||||
});
|
||||
const data = response?.data?.data || response?.data || response || {};
|
||||
const exportRows = (data.records || []).map(item => ({
|
||||
对账单号: item.reconciliationNo,
|
||||
付款方: item.payerName,
|
||||
收款方: item.payeeName,
|
||||
项目名称: item.projectName,
|
||||
所属组织: item.deptName,
|
||||
合同编号: item.contractNo,
|
||||
合同名称: item.contractName,
|
||||
结算金额: Number(item.settlementAmount || 0).toFixed(2),
|
||||
对账模式: item.reconciliationModeName,
|
||||
账单总数: item.externalBillCount,
|
||||
匹配数: item.matchedCount,
|
||||
对账状态: item.reconciliationStatusName,
|
||||
创建人: item.createUserName,
|
||||
创建时间: item.createTime,
|
||||
}));
|
||||
const workbook = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(workbook, XLSX.utils.json_to_sheet(exportRows), '运输对账');
|
||||
XLSX.writeFile(workbook, `运输对账${this.$dayjs().format('YYYY-MM-DD HH-mm-ss')}.xlsx`);
|
||||
};
|
||||
if (this.selection.length) params.ids = this.selection.map(item => item.id).join(',');
|
||||
const { data } = await api.exportList(params);
|
||||
downloadFile(data, `运输对账${this.$dayjs().format('YYYY-MM-DD HH-mm-ss')}.xlsx`);
|
||||
},
|
||||
isEditable(row) {
|
||||
return row.reconciliationStatus === 'unfinished';
|
||||
|
||||
Reference in New Issue
Block a user