From 61c4c3f45e4257e2e7662f033e2719e62366c632 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期二, 31 三月 2026 23:02:22 +0800
Subject: [PATCH] feat: 优化申请发票,还可以修改发票信息
---
app/pages/mine/invoice/index.vue | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/app/pages/mine/invoice/index.vue b/app/pages/mine/invoice/index.vue
index d6b6018..31895e4 100644
--- a/app/pages/mine/invoice/index.vue
+++ b/app/pages/mine/invoice/index.vue
@@ -57,7 +57,7 @@
</view>
<!-- 鍙戠エ鍒楄〃 -->
- <view v-for="(item, index) in list" :key="index" class="invoice-item bg-white margin-sm padding-sm radius shadow">
+ <view v-for="(item, index) in list" :key="index" class="invoice-item bg-white margin-sm padding-sm radius shadow" @click="handleDetail(item)">
<view class="flex justify-between border-bottom padding-bottom-xs margin-bottom-xs">
<text class="text-bold">鏈嶅姟鍗曞彿: {{ item.serviceCode || item.legacyServiceOrderId || '鏈煡' }}</text>
<text :class="item.status === 0 ? 'text-orange' : item.status === 1 ? 'text-green' : item.status === 2 ? 'text-red' : 'text-gray'">{{ item.status === 0 ? '寰呭鏍�' : item.status === 1 ? '宸查�氳繃' : item.status === 2 ? '宸查┏鍥�' : '鏈煡' }}</text>
@@ -79,8 +79,9 @@
<text class="value">{{ item.invoiceNo }}</text>
</view>
- <view class="action-bar margin-top-sm flex justify-end" v-if="item.invoiceUrl">
- <button class="cu-btn sm bg-green" @click="handleDownload" :data-url="item.invoiceUrl">鏌ョ湅鍙戠エ</button>
+ <view class="action-bar margin-top-sm flex justify-end">
+ <button v-if="item.invoiceUrl" class="cu-btn sm bg-green margin-right-xs" @click.stop="handleDownload" :data-url="item.invoiceUrl">鏌ョ湅鍙戠エ</button>
+ <button v-if="item.status === 0 || item.status === 2" class="cu-btn sm bg-blue" @click.stop="handleEdit(item)">缂栬緫</button>
</view>
<view v-if="item.status === 2 && item.auditRemarks" class="margin-top-xs padding-xs bg-gray radius">
<text class="text-sm text-red">椹冲洖鍘熷洜: {{ item.auditRemarks }}</text>
@@ -165,6 +166,13 @@
},
handleApply() {
this.$tab.navigateTo('/pages/mine/invoice/apply')
+ },
+ handleDetail(item) {
+ this.$tab.navigateTo(`/pages/mine/invoice/detail?invoiceId=${item.invoiceId}`)
+ },
+ handleEdit(item) {
+ const invoiceInfo = encodeURIComponent(JSON.stringify(item))
+ this.$tab.navigateTo(`/pages/mine/invoice/edit?invoiceInfo=${invoiceInfo}`)
},
handleDownload(e) {
const url = e.currentTarget.dataset.url
@@ -378,6 +386,10 @@
}
.invoice-item {
+ cursor: pointer;
+ transition: box-shadow 0.2s;
+ &:active { opacity: 0.85; }
+
.border-bottom {
border-bottom: 1rpx solid #eee;
}
--
Gitblit v1.9.1