Browse Source

修改bug

QuKatie 3 years ago
parent
commit
718d514269

+ 8 - 0
src/api/kaihe/domesticTrade/myOrder.js

@@ -113,6 +113,14 @@ export function exportInventory(query) {
     params: query
     params: query
   })
   })
 }
 }
+// 导出明细
+export function exportItem(query) {
+  return request({
+    url: '/khwarehouse/updateOrderMessage/exportDetails',
+    method: 'get',
+    params: query
+  })
+}
 // 取消配船
 // 取消配船
 export function cancelAllocation(data) {
 export function cancelAllocation(data) {
   return request({
   return request({

+ 35 - 6
src/views/kaihe/domesticTrade/myOrder/index.vue

@@ -244,6 +244,13 @@
         >
         >
         <el-button
         <el-button
           type="primary"
           type="primary"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExportItem"
+          >导出明细</el-button
+        >
+        <el-button
+          type="primary"
           plain
           plain
           icon="el-icon-search"
           icon="el-icon-search"
           size="mini"
           size="mini"
@@ -500,6 +507,7 @@ import {
   exportInventory,
   exportInventory,
   cancelAllocation,
   cancelAllocation,
   confirmAllocation,
   confirmAllocation,
+  exportItem
 } from "@/api/kaihe/domesticTrade/myOrder";
 } from "@/api/kaihe/domesticTrade/myOrder";
 import Cookies from "js-cookie";
 import Cookies from "js-cookie";
 import { addSet, resetModule, select } from "@/api/system/set";
 import { addSet, resetModule, select } from "@/api/system/set";
@@ -590,9 +598,16 @@ export default {
         {
         {
           surface: "2",
           surface: "2",
           label: "fServiceitems",
           label: "fServiceitems",
-          name: "运输条款",
+          name: "起运港运输条款",
           checked: 0,
           checked: 0,
-          width: 120,
+          width: 140,
+        },
+        {
+          surface: "3",
+          label: "fDestportMode",
+          name: "目的港运输条款",
+          checked: 0,
+          width: 140,
         },
         },
         {
         {
           surface: "3",
           surface: "3",
@@ -1034,6 +1049,20 @@ export default {
           this.download(response.msg);
           this.download(response.msg);
         });
         });
     },
     },
+    handleExportItem(){
+      const queryParams = this.queryParams;
+      this.$confirm("是否选择船名航次?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return exportItem(queryParams);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
     /** 搜索按钮操作 */
     /** 搜索按钮操作 */
     handleQuery() {
     handleQuery() {
       this.queryParams.pageNum = 1;
       this.queryParams.pageNum = 1;
@@ -1074,14 +1103,14 @@ export default {
           let num1 = 0;
           let num1 = 0;
           let num2 = 0;
           let num2 = 0;
           data.forEach((e) => {
           data.forEach((e) => {
-            num1+=e.fCntrcount;
-            num2+=e.loadCntr;
+            num1 += e.fCntrcount;
+            num2 += e.loadCntr;
           });
           });
           if (item.property == "fCntrcount") {
           if (item.property == "fCntrcount") {
-            sums[index] = num1 ? num1: "0";
+            sums[index] = num1 ? num1 : "0";
           }
           }
           if (item.property == "loadCntr") {
           if (item.property == "loadCntr") {
-            sums[index] = num2 ? num2: "0";
+            sums[index] = num2 ? num2 : "0";
           }
           }
         }
         }
       });
       });