|
@@ -12,8 +12,9 @@
|
|
|
:tableData="tableData"
|
|
|
:pageIndex="pageIndex"
|
|
|
:total="total"
|
|
|
+ @selectTable='selectTable'
|
|
|
>
|
|
|
- <div slot="navButton">
|
|
|
+ <div slot="titleButton">
|
|
|
<!-- <Button
|
|
|
v-if="persimissionData['表头设置'] || persimissionData.all"
|
|
|
@click="setupTableHeader"
|
|
@@ -22,6 +23,12 @@
|
|
|
icon="ios-cog"
|
|
|
>表头设置</Button
|
|
|
> -->
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ ghost
|
|
|
+ @click="postData">
|
|
|
+ 导出
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
<template slot="basicTypeSet" slot-scope="{ row }">
|
|
|
<div>
|
|
@@ -155,13 +162,21 @@ import { mapState } from "vuex";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ chooseData:[],
|
|
|
url_number_list:[],
|
|
|
tableColums: [
|
|
|
{
|
|
|
+ type: "selection",
|
|
|
+ align: "center",
|
|
|
+ key: "selection",
|
|
|
+ minWidth: 100,
|
|
|
+ fixed: "left",
|
|
|
+ title: "全选",
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "订单编号",
|
|
|
align: "center",
|
|
|
key: "order_no",
|
|
|
- fixed: "left",
|
|
|
width: "200",
|
|
|
},
|
|
|
{
|
|
@@ -295,7 +310,7 @@ export default {
|
|
|
}
|
|
|
return this.func.computedHeader(this.tableheaders, this.tableColums);
|
|
|
},
|
|
|
- set_list() {
|
|
|
+ set_list(){
|
|
|
return [
|
|
|
{
|
|
|
title: "订单编号",
|
|
@@ -381,32 +396,53 @@ export default {
|
|
|
start_placeholder: "开始日期",
|
|
|
end_placeholder: "结束日期",
|
|
|
},
|
|
|
- ];
|
|
|
+ ]
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectTable(e){
|
|
|
+ this.chooseData = e;
|
|
|
+ console.log(this.chooseData)
|
|
|
+ },
|
|
|
+ async postData() {
|
|
|
+ let transport_no = [];
|
|
|
+ this.chooseData.forEach(v=>{
|
|
|
+ transport_no.push(v.transport_no)
|
|
|
+ });
|
|
|
+ const res = await this.axios.post("/api/transports_export", {
|
|
|
+ transport_no
|
|
|
+ });
|
|
|
+ if (res.code == 200) {
|
|
|
+ let url = `${this.$store.state.ip}/api/storage/${res.data.file}`;
|
|
|
+ location.href = url;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
init(row) {
|
|
|
this.pageIndex = 1;
|
|
|
row.page_index = this.pageIndex;
|
|
|
row.page_size = this.pageSize;
|
|
|
- this.proxyObj = row;
|
|
|
- this.getData(row);
|
|
|
+ this.proxyObj = JSON.parse(JSON.stringify(row));
|
|
|
+ this.getData(this.proxyObj);
|
|
|
+
|
|
|
},
|
|
|
getData(row) {
|
|
|
- this.loading = true;
|
|
|
+ // this.loading = true;
|
|
|
+ console.log(row,1)
|
|
|
this.axios("/api/orders_out_list", { params: row }).then((res) => {
|
|
|
- this.loading = false;
|
|
|
+ // this.loading = false;
|
|
|
if (res.code == 200) {
|
|
|
this.tableData = res.data.data;
|
|
|
this.total = res.data.total;
|
|
|
- this.tableheaders = res.data.tableSet || [];
|
|
|
+ // this.tableheaders = res.data.tableSet || [];
|
|
|
let data =[];
|
|
|
res.data.url_number_list.map(v=>{
|
|
|
let obj={};
|
|
|
- obj.title = v;
|
|
|
+ obj.title = v||'';
|
|
|
+
|
|
|
data.push(obj);
|
|
|
})
|
|
|
- this.url_number_list = data;
|
|
|
+ this.set_list[4].option = data;
|
|
|
}
|
|
|
});
|
|
|
},
|