From 7f049c3fcecafa6376c06e8a75efc9f589ccfe3c Mon Sep 17 00:00:00 2001 From: liugongyu <290219706@qq.com> Date: Fri, 31 Dec 2021 01:05:39 +0800 Subject: [PATCH] 开票 --- src/api/invoice/invoice.js | 2 +- src/views/eInvoice/eInvoiceWrap.vue | 4 +++- src/views/eInvoice/invoiceRecord/invoiceDetail.vue | 2 +- src/views/eInvoice/parkInvoice/parkInvoice.vue | 22 ++++++++++++++++------ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/api/invoice/invoice.js b/src/api/invoice/invoice.js index 1675fa1..d780afb 100644 --- a/src/api/invoice/invoice.js +++ b/src/api/invoice/invoice.js @@ -10,7 +10,7 @@ export function queryCustInvoiceInfoList(params) { }) } -// 天下发票抬头 +// 填写发票抬头 export function insertCustInvoiceInfo(params) { return request({ url: 'invoice/insertCustInvoiceInfo', diff --git a/src/views/eInvoice/eInvoiceWrap.vue b/src/views/eInvoice/eInvoiceWrap.vue index 36c96f4..0fdeae7 100644 --- a/src/views/eInvoice/eInvoiceWrap.vue +++ b/src/views/eInvoice/eInvoiceWrap.vue @@ -5,7 +5,8 @@ title="停车发票" inline-desc='仅支持微信支付订单,按照实际消费金额开票' is-link - :link="{path:'./parkInvoice'}" > + :link="{path:'./parkInvoice',query:{invoiceType:1}}" + > @@ -13,6 +14,7 @@ title="购买会员卡发票" inline-desc='支持购买月卡、季卡、年卡产生的费用,开具发票' is-link + :link="{path:'./parkInvoice',query:{invoiceType:2}}" > diff --git a/src/views/eInvoice/invoiceRecord/invoiceDetail.vue b/src/views/eInvoice/invoiceRecord/invoiceDetail.vue index 81af2cd..d46f3c2 100644 --- a/src/views/eInvoice/invoiceRecord/invoiceDetail.vue +++ b/src/views/eInvoice/invoiceRecord/invoiceDetail.vue @@ -43,7 +43,7 @@ export default { console.log(JSON.stringify(jsondata)); resendInvoiceMail(jsondata).then(response => { console.log(response); - + this.$vux.toast.text(response. message, 'top') }); } } diff --git a/src/views/eInvoice/parkInvoice/parkInvoice.vue b/src/views/eInvoice/parkInvoice/parkInvoice.vue index 6dec8bb..d725d9b 100644 --- a/src/views/eInvoice/parkInvoice/parkInvoice.vue +++ b/src/views/eInvoice/parkInvoice/parkInvoice.vue @@ -5,7 +5,7 @@

暂无发票抬头,请添加发票抬头才可以发票哦

- 添加发票抬头 + 添加发票抬头
@@ -43,7 +43,7 @@

{{item.carNumber}}

-

停车发票

+

发票

{{item.plName}}

有效期:{{$utils.timestampTransformTime(item.createDate)}}--{{$utils.timestampTransformTime(item.payFinishTime)}}

@@ -96,6 +96,7 @@ export default { name: "parkInvoice", data() { return { + invoiceType:'',// 1 停车订单,2 会员卡列表,3 充值列表 name: "", email: "", type: "", @@ -126,8 +127,10 @@ export default { this.email = this.$route.query.email; this.type = this.$route.query.type; this.remark = this.$route.query.remark; + this.invoiceType = this.$route.query.invoiceType this.queryCustInvoiceInfoList(); // 获取抬头 this.queryRntPayOrderForInvoice(); // 获取可开票列表 + }, methods: { // 提交开票 @@ -149,7 +152,7 @@ export default { let jsondata = {}; if (data.invoiceType == 0){ // 0个人 1企业 obj = { - invoiceType: "1", // 1 停车订单,2 会员卡列表,3 充值列表 + invoiceType: this.invoiceType, // 1 停车订单,2 会员卡列表,3 充值列表 remark: data.remark, //备注谢谢 custName: data.name, // 发票抬头 custEmail:data.email, // 邮箱 @@ -159,7 +162,7 @@ export default { }; }else{ obj = { - invoiceType: "1", // 1 停车订单,2 会员卡列表,3 充值列表 + invoiceType: this.invoiceType, // 1 停车订单,2 会员卡列表,3 充值列表 remark: data.remark, //备注谢谢 custName: data.name, // 发票抬头 custCardNo: data.cardNo, // 开户账户 @@ -178,7 +181,14 @@ export default { console.log(JSON.stringify(jsondata)); openTicketForCustInvoiceHisInfo(jsondata).then(response => { console.log(response); - this.queryRntPayOrderForInvoice() + + if(response.code==0){ + this.queryRntPayOrderForInvoice() + this.$vux.toast.text(response. message, 'top') + }else{ + this.$vux.toast.text(response. message, 'top') + } + }); }, // 获取可开票列表 @@ -186,7 +196,7 @@ export default { let that = this; let jsondata = {}; let obj = { - invoiceType: "1" // 1 停车订单,2 会员卡列表,3 充值列表 + invoiceType: this.invoiceType // 1 停车订单,2 会员卡列表,3 充值列表 }; jsondata = Object.assign(obj, this.$utils.commonParams()); jsondata.sign = this.$utils.signObject(jsondata); -- libgit2 0.21.4