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/modiPlan.vue |  159 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 90 insertions(+), 69 deletions(-)

diff --git a/pages/business/plan/modiPlan.vue b/pages/business/plan/modiPlan.vue
index 0258a29..986303b 100644
--- a/pages/business/plan/modiPlan.vue
+++ b/pages/business/plan/modiPlan.vue
@@ -63,26 +63,27 @@
 						<uni-combox :candidates="selList" placeholder="璇烽�夋嫨骞冲簱璐ф灦绫诲瀷"
 						v-model="baseFormData.select_2"></uni-combox>
 				</uni-forms-item>
+				
 				<uni-forms-item label="鏄惁闇�瑕佽法姊�" name="radio_1">
 					<uni-data-checkbox v-model="baseFormData.radio_1" :localdata="radio_1" />
 				</uni-forms-item>
 				<uni-forms-item label="鏄惁闇�瑕佺綉灞傛澘" name="radio_2">
 					<uni-data-checkbox v-model="baseFormData.radio_2" :localdata="radio_2" />
 				</uni-forms-item>
-				<uni-forms-item label="甯冨眬鍖哄煙鏄惁鎻愪緵CAD鍦哄湴鍥剧焊/鍦哄湴" name="radio_7">
-					<uni-data-checkbox v-model="baseFormData.radio_7" :localdata="radio_7" />
-				</uni-forms-item>
-				
-				<uni-forms-item label="鍦伴潰鏈夋棤鐢电紗娌�" name="radio_3">
-					<uni-data-checkbox v-model="baseFormData.radio_3" :localdata="radio_3" />
-				</uni-forms-item>
-				
-				<uni-forms-item label="鏄惁闇�瑕佸眰鏉�" name="radio_8">
-					<uni-data-checkbox v-model="baseFormData.radio_8" :localdata="radio_8" />
-				</uni-forms-item>
-				
-				<uni-forms-item label="鍦伴潰骞虫暣搴﹀拰鍦伴潰娌夐檷鏄惁婊¤冻鏍囧噯" name="radio_5">
+				<uni-forms-item label="甯冨眬鍖哄煙鏄惁鎻愪緵CAD鍦哄湴鍥剧焊/鍦哄湴" name="radio_5">
 					<uni-data-checkbox v-model="baseFormData.radio_5" :localdata="radio_5" />
+				</uni-forms-item>
+				
+				<uni-forms-item label="鍦伴潰鏈夋棤鐢电紗娌�" name="radio_4">
+					<uni-data-checkbox v-model="baseFormData.radio_4" :localdata="radio_4" />
+				</uni-forms-item>
+				
+				<uni-forms-item label="鏄惁闇�瑕佸眰鏉�" name="radio_9">
+					<uni-data-checkbox v-model="baseFormData.radio_9" :localdata="radio_9" />
+				</uni-forms-item>
+				
+				<uni-forms-item label="鍦伴潰骞虫暣搴﹀拰鍦伴潰娌夐檷鏄惁婊¤冻鏍囧噯" name="radio_3">
+					<uni-data-checkbox v-model="baseFormData.radio_3" :localdata="radio_3" />
 				</uni-forms-item>
 				
 				<uni-forms-item label="鍏朵粬瑕佹眰鍙婃敞鎰忕偣" required name="textarea_2">
@@ -103,7 +104,7 @@
 					<uni-easyinput v-model="baseFormData.planLeaderBonus" placeholder="璇疯緭鍏ヨ鏍肩粍闀垮閲�" />
 				</uni-forms-item>
 				<uni-forms-item label="瀹屾垚鏃堕棿" name="finishTime">
-					<uni-datetime-picker type="date" return-type="string" v-model="baseFormData.datetimesingle"/>
+					<uni-datetime-picker type="date" return-type="string" v-model="baseFormData.finishTime"/>
 					</uni-data-picker>
 				</uni-forms-item>
 				<uni-forms-item label="鏇存敼娆℃暟" name="changeTime">
@@ -142,8 +143,10 @@
 					changeTime: '',
 					planBonus: '',
 					planLeaderBonus: '',
-					userXmlSelPhone: ''
+					userXmlSelPhone: '',
+					beItem: null
 				},
+				beItem: 0,
 				selList: ['妯寮�','椹跺叆寮�','鎮寮�','娴佸埄寮�','閲嶅姏寮�','鍏朵粬'],
 				rules: {
 					name: {
@@ -248,7 +251,27 @@
 						value: 'value2'
 					}
 				],
