|
@@ -3,61 +3,70 @@
|
|
|
<el-dialog
|
|
|
title="订单改签"
|
|
|
:visible.sync="rebookDialog"
|
|
|
- width="900"
|
|
|
+ width="95%"
|
|
|
append-to-body
|
|
|
- class="rebook-dialog"
|
|
|
+ class="rebook1_dialog"
|
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
|
:modal="false"
|
|
|
:before-close="handleClose"
|
|
|
+ center
|
|
|
>
|
|
|
- <div class="rebook-box" v-loading="loading">
|
|
|
- <div class="rebook-from">
|
|
|
- <div class="tip-box">
|
|
|
- <p>温馨提示:每张票仅限改签一次,改签成功后原订单费用将原路返回退还给客户,请知悉。</p>
|
|
|
- </div>
|
|
|
- <el-form :model="rebookForm" ref="rebookForm" label-width="100px" :rules="rules">
|
|
|
- <el-form-item label="选择日期:" prop="performDate">
|
|
|
- <el-date-picker v-model="rebookForm.performDate" type="date" value-format="yyyy-MM-dd"
|
|
|
+ <div class="rebook1_box" v-loading="loading">
|
|
|
+ <div class="rebook1_from-box">
|
|
|
+ <div class="rebook1_from">
|
|
|
+ <div class="tip-box">
|
|
|
+ <p>温馨提示:每张票仅限改签一次,改签成功后原订单费用将原路返回退还给客户,请知悉。</p>
|
|
|
+ </div>
|
|
|
+ <el-form :model="rebookForm" ref="rebookForm" label-width="100px" :rules="rules">
|
|
|
+
|
|
|
+
|
|
|
+ <el-form-item label="选择日期:" prop="performDate">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="rebookForm.performDate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
placeholder="选择日期" @change="handleDateChange" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="选择场次:" prop="performTimeId">
|
|
|
- <div v-loading="intervalListLoading" element-loading-text="获取场次中...">
|
|
|
- <div class="interval-list">
|
|
|
- <el-button
|
|
|
- v-for="item in intervalList"
|
|
|
- :key="item.performTimeId"
|
|
|
- :type="rebookForm.performTimeId === item.performTimeId ? 'primary' : ''"
|
|
|
- @click="selectInterval(item)">
|
|
|
- {{ item.performInterval }}
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <el-alert
|
|
|
- v-if="intervalList.length==0"
|
|
|
- title="没有可改签的场次!!!"
|
|
|
- type="error"
|
|
|
- :closable="false"
|
|
|
- :show-icon="false">
|
|
|
- </el-alert>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="支付方式 :" prop="paymentType">
|
|
|
- <el-radio-group v-model="rebookForm.paymentType">
|
|
|
- <el-radio label="1">扫码支付</el-radio>
|
|
|
- <!-- <el-radio label="2">现金支付</el-radio> -->
|
|
|
- <!-- <el-radio v-if="['10','11','13','14','18','19'].includes(ruleForm.source)" label="3">对公支付</el-radio> -->
|
|
|
- <!-- <el-radio v-if="['10','11','13','14','18','19'].includes(ruleForm.source)" label="4">账户余额({{ balance }})</el-radio>
|
|
|
- <el-radio v-if="['10','11','13','14','18','19'].includes(ruleForm.source)" label="5">授信余额({{ grantQuota }})</el-radio> -->
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="">
|
|
|
- <div style="width: 100%;display: flex;justify-content: center;">
|
|
|
- <el-button @click="rebookDialog = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitRebook">确认改签</el-button>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="选择场次:" prop="performTimeId">
|
|
|
+ <el-select
|
|
|
+ v-model="rebookForm.performTimeId"
|
|
|
+ placeholder="选择场次"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="querySeatListFun"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in intervalList"
|
|
|
+ :key="item.performTimeId"
|
|
|
+ :label="item.performInterval"
|
|
|
+ :value="item.performTimeId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="支付方式 :" prop="paymentType">
|
|
|
+ <el-radio-group v-model="rebookForm.paymentType">
|
|
|
+ <el-radio label="1">扫码支付</el-radio>
|
|
|
+ <!-- <el-radio label="2">现金支付</el-radio> -->
|
|
|
+ <!-- <el-radio v-if="['10','11','13','14','18','19'].includes(ruleForm.source)" label="3">对公支付</el-radio> -->
|
|
|
+ <!-- <el-radio v-if="['10','11','13','14','18','19'].includes(ruleForm.source)" label="4">账户余额({{ balance }})</el-radio>
|
|
|
+ <el-radio v-if="['10','11','13','14','18','19'].includes(ruleForm.source)" label="5">授信余额({{ grantQuota }})</el-radio> -->
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div class="rebook1_seat">
|
|
|
+ <seatBox
|
|
|
+ ref="seatBox"
|
|
|
+ :seatTypeLimit="configStockNumObj"
|
|
|
+ @selectSeat="selectSeat"
|
|
|
+ height="100%"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100%;display: flex;justify-content: center;">
|
|
|
+ <el-button @click="rebookDialog = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitRebook">确认改签</el-button>
|
|
|
</div>
|
|
|
<!-- 支付过程 控制 -->
|
|
|
<div v-if="payStatus" class="increase-viewers-pay-status">
|
|
@@ -147,15 +156,23 @@ import {
|
|
|
import { pageList as getPrintListApi } from "@/api/device/pda";
|
|
|
import { printApi } from '@/api/windowTicketSales/ticketingCollection'
|
|
|
import { rebookApi } from '@/api/windowTicketSales/rebook'
|
|
|
+ import { countBySeatTyp } from '@/api/ticketMr/InventoryTemplate'
|
|
|
+ import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
|
|
|
+ import seatBox from '@/components/seatBox/index.vue';
|
|
|
+ import {
|
|
|
+ querySeatList,
|
|
|
+ } from '@/api/windowTicketSales/ticketingSales'
|
|
|
const mathM = require('mathjs')
|
|
|
const https = require('https');
|
|
|
const axios = require('axios');
|
|
|
export default {
|
|
|
name: "RebookBox",
|
|
|
+ components: { seatBox },
|
|
|
data() {
|
|
|
return {
|
|
|
// 改签对话框
|
|
|
rebookDialog: false,
|
|
|
+ loading: false,
|
|
|
// 改签表单
|
|
|
rebookForm: {
|
|
|
orderId: undefined,
|
|
@@ -182,10 +199,18 @@ export default {
|
|
|
successDialog: false,
|
|
|
newOrderId: '',
|
|
|
printList: [],
|
|
|
+
|
|
|
+ configStockNumObj: {},
|
|
|
+ countBySeatTypList:[],
|
|
|
+ seatTypeListAll: [],
|
|
|
+ setList: [],
|
|
|
}
|
|
|
},
|
|
|
+ created(){
|
|
|
+ this.getSeatTypeAllList()
|
|
|
+ },
|
|
|
methods: {
|
|
|
- initData(row) {
|
|
|
+ async initData(row) {
|
|
|
this.rebookDialog = true
|
|
|
this.payStatus = null
|
|
|
this.rebookForm = {
|
|
@@ -196,6 +221,7 @@ export default {
|
|
|
auditoriumId: row.auditoriumId,
|
|
|
paymentType: "1", // 支付方式
|
|
|
}
|
|
|
+ await this.countBySeatTypFun(row.auditoriumId)
|
|
|
this.$nextTick(()=>{
|
|
|
this.$refs.rebookForm.clearValidate()
|
|
|
})
|
|
@@ -800,20 +826,110 @@ export default {
|
|
|
this.balance = null
|
|
|
this.grantQuota = null
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ /** 获取座位 */
|
|
|
+ async querySeatListFun(type){
|
|
|
+ try {
|
|
|
+
|
|
|
+ let res = await querySeatList({
|
|
|
+ auditoriumId: this.rebookForm.auditoriumId,
|
|
|
+ timeId: this.rebookForm.performTimeId,
|
|
|
+ })
|
|
|
+ if(res.code == 200){
|
|
|
+ this.setList = res.data;
|
|
|
+ let list = []
|
|
|
+ let list3 = []
|
|
|
+ this.countBySeatTypList.forEach((item,index)=>{
|
|
|
+ list3.push(item.seatTypeId)
|
|
|
+ })
|
|
|
+ let list4 = []
|
|
|
+ this.seatTypeListAll.forEach((item,index)=>{
|
|
|
+ if(list3.includes(item.id)) {
|
|
|
+ list4.push({...item})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$nextTick(() =>{
|
|
|
+ this.$refs.seatBox.querySeatListFun(true,this.setList,list,list4)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ this.loading = false
|
|
|
+ } catch (error) {
|
|
|
+ this.loading = false
|
|
|
+ console.error("error===",error)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 获取座位类型 */
|
|
|
+ async countBySeatTypFun(value) {
|
|
|
+ try {
|
|
|
+ if(!value) return
|
|
|
+ let res = await countBySeatTyp({auditoriumId: value})
|
|
|
+ this.countBySeatTypList = res.data ? res.data : []
|
|
|
+ let obj = {}
|
|
|
+ this.countBySeatTypList.forEach((item,index)=>{
|
|
|
+ obj['seatNum_'+item.seatTypeId] = {
|
|
|
+ stockTotal: item.stock,
|
|
|
+ stockSelect: item.stock,
|
|
|
+ stockYes: 0,
|
|
|
+ stockNo: 0,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.configStockNumObj = obj
|
|
|
+ } catch (error) {
|
|
|
+ console.error("error1====",error)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 获取座位类型 说明 */
|
|
|
+ async getSeatTypeAllList() {
|
|
|
+ try {
|
|
|
+ let res = await getSeatType({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ })
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.seatTypeListAll = res.data.rows || [];
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 选择座位 */
|
|
|
+ selectSeat(list) {
|
|
|
+ console.log("已选择的====",list)
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.rebook-dialog ::v-deep .el-dialog__body {
|
|
|
+.rebook1_dialog ::v-deep .el-dialog__body {
|
|
|
padding: 0 !important;
|
|
|
}
|
|
|
-.rebook-box {
|
|
|
- position: relative;
|
|
|
- .rebook-from {
|
|
|
- padding: 20px;
|
|
|
+.rebook1_box {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ .rebook1_from-box {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ height: 80vh;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 20px 20px;
|
|
|
+ }
|
|
|
+ .rebook1_from {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ padding: 0 20px 0 0;
|
|
|
+ width: 400px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+ .rebook1_seat {
|
|
|
+ width: calc( 100% - 400px );
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.increase-viewers-pay-status {
|
|
|
width: 100%;
|
|
|
height: 100%;
|