瀏覽代碼

1. 优化

MONSTER-ygh 2 月之前
父節點
當前提交
8fe19e8fb8

+ 23 - 1
src/views/otaMr/ctrip/dialog/dataEdit.vue

@@ -80,7 +80,7 @@
       <div class="dialog calendar-dialog" v-loading="calendarLoading">
         <div>
           <el-button type="primary" @click="openCalendarPrice()">价格设置</el-button>
-          <el-button type="primary" @click="clearCalendarPrice()">一键清空</el-button>
+          <el-button type="primary" @click="checkIsClear()">一键清空</el-button>
         </div>
         <el-calendar v-model="timeValue">
           <template
@@ -419,6 +419,27 @@ export default {
       }
       
     },  
+    checkIsClear(){
+      if (this.timeValueObj.prev && this.timeValueObj.next) {
+        let minTime = moment(this.timeValueObj.prev).valueOf()
+        let maxTime = moment(this.timeValueObj.next).valueOf()
+        let startDate = null
+        let endDate = null
+        if (minTime > maxTime) {
+          startDate = this.timeValueObj.next
+          endDate = this.timeValueObj.prev
+        } else {
+          startDate = this.timeValueObj.prev
+          endDate = this.timeValueObj.next
+        }
+        this.$modal.confirm('确定要清空勾选"' + startDate + '——' + endDate + '"的日期范围内的数据吗?').then(()=> {
+          this.clearCalendarPrice()
+        }).catch(() => {});
+      } else {
+        this.$message.error("请选择时间区间!!!");
+      }
+      
+    },
     /** 一键清除  */
     async clearCalendarPrice() {
       try {
@@ -458,6 +479,7 @@ export default {
           })
           if(res.code == 200) {
             this.openPrice = false
+            this.$modal.msgSuccess(res.msg);
             this.getCalendarPrice()
           }
         }else {

+ 24 - 2
src/views/otaMr/meituan/dialog/dataEdit.vue

@@ -103,7 +103,7 @@
       <div class="dialog calendar-dialog" v-loading="calendarLoading">
         <div>
           <el-button type="primary" @click="openCalendarPrice()">价格设置</el-button>
-          <el-button type="primary" @click="clearCalendarPrice()">一键清空</el-button>
+          <el-button type="primary" @click="checkIsClear()">一键清空</el-button>
         </div>
         <el-calendar v-model="timeValue">
           <template
@@ -387,7 +387,28 @@ export default {
         this.$message.error("请选择时间区间!!!");
       }
       
-    },  
+    }, 
+    checkIsClear(){
+      if (this.timeValueObj.prev && this.timeValueObj.next) {
+        let minTime = moment(this.timeValueObj.prev).valueOf()
+        let maxTime = moment(this.timeValueObj.next).valueOf()
+        let startDate = null
+        let endDate = null
+        if (minTime > maxTime) {
+          startDate = this.timeValueObj.next
+          endDate = this.timeValueObj.prev
+        } else {
+          startDate = this.timeValueObj.prev
+          endDate = this.timeValueObj.next
+        }
+        this.$modal.confirm('确定要清空勾选"' + startDate + '——' + endDate + '"的日期范围内的数据吗?').then(()=> {
+          this.clearCalendarPrice()
+        }).catch(() => {});
+      } else {
+        this.$message.error("请选择时间区间!!!");
+      }
+      
+    }, 
     /** 一键清除  */
     async clearCalendarPrice() {
       try {
@@ -427,6 +448,7 @@ export default {
           })
           if(res.code == 200) {
             this.openPrice = false
+            this.$modal.msgSuccess(res.msg);
             this.getCalendarPrice()
           }
         }else {

+ 23 - 1
src/views/otaMr/tiktok/dialog/dataEdit.vue

@@ -119,7 +119,7 @@
       <div class="dialog calendar-dialog" v-loading="calendarLoading">
         <div>
           <el-button type="primary" @click="openCalendarPrice()">价格设置</el-button>
-          <el-button type="primary" @click="clearCalendarPrice()">一键清空</el-button>
+          <el-button type="primary" @click="checkIsClear()">一键清空</el-button>
         </div>
         <el-calendar v-model="timeValue">
           <template
@@ -407,6 +407,27 @@ export default {
         this.$message.error("请选择时间区间!!!");
       }
       
+    },
+    checkIsClear(){
+      if (this.timeValueObj.prev && this.timeValueObj.next) {
+        let minTime = moment(this.timeValueObj.prev).valueOf()
+        let maxTime = moment(this.timeValueObj.next).valueOf()
+        let startDate = null
+        let endDate = null
+        if (minTime > maxTime) {
+          startDate = this.timeValueObj.next
+          endDate = this.timeValueObj.prev
+        } else {
+          startDate = this.timeValueObj.prev
+          endDate = this.timeValueObj.next
+        }
+        this.$modal.confirm('确定要清空勾选"' + startDate + '——' + endDate + '"的日期范围内的数据吗?').then(()=> {
+          this.clearCalendarPrice()
+        }).catch(() => {});
+      } else {
+        this.$message.error("请选择时间区间!!!");
+      }
+      
     },  
     /** 一键清除  */
     async clearCalendarPrice() {
@@ -447,6 +468,7 @@ export default {
           })
           if(res.code == 200) {
             this.openPrice = false
+            this.$modal.msgSuccess(res.msg);
             this.getCalendarPrice()
           }
         }else {

+ 4 - 3
src/views/ticket/schedulingConfiguration/dialog/addAndEdit.vue

@@ -48,7 +48,7 @@
             placeholder="选择演出厅"
             clearable
             style="width: 100%"
-            @change="getInventoryTemplate"
+            @change="(value) =>getInventoryTemplate(value)"
           >
             <el-option
               v-for="dict in merchantList"
@@ -255,6 +255,7 @@ export default {
         if(obj.performId) {
           await this.goodsPageListFun(obj.performId);
         }
+        await this.getInventoryTemplate(obj.auditoriumId)
         this.form = {
           ...obj,
           performDate: [obj.dateStart,obj.dateEnd],
@@ -343,9 +344,9 @@ export default {
       }
     },
     /**  获取模板  */
-    async getInventoryTemplate(value){
+    async getInventoryTemplate(value,type){
       try {
-        if(this.form.planSessionList && this.form.planSessionList.length > 0) {
+        if(this.form.planSessionList && this.form.planSessionList.length > 0 && type) {
           let list = JSON.parse(JSON.stringify(this.form.planSessionList))
           list.forEach((item,index)=>{
             list[index].stockTmpId = null

+ 19 - 26
src/views/windowTicketSales/ticketingSales.vue

@@ -48,19 +48,19 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="票务类型" prop="goodsId">
+        <el-form-item label="票" prop="goodsId">
           <el-select
             v-model="queryParams.goodsId"
-            placeholder="票务类型"
+            placeholder="请选择票种"
             clearable
             style="width: 100%"
             @change="changeTime($event,'goodsId')"
           >
             <el-option
               v-for="dict in goodsPageListS"
-              :key="dict.id"
+              :key="dict.goodsId"
               :label="dict.goodsName"
-              :value="dict.id"
+              :value="dict.goodsId"
               :disabled="dict.status==1"
             />
           </el-select>
@@ -258,7 +258,7 @@ import LockSeat from './model/lockSeat.vue'
                 { required: true, message: '请选择场次', trigger: ['blur','change'] }
             ],
             goodsId: [
-                { required: true, message: '请选择票务类型', trigger: ['blur','change'] }
+                { required: true, message: '请选择票', trigger: ['blur','change'] }
             ],
         },
         merchantTheatreAuditoriumListS: [], // 演出厅
@@ -549,25 +549,14 @@ import LockSeat from './model/lockSeat.vue'
                     let list2 = []
                     this.merchantPerformTimeListS.forEach((item,index)=>{
                         if(item.id==value) {
-                            // let list = item.goodsIds ? item.goodsIds.split(','): []
-                            // list.forEach((item,index)=>{
-                            //     this.goodsPageListSAll.forEach((item1,index1)=>{
-                            //         if(item1.id == item) {
-                            //             flog = true       
-                            //             list2.push({
-                            //                 ...item1
-                            //             })
-                            //         }
-                            //     })
-                            // })
+                            flog = true
                             list2 = item.goodsList
                         }
                     })
-                    if(flog) {
-                        this.goodsPageListS = JSON.parse(JSON.stringify(list2))
-                    }else {
-                        this.goodsPageListS = JSON.parse(JSON.stringify(this.goodsPageListSAll))
-                    }
+                    this.goodsPageListS = []
+                    setTimeout(()=>{
+                        this.goodsPageListS = list2
+                    },500)
                     
                 }else {
                     this.goodsPageListS = []
@@ -577,7 +566,7 @@ import LockSeat from './model/lockSeat.vue'
 
         },
         /**  选择场次时间  */
-        changeTimeCheck(value,type){
+        async changeTimeCheck(value,type){
             console.log("fsdfsdf")
             if(this.queryParams && this.queryParams.timeId && type != 'timeId' && type != 'goodsId') {
                 console.log('sdfsdfsdf',this.queryParams)
@@ -586,13 +575,17 @@ import LockSeat from './model/lockSeat.vue'
                 this.merchantPerformTimeListS = []
                 this.goodsPageListS = []
             }
-            if(this.queryParams.auditoriumId&&this.queryParams.performDate){
+            if(this.queryParams.auditoriumId&&this.queryParams.performDate && type != 'timeId' && type != 'goodsId'){
                 //  获取场次
                 this.merchantPerformTimeListFun()
             }
             if(type == 'goodsId'){
+                //this.$refs.queryForm.clearValidate("goodsId")
                 if(value) {
-                    this.getGoodsPerformFun(value)
+                    console.log("dsfsdfdsfds===",value)
+                    await this.getGoodsPerformFun(value);
+
+                    this.handleQuery()
                 }
             }else {
                 this.ifRealUser = 0  // 散客是否实名:0-否 1-是
@@ -606,7 +599,7 @@ import LockSeat from './model/lockSeat.vue'
             this.seatSelectListNo = []
             this.seatMapList = {}
             this.seatList = []
-            this.handleQuery()
+            // this.handleQuery()
             
         },
         /**  设置 场次 对应得剧目ID */
@@ -625,7 +618,7 @@ import LockSeat from './model/lockSeat.vue'
             if (valid) {
                 this.querySeatListFun(true);
             } else {
-                console.log('error submit!!');
+                console.log('error submit!!',valid);
                 return false;
             }
             });