From e6a02c8b09a796e436a501e9b87d19e25c34c9d1 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期日, 07 四月 2024 15:53:37 +0800 Subject: [PATCH] # --- pages/business/plan/addPlan2.vue | 63 +++++++++++++++---------------- 1 files changed, 31 insertions(+), 32 deletions(-) diff --git a/pages/business/plan/addPlan2.vue b/pages/business/plan/addPlan2.vue index 2384db9..032fd8f 100644 --- a/pages/business/plan/addPlan2.vue +++ b/pages/business/plan/addPlan2.vue @@ -8,31 +8,18 @@ <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> + <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> </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> - </view> </uni-forms-item> <uni-forms-item label="涓氬姟绫诲瀷" required name="planType"> <uni-easyinput disabled placeholder="璇疯緭鍏ヤ笟鍔$被鍨�" v-model="baseFormData.planType"></uni-easyinput> @@ -40,6 +27,12 @@ <uni-forms-item label="绔嬮」" name="beItem"> <uni-data-checkbox v-model="baseFormData.beItem" :localdata="beItem$" /> </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="input_2"> @@ -97,9 +90,6 @@ </uni-forms-item> <br> - <uni-forms-item label="瑙勫垝鍛�" name="planner$"> - <uni-easyinput v-model="baseFormData.planner$" placeholder="璇疯緭鍏ヨ鍒掑憳" /> - </uni-forms-item> <uni-forms-item label="鏇存敼鏂规" name="change"> <uni-data-checkbox v-model="baseFormData.change" :localdata="changeValue" /> </uni-forms-item> @@ -126,6 +116,7 @@ </template> <script> + import user from '@/pages/api/user/user.js' import test from '../../../static/js/citys-data.js' export default { data() { @@ -142,12 +133,13 @@ userId: '', appleTime: '', cstmrId: '', - planType: '绔嬩綋搴擄紙璐ф灦锛�', + planType: '绔嬩綋搴擄紙闆嗘垚锛�', select_2: '', changeReason: '', changeTime: '', planBonus: '', - planLeaderBonus: '' + planLeaderBonus: '', + userXmlSelPhone: '' }, selList: ['鐗涜吙寮�','妯寮�','鏂拌兘婧�','鍏朵粬'], rules: { @@ -343,8 +335,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 @@ -409,23 +411,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(var i = 1;i <= that.selList.length; i++) { + for(let i = 0; i < that.selList.length;i++) { if (that.selList[i] == that.baseFormData.select_3) { - that.baseFormData.select_3 = 'value' + i + let index = i + 1 + console.log(index); + that.baseFormData.select_3 = 'value' + index } } that.baseFormData.planType = 5 -- Gitblit v1.9.1