Commit 7f049c3fcecafa6376c06e8a75efc9f589ccfe3c

Authored by 刘淇
1 parent fe11c22e

开票

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