MONSTER-ygh 5 månader sedan
förälder
incheckning
6173dcac8a

+ 29 - 0
src/api/team/creditRecord.js

@@ -0,0 +1,29 @@
+import request from '@/utils/request'
+
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/member/marketTeamCreditAccount/pageList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 对公支付
+export const gotoCorporatePay = (data) => {
+  return request({
+    url: '/member/marketTeamCreditAccount/payment',
+    method: 'post',
+    data: data
+  })
+}
+
+//  导出
+export function downOrderListXls(params) {
+  return request({
+    url: '/order/orderInfo/teamOrderlistExport',
+    method: 'get',
+    responseType: 'blob',
+    params
+  });
+}

+ 10 - 0
src/api/windowTicketSales/ticketingSales.js

@@ -158,4 +158,14 @@ export const selectMarketTeamBySourceApi = (query) => {
     method: 'get',
     params: query
   })
+}
+
+
+// 根据OTA来源查询剩余金额
+export const lockOrUnLockApi = (query) => {
+  return request({
+    url: '/merchant/merchantSeatOccupy/showRemark',
+    method: 'get',
+    params: query
+  })
 }

+ 141 - 0
src/views/officesale/model/lockSeat.vue

@@ -0,0 +1,141 @@
+<template>
+    <el-dialog :title="title" :visible.sync="dialogVisible" width="40%" :before-close="handleClose">
+        <div v-if="type == 1" v-loading="loading">
+            <el-table :data="tableData" style="width: 100%">
+                <el-table-column prop="date" label="座位号" width="180">
+                </el-table-column>
+                <el-table-column prop="name" label="锁定人" width="180">
+                </el-table-column>
+                <el-table-column prop="address" label="锁定原因">
+                </el-table-column>
+            </el-table>
+        </div>
+        <div v-if="type == 0" v-loading="loading">
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                <el-form-item label="锁定原因" prop="remark">
+                    <el-input type="textarea" :rows="4" placeholder="请输入锁定原因" maxlength="250" v-model="ruleForm.remark"></el-input>
+                </el-form-item>
+            </el-form>
+        </div>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="handleClose">取 消</el-button>
+            <el-button :loading="loading" type="primary" @click="lockOrUnLockFun">提交</el-button>
+        </span>
+    </el-dialog>
+</template>
+<script>
+import { lockOrUnLockApi, lockOrUnLock } from "@/api/windowTicketSales/ticketingSales"
+export default {
+    name: "LockSeat",
+    data() {
+        return {
+            loading: false,
+            dialogVisible: false,
+            tableData: [],
+            type: null,
+            list: [],
+            title: '',
+            auditoriumId: '',
+            timeId: '',
+            ruleForm: {
+                remark: null
+            },
+            rules: {
+                remark: [
+                    { required: true, message: '请输入锁定原因', trigger: ['blur', 'change'] },
+                ]
+            }
+        }
+    },
+    methods: {
+        /**
+         * 
+         * @param list 解锁列表
+         * @param list1 上锁列表
+         */
+        async open(list = [], list1 = [], auditoriumId = null, timeId = null) {
+            this.auditoriumId = auditoriumId
+            this.timeId = timeId
+            this.list = list.length > 0 ? list : list1
+            this.type = list.length > 0 ? 1 : 0 // 1 解锁 0 上锁
+            this.title = list.length > 0 ? '解锁提示' : '锁定提示' // 1 解锁 0 上锁
+            console.log(list, list1)
+            if (list.length > 0) {
+                await this.lockOrUnLockDeatilFun()
+            }
+            this.dialogVisible = true
+            this.$nextTick(() => {
+                if (list.length == 0) {
+                    this.$refs.ruleForm.clearValidate()
+                }
+            })
+        },
+        handleClose() {
+            this.ruleForm = {}
+            this.dialogVisible = false
+        },
+        /**  */
+        async lockOrUnLockDeatilFun() {
+            try {
+                let list = []
+                this.list.forEach((item, index) => {
+                    list.push({
+                        "auditoriumId": this.auditoriumId,
+                        "seatId": item.id,
+                        "timeId": this.timeId
+                    })
+                })
+                let res = await lockOrUnLockApi({
+                    seatList: list
+                })
+                if (res.code == 200) {
+                    console.log("ssssss====", res)
+                } else {
+                    this.handleClose()
+                }
+            } catch (error) {
+                this.handleClose()
+            }
+        },
+        /**  座位锁定/解锁  */
+        async lockOrUnLockFun(type) {
+            try {
+                this.loading = true
+                let list = []
+                this.list.forEach((item, index) => {
+                    list.push({
+                        "auditoriumId": this.auditoriumId,
+                        "seatId": item.id,
+                        "timeId": this.timeId
+                    })
+                })
+                let res = await lockOrUnLock({
+                    type: this.type,
+                    seatList: list,
+                    remark: this.ruleForm.remark
+                })
+                this.loading = false
+                if (res.code) {
+                    this.$message({
+                        showClose: true,
+                        message: res.msg,
+                        type: 'success'
+                    });
+                    this.$emit('querySeatListFun', true)
+                    this.handleClose()
+                }
+
+            } catch (error) {
+                this.loading = false
+                this.$message({
+                    showClose: true,
+                    message: "操作失败!!!",
+                    type: 'error'
+                });
+                console.error('error===', error)
+            }
+
+        },
+    }
+}
+</script>

+ 118 - 24
src/views/officesale/ticketingSales.vue

@@ -132,6 +132,8 @@
                                 v-for="(item, index) in seatMapList[item1.key]" 
                                 :style="{backgroundColor: item.color && !(item.isDisabled || item.status != 1) ? item.color : 'none'}"
                                 @click.stop="seatClick(item)" 
+                                @mouseenter="lockOrUnLockDeatilFun($event,item)"
+                                @mouseleave="lockOrUnLockDeatilFun1"
                                 :dragSelectId="item.id"
                                 :index="item1.key +'_'+ index"
                                 :key="index">
@@ -196,8 +198,16 @@
             </div>
         </div>
       </div>
+      <!--  锁座备注  -->
+      <lock-seat ref="lockSeat" @querySeatListFun="querySeatListFun" />
       <!--  添加观影人  -->
       <increaseViewers ref="increaseViewers" @clearDialogVisible="clearDialogVisible" />
