MONSTER-ygh 4 kuukautta sitten
vanhempi
sitoutus
2ef9a12b69

+ 26 - 0
src/api/financeMr/mingsheng.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request';
+
+/**
+ * 查询对账单记录列表
+ * @query [ pageNum: 分页对象的起始页码; pageSize: 分页对象的每页显示条目个数; beginTime: 开始时间; endTime: 结束时间; sortField: 排序字段; sortOrder: 排序方式; ]
+ */
+export function listStatements(query) {
+  return request({
+    url: '/payment/minsheng/bill',
+    method: 'get',
+    params: query
+  });
+}
+
+/**
+ * 导出对账单记录
+ * @query [ beginTime: 开始时间; endTime: 结束时间; sortField: 排序字段; sortOrder: 排序方式; ]
+ */
+export function exportStatements(query) {
+  return request({
+    url: '/payment/minsheng/bill/excel',
+    method: 'get',
+    responseType: 'blob',
+    params: query
+  });
+}

+ 364 - 0
src/views/finance/Statements/mingsheng.vue

@@ -0,0 +1,364 @@
+<!--
+ * @Description: 财务管理 => 对账单
+ * @Author: Rockery
+ * @Date: 2021-07-28 15:14:06
+ * @LastEditors: gcz
+ * @LastEditTime: 2024-08-01 16:53:36
+ * @FilePath: \great_webui\src\views\finance\Statements\StatementsIndex.vue
+ * @Copyright: Copyright (c) 2016~2021 Rockery(1113269755@qq.com)
+-->
+
+<template>
+    <div class="app-container app-container-scheduling">
+      <div class="app-container_flex_auto">
+        <div class="app-container_form app-container-queryform" v-show="showSearch">
+          <!-- 页面查询表单 Start -->
+          <el-form :model="queryParams" ref="queryForm" :rules="rules" :inline="true" label-width="68px">
+            <!-- <el-form-item label="对手银行账户" prop="trId" label-width="100px">
+              <el-input
+                v-model="queryParams.trId"
+                placeholder="请输入对手银行账户"
+                clearable
+                size="small"
+                @keyup.enter.native="handleQuery"
+              />
+            </el-form-item> -->
+            <!-- <el-form-item label="对手方名称" prop="trStatus" label-width="85px">
+              <el-select v-model="queryParams.trStatus" placeholder="请选择对手方名称" clearable>
+                <el-option
+                  v-for="dict in dict.type.pay_source_statu"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
+            </el-form-item> -->
+            <el-form-item label="交易日期" prop="dateRange">
+              <el-date-picker
+                v-model="queryParams.dateRange"
+                size="small"
+                style="width: 240px"
+                value-format="yyyy-MM-dd"
+                type="daterange"
+                range-separator="-"
+                start-placeholder="开始时间"
+                end-placeholder="结束时间"
+                :picker-options="pickerOptions"
+              ></el-date-picker>
+            </el-form-item>
+            <el-form-item>
+              <el-button
+                style="margin-left: 10px;"
+                type="primary"
+                icon="el-icon-search"
+                size="mini"
+                @click="handleQuery"
+                >搜索</el-button
+              >
+              <el-button
+                icon="el-icon-refresh"
+                size="mini"
+                @click="resetQuery"
+                >重置</el-button
+              >
+            </el-form-item>
+          </el-form>
+          <!-- 页面查询表单 End -->
+        </div>
+        <div class="app-container_table app-container-main" :class="showSearch ? 'mt15' : ''">
+          <!-- 页面批量操作按钮 -->
+          <el-row :gutter="10" class="mb8">
+            <el-col :span="1.5">
+              <el-button
+                v-hasPermi="['financeMr:statements:StatementsIndexNew:download']"
+                type="warning"
+                plain
+                icon="el-icon-download"
+                size="mini"
+                :disabled="tableDataList.length < 1"
+                @click="handleExport"
+                v-loading.fullscreen.lock="handleExportLoading"
+                element-loading-text="正在拼命生成数据中..."
+                element-loading-spinner="el-icon-loading"
+                element-loading-background="rgba(0, 0, 0, 0.5)"
+                >导出</el-button>
+            </el-col>
+    
+            <right-toolbar :showSearch.sync="showSearch" @queryTable="initData"></right-toolbar>
+          </el-row>
+          <div class="app-container_table_main">
+            <!-- 页面表格数据区域 Start -->
+            <el-table
+                v-loading="loading"
+                ref="statementsTableRef"
+                :data="tableDataList"
+                border
+                row-key="orderNo"
+                :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+                class="cust-table"
+                height="100%"
+              >
+                <el-table-column label="序号" align="center" width="50" type="index" />
+                <el-table-column label="对手方账号" align="center" width="200" prop="payeeAcNo" />
+                <el-table-column label="对手方名称" align="center" width="200" prop="payeeName" />
+                <el-table-column label="开户信息" align="center" width="200" prop="payeeOpBank" />
+                <el-table-column label="交易时间" align="center" width="200" prop="transDate" />
+                <el-table-column label="交易金额(元)" align="center" width="200" prop="transAmt" />
+                <el-table-column label="借贷标志" align="center" width="200" prop="loan" />
+                <el-table-column label="余额(元)" align="center" width="200" prop="balance" />
+                <el-table-column label="摘要" align="center" prop="remark" />
+              </el-table>
+              <!-- 页面表格数据区域 End -->
+          </div>
+        </div>
+        <div class="app-container_table_page">
+          <!-- 表格右下角数据 -->
+          <PaginationNew 
+            :total="total" 
+            :page.sync="queryParams.pageNum" 
+            :limit.sync="queryParams.pageSize"
+            @pagination="initData" />
+        </div>
+      </div>
+    </div>
+  </template>
+  
+  <script>
+  import { listStatements, exportStatements } from '@/api/financeMr/mingsheng';
+  import { exportExcel } from '@/utils/exportexcel';
+  import moment from "moment"
+  export default {
+    name: 'Statements',
+    dicts: ['pay_source_statu', 'pay_card_type'],
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 显示搜索条件
+        showSearch: true,
+        rules: {},
+        // 总条数
+        total: 0,
+        // 表格数据
+        tableDataList: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+        },
+        oweTotalObj: {},
+        // 导出数据状态
+        handleExportLoading: false,
+        summary:{},
+        pickerMinDate: null,
+        pickerOptions: {
+          disabledDate (time) {
+            // return time.getTime() == Date.now() - 80000000 || time.getTime() == Date.now() + 80000000
+          }
+        }
+      };
+    },
+    created() {
+        this.$set(this.queryParams,'dateRange',[moment().subtract(1, 'days').format("yyyy-MM-DD"),moment().subtract(1, 'days').format("yyyy-MM-DD")])
+        this.initData();
+    },
+    methods: {
+      /** 初始化数据 */
+      async initData() {
+        this.loading = true;
+        // this.getRevenueReportOwetotal();
+        this.getList();
+      },
+      /** 查询列表信息 */
+      getList() {
+        this.loading = true;
+        listStatements(this.formatDateRange(this.queryParams, this.dateRange))
+          .then((response) => {
+            this.tableDataList = response?.rows|| [];
+            this.total = response?.total ?? 0;
+            this.loading = false;
+          })
+          .catch(() => {
+            this.tableDataList = [];
+            this.total = 0;
+            this.loading = false;
+          });
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.$refs?.['queryForm']?.validate?.((valid) => {
+          if (valid) {
+            this.loading = true;
+            this.$refs.statementsTableRef?.clearSort?.();
+            this.queryParams = {
+              ...this.queryParams,
+              pageNum: 1,
+              sortField: undefined,
+              sortOrder: undefined,
+              payBeginTime: undefined,
+              payEndTime: undefined
+            };
+  
+            // 初始化表格数据
+            this.tableDataList = [];
+            this.total = 0;
+  
+            this.$nextTick(() => {
+              // 重新加载表格数据
+              this.initData();
+            });
+          }
+        });
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.queryParams = {}
+        this.queryParams.pageNum = 1
+        this.queryParams.pageSize = 10
+        this.handleQuery();
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        this.$confirm(`确定要导出银企直连的数据吗?`, '提示', {
+          confirmButtonText: '确定 ',
+          cancelButtonText: '取消 ',
+          type: 'warning'
+        })
+          .then(() => {
+            // 开启导出遮护罩
+            this.handleExportLoading = true;
+  
+            // 排除不需要的属性
+            let { pageNum, pageSize, ...otherObj } = this.formatDateRange(this.queryParams, this.dateRange);
+            let handleExportReq = { 
+              ...otherObj,
+              pageNum: 1, 
+              pageSize: this.total
+             };
+            // 发送导出请求
+            exportStatements(handleExportReq)
+              .then((response) => {
+                exportExcel(response, '银企直连_'+moment().format('yyyy_MM_DD'), '.xlsx');
+  
+                // 关闭导出遮护罩
+                this.handleExportLoading = false;
+              })
+              .catch(() => {
+                this.$message.error('导出异常!');
+                // 关闭导出遮护罩
+                this.handleExportLoading = false;
+              });
+          })
+          .catch(() => {
+            this.$message.info('您已取消导出!');
+            // 关闭导出遮护罩
+            this.handleExportLoading = false;
+          });
+      },
+      /**
+       * 格式参数数据
+       */
+      formatDateRange(params) {
+        var search = JSON.parse(JSON.stringify(params));
+        if (search.dateRange && search.dateRange.length>0) {
+          search['startTime'] = search.dateRange[0];
+          search['endTime'] = search.dateRange[1];
+        } else {
+          search['startTime'] = undefined;
+          search['endTime'] = undefined;
+        }
+
+        delete search.dateRange
+        return search;
+      },
+      /**
+       * 当表格的排序条件发生变化的时候会触发该事件
+       */
+      handleSortChang({ column, prop, order }) {
+        this.loading = true;
+        this.queryParams = {
+          ...this.queryParams,
+          pageNum: 1,
+          sortField: prop,
+          sortOrder: order == 'descending' ? 'desc' : 'asc'
+        };
+        this.initData();
+      },
+    }
+  };
+  </script>
+  
+  <style lang="scss" scoped>
+  ::v-deep {
+    .pagination-container {
+      text-align: center;
+  
+      .el-pagination {
+        position: initial;
+      }
+    }
+  }
+  
+  .cust-table {
+    .statements-column-orderNo {
+      color: #337ab7;
+      text-decoration: none;
+      cursor: pointer;
+  
+      &:hover {
+        color: #409eff;
+        text-decoration: underline;
+      }
+    }
+  }
+  
+  
+  .app-container-scheduling ::v-deep .el-select__tags {
+      flex-wrap: inherit !important;
+      overflow-x: auto !important;
+  }
+  .app-container-scheduling ::v-deep .el-form-item__content {
+    position: relative;
+  }
+  .app-container-scheduling ::v-deep .el-form-item__content .query_clear{
+    position: absolute;
+    top: -15px;
+    right: -10px;
+    display: none;
+    cursor: pointer;
+    z-index: 99;
+  }
+  .app-container-scheduling ::v-deep .el-form-item__content:hover .query_clear {
+    display: block;
+  }
+  .app-container_table_page {
+    display: flex;
+    justify-content: flex-end;
+    .statements-total{
+      .til{
+        font-weight: bold;
+        margin-bottom: 2px;
+        margin-top: 10px;
+        text-align: left;
+      }
+      .summary{
+        span{
+          color: #000;
+          margin-right: 5px;
+        }
+        .summary-num {
+          margin-right: 0px;
+          color: #f5bb00;
+          padding: 0 10px;
+          font-weight: bold;
+        }
+      }
+      .other-summary{
+        ::v-deep span{
+          color: #f5bb00;
+        }
+      }
+    }
+  }
+  </style>
+  

