ソースを参照

出运明细-列表导出-全选

jbb 2 年 前
コミット
077ed7e0b4
1 ファイル変更18 行追加2 行削除
  1. 18 2
      src/views/shipment-details/shipmentList.vue

+ 18 - 2
src/views/shipment-details/shipmentList.vue

@@ -793,11 +793,27 @@ export default {
 
     //明细导出
     async exportXlsShipment(fileName){
-      listExportXls(this.queryParam).then(res =>{
+      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'
+      }
+      listExportXls(obj).then(res =>{
         if(res.success==false){
           this.$message.error(res.message)
         }else{  
-      downFile('/shippingDetails/syShippingDetails/exportXlsShipping',this.queryParam).then(data => {
+      downFile('/shippingDetails/syShippingDetails/exportXlsShipping',obj).then(data => {
         if (!data) {
           this.$message.warning('文件下载失败')
           return