+      
+      <!-- 提示信息  -->
+      <div :style="lockStyle" v-if="isLcokShow" class="lock-style-box">
+        <div><span>锁定人:</span><span>{{ lockObj.auth }}</span></div> 
+        <div><span>锁定原因:</span><span>{{ lockObj.remark }}</span></div> 
+      </div>
     </div>
   </template>
   
@@ -208,17 +218,20 @@
   lockOrUnLock,
   merchantTheatreAuditoriumList,
   goodsPageList,
-  getGoodsPerformApi
+  getGoodsPerformApi,
+  lockOrUnLockApi
  } from '@/api/windowTicketSales/ticketingSales'
+ //import increaseViewers from "./model/increaseViewers"
  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"
+import LockSeat from './model/lockSeat.vue'
  export default {
     name: "TicketingSales1",
     components: {
-        increaseViewers
+        increaseViewers,
+        LockSeat
     },
     mixins: [selectListMixin],
     data() {
@@ -272,6 +285,17 @@
         ifRealTeam: 0,// 团购是否实名:0否 1-是
         oneMany: 0,// 证件要求: 1一证一票,2一证多票
         personnelNum: 0,// 人员要求:0-表示不限制 其他数字表示限制人数
+
+        isLcokShow: false,
+        lckTime: null,
+        seatId: null,
+        lockStyle: {
+            
+        },
+        lockObj: {
+            auth: '',
+            remark: ''
+        }
       };
     },
     created() {
@@ -347,27 +371,31 @@
                     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
+                if(this.seatSelectListNo.length == 0) {
+                    this.$refs.lockSeat.open(this.seatSelectListNo,this.seatSelectList,this.queryParams.auditoriumId,this.queryParams.timeId)
+                }else {
+                    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)
+                    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) {
@@ -786,10 +814,64 @@
                 this.oneMany = 1   // 证件要求: 1一证一票,2一证多票
                 this.personnelNum = 0   // 人员要求:0-表示不限制 其他数字表示限制人数
             }
+        },
+        /** 获取锁定人和锁定备注  */
+        async lockOrUnLockDeatilFun(e,item) {
+            try {
+                if(this.lckTime) {
+                    clearTimeout(this.lckTime)
+                }
+                if(item.occupyStatus !== 0) {
+                    this.isLcokShow = false
+                    return
+                }
+                if(item.id == this.seatId){ return }
+                this.seatId = item.id
+                this.isLcokShow = false
+                this.lckTime = setTimeout(async ()=>{
+                    let res = await lockOrUnLockApi({
+                        auditoriumId: this.queryParams.auditoriumId,
+                        timeId: this.queryParams.timeId,
+                        seatId: item.id
+                    })
+                    if (res.code == 200) {
+                        this.isLcokShow = true
+                        this.lockObj = {
+                            remark: res.data.remark,
+                            auth: res.data.createBy
+                        }
+                        this.lockStyle = {
+                            position: "fixed",
+                            top: (e.y + 10) + 'px',
+                            left: (e.x + 10)+ 'px',
+                            zIndex: 999999
+                        }
+                    } else {
+                        this.handleClose()
+                    }
+                },500)
+            } catch (error) {
+                this.handleClose()
+            }
+        },
+        lockOrUnLockDeatilFun1() {
+            this.isLcokShow = false
+            this.seatId = null
         }
     }   
   };
   </script>
+  <style>
+  .lock-style-box {
+    padding: 10px;
+    border-radius: 10px;
+    position: fixed;
+    z-index: 99999;
+    background-color: rgba(0,0,0,0.5);
+    color: #fff;
+    font-size: 12px;
+  }
+</style>
   <style lang="scss" scoped>
   .app-container-me {
     width: 100%;
@@ -1080,7 +1162,19 @@
         font-size: 24px;
     }
   }
-
+  .dialog::-webkit-scrollbar {
+            width: 10x !important;
+            height: 10px !important;
+    }
+    .dialog::-webkit-scrollbar {
+        width: 10px;
+        height: 10px;
+        opacity: 0.5;
+    }
+    .dialog::-webkit-scrollbar-thumb {
+        border-radius: 15px;
+        //background-color: #0257aa;
+    }
   #moveSelected{
     position:absolute;
     background-color: blue;

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

@@ -104,9 +104,15 @@
         </el-row>
 
         <!-- 对公支付信息 -->
-        <div v-if="form.payWay=='corporate'&&form.status>0&&form.corporate">
+        <div v-if="form.payWay=='corporate'&&form.status>0&&(form.corporate || form.teamCredit)">
           <div class="title-class">对公支付信息</div>
             <el-row>
+              <el-col class="pay-type-remark" :span="24">
+                对公类型:{{form.payOrCredit == 1 ? '对公支付': form.payOrCredit == 2 ? '挂账':''}}
+              </el-col>
+              <el-col v-if="form.payOrCredit == 2" class="pay-type-remark" :span="24">
+                账期:{{form.rePaymentTime}}
+              </el-col>
               <el-col :span="24">
                 <div class="voucher-list">
                   <el-image 
