浏览代码

1. 修复bug

MONSTER-ygh 1 年之前
父节点
当前提交
971d8755c3

+ 7 - 1
src/views/order/groupBuyingMr/dialog/details.vue

@@ -56,8 +56,14 @@
         <el-col :span="12">
           <div class="grid-content bg-purple item-class">联系电话: <span>{{ form.teamMobile || '' }}</span></div>
         </el-col>
-        <el-col :span="12">
+        <!-- <el-col :span="12">
           <div class="grid-content bg-purple item-class">支付总额: <span>¥{{ form.orderPrice || '' }}</span></div>
+        </el-col> -->
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">应付金额: <span>¥{{ form.orderPrice || '' }}</span></div>
+        </el-col>
+        <el-col :span="12">
+          <div class="grid-content bg-purple item-class">实付金额: <span>¥{{ form.realPrice || '' }}</span></div>
         </el-col>
         <el-col :span="12">
           <div class="grid-content bg-purple item-class">团购人数: <span>{{ form.quantity || '' }}</span></div>

+ 11 - 1
src/views/order/groupBuyingMr/index.vue

@@ -126,10 +126,20 @@
         </template>
       </el-table-column>
       <el-table-column label="团购数量" align="center" prop="quantity" />
-      <el-table-column label="支付总额" align="center" prop="orderPrice">
+      <!-- <el-table-column label="支付总额" align="center" prop="orderPrice">
         <template slot-scope="scope">
           <span>¥{{ scope.row.orderPrice }}</span>
         </template>
