瀏覽代碼

1. 优化

MONSTER-ygh 1 年之前
父節點
當前提交
06e7b8b22d

+ 7 - 2
src/views/ticket/ticketMr/index.vue

@@ -46,7 +46,12 @@
       </el-table-column>
       <el-table-column label="销售渠道" align="center">
         <template slot-scope="scope">
-          <span>{{ (scope.row.goodsPerform.channelWx == 0 ? '小程序' : '') + ' ' + (scope.row.goodsPerform.channelWindow == 0 ? '窗口' : '')}}</span>
+          <span>{{ 
+          (scope.row.goodsPerform.channelWx == 0 ? '小程序' : '') + 
+          ' ' + 
+          (scope.row.goodsPerform.channelWindow == 0 ? '窗口' : '') +
+          ' ' + 
+          (scope.row.goodsPerform.channelAutoSale == 0 ? '自助售/取票机' : '')}}</span>
         </template>
       </el-table-column>
       <el-table-column label="是否可退" align="center" prop="type">
@@ -121,7 +126,7 @@
 <script>
 
 import { pageList, deleteById, updateStatus } from '@/api/ticketMr/ticketMr'
-import addAndEdit from "./dialog/addAndEdit.vue";
+import addAndEdit from "./dialog/addAndEdit";
 import detailsDia from "./dialog/details.vue";
 
 export default {

+ 64 - 126
src/views/venue/performanceHallMr/dialog/seatTemplateEdit.vue

@@ -9,53 +9,58 @@
 -->
 <template>
   <el-dialog
-    :title="title"
     :visible.sync="open"
     width="90%"
     append-to-body
     :close-on-click-modal="false"
     @close="cancel"
     :fullscreen="dialogFull"
+    :show-close="false"
     class="ygh-dialog"
   >
     <template slot="title">
         <div class="avue-crud__dialog__header">
             <span class="el-dialog__title">
             <span style="display:inline-block;background-color: #3478f5;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
-              座位配置
+              {{ title }}
+            </span>
+          <div class="avue-crud__dialog__menu">
+            <span class="dialog-footer">
+              <el-button @click="cancel">关闭</el-button>
+              <el-button
+                type="primary"
+                @click="submitFormCopy"
+                v-loading.fullscreen.lock="loading"
+                element-loading-text="提交中..."
+                element-loading-spinner="el-icon-loading"
+                element-loading-background="rgba(0, 0, 0, 0.8)"
+              >
+                <span v-if="loading">提交中...</span>
+                <span v-else>保存</span>
+              </el-button>
+            </span>
+            <span style="margin-left: 40px;" @click="dialogFull? dialogFull=false: dialogFull=true">
+              <i size="" class="el-icon-full-screen"></i>
+            </span>
+            <span style="margin-left: 10px;" @click="cancel">
+              <i class="el-icon-close"></i>
             </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-            <i class="el-icon-full-screen"></i>
           </div>
         </div>
       </template>
-    <div class="dialog">
+    <div class="dialog-ygh">
+      <!--  座位管理器  -->
       <seatManagementTable
       ref="seatManagementTable"
-      @saveSeat="saveSeat"
+      @saveSeat="submitForm"
        />
     </div>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="cancel">取消</el-button>
-      <el-button
-        type="primary"
-        @click="submitFormCopy"
-        v-loading.fullscreen.lock="loading"
-        element-loading-text="提交中..."
-        element-loading-spinner="el-icon-loading"
-        element-loading-background="rgba(0, 0, 0, 0.8)"
-      >
-        <span v-if="loading">提交中...</span>
-        <span v-else>保存</span>
-      </el-button>
-    </span>
+    
   </el-dialog>
 </template>
 
 <script>
-import { pageList } from '@/api/seatTypeMr/seatTypeMr'
 import { seatSaveAndEdit, saveAndEdit, getSelectById } from "@/api/performanceHallMr/performanceHallMr";
-import { getToken } from "@/utils/auth";
 import seatManagementTable from "../model/seatManagementTable"
 export default {
   name: "seatTemplateEdit",
@@ -65,21 +70,14 @@ export default {
   },
   data() {
     return {
-      title: "编辑",
-      model: "EDIT",
-      activeName: '01',
-      open: false,
-      seatType: false,
+      title: "座位配置",
+      open: false, // 打开弹窗
       loading: false,
       seatWidth: null,
       seatMap: {
         row: 0,
         col: 0,
       },
-      seatMapRow: '',
-      seatMapCol: '',
-      seatSetMap: {},
-      seatTemplateMap: [],
       colSeatMap: {},
       form: {
         id: undefined,
@@ -105,13 +103,8 @@ export default {
       drawForm: {
         status: '1'
       },
-      drawDialogType: false,
-      drawRules: {
-        status: [{ required: true, message: "请选择状态", trigger: ["change","blur"] }],
-        seatTypeId: [{ required: true, message: "请选择座位类型", trigger: ["change","blur"] }]
-      },
 
-      dialogFull: false,
+      dialogFull: false, // 全屏状态
     };
   },
   methods: {
@@ -122,30 +115,18 @@ export default {
      * @returns {any}
      */
     openDialog(title, obj) {
+      console.log('obj====',obj)
       this.open = true;
-      this.seatType = false;
-      this.getSeatTypeList();
       this.colSeatMap = {}
-      this.drawForm = {};
-      this.$set(this.drawForm, 'status', '1')
       this.boxWidth = 0;
       this.dragStatus = true;
       this.$set(this.form, 'status', '1')
       if (obj){ // 编辑模式
         this.title = "座位模板";
-        this.auditoriumId = obj.id;
-        this.$set(this.seatMap, 'row', obj.rows);
-        this.$set(this.seatMap, 'col', obj.cols);
-        this.$set(this, 'seatMapRow', obj.rows);
-        this.$set(this, 'seatMapCol', obj.cols);
-        let tableHeader = []
-        this.getSelectByIdApi(obj)
+        this.auditoriumId = obj.id; //  演出厅 ID
+        this.getSelectByIdApi(obj) // 获取座位
       }else{ // 新增模式
-        this.seatType = true;
         this.title = "座位模板";
-        this.$nextTick(() => {
-          //this.$refs["form"].clearValidate();
-        });
       }
     },
     /** 获取详情 */
@@ -160,24 +141,11 @@ export default {
             }
             this.$set(this.colSeatMap, item.sortId + '_', item);
           })
-          this.seatType = true;
           this.$refs.seatManagementTable.initData(row,dataList,'edit')
         })
       });
     },