@@ -300,9 +306,15 @@ export default {
         let res = await getSelectById(id)
         this.seatSelectList = res.data.viewersOrderList
         this.form = res.data;
+        this.form.payOrCredit = null
         if(res.data.corporate){
+          this.form.payOrCredit = 1
           this.voucherUrl = res.data.corporate.voucherUrl.split(',')||[];
           this.corporateRremark =  res.data.corporate.remark;
+        }else if(res.data.teamCredit && JSON.stringify(res.data.teamCredit) != '{}'){
+          this.form.payOrCredit = 2
+          this.voucherUrl = res.data.teamCredit.repaymentVoucherUrl.split(',')||[]
+          this.corporateRremark =  res.data.teamCredit.remark
         }
         this.loading_form =  false//  加载表单
         let res1 = await querySeatList({

+ 75 - 68
src/views/order/groupBuyingMr/index.vue

@@ -297,7 +297,7 @@
                   <el-dropdown-item 
                   command="1" 
                   
-                  v-if="hasPermi('groupBuyingMr:groupBuyingMr:details') && (scope.row.payWay == 'corporate'||scope.row.status === 0)">对公转账</el-dropdown-item>
+                  v-if="hasPermi('groupBuyingMr:groupBuyingMr:duigong') && (scope.row.payWay == 'corporate'||scope.row.status === 0)">对公转账</el-dropdown-item>
                   <el-dropdown-item 
                   command="2" 
                   
@@ -312,43 +312,6 @@
                   v-if="hasPermi('groupBuyingMr:groupBuyingMr:reset') && scope.row.status == 0">修改订单</el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
-              <!-- <span v-hasPermi="['groupBuyingMr:groupBuyingMr:details']" style="display: inline-block;">
-                <el-button
-                v-if="scope.row.payWay == 'corporate'||scope.row.status === 0"
-                  size="mini"
-                  type="text"
-                  style="margin-left: 10px;"
-                  @click="handleCorporatePay(scope.row)"
-                
-                >对公转账</el-button>
-              </span>
-              <span v-hasPermi="['groupBuyingMr:groupBuyingMr:cancel']" style="display: inline-block;">
-                <el-button
-                  v-if="scope.row.status == 0"
-                  size="mini"
-                  type="text"
-                  style="margin-left: 10px;"
-                  @click="handleCancelOrder(scope.row)"
-                >关闭订单</el-button>
-              </span>
-              <span v-hasPermi="['groupBuyingMr:groupBuyingMr:print']" style="display: inline-block;">
-                <el-button
-                  v-if="scope.row.status == 3 || scope.row.status == 7"
-                  size="mini"
-                  type="text"
-                  style="margin-left: 10px;"
-                  @click="handleOpen([scope.row])"
-                >打印小票</el-button>
-              </span>
-              <span v-hasPermi="['groupBuyingMr:groupBuyingMr:reset']" style="display: inline-block;">
-                <el-button
-                  v-if="scope.row.status == 0"
-                  size="mini"
-                  type="text"
-                  style="margin-left: 10px;"
-                  @click="handleResetOpen(scope.row)"
-                >修改订单</el-button>
-              </span> -->
             </template>
           </el-table-column>
         </el-table>
@@ -393,7 +356,16 @@
         width="50%"
         @close="handleCorporatePayClose"
         :before-close="handleCorporatePayClose">
-        <el-form v-loading="corporatePayLoading" :model="ruleForm" :rules="corporatePayRules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+        <el-form v-loading="corporatePayLoading" :model="form" :rules="corporatePayRules" ref="ruleForm1" label-width="120px" class="demo-ruleForm">
+          <el-form-item v-if="!form.eaitType" label="类型" prop="payOrCredit">
+            <el-radio-group v-model="form.payOrCredit">
+              <el-radio :label="1">对公支付</el-radio>
+              <el-radio :label="2">挂账</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item v-if="form.eaitType" label="类型" prop="payOrCredit">
+            <span>{{ form.payOrCredit == 1 ? '对公支付':'挂账' }}</span>
+          </el-form-item>
           <!-- <el-form-item label="凭证上传" prop="photoList" required>
             <el-upload
                 ref="upload"
@@ -411,7 +383,18 @@
                 <i class="el-icon-plus"></i>
               </el-upload>
           </el-form-item> -->
-          <el-form-item label="凭证上传" prop="photoList">
+          <el-form-item v-if="form.payOrCredit == 2 && !form.eaitType" label="账期" prop="rePaymentTime">
+            <el-date-picker
+              v-model="form.rePaymentTime"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item v-if="form.payOrCredit == 2 && form.eaitType" label="账期" prop="rePaymentTime">
+            <span>{{ moment(form.rePaymentTime).format("yyyy-MM-DD") }}</span>
+          </el-form-item>
+          <el-form-item :label="form.payOrCredit != 2?'凭证上传':'挂账类型凭证'" prop="photoList">
             <div style="display: flex;flex-wrap: wrap;">
               <div 
               v-for="(item,index) in form.photoList" 
@@ -422,13 +405,13 @@
                   :src="item" 
                   :preview-src-list="form.photoList">
                 </el-image>
-                <span @click="handleRemove(index)" style="position: absolute;top: -15px;right: -15px;color: red;font-size: 24px;z-index: 999;cursor: pointer;">
+                <span v-if="!form.eaitType" @click="handleRemove(index)" style="position: absolute;top: -15px;right: -15px;color: red;font-size: 24px;z-index: 999;cursor: pointer;">
                   <i class="el-icon-error"></i>
                 </span>
               </div>
               <div 
               style="width: 100px; height: 100px;margin-top: 5px;" 
-              v-if="!form.photoList||form.photoList.length<15"
+              v-if="!form.photoList||form.photoList.length<15 && !form.eaitType"
               v-loading="actionUrlLoading"
               element-loading-text="上传中..."
               element-loading-spinner="el-icon-loading"
@@ -452,12 +435,13 @@
             </div>
           </el-form-item>
           <el-form-item label="备注">
-            <el-input placeholder="请备注" type="textarea" maxlength="300" show-word-limit v-model="form.corporate.remark"></el-input>
+            <el-input v-if="form.eaitType" placeholder="请备注" type="textarea" maxlength="300" show-word-limit v-model="form.corporate.remark"></el-input>
+            <span v-if="!form.eaitType">{{ form.corporate.remark }}</span>  
           </el-form-item>
         </el-form>
         <span slot="footer" class="dialog-footer">
           <el-button @click="showCorporatePay = false">取 消</el-button>
-          <el-button type="primary" :loading="corporatePayLoading" @click="corporatePay">{{ dialogVisibleLoading?'操作中...':'确定' }}</el-button>
+          <el-button type="primary" v-if="!form.eaitType" :loading="corporatePayLoading" @click="corporatePay">{{ dialogVisibleLoading?'操作中...':'确定' }}</el-button>
         </span>
       </el-dialog>
   </div>
@@ -581,6 +565,7 @@ export default {
         dialogVisibleLoading: false,
         showCorporatePay:false,
         form:{
+          payOrCredit: '',
           orderId:'',
           photoList:[],
           corporate:{
@@ -589,6 +574,8 @@ export default {
           }
         },
         corporatePayRules: {
+          payOrCredit: [{ required: true, message: "选择类型", trigger: ["change","blur"] }],
+          rePaymentTime: [{ required: true, message: "选择日期", trigger: ["change","blur"] }],
           photoList: [{ required: true, message: "请上传凭证", trigger: ["change","blur"] }],
       },
       uploadObj: {
@@ -641,6 +628,7 @@ export default {
     this.resizeObserver.observe(this.$refs.queryFormBox);
   },
   methods: {
+    moment,
     hasPermi(value){
       return auth.hasPermi(value)
     },
@@ -855,21 +843,30 @@ export default {
           let res = await getSelectById(row.id)
           this.form.orderId = row.id;
           this.$set(this.form,'photoList',[])
-          if(res.data.corporate){
+          this.form.eaitType = null
+          if(res.data.corporate && JSON.stringify(res.data.corporate) != '{}'){
             let urlList = res.data.corporate.voucherUrl.split(',')||[]
-            // let urlListObj = []
-            // urlList.forEach((item,index)=>{
-            //   urlListObj.push({
-            //     name: 'url_'+index,
-            //     url: item
-            //   })
-            // })
+            this.form.eaitType = 1
+            this.$set(this.form,'payOrCredit',1)
+            this.$set(this.form,'rePaymentTime','')
             this.$set(this.form,'photoList',urlList)
             this.$set(this.form.corporate,'remark',res.data.corporate.remark)
+          }else if(res.data.teamCredit && JSON.stringify(res.data.teamCredit) != '{}'){
+            this.form.eaitType = 2
+            let urlList = res.data.teamCredit.repaymentVoucherUrl.split(',')||[]
+            this.$set(this.form,'payOrCredit',2)
+            this.$set(this.form,'rePaymentTime',res.data.teamCredit.repaymentTime)
+            this.$set(this.form,'photoList',urlList)
+            this.$set(this.form.corporate,'remark',res.data.teamCredit.remark)
           }else {
+            this.$set(this.form,'payOrCredit','')
+            this.$set(this.form,'rePaymentTime','')
             this.$set(this.form,'photoList',[])
             this.$set(this.form.corporate,'remark','')
           }
+          this.$nextTick(()=>{
+            this.$refs.ruleForm1.clearValidate()
+          })
           this.corporatePayLoading = false;
 
         },
@@ -881,22 +878,30 @@ export default {
         },
         corporatePay(){
           console.log('form',this.form);
-          if(this.form.photoList.length<1){
-            this.$message.error('请上传凭证');
-            return
-          }
-          this.corporatePayLoading = true;
-          const voucherUrl = this.form.photoList.map(item => item).join(",");
-          this.form.corporate.voucherUrl = voucherUrl;
-          gotoCorporatePay(this.form).then((res)=>{
-            this.$message.success(res.msg);
-            this.corporatePayLoading = false;
-            this.handleCorporatePayClose();
-          }).catch((err)=>{
-            this.corporatePayLoading = false;
-            this.$message.error(err.msg);
-            console.log('corporatePay err',err);
-          })
+          this.$refs['ruleForm1'].validate((valid) => {
+            if (valid) {
+              if(this.form.photoList.length<1){
+                this.$message.error('请上传凭证');
+                return
+              }
+              this.corporatePayLoading = true;
+              const voucherUrl = this.form.photoList.map(item => item).join(",");
+              this.form.corporate.voucherUrl = voucherUrl;
+              gotoCorporatePay(this.form).then((res)=>{
+                this.$message.success(res.msg);
+                this.corporatePayLoading = false;
+                this.handleCorporatePayClose();
+              }).catch((err)=>{
+                this.corporatePayLoading = false;
+                this.$message.error(err.msg);
+                console.log('corporatePay err',err);
+              })
+            } else {
+              console.log('error submit!!');
+              return false;
+            }
+          });
+          
         },
       /**
      * 剧目海报上传成功
@@ -1043,6 +1048,7 @@ export default {
       if(response.code == 200) {
         this.form.photoList.push(response.data.url)
       }
+      this.$refs.ruleForm1.validateField('photoList')
     },
     beforeAvatarUpload(file) {
       const isLt2M = file.size / 1024 / 1024 <= 100;
@@ -1065,6 +1071,7 @@ export default {
     },
     handleRemove(index) {
       this.form.photoList.splice(index,1)
+      this.$refs.ruleForm1.validateField('photoList')
     },
     // 更多操作触发
     handleCommand(command, row) {

+ 3 - 3
src/views/otaMr/meituan/index.vue

@@ -21,12 +21,12 @@
             <el-button
               size="mini"
               type="text"
-              style="margin-left: 10px;"
+              style="margin-right: 10px;"
               @click="handlePush(scope.row,scope.index)"
               v-if="(scope.row.status == -1 || scope.row.status == 1)"
             >{{ scope.row.status == -1 ? '上线' : '下线' }}</el-button>
           </span>
-          <span v-hasPermi="['otaMr:meituan:tuisong']" style="display: inline-block;">
+          <!-- <span v-hasPermi="['otaMr:meituan:tuisong']" style="display: inline-block;">
             <el-button
               size="mini"
               type="text"
@@ -34,7 +34,7 @@
               @click="handleInventory(scope.row,scope.index)"
               v-if="scope.row.status == 1"
             >日历库存推送</el-button>
-          </span>
+          </span> -->
           <el-button
             size="mini"
             type="text"

+ 477 - 0
src/views/team/creditRecord/dialog/details.vue

@@ -0,0 +1,477 @@
+<!--
+ * @Description: 详情弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: gcz
+ * @LastEditTime: 2024-03-15 15:13:27
+ * @FilePath: \great_webui\src\views\order\groupBuyingMr\dialog\details.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    title="团队挂账详情"
+    :visible.sync="open"
+    width="50%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div v-loading="loading" class="dialog dialog-bbb" v-if="form">
+      <div element-loading-text="加载详情中...">
+        <!--   基础信息   -->
+        <div class="title-class" style="margin-top: 0">基础信息</div>
+        <el-row>
+          <el-col :span="12">
+            <div class="grid-content bg-purple item-class">订单号: <span>{{ form.orderId || ''}}</span></div>
+          </el-col>
+          <el-col :span="12">
+            <div class="grid-content bg-purple item-class">团队名称: <span>{{ form.teamName || ''}}</span></div>
+          </el-col>
+          <el-col :span="12">
+            <div class="grid-content bg-purple item-class">还款状态: <span>{{ form.repaymentStatus == 0 ? '未还款' : '已还款' }}</span></div>
+          </el-col>
+          <el-col :span="12">
+            <div class="grid-content bg-purple item-class">预计还款时间: <span>{{ form.repaymentTime || '' }}</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="24">
+            <div class="grid-content bg-purple item-class">挂账凭证: 
+              <div class="voucher-list">
+                  <el-image 
+                    v-for="(item,index) in voucherUrl1" :key="index"
+                    style="width: 100px; height: 100px"
+                    :src="item" 
+                    :preview-src-list="voucherUrl1">
+                  </el-image>
+                </div>
+            </div>
+          </el-col>
+          <el-col :span="12">
+            <div class="grid-content bg-purple item-class">创建时间: <span>{{ form.createTime || '' }}</span></div>
+          </el-col>
+        </el-row>
+
+        <!-- 还款日期信息 -->
+        <div>
+          <div class="title-class">对公支付信息</div>
+            <el-row>
+              <el-col class="pay-type-remark" :span="24">
+                还款日期:{{ form.realPayTime }}
+              </el-col>
+              <el-col :span="24">
+              <div class="grid-content bg-purple item-class">还款凭证: 
+                <div class="voucher-list">
+                    <el-image 
+                      v-for="(item,index) in voucherUrl" :key="index"
+                      style="width: 100px; height: 100px"
+                      :src="item" 
+                      :preview-src-list="voucherUrl1">
+                    </el-image>
+                  </div>
+              </div>
+          </el-col>
+            </el-row>
+        </div>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="cancel">关闭</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: "detailsDia",
+  dicts: ['order_form_type', 'order_status_type', 'pay_way_type', 'personnel_type','team_type'],
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      form: {
+        id: undefined
+      },
+      voucherUrl:[],
+      voucherUrl1:[],
+    };
+  },
+  created() {
+    
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj, type) {
+      this.open = true;
+      this.voucherUrl = (obj.repaymentVoucherUrl && obj.repaymentVoucherUrl.split(','))||[];
+      this.voucherUrl1 = (obj.voucherUrl && obj.voucherUrl.split(','))||[];
+      this.form = obj
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.open = false;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  width: 100%;
+}
+.dialog {
+  padding: 0 30px;
+  .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;
+  }
+}
+
+.voucher-list{
+  display: grid;
+  grid-template-columns: repeat(4, 1fr);
+  gap: 24rpx;
+}
+.pay-type-remark{
+  margin:14px 0;
+}
+
+.dialog-bbb {
+  width: 100%;
+  display: flex;
+  --widdd: 700px;
+
+  >div:first-child {
+    width: var(--widdd);
+    flex-shrink: 0;
+    overflow-y: auto;
+    padding: 0 0 10px 0;
+    margin-right: 10px;
+  }
+
+  .dialog-bbb_2 {
+    width: calc(100% - var(--widdd));
+    height: 100%;
+  }
+}
+
+.dialog-bbb_2 {
+  .seat-tool-box {
+    height: 20px;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    white-space: nowrap;
+
+    span {
+      flex-shrink: 0;
+      font-size: 12px;
+      white-space: nowrap;
+    }
+
+    .seat-tool-box-slider {
+      width: 100px;
+      margin-left: 10px;
+    }
+  }
+
+  .seat-box {
+    width: 100%;
+    height: calc(100% - 50px);
+    box-sizing: border-box;
+    display: flex;
+    position: relative;
+
+    .seat-list-box {
+      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;
+  }
+
+  .dialogss {
+    padding: 30px 10px 10px;
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    overflow: auto;
+    border-radius: 10px;
+    border: 1px solid #323333;
+
+    .dialogss-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: #aaabad;
+        user-select: none;
+        // pointer-events: none;
+        cursor: not-allowed !important;
+      }
+
+      .select-class {
+        //background-color: #e85353 !important;
+        border: 5px solid #1890ff !important;
+        // color: #eceaea !important;
+        position: relative;
+      }
+
+      .purchased-status:after {
+        content: "";
+        display: block;
+        position: absolute;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        background-color: rgba(0, 0, 0, 0.5);
+        z-index: -1;
+        background-image: url('../../../../assets/renyuan.png');
+        background-size: 50% 50%;
+        background-position: 50% 50%;
+        background-repeat: no-repeat;
+        z-index: 99;
+      }
+
+      .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;
+      }
+      /** 订单待支付锁定 */
+      .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;
+      }
+
+      .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));
+        &:hover {
+          opacity: 0.6;
+        }
+
+        .text-class {
+          font-size: 12px;
+          padding: 5px;
+          line-height: 16px;
+          margin: 0;
+          color: #000;
+        }
+      }
+    }
+  }
+}
+</style>

+ 511 - 0
src/views/team/creditRecord/index.vue

@@ -0,0 +1,511 @@
+<template>
+  <div class="app-container app-container-scheduling" :style="{'--q-height':qHeight}">
+    <div class="app-container-query" ref="queryFormBox">
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+        
+        <el-form-item label="订单号">
+          <el-input
+            v-model="queryParams.orderId"
+            placeholder="请输入订单号"
+            clearable
+            style="width: 240px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="团队名称" label-width="100px">
+          <el-input
+            v-model="queryParams.teamName"
+            placeholder="请输入团队名称"
+            clearable
+            style="width: 240px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="还款状态" label-width="100">
+          <el-select
+            v-model="queryParams.repaymentStatus"
+            placeholder="请选择还款状态"
+            clearable
+            style="width: 100%"
+          >
+            <el-option label="未还款" value="0" />
+            <el-option label="已还款" value="1" />
+          </el-select>
+        </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>
+    </div>
+    
+    <div class="app-container-table-box">
+      <el-row :gutter="10" class="mb8">
+        <!-- <el-button
+          type="primary"
+          size="mini"
+          icon="el-icon-download"
+          v-hasPermi="['groupBuyingMr:groupBuyingMr:excel']"
+          @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)"
+        >导出excel</el-button> -->
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      </el-row>
+      <div class="app-container-table-info">
+        <el-table ref="tables" v-loading="loading" height="100%" :data="dataList" border>
+          <el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
+          <el-table-column label="订单号" align="center" prop="orderId" />
+          <el-table-column label="团队名称" align="center" prop="teamName" />
+          <el-table-column label="还款状态" align="center" prop="repaymentStatus">
+            <template slot-scope="scope">
+              <span>{{ scope.row.repaymentStatus == 0 ? '未还款' : '已还款' }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="预计还款时间" align="center" prop="repaymentTime" />
+          <el-table-column label="挂账金额" align="center" prop="orderPrice" />
+          <el-table-column label="创建时间" align="center" prop="createTime" />
+          <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                @click="openDetails(scope.row)"
+                v-hasPermi="['team:creditRecord:deatil']"
+              >详情</el-button>
+              <span v-hasPermi="['team:creaditRecord:pingzheng']" style="display: inline-block;">
+                <el-button
+                  size="mini"
+                  type="text"
+                  style="margin-left: 10px;"
+                  @click="handleCorporatePay(scope.row)"
+                >还款凭证</el-button>
+              </span>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+    
+
+    <!-- 详情 -->
+    <details-dia ref="detailsDia" :dict="dict" @getList="getList"></details-dia>
+
+      <el-dialog
+        title="还款凭证"
+        :visible.sync="showCorporatePay"
+        width="40%"
+        @close="handleCorporatePayClose"
+        :before-close="handleCorporatePayClose">
+        <el-form v-loading="corporatePayLoading" :model="form" :rules="corporatePayRules" ref="ruleForm1" label-width="120px" class="demo-ruleForm">
+          <el-form-item label="还款日期" prop="realPayTime">
+            <el-date-picker
+              v-model="form.realPayTime"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="还款凭证" prop="photoList">
+            <div style="display: flex;flex-wrap: wrap;">
+              <div 
+              v-for="(item,index) in form.photoList" 
+              :key="index"
+              style="width: 100px; height: 100px;margin-top: 5px; position: relative;border: 1px solid #999;border-radius: 5px;margin-right: 20px;">
+                <el-image 
+                  style="width: 100%; height: 100%"
+                  :src="item" 
+                  :preview-src-list="form.photoList">
+                </el-image>
+                <span @click="handleRemove(index)" style="position: absolute;top: -15px;right: -15px;color: red;font-size: 24px;z-index: 999;cursor: pointer;">
+                  <i class="el-icon-error"></i>
+                </span>
+              </div>
+              <div 
+              style="width: 100px; height: 100px;margin-top: 5px;" 
+              v-if="!form.photoList||form.photoList.length<15"
+              v-loading="actionUrlLoading"
+              element-loading-text="上传中..."
+              element-loading-spinner="el-icon-loading"
+              element-loading-background="rgba(0, 0, 0, 0.8)"
+              >
+                <el-upload
+                  class="avatar-uploader"
+                  :action="uploadObj.url"
+                  :headers="uploadObj.headers"
+                  :show-file-list="false"
+                  :before-upload="beforeAvatarUpload"
+                  :on-success="handleAvatarSuccess"
+                  :on-progress="handleAvatarProgress"
+                  :disabled="actionUrlLoading"
+                  :on-error="handleAvatarError"
+                  >
+                  <i class="el-icon-plus avatar-uploader-icon"></i>
+                </el-upload>
+              </div>
+              
+            </div>
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="showCorporatePay = false">取 消</el-button>
+          <el-button type="primary" :loading="corporatePayLoading" @click="corporatePay">{{ dialogVisibleLoading?'操作中...':'确定' }}</el-button>
+        </span>
+      </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+import auth from '@/plugins/auth'
+import { pageList,gotoCorporatePay, downOrderListXls } from '@/api/team/creditRecord';
+import detailsDia from "./dialog/details.vue";
+
+import { exportExcel } from '@/utils/exportexcel'
+export default {
+  name: "GroupBuyingMr",
+  dicts: ['agreement_type', 'team_type','order_status_type','pay_way_type'],
+  components: { detailsDia },
+  data() {
+    return {
+      qHeight: '0px',
+      resizeObserver: null,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      dataList: null,
+      // 弹出层标题
+      title: "",
+
+      // 是否显示弹出层
+      open: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      visibleStatus: false,
+      newObj: {},
+        dialogVisible: false,
+        ruleForm: {},
+        rules: {
+          region: [
+            { required: true, message: '请选择打印机', trigger: ['change','blur' ]}
+          ],
+        },
+        dialogVisibleLoading: false,
+        showCorporatePay:false,
+        form:{
+          payOrCredit: '',
+          orderId:'',
+          photoList:[],
+        },
+        corporatePayRules: {
+          realPayTime: [{ required: true, message: "选择还款日期", trigger: ["change","blur"] }],
+          photoList: [{ required: true, message: "请上传凭证", trigger: ["change","blur"] }],
+      },
+      uploadObj: {
+        url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
+        Headers: { Authorization: "Bearer " + getToken() },
+      },
+      corporatePayLoading:false,
+
+      handleExportLoading: false,
+      pagePerformTimeList: [], // 场次列表
+      multiPerformDate:false,
+      actionUrlLoading: false,
+    };
+  },
+  created() {
+    this.getList();
+  },
+  activated(){
+    this.getList();
+  },
+  mounted() {
+    this.resizeObserver = new ResizeObserver(entries => {
+      for (let entry of entries) {
+        const { width, height } = entry.contentRect;
+        this.qHeight = height + 'px'
+      }
+      if(document.body.clientWidth<765) {
+        this.fixed = false
+      }else {
+        this.fixed = 'left'
+      }
+    });
+    this.resizeObserver.observe(this.$refs.queryFormBox);
+  },
+  methods: {
+    hasPermi(value){
+      return auth.hasPermi(value)
+    },
+    /** 查询列表 */
+    getList() {
+      this.loading = true;
+      let params = {...this.addDateRange(this.queryParams, this.dateRange)};
+      if(params.id && params.id.length>19) {
+        this.$message({
+          type: 'error',
+          message: '订单号不存在!!!'
+        });
+        this.loading = false
+        return
+      }
+      if(params.performDate&&params.performDate.length==2){
+        params.performDateStart = params.performDate[0];
+        params.performDateEnd = params.performDate[1];
+      }else {
+        params.performDateStart = null
+        params.performDateEnd =null
+      }
+      delete params.performDate;
+      pageList(params)
+      .then(response => {
+          this.dataList = response.data.rows;
+          this.total = response.data.total;
+          this.loading = false;
+      }).catch(()=>{
+        this.dataList = [];
+        this.total = 0;
+        this.loading = false;
+      })
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.queryParams = {}
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    /** 详情按钮操作 */
+    openDetails(row, type) {
+      this.$refs["detailsDia"].openDialog("详情", row, type);
+    },
+    async handleCorporatePay(row){
+      this.actionUrlLoading = false;
+      this.showCorporatePay = true;
+      this.form.id = row.id;
+      let urlList = row.repaymentVoucherUrl.split(',')||[]
+      this.$set(this.form,'photoList',urlList)
+      this.$set(this.form,'realPayTime',row.realPayTime)
+      this.$nextTick(()=>{
+        this.$refs.ruleForm1.clearValidate()
+      })
+    },
+        handleCorporatePayClose(){
+          this.$set(this.form,'photoList',[])
+          this.corporatePayLoading = false;
+          this.showCorporatePay = false;
+        },
+        /**  提交上传  */
+        corporatePay(){
+          console.log('form',this.form);
+          this.$refs['ruleForm1'].validate((valid) => {
+            if (valid) {
+              if(this.form.photoList.length<1){
+                this.$message.error('请上传凭证');
+                return
+              }
+              this.corporatePayLoading = true;
+              const voucherUrl = this.form.photoList.map(item => item).join(",");
+              this.form['repaymentVoucherUrl'] = voucherUrl;
+              gotoCorporatePay(this.form).then((res)=>{
+                this.$message.success(res.msg);
+                this.corporatePayLoading = false;
+                this.handleCorporatePayClose();
+              }).catch((err)=>{
+                this.corporatePayLoading = false;
+                this.$message.error(err.msg);
+              })
+            } else {
+              console.log('error submit!!');
+              return false;
+            }
+          });
+          
+        },
+    /**
+     * 导出报表
+     * @date 2022-10-24
+     * @returns {any}
+     */
+     handleExport() {
+      this.$confirm('您确定要导出当前查询的数据吗?', '提示', {
+        confirmButtonText: '确定 ',
+        cancelButtonText: '取消 ',
+        type: 'warning'
+      })
+        .then(() => {
+          this.handleExportLoading = true;
+          let postMap = {}
+          let params = JSON.parse(JSON.stringify(this.queryParams))
+          for (let key in params) {
+            if(key != 'pageNum' && key != 'pageSize' && key != 'time' && key != 'performDate' && key != 'invoiceTime'){
+              postMap[key] = params[key]
+            }
+          }
+          downOrderListXls(postMap)
+            .then((res) => {
+              exportExcel(res, '团购订单', '.xlsx');
+              this.handleExportLoading = false;
+            })
+            .catch((error) => {
+              console.log("error===",error)
+              this.handleExportLoading = false;
+            });
+        })
+        .catch(() => {
+          this.$message.info('您已取消导出!');
+        });
+    },
+   
+    
+    /**  上传图片 单张  */
+  handleAvatarSuccess(response, file, fileList) {
+      console.log("res, file",response, file, fileList)
+      this.actionUrlLoading = false
+      if(response.code == 200) {
+        this.form.photoList.push(response.data.url)
+      }
+      this.$refs.ruleForm1.validateField('photoList')
+    },
+    beforeAvatarUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 <= 100;
+      let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
+      let typeList = ['png','jepg','jpg','gif']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片图片大小不能超过 100MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarProgress(){
+      this.actionUrlLoading = true
+    },
+    handleAvatarError() {
+      this.actionUrlLoading = false
+    },
+    handleRemove(index) {
+      this.form.photoList.splice(index,1)
+      this.$refs.ruleForm1.validateField('photoList')
+    },
+  },
+  beforeDestroy() {
+    this.resizeObserver.unobserve(this.$refs.queryFormBox);
+    this.resizeObserver.disconnect();
+  },
+};
+</script>
+<style lang="scss" scoped>
+
+  .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;
+  }
+.app-container {
+  height: calc( 100vh - 110px );
+  box-sizing: border-box;
+}
+.app-container-query {
+  
+}
+.app-container-table-box {
+  height: calc( 100% - var(--q-height) );
+  .app-container-table-info {
+    height: calc( 100% - 100px );
+  }
+}
+
+.upload-box {
+  ::v-deep .el-upload--picture-card {
+    display: none;
+  }
+} 
+
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+
+  .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;
+}
+</style>

