zhongzhao преди 1 година
родител
ревизия
72eeb98ec1

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

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 分页查询
 export const pageList = (query) => {
   return request({
-    url: '/order/orderRefund/pageList',
+    url: '/order/viewsIncomeExpenses/pageList',
     method: 'get',
     params: query
   })

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

@@ -43,3 +43,12 @@ export const seatSaveAndEdit = (data) => {
     data: data
   })
 }
+
+// 解除绑定票务
+export const performUnBindGoods = (data) => {
+  return request({
+    url: '/goods/performInfo/performUnBindGoods',
+    method: 'post',
+    data: data
+  })
+}

+ 14 - 9
src/store/modules/user.js

@@ -70,15 +70,20 @@ const user = {
     // 退出系统
     LogOut({ commit, state }) {
       return new Promise((resolve, reject) => {
-        logout(state.token).then(() => {
-          commit('SET_TOKEN', '')
-          commit('SET_ROLES', [])
-          commit('SET_PERMISSIONS', [])
-          removeToken()
-          resolve()
-        }).catch(error => {
-          reject(error)
-        })
+        commit('SET_TOKEN', '')
+        commit('SET_ROLES', [])
+        commit('SET_PERMISSIONS', [])
+        removeToken()
+        resolve()
+        // logout(state.token).then(() => {
+        //   commit('SET_TOKEN', '')
+        //   commit('SET_ROLES', [])
+        //   commit('SET_PERMISSIONS', [])
+        //   removeToken()
+        //   resolve()
+        // }).catch(error => {
+        //   reject(error)
+        // })
       })
     },
 

+ 1 - 1
src/utils/request.js

@@ -9,7 +9,7 @@ import { saveAs } from 'file-saver'
 
 let downloadLoadingInstance;
 // 是否显示重新登录
-export let isRelogin = { show: false };
+export const isRelogin = { show: false };
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例

+ 37 - 3
src/views/agreement/index.vue

@@ -85,7 +85,11 @@
           <dict-tag :options="dict.type.agreement_type" :value="scope.row.type"/>
         </template>
       </el-table-column>
-      <el-table-column label="协议内容" align="center" prop="content" />
+      <el-table-column label="协议内容" align="center" prop="content" width="160" sortable="custom" >
+        <template slot-scope="scope">
+          <el-button type="text" @click="seeCenter(scope.row, 'html')">查看</el-button>
+        </template>
+      </el-table-column>
       <el-table-column label="添加时间" align="center" prop="createTime" width="160" sortable="custom" >
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -126,6 +130,28 @@
       :dict="dict"
       @getList="getList"
     />
+
+    <el-dialog
+      title="查看"
+      :visible.sync="visibleStatus"
+      width="600px"
+      :destroy-on-close="true"
+      :close-on-click-modal="false"
+    >
+      <div v-if="visibleType == 'img'">
+        <el-image
+          style="width: 400px; height: 100%"
+          :src="newObj.sliderImg"
+          fit="cover"
+        />
+      </div>
+      <div v-if="visibleType == 'html'">
+        <div v-html="newObj.content"></div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="visibleStatus = false">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -166,7 +192,10 @@ export default {
         pageNum: 1,
         pageSize: 10,
         type: undefined
-      }
+      },
+      visibleStatus: false,
+      newObj: {},
+      visibleType: ''
     };
   },
   created() {
@@ -213,7 +242,12 @@ export default {
     handleUpdate(row) {
       this.$refs["addAndEdit"].openDialog("修改数据", row);
     },
-
+    /** 查看按钮操作 */
+    seeCenter(obj, type) {
+      this.visibleStatus = true
+      this.visibleType = type;
+      this.newObj = obj;
+    },
     /** 删除按钮操作 */
     handleDelete(row) {
       const dataIds = row.id || this.ids;

+ 1 - 1
src/views/appletMr/dialog/addAndEdit.vue

@@ -28,7 +28,7 @@
         </el-form-item>
         <el-form-item label="类型" prop="type">
           <el-radio v-model="form.type" label="1">图文</el-radio>
-          <el-radio v-model="form.type" label="3">链接跳转</el-radio>
+<!--          <el-radio v-model="form.type" label="3">链接跳转</el-radio>-->
         </el-form-item>
         <el-form-item label="banner图" prop="sliderImg">
           <el-upload

+ 28 - 22
src/views/finance/flowingWaterMr/index.vue

@@ -3,7 +3,7 @@
     <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.refundTransactionId"
+          v-model="queryParams.id"
           placeholder="请输入订单号"
           clearable
           style="width: 240px;"
@@ -45,39 +45,39 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-button
-      type="success"
-      icon="el-icon-download"
-      :disabled="tableData.length === 0"
-      v-hasPermi="['flowingWaterMr:flowingWaterMr:downloadExcel']"
-      @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>
-    <el-row :gutter="10" class="mb8">
+    <el-row :gutter="10" class="mb8"  style="margin-left: 0">
+      <el-button
+        type="success"
+        icon="el-icon-download"
+        :disabled="tableData.length === 0"
+        v-hasPermi="['flowingWaterMr:flowingWaterMr:downloadExcel']"
+        @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>
 
     <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="refundTransactionId" />
-      <el-table-column label="金额(元)" align="center" prop="orderId" />
-      <el-table-column label="收支类型" align="center" prop="refundMobile" />
-      <el-table-column label="业务类型" align="center" prop="type">
+      <el-table-column label="订单号" align="center" prop="id" />
+      <el-table-column label="金额(元)" align="center" prop="type">
         <template slot-scope="scope">
-          <span>¥{{ scope.row.refundAmount }}</span>
+          <span>¥{{ scope.row.orderPrice }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="收支类型" align="center" prop="incomeExpenses" />
+      <el-table-column label="业务类型" align="center" prop="businessType" />
       <el-table-column label="产生渠道" align="center" prop="refundTime" width="160" >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.refundTime) }}</span>
+          <span>{{ sourceMap[scope.row.source] }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="产生时间" align="center" prop="refundTime" width="160" >
+      <el-table-column label="产生时间" align="center" prop="createTime" width="160" >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.refundTime) }}</span>
+          <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
 
