Sfoglia il codice sorgente

扫码装箱、pdf运单批量打印、添加运单选择保温箱

qianduan 3 mesi fa
parent
commit
5e36cb3c42
2 ha cambiato i file con 12 aggiunte e 5 eliminazioni
  1. 6 0
      src/components/tables.vue
  2. 6 5
      src/views/system/WaybillManagement.vue

+ 6 - 0
src/components/tables.vue

@@ -248,6 +248,12 @@
             } else {
               return true
             }
+          } else if (type == 'print') {
+            if (row.status == 2 || row.status == 3 || row.status == 9) {
+              return false
+            } else {
+              return true
+            }
           }
         }
       },

+ 6 - 5
src/views/system/WaybillManagement.vue

@@ -881,12 +881,11 @@
           if (arrID.length != 0) {
             let arr3 = []
             arrID.forEach(item => {
-              if (item.status == 8) {
+              if (item.status == 2 || item.status == 3 || item.status == 9) {
                 arr3.push(item.waybillNo)
               }
             })
             this.printData = arr3
-            console.log(arr3,365)
             if (arr3.length > 0) {
               this.printWaybillVisible = true
             } else {
@@ -932,9 +931,11 @@
       templateDownload() {
         this.downloadFlag = true
         exportTemplate().then(response => {
-          let filename = '运单模板'
+          let arrList = response.fileName.split('.')
+          let fixedStr = decodeURIComponent(arrList[0]);
+          let filename = fixedStr + '.' + arrList[1]
           // this.blobDownload(response, filename)
-          this.blobDownload(response.data, response.fileName)
+          this.blobDownload(response.data, filename)
           this.downloadFlag = false
         })
       },
@@ -1013,7 +1014,7 @@
         var downloadUrl = window.URL.createObjectURL(data);
         var anchor = document.createElement("a");
         anchor.href = downloadUrl;
-        anchor.download = name + ".xls";
+        anchor.download = name;
         anchor.click();
         window.URL.revokeObjectURL(data);
       },