+ 1092 - 0
src/views/officesale/ticketingSales copy 2.vue

@@ -0,0 +1,1092 @@
+<template>
+    <div class="app-container app-container-me">
+      <el-form 
+      :model="queryParams" 
+      ref="queryForm" 
+      size="small" 
+      :inline="true" 
+      :rules="rules"
+      label-width="80px">
+        <el-form-item label="演出厅" prop="auditoriumId">
+          <el-select
+            v-model="queryParams.auditoriumId"
+            placeholder="演出厅"
+            clearable
+            style="width: 100%"
+            @change="changeTime($event,'auditoriumId')"
+          >
+            <el-option
+              v-for="dict in merchantTheatreAuditoriumListS"
+              :key="dict.id"
+              :label="dict.name"
+              :value="dict.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="场次时间" prop="performDate">
+            <el-date-picker 
+            type="date" 
+            placeholder="选择场次时间" 
+            v-model="queryParams.performDate"
+            @change="changeTime($event,'performDate')"
+            value-format="yyyy-MM-dd"
+            ></el-date-picker>
+        </el-form-item>
+        <el-form-item label="场次" prop="timeId">
+          <el-select
+            v-model="queryParams.timeId"
+            placeholder="场次"
+            clearable
+            style="width: 100%"
+            @change="changeTime($event,'timeId')"
+          >
+            <el-option
+              v-for="dict in merchantPerformTimeListS"
+              :key="dict.id"
+              :label="dict.timeSnapshot+'('+dict.performTimeStart+'-'+dict.performTimeEnd+')'"
+              :value="dict.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="票务类型" prop="goodsId">
+          <el-select
+            v-model="queryParams.goodsId"
+            placeholder="票务类型"
+            clearable
+            style="width: 100%"
+            @change="changeTime($event,'goodsId')"
+          >
+            <el-option
+              v-for="dict in goodsPageListS"
+              :key="dict.id"
+              :label="dict.goodsName"
+              :value="dict.id"
+              :disabled="dict.status==1 || dict.goodsPerform.channelWindow != 0"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button :loading="loading" type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button :loading="loading" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <div class="seat-tool-box">
+        <span class="demonstration">座位大小</span>
+        <div class="seat-tool-box-slider">
+            <el-slider 
+            v-model="scaleNum" 
+            :min="30" 
+            :max="100"
+            @change="scaleNumChange"
+            ></el-slider>
+        </div>
+        <div style="display: flex;margin-left: 20px;" v-if="seatMapList&&JSON.stringify(seatMapList) != '{}'">
+            <div>各类型座位的剩余数量:</div>
+            <div
+            :key="index" 
+            v-for="(item,index) in seatTypeList"
+            style="margin-left: 10px;align-items: center;"
+            >
+                <span :style="{color: item.color?item.color:'none'}">{{item.name ? (item.name+'(剩余:'+ (item.num||0) +')') : '暂未命名'}}</span>
+            </div>
+        </div>
+      </div>
+      <div class="seat-box" :style="{'--scaleNum': scaleNum/100}">
+        <!-- 选择座位  -->
+        <div 
+        class="seat-list-box" 
+        
+        v-loading="loading">
+            <!--  座位排版  -->
+            <div  
+            id="sm-scroll-box" 
+            ref="seatbox" 
+            class="dialog"
+            @mousedown="mousedownFun"
+            @mouseleave="mouseleaveFun"
+            @scroll="scrollFun"
+            >
+                <div 
+                class="dialog-box" 
+                :style="{width: width*(scaleNum/100) + 'px', margin: justifyContent ? 'auto' : 'unset'}"
+                >
+                    <div 
+                    style="width: 100%;position: absolute;"
+                    class="seat-box-class clearfix" 
+                    v-if="seatMapList"
+                    >
+                            <div
+                           
+                            class="seat-item-class-box" 
+                            v-for="(item1, index1) in seatMapListKey" 
+                            :key="item1.key"
+                            >
+                                <div class="seat-item-class seat-box-class-row" style="">{{ index1 != 0 ?((index1) + '排') :'' }}</div>
+                                
+                                <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' : ''
+                                ]" 
+                                v-for="(item, index) in seatMapList[item1.key]" 
+                                :style="{backgroundColor: item.color && !(item.isDisabled || item.status != 1) ? item.color : 'none'}"
+                                @click.stop="seatClick(item)" 
+                                :dragSelectId="item.id"
+                                :index="item1.key +'_'+ index"
+                                :key="index">
+                                    <p 
+                                    v-if="item1.key != 'my_column'"
+                                    class="text-class"
+                                    >{{ item.status != 1 ? '不可售':(item.name ? item.name : '暂未命名') }}</p>
+                                    <p v-else>{{ (index+1) + '号' }}</p>
+                                </div>
+                            </div>
+                    </div>
+                </div>
+                
+
+                <!-- 鼠标拖拽出的遮罩 (定位为 position:absolute)-->
+                <!-- 遮罩最好是在绑定了mouseover事件的元素内部,并且不要阻止遮罩的冒泡事件。这样鼠标移到了遮罩上面,依然可以利用冒泡执行父元素的mouseover事件,就不会出现遮罩只能扩大,不能缩小的情况了(亲自试过) -->
+                <div id="moveSelected"></div>
+            </div>
+            <div style="margin-top: 5px; margin-left: 30px;display: flex;">
+                <div style="flex-shrink: 0;">
+                    <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" v-hasPermi="['officesale:ticketingSales:lock']" type="warning" :loading="lockOrUnLockLoading" @click="lockOrUnLockFun(0)">{{ seatSelectListNo.length>0?'解锁':'锁定' }}</el-button>
+                    <el-button size="mini" v-hasPermi="['officesale:ticketingSales:buy']" type="primary" @click="increaseViewersFun">预约</el-button>
+                </div>
+            </div>
+            
+        </div>
+        <div class="seat-select-box">
+            <div class="seat-select-box-top">
+                <el-tabs v-model="activeName" @tab-click="handleClickTab">
+                    <el-tab-pane label="已选座位" name="first"></el-tab-pane>
+                    <!-- <el-tab-pane label="座位图例" name="second"></el-tab-pane> -->
+                </el-tabs>
+            </div>
+            <div class="seat-select-info" v-if="activeName=='first'">
+                <div 
+                class="seat-select-item"
+                :key="index" 
+                v-for="(item,index) in seatSelectList">
+                    <div>
+                        <span>{{item.name ? item.name : '暂未命名'}}</span>
+                        <span>{{ setSeatTypeShow(item.seatTypeId) }}</span>
+                    </div>
+                    <div>
+                        <span @click="delSeatSelect(item)">删除</span>
+                    </div>
+                </div>
+            </div>
+            <div class="seat-select-info" v-if="activeName=='second'">
+                <div 
+                class="seat-select-color-item"
+                :key="index" 
+                v-for="(item,index) in seatTypeList">
+                    <span :style="{backgroundColor: item.color?item.color:'none'}"></span>
+                    <span>{{item.name ? item.name : '暂未命名'}}</span>
+                </div>
+            </div>
+        </div>
+      </div>
+      <!--  添加观影人  -->
+      <increaseViewers ref="increaseViewers" @clearDialogVisible="clearDialogVisible" />
+    </div>
+  </template>
+  
+  <script>
+  import { 
+  querySeatList,
+  merchantPerformTimeList,
+  lockOrUnLock,
+  merchantTheatreAuditoriumList,
+  goodsPageList,
+  getGoodsPerformApi
+ } from '@/api/windowTicketSales/ticketingSales'
+ import increaseViewers from "./model/increaseViewers"
+ // import increaseViewers from "./model/increaseViewersNew"
+ import moment from "moment"
+ import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
+ import selectListMixin from "./mixins/selectList"
+ export default {
+    name: "TicketingSales1",
+    components: {
+        increaseViewers
+    },
+    mixins: [selectListMixin],
+    data() {
+      return {
+        // 遮罩层
+        loading: false,
+        // 查询参数
+        queryParams: {
+            timeId: '',
+            performDate: null,
+            auditoriumId: null,
+            goodsId: null,
+        },
+        rules: {
+            auditoriumId: [
+                { required: true, message: '请选择演出厅', trigger: ['blur','change'] }
+            ],
+            performDate: [
+                { required: true, message: '请选择时间', trigger: ['blur','change'] }
+            ],
+            timeId: [
+                { required: true, message: '请选择场次', trigger: ['blur','change'] }
+            ],
+            goodsId: [
+                { required: true, message: '请选择票务类型', trigger: ['blur','change'] }
+            ],
+        },
+        merchantTheatreAuditoriumListS: [], // 演出厅
+        merchantPerformTimeListS: [], // 场次
+        querySeatListS: [], // 座位
+        goodsPageListS: [], // 票务
+        goodsPageListSAll: [], // 票务全部
+        setList: [],
+        seatMapList: {},
+        seatMapListKey: [], // key
+        seatSelectList: [],
+        seatSelectListNo: [], // 锁定的座位
+
+        lockOrUnLockLoading: false,
+
+        performId: '',// 剧目ID
+        scaleNum: 30,
+
+        width: 0,
+        justifyContent: false,
+        activeName: 'first',
+        seatTypeList: [],   
+        
+        // 限购条件
+        ifRealUser: 0,// 散客是否实名:0-否 1-是
+        ifRealTeam: 0,// 团购是否实名:0否 1-是
+        oneMany: 0,// 证件要求: 1一证一票,2一证多票
+        personnelNum: 0,// 人员要求:0-表示不限制 其他数字表示限制人数
+      };
+    },
+    created() {
+        this.merchantTheatreAuditoriumListFun()
+        this.goodsPageListFun()
+        this.getSeatTypeList()
+    },
+    mounted() {
+        this.$set(this.queryParams,'performDate',moment().format("yyyy-MM-DD"))
+    },
+    methods: {
+        moment,
+        /**  票务信息  */
+        async goodsPageListFun(){
+            try {
+                let res = await goodsPageList({
+                    pageNum: 1,
+                    pageSize: 999,
+                    classifyId: 1,
+                    goodsType: 2,
+                })
+                if(res.code == 200){
+                    this.goodsPageListSAll = res.data.rows
+                    // let list = []
+                    // res.data.rows.forEach((item,index)=>{
+                    //     if(item.status != 1) {
+                    //         list.push(item)
+                    //     }
+                    // })
+                    // this.goodsPageListS = list
+                }
+            } catch (error) {
+                
+            }
+        },
+        /**  获取演出厅  */
+        async merchantTheatreAuditoriumListFun(){
+            try {
+                let res = await merchantTheatreAuditoriumList({
+                    pageNum: 1,
+                    pageSize: 999
+                })
+                if(res.code == 200){
+                    this.merchantTheatreAuditoriumListS = res.data.rows
+                    if(this.merchantTheatreAuditoriumListS.length>0){
+                        this.$set(this.queryParams,'auditoriumId',this.merchantTheatreAuditoriumListS[0].id)
+                        this.changeTime(this.queryParams.auditoriumId,'auditoriumId')
+                    }
+                }
+            } catch (error) {
+                
+            }
+        },
+        /**  获取场次  */
+        async merchantPerformTimeListFun(){
+            try {
+                let param = this.queryParams;
+                param.status  = 1;
+                let res = await merchantPerformTimeList(param)
+                if(res.code == 200){
+                    console.log('merchantPerformTimeListS',res.data.rows);
+                    this.merchantPerformTimeListS = res.data.rows
+                }
+            } catch (error) {
+                
+            }
+        },
+        /**  座位锁定/解锁  */
+        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)=>{
+                    list.push({
+                        "auditoriumId": this.queryParams.auditoriumId,
+                        "seatId": item.id,
+                        "timeId": this.queryParams.timeId
+                    })
+                })
+                let res = await lockOrUnLock({
+                    type: this.seatSelectListNo.length>0 ? 1 : 0,
+                    seatList: list
+                })
+                this.lockOrUnLockLoading = false
+                if(res.code) {
+                    this.$message({
+                        showClose: true,
+                        message: res.msg,
+                        type: 'success'
+                    });
+                    this.querySeatListFun(true)
+                }
+                
+            } catch (error) {
+                this.lockOrUnLockLoading = false
+                this.$message({
+                        showClose: true,
+                        message: "操作失败!!!",
+                        type: 'error'
+                    });
+                console.error('error===',error)
+            }
+            
+        },
+        /**  获取座位  */
+        async querySeatListFun(type){
+            try {
+                this.loading = true
+                this.performId = ''
+                this.screenTop = 0
+                this.scrollLeft = 0
+                if(type) { // 是否清除已选
+                    this.seatSelectList = []
+                    this.seatSelectListNo = []
+                }
+                this.seatMapList = {}
+                this.seatList = []
+                let res = await querySeatList({
+                    ...this.queryParams
+                })
+                if(res.code == 200){
+                    this.querySeatListS = res.data;
+                    this.setList = res.data;
+                    if(this.setList && this.setList.length > 0) {
+                        this.setSeatMapList(this.setList);
+                    }
+                }
+                this.loading = false
+            } catch (error) {
+                this.loading = false
+                console.error("error===",error)
+            }
+        },
+        // 设置座位集合
+        setSeatMapList(list) {
+            if(list && list.length > 0) {
+                let listCopy = {}
+                let lisyCopy1 = {}
+                let listNum = JSON.parse(JSON.stringify(this.seatTypeList))
+                listNum.forEach((item,index)=>{
+                    listNum[index]['num'] = 0 
+                })
+                list.forEach(item => {
+                    item.isDisabled = item.occupyStatus == 1 || (item.occupyStatus==0 && item.occupyOrderId) ? 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 ) {
+                                listNum[index]['num'] = listNum[index]['num'] + 1 
+                            }
+                        })
+                        if(listCopy['my'+item.rowNo]){
+                            listCopy['my'+item.rowNo].push(item)
+                        }else {
+                            listCopy['my'+item.rowNo] = [item] 
+                        }
+                    }
+                })
+                this.seatTypeList = JSON.parse(JSON.stringify(listNum))
+                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 + 1)
+                this.$nextTick(()=>{
+                    if(this.$refs.seatbox) {
+                        var ele = this.$refs.seatbox
+                        console.log(ele.getBoundingClientRect().width); // 100
+                        if(this.width<ele.getBoundingClientRect().width) {
+                            this.justifyContent = true
+                        }else {
+                            //this.justifyContent = false
+                            this.justifyContent = true
+                        }
+                        //this.$refs.seatbox.scrollTo(this.width/4,0)
+                    }
+                })
+                
+                console.log("list====",listCopy)
+                
+                let columnList = []
+                listCopy[seatMapListKey[0].key].forEach((item,index)=>{
+                    columnList.push({
+                        ...item,
+                        occupyStatus: 2,
+                        isDisabled: true,
+                        status: 0
+                    })
+                })
+                this.seatMapListKey.unshift({
+                    key: "my_column",
+                    sort: -99
+                })
+                listCopy['my_column'] = columnList
+                this.seatMapList = JSON.parse(JSON.stringify(listCopy))
+            }
+        },
+        setIsSelect(item){
+            if(!this.seatSelectList||this.seatSelectList.length==0){
+                return false
+            }
+            let flog = false
+            this.seatSelectList.forEach((item1,index1)=>{
+                if(item.id == item1.id){
+                    flog = true
+                }
+            })
+            return flog
+        },
+        /**  选择场次时间  */
+        changeTime(value,type){
+            console.log("fsdfsdf----",value,type)
+            if(type == 'timeId') {
+                this.$set(this.queryParams,'goodsId','')
+                if(value) {
+                    let flog = false
+                    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
+                                        })
+                                    }
+                                })
+                            })
+                        }
+                    })
+                    if(flog) {
+                        this.goodsPageListS = JSON.parse(JSON.stringify(list2))
+                    }else {
+                        this.goodsPageListS = JSON.parse(JSON.stringify(this.goodsPageListSAll))
+                    }
+                    
+                }else {
+                    this.goodsPageListS = []
+                }
+            }
+            this.changeTimeCheck(value,type)
+
+        },
+        /**  选择场次时间  */
+        changeTimeCheck(value,type){
+            console.log("fsdfsdf")
+            if(this.queryParams && this.queryParams.timeId && type != 'timeId' && type != 'goodsId') {
+                console.log('sdfsdfsdf',this.queryParams)
+                this.$set(this.queryParams,'timeId','')
+                this.$set(this.queryParams,'goodsId','')
+                this.merchantPerformTimeListS = []
+                this.goodsPageListS = []
+            }
+            if(this.queryParams.auditoriumId&&this.queryParams.performDate){
+                //  获取场次
+                this.merchantPerformTimeListFun()
+            }
+            if(type == 'goodsId'){
+                if(value) {
+                    this.getGoodsPerformFun(value)
+                }
+            }else {
+                this.ifRealUser = 0  // 散客是否实名:0-否 1-是
+                this.ifRealTeam = 0   // 团购是否实名:0否 1-是
+                this.oneMany = 1   // 证件要求: 1一证一票,2一证多票
+                this.personnelNum = 0   // 人员要求:0-表示不限制 其他数字表示限制人数
+            }
+            this.seatMapListKey = {}
+            this.performId = ''
+            this.seatSelectList = []
+            this.seatSelectListNo = []
+            this.seatMapList = {}
+            this.seatList = []
+            this.handleQuery()
+            
+        },
+        /**  设置 场次 对应得剧目ID */
+        changePerformId(value){
+            console.log("value=====",value)
+            this.performId = ''
+            this.merchantPerformTimeListS.forEach((item,index)=>{
+                if(item.id == value){
+                    this.performId = item.performId
+                }
+            })
+        },
+        /** 搜索按钮操作 */
+        handleQuery() {
+            this.$refs.queryForm.validate((valid) => {
+            if (valid) {
+                this.querySeatListFun(true);
+            } else {
+                console.log('error submit!!');
+                return false;
+            }
+            });
+            
+        },
+        /** 重置按钮操作 */
+        resetQuery() {
+            this.$refs.queryForm.resetFields()
+            this.performId = ''
+            this.seatSelectList = []
+            this.seatSelectListNo = []
+            this.seatMapList = {}
+            this.seatList = []
+            this.handleQuery();
+
+        },
+
+        // 座位点击事件
+        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)
+                // });
+                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 {
+                let flog = false;
+                this.seatSelectList.forEach((item,index)=>{
+                    if(item.seatTypeId != row.seatTypeId ) {
+                        flog = true
+                    }
+                })
+                if(flog){
+                    this.$message.error('只能选同一类型的座位');
+                    return
+                }
+                row.isSelect = !row.isSelect
+                if(row.isSelect){
+                    this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
+                }else {
+                    let list = JSON.parse(JSON.stringify(this.seatSelectList))
+                    list.forEach((item,index)=>{
+                        if(item.id == row.id) {
+                            this.seatSelectList.splice(index, 1)
+                        }
+                    })
+                }
+                //this.$forceUpdate()
+            }
+            
+        },
+        /** 删除已选座位  */
+        delSeatSelect(row){
+            // row.isSelect = !row.isSelect
+            // if(row.isSelect){
+            //     this.seatSelectList.push(JSON.parse(JSON.stringify(row)))
+            // }else {
+            //     let list = JSON.parse(JSON.stringify(this.seatSelectList))
+            //     list.forEach((item,index)=>{
+            //         if(item.id == row.id) {
+            //             this.seatSelectList.splice(index, 1)
+            //         }
+            //     })
+            // }
+            let list = JSON.parse(JSON.stringify(this.seatSelectList))
+            list.forEach((item,index)=>{
+                if(item.id == row.id) {
+                    this.seatSelectList.splice(index, 1)
+                }
+            })
+            Object.keys(this.seatMapList).forEach((item1,index)=>{
+                this.seatMapList[item1].forEach((item,index)=>{
+                    if(item.id == row.id) {
+                        item.isSelect = !item.isSelect
+                    }
+                })
+                
+            })
+            this.$forceUpdate()
+        },
+        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
+                //         }
+                //     }
+                // }
+                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,
+                    ifRealUser: this.ifRealUser,  // 散客是否实名:0-否 1-是
+                    ifRealTeam: this.ifRealTeam,   // 团购是否实名:0否 1-是
+                    oneMany: this.oneMany,   // 证件要求: 1一证一票,2一证多票
+                    personnelNum: this.personnelNum,   // 人员要求:0-表示不限制 其他数字表示限制人数
+                })
+            }else {
+                this.$alert('请先选择座位!!!', '提示', {
+                    confirmButtonText: '确定',
+                    callback: action => {
+                        
+                    }
+                });
+            }
+            
+        },
+        /**  弹窗关闭 */
+        clearDialogVisible(){
+            //this.
+            this.querySeatListFun(true)
+        },
+        /**  选择tab */
+        handleClickTab(){
+
+        },
+        /** 获取座位类型 说明 */
+        getSeatTypeList() {
+            getSeatType({
+                pageNum: 1,
+                pageSize: 999,
+            })
+            .then(response => {
+                this.seatTypeList = response.data.rows;
+                }
+            );
+        },
+        /**   显示座位类型  */
+        setSeatTypeShow(value){
+            let srt = ''
+            this.seatTypeList.forEach((item,index)=>{
+                if(value == item.id) {
+                    srt = item.name
+                }
+            })
+
+            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>
+  <style lang="scss" scoped>
+  .app-container-me {
+    width: 100%;
+    height: calc( 100vh - 120px );
+  }
+  .seat-tool-box {
+    height: 20px;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    span{
+        flex-shrink: 0;
+        font-size: 12px;
+    }
+    .seat-tool-box-slider {
+        width: 100px;
+        margin-left: 10px;
+    }
+  }
+  .seat-box {
+    width: 100%;
+    height: calc( 100% - 100px ) ;
+    box-sizing: border-box;
+    display: flex;
+    position: relative;
+    .seat-list-box {
+        width: calc(100% - 210px);
+        //width: 100%;
+        height: 100%;
+        box-sizing: border-box;
+        position: relative;
+    }
+    .seat-select-box {
+        width: 200px;
+        height: 100%;
+        flex-shrink: 0;
+        box-sizing: border-box;
+        padding: 0 5px;
+        margin-left: 10px;
+        border: 1px solid #ccc;
+        border-radius: 10px;
+        .seat-select-info {
+            width: 100%;
+            height: calc( 100% - 60px );
+            overflow: hidden;
+            overflow-y: auto;
+            .seat-select-item {
+                border: 1px solid #ccc;
+                margin-bottom: 5px;
+                padding: 5px;
+                border-radius: 5px;
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                font-size: 12px;
+                >div:first-child {
+                    display: flex;
+                    flex-direction: column;
+                    span:first-child {
+                        font-weight: 600;
+                    }
+                }
+                >div:last-child {
+                    span:first-child {
+                        color: #f56c6c;
+                        cursor: pointer;
+                    }
+                }
+            }
+
+            .seat-select-color-item {
+                display: flex;
+                align-items: center;
+                margin-bottom: 5px;
+                >span:first-child {
+                    width: 20px;
+                    height: 20px;
+                    flex-shrink: 0;
+                }
+                >span:last-child {
+                    font-size: 16px;
+                    font-weight: 600;
+                    margin-left: 10px;
+                }
+            }
+        }
+    }
+  }
+
+  .seat-list-box::before {
+    content: "舞台";
+    position: absolute;
+    left: 50%;
+    transform: translateX(-50%);
+    width: 300px;
+    height: 30px;
+    background-color: rgb(204, 204, 204,0.5);
+    font-size: 18px;
+    font-weight: 600;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-radius: 0 0 20px 20px;
+    z-index: 99;
+  }
+  .dialog {
+    padding: 30px 10px 10px;
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    overflow: auto;
+    border-radius: 10px;
+    border: 1px  solid #323333;
+    position: relative;
+    .dialog-box {
+        position: relative;
+    }
+    .upload-btn {
+      width: 100px;
+      height: 100px;
+      background-color: #fbfdff;
+      border: dashed 1px #c0ccda;
+      border-radius: 5px;
+      i {
+        font-size: 30px;
+        margin-top: 20px;
+      }
+      &-text {
+        margin-top: -10px;
+      }
+    }
+    .avatar {
+      cursor: pointer;
+    }
+    .title-class{
+      font-size: 16px;
+      font-weight: bold;
+      color: black;
+      margin-bottom: 20px;
+      margin-top: 20px;
+    }
+    .item-class{
+      margin-bottom: 20px;
+    }
+    .seat-box-class{
+      padding: 5px;
+      transform-origin: 50% 0;
+      transform: scale(var(--scaleNum));
+      box-sizing: border-box;
+      .disabled-class{
+        background-color: #ffffff;
+        border: none !important;
+        user-select: none;
+        // pointer-events: none;
+        cursor: not-allowed !important;
+        .text-class {
+            color: #fff !important;
+        }
+      }
+      .select-class{
+        //background-color: #e85353 !important;
+        border: 5px solid #1890ff !important;
+       // color: #eceaea !important;
+       position: relative;
+      }
+
+      /** 手动锁定  */
+      .occupy-status: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_1.png');
+        background-size: 50% 50%;
+        background-position: 50% 50%;
+        background-repeat: no-repeat;
+        z-index: 99;
+    }
+      .occupy-status {
+        //pointer-events: none;
+      }
+      /**  锁定被选择  */
+      .occupy-status-select {
+        border: 5px solid #ff182f !important;
+      }
+      /** 订单待支付锁定 */
+      .order-occupy-status {
+
+      }
+      .order-occupy-status: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;
+    }
+      .occupy-status-no {
+        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_1.png');
+            background-size: 50% 50%;
+            background-position: 50% 50%;
+            background-repeat: no-repeat;
+            z-index: 99;
+        } */
+      .seat-item-class-box {
+        width: 100%;
+        display: flex;
+        flex-wrap: nowrap;
+        justify-content: center;
+        margin: auto 0;
+        text-align: center;
+      }
+      .seat-item-class{
+        flex-shrink: 0;
+        display: block;
+        float: left;
+        width: 60px;
+        height: 60px;
+        margin: 5px;
+        border: 1px solid #4c4d4d;
+        border-radius: 3px;
+        cursor: pointer;
+        position: relative;
+        user-select: none;
+        // transform-origin: 50% 50%;
+        // transform: scale(var(--scaleNum));
+        z-index: 999;
+        &:hover{
+          opacity: 0.6;
+        }
+  
+        .text-class{
+          font-size: 12px;
+          padding: 5px;
+          line-height: 16px;
+          margin: 0;
+          color: #000;
+        }
+      }
+    }
+
+    .seat-box-class-row {
+        display: flex !important;
+        align-items: center;
+        user-select: none;
+        cursor: not-allowed !important;
+        border: none !important;
+        font-weight: 600;
+        font-size: 24px;
+    }
+    .seat-item-class-column {
+        display: flex !important;
+        align-items: center;
+        justify-content: center;
+        user-select: none;
+        cursor: not-allowed !important;
+        border: none !important;
+        font-weight: 600;
+        font-size: 24px;
+    }
+  }
+
+  #moveSelected{
+    position:absolute;
+    background-color: blue;
+    opacity:0.3;
+    border:1px dashed #d9d9d9;
+    top:0;
+    left:0;
+}
+  </style>

+ 1 - 0
src/views/order/viewers/index.vue

@@ -173,6 +173,7 @@
               <dict-tag :options="dict.type.personnel_type" :value="scope.row.identity" />
             </template>
           </el-table-column>
+          <el-table-column label="打印次数/次" align="center" prop="ticketPrintTotal" />
           <el-table-column label="备注" align="center" prop="remark" />
           <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
             <template slot-scope="scope">