From c478bc1b36e38774cf01c02fd5e23858bd70a4a3 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 29 十一月 2023 13:42:46 +0800
Subject: [PATCH] #

---
 pages/business/cstmr/addCsmtr.vue |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/pages/business/cstmr/addCsmtr.vue b/pages/business/cstmr/addCsmtr.vue
index 09dcad1..2ad5b3a 100644
--- a/pages/business/cstmr/addCsmtr.vue
+++ b/pages/business/cstmr/addCsmtr.vue
@@ -26,10 +26,11 @@
 					</view>
 				</uni-forms-item>
 				
-				<uni-forms-item label="浜у搧绫诲埆" required name="productCategory">
-					<view>
-						<uni-combox :candidates="productCategorys" placeholder="璇烽�夋嫨浜у搧绫诲埆"
-						v-model="baseFormData.productCategory"></uni-combox>
+				<uni-forms-item label="浜у搧绫诲瀷" name="productCategory" required>
+					<view @click="autoLoad('orderProductType','')">
+						<uni-combox :candidates="productCategorys" placeholder="璇烽�夋嫨浜у搧绫诲瀷" 
+						v-model="baseFormData.productCategory"
+							@input="autoLoad('orderProductType',baseFormData.orderProductTypeId)"></uni-combox>
 					</view>
 				</uni-forms-item>
 				
@@ -80,7 +81,8 @@
 				names: [],
 				nameList: [],
 				industrys: ['鍖昏嵂涓�','鍒堕�犱笟','绾虹粐涓�'],
-				productCategorys: ['绔嬩綋搴擄紙璐ф灦锛�','绔嬩綋搴擄紙闆嗘垚锛�','鍥涘悜绌挎搴�/涓ゅ悜绌挎搴�','闃佹ゼ璐ф灦/閽㈠钩鍙�','鍛ㄨ浆瀹瑰櫒','骞冲簱'],
+				productCategorys: [],
+				productCategoryList: [],
 				baseFormData: {
 					name: '',
 					citysData: [],
@@ -173,7 +175,8 @@
 					value: 2
 				}],
 				citysData: [],
-				citysDataTemp: ''
+				citysDataTemp: '',
+				uraddr: 'add'
 				
 			}
 		},
@@ -186,6 +189,12 @@
 			this.citysData = test.citysData
 			this.autoLoad('cstmrType','')
 			this.autoLoad('user','')
+			this.autoLoad('orderProductType','')
+		},
+		onLoad(option) {
+			if(option.type == 1) {
+				this.uraddr = 'add2'
+			}
 		},
 		methods: {
 			cstmrSearch() {
@@ -247,6 +256,13 @@
 								}
 								return
 							}
+							if (type == 'orderProductType') {
+								for (element of res.data) {
+									that.productCategorys.push(element.value)
+									that.productCategoryList.push(element)
+								}
+								return
+							}
 							
 						}
 					}
@@ -275,7 +291,7 @@
 					}
 					res.pcd = this.citysDataTemp
 					uni.request({
-						url: that.baseUrl + '/cstmr/add/auth',
+						url: `${that.baseUrl}/cstmr/${that.uraddr}/auth`,
 						header:{
 							'token':uni.getStorageSync('token'),
 							'content-type':'application/x-www-form-urlencoded',

--
Gitblit v1.9.1