43809d5c by 杨炀

no message

1 parent f327101b
...@@ -104,3 +104,35 @@ export function createPalPay(data) { ...@@ -104,3 +104,35 @@ export function createPalPay(data) {
104 data:data 104 data:data
105 }) 105 })
106 } 106 }
107 export function getInvoiceByActiveId(query) {
108 return request({
109 url: `/ota/invoice/list`,
110 method: 'get',
111 params: query
112 })
113 }
114 export function getCanInvoiceBills(query) {
115 return request({
116 url: `/ota/norder/list`,
117 method: 'get',
118 params: query
119 })
120 }
121 export function cancelOrder(orderId) {
122 return request({
123 // url: `/logex/norder/unSubscribeOrderBack/${orderId}`,
124 url: `/ota/norder/applyOrderBack/${orderId}`,
125 method: 'post',
126 params: orderId
127 })
128 }
129 // 取消
130 export function cancelOrder2(orderId) {
131 return request({
132 url: `/ota/norder/cancelOrderBack/${orderId}`,
133 method: 'post',
134 params: orderId
135 })
136 }
137
138
......
...@@ -420,6 +420,12 @@ export const constantRoutes = [ ...@@ -420,6 +420,12 @@ export const constantRoutes = [
420 component: () => import('@/viewsPc/booking/payOk'), 420 component: () => import('@/viewsPc/booking/payOk'),
421 name: 'bookingPayOk', 421 name: 'bookingPayOk',
422 meta: { title: 'payOk' } 422 meta: { title: 'payOk' }
423 },
424 {
425 path: 'invoice',
426 component: () => import('@/viewsPc/booking/invoicing'),
427 name: 'invoice',
428 meta: { title: '我的发票' }
423 } 429 }
424 ] 430 ]
425 }, 431 },
......
1 <template>
2 <div>
3 <div class="box">
4 <div class="indexTitle">
5 <h3 class="leftboderTT">{{ language==0?'我的发票':'My invoice' }}
6 <el-button @click="goAdd" type="primary" class="btn-lineG fr">开发票</el-button>
7 </h3>
8 </div>
9 <el-card class="mt30 mb60">
10 <div class="billItem" v-for="b in list" :key="b.id">
11 <!-- parentType -->
12 <div>
13 申请日期:
14 {{ b.createTime }}
15 </div>
16 <div style="display: flex;justify-content: space-between;">
17 <div> 发票形式 -
18 <span v-if="b.invoiceForm=='1'">电子发票</span>
19 <span v-if="b.invoiceForm=='2'">纸质普票</span>
20 <span v-if="b.invoiceForm=='3'">纸质专票</span>
21 </div>
22 <div>¥ <span>{{b.total}}</span></div>
23 </div>
24 <div style="margin: 20px 0 0;display: flex;justify-content: space-between;">
25 <div class="status">
26 <div class="success" v-if="b.isInvoice == '1'"> 已开票</div>
27 <div class="warning" v-if="b.isInvoice == '0'">未开票</div>
28 <div class="success" v-if="b.isInvoice == '3'"> 已寄出</div>
29 <div class="warning" v-if="b.isInvoice == '2'"> 已取消</div>
30 </div>
31 <div>
32 <button class="billbtn" v-if="b.isInvoice == '0'" @click.stop="editDetail(b)"> 修改发票</button>
33 <button class="billbtn rbtn-m-kx"
34 @click.stop="showDetail(b)">详情</button>
35
36 </div>
37 </div>
38
39 </div>
40 <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/>
41
42 </el-card>
43
44 </div>
45 </div>
46
47 <chose-bills ref="dialogChoseBillsRef"/>
48 </template>
49
50 <script setup>
51 import ChoseBills from './component/choseBills'
52 import { ref } from 'vue'
53 import {getInvoiceByActiveId} from "@/apiPc/booking"
54 import {getCurrentInstance} from "@vue/runtime-core"
55 import {useStorage} from "@vueuse/core/index";
56 const language= useStorage('language',0)
57 const {proxy} = getCurrentInstance()
58 const list = ref([])
59 const query = ref({
60 activeId:'',
61 createById:'',
62 venueId:''
63 })
64 getList()
65 function getList() {
66 getInvoiceByActiveId(query.value).then(res=>{
67 list.value = res.rows
68 })
69 }
70 function goAdd() {
71 //选择开票订单
72 var obj = {
73 title: '选择开票订单',
74 show: true,
75 choosedList:[]
76 }
77 proxy.$refs['dialogChoseBillsRef'].open(obj)
78 }
79 </script>
80
81 <style scoped lang="scss">
82 .leftboderTT{
83 font-size: 20px;}
84 </style>
1 <template>
2 <el-dialog v-model="show" :title="title" width="1000px" append-to-body @close="close">
3 <el-table ref="allBills" :data="tableData" v-loading="loading" @selection-change="handleSelectionChange">
4 <el-table-column type="selection" :label="language==0?'选择':'Selection'" :selectable="selectable"/>
5 <el-table-column prop="id" label="订单号"></el-table-column>
6 <el-table-column prop="id" label="订单类型"></el-table-column>
7 <el-table-column prop="id" label="订单明细">
8 <template #default="scope">
9 <div v-if="scope.row.orderType == 0">
10 <p>{{scope.row.messageObj.roomName}}</p>
11 <p>{{scope.row.messageObj.roomInfo}}</p>
12 <p>{{scope.row.messageObj.roomType}}</p>
13 <p>{{scope.row.messageObj.roomStayDate}}</p>
14 </div>
15 <div v-if="scope.row.orderType == 1">
16 <div v-for="(car,index) in scope.row.messageObj.carsList" :key="index">
17 <p v-if="car.num>0">{{car.name}}{{car.num}}</p>
18 </div>
19 </div>
20 <div v-if="scope.row.orderType == 2">
21 <div v-for="(n,index) in scope.row.messageObj.foodsList" :key="index">
22 <p v-if="n.num > 0">
23 {{n.name}}({{n.categoryName}}) <text>{{n.num}}</text>
24 </p>
25 </div>
26 </div>
27 </template>
28 </el-table-column>
29 <el-table-column prop="total" label="金额"></el-table-column>
30 </el-table>
31 <paginationPc
32 v-show="total>0"
33 v-model:page="query.pageNum"
34 v-model:limit="query.pageSize"
35 :total="total"
36 @pagination="getList"
37 />
38 <template #footer>
39 <div class="dialog-footer text-center">
40 <el-button type="primary" @click="submit">{{language==0?'确定':'Confirm'}}</el-button>
41 <el-button @click="cancel">{{language==0?'取消':'Cancel'}}</el-button>
42 </div>
43 </template>
44 </el-dialog>
45 </template>
46
47 <script setup>
48 import {reactive, ref, toRefs, watch} from 'vue'
49 import {getCurrentInstance} from "@vue/runtime-core";
50 import {useStorage} from "@vueuse/core/index";
51 import {getCanInvoiceBills} from "@/apiPc/booking";
52 const {proxy} = getCurrentInstance()
53 const emit = defineEmits([ 'transfer'])
54 const language= useStorage('language',0)
55 const data = reactive({
56 tableData: [],
57 show: false,
58 loading: false,
59 title: '选择开票订单',
60 query:{
61 activeId:'',
62 createById:'',
63 invoiced:'1',
64 // venueId:''
65 },
66 total:0
67 })
68 const { tableData,show,loading,title,query,total} = toRefs(data)
69 let choosedList = []
70 const choosedIds = []
71 const open = (params) => {
72 title.value = params.title
73 show.value = true
74 choosedList = params.choosedList
75 for (const p of choosedList) {
76 choosedIds.push(p.id)
77 }
78 getList()
79 }
80 defineExpose({
81 open
82 })
83 const getList = () => {
84 loading.value = true
85 getCanInvoiceBills(query.value).then(res=>{
86 loading.value = false
87 tableData.value = res.data.rows
88 total.value = res.data.total
89
90 for (var b of tableData.value) {
91 b.messageObj = JSON.parse(b.message)
92 }
93 })
94 }
95 const submit = () => {
96
97 }
98 const cancel = () => {
99 show.value = false
100 }
101
102
103 </script>
104
105 <style scoped lang="scss">
106
107 </style>
...@@ -119,6 +119,7 @@ const rules = ref({}) ...@@ -119,6 +119,7 @@ const rules = ref({})
119 let usedays = 0 119 let usedays = 0
120 onMounted(() => { 120 onMounted(() => {
121 food.value = JSON.parse(decodeURIComponent(route.query.food)) 121 food.value = JSON.parse(decodeURIComponent(route.query.food))
122 form.value = food.value
122 restaurant.value = JSON.parse(decodeURIComponent(route.query.restaurant)) 123 restaurant.value = JSON.parse(decodeURIComponent(route.query.restaurant))
123 if(language.value == 0){ 124 if(language.value == 0){
124 form.value.total = food.value.foodPrice 125 form.value.total = food.value.foodPrice
......
...@@ -26,8 +26,14 @@ ...@@ -26,8 +26,14 @@
26 </div> 26 </div>
27 27
28 <div v-if="type == 'car'"> 28 <div v-if="type == 'car'">
29 <div class="leftboderTT">{{ language == 0 ? '车辆信息' : 'Car Information' }}</div> 29 <div class="leftboderTT">{{ language == 0 ? '路线信息' : 'Car Information' }}</div>
30 30 <div class="border-info mt20">
31 <div class="flex aic">
32 <h3 class="esp">{{ form.checkIn }}</h3>
33 <img class="w40px mlr20 " style="height: 40px;" src="@/assets/booking/wf.png"/>
34 <h3 class="esp">{{ form.checkOut }}</h3>
35 </div>
36 </div>
31 </div> 37 </div>
32 <div v-if="type == 'food'"> 38 <div v-if="type == 'food'">
33 <div class="leftboderTT">{{ language == 0 ? '饭店信息' : 'Restaurant Information' }}</div> 39 <div class="leftboderTT">{{ language == 0 ? '饭店信息' : 'Restaurant Information' }}</div>
...@@ -49,11 +55,47 @@ ...@@ -49,11 +55,47 @@
49 <el-col :lg="8" :md="12" :sm="12" :xs="24"></el-col> 55 <el-col :lg="8" :md="12" :sm="12" :xs="24"></el-col>
50 </el-row> 56 </el-row>
51 <el-row v-if="type == 'car'"> 57 <el-row v-if="type == 'car'">
52 <el-col :lg="12" :md="12" :sm="12" :xs="24"> 58 <el-col :lg="12" :md="12" :sm="12" :xs="24" v-if="form.pickUpBo?.revTime">
53 接站信息 59 <h4>接站信息</h4>
60 <div>
61 <div>{{ language == 0 ?'用车时间':'Delivery Time' }}{{ form.pickUpBo.revTime }}</div>
62 <div class="carLine" v-for="(car,index) in form.pickUpBo.carsList" :key="index">
63 <div v-if="car.num > 0">
64 <label>{{car.name}}</label>
65 <span class="tag">{{car.carSeat}}</span>
66 <span class="tag">{{car.carColor}}</span>
67 </div>
68
69 <span v-if="car.num > 0"> {{car.num}}辆 * ¥{{car.price}}</span>
70 </div>
71
72 <div>人数 {{form.pickUpBo.count}}</div>
73 <div>航班/火车班次{{form.pickUpBo.no}}</div>
74 <div>接机/接站地点{{form.pickUpBo.noAddress}}</div>
75 <div>送达地点 {{form.pickUpBo.deliveryAddress}}</div>
76 <div>{{ language == 0 ?'联系人':'Contact Person' }}{{ form.dropOffBo.contacts }}</div>
77 <div>{{ language == 0 ?'联系电话':'Contact Phone' }}{{ form.dropOffBo.phone }}</div>
78 <div>{{ language == 0 ?'备注':'Remarks' }}{{ form.dropOffBo.remarks }}</div>
79 </div>
54 </el-col> 80 </el-col>
55 <el-col :lg="12" :md="12" :sm="12" :xs="24"> 81 <el-col :lg="12" :md="12" :sm="12" :xs="24" v-if="form.dropOffBo?.revTime">
56 送站信息 82 <h4>送站信息</h4>
83 <div>
84 <div>{{ language == 0 ?'用车时间':'Delivery Time' }}{{ form.dropOffBo.revTime }}</div>
85 <div class="carLine" v-for="(car,index) in form.dropOffBo.carsList" :key="index">
86 <div v-if="car.num > 0">
87 <label>{{car.name}}</label>
88 <span class="tag">{{car.carSeat}}</span>
89 <span class="tag">{{car.carColor}}</span>
90 </div>
91
92 <span v-if="car.num > 0"> {{car.num}}辆 * ¥{{car.price}}</span>
93 </div>
94 <div>{{ language == 0 ?'人数':'Counts' }}{{ form.dropOffBo.count }}</div>
95 <div>{{ language == 0 ?'联系人':'Contact Person' }}{{ form.dropOffBo.contacts }}</div>
96 <div>{{ language == 0 ?'联系电话':'Contact Phone' }}{{ form.dropOffBo.phone }}</div>
97 <div>{{ language == 0 ?'备注':'Remarks' }}{{ form.dropOffBo.remarks }}</div>
98 </div>
57 </el-col> 99 </el-col>
58 </el-row> 100 </el-row>
59 <el-row v-if="type == 'food'"> 101 <el-row v-if="type == 'food'">
...@@ -79,28 +121,7 @@ ...@@ -79,28 +121,7 @@
79 </div> 121 </div>
80 122
81 <el-row justify="end"> 123 <el-row justify="end">
82 <el-col :lg="12" :xs="24"> 124 <el-col :lg="12" v-if="Number(totalFee)>0" class="result">
83 <div class="text-right">
84 <div class="item"><label>{{ language == 0 ? '费用总计' : 'Total Cost' }}</label>
85 <span class="size26 wePrice text-warning">{{ language == 0 ? '¥' : '€' }}{{ form.total }}</span>
86 </div>
87 </div>
88 </el-col>
89 </el-row>
90 </div>
91 </div>
92 <div v-else class="pd20 skeletonBox">
93 <el-skeleton :rows="8"/>
94 <el-button type="primary" class="btn-lineG" size="large" :style="language == 0 ?'width:200px':'width:400px'"
95 round @click="showLogin">
96 {{ language == 0 ? '登录后查看明细' : 'View detailed information after logging in' }}
97 </el-button>
98 </div>
99
100 <el-row class="result">
101 <el-col :lg="12">
102 </el-col>
103 <el-col :lg="12" v-if="Number(form.totalFee)>0">
104 <div class="priceb" v-if="form.viewStatus=='0'">{{ language == 0 ? '待支付金额' : 'Amount Due' }}<span 125 <div class="priceb" v-if="form.viewStatus=='0'">{{ language == 0 ? '待支付金额' : 'Amount Due' }}<span
105 class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div> 126 class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
106 <div class="priceb" v-if="form.viewStatus=='1'">{{ language == 0 ? '已支付金额' : 'Amount Due' }}<span 127 <div class="priceb" v-if="form.viewStatus=='1'">{{ language == 0 ? '已支付金额' : 'Amount Due' }}<span
...@@ -113,8 +134,17 @@ ...@@ -113,8 +134,17 @@
113 class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div> 134 class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div>
114 </el-col> 135 </el-col>
115 </el-row> 136 </el-row>
137 </div>
138 </div>
139 <div v-else class="pd20 skeletonBox">
140 <el-skeleton :rows="8"/>
141 <el-button type="primary" class="btn-lineG" size="large" :style="language == 0 ?'width:200px':'width:400px'"
142 round @click="showLogin">
143 {{ language == 0 ? '登录后查看明细' : 'View detailed information after logging in' }}
144 </el-button>
145 </div>
116 146
117 <div class="pd20" v-if="form.status == '0'&&(form.surplus!='0,0'&&form.surplus!='0')"> 147 <div class="pd20" v-if="form.viewStatus == '0'&&(form.surplus!='0,0'&&form.surplus!='0')">
118 148
119 <div class="leftboderTT">{{ language == 0 ? '选择支付方式' : 'Choose payment method' }}</div> 149 <div class="leftboderTT">{{ language == 0 ? '选择支付方式' : 'Choose payment method' }}</div>
120 <div class="mt20"> 150 <div class="mt20">
...@@ -162,7 +192,6 @@ ...@@ -162,7 +192,6 @@
162 </svg> 192 </svg>
163 </el-radio> 193 </el-radio>
164 </el-radio-group> 194 </el-radio-group>
165
166 <div v-if="payType == '2'&&wePayCodeUrl"> 195 <div v-if="payType == '2'&&wePayCodeUrl">
167 <div class="payImgbox flexCenter"> 196 <div class="payImgbox flexCenter">
168 <div> 197 <div>
...@@ -184,10 +213,11 @@ ...@@ -184,10 +213,11 @@
184 please refresh the page 213 please refresh the page
185 </div> 214 </div>
186 </div> 215 </div>
187 216 </div>
188 <el-row class="mt20" align="middle" justify="center"> 217 </div>
218 <el-row class="mt20 mb60" align="middle" justify="center">
189 <el-col :span="24" class="text-center"> 219 <el-col :span="24" class="text-center">
190 <el-button v-if="!hideconfirmbtn" type="primary" @click="goPay" round class="btn-lineG w200px"> 220 <el-button v-if="!hideconfirmbtn&&form.viewStatus == '0'" type="primary" @click="goPay" round class="btn-lineG w200px">
191 {{ language == 0 ? '确定' : 'Submit' }} 221 {{ language == 0 ? '确定' : 'Submit' }}
192 </el-button> 222 </el-button>
193 <el-button round @click="unsubscribe" v-if="form.viewStatus == '5'">{{ language==0?'退订':'Unsubscribe' }}</el-button> 223 <el-button round @click="unsubscribe" v-if="form.viewStatus == '5'">{{ language==0?'退订':'Unsubscribe' }}</el-button>
...@@ -196,8 +226,7 @@ ...@@ -196,8 +226,7 @@
196 </el-button> 226 </el-button>
197 </el-col> 227 </el-col>
198 </el-row> 228 </el-row>
199 </div> 229
200 </div>
201 <div v-if="form.payStatus == '3'"> 230 <div v-if="form.payStatus == '3'">
202 <div class="text-center"> 231 <div class="text-center">
203 <el-icon color="#32B16C" size="80"> 232 <el-icon color="#32B16C" size="80">
...@@ -248,7 +277,8 @@ import useUserStore from "@/store/modules/user"; ...@@ -248,7 +277,8 @@ import useUserStore from "@/store/modules/user";
248 import FileUpload from "@/components/FileUpload"; 277 import FileUpload from "@/components/FileUpload";
249 import {useStorage} from "@vueuse/core/index"; 278 import {useStorage} from "@vueuse/core/index";
250 import {ElMessage} from "element-plus"; 279 import {ElMessage} from "element-plus";
251 import {getCarBilldetailbyId, getFoodBilldetailbyId} from "@/apiPc/booking"; 280 import {cancelOrder, cancelOrder2, getCarBilldetailbyId, getFoodBilldetailbyId} from "@/apiPc/booking";
281 import {delPerson} from "@/api/exam/person";
252 282
253 const isLogin = ref(false) 283 const isLogin = ref(false)
254 const language = useStorage('language', 0) 284 const language = useStorage('language', 0)
...@@ -293,10 +323,7 @@ onMounted(() => { ...@@ -293,10 +323,7 @@ onMounted(() => {
293 function getData() { 323 function getData() {
294 if(type.value=='car') { 324 if(type.value=='car') {
295 booking.getCarBilldetailbyId({orderId: orderId.value}).then(res => { 325 booking.getCarBilldetailbyId({orderId: orderId.value}).then(res => {
296 totalFee.value = res.data.total
297 form.value = res.data 326 form.value = res.data
298 form.value.messageObj = JSON.parse(form.value.message)
299 form.value.extJsonObj = JSON.parse(form.value.extJson)
300 }).catch(err => { 327 }).catch(err => {
301 console.log(err) 328 console.log(err)
302 errorBox.value = true 329 errorBox.value = true
...@@ -313,10 +340,10 @@ function getData() { ...@@ -313,10 +340,10 @@ function getData() {
313 } 340 }
314 if(type.value=='hotel') { 341 if(type.value=='hotel') {
315 booking.getRoomBilldetailbyId({orderId: orderId.value}).then(res => { 342 booking.getRoomBilldetailbyId({orderId: orderId.value}).then(res => {
316 totalFee.value = res.data.total 343 totalFee.value = res.data.total || 0
317 form.value = res.data 344 form.value = res.data
318 form.value.messageObj = JSON.parse(form.value.message) 345 form.value.messageObj = JSON.parse(form.value.message) || {}
319 form.value.extJsonObj = JSON.parse(form.value.extJson) 346 form.value.extJsonObj = JSON.parse(form.value.extJson) || {}
320 matchId.value = form.value.extJsonObj?.activeId 347 matchId.value = form.value.extJsonObj?.activeId
321 }).catch(err => { 348 }).catch(err => {
322 console.log(err) 349 console.log(err)
...@@ -351,8 +378,8 @@ let handle; ...@@ -351,8 +378,8 @@ let handle;
351 378
352 function startforGetData() { 379 function startforGetData() {
353 handle = setTimeout(() => { 380 handle = setTimeout(() => {
354 getData().then(() => { 381 getData().then( res => {
355 if (form.value.payTime) { 382 if (form.value.payDate) {
356 if (handle) { 383 if (handle) {
357 clearTimeout(handle) 384 clearTimeout(handle)
358 handle = null 385 handle = null
...@@ -369,10 +396,27 @@ function showLogin() { ...@@ -369,10 +396,27 @@ function showLogin() {
369 } 396 }
370 397
371 const cancel = () => { 398 const cancel = () => {
372 399 //取消订单
400 proxy.$modal.confirm(`确定取消订单吗 ?`).then(() => {
401 return cancelOrder2(orderId.value).then(res=>{
402 getData()
403 ElMessage({
404 message: '操作成功',
405 type: 'success'
406 })
407 })
408 })
373 } 409 }
374 const unsubscribe = () => { 410 const unsubscribe = () => {
375 411 proxy.$modal.confirm(`确定退款吗 ?`).then(() => {
412 return cancelOrder(orderId.value).then(res=>{
413 getData()
414 ElMessage({
415 message: '操作成功',
416 type: 'success'
417 })
418 })
419 })
376 } 420 }
377 </script> 421 </script>
378 422
......
...@@ -66,8 +66,9 @@ ...@@ -66,8 +66,9 @@
66 </div> 66 </div>
67 67
68 </div> 68 </div>
69 <div class="pd20"></div>
70 </el-card> 69 </el-card>
70 <div class="pd20"></div>
71
71 </div> 72 </div>
72 </template> 73 </template>
73 74
...@@ -100,7 +101,9 @@ function goDetail(b) { ...@@ -100,7 +101,9 @@ function goDetail(b) {
100 }) 101 })
101 } 102 }
102 function toInvoice(){ 103 function toInvoice(){
103 104 router.push({
105 name: 'invoice'
106 })
104 } 107 }
105 108
106 </script> 109 </script>
......
...@@ -82,7 +82,7 @@ export default defineConfig(({ mode, command }) => { ...@@ -82,7 +82,7 @@ export default defineConfig(({ mode, command }) => {
82 rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') 82 rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
83 }, 83 },
84 '/dev-api': { 84 '/dev-api': {
85 target: 'http://192.168.1.131:8081/', 85 target: 'http://192.168.1.118:8081/',
86 // target: 'https://dance.itechtop.cn/stage-api', 86 // target: 'https://dance.itechtop.cn/stage-api',
87 // target: 'https://wdsfwuxicenter.com/stage-api', 87 // target: 'https://wdsfwuxicenter.com/stage-api',
88 changeOrigin: true, 88 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!