Ver Fonte

1. 优化

MONSTER-ygh há 1 ano atrás
pai
commit
0bfc250bb8

+ 1 - 1
src/views/officesale/model/increaseViewers.vue

@@ -221,7 +221,7 @@
     
     <span slot="footer" class="dialog-footer">
         <el-button @click="handleClose()">取 消</el-button>
-        <el-button v-if="!orderId&&!payStatus" :loading="loading" type="primary" @click="submitForm('ruleForm11')">确认打印</el-button>
+        <el-button v-if="!orderId&&!payStatus" :loading="loading" type="primary" @click="submitForm('ruleForm11')">确认生成订单</el-button>
     </span>
     </el-dialog>
 </template>

+ 17 - 5
src/views/officesale/ticketingSales.vue

@@ -90,17 +90,17 @@
                             <div
                            
                             class="seat-item-class-box" 
-                            v-for="(item1, index1) in Object.keys(seatMapList)" 
-                            :key="index1"
+                            v-for="(item1, index1) in seatMapListKey" 
+                            :key="item1.key"
                             >
                                 <div 
                                 class="seat-item-class" 
-                                :class="item.occupyStatus==0?'occupy-status': item.occupyStatus==1?'occupy-status-no':item.isDisabled || item.status == 2 ? 'disabled-class' : item.isSelect ? 'select-class' : ''"
-                                v-for="(item, index) in seatMapList[item1]" 
+                                :class="item.occupyStatus==0?'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)" 
                                 :key="index">
-                                    <p class="text-class">{{ item.status == 2 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
+                                    <p class="text-class">{{ item.status != 1 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
                                 </div>
                             </div>
                     </div>
@@ -202,6 +202,7 @@
         goodsPageListSAll: [], // 票务全部
         setList: [],
         seatMapList: [],
+        seatMapListKey: [], // key
         seatSelectList: [],
 
         lockOrUnLockLoading: false,
@@ -213,6 +214,7 @@
         justifyContent: false,
         activeName: 'first',
         seatTypeList: [],
+        
       };
     },
     created() {
@@ -356,11 +358,21 @@
                 })
                 let width = 0
                 let flog = 0
+                let seatMapListKey = []
                 Object.keys(listCopy).forEach((item)=>{
                     if(listCopy[item].length>flog) {
                         flog = listCopy[item].length
                     }
+                    seatMapListKey.push({
+                        key: item,
+                        sort: Number(item.replace('my',''))
+                    })
+                })
+                seatMapListKey.sort((a,b)=>{
+                    return a.sort - b.sort
                 })
+                this.seatMapListKey = seatMapListKey
+                console.log("seatMapListKey=====",seatMapListKey)
                 this.width = 70*flog
                 this.$nextTick(()=>{
                     if(this.$refs.seatbox) {

+ 10 - 3
src/views/venue/performanceHallMr/model/seatManagementTable.vue

@@ -28,12 +28,17 @@
         <div class="sm-box">
             <!-- v-dragSelect="dragSelectObj" -->
             <div class="sm-scroll-box"
-            
             @mousedown="downDiv" 
             @mousemove="moveDiv" 
             @mouseup="upDiv"
             >
                 <el-table
+                    v-dragSelect="{
+                        selectClass: ['.row-item'],
+                        change: dragSelectChange,
+                        lostItem: dragLostItemChange,
+                        reSelect: reSelect,
+                    }"
                     :data="tableData"
                     width="100%"
                     height="100%"
@@ -60,7 +65,7 @@
                         v-if="tableHeader.length!=0"
                         :width="50">
                             <template slot-scope="scope">
-                                <span>{{ scope.$index + 1 }}#</span>
+                                <span style="width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;">{{ scope.$index + 1 }}#</span>
                             </template>
                         </el-table-column>
                         <el-table-column
@@ -577,7 +582,7 @@ export default {
     },
     mounted() {
         // 拖拽事件
-        this.columnDrop() 
+        //this.columnDrop() 
 
         this.$dragging.$on("dragged", (result) => {
             // 将排序后的结果重新赋值
@@ -623,6 +628,8 @@ export default {
             this.selectList = []
             this.selectTabelList = []
             this.multipleSelection_1 = []   
+
+            this.availableSeat = 0
         },
         /**  初始化数据  */
         async initData(row,list,type){