c1b557f6 by 张猛

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	common/api.js
2 parents 3a51a1cd 3af1052f
...@@ -1429,11 +1429,12 @@ export function checkBusinessLicense(data) { ...@@ -1429,11 +1429,12 @@ export function checkBusinessLicense(data) {
1429 } 1429 }
1430 1430
1431 // 生成单位订单renewYear 1431 // 生成单位订单renewYear
1432 export function certifiedNew(renewYear) { 1432 export function certifiedNew(data) {
1433 return request({ 1433 return request({
1434 url: `/system/certifiedNew/commit?renewYear=${renewYear}`, 1434 url: `/system/certifiedNew/commit`,
1435 method: 'post' 1435 method: 'post',
1436 }) 1436 params: data
1437 })
1437 } 1438 }
1438 1439
1439 // 模拟回调 1440 // 模拟回调
......
...@@ -58,7 +58,25 @@ page { ...@@ -58,7 +58,25 @@ page {
58 } 58 }
59 } 59 }
60 60
61 .empty {
62 display: flex;
63 flex-direction: column;
64 justify-content: center;
65 align-items: center;
66 padding: 120rpx 0;
61 67
68 .empty-img {
69 width: 300rpx;
70 height: 300rpx;
71 opacity: 0.08;
72 }
73
74 .empty-text {
75 color: #999;
76 font-size: 28rpx;
77 margin-top: 20rpx;
78 }
79 }
62 .nodata{padding:10vh 0; box-sizing: border-box; text-align: center; 80 .nodata{padding:10vh 0; box-sizing: border-box; text-align: center;
63 image{width: 300rpx;height: 300rpx;display: none; margin:0 auto; 81 image{width: 300rpx;height: 300rpx;display: none; margin:0 auto;
64 border-radius: 100px; 82 border-radius: 100px;
...@@ -119,7 +137,7 @@ page { ...@@ -119,7 +137,7 @@ page {
119 .pd30{padding: 30rpx;box-sizing: border-box;} 137 .pd30{padding: 30rpx;box-sizing: border-box;}
120 138
121 .appList{width: 700rpx;margin:30rpx auto; 139 .appList{width: 700rpx;margin:30rpx auto;
122 .appItem{background: #eb7c7c;padding: 20rpx 30rpx 30rpx;margin-bottom: 30rpx; 140 .appItem{background: #fff;padding: 20rpx 30rpx 30rpx;margin-bottom: 30rpx;
123 box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196,203,214,0.1); 141 box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196,203,214,0.1);
124 border-radius: 15rpx;position: relative; 142 border-radius: 15rpx;position: relative;
125 .iconbox{position: absolute;left: 20rpx;} 143 .iconbox{position: absolute;left: 20rpx;}
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
101 101
102 <!-- 空状态 --> 102 <!-- 空状态 -->
103 <view v-else class="empty"> 103 <view v-else class="empty">
104 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
104 <text class="empty-text">暂无审核记录</text> 105 <text class="empty-text">暂无审核记录</text>
105 </view> 106 </view>
106 107
...@@ -399,17 +400,7 @@ ...@@ -399,17 +400,7 @@
399 } 400 }
400 } 401 }
401 402
402 .empty {
403 display: flex;
404 justify-content: center;
405 align-items: center;
406 padding: 120rpx 0;
407 403
408 .empty-text {
409 color: #999;
410 font-size: 28rpx;
411 }
412 }
413 404
414 .loading-tip, 405 .loading-tip,
415 .no-more { 406 .no-more {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
33 33
34 <!-- 空状态 --> 34 <!-- 空状态 -->
35 <view class="empty" v-else> 35 <view class="empty" v-else>
36 <image :src="config.baseUrl_api + '/fs/static/nodata.png'" mode="aspectFit" class="empty-icon" /> 36 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
37 <text class="empty-text">暂无收货地址</text> 37 <text class="empty-text">暂无收货地址</text>
38 </view> 38 </view>
39 39
...@@ -345,24 +345,6 @@ const submitAddress = async () => { ...@@ -345,24 +345,6 @@ const submitAddress = async () => {
345 } 345 }
346 } 346 }
347 347
348 .empty {
349 display: flex;
350 flex-direction: column;
351 align-items: center;
352 padding-top: 120rpx;
353
354 .empty-icon {
355 width: 240rpx;
356 height: 240rpx;
357 opacity: 0.5;
358 }
359
360 .empty-text {
361 margin-top: 20rpx;
362 font-size: 28rpx;
363 color: #999;
364 }
365 }
366 348
367 .add-btn-wrap { 349 .add-btn-wrap {
368 position: fixed; 350 position: fixed;
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
89 89
90 <!-- 空状态 --> 90 <!-- 空状态 -->
91 <view v-else class="empty"> 91 <view v-else class="empty">
92 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
92 <text class="empty-text">暂无审核记录</text> 93 <text class="empty-text">暂无审核记录</text>
93 </view> 94 </view>
94 95
...@@ -376,17 +377,6 @@ ...@@ -376,17 +377,6 @@
376 } 377 }
377 } 378 }
378 379
379 .empty {
380 display: flex;
381 justify-content: center;
382 align-items: center;
383 padding: 120rpx 0;
384
385 .empty-text {
386 color: #999;
387 font-size: 28rpx;
388 }
389 }
390 380
391 .loading-tip, 381 .loading-tip,
392 .no-more { 382 .no-more {
......
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
32 <uni-load-more status="loading"></uni-load-more> 32 <uni-load-more status="loading"></uni-load-more>
33 </view> 33 </view>
34 34
35 <view class="empty-wrap" v-else-if="!loading && list.length === 0"> 35 <view class="empty" v-else-if="!loading && list.length === 0">
36 <view class="nodata"> 36 <!-- <view class="nodata"> -->
37 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> 37 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'" class="empty-img"></image>
38 <text>暂无数据</text> 38 <text class="empty-text">暂无数据</text>
39 </view> 39 <!-- </view> -->
40 </view> 40 </view>
41 41
42 <view class="appList" v-else> 42 <view class="appList" v-else>
...@@ -293,10 +293,7 @@ function goAdd() { ...@@ -293,10 +293,7 @@ function goAdd() {
293 } 293 }
294 294
295 .loading-wrap, 295 .loading-wrap,
296 .empty-wrap { 296
297 padding: 100rpx 0;
298 text-align: center;
299 }
300 297
301 /* 列表样式 */ 298 /* 列表样式 */
302 .appList { 299 .appList {
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
10 <uni-load-more status="loading"></uni-load-more> 10 <uni-load-more status="loading"></uni-load-more>
11 </view> 11 </view>
12 12
13 <view class="empty-wrap" v-else-if="!loading && list.length === 0"> 13 <view class="empty" v-else-if="!loading && list.length === 0">
14 <view class="nodata"> 14 <!-- <view class="nodata"> -->
15 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> 15 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
16 <text>暂无可结算的缴费单</text> 16 <text class="empty-text">暂无可结算的缴费单</text>
17 </view> 17 <!-- </view> -->
18 </view> 18 </view>
19 19
20 <view class="appList" v-else> 20 <view class="appList" v-else>
...@@ -215,10 +215,7 @@ function handleSettlement() { ...@@ -215,10 +215,7 @@ function handleSettlement() {
215 } 215 }
216 216
217 .loading-wrap, 217 .loading-wrap,
218 .empty-wrap { 218
219 padding: 100rpx 0;
220 text-align: center;
221 }
222 219
223 .appList { 220 .appList {
224 padding: 0; 221 padding: 0;
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
138 </view> 138 </view>
139 139
140 <!-- 无数据 --> 140 <!-- 无数据 -->
141 <view class="empty-tip" v-if="infoList.length === 0"> 141 <view class="empty-tip" v-if="infoList.length === 0">
142 <text>暂无数据</text> 142 <text>暂无数据</text>
143 </view> 143 </view>
144 </view> 144 </view>
......
1 <template> 1 <template>
2 <view class="container"> 2 <view class="container">
3 <view class="content"> 3 <view class="content">
4 <!-- 缴费单位和所属协会 -->
5 <view class="card info-card">
6 <view class="info-row">
7 <text class="info-label">缴费单位</text>
8 <text class="info-value">{{ payName || '-' }}</text>
9 </view>
10 <view class="info-row" v-if="assoName">
11 <text class="info-label">所属协会</text>
12 <text class="info-value">{{ assoName || '-' }}</text>
13 </view>
14 </view>
15
4 <view class="card"> 16 <view class="card">
5 <view class="yearRow"> 17 <view class="yearRow">
6 <view class="label">缴费年限</view> 18 <view class="label">缴费年限</view>
7 <view class="control"> 19 <view class="control">
8 <image v-if="form.renewYear > 1" class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/dd_02.png'" 20 <image v-if="form.renewYear > 1" class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/dd_02.png'"
9 @click="minusYear"></image> 21 @click="minusYear"></image>
10 <image v-else class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/dd_02_g.png'"></image> 22 <image v-else class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/dd_02_g.png'"></image>
11 <text class="num">{{ form.renewYear }}</text> 23 <text class="num">{{ form.renewYear }}</text>
12 <image v-if="form.renewYear < 5" class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/btn_03.png'" 24 <image v-if="form.renewYear < 5" class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/btn_03.png'"
13 @click="plusYear"></image> 25 @click="plusYear"></image>
14 <image v-else class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/btn_03_g.png'"></image> 26 <image v-else class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/btn_03_g.png'"></image>
15 </view> 27 </view>
16 </view> 28 </view>
17 </view> 29 </view>
...@@ -35,7 +47,7 @@ ...@@ -35,7 +47,7 @@
35 <label class="radioItem"> 47 <label class="radioItem">
36 <radio :checked="payType === '1'" class="custom-radio" value="1"/> 48 <radio :checked="payType === '1'" class="custom-radio" value="1"/>
37 <view class="payInfo"> 49 <view class="payInfo">
38 <image class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/slices/min.png'"></image> 50 <image class="icon" mode="widthFix" :src="config.baseUrl_api + '/fs/static/min.png'"></image>
39 <text>民生付</text> 51 <text>民生付</text>
40 </view> 52 </view>
41 </label> 53 </label>
...@@ -82,6 +94,8 @@ const preferentialData = ref({ ...@@ -82,6 +94,8 @@ const preferentialData = ref({
82 }) 94 })
83 const payType = ref('1') 95 const payType = ref('1')
84 const isPaying = ref(false) 96 const isPaying = ref(false)
97 const payName = ref('')
98 const assoName = ref('')
85 99
86 const memberTotalFee = computed(() => { 100 const memberTotalFee = computed(() => {
87 if (preferentialPolicy.value) { 101 if (preferentialPolicy.value) {
...@@ -118,26 +132,30 @@ const handelPay = async () => { ...@@ -118,26 +132,30 @@ const handelPay = async () => {
118 }) 132 })
119 return 133 return
120 } 134 }
121 135
122 // 显示 loading 136 // 显示 loading
123 uni.showLoading({ 137 uni.showLoading({
124 title: '支付中...', 138 title: '支付中...',
125 mask: true 139 mask: true
126 }) 140 })
127 isPaying.value = true 141 isPaying.value = true
128 142
129 // 创建订单 143 // 创建订单 - 参考PC端逻辑
130 const [orderErr, orderRes] = await to(api.certifiedNew(form.value.renewYear)) 144 const [orderErr, orderRes] = await to(api.certifiedNew({
145 renewYear: form.value.renewYear,
146 type: '1',
147 url: ''
148 }))
131 if (orderErr) { 149 if (orderErr) {
132 uni.hideLoading() 150 uni.hideLoading()
133 isPaying.value = false 151 isPaying.value = false
134 // uni.showToast({ 152 uni.showToast({
135 // title: '创建订单失败', 153 title: '创建订单失败',
136 // icon: 'none' 154 icon: 'none'
137 // }) 155 })
138 return 156 return
139 } 157 }
140 158
141 const data = orderRes.data 159 const data = orderRes.data
142 // 无需支付,直接成功 160 // 无需支付,直接成功
143 if (data.payFlag == 0) { 161 if (data.payFlag == 0) {
...@@ -148,27 +166,32 @@ const handelPay = async () => { ...@@ -148,27 +166,32 @@ const handelPay = async () => {
148 }) 166 })
149 return 167 return
150 } 168 }
151 if (data.payResult.encryptedData) { 169 if (data.payResult && data.payResult.encryptedData) {
152 const res = minShengPay(data.orderId, data.payResult.encryptedData) 170 try {
153 console.log(res) 171 await minShengPay(data.orderId, data.payResult.encryptedData)
172 // 支付成功,跳转到成功页面
173 uni.redirectTo({
174 url: `/myCenter/sucPay?orderId=${data.orderId}`
175 })
176 } catch (e) {
177 console.error('支付失败', e)
178 uni.hideLoading()
179 isPaying.value = false
180 }
181 return
154 } 182 }
155 // 需要支付回调 183 uni.hideLoading()
156 // if (data.orderId) { 184 isPaying.value = false
157 // await to(api.callBack2(data.orderId))
158 // uni.hideLoading()
159 // isPaying.value = false
160 //
161 // uni.redirectTo({
162 // url: `/myCenter/sucPay?orderId=${data.orderId}`
163 // })
164 // }
165
166
167 } 185 }
168 186
169 onLoad((option) => { 187 onLoad((option) => {
188 console.log(66,option)
170 // 接收年限 189 // 接收年限
171 form.value.renewYear = Number(option.renewYear || 1) 190 form.value.renewYear = Number(option.renewYear || 1)
191 // 接收缴费单位和所属协会
192 payName.value = decodeURIComponent(option.payName || '')
193 console.log(77,payName.value)
194 assoName.value = decodeURIComponent(option.assoName || '')
172 // 初始化获取费用和优惠 195 // 初始化获取费用和优惠
173 init() 196 init()
174 }) 197 })
...@@ -214,7 +237,7 @@ async function getZtxDiscountPolicyApi() { ...@@ -214,7 +237,7 @@ async function getZtxDiscountPolicyApi() {
214 } 237 }
215 </script> 238 </script>
216 239
217 <style scoped> 240 <style scoped lang="scss">
218 /* 整体容器 */ 241 /* 整体容器 */
219 .container { 242 .container {
220 min-height: 100vh; 243 min-height: 100vh;
...@@ -234,6 +257,32 @@ async function getZtxDiscountPolicyApi() { ...@@ -234,6 +257,32 @@ async function getZtxDiscountPolicyApi() {
234 margin-bottom: 20rpx; 257 margin-bottom: 20rpx;
235 } 258 }
236 259
260 /* 缴费单位和所属协会信息 */
261 .info-card {
262 .info-row {
263 display: flex;
264 justify-content: space-between;
265 align-items: center;
266 padding: 16rpx 0;
267 border-bottom: 1rpx solid #f5f5f5;
268
269 &:last-child {
270 border-bottom: none;
271 }
272
273 .info-label {
274 font-size: 28rpx;
275 color: #666;
276 }
277
278 .info-value {
279 font-size: 28rpx;
280 color: #333;
281 font-weight: 500;
282 }
283 }
284 }
285
237 /* 缴费年限行 */ 286 /* 缴费年限行 */
238 .yearRow { 287 .yearRow {
239 display: flex; 288 display: flex;
......
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
124 124
125 <!-- 空状态 --> 125 <!-- 空状态 -->
126 <view v-else class="empty"> 126 <view v-else class="empty">
127 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
127 <text class="empty-text">暂无订单记录</text> 128 <text class="empty-text">暂无订单记录</text>
128 </view> 129 </view>
129 130
...@@ -706,18 +707,7 @@ const closeCancelPopup = () => { ...@@ -706,18 +707,7 @@ const closeCancelPopup = () => {
706 } 707 }
707 } 708 }
708 709
709 // 空状态 710
710 .empty {
711 display: flex;
712 justify-content: center;
713 align-items: center;
714 padding: 120rpx 0;
715
716 .empty-text {
717 color: #999;
718 font-size: 28rpx;
719 }
720 }
721 711
722 // 加载/无更多提示 712 // 加载/无更多提示
723 .loading-tip, .no-more { 713 .loading-tip, .no-more {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <view style="width: 60vw;overflow:auto;"> 7 <view style="width: 60vw;overflow:auto;">
8 <uni-data-picker v-model="form.parentId" :localdata="tree" 8 <uni-data-picker v-model="form.parentId" :localdata="tree"
9 :readonly="type&&parentId!=-1&&parentId!=0" :clear-icon="false" 9 :readonly="type&&parentId!=-1&&parentId!=0" :clear-icon="false"
10 :map="{text:'label',value:'id'}" popup-title="请选择"> 10 :map="{text:'label',value:'id'}" popup-title="请选择" @change="changCase">
11 </uni-data-picker> 11 </uni-data-picker>
12 </view> 12 </view>
13 </uni-forms-item> 13 </uni-forms-item>
...@@ -40,6 +40,12 @@ ...@@ -40,6 +40,12 @@
40 <uni-forms-item label="法人姓名" required> 40 <uni-forms-item label="法人姓名" required>
41 <uni-easyinput v-model="form.legal" /> 41 <uni-easyinput v-model="form.legal" />
42 </uni-forms-item> 42 </uni-forms-item>
43 <uni-forms-item label="法人证件号" required>
44 <uni-easyinput v-model="form.legalIdcCode" />
45 </uni-forms-item>
46 <uni-forms-item label="营业执照名称" required>
47 <uni-easyinput v-model="form.companyName" />
48 </uni-forms-item>
43 49
44 <uni-forms-item v-if="form.deptType==6&&activeStatus!= 0" label="是否申请考点" required> 50 <uni-forms-item v-if="form.deptType==6&&activeStatus!= 0" label="是否申请考点" required>
45 <uni-data-checkbox v-model="form.applyPoints" :localdata="yesno" /> 51 <uni-data-checkbox v-model="form.applyPoints" :localdata="yesno" />
...@@ -195,6 +201,7 @@ ...@@ -195,6 +201,7 @@
195 const imgBack = ref({}) 201 const imgBack = ref({})
196 const creditCode = ref() 202 const creditCode = ref()
197 const parentId = ref() 203 const parentId = ref()
204 const assoFullName = ref('') // 协会完整路径名称
198 const legalIdcPhoto1 = ref('') 205 const legalIdcPhoto1 = ref('')
199 const legalIdcPhoto2 = ref('') 206 const legalIdcPhoto2 = ref('')
200 const companyName = ref('') 207 const companyName = ref('')
...@@ -338,6 +345,7 @@ ...@@ -338,6 +345,7 @@
338 } 345 }
339 api.certifiedDeptTree(obj).then(res => { 346 api.certifiedDeptTree(obj).then(res => {
340 tree.value = res.data 347 tree.value = res.data
348 restoreAssoFullName()
341 }) 349 })
342 } else { 350 } else {
343 var obj = { 351 var obj = {
...@@ -348,6 +356,7 @@ ...@@ -348,6 +356,7 @@
348 } 356 }
349 api.deptTreeSelect(obj).then(res => { 357 api.deptTreeSelect(obj).then(res => {
350 tree.value = res.data 358 tree.value = res.data
359 restoreAssoFullName()
351 }) 360 })
352 } 361 }
353 } 362 }
...@@ -573,8 +582,9 @@ ...@@ -573,8 +582,9 @@
573 }) 582 })
574 } else { 583 } else {
575 api.editMyMemberCertifiedInfo(dataInfo).then(res => { 584 api.editMyMemberCertifiedInfo(dataInfo).then(res => {
585 // 使用完整的协会路径名称
576 uni.navigateTo({ 586 uni.navigateTo({
577 url: `/myCenter/goPay` 587 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoFullName.value)}`
578 }) 588 })
579 589
580 }).catch(err => { 590 }).catch(err => {
...@@ -586,6 +596,84 @@ ...@@ -586,6 +596,84 @@
586 } 596 }
587 } 597 }
588 598
599 // 根据协会ID获取协会名称
600 function getAssoName(parentId) {
601 if (!parentId || !tree.value || tree.value.length === 0) {
602 return ''
603 }
604 // 递归查找协会名称
605 function findInTree(list) {
606 for (const item of list) {
607 if (item.id === parentId) {
608 return item.label || ''
609 }
610 if (item.children && item.children.length > 0) {
611 const found = findInTree(item.children)
612 if (found) return found
613 }
614 }
615 return null
616 }
617 return findInTree(tree.value) || ''
618 }
619
620 // 协会选择 - 获取完整路径名称
621 function changCase(e) {
622 const valueArr = e.detail?.value || e;
623 // 取最后一级的value(纯ID)
624 const lastNode = valueArr[valueArr.length - 1];
625 form.value.parentId = lastNode?.value || '';
626 console.log('最终提交的parentId:', form.value.parentId);
627 assoFullName.value = getAssoFullName(valueArr)
628 console.log('协会完整路径:', assoFullName.value);
629 }
630
631 // 获取协会完整路径名称
632 function getAssoFullName(valueArr) {
633 if (!valueArr || valueArr.length === 0) return ''
634 // valueArr 是 {value: id} 数组
635 const names = []
636 let currentLevel = tree.value
637 for (const item of valueArr) {
638 const found = currentLevel?.find(v => v.id === item.value || v.value === item.value)
639 if (found) {
640 names.push(found.label)
641 currentLevel = found.children
642 } else {
643 break
644 }
645 }
646 return names.join('/')
647 }
648
649 // 查找协会节点及其父路径
650 function findAssoNodeWithPath(list, targetId, currentPath) {
651 for (const item of list) {
652 const newPath = [...currentPath, item.value || item.id]
653 if ((item.value || item.id) === targetId) {
654 return { node: item, path: newPath }
655 }
656 if (item.children && item.children.length > 0) {
657 const found = findAssoNodeWithPath(item.children, targetId, newPath)
658 if (found) return found
659 }
660 }
661 return null
662 }
663
664 // 恢复协会完整路径名称
665 function restoreAssoFullName() {
666 if (!form.value.parentId || !tree.value || tree.value.length === 0) {
667 return
668 }
669 // 查找节点及其路径
670 const result = findAssoNodeWithPath(tree.value, form.value.parentId, [])
671 if (result) {
672 // 使用路径数组重建完整名称
673 assoFullName.value = getAssoFullName(result.path.map(id => ({ value: id })))
674 }
675 }
676
589 function changeCoordinates1(e) { 677 function changeCoordinates1(e) {
590 form.value.provinceId = e?.[0]?.toString() 678 form.value.provinceId = e?.[0]?.toString()
591 form.value.cityId = e?.[1]?.toString() 679 form.value.cityId = e?.[1]?.toString()
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <view class="success-subtitle">支付成功,请等待审核</view> 12 <view class="success-subtitle">支付成功,请等待审核</view>
13 13
14 <!-- 订单信息卡片(带阴影) --> 14 <!-- 订单信息卡片(带阴影) -->
15 <view class="info-card"> 15 <!-- <view class="info-card">
16 <view class="info-item"> 16 <view class="info-item">
17 <text class="label">交易流水号</text> 17 <text class="label">交易流水号</text>
18 <text class="value">{{ orderInfo.tradeNo || '--' }}</text> 18 <text class="value">{{ orderInfo.tradeNo || '--' }}</text>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 <text class="label">订单金额</text> 25 <text class="label">订单金额</text>
26 <text class="value amount">{{ orderInfo.price ? orderInfo.price + '元' : '--' }}</text> 26 <text class="value amount">{{ orderInfo.price ? orderInfo.price + '元' : '--' }}</text>
27 </view> 27 </view>
28 </view> 28 </view> -->
29 29
30 <!-- 确定按钮(渐变+动效) --> 30 <!-- 确定按钮(渐变+动效) -->
31 <view class="confirm-btn-area"> 31 <view class="confirm-btn-area">
...@@ -58,14 +58,14 @@ ...@@ -58,14 +58,14 @@
58 } 58 }
59 59
60 onLoad(async (option) => { 60 onLoad(async (option) => {
61 if (option.orderId) { 61 // if (option.orderId) {
62 const [err, res] = await to(api.getOrderInfo(option.orderId)) 62 // const [err, res] = await to(api.getOrderInfo(option.orderId))
63 if (!err && res.data) { 63 // if (!err && res.data) {
64 orderInfo.value = res.data 64 // orderInfo.value = res.data
65 } else { 65 // } else {
66 orderInfo.value.orderId = option.orderId 66 // orderInfo.value.orderId = option.orderId
67 } 67 // }
68 } 68 // }
69 }) 69 })
70 </script> 70 </script>
71 71
......
...@@ -135,6 +135,7 @@ ...@@ -135,6 +135,7 @@
135 135
136 <!-- 空状态 --> 136 <!-- 空状态 -->
137 <view v-else class="empty"> 137 <view v-else class="empty">
138 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
138 <text class="empty-text">暂无订单记录</text> 139 <text class="empty-text">暂无订单记录</text>
139 </view> 140 </view>
140 141
...@@ -576,17 +577,6 @@ ...@@ -576,17 +577,6 @@
576 } 577 }
577 } 578 }
578 579
579 .empty {
580 display: flex;
581 justify-content: center;
582 align-items: center;
583 padding: 120rpx 0;
584
585 .empty-text {
586 color: #999;
587 font-size: 28rpx;
588 }
589 }
590 580
591 .loading-tip, 581 .loading-tip,
592 .no-more { 582 .no-more {
......
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
201 201
202 // 协会树 202 // 协会树
203 const assoList = ref([]) 203 const assoList = ref([])
204 const assoFullName = ref('') // 协会完整路径名称
204 205
205 // 步骤相关 206 // 步骤相关
206 const active = ref(0) 207 const active = ref(0)
...@@ -255,18 +256,36 @@ ...@@ -255,18 +256,36 @@
255 // 获取详情 256 // 获取详情
256 function getDetail() { 257 function getDetail() {
257 api.getMyOwnMemberInfo().then(res => { 258 api.getMyOwnMemberInfo().then(res => {
258 if (res.data.memberInfo) { 259 // if (res.data.memberInfo) {
259 Object.assign(form.value, res.data.memberInfo) 260 // Object.assign(form.value, res.data.memberInfo)
260 } 261 // }
262 form.value = { ...res.data.dept, ...res.data.memberInfo }
261 authenticationStatusa.value = res.data.authenticationStatus 263 authenticationStatusa.value = res.data.authenticationStatus
262 result.value = res.data.result 264 result.value = res.data.result
263 265
264 // 处理地址 266 // 处理地址 - 需要用对象数组格式
265 coordinates1.value = [] 267 coordinates1.value = []
266 if (form.value.provinceId) coordinates1.value.push(form.value.provinceId) 268 if (form.value.provinceId) coordinates1.value.push(form.value.provinceId)
267 if (form.value.cityId) coordinates1.value.push(form.value.cityId) 269 if (form.value.cityId) coordinates1.value.push(form.value.cityId)
268 if (form.value.regionId) coordinates1.value.push(form.value.regionId) 270 if (form.value.regionId) coordinates1.value.push(form.value.regionId)
269 271
272 // 处理协会 - 设置完整路径名称
273 if (form.value.parentId) {
274 // 尝试从协会树中查找完整路径
275 const result = findAssoNodeWithPath(assoList.value, form.value.parentId, [])
276 if (result) {
277 assoFullName.value = getAssoFullName(result.path.map(id => ({ value: id })))
278 } else {
279 // 如果树还没加载完,延迟设置
280 setTimeout(() => {
281 const res = findAssoNodeWithPath(assoList.value, form.value.parentId, [])
282 if (res) {
283 assoFullName.value = getAssoFullName(res.path.map(id => ({ value: id })))
284 }
285 }, 500)
286 }
287 }
288
270 // 处理身份证 289 // 处理身份证
271 if (form.value.legalIdcPhoto) { 290 if (form.value.legalIdcPhoto) {
272 const photos = form.value.legalIdcPhoto.split(',') 291 const photos = form.value.legalIdcPhoto.split(',')
...@@ -292,12 +311,11 @@ ...@@ -292,12 +311,11 @@
292 btn.value = !result.value 311 btn.value = !result.value
293 } 312 }
294 313
295 creditCode.value = form.value.creditCode 314 creditCode.value = form.value.creditCode
296 legal.value = form.value.legal 315 legal.value = form.value.legal
297 legalIdcCode.value = form.value.legalIdcCode 316 legalIdcCode.value = form.value.legalIdcCode
298 coordinates1.value = form.value.provinceId 317 coordinates1.value = form.value.provinceId
299 adress.value = form.value.adress 318 adress.value = form.value.adress
300 form.value.deptType = res.data.dept.deptType
301 form.value.name = form.value.baseName 319 form.value.name = form.value.baseName
302 }) 320 })
303 } 321 }
...@@ -334,6 +352,12 @@ ...@@ -334,6 +352,12 @@
334 isBlack: 0 352 isBlack: 0
335 }).then(res => { 353 }).then(res => {
336 assoList.value = res.data.map(item => formatTree(item)) 354 assoList.value = res.data.map(item => formatTree(item))
355 // 树加载完成后,如果有parentId,设置完整路径名称
356 if (form.value.parentId) {
357 setTimeout(() => {
358 restoreAssoFullName()
359 }, 100)
360 }
337 }) 361 })
338 } 362 }
339 363
...@@ -349,6 +373,34 @@ ...@@ -349,6 +373,34 @@
349 return result 373 return result
350 } 374 }
351 375
376 // 恢复协会完整路径名称
377 function restoreAssoFullName() {
378 if (!form.value.parentId || !assoList.value || assoList.value.length === 0) {
379 return
380 }
381 // 查找节点及其路径
382 const result = findAssoNodeWithPath(assoList.value, form.value.parentId, [])
383 if (result) {
384 // 使用路径数组重建完整名称
385 assoFullName.value = getAssoFullName(result.path.map(id => ({ value: id })))
386 }
387 }
388
389 // 查找协会节点及其父路径
390 function findAssoNodeWithPath(list, targetId, currentPath) {
391 for (const item of list) {
392 const newPath = [...currentPath, item.value]
393 if (item.value === targetId) {
394 return { node: item, path: newPath }
395 }
396 if (item.children && item.children.length > 0) {
397 const found = findAssoNodeWithPath(item.children, targetId, newPath)
398 if (found) return found
399 }
400 }
401 return null
402 }
403
352 // 协会选择(修复:100%对齐PC端el-cascader emitPath: false逻辑,只取最后一级ID) 404 // 协会选择(修复:100%对齐PC端el-cascader emitPath: false逻辑,只取最后一级ID)
353 function changCase(e) { 405 function changCase(e) {
354 const valueArr = e.detail?.value || e; 406 const valueArr = e.detail?.value || e;
...@@ -356,6 +408,8 @@ ...@@ -356,6 +408,8 @@
356 const lastNode = valueArr[valueArr.length - 1]; 408 const lastNode = valueArr[valueArr.length - 1];
357 form.value.parentId = lastNode?.value || ''; 409 form.value.parentId = lastNode?.value || '';
358 console.log('最终提交的parentId:', form.value.parentId); 410 console.log('最终提交的parentId:', form.value.parentId);
411 assoFullName.value = getAssoFullName(valueArr)
412 console.log('协会完整路径:', assoFullName.value);
359 } 413 }
360 414
361 // 地址选择(核心修复:从对象中提取纯value,对齐PC端格式) 415 // 地址选择(核心修复:从对象中提取纯value,对齐PC端格式)
...@@ -564,7 +618,7 @@ ...@@ -564,7 +618,7 @@
564 cityId: form.value.cityId.value, 618 cityId: form.value.cityId.value,
565 provinceId: form.value.provinceId.value, 619 provinceId: form.value.provinceId.value,
566 adress: form.value.adress, 620 adress: form.value.adress,
567 deptType: form.value.deptType, 621 deptType: app.globalData.deptType,
568 legalIdcPhoto: [form.value.legalIdcPhoto1, form.value.legalIdcPhoto2].join(','), 622 legalIdcPhoto: [form.value.legalIdcPhoto1, form.value.legalIdcPhoto2].join(','),
569 applyPoints: '0', 623 applyPoints: '0',
570 siteContact: form.value.siteContact, 624 siteContact: form.value.siteContact,
...@@ -577,8 +631,11 @@ ...@@ -577,8 +631,11 @@
577 uni.showToast({ title: '提交成功', duration: 1500, icon: 'success' }) 631 uni.showToast({ title: '提交成功', duration: 1500, icon: 'success' })
578 // 跳转缴费页面 632 // 跳转缴费页面
579 setTimeout(() => { 633 setTimeout(() => {
634 const assoName = assoFullName.value
635 console.log(888,assoName)
636 // 跳转到缴费页面
580 uni.navigateTo({ 637 uni.navigateTo({
581 url: '/myCenter/goPay' 638 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoName)}`
582 }) 639 })
583 }, 1500) 640 }, 1500)
584 } else { 641 } else {
...@@ -727,12 +784,57 @@ ...@@ -727,12 +784,57 @@
727 }) 784 })
728 return 785 return
729 } 786 }
787 // 使用完整的协会路径名称
788 const assoName = assoFullName.value || getAssoName(form.value.parentId)
730 // 跳转到缴费页面 789 // 跳转到缴费页面
731 uni.navigateTo({ 790 uni.navigateTo({
732 url: '/myCenter/goPay' 791 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoName)}`
733 }) 792 })
734 } 793 }
735 794
795 // 根据协会ID获取协会名称(只获取最后一级)
796 function getAssoName(parentId) {
797 if (!parentId || !assoList.value || assoList.value.length === 0) {
798 return ''
799 }
800 // 递归查找协会名称
801 function findInTree(list) {
802 for (const item of list) {
803 if (item.value === parentId) {
804 return item.text || ''
805 }
806 if (item.children && item.children.length > 0) {
807 const found = findInTree(item.children)
808 if (found) return found
809 }
810 }
811 return null
812 }
813 return findInTree(assoList.value) || ''
814 }
815
816 // 根据选择的值数组获取完整的协会路径名称
817 function getAssoFullName(valueArr) {
818 if (!valueArr || valueArr.length === 0 || !assoList.value || assoList.value.length === 0) {
819 return ''
820 }
821 const pathNames = []
822 let currentList = assoList.value
823 for (let i = 0; i < valueArr.length; i++) {
824 const node = valueArr[i]
825 const found = currentList.find(item => item.value === node?.value || item.value === node)
826 if (found) {
827 pathNames.push(found.text || found.label || '')
828 if (found.children) {
829 currentList = found.children
830 }
831 } else {
832 break
833 }
834 }
835 return pathNames.join('/')
836 }
837
736 // 去认证 - 提交认证信息 838 // 去认证 - 提交认证信息
737 function doCertification() { 839 function doCertification() {
738 submitStep2() 840 submitStep2()
...@@ -770,8 +872,9 @@ ...@@ -770,8 +872,9 @@
770 width: 48rpx; 872 width: 48rpx;
771 height: 48rpx; 873 height: 48rpx;
772 border-radius: 50%; 874 border-radius: 50%;
773 background: rgba(173, 24, 31, 0.3); 875 background: #fff;
774 color: #AD181F; 876 border: 2rpx solid #999;
877 color: #999;
775 font-size: 24rpx; 878 font-size: 24rpx;
776 display: flex; 879 display: flex;
777 align-items: center; 880 align-items: center;
...@@ -787,8 +890,9 @@ ...@@ -787,8 +890,9 @@
787 } 890 }
788 891
789 &.active .step-circle { 892 &.active .step-circle {
790 background: #AD181F; 893 background: #fff;
791 color: #fff; 894 color: #AD181F;
895 border-color: #AD181F;
792 } 896 }
793 897
794 &.active .step-text { 898 &.active .step-text {
...@@ -835,7 +939,6 @@ ...@@ -835,7 +939,6 @@
835 align-items: center; 939 align-items: center;
836 justify-content: space-between; 940 justify-content: space-between;
837 padding: 20rpx 0; 941 padding: 20rpx 0;
838 border-bottom: 1rpx solid #eee;
839 margin-bottom: 20rpx; 942 margin-bottom: 20rpx;
840 } 943 }
841 944
...@@ -1087,6 +1190,9 @@ ...@@ -1087,6 +1190,9 @@
1087 overflow: hidden; 1190 overflow: hidden;
1088 text-overflow: ellipsis; 1191 text-overflow: ellipsis;
1089 } 1192 }
1193 :deep(.selected-list) {
1194 justify-content: start;
1195 }
1090 1196
1091 /* 修复高度统一 */ 1197 /* 修复高度统一 */
1092 .custom-picker { 1198 .custom-picker {
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
33 </view> 33 </view>
34 34
35 <!-- 空状态 --> 35 <!-- 空状态 -->
36 <view v-if="levelRecords.length === 0 && !loading" class="empty-state"> 36 <view v-if="levelRecords.length === 0 && !loading" class="empty">
37 <uni-icons type="empty" size="80" color="#ccc" /> 37 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
38 <view class="empty-text">暂无级位记录</view> 38 <view class="empty-text">暂无级位记录</view>
39 </view> 39 </view>
40 </view> 40 </view>
...@@ -63,8 +63,9 @@ ...@@ -63,8 +63,9 @@
63 <view class="change-label">变更时间:{{ parseTime(currentChangeRecord.modTime) }}</view> 63 <view class="change-label">变更时间:{{ parseTime(currentChangeRecord.modTime) }}</view>
64 </view> 64 </view>
65 </view> 65 </view>
66 <view v-else class="empty-state"> 66 <view v-else class="empty">
67 <uni-icons type="empty" size="60" color="#ccc" /> 67 <uni-icons type="empty" size="60" color="#ccc" />
68 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
68 <view class="empty-text">暂无变更记录</view> 69 <view class="empty-text">暂无变更记录</view>
69 </view> 70 </view>
70 </view> 71 </view>
...@@ -78,6 +79,7 @@ ...@@ -78,6 +79,7 @@
78 import { useUserStore } from '../store/modules/user'; 79 import { useUserStore } from '../store/modules/user';
79 import { getAssoPers } from '@/common/api.js'; 80 import { getAssoPers } from '@/common/api.js';
80 import { getPersonTecDetails } from '@/common/api.js'; 81 import { getPersonTecDetails } from '@/common/api.js';
82 import config from '@/config.js';
81 83
82 // 级位记录数据 84 // 级位记录数据
83 const levelRecords = ref([]); 85 const levelRecords = ref([]);
...@@ -275,19 +277,10 @@ ...@@ -275,19 +277,10 @@
275 } 277 }
276 278
277 /* 空状态 */ 279 /* 空状态 */
278 .empty-state {
279 display: flex;
280 flex-direction: column;
281 align-items: center;
282 justify-content: center;
283 padding: 100rpx 0;
284 }
285 280
286 .empty-text { 281
287 margin-top: 20rpx; 282
288 font-size: 28rpx; 283
289 color: #999;
290 }
291 284
292 /* 弹窗 */ 285 /* 弹窗 */
293 .popup-content { 286 .popup-content {
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
83 83
84 <!-- 空状态 --> 84 <!-- 空状态 -->
85 <view v-else class="empty"> 85 <view v-else class="empty">
86 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
86 <text class="empty-text">暂无订单记录</text> 87 <text class="empty-text">暂无订单记录</text>
87 </view> 88 </view>
88 89
...@@ -500,17 +501,7 @@ const closeCancelPopup = () => { ...@@ -500,17 +501,7 @@ const closeCancelPopup = () => {
500 } 501 }
501 502
502 // 空状态 503 // 空状态
503 .empty { 504
504 display: flex;
505 justify-content: center;
506 align-items: center;
507 padding: 120rpx 0;
508
509 .empty-text {
510 color: #999;
511 font-size: 28rpx;
512 }
513 }
514 505
515 // 加载/无更多提示 506 // 加载/无更多提示
516 .loading-tip, .no-more { 507 .loading-tip, .no-more {
......
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
99 </view> 99 </view>
100 100
101 <!-- 空数据状态 --> 101 <!-- 空数据状态 -->
102 <view class="empty-state" v-else> 102 <view class="empty" v-else>
103 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'" class="empty-icon"></image> 103 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'" class="empty-img"></image>
104 <text class="empty-text">暂无数据</text> 104 <text class="empty-text">暂无数据</text>
105 </view> 105 </view>
106 </view> 106 </view>
...@@ -544,23 +544,7 @@ onUnmounted(() => { ...@@ -544,23 +544,7 @@ onUnmounted(() => {
544 opacity: 0.6 !important; 544 opacity: 0.6 !important;
545 } 545 }
546 /* 空状态 */ 546 /* 空状态 */
547 .empty-state { 547
548 display: flex;
549 flex-direction: column;
550 align-items: center;
551 padding:100rpx 40rpx 0;
552
553 .empty-icon {
554 width:240rpx;
555 height:240rpx;
556 margin-bottom:40rpx;
557 opacity:0.5;
558 }
559 .empty-text {
560 font-size:30rpx;
561 color:#999;
562 }
563 }
564 548
565 /* 加载更多 */ 549 /* 加载更多 */
566 .load-more { 550 .load-more {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!