浏览代码

发运明细导出

jbb 2 年之前
父节点
当前提交
49e75afc28
共有 1 个文件被更改,包括 17 次插入4 次删除
  1. 17 4
      src/views/shipment-details/shipmentList.vue

+ 17 - 4
src/views/shipment-details/shipmentList.vue

@@ -689,7 +689,7 @@ export default {
       }
     },
 
-    //判断是否是新增的数据
+    //判断是否是新增的数据-刷新数据
    async judageAdd(){
        if(!this.queryParam.flourOrGarment || this.queryParam.flourOrGarment == ''){
           this.queryParam ={}
@@ -697,7 +697,7 @@ export default {
           this.queryParam.flourOrGarment =this.returnFlourOrGarment
           await this.getShipmentList()
           this.queryParam = {}
-        this.defalutDate()
+          this.defalutDate()
         }else{
           await this.getShipmentList()
         }
@@ -706,12 +706,18 @@ export default {
 
     // 导出
     handleExportXls(fileName) {
-  
+       if(!this.queryParam.flourOrGarment || this.queryParam.flourOrGarment == ''){
+          this.queryParam ={}
+          this.queryParam.id =  this.returnId
+          this.queryParam.flourOrGarment =this.returnFlourOrGarment
+        }
       exportXls(this.queryParam).then(res =>{
         if(res.success==false){
           this.$message.error(res.message)
         }else{
           downFile('/shippingDetails/syShippingDetails/exportXls',this.queryParam).then(data => {
+            this.queryParam = {}
+            this.defalutDate()
             if (!data) {
               this.$message.warning('文件下载失败')
               return
@@ -737,8 +743,15 @@ export default {
     },
 
     //明细导出
-    exportXlsShipment(fileName){
+    async exportXlsShipment(fileName){
+      if(!this.queryParam.flourOrGarment || this.queryParam.flourOrGarment == ''){
+          this.queryParam ={}
+          this.queryParam.id =  this.returnId
+          this.queryParam.flourOrGarment =this.returnFlourOrGarment
+        }
       downFile('/shippingDetails/syShippingDetails/exportXlsShipping',this.queryParam).then(data => {
+          this.queryParam = {}
+          this.defalutDate()
         if (!data) {
           this.$message.warning('文件下载失败')
           return