ソースを参照

1、优化产品

huangmp 2 年 前
コミット
f6d3a88ac7
1 ファイル変更24 行追加2 行削除
  1. 24 2
      src/views/modules/order/order.vue

+ 24 - 2
src/views/modules/order/order.vue

@@ -377,6 +377,9 @@
         <el-button style="margin-left: 20px" size="small" type="primary" @click="openPromotionDialog">
           推广数据
         </el-button>
+        <el-button style="margin-left: 20px" size="small" type="primary" :loading="exportDeliveryLoading" @click="handleExportDelivery">
+          导出发货信息
+        </el-button>
         <!-- 列标题 -->
         <div :class="['tit', showHeadScroll ? 'fixed-top' : '']">
           <el-row style="width: 100%">
@@ -1041,6 +1044,8 @@ import OrderInfo from "./orderInfo";
 import TopTask from '@/components/top-task';
 import InputNumberRange from '@/components/input-number-range';
 import OrderPromotion from './orderPromotion';
+import {} from "@/utils/excel";
+import {downloadXls} from "@/utils/excel";
 
 export default {
   data () {
@@ -1201,7 +1206,8 @@ export default {
       generatePrintPdfBatchVisible: false,
       orderCreateBatchVisible: false,
       printChannel: "KuaiYin",
-      orderCreateBatchLoading: false
+      orderCreateBatchLoading: false,
+      exportDeliveryLoading:false,
     }
   },
   components: {
@@ -1260,8 +1266,24 @@ export default {
 
   },
   methods: {
-    scanDelivey(order){
+    scanDelivery(order){
 
+    },
+    handleExportDelivery(){
+      this.exportDeliveryLoading = true;
+      this.$http({
+        url: this.$http.adornUrl('/order/order/exportDeliveryInfo'),
+        method: 'GET',
+        params: this.$http.adornParams({startTime: this.dateRange[0], endTime: this.dateRange[1]}),
+        responseType: 'blob'
+      }).then(({data}) => {
+        this.exportDeliveryLoading = false;
+        let fileName = "微信发货订单信息";
+        downloadXls(data, fileName + ".xlsx");
+      }).catch((error) => {
+        this.exportDeliveryLoading = false;
+        this.$message.error(error)
+      })
     },
     openGeneratePrintPdfBatchDialog(){
       this.generatePrintPdfBatchVisible = true;