Przeglądaj źródła

流水功能开发和排期批量删除以及bug修改

zhongzhao 1 rok temu
rodzic
commit
e04227ae51

+ 1 - 1
src/api/financeMr/flowingWaterMr.js

@@ -12,7 +12,7 @@ export const pageList = (query) => {
 //  导出
 export function downOrderListXls(params) {
   return request({
-    url: '/order/order/downOrderListXls',
+    url: '/order/viewsIncomeExpenses/exportExcel',
     method: 'get',
     responseType: 'blob',
     params

+ 9 - 0
src/api/schedulingMr/schedulingMr.js

@@ -36,3 +36,12 @@ export const deleteById = (id) => {
     params: {id:id}
   })
 }
+
+// 删除模板
+export const deleteBatchById = (id) => {
+  return request({
+    url: '/merchant/merchantPerformTime/deleteByIds',
+    method: 'delete',
+    params: {ids:id}
+  })
+}

+ 63 - 0
src/utils/exportexcel.js

@@ -0,0 +1,63 @@
+/**
+ * @Description: 定出Excel文件方法封装处理
+ * @Author: Rockery
+ * @Date: 2022-03-28 09:19:59
+ * @LastEditors: Rockery
+ * @LastEditTime: 2022-04-18 11:16:33
+ * @FilePath: \airport_web\src\utils\exportexcel.js
+ * @Copyright: Copyright (c) 2016~2022 by Rockery(1113269755@qq.com), All Rights Reserved.
+ */
+
+import { parseTime } from '@/utils/ruoyi';
+import { Message } from 'element-ui';
+
+/**
+ * 导出Excel文件
+ * @param {*} data 文件数据流
+ * @param {String} filePrefix 文件前缀名
+ * @param {String} fileSuffix 文件后缀名
+ */
+export function exportExcel(data, filePrefix, fileSuffix) {
+  // 判断文件前缀名是否存在,不存在默认'EXPORTEXCEL'
+  filePrefix = filePrefix ?? 'EXPORTEXCEL';
+  // 判断文件后缀名是否存在,不存在默认'.xls'
+  fileSuffix = fileSuffix ?? '.xls';
+
+  // 处理文件数据流
+  const contentByExportExcel = data;
+  const blobByExportExcel = new Blob([contentByExportExcel], {
+    type: 'application/vnd.ms-excel;charset=utf-8'
+  });
+
+  // 组装文件名称
+  const filenameByExportExcel = `${filePrefix}_${parseTime(
+    new Date(),
+    '{y}-{m}-{d}'
+  )}_${new Date().getTime()}${fileSuffix}`;
+
+  // 执行文件下载操作
+  if ('download' in document.createElement('a')) {
+    const elink = document.createElement('a');
+    elink.download = filenameByExportExcel;
+    elink.style.display = 'none';
+    elink.href = URL.createObjectURL(blobByExportExcel);
+    document.body.appendChild(elink);
+    elink.click();
+    URL.revokeObjectURL(elink.href);
+    document.body.removeChild(elink);
+    Message({
+      message: '导出Excel成功!',
+      type: 'success',
+      showClose: true,
+      center: true
+    });
+  } else {
+    navigator.msSaveBlob(blobByExportExcel, filenameByExportExcel);
+    Message({
+      message: '导出Excel成功!',
+      type: 'success',
+      showClose: true,
+      center: true
+    });
+  }
+}

+ 26 - 18
src/views/finance/flowingWaterMr/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="订单号">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
+      <el-form-item label="订单号" label-width="60px">
         <el-input
           v-model="queryParams.id"
           placeholder="请输入订单号"
@@ -12,31 +12,31 @@
       </el-form-item>
       <el-form-item label="收支类型">
         <el-select
-          v-model="queryParams.status"
+          v-model="queryParams.incomeExpenses"
           placeholder="收支类型"
           clearable
           style="width: 100%"
         >
           <el-option
-            v-for="dict in statusList"
+            v-for="dict in incomeExpensesList"
             :key="dict.id"
             :label="dict.name"
-            :value="dict.id"
+            :value="dict.value"
           />
         </el-select>
       </el-form-item>
       <el-form-item label="业务类型">
         <el-select
-          v-model="queryParams.status"
+          v-model="queryParams.businessType"
           placeholder="业务类型"
           clearable
           style="width: 100%"
         >
           <el-option
-            v-for="dict in statusList"
+            v-for="dict in businessTypeList"
             :key="dict.id"
             :label="dict.name"
-            :value="dict.id"
+            :value="dict.value"
           />
         </el-select>
       </el-form-item>
@@ -45,9 +45,10 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-row :gutter="10" class="mb8"  style="margin-left: 0">
+    <el-row :gutter="10" class="mb8"  style="margin-left: 0; margin-top: 10px">
       <el-button
-        type="success"
+        type="primary"
+        size="mini"
         icon="el-icon-download"
         :disabled="tableData.length === 0"
         v-hasPermi="['flowingWaterMr:flowingWaterMr:downloadExcel']"
@@ -96,8 +97,8 @@
 
 <script>
 
-import { pageList } from '@/api/financeMr/flowingWaterMr'
-
+import { pageList, downOrderListXls } from '@/api/financeMr/flowingWaterMr'
+import { exportExcel } from '@/utils/exportexcel'
 export default {
   name: "agreement",
   dicts: ['agreement_type'],
@@ -140,6 +141,14 @@ export default {
         2: '美团',
         3: '携程',
       },
+      incomeExpensesList: [
+        {id: 1, name: '收入', value: '收入'},
+        {id: 2, name: '支出', value: '支出'},
+      ],
+      businessTypeList: [
+        {id: 1, name: '购买演出票', value: '购买演出票'},
+        {id: 2, name: '票务退款', value: '票务退款'},
+      ],
       visibleStatus: false,
       newObj: {},
       visibleType: '',
@@ -174,10 +183,9 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
-      this.$set(this.queryParams, 'refundTransactionId', '');
-      this.$set(this.queryParams, 'orderId', '');
-      this.$set(this.queryParams, 'refundMobile', '');
-      this.$set(this.queryParams, 'status', '');
+      this.$set(this.queryParams, 'id', '');
+      this.$set(this.queryParams, 'businessType', '');
+      this.$set(this.queryParams, 'incomeExpenses', '');
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },
@@ -201,13 +209,13 @@ export default {
           // const { pageNum, pageSize} = this.params;
           let postMap = {}
           for (let key in this.queryParams) {
-            if(key != 'pageNum' && key != 'pageSize' && key != 'orderStatus'){
+            if(key != 'pageNum' && key != 'pageSize'){
               postMap[key] = this.queryParams[key]
             }
           }
           downOrderListXls(postMap)
             .then((res) => {
-              exportExcel(res, '酒业订单', '.xlsx');
+              exportExcel(res, '流水管理', '.xlsx');
               this.handleExportLoading = false;
             })
             .catch(() => {

+ 17 - 6
src/views/finance/refundMr/dialog/details.vue

@@ -45,16 +45,27 @@
 
     <span slot="footer" class="dialog-footer" v-if="refund">
       <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="danger"
+        @click="submitForm(1)"
+        v-loading.fullscreen.lock="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      >
+        <span v-if="loading">提交中...</span>
+        <span v-else>同意退款</span>
+      </el-button>
       <el-button
         type="primary"
-        @click="submitForm"
+        @click="submitForm(2)"
         v-loading.fullscreen.lock="loading"
         element-loading-text="提交中..."
         element-loading-spinner="el-icon-loading"
         element-loading-background="rgba(0, 0, 0, 0.8)"
       >
         <span v-if="loading">提交中...</span>
-        <span v-else>申请退款</span>
+        <span v-else>驳回退款</span>
       </el-button>
     </span>
 
@@ -111,18 +122,18 @@ export default {
      * @date 2023-11-22
      * @returns {any}
      */
-    submitForm() {
+    submitForm(status) {
       this.$confirm('是否继续确定退款?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.refundAuditApi();
+        this.refundAuditApi(status);
       }).catch(() => {});
     },
-    refundAuditApi() {
+    refundAuditApi(status) {
       this.loading = true;
-      refundAudit({ refundId: this.form.id})
+      refundAudit({ refundId: this.form.id, status: status})
         .then(response => {
             this.$message.success("操作成功!");
             this.$emit("getList");

+ 1 - 1
src/views/finance/refundMr/index.vue

@@ -110,7 +110,7 @@
           <el-button
             size="mini"
             type="text"
-            v-if="scope.row.status == 0"
+            v-if="scope.row.status == 0 || scope.row.status == 2"
             @click="openDetails(scope.row, 'refund')"
             v-hasPermi="['refundMr:refundMr:delete']"
           >退款</el-button>

+ 27 - 1
src/views/information/informationMr/index.vue

@@ -86,7 +86,7 @@
         </template>
       </el-table-column>
       <el-table-column label="创建人" align="center" prop="createBy" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -94,6 +94,12 @@
             @click="ionlineApi(scope.row)"
             v-hasPermi="['informationMr:informationMr:release']"
           >{{scope.row.status == '1' ? '取消发布' : '发布'}}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            @click="toppingApi(scope.row)"
+            v-hasPermi="['informationMr:informationMr:release']"
+          >{{scope.row.status == '1' ? '取消置顶' : '置顶'}}</el-button>
           <el-button
             size="mini"
             type="text"
@@ -267,6 +273,26 @@ export default {
       }).catch(() => {});
     },
 
+    /** 置顶或者取消置顶按钮操作 */
+    toppingApi(row) {
+      this.$confirm("是否对标题为" + row.title + "的数据进行" + (row.status == 1 ? '取消置顶?' : '置顶?'), '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // ionline({ id: row.id, status: row.status == 1 ? 2 : 1 }).then((res) => {
+        //   if (res.code == 200) {
+        //     this.$message({
+        //       type: 'success',
+        //       message: '操作成功!'
+        //     });
+        //     this.getList();
+        //   }
+        // });
+      }).catch(() => {});
+    },
+
+
     /** 删除按钮操作 */
     handleDelete(row) {
       this.$modal.confirm('是否确认删除数据标题为"' + row.title + '"的数据项?').then(function() {

+ 1 - 4
src/views/perform/performMr/dialog/addAndEdit.vue

@@ -87,11 +87,8 @@ export default {
   data() {
     var isPhone = (rule, value, callback) => {
       let reg = /^1[23456789]\d{9}$/;
-      let reg1 = /^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/;
+      // let reg1 = /^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/;
       if (!reg.test(value)) {
-        if(reg1.test(value)){
-          callback();
-        }
         callback(new Error('请输入正确负责人联系电话'));
       } else {
         callback();

+ 33 - 22
src/views/perform/programmeMr/dialog/addAndEdit.vue

@@ -44,9 +44,9 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="票务选择" prop="ticketIdList">
+            <el-form-item label="票务选择" prop="goodsIdList">
               <el-select
-                v-model="form.ticketIdList"
+                v-model="form.goodsIdList"
                 placeholder="票务选择"
                 clearable
                 multiple
@@ -93,7 +93,7 @@
               <el-input
                 placeholder="演出时长"
                 type="number"
-                v-model.number="form.showDuration"
+                v-model="form.showDuration"
                 @change="changePriceAmount('showDuration')"
                 clearable
                 style="width: 240px;margin-right: 10px"
@@ -304,6 +304,7 @@ export default {
       rules: {
         name: [{ required: true, message: "请输入剧目名称", trigger: "blur" }],
         sponsorId: [{ required: true, message: "请选择主办方", trigger: "blur" }],
+        goodsIdList: [{ required: true, message: "请选择票务信息", trigger: "blur" }],
         status: [{ required: true, message: "请选择是否启用状态", trigger: "blur" }]
       },
       uploadObj: {
@@ -333,7 +334,7 @@ export default {
     },
     /** 查询票务列表 */
     ticketPageListApi() {
-      ticketPageList({pageNum: 1, pageSize: 100, goodsType: 2, classifyId: 1, status: 1})
+      ticketPageList({pageNum: 1, pageSize: 100, goodsType: 2, classifyId: 1, status: 0})
         .then(response => {
             this.ticketList = response.data.rows;
           }
@@ -386,6 +387,11 @@ export default {
           this.$set(this.form, 'name', obj.name);
           this.$set(this.form, 'sponsorId', obj.sponsorId);
           this.$set(this.form, 'sponsorName', obj.sponsorName);
+          let goodsIdList = []
+          obj.goodsList.forEach(item => {
+            goodsIdList.push(item.goodsId);
+          })
+          this.$set(this.form, 'goodsIdList', goodsIdList);
           this.$set(this.form, 'status', obj.status);
 
           // 演出信息
@@ -413,16 +419,15 @@ export default {
     submitForm() {
       this.$refs["form"].validate(async (valid) => {
         if (valid) {
-          if(this.activeName == '02') {
-            if(this.form.photoList && this.form.photoList.length < 2) {
-              this.$message.success("上传的宣传图不能少于三张!");
-            }
+          if(this.form.photoList && this.form.photoList.length < 3) {
+            this.$message.error("上传的宣传图不能少于三张!");
+            return false
           }
           try {
             this.loading = true;
             const { code } = await saveAndEdit({ ...this.form });
             if (code === 200) {
-              this.$message.success("修改成功!");
+              this.$message.success("操作成功!");
               this.$emit("getList");
               this.cancel();
             }
@@ -495,19 +500,25 @@ export default {
       }
     },
     handleRemove(file, fileList) {
-      fileList.forEach(item => {
-        if(item.response && item.response.data){
-          let res = item.response.data;
-          let photo = {
-            imageUrl: res?.data?.url,
-            url: res?.data?.url,
-            photoType: '2'
-          }
-          if(!this.form.photoList){
-            this.form.photoList = []
-          }
-          // this.form.photoList.push(photo);
-          this.$set(this.form.photoList, this.form.photoList.length, photo);
+      // this.form.photoList = []
+      // fileList.forEach(item => {
+      //   if(item.response && item.response.data){
+      //     let res = item.response.data;
+      //     let photo = {
+      //       imageUrl: res?.data?.url,
+      //       url: res?.data?.url,
+      //       photoType: '2'
+      //     }
+      //     if(!this.form.photoList){
+      //       this.form.photoList = []
+      //     }
+      //     // this.form.photoList.push(photo);
+      //     this.$set(this.form.photoList, this.form.photoList.length, photo);
+      //   }
+      // })
+      this.form.photoList.forEach((item, index) => {
+        if(item.uid == file.uid){
+          this.form.photoList.splice(index, 1)
         }
       })
     },

+ 2 - 1
src/views/perform/programmeMr/index.vue

@@ -51,7 +51,7 @@
     <el-table ref="tables" v-loading="loading" :data="dataList" border>
       <el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
       <el-table-column label="剧目名称" align="center" prop="name" />
-      <el-table-column label="宣传图" align="center" prop="type">
+      <el-table-column label="剧目海报" align="center" prop="type">
         <template slot-scope="scope">
           <el-button type="text" @click="seeCenter(scope.row, 'img')">查看</el-button>
         </template>
@@ -64,6 +64,7 @@
       </el-table-column>
       <el-table-column label="演出时长" align="center" prop="showDuration" />
       <el-table-column label="演出人数" align="center" prop="peopleNum" />
+      <el-table-column label="票务信息" align="center" prop="goodsName" />
       <el-table-column label="是否启用" align="center" prop="type">
         <template slot-scope="scope">
           <el-switch

+ 2 - 3
src/views/ticket/priceMr/dialog/addAndEdit.vue

@@ -107,9 +107,8 @@
           <el-input
             :disabled="isDisabled"
             type="number"
-            v-model.number="form.priceAmount"
+            v-model="form.priceAmount"
             placeholder=""
-            min="0"
             clearable
             @change="changePriceAmount"
             style="width: 160px;"
@@ -271,7 +270,7 @@ export default {
     },
     /** 票务列表查询 */
     ticketListApi() {
-      ticketPageList(this.addDateRange({pageNum: 1, pageSize: 100,  goodsType: 2, classifyId: 1, status: 1}))
+      ticketPageList(this.addDateRange({pageNum: 1, pageSize: 100,  goodsType: 2, classifyId: 1, status: 0}))
         .then(response => {
             this.ticketList = response.data.rows;
         });

+ 1 - 1
src/views/ticket/priceMr/index.vue

@@ -189,7 +189,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
-      this.$set(this.queryParams, 'theatreName', '');
+      this.$set(this.queryParams, 'goodsName', '');
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },

+ 8 - 5
src/views/ticket/ticketMr/index.vue

@@ -59,8 +59,8 @@
         <template slot-scope="scope">
           <el-switch
             @change="ionlineApi(scope.row)"
-            v-model="scope.row.status"
-            :active-value="1"
+            v-model="scope.row.switchValue"
+            :active-value="0"
             active-color="#13ce66"
             inactive-color="#ff4949">
           </el-switch>
@@ -178,6 +178,9 @@ export default {
       pageList(this.addDateRange(this.queryParams, this.dateRange))
       .then(response => {
           this.dataList = response.data.rows;
+          this.dataList.forEach(item =>{
+            item.switchValue = item.status;
+          })
           this.total = response.data.total;
           this.loading = false;
         }
@@ -215,13 +218,13 @@ export default {
     /** 发布或者取消发布按钮操作 */
     ionlineApi(row) {
       try {
-        updateStatus({ id: row.id, status: row.status ? 1 : 0 }).then((res) => {
+        updateStatus({ id: row.id, status: row.status == 0 ? 1 : 0 }).then((res) => {
           if (res.code == 200) {
             this.$message({
               type: 'success',
               message: '操作成功!'
             });
-            // this.getList();
+            this.getList();
           }
         });
       }catch (e) {
@@ -236,7 +239,7 @@ export default {
 
     /** 删除按钮操作 */
     handleDelete(row) {
-      this.$modal.confirm('是否确认删除数据剧目为"' + row.goodsName + '"的数据项?').then(function() {
+      this.$modal.confirm('是否确认删除数据票务名称为"' + row.goodsName + '"的数据项?').then(function() {
         return deleteById(row.id);
       }).then(() => {
         this.getList();

+ 13 - 6
src/views/venue/schedulingMr/dialog/addAndEdit.vue

@@ -65,9 +65,10 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="选择日期" v-if="form.insertType == '2'" prop="performDate">
+        <el-form-item label="选择日期"  prop="performDate">
           <el-date-picker
             v-model="form.performDate"
+            v-if="form.insertType == '2'"
             type="daterange"
             range-separator="至"
             @change="performDateEven('list')"
@@ -75,9 +76,8 @@
             start-placeholder="开始日期"
             end-placeholder="结束日期">
           </el-date-picker>
-        </el-form-item>
-        <el-form-item label="选择日期" v-if="form.insertType == '1'" prop="performDate">
           <el-date-picker
+            v-if="form.insertType == '1'"
             v-model="form.performDate"
             type="date"
             @change="performDateEven"
@@ -85,6 +85,9 @@
             placeholder="选择日期">
           </el-date-picker>
         </el-form-item>
+<!--        <el-form-item label="选择日期" v-if="form.insertType == '1'" prop="performDate">-->
+<!--          -->
+<!--        </el-form-item>-->
         <el-form-item label="场次排期" prop="timeList" v-if="!editType">
           <el-button type="primary" size="small" @click="addTable">添加</el-button>
         </el-form-item>
@@ -212,12 +215,16 @@ export default {
       // this.merchantPageList();
       if (obj){
         this.title = "编辑排期";
-        this.form.insertType = '1';
+        this.form = {
+          id: undefined,
+          timeList: []
+        };
+        this.$set(this.form, 'insertType', '1');
         this.editType = true;
         this.$nextTick(() => {
           this.$set(this.form, 'id', obj.id);
-          this.$set(this.form, 'performDate', obj.performDate);
           this.$set(this.form, 'performId', obj.performId);
+          this.$set(this.form, 'performDate', obj.performDate);
           this.$set(this.form, 'auditoriumId', obj.auditoriumId);
           this.$set(this.form, 'theatreName', obj.theatreName);
           this.getList(obj.theatreName);
@@ -293,7 +300,7 @@ export default {
       let newTimeArr = newTime.split('-');
       let letTiemArr = this.selectPerform.releaseDate.split('-');
       if(this.dateToTimestamp(newTimeArr[0], newTimeArr[1], newTimeArr[2]) < this.dateToTimestamp(letTiemArr[0], letTiemArr[1], letTiemArr[2])){
-        this.$message.error("开始时间不能小于票务发布时间" + this.selectPerform.releaseDate);
+        this.$message.error("开始时间不能小于剧目上映时间" + this.selectPerform.releaseDate);
         this.$set(this.form, 'performDate' , '')
         return false
       }

+ 38 - 7
src/views/venue/schedulingMr/index.vue

@@ -36,7 +36,7 @@
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
-              type="primary"
+              type="success"
               plain
               icon="el-icon-plus"
               size="mini"
@@ -54,10 +54,21 @@
           v-hasPermi="['schedulingMr:schedulingMr:batch']"
         >批量添加</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          @click="handleBatchDelete"
+          v-hasPermi="['schedulingMr:schedulingMr:batchDelete']"
+        >批量删除</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table ref="tables" v-loading="loading" :data="dataList" border>
+    <el-table ref="tables" v-loading="loading" :data="dataList" border @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="50" align="center" />
       <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
       <el-table-column label="场馆名称" align="center" prop="theatreName" />
       <el-table-column label="演出厅" align="center" prop="auditoriumName" />
@@ -133,7 +144,7 @@
 
 <script>
 
-import { pageList, deleteById } from '@/api/schedulingMr/schedulingMr'
+import { pageList, deleteById, deleteBatchById } from '@/api/schedulingMr/schedulingMr'
 import addAndEdit from "./dialog/addAndEdit.vue";
 
 export default {
@@ -176,7 +187,7 @@ export default {
       ],
       visibleStatus: false,
       newObj: {},
-      visibleType: ''
+      visibleType: '',
     };
   },
   created() {
@@ -216,9 +227,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.userId);
-      this.single = selection.length != 1;
-      this.multiple = !selection.length;
+      this.ids = selection.map(item => item.id);
     },
     /** 新增按钮操作 */
     handleAdd(type) {
@@ -238,6 +247,28 @@ export default {
         this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
+
+    /** 批量删除按钮操作 */
+    handleBatchDelete() {
+      if(!this.ids || this.ids.length == 0){
+        this.$modal.msgWarning("请选择需要删除的数据!");
+        return false
+      }
+      this.$confirm('是否确认删除选中的数据?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        deleteBatchById(this.ids.toString())
+          .then(response => {
+              this.getList();
+              this.$modal.msgSuccess("删除成功");
+            }
+          ).catch(() => {
+        });
+      }).catch(() => {});
+    },
+
     /** 查看按钮操作 */
     seeCenter(obj, type) {
       this.visibleStatus = true

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

@@ -53,7 +53,7 @@
             <div v-if="openType != 'see'"  class="el-upload__tip" slot="tip">只能上传.jpg或.png格式</div>
           </el-upload>
         </el-form-item>
-        <el-form-item label="负责人" prop="contactName">
+        <el-form-item label="负责人">
           <el-input
             v-model="form.contactName"
             placeholder="负责人"
@@ -62,7 +62,7 @@
             style="width: 100%;"
           />
         </el-form-item>
-        <el-form-item label="负责人联系电话" prop="contactMobile">
+        <el-form-item label="负责人联系电话">
           <el-input
             v-model="form.contactMobile"
             placeholder="负责人联系电话"
@@ -71,7 +71,7 @@
             style="width: 100%;"
           />
         </el-form-item>
-        <el-form-item label="客服电话" prop="customerServiceMobile">
+        <el-form-item label="客服电话">
           <el-input
             v-model="form.customerServiceMobile"
             placeholder="客服电话"
@@ -191,9 +191,9 @@ export default {
     mapConfirm(flag, data) {
       this.amapVisible = false
       if (flag) {
-        this.form.address = data.address
-        this.form.latitude = data.lat
-        this.form.longitude = data.lng
+        this.$set(this.form, 'address', data.address);
+        this.$set(this.form, 'latitude', data.lat);
+        this.$set(this.form, 'longitude', data.lng);
         this.basicFormValidate.businessProvinceId = data.businessProvinceId
       }
     },
@@ -247,6 +247,32 @@ export default {
       this.$refs["form"].validate(async (valid) => {
         if (valid) {
           try {
+            let reg = /^1[23456789]\d{9}$/;
+            // let reg1 = /^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/;
+            let isContactMobile = false, isCustomerServiceMobile = false;
+            if(this.form.contactMobile && this.form.contactMobile != ''){
+              if (reg.test(this.form.contactMobile)) {
+                isContactMobile = false;
+              } else {
+                isContactMobile = true;
+              }
+            }
+            if(this.form.customerServiceMobile && this.form.customerServiceMobile != ''){
+              if (reg.test(this.form.customerServiceMobile)) {
+                isCustomerServiceMobile = false;
+              } else {
+                isCustomerServiceMobile = true;
+              }
+            }
+            if(isContactMobile){
+              this.$message.error("负责人联系电话验证失败");
+              return false
+            }
+            if(isCustomerServiceMobile){
+              this.$message.error("客服电话验证失败");
+              return false
+            }
+
             this.loading = true;
             const { code } = await saveAndEdit({ ...this.form });
             if (code === 200) {