@@ -135,10 +135,16 @@ export default {
         {id: 3, name: '退款失败', value: 2},
         {id: 4, name: '退款中', value: 3},
       ],
+      sourceMap: {
+        1: '小程序',
+        2: '美团',
+        3: '携程',
+      },
       visibleStatus: false,
       newObj: {},
       visibleType: '',
-      handleExportLoading: false
+      handleExportLoading: false,
+      tableData: {}
     };
   },
   created() {

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

@@ -65,7 +65,12 @@
     <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="refundTransactionId" />
-      <el-table-column label="原订单号" align="center" prop="orderId" />
+<!--      <el-table-column label="原订单号" align="center" prop="orderId" />-->
+      <el-table-column label="原订单号" align="center" prop="orderId" width="160" sortable="custom" >
+        <template slot-scope="scope">
+          <el-button type="text" @click="openDetails(scope.row)">{{ scope.row.orderId }}</el-button>
+        </template>
+      </el-table-column>
       <el-table-column label="手机号码" align="center" prop="refundMobile" />
       <el-table-column label="支付单号" align="center" prop="transactionId" />
       <el-table-column label="退款金额" align="center" prop="type">

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

@@ -92,7 +92,7 @@ export default {
         if(reg1.test(value)){
           callback();
         }
-        callback(new Error('请输入正确开票电话'));
+        callback(new Error('请输入正确负责人联系电话'));
       } else {
         callback();
       }

+ 1 - 1
src/views/perform/performMr/index.vue

@@ -38,7 +38,7 @@
       <el-table-column label="负责人联系电话" align="center" prop="contactMobile" />
       <el-table-column label="创建时间" align="center" prop="createTime" width="160">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
+          <span>{{ scope.row.createTime }}</span>
         </template>
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">

+ 54 - 9
src/views/perform/programmeMr/dialog/addAndEdit.vue

@@ -33,7 +33,7 @@
                 v-model="form.sponsorId"
                 placeholder="主办方"
                 clearable
-                style="width: 240px"
+                style="width: 100%"
                 @change="changePerform"
               >
                 <el-option
@@ -44,12 +44,29 @@
                 />
               </el-select>
             </el-form-item>
+            <el-form-item label="票务选择" prop="ticketIdList">
+              <el-select
+                v-model="form.ticketIdList"
+                placeholder="票务选择"
+                clearable
+                multiple
+                style="width: 100%"
+                @change="changePerform"
+              >
+                <el-option
+                  v-for="dict in ticketList"
+                  :key="dict.id"
+                  :label="dict.goodsName"
+                  :value="dict.id"
+                />
+              </el-select>
+            </el-form-item>
             <el-form-item label="是否启用" prop="status">
               <el-select
                 v-model="form.status"
                 placeholder="状态"
                 clearable
-                style="width: 240px"
+                style="width: 100%"
               >
                 <el-option
                   v-for="dict in statusList"
@@ -74,8 +91,10 @@
             </el-form-item>
             <el-form-item label="演出时长">
               <el-input
-                v-model="form.showDuration"
                 placeholder="演出时长"
+                type="number"
+                v-model.number="form.showDuration"
+                @change="changePriceAmount('showDuration')"
                 clearable
                 style="width: 240px;margin-right: 10px"
               />
@@ -83,8 +102,10 @@
             </el-form-item>
             <el-form-item label="演出人数">
               <el-input
+                type="number"
                 v-model="form.peopleNum"
                 placeholder="演出人数"
+                @change="changePriceAmount('peopleNum')"
                 clearable
                 style="width: 240px;margin-right: 10px"
               />
@@ -93,7 +114,7 @@
             <el-form-item label="演员信息">
               <el-button type="text" @click="performerOpen">添加</el-button>
             </el-form-item>
-            <el-form-item label="宣传图">
+            <el-form-item label="剧目海报">
               <el-upload
                 ref="upload"
                 class="avatar-uploader"
@@ -118,7 +139,7 @@
                 <div class="el-upload__tip" slot="tip">只能上传.jpg或.png格式</div>
               </el-upload>
             </el-form-item>
-            <el-form-item label="剧目海报">
+            <el-form-item label="宣传图">
               <el-upload
                 ref="upload"
                 :action="uploadObj.url"
@@ -253,6 +274,7 @@
 <script>
 // import { updateNoticeMgr } from "@/api/system/noticeMgr";
 import { saveAndEdit, getSelectById } from '@/api/programmeMr/programmeMr'
+import { ticketPageList } from '@/api/ticketMr/ticketMr'
 import Editor from "@/components/Editor";
 import { getToken } from "@/utils/auth";
 import { pageList } from '@/api/performMr/performMr'
@@ -292,11 +314,13 @@ export default {
         {id: 1, name: '是', value: 1},
         {id: 2, name: '否', value: 2},
       ],
-      performList: []
+      performList: [],
+      ticketList: []
     };
   },
   created() {
-    this.getList()
+    this.getList();
+    this.ticketPageListApi();
   },
   methods: {
     /** 查询主办方列表 */
@@ -307,6 +331,14 @@ export default {
           }
         );
     },