+ 141 - 0
src/views/windowTicketSales/model/lockSeat.vue

@@ -0,0 +1,141 @@
+<template>
+    <el-dialog :title="title" :visible.sync="dialogVisible" width="40%" :before-close="handleClose">
+        <div v-if="type == 1" v-loading="loading">
+            <el-table :data="tableData" style="width: 100%">
+                <el-table-column prop="date" label="座位号" width="180">
+                </el-table-column>
+                <el-table-column prop="name" label="锁定人" width="180">
+                </el-table-column>
+                <el-table-column prop="address" label="锁定原因">
+                </el-table-column>
+            </el-table>
+        </div>
+        <div v-if="type == 0" v-loading="loading">
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                <el-form-item label="锁定原因" prop="remark">
+                    <el-input type="textarea" :rows="4" placeholder="请输入锁定原因" maxlength="250" v-model="ruleForm.remark"></el-input>
+                </el-form-item>
+            </el-form>
+        </div>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="handleClose">取 消</el-button>
+            <el-button :loading="loading" type="primary" @click="lockOrUnLockFun">提交</el-button>
+        </span>
+    </el-dialog>
+</template>
+<script>
+import { lockOrUnLockApi, lockOrUnLock } from "@/api/windowTicketSales/ticketingSales"
+export default {
+    name: "LockSeat",
+    data() {
+        return {
+            loading: false,
+            dialogVisible: false,
+            tableData: [],
+            type: null,
+            list: [],
+            title: '',
+            auditoriumId: '',
+            timeId: '',
+            ruleForm: {
+                remark: null
+            },
+            rules: {
+                remark: [
+                    { required: true, message: '请输入锁定原因', trigger: ['blur', 'change'] },
+                ]
+            }
+        }
+    },
+    methods: {
+        /**
+         * 
+         * @param list 解锁列表
+         * @param list1 上锁列表
+         */
+        async open(list = [], list1 = [], auditoriumId = null, timeId = null) {
+            this.auditoriumId = auditoriumId
+            this.timeId = timeId
+            this.list = list.length > 0 ? list : list1
+            this.type = list.length > 0 ? 1 : 0 // 1 解锁 0 上锁
+            this.title = list.length > 0 ? '解锁提示' : '锁定提示' // 1 解锁 0 上锁
+            console.log(list, list1)
+            if (list.length > 0) {
+                await this.lockOrUnLockDeatilFun()
+            }
+            this.dialogVisible = true
+            this.$nextTick(() => {
+                if (list.length == 0) {
+                    this.$refs.ruleForm.clearValidate()
+                }
+            })
+        },
+        handleClose() {
+            this.ruleForm = {}
+            this.dialogVisible = false
+        },
+        /**  */
+        async lockOrUnLockDeatilFun() {
+            try {
+                let list = []
+                this.list.forEach((item, index) => {
+                    list.push({
+                        "auditoriumId": this.auditoriumId,
+                        "seatId": item.id,
+                        "timeId": this.timeId
+                    })
+                })
+                let res = await lockOrUnLockApi({
+                    seatList: list
+                })
+                if (res.code == 200) {
+                    console.log("ssssss====", res)
+                } else {
+                    this.handleClose()
+                }
+            } catch (error) {
+                this.handleClose()
+            }
+        },
+        /**  座位锁定/解锁  */
+        async lockOrUnLockFun(type) {
+            try {
+                this.loading = true
+                let list = []
+                this.list.forEach((item, index) => {
+                    list.push({
+                        "auditoriumId": this.auditoriumId,
+                        "seatId": item.id,
+                        "timeId": this.timeId
+                    })
+                })
+                let res = await lockOrUnLock({
+                    type: this.type,
+                    seatList: list,
+                    remark: this.ruleForm.remark
+                })
+                this.loading = false
+                if (res.code) {
+                    this.$message({
+                        showClose: true,
+                        message: res.msg,
+                        type: 'success'
+                    });
+                    this.$emit('querySeatListFun', true)
+                    this.handleClose()
+                }
+
+            } catch (error) {
+                this.loading = false
+                this.$message({
+                    showClose: true,
+                    message: "操作失败!!!",
+                    type: 'error'
+                });
+                console.error('error===', error)
+            }
+
+        },
+    }
+}
+</script>

