From 7e807f771796a68e799826ae4a5598ddb2eec0d8 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 11 三月 2024 15:55:11 +0800
Subject: [PATCH] 质检:附件上传

---
 src/views/plan/customerorder/index.vue |   63 ++++++++++++++++++++++---------
 1 files changed, 44 insertions(+), 19 deletions(-)

diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index 3ae8486..4ba8c0f 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -384,7 +384,8 @@
   exportCustomerOrderSplit,
   syncOrder,
   dropByContractNo,
-  downloadWordFile,
+  downloadProduct,
+  downloadWordFile
 } from '../../../api/plan/customerorder'
 import DocumentTable from '@/views/common/document.vue'
 import { remote } from '@/api/admin/dict'
@@ -585,7 +586,7 @@
             sort: true,
             isTrue: true,
             isSearch: true,
-            searchInfoType: 'text',
+            searchInfoType: 'date',
             formatter: this.formatDutyDate,
           },
           {
@@ -1035,13 +1036,24 @@
         permitArr: [],
       })
     }
-    this.table.toolbar.push({
-      text: '涓嬭浇Word',
-      disabled: false,
-      type: 'primary',
-      fun: this.downloadWord,
-      permitArr: ['03plan', '04planed'],
-    })
+    if(this.permissions.plan_download_process_file){
+        this.table.toolbar.push({
+            text: '涓嬭浇宸ヨ壓鏂囦欢',
+            disabled: false,
+            type: 'primary',
+            fun: this.downloadWord,
+            permitArr: ['03plan','04planed'],
+        })
+    }
+    if(this.permissions.plan_download_product_file){
+        this.table.toolbar.push({
+            text: '涓嬭浇鎺掍骇鍗�',
+            disabled: false,
+            type: 'primary',
+            permitArr: [],
+            fun: this.downloadProductionScheduling,
+        })
+    }
     this.table.toolbar.push({
       text: '鍏宠仈璁㈠崟',
       disabled: false,
@@ -1115,16 +1127,29 @@
       this.interrelatedOrderId = currentOrder.id
       this.showInterrelatedOrderDialog = true
     },
-
-    //涓嬭浇word
-    downloadWord() {
-      let ids = this.multipleSelection.map((ele) => ele.id)
-      if (ids.length < 1) {
-        this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�')
-        return
-      }
-      downloadWordFile(ids)
-        .then((response) => {
+    //涓嬭浇鎺掍骇閫氱煡鍗�
+    downloadProductionScheduling(){
+        let ids = this.multipleSelection.map(obj => obj.id)
+        if(ids.length<1){
+            this.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�")
+            return
+        }
+        downloadProduct(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){
+            this.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�")
+            return
+        }
+        downloadWordFile(ids).then(response=>{
           // 澶勭悊杩斿洖鐨勬枃浠舵祦
           const blob = response.data
           const link = document.createElement('a')

--
Gitblit v1.9.3