zhangdan %!s(int64=3) %!d(string=hai) anos
pai
achega
31cc963673

+ 22 - 15
src/views/numsGoodsShelves/goodsShelvesAdministration/addGoodsShelve.vue

@@ -214,23 +214,30 @@ export default {
         this.$refs.ruleForm.resetFields()
         this.$refs.ruleForm.resetFields()
         this.titleText = '新增数字货架'
         this.titleText = '新增数字货架'
         this.$emit('close')
         this.$emit('close')
-      }
-    },
-    nowData: {
-      handler (newValue, oldValue) {
-        if (this.isshow && newValue) {
-          if (this.nowData.id) { //  编辑
-            this.titleText = '编辑数字货架'
-            this.getShelfDetail()
-          } else {
-            this.$refs.storeList.resetForm()
-            this.$refs.dealerList.resetForm()
-            this.titleText = '新增数字货架'
-          }
+      } else {
+        if (this.nowData && this.nowData.id) { //  编辑
+          console.log(this.nowData.id, 'this.nowData.id')
+          this.titleText = '编辑数字货架'
+          this.getShelfDetail()
         }
         }
-      },
-      deep: true
+      }
     }
     }
+    // nowData: {
+    //   handler (newValue, oldValue) {
+    //     if (this.isshow && newValue) {
+    //       // if (this.nowData.id) { //  编辑
+    //       //   console.log(this.nowData.id, 'this.nowData.id')
+    //       //   this.titleText = '编辑数字货架'
+    //       //   this.getShelfDetail()
+    //       // } else {
+    //       //   // this.$refs.storeList.resetForm()
+    //       //   // this.$refs.dealerList.resetForm()
+    //       //   this.titleText = '新增数字货架'
+    //       // }
+    //     }
+    //   },
+    //   deep: true
+    // }
   }
   }
 }
 }
 </script>
 </script>

+ 30 - 15
src/views/numsGoodsShelves/goodsShelvesAdministration/addHWModal.vue

@@ -46,10 +46,16 @@ export default {
       type: [String, Number],
       type: [String, Number],
       default: ''
       default: ''
     },
     },
-    shelfPlaceSn: {
-      type: [String, Number],
-      default: ''
+    nowData: {
+      type: Object,
+      default: function () {
+        return {}
+      }
     }
     }
+    // shelfPlaceSn: {
+    //   type: [String, Number],
+    //   default: ''
+    // }
   },
   },
 
 
   data () {
   data () {
@@ -79,7 +85,7 @@ export default {
     // 查询货位详情
     // 查询货位详情
     getShelfHWDetail () {
     getShelfHWDetail () {
       this.spinning = true
       this.spinning = true
-      shelfHWDetail({ shelfPlaceSn: this.shelfPlaceSn }).then(res => {
+      shelfHWDetail({ shelfPlaceSn: this.nowData.shelfPlaceSn }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.form = Object.assign({}, res.data)
           this.form = Object.assign({}, res.data)
         }
         }
@@ -121,23 +127,32 @@ export default {
     },
     },
     isshow (newValue, oldValue) {
     isshow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
+        console.log(!newValue, newValue)
         this.$refs.ruleForm.resetFields()
         this.$refs.ruleForm.resetFields()
         this.form = {}
         this.form = {}
         this.textTitle = '新增货位'
         this.textTitle = '新增货位'
         this.$emit('close')
         this.$emit('close')
-      }
-    },
-    shelfPlaceSn: {
-      handler (newValue, oldValue) {
-        if (this.isshow && newValue) {
-          if (this.shelfPlaceSn) { //  编辑
-            this.textTitle = '编辑货位'
-            this.getShelfHWDetail()
-          }
+      } else {
+        if (this.nowData && this.nowData.id) { //  编辑
+          console.log(this.shelfPlaceSn, 'this.shelfPlaceSn')
+          this.textTitle = '编辑货位'
+          this.getShelfHWDetail()
         }
         }
-      },
-      deep: true
+      }
     }
     }
+    // nowData: {
+    //   handler (newValue, oldValue) {
+    //     if (this.isshow && newValue) {
+    //       console.log(this.isshow, newValue, 'newValue')
+    //       if (this.nowData.id) { //  编辑
+    //         console.log(this.shelfPlaceSn, 'this.shelfPlaceSn')
+    //         this.textTitle = '编辑货位'
+    //         // this.getShelfHWDetail()
+    //       }
+    //     }
+    //   },
+    //   deep: true
+    // }
   }
   }
 }
 }
 </script>
 </script>

