43809d5c by 杨炀

no message

1 parent f327101b
......@@ -104,3 +104,35 @@ export function createPalPay(data) {
data:data
})
}
export function getInvoiceByActiveId(query) {
return request({
url: `/ota/invoice/list`,
method: 'get',
params: query
})
}
export function getCanInvoiceBills(query) {
return request({
url: `/ota/norder/list`,
method: 'get',
params: query
})
}
export function cancelOrder(orderId) {
return request({
// url: `/logex/norder/unSubscribeOrderBack/${orderId}`,
url: `/ota/norder/applyOrderBack/${orderId}`,
method: 'post',
params: orderId
})
}
// 取消
export function cancelOrder2(orderId) {
return request({
url: `/ota/norder/cancelOrderBack/${orderId}`,
method: 'post',
params: orderId
})
}
......
......@@ -420,6 +420,12 @@ export const constantRoutes = [
component: () => import('@/viewsPc/booking/payOk'),
name: 'bookingPayOk',
meta: { title: 'payOk' }
},
{
path: 'invoice',
component: () => import('@/viewsPc/booking/invoicing'),
name: 'invoice',
meta: { title: '我的发票' }
}
]
},
......
<template>
<div>
<div class="box">
<div class="indexTitle">
<h3 class="leftboderTT">{{ language==0?'我的发票':'My invoice' }}
<el-button @click="goAdd" type="primary" class="btn-lineG fr">开发票</el-button>
</h3>
</div>
<el-card class="mt30 mb60">
<div class="billItem" v-for="b in list" :key="b.id">
<!-- parentType -->
<div>
申请日期:
{{ b.createTime }}
</div>
<div style="display: flex;justify-content: space-between;">
<div> 发票形式 -
<span v-if="b.invoiceForm=='1'">电子发票</span>
<span v-if="b.invoiceForm=='2'">纸质普票</span>
<span v-if="b.invoiceForm=='3'">纸质专票</span>
</div>
<div>¥ <span>{{b.total}}</span></div>
</div>
<div style="margin: 20px 0 0;display: flex;justify-content: space-between;">
<div class="status">
<div class="success" v-if="b.isInvoice == '1'"> 已开票</div>
<div class="warning" v-if="b.isInvoice == '0'">未开票</div>
<div class="success" v-if="b.isInvoice == '3'"> 已寄出</div>
<div class="warning" v-if="b.isInvoice == '2'"> 已取消</div>
</div>
<div>
<button class="billbtn" v-if="b.isInvoice == '0'" @click.stop="editDetail(b)"> 修改发票</button>
<button class="billbtn rbtn-m-kx"
@click.stop="showDetail(b)">详情</button>
</div>
</div>
</div>
<el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/>
</el-card>
</div>
</div>
<chose-bills ref="dialogChoseBillsRef"/>
</template>
<script setup>
import ChoseBills from './component/choseBills'
import { ref } from 'vue'
import {getInvoiceByActiveId} from "@/apiPc/booking"
import {getCurrentInstance} from "@vue/runtime-core"
import {useStorage} from "@vueuse/core/index";
const language= useStorage('language',0)
const {proxy} = getCurrentInstance()
const list = ref([])
const query = ref({
activeId:'',
createById:'',
venueId:''
})
getList()
function getList() {
getInvoiceByActiveId(query.value).then(res=>{
list.value = res.rows
})
}
function goAdd() {
//选择开票订单
var obj = {
title: '选择开票订单',
show: true,
choosedList:[]
}
proxy.$refs['dialogChoseBillsRef'].open(obj)
}
</script>
<style scoped lang="scss">
.leftboderTT{
font-size: 20px;}
</style>
<template>
<el-dialog v-model="show" :title="title" width="1000px" append-to-body @close="close">
<el-table ref="allBills" :data="tableData" v-loading="loading" @selection-change="handleSelectionChange">
<el-table-column type="selection" :label="language==0?'选择':'Selection'" :selectable="selectable"/>
<el-table-column prop="id" label="订单号"></el-table-column>
<el-table-column prop="id" label="订单类型"></el-table-column>
<el-table-column prop="id" label="订单明细">
<template #default="scope">
<div v-if="scope.row.orderType == 0">
<p>{{scope.row.messageObj.roomName}}</p>
<p>{{scope.row.messageObj.roomInfo}}</p>
<p>{{scope.row.messageObj.roomType}}</p>
<p>{{scope.row.messageObj.roomStayDate}}</p>
</div>
<div v-if="scope.row.orderType == 1">
<div v-for="(car,index) in scope.row.messageObj.carsList" :key="index">
<p v-if="car.num>0">{{car.name}}{{car.num}}</p>
</div>
</div>
<div v-if="scope.row.orderType == 2">
<div v-for="(n,index) in scope.row.messageObj.foodsList" :key="index">
<p v-if="n.num > 0">
{{n.name}}({{n.categoryName}}) <text>{{n.num}}</text>
</p>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="total" label="金额"></el-table-column>
</el-table>
<paginationPc
v-show="total>0"
v-model:page="query.pageNum"
v-model:limit="query.pageSize"
:total="total"
@pagination="getList"
/>
<template #footer>
<div class="dialog-footer text-center">
<el-button type="primary" @click="submit">{{language==0?'确定':'Confirm'}}</el-button>
<el-button @click="cancel">{{language==0?'取消':'Cancel'}}</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import {reactive, ref, toRefs, watch} from 'vue'
import {getCurrentInstance} from "@vue/runtime-core";
import {useStorage} from "@vueuse/core/index";
import {getCanInvoiceBills} from "@/apiPc/booking";
const {proxy} = getCurrentInstance()
const emit = defineEmits([ 'transfer'])
const language= useStorage('language',0)
const data = reactive({
tableData: [],
show: false,
loading: false,
title: '选择开票订单',
query:{
activeId:'',
createById:'',
invoiced:'1',
// venueId:''
},
total:0
})
const { tableData,show,loading,title,query,total} = toRefs(data)
let choosedList = []
const choosedIds = []
const open = (params) => {
title.value = params.title
show.value = true
choosedList = params.choosedList
for (const p of choosedList) {
choosedIds.push(p.id)
}
getList()
}
defineExpose({
open
})
const getList = () => {
loading.value = true
getCanInvoiceBills(query.value).then(res=>{
loading.value = false
tableData.value = res.data.rows
total.value = res.data.total
for (var b of tableData.value) {
b.messageObj = JSON.parse(b.message)
}
})
}
const submit = () => {
}
const cancel = () => {
show.value = false
}
</script>
<style scoped lang="scss">
</style>
......@@ -119,6 +119,7 @@ const rules = ref({})
let usedays = 0
onMounted(() => {
food.value = JSON.parse(decodeURIComponent(route.query.food))
form.value = food.value
restaurant.value = JSON.parse(decodeURIComponent(route.query.restaurant))
if(language.value == 0){
form.value.total = food.value.foodPrice
......
......@@ -26,8 +26,14 @@
</div>
<div v-if="type == 'car'">
<div class="leftboderTT">{{ language == 0 ? '车辆信息' : 'Car Information' }}</div>
<div class="leftboderTT">{{ language == 0 ? '路线信息' : 'Car Information' }}</div>
<div class="border-info mt20">
<div class="flex aic">
<h3 class="esp">{{ form.checkIn }}</h3>
<img class="w40px mlr20 " style="height: 40px;" src="@/assets/booking/wf.png"/>
<h3 class="esp">{{ form.checkOut }}</h3>
</div>
</div>
</div>
<div v-if="type == 'food'">
<div class="leftboderTT">{{ language == 0 ? '饭店信息' : 'Restaurant Information' }}</div>
......@@ -49,11 +55,47 @@
<el-col :lg="8" :md="12" :sm="12" :xs="24"></el-col>
</el-row>
<el-row v-if="type == 'car'">
<el-col :lg="12" :md="12" :sm="12" :xs="24">
接站信息
<el-col :lg="12" :md="12" :sm="12" :xs="24" v-if="form.pickUpBo?.revTime">
<h4>接站信息</h4>
<div>
<div>{{ language == 0 ?'用车时间':'Delivery Time' }}{{ form.pickUpBo.revTime }}</div>
<div class="carLine" v-for="(car,index) in form.pickUpBo.carsList" :key="index">
<div v-if="car.num > 0">
<label>{{car.name}}</label>
<span class="tag">{{car.carSeat}}</span>
<span class="tag">{{car.carColor}}</span>
</div>
<span v-if="car.num > 0"> {{car.num}}辆 * ¥{{car.price}}</span>
</div>
<div>人数 {{form.pickUpBo.count}}</div>
<div>航班/火车班次{{form.pickUpBo.no}}</div>
<div>接机/接站地点{{form.pickUpBo.noAddress}}</div>
<div>送达地点 {{form.pickUpBo.deliveryAddress}}</div>
<div>{{ language == 0 ?'联系人':'Contact Person' }}{{ form.dropOffBo.contacts }}</div>
<div>{{ language == 0 ?'联系电话':'Contact Phone' }}{{ form.dropOffBo.phone }}</div>
<div>{{ language == 0 ?'备注':'Remarks' }}{{ form.dropOffBo.remarks }}</div>
</div>
</el-col>
<el-col :lg="12" :md="12" :sm="12" :xs="24">
送站信息
<el-col :lg="12" :md="12" :sm="12" :xs="24" v-if="form.dropOffBo?.revTime">
<h4>送站信息</h4>
<div>
<div>{{ language == 0 ?'用车时间':'Delivery Time' }}{{ form.dropOffBo.revTime }}</div>
<div class="carLine" v-for="(car,index) in form.dropOffBo.carsList" :key="index">
<div v-if="car.num > 0">
<label>{{car.name}}</label>
<span class="tag">{{car.carSeat}}</span>
<span class="tag">{{car.carColor}}</span>
</div>
<span v-if="car.num > 0"> {{car.num}}辆 * ¥{{car.price}}</span>
</div>
<div>{{ language == 0 ?'人数':'Counts' }}{{ form.dropOffBo.count }}</div>
<div>{{ language == 0 ?'联系人':'Contact Person' }}{{ form.dropOffBo.contacts }}</div>
<div>{{ language == 0 ?'联系电话':'Contact Phone' }}{{ form.dropOffBo.phone }}</div>
<div>{{ language == 0 ?'备注':'Remarks' }}{{ form.dropOffBo.remarks }}</div>
</div>
</el-col>
</el-row>
<el-row v-if="type == 'food'">
......@@ -79,12 +121,17 @@
</div>
<el-row justify="end">
<el-col :lg="12" :xs="24">
<div class="text-right">
<div class="item"><label>{{ language == 0 ? '费用总计' : 'Total Cost' }}</label>
<span class="size26 wePrice text-warning">{{ language == 0 ? '¥' : '€' }}{{ form.total }}</span>
</div>
</div>
<el-col :lg="12" v-if="Number(totalFee)>0" class="result">
<div class="priceb" v-if="form.viewStatus=='0'">{{ language == 0 ? '待支付金额' : 'Amount Due' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
<div class="priceb" v-if="form.viewStatus=='1'">{{ language == 0 ? '已支付金额' : 'Amount Due' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
<div class="priceb" v-if="form.viewStatus=='4'">{{ language == 0 ? '已退订' : 'Refunded' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
<div class="priceb" v-if="form.viewStatus=='2'">{{ language == 0 ? '已取消' : 'Canceled' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
<div class="priceb" v-if="form.viewStatus=='7'">{{ language == 0 ? '退款审核中' : '退款审核中' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
</el-col>
</el-row>
</div>
......@@ -97,24 +144,7 @@
</el-button>
</div>
<el-row class="result">
<el-col :lg="12">
</el-col>
<el-col :lg="12" v-if="Number(form.totalFee)>0">
<div class="priceb" v-if="form.viewStatus=='0'">{{ language == 0 ? '待支付金额' : 'Amount Due' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
<div class="priceb" v-if="form.viewStatus=='1'">{{ language == 0 ? '已支付金额' : 'Amount Due' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
<div class="priceb" v-if="form.viewStatus=='4'">{{ language == 0 ? '已退订' : 'Refunded' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
<div class="priceb" v-if="form.viewStatus=='2'">{{ language == 0 ? '已取消' : 'Canceled' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
<div class="priceb" v-if="form.viewStatus=='7'">{{ language == 0 ? '退款审核中' : '退款审核中' }}<span
class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
</el-col>
</el-row>
<div class="pd20" v-if="form.status == '0'&&(form.surplus!='0,0'&&form.surplus!='0')">
<div class="pd20" v-if="form.viewStatus == '0'&&(form.surplus!='0,0'&&form.surplus!='0')">
<div class="leftboderTT">{{ language == 0 ? '选择支付方式' : 'Choose payment method' }}</div>
<div class="mt20">
......@@ -162,7 +192,6 @@
</svg>
</el-radio>
</el-radio-group>
<div v-if="payType == '2'&&wePayCodeUrl">
<div class="payImgbox flexCenter">
<div>
......@@ -184,20 +213,20 @@
please refresh the page
</div>
</div>
<el-row class="mt20" align="middle" justify="center">
<el-col :span="24" class="text-center">
<el-button v-if="!hideconfirmbtn" type="primary" @click="goPay" round class="btn-lineG w200px">
{{ language == 0 ? '确定' : 'Submit' }}
</el-button>
<el-button round @click="unsubscribe" v-if="form.viewStatus == '5'">{{ language==0?'退订':'Unsubscribe' }}</el-button>
<el-button link class="underline" @click="cancel" v-if="form.viewStatus == '0'" disabled>
{{ language==0?'取消订单':'Cancel Order' }}
</el-button>
</el-col>
</el-row>
</div>
</div>
<el-row class="mt20 mb60" align="middle" justify="center">
<el-col :span="24" class="text-center">
<el-button v-if="!hideconfirmbtn&&form.viewStatus == '0'" type="primary" @click="goPay" round class="btn-lineG w200px">
{{ language == 0 ? '确定' : 'Submit' }}
</el-button>
<el-button round @click="unsubscribe" v-if="form.viewStatus == '5'">{{ language==0?'退订':'Unsubscribe' }}</el-button>
<el-button link class="underline" @click="cancel" v-if="form.viewStatus == '0'" disabled>
{{ language==0?'取消订单':'Cancel Order' }}
</el-button>
</el-col>
</el-row>
<div v-if="form.payStatus == '3'">
<div class="text-center">
<el-icon color="#32B16C" size="80">
......@@ -248,7 +277,8 @@ import useUserStore from "@/store/modules/user";
import FileUpload from "@/components/FileUpload";
import {useStorage} from "@vueuse/core/index";
import {ElMessage} from "element-plus";
import {getCarBilldetailbyId, getFoodBilldetailbyId} from "@/apiPc/booking";
import {cancelOrder, cancelOrder2, getCarBilldetailbyId, getFoodBilldetailbyId} from "@/apiPc/booking";
import {delPerson} from "@/api/exam/person";
const isLogin = ref(false)
const language = useStorage('language', 0)
......@@ -293,10 +323,7 @@ onMounted(() => {
function getData() {
if(type.value=='car') {
booking.getCarBilldetailbyId({orderId: orderId.value}).then(res => {
totalFee.value = res.data.total
form.value = res.data
form.value.messageObj = JSON.parse(form.value.message)
form.value.extJsonObj = JSON.parse(form.value.extJson)
}).catch(err => {
console.log(err)
errorBox.value = true
......@@ -313,10 +340,10 @@ function getData() {
}
if(type.value=='hotel') {
booking.getRoomBilldetailbyId({orderId: orderId.value}).then(res => {
totalFee.value = res.data.total
totalFee.value = res.data.total || 0
form.value = res.data
form.value.messageObj = JSON.parse(form.value.message)
form.value.extJsonObj = JSON.parse(form.value.extJson)
form.value.messageObj = JSON.parse(form.value.message) || {}
form.value.extJsonObj = JSON.parse(form.value.extJson) || {}
matchId.value = form.value.extJsonObj?.activeId
}).catch(err => {
console.log(err)
......@@ -351,8 +378,8 @@ let handle;
function startforGetData() {
handle = setTimeout(() => {
getData().then(() => {
if (form.value.payTime) {
getData().then( res => {
if (form.value.payDate) {
if (handle) {
clearTimeout(handle)
handle = null
......@@ -369,10 +396,27 @@ function showLogin() {
}
const cancel = () => {
//取消订单
proxy.$modal.confirm(`确定取消订单吗 ?`).then(() => {
return cancelOrder2(orderId.value).then(res=>{
getData()
ElMessage({
message: '操作成功',
type: 'success'
})
})
})
}
const unsubscribe = () => {
proxy.$modal.confirm(`确定退款吗 ?`).then(() => {
return cancelOrder(orderId.value).then(res=>{
getData()
ElMessage({
message: '操作成功',
type: 'success'
})
})
})
}
</script>
......
......@@ -66,8 +66,9 @@
</div>
</div>
<div class="pd20"></div>
</el-card>
<div class="pd20"></div>
</div>
</template>
......@@ -100,7 +101,9 @@ function goDetail(b) {
})
}
function toInvoice(){
router.push({
name: 'invoice'
})
}
</script>
......
......@@ -82,7 +82,7 @@ export default defineConfig(({ mode, command }) => {
rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
},
'/dev-api': {
target: 'http://192.168.1.131:8081/',
target: 'http://192.168.1.118:8081/',
// target: 'https://dance.itechtop.cn/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api',
changeOrigin: true,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!