lilei 2 gadi atpakaļ
vecāks
revīzija
2549c7f44b

+ 1 - 1
pages/batchShelves/cartList.vue

@@ -97,7 +97,7 @@
 		},
 		onLoad(opts) {
 			this.layerList = 'A、B、C、D、E、F、G、H、I、J、K、L、M、N、O、P、Q、R、S、T、U、V、W、X、Y、Z'.split('、');
-			this.shelfSn = opts.shelfSn || '438473399995965440'
+			this.shelfSn = opts.shelfSn
 			this.pageInit()
 		},
 		methods: {

+ 5 - 9
pages/batchShelves/scanProduct.vue

@@ -67,7 +67,6 @@
 				confirmModal: false,
 				productInfo: null,
 				shelfPlaceCode: '',
-				shelfPlaceSn: '',
 				shelfCartSn: '',
 				curQty: '',
 				scleft: 0
@@ -124,14 +123,11 @@
 						 if(ret.shelfCartApi){
 							 this.curQty = ret.shelfCartApi.qty
 							 this.scleft = this.curQty * 30
-							 this.shelfPlaceSn = ret.shelfCartApi.shelfPlaceSn
 							 this.shelfCartSn = ret.shelfCartApi.shelfCartSn
-							 this.shelfPlaceCode = ret.shelfCartApi.shelfPlaceCode
 						 }else{
-							 this.shelfPlaceSn = ''
 							 this.curQty = ''
 							 this.scleft = 0
-							 this.shelfCartSn = ''
+							 this.shelfCartSn =''
 						 }
 						 setTimeout(()=>{
 							 this.barcode.start()
@@ -147,13 +143,13 @@
 				uni.showLoading({
 					title: '正在保存...'
 				})
-				const a = this.productInfo.shelfCartApi
+				const a = this.productInfo.shelfCartApi || this.productInfo.shelfProductApi
 				const params = {
 					shelfSn: this.shelfSn,
 					shelfName: this.shelfName,
-					shelfTierCode: a && a.shelfTierCode ? a.shelfTierCode : this.layer,
-					shelfPlaceSn: this.shelfPlaceSn,
-					shelfPlaceCode: this.shelfPlaceCode,
+					shelfTierCode: a ? a.shelfTierCode : this.layer,
+					shelfPlaceSn: a ? a.shelfPlaceSn : '',
+					shelfPlaceCode: a?a.shelfPlaceCode:this.shelfPlaceCode,
 					productSn: this.productInfo.productSn,
 					productCode: this.productInfo.code,
 					qty: nums,

+ 5 - 4
pages/batchShelves/searchProduct.vue

@@ -140,18 +140,19 @@
 				uni.showLoading({
 					title: '正在保存...'
 				})
+				const item = row.shelfCartApi || row.shelfProductApi
 				const params = {
 					shelfSn: this.shelfSn,
 					shelfName: this.shelfName,
-					shelfTierCode: row.shelfCartApi?row.shelfCartApi.shelfTierCode:this.layer,
-					shelfPlaceSn: row.shelfCartApi?row.shelfCartApi.shelfPlaceSn:'',
-					shelfPlaceCode: row.shelfCartApi?row.shelfCartApi.shelfPlaceCode:this.shelfPlaceCode,
+					shelfTierCode: item?item.shelfTierCode:this.layer,
+					shelfPlaceSn: item?item.shelfPlaceSn:'',
+					shelfPlaceCode: item?item.shelfPlaceCode:this.shelfPlaceCode,
 					productSn: row.productSn,
 					productCode: row.code,
 					qty: nums,
 					price: row.price,
 					cost: row.cost,
-					shelfCartSn: row.shelfCartApi?row.shelfCartApi.shelfCartSn:''
+					shelfCartSn: item?item.shelfCartSn:''
 				}
 				console.log(params)
 				shelfCartSave(params).then(res => {