lilei 2 سال پیش
والد
کامیت
6fb68084cd
3فایلهای تغییر یافته به همراه12 افزوده شده و 4 حذف شده
  1. 7 2
      pages/shelfSetting/editShelfHw.vue
  2. 1 0
      pages/shelfSetting/quickReplenish.vue
  3. 4 2
      pages/shelfSetting/shelfSet.vue

+ 7 - 2
pages/shelfSetting/editShelfHw.vue

@@ -25,6 +25,9 @@
 								<view class="pname">
 									{{productEntity.name}}
 								</view>
+								<view>
+									当前库存:{{productEntity.currQty}}
+								</view>
 							</view>
 						</view>
 					</u-form-item>
@@ -93,7 +96,7 @@
 			this.shelfSn = this.nowData.shelfSn
 			this.type = opts.type
 			this.shelfPlaceCode = this.nowData.shelfPlaceCode||''
-			
+			console.log(this.nowData)
 			// 选在产品
 			uni.$on('addProductToHw',function(data){
 				console.log(data)
@@ -155,10 +158,12 @@
 			getProductInfo () {
 			  shelfProductDetail({ shelfPlaceSn: this.nowData && this.nowData.shelfPlaceSn }).then(res => {
 			    if (res.status == 200 && res.data) {
+				  console.log(res.data)
 			      this.productEntity = {
 					  code: res.data.productCode,
 					  name: res.data.productName,
-					  productMsg: res.data.productImageUrl
+					  productMsg: res.data.productImageUrl,
+					  currQty: res.data.currQty
 				  }
 			      this.form.productSn = res.data.productSn
 				  this.bakProductSn = res.data.productSn

+ 1 - 0
pages/shelfSetting/quickReplenish.vue

@@ -82,6 +82,7 @@
 		},
 		onUnload() {
 			this.partList = []
+			this.$store.state.vuex_tempData = null
 			// 保持屏幕常亮
 			uni.setKeepScreenOn({
 				keepScreenOn: false

+ 4 - 2
pages/shelfSetting/shelfSet.vue

@@ -264,10 +264,11 @@
 				})
 			},
 			getShelfPlace(flag){
+				console.log(this.shelfSn)
 				getProductPlace({ shelfSn: this.shelfSn }).then(res => {
-				  if (res.status == 200) {
+				  console.log(res.data)
+				  if (res.status == 200 && res.data) {
 				    this.shelfPlaceList = res.data
-					console.log(res.data)
 					for(let a in res.data){
 						this.placeTab.push(a)
 					}
@@ -279,6 +280,7 @@
 					}
 				  } else {
 				    this.shelfPlaceList = null
+					this.placeTab = []
 				  }
 				})
 			},