导出待发货订单

master
mabo 2021-07-02 09:10:53 +08:00
parent 6100f1e39a
commit be2280907e
3 changed files with 27 additions and 20 deletions

View File

@ -90,7 +90,7 @@
<template v-if="detail.goodsParamsDTOList && detail.goodsParamsDTOList.length">
<div class="goods-params" v-for="item in detail.goodsParamsDTOList" :key="item.groupId">
<span class="ml_10">{{item.groupName}}</span>
<table class="mt_10" cellpadding='0' cellspacing="0" >
<table class="mb_10" cellpadding='0' border="1" cellspacing="0" >
<tr v-for="param in item.goodsParamsItemDTOList" :key="param.paramId">
<td style="text-align:right">{{param.paramName}}</td><td>{{param.paramValue}}</td>
</tr>
@ -489,16 +489,17 @@ export default {
color: $theme_color;
}
table{
border-color: #eee;
border-color:#efefef;
color: #999;
width: 50%;
min-width: 30%;
margin-left: 10px;
font-size: 12px;
tr{
td:nth-child(1){
width: 100px;
min-width: 70px;
}
td:nth-child(2){
padding-left: 20px;
padding-left: 10px;
}
}
td{

View File

@ -12,7 +12,7 @@ export const verificationCode = verificationCode => {
export const downLoadDeliverExcel = params => {
return getRequest(`/orders/downLoadDeliverExcel`, params, 'blob');
};
// 下载待发货的订单列表
// 导出待发货订单
export const queryExportOrder = params => {
return getRequest(`/orders/queryExportOrder`, params);
};

View File

@ -30,8 +30,7 @@
<Button type="primary" class="export" @click="expressOrderDeliver">
批量发货
</Button>
<!-- <download-excel
<download-excel
style="display:inline-block;"
:data="data"
:fields="excelColumns"
@ -41,7 +40,7 @@
<Button type="success">
导出待发货订单
</Button>
</download-excel> -->
</download-excel>
</div>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
<Row type="flex" justify="end" class="page">
@ -56,6 +55,7 @@
import * as API_Order from "@/api/order";
import { verificationCode } from "@/api/order";
import JsonExcel from "vue-json-excel";
import Cookies from "js-cookie";
export default {
name: "orderList",
components: {
@ -87,8 +87,6 @@ export default {
endTime: "",
billPrice: "",
},
//
formValidate: {},
submitLoading: false, //
columns: [
{
@ -195,9 +193,9 @@ export default {
excelColumns: { // excel
'编号': 'index',
'订单号': 'sn',
'收货人': 'memberName',
'收货人联系电话': 'memberName',
'收货地址': 'memberName',
'收货人': 'consigneeName',
'收货人联系电话': 'consigneeMobile',
'收货地址': 'consigneeAddress',
}
};
},
@ -274,21 +272,29 @@ export default {
},
//
async exportOrder () {
let userInfo = JSON.parse(Cookies.get("userInfo"));
console.log(userInfo);
const params = {
//
pageNumber: 1, //
pageSize: 10, //
sort: "", //
order: "", //
pageSize: 100, //
sort: "startDate", //
order: "desc", //
startDate: "", //
endDate: "", //
orderSn: "",
buyerName: "",
orderStatus: "UNDELIVERED",
tag: "WAIT_ROG",
orderType: "NORMAL",
storeId: userInfo.id
}
const res = await API_Order.getOrderList(params)
return res.result.records
const res = await API_Order.queryExportOrder(params)
for (let i=0; i<res.result.length; i++) {
res.result[i].index = i+1;
res.result[i].consigneeAddress =
res.result[i].consigneeAddressPath.replace(/,/g, "") + res.result[i].consigneeDetail
}
return res.result
},
//
detail(v) {