Kaynağa Gözat

1. 修复BUG

MONSTER-ygh 1 ay önce
ebeveyn
işleme
f8b66ca1bc

+ 79 - 3
src/components/seatBox/index.vue

@@ -78,6 +78,8 @@
                                 v-for="(item, index) in seatMapList[item1.key]" 
                                 :style="{backgroundColor: item.color && !(item.isDisabled || item.status != 1) ? item.color : 'none'}"
                                 @click.stop="seatClick(item)" 
+                                @mouseenter="lockOrUnLockDeatilFun($event,item)"
+                                @mouseleave="lockOrUnLockDeatilFun1"
                                 :dragSelectId="item.id"
                                 :index="item1.key +'_'+ index"
                                 :key="index">
@@ -108,9 +110,13 @@
   
  import moment from "moment"
  import selectListMixin from "./mixins/selectList"
+ import { 
+  lockOrUnLockApi,
+ } from '@/api/windowTicketSales/ticketingSales'
  export default {
     name: "TicketingSales1",
     mixins: [selectListMixin],
+    dicts: ['channel_type'],
     props: {
         // 是否限制只能选择同一种类型
         isOccupyStatus: {
@@ -130,6 +136,10 @@
         height: {
             type: [String],
             default: 'calc( 100vh - 120px )'
+        },
+        channelType: {
+            type: [String],
+            default: 'window'
         }
     },
     data() {
@@ -186,6 +196,15 @@
     },
     methods: {
         moment,
+        setChanneltype(key){
+            let srt = ''
+            this.dict.type.channel_type.forEach((item,index)=>{
+                if(key == item.value) {
+                    srt = item.label
+                }
+            })
+            return srt
+        },
         /**  获取座位  */
         async querySeatListFun(type,list,list1,seatTypeList){
             try {
@@ -427,7 +446,63 @@
 
             return srt
         },
-
+        /** 获取锁定人和锁定备注  */
+        async lockOrUnLockDeatilFun(e,item) {
+            try {
+                if(this.lckTime) {
+                    clearTimeout(this.lckTime)
+                }
+                if(item.occupyStatus !== 0) {
+                    if(item.channelType && item.channelType != this.channelType){
+                        this.isLcokShow = true
+                        this.lockObj = {
+                            remark: `该座位仅限${ this.setChanneltype(row.channelType) }渠道购买!!!`,
+                            auth: ''
+                        }
+                        this.lockStyle = {
+                            position: "fixed",
+                            top: (e.y + 10) + 'px',
+                            left: (e.x + 10)+ 'px',
+                            zIndex: 999999
+                        }
+                        return
+                    }else {
+                        this.isLcokShow = false
+                        return
+                    }
+                }
+                if(item.id == this.seatId){ return }
+                this.seatId = item.id
+                this.isLcokShow = false
+                this.lckTime = setTimeout(async ()=>{
+                    let res = await lockOrUnLockApi({
+                        auditoriumId: this.queryParams.auditoriumId,
+                        timeId: this.queryParams.timeId,
+                        seatId: item.id
+                    })
+                    if (res.code == 200) {
+                        this.isLcokShow = true
+                        this.lockObj = {
+                            remark: res.data.remark,
+                            auth: res.data.createBy
+                        }
+                        this.lockStyle = {
+                            position: "fixed",
+                            top: (e.y + 10) + 'px',
+                            left: (e.x + 10)+ 'px',
+                            zIndex: 999999
+                        }
+                    } else {
+                        
+                    }
+                },500)
+            } catch (error) {
+            }
+        },
+        lockOrUnLockDeatilFun1() {
+            this.isLcokShow = false
+            this.seatId = null
+        },
         /**  设置显示状态  */
         setShowStatus(item1,item) {
             let str = ''
@@ -448,13 +523,14 @@
                     item.isDisabled || item.status != 1 ? 'disabled-class' :
                     item.isSelect ? 'select-class' : ''
             if(!str) {
-                if(item.isSame) { // 是否为可选的座位类型
+                if(item.isSame || item.isUse == 2) { // 是否为可选的座位类型
                     str = 'seat_is_same'
                 }
 
-                if(item.channelType && item.channelType != 'window') { // 是否属于窗口售卖座位
+                if(item.channelType && item.channelType != this.channelType) { // 是否属于窗口售卖座位
                     str = 'seat_channel_type'
                 }
+                
             }
             return str  
         }

+ 18 - 10
src/views/officesale/model/increaseViewers.vue

@@ -325,12 +325,18 @@ import {
                 this.websocketClear()
                 this.idcardLoading = false
                 this.ruleForm = {
-                    performId: "", // 剧目ID
+                    performId: params.performId, // 剧目ID
                     retailId: "", // 分销ID
-                    goodsList: [], // 商品列表
-                    auditoriumId: "", // 演出厅ID
-                    performTimeId: "", // 场次时段ID
-                    seatTypeId: "", // 座位类型ID
+                    goodsList: [
+                        {
+                            goodsId: params.goodsId,
+                            salePeice: params.salePrice,
+                            saleNum: 1,
+                        }
+                    ], // 商品列表
+                    auditoriumId: params.auditoriumId, // 演出厅ID
+                    performTimeId: params.timeId, // 场次时段ID
+                    seatTypeId: params.seatTypeId, // 座位类型ID
                     source: '12', // 订单来源
                     purchaser: {},// 购票人信息
                     viewerList: [], // 观影人列表
@@ -347,12 +353,14 @@ import {
                 this.loading = true
                 this.actionIndex = null
                 this.viewerList = []
-                let perform = await this.selectRegionFun(params,list[0].seatTypeId)
+                // let perform = await this.selectRegionFun(params,list[0].seatTypeId)
                 console.log("perform===",perform)
-                // let perform = {
-                //     money: 1,
-                //     name: '普通票'
-                // }
+                let perform = {
+                    money: params.salePrice,
+                    //name: params.goodsName,
+                    seatTypeId: params.seatTypeId,
+                    seatTypeName: params.seatTypeName,
+                }
                 let listCopy = []
                 let listCopy1 = []
                 list.forEach((item,index)=>{

+ 105 - 37
src/views/officesale/ticketingSales.vue

@@ -48,20 +48,20 @@
             />
           </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"
-              :disabled="dict.status==1 || dict.goodsPerform.channelWindow != 0"
+              :value="dict.goodsId"
+              :disabled="dict.status==1"
             />
           </el-select>
         </el-form-item>
@@ -126,8 +126,7 @@
                                 <div 
                                 :class="[
                                     'seat-item-class',
-                                    item1.key == 'my_column'?'seat-item-class-column':
-                                    item.occupyStatus==0?item.occupyOrderId?'order-occupy-status':item.occupyStatus==0&&item.isSelect?'occupy-status-select occupy-status':'occupy-status': item.occupyStatus==1?'occupy-status-no':item.isDisabled || item.status != 1 ? 'disabled-class' : item.isSelect ? 'select-class' : ''
+                                    showSearStyle(item1,item)
                                 ]" 
                                 v-for="(item, index) in seatMapList[item1.key]" 
                                 :style="{backgroundColor: item.color && !(item.isDisabled || item.status != 1) ? item.color : 'none'}"
@@ -215,13 +214,14 @@
   import { 
   querySeatList,
   merchantPerformTimeList,
+  merchantPerformTimeListNew,
   lockOrUnLock,
   merchantTheatreAuditoriumList,
   goodsPageList,
   getGoodsPerformApi,
-  lockOrUnLockApi
+  lockOrUnLockApi,
+  querySeatListNew
  } from '@/api/windowTicketSales/ticketingSales'
- //import increaseViewers from "./model/increaseViewers"
  import increaseViewers from "./model/increaseViewers"
  import moment from "moment"
  import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
@@ -234,6 +234,7 @@ import LockSeat from './model/lockSeat.vue'
         LockSeat
     },
     mixins: [selectListMixin],
+    dicts: ['channel_type'],
     data() {
       return {
         // 遮罩层
@@ -256,7 +257,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: [], // 演出厅
@@ -295,7 +296,8 @@ import LockSeat from './model/lockSeat.vue'
         lockObj: {
             auth: '',
             remark: ''
-        }
+        },
+        salePrice: null,
       };
     },
     created() {
@@ -308,6 +310,16 @@ import LockSeat from './model/lockSeat.vue'
     },
     methods: {
         moment,
+
+        setChanneltype(key){
+            let srt = ''
+            this.dict.type.channel_type.forEach((item,index)=>{
+                if(key == item.value) {
+                    srt = item.label
+                }
+            })
+            return srt
+        },
         /**  票务信息  */
         async goodsPageListFun(){
             try {
@@ -352,12 +364,12 @@ import LockSeat from './model/lockSeat.vue'
         /**  获取场次  */
         async merchantPerformTimeListFun(){
             try {
-                let param = this.queryParams;
+                let param = JSON.parse(JSON.stringify(this.queryParams));
                 param.status  = 1;
-                let res = await merchantPerformTimeList(param)
+                let res = await merchantPerformTimeListNew(param)
                 if(res.code == 200){
                     console.log('merchantPerformTimeListS',res.data.rows);
-                    this.merchantPerformTimeListS = res.data.rows
+                    this.merchantPerformTimeListS = res.data.list
                 }
             } catch (error) {
                 
@@ -422,7 +434,7 @@ import LockSeat from './model/lockSeat.vue'
                 }
                 this.seatMapList = {}
                 this.seatList = []
-                let res = await querySeatList({
+                let res = await querySeatListNew({
                     ...this.queryParams
                 })
                 if(res.code == 200){
@@ -537,24 +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 = []
@@ -564,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)
@@ -573,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-是
@@ -593,7 +599,7 @@ import LockSeat from './model/lockSeat.vue'
             this.seatSelectListNo = []
             this.seatMapList = {}
             this.seatList = []
-            this.handleQuery()
+            // this.handleQuery()
             
         },
         /**  设置 场次 对应得剧目ID */
@@ -606,13 +612,23 @@ import LockSeat from './model/lockSeat.vue'
                 }
             })
         },
+        /**  设置 票务 对应价格 */
+        changeSalePrice(value){
+            console.log("value=====",value)
+            this.salePrice = null
+            this.goodsPageListS.forEach((item,index)=>{
+                if(item.goodsId == value){
+                    this.salePrice = item.salePrice
+                }
+            })
+        },
         /** 搜索按钮操作 */
         handleQuery() {
             this.$refs.queryForm.validate((valid) => {
             if (valid) {
                 this.querySeatListFun(true);
             } else {
-                console.log('error submit!!');
+                console.log('error submit!!',valid);
                 return false;
             }
             });
@@ -632,10 +648,14 @@ import LockSeat from './model/lockSeat.vue'
 
         // 座位点击事件
         seatClick(row) {
-            console.log("是的发给我大是个的风格====",row)
             if(row.isDisabled || row.status == 2){
                 return false
             }
+            if(row.channelType && row.channelType != 'window'){
+                this.$message.error(`该座位仅限${ this.setChanneltype(row.channelType) }渠道购买!!!`);
+                return false
+            }
+
             if(this.seatSelectListNo.length>0 && row.occupyStatus != 0) {
                 this.$message.error('你已选择锁定座位,只能再选择被锁定的座位!!!');
                 return
@@ -740,6 +760,7 @@ import LockSeat from './model/lockSeat.vue'
                     }
                 }
                 this.changePerformId(this.queryParams.timeId)
+                this.changeSalePrice(this.queryParams.goodsId)
                 this.$refs.increaseViewers.initData(this.seatSelectList,{
                     ...this.queryParams,
                     performId:this.performId,
@@ -747,6 +768,9 @@ import LockSeat from './model/lockSeat.vue'
                     ifRealTeam: this.ifRealTeam,   // 团购是否实名:0否 1-是
                     oneMany: this.oneMany,   // 证件要求: 1一证一票,2一证多票
                     personnelNum: this.personnelNum,   // 人员要求:0-表示不限制 其他数字表示限制人数
+                    seatTypeId: this.seatSelectList[0].seatTypeId,
+                    seatTypeName: this.seatSelectList[0].seatTypeId,
+                    salePrice: this.salePrice
                 })
             }else {
                 this.$alert('请先选择座位!!!', '提示', {
@@ -857,6 +881,28 @@ import LockSeat from './model/lockSeat.vue'
         lockOrUnLockDeatilFun1() {
             this.isLcokShow = false
             this.seatId = null
+        },
+        /**  
+         * 座位得样式 
+         * 
+         * occupyStatus: 为null表示未占用,0-锁定 1-占用
+         * status: 状态:0-初始(该状态下不C端显示) 1-可用 2-不可用
+         * channelType: 
+         *  */
+        showSearStyle(item1,item) {
+            
+            let srt = ''
+            srt = 
+            item1.key == 'my_column'?'seat-item-class-column':
+            item.occupyStatus==0?item.occupyOrderId?'order-occupy-status':
+            item.occupyStatus==0&&item.isSelect?'occupy-status-select occupy-status':
+            'occupy-status': item.occupyStatus==1?'occupy-status-no':
+            item.isDisabled || item.status != 1 ? 'disabled-class' : 
+            item.isSelect ? 'select-class' : ''
+            if(!srt && item.channelType && item.channelType != 'window') {
+                return 'seat_channel_type'
+            }
+            return srt
         }
     }   
   };
@@ -1021,6 +1067,28 @@ import LockSeat from './model/lockSeat.vue'
       transform-origin: 50% 0;
       transform: scale(var(--scaleNum));
       box-sizing: border-box;
+
+      /**  是否属于windown座位  */
+      .seat_channel_type {
+        user-select: none;
+      }
+      .seat_channel_type:after {
+        content:"";
+        display:block;
+        position:absolute;
+        top:0;
+        left:0;
+        width:100%;
+        height:100%;
+        background-color:rgba(0,0,0,0.3);
+        z-index:-1;
+        background-image: url('../../assets/jinxuan_1.png');
+        background-size: 50% 50%;
+        background-position: 50% 50%;
+        background-repeat: no-repeat;
+        z-index: 99;
+      }
+
       .disabled-class{
         background-color: #ffffff;
         border: none !important;

+ 2 - 1
src/views/team/applicationMr/dialog/applicationDetails.vue

@@ -64,7 +64,7 @@
 
 
         <!--   观影人员信息   -->
-        <div class="title-class">观影人员信息-{{ details.viewersList.length }}人</div>
+        <div class="title-class">观影人员信息-{{ details.viewersList && details.viewersList.length }}人</div>
         <el-row>
           <el-col :span="24">
             <el-table size="mini" ref="tables" :data="details.viewersList" border>
@@ -81,6 +81,7 @@
           :seatTypeLimit="configStockNumObj"
           @selectSeat="selectSeat"
           height="100%"
+          channelType="group"
           />
       </div>
     </div>

+ 13 - 9
src/views/ticket/ticketMr/dialog/addAndEdit.vue

@@ -244,15 +244,19 @@
               <span>说明:未勾选核销凭证时,观影人员需到票务中心取票入场</span>
             </el-form-item>
             <el-form-item label="票务闸机播报名称:" label-width="140px" prop="talkName">
-              <el-input
-                v-model="form.talkName"
-                placeholder="票务闸机播报名称"
-                clearable
-                style="width: 100%;"
-                maxlength="4"
-                show-word-limit
-              >
-              </el-input>
+              <div style="display: flex;">
+                <el-input
+                  v-model="form.talkName"
+                  placeholder="票务闸机播报名称"
+                  clearable
+                  style="width: 100%;"
+                  maxlength="4"
+                  show-word-limit
+                >
+                </el-input>
+                <span style="color: #ccc;white-space: nowrap;padding-left: 20px;">禁止录入特殊符号</span>
+              </div>
+              
             </el-form-item>
           </el-tab-pane>
         </el-tabs>

+ 18 - 10
src/views/windowTicketSales/model/increaseViewersNew.vue

@@ -373,12 +373,18 @@ import {
                 this.websocketClear()
                 this.idcardLoading = false
                 this.ruleForm = {
-                    performId: "", // 剧目ID
+                    performId: params.performId, // 剧目ID
                     retailId: "", // 分销ID
-                    goodsList: [], // 商品列表
-                    auditoriumId: "", // 演出厅ID
-                    performTimeId: "", // 场次时段ID
-                    seatTypeId: "", // 座位类型ID
+                    goodsList:  [
+                        {
+                            goodsId: params.goodsId,
+                            salePeice: params.salePrice,
+                            saleNum: 1,
+                        }
+                    ], // 商品列表
+                    auditoriumId: params.auditoriumId, // 演出厅ID
+                    performTimeId: params.timeId, // 场次时段ID
+                    seatTypeId: params.seatTypeId, // 座位类型ID
                     source: '', // 订单来源
                     purchaser: {},// 购票人信息
                     viewerList: [], // 观影人列表
@@ -396,12 +402,14 @@ import {
                 this.loading = true
                 this.actionIndex = null
                 this.viewerList = []
-                let perform = await this.selectRegionFun(params,list[0].seatTypeId)
+                // let perform = await this.selectRegionFun(params,list[0].seatTypeId)
                 console.log("perform===",perform)
-                // let perform = {
-                //     money: 1,
-                //     name: '普通票'
-                // }
+                let perform = {
+                    money: params.salePrice,
+                    //name: params.goodsName,
+                    seatTypeId: params.seatTypeId,
+                    seatTypeName: params.seatTypeName,
+                }
                 let listCopy = []
                 let listCopy1 = []
                 list.forEach((item,index)=>{

+ 35 - 5
src/views/windowTicketSales/ticketingSales.vue

@@ -297,7 +297,8 @@ import LockSeat from './model/lockSeat.vue'
         lockObj: {
             auth: '',
             remark: ''
-        }
+        },
+        salePrice: null,
       };
     },
     created() {
@@ -612,6 +613,16 @@ import LockSeat from './model/lockSeat.vue'
                 }
             })
         },
+        /**  设置 票务 对应价格 */
+        changeSalePrice(value){
+            console.log("value=====",value)
+            this.salePrice = null
+            this.goodsPageListS.forEach((item,index)=>{
+                if(item.goodsId == value){
+                    this.salePrice = item.salePrice
+                }
+            })
+        },
         /** 搜索按钮操作 */
         handleQuery() {
             this.$refs.queryForm.validate((valid) => {
@@ -750,6 +761,7 @@ import LockSeat from './model/lockSeat.vue'
                     }
                 }
                 this.changePerformId(this.queryParams.timeId)
+                this.changeSalePrice(this.queryParams.goodsId)
                 this.$refs.increaseViewers.initData(this.seatSelectList,{
                     ...this.queryParams,
                     performId:this.performId,
@@ -757,6 +769,9 @@ import LockSeat from './model/lockSeat.vue'
                     ifRealTeam: this.ifRealTeam,   // 团购是否实名:0否 1-是
                     oneMany: this.oneMany,   // 证件要求: 1一证一票,2一证多票
                     personnelNum: this.personnelNum,   // 人员要求:0-表示不限制 其他数字表示限制人数
+                    seatTypeId: this.seatSelectList[0].seatTypeId,
+                    seatTypeName: this.seatSelectList[0].seatTypeId,
+                    salePrice: this.salePrice
                 })
             }else {
                 this.$alert('请先选择座位!!!', '提示', {
@@ -832,8 +847,23 @@ import LockSeat from './model/lockSeat.vue'
                     clearTimeout(this.lckTime)
                 }
                 if(item.occupyStatus !== 0) {
-                    this.isLcokShow = false
-                    return
+                    if(item.channelType && item.channelType != 'window'){
+                        this.isLcokShow = true
+                        this.lockObj = {
+                            remark: `该座位仅限${ this.setChanneltype(row.channelType) }渠道购买!!!`,
+                            auth: ''
+                        }
+                        this.lockStyle = {
+                            position: "fixed",
+                            top: (e.y + 10) + 'px',
+                            left: (e.x + 10)+ 'px',
+                            zIndex: 999999
+                        }
+                        return
+                    }else {
+                        this.isLcokShow = false
+                        return
+                    }
                 }
                 if(item.id == this.seatId){ return }
                 this.seatId = item.id
@@ -857,11 +887,11 @@ import LockSeat from './model/lockSeat.vue'
                             zIndex: 999999
                         }
                     } else {
-                        this.handleClose()
+                        //this.handleClose()
                     }
                 },500)
             } catch (error) {
-                this.handleClose()
+                //this.handleClose()
             }
         },
         lockOrUnLockDeatilFun1() {