From 289e204f67b8ae0144772707e028a4aa82f2002a Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 14 十二月 2022 17:00:41 +0800
Subject: [PATCH] #
---
pages/business/cstmr/addCsmtr.vue | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/pages/business/cstmr/addCsmtr.vue b/pages/business/cstmr/addCsmtr.vue
index 1ec9ad0..37ba440 100644
--- a/pages/business/cstmr/addCsmtr.vue
+++ b/pages/business/cstmr/addCsmtr.vue
@@ -9,7 +9,7 @@
<uni-easyinput v-model="baseFormData.rela" placeholder="璇疯緭鍏ュ鎴峰叧绯�" />
</uni-forms-item>
<uni-forms-item label="瀹㈡埛绫诲埆" required name="cstmrType">
- <uni-combox :candidates="cstmrTypes" placeholder="璇烽�夋嫨瀹㈡埛绫诲埆" v-model="cstmrType" @input="autoLoad(cstmrType)"></uni-combox>
+ <uni-combox :candidates="cstmrTypes" placeholder="璇烽�夋嫨瀹㈡埛绫诲埆" v-model="cstmrType" @input="autoLoad('cstmrType',cstmrTypeQuery)"></uni-combox>
<!-- <uni-easyinput v-model="baseFormData.cstmrType" placeholder="璇疯緭鍏ュ鎴风被鍒�" /> -->
</uni-forms-item>
<uni-forms-item label="鍖哄垎" required name="type">
@@ -125,11 +125,13 @@
// 鑾峰彇鐪佸競鍖�
this.citysData = test.citysData
this.baseUrl = uni.getStorageSync('baseUrl')
- this.getCstmrType()
- this.getUser()
+ this.autoLoad('cstmrType',cstmrType)
+ this.autoLoad('contacts',user)
+ // this.getCstmrType()
+ // this.getUser()
},
methods: {
- autoLoad(condition) {
+ autoLoad(type,condition) {
let that = this
uni.request({
url: that.baseUrl + '/' + condition +'/auth',
@@ -140,7 +142,15 @@
if (res.code === 200) {
var element;
for(element of res.data) {
- that.cstmrTypes.push(element.value)
+ if (type == cstmrType) {
+ that.cstmrTypes.push(element.value)
+ return
+ }
+ if (type == contacts) {
+ that.contacts.push(element.value)
+ return
+ }
+
}
}
}
--
Gitblit v1.9.1