-    /** 座位类型列表 */
-    getSeatTypeList() {
-      pageList(this.addDateRange({pageNum: 1, pageSize: 100}))
-        .then(response => {
-            this.seatList = response.data.rows;
-          }
-        );
-    },
-    /**  保存  */
-    saveSeat(list,style){
-      console.log("list,style====",list,style)
-      this.submitForm(list,style)
-    },
+    /**  调用 座位保存功能   */
     submitFormCopy(){
       this.$refs.seatManagementTable.saveSeat()
     },
@@ -186,91 +154,55 @@ export default {
      * @date 2023-11-22
      * @returns {any}
      */
-    async submitForm(list,style) {
-      let that = this;
-      let postList = []
-          for (const codeKey in this.colSeatMap) {
-            postList.push(this.colSeatMap[codeKey])
-          }
-          try {
+    async submitForm(rowAll,colsAll,list,style) {
+      console.log('rowAll,colsAll,list,style===',rowAll,colsAll,list,style)
+      try {
             this.loading = true;
             /**  保存行号  */
             const { code } = await saveAndEdit({ 
               id: this.auditoriumId, 
-              rows: this.seatMap.row, 
-              cols: this.seatMap.col,
+              rows: rowAll, 
+              cols: colsAll,
               styleCss: style
             });
             if (code === 200) {
-              let postList = []
-              for (const codeKey in this.colSeatMap) {
-                postList.push(this.colSeatMap[codeKey])
-              }
+              let listCopy = []
+              list.forEach((item,index)=>{
+                listCopy.push({
+                  ...item,
+                  auditoriumId: this.auditoriumId
+                })
+              })
               /**  保存座位  */
-              //const { code } = await seatSaveAndEdit(postList);
-              const { code } = await seatSaveAndEdit(list);
+              const { code } = await seatSaveAndEdit(listCopy);
               if (code === 200) {
-                that.$message.success("操作成功!");
-                that.$emit("getList");
-                that.cancel();
+                this.$message.success("操作成功!");
+                this.$emit("getList");
+                this.cancel();
               }
             }
           } catch (error) {
+            console.error("error===",error)
           } finally {
             this.loading = false;
           }
     },
-    /**
-     * 重置
-     * @date 2023-11-22
-     * @returns {any}
-     */
-    reset() {
-      //this.$refs["form"].resetFields();
-      this.form.id = undefined;
-    },
     /**
      * 关闭弹框
      * @date 2023-11-22
      * @returns {any}
      */
     cancel() {
-      this.reset();
       this.open = false;
     },
-    /**
-     * 上传成功
-     * @date 2023-11-22
-     * @param {any} res
-     * @returns {any}
-     */
-    handleAvatarSuccess(res) {
-      if (res.code === 200) {
-        // this.form.mainImg = res?.data?.url;
-        this.$set(this.form, 'mainImg', res?.data?.url)
-      }
-    },
-    /**
-     * 上传文件之前之前
-     * @date 2023-11-22
-     * @param {any} file
-     * @returns {any}
-     */
-    beforeAvatarUpload(file) {
-      const isJPG = file.type === "image/jpeg" || "image/png";
-      if (!isJPG) {
-        this.$message.error("上传头像图片只能是jpg或png格式!");
-      }
-      return isJPG;
-    },
   },
 };
 </script>
 
 <style lang="scss" scoped>
-.dialog {
-  padding: 0 30px;
-  max-height: 75vh;
+.dialog-ygh {
+  // padding: 0 30px;
+  height: calc( 100vh - 20vh );
   overflow-y: auto;
 }
 .draw-dialog-class{
@@ -282,8 +214,8 @@ export default {
   z-index: 55;
   box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 }
-.dialog {
-  padding: 0 30px;
+.dialog-ygh {
+  //padding: 0 30px;
 
   .title-class{
     text-align: center;
@@ -364,7 +296,11 @@ export default {
 /*  dialog*/
 .ygh-dialog ::v-deep .el-dialog__header {
   padding: 16px 20px 15px;
+  
 }
+.ygh-dialog ::v-deep .el-dialog__body {
+    padding:0 10px 10px !important;
+  }
 .el-dialog__headerbtn{
   top: 15px;
 }
@@ -379,10 +315,10 @@ export default {
   display: flex;
   -webkit-box-align: center;
   -ms-flex-align: center;
-  align-items: center;
   -webkit-box-pack: justify;
   -ms-flex-pack: justify;
   justify-content: space-between;
+  align-items: center;
 }
 .el-dialog__title {
   color: rgba(0,0,0,.85);
@@ -392,10 +328,12 @@ export default {
 .avue-crud__dialog__menu {
   padding-right: 20px;
   float: left;
+  display: flex;
+  align-items: center;
 }
 .avue-crud__dialog__menu i {
   color: #909399;
-  font-size: 15px;
+  font-size: 30px;
 }
 .el-icon-full-screen{
   cursor: pointer;

+ 1 - 1
src/views/venue/performanceHallMr/index.vue

@@ -131,7 +131,7 @@
 
 import { merchantPageList, deleteById } from '@/api/performanceHallMr/performanceHallMr'
 import addAndEdit from "./dialog/addAndEdit.vue";
-//  import seatTemplateEdit from "./dialog/seatTemplateEdit";
+//import seatTemplateEdit from "./dialog/seatTemplateEdit";
 import seatTemplateEdit from "./dialog/seatTemplateEditOld";
 import programmeAddAndEdit from "./dialog/programmeAddAndEdit";
 

+ 181 - 206
src/views/venue/performanceHallMr/model/seatManagementTable.vue

@@ -1,14 +1,20 @@
 <template>
     <div class="sm">
-        <div style="width: 1300px;">
+        <div class="sm-box-top-tool">
             <div style="display: flex;align-items: center;">
                 <span style="margin-right: 5px;font-size: 14px;">放大/缩小:</span> 
                 <div style="width: 100px;">
                     <el-slider input-size="mini" v-model="whNum" :min="16" :max="100"></el-slider>
                 </div>
             </div>
-            <div>
-
+            <div class="sm-box-top-tool-legend">
+                <div 
+                :key="item.id" 
+                v-for="(item,index) in seatTypeList"
+                >
+                    <span :style="{backgroundColor: item.color}"></span>
+                    <span :style="{color: item.color}">{{ item.name }}</span>    
+                </div>
             </div>
         </div>
         <div class="sm-box">
@@ -53,7 +59,7 @@
                         v-for="(item,index) in tableHeader"
                         :prop="item.key"
                         :label="item.title"
-                        :width="((whNum+7.5)*item.length)+'px'"
+                        :width="((width*(whNum/100)+7.5)*item.length)+'px'"
                         align="center"
                         >
                         <template slot-scope="scope">
@@ -69,7 +75,7 @@
                                     <div>
                                         <i style="line-height: 15px;">{{ item1.columnNo }}</i>
                                         <i style="line-height: 15px;">{{ item1.name }}</i>
-                                        <i style="line-height: 15px;">vip</i>
+                                        <i style="line-height: 15px;white-space: nowrap;">{{ item1.styleCss && item1.styleCss.sort }}</i>
                                     </div>   
                                 </div>
                             </div>
@@ -93,11 +99,13 @@
                 v-if="activeName == 'first'"
                 class="qu-first-box">
                     <div class="qu-first-form">
-                        <el-form :model="ruleForm" size="mini" :rules="rules" ref="ruleFormRegion" label-width="100px" class="demo-ruleForm">
+                        <el-form :model="ruleForm" size="mini" :rules="rules" ref="ruleFormRegion" label-width="110px" class="demo-ruleForm">
                             <el-form-item label="座位总排数">
                                 <el-input v-model="rowAll">
                                     <el-button slot="append" @click="createTableList">创建排数</el-button>
                                 </el-input>
+                            </el-form-item><el-form-item label="单排最大座位数">
+                                <span>{{ colsAll }}</span>
                             </el-form-item>
                             <el-form-item label="区域名称" prop="name">
                                 <el-input v-model="ruleForm.name"></el-input>
@@ -155,10 +163,17 @@
                                     <el-radio :label="2">批量</el-radio>
                                 </el-radio-group>
                             </el-form-item>
+                            <el-form-item label="座位号" prop="seatParity">
+                                <el-radio-group v-model="ruleForm1.seatParity">
+                                    <el-radio :label="1">奇偶列</el-radio>
+                                    <el-radio :label="2">奇数列</el-radio>
+                                    <el-radio :label="3">偶数列</el-radio>
+                                </el-radio-group>
+                            </el-form-item>
                             <el-form-item label="座位类型" prop="seatTypeId">
                                 <el-select 
                                 v-model="ruleForm1.seatTypeId"
-                                placeholder="请选择座位排练">
+                                placeholder="请选择座位类型">
                                     <el-option 
                                     v-for="(item,index) in seatTypeList"
                                     :key="item.id"
@@ -244,6 +259,7 @@
                     </div>
                     <div class="qu-batch-tool">
                         <el-button type="primary" size="mini" @click="openFormDialogVisible">修改区域</el-button>
+                        <el-button type="primary" size="mini" @click="batchSetaType">座位类型</el-button>
                         <el-button type="danger" size="mini" @click="batchDisable">批量禁用</el-button>
                         
                     </div>
@@ -336,6 +352,7 @@
 <script>
 import Sortable from "sortablejs";
 import dragSelect from 'ty-drag-select';
+import { pageList as getSeatTypeList } from '@/api/seatTypeMr/seatTypeMr'
 export default {
     name: 'sysIndex',
     components: {},
@@ -343,127 +360,10 @@ export default {
         return {
             // 页面渲染的数据
             seatList: [],
-            seatTypeList: [
-                {
-                    "id": "899466154989936640",
-                    "createBy": "admin",
-                    "createTime": "2023-12-26 11:24:13",
-                    "updateBy": "admin",
-                    "updateTime": "2023-12-26 11:24:13",
-                    "delFlag": 0,
-                    "name": "贵宾席-OTA测试",
-                    "color": "#EB3286"
-                },
-                {
-                    "id": "899466065307328512",
-                    "createBy": "admin",
-                    "createTime": "2023-12-26 11:23:51",
-                    "updateBy": "admin",
-                    "updateTime": "2023-12-26 11:23:51",
-                    "delFlag": 0,
-                    "name": "普通席-OTA测试",
-                    "color": "#AE3BE7"
-                },
-                {
-                    "id": "898175951457316864",
-                    "createBy": "admin",
-                    "createTime": "2023-12-22 21:57:24",
-                    "updateBy": "admin",
-                    "updateTime": "2023-12-22 21:57:24",
-                    "delFlag": 0,
-                    "name": "VIP票",
-                    "color": "#FF0000"
-                },
-                {
-                    "id": "898175913469505536",
-                    "createBy": "admin",
-                    "createTime": "2023-12-22 21:57:15",
-                    "updateBy": "admin",
-                    "updateTime": "2023-12-22 21:57:15",
-                    "delFlag": 0,
-                    "name": "贵宾票",
-                    "color": "#FFD000"
-                },
-                {
-                    "id": "898175825946963968",
-                    "createBy": "admin",
-                    "createTime": "2023-12-22 21:56:54",
-                    "updateBy": "admin",
-                    "updateTime": "2023-12-22 21:56:54",
-                    "delFlag": 0,
-                    "name": "普通票",
-                    "color": "#0BB8B8"
-                },
-                {
-                    "id": "898175718375649280",
-                    "createBy": "admin",
-                    "createTime": "2023-12-22 21:56:29",
-                    "updateBy": "admin",
-                    "updateTime": "2023-12-26 11:23:02",
-                    "delFlag": 0,
-                    "name": "普通座位-测试",
-                    "color": "#DE5421"
-                },
-                {
-                    "id": "898175647802290176",
-                    "createBy": "admin",
-                    "createTime": "2023-12-22 21:56:12",
-                    "updateBy": "admin",
-                    "updateTime": "2023-12-22 21:56:35",
-                    "delFlag": 0,
-                    "name": "贵宾座位-测试",
-                    "color": "#2FBB60"
-                },
-                {
-                    "id": "898175609768341504",
-                    "createBy": "admin",
-                    "createTime": "2023-12-22 21:56:03",
-                    "updateBy": "admin",
-                    "updateTime": "2023-12-24 20:17:00",
-                    "delFlag": 0,
-                    "name": "VIP座位-测试",
-                    "color": "#002FFF"
-                }
-            ],
-            tableHeader: [
-                // { title: '左1',key: 'zuo',align: 'flex-end' },
-                // { title: '过道2',key: 'zuo11',align: 'center' },
-                // { title: '中3',key: 'zhong',align: 'center' },
-                // { title: '过道4',key: 'zuo22',align: 'center' },
-                // { title: '右5',key: 'you',align: 'flex-start' },
-                // { title: '右6',key: 'you',align: 'flex-start' },
-                // { title: '右7',key: 'you',align: 'flex-start' },
-
-                // { title: '右8',key: 'you',align: 'flex-start' },
-                // { title: '右9',key: 'you',align: 'flex-start' },
-            ],
-            tableData: [
-                // {
-                //     id: this.currentRow+"_"+this.currentProperty+"_"+i,
-                //     name: this.ruleForm1.name.replace('${row}',this.currentRow).replace('${col}',i),
-                //     status: this.ruleForm1.seatTypeId,
-                //     rowNo: this.currentRow,
-                //     colNo: i,
-                //     sort: i,
-                //     style: {key: this.currentProperty}
-                // }
-            ], // 全部的座位 表格形式
-            tableDataAll: [
-                // {
-                //     "id": "899524164202352651",
-                //     "delFlag": 0,
-                //     "auditoriumId": "899466305364123648",
-                //     "name": "",
-                //     "rowNo": 2,
-                //     "columnNo": 9,
-                //     "seatTypeId": "899466154989936640",
-                //     "seatLabel": "贵宾席-OTA测试",
-                //     "priority": 1,
-                //     "status": 1,
-                //     "sortId": 11,
-                //     "color": "#EB3286"
-                // }
-            ], // 全部的座位
+            seatTypeList: [],
+            tableHeader: [],
+            tableData: [], // 全部的座位 表格形式
+            tableDataAll: [], // 全部的座位
             widthAll: '100%',
             heightAll: '100%',
             width: 60,
@@ -478,6 +378,7 @@ export default {
             
             // tool
             rowAll: null,
+            colsAll: null,
             activeName: 'second',
             
             // 创建区域
@@ -503,8 +404,11 @@ export default {
                 name: [
                     { required: true, message: '请选择座位名称', trigger: ['blur','change'] }
                 ],
+                seatParity: [
+                    { required: true, message: '请选择座位号', trigger: ['blur','change'] }
+                ],
                 seatTypeId: [
-                    { required: true, message: '请输入座位类型', trigger: ['blur','change'] }
+                    { required: true, message: '请选择座位类型', trigger: ['blur','change'] }
                 ],
             },
             currentRow: null, // 当前选择的单元格行
@@ -546,6 +450,17 @@ export default {
 
     },
     methods: {
+        /** 获取座位类型  */
+        async getSeatTypeListFun(){
+            try {
+                let res = await getSeatTypeList({
+                    pageNum: 1, pageSize: 999
+                })
+                this.seatTypeList = res.data.rows
+            } catch (error) {
+                
+            }
+        },
         //初始化排序
         initSortTable() {
             let that = this;
@@ -566,21 +481,32 @@ export default {
         },
 
         /**  初始化数据  */
-        initData(row,list,type){
-            if(row.styleCss) {
-                this.tableHeader =  JSON.parse(row.styleCss).tableHeader
-            }
-            this.rowAll = row.rows
-            let listCopy = []
-            list.forEach((item,index) => {
-                if(item.styleCss) {
-                    item.styleCss = JSON.parse(item.styleCss)
+        async initData(row,list,type){
+            this.tableHeader = []
+            this.tableData = []
+            this.tableDataAll = []
+            this.rowAll = null
+            this.colsAll = null
+            await this.getSeatTypeListFun()
+            if(row.rows) {
+                if(row.styleCss) {
+                    this.tableHeader =  JSON.parse(row.styleCss).tableHeader
                 }
-                listCopy.push(item)
-            })
-            this.tableDataAll = JSON.parse(JSON.stringify(listCopy))
-            //this.createTableList()
-            this.dataProcess() // 数据整理
+                this.rowAll = row.rows
+                let listCopy = []
+                list.forEach((item,index) => {
+                    // if(item.styleCss) {
+                    //     item.styleCss = JSON.parse(item.styleCss)
+                    // }
+                    listCopy.push({
+                        ...item,
+                        styleCss: item.styleCss ? JSON.parse(JSON.parse(item.styleCss)): {}
+                    })
+                })
+                this.tableDataAll = JSON.parse(JSON.stringify(listCopy))
+                console.log("sfasdfasdfasd====",this.tableDataAll)
+                this.dataProcess() // 数据整理
+            }
         },
         /**  数组组装  */
         dataProcess(){
@@ -590,7 +516,7 @@ export default {
             for(let i = 0;i<this.rowAll;i++) {
                 if(this.tableHeader && this.tableHeader.length){
                     let obj = {
-                        id: "row_"+i
+                        tableId: "row_"+i
                     }
                     this.tableHeader.forEach((item,index)=>{
                         obj[item.key] = []
@@ -787,7 +713,7 @@ export default {
                 this.seatTypeList.forEach((item,index)=>{
                     if(this.ruleForm1.seatTypeId == item.id) {
                         color = item.color
-                        seatLabel = item.seatLabel
+                        seatLabel = item.name
                     }
                 })
                 if(this.ruleForm1.resource == 2){ // 批量
@@ -811,10 +737,16 @@ export default {
                         return
                     }
                     for(let i = min;i<=max;i++) {
+                        if(this.ruleForm1.seatParity == 2 && i%2 == 0) { // 排除偶数
+                            continue;
+                        }
+                        if(this.ruleForm1.seatParity == 3 && i%2 > 0) { // 排除奇数数
+                            continue;
+                        }
+
                         list.push({
-                            id: this.currentRow+"_"+this.currentProperty+"_"+i,
+                            tableId: this.currentRow+"_"+this.currentProperty+"_"+i,
                             name: this.ruleForm1.name.replace('${row}',this.currentRow).replace('${col}',i),
-                            status: this.ruleForm1.seatTypeId,
                             styleCss: {
                                 key: this.currentProperty, // 所属区域的key
                                 keyLabel: this.currentLabel, // 所属区域的名称
@@ -824,9 +756,12 @@ export default {
                             rowNo: this.currentRow,
                             columnNo: i,
                             seatTypeId: this.ruleForm1.seatTypeId,
+                            sortId: i, // 排序号码
                             seatLabel: seatLabel,
                             color: color,// 座位类型对应的颜色
-                            delFlag: 0,
+                            delFlag: 0, // 座位是否可用
+                            priority: 9999, // 座位出票顺序  数字越小越优先
+                            status: 0, //0-初始(该状态下不C端显示) 1-可用 2-不可用
                         })
                     }
                     this.tableDataAll = this.tableDataAll.concat(JSON.parse(JSON.stringify(list)))
@@ -837,12 +772,8 @@ export default {
                     console.log("this.tableData111=====",this.currentRow,this.currentProperty,this.tableData[this.currentRow-1][this.currentProperty])
                     let index = this.tableData[this.currentRow-1][this.currentProperty].length
                     let obj = {
-                        id: this.currentRow+"_"+this.currentProperty+"_"+(index+1),
+                        tableId: this.currentRow+"_"+this.currentProperty+"_"+(index+1),
                         name: this.ruleForm1.name,
-                        status: this.ruleForm1.seatTypeId,
-                        rowNo: this.currentRow,
-                        sort: index+1,
-
                         styleCss: {
                             key: this.currentProperty, // 所属区域的key
                             keyLabel: this.currentLabel, // 所属区域的名称
@@ -851,10 +782,13 @@ export default {
                         },
                         rowNo: this.currentRow,
                         columnNo: index+1,
+                        sortId: i, // 排序号码
                         seatTypeId: this.ruleForm1.seatTypeId,
                         seatLabel: seatLabel,
                         color: color,// 座位类型对应的颜色
-                        delFlag: 0,
+                        delFlag: 0, // 座位是否可用
+                        priority: 9999, // 座位出票顺序  数字越小越优先
+                        status: 0, //0-初始(该状态下不C端显示) 1-可用 2-不可用
                     }
                     this.tableData[this.currentRow-1][this.currentProperty].push(obj)
                     this.tableDataAll.push(JSON.parse(JSON.stringify(obj)))
@@ -889,11 +823,10 @@ export default {
         countRegionW(){
             let list = JSON.parse(JSON.stringify(this.tableHeader))
             for(let i = 0; i < list.length; i++) {
+                list[i].length =  0
                 for(let j = 0;j < this.tableData.length; j++) {
                     if(this.tableData[j][list[i].key] && this.tableData[j][list[i].key].length){
-                        if(j==0) {
-                            list[i].length = this.tableData[j][list[i].key].length
-                        }else if(list[i].length<this.tableData[j][list[i].key].length){
+                        if(list[i].length<this.tableData[j][list[i].key].length){
                             list[i].length = this.tableData[j][list[i].key].length
                         }
                     }
@@ -901,6 +834,13 @@ export default {
             }
             console.log("list=====111",list)
             this.tableHeader = [].concat(list)
+            let colsAll = 0
+            this.tableHeader.forEach((item,index) => {
+                if(item.length) {
+                    colsAll = colsAll + item.length
+                }
+            })
+            this.colsAll = colsAll
         },
         /**  创建座位  结束  */
 
@@ -989,13 +929,16 @@ export default {
         batchDisable() {
 
         },
+        /**  批量修改座位类型   */
+        batchSetaType() {
 
+        },
         /** 删选 */
         handleQuery(){
            
             if(!this.queryParams.menuName&&!this.queryParams.status){
                 this.batchTableList = this.tableDataAll
-                console.log("list====",this.queryParams)
+                console.log("list====",this.queryParams,this.tableDataAll)
             }else {
                 let list = []
                 this.tableDataAll.forEach((item,index)=>{
@@ -1082,7 +1025,12 @@ export default {
             let styleCss = {
                 tableHeader: this.tableHeader
             }
-            this.$emit('saveSeat',list,JSON.stringify(styleCss))
+            list.forEach((item,index)=>{
+                if(item.styleCss) {
+                    list[index].styleCss = JSON.stringify(item.styleCss)
+                }
+            })
+            this.$emit('saveSeat',this.rowAll,this.colsAll,list,JSON.stringify(styleCss))
         }
     }
 };
@@ -1094,16 +1042,42 @@ export default {
     width: 100%;
     height: 100%;
     box-sizing: border-box;
-    padding-top: 20px;
     display: flex;
     flex-direction: column;
     justify-content: center;
     align-items: center;
+    --top-tool-h: 60px;
+    --left-tool-w: 300px
+}
+.sm-box-top-tool {
+    width: 100%;
+    height: var(--top-tool-h);
+    box-sizing: border-box;
+    display: flex;
+    .sm-box-top-tool-legend {
+        width: 400px;
+        display: flex;
+        >div {
+            display: flex;
+            align-items: center;
+            margin-left: 10px;
+            >span:first-child {
+                display: block;
+                width: 10px;
+                height: 10px;
+                flex-shrink: 0;
+            }
+            >span:last-child {
+                white-space: nowrap;
+                margin-left: 5px;
+                font-size: 12px;
+            }
+        }
+    }
 }
-
 .sm-box {
-    width: 1300px;
-    height: 600px; 
+    width: 100%;
+    height: calc( 100% - var(--top-tool-h) ); 
     box-sizing: border-box;
     display: flex;
     justify-content: center;
@@ -1112,61 +1086,62 @@ export default {
     --row-scale: 1;
 }
 .sm-scroll-box {
-    width: 1000px;
+    width: calc( 100% - var(--left-tool-w) );
     height: 100%;
     border: 1px solid #ccc;
     box-sizing: border-box;
     background-color: aqua;
-}
-
-.row-item-box {
-    border: 1px dashed #ccc;
-    width: 100%;
-    height: 100%;
-    align-items: center;
-    padding: 5px;
-}
+    .row-item-box {
+        border: 1px dashed #ccc;
+        width: 100%;
+        height: 100%;
+        align-items: center;
+        padding: 5px;
+    }
 
-.row-item-box:hover {
-    background-color: rgba(64, 158, 255,0.3);
-}
+    .row-item-box:hover {
+        background-color: rgba(64, 158, 255,0.3);
+    }
 
-.row-item {
-    width: var(--row-w);
-    height: var(--row-h);
-    margin-left: 5px;
-    border: 1px solid #ccc;
-    display: flex;
-    flex-direction: column;
-    flex-shrink: 0;
-    font-size: 12px;
-    align-items: center;
-    box-sizing: border-box;
-    justify-content: center;
-    overflow: hidden;
-    > div {
-        width: var(--row-w-i);
-        height: var(--row-h-i);
-        transform: scale(var(--row-scale));
+    .row-item {
+        width: var(--row-w);
+        height: var(--row-h);
+        margin-left: 5px;
+        border: 1px solid #ccc;
         display: flex;
         flex-direction: column;
+        flex-shrink: 0;
+        font-size: 12px;
+        align-items: center;
+        box-sizing: border-box;
+        justify-content: center;
+        overflow: hidden;
+        > div {
+            width: var(--row-w-i);
+            height: var(--row-h-i);
+            transform: scale(var(--row-scale));
+            display: flex;
+            flex-direction: column;
+        }
+        i {
+            color: #fff;
+        }
     }
-    i {
-        color: #fff;
+
+    .row-item:first-child {
+        margin-left: 0;
+    } 
+
+    .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
+        border-bottom: none !important;
     }
 }
 
-.row-item:first-child {
-    margin-left: 0;
-} 
 
-.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
-    border-bottom: none !important;
-}
 
 
 .table-tool {
-    width: calc( 100% - 1000px );
+    width: var(--left-tool-w);
     height: 100%;
     padding: 0 10px;
     box-sizing: border-box;
@@ -1186,7 +1161,7 @@ export default {
 
     .qu-first-form {
         width: 100%;
-        height: 200px;
+        height: 250px;
         overflow: hidden;
         padding-top: 10px;
         box-sizing: border-box;
@@ -1195,7 +1170,7 @@ export default {
 
     .qu-first-info {
         width: 100%;
-        height: calc( 100% - 200px );
+        height: calc( 100% - 250px );
         overflow: hidden;
         .qu-first-info-title {
             width: 100%;
@@ -1292,7 +1267,7 @@ export default {
 
     .qu-second-form {
         width: 100%;
-        height: 240px;
+        height: 300px;
         overflow: hidden;
         padding-top: 10px;
         box-sizing: border-box;
@@ -1301,7 +1276,7 @@ export default {
 
     .qu-second-info {
         width: 100%;
-        height: calc( 100% - 320px );
+        height: calc( 100% - 400px );
         overflow: hidden;
         .qu-second-info-title {
             width: 100%;

+ 57 - 6
src/views/windowTicketSales/ticketingCollection.vue

@@ -77,7 +77,7 @@
                 plain
                 icon="el-icon-plus"
                 size="mini"
-                @click="handleOpen(multipleSelection)"
+                @click="openMultipleSelectionVisible"
                 v-hasPermi="['windowTicketSales:ticketingCollection:print']"
               >批量打印门票</el-button>
         </el-col>
@@ -88,7 +88,6 @@
       ref="tables" 
       v-loading="loading" 
       :data="dataList" 
-      
       @selection-change="handleSelectionChange"
       border>
         <el-table-column type="selection" width="55"></el-table-column>
@@ -138,6 +137,47 @@
         :limit.sync="queryParams.pageSize"
         @pagination="getList"
       />
+      <!--  批量打印顺序  -->
+      <el-dialog
+        title="批量打印顺序"
+        :visible.sync="multipleSelectionVisible"
+        width="90%"
+        :before-close="()=>{ multipleSelectionVisible = false}">
+        <el-table 
+          ref="tabless" 
+          v-loading="loading" 
+          :data="multipleSelectionTabel" 
+          border>
+            <el-table-column label="打印顺序" align="center" type="index" width="50"></el-table-column>
+            <el-table-column label="姓名" align="center" prop="name" />
+            <el-table-column label="身份证号" align="center" prop="idcard" />
+            <el-table-column label="手机号" align="center" prop="mobile" />
+            <el-table-column label="取票码" align="center" prop="qrcodeNo" />
+            <el-table-column label="订单号" align="center" prop="orderId" />
+            <el-table-column label="剧目名称" align="center" prop="performName" />
+            <el-table-column label="票务名称" align="center" prop="goodsName" />
+            <el-table-column label="座位信息" align="center" prop="seatName" />
+            <el-table-column label="座位类型" align="center" prop="seatTypeName" />
+            <el-table-column label="节目播出日期" align="center" prop="performDate" />
+            <el-table-column label="下单时间" align="center" prop="createTime" />
+            <el-table-column label="购票渠道" align="center" prop="source">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.order_form_type" :value="scope.row.source"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="订单状态" align="center" prop="status">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.order_status_type" :value="scope.row.status"/>
+            </template>
+          </el-table-column>
+        </el-table>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="multipleSelectionVisible = false">取 消</el-button>
+          <el-button type="primary" :loading="loading" @click="handleOpen(multipleSelection)">{{ dialogVisibleLoading?'打印中...':'打印' }}</el-button>
+        </span>
+      </el-dialog>
+
+      <!--  选择打印机  -->
       <el-dialog
         title="选择打印机"
         :visible.sync="dialogVisible"
@@ -155,7 +195,6 @@
           <el-button type="primary" :loading="dialogVisibleLoading" @click="print(viewerList)">{{ dialogVisibleLoading?'打印中...':'打印' }}</el-button>
         </span>
       </el-dialog>
-
     </div>
   </template>
   
@@ -174,6 +213,8 @@
         loading: false,
         // 选中数组
         multipleSelection: [],
+        multipleSelectionTabel: [],
+        multipleSelectionVisible: false,
         // 显示搜索条件
         showSearch: true,
         // 总条数
@@ -288,15 +329,24 @@
         resetForm(formName) {
           this.$refs[formName].resetFields();
         },
-        handleSelectionChange(val) {
-          console.log("val====",val)
+        handleSelectionChange(val,row) {
+          console.log("val====",val,row)
           this.multipleSelection = val;
         },
+
+        openMultipleSelectionVisible(){
+          console.log("sdfasgadfgadfgadfgadfg")
+          this.multipleSelectionTabel = JSON.parse(JSON.stringify(this.multipleSelection))
+          this.multipleSelectionVisible = true
+        },
         handleOpen(list=[]){
           if(!list||list.length==0) return
           let idList = []
           list.forEach((item,index)=>{
-            idList.push(item.id)
+            idList.push({
+              viewerId: item.id,
+              index: index
+            })
           }) 
           this.viewerList = idList
           this.getPrintListApi()
@@ -307,6 +357,7 @@
           this.dialogVisible = true
         },
         handleClose(){
+          
           this.dialogVisible = false
         },
         /** 查询打印机列表 */