42f91580 by zhangmeng

收据

1 parent 88f5a7bf
......@@ -96,6 +96,13 @@ export function getCarBilldetailbyId(params) {
})
}
export function checkReceipt(orderId) {
return request({
url: `/ota/norder/checkReceipt/${orderId}`,
method: 'post'
})
}
export function getFoodBilldetailbyId(params) {
return request({
url: `/ota/orderFood/getFoodOrderInfoByOrder`,
......
......@@ -508,6 +508,19 @@
</el-icon>
{{ language == 0 ? '导出酒店预订单' : 'Download Confirmation' }}
</el-button>
<el-button
v-if="(form.viewStatus=='1'||form.viewStatus=='5')&&(type=='makeUp'||type=='hotel'||type=='ticket'||type=='car')"
class="btn-lineG w200px" round
type="primary"
@click="downInvoice"
>
<el-icon>
<Download />
</el-icon>
{{ language == 0 ? '下载收据' : 'DownLoad Invoice' }}
</el-button>
<el-button v-if="form.viewStatus == '5'" round @click="unsubscribe">
{{ language == 0 ? '退订' : 'Unsubscribe' }}
</el-button>
......@@ -655,13 +668,15 @@ function getData() {
form.value = {
pickUpBo: {}
}
return booking.getCarBilldetailbyId({ orderId: orderId.value }).then(res => {
booking.getCarBilldetailbyId({ orderId: orderId.value }).then(res => {
form.value = res.data
matchId.value = res.data.activeId
if (language.value == 0) {
totalFee.value = res.data.total
} else {
totalFee.value = res.data.totalEn
}
checkReceipt()
}).catch(err => {
console.log(err)
errorBox.value = true
......@@ -712,6 +727,14 @@ function getData() {
}
}
function checkReceipt() {
booking.checkReceipt(orderId.value).then(res => {
form.value.receiptFlag = res.msg || 0
console.log(res)
})
}
// 旅游订单详情
const getTravelOrderInfo = () => {
return booking.getScenicOrderInfo({ orderId: orderId.value }).then(res => {
......@@ -735,8 +758,9 @@ async function getTicketOrderInfoFN() {
try {
await getDetail(form.value.activeId)
matchId.value = form.value.activeId
totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn
checkReceipt()
} catch (e) {
console.log(e)
} finally {
......@@ -943,6 +967,7 @@ function handleView() {
function downInvoice() {
getremark()
debugger
if (form.value.receiptFlag == '0') {
showSJDialog.value = true
} else {
......
......@@ -227,7 +227,8 @@ function goDetail(b) {
name: 'bookingPay',
query: {
orderId: b.id,
orderType: b.orderType
orderType: b.orderType,
matchId: b.activeId
}
})
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!