소스 검색

Merge branch 'master' of http://dzgogs.hw.hongweisoft.com/great_transition/great_webui

gcz 11 달 전
부모
커밋
a1ca72ceb8

BIN
src/assets/jinzhi_1.png


+ 52 - 5
src/views/officesale/mixins/selectList.js

@@ -149,7 +149,7 @@ export default {
                     listCopy.push(list[i].getAttribute("dragSelectId"));
                 }
             }
-            let listCopy1 = []
+            let listCopy1 = [] // 已选择的座位
             listCopy.forEach((item,index)=>{
                 this.setList.forEach((item1,index1)=>{
                     if(item == item1.id ) {
@@ -159,15 +159,26 @@ export default {
             })
             let flog = false;
             let seatTypeId = null
+            let occupyStatus = listCopy1.length>0?listCopy1[0].occupyStatus:null
             for(let i = 0; i<listCopy1.length; i++) {
                 let row = listCopy1[i]
-                if(row.occupyStatus == 0) {
-                    this.$message.error('不能选择已锁定的座位');
+                console.log("occupyStatus====",occupyStatus,row.occupyStatus)
+                if(row.occupyStatus != occupyStatus) {
+                    this.$message.error('不能同时选择不同状态的座位!!!');
                     flog = true
                     break;
                 }
+                
+                occupyStatus = row.occupyStatus
+                
+                
+                // if(row.occupyStatus == 0) {
+                //     this.$message.error('不能选择已锁定的座位');
+                //     flog = true
+                //     break;
+                // }
                 if(row.isDisabled || row.status == 2) {
-                    this.$message.error('不能选择已售或不可售座位');
+                    this.$message.error('不能选择已售或不可售座位!!!');
                     flog = true
                     break;
                 }
@@ -175,6 +186,35 @@ export default {
             if(flog){
                 return
             }
+
+            if(this.seatSelectListNo.length>0) {
+                for(let i = 0; i<listCopy1.length; i++) {
+                    let row = listCopy1[i]
+                    if(row.occupyStatus != 0) {
+                        this.$message.error('你已选择锁定座位,只能再选择被锁定的座位!!!');
+                        flog = true
+                        break;
+                    }
+                }
+            }
+            if(flog){
+                return
+            }
+
+            if(this.seatSelectList.length>0) {
+                for(let i = 0; i<listCopy1.length; i++) {
+                    let row = listCopy1[i]
+                    if(row.occupyStatus == 0) {
+                        this.$message.error('此座已被锁定,请先解锁!!!');
+                        flog = true
+                        break;
+                    }
+                }
+            }
+            if(flog){
+                return
+            }
+
             listCopy1.forEach((item,index)=>{
                 if(index == 0) {
                     seatTypeId = item.seatTypeId
@@ -221,7 +261,13 @@ export default {
                     listCopy2.push(item)
                 }
             })
-            this.seatSelectList = this.seatSelectList.concat(listCopy2)
+
+            if(occupyStatus == 0){
+                this.seatSelectListNo = this.seatSelectListNo.concat(listCopy2)
+            }else {
+                this.seatSelectList = this.seatSelectList.concat(listCopy2)
+            }
+            
             this.$forceUpdate()
             console.log("listCopy===",listCopy)
             console.log("listCopy1===",listCopy1)
@@ -234,6 +280,7 @@ export default {
                 })
             })
             this.seatSelectList = [] 
+            this.seatSelectListNo = []
             this.$forceUpdate()
         },
         /** 滚动的位置  */

+ 127 - 23
src/views/officesale/ticketingSales.vue

@@ -123,7 +123,7 @@
                             >
                                 <div 
                                 class="seat-item-class" 
-                                :class="item.occupyStatus==0?'occupy-status': item.occupyStatus==1?'occupy-status-no':item.isDisabled || item.status != 1 ? 'disabled-class' : item.isSelect ? 'select-class' : ''"
+                                :class="item.occupyStatus==0?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' : ''"
                                 v-for="(item, index) in seatMapList[item1.key]" 
                                 :style="{backgroundColor: item.color ? item.color : 'none'}"
                                 @click.stop="seatClick(item)" 
@@ -145,12 +145,14 @@
             </div>
             <div style="margin-top: 5px; margin-left: 30px;display: flex;">
                 <div style="flex-shrink: 0;">
-                    已勾选:{{ seatSelectList.length }}个座位
+                    <span>已勾选(需购买):{{ seatSelectList.length }}个座位</span>
+                    ——
+                    <span>已勾选(需解锁):{{ seatSelectListNo.length }}个座位</span>
                     <el-button size="mini" type="warning"  @click="clearSeatSelectListAll">清空已选座位</el-button>
                 </div>
                 <div style="width: 100%;display: flex;justify-content: center;height: 30px;">
-                    <el-button size="mini" type="warning" :loading="lockOrUnLockLoading" @click="lockOrUnLockFun(seatSelectList,0)">锁定</el-button>
-                    <el-button size="mini" type="primary" @click="increaseViewersFun">预约</el-button>
+                    <el-button size="mini" type="warning" :loading="lockOrUnLockLoading" @click="lockOrUnLockFun(0)">{{ seatSelectListNo.length>0?'解锁':'锁定' }}</el-button>
+                    <el-button size="mini" type="primary" @click="increaseViewersFun">购票</el-button>
                 </div>
             </div>
             
@@ -199,6 +201,7 @@
   lockOrUnLock,
   merchantTheatreAuditoriumList,
   goodsPageList,
+  getGoodsPerformApi
  } from '@/api/windowTicketSales/ticketingSales'
  import increaseViewers from "./model/increaseViewers"
  import moment from "moment"
@@ -244,6 +247,7 @@
         seatMapList: {},
         seatMapListKey: [], // key
         seatSelectList: [],
+        seatSelectListNo: [], // 锁定的座位
 
         lockOrUnLockLoading: false,
 
@@ -253,8 +257,13 @@
         width: 0,
         justifyContent: false,
         activeName: 'first',
-        seatTypeList: [],
+        seatTypeList: [],   
         
+        // 限购条件
+        ifRealUser: 0,// 散客是否实名:0-否 1-是
+        ifRealTeam: 0,// 团购是否实名:0否 1-是
+        oneMany: 0,// 证件要求: 1一证一票,2一证多票
+        personnelNum: 0,// 人员要求:0-表示不限制 其他数字表示限制人数
       };
     },
     created() {
@@ -323,8 +332,13 @@
             }
         },
         /**  座位锁定/解锁  */
