ccjgmwz 3 år sedan
förälder
incheckning
9a32242751

+ 10 - 2
pages/erpbusiness/add_quality_testing.vue

@@ -256,11 +256,19 @@
 			 number = number.substring(number.length - 4, number.length)
 			this.gridList.warehouseName=options.warehouseName
 			this.gridList.qualityNo='SGRK' + this.getdate() + this.commonWarehouseNo + number
-			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
 			this.cangid=options.cangid
+			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName',{
+				warehouseId:this.cangid
+			}).then(res => {
+				if(res.data.data){
+					uni.setStorageSync('purchasePriceList',res.data.data)
+					this.purchasePriceList=uni.getStorageSync('purchasePriceList')
+				}
+			})
 			this.managementType=options.managementType
 		},
 		onShow() {
+			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
 			if(uni.getStorageSync('checkcustomer')){
 				this.gridList.customerName=uni.getStorageSync('checkcustomer').customerName
 				this.gridList.customerPhone=uni.getStorageSync('checkcustomer').customerPhone
@@ -336,7 +344,7 @@
 			},
 			gocustomer(){
 				uni.navigateTo({
-					url:'/pages/erpbusiness/customer'
+					url:'/pages/erpbusiness/customer?cangid='+this.cangid
 				})
 			},
 			getdate() {

+ 10 - 4
pages/erpbusiness/customer.vue

@@ -84,9 +84,6 @@
 				cangid:''
 				
 			}
-		},
-		onLoad() {
-			
 		},
 		// #ifndef MP
 		onNavigationBarButtonTap(e) {
@@ -119,9 +116,18 @@
 			}
 		},
 		onLoad(options){
-			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
+			this.cangid = options.cangid
+			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName',{
+				warehouseId:this.cangid
+			}).then(res => {
+				if(res.data.data){
+					uni.setStorageSync('purchasePriceList',res.data.data)
+					this.purchasePriceList=uni.getStorageSync('purchasePriceList')
+				}
+			})
 		},
 		onShow() {
+			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
 			this.gridList=[]
 			this.$api.doRequest('get', '/searchRecordsInfo/selectSearchRecordsInfo',{
 				pageSize:this.pageSize,

+ 3 - 3
pages/erpbusiness/quality_testing.vue

@@ -212,7 +212,7 @@
 						  that.warehouseName = list[i].warehouseName
 						  that.warehouseCount =  list[i].count
 						  that.commonWarehouseNo =  list[i].commonWarehouseNo
-						  uni.setStorageSync('purchasePriceList',list[i].purchasePriceList)
+						  // uni.setStorageSync('purchasePriceList',list[i].purchasePriceList)
 						  break
 						} 
 					}
@@ -222,7 +222,7 @@
 						that.warehouseCount =  that.selector[0].count
 						that.commonWarehouseNo =  that.selector[0].commonWarehouseNo
 						that.cangid =  that.selector[0].id
-						uni.setStorageSync('purchasePriceList',that.selector[0].purchasePriceList)
+						// uni.setStorageSync('purchasePriceList',that.selector[0].purchasePriceList)
 					}
 					this.getList(true)
 				}
@@ -256,7 +256,7 @@
 				uni.setStorageSync("cangid",this.cangid)
 				this.warehouseCount = this.selector[e[0]].count
 				this.commonWarehouseNo=this.selector[e[0]].commonWarehouseNo
-				uni.setStorageSync('purchasePriceList',this.selector[e[0]].purchasePriceList)
+				// uni.setStorageSync('purchasePriceList',this.selector[e[0]].purchasePriceList)
 				this.getList(true)
 				console.log(e)
 			},