Browse Source

装箱单成衣-列表导出

jbb 2 năm trước cách đây
mục cha
commit
7c3f8e74cd
1 tập tin đã thay đổi với 17 bổ sung1 xóa
  1. 17 1
      src/views/packing-list/clothes-list.vue

+ 17 - 1
src/views/packing-list/clothes-list.vue

@@ -742,7 +742,23 @@ export default {
 
     // 列表导出
     handleExportXls(fileName) {
-      downFile('/splt/syPackingListTailoring/exportXls',this.queryParam).then(data => {
+      var obj ={}
+      if(this.selectedRowKeys.length == this.pagination.pageSize || this.selectedRowKeys.length==this.clothesListData.length){
+          obj=this.queryParam
+          obj.selectAll = '1'
+      }else{
+        var arr =[]
+        this.clothesListData.map(item=>{
+          this.selectedRowKeys.map(e=>{
+            if(item.id == e){
+              arr.push(item.id)
+            }
+          })
+        })
+        obj.ids = arr.toString()
+        obj.selectAll = '2'
+      }
+      downFile('/splt/syPackingListTailoring/exportXls',obj).then(data => {
         if (!data) {
           this.$message.warning('文件下载失败')
           return