-        async lockOrUnLockFun(listS,type){
+        async lockOrUnLockFun(type){
             try {
+                let listS = this.seatSelectListNo.length>0 ? this.seatSelectListNo : this.seatSelectList
+                if(listS.length<=0) {
+                    this.$message.error(`请选择锁定的座位!!!`);
+                    return
+                }
                 this.lockOrUnLockLoading = true
                 let list = []
                 listS.forEach((item,index)=>{
@@ -368,6 +382,7 @@
                 this.scrollLeft = 0
                 if(type) { // 是否清除已选
                     this.seatSelectList = []
+                    this.seatSelectListNo = []
                 }
                 this.seatMapList = {}
                 this.seatList = []
@@ -397,11 +412,11 @@
                     listNum[index]['num'] = 0 
                 })
                 list.forEach(item => {
-                    item.isDisabled = (item.occupyStatus != null && (item.occupyStatus == 0 || item.occupyStatus == 1) ? true : false); // 座位是否已被选择
+                    item.isDisabled = item.occupyStatus == 1 ? true : false //(item.occupyStatus != null && (item.occupyStatus == 0 || item.occupyStatus == 1) ? true : false); // 座位是否已被选择
                     item.isSelect = this.setIsSelect(item);
                     if(item.rowNo){
                         listNum.forEach((item1,index)=>{
-                            if(item1.id == item.seatTypeId && item.status ==1 && !item.occupyStatus && item.occupyStatus !=0) {
+                            if(item1.id == item.seatTypeId && item.status ==1 && !item.occupyStatus && item.occupyStatus !=0 ) {
                                 listNum[index]['num'] = listNum[index]['num'] + 1 
                             }
                         })
@@ -494,8 +509,6 @@
                     this.goodsPageListS = []
                 }
             }
-
-
             this.changeTimeCheck(value,type)
 
         },
@@ -513,8 +526,17 @@
                 //  获取场次
                 this.merchantPerformTimeListFun()
             }
+            if(type == 'goodsId'){
+                this.getGoodsPerformFun(value)
+            }else {
+                this.ifRealUser = 0  // 散客是否实名:0-否 1-是
+                this.ifRealTeam = 0   // 团购是否实名:0否 1-是
+                this.oneMany = 1   // 证件要求: 1一证一票,2一证多票
+                this.personnelNum = 0   // 人员要求:0-表示不限制 其他数字表示限制人数
+            }
             this.performId = ''
             this.seatSelectList = []
+            this.seatSelectListNo = []
             this.seatMapList = {}
             this.seatList = []
             this.handleQuery()
@@ -547,6 +569,7 @@
             this.$refs.queryForm.resetFields()
             this.performId = ''
             this.seatSelectList = []
+            this.seatSelectListNo = []
             this.seatMapList = {}
             this.seatList = []
             this.handleQuery();
@@ -556,17 +579,39 @@
         // 座位点击事件
         seatClick(row) {
             console.log("是的发给我大是个的风格====",row)
+            if(row.isDisabled || row.status == 2){
+                return false
+            }
+            if(this.seatSelectListNo.length>0 && row.occupyStatus != 0) {
+                this.$message.error('你已选择锁定座位,只能再选择被锁定的座位!!!');
+                return
+            }
+            if(this.seatSelectList.length > 0 && row.occupyStatus == 0){
+                this.$message.error('此座已被锁定,请先解锁!!!');
+                return
+            }
             if(row.occupyStatus == 0){
-                console.log("weqwrwerewrer")
-                this.$confirm('此座已被锁定,请先解锁', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    this.lockOrUnLockFun([row],1)
-                }).catch((error) => {
-                    console.log("error====",error)
-                });
+                // console.log("weqwrwerewrer")
+                // this.$confirm('此座已被锁定,请先解锁', '提示', {
+                //     confirmButtonText: '确定',
+                //     cancelButtonText: '取消',
+                //     type: 'warning'
+                // }).then(() => {
+                //     this.lockOrUnLockFun([row],1)
+                // }).catch((error) => {
+                //     console.log("error====",error)
+                // });
+                row.isSelect = !row.isSelect
+                if(row.isSelect){
+                    this.seatSelectListNo.push(JSON.parse(JSON.stringify(row)))
+                }else {
+                    let list = JSON.parse(JSON.stringify(this.seatSelectListNo))
+                    list.forEach((item,index)=>{
+                        if(item.id == row.id) {
+                            this.seatSelectListNo.splice(index, 1)
+                        }
+                    })
+                }
             }else if(row.isDisabled || row.status == 2){
                 return false
             }else {
@@ -626,10 +671,23 @@
         },
         increaseViewersFun(){
             if(this.seatSelectList.length>0){
+                if(this.ifRealUser != 0 || this.ifRealTeam != 0 ) {
+                    if(this.personnelNum != 0) {
+                        if( this.seatSelectList.length != this.personnelNum ) {
+                            this.$message.error(`票务类型设置了实名要求,选择人数为${ this.personnelNum }人`);
+                            return
+                        }
+                    }
+                }
+
                 this.changePerformId(this.queryParams.timeId)
                 this.$refs.increaseViewers.initData(this.seatSelectList,{
                     ...this.queryParams,
-                    performId:this.performId
+                    performId:this.performId,
+                    ifRealUser: this.ifRealUser,  // 散客是否实名:0-否 1-是
+                    ifRealTeam: this.ifRealTeam,   // 团购是否实名:0否 1-是
+                    oneMany: this.oneMany,   // 证件要求: 1一证一票,2一证多票
+                    personnelNum: this.personnelNum,   // 人员要求:0-表示不限制 其他数字表示限制人数
                 })
             }else {
                 this.$alert('请先选择座位!!!', '提示', {
@@ -672,6 +730,32 @@
 
             return srt
         },
+
+        //  获取限购标准
+        async getGoodsPerformFun(id){
+            try {
+                let res = await getGoodsPerformApi({
+                    goodsId: id
+                })
+                if(res.code == 200) {
+                    this.ifRealUser = res.data.ifRealUser  // 散客是否实名:0-否 1-是
+                    this.ifRealTeam = res.data.ifRealTeam   // 团购是否实名:0否 1-是
+                    this.oneMany = res.data.oneMany   // 证件要求: 1一证一票,2一证多票
+                    this.personnelNum = res.data.personnelNum   // 人员要求:0-表示不限制 其他数字表示限制人数
+                }else {
+                    this.ifRealUser = 0  // 散客是否实名:0-否 1-是
+                    this.ifRealTeam = 0   // 团购是否实名:0否 1-是
+                    this.oneMany = 1   // 证件要求: 1一证一票,2一证多票
+                    this.personnelNum = 0   // 人员要求:0-表示不限制 其他数字表示限制人数 
+                }
+                
+            } catch (error) {
+                this.ifRealUser = 0  // 散客是否实名:0-否 1-是
+                this.ifRealTeam = 0   // 团购是否实名:0否 1-是
+                this.oneMany = 1   // 证件要求: 1一证一票,2一证多票
+                this.personnelNum = 0   // 人员要求:0-表示不限制 其他数字表示限制人数
+            }
+        }
     }   
   };
   </script>
@@ -846,7 +930,7 @@
         height:100%;
         background-color:rgba(0,0,0,0.3);
         z-index:-1;
-        background-image: url('../../assets/jinzhi.png');
+        background-image: url('../../assets/jinzhi_1.png');
         background-size: 50% 50%;
         background-position: 50% 50%;
         background-repeat: no-repeat;
@@ -855,12 +939,32 @@
       .occupy-status {
         //pointer-events: none;
       }
+      .occupy-status-select {
+        border: 5px solid #ff182f !important;
+      }
       .occupy-status-no {
-        background-color: #f56c6c !important;
+        //background-color: #f56c6c !important;
         user-select: none;
         // pointer-events: none;
         cursor: not-allowed !important;
+        position: relative;
       }
+      .occupy-status-no: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/jinzhi.png');
+            background-size: 50% 50%;
+            background-position: 50% 50%;
+            background-repeat: no-repeat;
+            z-index: 99;
+        }
       .seat-item-class-box {
         width: 100%;
         display: flex;

+ 12 - 14
src/views/order/groupBuyingMr/dialog/details.vue

@@ -76,11 +76,21 @@
           <el-col :span="12">
             <div class="grid-content bg-purple item-class">支付时间: <span>{{ form.payTime || '' }}</span></div>
           </el-col>
-          <el-col :span="12">
+          <!-- <el-col :span="12">
             <div class="grid-content bg-purple item-class">支付方式: <span>{{ payWayList[form.payWay] || '' }}</span></div>
           </el-col>
           <el-col :span="12">
             <div class="grid-content bg-purple item-class">订单状态: <span>{{ statusList[form.status] || '' }}</span></div>
+          </el-col> -->
+          <el-col :span="12">
+            <div class="grid-content bg-purple item-class" style="display: flex;">支付方式: <span
+                style="display: block;margin-left: 5px;"><dict-tag :options="dict.type.pay_way_type"
+                  :value="form.payWay" /></span></div>
+          </el-col>
+          <el-col :span="12">
+            <div class="grid-content bg-purple item-class" style="display: flex;">订单状态: <span
+                style="display: block;margin-left: 5px;"><dict-tag :options="dict.type.order_status_type"
+                  :value="form.status" /></span></div>
           </el-col>
           <el-col :span="12">
             <div class="grid-content bg-purple item-class" style="display: flex;">是否成功开票: <span style="display: block;margin-left: 5px;">{{ form.ifSuccessInvoice=='1'?'是':'否'  }}</span></div>
@@ -190,12 +200,7 @@ import { querySeatList } from '@/api/team/applicationMr'
 import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
 export default {
   name: "detailsDia",
-  props: {
-    dict: {
-      type: Object,
-      default: () => [],
-    },
-  },
+  dicts: ['order_form_type', 'order_status_type', 'pay_way_type', 'personnel_type'],
   data() {
     return {
       title: "编辑",
@@ -220,13 +225,6 @@ export default {
         8: '己超期',
         9: '关闭',
       },
-      payList: {
-        0: '未支付',
-        1: '已支付',
-        2: '支付中',
-        3: '支付失败',
-        4: '支付退款',
-      },
       payWayList: {
         'cahsh': '现金',
         'wecaht.applet': '微信小程序支付',

+ 33 - 8
src/views/order/groupBuyingMr/index.vue

@@ -152,10 +152,10 @@
       </el-row>
       <div class="app-container-table-info">
         <el-table ref="tables" v-loading="loading" height="100%" :data="dataList" border>
-          <el-table-column label="序号" align="center" fixed="left" type="index" width="60"></el-table-column>
-          <el-table-column label="订单号" align="center" fixed="left" prop="id" />
-          <el-table-column label="团队名称" align="center" fixed="left" prop="teamName" />
-          <el-table-column label="团队类型" align="center" fixed="left" prop="type">
+          <el-table-column label="序号" align="center" :fixed="fixed" type="index" width="60"></el-table-column>
+          <el-table-column label="订单号" align="center" :fixed="fixed" prop="id" />
+          <el-table-column label="团队名称" align="center" :fixed="fixed" prop="teamName" />
+          <el-table-column label="团队类型" align="center" :fixed="fixed" prop="type">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.team_type" :value="scope.row.teamType"/>
             </template>
@@ -243,7 +243,7 @@
                 v-hasPermi="['groupBuyingMr:groupBuyingMr:details']"
               >详情</el-button>
               <el-button
-              v-if="scope.row.status===0"
+              v-if="scope.row.payWay == 'corporate'"
                 size="mini"
                 type="text"
                 @click="handleCorporatePay(scope.row)"
@@ -306,7 +306,7 @@
         width="50%"
         @close="handleCorporatePayClose"
         :before-close="handleCorporatePayClose">
-        <el-form :model="ruleForm" :rules="corporatePayRules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+        <el-form v-loading="corporatePayLoading" :model="ruleForm" :rules="corporatePayRules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
           <el-form-item label="凭证上传" prop="photoList" required>
             <el-upload
                 ref="upload"
@@ -343,6 +343,7 @@ import { orderInfoCancel } from '@/api/windowTicketSales/ticketingSales';
 import detailsDia from "./dialog/details.vue";
 
 import { printApi } from '@/api/order/orderMr'
+import { getSelectById } from '@/api/order/groupBuyingMr'
 import { pageList as getPrintListApi } from "@/api/device/pda";
 import { pagePerformTimeList } from "@/api/schedulingMr/schedulingMr"
 import { exportExcel } from '@/utils/exportexcel'
@@ -470,6 +471,7 @@ export default {
       handleExportLoading: false,
       pagePerformTimeList: [], // 场次列表
       multiPerformDate:false,
+      fixed: 'left',
     };
   },
   created() {
@@ -483,6 +485,11 @@ export default {
         const { width, height } = entry.contentRect;
         this.qHeight = height + 'px'
       }
+      if(document.body.clientWidth<765) {
+        this.fixed = false
+      }else {
+        this.fixed = 'left'
+      }
     });
     this.resizeObserver.observe(this.$refs.queryFormBox);
   },
@@ -651,10 +658,28 @@ export default {
             this.dialogVisibleLoading = false
           })
         },
-        handleCorporatePay(row){
+        async handleCorporatePay(row){
           console.log('corporatePay',row);
-          this.form.orderId = row.id;
           this.showCorporatePay = true;
+          this.corporatePayLoading = true;
+          let res = await getSelectById(row.id)
+          this.form.orderId = row.id;
+          if(res.data.corporate){
+            let urlList = res.data.corporate.voucherUrl.split(',')||[]
+            let urlListObj = []
+            urlList.forEach((item,index)=>{
+              urlListObj.push({
+                name: 'url_'+index,
+                url: item
+              })
+            })
+            this.$set(this.form,'photoList',urlListObj)
+            this.$set(this.form.corporate,'remark',res.data.corporate.remark)
+          }else {
+            this.$set(this.form,'photoList',[])
+            this.$set(this.form.corporate,'remark','')
+          }
+          this.corporatePayLoading = false;
 
         },
         handleCorporatePayClose(){

+ 13 - 7
src/views/order/orderMr/index.vue

@@ -194,13 +194,13 @@
       </el-row>
       <div class="app-container-table-info">
         <el-table ref="tables" height="100%" v-loading="loading" :data="dataList" border>
-          <el-table-column label="序号" align="center" fixed="left" type="index" width="60"></el-table-column>
-          <el-table-column label="订单号" align="center" fixed="left" prop="id" />
-          <el-table-column label="购票人手机号" align="center" fixed="left" prop="memberMobile" />
-          <el-table-column label="剧目名称" align="center" fixed="left" prop="performName" />
-          <el-table-column label="票务名称" align="center" fixed="left" prop="goodsName" />
-          <el-table-column label="座位类型" align="center" fixed="left" prop="seatTypeName" />
-          <el-table-column label="购票渠道" align="center" fixed="left" prop="source">
+          <el-table-column label="序号" align="center" :fixed="fixed" type="index" width="60"></el-table-column>
+          <el-table-column label="订单号" align="center" :fixed="fixed" prop="id" />
+          <el-table-column label="购票人手机号" align="center" :fixed="fixed" prop="memberMobile" />
+          <el-table-column label="剧目名称" align="center" :fixed="fixed" prop="performName" />
+          <el-table-column label="票务名称" align="center" :fixed="fixed" prop="goodsName" />
+          <el-table-column label="座位类型" align="center" :fixed="fixed" prop="seatTypeName" />
+          <el-table-column label="购票渠道" align="center" :fixed="fixed" prop="source">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.order_form_type" :value="scope.row.source"/>
             </template>
@@ -400,6 +400,7 @@ export default {
         },
         dialogVisibleLoading: false,
         multiPerformDate:false,
+        fixed: 'left',
     };
   },
   created() {
@@ -413,6 +414,11 @@ export default {
         const { width, height } = entry.contentRect;
         this.qHeight = height + 'px'
       }
+      if(document.body.clientWidth<765) {
+        this.fixed = false
+      }else {
+        this.fixed = 'left'
+      }
     });
     this.resizeObserver.observe(this.$refs.queryFormBox);
   },

+ 13 - 7
src/views/order/viewers/index.vue

@@ -96,14 +96,14 @@
           <el-table-column
           :selectable="isSelectableFun"
           type="selection"
-          fixed="left"
+          :fixed="fixed"
           width="55"></el-table-column>
-          <el-table-column label="订单号" fixed="left" align="center" prop="orderId" />
-          <el-table-column label="观影人名称" fixed="left" align="center" prop="name" />
-          <el-table-column label="身份证号" fixed="left" align="center" prop="idcard" />
-          <el-table-column label="票务名称" fixed="left" align="center" prop="goodsName" />
-          <el-table-column label="座位类型" fixed="left" align="center" prop="seatTypeName" />
-          <el-table-column label="购买渠道" fixed="left" align="center" prop="source">
+          <el-table-column label="订单号" :fixed="fixed" align="center" prop="orderId" />
+          <el-table-column label="观影人名称" :fixed="fixed" align="center" prop="name" />
+          <el-table-column label="身份证号" :fixed="fixed" align="center" prop="idcard" />
+          <el-table-column label="票务名称" :fixed="fixed" align="center" prop="goodsName" />
+          <el-table-column label="座位类型" :fixed="fixed" align="center" prop="seatTypeName" />
+          <el-table-column label="购买渠道" :fixed="fixed" align="center" prop="source">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.order_form_type" :value="scope.row.source" />
             </template>
@@ -400,6 +400,7 @@ export default {
       refundSubmitError: [], // 失败条数
       refundSubmitErrorList: [], //
       multiPerformDate:false,
+      fixed: 'left',
     };
   },
   created() {
@@ -416,6 +417,11 @@ export default {
         const { width, height } = entry.contentRect;
         this.qHeight = height + 'px'
       }
+      if(document.body.clientWidth<765) {
+        this.fixed = false
+      }else {
+        this.fixed = 'left'
+      }
     });
     this.resizeObserver.observe(this.$refs.queryFormBox);
   },

