From ce06ca62a0dd65d4a8fb57126948449c804ad77e Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 19 五月 2026 19:40:08 +0800
Subject: [PATCH] 提交
---
small-program/shop/pages/confirm-invoice-issuance/confirm-invoice-issuance.vue | 63 ++++++++++++++++++++++++++++---
1 files changed, 57 insertions(+), 6 deletions(-)
diff --git a/small-program/shop/pages/confirm-invoice-issuance/confirm-invoice-issuance.vue b/small-program/shop/pages/confirm-invoice-issuance/confirm-invoice-issuance.vue
index d7e7c43..b2e6fac 100644
--- a/small-program/shop/pages/confirm-invoice-issuance/confirm-invoice-issuance.vue
+++ b/small-program/shop/pages/confirm-invoice-issuance/confirm-invoice-issuance.vue
@@ -51,7 +51,8 @@
title: '鏉庢槬姊�',
content: '鏄庣粏',
amount: '楼100.00'
- }
+ },
+ data: {}
};
},
computed: {
@@ -78,18 +79,68 @@
return fields;
}
},
+ onLoad() {
+ const invoiceData = uni.getStorageSync('invoiceFormData')
+ if (invoiceData) {
+ this.data = invoiceData
+ this.titleType = invoiceData.titleType || 'company'
+ if (this.titleType === 'company') {
+ this.invoiceInfo = {
+ invoiceType: invoiceData.invoiceType || '',
+ titleTypeText: invoiceData.titleTypeText || '',
+ title: invoiceData.title || '',
+ content: invoiceData.content || '',
+ amount: invoiceData.amount || '',
+ taxNo: invoiceData.taxNo || '',
+ bankName: invoiceData.bankName || '',
+ bankAccount: invoiceData.bankAccount || '',
+ companyAddress: invoiceData.companyAddress || '',
+ companyPhone: invoiceData.companyPhone || ''
+ }
+ } else {
+ this.personalInfo = {
+ invoiceType: invoiceData.invoiceType || '',
+ titleTypeText: invoiceData.titleTypeText || '',
+ title: invoiceData.title || '',
+ content: invoiceData.content || '',
+ amount: invoiceData.amount || ''
+ }
+ }
+ uni.removeStorageSync('invoiceFormData')
+ }
+ },
methods: {
goBackEdit() {
- uni.navigateBack();
+ uni.navigateBack({ delta: 1 });
},
closeSubmitPopup() {
this.showSubmitPopup = false;
},
- confirmSubmit() {
+ async confirmSubmit() {
this.showSubmitPopup = false;
- uni.navigateTo({
- url: '/shop/pages/Invoice-issued-successfully/Invoice-issued-successfully'
- });
+ const params = {
+ orderId: this.data.orderId,
+ orderNo: this.data.orderNo,
+ name: this.data.title,
+ invoiceType: this.data.invoiceType === '鐢靛瓙鏅�氬彂绁�' ? 0 : 1,
+ orgType: this.data.titleType === 'company' ? 1 : 0
+ }
+ if (this.data.titleType === 'company') {
+ params.taxId = this.data.taxNo
+ }
+ if (this.data.invoiceType === '鐢靛瓙涓撶敤鍙戠エ') {
+ params.bankName = this.data.bankName
+ params.bankAccount = this.data.bankAccount
+ params.companyAddr = this.data.companyAddress
+ params.companyPhone = this.data.companyPhone
+ }
+ const res = await this.$u.api.invoiceApply(params)
+ if (res.code === 200) {
+ uni.setStorageSync('invoiceSuccessData', this.data)
+ uni.reLaunch({
+ url: '/shop/pages/Invoice-issued-successfully/Invoice-issued-successfully'
+ });
+ }
}
}
};
--
Gitblit v1.9.3