+      </el-table-column> -->
+      <el-table-column label="应付金额" align="center" prop="orderPrice">
+        <template slot-scope="scope">
+          <span>¥{{ scope.row.orderPrice }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="实付金额" align="center" prop="realPrice">
+        <template slot-scope="scope">
+          <span>¥{{ scope.row.realPrice }}</span>
+        </template>
       </el-table-column>
       <el-table-column label="支付方式" align="center" prop="type">
         <template slot-scope="scope">

+ 10 - 8
src/views/order/viewers/index.vue

@@ -381,11 +381,11 @@ export default {
     handleQuery() {
       this.queryParams.pageNum = 1;
       if (this.queryParams.time) {
-        this.queryParams.payBeginTime = this.queryParams.time[0];
-        this.queryParams.payEndTime = this.queryParams.time[1];
+        this.queryParams.beginTime = this.queryParams.time[0];
+        this.queryParams.endTime = this.queryParams.time[1];
       }else {
-        this.queryParams.payBeginTime = null
-        this.queryParams.payEndTime = null
+        this.queryParams.beginTime = null
+        this.queryParams.endTime = null
       }
       if (this.queryParams.createTime && this.queryParams.createTime.length > 0) {
         this.queryParams.createBeginTime = this.queryParams.createTime[0];
@@ -396,11 +396,13 @@ export default {
       }
 
       if (this.queryParams.payTime && this.queryParams.payTime.length > 0) {
-        this.queryParams.beginTime = this.queryParams.payTime[0];
-        this.queryParams.endTime = this.queryParams.payTime[1];
+        this.queryParams.payBeginTime = this.queryParams.payTime[0];
+        this.queryParams.payEndTime = this.queryParams.payTime[1];
+       
       }else {
-        this.queryParams.beginTime = null
-        this.queryParams.endTime = null
+        this.queryParams.payBeginTime = null
+        this.queryParams.payEndTime = null
+        
       }
       this.getList();
     },

+ 1 - 0
src/views/statisticalReport/seatInventory.vue

@@ -38,6 +38,7 @@
           <span>{{ scope.row.performTimeStart }} -- {{ scope.row.performTimeEnd }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="座位类型" align="center" prop="seatTypeName"></el-table-column>
       <el-table-column label="座位总数" align="center">
         <template slot-scope="scope">
           <span>{{ scope.row.total }}张</span>

+ 9 - 2
src/views/venue/performanceHallMr/dialog/seatTemplateEdit.vue

@@ -28,6 +28,7 @@
             <span class="dialog-footer">
               <el-button @click="cancel">关闭</el-button>
               <el-button
+                v-if="!initLoading"
                 type="primary"
                 @click="submitFormCopy"
                 v-loading.fullscreen.lock="loading"
@@ -48,7 +49,7 @@
           </div>
         </div>
       </template>
-    <div class="dialog-ygh">
+    <div v-loading="initLoading" element-loading-text="拼命加载中" class="dialog-ygh">
       <!--  座位管理器  -->
       <seatManagementTable
       ref="seatManagementTable"
@@ -73,6 +74,7 @@ export default {
       title: "座位配置",
       open: false, // 打开弹窗
       loading: false,
+      initLoading: false,// 初始化
       seatWidth: null,
       seatMap: {
         row: 0,
@@ -116,6 +118,7 @@ export default {
      */
     openDialog(title, obj) {
       console.log('obj====',obj)
+      this.initLoading = true
       this.open = true;
       this.colSeatMap = {}
       this.boxWidth = 0;
@@ -135,6 +138,7 @@ export default {
       getSelectById(id).then(response => {
         const dataList = response.data;
         this.$nextTick(() =>{
+          this.initLoading = false
           // dataList.forEach(item => {
           //   if(item.status == 2){
           //     item.color = '#7d7d7e';
@@ -143,7 +147,10 @@ export default {
           // })
           this.$refs.seatManagementTable.initData(row,dataList,'edit')
         })
-      });
+      }).catch(()=>{
+        this.initLoading = false
+        this.open = false
+      })
     },
     /**  调用 座位保存功能   */
     submitFormCopy(){

+ 49 - 3
src/views/venue/performanceHallMr/mixins/selectList.js

@@ -1,3 +1,9 @@
+import { cos } from "mathjs";
+
+ //定义变量储存div的宽高
+ var obj_w, obj_h;
+ //定义一个变量判断是否执行移动函数
+ var mouseDown = false;
 export default {
     data() {
         return {
@@ -8,6 +14,44 @@ export default {
         }
     },
     methods: {
+        //鼠标按下函数
+        downDiv(obj) {
+            //获取div的宽高
+            obj_w = obj.offsetWidth;
+            obj_h = obj.offsetHeight;
+            //鼠标
+            var e = event || window.event;
+            //e.clientX/Y 是获取鼠标相对浏览器的位置;将div中心自动居中到鼠标
+           
+            let left = (e.clientX - obj_w / 2) + "px";
+            let top = (e.clientY - obj_h / 2) + "px";
+            console.log('鼠标按下===',mouseDown,left, top)
+            //按下时为ture,松开时为false,以判断是否执行执行mouveDiv
+            mouseDown = true;
+        
+        },
+        
+        //鼠标移动函数
+        moveDiv(obj) {
+            obj_w = obj.offsetWidth;
+            obj_h = obj.offsetHeight;
+            var e = event || window.event;
+            // console.log(e.clientX, e.clientY);
+            // console.log(obj_w, obj_h);
+            if (mouseDown) {
+                obj.style.left = (e.clientX - obj_w / 2) + "px";
+                obj.style.top = (e.clientY - obj_h / 2) + "px";
+                console.log('鼠标移动===',obj.style.left, obj.style.top)
+            }
+        
+        },
+        
+        //鼠标松开函数
+        upDiv(obj) {
+            mouseDown = false;
+            console.log('鼠标鼠标所开===',mouseDown)
+        },
+
         /**  当前选择  开始   */
         /**  多选  */
         dragSelectChange(e){
@@ -22,9 +66,11 @@ export default {
             }
             
         },
-        dragLostItemChange(){},
-        reSelect() {
-
+        dragLostItemChange(e){
+            console.log("最后一个===",e)
+        },
+        reSelect(e) {
+            console.log("reSelect===",e)
         },
         addSelectTabelList(){
             if(this.selectList && this.selectList.length > 0) {

+ 44 - 27
src/views/venue/performanceHallMr/model/seatManagementTable.vue

@@ -26,19 +26,19 @@
             </div>
         </div>
         <div class="sm-box">
-            <div class="sm-scroll-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%"
                     ref="table" 
-                    row-key="id"
+                    row-key="tableId"
                     class="exchange_table"
                     :style="{
                         '--row-scale': whNum/100,
@@ -84,7 +84,9 @@
                             </div>
                         </template>
                         <template slot-scope="scope">
-                            <div class="row-item-box" :style='{display: "flex",flexWrap: "nowrap",justifyContent: item.align}'>
+                            <div 
+                            class="row-item-box" 
+                            :style='{display: "flex",flexWrap: "nowrap",justifyContent: item.align}'>
                                 <div 
                                 :class="['row-item',selectList.includes(item1.styleCss.id) ? 'row-item-select': '']"
                                 v-for="(item1,index1) in scope.row[item.key]" 
@@ -276,7 +278,7 @@
                             <div class="qu-select-box">
                                 <div class="qu-select-select">
                                     <span>提示:</span> 
-                                    <span>鼠标左键按下拖动可进行多选</span>
+                                    <span>鼠标左键按下拖动可进行多选</span>
                                 </div>
                                 <div class="qu-select-tool">
                                     <div>
@@ -324,7 +326,10 @@
                 
             </div>
         </div>
-
+        <div class="sm-box-tig">
+            <span>座位总数: {{ tableDataAll && tableDataAll.length }}</span>
+            <span style="margin-left: 10px;">可用座位总数: {{ availableSeat }}</span>
+        </div>
         <!--  批量操作   -->
         <el-dialog
             :title="formDialogVisibleTitle"
@@ -442,8 +447,7 @@
 </template>
  
 <script>
-import Sortable from "sortablejs";
-import dragSelect from 'ty-drag-select';
+import Sortable from "sortablejs";  // 拖动排序
 import { pageList as getSeatTypeList } from '@/api/seatTypeMr/seatTypeMr'
 import selectListMixin from "../mixins/selectList"
 export default {
@@ -560,18 +564,18 @@ export default {
             },
             formAllType: '', // region 区域
             /** 编辑区域 结束  */
-
-            
+            dragSelectObjTime: null,
+            dragSelectObj: {
+                selectClass: ['.row-item'],
+                change: this.dragSelectChange,
+                lostItem: this.dragLostItemChange,
+                reSelect: this.reSelect,
+                syncData:{switch:false}
+            },
+            availableSeat: 0, // 可用座位总数
         };
     },
     mounted() {
-        //this.initData()
-        // this.initDataCopy()
-        // setTimeout(() => {
-        //   let tbody = document.getElementsByClassName('exchange_table')[0].getElementsByTagName('tbody');
-        //   tbody[0] && (tbody[0].className += ' box-table');
-        //   this.initSortTable();
-        // }, 1000)
         // 拖拽事件
         this.columnDrop() 
 
@@ -634,6 +638,7 @@ export default {
                 list.forEach((item,index) => {
                     listCopy.push({
                         ...item,
+                        tableId: this.tableHeader[0].key + "_"+item.rowNo+"_"+item.columnNo,
                         styleCss: item.styleCss ? {
                             ...JSON.parse(JSON.parse(item.styleCss)),
                             id: this.tableHeader[0].key + "_"+item.rowNo+"_"+item.columnNo,
@@ -658,7 +663,7 @@ export default {
             let list1 = JSON.parse(JSON.stringify(this.tableData))
             for(let i = 0;i<this.rowAll;i++) {
                 list1[i] = {
-                    tableId: 'A_'+ i,
+                    tableId: 'A_'+ i, // this.tableHeader[0].key + "_"+i+"_"+j
                     A: []
                 }
                 for(let j = 0; j<list.length;j++) {
@@ -674,14 +679,22 @@ export default {
                     }
                 }
             }
-
+            
             //  排序
             for(let j = 0; j < list1.length ; j++) {
                 for(let i = 0;i<this.tableHeader.length;i++) {
                     list1[j][this.tableHeader[i].key].sort(this.sortFun)
                 }
             }
-            
+
+            //  可用座位 计数
+            let availableSeat = 0
+            for(let j = 0; j < list.length ; j++) {
+                if(list[j].status == 1) {
+                    availableSeat = availableSeat + 1
+                }
+            }
+            this.availableSeat = availableSeat
             this.tableData = JSON.parse(JSON.stringify(list1))
             console.log("this.tableData===",this.tableData)
             this.countRegionW()
@@ -735,7 +748,7 @@ export default {
                                 color: '#E6E6FA',// 座位类型对应的颜色
                                 //delFlag: 0, // 座位是否可用
                                 priority: '', // 座位出票顺序  数字越小越优先
-                                status: 2, //0-初始(该状态下不C端显示) 1-可用 2-不可用
+                                status: 1, //0-初始(该状态下不C端显示) 1-可用 2-不可用
                             })
                         }
                     }
@@ -799,7 +812,7 @@ export default {
                         color: '#E6E6FA',// 座位类型对应的颜色
                         //delFlag: 0, // 座位是否可用
                         priority: '', // 座位出票顺序  数字越小越优先
-                        status: 2, //0-初始(该状态下不C端显示) 1-可用 2-不可用
+                        status: 1, //0-初始(该状态下不C端显示) 1-可用 2-不可用
                     })
                 }
                 this.tableDataAll = this.tableDataAll.concat(list)
@@ -1422,6 +1435,10 @@ export default {
     --row-h: 26px;
     --row-scale: 1;
 }
+
+.sm-box-tig {
+    padding: 10px;
+}
 .sm-scroll-box {
     width: calc( 100% - var(--left-tool-w) );
     height: 100%;

+ 11 - 6
src/views/venue/venueMr/dialog/addAndEdit.vue

@@ -81,12 +81,14 @@
           />
         </el-form-item>
         <el-form-item label="容纳人数" prop="capacityNum">
-          <el-input
-            v-model="form.capacityNum"
-            placeholder="容纳人数"
-            clearable
-            style="width: 100%;"
-          />
+          <el-input-number 
+          v-model="form.capacityNum"  
+          placeholder="容纳人数" 
+          style="width: 100%;text-align: left;" 
+          clearable 
+          :disabled="openType == 'see'" 
+          :controls="false" :min="-10000000" :max="10000000">
+          </el-input-number>
         </el-form-item>
         <el-form-item label="场馆位置" prop="address">
           <span>{{form.address}}</span>
@@ -356,6 +358,9 @@ export default {
   padding: 0 30px;
   max-height: 65vh;
   overflow-y: auto;
+  ::v-deep .el-input-number.is-without-controls .el-input__inner {
+    text-align: left !important;
+  }
 }
 .dialog {
   padding: 0 30px;