+ 104 - 22
src/views/windowTicketSales/ticketingSales.vue

@@ -132,6 +132,8 @@
                                 v-for="(item, index) in seatMapList[item1.key]" 
                                 :style="{backgroundColor: item.color && !(item.isDisabled || item.status != 1) ? item.color : 'none'}"
                                 @click.stop="seatClick(item)" 
+                                @mouseenter="lockOrUnLockDeatilFun($event,item)"
+                                @mouseleave="lockOrUnLockDeatilFun1"
                                 :dragSelectId="item.id"
                                 :index="item1.key +'_'+ index"
                                 :key="index">
@@ -196,8 +198,16 @@
             </div>
         </div>
       </div>
+      <!--  锁座备注  -->
+      <lock-seat ref="lockSeat" @querySeatListFun="querySeatListFun" />
       <!--  添加观影人  -->
       <increaseViewers ref="increaseViewers" @clearDialogVisible="clearDialogVisible" />
+      
+      <!-- 提示信息  -->
+      <div :style="lockStyle" v-if="isLcokShow" class="lock-style-box">
+        <div><span>锁定人:</span><span>{{ lockObj.auth }}</span></div> 
+        <div><span>锁定原因:</span><span>{{ lockObj.remark }}</span></div> 
+      </div>
     </div>
   </template>
   
