| | |
| | | } |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | const invoiceData = uni.getStorageSync('invoiceSuccessData') |
| | | if (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('invoiceSuccessData') |
| | | } |
| | | }, |
| | | computed: { |
| | | displayFields() { |
| | | const base = this.titleType === 'company' ? this.invoiceInfo : this.personalInfo; |