瀏覽代碼

出运明细新增

jbb 2 年之前
父節點
當前提交
9e03d052c7
共有 2 個文件被更改,包括 12 次插入9 次删除
  1. 1 2
      src/views/shipment-details/referOrderDataModal.vue
  2. 11 7
      src/views/shipment-details/shipmentList.vue

+ 1 - 2
src/views/shipment-details/referOrderDataModal.vue

@@ -677,8 +677,7 @@ export default {
 
     close() {
       this.referOrderDataModVis = false;
-      this.queryParam = {}
-      this.$emit('close')
+      this.$emit('close',this.queryParam.flourOrGarment)
       this.searchReset();
     },
     handleCancel() {

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

@@ -119,7 +119,7 @@
     <a-card :bordered="false" style=" marginTop:10px;">
       <div class="table-operator">
         <!-- <a-button type="primary" @click.stop="addShipDet" icon="plus">新增</a-button> -->
-        <a-button type="primary" @click.stop="referOrderDataOpen" icon="plus">参照订单数据</a-button>
+        <a-button type="primary" @click.stop="referOrderDataOpen" icon="plus" >参照订单数据</a-button>
         <a-button type="primary" icon="download" @click="handleExportXls('箱单数据')">箱单数据导出</a-button>
         <a-button type="primary" icon="download" @click="exportXlsShipment('明细')">明细导出</a-button>
         <a-button type="primary" icon="check" @click="submit">批量提交</a-button>
@@ -614,8 +614,7 @@ export default {
     // 分页查询 发运明细
     async getShipmentList() {
       this.loading = true
-      await  shipmentList(this.queryParam)
-         .then(res => {
+      await  shipmentList(this.queryParam).then(res => {
           if (res.success) {
            this.loading = false
            this.shipmentListData = res.result.records
@@ -627,8 +626,10 @@ export default {
               current: res.result.current,
               pageSize: res.result.size
             }
+          }else {
+             this.$message.error(res.message)
+             this.loading = false
           }
-          return  this.shipmentListData
         })
     },
 
@@ -968,12 +969,15 @@ export default {
     },
 
     //关闭新增弹窗
-    closeAdd(){
+    async closeAdd(data){
       this.queryParam ={}
+      this.queryParam.flourOrGarment = data
       this.timeRange = []
       this.preDeliveryDate = []
-      this.shipmentListData = [] // 渲染 发运明细列表
-      this.defalutDate()
+      // this.shipmentListData = [] // 渲染 发运明细列表
+     await this.getShipmentList()
+      // this.queryParam = {}
+      // this.defalutDate()
     }
   }
 }