|
|
@ -1,20 +1,13 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view class="invoice"> |
|
|
|
<view class="invoice"> |
|
|
|
<!-- <view class="invoice-goods" v-if="sourcePage==0 && orderDetail"> |
|
|
|
|
|
|
|
<view class="b" v-if="orderDetail"> |
|
|
|
|
|
|
|
<view class="r">订单编号:{{orderDetail.order_no}}<text @click="handleCopy(orderDetail.order_no)">复制</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="r">开票金额:{{orderDetail.pay_price}}</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
<view class="invoice-info"> |
|
|
|
<view class="invoice-info"> |
|
|
|
<view class="b"> |
|
|
|
<view class="b"> |
|
|
|
<view class="item"> |
|
|
|
<view class="item"> |
|
|
|
<view class="l">发票类型:</view> |
|
|
|
<view class="l">发票类型:</view> |
|
|
|
<view class="r"> |
|
|
|
<view class="r"> |
|
|
|
<picker :value="index" :range="array" @change="bindPickerChange"> |
|
|
|
<picker :value="arrayIndex" :range="array" @change="bindPickerChange"> |
|
|
|
<view class="lx" style="color: #888;" v-if="index == -1">请选择发票类型</view> |
|
|
|
<view class="lx" style="color: #888;" v-if="!arrayName">请选择发票类型</view> |
|
|
|
<view class="lx" v-else>{{ array[index] }}</view> |
|
|
|
<view class="lx" v-else>{{arrayName}}</view> |
|
|
|
</picker> |
|
|
|
</picker> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -87,7 +80,8 @@ |
|
|
|
content: "确认您的发票信息无误后再提交", |
|
|
|
content: "确认您的发票信息无误后再提交", |
|
|
|
show: true, |
|
|
|
show: true, |
|
|
|
toggleIndex: true, |
|
|
|
toggleIndex: true, |
|
|
|
index: -1, |
|
|
|
arrayIndex: 0, |
|
|
|
|
|
|
|
arrayName: '', |
|
|
|
array: ['普通增值税发票'], |
|
|
|
array: ['普通增值税发票'], |
|
|
|
tabIndex: 1, |
|
|
|
tabIndex: 1, |
|
|
|
sourcePage: 0, |
|
|
|
sourcePage: 0, |
|
|
@ -109,9 +103,10 @@ |
|
|
|
onLoad(op) { |
|
|
|
onLoad(op) { |
|
|
|
if (op.detailObj && op.detailObj != 'null') { |
|
|
|
if (op.detailObj && op.detailObj != 'null') { |
|
|
|
let end = JSON.parse(op.detailObj) |
|
|
|
let end = JSON.parse(op.detailObj) |
|
|
|
this.index = -1 |
|
|
|
this.arrayIndex = end.type - 1; |
|
|
|
|
|
|
|
this.arrayName = this.array[this.arrayIndex] |
|
|
|
if (end.source == 1) { |
|
|
|
if (end.source == 1) { |
|
|
|
this.tabIndex = 1 |
|
|
|
this.tabIndex = end.source |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.tabIndex = 2 |
|
|
|
this.tabIndex = 2 |
|
|
|
} |
|
|
|
} |
|
|
@ -130,8 +125,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
async addInvoice(canReset = false) { |
|
|
|
async addInvoice(canReset = false) { |
|
|
|
const app = this |
|
|
|
const app = this |
|
|
|
console.log(app.index,app.obj.source) |
|
|
|
if (!app.arrayName) { |
|
|
|
if (app.index == -1) { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: '请选择发票类型', |
|
|
|
title: '请选择发票类型', |
|
|
|
icon: 'none', |
|
|
|
icon: 'none', |
|
|
@ -165,7 +159,7 @@ |
|
|
|
icon: 'none', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
}) |
|
|
|
app.index = -1 |
|
|
|
app.arrayIndex = 0 |
|
|
|
app.tabIndex = 1 |
|
|
|
app.tabIndex = 1 |
|
|
|
app.obj = app.$options.data().obj; |
|
|
|
app.obj = app.$options.data().obj; |
|
|
|
uni.redirectTo({ |
|
|
|
uni.redirectTo({ |
|
|
@ -175,7 +169,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
async editeInvoice() { |
|
|
|
async editeInvoice() { |
|
|
|
const app = this |
|
|
|
const app = this |
|
|
|
if (app.index == -1) { |
|
|
|
if (!app.arrayName) { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: '请选择发票类型', |
|
|
|
title: '请选择发票类型', |
|
|
|
icon: 'none', |
|
|
|
icon: 'none', |
|
|
@ -209,7 +203,7 @@ |
|
|
|
icon: 'none', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
}) |
|
|
|
app.index = -1 |
|
|
|
app.arrayIndex = 0 |
|
|
|
app.tabIndex = 1 |
|
|
|
app.tabIndex = 1 |
|
|
|
app.obj = app.$options.data().obj; |
|
|
|
app.obj = app.$options.data().obj; |
|
|
|
uni.redirectTo({ |
|
|
|
uni.redirectTo({ |
|
|
@ -242,7 +236,8 @@ |
|
|
|
this.toggleIndex = !this.toggleIndex; |
|
|
|
this.toggleIndex = !this.toggleIndex; |
|
|
|
}, |
|
|
|
}, |
|
|
|
bindPickerChange(e) { |
|
|
|
bindPickerChange(e) { |
|
|
|
this.index = e.detail.value; |
|
|
|
this.arrayIndex = e.detail.value; |
|
|
|
|
|
|
|
this.arrayName = this.array[e.detail.value] |
|
|
|
}, |
|
|
|
}, |
|
|
|
bindPickerChange1() { |
|
|
|
bindPickerChange1() { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|