8451952d by lttnew

证书+调度

1 parent 0ac7b897
...@@ -493,6 +493,15 @@ export function getMobilizelist(params) { ...@@ -493,6 +493,15 @@ export function getMobilizelist(params) {
493 }) 493 })
494 } 494 }
495 495
496 // 调动记录
497 export function logList(params) {
498 return request({
499 url: '/person/transferLog/list',
500 method: 'get',
501 params
502 })
503 }
504
496 // 调动会员成员 505 // 调动会员成员
497 export function getTransferList(data) { 506 export function getTransferList(data) {
498 return request({ 507 return request({
...@@ -2115,6 +2124,20 @@ export function postCert(ids) { ...@@ -2115,6 +2124,20 @@ export function postCert(ids) {
2115 } 2124 }
2116 2125
2117 /** 2126 /**
2127 * 手工录入证书邮寄物流信息
2128 * @param data
2129 * @returns {*}
2130 */
2131 export function editPostInfo(data) {
2132 return request({
2133 url: '/exam/payment/editPostInfo',
2134 method: 'post',
2135 params: data
2136
2137 })
2138 }
2139
2140 /**
2118 * 查看物流信息 2141 * 查看物流信息
2119 * @param id 2142 * @param id
2120 * @returns {*} 2143 * @returns {*}
...@@ -2276,4 +2299,4 @@ export function invoiceFastRed(id) { ...@@ -2276,4 +2299,4 @@ export function invoiceFastRed(id) {
2276 url: `/common/order/invoiceFastRed/${id}`, 2299 url: `/common/order/invoiceFastRed/${id}`,
2277 method: 'post' 2300 method: 'post'
2278 }) 2301 })
2279 }
...\ No newline at end of file ...\ No newline at end of file
2302 }
......
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
7 </view> 7 </view>
8 <view class="info-content"> 8 <view class="info-content">
9 <view class="info-row"> 9 <view class="info-row">
10 <text class="label">快递公司</text>
11 <text class="value">{{ currentItem.postName || '京东物流' }}</text>
12 </view>
13 <view class="info-row">
10 <text class="label">运单号</text> 14 <text class="label">运单号</text>
11 <text class="value tracking-number" @click="copyTracking"> 15 <text class="value tracking-number" @click="copyTracking">
12 {{ currentItem.postCode || '-' }} 16 {{ currentItem.postCode || '-' }}
...@@ -15,7 +19,7 @@ ...@@ -15,7 +19,7 @@
15 </view> 19 </view>
16 </view> 20 </view>
17 21
18 <view class="timeline-section"> 22 <view class="timeline-section" v-if="currentItem.postType === '0'">
19 <view class="section-header"> 23 <view class="section-header">
20 <uni-icons type="location-filled" size="20" color="#AD181F"></uni-icons> 24 <uni-icons type="location-filled" size="20" color="#AD181F"></uni-icons>
21 <text class="section-title">运输轨迹</text> 25 <text class="section-title">运输轨迹</text>
...@@ -50,11 +54,22 @@ ...@@ -50,11 +54,22 @@
50 </view> 54 </view>
51 55
52 <view class="nodata" v-else> 56 <view class="nodata" v-else>
53 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> 57 <image class="empty-img" mode="aspectFit" :src="emptyImageUrl" @error="handleEmptyImageError"></image>
54 <text>暂无物流信息</text> 58 <text>暂无数据</text>
55 </view> 59 </view>
56 </view> 60 </view>
57 </view> 61 </view>
62
63 <view class="timeline-section" v-else>
64 <view class="section-header">
65 <uni-icons type="location-filled" size="20" color="#AD181F"></uni-icons>
66 <text class="section-title">物流跟踪</text>
67 </view>
68 <view class="nodata">
69 <image class="empty-img" mode="aspectFit" :src="emptyImageUrl" @error="handleEmptyImageError"></image>
70 <text>暂无数据</text>
71 </view>
72 </view>
58 </view> 73 </view>
59 </template> 74 </template>
60 75
...@@ -68,14 +83,19 @@ const loading = ref(false) ...@@ -68,14 +83,19 @@ const loading = ref(false)
68 const payId = ref('') 83 const payId = ref('')
69 const currentItem = ref({}) 84 const currentItem = ref({})
70 const trackingNodes = ref([]) 85 const trackingNodes = ref([])
86 const emptyImageUrl = ref(config.baseUrl_api + '/fs/static/nodata.png')
71 87
72 onLoad((options) => { 88 onLoad((options) => {
73 if (!options.payId) return 89 if (!options.payId) return
74 payId.value = options.payId 90 payId.value = options.payId
75 if (options.postCode) currentItem.value.postCode = options.postCode 91 if (options.postCode) currentItem.value.postCode = options.postCode
92 if (options.postName) currentItem.value.postName = decodeURIComponent(options.postName)
93 currentItem.value.postType = options.postType || '0'
76 if (options.postStatus) currentItem.value.postStatus = parseInt(options.postStatus) 94 if (options.postStatus) currentItem.value.postStatus = parseInt(options.postStatus)
77 if (options.submitTime) currentItem.value.submitTime = options.submitTime 95 if (options.submitTime) currentItem.value.submitTime = options.submitTime
78 getLogisticsInfo() 96 if (currentItem.value.postType === '0') {
97 getLogisticsInfo()
98 }
79 }) 99 })
80 100
81 function getLogisticsInfo() { 101 function getLogisticsInfo() {
...@@ -101,6 +121,10 @@ function copyTracking() { ...@@ -101,6 +121,10 @@ function copyTracking() {
101 } 121 }
102 }) 122 })
103 } 123 }
124
125 function handleEmptyImageError() {
126 emptyImageUrl.value = '/static/nodata.png'
127 }
104 </script> 128 </script>
105 129
106 <style lang="scss" scoped> 130 <style lang="scss" scoped>
...@@ -303,9 +327,12 @@ function copyTracking() { ...@@ -303,9 +327,12 @@ function copyTracking() {
303 justify-content: center; 327 justify-content: center;
304 padding: 80rpx 0; 328 padding: 80rpx 0;
305 329
306 image { 330 .empty-img {
307 width: 200rpx; 331 width: 200rpx;
308 height: 200rpx; 332 height: 200rpx;
333 display: block !important;
334 opacity: 0.8 !important;
335 filter: none !important;
309 } 336 }
310 337
311 text { 338 text {
......
1 <template> 1 <template>
2 <view class="mail-page" :class="{ 'no-scroll': showMailPopup }"> 2 <view class="mail-page" :class="{ 'no-scroll': showMailPopup }">
3 <view class="mail-tabs">
4 <view
5 v-for="tab in typeTabs"
6 :key="tab.type"
7 class="mail-tab"
8 :class="{ active: queryParams.type === tab.type }"
9 @click="switchType(tab.type)"
10 >
11 {{ tab.name }}
12 </view>
13 </view>
3 <scroll-view 14 <scroll-view
4 scroll-y 15 scroll-y
5 class="mail-list-scroll" 16 class="mail-list-scroll"
...@@ -57,7 +68,9 @@ ...@@ -57,7 +68,9 @@
57 68
58 <view class="btn-group"> 69 <view class="btn-group">
59 <button 70 <button
60 v-if="showMailButton(item)" 71 v-if="deptType === '1'"
72 :class="{ disabled: String(item.postStatus) === '1' }"
73 :disabled="String(item.postStatus) === '1'"
61 class="btn btn-mail" 74 class="btn btn-mail"
62 @click.stop="openMailPopup(item)" 75 @click.stop="openMailPopup(item)"
63 > 76 >
...@@ -94,30 +107,30 @@ ...@@ -94,30 +107,30 @@
94 <text class="form-label">邮寄方式</text> 107 <text class="form-label">邮寄方式</text>
95 <radio-group class="radio-group" @change="handleMailTypeChange"> 108 <radio-group class="radio-group" @change="handleMailTypeChange">
96 <label class="radio-item" @click.stop> 109 <label class="radio-item" @click.stop>
97 <radio value="1" color="#C4121B" :checked="mailForm.type === '1'" /> 110 <radio value="0" color="#C4121B" :checked="mailForm.postType === '0'" />
98 <text>自动邮寄</text> 111 <text>自动邮寄</text>
99 </label> 112 </label>
100 <label class="radio-item" @click.stop> 113 <label class="radio-item" @click.stop>
101 <radio value="2" color="#C4121B" :checked="mailForm.type === '2'" /> 114 <radio value="1" color="#C4121B" :checked="mailForm.postType === '1'" />
102 <text>人工邮寄</text> 115 <text>人工邮寄</text>
103 </label> 116 </label>
104 </radio-group> 117 </radio-group>
105 </view> 118 </view>
106 119
107 <view v-if="mailForm.type === '2'" class="form-item"> 120 <view v-if="mailForm.postType === '1'" class="form-item">
108 <text class="form-label">快递公司</text> 121 <text class="form-label">快递公司</text>
109 <input 122 <input
110 v-model.trim="mailForm.tt" 123 v-model.trim="mailForm.postName"
111 class="form-input" 124 class="form-input"
112 placeholder="请输入快递公司" 125 placeholder="请输入快递公司"
113 maxlength="30" 126 maxlength="30"
114 /> 127 />
115 </view> 128 </view>
116 129
117 <view v-if="mailForm.type === '2'" class="form-item"> 130 <view v-if="mailForm.postType === '1'" class="form-item">
118 <text class="form-label">快递号</text> 131 <text class="form-label">快递号</text>
119 <input 132 <input
120 v-model.trim="mailForm.code" 133 v-model.trim="mailForm.postCode"
121 class="form-input" 134 class="form-input"
122 placeholder="请输入快递号" 135 placeholder="请输入快递号"
123 maxlength="40" 136 maxlength="40"
...@@ -149,6 +162,11 @@ const deptType = ref('') ...@@ -149,6 +162,11 @@ const deptType = ref('')
149 const loadStatus = ref('more') 162 const loadStatus = ref('more')
150 const showMailPopup = ref(false) 163 const showMailPopup = ref(false)
151 const currentRow = ref(null) 164 const currentRow = ref(null)
165 const typeTabs = [
166 { name: '级位证书', type: '1' },
167 { name: '段位证书', type: '2' },
168 { name: '越段证书', type: '3' }
169 ]
152 170
153 const queryParams = ref({ 171 const queryParams = ref({
154 pageNum: 1, 172 pageNum: 1,
...@@ -158,9 +176,9 @@ const queryParams = ref({ ...@@ -158,9 +176,9 @@ const queryParams = ref({
158 176
159 const mailForm = ref({ 177 const mailForm = ref({
160 payId: '', 178 payId: '',
161 type: '1', 179 postType: '0',
162 tt: '', 180 postName: '',
163 code: '' 181 postCode: ''
164 }) 182 })
165 183
166 onLoad((options) => { 184 onLoad((options) => {
...@@ -194,6 +212,12 @@ function init() { ...@@ -194,6 +212,12 @@ function init() {
194 getList() 212 getList()
195 } 213 }
196 214
215 function switchType(type) {
216 if (queryParams.value.type === type) return
217 queryParams.value.type = type
218 init()
219 }
220
197 function getList() { 221 function getList() {
198 if (loadStatus.value === 'nomore' || loading.value) return 222 if (loadStatus.value === 'nomore' || loading.value) return
199 223
...@@ -233,22 +257,26 @@ function loadMore() { ...@@ -233,22 +257,26 @@ function loadMore() {
233 } 257 }
234 258
235 function handleView(item) { 259 function handleView(item) {
260 if (queryParams.value.type === '1') {
261 uni.navigateTo({
262 url: `/level/applyDetail?examId=${item.examId}`
263 })
264 return
265 }
266 const detailType = queryParams.value.type === '3' ? '4' : '2'
236 uni.navigateTo({ 267 uni.navigateTo({
237 url: `/pages/rank/applyDetail?examId=${item.examId}&type=${queryParams.value.type}` 268 url: `/pages/rank/applyDetail?examId=${item.examId}&type=${detailType}`
238 }) 269 })
239 } 270 }
240 271
241 function showMailButton(item) {
242 return deptType.value === '1' && String(item.postStatus) !== '1'
243 }
244
245 function openMailPopup(item) { 272 function openMailPopup(item) {
273 if (String(item.postStatus) === '1') return
246 currentRow.value = item 274 currentRow.value = item
247 mailForm.value = { 275 mailForm.value = {
248 payId: item.payId, 276 payId: item.payId,
249 type: '1', 277 postType: '0',
250 tt: '', 278 postName: '',
251 code: '' 279 postCode: ''
252 } 280 }
253 showMailPopup.value = true 281 showMailPopup.value = true
254 } 282 }
...@@ -259,22 +287,22 @@ function closeMailPopup() { ...@@ -259,22 +287,22 @@ function closeMailPopup() {
259 } 287 }
260 288
261 function handleMailTypeChange(e) { 289 function handleMailTypeChange(e) {
262 mailForm.value.type = e.detail.value 290 mailForm.value.postType = e.detail.value
263 if (mailForm.value.type === '1') { 291 if (mailForm.value.postType === '0') {
264 mailForm.value.tt = '' 292 mailForm.value.postName = ''
265 mailForm.value.code = '' 293 mailForm.value.postCode = ''
266 } 294 }
267 } 295 }
268 296
269 async function submitMail() { 297 async function submitMail() {
270 if (!mailForm.value.payId) return 298 if (!mailForm.value.payId) return
271 299
272 if (mailForm.value.type === '2') { 300 if (mailForm.value.postType === '1') {
273 if (!mailForm.value.tt) { 301 if (!mailForm.value.postName) {
274 uni.showToast({ title: '请输入快递公司', icon: 'none' }) 302 uni.showToast({ title: '请输入快递公司', icon: 'none' })
275 return 303 return
276 } 304 }
277 if (!mailForm.value.code) { 305 if (!mailForm.value.postCode) {
278 uni.showToast({ title: '请输入快递号', icon: 'none' }) 306 uni.showToast({ title: '请输入快递号', icon: 'none' })
279 return 307 return
280 } 308 }
...@@ -282,7 +310,11 @@ async function submitMail() { ...@@ -282,7 +310,11 @@ async function submitMail() {
282 310
283 try { 311 try {
284 uni.showLoading({ title: '提交中' }) 312 uni.showLoading({ title: '提交中' })
285 await api.postCert(mailForm.value.payId) 313 if (mailForm.value.postType === '0') {
314 await api.postCert(mailForm.value.payId)
315 } else {
316 await api.editPostInfo({ ...mailForm.value })
317 }
286 uni.showToast({ title: '操作成功', icon: 'success' }) 318 uni.showToast({ title: '操作成功', icon: 'success' })
287 closeMailPopup() 319 closeMailPopup()
288 init() 320 init()
...@@ -294,12 +326,9 @@ async function submitMail() { ...@@ -294,12 +326,9 @@ async function submitMail() {
294 } 326 }
295 327
296 function handleLogistics(item) { 328 function handleLogistics(item) {
297 if (String(item.postStatus) !== '1' || !item.postCode) { 329 const postName = encodeURIComponent(item.postName || '')
298 uni.showToast({ title: '暂无物流信息', icon: 'none' })
299 return
300 }
301 uni.navigateTo({ 330 uni.navigateTo({
302 url: `/level/ztx/certLogistics?payId=${item.payId}&postCode=${item.postCode}&postStatus=${item.postStatus}&submitTime=${item.submitTime || ''}` 331 url: `/level/ztx/certLogistics?payId=${item.payId}&postCode=${item.postCode || ''}&postName=${postName}&postType=${item.postType || '0'}&postStatus=${item.postStatus || ''}&submitTime=${item.submitTime || ''}`
303 }) 332 })
304 } 333 }
305 334
...@@ -324,6 +353,40 @@ function formatDate(dateStr) { ...@@ -324,6 +353,40 @@ function formatDate(dateStr) {
324 } 353 }
325 } 354 }
326 355
356 .mail-tabs {
357 display: flex;
358 flex-shrink: 0;
359 background: #fff;
360 border-bottom: 1rpx solid #eee;
361
362 .mail-tab {
363 flex: 1;
364 height: 84rpx;
365 line-height: 84rpx;
366 text-align: center;
367 font-size: 28rpx;
368 color: #666;
369 position: relative;
370
371 &.active {
372 color: #c30d23;
373 font-weight: bold;
374
375 &::after {
376 content: '';
377 position: absolute;
378 left: 50%;
379 bottom: 0;
380 transform: translateX(-50%);
381 width: 72rpx;
382 height: 4rpx;
383 border-radius: 2rpx;
384 background: #c30d23;
385 }
386 }
387 }
388 }
389
327 .mail-list-scroll { 390 .mail-list-scroll {
328 flex: 1; 391 flex: 1;
329 height: 0; 392 height: 0;
...@@ -591,6 +654,13 @@ function formatDate(dateStr) { ...@@ -591,6 +654,13 @@ function formatDate(dateStr) {
591 border: 1rpx solid #ccc; 654 border: 1rpx solid #ccc;
592 background: #fff; 655 background: #fff;
593 } 656 }
657
658 .disabled,
659 button[disabled] {
660 color: #b8b8b8;
661 border-color: #e1e1e1;
662 background: #f5f5f5;
663 }
594 } 664 }
595 665
596 .popup-mask { 666 .popup-mask {
......
...@@ -230,9 +230,9 @@ ...@@ -230,9 +230,9 @@
230 考试申请 230 考试申请
231 </view> 231 </view>
232 232
233 <view @click="goPath('/level/ztx/mail')"> 233 <view @click="goPath('/level/ztx/mail?type=1')">
234 <image :src="config.baseUrl_api+'/fs/static/icon/25.png'"/> 234 <image :src="config.baseUrl_api+'/fs/static/icon/25.png'"/>
235 证书邮寄 235 证书邮寄1
236 </view> 236 </view>
237 <!-- <view @click="goPath('/level/ztx/costSettlement')"> 237 <!-- <view @click="goPath('/level/ztx/costSettlement')">
238 <image :src="config.baseUrl_api+'/fs/static/icon/10.png'"/> 238 <image :src="config.baseUrl_api+'/fs/static/icon/10.png'"/>
...@@ -433,14 +433,7 @@ ...@@ -433,14 +433,7 @@
433 <image :src="config.baseUrl_api+'/fs/static/icon/2.png'"/> 433 <image :src="config.baseUrl_api+'/fs/static/icon/2.png'"/>
434 考试审核 434 考试审核
435 </view> 435 </view>
436 <view @click="goPath('/level/ztx/mail')"> 436
437 <image :src="config.baseUrl_api+'/fs/static/icon/3.png'"/>
438 证书邮寄
439 </view>
440 <view @click="goPath('/level/ztx/cert?type=1')">
441 <image :src="config.baseUrl_api+'/fs/static/icon/18.png'"/>
442 证书发布
443 </view>
444 <view @click="goPath('/personalVip/changeLevelAudit')"> 437 <view @click="goPath('/personalVip/changeLevelAudit')">
445 <image :src="config.baseUrl_api+'/fs/static/icon/26.png'"/> 438 <image :src="config.baseUrl_api+'/fs/static/icon/26.png'"/>
446 变更审核 439 变更审核
...@@ -449,7 +442,14 @@ ...@@ -449,7 +442,14 @@
449 <image :src="config.baseUrl_api+'/fs/static/icon/10.png'"/> 442 <image :src="config.baseUrl_api+'/fs/static/icon/10.png'"/>
450 结算审核 443 结算审核
451 </view> 444 </view>
452 445 <view @click="goPath('/level/ztx/mail?type=1')">
446 <image :src="config.baseUrl_api+'/fs/static/icon/5.png'"/>
447 证书邮寄
448 </view>
449 <view @click="goPath('/level/ztx/cert?type=1')">
450 <image :src="config.baseUrl_api+'/fs/static/icon/18.png'"/>
451 证书发布
452 </view>
453 <view @click="goPath('/personalVip/order?type=2')"> 453 <view @click="goPath('/personalVip/order?type=2')">
454 <image :src="config.baseUrl_api+'/fs/static/icon/6.png'"/> 454 <image :src="config.baseUrl_api+'/fs/static/icon/6.png'"/>
455 订单列表 455 订单列表
...@@ -468,7 +468,12 @@ ...@@ -468,7 +468,12 @@
468 <image :src="config.baseUrl_api+'/fs/static/icon/19.png'"/> 468 <image :src="config.baseUrl_api+'/fs/static/icon/19.png'"/>
469 成绩审核 469 成绩审核
470 </view> 470 </view>
471 <view @click="goPath('/level/ztx/cert?type=2')"> 471
472 <view @click="goPath('/level/ztx/mail?type=2')">
473 <image :src="config.baseUrl_api+'/fs/static/icon/5.png'"/>
474 证书邮寄
475 </view>
476 <view @click="goPath('/level/ztx/cert?type=2')">
472 <image :src="config.baseUrl_api+'/fs/static/icon/20.png'"/> 477 <image :src="config.baseUrl_api+'/fs/static/icon/20.png'"/>
473 证书发布 478 证书发布
474 </view> 479 </view>
...@@ -490,6 +495,10 @@ ...@@ -490,6 +495,10 @@
490 <image :src="config.baseUrl_api+'/fs/static/icon/22.png'"/> 495 <image :src="config.baseUrl_api+'/fs/static/icon/22.png'"/>
491 成绩审核 496 成绩审核
492 </view> 497 </view>
498 <view @click="goPath('/level/ztx/mail?type=3')">
499 <image :src="config.baseUrl_api+'/fs/static/icon/5.png'"/>
500 证书邮寄
501 </view>
493 <view @click="goPath('/level/ztx/cert?type=3')"> 502 <view @click="goPath('/level/ztx/cert?type=3')">
494 <image :src="config.baseUrl_api+'/fs/static/icon/23.png'"/> 503 <image :src="config.baseUrl_api+'/fs/static/icon/23.png'"/>
495 证书发布 504 证书发布
......
1 <template> 1 <template>
2 <view> 2 <view class="record-page">
3 <view class="appList"> 3 <scroll-view
4 <view class="appItem" v-for="(item,index) in list" :key="index" @click="goDetail(item)"> 4 class="record-scroll"
5 <view class="status"> 5 :show-scrollbar="false"
6 <text :class="statusClass(item)">{{ statusText(item) }}</text> 6 lower-threshold="160"
7 </view> 7 scroll-y
8 8 @scrolltolower="loadMore"
9 <view class="name mt0"> 9 >
10 {{ item.name || '调动记录' }} 10 <view class="appList">
11 </view> 11 <view class="appItem" v-for="(item, index) in list" :key="item.id || index">
12 12 <!-- 头部:姓名+日期 -->
13 <view class="flexbox" v-if="deptType == 1 || deptType == 2 || deptType == 3"> 13 <view class="record-header">
14 <view class="w50"> 14 <!-- <view class="avatar">
15 申请调入单位 15 <text>{{ (item.personName || '-').charAt(0) }}</text>
16 <view><text>{{ item.targetDeptName || '-' }}</text></view> 16 </view> -->
17 <view class="header-info">
18 <view class="name">{{ item.personName || '-' }}{{ item.personIdcCode || '-' }}</view>
19
20 </view>
21 <text class="time">{{ formatDate(item.operTime) }}</text>
17 </view> 22 </view>
18 <view class="w50"> 23
19 会员合计 24 <!-- 单位信息对比区 -->
20 <view>{{ item.personCount || 0 }}</view> 25 <view class="unit-section">
26 <view class="unit-item">
27 <view class="unit-label">原单位</view>
28 <view class="unit-value">{{ item.sourceMemName || '-' }}</view>
29 </view>
30 <view class="divider-line">
31 <uni-icons type="arrow-right" size="16" color="#999"></uni-icons>
32 </view>
33 <view class="unit-item target">
34 <view class="unit-label">申请单位</view>
35 <view class="unit-value">{{ item.targetMemName || '-' }}</view>
36 </view>
21 </view> 37 </view>
22 </view> 38 </view>
23 39
24 <view v-else class="pp"> 40 <view class="loading-tip" v-if="loading">加载中...</view>
25 会员合计: 41 <view class="no-more" v-if="!loading && !hasMore && list.length > 0">没有更多了</view>
26 <text class="text-primary">{{ item.personCount || 0 }}</text>
27 </view>
28 </view> 42 </view>
29 </view> 43 </scroll-view>
30 44
31 <view class="nodata" v-if="list.length==0 && !loading"> 45 <view class="nodata" v-if="list.length === 0 && !loading">
32 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> 46 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
33 <text>暂无数据</text> 47 <text>暂无数据</text>
34 </view> 48 </view>
...@@ -38,16 +52,19 @@ ...@@ -38,16 +52,19 @@
38 <script setup> 52 <script setup>
39 import * as api from '@/common/api.js' 53 import * as api from '@/common/api.js'
40 import config from '@/config.js' 54 import config from '@/config.js'
41 import { ref } from 'vue' 55 import { reactive, ref } from 'vue'
42 import { onLoad, onShow } from '@dcloudio/uni-app' 56 import { onLoad, onShow } from '@dcloudio/uni-app'
43 57
44 const app = getApp() 58 const app = getApp()
45 const queryParams = ref({})
46 const list = ref([]) 59 const list = ref([])
47 const total = ref(0)
48 const deptType = ref('')
49 const loading = ref(false) 60 const loading = ref(false)
61 const hasMore = ref(true)
50 const hasInited = ref(false) 62 const hasInited = ref(false)
63 const queryParams = reactive({
64 pageNum: 1,
65 pageSize: 10,
66 noAuditProcess: '1'
67 })
51 68
52 onLoad(() => { 69 onLoad(() => {
53 if (app.globalData.isLogin) { 70 if (app.globalData.isLogin) {
...@@ -61,93 +78,205 @@ ...@@ -61,93 +78,205 @@
61 78
62 onShow(() => { 79 onShow(() => {
63 if (hasInited.value) { 80 if (hasInited.value) {
64 getList() 81 resetList()
65 } 82 }
66 }) 83 })
67 84
68 function init() { 85 function init() {
69 deptType.value = app.globalData.deptType
70 queryParams.value = {}
71 if (deptType.value == 2 || deptType.value == 3) {
72 queryParams.value.dgId = -1
73 }
74 if (deptType.value == 1) {
75 queryParams.value.dgId = -2
76 }
77 if (deptType.value == 6) {
78 queryParams.value.dgId = 1
79 }
80 hasInited.value = true 86 hasInited.value = true
87 resetList()
88 }
89
90 function resetList() {
91 queryParams.pageNum = 1
92 list.value = []
93 hasMore.value = true
81 getList() 94 getList()
82 } 95 }
83 96
84 function getList() { 97 function getList() {
98 if (loading.value || !hasMore.value) return
85 loading.value = true 99 loading.value = true
86 uni.showLoading({ 100 api.logList(queryParams).then(res => {
87 title: '加载中', 101 const rows = res.rows || []
88 mask: true 102 if (queryParams.pageNum === 1) {
89 }) 103 list.value = rows
90 api.getMobilizelist(queryParams.value).then(res => { 104 } else {
91 list.value = res.rows || [] 105 list.value.push(...rows)
92 total.value = res.total || 0 106 }
107 hasMore.value = list.value.length < Number(res.total || 0)
108 }).catch(() => {
109 uni.showToast({
110 title: '加载失败',
111 icon: 'none'
112 })
113 if (queryParams.pageNum > 1) {
114 queryParams.pageNum--
115 }
93 }).finally(() => { 116 }).finally(() => {
94 loading.value = false 117 loading.value = false
95 uni.hideLoading()
96 }) 118 })
97 } 119 }
98 120
99 function statusText(item) { 121 function loadMore() {
100 if (deptType.value == 1) { 122 if (loading.value || !hasMore.value) return
101 const map = { 123 queryParams.pageNum++
102 0: '审核中', 124 getList()
103 1: '审核通过', 125 }
104 2: '审核拒绝', 126
105 3: '撤销申请' 127 function formatDate(dateValue) {
106 } 128 if (!dateValue) return '-'
107 return map[item.ztxRes] || '-' 129 return String(dateValue).substring(0, 10)
130 }
131 </script>
132
133 <style scoped lang="scss">
134 .record-page {
135 height: 100vh;
136 background: #f5f7fa;
137 position: relative;
138 }
139
140 .record-scroll {
141 height: 100%;
142 }
143
144 .appList {
145 // padding: 10rpx;
146 box-sizing: border-box;
147 }
148
149 .appItem {
150 background: #fff;
151 border-radius: 16rpx;
152 box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
153 padding:0 20rpx 20rpx 20rpx;
154 margin-bottom: 20rpx;
155 transition: all 0.2s ease;
156
157 &:active {
158 transform: scale(0.99);
159 box-shadow: 0 1rpx 8rpx rgba(0, 0, 0, 0.08);
108 } 160 }
109 if (deptType.value == 2 || deptType.value == 3) { 161 }
110 const map = { 162
111 0: '审核中', 163 .record-header {
112 1: '审核通过', 164 display: flex;
113 2: '审核拒绝', 165 align-items: center;
114 3: '撤销申请' 166 // margin-bottom: 24rpx;
115 } 167 }
116 return map[item.shenRes] || '-' 168
169 .avatar {
170 width: 64rpx;
171 height: 64rpx;
172 border-radius: 50%;
173 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
174 display: flex;
175 align-items: center;
176 justify-content: center;
177 margin-right: 16rpx;
178
179 text {
180 font-size: 28rpx;
181 color: #fff;
182 font-weight: 500;
183 }
184 }
185
186 .header-info {
187 flex: 1;
188 }
189
190 .name {
191 font-size: 32rpx;
192 font-weight: 600;
193 color: #1a1a1a;
194 margin-bottom: 6rpx;
195 }
196
197 .id-card {
198 display: flex;
199 align-items: center;
200
201 .label {
202 font-size: 24rpx;
203 color: #999;
117 } 204 }
118 const map = { 205
119 0: '待提交', 206 .value {
120 1: '审核中', 207 font-size: 24rpx;
121 2: '审核拒绝', 208 color: #666;
122 3: '审核通过',
123 4: '已撤回'
124 } 209 }
125 return map[item.status] || '-'
126 } 210 }
127 211
128 function statusClass(item) { 212 .time {
129 const value = deptType.value == 1 ? item.ztxRes : (deptType.value == 2 || deptType.value == 3 ? item.shenRes : item.status) 213 font-size: 24rpx;
130 if (value == 1 || value == 3) return 'text-success' 214 color: #999;
131 if (value == 2 || value == 4) return 'text-danger'
132 return 'text-primary'
133 } 215 }
134 216
135 function goDetail(item) { 217 .unit-section {
136 const auditLog = encodeURIComponent(JSON.stringify(item.auditLog)) 218 display: flex;
137 const form = encodeURIComponent(JSON.stringify(item)) 219 align-items: center;
138 uni.navigateTo({ 220 background: #f9fafc;
139 url: `/personalVip/mobilizeDetail?rangeId=${item.id}&auditLog=${auditLog}&form=${form}` 221 border-radius: 12rpx;
140 }) 222 padding: 20rpx 16rpx;
141 } 223 }
142 </script>
143 224
144 <style scoped lang="scss"> 225 .unit-item {
145 .mt0 { 226 flex: 1;
146 margin-top: 0 !important; 227 padding: 0 12rpx;
228
229 .unit-label {
230 font-size: 22rpx;
231 color: #999;
232 margin-bottom: 8rpx;
233 }
234
235 .unit-value {
236 font-size: 26rpx;
237 color: #333;
238 line-height: 1.4;
239 word-break: break-all;
240 }
241
242 &.target .unit-value {
243 color: #C4121B;
244 }
147 } 245 }
148 246
149 .appList .appItem .name { 247 .divider-line {
150 width: 80%; 248 display: flex;
151 word-break: break-all; 249 align-items: center;
250 justify-content: center;
251 padding: 0 8rpx;
252 }
253
254 .loading-tip,
255 .no-more {
256 text-align: center;
257 color: #999;
258 font-size: 24rpx;
259 padding: 20rpx 0;
260 }
261
262 .nodata {
263 position: absolute;
264 top: 180rpx;
265 left: 0;
266 right: 0;
267 display: flex;
268 flex-direction: column;
269 align-items: center;
270
271 image {
272 width: 280rpx;
273 height: 280rpx;
274 margin-bottom: 16rpx;
275 }
276
277 text {
278 color: #999;
279 font-size: 26rpx;
280 }
152 } 281 }
153 </style> 282 </style>
...\ No newline at end of file ...\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!