-				radio_8: [
+				radio_5: [
+					{
+						text: '鏄�',
+						value: 'value1'
+					},
+					{
+						text: '鍚�',
+						value: 'value2'
+					}
+				],
+				radio_4: [
+					{
+						text: '鏄�',
+						value: 'value1'
+					},
+					{
+						text: '鍚�',
+						value: 'value2'
+					}
+				],
+				radio_9: [
 					{
 						text: '鏄�',
 						value: 'value1'
@@ -268,58 +291,38 @@
 						value: 'value2'
 					}
 				],
-				radio_5: [
-					{
-						text: '鏄�',
-						value: 'value1'
-					},
-					{
-						text: '鍚�',
-						value: 'value2'
-					}
-				],
-				radio_7: [
-					{
-						text: '鏄�',
-						value: 'value1'
-					},
-					{
-						text: '鍚�',
-						value: 'value2'
-					}
-				],
 				changeValue: [
 					{
 						text: '鏄�',
-						value: '1'
+						value: 1
 					},
 					{
 						text: '鍚�',
-						value: '0'
+						value: 0
 					}
 				],
 				// 鍗曢�夋暟鎹簮
 				beItem$: [{
 					text: '鏄�',
-					value: '1'
+					value: 1
 				}, {
 					text: '鍚︼紙闇�鍞墠鎶�鏈窡杩涢」鐩紝涓庡鎴风洿鎺ユ矡閫氱瓑锛�',
-					value: '0'
+					value: 0
 				}],
 				citysData: [],
 				citysDataTemp: '',
 				planNeeds: [
 					{
 						text: '绯荤粺 鏂规瑙勫垝璁捐',
-						value: 1
+						value: '1'
 					}, 
 					{
 						text: '鎻愪緵閫夋潗娓呭崟',
-						value: 2
+						value: '2'
 					},
 					{
 						text: '绔嬩綋搴撹璁℃柟妗�',
-						value: 3
+						value: '3'
 					}
 				]
 				
@@ -336,20 +339,19 @@
 			this.getDetail()
 		},
 		onLoad(option) {
-			if (JSON.stringify(option) != "{}") {
-				this.id = option.id
-				this.init()
-				this.autoLoad('follower','')
-			} else {
-				let _this = this
-				const eventChannel = this.getOpenerEventChannel();
-				eventChannel.on('cstmr', function(data) {
-					_this.id = data.data
-					_this.init()
-				})
-				this.autoLoad('follower','')
-			}
-			
+			this.$nextTick(() => {
+				if (JSON.stringify(option) != "{}") {
+					this.id = option.id
+					this.init()
+				} else {
+					let _this = this
+					const eventChannel = this.getOpenerEventChannel();
+					eventChannel.on('cstmr', function(data) {
+						_this.id = data.data
+						_this.init()
+					})
+				}
+			})
 		},
 		methods: {
 			init() {
@@ -360,12 +362,35 @@
 					method: 'GET',
 					success(res) {
 						res = res.data
+						console.log(res);
 						if (res.code === 200) {
+							let planNeed = res.data.planNeed.split('-')
+							res.data.planNeed = []
+							for (let k of planNeed) {
+								res.data.planNeed.push(k)
+							}
+							switch(res.data.select_2) {
+								case 'value1':
+									res.data.select_2 = '妯寮�'
+									break;
+								case 'value2':
+									res.data.select_2 = '椹跺叆寮�'
+									break;
+								case 'value3':
+									res.data.select_2 = '鎮寮�'
+									break;
+								case 'value4':
+									res.data.select_2 = '娴佸埄寮�'
+									break;
+								case 'value5':
+									res.data.select_2 = '閲嶅姏寮�'
+									break;
+								case 'value6':
+									res.data.select_2 = '鍏朵粬'
+									break;
+							}
 							that.baseFormData = res.data
 						}
-						// that.saleManage = res.data
-						// that.cstmr = res.data
-						// that.cstmrId = that.cstmr.id
 					}
 				})
 			},
@@ -449,14 +474,11 @@
 						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_2) {
-						that.baseFormData.select_2 = 'value' + i
+						let index =  i + 1
+						console.log(index);
+						that.baseFormData.select_2 = 'value' + index
 					}
 				}
 				that.baseFormData.planType = 4
@@ -477,7 +499,6 @@
 						}
 					}
 					res['id'] = that.baseFormData.id
-					// return
 					uni.request({
 						url: that.baseUrl + '/plan/update/auth',
 						header:{
@@ -489,7 +510,7 @@
 						success(result) {
 							var res = result.data
 							if (res.code === 200) {
-								uni.navigateBack()
+								uni.navigateBack({delta:2})
 							} else if (res.code === 403) {
 								uni.showToast({title: res.msg, icon: "none", position: 'top'})
 								setTimeout(() => {

--
Gitblit v1.9.1