@@ -208,17 +218,20 @@
   lockOrUnLock,
   merchantTheatreAuditoriumList,
   goodsPageList,
-  getGoodsPerformApi
+  getGoodsPerformApi,
+  lockOrUnLockApi
  } 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"
+import LockSeat from './model/lockSeat.vue'
  export default {
     name: "TicketingSales1",
     components: {
-        increaseViewers
+        increaseViewers,
+        LockSeat
     },
     mixins: [selectListMixin],
     data() {
@@ -272,6 +285,17 @@
         ifRealTeam: 0,// 团购是否实名:0否 1-是
         oneMany: 0,// 证件要求: 1一证一票,2一证多票
         personnelNum: 0,// 人员要求:0-表示不限制 其他数字表示限制人数
+
+        isLcokShow: false,
+        lckTime: null,
+        seatId: null,
+        lockStyle: {
+            
+        },
+        lockObj: {
+            auth: '',
+            remark: ''
+        }
       };
     },
     created() {
@@ -347,27 +371,31 @@
                     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
+                if(this.seatSelectListNo.length == 0) {
+                    this.$refs.lockSeat.open(this.seatSelectListNo,this.seatSelectList,this.queryParams.auditoriumId,this.queryParams.timeId)
+                }else {
+                    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)
+                    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) {
@@ -786,10 +814,64 @@
                 this.oneMany = 1   // 证件要求: 1一证一票,2一证多票
                 this.personnelNum = 0   // 人员要求:0-表示不限制 其他数字表示限制人数
             }
