67e1a42f by lttnew

考点考官

1 parent 8f77dd9a
...@@ -1683,16 +1683,24 @@ export function getShenMemberInfo() { ...@@ -1683,16 +1683,24 @@ export function getShenMemberInfo() {
1683 1683
1684 1684
1685 // 考官列表 1685 // 考官列表
1686 export function examinerDel(id) { 1686 export function examinerDel(id) {
1687 return request({ 1687 return request({
1688 url: `/member/examiner/${id}`, 1688 url: `/member/examiner/${id}`,
1689 method: 'delete' 1689 method: 'delete'
1690 }) 1690 })
1691 } 1691 }
1692 1692
1693 // 添加考官 1693 // 清空当前考点申请已选考官
1694 export function otherAdd(memId, ids) { 1694 export function clearMyExaminer() {
1695 return request({ 1695 return request({
1696 url: `/member/examiner/clearMyExaminer`,
1697 method: 'post'
1698 })
1699 }
1700
1701 // 添加考官
1702 export function otherAdd(memId, ids) {
1703 return request({
1696 url: `/member/examiner/otherAdd/${memId}/${ids}`, 1704 url: `/member/examiner/otherAdd/${memId}/${ids}`,
1697 method: 'post' 1705 method: 'post'
1698 }) 1706 })
......
...@@ -229,6 +229,7 @@ const submitAddress = async () => { ...@@ -229,6 +229,7 @@ const submitAddress = async () => {
229 form.value.province = region.value[0]; 229 form.value.province = region.value[0];
230 form.value.city = region.value[1]; 230 form.value.city = region.value[1];
231 form.value.area = region.value[2]; 231 form.value.area = region.value[2];
232 form.value.address = `${form.value.province || ''}${form.value.city || ''}${form.value.area || ''}${form.value.a || ''}`;
232 233
233 uni.showLoading({ title: '保存中' }); 234 uni.showLoading({ title: '保存中' });
234 try { 235 try {
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
21 <view class="info-card"> 21 <view class="info-card">
22 <view class="card-header"> 22 <view class="card-header">
23 <text class="card-title">邮寄信息</text> 23 <text class="card-title">邮寄信息</text>
24 <text class="manage-btn" @click="goAddressManage">管理地址</text> 24 <text v-if="allowEditAddress" class="manage-btn" @click="goAddressManage">管理地址</text>
25 </view> 25 </view>
26 26
27 <view v-if="selectedAddress.id" class="address-content" @click="goAddressManage"> 27 <view v-if="selectedAddress.id" :class="{ disabled: !allowEditAddress }" class="address-content" @click="goAddressManage">
28 <view class="address-region"> 28 <view class="address-region">
29 {{ selectedAddress.province }} {{ selectedAddress.city }} {{ selectedAddress.area }} 29 {{ selectedAddress.province }} {{ selectedAddress.city }} {{ selectedAddress.area }}
30 </view> 30 </view>
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
38 </view> 38 </view>
39 39
40 <view v-else class="empty-address" @click="goAddressManage"> 40 <view v-else class="empty-address" @click="goAddressManage">
41 <text class="empty-tip">请添加收货地址</text> 41 <text class="empty-tip">{{ allowEditAddress ? '请添加收货地址' : '暂无订单地址' }}</text>
42 <text class="arrow"></text> 42 <text v-if="allowEditAddress" class="arrow"></text>
43 </view> 43 </view>
44 </view> 44 </view>
45 45
...@@ -120,7 +120,9 @@ ...@@ -120,7 +120,9 @@
120 </view> 120 </view>
121 </view> 121 </view>
122 122
123 <view v-if="!selectedAddress.id" class="tip-text">请先选择邮寄地址</view> 123 <view v-if="!selectedAddress.id" class="tip-text">
124 {{ allowEditAddress ? '请先选择邮寄地址' : '订单地址异常,请联系管理员' }}
125 </view>
124 </view> 126 </view>
125 </template> 127 </template>
126 128
...@@ -136,6 +138,7 @@ const orderId = ref(''); ...@@ -136,6 +138,7 @@ const orderId = ref('');
136 const loading = ref(true); 138 const loading = ref(true);
137 const examData = ref({}); 139 const examData = ref({});
138 const selectedAddress = ref({}); 140 const selectedAddress = ref({});
141 const examInfo = ref({});
139 const memberInfo = ref({}); 142 const memberInfo = ref({});
140 const deptInfo = ref({}); 143 const deptInfo = ref({});
141 const payType = ref('2'); 144 const payType = ref('2');
...@@ -146,6 +149,7 @@ const formData = ref({ ...@@ -146,6 +149,7 @@ const formData = ref({
146 149
147 // 判断是再次支付还是新订单 150 // 判断是再次支付还是新订单
148 const isRePay = computed(() => !!orderId.value); 151 const isRePay = computed(() => !!orderId.value);
152 const allowEditAddress = computed(() => !isRePay.value);
149 153
150 // 级别标签 154 // 级别标签
151 const levelTags = computed(() => { 155 const levelTags = computed(() => {
...@@ -188,6 +192,10 @@ onMounted(() => { ...@@ -188,6 +192,10 @@ onMounted(() => {
188 }); 192 });
189 193
190 onShow(() => { 194 onShow(() => {
195 if (!allowEditAddress.value) {
196 getExamAddress();
197 return
198 }
191 // 检查是否有选中的地址带回 199 // 检查是否有选中的地址带回
192 const pages = getCurrentPages(); 200 const pages = getCurrentPages();
193 const currentPage = pages[pages.length - 1]; 201 const currentPage = pages[pages.length - 1];
...@@ -230,7 +238,40 @@ const getDefaultAddress = async () => { ...@@ -230,7 +238,40 @@ const getDefaultAddress = async () => {
230 } 238 }
231 }; 239 };
232 240
241 const getExamAddress = async () => {
242 if (!examId.value) return
243 try {
244 const res = await api.getLevelApplyInfo(examId.value)
245 const data = res.data || {}
246 examInfo.value = data
247 const address = data.postAddress || {}
248 if (address.id) {
249 selectedAddress.value = normalizePostAddress(address)
250 return
251 }
252 } catch (e) {
253 console.error('获取考试地址失败', e)
254 }
255 };
256
257 function normalizePostAddress(address = {}) {
258 return {
259 id: address.id,
260 province: address.province || '',
261 city: address.city || '',
262 area: address.area || '',
263 a: address.a || '',
264 name: address.name || '',
265 phone: address.phone || '',
266 defaultFlag: address.defaultFlag
267 }
268 }
269
233 const goAddressManage = () => { 270 const goAddressManage = () => {
271 if (!allowEditAddress.value) {
272 uni.showToast({title: '重新支付订单不可修改地址', icon: 'none'})
273 return
274 }
234 uni.navigateTo({ 275 uni.navigateTo({
235 url: '/level/addressManage' 276 url: '/level/addressManage'
236 }); 277 });
...@@ -245,7 +286,7 @@ const onPayTypeChange = (e) => { ...@@ -245,7 +286,7 @@ const onPayTypeChange = (e) => {
245 286
246 const handleSubmit = async () => { 287 const handleSubmit = async () => {
247 if (!selectedAddress.value.id) { 288 if (!selectedAddress.value.id) {
248 return uni.showToast({title: '请先选择地址', icon: 'none'}); 289 return uni.showToast({title: allowEditAddress.value ? '请先选择地址' : '订单地址异常,请联系管理员', icon: 'none'});
249 } 290 }
250 291
251 console.log('支付参数:', { 292 console.log('支付参数:', {
......
...@@ -184,6 +184,7 @@ const form = ref({ ...@@ -184,6 +184,7 @@ const form = ref({
184 }) 184 })
185 const currentDelItem = ref({}) 185 const currentDelItem = ref({})
186 const delPopup = ref(null) 186 const delPopup = ref(null)
187 const AUDIT_CACHE_KEY = 'ztx_examination_audit_item'
187 188
188 onShow(() => { 189 onShow(() => {
189 if (memId.value) { 190 if (memId.value) {
...@@ -208,18 +209,26 @@ onLoad((options) => { ...@@ -208,18 +209,26 @@ onLoad((options) => {
208 209
209 } 210 }
210 userType.value = app.globalData.userType 211 userType.value = app.globalData.userType
211 if (options.item) { 212 const itemData = getAuditItem(options)
212 try { 213 if (itemData?.id) {
213 const itemData = JSON.parse(decodeURIComponent(options.item)) 214 detailForm.value = itemData
214 detailForm.value = itemData 215 photoList.value = normalizePhotos(itemData.photos)
215 photoList.value = normalizePhotos(itemData.photos)
216 } catch (e) {
217 console.error('解析审核详情失败', e)
218 }
219 } 216 }
220 console.log(userType.value) 217 console.log(userType.value)
221 }) 218 })
222 219
220 function getAuditItem(options) {
221 const cacheItem = uni.getStorageSync(AUDIT_CACHE_KEY)
222 if (cacheItem && typeof cacheItem === 'object') return cacheItem
223 if (!options.item) return {}
224 try {
225 return JSON.parse(decodeURIComponent(options.item))
226 } catch (e) {
227 console.error('解析审核详情失败', e)
228 return {}
229 }
230 }
231
223 function goBack() { 232 function goBack() {
224 uni.navigateBack() 233 uni.navigateBack()
225 } 234 }
......
...@@ -123,26 +123,44 @@ const examinerList = ref([]) ...@@ -123,26 +123,44 @@ const examinerList = ref([])
123 const photoList = ref([]) 123 const photoList = ref([])
124 const userType = ref('') 124 const userType = ref('')
125 const auditStatusMap = {1: '审核中', 2: '审核通过', 3: '审核拒绝'} 125 const auditStatusMap = {1: '审核中', 2: '审核通过', 3: '审核拒绝'}
126 const DETAIL_CACHE_KEY = 'ztx_examination_detail_item'
126 127
127 onLoad((options) => { 128 onLoad((options) => {
128 userType.value = app.globalData.userType 129 userType.value = app.globalData.userType
129 if (options.item) { 130 const itemData = getDetailItem(options)
130 try { 131 if (itemData?.id) {
131 const itemData = JSON.parse(decodeURIComponent(options.item)) 132 form.value = itemData
132 form.value = itemData 133 if (itemData.auditLogs) {
133 if (itemData.auditLogs) { 134 auditList.value = parseAuditLogs(itemData.auditLogs)
134 auditList.value = JSON.parse(itemData.auditLogs) 135 }
135 } 136 photoList.value = normalizePhotos(itemData.photos)
136 photoList.value = normalizePhotos(itemData.photos) 137 if (itemData.memId) {
137 if (itemData.memId) { 138 getExaminerList(itemData.memId)
138 getExaminerList(itemData.memId)
139 }
140 } catch (e) {
141 console.error('解析数据失败', e)
142 } 139 }
143 } 140 }
144 }) 141 })
145 142
143 function getDetailItem(options) {
144 const cacheItem = uni.getStorageSync(DETAIL_CACHE_KEY)
145 if (cacheItem && typeof cacheItem === 'object') return cacheItem
146 if (!options.item) return {}
147 try {
148 return JSON.parse(decodeURIComponent(options.item))
149 } catch (e) {
150 console.error('解析数据失败', e)
151 return {}
152 }
153 }
154
155 function parseAuditLogs(auditLogs) {
156 if (Array.isArray(auditLogs)) return auditLogs
157 try {
158 return JSON.parse(auditLogs)
159 } catch (e) {
160 return []
161 }
162 }
163
146 function getExaminerList(memId) { 164 function getExaminerList(memId) {
147 api.listInfo({memId: memId}).then(res => { 165 api.listInfo({memId: memId}).then(res => {
148 if (res.rows) { 166 if (res.rows) {
......
...@@ -185,6 +185,8 @@ const tabList = ref([ ...@@ -185,6 +185,8 @@ const tabList = ref([
185 ]) 185 ])
186 const currentTab = ref(0) 186 const currentTab = ref(0)
187 const userType = ref('') 187 const userType = ref('')
188 const DETAIL_CACHE_KEY = 'ztx_examination_detail_item'
189 const AUDIT_CACHE_KEY = 'ztx_examination_audit_item'
188 190
189 191
190 onLoad(() => { 192 onLoad(() => {
...@@ -332,6 +334,7 @@ function toggleSelect(item) { ...@@ -332,6 +334,7 @@ function toggleSelect(item) {
332 } 334 }
333 335
334 function goView(item) { 336 function goView(item) {
337 uni.setStorageSync(DETAIL_CACHE_KEY, item)
335 const itemStr = encodeURIComponent(JSON.stringify(item)) 338 const itemStr = encodeURIComponent(JSON.stringify(item))
336 uni.navigateTo({ 339 uni.navigateTo({
337 url: `/level/ztx/examinationDetail?item=${itemStr}` 340 url: `/level/ztx/examinationDetail?item=${itemStr}`
...@@ -339,6 +342,7 @@ function goView(item) { ...@@ -339,6 +342,7 @@ function goView(item) {
339 } 342 }
340 343
341 function goAudit(item) { 344 function goAudit(item) {
345 uni.setStorageSync(AUDIT_CACHE_KEY, item)
342 const itemStr = encodeURIComponent(JSON.stringify(item)) 346 const itemStr = encodeURIComponent(JSON.stringify(item))
343 uni.navigateTo({ 347 uni.navigateTo({
344 url: `/level/ztx/examinationAudit?ids=${item.id}&type=single&selfSelect=${item.selfSelect}&memId=${item.memId}&item=${itemStr}` 348 url: `/level/ztx/examinationAudit?ids=${item.id}&type=single&selfSelect=${item.selfSelect}&memId=${item.memId}&item=${itemStr}`
......
...@@ -197,11 +197,26 @@ function handleDel(row) { ...@@ -197,11 +197,26 @@ function handleDel(row) {
197 customModalRef.value.open() 197 customModalRef.value.open()
198 } 198 }
199 199
200 // 切换考官类型:打开自定义提示弹窗 200 // 切换考官类型:如果已有考官数据,先同步清空后端数据。
201 function onSelfSelectChange(e) { 201 async function onSelfSelectChange(e) {
202 form.value.selfSelect = e.detail.value 202 const nextValue = e.detail.value
203 showExamine.value = e.detail.value == '1' 203 const prevValue = form.value.selfSelect
204 list.value = [] 204 if (nextValue === prevValue) return
205 if (list.value.length > 0) {
206 uni.showLoading({title: '清空考官中'})
207 try {
208 await api.clearMyExaminer()
209 list.value = []
210 } catch (err) {
211 uni.showToast({title: err?.data?.msg || err?.msg || '清空考官失败,请稍后重试', icon: 'none'})
212 form.value.selfSelect = prevValue
213 return
214 } finally {
215 uni.hideLoading()
216 }
217 }
218 form.value.selfSelect = nextValue
219 showExamine.value = nextValue == '1'
205 searchResult.value = null 220 searchResult.value = null
206 searchNoData.value = false 221 searchNoData.value = false
207 // if (e.detail.value == '0') { 222 // if (e.detail.value == '0') {
......
1 <template> 1 <template>
2 <view> 2 <view>
3 <view class="pd30" style="padding: 30rpx 30rpx 180rpx;"> 3 <view class="pd30" style="padding: 30rpx 30rpx 180rpx;">
4 <view class="wBox"> 4 <view class="wBox">
5 <uni-forms ref="baseForm" label-width="100"> 5 <uni-forms ref="baseForm" label-width="100">
6 <uni-forms-item label="营业执照" required> 6 <uni-forms-item label="营业执照" required>
...@@ -15,30 +15,30 @@ ...@@ -15,30 +15,30 @@
15 </view> 15 </view>
16 </view> 16 </view>
17 </uni-forms-item> 17 </uni-forms-item>
18 <uni-forms-item label="营业执照名称" required> 18 <uni-forms-item label="营业执照名称" required>
19 <uni-easyinput v-model="form.companyName" :disabled="isFieldDisabled('companyName')" /> 19 <uni-easyinput v-model="form.companyName" :disabled="isFieldDisabled('companyName')" />
20 </uni-forms-item> 20 </uni-forms-item>
21 <uni-forms-item label="社会信用代码" required> 21 <uni-forms-item label="社会信用代码" required>
22 <uni-easyinput v-model="form.creditCode" :disabled="isFieldDisabled('creditCode')" /> 22 <uni-easyinput v-model="form.creditCode" :disabled="isFieldDisabled('creditCode')" />
23 </uni-forms-item> 23 </uni-forms-item>
24 <uni-forms-item label="机构名称" required> 24 <uni-forms-item label="机构名称" required>
25 <uni-easyinput v-model="form.name" :disabled="isFieldDisabled('name')" placeholder="机构名称" /> 25 <uni-easyinput v-model="form.name" :disabled="false" placeholder="机构名称" />
26 </uni-forms-item> 26 </uni-forms-item>
27 <uni-forms-item label="认证地址" required> 27 <uni-forms-item label="认证地址" required>
28 <uni-data-picker v-model="coordinates1" @change="changeCoordinates1" placeholder="请选择认证地址" 28 <uni-data-picker v-model="coordinates1" @change="changeCoordinates1" placeholder="请选择认证地址"
29 :localdata="regionsList" :readonly="isFieldDisabled('address')" :disabled="isFieldDisabled('address')"></uni-data-picker> 29 :localdata="regionsList" :readonly="isFieldDisabled('address')" :disabled="isFieldDisabled('address')"></uni-data-picker>
30 </uni-forms-item> 30 </uni-forms-item>
31 <uni-forms-item label="认证详细地址" required> 31 <uni-forms-item label="认证详细地址" required>
32 <uni-easyinput v-model="form.adress" :disabled="isFieldDisabled('adress')" placeholder="请输入详细地址" type='textarea' /> 32 <uni-easyinput v-model="form.adress" :disabled="isFieldDisabled('adress')" placeholder="请输入详细地址" type='textarea' />
33 </uni-forms-item> 33 </uni-forms-item>
34 <uni-forms-item label="所属协会" required> 34 <uni-forms-item label="所属协会" required>
35 <view style="width: 60vw;overflow:auto;"> 35 <view style="width: 60vw;overflow:auto;">
36 <uni-data-picker v-model="form.parentId" :localdata="tree" 36 <uni-data-picker v-model="form.parentId" :localdata="tree"
37 :readonly="isFieldDisabled('parentId')" :disabled="isFieldDisabled('parentId')" :clear-icon="false" placeholder="请选择协会" 37 :readonly="isFieldDisabled('parentId')" :disabled="isFieldDisabled('parentId')" :clear-icon="false" placeholder="请选择协会"
38 :map="{text:'label',value:'id'}" popup-title="" @change="changCase"> 38 :map="{text:'label',value:'id'}" popup-title="" @change="changCase">
39 </uni-data-picker> 39 </uni-data-picker>
40 </view> 40 </view>
41 </uni-forms-item> 41 </uni-forms-item>
42 <uni-forms-item label="法人身份证" required> 42 <uni-forms-item label="法人身份证" required>
43 <view class="idcard-box"> 43 <view class="idcard-box">
44 <view class="idcard-item"> 44 <view class="idcard-item">
...@@ -65,9 +65,9 @@ ...@@ -65,9 +65,9 @@
65 </view> 65 </view>
66 </view> 66 </view>
67 </uni-forms-item> 67 </uni-forms-item>
68 <uni-forms-item label="法人姓名" required> 68 <uni-forms-item label="法人姓名" required>
69 <uni-easyinput v-model="form.legal" :disabled="isFieldDisabled('legal')" /> 69 <uni-easyinput v-model="form.legal" :disabled="isFieldDisabled('legal')" />
70 </uni-forms-item> 70 </uni-forms-item>
71 <uni-forms-item label="法人证件号" required> 71 <uni-forms-item label="法人证件号" required>
72 <uni-easyinput v-model="form.legalIdcCode" :disabled="isFieldDisabled('legalIdcCode')" /> 72 <uni-easyinput v-model="form.legalIdcCode" :disabled="isFieldDisabled('legalIdcCode')" />
73 </uni-forms-item> 73 </uni-forms-item>
...@@ -89,148 +89,148 @@ ...@@ -89,148 +89,148 @@
89 </view> 89 </view>
90 </view> 90 </view>
91 </uni-forms-item> 91 </uni-forms-item>
92 <!-- <uni-forms-item v-if="form.memCode" label="会员编号" required> 92 <!-- <uni-forms-item v-if="form.memCode" label="会员编号" required>
93 <uni-easyinput v-model="form.memCode" disabled /> 93 <uni-easyinput v-model="form.memCode" disabled />
94 </uni-forms-item> --> 94 </uni-forms-item> -->
95 <view class="notice-box"> 95 <view class="notice-box">
96 <checkbox-group @change="onNoticeChange"> 96 <checkbox-group @change="onNoticeChange">
97 <label class="notice-label"> 97 <label class="notice-label">
98 <checkbox :checked="form.notice" color="#e64329" value="1"/> 98 <checkbox :checked="form.notice" color="#e64329" value="1"/>
99 <text class="notice-text">我已阅读并同意</text> 99 <text class="notice-text">我已阅读并同意</text>
100 <text class="notice-link" @click.stop="showNotice(1)">《注册须知》</text> 100 <text class="notice-link" @click.stop="showNotice(1)">《注册须知》</text>
101 <text class="notice-link" @click.stop="showNotice(2)">《入会须知》</text> 101 <text class="notice-link" @click.stop="showNotice(2)">《入会须知》</text>
102 <text class="notice-link" @click.stop="showNotice(3)">《免责声明》</text> 102 <text class="notice-link" @click.stop="showNotice(3)">《免责声明》</text>
103 </label> 103 </label>
104 </checkbox-group> 104 </checkbox-group>
105 </view> 105 </view>
106 </uni-forms> 106 </uni-forms>
107 <view class="fixedBottom"> 107 <view class="fixedBottom">
108 <button class="btn-red" :disabled="btn" :class="{disabled: btn}" @click="submit()">确定</button> 108 <button class="btn-red" :disabled="btn" :class="{disabled: btn}" @click="submit()">确定</button>
109 </view> 109 </view>
110 </view> 110 </view>
111 </view> 111 </view>
112 112
113 <uni-popup ref="verifyPopup" type="center" background-color="rgba(0,0,0,0.5)"> 113 <uni-popup ref="verifyPopup" type="center" background-color="rgba(0,0,0,0.5)">
114 <view class="custom-modal"> 114 <view class="custom-modal">
115 <view class="modal-title">提示</view> 115 <view class="modal-title">提示</view>
116 <view class="modal-content"> 116 <view class="modal-content">
117 暂未查询到相关企业信息 117 暂未查询到相关企业信息
118 </view> 118 </view>
119 <view class=" modal-content" style="color:red">企业信息异常请检查相关资料信息,确认无误后再次提交!</view> 119 <view class=" modal-content" style="color:red">企业信息异常请检查相关资料信息,确认无误后再次提交!</view>
120 <view class="modal-btns mt20"> 120 <view class="modal-btns mt20">
121 <button class="btn-cancel" @click="closeVerifyPopup()">返回修改</button> 121 <button class="btn-cancel" @click="closeVerifyPopup()">返回修改</button>
122 <button class="btn-confirm" @click="confirmSubmit()">确认无误</button> 122 <button class="btn-confirm" @click="confirmSubmit()">确认无误</button>
123 </view> 123 </view>
124 </view> 124 </view>
125 </uni-popup> 125 </uni-popup>
126 126
127 <uni-popup ref="applyPopup" type="center" background-color="rgba(0,0,0,0.5)"> 127 <uni-popup ref="applyPopup" type="center" background-color="rgba(0,0,0,0.5)">
128 <view class="custom-modal apply-modal"> 128 <view class="custom-modal apply-modal">
129 <view class="modal-title">考点申请</view> 129 <view class="modal-title">考点申请</view>
130 <view class="modal-btns apply-btns"> 130 <view class="modal-btns apply-btns">
131 <button class="btn-cancel" @click="closeApplyPopup()">暂不申请</button> 131 <button class="btn-cancel" @click="closeApplyPopup()">暂不申请</button>
132 <button class="btn-confirm" @click="confirmApply()">立即申请</button> 132 <button class="btn-confirm" @click="confirmApply()">立即申请</button>
133 </view> 133 </view>
134 <view class="modal-tip">友情提示:非考点无法申请级位考试</view> 134 <view class="modal-tip">友情提示:非考点无法申请级位考试</view>
135 </view> 135 </view>
136 </uni-popup> 136 </uni-popup>
137 137
138 <uni-popup ref="unpaidPopup" type="center" :mask-click="false"> 138 <uni-popup ref="unpaidPopup" type="center" :mask-click="false">
139 <view class="custom-modal"> 139 <view class="custom-modal">
140 <view class="modal-title">系统提示</view> 140 <view class="modal-title">系统提示</view>
141 <view class="modal-content">您有一笔订单尚未支付,请及时支付或取消订单。</view> 141 <view class="modal-content">您有一笔订单尚未支付,请及时支付或取消订单。</view>
142 <view class="modal-btns"> 142 <view class="modal-btns">
143 <button class="btn-cancel" @click="closeUnpaidPopup()">取消订单</button> 143 <button class="btn-cancel" @click="closeUnpaidPopup()">取消订单</button>
144 <button class="btn-confirm" @click="goToPay()">去支付</button> 144 <button class="btn-confirm" @click="goToPay()">去支付</button>
145 </view> 145 </view>
146 </view> 146 </view>
147 </uni-popup> 147 </uni-popup>
148 </view> 148 </view>
149 </template> 149 </template>
150 150
151 <script setup> 151 <script setup>
152 import { 152 import {
153 ref, 153 ref,
154 reactive, 154 reactive,
155 computed 155 computed
156 } from 'vue'; 156 } from 'vue';
157 import * as api from '@/common/api.js'; 157 import * as api from '@/common/api.js';
158 import _ from 'underscore' 158 import _ from 'underscore'
159 import { 159 import {
160 onLoad, 160 onLoad,
161 onShow 161 onShow
162 } from '@dcloudio/uni-app'; 162 } from '@dcloudio/uni-app';
163 import config from '@/config.js' 163 import config from '@/config.js'
164 import { fillImgUrl, reLaunchHomeByRole } from '@/common/utils.js' 164 import { fillImgUrl, reLaunchHomeByRole } from '@/common/utils.js'
165 const app = getApp(); 165 const app = getApp();
166 166
167 const verifyPopup = ref(null) 167 const verifyPopup = ref(null)
168 const applyPopup = ref(null) 168 const applyPopup = ref(null)
169 const unpaidPopup = ref(null) 169 const unpaidPopup = ref(null)
170 const verifyResult = ref({}) 170 const verifyResult = ref({})
171 const payForm = ref({}) 171 const payForm = ref({})
172 172
173 const form = ref({ 173 const form = ref({
174 type: '1', 174 type: '1',
175 applyPoints: '0', 175 applyPoints: '0',
176 renewYear: 1, 176 renewYear: 1,
177 legalIdcCode: '', 177 legalIdcCode: '',
178 notice: false 178 notice: false
179 }); 179 });
180 const years = ref(['1', '2', '3', '4', '5']) 180 const years = ref(['1', '2', '3', '4', '5'])
181 const yesno = ref([{ 181 const yesno = ref([{
182 value: '0', 182 value: '0',
183 text: '否' 183 text: '否'
184 }, { 184 }, {
185 value: '1', 185 value: '1',
186 text: '是' 186 text: '是'
187 }]) 187 }])
188 const memberFee = ref('') 188 const memberFee = ref('')
189 const preferentialPolicy = ref(false) 189 const preferentialPolicy = ref(false)
190 const preferentialData = ref({}) 190 const preferentialData = ref({})
191 const ocrLockedFields = ref({}) 191 const ocrLockedFields = ref({})
192 const typeList = ref([{ 192 const typeList = ref([{
193 value: '1', 193 value: '1',
194 text: '企业' 194 text: '企业'
195 }, 195 },
196 { 196 {
197 value: '2', 197 value: '2',
198 text: '国家组织' 198 text: '国家组织'
199 }, 199 },
200 { 200 {
201 value: '3', 201 value: '3',
202 text: '社会组织' 202 text: '社会组织'
203 }, 203 },
204 { 204 {
205 value: '4', 205 value: '4',
206 text: '其他' 206 text: '其他'
207 } 207 }
208 ]) 208 ])
209 const regionArr = ref(); 209 const regionArr = ref();
210 const regionsList = ref([]); 210 const regionsList = ref([]);
211 const tree = ref([]); 211 const tree = ref([]);
212 const showDirectly = ref(true) 212 const showDirectly = ref(true)
213 const directUnderFlag = ref(0) 213 const directUnderFlag = ref(0)
214 const current = ref(0); 214 const current = ref(0);
215 const groupId = ref(0); 215 const groupId = ref(0);
216 const currIndex = ref(null); 216 const currIndex = ref(null);
217 const signType = ref(); 217 const signType = ref();
218 const editIng = ref(true); 218 const editIng = ref(true);
219 const isSign = ref(false); 219 const isSign = ref(false);
220 const type = ref(false) 220 const type = ref(false)
221 const btn = ref(false) 221 const btn = ref(false)
222 const flag = ref(false) 222 const flag = ref(false)
223 const result = ref(false) 223 const result = ref(false)
224 const query = ref({ 224 const query = ref({
225 type: 0 225 type: 0
226 }); 226 });
227 const activeStatus = ref(0) 227 const activeStatus = ref(0)
228 const active = ref(0) 228 const active = ref(0)
229 const memberInfo = ref({}) 229 const memberInfo = ref({})
230 const authenticationStatus = ref() 230 const authenticationStatus = ref()
231 const authenticationStatusa = ref() 231 const authenticationStatusa = ref()
232 const newResult = ref(false) 232 const newResult = ref(false)
233 const belongProvinceId = ref() 233 const belongProvinceId = ref()
234 const picArr = ref([]) 234 const picArr = ref([])
235 const list1 = ref([{ 235 const list1 = ref([{
236 title: '完善信息' 236 title: '完善信息'
...@@ -275,13 +275,13 @@ ...@@ -275,13 +275,13 @@
275 function hasValue(value) { 275 function hasValue(value) {
276 return value !== undefined && value !== null && String(value).trim() !== '' 276 return value !== undefined && value !== null && String(value).trim() !== ''
277 } 277 }
278 278
279 function lockOcrField(field, value) { 279 function lockOcrField(field, value) {
280 if (value !== undefined && value !== null && String(value).trim() !== '') { 280 if (value !== undefined && value !== null && String(value).trim() !== '') {
281 ocrLockedFields.value[field] = true 281 ocrLockedFields.value[field] = true
282 } 282 }
283 } 283 }
284 284
285 function unlockOcrFields() { 285 function unlockOcrFields() {
286 ocrLockedFields.value = {} 286 ocrLockedFields.value = {}
287 } 287 }
...@@ -297,17 +297,17 @@ ...@@ -297,17 +297,17 @@
297 ocrLockedFields.value.parentId = true 297 ocrLockedFields.value.parentId = true
298 } 298 }
299 } 299 }
300 300
301 onLoad(option => { 301 onLoad(option => {
302 if (app.globalData.isLogin) { 302 if (app.globalData.isLogin) {
303 init() 303 init()
304 } else { 304 } else {
305 app.firstLoadCallback = () => { 305 app.firstLoadCallback = () => {
306 init() 306 init()
307 }; 307 };
308 } 308 }
309 }); 309 });
310 310
311 async function init() { 311 async function init() {
312 await Promise.all([ 312 await Promise.all([
313 getRegionsList(), 313 getRegionsList(),
...@@ -316,24 +316,24 @@ ...@@ -316,24 +316,24 @@
316 await getForm() 316 await getForm()
317 await canUseDiscountApi() 317 await canUseDiscountApi()
318 await getZtxDiscountPolicyApi() 318 await getZtxDiscountPolicyApi()
319 handelGetMyRecent() 319 handelGetMyRecent()
320 } 320 }
321 321
322 async function getMyMemberCertUnitFeeApi() { 322 async function getMyMemberCertUnitFeeApi() {
323 const res = await api.getMyMemberCertUnitFee() 323 const res = await api.getMyMemberCertUnitFee()
324 memberFee.value = res.data 324 memberFee.value = res.data
325 } 325 }
326 326
327 async function canUseDiscountApi() { 327 async function canUseDiscountApi() {
328 const res = await api.canUseDiscount() 328 const res = await api.canUseDiscount()
329 preferentialPolicy.value = res.data 329 preferentialPolicy.value = res.data
330 } 330 }
331 331
332 async function getZtxDiscountPolicyApi() { 332 async function getZtxDiscountPolicyApi() {
333 const res = await api.getZtxDiscountPolicy() 333 const res = await api.getZtxDiscountPolicy()
334 preferentialData.value = res.data 334 preferentialData.value = res.data
335 } 335 }
336 336
337 async function getForm() { 337 async function getForm() {
338 const res = await api.getMyOwnMemberInfo() 338 const res = await api.getMyOwnMemberInfo()
339 if (!res.data.memberInfo) res.data.memberInfo = {} 339 if (!res.data.memberInfo) res.data.memberInfo = {}
...@@ -341,38 +341,38 @@ ...@@ -341,38 +341,38 @@
341 newResult.value = res.data.newResult 341 newResult.value = res.data.newResult
342 result.value = res.data.result 342 result.value = res.data.result
343 authenticationStatusa.value = res.data.authenticationStatus 343 authenticationStatusa.value = res.data.authenticationStatus
344 showDirectly.value = !res.data.memberInfo.associateId 344 showDirectly.value = !res.data.memberInfo.associateId
345 activeStatus.value = res.data.memberInfo.activeStatus 345 activeStatus.value = res.data.memberInfo.activeStatus
346 directUnderFlag.value = res.data.memberInfo.directUnderFlag 346 directUnderFlag.value = res.data.memberInfo.directUnderFlag
347 347
348 if (authenticationStatusa.value == 1 || authenticationStatusa.value == 2 || authenticationStatusa.value == 5) { 348 if (authenticationStatusa.value == 1 || authenticationStatusa.value == 2 || authenticationStatusa.value == 5) {
349 type.value = true 349 type.value = true
350 } else { 350 } else {
351 type.value = false 351 type.value = false
352 } 352 }
353 btn.value = authenticationStatusa.value == 1 353 btn.value = authenticationStatusa.value == 1
354 354
355 if (authenticationStatusa.value != 0) { 355 if (authenticationStatusa.value != 0) {
356 flag.value = newResult.value 356 flag.value = newResult.value
357 } 357 }
358 358
359 form.value = { 359 form.value = {
360 ...res.data.dept, 360 ...res.data.dept,
361 ...res.data.memberInfo 361 ...res.data.memberInfo
362 } 362 }
363 form.value.deptType = res.data.dept.deptType 363 form.value.deptType = res.data.dept.deptType
364 form.value.parentId = form.value.parentId ?? '' 364 form.value.parentId = form.value.parentId ?? ''
365 // creditCode.value = form.value.creditCode 365 // creditCode.value = form.value.creditCode
366 // form.value.companyName = res.data.memberInfo.companyName 366 // form.value.companyName = res.data.memberInfo.companyName
367 // belongProvinceId.value = form.value.belongProvinceId 367 // belongProvinceId.value = form.value.belongProvinceId
368 // parentId.value = form.value.parentId 368 // parentId.value = form.value.parentId
369 369
370 coordinates1.value = [] 370 coordinates1.value = []
371 if (form.value.provinceId) coordinates1.value.push(form.value.provinceId) 371 if (form.value.provinceId) coordinates1.value.push(form.value.provinceId)
372 if (form.value.cityId) coordinates1.value.push(form.value.cityId) 372 if (form.value.cityId) coordinates1.value.push(form.value.cityId)
373 if (form.value.regionId) coordinates1.value.push(form.value.regionId) 373 if (form.value.regionId) coordinates1.value.push(form.value.regionId)
374 form.value.coordinates1 = coordinates1.value 374 form.value.coordinates1 = coordinates1.value
375 375
376 if (form.value.businessLicense) { 376 if (form.value.businessLicense) {
377 form.value.businessLicense = form.value.businessLicense 377 form.value.businessLicense = form.value.businessLicense
378 } 378 }
...@@ -390,8 +390,8 @@ ...@@ -390,8 +390,8 @@
390 picArr.value.push(p) 390 picArr.value.push(p)
391 }) 391 })
392 } 392 }
393 } 393 }
394 394
395 if (!form.value.applyPoints || form.value.applyPoints == '') { 395 if (!form.value.applyPoints || form.value.applyPoints == '') {
396 form.value.applyPoints = '0' 396 form.value.applyPoints = '0'
397 } 397 }
...@@ -408,7 +408,7 @@ ...@@ -408,7 +408,7 @@
408 pictures.value = form.value.pictures 408 pictures.value = form.value.pictures
409 legalIdcPhoto.value = [legalIdcPhoto1.value, legalIdcPhoto2.value] 409 legalIdcPhoto.value = [legalIdcPhoto1.value, legalIdcPhoto2.value]
410 } 410 }
411 411
412 function getTree() { 412 function getTree() {
413 return api.certifiedDeptTreeRegister({ 413 return api.certifiedDeptTreeRegister({
414 selfDeptId: -1, 414 selfDeptId: -1,
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
429 regionsList.value = res.data; 429 regionsList.value = res.data;
430 }); 430 });
431 } 431 }
432 432
433 // 核心:修改submit方法,改用自定义弹窗 433 // 核心:修改submit方法,改用自定义弹窗
434 async function submit() { 434 async function submit() {
435 if (btn.value) { 435 if (btn.value) {
...@@ -440,48 +440,48 @@ ...@@ -440,48 +440,48 @@
440 return 440 return
441 } 441 }
442 // 基础表单验证 442 // 基础表单验证
443 if (!form.value.businessLicense) { 443 if (!form.value.businessLicense) {
444 uni.showToast({ 444 uni.showToast({
445 title: '请上传营业执照', 445 title: '请上传营业执照',
446 icon: 'none' 446 icon: 'none'
447 }) 447 })
448 return 448 return
449 } 449 }
450 if (form.value.companyName == '') { 450 if (form.value.companyName == '') {
451 uni.showToast({ 451 uni.showToast({
452 title: '请填写营业执照名称', 452 title: '请填写营业执照名称',
453 icon: 'none' 453 icon: 'none'
454 }) 454 })
455 return 455 return
456 } 456 }
457 if (form.value.creditCode == '') { 457 if (form.value.creditCode == '') {
458 uni.showToast({ 458 uni.showToast({
459 title: '请填写社会信用代码', 459 title: '请填写社会信用代码',
460 icon: 'none' 460 icon: 'none'
461 }) 461 })
462 return 462 return
463 } 463 }
464 if (form.value.name == '') { 464 if (form.value.name == '') {
465 uni.showToast({ 465 uni.showToast({
466 title: '请填写机构名称', 466 title: '请填写机构名称',
467 icon: 'none' 467 icon: 'none'
468 }) 468 })
469 return 469 return
470 } 470 }
471 if (!coordinates1.value.length) { 471 if (!coordinates1.value.length) {
472 uni.showToast({ 472 uni.showToast({
473 title: '请选择认证地址', 473 title: '请选择认证地址',
474 icon: 'none' 474 icon: 'none'
475 }) 475 })
476 return 476 return
477 } 477 }
478 if (form.value.adress == '') { 478 if (form.value.adress == '') {
479 uni.showToast({ 479 uni.showToast({
480 title: '请填写认证详细地址', 480 title: '请填写认证详细地址',
481 icon: 'none' 481 icon: 'none'
482 }) 482 })
483 return 483 return
484 } 484 }
485 if (form.value.parentId == -1 || form.value.parentId == 0) { 485 if (form.value.parentId == -1 || form.value.parentId == 0) {
486 uni.showToast({ 486 uni.showToast({
487 title: '请选择所属协会', 487 title: '请选择所属协会',
...@@ -500,17 +500,17 @@ ...@@ -500,17 +500,17 @@
500 if (legalIdcPhoto1.value == '' || legalIdcPhoto2.value == '') { 500 if (legalIdcPhoto1.value == '' || legalIdcPhoto2.value == '') {
501 uni.showToast({ 501 uni.showToast({
502 title: '请上传法人身份证', 502 title: '请上传法人身份证',
503 icon: 'none' 503 icon: 'none'
504 }) 504 })
505 return 505 return
506 } 506 }
507 if (form.value.legal == '') { 507 if (form.value.legal == '') {
508 uni.showToast({ 508 uni.showToast({
509 title: '请填写法人姓名', 509 title: '请填写法人姓名',
510 icon: 'none' 510 icon: 'none'
511 }) 511 })
512 return 512 return
513 } 513 }
514 if (form.value.legalIdcCode == '') { 514 if (form.value.legalIdcCode == '') {
515 uni.showToast({ 515 uni.showToast({
516 title: '请填写法人证件号', 516 title: '请填写法人证件号',
...@@ -525,160 +525,160 @@ ...@@ -525,160 +525,160 @@
525 }) 525 })
526 return 526 return
527 } 527 }
528 if (form.value.siteContact == '') { 528 if (form.value.siteContact == '') {
529 uni.showToast({ 529 uni.showToast({
530 title: '请填写联系人', 530 title: '请填写联系人',
531 icon: 'none' 531 icon: 'none'
532 }) 532 })
533 return 533 return
534 } 534 }
535 if (form.value.siteTel == '') { 535 if (form.value.siteTel == '') {
536 uni.showToast({ 536 uni.showToast({
537 title: '请填写联系方式', 537 title: '请填写联系方式',
538 icon: 'none' 538 icon: 'none'
539 }) 539 })
540 return 540 return
541 } 541 }
542 if (picArr.value.length == 0) { 542 if (picArr.value.length == 0) {
543 uni.showToast({ 543 uni.showToast({
544 title: '请上传机构照片', 544 title: '请上传机构照片',
545 icon: 'none' 545 icon: 'none'
546 }) 546 })
547 return 547 return
548 } 548 }
549 if (!form.value.notice) { 549 if (!form.value.notice) {
550 uni.showToast({ 550 uni.showToast({
551 title: '请阅读并同意注册须知、入会须知、免责声明', 551 title: '请阅读并同意注册须知、入会须知、免责声明',
552 icon: 'none' 552 icon: 'none'
553 }) 553 })
554 return 554 return
555 } 555 }
556 const creditCodeOk = await onCreditCodeBlur(true) 556 const creditCodeOk = await onCreditCodeBlur(true)
557 if (!creditCodeOk) return 557 if (!creditCodeOk) return
558 558
559 // 检查是否有未支付订单 559 // 检查是否有未支付订单
560 try { 560 try {
561 await handelGetMyRecent() 561 await handelGetMyRecent()
562 } catch (e) { 562 } catch (e) {
563 return 563 return
564 } 564 }
565 565
566 try { 566 try {
567 const res = await handelVerify() 567 const res = await handelVerify()
568 verifyResult.value = res 568 verifyResult.value = res
569 569
570 if (!res.passFlag) { 570 if (!res.passFlag) {
571 // 打开自定义弹窗(替代原有showModal) 571 // 打开自定义弹窗(替代原有showModal)
572 verifyPopup.value.open() 572 verifyPopup.value.open()
573 return 573 return
574 } 574 }
575 575
576 submitData() 576 submitData()
577 577
578 } catch (error) { 578 } catch (error) {
579 uni.showToast({ 579 uni.showToast({
580 title: error.message || '验证失败,请重试', 580 title: error.message || '验证失败,请重试',
581 icon: 'none' 581 icon: 'none'
582 }) 582 })
583 } 583 }
584 } 584 }
585 585
586 // 新增:关闭验证弹窗 586 // 新增:关闭验证弹窗
587 function closeVerifyPopup() { 587 function closeVerifyPopup() {
588 verifyPopup.value.close() 588 verifyPopup.value.close()
589 } 589 }
590 590
591 // 新增:确认无误提交 591 // 新增:确认无误提交
592 function confirmSubmit() { 592 function confirmSubmit() {
593 verifyPopup.value.close() 593 verifyPopup.value.close()
594 submitData() 594 submitData()
595 } 595 }
596 596
597 // 新增:关闭未支付订单弹窗 597 // 新增:关闭未支付订单弹窗
598 function closeUnpaidPopup() { 598 function closeUnpaidPopup() {
599 unpaidPopup.value.close() 599 unpaidPopup.value.close()
600 handelCancelOrder() 600 handelCancelOrder()
601 } 601 }
602 602
603 // 新增:去支付 603 // 新增:去支付
604 function goToPay() { 604 function goToPay() {
605 unpaidPopup.value.close() 605 unpaidPopup.value.close()
606 uni.navigateTo({ 606 uni.navigateTo({
607 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&orderId=${payForm.value.id}` 607 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&orderId=${payForm.value.id}`
608 }) 608 })
609 } 609 }
610 610
611 // 新增:获取最近认证记录,判断是否有未支付订单 611 // 新增:获取最近认证记录,判断是否有未支付订单
612 function handelGetMyRecent() { 612 function handelGetMyRecent() {
613 return new Promise(async (resolve, reject) => { 613 return new Promise(async (resolve, reject) => {
614 const res = await api.getMyRecent() ?? {} 614 const res = await api.getMyRecent() ?? {}
615 payForm.value = res.data?.comOrder ?? {} 615 payForm.value = res.data?.comOrder ?? {}
616 if (payForm.value.content) payForm.value.content = JSON.parse(payForm.value.content) 616 if (payForm.value.content) payForm.value.content = JSON.parse(payForm.value.content)
617 if (payForm.value.payStatus === '0') { 617 if (payForm.value.payStatus === '0') {
618 unpaidPopup.value.open() 618 unpaidPopup.value.open()
619 return reject(res) 619 return reject(res)
620 } else { 620 } else {
621 return resolve(true) 621 return resolve(true)
622 } 622 }
623 }) 623 })
624 } 624 }
625 625
626 // 新增:取消订单 626 // 新增:取消订单
627 async function handelCancelOrder() { 627 async function handelCancelOrder() {
628 if (!payForm.value.id) return 628 if (!payForm.value.id) return
629 uni.showLoading({ title: '取消中...' }) 629 uni.showLoading({ title: '取消中...' })
630 try { 630 try {
631 await api.cancelOrder(payForm.value.id) 631 await api.cancelOrder(payForm.value.id)
632 uni.showToast({ title: '取消成功', icon: 'success' }) 632 uni.showToast({ title: '取消成功', icon: 'success' })
633 await init() 633 await init()
634 } catch (e) { 634 } catch (e) {
635 uni.showToast({ title: '取消失败', icon: 'none' }) 635 uni.showToast({ title: '取消失败', icon: 'none' })
636 } finally { 636 } finally {
637 uni.hideLoading() 637 uni.hideLoading()
638 } 638 }
639 } 639 }
640 640
641 // 新增:打开考点申请弹窗(备用,如需调用可加触发逻辑) 641 // 新增:打开考点申请弹窗(备用,如需调用可加触发逻辑)
642 function openApplyPopup() { 642 function openApplyPopup() {
643 applyPopup.value.open() 643 applyPopup.value.open()
644 } 644 }
645 645
646 // 新增:关闭考点申请弹窗 646 // 新增:关闭考点申请弹窗
647 function closeApplyPopup() { 647 function closeApplyPopup() {
648 applyPopup.value.close() 648 applyPopup.value.close()
649 } 649 }
650 650
651 // 新增:确认考点申请 651 // 新增:确认考点申请
652 function confirmApply() { 652 function confirmApply() {
653 applyPopup.value.close() 653 applyPopup.value.close()
654 // 此处添加考点申请逻辑 654 // 此处添加考点申请逻辑
655 } 655 }
656 656
657 // 企业信息验证 657 // 企业信息验证
658 function handelVerify() { 658 function handelVerify() {
659 return new Promise(async (resolve, reject) => { 659 return new Promise(async (resolve, reject) => {
660 if (!form.value.legalIdcCode || !form.value.legal) { 660 if (!form.value.legalIdcCode || !form.value.legal) {
661 return reject(new Error('请重新上传身份证并填写法人证件号')) 661 return reject(new Error('请重新上传身份证并填写法人证件号'))
662 } 662 }
663 if (!form.value.companyName || !form.value.creditCode) { 663 if (!form.value.companyName || !form.value.creditCode) {
664 return reject(new Error('请重新上传营业执照并填写营业执照名称')) 664 return reject(new Error('请重新上传营业执照并填写营业执照名称'))
665 } 665 }
666 666
667 try { 667 try {
668 const res = await api.checkBusinessLicense({ 668 const res = await api.checkBusinessLicense({
669 creditCode: form.value.creditCode, 669 creditCode: form.value.creditCode,
670 companyName: form.value.companyName, 670 companyName: form.value.companyName,
671 legalIdcCode: form.value.legalIdcCode, 671 legalIdcCode: form.value.legalIdcCode,
672 legal: form.value.legal 672 legal: form.value.legal
673 }) 673 })
674 if (res.code == 200) { 674 if (res.code == 200) {
675 resolve(res.data) 675 resolve(res.data)
676 } else { 676 } else {
677 reject(new Error(res.msg || '企业信息验证失败')) 677 reject(new Error(res.msg || '企业信息验证失败'))
678 } 678 }
679 } catch (e) { 679 } catch (e) {
680 reject(new Error('验证接口调用失败,请检查网络')) 680 reject(new Error('验证接口调用失败,请检查网络'))
681 } 681 }
682 }) 682 })
683 } 683 }
684 684
...@@ -731,11 +731,11 @@ ...@@ -731,11 +731,11 @@
731 // 数据提交核心逻辑 731 // 数据提交核心逻辑
732 function submitData() { 732 function submitData() {
733 const dataInfo = { 733 const dataInfo = {
734 parentId: form.value.parentId, 734 parentId: form.value.parentId,
735 creditCode: form.value.creditCode, 735 creditCode: form.value.creditCode,
736 legal: form.value.legal, 736 legal: form.value.legal,
737 businessLicense: form.value.businessLicense, 737 businessLicense: form.value.businessLicense,
738 pictures: picArr.value.toString(), 738 pictures: picArr.value.toString(),
739 memId: form.value.memId, 739 memId: form.value.memId,
740 id: form.value.deptId, 740 id: form.value.deptId,
741 name: form.value.name, 741 name: form.value.name,
...@@ -743,71 +743,71 @@ ...@@ -743,71 +743,71 @@
743 cityId: form.value.cityId, 743 cityId: form.value.cityId,
744 provinceId: form.value.provinceId, 744 provinceId: form.value.provinceId,
745 adress: form.value.adress, 745 adress: form.value.adress,
746 belongProvinceId: form.value.belongProvinceId, 746 belongProvinceId: form.value.belongProvinceId,
747 deptType: form.value.deptType, 747 deptType: form.value.deptType,
748 legalIdcPhoto: [legalIdcPhoto1.value, legalIdcPhoto2.value]?.join(','), 748 legalIdcPhoto: [legalIdcPhoto1.value, legalIdcPhoto2.value]?.join(','),
749 legalIdcCode: form.value.legalIdcCode, 749 legalIdcCode: form.value.legalIdcCode,
750 companyName: form.value.companyName, 750 companyName: form.value.companyName,
751 applyPoints: form.value.applyPoints, 751 applyPoints: form.value.applyPoints,
752 siteContact: form.value.siteContact, 752 siteContact: form.value.siteContact,
753 siteTel: form.value.siteTel 753 siteTel: form.value.siteTel
754 } 754 }
755 755
756 if (activeStatus.value == 0) { 756 if (activeStatus.value == 0) {
757 api.active(dataInfo).then(res => { 757 api.active(dataInfo).then(res => {
758 uni.showModal({ 758 uni.showModal({
759 content: '激活成功,返回首页', 759 content: '激活成功,返回首页',
760 success: function(resp) { 760 success: function(resp) {
761 if (resp.confirm) { 761 if (resp.confirm) {
762 reLaunchHomeByRole() 762 reLaunchHomeByRole()
763 } else { 763 } else {
764 uni.navigateBack() 764 uni.navigateBack()
765 } 765 }
766 } 766 }
767 }) 767 })
768 }).catch(err => { 768 }).catch(err => {
769 uni.showToast({ 769 uni.showToast({
770 title: '激活失败,请重试', 770 title: '激活失败,请重试',
771 icon: 'none' 771 icon: 'none'
772 }) 772 })
773 }) 773 })
774 } else { 774 } else {
775 api.editMyMemberCertifiedInfo(dataInfo).then(res => { 775 api.editMyMemberCertifiedInfo(dataInfo).then(res => {
776 // 使用完整的协会路径名称 776 // 使用完整的协会路径名称
777 uni.navigateTo({ 777 uni.navigateTo({
778 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoFullName.value)}` 778 url: `/myCenter/goPay?payName=${encodeURIComponent(form.value.name || '')}&assoName=${encodeURIComponent(assoFullName.value)}`
779 }) 779 })
780 780
781 }).catch(err => { 781 }).catch(err => {
782 uni.showToast({ 782 uni.showToast({
783 title: '提交失败,请重试', 783 title: '提交失败,请重试',
784 icon: 'none' 784 icon: 'none'
785 }) 785 })
786 }) 786 })
787 } 787 }
788 } 788 }
789 789
790 // 根据协会ID获取协会名称 790 // 根据协会ID获取协会名称
791 function getAssoName(parentId) { 791 function getAssoName(parentId) {
792 if (!parentId || !tree.value || tree.value.length === 0) { 792 if (!parentId || !tree.value || tree.value.length === 0) {
793 return '' 793 return ''
794 } 794 }
795 // 递归查找协会名称 795 // 递归查找协会名称
796 function findInTree(list) { 796 function findInTree(list) {
797 for (const item of list) { 797 for (const item of list) {
798 if ((item.id ?? item.value)?.toString() === parentId?.toString()) { 798 if ((item.id ?? item.value)?.toString() === parentId?.toString()) {
799 return item.label || '' 799 return item.label || ''
800 } 800 }
801 if (item.children && item.children.length > 0) { 801 if (item.children && item.children.length > 0) {
802 const found = findInTree(item.children) 802 const found = findInTree(item.children)
803 if (found) return found 803 if (found) return found
804 } 804 }
805 } 805 }
806 return null 806 return null
807 } 807 }
808 return findInTree(tree.value) || '' 808 return findInTree(tree.value) || ''
809 } 809 }
810 810
811 // 协会选择 - 获取完整路径名称 811 // 协会选择 - 获取完整路径名称
812 function changCase(e) { 812 function changCase(e) {
813 if (isFieldDisabled('parentId')) return 813 if (isFieldDisabled('parentId')) return
...@@ -817,13 +817,13 @@ ...@@ -817,13 +817,13 @@
817 form.value.parentId = lastNode?.value ?? lastNode?.id ?? lastNode ?? ''; 817 form.value.parentId = lastNode?.value ?? lastNode?.id ?? lastNode ?? '';
818 console.log('最终提交的parentId:', form.value.parentId); 818 console.log('最终提交的parentId:', form.value.parentId);
819 assoFullName.value = getAssoFullName(valueArr) 819 assoFullName.value = getAssoFullName(valueArr)
820 console.log('协会完整路径:', assoFullName.value); 820 console.log('协会完整路径:', assoFullName.value);
821 } 821 }
822 822
823 // 获取协会完整路径名称 823 // 获取协会完整路径名称
824 function getAssoFullName(valueArr) { 824 function getAssoFullName(valueArr) {
825 if (!valueArr || valueArr.length === 0) return '' 825 if (!valueArr || valueArr.length === 0) return ''
826 // valueArr 是 {value: id} 数组 826 // valueArr 是 {value: id} 数组
827 const names = [] 827 const names = []
828 let currentLevel = tree.value 828 let currentLevel = tree.value
829 for (const item of valueArr) { 829 for (const item of valueArr) {
...@@ -832,13 +832,13 @@ ...@@ -832,13 +832,13 @@
832 if (found) { 832 if (found) {
833 names.push(found.label) 833 names.push(found.label)
834 currentLevel = found.children 834 currentLevel = found.children
835 } else { 835 } else {
836 break 836 break
837 } 837 }
838 } 838 }
839 return names.join('/') 839 return names.join('/')
840 } 840 }
841 841
842 // 查找协会节点及其父路径 842 // 查找协会节点及其父路径
843 function findAssoNodeWithPath(list, targetId, currentPath) { 843 function findAssoNodeWithPath(list, targetId, currentPath) {
844 for (const item of list) { 844 for (const item of list) {
...@@ -846,10 +846,10 @@ ...@@ -846,10 +846,10 @@
846 if ((item.value || item.id)?.toString() === targetId?.toString()) { 846 if ((item.value || item.id)?.toString() === targetId?.toString()) {
847 return { node: item, path: newPath } 847 return { node: item, path: newPath }
848 } 848 }
849 if (item.children && item.children.length > 0) { 849 if (item.children && item.children.length > 0) {
850 const found = findAssoNodeWithPath(item.children, targetId, newPath) 850 const found = findAssoNodeWithPath(item.children, targetId, newPath)
851 if (found) return found 851 if (found) return found
852 } 852 }
853 } 853 }
854 return null 854 return null
855 } 855 }
...@@ -957,17 +957,17 @@ ...@@ -957,17 +957,17 @@
957 957
958 // 恢复协会完整路径名称 958 // 恢复协会完整路径名称
959 function restoreAssoFullName() { 959 function restoreAssoFullName() {
960 if (!form.value.parentId || !tree.value || tree.value.length === 0) { 960 if (!form.value.parentId || !tree.value || tree.value.length === 0) {
961 return 961 return
962 } 962 }
963 // 查找节点及其路径 963 // 查找节点及其路径
964 const result = findAssoNodeWithPath(tree.value, form.value.parentId, []) 964 const result = findAssoNodeWithPath(tree.value, form.value.parentId, [])
965 if (result) { 965 if (result) {
966 // 使用路径数组重建完整名称 966 // 使用路径数组重建完整名称
967 assoFullName.value = getAssoFullName(result.path.map(id => ({ value: id }))) 967 assoFullName.value = getAssoFullName(result.path.map(id => ({ value: id })))
968 } 968 }
969 } 969 }
970 970
971 function changeCoordinates1(e) { 971 function changeCoordinates1(e) {
972 if (isFieldDisabled('address')) return 972 if (isFieldDisabled('address')) return
973 const selectedValue = e?.detail?.value || e || [] 973 const selectedValue = e?.detail?.value || e || []
...@@ -1009,10 +1009,10 @@ ...@@ -1009,10 +1009,10 @@
1009 uni.hideLoading() 1009 uni.hideLoading()
1010 }).catch(err => { 1010 }).catch(err => {
1011 uni.hideLoading() 1011 uni.hideLoading()
1012 uni.showToast({ 1012 uni.showToast({
1013 title: '上传失败', 1013 title: '上传失败',
1014 icon: 'none' 1014 icon: 'none'
1015 }) 1015 })
1016 }) 1016 })
1017 } 1017 }
1018 1018
...@@ -1132,40 +1132,40 @@ ...@@ -1132,40 +1132,40 @@
1132 } 1132 }
1133 form.value.businessLicense = JSON.stringify([selectFileValue]) 1133 form.value.businessLicense = JSON.stringify([selectFileValue])
1134 uni.hideLoading() 1134 uni.hideLoading()
1135 } catch (err) { 1135 } catch (err) {
1136 uni.hideLoading() 1136 uni.hideLoading()
1137 uni.showToast({ 1137 uni.showToast({
1138 title: '上传失败', 1138 title: '上传失败',
1139 icon: 'none' 1139 icon: 'none'
1140 }) 1140 })
1141 } 1141 }
1142 } 1142 }
1143 1143
1144 function delSupplementFile() { 1144 function delSupplementFile() {
1145 clearBusinessLicenseUpload() 1145 clearBusinessLicenseUpload()
1146 unlockOcrFields() 1146 unlockOcrFields()
1147 lockParentIdField() 1147 lockParentIdField()
1148 } 1148 }
1149 1149
1150 function getBusinessLicenseOcr(filePath) { 1150 function getBusinessLicenseOcr(filePath) {
1151 if (!filePath) return Promise.resolve(null) 1151 if (!filePath) return Promise.resolve(null)
1152 return new Promise((resolve) => { 1152 return new Promise((resolve) => {
1153 uni.uploadFile({ 1153 uni.uploadFile({
1154 url: config.baseUrl_api + '/member/info/getBusinessLicense', 1154 url: config.baseUrl_api + '/member/info/getBusinessLicense',
1155 filePath, 1155 filePath,
1156 name: 'pic', 1156 name: 'pic',
1157 header: { 1157 header: {
1158 'Authorization': uni.getStorageSync('token') 1158 'Authorization': uni.getStorageSync('token')
1159 }, 1159 },
1160 success: (res) => { 1160 success: (res) => {
1161 try { 1161 try {
1162 const data = JSON.parse(res.data || '{}') 1162 const data = JSON.parse(res.data || '{}')
1163 resolve(data.code === 200 ? data.data : null) 1163 resolve(data.code === 200 ? data.data : null)
1164 } catch (e) { 1164 } catch (e) {
1165 resolve(null) 1165 resolve(null)
1166 } 1166 }
1167 }, 1167 },
1168 fail: () => resolve(null) 1168 fail: () => resolve(null)
1169 }) 1169 })
1170 }) 1170 })
1171 } 1171 }
...@@ -1207,22 +1207,22 @@ ...@@ -1207,22 +1207,22 @@
1207 const tempFilePaths = e.tempFilePaths; 1207 const tempFilePaths = e.tempFilePaths;
1208 const imgUrl = tempFilePaths[0] 1208 const imgUrl = tempFilePaths[0]
1209 if (!imgUrl) return 1209 if (!imgUrl) return
1210 uni.showLoading({ 1210 uni.showLoading({
1211 title: '上传中' 1211 title: '上传中'
1212 }) 1212 })
1213 Promise.all(tempFilePaths.slice(0, 3).map(path => uploadMinioImage(path))).then(urls => { 1213 Promise.all(tempFilePaths.slice(0, 3).map(path => uploadMinioImage(path))).then(urls => {
1214 picArr.value = urls.filter(Boolean) 1214 picArr.value = urls.filter(Boolean)
1215 form.value.pictures = picArr.value.join(',') 1215 form.value.pictures = picArr.value.join(',')
1216 uni.hideLoading() 1216 uni.hideLoading()
1217 }).catch(err => { 1217 }).catch(err => {
1218 uni.hideLoading() 1218 uni.hideLoading()
1219 uni.showToast({ 1219 uni.showToast({
1220 title: '上传失败', 1220 title: '上传失败',
1221 icon: 'none' 1221 icon: 'none'
1222 }) 1222 })
1223 }) 1223 })
1224 } 1224 }
1225 1225
1226 function delpicArr() { 1226 function delpicArr() {
1227 picArr.value = [] 1227 picArr.value = []
1228 form.value.pictures = '' 1228 form.value.pictures = ''
...@@ -1258,94 +1258,94 @@ ...@@ -1258,94 +1258,94 @@
1258 if (typeof data === 'string') return data 1258 if (typeof data === 'string') return data
1259 return data?.ms || data?.url || data?.fang || res?.msg || '' 1259 return data?.ms || data?.url || data?.fang || res?.msg || ''
1260 } 1260 }
1261 1261
1262 // 须知勾选 1262 // 须知勾选
1263 function onNoticeChange(e) { 1263 function onNoticeChange(e) {
1264 if (btn.value) return 1264 if (btn.value) return
1265 const values = e.detail.value 1265 const values = e.detail.value
1266 form.value.notice = values.includes('1') 1266 form.value.notice = values.includes('1')
1267 } 1267 }
1268 1268
1269 // 查看须知 - 跳转到须知页面 1269 // 查看须知 - 跳转到须知页面
1270 function showNotice(type) { 1270 function showNotice(type) {
1271 const pageMap = { 1271 const pageMap = {
1272 1: '/pages/index/notice-registration', 1272 1: '/pages/index/notice-registration',
1273 2: '/pages/index/notice-membership', 1273 2: '/pages/index/notice-membership',
1274 3: '/pages/index/notice-disclaimer' 1274 3: '/pages/index/notice-disclaimer'
1275 } 1275 }
1276 const url = pageMap[type] 1276 const url = pageMap[type]
1277 if (url) { 1277 if (url) {
1278 uni.navigateTo({url}) 1278 uni.navigateTo({url})
1279 } 1279 }
1280 } 1280 }
1281 </script> 1281 </script>
1282 1282
1283 <style lang="scss" scoped> 1283 <style lang="scss" scoped>
1284 :deep(.file-picker__progress) { 1284 :deep(.file-picker__progress) {
1285 opacity: 0; 1285 opacity: 0;
1286 } 1286 }
1287 1287
1288 :deep(.input-value) { 1288 :deep(.input-value) {
1289 padding: 0 5rpx; 1289 padding: 0 5rpx;
1290 } 1290 }
1291 1291
1292 .picker-view { 1292 .picker-view {
1293 width: 750rpx; 1293 width: 750rpx;
1294 height: 600rpx; 1294 height: 600rpx;
1295 margin-top: 20rpx; 1295 margin-top: 20rpx;
1296 } 1296 }
1297 1297
1298 .item { 1298 .item {
1299 line-height: 100rpx; 1299 line-height: 100rpx;
1300 text-align: center; 1300 text-align: center;
1301 } 1301 }
1302 1302
1303 :deep(.uni-data-tree) { 1303 :deep(.uni-data-tree) {
1304 border: 1px solid #dcdfe6; 1304 border: 1px solid #dcdfe6;
1305 border-radius: 4px; 1305 border-radius: 4px;
1306 1306
1307 .selected-list { 1307 .selected-list {
1308 justify-content: start; 1308 justify-content: start;
1309 } 1309 }
1310 } 1310 }
1311 1311
1312 :deep(.uni-select__input-placeholder) { 1312 :deep(.uni-select__input-placeholder) {
1313 font-size: 30rpx; 1313 font-size: 30rpx;
1314 } 1314 }
1315 1315
1316 :deep(.uni-easyinput__content-input) { 1316 :deep(.uni-easyinput__content-input) {
1317 font-size: 30rpx; 1317 font-size: 30rpx;
1318 } 1318 }
1319 1319
1320 :deep(.uni-easyinput__placeholder-class) { 1320 :deep(.uni-easyinput__placeholder-class) {
1321 font-size: 30rpx; 1321 font-size: 30rpx;
1322 color: grey; 1322 color: grey;
1323 } 1323 }
1324 1324
1325 .wBox { 1325 .wBox {
1326 width: 700rpx; 1326 width: 700rpx;
1327 padding: 30rpx; 1327 padding: 30rpx;
1328 margin: 20rpx auto 0; 1328 margin: 20rpx auto 0;
1329 background: #FFFFFF; 1329 background: #FFFFFF;
1330 box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1); 1330 box-shadow: 0rpx 12rpx 116rpx 0rpx rgba(196, 203, 214, 0.1);
1331 border-radius: 15rpx; 1331 border-radius: 15rpx;
1332 } 1332 }
1333 1333
1334 .notice-box { 1334 .notice-box {
1335 padding: 20rpx 0; 1335 padding: 20rpx 0;
1336 } 1336 }
1337 1337
1338 .notice-label { 1338 .notice-label {
1339 display: flex; 1339 display: flex;
1340 align-items: center; 1340 align-items: center;
1341 flex-wrap: wrap; 1341 flex-wrap: wrap;
1342 font-size: 24rpx; 1342 font-size: 24rpx;
1343 } 1343 }
1344 1344
1345 .notice-text { 1345 .notice-text {
1346 color: #666; 1346 color: #666;
1347 } 1347 }
1348 1348
1349 .notice-link { 1349 .notice-link {
1350 color: #007AFF; 1350 color: #007AFF;
1351 } 1351 }
...@@ -1462,10 +1462,10 @@ ...@@ -1462,10 +1462,10 @@
1462 .btn-red { 1462 .btn-red {
1463 background: linear-gradient(135deg, #AD181F 0%, #c42a2a 100%); 1463 background: linear-gradient(135deg, #AD181F 0%, #c42a2a 100%);
1464 color: #fff; 1464 color: #fff;
1465 border-radius: 44rpx; 1465 border-radius: 44rpx;
1466 height: 88rpx; 1466 height: 88rpx;
1467 line-height: 88rpx; 1467 line-height: 88rpx;
1468 font-size: 32rpx; 1468 font-size: 32rpx;
1469 width: 100%; 1469 width: 100%;
1470 border: none; 1470 border: none;
1471 } 1471 }
...@@ -1476,98 +1476,98 @@ ...@@ -1476,98 +1476,98 @@
1476 background: #c7c7c7; 1476 background: #c7c7c7;
1477 color: #fff; 1477 color: #fff;
1478 } 1478 }
1479 1479
1480 .fixedBottom { 1480 .fixedBottom {
1481 display: flex; 1481 display: flex;
1482 justify-content: center; 1482 justify-content: center;
1483 padding: 30rpx; 1483 padding: 30rpx;
1484 position: fixed; 1484 position: fixed;
1485 bottom: 0; 1485 bottom: 0;
1486 left: 0; 1486 left: 0;
1487 right: 0; 1487 right: 0;
1488 background: #fff; 1488 background: #fff;
1489 box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05); 1489 box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
1490 z-index: 99; 1490 z-index: 99;
1491 } 1491 }
1492 1492
1493 .text-warning { 1493 .text-warning {
1494 font-size: 28rpx; 1494 font-size: 28rpx;
1495 margin-top: 20rpx; 1495 margin-top: 20rpx;
1496 } 1496 }
1497 1497
1498 /* 新增:自定义弹窗样式(核心) */ 1498 /* 新增:自定义弹窗样式(核心) */
1499 .custom-modal { 1499 .custom-modal {
1500 width: 600rpx; 1500 width: 600rpx;
1501 background: #fff; 1501 background: #fff;
1502 border-radius: 20rpx; 1502 border-radius: 20rpx;
1503 padding: 40rpx 30rpx; 1503 padding: 40rpx 30rpx;
1504 box-sizing: border-box; 1504 box-sizing: border-box;
1505 text-align: center; 1505 text-align: center;
1506 } 1506 }
1507 1507
1508 .modal-title { 1508 .modal-title {
1509 font-size: 36rpx; 1509 font-size: 36rpx;
1510 font-weight: 600; 1510 font-weight: 600;
1511 color: #333; 1511 color: #333;
1512 margin-bottom: 30rpx; 1512 margin-bottom: 30rpx;
1513 } 1513 }
1514 1514
1515 .modal-content { 1515 .modal-content {
1516 font-size: 30rpx; 1516 font-size: 30rpx;
1517 color: #666; 1517 color: #666;
1518 line-height: 1.6; 1518 line-height: 1.6;
1519 margin-bottom: 20rpx; 1519 margin-bottom: 20rpx;
1520 text-align: left; 1520 text-align: left;
1521 } 1521 }
1522 1522
1523 .modal-tip { 1523 .modal-tip {
1524 font-size: 26rpx; 1524 font-size: 26rpx;
1525 color: #F56C6C; 1525 color: #F56C6C;
1526 margin-top: 10rpx; 1526 margin-top: 10rpx;
1527 margin-bottom: 30rpx; 1527 margin-bottom: 30rpx;
1528 } 1528 }
1529 1529
1530 .modal-btns { 1530 .modal-btns {
1531 display: flex; 1531 display: flex;
1532 justify-content: space-between; 1532 justify-content: space-between;
1533 gap: 20rpx; 1533 gap: 20rpx;
1534 } 1534 }
1535 1535
1536 .btn-cancel { 1536 .btn-cancel {
1537 flex: 1; 1537 flex: 1;
1538 height: 80rpx; 1538 height: 80rpx;
1539 line-height: 80rpx; 1539 line-height: 80rpx;
1540 background: #f5f5f5; 1540 background: #f5f5f5;
1541 color: #666; 1541 color: #666;
1542 border-radius: 40rpx; 1542 border-radius: 40rpx;
1543 font-size: 32rpx; 1543 font-size: 32rpx;
1544 border: none; 1544 border: none;
1545 } 1545 }
1546 1546
1547 .btn-confirm { 1547 .btn-confirm {
1548 flex: 1; 1548 flex: 1;
1549 height: 80rpx; 1549 height: 80rpx;
1550 line-height: 80rpx; 1550 line-height: 80rpx;
1551 background: #C4121B; 1551 background: #C4121B;
1552 /* 红色主色调,和图二一致 */ 1552 /* 红色主色调,和图二一致 */
1553 color: #fff; 1553 color: #fff;
1554 border-radius: 40rpx; 1554 border-radius: 40rpx;
1555 font-size: 32rpx; 1555 font-size: 32rpx;
1556 border: none; 1556 border: none;
1557 } 1557 }
1558 1558
1559 /* 去掉按钮默认边框 */ 1559 /* 去掉按钮默认边框 */
1560 .btn-cancel::after, 1560 .btn-cancel::after,
1561 .btn-confirm::after { 1561 .btn-confirm::after {
1562 border: none; 1562 border: none;
1563 } 1563 }
1564 1564
1565 /* 考点申请弹窗专属样式 */ 1565 /* 考点申请弹窗专属样式 */
1566 .apply-modal { 1566 .apply-modal {
1567 padding: 40rpx 30rpx 20rpx; 1567 padding: 40rpx 30rpx 20rpx;
1568 } 1568 }
1569 1569
1570 .apply-btns { 1570 .apply-btns {
1571 margin-bottom: 20rpx; 1571 margin-bottom: 20rpx;
1572 } 1572 }
1573 </style> 1573 </style>
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
100 <view v-else class="license-preview"> 100 <view v-else class="license-preview">
101 <image :src="getImageUrl(getBusinessLicenseUrl())" class="license-img" 101 <image :src="getImageUrl(getBusinessLicenseUrl())" class="license-img"
102 @click="previewImage(getImageUrl(getBusinessLicenseUrl()))"></image> 102 @click="previewImage(getImageUrl(getBusinessLicenseUrl()))"></image>
103 <view v-if="editIng" class="delete-btn" @click="removeBusinessLicense">×</view> 103 <view v-if="canEditCertField('businessLicense')" class="delete-btn" @click="removeBusinessLicense">×</view>
104 </view> 104 </view>
105 </view> 105 </view>
106 </uni-forms-item> 106 </uni-forms-item>
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
131 class="custom-picker" 131 class="custom-picker"
132 popup-title="请选择所在地区" 132 popup-title="请选择所在地区"
133 @change="changeAddress" 133 @change="changeAddress"
134 :readonly="true"
134 ></uni-data-picker> 135 ></uni-data-picker>
135 </view> 136 </view>
136 </uni-forms-item> 137 </uni-forms-item>
...@@ -142,7 +143,9 @@ ...@@ -142,7 +143,9 @@
142 <view class="picker-wrapper"> 143 <view class="picker-wrapper">
143 <uni-data-picker 144 <uni-data-picker
144 v-model="form.parentId" 145 v-model="form.parentId"
145 :disabled="isFieldDisabled('parentId')" 146 :disabled="true"
147 :readonly="true"
148 :clear-icon="false"
146 :level="3" 149 :level="3"
147 :localdata="assoList" 150 :localdata="assoList"
148 class="custom-picker" 151 class="custom-picker"
...@@ -160,7 +163,7 @@ ...@@ -160,7 +163,7 @@
160 <view v-else class="idcard-preview"> 163 <view v-else class="idcard-preview">
161 <image :src="getImageUrl(form.legalIdcPhoto1)" class="idcard-img" 164 <image :src="getImageUrl(form.legalIdcPhoto1)" class="idcard-img"
162 @click="previewImage(getImageUrl(form.legalIdcPhoto1))"></image> 165 @click="previewImage(getImageUrl(form.legalIdcPhoto1))"></image>
163 <view v-if="editIng" class="delete-btn" @click="removeIdCardFront">×</view> 166 <view v-if="canEditCertField('legalIdcPhoto1')" class="delete-btn" @click="removeIdCardFront">×</view>
164 </view> 167 </view>
165 </view> 168 </view>
166 </view> 169 </view>
...@@ -172,7 +175,7 @@ ...@@ -172,7 +175,7 @@
172 <view v-else class="idcard-preview"> 175 <view v-else class="idcard-preview">
173 <image :src="getImageUrl(form.legalIdcPhoto2)" class="idcard-img" 176 <image :src="getImageUrl(form.legalIdcPhoto2)" class="idcard-img"
174 @click="previewImage(getImageUrl(form.legalIdcPhoto2))"></image> 177 @click="previewImage(getImageUrl(form.legalIdcPhoto2))"></image>
175 <view v-if="editIng" class="delete-btn" @click="removeIdCardBack">×</view> 178 <view v-if="canEditCertField('legalIdcPhoto2')" class="delete-btn" @click="removeIdCardBack">×</view>
176 </view> 179 </view>
177 </view> 180 </view>
178 </view> 181 </view>
...@@ -186,11 +189,11 @@ ...@@ -186,11 +189,11 @@
186 placeholder="请输入法人证件号"/> 189 placeholder="请输入法人证件号"/>
187 </uni-forms-item> 190 </uni-forms-item>
188 <uni-forms-item label="联系人" required> 191 <uni-forms-item label="联系人" required>
189 <uni-easyinput v-model="form.siteContact" :disabled="!editIng" class="input-with-border" 192 <uni-easyinput v-model="form.siteContact" :disabled="!canEditCertField('siteContact')" class="input-with-border"
190 placeholder="请输入联系人"/> 193 placeholder="请输入联系人"/>
191 </uni-forms-item> 194 </uni-forms-item>
192 <uni-forms-item label="联系方式" required> 195 <uni-forms-item label="联系方式" required>
193 <uni-easyinput v-model="form.siteTel" :disabled="!editIng" class="input-with-border" 196 <uni-easyinput v-model="form.siteTel" :disabled="!canEditCertField('siteTel')" class="input-with-border"
194 placeholder="请输入联系方式"/> 197 placeholder="请输入联系方式"/>
195 </uni-forms-item> 198 </uni-forms-item>
196 <uni-forms-item label="上传机构照片" required> 199 <uni-forms-item label="上传机构照片" required>
...@@ -201,7 +204,7 @@ ...@@ -201,7 +204,7 @@
201 <view v-else class="pictures-preview"> 204 <view v-else class="pictures-preview">
202 <image :src="getImageUrl(form.pictures.split(',')[0])" class="picture-img" 205 <image :src="getImageUrl(form.pictures.split(',')[0])" class="picture-img"
203 @click="previewImage(form.pictures.split(',').map(url => getImageUrl(url)))"></image> 206 @click="previewImage(form.pictures.split(',').map(url => getImageUrl(url)))"></image>
204 <view v-if="editIng" class="delete-btn" @click="removePictures">×</view> 207 <view v-if="canEditCertField('pictures')" class="delete-btn" @click="removePictures">×</view>
205 </view> 208 </view>
206 </view> 209 </view>
207 </uni-forms-item> 210 </uni-forms-item>
...@@ -209,7 +212,7 @@ ...@@ -209,7 +212,7 @@
209 <view class="notice-box"> 212 <view class="notice-box">
210 <checkbox-group @change="onNoticeChange"> 213 <checkbox-group @change="onNoticeChange">
211 <label class="notice-label"> 214 <label class="notice-label">
212 <checkbox :checked="form.notice" :disabled="!editIng" color="#AD181F" value="1"/> 215 <checkbox :checked="form.notice" :disabled="!canEditCertField('notice')" color="#AD181F" value="1"/>
213 <text class="notice-text">我已阅读并同意</text> 216 <text class="notice-text">我已阅读并同意</text>
214 <text class="notice-link" @click.stop="showNotice(1)">《注册须知》</text> 217 <text class="notice-link" @click.stop="showNotice(1)">《注册须知》</text>
215 <text class="notice-link" @click.stop="showNotice(2)">《入会须知》</text> 218 <text class="notice-link" @click.stop="showNotice(2)">《入会须知》</text>
...@@ -426,7 +429,19 @@ const creditCodeValid = ref(true) ...@@ -426,7 +429,19 @@ const creditCodeValid = ref(true)
426 const ocrLockedFields = ref({}) 429 const ocrLockedFields = ref({})
427 430
428 function isFieldDisabled(field) { 431 function isFieldDisabled(field) {
429 return !editIng.value || !!ocrLockedFields.value[field] 432 if (!canEditCertField(field)) return true
433 if (isRejectLimitedMode() && canEditCertField(field)) return false
434 return !!ocrLockedFields.value[field]
435 }
436
437 function isRejectLimitedMode() {
438 return String(authenticationStatus.value) === '3'
439 }
440
441 function canEditCertField(field) {
442 if (!editIng.value) return false
443 if (!isRejectLimitedMode()) return true
444 return ['siteContact', 'siteTel', 'pictures', 'notice'].includes(field)
430 } 445 }
431 446
432 function lockOcrField(field, value) { 447 function lockOcrField(field, value) {
...@@ -441,7 +456,7 @@ function unlockOcrFields() { ...@@ -441,7 +456,7 @@ function unlockOcrFields() {
441 456
442 // 须知勾选 457 // 须知勾选
443 function onNoticeChange(e) { 458 function onNoticeChange(e) {
444 if (!editIng.value) return 459 if (!canEditCertField('notice')) return
445 const values = e.detail.value 460 const values = e.detail.value
446 form.value.notice = values.includes('1') 461 form.value.notice = values.includes('1')
447 } 462 }
...@@ -886,12 +901,8 @@ function findAssoNodeWithPath(list, targetId, currentPath) { ...@@ -886,12 +901,8 @@ function findAssoNodeWithPath(list, targetId, currentPath) {
886 901
887 // 协会选择(修复:100%对齐PC端el-cascader emitPath: false逻辑,只取最后一级ID) 902 // 协会选择(修复:100%对齐PC端el-cascader emitPath: false逻辑,只取最后一级ID)
888 function changCase(e) { 903 function changCase(e) {
889 if (isFieldDisabled('parentId')) return 904 // 所属协会只展示,不允许在注册引导页手动修改。
890 const valueArr = e.detail?.value || e; 905 return
891 // 取最后一级的value(纯ID)
892 const lastNode = valueArr[valueArr.length - 1];
893 form.value.parentId = lastNode?.value || '';
894 assoFullName.value = getAssoFullName(valueArr)
895 } 906 }
896 907
897 // 地址选择(核心修复:从对象中提取纯value,对齐PC端格式) 908 // 地址选择(核心修复:从对象中提取纯value,对齐PC端格式)
...@@ -1144,7 +1155,7 @@ function submitCertification() { ...@@ -1144,7 +1155,7 @@ function submitCertification() {
1144 1155
1145 // 营业执照上传 1156 // 营业执照上传
1146 function onBusinessLicenseSelect() { 1157 function onBusinessLicenseSelect() {
1147 if (!editIng.value) return 1158 if (!canEditCertField('businessLicense')) return
1148 uni.chooseImage({ 1159 uni.chooseImage({
1149 count: 1, 1160 count: 1,
1150 sizeType: ['compressed'], 1161 sizeType: ['compressed'],
...@@ -1173,7 +1184,6 @@ function onBusinessLicenseSelect() { ...@@ -1173,7 +1184,6 @@ function onBusinessLicenseSelect() {
1173 const ocrData = data.data 1184 const ocrData = data.data
1174 form.value.creditCode = ocrData.creditCode || form.value.creditCode 1185 form.value.creditCode = ocrData.creditCode || form.value.creditCode
1175 form.value.companyName = ocrData.companyName || form.value.companyName 1186 form.value.companyName = ocrData.companyName || form.value.companyName
1176 form.value.legal = ocrData.legalPerson || form.value.legal
1177 lockOcrField('creditCode', form.value.creditCode) 1187 lockOcrField('creditCode', form.value.creditCode)
1178 lockOcrField('companyName', form.value.companyName) 1188 lockOcrField('companyName', form.value.companyName)
1179 lockOcrField('legal', form.value.legal) 1189 lockOcrField('legal', form.value.legal)
...@@ -1204,7 +1214,7 @@ function onBusinessLicenseSelect() { ...@@ -1204,7 +1214,7 @@ function onBusinessLicenseSelect() {
1204 } 1214 }
1205 1215
1206 function removeBusinessLicense() { 1216 function removeBusinessLicense() {
1207 if (!editIng.value) return 1217 if (!canEditCertField('businessLicense')) return
1208 form.value.businessLicense = '' 1218 form.value.businessLicense = ''
1209 form.value.businessLicenseName = '' 1219 form.value.businessLicenseName = ''
1210 unlockOcrFields() 1220 unlockOcrFields()
...@@ -1326,19 +1336,19 @@ function applyBusinessAddress(address) { ...@@ -1326,19 +1336,19 @@ function applyBusinessAddress(address) {
1326 1336
1327 // 删除身份证正面 1337 // 删除身份证正面
1328 function removeIdCardFront() { 1338 function removeIdCardFront() {
1329 if (!editIng.value) return 1339 if (!canEditCertField('legalIdcPhoto1')) return
1330 form.value.legalIdcPhoto1 = '' 1340 form.value.legalIdcPhoto1 = ''
1331 } 1341 }
1332 1342
1333 // 删除身份证反面 1343 // 删除身份证反面
1334 function removeIdCardBack() { 1344 function removeIdCardBack() {
1335 if (!editIng.value) return 1345 if (!canEditCertField('legalIdcPhoto2')) return
1336 form.value.legalIdcPhoto2 = '' 1346 form.value.legalIdcPhoto2 = ''
1337 } 1347 }
1338 1348
1339 // 身份证上传 1349 // 身份证上传
1340 function onIdCardFrontSelect() { 1350 function onIdCardFrontSelect() {
1341 if (!editIng.value) return 1351 if (!canEditCertField('legalIdcPhoto1')) return
1342 uni.chooseImage({ 1352 uni.chooseImage({
1343 count: 1, 1353 count: 1,
1344 sizeType: ['compressed'], 1354 sizeType: ['compressed'],
...@@ -1359,7 +1369,7 @@ function onIdCardFrontSelect() { ...@@ -1359,7 +1369,7 @@ function onIdCardFrontSelect() {
1359 } 1369 }
1360 1370
1361 function onIdCardBackSelect() { 1371 function onIdCardBackSelect() {
1362 if (!editIng.value) return 1372 if (!canEditCertField('legalIdcPhoto2')) return
1363 uni.chooseImage({ 1373 uni.chooseImage({
1364 count: 1, 1374 count: 1,
1365 sizeType: ['compressed'], 1375 sizeType: ['compressed'],
...@@ -1405,7 +1415,7 @@ function extractIdCardInfo(tempPath) { ...@@ -1405,7 +1415,7 @@ function extractIdCardInfo(tempPath) {
1405 1415
1406 // 机构照片上传 1416 // 机构照片上传
1407 function onPicturesSelect() { 1417 function onPicturesSelect() {
1408 if (!editIng.value) return 1418 if (!canEditCertField('pictures')) return
1409 uni.chooseImage({ 1419 uni.chooseImage({
1410 count: 3, 1420 count: 3,
1411 sizeType: ['compressed'], 1421 sizeType: ['compressed'],
...@@ -1444,7 +1454,7 @@ function previewImage(url) { ...@@ -1444,7 +1454,7 @@ function previewImage(url) {
1444 1454
1445 // 删除机构照片 1455 // 删除机构照片
1446 function removePictures() { 1456 function removePictures() {
1447 if (!editIng.value) return 1457 if (!canEditCertField('pictures')) return
1448 form.value.pictures = '' 1458 form.value.pictures = ''
1449 } 1459 }
1450 1460
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!