+    /** 查询票务列表 */
+    ticketPageListApi() {
+      ticketPageList({pageNum: 1, pageSize: 100, goodsType: 2, classifyId: 1, status: 1})
+        .then(response => {
+            this.ticketList = response.data.rows;
+          }
+        );
+    },
     /** 主办方选择事件 */
     changePerform(val) {
       this.performList.forEach(item => {
@@ -315,6 +347,14 @@ export default {
         }
       })
     },
+    /** 价格输入事件 */
+    changePriceAmount(key) {
+      if(this.form[key] * 1 < 0){
+        this.$message.error("输入需大于或等于0!");
+        this.$set(this.form, key, '');
+        return false
+      }
+    },
     /**
      * 打开弹框
      * @date 2023-11-22
@@ -432,6 +472,7 @@ export default {
         // this.form.mainImg = res?.data?.url;
         this.$set(this.form, 'showImg', res?.data?.url)
       }
+      console.log(this.form.photoList)
     },
     /**
      * 剧目海报上传成功
@@ -443,12 +484,14 @@ export default {
       if (res.code === 200) {
         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.form.photoList.push(photo);
+        this.$set(this.form.photoList, this.form.photoList.length, photo);
       }
     },
     handleRemove(file, fileList) {
@@ -457,12 +500,14 @@ export default {
           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.form.photoList.push(photo);
+          this.$set(this.form.photoList, this.form.photoList.length, photo);
         }
       })
     },

+ 43 - 26
src/views/perform/programmeMr/dialog/programmeAddAndEdit.vue

@@ -63,13 +63,21 @@
       @close="cancel"
     >
       <div class="dialog">
-        <el-table ref="tables" v-loading="loading" :data="tableList" border @selection-change="handleSelectionChange">
+        <el-table ref="tables" v-loading="loading" :data="ticketList" 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="票务ID" align="center" prop="name" />
-          <el-table-column label="票务名称" align="center" prop="theatreName" />
-          <el-table-column label="原价" align="center" prop="theatreName" />
-          <el-table-column label="销售价" align="center" prop="theatreName" />
+          <el-table-column label="票务ID" align="center" prop="id" />
+          <el-table-column label="票务名称" align="center" prop="goodsName" />
+          <el-table-column label="原价" align="center">
+            <template slot-scope="scope">
+              <span>¥{{ scope.row.salePrice }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="销售价" align="center">
+            <template slot-scope="scope">
+              <span>¥{{ scope.row.salePrice }}</span>
+            </template>
+          </el-table-column>
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -91,8 +99,9 @@
 </template>
 
 <script>
-import { saveAndEdit } from "@/api/performanceHallMr/performanceHallMr";
+import { performUnBindGoods } from "@/api/performanceHallMr/performanceHallMr";
 import { pageList } from '@/api/seatTypeMr/seatTypeMr'
+import { ticketPageList } from '@/api/ticketMr/ticketMr'
 import { getToken } from "@/utils/auth";
 export default {
   name: "programmeAddAndEdit",
@@ -118,6 +127,9 @@ export default {
         ],
       },
       seatList: [],
+      ticketList: [],
+      selectionList: [],
+      performId: ''
     };
   },
   methods: {
@@ -129,16 +141,18 @@ export default {
      */
     openDialog(title, obj) {
       this.open = true;
-      this.getSeatTypeList();
+      // this.getSeatTypeList();
       this.getList();
       this.title = "票务信息";
       if (obj){
         this.$set(this.form, 'id', obj.id)
+        this.performId = obj.id
       }
+      console.log(this.form)
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-
+      this.selectionList = selection;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -155,9 +169,9 @@ export default {
     },
     /** 查询列表 */
     getList() {
-      pageList(this.addDateRange({pageNum: 1, pageSize: 100}))
+      ticketPageList(this.addDateRange({pageNum: 1, pageSize: 100, goodsType: 2, classifyId: 1, status: 1}))
         .then(response => {
-            this.theatreList = response.data.rows;
+            this.ticketList = response.data.rows;
           }
         );
     },
@@ -166,23 +180,26 @@ export default {
      * @date 2023-11-22
      * @returns {any}
      */
-    submitForm() {
-      this.$refs["form"].validate(async (valid) => {
-        if (valid) {
-          try {
-            this.loading = true;
-            const { code } = await saveAndEdit({ ...this.form });
-            if (code === 200) {
-              this.$message.success("修改成功!");
-              this.$emit("getList");
-              this.cancel();
-            }
-          } catch (error) {
-          } finally {
-            this.loading = false;
-          }
+    async submitForm() {
+      try {
+        this.loading = true;
+        let postMap = {
+          performId: this.performId,
+          goodIds: []
         }
-      });
+        this.selectionList.forEach(item => {
+          postMap.goodIds.push(item.id)
+        })
+        const { code } = await performUnBindGoods({ ...postMap });
+        if (code === 200) {
+          this.$message.success("操作成功!");
+          this.$emit("getList");
+          this.formOpen = false;
+        }
+      } catch (error) {
+      } finally {
+        this.loading = false;
+      }
     },
     /**
      * 重置

+ 20 - 20
src/views/perform/programmeMr/index.vue

@@ -1,15 +1,15 @@
 <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="剧目ID">
-        <el-input
-          v-model="queryParams.id"
-          placeholder="请输入剧目ID"
-          clearable
-          style="width: 240px;"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+<!--      <el-form-item label="剧目ID">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.id"-->
+<!--          placeholder="请输入剧目ID"-->
+<!--          clearable-->
+<!--          style="width: 240px;"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
       <el-form-item label="剧目名称">
         <el-input
           v-model="queryParams.name"
@@ -49,7 +49,7 @@
     </el-row>
 
     <el-table ref="tables" v-loading="loading" :data="dataList" border>
-      <el-table-column label="剧目ID" align="center" type="index" width="60"></el-table-column>
+      <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">
         <template slot-scope="scope">
@@ -75,20 +75,20 @@
           </el-switch>
         </template>
       </el-table-column>
-      <el-table-column label="添加时间" align="center" prop="onlineTime" width="160" >
+      <el-table-column label="添加时间" align="center" prop="createTime" width="160" >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.onlineTime) }}</span>
+          <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            @click="handleMr(scope.row)"
-            v-hasPermi="['programmeMr:programmeMr:info']"
-          >票务信息</el-button>
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            @click="handleMr(scope.row)"-->
+<!--            v-hasPermi="['programmeMr:programmeMr:info']"-->
+<!--          >票务信息</el-button>-->
           <el-button
             size="mini"
             type="text"
@@ -233,7 +233,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
-      this.$set(this.queryParams, 'id', '');
+      // this.$set(this.queryParams, 'id', '');
       this.$set(this.queryParams, 'name', '');
       this.$set(this.queryParams, 'sponsorName', '');
       this.queryParams.pageNum = 1;

+ 2 - 1
src/views/system/user/index.vue

@@ -567,6 +567,7 @@ export default {
         this.open = true;
         this.title = "添加用户";
         this.form.password = this.initPassword;
+        this.form.deptId = this.queryParams.deptId;
       });
     },
     /** 修改按钮操作 */
@@ -667,4 +668,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 4 - 0
src/views/system/user/profile/resetPwd.vue

@@ -18,6 +18,7 @@
 
 <script>
 import { updateUserPwd } from "@/api/system/user";
+import store from '@/store'
 
 export default {
   data() {
@@ -56,6 +57,9 @@ export default {
         if (valid) {
           updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
             this.$modal.msgSuccess("修改成功");
+            store.dispatch('LogOut').then(() => {
+              location.href = '/login';
+            })
           });
         }
       });

+ 17 - 7
src/views/ticket/priceMr/dialog/addAndEdit.vue

@@ -29,7 +29,7 @@
             <el-option
               v-for="dict in ticketList"
               :key="dict.id"
-              :label="dict.goodsName"
+              :label="dict.goodsName + ' (' + dict.salePrice + '元)' "
               :value="dict.id"
             />
           </el-select>
@@ -106,9 +106,12 @@
         <el-form-item label="价格:" prop="priceAmount">
           <el-input
             :disabled="isDisabled"
+            type="number"
             v-model.number="form.priceAmount"
             placeholder=""
+            min="0"
             clearable
+            @change="changePriceAmount"
             style="width: 160px;"
           >
             <template slot="append">{{ form.priceType == 1 ? '%' : '元' }}</template>
@@ -208,10 +211,10 @@ export default {
       if (obj){
         this.editType = true;
         if(type) {
-          this.title = "票务价格";
+          this.title = "座位价格";
           this.isDisabled = true
         } else {
-          this.title = "编辑票务价格";
+          this.title = "编辑座位价格";
         }
         this.$nextTick(() => {
           this.$set(this.form, 'id', obj.id);
@@ -224,7 +227,7 @@ export default {
           this.getList(obj.theatreName);
         });
       }else{
-        this.title = "新增票务价格";
+        this.title = "新增座位价格";
         this.form = {
             id: undefined,
             priceType: '1'
@@ -261,14 +264,14 @@ export default {
     },
     /** 剧目列表查询 */
     goodsPageList() {
-      goodsPageList(this.addDateRange({pageNum: 1, pageSize: 100}))
+      goodsPageList(this.addDateRange({pageNum: 1, pageSize: 100, status: 1}))
         .then(response => {
             this.goodsList = response.data.rows;
         });
     },
     /** 票务列表查询 */
     ticketListApi() {
-      ticketPageList(this.addDateRange({pageNum: 1, pageSize: 100,  goodsType: 2, classifyId: 1}))
+      ticketPageList(this.addDateRange({pageNum: 1, pageSize: 100,  goodsType: 2, classifyId: 1, status: 1}))
         .then(response => {
             this.ticketList = response.data.rows;
         });
@@ -280,7 +283,14 @@ export default {
             this.merchantList = response.data.rows;
         });
     },
-
+    /** 价格输入事件 */
+    changePriceAmount(val) {
+      if(val * 1 < 0){
+        this.$message.error("输入需大于或等于0!");
+        this.$set(this.form, 'priceAmount', '');
+        return false
+      }
+    },
     /**
      * 保存
      * @date 2023-11-22

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

@@ -3,7 +3,7 @@
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="票务名称" label-width="70px">
         <el-input
-          v-model="queryParams.theatreName"
+          v-model="queryParams.goodsName"
           placeholder="请输入票务名称"
           clearable
           style="width: 240px;"
@@ -38,12 +38,12 @@
       <el-table-column label="演出厅名称" align="center" prop="auditoriumName" />
       <el-table-column label="剧目名称" align="center" prop="performName" />
       <el-table-column label="座位类型" align="center" prop="seatTypeName" />
-      <el-table-column label="销售价" align="center" prop="performTimeStart" width="160">
+      <el-table-column label="销售价" align="center" prop="performTimeStart">
         <template slot-scope="scope">
-          <span>{{ scope.row.priceAmount }}</span>
+          <span>{{ scope.row.priceAmount }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="添加时间" align="center" prop="createTime" width="160">
+      <el-table-column label="添加时间" align="center" prop="createTime">
         <template slot-scope="scope">
           <span>{{ scope.row.createTime }}</span>
         </template>

+ 26 - 12
src/views/ticket/ticketMr/dialog/addAndEdit.vue

@@ -17,7 +17,7 @@
     @close="cancel"
   >
     <div class="dialog">
-      <el-form :model="form" ref="form" :rules="rules" label-width="120px">
+      <el-form v-if="open" :model="form" ref="form" :rules="rules" label-width="120px">
         <el-tabs v-model="activeName">
           <!--    基础信息     -->
           <el-tab-pane label="基础信息" name="01">
@@ -34,6 +34,8 @@
             <el-form-item label="核销播报次数:" prop="verificationSpeaker">
               <el-input
                 v-model="form.verificationSpeaker"
+                @change="changePriceAmount('verificationSpeaker')"
+                type="number"
                 placeholder="核销播报次数"
                 clearable
                 style="width: 100%;"
@@ -41,10 +43,12 @@
                 <template slot="append">次</template>
               </el-input>
             </el-form-item>
-            <el-form-item label="票务说明:" prop="detail">
+            <el-form-item label="票务说明:">
               <el-input
                 type="textarea"
-                :rows="2"
+                :rows="3"
+                maxlength="40"
+                show-word-limit
                 placeholder="请输入内容"
                 v-model="form.detail">
               </el-input>
@@ -57,7 +61,9 @@
               <el-input
                 v-model="form.salePrice"
                 placeholder="销售价"
+                type="number"
                 clearable
+                @change="changePriceAmount('salePrice')"
                 style="width: 100%;"
               >
                 <template slot="append">元</template>
@@ -96,9 +102,11 @@
             <el-form-item label="" v-if="form.backStatus == '0'" prop="days" label-width="120px">
               <span>提前</span>
               <el-input
-                v-model.number="form.days"
+                v-model="form.days"
+                type="number"
                 placeholder=""
                 clearable
+                @change="changePriceAmount('days')"
                 style="width: 140px;margin-left: 5px"
               />
               <span style="padding: 0 10px">天</span>
@@ -204,10 +212,6 @@ export default {
           this.form.sponsorName = item.name
         }
       })
-    },
-    /** 多选框事件 */
-    handleCheckedCitiesChange() {
-
     },
     /**
      * 打开弹框
@@ -258,7 +262,7 @@ export default {
           this.$set(this.form, 'channelWx', obj.goodsPerform.channelWx == 0);
           this.$set(this.form, 'channelWindow', obj.goodsPerform.channelWindow == 0);
 
-          this.form.backStatus = obj.goodsPerform.backStatus;
+          this.$set(this.form, 'backStatus', obj.goodsPerform.backStatus);
           this.$set(this.form, 'backTime', '1');
           this.$set(this.form, 'backStatus', obj.goodsPerform.backStatus.toString());
           if(obj.goodsPerform.backStatus == '0') {
@@ -268,6 +272,14 @@ export default {
         });
       });
     },
+    /** 价格输入事件 */
+    changePriceAmount(key) {
+      if(this.form[key] * 1 < 0){
+        this.$message.error("输入需大于或等于0!");
+        this.$set(this.form, key, '');
+        return false
+      }
+    },
     /**
      * 保存
      * @date 2023-11-22
@@ -292,9 +304,12 @@ export default {
 
             postMap.salePrice = this.form.salePrice;
             postMap.goodsPerform.buyAstrict = this.form.buyAstrictType == '1' ? this.form.buyAstrict : '-1';
+            if(!(this.form.channelWx || this.form.channelWindow)){
+              this.$message.error("请选择销售渠道!");
+              return false;
+            }
             postMap.goodsPerform.channelWx = this.form.channelWx ? 0 : 1;
             postMap.goodsPerform.channelWindow = this.form.channelWindow  ? 0 : 1;
-
             postMap.goodsPerform.backStatus = this.form.backStatus;
             if(this.form.backStatus == '0') {
               postMap.performRefundRule.days = this.form.days;
@@ -303,7 +318,6 @@ export default {
             postMap.goodsType = 2;
             postMap.classifyId = 1;
             postMap.classifyName = "门票类";
-
             this.loading = true;
             const { code } = await saveAndEdit({ ...postMap });
             if (code === 200) {
@@ -333,7 +347,7 @@ export default {
      * @returns {any}
      */
     cancel() {
-      this.reset();
+      // this.reset();
       this.open = false;
     },
   },

+ 3 - 3
src/views/ticket/ticketMr/index.vue

@@ -40,8 +40,8 @@
       </el-table-column>
       <el-table-column label="是否限购" align="center" prop="type">
         <template slot-scope="scope">
-          <el-tag type="success" v-if="scope.row.goodsPerform.buyAstrict  > -1">是</el-tag>
-          <el-tag type="danger" v-if="scope.row.goodsPerform.buyAstrict = -1">否</el-tag>
+          <el-tag type="success" v-if="scope.row.goodsPerform.buyAstrict > -1">是</el-tag>
+          <el-tag type="danger" v-if="scope.row.goodsPerform.buyAstrict == -1">否</el-tag>
         </template>
       </el-table-column>
       <el-table-column label="销售渠道" align="center">
@@ -236,7 +236,7 @@ export default {
 
     /** 删除按钮操作 */
     handleDelete(row) {
-      this.$modal.confirm('是否确认删除数据剧目为"' + row.name + '"的数据项?').then(function() {
+      this.$modal.confirm('是否确认删除数据剧目为"' + row.goodsName + '"的数据项?').then(function() {
         return deleteById(row.id);
       }).then(() => {
         this.getList();

+ 3 - 2
src/views/venue/performanceHallMr/dialog/addAndEdit.vue

@@ -17,7 +17,7 @@
     @close="cancel"
   >
     <div class="dialog">
-      <el-form :model="form" ref="form" :rules="rules" label-width="100px">
+      <el-form :model="form" v-if="open" ref="form" :rules="rules" label-width="100px">
         <el-form-item label="演出厅名称" prop="name">
           <el-input
             v-model="form.name"
@@ -104,7 +104,7 @@ export default {
         content: "",
       },
       rules: {
-        name: [{ required: true, message: "请输入所属场馆", trigger: "blur" }],
+        name: [{ required: true, message: "请输入演出厅名称", trigger: "blur" }],
         seatImg: [{ required: true, message: "请上传票区图", trigger: "blur" }],
         theatreId: [
           { required: true, message: "请选择所属场馆", trigger: "blur" },
@@ -134,6 +134,7 @@ export default {
           this.$set(this.form, 'name', obj.name)
           this.$set(this.form, 'seatImg', obj.seatImg)
           this.$set(this.form, 'theatreId', obj.theatreId)
+          this.$forceUpdate()
         });
       }else{
         this.title = "添加演出厅";

+ 7 - 1
src/views/venue/performanceHallMr/dialog/seatTemplateEdit.vue

@@ -11,7 +11,7 @@
   <el-dialog
     :title="title"
     :visible.sync="open"
-    width="900px"
+    width="1200px"
     append-to-body
     :close-on-click-modal="false"
     @close="cancel"
@@ -166,6 +166,9 @@ export default {
       this.seatType = false;
       this.getSeatTypeList();
       this.colSeatMap = {};
+      this.form = {
+        status: '1'
+      }
       if (obj){
         this.title = "座位模板";
         this.auditoriumId = obj.id;
@@ -257,6 +260,8 @@ export default {
     },
     /** 座位类型选择事件 */
     seatTypeChange(val) {
+      this.$set(this.form, 'priority', '');
+      this.$set(this.form, 'name', '');
       this.seatList.forEach(item => {
         if(val == item.id){
           this.form.seat = item
@@ -290,6 +295,7 @@ export default {
       map.name = this.seatSetMap.name;
       map.priority = this.seatSetMap.priority;
       this.$set(this.colSeatMap, row + '_' +col, map);
+      this.$forceUpdate()
     },
     /**
      * 保存

+ 4 - 5
src/views/venue/performanceHallMr/index.vue

@@ -3,7 +3,7 @@
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="演出厅名称" label-width="90px">
         <el-input
-          v-model="queryParams.title"
+          v-model="queryParams.name"
           placeholder="请输入演出厅名称"
           clearable
           style="width: 200px;"
@@ -12,7 +12,7 @@
       </el-form-item>
       <el-form-item label="场馆名称" style="margin-left: 30px">
         <el-input
-          v-model="queryParams.title"
+          v-model="queryParams.theatreName"
           placeholder="请输入场馆名称"
           clearable
           style="width: 200px;"
@@ -204,9 +204,8 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
-      this.$set(this.queryParams, 'title', '');
-      this.$set(this.queryParams, 'status', '');
-      this.$set(this.queryParams, 'createBy', '');
+      this.$set(this.queryParams, 'name', '');
+      this.$set(this.queryParams, 'theatreName', '');
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },

+ 60 - 8
src/views/venue/schedulingMr/dialog/addAndEdit.vue

@@ -54,6 +54,7 @@
             v-model="form.performId"
             placeholder="选择剧目"
             clearable
+            @change="changePerform"
             style="width: 100%"
           >
             <el-option
@@ -69,6 +70,7 @@
             v-model="form.performDate"
             type="daterange"
             range-separator="至"
+            @change="performDateEven('list')"
             value-format="yyyy-MM-dd"
             start-placeholder="开始日期"
             end-placeholder="结束日期">
@@ -78,6 +80,7 @@
           <el-date-picker
             v-model="form.performDate"
             type="date"
+            @change="performDateEven"
             value-format="yyyy-MM-dd"
             placeholder="选择日期">
           </el-date-picker>
@@ -121,7 +124,7 @@
                 <el-button
                   size="mini"
                   type="text"
-                  @click="handleDelete(scope.row,scope.index)"
+                  @click="handleDelete(scope.row,scope.$index)"
                 >删除</el-button>
               </template>
             </el-table-column>
@@ -191,6 +194,7 @@ export default {
       goodsList: [],
       merchantList: [],
       editType: false,
+      selectPerform: {}
     };
   },
   methods: {
@@ -259,9 +263,44 @@ export default {
     changeTheatre(id) {
       this.merchantPageList(id)
     },
+    /** 剧目选择 */
+    changePerform(id) {
+      this.goodsList.forEach(item => {
+        if(id == item.id){
+          this.selectPerform = item;
+        }
+      })
+      this.$set(this.form, 'performDate' , '')
+    },
+    // yyyy-mm-dd 转时时间戳
+    dateToTimestamp(year, month, day) {
+      const date = new Date(year, month - 1, day);
+      return date.getTime();
+    },
+    // 时间选择
+    performDateEven(key) {
+      if(!this.form.performId){
+        this.$message.error("请选择剧目!");
+        this.$set(this.form, 'performDate', '');
+        return false;
+      }
+      let newTime = ''
+      if(key == 'list'){
+        newTime = this.form.performDate[0]
+      } else {
+        newTime = this.form.performDate;
+      }
+      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.$set(this.form, 'performDate' , '')
+        return false
+      }
+    },
     /** 剧目列表查询 */
     goodsPageList() {
-      goodsPageList(this.addDateRange({pageNum: 1, pageSize: 100}))
+      goodsPageList(this.addDateRange({pageNum: 1, pageSize: 100, status: 1}))
         .then(response => {
             this.goodsList = response.data.rows;
         });
@@ -289,14 +328,16 @@ export default {
             }
             let postEdit = {}
             if(this.editType) {
-              postEdit.performTimeStart = this.form.timeList[0].performTimeStart
-              postEdit.performTimeEnd = this.form.timeList[0].performTimeEnd
-              postEdit.timeSnapshot = this.form.timeList[0].name
-              postEdit.performId = this.form.performId
-              postEdit.auditoriumId = this.form.auditoriumId
-              postEdit.performDate = this.form.performDate
               postEdit.id = this.form.id
             }
+
+            postEdit.performTimeStart = this.form.timeList[0].performTimeStart
+            postEdit.performTimeEnd = this.form.timeList[0].performTimeEnd
+            postEdit.timeSnapshot = this.form.timeList[0].name
+            postEdit.performId = this.form.performId
+            postEdit.auditoriumId = this.form.auditoriumId
+            postEdit.performDate = this.form.performDate
+
             this.loading = true;
             const { code } = this.form.insertType == '2' ? await addSave({ ...this.form }) : await saveAndEdit({ ...postEdit });
             if (code === 200) {
@@ -357,6 +398,10 @@ export default {
 
     /** 点击添加排期 */
     addTable() {
+      if(!this.form.performId){
+        this.$message.error("请选择剧目!");
+        return false;
+      }
       let map = {
         name: '',
         performTimeStart: '',
@@ -377,8 +422,15 @@ export default {
         row.startM = startTime;
       }
       if(row.performTimeEnd && row.performTimeEnd.length > 0) {
+        // if(this.selectPerform)
         end = row.performTimeEnd.split(":");
         endTime = (end[0] * 3600) + (end[1] * 60);
+        let showDuration = this.selectPerform.showDuration * 60;
+        if(endTime - row.startM < showDuration) {
+          this.$message.error("选择时间不能小于剧目时长," + this.selectPerform.showDuration + "分钟!");
+          row.performTimeEnd = ""
+          return false
+        }
         row.endM = endTime;
       }
 

+ 16 - 4
src/views/venue/venueMr/dialog/addAndEdit.vue

@@ -127,14 +127,26 @@ export default {
     Editor,
   },
   data() {
-    var isPhone = (rule, value, callback) => {
+    var isPhoneContact = (rule, value, callback) => {
       let reg = /^1[23456789]\d{9}$/;
       let reg1 = /^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/;
       if (!reg.test(value)) {
         if(reg1.test(value)){
           callback();
         }
-        callback(new Error('请输入正确的电话'));
+        callback(new Error('请输入负责人联系电话'));
+      } else {
+        callback();
+      }
+    };
+    var isPhoneService = (rule, value, callback) => {
+      let reg = /^1[23456789]\d{9}$/;
+      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();
       }
@@ -156,11 +168,11 @@ export default {
         contactName: [{ required: true, message: "请输入负责人名称", trigger: "blur" }],
         contactMobile: [
           { required: true, message: "请输入负责人联系电话", trigger: "blur" },
-          { validator: isPhone, trigger: 'blur' }
+          { validator: isPhoneContact, trigger: 'blur' }
         ],
         customerServiceMobile: [
           { required: true, message: "请输入客服电话", trigger: "blur" },
-          { validator: isPhone, trigger: 'blur' }
+          { validator: isPhoneService, trigger: 'blur' }
         ],
         address: [{ required: true, message: "请选择场馆位置", trigger: "blur" }],
       },