|
|
@@ -62,7 +62,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<!-- 发票信息 -->
|
|
|
<div class="card">
|
|
|
<div class="card-header">
|
|
|
@@ -119,37 +118,21 @@
|
|
|
</van-button>
|
|
|
</div>
|
|
|
|
|
|
- <!-- ✅ 弹窗(放在最外层,不要嵌套第二个 template) -->
|
|
|
- <van-dialog
|
|
|
+ <!-- 通用弹窗 -->
|
|
|
+ <ModernDialog
|
|
|
v-model:show="showDialog"
|
|
|
- :show-cancel-button="false"
|
|
|
- :show-confirm-button="false"
|
|
|
- class="modern-dialog"
|
|
|
- close-on-click-overlay
|
|
|
- >
|
|
|
- <div class="dialog-content">
|
|
|
- <div class="dialog-title">申请成功</div>
|
|
|
- <div class="dialog-message">
|
|
|
- 您的开票信息已提交至税务部门审核,审核通过后通知您缴纳税款,请关注缴税信息。
|
|
|
- </div>
|
|
|
- <van-button
|
|
|
- type="primary"
|
|
|
- block
|
|
|
- round
|
|
|
- class="dialog-btn"
|
|
|
- color="linear-gradient(90deg, #ff7a00, #ffa94d)"
|
|
|
- @click="onConfirm"
|
|
|
- >
|
|
|
- 我知道了
|
|
|
- </van-button>
|
|
|
- </div>
|
|
|
- </van-dialog>
|
|
|
+ title="申请成功"
|
|
|
+ message="您的开票信息已提交至税务部门审核,审核通过后通知您缴纳税款,请关注缴税信息。"
|
|
|
+ confirmText="我知道了"
|
|
|
+ @confirm="onConfirm"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { useDebounceFn } from '@/utils/util'
|
|
|
+import ModernDialog from '@/components/ModernDialog.vue'
|
|
|
import {
|
|
|
getConfirmInvoiceInfoApi,
|
|
|
getStatusApi,
|
|
|
@@ -178,8 +161,11 @@ const getConfirmInvoiceInfo = async () => {
|
|
|
if (res.code === 0) {
|
|
|
invoiceInfo.value = res.data
|
|
|
}
|
|
|
- } catch (err) {
|
|
|
- console.error('获取发票信息失败', err)
|
|
|
+ } catch (err: any) {
|
|
|
+ const { code, message } = err
|
|
|
+ if (code === 1 && message) {
|
|
|
+ showToast(message)
|
|
|
+ }
|
|
|
} finally {
|
|
|
loading.value = false
|
|
|
}
|
|
|
@@ -210,7 +196,8 @@ const submitInvoiceApply = async () => {
|
|
|
showDialog.value = true
|
|
|
}
|
|
|
} catch (err) {
|
|
|
- console.error('提交失败', err)
|
|
|
+ console.log('err', err)
|
|
|
+
|
|
|
showToast('提交失败,请稍后重试')
|
|
|
}
|
|
|
}
|
|
|
@@ -396,71 +383,4 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-/* 修正版:留白 + 按钮不被挤压 */
|
|
|
-.modern-dialog {
|
|
|
- width: 80vw;
|
|
|
- border-radius: 5vw !important;
|
|
|
- background: #fff;
|
|
|
- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
|
|
|
- padding: 0; /* 外层不再加内边距,改到内容区 */
|
|
|
- overflow: visible; /* 允许按钮投影外扩 */
|
|
|
- text-align: center;
|
|
|
- animation: dialogPop 0.28s ease-out;
|
|
|
- box-sizing: border-box;
|
|
|
-
|
|
|
- .dialog-content {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- padding: 6vw 5vw 5vw; /* ✅ 内容留白在这里 */
|
|
|
- gap: 5vw; /* 内容与按钮的竖向间距 */
|
|
|
- }
|
|
|
-
|
|
|
- .dialog-title {
|
|
|
- font-size: 4.4vw;
|
|
|
- font-weight: 700;
|
|
|
- color: #222;
|
|
|
- }
|
|
|
-
|
|
|
- .dialog-message {
|
|
|
- font-size: 3.6vw;
|
|
|
- line-height: 1.7;
|
|
|
- color: #555;
|
|
|
- word-break: break-word;
|
|
|
- }
|
|
|
-
|
|
|
- /* ✅ 独立按钮:有左右边距与圆角,不会被挤压 */
|
|
|
- .dialog-btn {
|
|
|
- width: calc(100% - 10vw); /* 等同左右各 5vw 的边距 */
|
|
|
- margin: 0 auto 2.5vw; /* 底部也留点气口 */
|
|
|
- height: 12vw;
|
|
|
- border-radius: 3vw;
|
|
|
- font-size: 4vw;
|
|
|
- font-weight: 600;
|
|
|
- display: inline-flex; /* 避免被拉伸成整块底边 */
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- border: none;
|
|
|
- box-shadow: 0 4px 12px rgba(255, 128, 54, 0.25);
|
|
|
- letter-spacing: 0.2vw;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-/* 蒙层与动画(可保留) */
|
|
|
-:deep(.van-overlay) {
|
|
|
- backdrop-filter: blur(8px);
|
|
|
- background: rgba(0, 0, 0, 0.25);
|
|
|
- animation: fadeIn 0.3s ease;
|
|
|
-}
|
|
|
-@keyframes dialogPop {
|
|
|
- from {
|
|
|
- transform: translateY(4vw) scale(0.9);
|
|
|
- opacity: 0;
|
|
|
- }
|
|
|
- to {
|
|
|
- transform: translateY(0) scale(1);
|
|
|
- opacity: 1;
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|