Sfoglia il codice sorgente

feat: 用户列表页添加退款处理入口

- 搜索栏新增"退款处理"按钮,点击跳转退款清单页进行单笔/批量处理
- 退款申请成功后弹窗引导,提供"前往处理"直接跳转处理页面

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline 1 settimana fa
parent
commit
0880635bf8
1 ha cambiato i file con 34 aggiunte e 1 eliminazioni
  1. 34 1
      admin-h5/src/pages/user/list.vue

+ 34 - 1
admin-h5/src/pages/user/list.vue

@@ -7,6 +7,7 @@
         <input type="text" placeholder="搜索手机号" v-model="searchKeyword" @confirm="handleSearch" />
       </view>
       <button class="search-btn" @click="handleSearch">搜索</button>
+      <button class="refund-nav-btn" @click="navigateToRefund">退款处理</button>
     </view>
 
     <!-- 用户列表 -->
@@ -200,6 +201,10 @@ const handleSearch = () => {
   loadData()
 }
 
+const navigateToRefund = () => {
+  uni.navigateTo({ url: '/pages/finance/refund' })
+}
+
 const handleApplyRefund = (item) => {
   refundUser.value = item
   refundReason.value = ''
@@ -221,8 +226,18 @@ const confirmRefund = async () => {
       reason: refundReason.value.trim()
     })
     if (res && res.code === 200) {
-      showToast('退款申请已提交', 'success')
       closeRefundModal()
+      uni.showModal({
+        title: '申请成功',
+        content: '退款申请已提交,是否立即前往处理?',
+        confirmText: '前往处理',
+        cancelText: '关闭',
+        success: (modalRes) => {
+          if (modalRes.confirm) {
+            uni.navigateTo({ url: '/pages/finance/refund' })
+          }
+        }
+      })
     } else {
       showToast(res?.msg || '提交失败')
     }
@@ -277,6 +292,24 @@ onMounted(async () => {
   transform: scale(0.97);
 }
 
+.refund-nav-btn {
+  margin-left: 12rpx;
+  height: 64rpx;
+  line-height: 64rpx;
+  padding: 0 20rpx;
+  background: #FFFFFF;
+  color: #C6171E;
+  border: 2rpx solid #C6171E;
+  border-radius: 16rpx;
+  font-size: 24rpx;
+  white-space: nowrap;
+}
+
+.refund-nav-btn:active {
+  background: #FFF0F0;
+  transform: scale(0.97);
+}
+
 .user-list {
   padding: 20rpx;
 }