Prechádzať zdrojové kódy

发运明细-成衣/面辅料导出

jbb 2 rokov pred
rodič
commit
719640727c
1 zmenil súbory, kde vykonal 24 pridanie a 7 odobranie
  1. 24 7
      src/views/shipment-details/shipmentList.vue

+ 24 - 7
src/views/shipment-details/shipmentList.vue

@@ -755,16 +755,33 @@ 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(!this.queryParam.flourOrGarment || this.queryParam.flourOrGarment == ''){
+          this.queryParam ={}
+          this.queryParam.id =  this.returnId
+          this.queryParam.flourOrGarment =this.returnFlourOrGarment
+        }
+      var obj ={}
+      if(this.selectedRowKeys.length==this.shipmentListData.length){
+        obj = this.queryParam
+        obj.selectAll = '1'
+      }else{
+        var grouyIdList=[]
+        this.shipmentListData.map(item=>{
+          this.selectedRowKeys.map(e=>{
+            if(item.itemIds == e){
+              grouyIdList.push(item.groupId)
+            }
+          })
+        })
+        obj.groupidList = grouyIdList.toString()
+        obj.selectAll = '0'
+        obj.flourOrGarment =this.queryParam.flourOrGarment
+      }
+      exportXls(obj).then(res =>{
         if(res.success==false){
           this.$message.error(res.message)
         }else{
-          downFile('/shippingDetails/syShippingDetails/exportXls',this.queryParam).then(data => {
+          downFile('/shippingDetails/syShippingDetails/exportXls',obj).then(data => {
             // this.queryParam = {}
             // this.defalutDate()
             if (!data) {