chenrui 2 лет назад
Родитель
Сommit
52235fe5fd
2 измененных файлов с 9 добавлено и 5 удалено
  1. 2 2
      src/config/router.config.js
  2. 7 3
      src/views/salesReturnManagement/billOfLading/add.vue

+ 2 - 2
src/config/router.config.js

@@ -630,7 +630,7 @@ export const asyncRouterMap = [
                 }
                 }
               },
               },
               {
               {
-                path: 'edit/:sn',
+                path: 'edit/:sn/:wSn',
                 name: 'billOfLadingEdit',
                 name: 'billOfLadingEdit',
                 component: () => import(/* webpackChunkName: "salesReturnManagement" */ '@/views/salesReturnManagement/billOfLading/add.vue'),
                 component: () => import(/* webpackChunkName: "salesReturnManagement" */ '@/views/salesReturnManagement/billOfLading/add.vue'),
                 meta: {
                 meta: {
@@ -740,7 +740,7 @@ export const asyncRouterMap = [
                 }
                 }
               }
               }
             ]
             ]
-          },
+          }
         ]
         ]
       },
       },
       // 采购管理
       // 采购管理

+ 7 - 3
src/views/salesReturnManagement/billOfLading/add.vue

@@ -111,7 +111,7 @@
             </a-col>
             </a-col>
             <a-col :spna="24">
             <a-col :spna="24">
               <a-form-model-item label="退货仓库" :label-col="{span:2}" :wrapper-col="{span:20}" prop="warehouseSn">
               <a-form-model-item label="退货仓库" :label-col="{span:2}" :wrapper-col="{span:20}" prop="warehouseSn">
-                <chooseWarehouse ref="warehouse" :disabled="$route.params.sn" v-model="form.warehouseSn" @change="handleWarehouse"></chooseWarehouse>
+                <chooseWarehouse ref="warehouse" v-model="form.warehouseSn" @change="handleWarehouse"></chooseWarehouse>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :spna="24">
             <a-col :spna="24">
@@ -270,7 +270,7 @@ export default {
     // 选择退货仓库
     // 选择退货仓库
     handleWarehouse (val) {
     handleWarehouse (val) {
       this.form.warehouseSn = val
       this.form.warehouseSn = val
-      if (val) {
+      if (val && this.$route.query.path && this.$route.query.path == 'salerReturn') {
         this.chooseData = []
         this.chooseData = []
         if (this.salerReturnWsn && this.salerReturnWsn == val) {
         if (this.salerReturnWsn && this.salerReturnWsn == val) {
           const cd = this.$store.state.app.tempBillOfData
           const cd = this.$store.state.app.tempBillOfData
@@ -298,7 +298,7 @@ export default {
     },
     },
     // 关联销售退货单
     // 关联销售退货单
     getReturnOrderList (infoSn) {
     getReturnOrderList (infoSn) {
-      pickUpDetailQueryList({ pickUpSn: this.$route.params.sn }).then(res => {
+      pickUpDetailQueryList({ pickUpSn: this.$route.params.sn, warehouseSn: infoSn }).then(res => {
         this.chooseData = []
         this.chooseData = []
         res.data.map(item => {
         res.data.map(item => {
           this.chooseData.push(item.salesReturnBillEntity)
           this.chooseData.push(item.salesReturnBillEntity)
@@ -355,6 +355,9 @@ export default {
           form.attachmentList = _this.attachList
           form.attachmentList = _this.attachList
           form.pickUpSalesReturnList = this.getRtSnList()
           form.pickUpSalesReturnList = this.getRtSnList()
           _this.spinning = true
           _this.spinning = true
+          if (this.$route.params.sn) {
+            delete form.warehouseName
+          }
           pickUpSave(form).then(res => {
           pickUpSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               // 保存
               // 保存
@@ -430,6 +433,7 @@ export default {
       if (this.$route.params.sn) {
       if (this.$route.params.sn) {
         this.form.theme = ''
         this.form.theme = ''
         this.getDetail()
         this.getDetail()
+        this.salerReturnWsn = this.$route.params.wSn
         this.getReturnOrderList(this.$route.params.wSn)
         this.getReturnOrderList(this.$route.params.wSn)
       } else {
       } else {
         this.chooseData = []
         this.chooseData = []