|
|
@@ -212,14 +212,14 @@
|
|
|
:title="'选择发票'"
|
|
|
@closeAction="showInvoiceModal = false">
|
|
|
<ul class="invoice-list">
|
|
|
- <li @click="setInvoiceCheck(-1)">
|
|
|
+ <!--<li @click="setInvoiceCheck(-1)">
|
|
|
<div class="inv-content">
|
|
|
<label class="bottom-modal-check mobile-cart-check" :class="{active: selectedInvoiceIndex === -1}">
|
|
|
<input type="checkbox">
|
|
|
</label>
|
|
|
<span class="inv-head">暂不开票</span>
|
|
|
</div>
|
|
|
- </li>
|
|
|
+ </li>-->
|
|
|
<li v-for="(inv, index) in invoiceData" @click.stop="setInvoiceCheck(index)">
|
|
|
<div class="inv-content">
|
|
|
<label class="bottom-modal-check mobile-cart-check" :class="{'active': selectedInvoiceIndex === index}">
|
|
|
@@ -493,6 +493,10 @@
|
|
|
return this.$store.state.userCenter.list.address.data
|
|
|
},
|
|
|
invoiceData () {
|
|
|
+ let invoiceData = this.$store.state.userCenter.list.invoice.data
|
|
|
+ if (invoiceData && invoiceData.length) {
|
|
|
+ this.selectedInvoiceIndex = 0
|
|
|
+ }
|
|
|
return this.$store.state.userCenter.list.invoice.data
|
|
|
},
|
|
|
// 已选择完的发票
|
|
|
@@ -976,12 +980,18 @@
|
|
|
})
|
|
|
},
|
|
|
reloadInvoice () {
|
|
|
- this.$store.dispatch('userCenter/loadPayInvoice')
|
|
|
+ return this.$store.dispatch('userCenter/loadPayInvoice')
|
|
|
},
|
|
|
async addinvoiceFn(ty, item) {
|
|
|
this.showAddinvoice = false
|
|
|
+ if (!this.invoiceData || !this.invoiceData.length) {
|
|
|
+ this.showInvoiceModal = false
|
|
|
+ }
|
|
|
if (ty) {
|
|
|
this.reloadInvoice()
|
|
|
+// .then(() => {
|
|
|
+// this.setInvoiceCheck(++this.selectedInvoiceIndex)
|
|
|
+// })
|
|
|
}
|
|
|
},
|
|
|
updateInvoice(item, index) {
|