Browse Source

报关要素

jbb 2 years ago
parent
commit
777078fa33

+ 1 - 1
src/views/shipment-details/declareElementsModal.vue

@@ -321,7 +321,7 @@ export default {
         syDeclarationElementsAdd(newObj).then(res => {
         if (res.success) {
           this.$message.success('新增成功')
-          this.$emit('table')
+          // this.$emit('table')
           this.close()
         }else {
           this.$message.error(res.message)

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

@@ -597,6 +597,8 @@ export default {
       selectedRows:[],
       timeRange:[],//起始时间
       preDeliveryDate:[],//预发货日期
+      returnId:'',//新增后返回的id筛选条件
+      returnFlourOrGarment:'',//新增后返回类型条件
       pagination: {
         // total: '',
         // current: 0,
@@ -658,9 +660,20 @@ export default {
           }
         })
     },
-
+    //关闭申报要素弹窗
      async closeDeclare(){
-        await this.getShipmentList()
+       //判断是否是新增的数据
+       if(!this.queryParam.flourOrGarment || this.queryParam.flourOrGarment == ''){
+          this.queryParam ={}
+          this.queryParam.id =  this.returnId
+          this.queryParam.flourOrGarment =this.returnFlourOrGarment
+          await this.getShipmentList()
+          this.queryParam = {}
+        this.defalutDate()
+        }else{
+          await this.getShipmentList()
+        }
+        
       // this.getShipmentList()
       var cc = []
       // for(var i= 0;i<this.shipmentListData)
@@ -1030,6 +1043,9 @@ export default {
       this.queryParam ={}
       this.queryParam.flourOrGarment = data
       this.queryParam.id = id
+      //其他地方使用
+      this.returnId = id
+      this.returnFlourOrGarment = data
       // this.timeRange = []
       // this.preDeliveryDate = []
       // this.shipmentListData = [] // 渲染 发运明细列表
@@ -1038,6 +1054,16 @@ export default {
       this.defalutDate()
     },
     async closeAddEdit(){
+      // if(!this.queryParam.flourOrGarment || this.queryParam.flourOrGarment == ''){
+      //     this.queryParam ={}
+      //     this.queryParam.id =  this.returnId
+      //     this.queryParam.flourOrGarment =this.returnFlourOrGarment
+      //     await this.getShipmentList()
+      //     this.queryParam = {}
+      //   this.defalutDate()
+      //   }else{
+      //     await this.getShipmentList()
+      //   }
       // this.queryParam.preDeliveryDateB='',
       // this.queryParam.preDeliveryDateE = ''
       await this.getShipmentList()