+ 4 - 3
src/views/numsGoodsShelves/goodsShelvesAdministration/goodsAllocationSet.vue

@@ -50,7 +50,7 @@
       <!-- 导入货位模板 -->
       <!-- 导入货位模板 -->
       <importHuoweiModal :openModal="openModal" @close="openModal=false" @refresh="getHwList" :shelfSn="shelfSn" @ok="handleOk"></importHuoweiModal>
       <importHuoweiModal :openModal="openModal" @close="openModal=false" @refresh="getHwList" :shelfSn="shelfSn" @ok="handleOk"></importHuoweiModal>
       <!-- 新增货位 -->
       <!-- 新增货位 -->
-      <addHWModal :openHWModal="openHWModal" @refresh="getHwList" :shelfSn="shelfSn" :shelfPlaceSn="shelfPlaceSn" @close="openHWModal=false"></addHWModal>
+      <addHWModal :openHWModal="openHWModal" @refresh="getHwList" :shelfSn="shelfSn" :nowData="itemData" @close="openHWModal=false"></addHWModal>
     </a-spin>
     </a-spin>
   </div>
   </div>
 </template>
 </template>
@@ -73,7 +73,6 @@ export default {
       pageInfo: null,
       pageInfo: null,
       itemData: null,
       itemData: null,
       shelfSn: '', // 货架sn
       shelfSn: '', // 货架sn
-      shelfPlaceSn: '', // 当前行huoweisn
       // 表头
       // 表头
       columns: [{
       columns: [{
         title: '序号',
         title: '序号',
@@ -201,6 +200,7 @@ export default {
       if (type == 0) {
       if (type == 0) {
         this.openModal = true
         this.openModal = true
       } else {
       } else {
+        this.itemData=null
         this.openHWModal = true
         this.openHWModal = true
       }
       }
     },
     },
@@ -237,8 +237,9 @@ export default {
     },
     },
     // 编辑
     // 编辑
     handleEdit (row) {
     handleEdit (row) {
-      this.shelfPlaceSn = row.shelfPlaceSn
+      // this.shelfPlaceSn = row.shelfPlaceSn
       this.shelfSn = row.shelfSn
       this.shelfSn = row.shelfSn
+      this.itemData=row
       this.openHWModal = true
       this.openHWModal = true
     },
     },
     // 货架详情
     // 货架详情

+ 9 - 2
src/views/numsGoodsShelves/goodsShelvesAdministration/list.vue

@@ -207,7 +207,7 @@ export default {
   },
   },
   mounted () {
   mounted () {
     this.pageInit()
     this.pageInit()
-    // this.reset()
+    this.reset()
     // if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
     // if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
     //   this.pageInit()
     //   this.pageInit()
     //   this.reset()
     //   this.reset()
@@ -215,8 +215,15 @@ export default {
   },
   },
   beforeRouteEnter (to, from, next) {
   beforeRouteEnter (to, from, next) {
     next(vm => {
     next(vm => {
-      vm.$refs.table.refresh()
+      if (from.name == 'goodsAllocationSet' || from.name == 'settlementSet') {
+        vm.$refs.table.refresh()
+      } else {
+        vm.reset()
+      }
     })
     })
+    // next(vm => {
+    //   vm.$refs.table.refresh()
+    // })
   }
   }
   // activated () {
   // activated () {
   //   // 如果是新页签打开,则重置当前页面
   //   // 如果是新页签打开,则重置当前页面

+ 1 - 1
src/views/numsGoodsShelves/goodsShelvesAdministration/settlementModifyModal.vue

@@ -25,7 +25,7 @@
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :span="20">
             <a-col :span="20">
-              <a-form-model-item label="结算方式" prop="settleType">
+              <a-form-model-item label="结算方式" prop="settleType">
                 <a-select
                 <a-select
                   style="background-color: none;"
                   style="background-color: none;"
                   placeholder="请选择结算方式"
                   placeholder="请选择结算方式"

+ 1 - 0
src/views/numsGoodsShelves/goodsShelvesAdministration/settlementSet.vue

@@ -261,6 +261,7 @@ export default {
     },
     },
     changeSettleType (value, option) {
     changeSettleType (value, option) {
       this.form.settleType = value
       this.form.settleType = value
+      console.log(value, this.form.settleType, 'this.form.settleType')
     },
     },
     onChange (e) {
     onChange (e) {
       console.log(e.target.checked)
       console.log(e.target.checked)