+ 52 - 5
src/views/windowTicketSales/mixins/selectList.js

@@ -149,7 +149,7 @@ export default {
                     listCopy.push(list[i].getAttribute("dragSelectId"));
                 }
             }
-            let listCopy1 = []
+            let listCopy1 = [] // 已选择的座位
             listCopy.forEach((item,index)=>{
                 this.setList.forEach((item1,index1)=>{
                     if(item == item1.id ) {
@@ -159,15 +159,26 @@ export default {
             })
             let flog = false;
             let seatTypeId = null
+            let occupyStatus = listCopy1.length>0?listCopy1[0].occupyStatus:null
             for(let i = 0; i<listCopy1.length; i++) {
                 let row = listCopy1[i]
-                if(row.occupyStatus == 0) {
-                    this.$message.error('不能选择已锁定的座位');
+                console.log("occupyStatus====",occupyStatus,row.occupyStatus)
+                if(row.occupyStatus != occupyStatus) {
+                    this.$message.error('不能同时选择不同状态的座位!!!');
                     flog = true
                     break;
                 }
+                
+                occupyStatus = row.occupyStatus
+                
+                
+                // if(row.occupyStatus == 0) {
+                //     this.$message.error('不能选择已锁定的座位');
+                //     flog = true
+                //     break;
+                // }
                 if(row.isDisabled || row.status == 2) {
-                    this.$message.error('不能选择已售或不可售座位');
+                    this.$message.error('不能选择已售或不可售座位!!!');
                     flog = true
                     break;
                 }
@@ -175,6 +186,35 @@ export default {
             if(flog){
                 return
             }
+
+            if(this.seatSelectListNo.length>0) {
+                for(let i = 0; i<listCopy1.length; i++) {
+                    let row = listCopy1[i]
+                    if(row.occupyStatus != 0) {
+                        this.$message.error('你已选择锁定座位,只能再选择被锁定的座位!!!');
+                        flog = true
+                        break;
+                    }
+                }
+            }
+            if(flog){
+                return
+            }
+
+            if(this.seatSelectList.length>0) {
+                for(let i = 0; i<listCopy1.length; i++) {
+                    let row = listCopy1[i]
+                    if(row.occupyStatus == 0) {
+                        this.$message.error('此座已被锁定,请先解锁!!!');
+                        flog = true
+                        break;
+                    }
+                }
+            }
+            if(flog){
+                return
+            }
+
             listCopy1.forEach((item,index)=>{
                 if(index == 0) {
                     seatTypeId = item.seatTypeId
@@ -221,7 +261,13 @@ export default {
                     listCopy2.push(item)
                 }
             })
-            this.seatSelectList = this.seatSelectList.concat(listCopy2)
+
+            if(occupyStatus == 0){
+                this.seatSelectListNo = this.seatSelectListNo.concat(listCopy2)
+            }else {
+                this.seatSelectList = this.seatSelectList.concat(listCopy2)
+            }
+            
             this.$forceUpdate()
             console.log("listCopy===",listCopy)
             console.log("listCopy1===",listCopy1)
@@ -234,6 +280,7 @@ export default {
                 })
             })
             this.seatSelectList = [] 
+            this.seatSelectListNo = []
             this.$forceUpdate()
         },
         /** 滚动的位置  */

+ 70 - 17
src/views/windowTicketSales/ticketingSales.vue

@@ -123,7 +123,7 @@
                             >
                                 <div 
                                 class="seat-item-class" 
-                                :class="item.occupyStatus==0?'occupy-status': item.occupyStatus==1?'occupy-status-no':item.isDisabled || item.status != 1 ? 'disabled-class' : item.isSelect ? 'select-class' : ''"
+                                :class="item.occupyStatus==0?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' : ''"
                                 v-for="(item, index) in seatMapList[item1.key]" 
                                 :style="{backgroundColor: item.color ? item.color : 'none'}"
                                 @click.stop="seatClick(item)" 
@@ -145,11 +145,13 @@
             </div>
             <div style="margin-top: 5px; margin-left: 30px;display: flex;">
                 <div style="flex-shrink: 0;">
-                    已勾选:{{ seatSelectList.length }}个座位
+                    <span>已勾选(需购买):{{ seatSelectList.length }}个座位</span>
+                    ——
+                    <span>已勾选(需解锁):{{ seatSelectListNo.length }}个座位</span>
                     <el-button size="mini" type="warning"  @click="clearSeatSelectListAll">清空已选座位</el-button>
                 </div>
                 <div style="width: 100%;display: flex;justify-content: center;height: 30px;">
-                    <el-button size="mini" type="warning" :loading="lockOrUnLockLoading" @click="lockOrUnLockFun(seatSelectList,0)">锁定</el-button>
+                    <el-button size="mini" type="warning" :loading="lockOrUnLockLoading" @click="lockOrUnLockFun(0)">{{ seatSelectListNo.length>0?'解锁':'锁定' }}</el-button>
                     <el-button size="mini" type="primary" @click="increaseViewersFun">购票</el-button>
                 </div>
             </div>
@@ -245,6 +247,7 @@
         seatMapList: {},
         seatMapListKey: [], // key
         seatSelectList: [],
+        seatSelectListNo: [], // 锁定的座位
 
         lockOrUnLockLoading: false,
 
@@ -329,8 +332,13 @@
             }
         },
         /**  座位锁定/解锁  */
-        async lockOrUnLockFun(listS,type){
+        async lockOrUnLockFun(type){
             try {
+                let listS = this.seatSelectListNo.length>0 ? this.seatSelectListNo : this.seatSelectList
+                if(listS.length<=0) {
+                    this.$message.error(`请选择锁定的座位!!!`);
+                    return
+                }
                 this.lockOrUnLockLoading = true
                 let list = []
                 listS.forEach((item,index)=>{
@@ -374,6 +382,7 @@
                 this.scrollLeft = 0
                 if(type) { // 是否清除已选
                     this.seatSelectList = []
+                    this.seatSelectListNo = []
                 }
                 this.seatMapList = {}
                 this.seatList = []
@@ -403,7 +412,7 @@
                     listNum[index]['num'] = 0 
                 })
                 list.forEach(item => {
-                    item.isDisabled = (item.occupyStatus != null && (item.occupyStatus == 0 || item.occupyStatus == 1) ? true : false); // 座位是否已被选择
+                    item.isDisabled = item.occupyStatus == 1 ? true : false //(item.occupyStatus != null && (item.occupyStatus == 0 || item.occupyStatus == 1) ? true : false); // 座位是否已被选择
                     item.isSelect = this.setIsSelect(item);
                     if(item.rowNo){
                         listNum.forEach((item1,index)=>{
@@ -527,6 +536,7 @@
             }
             this.performId = ''
             this.seatSelectList = []
+            this.seatSelectListNo = []
             this.seatMapList = {}
             this.seatList = []
             this.handleQuery()
@@ -559,6 +569,7 @@
             this.$refs.queryForm.resetFields()
             this.performId = ''
             this.seatSelectList = []
+            this.seatSelectListNo = []
             this.seatMapList = {}
             this.seatList = []
             this.handleQuery();
@@ -568,17 +579,39 @@
         // 座位点击事件
         seatClick(row) {
             console.log("是的发给我大是个的风格====",row)
+            if(row.isDisabled || row.status == 2){
+                return false
+            }
+            if(this.seatSelectListNo.length>0 && row.occupyStatus != 0) {
+                this.$message.error('你已选择锁定座位,只能再选择被锁定的座位!!!');
+                return
+            }
+            if(this.seatSelectList.length > 0 && row.occupyStatus == 0){
+                this.$message.error('此座已被锁定,请先解锁!!!');
+                return
+            }
             if(row.occupyStatus == 0){
-                console.log("weqwrwerewrer")
-                this.$confirm('此座已被锁定,请先解锁', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    this.lockOrUnLockFun([row],1)
-                }).catch((error) => {
-                    console.log("error====",error)
-                });
+                // console.log("weqwrwerewrer")
+                // this.$confirm('此座已被锁定,请先解锁', '提示', {
+                //     confirmButtonText: '确定',
+                //     cancelButtonText: '取消',
+                //     type: 'warning'
+                // }).then(() => {
+                //     this.lockOrUnLockFun([row],1)
+                // }).catch((error) => {
+                //     console.log("error====",error)
+                // });
+                row.isSelect = !row.isSelect
+                if(row.isSelect){
+                    this.seatSelectListNo.push(JSON.parse(JSON.stringify(row)))
+                }else {
+                    let list = JSON.parse(JSON.stringify(this.seatSelectListNo))
+                    list.forEach((item,index)=>{
+                        if(item.id == row.id) {
+                            this.seatSelectListNo.splice(index, 1)
+                        }
+                    })
+                }
             }else if(row.isDisabled || row.status == 2){
                 return false
             }else {
@@ -897,7 +930,7 @@
         height:100%;
         background-color:rgba(0,0,0,0.3);
         z-index:-1;
-        background-image: url('../../assets/jinzhi.png');
+        background-image: url('../../assets/jinzhi_1.png');
         background-size: 50% 50%;
         background-position: 50% 50%;
         background-repeat: no-repeat;
@@ -906,12 +939,32 @@
       .occupy-status {
         //pointer-events: none;
       }
+      .occupy-status-select {
+        border: 5px solid #ff182f !important;
+      }
       .occupy-status-no {
-        background-color: #f56c6c !important;
+        //background-color: #f56c6c !important;
         user-select: none;
         // pointer-events: none;
         cursor: not-allowed !important;
+        position: relative;
       }
+      .occupy-status-no: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/jinzhi.png');
+            background-size: 50% 50%;
+            background-position: 50% 50%;
+            background-repeat: no-repeat;
+            z-index: 99;
+        }
       .seat-item-class-box {
         width: 100%;
         display: flex;