Browse Source

添加预约详情导出

fix_bug_pro20231227
caoyizhong 1 year ago
parent
commit
ca08ff7f3a
  1. 46
      src/api/distribution/distributionReservation.js
  2. 64
      src/views/distribution/reservation/reservationDetails.vue

46
src/api/distribution/distributionReservation.js

@ -39,6 +39,52 @@ export const reservationExport = (row) => {
})
}
/**
* 预约订单数据详情导出
* @param row
* @returns {AxiosPromise}
*/
export const reservationInfoStockArticleExport = (row) => {
return request({
url: '/api/logpm-distribution/reservationStockarticle/export-distributionReservationStockarticle',
method: 'get',
params: {
...row
},
responseType: 'blob',
})
}
/**
* 预约包件数据详情导出
* @param row
* @returns {AxiosPromise}
*/
export const reservationInfoPackageExport = (row) => {
return request({
url: '/api/logpm-distribution/reservationPackage/distributionReservationPackage/export-distributionReservationPackage',
method: 'get',
params: {
...row
},
responseType: 'blob',
})
}
/**
* 预约库存平数据详情导出
* @param row
* @returns {AxiosPromise}
*/
export const reservationInfoStockListExport = (row) => {
return request({
url: '/api/logpm-distribution/reservationStocklist/distributionReservationStocklist/export-distributionReservationStocklist',
method: 'get',
params: {
...row
},
responseType: 'blob',
})
}
export const remove = (ids) => {
return request({
url: '/api/logpm-distribution/reservation/remove',

64
src/views/distribution/reservation/reservationDetails.vue

@ -133,6 +133,15 @@
<el-tabs type="border-card"
@tab-click="handleClick">
<el-tab-pane label="订单信息">
<el-button
type="danger"
icon="el-icon-download"
@click="handleExportInfo('1')"
plain
>导出
</el-button>
<tablecmt
:columnList="stockArticleColumnList"
:tableData="stockArticleData"
@ -151,6 +160,13 @@
</el-tab-pane>
<el-tab-pane label="包件信息">
<el-button
type="danger"
icon="el-icon-download"
@click="handleExportInfo('2')"
plain
>导出
</el-button>
<tablecmt
:columnList="packageColumnList"
:tableData="parcelList"
@ -166,6 +182,13 @@
</tablecmt>
</el-tab-pane>
<el-tab-pane label="库存品信息">
<el-button
type="danger"
icon="el-icon-download"
@click="handleExportInfo('3')"
plain
>导出
</el-button>
<tablecmt
:columnList="stockListColumnList"
:tableData="stockList"
@ -289,12 +312,20 @@
<script>
import { getList, getDetail, add, update, remove, getDetailById } from '@/api/distribution/distributionSignfor';
import { getReservationDetail,getReservationPackage,getReservationPackageList,getReservationStockListInfo } from '@/api/distribution/distributionReservation';
import {
getReservationDetail,
getReservationPackageList,
getReservationStockListInfo,
reservationInfoPackageExport,
reservationInfoStockArticleExport,
reservationInfoStockListExport
} from '@/api/distribution/distributionReservation';
import { getStockAddValue } from '@/api/distribution/distributionStockArticle';
import option from '@/option/distribution/distributionReservationDetails';
import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls } from '@/utils/util';
export default {
data() {
@ -918,6 +949,37 @@
}
},
methods: {
//
handleExportInfo(type){
let row ={};
row.reservationId = this.$route.query.id;
let nulName ;
switch (type){
case "1":
nulName="预约单订单数据.xlsx";
reservationInfoStockArticleExport(row).then(res => {
console.log(res.data);
downloadXls(res.data, nulName);
});
break;
case "2":
nulName="预约单包件数据.xlsx";
reservationInfoPackageExport(row).then(res => {
console.log(res.data);
downloadXls(res.data, nulName);
});
break;
case "3":
nulName="预约单库存品数据.xlsx";
reservationInfoStockListExport(row).then(res => {
console.log(res.data);
downloadXls(res.data, nulName);
});
break;
}
},
//
rowUpdate() {

Loading…
Cancel
Save