MONSTER-ygh před 1 měsícem
rodič
revize
5dea82cd08
1 změnil soubory, kde provedl 18 přidání a 7 odebrání
  1. 18 7
      src/views/windowTicketSales/model/rebookBox.vue

+ 18 - 7
src/views/windowTicketSales/model/rebookBox.vue

@@ -220,6 +220,7 @@ export default {
                 performId: row.performId,
                 auditoriumId: row.auditoriumId,
                 paymentType: "1", // 支付方式
+                seatList: []
             }
             await this.countBySeatTypFun(row.auditoriumId)
             this.$nextTick(()=>{
@@ -263,6 +264,10 @@ export default {
         submitRebook() {
             this.$refs.rebookForm.validate((valid) => {
                 if (valid) {
+                    if(!this.rebookForm.seatList||this.rebookForm.seatList.length==0) {
+                        this.$message.error('请选择座位!!!');
+                        return
+                    }
                     this.orderInfoSubmitFun()
                 } else {
                     return false;
@@ -281,7 +286,7 @@ export default {
                         document.removeEventListener('keydown',this.keydownAdd);
                         this.orderInfoCancelFun(true)
                     }else {
-                        this.dialogVisible = false
+                        this.rebookDialog = false
                     }
                 })
                 .catch(_ => {});
@@ -304,7 +309,7 @@ export default {
                             this.orderId = null
                             this.payStatus = null
                             this.$emit('clearDialogVisible')
-                            this.dialogVisible = false
+                            this.rebookDialog = false
                         }else {
                             this.payStatus = 9
                             this.loading = false
@@ -781,12 +786,12 @@ export default {
           ignoreSSL.post(url, 
             { ...data }
             ).then(()=>{
-            this.dialogVisible = false
+            this.rebookDialog = false
             this.loading = false
           }).catch(()=>{
             this.loading = false
             this.payStatus = 8
-            // this.dialogVisible = false
+            // this.rebookDialog = false
             // this.loading = false
           })
           // 在 axios 请求时,选择性忽略 SSL
@@ -797,11 +802,11 @@ export default {
           //   url, 
           //   { httpsAgent: agent,...data }
           //   ).then(()=>{
-          //   this.dialogVisible = false
+          //   this.rebookDialog = false
           //   this.loading = false
           // })
           // .catch(()=>{
-          //   this.dialogVisible = false
+          //   this.rebookDialog = false
           //   this.loading = false
           // })
         },
@@ -832,7 +837,6 @@ export default {
         /**  获取座位  */
         async querySeatListFun(type){
             try {
-                
                 let res = await querySeatList({
                     auditoriumId: this.rebookForm.auditoriumId,
                     timeId: this.rebookForm.performTimeId,
@@ -897,6 +901,13 @@ export default {
         },
          /** 选择座位  */
         selectSeat(list) {
+            let list1 = []
+            list.forEach((item)=>{
+                list1.push({
+                    seatId: item.id
+                })
+            })
+            this.rebookForm.seatList = list1
             console.log("已选择的====",list)
         },
     }