+        },
+        /** 获取锁定人和锁定备注  */
+        async lockOrUnLockDeatilFun(e,item) {
+            try {
+                if(this.lckTime) {
+                    clearTimeout(this.lckTime)
+                }
+                if(item.occupyStatus !== 0) {
+                    this.isLcokShow = false
+                    return
+                }
+                if(item.id == this.seatId){ return }
+                this.seatId = item.id
+                this.isLcokShow = false
+                this.lckTime = setTimeout(async ()=>{
+                    let res = await lockOrUnLockApi({
+                        auditoriumId: this.queryParams.auditoriumId,
+                        timeId: this.queryParams.timeId,
+                        seatId: item.id
+                    })
+                    if (res.code == 200) {
+                        this.isLcokShow = true
+                        this.lockObj = {
+                            remark: res.data.remark,
+                            auth: res.data.createBy
+                        }
+                        this.lockStyle = {
+                            position: "fixed",
+                            top: (e.y + 10) + 'px',
+                            left: (e.x + 10)+ 'px',
+                            zIndex: 999999
+                        }
+                    } else {
+                        this.handleClose()
+                    }
+                },500)
+            } catch (error) {
+                this.handleClose()
+            }
+        },
+        lockOrUnLockDeatilFun1() {
+            this.isLcokShow = false
+            this.seatId = null
         }
     }   
   };
   </script>
+  <style>
+  .lock-style-box {
+    padding: 10px;
+    border-radius: 10px;
+    position: fixed;
+    z-index: 99999;
+    background-color: rgba(0,0,0,0.5);
+    color: #fff;
+    font-size: 12px;
+  }
+</style>
   <style lang="scss" scoped>
   .app-container-me {
     width: 100%;