Kaynağa Gözat

获取客户信息

shish 6 ay önce
ebeveyn
işleme
ad1c553a9e

+ 3 - 4
ghsPad/src/pages/home/cash.vue

@@ -132,10 +132,10 @@ export default {
 	},
 	watch: {
 		customId:{
-			handler(newValue) {
-				if(Number(newValue)>0){
+			handler(myCustomId) {
+				if(Number(myCustomId)>0){
 					//获取快捷开单的客户信息,用于获取跑腿的地址信息
-					this.getDefaultCustom(this.customId)
+					this.getDefaultCustom(myCustomId)
 				}
 			}
 		},
@@ -199,7 +199,6 @@ export default {
 		},
 		confirmCustom(info) {
 			this.$refs.myCustomRef.close()
-			this.custom = info //当前选中的客户
 			this.customId = Number(info.id)
 			this.customName = info.name
 			//要调用rightItemRef里的方法更新,不能这边直接请求product.js里方法更新,因为会造成扫码那块出问题,识别不到,关键词scan_right_item

+ 9 - 4
hdPad/src/pages/home/cash.vue

@@ -146,10 +146,16 @@ export default {
 				this.customId = newValue.defaultCustomId && newValue.defaultCustomId > 0 ? Number(newValue.defaultCustomId):0
 				this.customName = '快捷开单'
 				this.balance = 0
-				//获取快捷开单的客户信息,用于获取跑腿的地址信息
-				this.getDefaultCustomId(this.customId)
 			}
-		}
+		},
+		customId:{
+			handler(myCustomId) {
+				if(Number(myCustomId)>0){
+					//获取快捷开单的客户信息,用于获取跑腿的地址信息
+					this.getDefaultCustomId(myCustomId)
+				}
+			}
+		},
 	},
 	methods: {
 		fastCreate(){
@@ -193,7 +199,6 @@ export default {
 		},
 		confirmCustom(info){
 			this.$refs.myCustomRef.close()
-			this.custom = info //当前选中的客户
 			this.customId = Number(info.id)
 			this.customName = info.name
 			this.balance = Number(info.balance)>0 ? Number(info.balance) : 0