From 6bb872ab1a0484a64668bebebfce0bd67f5502b6 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 22 十一月 2023 13:01:43 +0800
Subject: [PATCH] #

---
 pages/business/plan/modiPlan2.vue   |   44 ++++++++++++++--------
 pages/business/plan/addPlan2.vue    |   11 ++---
 pages/business/plan/modiPlan.vue    |   11 ++---
 pages/business/plan/planDetails.vue |   14 +++++++
 pages/business/plan/addPlan.vue     |   11 ++---
 5 files changed, 54 insertions(+), 37 deletions(-)

diff --git a/pages/business/plan/addPlan.vue b/pages/business/plan/addPlan.vue
index 37a20e9..96268fb 100644
--- a/pages/business/plan/addPlan.vue
+++ b/pages/business/plan/addPlan.vue
@@ -416,14 +416,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
diff --git a/pages/business/plan/addPlan2.vue b/pages/business/plan/addPlan2.vue
index 91b91c3..032fd8f 100644
--- a/pages/business/plan/addPlan2.vue
+++ b/pages/business/plan/addPlan2.vue
@@ -420,14 +420,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_3) {
-						that.baseFormData.select_3 = 'value' + i
+						let index =  i + 1
+						console.log(index);
+						that.baseFormData.select_3 = 'value' + index
 					}
 				}
 				that.baseFormData.planType = 5
diff --git a/pages/business/plan/modiPlan.vue b/pages/business/plan/modiPlan.vue
index 4cca7d2..769f0bc 100644
--- a/pages/business/plan/modiPlan.vue
+++ b/pages/business/plan/modiPlan.vue
@@ -479,14 +479,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
diff --git a/pages/business/plan/modiPlan2.vue b/pages/business/plan/modiPlan2.vue
index 363958f..802eb13 100644
--- a/pages/business/plan/modiPlan2.vue
+++ b/pages/business/plan/modiPlan2.vue
@@ -100,7 +100,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">
@@ -110,7 +110,7 @@
 					<uni-easyinput v-model="baseFormData.planBonus" placeholder="璇疯緭鍏ヨ鏍煎閲�" />
 				</uni-forms-item>
 			</uni-forms>
-			<button type="primary" @click="addCstmr()">娣诲姞</button>
+			<button type="primary" @click="addCstmr()">淇敼</button>
 		</view>
 	</view>
 </template>
@@ -362,19 +362,28 @@
 					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)
 							}
-							// planNeed.push()
+							switch(res.data.select_3) {
+								case 'value1':
+									res.data.select_3 = '鐗涜吙寮�'
+									break;
+								case 'value2':
+									res.data.select_3 = '妯寮�'
+									break;
+								case 'value3':
+									res.data.select_3 = '鏂拌兘婧�'
+									break;
+								case 'value4':
+									res.data.select_3 = '鍏朵粬'
+									break;
+							}
 							that.baseFormData = res.data
 						}
-						// that.saleManage = res.data
-						// that.cstmr = res.data
-						// that.cstmrId = that.cstmr.id
 					}
 				})
 			},
@@ -459,16 +468,19 @@
 						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
 					}
 				}
+				// for (let index in that.selList) {
+				// 	if (that.selList[index] == that.baseFormData.select_3) {
+				// 		let i = index + 1
+				// 		that.baseFormData.select_3 = 'value' + i
+				// 	}
+				// }
 				that.baseFormData.planType = 5
 				var temp 
 				for (var i = 0 ; i < that.baseFormData.planNeed.length; i++) {
@@ -488,7 +500,7 @@
 					}
 					res['id'] = that.baseFormData.id
 					uni.request({
-						url: that.baseUrl + '/plan/add/auth',
+						url: that.baseUrl + '/plan/update/auth',
 						header:{
 							'token':uni.getStorageSync('token'),
 							'content-type':'application/x-www-form-urlencoded',
@@ -498,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(() => {
diff --git a/pages/business/plan/planDetails.vue b/pages/business/plan/planDetails.vue
index 25efd8a..4cd8759 100644
--- a/pages/business/plan/planDetails.vue
+++ b/pages/business/plan/planDetails.vue
@@ -190,6 +190,20 @@
 								{name:'鍏朵粬瑕佹眰鍙婃敞鎰忕偣',val:res.data.textarea_2 ? res.data.textarea_2 : '--'},
 								)
 							} else if(res.data.planType == 5) {
+								switch(res.data.select_3) {
+									case 'value1':
+										res.data.select_3 = '鐗涜吙寮�'
+										break;
+									case 'value2':
+										res.data.select_3 = '妯寮�'
+										break;
+									case 'value3':
+										res.data.select_3 = '鏂拌兘婧�'
+										break;
+									case 'value4':
+										res.data.select_3 = '鍏朵粬'
+										break;
+								}
 								that.info.push(
 								{name:'璐х墿瑙勬牸',val:res.data.input_2},
 								{name:'璐х墿閲嶉噺',val:res.data.input_5},

--
Gitblit v1.9.1