Просмотр исходного кода

发运明细-筛选条件必填调整/导出提示

jbb 2 лет назад
Родитель
Сommit
be5bf9f0e8
1 измененных файлов с 23 добавлено и 13 удалено
  1. 23 13
      src/views/shipment-details/shipmentList.vue

+ 23 - 13
src/views/shipment-details/shipmentList.vue

@@ -336,7 +336,8 @@ import {
   cancelSubmitShipment,
   pushShipment,
   rePushShipment,
-  exportXls
+  exportXls,
+  listExportXls
 } from '@api/document/shipmentList'
 
 export default {
@@ -575,6 +576,7 @@ export default {
 
       // 查询条件
       queryParam: {
+        flourOrGarment:'1'
       },
       selectedRowKeys:[],
       selectedRows:[],
@@ -593,7 +595,7 @@ export default {
   },
   created() {
     // this.getShipmentList() // 渲染 发运明细列表
-    this.defalutDate()
+    // this.defalutDate()
   },
   mounted(){
   },
@@ -791,14 +793,11 @@ export default {
 
     //明细导出
     async exportXlsShipment(fileName){
-      // if(!this.queryParam.flourOrGarment || this.queryParam.flourOrGarment == ''){
-      //     this.queryParam ={}
-      //     this.queryParam.id =  this.returnId
-      //     this.queryParam.flourOrGarment =this.returnFlourOrGarment
-      //   }
+      listExportXls(this.queryParam).then(res =>{
+        if(res.success==false){
+          this.$message.error(res.message)
+        }else{  
       downFile('/shippingDetails/syShippingDetails/exportXlsShipping',this.queryParam).then(data => {
-          // this.queryParam = {}
-          // this.defalutDate()
         if (!data) {
           this.$message.warning('文件下载失败')
           return
@@ -817,6 +816,8 @@ export default {
           window.URL.revokeObjectURL(url) // 释放掉blob对象
         }
       })
+    }
+     })
     },
 
     //  编辑
@@ -983,8 +984,15 @@ export default {
       this.toggleSearchStatus = false
       if(this.queryParam.flourOrGarment === '' || !this.queryParam.hasOwnProperty('flourOrGarment')){
        this.$message.error('请选择查询类型!');
-      }else if(this.queryParam.flourOrGarment == '1' && this.preDeliveryDate.length == 0){
-        this.$message.error('请选择预发货时间!');
+      }else if(this.queryParam.flourOrGarment == '1' && 
+      ((this.queryParam.itemNumber==''||!this.queryParam.itemNumber)&&
+      (this.queryParam.orderNumber==''||!this.queryParam.orderNumber)&&
+      (this.queryParam.salesman==''||!this.queryParam.salesman)&&
+      (this.queryParam.supplier==''||!this.queryParam.supplier)&&
+      (this.queryParam.customerAbbreviation==''||!this.queryParam.customerAbbreviation)&&
+      this.preDeliveryDate.length == 0
+      )){
+        this.$message.error('款号/订单号/预发货日期/业务员/供应商/客户均未选择!');
       }else{
          if(this.preDeliveryDate.length ==2){
             var separator = "-"; //日期分隔符  
@@ -1009,10 +1017,12 @@ export default {
     },
 
     searchReset() {
-      this.queryParam = {}
+      this.queryParam = {
+        flourOrGarment:'1'
+      }
       this.timeRange = []
       this.preDeliveryDate = []
-      this.defalutDate()
+      // this.defalutDate()
       this.selectedRows = []
       this.selectedRowKeys = []
       this.shipmentListData = [] // 渲染 发运明细列表