票务
Showing
6 changed files
with
365 additions
and
322 deletions
| ... | @@ -647,8 +647,6 @@ async function getTicketOrderInfoFN() { | ... | @@ -647,8 +647,6 @@ async function getTicketOrderInfoFN() { |
| 647 | } finally { | 647 | } finally { |
| 648 | 648 | ||
| 649 | } | 649 | } |
| 650 | |||
| 651 | |||
| 652 | console.log(form.value) | 650 | console.log(form.value) |
| 653 | } | 651 | } |
| 654 | 652 | ||
| ... | @@ -705,6 +703,17 @@ function startforGetData() { | ... | @@ -705,6 +703,17 @@ function startforGetData() { |
| 705 | startforGetData() | 703 | startforGetData() |
| 706 | } | 704 | } |
| 707 | }) | 705 | }) |
| 706 | } else if (type.value == 'ticket') { | ||
| 707 | getTicketOrderInfoFN().then(res => { | ||
| 708 | if (form.value.payDate) { | ||
| 709 | if (handle) { | ||
| 710 | clearTimeout(handle) | ||
| 711 | handle = null | ||
| 712 | } | ||
| 713 | } else { | ||
| 714 | startforGetData() | ||
| 715 | } | ||
| 716 | }) | ||
| 708 | } else { | 717 | } else { |
| 709 | getData().then(res => { | 718 | getData().then(res => { |
| 710 | if (form.value.payDate) { | 719 | if (form.value.payDate) { | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <div class="box"> | 3 | <div class="box"> |
| 4 | <el-card class="mb60 mt30" v-loading="loading"> | 4 | <el-card v-loading="loading" class="mb60 mt30"> |
| 5 | <div class="text-center mt30"> | 5 | <div class="text-center mt30"> |
| 6 | <el-icon color="#32B16C" size="80"> | 6 | <el-icon color="#32B16C" size="80"> |
| 7 | <SuccessFilled/> | 7 | <SuccessFilled/> |
| 8 | </el-icon> | 8 | </el-icon> |
| 9 | <p class="text-success mb20">{{ language == 0 ? '支付成功' : 'successfully!' }}</p> | 9 | <p class="text-success mb20">{{ language == 0 ? '支付成功' : 'successfully!' }}</p> |
| 10 | 10 | ||
| 11 | <el-button type="primary" class="btn-lineG mb60" @click="goBillDetail" round> | 11 | <el-button class="btn-lineG mb60" round type="primary" @click="goBillDetail"> |
| 12 | {{ language == 0 ? '返回订单详情' : 'Return order details' }} | 12 | {{ language == 0 ? '返回订单详情' : 'Return order details' }} |
| 13 | </el-button> | 13 | </el-button> |
| 14 | </div> | 14 | </div> |
| ... | @@ -26,18 +26,18 @@ import {useStorage} from "@vueuse/core/index"; | ... | @@ -26,18 +26,18 @@ import {useStorage} from "@vueuse/core/index"; |
| 26 | 26 | ||
| 27 | const route = useRoute() | 27 | const route = useRoute() |
| 28 | const router = useRouter() | 28 | const router = useRouter() |
| 29 | const language= useStorage('language',0) | 29 | const language = useStorage('language', 0) |
| 30 | const orderId = ref(route.query.orderId) | 30 | const orderId = ref(route.query.orderId) |
| 31 | const type = ref('') | 31 | const type = ref('') |
| 32 | const loading = ref(false) | 32 | const loading = ref(false) |
| 33 | 33 | ||
| 34 | onMounted(() => { | 34 | onMounted(() => { |
| 35 | var code = decodeURIComponent(orderId.value) | 35 | let code = decodeURIComponent(orderId.value) |
| 36 | console.log(code) | 36 | console.log(code) |
| 37 | loading.value = true | 37 | loading.value = true |
| 38 | callbackPalPay(code).then(res => { | 38 | callbackPalPay(code).then(res => { |
| 39 | loading.value = false | 39 | loading.value = false |
| 40 | type.value = res.data.orderType | 40 | type.value = res.data.orderType |
| 41 | }) | 41 | }) |
| 42 | }) | 42 | }) |
| 43 | 43 | ||
| ... | @@ -52,6 +52,6 @@ function goBillDetail() { | ... | @@ -52,6 +52,6 @@ function goBillDetail() { |
| 52 | } | 52 | } |
| 53 | </script> | 53 | </script> |
| 54 | 54 | ||
| 55 | <style scoped lang="scss"> | 55 | <style lang="scss" scoped> |
| 56 | 56 | ||
| 57 | </style> | 57 | </style> | ... | ... |
| ... | @@ -142,7 +142,7 @@ import { | ... | @@ -142,7 +142,7 @@ import { |
| 142 | listApi, | 142 | listApi, |
| 143 | getTicketListApi, getTicketInfoByActivityId, | 143 | getTicketListApi, getTicketInfoByActivityId, |
| 144 | } from '@/apiPc/booking' | 144 | } from '@/apiPc/booking' |
| 145 | import {ElMessage} from "element-plus"; | 145 | import {ElMessage, ElMessageBox} from "element-plus"; |
| 146 | import {languageFormat} from "@/viewsPc/seat/utils/language.js"; | 146 | import {languageFormat} from "@/viewsPc/seat/utils/language.js"; |
| 147 | import useUserStore from "/@/store/modules/user"; | 147 | import useUserStore from "/@/store/modules/user"; |
| 148 | import {useStorage} from "@vueuse/core/index"; | 148 | import {useStorage} from "@vueuse/core/index"; |
| ... | @@ -208,110 +208,6 @@ const formRef = ref(null) | ... | @@ -208,110 +208,6 @@ const formRef = ref(null) |
| 208 | const TickForm = ref({}) | 208 | const TickForm = ref({}) |
| 209 | let timer = null; | 209 | let timer = null; |
| 210 | 210 | ||
| 211 | |||
| 212 | // const payment = reactive({ | ||
| 213 | // showCodeDialog: false, | ||
| 214 | // btn_loading: false, | ||
| 215 | // form: { | ||
| 216 | // viewers: [], | ||
| 217 | // phone: "", | ||
| 218 | // }, | ||
| 219 | // qrInfo: {}, | ||
| 220 | // qrCodeData: "", | ||
| 221 | // paymentHandle() { | ||
| 222 | // if (payment.form.viewers.length != order.data?.seatInfo?.length) | ||
| 223 | // return ElMessage({ | ||
| 224 | // type: "warning", | ||
| 225 | // message: languageFormat( | ||
| 226 | // language.value, | ||
| 227 | // "观看人与购买票数不符", | ||
| 228 | // "The number of viewers does not match the number of tickets purchased." | ||
| 229 | // ), | ||
| 230 | // }); | ||
| 231 | // if (!payment.form.phone) | ||
| 232 | // return ElMessage({ | ||
| 233 | // type: "warning", | ||
| 234 | // message: languageFormat( | ||
| 235 | // language.value, | ||
| 236 | // "请输入联系电话", | ||
| 237 | // "Please enter the contact phone number." | ||
| 238 | // ), | ||
| 239 | // }); | ||
| 240 | // // if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(payment.form.phone)) { | ||
| 241 | // // return ElMessage({ | ||
| 242 | // // type: "warning", | ||
| 243 | // // message: languageFormat( | ||
| 244 | // // language.value, | ||
| 245 | // // "联系电话格式不正确", | ||
| 246 | // // "The format of the contact phone is incorrect." | ||
| 247 | // // ), | ||
| 248 | // // }); | ||
| 249 | // // } | ||
| 250 | // loading.value = true | ||
| 251 | // payOrder({ | ||
| 252 | // contactPhone: payment.form.phone, | ||
| 253 | // customerIds: payment.form.viewers, | ||
| 254 | // orderToken: order.data?.orderToken, | ||
| 255 | // payType: language.value == 0 ? 1 : 2, | ||
| 256 | // paymentAmount: order.data?.paymentAmount, | ||
| 257 | // }).then((res) => { | ||
| 258 | // if (res.data.language == "zh-cn") { | ||
| 259 | // payment.qrInfo = res.data; | ||
| 260 | // qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => { | ||
| 261 | // if (url) { | ||
| 262 | // payment.qrCodeData = url; | ||
| 263 | // } | ||
| 264 | // }); | ||
| 265 | // payment.showCodeDialog = true; | ||
| 266 | // startCheckSuccessListener(res.data.orderSn, props.activityId); | ||
| 267 | // } else { | ||
| 268 | // // TODO:这里是英文环境支付 | ||
| 269 | // location.href = res.data.scanCodeUrl | ||
| 270 | // } | ||
| 271 | // }).finally(() => { | ||
| 272 | // loading.value = false | ||
| 273 | // }); | ||
| 274 | // }, | ||
| 275 | // handleCloce() { | ||
| 276 | // payment.showCodeDialog = false; | ||
| 277 | // payment.qrCodeData = ""; | ||
| 278 | // clearInterval(timer); | ||
| 279 | // timer = null; | ||
| 280 | // router.replace({ | ||
| 281 | // path: "/seat/order", | ||
| 282 | // }); | ||
| 283 | // }, | ||
| 284 | // }); | ||
| 285 | |||
| 286 | // const order = reactive({ | ||
| 287 | // data: null, | ||
| 288 | // fetchData() { | ||
| 289 | // confirmOrder({ | ||
| 290 | // actId: props.activityId, | ||
| 291 | // openType: route.query.openType, | ||
| 292 | // sessionId: route.query.sessionId, | ||
| 293 | // sitePlace: route.query.sitePlace, | ||
| 294 | // ticketType: route.query.ticketType, | ||
| 295 | // seatIds: route.query.seatIds.split(","), | ||
| 296 | // }).then((res) => { | ||
| 297 | // this.data = res.data; | ||
| 298 | // }); | ||
| 299 | // }, | ||
| 300 | // }); | ||
| 301 | |||
| 302 | // const audience = reactive({ | ||
| 303 | // data: [], | ||
| 304 | // fetchData() { | ||
| 305 | // viewPeopleList().then((res) => { | ||
| 306 | // audience.data = res.data; | ||
| 307 | // }); | ||
| 308 | // }, | ||
| 309 | // }); | ||
| 310 | |||
| 311 | // audience.fetchData(); | ||
| 312 | // order.fetchData(); | ||
| 313 | |||
| 314 | |||
| 315 | customerList() | 211 | customerList() |
| 316 | 212 | ||
| 317 | function changeGroup() { | 213 | function changeGroup() { |
| ... | @@ -359,10 +255,27 @@ async function paymentHandle() { | ... | @@ -359,10 +255,27 @@ async function paymentHandle() { |
| 359 | } | 255 | } |
| 360 | 256 | ||
| 361 | await formRef.value.validate() | 257 | await formRef.value.validate() |
| 362 | const res = await submitOrderTicket(orderForm.value) | 258 | |
| 363 | if (res.code == 200) { | 259 | await ElMessageBox.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?', { |
| 364 | ElMessage.success('提交成功') | 260 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', |
| 365 | } | 261 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 262 | type: 'warning' | ||
| 263 | }).then(async () => { | ||
| 264 | const res = await submitOrderTicket(orderForm.value) | ||
| 265 | if (res.code == 200 && res.data.orderId > 0) { | ||
| 266 | // 去付钱 | ||
| 267 | router.push({ | ||
| 268 | name: 'bookingPay', | ||
| 269 | query: { | ||
| 270 | orderId: res.data.orderId, | ||
| 271 | money: res.data.total, | ||
| 272 | type: 'ticket' | ||
| 273 | } | ||
| 274 | }) | ||
| 275 | } else { | ||
| 276 | ElMessage.warning(language.value == 0 ? '下单失败,' : 'Order failure') | ||
| 277 | } | ||
| 278 | }) | ||
| 366 | } | 279 | } |
| 367 | 280 | ||
| 368 | async function getDetail() { | 281 | async function getDetail() { | ... | ... |
| ... | @@ -37,43 +37,46 @@ | ... | @@ -37,43 +37,46 @@ |
| 37 | <div class="address"> | 37 | <div class="address"> |
| 38 | {{ triggerLanguage(language, "地址", "Location") }}:{{ matchForm.address }} | 38 | {{ triggerLanguage(language, "地址", "Location") }}:{{ matchForm.address }} |
| 39 | </div> | 39 | </div> |
| 40 | |||
| 40 | <!-- 时间 --> | 41 | <!-- 时间 --> |
| 41 | <div class="select_item_box"> | 42 | <div class="select_item_box"> |
| 42 | <div class="label"> | 43 | <div class="label"> |
| 43 | {{ triggerLanguage(language, "票档", "Tickets") }} | 44 | {{ triggerLanguage(language, "时间", "Event Date & Time") }} |
| 44 | </div> | 45 | </div> |
| 45 | <div class="select_item"> | 46 | <div class="select_item"> |
| 46 | <div | 47 | <div |
| 47 | v-for="(it, index) in tickClass" | 48 | v-for="(it, index) in tickList" |
| 48 | :key="index" | 49 | :key="index" |
| 49 | :class="[ | 50 | :class="[ |
| 50 | it.id == selectForm.latId ? 'tagActive' : 'tag', | 51 | it.id == selectForm.id ? 'tagActive' : 'tag', |
| 52 | it.isView==0?'forbid':'' | ||
| 51 | ]" | 53 | ]" |
| 52 | @click="select(it)" | 54 | @click="selectTick(it)" |
| 53 | > | 55 | > |
| 54 | {{ it.name }} | 56 | {{ it.name }} <span v-if="it.ticketType==1" class="tao">{{ |
| 57 | language == 0 ? '套票' : 'Package ticket' | ||
| 58 | }}</span> | ||
| 55 | </div> | 59 | </div> |
| 56 | </div> | 60 | </div> |
| 57 | </div> | 61 | </div> |
| 58 | <!-- 时间 --> | 62 | <!-- 票档 --> |
| 59 | <div class="select_item_box"> | 63 | <div class="select_item_box"> |
| 60 | <div class="label"> | 64 | <div class="label"> |
| 61 | {{ triggerLanguage(language, "时间", "Event Date & Time") }} | 65 | {{ triggerLanguage(language, "票档", "Tickets") }} |
| 62 | </div> | 66 | </div> |
| 63 | <div class="select_item"> | 67 | <div class="select_item"> |
| 64 | <div | 68 | <div |
| 65 | v-for="(it, index) in tickList" | 69 | v-for="(it, index) in tickClass" |
| 66 | :key="index" | 70 | :key="index" |
| 67 | :class="[ | 71 | :class="[ |
| 68 | it.id == selectForm.id ? 'tagActive' : 'tag', | 72 | it.id == selectForm.latId ? 'tagActive' : 'tag', |
| 69 | ]" | 73 | ]" |
| 70 | @click="selectTick(it)" | 74 | @click="select(it)" |
| 71 | > | 75 | > |
| 72 | {{ it.name }} | 76 | {{ it.name }} |
| 73 | </div> | 77 | </div> |
| 74 | </div> | 78 | </div> |
| 75 | </div> | 79 | </div> |
| 76 | |||
| 77 | <!-- button --> | 80 | <!-- button --> |
| 78 | <div class="btn forPc" style="margin-left: 40px" @click="toSelectSeat()"> | 81 | <div class="btn forPc" style="margin-left: 40px" @click="toSelectSeat()"> |
| 79 | {{ triggerLanguage(language, "添加观影人", "Add Moviegoers") }} | 82 | {{ triggerLanguage(language, "添加观影人", "Add Moviegoers") }} |
| ... | @@ -106,6 +109,7 @@ const user = computed(() => useUserStore().user) | ... | @@ -106,6 +109,7 @@ const user = computed(() => useUserStore().user) |
| 106 | const route = useRoute(); | 109 | const route = useRoute(); |
| 107 | const router = useRouter(); | 110 | const router = useRouter(); |
| 108 | const activeId = ref(route.params.activeId) | 111 | const activeId = ref(route.params.activeId) |
| 112 | const flag = ref(false) | ||
| 109 | const props = defineProps({ | 113 | const props = defineProps({ |
| 110 | activityId: [String, Number], | 114 | activityId: [String, Number], |
| 111 | }); | 115 | }); |
| ... | @@ -140,6 +144,13 @@ async function getTicketList() { | ... | @@ -140,6 +144,13 @@ async function getTicketList() { |
| 140 | async function getTicketListType() { | 144 | async function getTicketListType() { |
| 141 | const res = await listApi({latId: selectForm.value.latId}) | 145 | const res = await listApi({latId: selectForm.value.latId}) |
| 142 | tickList.value = res.rows | 146 | tickList.value = res.rows |
| 147 | flag.value = tickList.value.some((item) => { | ||
| 148 | return item.isView == 0 | ||
| 149 | }) | ||
| 150 | tickList.value.forEach(v => { | ||
| 151 | if (flag.value && v.ticketType == 1) v.isView = 0 | ||
| 152 | }) | ||
| 153 | |||
| 143 | } | 154 | } |
| 144 | 155 | ||
| 145 | function select(v) { | 156 | function select(v) { |
| ... | @@ -148,14 +159,14 @@ function select(v) { | ... | @@ -148,14 +159,14 @@ function select(v) { |
| 148 | } | 159 | } |
| 149 | 160 | ||
| 150 | function selectTick(v) { | 161 | function selectTick(v) { |
| 151 | selectForm.value.id = v.id | 162 | if (v.isView != 0) selectForm.value.id = v.id |
| 152 | } | 163 | } |
| 153 | 164 | ||
| 154 | function toSelectSeat() { | 165 | function toSelectSeat() { |
| 155 | if (!selectForm.value.latId) return ElMessage.error(language == 0 ? "请选择票档" : 'Please select a ticket file') | 166 | if (!selectForm.value.latId) return ElMessage.error(language == 0 ? "请选择票档" : 'Please select a ticket file') |
| 156 | if (!selectForm.value.id) return ElMessage.error(language == 0 ? "请选择时间" : 'Please select time') | 167 | if (!selectForm.value.id) return ElMessage.error(language == 0 ? "请选择时间" : 'Please select time') |
| 157 | if (!user.value) { | 168 | if (!user.value) { |
| 158 | useStore().setVisitor() | 169 | useStore.setVisitor() |
| 159 | return | 170 | return |
| 160 | } | 171 | } |
| 161 | router.push({ | 172 | router.push({ |
| ... | @@ -242,6 +253,11 @@ function toSelectSeat() { | ... | @@ -242,6 +253,11 @@ function toSelectSeat() { |
| 242 | flex-shrink: 0; | 253 | flex-shrink: 0; |
| 243 | } | 254 | } |
| 244 | 255 | ||
| 256 | .forbid { | ||
| 257 | opacity: 0.5; | ||
| 258 | cursor: not-allowed !important; | ||
| 259 | } | ||
| 260 | |||
| 245 | .select_item { | 261 | .select_item { |
| 246 | display: flex; | 262 | display: flex; |
| 247 | flex-wrap: wrap; | 263 | flex-wrap: wrap; |
| ... | @@ -280,6 +296,13 @@ function toSelectSeat() { | ... | @@ -280,6 +296,13 @@ function toSelectSeat() { |
| 280 | cursor: pointer; | 296 | cursor: pointer; |
| 281 | } | 297 | } |
| 282 | 298 | ||
| 299 | .tao { | ||
| 300 | border: 1px solid #493ceb; | ||
| 301 | font-size: 14px; | ||
| 302 | color: #493ceb; | ||
| 303 | margin-left: 10px; | ||
| 304 | } | ||
| 305 | |||
| 283 | .tagDisabled { | 306 | .tagDisabled { |
| 284 | padding: 12px 18px; | 307 | padding: 12px 18px; |
| 285 | background: #878787; | 308 | background: #878787; | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <el-card :body-style="{'padding':'10px 0 0'}" class="mb60"> | 3 | <el-card :body-style="{'padding':'10px 0 0'}" class="mb60"> |
| 4 | <!-- <div class="indexTitle">--> | 4 | <!-- <div class="indexTitle">--> |
| 5 | <!-- <h3 class="leftboderTT">{{ language==0?'电子发票':'E-invoice' }}--> | 5 | <!-- <h3 class="leftboderTT">{{ language==0?'电子发票':'E-invoice' }}--> |
| 6 | <!-- </h3>--> | 6 | <!-- </h3>--> |
| 7 | <!-- </div>--> | 7 | <!-- </div>--> |
| 8 | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> | 8 | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
| 9 | <el-tab-pane :label="language==0?'赛事报名':'REGISTRATION'" name="5"></el-tab-pane> | 9 | <el-tab-pane :label="language==0?'赛事报名':'REGISTRATION'" name="5"></el-tab-pane> |
| 10 | <el-tab-pane :label="language==0?'酒店订单':'HOTEL'" name="0"></el-tab-pane> | 10 | <el-tab-pane :label="language==0?'酒店订单':'HOTEL'" name="0"></el-tab-pane> |
| ... | @@ -24,163 +24,167 @@ | ... | @@ -24,163 +24,167 @@ |
| 24 | style="width: 200px" | 24 | style="width: 200px" |
| 25 | @change="getList" | 25 | @change="getList" |
| 26 | > | 26 | > |
| 27 | <el-option label="全部" value="0" /> | 27 | <el-option label="全部" value="0"/> |
| 28 | <el-option label="未申请" value="1" /> | 28 | <el-option label="未申请" value="1"/> |
| 29 | <el-option label="申请中" value="2" /> | 29 | <el-option label="申请中" value="2"/> |
| 30 | <el-option label="已开票" value="3" /> | 30 | <el-option label="已开票" value="3"/> |
| 31 | </el-select> | 31 | </el-select> |
| 32 | </el-form-item> | 32 | </el-form-item> |
| 33 | </el-form> | 33 | </el-form> |
| 34 | <div v-show="list&&list.length>0" style="padding-left: 28px;color: red;font-size: 15px">温馨提示:发票申请成功后,将以电子发票的形式发送至您邮箱,请注意查收!</div> | 34 | <div v-show="list&&list.length>0" style="padding-left: 28px;color: red;font-size: 15px"> |
| 35 | 温馨提示:发票申请成功后,将以电子发票的形式发送至您邮箱,请注意查收! | ||
| 36 | </div> | ||
| 35 | </div> | 37 | </div> |
| 36 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> | 38 | <el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228"/> |
| 37 | <div v-if="activeName=='6'" class="pd20"> | 39 | <div v-if="activeName=='6'" class="pd20"> |
| 38 | <div v-for="b in list" class="item" v-loading="loading"> | 40 | <div v-for="b in list" v-loading="loading" class="item"> |
| 39 | <div class="title"> | 41 | <div class="title"> |
| 40 | <label class="orangeTag"> {{ language==0?'票务':'Ticket' }} </label> | 42 | <label class="orangeTag"> {{ language == 0 ? '票务' : 'Ticket' }} </label> |
| 41 | <span>{{b.orderSn}}</span> | 43 | <span>{{ b.orderSn }}</span> |
| 42 | <span class="fr text-warning status">{{b.invoiceStr}}</span> | 44 | <span class="fr text-warning status">{{ b.invoiceStr }}</span> |
| 43 | </div> | 45 | </div> |
| 44 | 46 | ||
| 45 | <el-row class="pd20 mt10" justify="space-between" align="middle"> | 47 | <el-row align="middle" class="pd20 mt10" justify="space-between"> |
| 46 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> | 48 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> |
| 47 | <h3 class="m0">{{ b.name }}</h3> | 49 | <h3 class="m0">{{ b.name }}</h3> |
| 48 | <p> {{ language==0? "时间": "Event Date & Time" }}:{{ | 50 | <p> {{ language == 0 ? "时间" : "Event Date & Time" }}:{{ |
| 49 | b.dateStr }}</p> | 51 | b.dateStr |
| 50 | <p class="common"> | 52 | }}</p> |
| 51 | {{ language==0?"张数":"Location"}}:{{ b.ticketNum}}{{ language==0? "张": "tickets" }} | 53 | <p class="common"> |
| 52 | </p> | 54 | {{ language == 0 ? "张数" : "Location" }}:{{ b.ticketNum }}{{ language == 0 ? "张" : "tickets" }} |
| 53 | </el-col> | 55 | </p> |
| 54 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> | 56 | </el-col> |
| 55 | <span class="text-warning"> {{ b.payType=='2'?'€':'¥' }} | 57 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> |
| 56 | <span class="bigMoney">{{b.payAmount}}</span> | 58 | <span class="text-warning"> {{ b.payType == '2' ? '€' : '¥' }} |
| 59 | <span class="bigMoney">{{ b.payAmount }}</span> | ||
| 57 | </span> | 60 | </span> |
| 58 | </el-col> | 61 | </el-col> |
| 59 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | 62 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> |
| 60 | <div class="text-right"> | 63 | <div class="text-right"> |
| 61 | <el-button type="primary" plain round v-if="b.isInvoice == '0'&&!b.invoiceId" @click.stop="gokp(b)"> | 64 | <el-button v-if="b.isInvoice == '0'&&!b.invoiceId" plain round type="primary" @click.stop="gokp(b)"> |
| 62 | {{ language == 0 ? '申请开票' : 'Invoice' }} | 65 | {{ language == 0 ? '申请开票' : 'Invoice' }} |
| 63 | </el-button> | 66 | </el-button> |
| 64 | <el-button type="primary" plain round v-if="b.isInvoice == '0'&&b.invoiceId" @click.stop="editkp(b)"> | 67 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> |
| 65 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | 68 | {{ language == 0 ? '重新申请' : 'Rebilling' }} |
| 66 | </el-button> | 69 | </el-button> |
| 67 | <el-button type="primary" plain round v-if="b.invoiceId" | 70 | <el-button v-if="b.invoiceId" plain round type="primary" |
| 68 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} | 71 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} |
| 69 | </el-button> | 72 | </el-button> |
| 70 | </div> | 73 | </div> |
| 71 | </el-col> | 74 | </el-col> |
| 72 | </el-row> | 75 | </el-row> |
| 73 | </div> | 76 | </div> |
| 74 | </div> | 77 | </div> |
| 75 | <div v-else-if="activeName=='5'" class="pd20"> | 78 | <div v-else-if="activeName=='5'" class="pd20"> |
| 76 | <div v-for="b in list" class="item" v-loading="loading"> | 79 | <div v-for="b in list" v-loading="loading" class="item"> |
| 77 | <div class="title"> | 80 | <div class="title"> |
| 78 | <label class="bg-lineg"> {{ language==0?'大赛报名':'REGISTRATION' }} </label> | 81 | <label class="bg-lineg"> {{ language == 0 ? '大赛报名' : 'REGISTRATION' }} </label> |
| 79 | <span>{{ language==0?'订单编号:':'No.' }} {{ b.id }}</span> | 82 | <span>{{ language == 0 ? '订单编号:' : 'No.' }} {{ b.id }}</span> |
| 80 | <span class="fr text-warning status">{{b.invoiceStr}}</span> | 83 | <span class="fr text-warning status">{{ b.invoiceStr }}</span> |
| 81 | </div> | 84 | </div> |
| 82 | <el-row class="pd20" justify="space-between" align="middle"> | 85 | <el-row align="middle" class="pd20" justify="space-between"> |
| 83 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> | 86 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> |
| 84 | <div> | 87 | <div> |
| 85 | <h4 class="m0">{{b.cptName}}</h4> | 88 | <h4 class="m0">{{ b.cptName }}</h4> |
| 86 | <p v-if="b.groupName">{{ language == 0 ?'团队名称':'Team name' }}:{{b.groupName}}</p> | 89 | <p v-if="b.groupName">{{ language == 0 ? '团队名称' : 'Team name' }}:{{ b.groupName }}</p> |
| 87 | <p v-if="b.payTime">{{ language == 0 ?'支付时间':'Pay time'}}:{{b.payTime}}</p> | 90 | <p v-if="b.payTime">{{ language == 0 ? '支付时间' : 'Pay time' }}:{{ b.payTime }}</p> |
| 88 | </div> | 91 | </div> |
| 89 | </el-col> | 92 | </el-col> |
| 90 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> | 93 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> |
| 91 | <span class="text-warning"> {{ b.payType!='2'?'¥':'€' }} | 94 | <span class="text-warning"> {{ b.payType != '2' ? '¥' : '€' }} |
| 92 | <span class="bigMoney">{{b.totalPayAmount||b.totalAmount}}</span> | 95 | <span class="bigMoney">{{ b.totalPayAmount || b.totalAmount }}</span> |
| 93 | </span> | 96 | </span> |
| 94 | </el-col> | 97 | </el-col> |
| 95 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | 98 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> |
| 96 | <div class="text-right"> | 99 | <div class="text-right"> |
| 97 | <el-button type="primary" plain round v-if="b.isInvoice == '0'&&!b.invoiceId" @click.stop="gokp(b)"> | 100 | <el-button v-if="b.isInvoice == '0'&&!b.invoiceId" plain round type="primary" @click.stop="gokp(b)"> |
| 98 | {{ language == 0 ? '申请开票' : 'Invoice' }} | 101 | {{ language == 0 ? '申请开票' : 'Invoice' }} |
| 99 | </el-button> | 102 | </el-button> |
| 100 | <el-button type="primary" plain round v-if="b.isInvoice == '0'&&b.invoiceId" @click.stop="editkp(b)"> | 103 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> |
| 101 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | 104 | {{ language == 0 ? '重新申请' : 'Rebilling' }} |
| 102 | </el-button> | 105 | </el-button> |
| 103 | <el-button type="primary" plain round v-if="b.invoiceId" | 106 | <el-button v-if="b.invoiceId" plain round type="primary" |
| 104 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} | 107 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} |
| 105 | </el-button> | 108 | </el-button> |
| 106 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.languageSource!='100'" plain round @click.stop="goSj(b)">--> | 109 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.languageSource!='100'" plain round @click.stop="goSj(b)">--> |
| 107 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> | 110 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> |
| 108 | <!-- </el-button>--> | 111 | <!-- </el-button>--> |
| 109 | <!-- <el-button type="primary" plain round v-if="b.invoiceId&&b.languageSource!='100'"--> | 112 | <!-- <el-button type="primary" plain round v-if="b.invoiceId&&b.languageSource!='100'"--> |
| 110 | <!-- @click.stop="showSJ(b)">{{ language == 0 ? '查看收据' : 'Detail' }}--> | 113 | <!-- @click.stop="showSJ(b)">{{ language == 0 ? '查看收据' : 'Detail' }}--> |
| 111 | <!-- </el-button>--> | 114 | <!-- </el-button>--> |
| 112 | </div> | 115 | </div> |
| 113 | </el-col> | 116 | </el-col> |
| 114 | </el-row> | 117 | </el-row> |
| 115 | </div> | 118 | </div> |
| 116 | </div> | 119 | </div> |
| 117 | <div class="pd20" v-else> | 120 | <div v-else class="pd20"> |
| 118 | <div v-for="b in list" class="item" v-loading="loading"> | 121 | <div v-for="b in list" v-loading="loading" class="item"> |
| 119 | <div class="title"> | 122 | <div class="title"> |
| 120 | <label class="blueTag" v-if="b.orderType == 0"> {{ language==0?'酒店':'HOTEL' }} </label> | 123 | <label v-if="b.orderType == 0" class="blueTag"> {{ language == 0 ? '酒店' : 'HOTEL' }} </label> |
| 121 | <label class="purpleTag" v-if="b.orderType == 1"> {{ language==0?'车辆':'TRANSPORTATION' }} </label> | 124 | <label v-if="b.orderType == 1" class="purpleTag"> {{ language == 0 ? '车辆' : 'TRANSPORTATION' }} </label> |
| 122 | <label class="orangeTag" v-if="b.orderType == 2"> {{ language==0?'餐饮':'DINING' }} </label> | 125 | <label v-if="b.orderType == 2" class="orangeTag"> {{ language == 0 ? '餐饮' : 'DINING' }} </label> |
| 123 | <label class="orangeTag" v-if="b.orderType == 3"> {{ language==0?'化妆':'MakeUp' }} </label> | 126 | <label v-if="b.orderType == 3" class="orangeTag"> {{ language == 0 ? '化妆' : 'MakeUp' }} </label> |
| 124 | <label class="orangeTag" v-if="b.orderType == 4"> {{ language==0?'拍摄':'Shooting ' }} </label> | 127 | <label v-if="b.orderType == 4" class="orangeTag"> {{ language == 0 ? '拍摄' : 'Shooting ' }} </label> |
| 125 | <span>{{ language==0?'订单编号:':'No.' }} {{ b.id }}</span> | 128 | <span>{{ language == 0 ? '订单编号:' : 'No.' }} {{ b.id }}</span> |
| 126 | <span class="fr text-warning status">{{b.invoiceStr}}</span> | 129 | <span class="fr text-warning status">{{ b.invoiceStr }}</span> |
| 127 | </div> | 130 | </div> |
| 128 | 131 | ||
| 129 | <el-row class="pd20 mt10" justify="space-between" align="middle"> | 132 | <el-row align="middle" class="pd20 mt10" justify="space-between"> |
| 130 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> | 133 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> |
| 131 | <div v-if="b.orderType == 0"> | 134 | <div v-if="b.orderType == 0"> |
| 132 | <h3 class="m0">{{b.name}}</h3> | 135 | <h3 class="m0">{{ b.name }}</h3> |
| 133 | <p>{{b.messageObj.roomName}}</p> | 136 | <p>{{ b.messageObj.roomName }}</p> |
| 134 | <p>{{b.messageObj.roomInfo}}</p> | 137 | <p>{{ b.messageObj.roomInfo }}</p> |
| 135 | <p>{{b.messageObj.roomType}}</p> | 138 | <p>{{ b.messageObj.roomType }}</p> |
| 136 | <p>{{b.messageObj.roomStayDate}}</p> | 139 | <p>{{ b.messageObj.roomStayDate }}</p> |
| 137 | </div> | 140 | </div> |
| 138 | <div v-if="b.orderType == 1"> | 141 | <div v-if="b.orderType == 1"> |
| 139 | <h3 class="m0">{{b.name}}</h3> | 142 | <h3 class="m0">{{ b.name }}</h3> |
| 140 | <div v-for="(car,index) in b.messageObj.carsList" :key="index"> | 143 | <div v-for="(car,index) in b.messageObj.carsList" :key="index"> |
| 141 | <p v-if="car.num>0">{{car.name}}:{{car.num}} 辆</p> | 144 | <p v-if="car.num>0">{{ car.name }}:{{ car.num }} 辆</p> |
| 142 | </div> | 145 | </div> |
| 143 | </div> | 146 | </div> |
| 144 | <div v-if="b.orderType == 2"> | 147 | <div v-if="b.orderType == 2"> |
| 145 | <h3 class="m0">{{b.name}}</h3> | 148 | <h3 class="m0">{{ b.name }}</h3> |
| 146 | <div v-for="(n,index) in b.messageObj.foodsList" :key="index"> | 149 | <div v-for="(n,index) in b.messageObj.foodsList" :key="index"> |
| 147 | <p v-if="n.num > 0"> | 150 | <p v-if="n.num > 0"> |
| 148 | {{n.name}}({{n.categoryName}}) <text>{{n.num}} 份</text> | 151 | {{ n.name }}({{ n.categoryName }}) |
| 152 | <text>{{ n.num }} 份</text> | ||
| 149 | </p> | 153 | </p> |
| 150 | </div> | 154 | </div> |
| 151 | </div> | 155 | </div> |
| 152 | <div v-if="b.orderType == 3 || b.orderType == 4"> | 156 | <div v-if="b.orderType == 3 || b.orderType == 4"> |
| 153 | <h3 class="m0">{{b.name}}</h3> | 157 | <h3 class="m0">{{ b.name }}</h3> |
| 154 | <p> | 158 | <p> |
| 155 | {{language==0?'套餐名称:':''}}{{b.messageObj.packageName}} | 159 | {{ language == 0 ? '套餐名称:' : '' }}{{ b.messageObj.packageName }} |
| 156 | </p> | 160 | </p> |
| 157 | <p> | 161 | <p> |
| 158 | {{language==0?'预约时间:':''}}{{b.deliveryTime.slice(0,10)}} {{b.messageObj.timePeriod}} | 162 | {{ language == 0 ? '预约时间:' : '' }}{{ b.deliveryTime.slice(0, 10) }} {{ b.messageObj.timePeriod }} |
| 159 | </p> | 163 | </p> |
| 160 | </div> | 164 | </div> |
| 161 | </el-col> | 165 | </el-col> |
| 162 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> | 166 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> |
| 163 | <span class="text-warning"> {{ b.paymentType==3?'€':'¥' }} | 167 | <span class="text-warning"> {{ b.paymentType == 3 ? '€' : '¥' }} |
| 164 | <span class="bigMoney">{{b.totalStr}}</span> | 168 | <span class="bigMoney">{{ b.totalStr }}</span> |
| 165 | </span> | 169 | </span> |
| 166 | </el-col> | 170 | </el-col> |
| 167 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | 171 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> |
| 168 | <div class="text-right"> | 172 | <div class="text-right"> |
| 169 | <el-button type="primary" plain round v-if="b.isInvoice == '0'&&!b.invoiceId" @click.stop="gokp(b)"> | 173 | <el-button v-if="b.isInvoice == '0'&&!b.invoiceId" plain round type="primary" @click.stop="gokp(b)"> |
| 170 | {{ language == 0 ? '申请开票' : 'Invoice' }} | 174 | {{ language == 0 ? '申请开票' : 'Invoice' }} |
| 171 | </el-button> | 175 | </el-button> |
| 172 | <el-button type="primary" plain round v-if="b.isInvoice == '0'&&b.invoiceId" @click.stop="editkp(b)"> | 176 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> |
| 173 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | 177 | {{ language == 0 ? '重新申请' : 'Rebilling' }} |
| 174 | </el-button> | 178 | </el-button> |
| 175 | <el-button type="primary" plain round v-if="b.invoiceId" | 179 | <el-button v-if="b.invoiceId" plain round type="primary" |
| 176 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} | 180 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} |
| 177 | </el-button> | 181 | </el-button> |
| 178 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.paymentType=='3'" plain round @click.stop="goSj(b)">--> | 182 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.paymentType=='3'" plain round @click.stop="goSj(b)">--> |
| 179 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> | 183 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> |
| 180 | <!-- </el-button>--> | 184 | <!-- </el-button>--> |
| 181 | <!-- <el-button type="primary" plain round v-if="b.invoiceId&&b.paymentType=='3'"--> | 185 | <!-- <el-button type="primary" plain round v-if="b.invoiceId&&b.paymentType=='3'"--> |
| 182 | <!-- @click.stop="showSJ(b)">{{ language == 0 ? '查看收据' : 'Detail' }}--> | 186 | <!-- @click.stop="showSJ(b)">{{ language == 0 ? '查看收据' : 'Detail' }}--> |
| 183 | <!-- </el-button>--> | 187 | <!-- </el-button>--> |
| 184 | </div> | 188 | </div> |
| 185 | </el-col> | 189 | </el-col> |
| 186 | </el-row> | 190 | </el-row> |
| ... | @@ -188,21 +192,22 @@ | ... | @@ -188,21 +192,22 @@ |
| 188 | </div> | 192 | </div> |
| 189 | </el-card> | 193 | </el-card> |
| 190 | 194 | ||
| 191 | <el-dialog :title="language==0?'开收据':'Issue a receipt'" v-model="showSJDialog" width="460px" :close-on-click-modal="false" :close-on-press-escape="false"> | 195 | <el-dialog v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false" |
| 196 | :title="language==0?'开收据':'Issue a receipt'" width="460px"> | ||
| 192 | <div class="flex"> | 197 | <div class="flex"> |
| 193 | <el-form-item :label="language==0?'开票人':'Name'"> | 198 | <el-form-item :label="language==0?'开票人':'Name'"> |
| 194 | <div class="flex"> | 199 | <div class="flex"> |
| 195 | <el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'"></el-input> | 200 | <el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'"></el-input> |
| 196 | <el-button type="primary" @click="submitSJ">{{ language==0?'提交并预览':'Submit' }}</el-button> | 201 | <el-button type="primary" @click="submitSJ">{{ language == 0 ? '提交并预览' : 'Submit' }}</el-button> |
| 197 | </div> | 202 | </div> |
| 198 | </el-form-item> | 203 | </el-form-item> |
| 199 | </div> | 204 | </div> |
| 200 | <div class="tip mt20"> | 205 | <div class="tip mt20"> |
| 201 | <label>{{ language==0?'开电子收据须知':'Receipt notice' }}:</label> | 206 | <label>{{ language == 0 ? '开电子收据须知' : 'Receipt notice' }}:</label> |
| 202 | <div class="pd10"> | 207 | <div class="pd10"> |
| 203 | {{remark}} | 208 | {{ remark }} |
| 204 | </div> | ||
| 205 | </div> | 209 | </div> |
| 210 | </div> | ||
| 206 | 211 | ||
| 207 | </el-dialog> | 212 | </el-dialog> |
| 208 | </div> | 213 | </div> |
| ... | @@ -222,52 +227,66 @@ import { | ... | @@ -222,52 +227,66 @@ import { |
| 222 | import {getCurrentInstance, onMounted, ref} from "vue"; | 227 | import {getCurrentInstance, onMounted, ref} from "vue"; |
| 223 | import {ElMessage, ElMessageBox} from "element-plus"; | 228 | import {ElMessage, ElMessageBox} from "element-plus"; |
| 224 | import {md5} from "md5js"; | 229 | import {md5} from "md5js"; |
| 225 | import {loginFree,getCanInvoiceTicket} from "@/viewsPc/seat/api"; | 230 | import {loginFree, getCanInvoiceTicket} from "@/viewsPc/seat/api"; |
| 226 | import {setToken} from "@/viewsPc/seat/utils/local-store"; | 231 | import {setToken} from "@/viewsPc/seat/utils/local-store"; |
| 232 | |||
| 227 | const router = useRouter() | 233 | const router = useRouter() |
| 228 | const route = useRoute() | 234 | const route = useRoute() |
| 229 | const language= useStorage('language',0) | 235 | const language = useStorage('language', 0) |
| 230 | const lpName = ref('') | 236 | const lpName = ref('') |
| 231 | const remark = ref('') | 237 | const remark = ref('') |
| 232 | const showSJDialog = ref(false) | 238 | const showSJDialog = ref(false) |
| 233 | const userStore = useUserStore(); | 239 | const userStore = useUserStore(); |
| 234 | const user = useUserStore().user || {} | 240 | const user = useUserStore().user || {} |
| 235 | const activeName = ref(userStore.activeName||'5') | 241 | const activeName = ref(userStore.activeName || '5') |
| 236 | 242 | ||
| 237 | const query = ref({ | 243 | const query = ref({ |
| 238 | createById: user.userId, | 244 | createById: user.userId, |
| 239 | orderType:'5', | 245 | orderType: '5', |
| 240 | invoiced:'0', | 246 | invoiced: '0', |
| 241 | pageNo:1, | 247 | pageNo: 1, |
| 242 | pageSize:999 | 248 | pageSize: 999 |
| 243 | }) | 249 | }) |
| 244 | const {proxy} = getCurrentInstance() | 250 | const {proxy} = getCurrentInstance() |
| 245 | const list = ref([]) | 251 | const list = ref([]) |
| 246 | const loading = ref(false) | 252 | const loading = ref(false) |
| 247 | onMounted(() => { | 253 | onMounted(() => { |
| 248 | if(!user.utype){ | 254 | if (!user.utype) { |
| 249 | router.push({name: 'home'}) | 255 | router.push({name: 'home'}) |
| 250 | return | 256 | return |
| 251 | } | 257 | } |
| 252 | if(language.value==1){ | 258 | if (language.value == 1) { |
| 253 | router.push({name: 'myInfo'}) | 259 | router.push({name: 'myInfo'}) |
| 254 | return | 260 | return |
| 255 | } | 261 | } |
| 256 | query.value.orderType= activeName.value=userStore.activeName||'5' | 262 | query.value.orderType = activeName.value = userStore.activeName || '5' |
| 257 | getList() | 263 | getList() |
| 258 | route.query.orderSn&&getDataInfo() | 264 | route.query.orderSn && getDataInfo() |
| 259 | }) | 265 | }) |
| 260 | const getList = () => { | 266 | const getList = () => { |
| 261 | loading.value = true | 267 | loading.value = true |
| 262 | if(query.value.orderType=='5'){ | 268 | if (query.value.orderType == '5') { |
| 263 | getCanInvoiceBm(query.value).then(res=>{ | 269 | getCanInvoiceBm(query.value).then(res => { |
| 264 | list.value = res.rows | 270 | list.value = res.rows |
| 265 | loading.value = false | 271 | loading.value = false |
| 266 | }) | 272 | }) |
| 267 | }else if(query.value.orderType=='6'){ | 273 | } else if (query.value.orderType == '6') { |
| 268 | login() | 274 | // login() |
| 269 | }else { | 275 | getCanInvoiceBills({ |
| 270 | getCanInvoiceBills(query.value).then(res=>{ | 276 | createById: user.userId, |
| 277 | orderType: '5', | ||
| 278 | invoiced: '0', | ||
| 279 | pageNo: 1, | ||
| 280 | pageSize: 999 | ||
| 281 | }).then(res => { | ||
| 282 | list.value = res.rows | ||
| 283 | for (let b of list.value) { | ||
| 284 | b.messageObj = JSON.parse(b.message) | ||
| 285 | } | ||
| 286 | loading.value = false | ||
| 287 | }) | ||
| 288 | } else { | ||
| 289 | getCanInvoiceBills(query.value).then(res => { | ||
| 271 | list.value = res.rows | 290 | list.value = res.rows |
| 272 | for (let b of list.value) { | 291 | for (let b of list.value) { |
| 273 | b.messageObj = JSON.parse(b.message) | 292 | b.messageObj = JSON.parse(b.message) |
| ... | @@ -286,7 +305,7 @@ const login = async () => { | ... | @@ -286,7 +305,7 @@ const login = async () => { |
| 286 | sign, | 305 | sign, |
| 287 | }).then((res) => { | 306 | }).then((res) => { |
| 288 | setToken(res.data.token); | 307 | setToken(res.data.token); |
| 289 | getCanInvoiceTicket(query.value).then(res=>{ | 308 | getCanInvoiceTicket(query.value).then(res => { |
| 290 | loading.value = false | 309 | loading.value = false |
| 291 | list.value = res.data.lists | 310 | list.value = res.data.lists |
| 292 | }) | 311 | }) |
| ... | @@ -297,7 +316,7 @@ const handleClick = (e) => { | ... | @@ -297,7 +316,7 @@ const handleClick = (e) => { |
| 297 | console.log(e.paneName) | 316 | console.log(e.paneName) |
| 298 | query.value.orderType = e.paneName | 317 | query.value.orderType = e.paneName |
| 299 | list.value = [] | 318 | list.value = [] |
| 300 | query.value.invoiced='0' | 319 | query.value.invoiced = '0' |
| 301 | userStore.updataActiveName(e.paneName) | 320 | userStore.updataActiveName(e.paneName) |
| 302 | getList() | 321 | getList() |
| 303 | 322 | ||
| ... | @@ -307,35 +326,35 @@ const gokp = (item) => { | ... | @@ -307,35 +326,35 @@ const gokp = (item) => { |
| 307 | path: '/booking/addInvoice', | 326 | path: '/booking/addInvoice', |
| 308 | query: { | 327 | query: { |
| 309 | orders: encodeURIComponent(JSON.stringify(item)), | 328 | orders: encodeURIComponent(JSON.stringify(item)), |
| 310 | totalMoney:item.totalStr||item.totalPayAmount||item.payAmount||item.totalAmount, | 329 | totalMoney: item.totalStr || item.totalPayAmount || item.payAmount || item.totalAmount, |
| 311 | paymentType:query.value.orderType==6||query.value.orderType==5?item.payType:item.paymentType, | 330 | paymentType: query.value.orderType == 6 || query.value.orderType == 5 ? item.payType : item.paymentType, |
| 312 | orderType:query.value.orderType, | 331 | orderType: query.value.orderType, |
| 313 | orderSn:query.value.orderType==6?item.orderSn:null | 332 | orderSn: query.value.orderType == 6 ? item.orderSn : null |
| 314 | } | 333 | } |
| 315 | }) | 334 | }) |
| 316 | } | 335 | } |
| 317 | const editkp = (item) => { | 336 | const editkp = (item) => { |
| 318 | router.push({ | 337 | router.push({ |
| 319 | name:'addInvoice', | 338 | name: 'addInvoice', |
| 320 | query:{ | 339 | query: { |
| 321 | invoiceId:query.value.orderType==6?item.invoiceIdStr :item.invoiceId, | 340 | invoiceId: query.value.orderType == 6 ? item.invoiceIdStr : item.invoiceId, |
| 322 | type:activeName.value, | 341 | type: activeName.value, |
| 323 | isEdit:true, | 342 | isEdit: true, |
| 324 | orderType:query.value.orderType, | 343 | orderType: query.value.orderType, |
| 325 | paymentType:query.value.orderType==6||query.value.orderType==5?item.payType:item.paymentType, | 344 | paymentType: query.value.orderType == 6 || query.value.orderType == 5 ? item.payType : item.paymentType, |
| 326 | orderSn:query.value.orderType==6?item.orderSn:null | 345 | orderSn: query.value.orderType == 6 ? item.orderSn : null |
| 327 | } | 346 | } |
| 328 | }) | 347 | }) |
| 329 | } | 348 | } |
| 330 | const showDetail = (item) => { | 349 | const showDetail = (item) => { |
| 331 | router.push({ | 350 | router.push({ |
| 332 | name:'invoiceDetail', | 351 | name: 'invoiceDetail', |
| 333 | query:{ | 352 | query: { |
| 334 | invoiceId:query.value.orderType==6?item.invoiceIdStr :item.invoiceId, | 353 | invoiceId: query.value.orderType == 6 ? item.invoiceIdStr : item.invoiceId, |
| 335 | type:activeName.value, | 354 | type: activeName.value, |
| 336 | orderType:query.value.orderType, | 355 | orderType: query.value.orderType, |
| 337 | paymentType:query.value.orderType==6||query.value.orderType==5?item.payType:item.paymentType, | 356 | paymentType: query.value.orderType == 6 || query.value.orderType == 5 ? item.payType : item.paymentType, |
| 338 | orderSn:query.value.orderType==6?item.orderSn:null | 357 | orderSn: query.value.orderType == 6 ? item.orderSn : null |
| 339 | } | 358 | } |
| 340 | }) | 359 | }) |
| 341 | } | 360 | } |
| ... | @@ -346,20 +365,22 @@ const goSj = (item) => { | ... | @@ -346,20 +365,22 @@ const goSj = (item) => { |
| 346 | showSJDialog.value = true | 365 | showSJDialog.value = true |
| 347 | nowSj = item | 366 | nowSj = item |
| 348 | } | 367 | } |
| 368 | |||
| 349 | function getremark(item) { | 369 | function getremark(item) { |
| 350 | getBaseInfoByActiveId(item.cptId).then(res=>{ | 370 | getBaseInfoByActiveId(item.cptId).then(res => { |
| 351 | if(res.data){ | 371 | if (res.data) { |
| 352 | remark.value = res.data.remarks | 372 | remark.value = res.data.remarks |
| 353 | } | 373 | } |
| 354 | }) | 374 | }) |
| 355 | } | 375 | } |
| 376 | |||
| 356 | const showSJ = (item) => { | 377 | const showSJ = (item) => { |
| 357 | // 查看电子收据预览信息 | 378 | // 查看电子收据预览信息 |
| 358 | var obj = { | 379 | var obj = { |
| 359 | orderId:item.id, | 380 | orderId: item.id, |
| 360 | type: 1 | 381 | type: 1 |
| 361 | } | 382 | } |
| 362 | if(nowSj.orderType){ | 383 | if (nowSj.orderType) { |
| 363 | //预约 | 384 | //预约 |
| 364 | proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, { | 385 | proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, { |
| 365 | ...obj | 386 | ...obj |
| ... | @@ -384,12 +405,12 @@ const submitSJ = () => { | ... | @@ -384,12 +405,12 @@ const submitSJ = () => { |
| 384 | } | 405 | } |
| 385 | 406 | ||
| 386 | const downloadAndSend = () => { | 407 | const downloadAndSend = () => { |
| 387 | if(nowSj.orderType){ | 408 | if (nowSj.orderType) { |
| 388 | ppOtaReceipt({ | 409 | ppOtaReceipt({ |
| 389 | orderId:nowSj.id, | 410 | orderId: nowSj.id, |
| 390 | receiptInfo:lpName.value, | 411 | receiptInfo: lpName.value, |
| 391 | type: 2 | 412 | type: 2 |
| 392 | }).then(res=>{ | 413 | }).then(res => { |
| 393 | loading.value = false | 414 | loading.value = false |
| 394 | ElMessageBox.confirm(language.value == 0 ? `已发送至您的邮箱 ${user.userName},请注意查收` : `A receipt has been sent to your email ${user.userName}, please check it`, { | 415 | ElMessageBox.confirm(language.value == 0 ? `已发送至您的邮箱 ${user.userName},请注意查收` : `A receipt has been sent to your email ${user.userName}, please check it`, { |
| 395 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | 416 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', |
| ... | @@ -399,18 +420,18 @@ const downloadAndSend = () => { | ... | @@ -399,18 +420,18 @@ const downloadAndSend = () => { |
| 399 | showSJDialog.value = false | 420 | showSJDialog.value = false |
| 400 | showSJ(nowSj) | 421 | showSJ(nowSj) |
| 401 | }) | 422 | }) |
| 402 | }).catch(err=>{ | 423 | }).catch(err => { |
| 403 | loading.value = false | 424 | loading.value = false |
| 404 | if(!err){ | 425 | if (!err) { |
| 405 | ElMessage.warning(language.value==0?'出错了,请稍后重试':'Error, please try again later') | 426 | ElMessage.warning(language.value == 0 ? '出错了,请稍后重试' : 'Error, please try again later') |
| 406 | } | 427 | } |
| 407 | }) | 428 | }) |
| 408 | } else { | 429 | } else { |
| 409 | getReceipt({ | 430 | getReceipt({ |
| 410 | orderId:nowSj.id, | 431 | orderId: nowSj.id, |
| 411 | lpName:lpName.value, | 432 | lpName: lpName.value, |
| 412 | type: 1 | 433 | type: 1 |
| 413 | }).then(res=>{ | 434 | }).then(res => { |
| 414 | loading.value = false | 435 | loading.value = false |
| 415 | ElMessageBox.confirm(language.value == 0 ? `已发送至您的邮箱 ${user.userName},请注意查收` : `A receipt has been sent to your email ${user.userName}, please check it`, { | 436 | ElMessageBox.confirm(language.value == 0 ? `已发送至您的邮箱 ${user.userName},请注意查收` : `A receipt has been sent to your email ${user.userName}, please check it`, { |
| 416 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | 437 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', |
| ... | @@ -420,7 +441,7 @@ const downloadAndSend = () => { | ... | @@ -420,7 +441,7 @@ const downloadAndSend = () => { |
| 420 | showSJDialog.value = false | 441 | showSJDialog.value = false |
| 421 | showSJ(nowSj) | 442 | showSJ(nowSj) |
| 422 | }) | 443 | }) |
| 423 | }).catch(err=>{ | 444 | }).catch(err => { |
| 424 | loading.value = false | 445 | loading.value = false |
| 425 | }) | 446 | }) |
| 426 | } | 447 | } |
| ... | @@ -428,50 +449,127 @@ const downloadAndSend = () => { | ... | @@ -428,50 +449,127 @@ const downloadAndSend = () => { |
| 428 | 449 | ||
| 429 | </script> | 450 | </script> |
| 430 | 451 | ||
| 431 | <style scoped lang="scss"> | 452 | <style lang="scss" scoped> |
| 432 | .indexTitle { | 453 | .indexTitle { |
| 433 | margin: 20px 0 12px; overflow: visible; | 454 | margin: 20px 0 12px; |
| 455 | overflow: visible; | ||
| 434 | padding: 0 20px 15px; | 456 | padding: 0 20px 15px; |
| 435 | border-bottom: 1px solid #e5e5e5; | 457 | border-bottom: 1px solid #e5e5e5; |
| 436 | .fr{margin: -8px 0 0} | 458 | |
| 437 | h3 {display: inline-block; | 459 | .fr { |
| 460 | margin: -8px 0 0 | ||
| 461 | } | ||
| 462 | |||
| 463 | h3 { | ||
| 464 | display: inline-block; | ||
| 438 | font-size: 16px; | 465 | font-size: 16px; |
| 439 | color: var(--el-color-primary); | 466 | color: var(--el-color-primary); |
| 440 | } | 467 | } |
| 441 | } | 468 | } |
| 442 | .bigMoney{font-size: 24px;font-family: "DIN Alternate";} | 469 | |
| 443 | .name{font-size: 18px;margin: 0;} | 470 | .bigMoney { |
| 444 | .status-po{position: absolute;right: 0;top: 0;font-size: 12px; | 471 | font-size: 24px; |
| 472 | font-family: "DIN Alternate"; | ||
| 473 | } | ||
| 474 | |||
| 475 | .name { | ||
| 476 | font-size: 18px; | ||
| 477 | margin: 0; | ||
| 478 | } | ||
| 479 | |||
| 480 | .status-po { | ||
| 481 | position: absolute; | ||
| 482 | right: 0; | ||
| 483 | top: 0; | ||
| 484 | font-size: 12px; | ||
| 445 | color: #FFFFFF; | 485 | color: #FFFFFF; |
| 446 | span{border-radius: 0px 10px 0px 10px;padding: 4px 10px;} | 486 | |
| 447 | .bg-danger{background: #E60012;} | 487 | span { |
| 448 | .bg-warning{background: #e89f39;} | 488 | border-radius: 0px 10px 0px 10px; |
| 449 | .bg-pink{background: #F740A6;} | 489 | padding: 4px 10px; |
| 450 | .bg-primary{background: var(--el-color-primary)} | 490 | } |
| 451 | .bg-blue{background: #00a0e9} | 491 | |
| 492 | .bg-danger { | ||
| 493 | background: #E60012; | ||
| 494 | } | ||
| 495 | |||
| 496 | .bg-warning { | ||
| 497 | background: #e89f39; | ||
| 498 | } | ||
| 499 | |||
| 500 | .bg-pink { | ||
| 501 | background: #F740A6; | ||
| 502 | } | ||
| 503 | |||
| 504 | .bg-primary { | ||
| 505 | background: var(--el-color-primary) | ||
| 506 | } | ||
| 507 | |||
| 508 | .bg-blue { | ||
| 509 | background: #00a0e9 | ||
| 510 | } | ||
| 452 | } | 511 | } |
| 453 | .item{ | ||
| 454 | .name{font-size: 18px; | ||
| 455 | color: #000000;margin: 0 0 10px;} | ||
| 456 | p{margin: 8px 0 0;color: #707070;font-size: 14px;} | ||
| 457 | 512 | ||
| 458 | margin: 0 0 20px;border: 1px solid #E5E5E5; | 513 | .item { |
| 514 | .name { | ||
| 515 | font-size: 18px; | ||
| 516 | color: #000000; | ||
| 517 | margin: 0 0 10px; | ||
| 518 | } | ||
| 519 | |||
| 520 | p { | ||
| 521 | margin: 8px 0 0; | ||
| 522 | color: #707070; | ||
| 523 | font-size: 14px; | ||
| 524 | } | ||
| 525 | |||
| 526 | margin: 0 0 20px; | ||
| 527 | border: 1px solid #E5E5E5; | ||
| 459 | border-radius: 10px; | 528 | border-radius: 10px; |
| 460 | position: relative; | 529 | position: relative; |
| 461 | .bbody{padding: 0 15px 20px;} | 530 | |
| 462 | .title{background: #F7F7F7;border-bottom: 1px solid #E5E5E5; | 531 | .bbody { |
| 463 | span{font-size: 14px;color: #4C5359;} | 532 | padding: 0 15px 20px; |
| 464 | .status{font-size: 12px;font-weight: bold;padding: 2px 10px;} | ||
| 465 | } | 533 | } |
| 466 | .title label{border-radius: 5px 0 5px 0; font-size: 12px; color: #fff; padding:4px 10px;margin-right: 10px;} | 534 | |
| 467 | .blueTag{ | 535 | .title { |
| 468 | background-color: #1EC886;} | 536 | background: #F7F7F7; |
| 537 | border-bottom: 1px solid #E5E5E5; | ||
| 538 | |||
| 539 | span { | ||
| 540 | font-size: 14px; | ||
| 541 | color: #4C5359; | ||
| 542 | } | ||
| 543 | |||
| 544 | .status { | ||
| 545 | font-size: 12px; | ||
| 546 | font-weight: bold; | ||
| 547 | padding: 2px 10px; | ||
| 548 | } | ||
| 549 | } | ||
| 550 | |||
| 551 | .title label { | ||
| 552 | border-radius: 5px 0 5px 0; | ||
| 553 | font-size: 12px; | ||
| 554 | color: #fff; | ||
| 555 | padding: 4px 10px; | ||
| 556 | margin-right: 10px; | ||
| 557 | } | ||
| 558 | |||
| 559 | .blueTag { | ||
| 560 | background-color: #1EC886; | ||
| 561 | } | ||
| 562 | |||
| 469 | .purpleTag { | 563 | .purpleTag { |
| 470 | background-color: #717bef; | 564 | background-color: #717bef; |
| 471 | } | 565 | } |
| 566 | |||
| 472 | .orangeTag { | 567 | .orangeTag { |
| 473 | background-color: #ff8124; | 568 | background-color: #ff8124; |
| 474 | } | 569 | } |
| 475 | } | 570 | } |
| 476 | :deep(.el-tabs__item){text-transform: uppercase} | 571 | |
| 572 | :deep(.el-tabs__item) { | ||
| 573 | text-transform: uppercase | ||
| 574 | } | ||
| 477 | </style> | 575 | </style> | ... | ... |
| 1 | import { defineConfig, loadEnv } from 'vite' | 1 | import {defineConfig, loadEnv} from 'vite' |
| 2 | import path, { resolve } from 'path' | 2 | import path, {resolve} from 'path' |
| 3 | import createVitePlugins from './vite/plugins' | 3 | import createVitePlugins from './vite/plugins' |
| 4 | import inject from '@rollup/plugin-inject' | 4 | import inject from '@rollup/plugin-inject' |
| 5 | import commonjs from '@rollup/plugin-commonjs' | 5 | import commonjs from '@rollup/plugin-commonjs' |
| 6 | // import legacy from '@vitejs/plugin-legacy' | 6 | // import legacy from '@vitejs/plugin-legacy' |
| 7 | 7 | ||
| 8 | // https://vitejs.dev/config/ | 8 | // https://vitejs.dev/config/ |
| 9 | export default defineConfig(({ mode, command }) => { | 9 | export default defineConfig(({mode, command}) => { |
| 10 | const env = loadEnv(mode, process.cwd()) | 10 | const env = loadEnv(mode, process.cwd()) |
| 11 | return { | 11 | return { |
| 12 | // 部署生产环境和开发环境下的URL。 | 12 | // 部署生产环境和开发环境下的URL。 |
| ... | @@ -70,30 +70,30 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -70,30 +70,30 @@ export default defineConfig(({ mode, command }) => { |
| 70 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-train/, '') | 70 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-train/, '') |
| 71 | }, | 71 | }, |
| 72 | '/dev-api/ztx-match': { | 72 | '/dev-api/ztx-match': { |
| 73 | // target: 'http://192.168.1.118:8083', | 73 | target: 'http://192.168.1.118:8083', |
| 74 | target: 'https://jijin.wtwuxicenter.com/stage-api', | 74 | // target: 'https://jijin.wtwuxicenter.com/stage-api', |
| 75 | changeOrigin: true, | 75 | changeOrigin: true, |
| 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') | 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') |
| 77 | }, | 77 | }, |
| 78 | '/dev-api/ztx-webSite': { | 78 | '/dev-api/ztx-webSite': { |
| 79 | target: 'https://wdsfwuxicenter.com/stage-api/', | 79 | // target: 'https://dance.itechtop.cn/stage-api', |
| 80 | target: 'http://192.168.1.118:8081/', | ||
| 80 | changeOrigin: true, | 81 | changeOrigin: true, |
| 81 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 82 | }, | 83 | }, |
| 83 | '/dev-api': { | 84 | '/dev-api': { |
| 84 | // target: 'http://192.168.1.118:8081/', | 85 | target: 'http://192.168.1.118:8081/', |
| 85 | // target: 'http://192.168.1.131:8081/', | 86 | // target: 'http://192.168.1.131:8081/', |
| 86 | target: 'https://jijin.wtwuxicenter.com/stage-api', | 87 | // target: 'https://jijin.wtwuxicenter.com/stage-api', |
| 87 | // target: 'http://124.70.181.90:1880/stage-api', | ||
| 88 | // target: 'https://wdsfwuxicenter.com/stage-api/', | 88 | // target: 'https://wdsfwuxicenter.com/stage-api/', |
| 89 | changeOrigin: true, | 89 | changeOrigin: true, |
| 90 | rewrite: (p) => p.replace(/^\/dev-api/, '') | 90 | rewrite: (p) => p.replace(/^\/dev-api/, '') |
| 91 | }, | 91 | }, |
| 92 | '/ticket': { | 92 | '/ticket': { |
| 93 | // target: 'http://192.168.1.131:8098/', | 93 | target: 'http://192.168.1.118:8098/', |
| 94 | // target: 'http://192.168.1.131:8081/', | 94 | // target: 'http://192.168.1.131:8081/', |
| 95 | // target: 'http://124.70.181.90:1880/h5/', | 95 | // target: 'https://jijin.wtwuxicenter.com/ticket', |
| 96 | target: 'https://ticketh5.wdsfwuxicenter.com/h5/', | 96 | // target: 'https://ticketh5.wdsfwuxicenter.com/ticket', |
| 97 | changeOrigin: true, | 97 | changeOrigin: true, |
| 98 | rewrite: (p) => p.replace(/^\/ticket/, '') | 98 | rewrite: (p) => p.replace(/^\/ticket/, '') |
| 99 | } | 99 | } | ... | ... |
-
Please register or sign in to post a comment