From 3913b3c5c8cde03f8c92d1c738d28c4a9bae7e55 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 22 十一月 2023 08:48:02 +0800 Subject: [PATCH] # --- pages/business/plan/addPlan5.vue | 59 ++++++++++++++++++++++++++++------------------------------- 1 files changed, 28 insertions(+), 31 deletions(-) diff --git a/pages/business/plan/addPlan5.vue b/pages/business/plan/addPlan5.vue index 93c0268..40952cc 100644 --- a/pages/business/plan/addPlan5.vue +++ b/pages/business/plan/addPlan5.vue @@ -8,31 +8,17 @@ <uni-forms-item label="璺熻釜椤圭洰" required name="orderId" > <view @click="autoLoad('order','')"> <uni-combox :candidates="orderIds" placeholder="璇烽�夋嫨璺熻釜椤圭洰" - v-model="baseFormData.orderId" @input="autoLoad('order',baseFormData.orderId)"></uni-combox> + v-model="baseFormData.orderId$" @input="autoLoad('order',baseFormData.orderId$)"></uni-combox> </view> - </uni-forms-item> - <uni-forms-item label="涓氬姟鍛�" required name="userId"> - <view @click="autoLoad('user','')"> - <uni-combox :candidates="users" placeholder="璇烽�夋嫨涓氬姟鍛�" - v-model="baseFormData.userId" @input="autoLoad('user',baseFormData.userId)"></uni-combox> - </view> - </uni-forms-item> - - <uni-forms-item label="涓氬姟鍛樿仈绯绘柟寮�" required name="userXmlSelPhone"> - <uni-easyinput v-model="baseFormData.userXmlSelPhone" placeholder="璇疯緭鍏ヤ笟鍔″憳鑱旂郴鏂瑰紡" /> - </uni-forms-item> - <uni-forms-item label="鎵�闇�" name="planNeed"> - <uni-data-checkbox v-model="baseFormData.planNeed" multiple :localdata="planNeeds" /> - </uni-forms-item> - <uni-forms-item label="鐢宠鏃ユ湡" required name="appleTime"> - <uni-datetime-picker type="date" return-type="string" v-model="baseFormData.appleTime" /> - </uni-data-picker> </uni-forms-item> <uni-forms-item label="瀹㈡埛鍚嶇О" required name="cstmrId"> <view @click="autoLoad('cstmr','')"> <uni-combox :candidates="cstmrs" placeholder="璇烽�夋嫨瀹㈡埛鍚嶇О" - v-model="baseFormData.cstmrId" @input="autoLoad('cstmr',baseFormData.cstmrId)"></uni-combox> + v-model="baseFormData.cstmrId$" @input="autoLoad('cstmr',baseFormData.cstmrId$)"></uni-combox> </view> + </uni-forms-item> + <uni-forms-item label="涓氬姟鍛樿仈绯绘柟寮�" required name="userXmlSelPhone"> + <uni-easyinput v-model="baseFormData.userXmlSelPhone" placeholder="璇疯緭鍏ヤ笟鍔″憳鑱旂郴鏂瑰紡" /> </uni-forms-item> <uni-forms-item label="涓氬姟绫诲瀷" required name="planType"> <uni-easyinput disabled placeholder="璇疯緭鍏ヤ笟鍔$被鍨�" v-model="baseFormData.planType"></uni-easyinput> @@ -41,11 +27,10 @@ <uni-data-checkbox v-model="baseFormData.beItem" :localdata="beItem$" /> </uni-forms-item> - - - <uni-forms-item label="瑙勫垝鍛�" name="planner$"> - <uni-easyinput v-model="baseFormData.planner$" placeholder="璇疯緭鍏ヨ鍒掑憳" /> + <uni-forms-item label="鎵�闇�" name="planNeed"> + <uni-data-checkbox v-model="baseFormData.planNeed" multiple :localdata="planNeeds" /> </uni-forms-item> + <uni-forms-item label="鏇存敼鏂规" name="change"> <uni-data-checkbox v-model="baseFormData.change" :localdata="changeValue" /> </uni-forms-item> @@ -72,6 +57,7 @@ </template> <script> + import user from '@/pages/api/user/user.js' import test from '../../../static/js/citys-data.js' export default { data() { @@ -93,7 +79,8 @@ changeReason: '', changeTime: '', planBonus: '', - planLeaderBonus: '' + planLeaderBonus: '', + userXmlSelPhone: '' }, rules: { name: { @@ -183,8 +170,18 @@ onShow() { // 鑾峰彇鐪佸競鍖� this.citysData = test.citysData + // 鑾峰彇涓氬姟鍛樿仈绯绘柟寮� + this.getDetail() }, methods: { + async getDetail() { + let res = await user.getDetail() + if (res.code === 200) { + this.baseFormData.userXmlSelPhone = res.data.mobile + } else if (res.code === 403) { + this.backLogin(res) + } + }, bindPickerChange: function(e) { this.cstmrTypeIndex = e.detail.value this.baseFormData.cstmrType = this.cstmrTypes[e.detail.value].id @@ -249,20 +246,20 @@ var element for (element of that.cstmrList) { - if(element.value == that.baseFormData.cstmrId) { + if(element.value == that.baseFormData.cstmrId$) { that.baseFormData.cstmrId = element.id } } for (element of that.orderList) { - if(element.name == that.baseFormData.orderId) { + if(element.name == that.baseFormData.orderId$) { that.baseFormData.orderId = element.id } } - for (element of that.userList) { - if(element.value == that.baseFormData.userId) { - that.baseFormData.userId = element.id - } - } + // for (element of that.userList) { + // if(element.value == that.baseFormData.userId) { + // that.baseFormData.userId = element.id + // } + // } that.baseFormData.planType = 8 var temp for (var i = 0 ; i < that.baseFormData.planNeed.length; i++) { -- Gitblit v1.9.1