Commit 7f049c3fcecafa6376c06e8a75efc9f589ccfe3c
1 parent
fe11c22e
开票
Showing
4 changed files
with
21 additions
and
9 deletions
src/api/invoice/invoice.js
src/views/eInvoice/eInvoiceWrap.vue
| ... | ... | @@ -5,7 +5,8 @@ |
| 5 | 5 | title="停车发票" |
| 6 | 6 | inline-desc='仅支持微信支付订单,按照实际消费金额开票' |
| 7 | 7 | is-link |
| 8 | - :link="{path:'./parkInvoice'}" > | |
| 8 | + :link="{path:'./parkInvoice',query:{invoiceType:1}}" | |
| 9 | + > | |
| 9 | 10 | <!-- anything --> |
| 10 | 11 | </cell> |
| 11 | 12 | |
| ... | ... | @@ -13,6 +14,7 @@ |
| 13 | 14 | title="购买会员卡发票" |
| 14 | 15 | inline-desc='支持购买月卡、季卡、年卡产生的费用,开具发票' |
| 15 | 16 | is-link |
| 17 | + :link="{path:'./parkInvoice',query:{invoiceType:2}}" | |
| 16 | 18 | > |
| 17 | 19 | <!-- anything --> |
| 18 | 20 | </cell> | ... | ... |
src/views/eInvoice/invoiceRecord/invoiceDetail.vue
src/views/eInvoice/parkInvoice/parkInvoice.vue
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | <p>暂无发票抬头,请添加发票抬头才可以发票哦</p> |
| 6 | 6 | |
| 7 | 7 | <div style="padding: 10px;"> |
| 8 | - <x-button type="warn">添加发票抬头</x-button> | |
| 8 | + <x-button type="warn" @click.native="$router.push('fill')">添加发票抬头</x-button> | |
| 9 | 9 | </div> |
| 10 | 10 | </div> |
| 11 | 11 | <div class="inovice-main" v-else> |
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | </div> |
| 44 | 44 | <div class="weui-cell__bd"> |
| 45 | 45 | <p>{{item.carNumber}}</p> |
| 46 | - <p>停车发票</p> | |
| 46 | + <p>发票</p> | |
| 47 | 47 | <p>{{item.plName}}</p> |
| 48 | 48 | <p> |
| 49 | 49 | 有效期:{{$utils.timestampTransformTime(item.createDate)}}--{{$utils.timestampTransformTime(item.payFinishTime)}}</p> |
| ... | ... | @@ -96,6 +96,7 @@ export default { |
| 96 | 96 | name: "parkInvoice", |
| 97 | 97 | data() { |
| 98 | 98 | return { |
| 99 | + invoiceType:'',// 1 停车订单,2 会员卡列表,3 充值列表 | |
| 99 | 100 | name: "", |
| 100 | 101 | email: "", |
| 101 | 102 | type: "", |
| ... | ... | @@ -126,8 +127,10 @@ export default { |
| 126 | 127 | this.email = this.$route.query.email; |
| 127 | 128 | this.type = this.$route.query.type; |
| 128 | 129 | this.remark = this.$route.query.remark; |
| 130 | + this.invoiceType = this.$route.query.invoiceType | |
| 129 | 131 | this.queryCustInvoiceInfoList(); // 获取抬头 |
| 130 | 132 | this.queryRntPayOrderForInvoice(); // 获取可开票列表 |
| 133 | + | |
| 131 | 134 | }, |
| 132 | 135 | methods: { |
| 133 | 136 | // 提交开票 |
| ... | ... | @@ -149,7 +152,7 @@ export default { |
| 149 | 152 | let jsondata = {}; |
| 150 | 153 | if (data.invoiceType == 0){ // 0个人 1企业 |
| 151 | 154 | obj = { |
| 152 | - invoiceType: "1", // 1 停车订单,2 会员卡列表,3 充值列表 | |
| 155 | + invoiceType: this.invoiceType, // 1 停车订单,2 会员卡列表,3 充值列表 | |
| 153 | 156 | remark: data.remark, //备注谢谢 |
| 154 | 157 | custName: data.name, // 发票抬头 |
| 155 | 158 | custEmail:data.email, // 邮箱 |
| ... | ... | @@ -159,7 +162,7 @@ export default { |
| 159 | 162 | }; |
| 160 | 163 | }else{ |
| 161 | 164 | obj = { |
| 162 | - invoiceType: "1", // 1 停车订单,2 会员卡列表,3 充值列表 | |
| 165 | + invoiceType: this.invoiceType, // 1 停车订单,2 会员卡列表,3 充值列表 | |
| 163 | 166 | remark: data.remark, //备注谢谢 |
| 164 | 167 | custName: data.name, // 发票抬头 |
| 165 | 168 | custCardNo: data.cardNo, // 开户账户 |
| ... | ... | @@ -178,7 +181,14 @@ export default { |
| 178 | 181 | console.log(JSON.stringify(jsondata)); |
| 179 | 182 | openTicketForCustInvoiceHisInfo(jsondata).then(response => { |
| 180 | 183 | console.log(response); |
| 181 | - this.queryRntPayOrderForInvoice() | |
| 184 | + | |
| 185 | + if(response.code==0){ | |
| 186 | + this.queryRntPayOrderForInvoice() | |
| 187 | + this.$vux.toast.text(response. message, 'top') | |
| 188 | + }else{ | |
| 189 | + this.$vux.toast.text(response. message, 'top') | |
| 190 | + } | |
| 191 | + | |
| 182 | 192 | }); |
| 183 | 193 | }, |
| 184 | 194 | // 获取可开票列表 |
| ... | ... | @@ -186,7 +196,7 @@ export default { |
| 186 | 196 | let that = this; |
| 187 | 197 | let jsondata = {}; |
| 188 | 198 | let obj = { |
| 189 | - invoiceType: "1" // 1 停车订单,2 会员卡列表,3 充值列表 | |
| 199 | + invoiceType: this.invoiceType // 1 停车订单,2 会员卡列表,3 充值列表 | |
| 190 | 200 | }; |
| 191 | 201 | jsondata = Object.assign(obj, this.$utils.commonParams()); |
| 192 | 202 | jsondata.sign = this.$utils.signObject(jsondata); | ... | ... |