0ac7b897 by lttnew

调动记录

1 parent e0c6e843
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
17 </view> 17 </view>
18 <view class="info-row"> 18 <view class="info-row">
19 <text class="label">审核状态</text> 19 <text class="label">审核状态</text>
20 <text :class="getStatusClass(form.auditStatus)" class="value"> 20 <text :class="getStatusClass(getCurrentAuditStatus())" class="value">
21 {{ getStatusText(userType == 1 ? form.auditStatus : form.shenAuditStatus) }} 21 {{ getStatusText(getCurrentAuditStatus()) }}
22 </text> 22 </text>
23 </view> 23 </view>
24 <view class="info-row"> 24 <view class="info-row">
25 <text class="label">是否需要</text> 25 <text class="label">是否需要省级协会指派</text>
26 <text class="value">{{ form.selfSelect == 1 ? '否' : '是' }}</text> 26 <text class="value">{{ form.selfSelect == 1 ? '否' : '是' }}</text>
27 </view> 27 </view>
28 <view class="info-row"> 28 <view class="info-row">
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
35 </view> 35 </view>
36 <view class="info-row"> 36 <view class="info-row">
37 <text class="label">审核日期</text> 37 <text class="label">审核日期</text>
38 <text class="value">{{ formatDate(form.auditTime) }}</text> 38 <text class="value">{{ formatDate(getCurrentAuditTime()) }}</text>
39 </view> 39 </view>
40 <view class="info-row"> 40 <view class="info-row">
41 <text class="label">考官</text> 41 <text class="label">考官</text>
...@@ -145,6 +145,14 @@ function getStatusClass(status) { ...@@ -145,6 +145,14 @@ function getStatusClass(status) {
145 return classMap[status] || '' 145 return classMap[status] || ''
146 } 146 }
147 147
148 function getCurrentAuditStatus() {
149 return userType.value == 1 ? form.value.auditStatus : form.value.shenAuditStatus
150 }
151
152 function getCurrentAuditTime() {
153 return userType.value == 1 ? form.value.auditTime : form.value.shenAuditTime
154 }
155
148 function formatDate(dateStr) { 156 function formatDate(dateStr) {
149 if (!dateStr) return '-' 157 if (!dateStr) return '-'
150 return dateStr.substring(0, 10) 158 return dateStr.substring(0, 10)
......
...@@ -63,12 +63,12 @@ ...@@ -63,12 +63,12 @@
63 scroll-y 63 scroll-y
64 @scrolltolower="loadMore" 64 @scrolltolower="loadMore"
65 > 65 >
66 <view class="appList"> 66 <view class="order-list">
67 <view 67 <view
68 v-for="(item, index) in infoList" 68 v-for="(item, index) in infoList"
69 :key="index" 69 :key="index"
70 :class="{ 'item-checked': isSelected(item) }" 70 :class="{ 'item-checked': isSelected(item) }"
71 class="appItem" 71 class="order-card-new"
72 > 72 >
73 <!-- 选择框(保留原逻辑+适配截图样式) --> 73 <!-- 选择框(保留原逻辑+适配截图样式) -->
74 <!-- <view class="checkbox-wrap" v-if="item.auditStatus == 1" @click="toggleSelect(item)"> 74 <!-- <view class="checkbox-wrap" v-if="item.auditStatus == 1" @click="toggleSelect(item)">
...@@ -77,59 +77,58 @@ ...@@ -77,59 +77,58 @@
77 </view> 77 </view>
78 </view> --> 78 </view> -->
79 79
80 <!-- 主内容区(点击跳详情,保留原所有字段) --> 80 <view class="item-content">
81 <view class="item-content" @click="goDetail(item)"> 81 <view class="card-header">
82 <!-- 状态标签+提交时间(截图风格顶部) --> 82 <view class="date">
83 <view class="item-top"> 83 <view class="data-header">
84 84 <text class="member-label">{{ item.shenMemName || '-' }} ·</text>
85 <text class="submit-time">{{ formatDate(item.commitTime) }} 提交</text> 85 <text class="value ml10">{{ item.memName || '-' }}</text>
86 <text :class="getStatusClass(userType==1? item.auditStatus:item.shenAuditStatus)" class="status-tag"> 86 </view>
87 {{ getStatusText(userType == 1 ? item.auditStatus : item.shenAuditStatus) }} 87 <text :class="getStatusClass(userType==1? item.auditStatus:item.shenAuditStatus)" class="status-tag">
88 </text> 88 {{ getStatusText(userType == 1 ? item.auditStatus : item.shenAuditStatus) }}
89 </text>
90 </view>
89 </view> 91 </view>
90 92
91 <!-- 缴费单位名称(原name字段,截图风格标题) --> 93 <view class="member-time">
92 <view class="mem-name">{{ item.shenMemName }}</view> 94 <view class="label">
93 95 <!-- <text class="star"></text> -->
94 <!-- 第一行信息:所属协会/会员有效期/是否需要(原flexbox1,截图风格) --> 96 <!-- {{ `${formatDate(item.commitTime)}` }} -->
95 <view class="info-row">
96 <view class="info-item">
97 <text class="info-label">申请单位</text>
98 <text class="info-value">{{ item.memName || '-' }}</text>
99 </view> 97 </view>
100 <view class="info-item"> 98 <view class="price">
101 <text class="info-label">会员有效期</text> 99 <view></view>
102 <text class="info-value">{{ formatDate(item.memValidDate) }}</text> 100 <!-- <view class="person">所属协会</view> -->
103 </view> 101 </view>
104 <!-- <view class="info-item">
105 <text class="info-label">是否需要</text>
106 <text class="info-value">{{ item.selfSelect == 1 ? '否' : '是' }}</text>
107 </view> -->
108 </view> 102 </view>
109 103
110 <!-- 第二行信息:申请日期/审核日期(原flexbox2,截图风格) --> 104 <view class="info-section">
111 <!-- <view class="info-row"> 105 <view class="single-info">
112 <view class="info-item two-col"> 106 <view class="label">会员有效期</view>
113 <text class="info-label">申请日期</text> 107 <view class="value">{{ formatDate(item.memValidDate) }}</view>
108 </view>
109 <view class="line"></view>
110 <view class="single-info">
111 <view class="label">申请日期</view>
114 <text class="info-value">{{ formatDate(item.commitTime) }}</text> 112 <text class="info-value">{{ formatDate(item.commitTime) }}</text>
115 </view> 113 </view>
116 <view class="info-item two-col"> 114 <view class="line"></view>
117 <text class="info-label">审核日期</text> 115 <view class="single-info">
118 <text class="info-value">{{ formatDate(item.auditTime) }}</text> 116 <view class="label">审核日期</view>
117 <text class="info-value">{{ formatDate(userType == 1 ? item.auditTime : item.shenAuditTime) }}</text>
119 </view> 118 </view>
120 </view> --> 119 </view>
121 </view> 120 </view>
122 121
123 <!-- 操作按钮区(保留原所有按钮:查看/审核/机构资料,截图风格) --> 122 <!-- 操作按钮区(保留原所有按钮:查看/审核/机构资料,截图风格) -->
124 <view class="func"> 123 <view class="btn-group">
125 <!-- <button class="btn-info" >查看</button> --> 124 <button class="btn btn-info" @click.stop="goView(item)">查看</button>
126 <button 125 <button
127 v-if=" userType==1? item.auditStatus == 1:item.shenAuditStatus == 1 " 126 v-if=" userType==1? item.auditStatus == 1:item.shenAuditStatus == 1 "
128 class="btn-info" 127 class="btn btn-pay"
129 @click.stop="goAudit(item)" 128 @click.stop="goAudit(item)"
130 >审核 129 >审核
131 </button> 130 </button>
132 <button class="btn-info" @click.stop="goInstitution(item)">机构资料</button> 131 <button class="btn btn-view-invoice" @click.stop="goInstitution(item)">机构资料</button>
133 </view> 132 </view>
134 </view> 133 </view>
135 </view> 134 </view>
...@@ -149,7 +148,6 @@ ...@@ -149,7 +148,6 @@
149 </template> 148 </template>
150 149
151 <script setup> 150 <script setup>
152 // 完全保留你原代码的所有JS逻辑、方法、字段,未做任何修改
153 import * as api from '@/common/api_exam.js' 151 import * as api from '@/common/api_exam.js'
154 import config from '@/config.js' 152 import config from '@/config.js'
155 import {ref} from 'vue' 153 import {ref} from 'vue'
...@@ -333,7 +331,7 @@ function toggleSelect(item) { ...@@ -333,7 +331,7 @@ function toggleSelect(item) {
333 } 331 }
334 } 332 }
335 333
336 function goDetail(item) { 334 function goView(item) {
337 const itemStr = encodeURIComponent(JSON.stringify(item)) 335 const itemStr = encodeURIComponent(JSON.stringify(item))
338 uni.navigateTo({ 336 uni.navigateTo({
339 url: `/level/ztx/examinationDetail?item=${itemStr}` 337 url: `/level/ztx/examinationDetail?item=${itemStr}`
...@@ -385,8 +383,8 @@ function formatDate(dateStr) { ...@@ -385,8 +383,8 @@ function formatDate(dateStr) {
385 383
386 <style lang="scss" scoped> 384 <style lang="scss" scoped>
387 .exam-verification-page { 385 .exam-verification-page {
388 min-height: 100vh; 386 height: 100vh;
389 background-color: #f5f5f5; 387 background-color: #ededf0;
390 display: flex; 388 display: flex;
391 flex-direction: column; 389 flex-direction: column;
392 } 390 }
...@@ -401,10 +399,10 @@ function formatDate(dateStr) { ...@@ -401,10 +399,10 @@ function formatDate(dateStr) {
401 399
402 .tab-item { 400 .tab-item {
403 flex: 1; 401 flex: 1;
404 height: 88rpx; 402 height: 84rpx;
405 line-height: 88rpx; 403 line-height: 84rpx;
406 text-align: center; 404 text-align: center;
407 font-size: 32rpx; 405 font-size: 28rpx;
408 color: #666; 406 color: #666;
409 position: relative; 407 position: relative;
410 transition: all 0.2s; 408 transition: all 0.2s;
...@@ -419,8 +417,8 @@ function formatDate(dateStr) { ...@@ -419,8 +417,8 @@ function formatDate(dateStr) {
419 bottom: 0; 417 bottom: 0;
420 left: 50%; 418 left: 50%;
421 transform: translateX(-50%); 419 transform: translateX(-50%);
422 width: 120rpx; 420 width: 72rpx;
423 height: 6rpx; 421 height: 5rpx;
424 background-color: #C4121B; 422 background-color: #C4121B;
425 border-radius: 3rpx; 423 border-radius: 3rpx;
426 } 424 }
...@@ -456,184 +454,192 @@ function formatDate(dateStr) { ...@@ -456,184 +454,192 @@ function formatDate(dateStr) {
456 /* 列表滚动区(适配Tab+批量按钮高度) */ 454 /* 列表滚动区(适配Tab+批量按钮高度) */
457 .scroll-list { 455 .scroll-list {
458 flex: 1; 456 flex: 1;
457 height: 0;
458 min-height: 0;
459 width: 100%; 459 width: 100%;
460 box-sizing: border-box; 460 box-sizing: border-box;
461 padding-bottom: 20rpx; 461 overflow: hidden;
462 background: #ededf0;
462 } 463 }
463 464
464 /* 列表容器 */ 465 .order-list {
465 .appList { 466 min-height: 100%;
466 padding: 0 20rpx;
467 width: 100%;
468 box-sizing: border-box; 467 box-sizing: border-box;
468 padding: 18rpx 24rpx calc(80rpx + env(safe-area-inset-bottom));
469 } 469 }
470 470
471 /* 列表项(截图风格:白色卡片+圆角+阴影+红色顶边) */ 471 .order-card-new {
472 .appItem { 472 background: #fff;
473 background-color: #fff; 473 margin-bottom: 22rpx;
474 // border-radius: 16rpx; 474 padding: 22rpx 18rpx 18rpx;
475 padding: 30rpx; 475 box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
476 margin-bottom: 20rpx; 476 border-radius: 18rpx;
477 box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
478 position: relative;
479 // border-top: 4rpx solid #C4121B;
480 display: flex; 477 display: flex;
481 flex-direction: column; 478 flex-direction: column;
482 gap: 24rpx; 479
483 width: 100%; 480 .card-header {
484 box-sizing: border-box; 481 display: flex;
485 482 align-items: center;
486 &.item-checked { 483 justify-content: space-between;
487 // border: 2rpx solid #13B5B1; 484 padding-bottom: 10rpx;
488 border-top: 4rpx solid #C4121B; 485
489 } 486 .date {
490 487 width: 100%;
491 /* 选择框(保留原位置+适配截图样式) */
492 .checkbox-wrap {
493 position: absolute;
494 top: 20rpx;
495 right: 20rpx;
496 z-index: 10;
497
498 .checkbox {
499 width: 36rpx;
500 height: 36rpx;
501 border: 2rpx solid #ddd;
502 border-radius: 8rpx;
503 display: flex; 488 display: flex;
504 align-items: center; 489 align-items: center;
505 justify-content: center; 490 justify-content: space-between;
506 background: #fff; 491 gap: 8rpx;
507 transition: all 0.2s; 492 font-size: 26rpx;
508 493
509 &.selected { 494 .data-header {
510 background: #13B5B1; 495 display: flex;
511 border-color: #13B5B1; 496 align-items: center;
497 min-width: 0;
498 }
499
500 .member-label {
501 color: #c30d23;
502 font-size: 28rpx;
503 font-weight: bold;
504 }
505
506 .value {
507 color: #000;
508 font-size: 27rpx;
509 font-weight: bold;
510 max-width: 430rpx;
511 overflow: hidden;
512 white-space: nowrap;
513 text-overflow: ellipsis;
514 }
515
516 .status-tag {
517 flex-shrink: 0;
518 font-size: 24rpx;
519 color: #999;
520
521 &.text-warning {
522 color: #faad14;
523 }
524
525 &.text-success {
526 color: #52c41a;
527 }
528
529 &.text-danger {
530 color: #ff4d4f;
531 }
512 } 532 }
513 } 533 }
514 } 534 }
515 535
516 /* 主内容区 */ 536 .member-time {
517 .item-content {
518 width: 100%; 537 width: 100%;
519 display: flex; 538 display: flex;
520 flex-direction: column;
521 gap: 16rpx;
522 }
523
524 /* 状态+提交时间(截图风格顶部) */
525 .item-top {
526 display: flex;
527 justify-content: space-between; 539 justify-content: space-between;
528 align-items: center; 540 padding-bottom: 4rpx;
529 width: 100%; 541
530 542 .label {
531 .status-tag { 543 max-width: 430rpx;
532 padding: 6rpx 20rpx; 544 color: #555;
533 border-radius: 20rpx; 545 font-size: 26rpx;
534 font-size: 24rpx; 546 line-height: 1.4;
535 547
536 .text-warning { 548 .star {
537 background-color: #fff3e0; 549 color: #777;
538 color: #ff9800; 550 font-size: 26rpx;
539 }
540
541 .text-success {
542 background-color: #e8f5e9;
543 color: #4caf50;
544 }
545
546 .text-danger {
547 background-color: #ffebee;
548 color: #f44336;
549 } 551 }
550 } 552 }
551 553
552 .submit-time { 554 .price {
553 font-size: 24rpx; 555 min-width: 160rpx;
554 color: #999; 556 color: #333;
557 font-size: 26rpx;
558 font-weight: 500;
559 text-align: right;
560
561 .person {
562 font-size: 24rpx;
563 color: #999;
564 text-align: right;
565 }
555 } 566 }
556 } 567 }
557 568
558 /* 缴费单位名称(截图风格标题) */ 569 .info-section {
559 .mem-name {
560 font-size: 28rpx;
561 font-weight: 600;
562 color: #333;
563 padding-bottom: 8rpx;
564 // border-bottom: 1px dashed #eee;
565 }
566
567 /* 信息行(截图风格:浅灰背景+圆角+均匀分布) */
568 .info-row {
569 display: flex; 570 display: flex;
570 justify-content: space-between; 571 align-items: center;
571 background-color: #f8f9fa; 572 background: #f8f8f8;
572 border-radius: 12rpx; 573 border-radius: 12rpx;
573 padding: 20rpx; 574 padding: 16rpx 8rpx;
574 gap: 16rpx; 575 margin-top: 14rpx;
575 width: 100%; 576
576 box-sizing: border-box; 577 .single-info {
577
578 .info-item {
579 flex: 1; 578 flex: 1;
580 display: flex; 579 text-align: center;
581 flex-direction: column; 580 min-width: 0;
582 align-items: center; 581
583 gap: 8rpx; 582 .label {
584
585 &.two-col {
586 flex: 1;
587 max-width: 48%;
588 }
589
590 .info-label {
591 font-size: 24rpx; 583 font-size: 24rpx;
592 color: #999; 584 color: #999;
585 margin-bottom: 8rpx;
593 } 586 }
594 587
588 .value,
595 .info-value { 589 .info-value {
596 font-size: 28rpx; 590 font-size: 24rpx;
597 color: #333; 591 color: #333;
598 font-weight: 500; 592 word-break: break-all;
599 text-align: center;
600 } 593 }
601 } 594 }
595
596 .line {
597 width: 1rpx;
598 height: 54rpx;
599 background: #e8e8e8;
600 }
602 } 601 }
603 602
604 /* 操作按钮区(保留原三个按钮+截图风格优化) */ 603 .btn-group {
605 .func {
606 display: flex; 604 display: flex;
607 gap: 20rpx;
608 width: 100%;
609 box-sizing: border-box;
610 justify-content: flex-end; 605 justify-content: flex-end;
611 606 align-items: center;
612 button { 607 gap: 16rpx;
613 // flex: 1; 608 width: 100%;
614 width: 100px; 609 margin-top: 16rpx;
615 height: 72rpx; 610 flex-wrap: wrap;
616 line-height: 72rpx; 611
617 font-size: 28rpx; 612 .btn {
618 border-radius: 36rpx; 613 width: 140rpx;
614 height: 48rpx;
615 line-height: 48rpx;
616 padding: 0;
617 border-radius: 10rpx;
618 font-size: 24rpx;
619 white-space: nowrap;
620 font-weight: bold;
619 border: none; 621 border: none;
620 transition: all 0.2s; 622 background: transparent;
621 } 623 text-align: center;
622 624 margin: 0;
623 .btn-view { 625
624 background-color: #f5f5f5; 626 &::after {
625 color: #666; 627 border: none;
626 } 628 display: none;
627 629 }
628 .btn-audit { 630
629 background: linear-gradient(135deg, #13B5B1, #15c5c1); 631 &.btn-info {
630 color: #fff; 632 color: #444;
631 } 633 border: 1rpx solid #d7d7d7;
632 634 background: #fff;
633 .btn-info { 635 }
634 border: 2rpx solid #C4121B; 636
635 // background: linear-gradient(135deg, #ff9800, #ffb74d); 637 &.btn-pay,
636 color: #C4121B; 638 &.btn-view-invoice {
639 color: #c30d23;
640 border: 1rpx solid #c30d23;
641 background: #fff;
642 }
637 } 643 }
638 } 644 }
639 } 645 }
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
81 <button :class="{ disabled: isRefundDisabled(item) }" :disabled="isRefundDisabled(item)" class="btn btn-pay" @click.stop="handleRefund(item)">退款</button> 81 <button :class="{ disabled: isRefundDisabled(item) }" :disabled="isRefundDisabled(item)" class="btn btn-pay" @click.stop="handleRefund(item)">退款</button>
82 </template> 82 </template>
83 <template v-else> 83 <template v-else>
84 <button :class="{ disabled: isPayDisabled(item) }" :disabled="isPayDisabled(item)" class="btn btn-pay" @click.stop="handlePay(item)">支付</button> 84 <button :class="{ disabled: isPayDisabled(item) }" :disabled="isPayDisabled(item)" class="btn btn-pay" @click.stop="handlePay(item)">支付</button>
85 <button v-if="canShowCancel(item)" :class="{ disabled: isCancelDisabled(item) }" :disabled="isCancelDisabled(item)" class="btn btn-cancel" @click.stop="handleCancel(item)">取消订单</button> 85 <button v-if="canShowCancel(item)" :class="{ disabled: isCancelDisabled(item) }" :disabled="isCancelDisabled(item)" class="btn btn-cancel" @click.stop="handleCancel(item)">取消订单</button>
86 <template v-if="canShowInvoiceApply(item)"> 86 <template v-if="canShowInvoiceApply(item)">
87 <button :class="{ disabled: isInvoiceDisabled(item) }" :disabled="isInvoiceDisabled(item)" class="btn btn-view-invoice" @click.stop="makeInvoiceFN(item)">申请开票</button> 87 <button :class="{ disabled: isInvoiceDisabled(item) }" :disabled="isInvoiceDisabled(item)" class="btn btn-view-invoice" @click.stop="makeInvoiceFN(item)">申请开票</button>
...@@ -160,26 +160,14 @@ ...@@ -160,26 +160,14 @@
160 </view> 160 </view>
161 </view> 161 </view>
162 162
163 <!-- 自定义删除确认弹窗 --> 163 <!-- 自定义确认弹窗 -->
164 <view v-if="showDelPopup" class="popup-mask" @touchmove.stop.prevent @click.stop="closeDelPopup"> 164 <view v-if="showConfirmPopup" class="popup-mask" @touchmove.stop.prevent @click.stop="closeConfirmPopup">
165 <view class="custom-modal" @click.stop> 165 <view class="custom-modal" @click.stop>
166 <view class="modal-title">提示</view> 166 <view class="modal-title">提示</view>
167 <view class="modal-content">{{ delModalContent }}</view> 167 <view class="modal-content">{{ confirmModalContent }}</view>
168 <view class="modal-btns"> 168 <view class="modal-btns">
169 <button class="modal-btn-cancel" @click="closeDelPopup">取消</button> 169 <button class="modal-btn-cancel" @click="closeConfirmPopup">取消</button>
170 <button class="modal-btn-confirm" @click="confirmDel">确定</button> 170 <button class="modal-btn-confirm" @click="confirmPopup">确定</button>
171 </view>
172 </view>
173 </view>
174
175 <!-- 自定义取消订单确认弹窗 -->
176 <view v-if="showCancelPopup" class="popup-mask" @touchmove.stop.prevent @click.stop="closeCancelPopup">
177 <view class="custom-modal" @click.stop>
178 <view class="modal-title">提示</view>
179 <view class="modal-content">{{ cancelModalContent }}</view>
180 <view class="modal-btns">
181 <button class="modal-btn-cancel" @click="closeCancelPopup">取消</button>
182 <button class="modal-btn-confirm" @click="confirmCancel">确定</button>
183 </view> 171 </view>
184 </view> 172 </view>
185 </view> 173 </view>
...@@ -222,8 +210,7 @@ const queryParams = reactive({ ...@@ -222,8 +210,7 @@ const queryParams = reactive({
222 }); 210 });
223 211
224 // 弹窗控制 212 // 弹窗控制
225 const showDelPopup = ref(false); 213 const showConfirmPopup = ref(false);
226 const showCancelPopup = ref(false);
227 const isPopupOpen = ref(false); 214 const isPopupOpen = ref(false);
228 const showInvoicePopup = ref(false); 215 const showInvoicePopup = ref(false);
229 const showInvoiceWebview = ref(false); 216 const showInvoiceWebview = ref(false);
...@@ -231,8 +218,8 @@ const invoiceWebviewUrl = ref(''); ...@@ -231,8 +218,8 @@ const invoiceWebviewUrl = ref('');
231 const invoiceData = ref({}); 218 const invoiceData = ref({});
232 219
233 // 弹窗内容 220 // 弹窗内容
234 const delModalContent = ref(''); 221 const confirmModalContent = ref('');
235 const cancelModalContent = ref(''); 222 const confirmModalAction = ref(null);
236 223
237 // 当前操作的订单 224 // 当前操作的订单
238 const currentOrder = ref(null); 225 const currentOrder = ref(null);
...@@ -418,12 +405,34 @@ const handelSearch = () => { ...@@ -418,12 +405,34 @@ const handelSearch = () => {
418 initData() 405 initData()
419 } 406 }
420 407
408 const openConfirmPopup = ({ content, action, order = null }) => {
409 currentOrder.value = order
410 confirmModalContent.value = content
411 confirmModalAction.value = action
412 showConfirmPopup.value = true
413 isPopupOpen.value = true
414 }
415
416 const closeConfirmPopup = () => {
417 showConfirmPopup.value = false
418 isPopupOpen.value = false
419 currentOrder.value = null
420 confirmModalContent.value = ''
421 confirmModalAction.value = null
422 }
423
424 const confirmPopup = async () => {
425 if (typeof confirmModalAction.value !== 'function') return
426 await confirmModalAction.value(currentOrder.value)
427 }
428
421 // 删除订单 429 // 删除订单
422 const handleDelete = (item) => { 430 const handleDelete = (item) => {
423 currentOrder.value = item; 431 openConfirmPopup({
424 delModalContent.value = `是否确认删除订单编号为"${item.tradeNo}"的订单?`; 432 order: item,
425 showDelPopup.value = true; 433 content: `是否确认删除订单编号为"${item.tradeNo}"的订单?`,
426 isPopupOpen.value = true; 434 action: confirmDel
435 })
427 }; 436 };
428 437
429 // 确认删除 438 // 确认删除
...@@ -435,7 +444,7 @@ const confirmDel = async () => { ...@@ -435,7 +444,7 @@ const confirmDel = async () => {
435 pageNum.value = 1; 444 pageNum.value = 1;
436 list.value = []; 445 list.value = [];
437 await initData(); 446 await initData();
438 closeDelPopup(); 447 closeConfirmPopup();
439 } catch (e) { 448 } catch (e) {
440 uni.showToast({title: '删除失败', icon: 'error'}); 449 uni.showToast({title: '删除失败', icon: 'error'});
441 } 450 }
...@@ -455,13 +464,6 @@ const goToDetail = (item) => { ...@@ -455,13 +464,6 @@ const goToDetail = (item) => {
455 } 464 }
456 } 465 }
457 466
458 // 关闭删除弹窗
459 const closeDelPopup = () => {
460 showDelPopup.value = false;
461 isPopupOpen.value = false;
462 currentOrder.value = null;
463 };
464
465 // 去缴费 467 // 去缴费
466 const handlePay = async (item) => { 468 const handlePay = async (item) => {
467 if (isPayDisabled(item)) return; 469 if (isPayDisabled(item)) return;
...@@ -493,16 +495,20 @@ const makeInvoiceFN = (item) => { ...@@ -493,16 +495,20 @@ const makeInvoiceFN = (item) => {
493 495
494 const handleReIssue = async (item) => { 496 const handleReIssue = async (item) => {
495 if (isReIssueDisabled(item)) return 497 if (isReIssueDisabled(item)) return
496 const { confirm } = await uni.showModal({ 498 openConfirmPopup({
497 title: '提示', 499 order: item,
498 content: '开票后30天内仅可重开一次,是否确认重新开票?原发票将作废且无法恢复。' 500 content: '开票后30天内仅可重开一次,是否确认重新开票?原发票将作废且无法恢复。',
501 action: confirmReIssue
499 }) 502 })
500 if (!confirm) return 503 }
501 504
505 const confirmReIssue = async (item) => {
506 if (!item) return
502 try { 507 try {
503 uni.showLoading({ title: '处理中...' }) 508 uni.showLoading({ title: '处理中...' })
504 await api.invoiceFastRed(item.id) 509 await api.invoiceFastRed(item.id)
505 uni.hideLoading() 510 uni.hideLoading()
511 closeConfirmPopup()
506 await initData() 512 await initData()
507 makeInvoiceFN({ ...item, invoiceStatus: '0' }) 513 makeInvoiceFN({ ...item, invoiceStatus: '0' })
508 } catch (e) { 514 } catch (e) {
...@@ -553,10 +559,11 @@ const closeInvoiceWebview = () => { ...@@ -553,10 +559,11 @@ const closeInvoiceWebview = () => {
553 // 取消订单 559 // 取消订单
554 const handleCancel = (item) => { 560 const handleCancel = (item) => {
555 if (isCancelDisabled(item)) return 561 if (isCancelDisabled(item)) return
556 currentOrder.value = item; 562 openConfirmPopup({
557 cancelModalContent.value = `是否确认取消缴费编号为"${item.wfCode}"的订单?`; 563 order: item,
558 showCancelPopup.value = true; 564 content: `是否确认取消缴费编号为"${item.wfCode}"的订单?`,
559 isPopupOpen.value = true; 565 action: confirmCancel
566 })
560 }; 567 };
561 568
562 // 确认取消订单 569 // 确认取消订单
...@@ -568,30 +575,27 @@ const confirmCancel = async () => { ...@@ -568,30 +575,27 @@ const confirmCancel = async () => {
568 pageNum.value = 1; 575 pageNum.value = 1;
569 list.value = []; 576 list.value = [];
570 await initData(); 577 await initData();
571 closeCancelPopup(); 578 closeConfirmPopup();
572 } catch (e) { 579 } catch (e) {
573 uni.showToast({title: '取消失败', icon: 'error'}); 580 uni.showToast({title: '取消失败', icon: 'error'});
574 } 581 }
575 }; 582 };
576 583
577 // 关闭取消订单弹窗
578 const closeCancelPopup = () => {
579 showCancelPopup.value = false;
580 isPopupOpen.value = false;
581 currentOrder.value = null;
582 };
583
584 const handleRefund = async (item) => { 584 const handleRefund = async (item) => {
585 if (isRefundDisabled(item)) return 585 if (isRefundDisabled(item)) return
586 const { confirm } = await uni.showModal({ 586 openConfirmPopup({
587 title: '提示', 587 order: item,
588 content: `缴费编号为"${item.wfCode}"的订单是否确认退款?` 588 content: `缴费编号为"${item.wfCode}"的订单是否确认退款?`,
589 action: confirmRefund
589 }) 590 })
590 if (!confirm) return 591 }
591 592
593 const confirmRefund = async (item) => {
594 if (!item) return
592 try { 595 try {
593 uni.showLoading({ title: '处理中...' }) 596 uni.showLoading({ title: '处理中...' })
594 await api.refundOrder(item.id) 597 await api.refundOrder(item.id)
598 closeConfirmPopup()
595 uni.showToast({ title: '操作成功', icon: 'success' }) 599 uni.showToast({ title: '操作成功', icon: 'success' })
596 pageNum.value = 1 600 pageNum.value = 1
597 list.value = [] 601 list.value = []
......
...@@ -453,6 +453,13 @@ ...@@ -453,6 +453,13 @@
453 } 453 }
454 }, 454 },
455 { 455 {
456 "path": "mobilizeRecord",
457 "style": {
458 "navigationBarTitleText": "调动记录",
459 "enablePullDownRefresh": false
460 }
461 },
462 {
456 "path": "order", 463 "path": "order",
457 "style": { 464 "style": {
458 "navigationBarTitleText": "订单列表", 465 "navigationBarTitleText": "订单列表",
...@@ -1141,4 +1148,4 @@ ...@@ -1141,4 +1148,4 @@
1141 ] 1148 ]
1142 } 1149 }
1143 } 1150 }
1144 }
...\ No newline at end of file ...\ No newline at end of file
1151 }
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
113 <button :class="{ disabled: isRefundDisabled(item) }" :disabled="isRefundDisabled(item)" class="btn btn-danger" @click.stop="handleRefund(item)">退款</button> 113 <button :class="{ disabled: isRefundDisabled(item) }" :disabled="isRefundDisabled(item)" class="btn btn-danger" @click.stop="handleRefund(item)">退款</button>
114 </template> 114 </template>
115 <template v-else> 115 <template v-else>
116 <button :class="{ disabled: isPayDisabled(item) }" :disabled="isPayDisabled(item)" class="btn btn-pay" @click.stop="handlePay(item)">支付</button> 116 <button :class="{ disabled: isPayDisabled(item) }" :disabled="isPayDisabled(item)" class="btn btn-pay" @click.stop="handlePay(item)">支付</button>
117 <button v-if="canShowCancel(item)" :class="{ disabled: isCancelDisabled(item) }" :disabled="isCancelDisabled(item)" class="btn btn-cancel" @click.stop="handleCancel(item)">取消订单</button> 117 <button v-if="canShowCancel(item)" :class="{ disabled: isCancelDisabled(item) }" :disabled="isCancelDisabled(item)" class="btn btn-cancel" @click.stop="handleCancel(item)">取消订单</button>
118 <template v-if="canShowInvoiceApply(item)"> 118 <template v-if="canShowInvoiceApply(item)">
119 <button :class="{ disabled: isInvoiceDisabled(item) }" :disabled="isInvoiceDisabled(item)" class="btn btn-view-invoice" @click.stop="makeInvoiceFN(item)">申请开票</button> 119 <button :class="{ disabled: isInvoiceDisabled(item) }" :disabled="isInvoiceDisabled(item)" class="btn btn-view-invoice" @click.stop="makeInvoiceFN(item)">申请开票</button>
...@@ -192,26 +192,14 @@ ...@@ -192,26 +192,14 @@
192 </view> 192 </view>
193 </view> 193 </view>
194 194
195 <!-- 自定义删除确认弹窗 --> 195 <!-- 自定义确认弹窗 -->
196 <view v-if="showDelPopup" class="popup-mask" @touchmove.stop.prevent @click.stop="closeDelPopup"> 196 <view v-if="showConfirmPopup" class="popup-mask" @touchmove.stop.prevent @click.stop="closeConfirmPopup">
197 <view class="custom-modal" @click.stop> 197 <view class="custom-modal" @click.stop>
198 <view class="modal-title">提示</view> 198 <view class="modal-title">提示</view>
199 <view class="modal-content">{{ delModalContent }}</view> 199 <view class="modal-content">{{ confirmModalContent }}</view>
200 <view class="modal-btns"> 200 <view class="modal-btns">
201 <button class="modal-btn-cancel" @click="closeDelPopup">取消</button> 201 <button class="modal-btn-cancel" @click="closeConfirmPopup">取消</button>
202 <button class="modal-btn-confirm" @click="confirmDel">确定</button> 202 <button class="modal-btn-confirm" @click="confirmPopup">确定</button>
203 </view>
204 </view>
205 </view>
206
207 <!-- 自定义取消订单确认弹窗 -->
208 <view v-if="showCancelPopup" class="popup-mask" @touchmove.stop.prevent @click.stop="closeCancelPopup">
209 <view class="custom-modal" @click.stop>
210 <view class="modal-title">提示</view>
211 <view class="modal-content">{{ cancelModalContent }}</view>
212 <view class="modal-btns">
213 <button class="modal-btn-cancel" @click="closeCancelPopup">取消</button>
214 <button class="modal-btn-confirm" @click="confirmCancel">确定</button>
215 </view> 203 </view>
216 </view> 204 </view>
217 </view> 205 </view>
...@@ -267,8 +255,7 @@ const queryParams = reactive({ ...@@ -267,8 +255,7 @@ const queryParams = reactive({
267 }); 255 });
268 256
269 // 弹窗控制 257 // 弹窗控制
270 const showDelPopup = ref(false); 258 const showConfirmPopup = ref(false);
271 const showCancelPopup = ref(false);
272 const isPopupOpen = ref(false); 259 const isPopupOpen = ref(false);
273 const showInvoicePopup = ref(false); 260 const showInvoicePopup = ref(false);
274 const showInvoiceWebview = ref(false); 261 const showInvoiceWebview = ref(false);
...@@ -276,8 +263,8 @@ const invoiceWebviewUrl = ref(''); ...@@ -276,8 +263,8 @@ const invoiceWebviewUrl = ref('');
276 const invoiceData = ref({}); 263 const invoiceData = ref({});
277 264
278 // 弹窗内容 265 // 弹窗内容
279 const delModalContent = ref(''); 266 const confirmModalContent = ref('');
280 const cancelModalContent = ref(''); 267 const confirmModalAction = ref(null);
281 268
282 // 当前操作的订单 269 // 当前操作的订单
283 const currentOrder = ref(null); 270 const currentOrder = ref(null);
...@@ -504,12 +491,34 @@ const handelSearch = () => { ...@@ -504,12 +491,34 @@ const handelSearch = () => {
504 initData() 491 initData()
505 } 492 }
506 493
494 const openConfirmPopup = ({ content, action, order = null }) => {
495 currentOrder.value = order
496 confirmModalContent.value = content
497 confirmModalAction.value = action
498 showConfirmPopup.value = true
499 isPopupOpen.value = true
500 }
501
502 const closeConfirmPopup = () => {
503 showConfirmPopup.value = false
504 isPopupOpen.value = false
505 currentOrder.value = null
506 confirmModalContent.value = ''
507 confirmModalAction.value = null
508 }
509
510 const confirmPopup = async () => {
511 if (typeof confirmModalAction.value !== 'function') return
512 await confirmModalAction.value(currentOrder.value)
513 }
514
507 // 删除订单 515 // 删除订单
508 const handleDelete = (item) => { 516 const handleDelete = (item) => {
509 currentOrder.value = item; 517 openConfirmPopup({
510 delModalContent.value = `是否确认删除订单编号为"${item.tradeNo}"的订单?`; 518 order: item,
511 showDelPopup.value = true; 519 content: `是否确认删除订单编号为"${item.tradeNo}"的订单?`,
512 isPopupOpen.value = true; 520 action: confirmDel
521 })
513 }; 522 };
514 523
515 // 确认删除 524 // 确认删除
...@@ -521,7 +530,7 @@ const confirmDel = async () => { ...@@ -521,7 +530,7 @@ const confirmDel = async () => {
521 pageNum.value = 1; 530 pageNum.value = 1;
522 list.value = []; 531 list.value = [];
523 await initData(); 532 await initData();
524 closeDelPopup(); 533 closeConfirmPopup();
525 } catch (e) { 534 } catch (e) {
526 uni.showToast({title: '删除失败', icon: 'error'}); 535 uni.showToast({title: '删除失败', icon: 'error'});
527 } 536 }
...@@ -546,13 +555,6 @@ const goToDetail = (item) => { ...@@ -546,13 +555,6 @@ const goToDetail = (item) => {
546 // uni.navigateTo({url: `/pages/rank/applyDetail?examId=${item.sourceId || item.id}&type=${queryParams.type}`}); 555 // uni.navigateTo({url: `/pages/rank/applyDetail?examId=${item.sourceId || item.id}&type=${queryParams.type}`});
547 } 556 }
548 557
549 // 关闭删除弹窗
550 const closeDelPopup = () => {
551 showDelPopup.value = false;
552 isPopupOpen.value = false;
553 currentOrder.value = null;
554 };
555
556 // 去支付:个人会员订单走 payOrder,再次支付携带 common/order 的 id;单位会员订单走 goPay;级位/段位/越段考试走 paymentDetail。 558 // 去支付:个人会员订单走 payOrder,再次支付携带 common/order 的 id;单位会员订单走 goPay;级位/段位/越段考试走 paymentDetail。
557 const handlePay = async (item) => { 559 const handlePay = async (item) => {
558 if (isPayDisabled(item)) return; 560 if (isPayDisabled(item)) return;
...@@ -605,16 +607,20 @@ const makeInvoiceFN = (item) => { ...@@ -605,16 +607,20 @@ const makeInvoiceFN = (item) => {
605 607
606 const handleReIssue = async (item) => { 608 const handleReIssue = async (item) => {
607 if (isReIssueDisabled(item)) return 609 if (isReIssueDisabled(item)) return
608 const { confirm } = await uni.showModal({ 610 openConfirmPopup({
609 title: '提示', 611 order: item,
610 content: '开票后30天内仅可重开一次,是否确认重新开票?原发票将作废且无法恢复。' 612 content: '开票后30天内仅可重开一次,是否确认重新开票?原发票将作废且无法恢复。',
613 action: confirmReIssue
611 }) 614 })
612 if (!confirm) return 615 }
613 616
617 const confirmReIssue = async (item) => {
618 if (!item) return
614 try { 619 try {
615 uni.showLoading({ title: '处理中...' }) 620 uni.showLoading({ title: '处理中...' })
616 await api.invoiceFastRed(item.id) 621 await api.invoiceFastRed(item.id)
617 uni.hideLoading() 622 uni.hideLoading()
623 closeConfirmPopup()
618 await initData() 624 await initData()
619 makeInvoiceFN({ ...item, invoiceStatus: '0' }) 625 makeInvoiceFN({ ...item, invoiceStatus: '0' })
620 } catch (e) { 626 } catch (e) {
...@@ -665,10 +671,11 @@ const closeInvoiceWebview = () => { ...@@ -665,10 +671,11 @@ const closeInvoiceWebview = () => {
665 // 取消订单 671 // 取消订单
666 const handleCancel = (item) => { 672 const handleCancel = (item) => {
667 if (isCancelDisabled(item)) return 673 if (isCancelDisabled(item)) return
668 currentOrder.value = item; 674 openConfirmPopup({
669 cancelModalContent.value = `是否确认取消缴费编号为"${item.wfCode}"的订单?`; 675 order: item,
670 showCancelPopup.value = true; 676 content: `是否确认取消缴费编号为"${item.wfCode}"的订单?`,
671 isPopupOpen.value = true; 677 action: confirmCancel
678 })
672 }; 679 };
673 680
674 // 确认取消订单 681 // 确认取消订单
...@@ -680,30 +687,27 @@ const confirmCancel = async () => { ...@@ -680,30 +687,27 @@ const confirmCancel = async () => {
680 pageNum.value = 1; 687 pageNum.value = 1;
681 list.value = []; 688 list.value = [];
682 await initData(); 689 await initData();
683 closeCancelPopup(); 690 closeConfirmPopup();
684 } catch (e) { 691 } catch (e) {
685 uni.showToast({title: '取消失败', icon: 'error'}); 692 uni.showToast({title: '取消失败', icon: 'error'});
686 } 693 }
687 }; 694 };
688 695
689 // 关闭取消订单弹窗
690 const closeCancelPopup = () => {
691 showCancelPopup.value = false;
692 isPopupOpen.value = false;
693 currentOrder.value = null;
694 };
695
696 const handleRefund = async (item) => { 696 const handleRefund = async (item) => {
697 if (isRefundDisabled(item)) return 697 if (isRefundDisabled(item)) return
698 const { confirm } = await uni.showModal({ 698 openConfirmPopup({
699 title: '提示', 699 order: item,
700 content: `缴费编号为"${item.wfCode}"的订单是否确认退款?` 700 content: `缴费编号为"${item.wfCode}"的订单是否确认退款?`,
701 action: confirmRefund
701 }) 702 })
702 if (!confirm) return 703 }
703 704
705 const confirmRefund = async (item) => {
706 if (!item) return
704 try { 707 try {
705 uni.showLoading({ title: '处理中...' }) 708 uni.showLoading({ title: '处理中...' })
706 await api.refundOrder(item.id) 709 await api.refundOrder(item.id)
710 closeConfirmPopup()
707 uni.showToast({ title: '操作成功', icon: 'success' }) 711 uni.showToast({ title: '操作成功', icon: 'success' })
708 pageNum.value = 1 712 pageNum.value = 1
709 list.value = [] 713 list.value = []
......
...@@ -199,6 +199,7 @@ ...@@ -199,6 +199,7 @@
199 <image :src="config.baseUrl_api+'/fs/static/icon/28.png'"/> 199 <image :src="config.baseUrl_api+'/fs/static/icon/28.png'"/>
200 订单列表 200 订单列表
201 </view> 201 </view>
202
202 </view> 203 </view>
203 <view class="ttt">单位会员</view> 204 <view class="ttt">单位会员</view>
204 <view class="girdBox"> 205 <view class="girdBox">
...@@ -398,6 +399,10 @@ ...@@ -398,6 +399,10 @@
398 <image :src="config.baseUrl_api+'/fs/static/icon/6.png'"/> 399 <image :src="config.baseUrl_api+'/fs/static/icon/6.png'"/>
399 订单列表 400 订单列表
400 </view> 401 </view>
402 <view @click="goPath('/personalVip/mobilizeRecord')">
403 <image :src="config.baseUrl_api+'/fs/static/icon/1.png'"/>
404 调动记录
405 </view>
401 </view> 406 </view>
402 407
403 <view class="ttt">单位会员</view> 408 <view class="ttt">单位会员</view>
......
...@@ -223,8 +223,8 @@ console.log(333, perInfo.value) ...@@ -223,8 +223,8 @@ console.log(333, perInfo.value)
223 223
224 // 是否已绑定学员(根据会员卡号判断) 224 // 是否已绑定学员(根据会员卡号判断)
225 const isBound = computed(() => { 225 const isBound = computed(() => {
226 const perCode = perInfo.value?.perCode 226 const perName = perInfo.value?.perName
227 return perCode !== undefined && perCode !== null && perCode !== '' 227 return perName !== undefined && perName !== null && perName !== ''
228 }) 228 })
229 229
230 const bindPopup = ref(null) 230 const bindPopup = ref(null)
......
...@@ -58,8 +58,9 @@ ...@@ -58,8 +58,9 @@
58 <view class="data-header"> 58 <view class="data-header">
59 <text class="value"> 59 <text class="value">
60 <text class="tradeNo">订单编号:</text> 60 <text class="tradeNo">订单编号:</text>
61 {{ item.tradeNo || '——' }} 61
62 </text> 62 </text>
63 <text> {{ item.tradeNo || '——' }}</text>
63 </view> 64 </view>
64 </view> 65 </view>
65 </view> 66 </view>
...@@ -124,22 +125,15 @@ ...@@ -124,22 +125,15 @@
124 <button class="btn btn-pay" @click.stop="goPay(item)">去缴费</button> 125 <button class="btn btn-pay" @click.stop="goPay(item)">去缴费</button>
125 </template> --> 126 </template> -->
126 127
127 <button class="btn btn-info" @click.stop="goToDetail(item)">查看明细</button> 128 <!-- <button class="btn btn-info" @click.stop="goToDetail(item)">查看明细</button> -->
128 <button v-if="item.auditStatus == 9" class="btn btn-info" @click.stop="handleCancel(item)">取消</button> 129 <button :class="{ disabled: isPayDisabled(item) }" :disabled="isPayDisabled(item)" class="btn btn-pay" @click.stop="goPay(item)">去支付</button>
129 <template v-if="item.auditStatus == 9"> 130 <button v-if="canShowCancel(item)" :class="{ disabled: isCancelDisabled(item) }" :disabled="isCancelDisabled(item)" class="btn btn-info" @click.stop="handleCancel(item)">取消订单</button>
130 <button class="btn btn-pay" @click.stop="goPay(item)">支付</button>
131 </template>
132 <!-- 已缴费:申请开票/已开票(需要审核通过才能开票) --> 131 <!-- 已缴费:申请开票/已开票(需要审核通过才能开票) -->
133 <template v-if="item.payStatus == 1 && item.invoiceStatus != 1 && item.auditStatus == 2 && item.price > 0"> 132 <template v-if="canShowInvoiceApply(item)">
134 <button :disabled="item.invoiceStatus === 1" class="btn btn-view-invoice" 133 <button :class="{ disabled: isInvoiceDisabled(item) }" :disabled="isInvoiceDisabled(item)" class="btn btn-view-invoice" @click.stop="makeInvoiceFN(item)">
135 @click.stop="makeInvoiceFN(item)"> 134 申请开票
136 开票
137 </button> 135 </button>
138 </template> 136 </template>
139 <!-- 已开票:查看发票 -->
140 <template v-if="item.invoiceStatus == 1">
141 <button class="btn btn-invoice" @click.stop="viewInvoice(item)">查看发票</button>
142 </template>
143 </view> 137 </view>
144 </view> 138 </view>
145 </view> 139 </view>
...@@ -278,6 +272,28 @@ const getAuditStatusText = (status) => { ...@@ -278,6 +272,28 @@ const getAuditStatusText = (status) => {
278 }; 272 };
279 return map[status] || ''; 273 return map[status] || '';
280 }; 274 };
275
276 const hasInvoice = (item) => String(item?.invoiceStatus) === '1';
277
278 const isPayDisabled = (item) => {
279 return String(item?.auditStatus) !== '9';
280 };
281
282 const canShowCancel = (item) => {
283 return String(item?.auditStatus) === '9';
284 };
285
286 const isCancelDisabled = (item) => {
287 return String(item?.auditStatus) !== '9';
288 };
289
290 const canShowInvoiceApply = (item) => !hasInvoice(item);
291
292 const isInvoiceDisabled = (item) => {
293 if (hasInvoice(item)) return true;
294 return String(item?.auditStatus) !== '2' || String(item?.payStatus) === '4';
295 };
296
281 onLoad((options) => { 297 onLoad((options) => {
282 // queryParams.perId = options.perId || userInfo.value.perId 298 // queryParams.perId = options.perId || userInfo.value.perId
283 initData(); 299 initData();
...@@ -382,6 +398,7 @@ const goToDetail = (item) => { ...@@ -382,6 +398,7 @@ const goToDetail = (item) => {
382 398
383 // 去缴费 399 // 去缴费
384 const goPay = (item) => { 400 const goPay = (item) => {
401 if (isPayDisabled(item)) return;
385 const baseFormData = { 402 const baseFormData = {
386 rangeId: item.sourceId || item.id, 403 rangeId: item.sourceId || item.id,
387 payYear: item.content?.yearCount || 1, 404 payYear: item.content?.yearCount || 1,
...@@ -440,6 +457,7 @@ const handlePay = async (item) => { ...@@ -440,6 +457,7 @@ const handlePay = async (item) => {
440 457
441 // 申请开票 458 // 申请开票
442 const makeInvoiceFN = (item) => { 459 const makeInvoiceFN = (item) => {
460 if (isInvoiceDisabled(item)) return;
443 needRefresh.value = true; 461 needRefresh.value = true;
444 uni.navigateTo({ 462 uni.navigateTo({
445 url: `/pages/invoice/applyFeisui?orderId=${item.id}&amount=${item.price}&type=1` 463 url: `/pages/invoice/applyFeisui?orderId=${item.id}&amount=${item.price}&type=1`
...@@ -466,6 +484,7 @@ const closeInvoicePopup = () => { ...@@ -466,6 +484,7 @@ const closeInvoicePopup = () => {
466 484
467 // 取消订单 485 // 取消订单
468 const handleCancel = (item) => { 486 const handleCancel = (item) => {
487 if (isCancelDisabled(item)) return;
469 currentOrder.value = item; 488 currentOrder.value = item;
470 cancelModalContent.value = `是否确认取消缴费编号为"${item.wfCode}"的订单?`; 489 cancelModalContent.value = `是否确认取消缴费编号为"${item.wfCode}"的订单?`;
471 showCancelPopup.value = true; 490 showCancelPopup.value = true;
...@@ -781,9 +800,12 @@ const closeCancelPopup = () => { ...@@ -781,9 +800,12 @@ const closeCancelPopup = () => {
781 border: 1rpx solid #c30d23; 800 border: 1rpx solid #c30d23;
782 } 801 }
783 802
784 &:disabled { 803 &:disabled,
804 &.disabled {
785 opacity: 0.6; 805 opacity: 0.6;
786 pointer-events: none; 806 color: #999;
807 border-color: #ddd;
808 background: #f5f5f5;
787 } 809 }
788 } 810 }
789 } 811 }
......
1 <template>
2 <view>
3 <view class="appList">
4 <view class="appItem" v-for="(item,index) in list" :key="index" @click="goDetail(item)">
5 <view class="status">
6 <text :class="statusClass(item)">{{ statusText(item) }}</text>
7 </view>
8
9 <view class="name mt0">
10 {{ item.name || '调动记录' }}
11 </view>
12
13 <view class="flexbox" v-if="deptType == 1 || deptType == 2 || deptType == 3">
14 <view class="w50">
15 申请调入单位
16 <view><text>{{ item.targetDeptName || '-' }}</text></view>
17 </view>
18 <view class="w50">
19 会员合计
20 <view>{{ item.personCount || 0 }}</view>
21 </view>
22 </view>
23
24 <view v-else class="pp">
25 会员合计:
26 <text class="text-primary">{{ item.personCount || 0 }}</text>
27 </view>
28 </view>
29 </view>
30
31 <view class="nodata" v-if="list.length==0 && !loading">
32 <image mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image>
33 <text>暂无数据</text>
34 </view>
35 </view>
36 </template>
37
38 <script setup>
39 import * as api from '@/common/api.js'
40 import config from '@/config.js'
41 import { ref } from 'vue'
42 import { onLoad, onShow } from '@dcloudio/uni-app'
43
44 const app = getApp()
45 const queryParams = ref({})
46 const list = ref([])
47 const total = ref(0)
48 const deptType = ref('')
49 const loading = ref(false)
50 const hasInited = ref(false)
51
52 onLoad(() => {
53 if (app.globalData.isLogin) {
54 init()
55 } else {
56 app.firstLoadCallback = () => {
57 init()
58 }
59 }
60 })
61
62 onShow(() => {
63 if (hasInited.value) {
64 getList()
65 }
66 })
67
68 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
81 getList()
82 }
83
84 function getList() {
85 loading.value = true
86 uni.showLoading({
87 title: '加载中',
88 mask: true
89 })
90 api.getMobilizelist(queryParams.value).then(res => {
91 list.value = res.rows || []
92 total.value = res.total || 0
93 }).finally(() => {
94 loading.value = false
95 uni.hideLoading()
96 })
97 }
98
99 function statusText(item) {
100 if (deptType.value == 1) {
101 const map = {
102 0: '审核中',
103 1: '审核通过',
104 2: '审核拒绝',
105 3: '撤销申请'
106 }
107 return map[item.ztxRes] || '-'
108 }
109 if (deptType.value == 2 || deptType.value == 3) {
110 const map = {
111 0: '审核中',
112 1: '审核通过',
113 2: '审核拒绝',
114 3: '撤销申请'
115 }
116 return map[item.shenRes] || '-'
117 }
118 const map = {
119 0: '待提交',
120 1: '审核中',
121 2: '审核拒绝',
122 3: '审核通过',
123 4: '已撤回'
124 }
125 return map[item.status] || '-'
126 }
127
128 function statusClass(item) {
129 const value = deptType.value == 1 ? item.ztxRes : (deptType.value == 2 || deptType.value == 3 ? item.shenRes : item.status)
130 if (value == 1 || value == 3) return 'text-success'
131 if (value == 2 || value == 4) return 'text-danger'
132 return 'text-primary'
133 }
134
135 function goDetail(item) {
136 const auditLog = encodeURIComponent(JSON.stringify(item.auditLog))
137 const form = encodeURIComponent(JSON.stringify(item))
138 uni.navigateTo({
139 url: `/personalVip/mobilizeDetail?rangeId=${item.id}&auditLog=${auditLog}&form=${form}`
140 })
141 }
142 </script>
143
144 <style scoped lang="scss">
145 .mt0 {
146 margin-top: 0 !important;
147 }
148
149 .appList .appItem .name {
150 width: 80%;
151 word-break: break-all;
152 }
153 </style>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!