e834e848 by zhangmeng

开票

1 parent 4c4040a4
...@@ -287,36 +287,50 @@ async function paymentHandle() { ...@@ -287,36 +287,50 @@ async function paymentHandle() {
287 cancelButtonText: language.value == 0 ? '取消' : 'Cancel', 287 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
288 type: 'warning' 288 type: 'warning'
289 }).then(async () => { 289 }).then(async () => {
290 const res = await submitOrderTicket({ 290 try {
291 ...orderForm.value, 291 const res = await submitOrderTicket({
292 message: JSON.stringify(orderForm.value.message), 292 activeId: orderForm.value.activeId,
293 total: language.value == 0 ? price.value.total_cn : price.value.total_en 293 acId: orderForm.value.acId,
294 }) 294 attId: orderForm.value.attId,
295 if (res.code == 200 && res.data.orderId > 0) { 295 tickType: orderForm.value.tickType,
296 // 去付钱 296 ticketDate: orderForm.value.ticketDate,
297 router.push({ 297 phone: orderForm.value.phone,
298 name: 'bookingPay', 298 customerList: orderForm.value.customerList,
299 query: { 299 num: orderForm.value.num,
300 orderId: res.data.orderId, 300 message: JSON.stringify(orderForm.value.message),
301 money: res.data.total, 301 total: language.value == 0 ? price.value.total_cn : price.value.total_en
302 type: 'ticket'
303 }
304 })
305 } else if (res.code == 200 && res.data.orderId == -400) {
306 ElMessageBox.confirm(language.value == 0 ? '剩余票数不足,请选择其他日期' : 'There are not enough votes left. Please select another date', {
307 confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
308 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
309 type: 'warning'
310 })
311 } else if (res.code == 200 && res.data.orderId == -500) {
312 ElMessageBox.confirm(language.value == 0 ? '每人每天限购一张票,请确认后下单' : 'One ticket per person per day, please confirm and place your order', {
313 confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
314 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
315 type: 'warning'
316 }) 302 })
317 } else { 303 if (res.code == 200 && res.data.orderId > 0) {
304 // 去付钱
305 router.push({
306 name: 'bookingPay',
307 query: {
308 orderId: res.data.orderId,
309 money: res.data.total,
310 type: 'ticket'
311 }
312 })
313 } else if (res.code == 200 && res.data.orderId == -400) {
314 ElMessageBox.confirm(language.value == 0 ? '剩余票数不足,请选择其他日期' : 'There are not enough votes left. Please select another date', {
315 confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
316 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
317 type: 'warning'
318 })
319 } else if (res.code == 200 && res.data.orderId == -500) {
320 ElMessageBox.confirm(language.value == 0 ? '每人每天限购一张票,请确认后下单' : 'One ticket per person per day, please confirm and place your order', {
321 confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
322 cancelButtonText: language.value == 0 ? '取消' : 'Cancel',
323 type: 'warning'
324 })
325 } else {
326 ElMessage.error(language.value == 0 ? '下单失败,' : 'Order failure')
327 }
328 } catch (e) {
329 console.log(e)
330 } finally {
318 ElMessage.error(language.value == 0 ? '下单失败,' : 'Order failure') 331 ElMessage.error(language.value == 0 ? '下单失败,' : 'Order failure')
319 } 332 }
333
320 }) 334 })
321 } 335 }
322 336
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!