From aa8684dfcf2ddbbadbd045770ff540e64c26bbee Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 06 三月 2024 17:53:45 +0800
Subject: [PATCH] 销售订单-下载排产单

---
 src/views/plan/customerorder/index.vue |   28 +++++++++++++++++++++++++---
 1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index 1e5ebda..6cad8e6 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -299,6 +299,7 @@
   exportCustomerOrderSplit,
   syncOrder,
   dropByContractNo,
+  downloadProduct,
   downloadWordFile
 } from '../../../api/plan/customerorder'
 import DocumentTable from '@/views/common/document.vue'
@@ -920,11 +921,18 @@
       })
     }
     this.table.toolbar.push({
-        text: '涓嬭浇Word',
+        text: '涓嬭浇宸ヨ壓鏂囦欢',
         disabled: false,
         type: 'primary',
         fun: this.downloadWord,
         permitArr: ['03plan','04planed'],
+    })
+    this.table.toolbar.push({
+        text: '涓嬭浇鎺掍骇鍗�',
+        disabled: false,
+        type: 'primary',
+        permitArr: [],
+        fun: this.downloadProductionScheduling,
     })
     this.table.toolbar.push({
         text: '鍏宠仈璁㈠崟',
@@ -993,8 +1001,22 @@
         this.interrelatedOrderId = currentOrder.id
         this.showInterrelatedOrderDialog = true
     },
-
-    //涓嬭浇word
+    //涓嬭浇鎺掍骇閫氱煡鍗�
+    downloadProductionScheduling(){
+        let ids = this.multipleSelection.map(obj => obj.id)
+        if(ids.length<1){
+            this.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�")
+            return
+        }
+        downloadProduct({ids: ids}).then(res=>{
+            if(res.status===200){
+                transform(res)
+            }
+        }).catch(error=>{
+            console.error(error)
+        })
+    },
+    //涓嬭浇宸ヨ壓鏂囦欢
     downloadWord(){
         let ids = this.multipleSelection.map(ele=>ele.id)
         if(ids.length<1){

--
Gitblit v1.9.3