Commit 38010642 authored by dragondean@qq.com's avatar dragondean@qq.com

完善自编号报表

parent 3cd705f2
......@@ -359,3 +359,13 @@ export function boxSettlementPage(params) {
params,
});
}
// 导出自编号汇总excel
export function exportSettlementExcel(params) {
return request({
url: "/shipment/box/export-shipment-summary",
method: "get",
responseType: "blob",
params,
});
}
......@@ -64,11 +64,11 @@
@click="handleQuery"
:loading="loading"
>{{$t('查询')}}</el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleExport">{{$t('导出搜索')}}</el-button>
<el-button type="primary" :loading="exporting" icon="el-icon-download" @click="handleExport">{{$t('导出搜索')}}</el-button>
</el-form-item>
</el-form>
</el-card>
<el-table v-loading="loading" :data="list" border class="card">
<el-table v-loading="loading" :data="list" border class="card" :element-loading-text="$t('汇总计算中...')">
<el-table-column :label="$t('是否结算')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.SETTLEMENT_STATUS" :value="scope.row.slStatus"></dict-tag>
......@@ -98,7 +98,7 @@
</el-table-column>
<el-table-column :label="$t('操作')" v-if="permissions.indexOf('selfno:report:detail') > -1">
<template slot-scope="scope">
<el-button type="text" @click="$router.push('./self_no_report_detail?id=' + scope.row.id)">{{$t('查看')}}</el-button>
<el-button type="text" @click="$router.push('./self_no_report_detail?containerNumber=' + scope.row.selfNo)">{{$t('查看')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -113,17 +113,14 @@
</template>
<script>
import { getTradeCityList } from "@/api/ecw/region";
import { getCurrencyPage } from "@/api/ecw/currency";
import {getWarehouseList} from '@/api/ecw/warehouse'
import Template from "@/views/cms/template/index.vue";
import store from "@/store";
import {boxSettlementPage} from "@/api/ecw/box";
import {boxSettlementPage, exportSettlementExcel} from "@/api/ecw/box";
import {DICT_TYPE} from "@/utils/dict";
import {getCountryListAll} from "@/api/ecw/country";
export default {
components: {Template},
data() {
return {
loading: false, // 是否加载中
......@@ -132,12 +129,14 @@ export default {
total: 0,
queryParams: {
page: 1,
rows: 20,
rows: 10,
},
// tradeCityList: [],
currencyList:[],
warehouseList:[],
countryList: [],
// 导出中状态
exporting: false
};
},
activated(){
......@@ -204,7 +203,14 @@ export default {
},
// 导出搜索
handleExport(){
this.$message.info("// TODO 导出搜索")
this.exporting = true
let params = {...this.queryParams}
this.addBeginAndEndTime(params, this.dateFilter, "JsDate", false);
exportSettlementExcel(params).then(res => {
this.$download.excel(res, 'shipment-summary.xls');
}).finally(() => {
this.exporting = false
})
}
},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment