Explorar o código

票务信息和票务价格功能开发

zhongzhao hai 1 ano
pai
achega
6ad44c7612

+ 19 - 0
src/api/financeMr/refundMr.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/order/orderRefund/pageList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 退款审核
+export const refundAudit = (data) => {
+  return request({
+    url: '/order/orderInfo/refundAudit',
+    method: 'post',
+    data: data
+  })
+}

+ 8 - 0
src/api/seatTypeMr/seatTypeMr.js

@@ -9,6 +9,14 @@ export const pageList = (query) => {
   })
 }
 
+export const SeatTypeList = (query) => {
+  return request({
+    url: '/merchant/merchantAuditoriumSeatType/pageList',
+    method: 'get',
+    params: query
+  })
+}
+
 // 新增/修改
 export const saveAndEdit = (data) => {
   return request({

+ 37 - 0
src/api/ticketMr/priceMr.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/merchant/merchantAuditoriumSeatPrice/pageList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 新增/修改
+export const saveAndEdit = (data) => {
+  return request({
+    url: '/merchant/merchantAuditoriumSeatPrice/insertOrUpdate',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除模板
+export const deleteById = (id) => {
+  return request({
+    url: '/merchant/merchantAuditoriumSeatPrice/deleteById',
+    method: 'delete',
+    params: {id:id}
+  })
+}
+
+
+// id获取详情
+export function getSelectById(id) {
+  return request({
+    url: '/goods/goods/selectById?id=' + id,
+    method: 'get'
+  })
+}

+ 19 - 2
src/api/ticketMr/ticketMr.js

@@ -9,10 +9,18 @@ export const pageList = (query) => {
   })
 }
 
+export const ticketPageList = (query) => {
+  return request({
+    url: '/goods/goods/pageList',
+    method: 'get',
+    params: query
+  })
+}
+
 // 新增/修改
 export const saveAndEdit = (data) => {
   return request({
-    url: '/scenicgoods/goods/insertOrUpdate',
+    url: '/goods/goods/insertOrUpdate',
     method: 'post',
     data: data
   })
@@ -27,10 +35,19 @@ export const deleteById = (id) => {
   })
 }
 
+// 修改上/下架状态
+export const updateStatus = (query) => {
+  return request({
+    url: '/goods/goods/updateStatus',
+    method: 'get',
+    params: query
+  })
+}
+
 // id获取详情
 export function getSelectById(id) {
   return request({
-    url: '/scenicgoods/goods/selectByAuditoriumId?auditoriumId=' + id,
+    url: '/goods/goods/selectById?id=' + id,
     method: 'get'
   })
 }

+ 184 - 0
src/views/finance/refundMr/dialog/details.vue

@@ -0,0 +1,184 @@
+<!--
+ * @Description: 详情弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 2023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\performMr\dialog\AddOrEditDialog.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    title="退款详情"
+    :visible.sync="open"
+    width="500px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog" v-if="form">
+      <el-row>
+        <el-col :span="24">
+          <div class="grid-content bg-purple item-class">退款单号: <span>{{ form.refundTransactionId }}</span></div>
+        </el-col>
+        <el-col :span="24">
+          <div class="grid-content bg-purple item-class">原订单号: <span>{{ form.orderId }}</span></div>
+        </el-col>
+        <el-col :span="24">
+          <div class="grid-content bg-purple item-class">支付单号: <span>{{ form.transactionId }}</span></div>
+        </el-col>
+        <el-col :span="24">
+          <div class="grid-content bg-purple item-class">退款金额: <span>¥{{ form.refundAmount }}</span></div>
+        </el-col>
+        <el-col :span="24">
+          <div class="grid-content bg-purple item-class">退款原因: <span>{{ form.refundReason }}</span></div>
+        </el-col>
+        <el-col :span="24">
+          <div class="grid-content bg-purple item-class">状态: <span>{{ statusList[form.status] }}</span></div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <span slot="footer" class="dialog-footer" v-if="!refund">
+      <el-button type="primary" @click="cancel">确定</el-button>
+    </span>
+
+    <span slot="footer" class="dialog-footer" v-if="refund">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        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>
+    </span>
+
+  </el-dialog>
+</template>
+
+<script>
+import { pageList, refundAudit } from '@/api/financeMr/refundMr'
+import Editor from "@/components/Editor";
+import { saveAndEdit } from '@/api/ticketMr/priceMr'
+export default {
+  name: "detailsDia",
+  components: {
+    Editor,
+  },
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      form: {
+        id: undefined,
+      },
+      performerVisible: false,
+      performerList: [],
+      refund: false,
+      statusList: {
+        0: '申请中',
+        1: '退款成功',
+        2: '退款失败',
+        3: '退款中',
+      }
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj, type) {
+      this.open = true;
+      this.form = obj;
+      if (type){
+        this.refund = true
+      } else {
+        this.refund = false
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$confirm('是否继续确定退款?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.refundAuditApi();
+      }).catch(() => {});
+    },
+    refundAuditApi() {
+      this.loading = true;
+      refundAudit({ refundId: this.form.id})
+        .then(response => {
+            this.$message.success("操作成功!");
+            this.$emit("getList");
+            this.cancel();
+            this.loading = false;
+          }
+        ).catch(() => {
+        this.loading = false;
+      });
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.open = false;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 30px;
+  max-height: 65vh;
+  overflow-y: auto;
+}
+.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;
+  }
+}
+</style>

+ 218 - 0
src/views/finance/refundMr/index.vue

@@ -0,0 +1,218 @@
+<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-input
+          v-model="queryParams.refundTransactionId"
+          placeholder="请输入退款单号"
+          clearable
+          style="width: 240px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <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="手机号码">
+        <el-input
+          v-model="queryParams.refundMobile"
+          placeholder="请输入手机号码"
+          clearable
+          style="width: 240px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="支付单号">
+        <el-input
+          v-model="queryParams.transactionId"
+          placeholder="请输入支付单号"
+          clearable
+          style="width: 240px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="退款状态">
+        <el-select
+          v-model="queryParams.status"
+          placeholder="退款状态"
+          clearable
+          style="width: 100%"
+        >
+          <el-option
+            v-for="dict in statusList"
+            :key="dict.id"
+            :label="dict.name"
+            :value="dict.id"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button 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>
+
+    <el-row :gutter="10" class="mb8">
+      <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="transactionId" />
+      <el-table-column label="退款金额" align="center" prop="type">
+        <template slot-scope="scope">
+          <span>¥{{ scope.row.refundAmount }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="申请原因" align="center" prop="refundReason" />
+      <el-table-column label="申请时间" align="center" prop="refundTime" width="160" >
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.refundTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="申请状态" align="center" prop="type">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.status == 0">申请中</el-tag>
+          <el-tag v-if="scope.row.status == 1" type="success">退款成功</el-tag>
+          <el-tag v-if="scope.row.status == 2" type="danger">退款失败</el-tag>
+          <el-tag v-if="scope.row.status == 3" type="info">退款中</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作人" align="center" prop="refundName" />
+      <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="openDetails(scope.row)"
+            v-hasPermi="['refundMr:refundMr:details']"
+          >详情</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            @click="openDetails(scope.row)"
+            v-hasPermi="['refundMr:refundMr:edit']"
+          >查看</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            v-if="scope.row.status == 0"
+            @click="openDetails(scope.row, 'refund')"
+            v-hasPermi="['refundMr:refundMr:delete']"
+          >退款</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 详情 -->
+    <details-dia ref="detailsDia" @getList="getList"></details-dia>
+
+  </div>
+</template>
+
+<script>
+
+import { pageList } from '@/api/financeMr/refundMr'
+import detailsDia from "./dialog/details.vue";
+
+export default {
+  name: "agreement",
+  dicts: ['agreement_type'],
+  components: { detailsDia },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      dataList: null,
+      // 弹出层标题
+      title: "",
+
+      // 是否显示弹出层
+      open: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      statusList: [
+        {id: 1, name: '申请中', value: 0},
+        {id: 2, name: '退款成功', value: 1},
+        {id: 3, name: '退款失败', value: 2},
+        {id: 4, name: '退款中', value: 3},
+      ],
+      visibleStatus: false,
+      newObj: {},
+      visibleType: ''
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询列表 */
+    getList() {
+      this.loading = true;
+      pageList(this.addDateRange(this.queryParams, this.dateRange))
+      .then(response => {
+          this.dataList = response.data.rows;
+          this.total = response.data.total;
+          this.loading = false;
+        }
+      );
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.queryParams.refundTransactionId = "";
+      this.queryParams.orderId = "";
+      this.queryParams.refundMobile = "";
+      this.queryParams.status = "";
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    /** 详情按钮操作 */
+    openDetails(row, type) {
+      this.$refs["detailsDia"].openDialog("详情", row, type);
+    },
+  }
+};
+</script>

+ 70 - 62
src/views/ticket/priceMr/dialog/addAndEdit.vue

@@ -18,24 +18,25 @@
   >
     <div class="dialog">
       <el-form :model="form" ref="form" :rules="rules" label-width="120px">
-        <el-form-item label="票务选择:" prop="venueId">
+        <el-form-item label="票务选择:" prop="goodsId">
           <el-select
-            v-model="form.venueId"
+            :disabled="isDisabled"
+            v-model="form.goodsId"
             placeholder="选择票务"
             clearable
-            @change="changeTheatre"
             style="width: 100%"
           >
             <el-option
-              v-for="dict in theatreList"
+              v-for="dict in ticketList"
               :key="dict.id"
-              :label="dict.name"
+              :label="dict.goodsName"
               :value="dict.id"
             />
           </el-select>
         </el-form-item>
         <el-form-item label="选择场馆:" prop="venueId">
           <el-select
+            :disabled="isDisabled"
             v-model="form.venueId"
             placeholder="选择场馆"
             clearable
@@ -52,6 +53,7 @@
         </el-form-item>
         <el-form-item label="选择演出厅:" prop="auditoriumId">
           <el-select
+            :disabled="isDisabled"
             v-model="form.auditoriumId"
             placeholder="选择演出厅"
             clearable
@@ -67,6 +69,7 @@
         </el-form-item>
         <el-form-item label="选择剧目:" prop="performId">
           <el-select
+            :disabled="isDisabled"
             v-model="form.performId"
             placeholder="选择剧目"
             clearable
@@ -80,41 +83,44 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="选择座位类型:" prop="performId">
+        <el-form-item label="选择座位类型:" prop="seatTypeId">
           <el-select
-            v-model="form.performId"
+            :disabled="isDisabled"
+            v-model="form.seatTypeId"
             placeholder="座位类型"
             clearable
             style="width: 100%"
           >
             <el-option
-              v-for="dict in goodsList"
+              v-for="dict in seatList"
               :key="dict.id"
               :label="dict.name"
               :value="dict.id"
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="结算方式:" prop="performDate">
-          <el-radio v-model="form.type" label="1">基于票务类型打折</el-radio>
-          <el-radio v-model="form.type" label="2">固定值</el-radio>
+        <el-form-item label="结算方式:" prop="priceType">
+          <el-radio :disabled="isDisabled" v-model="form.priceType" label="1">基于票务类型打折</el-radio>
+          <el-radio :disabled="isDisabled" v-model="form.priceType" label="2">固定值</el-radio>
         </el-form-item>
-        <el-form-item label="价格:">
+        <el-form-item label="价格:" prop="priceAmount">
           <el-input
-            v-model="form.name"
+            :disabled="isDisabled"
+            v-model.number="form.priceAmount"
             placeholder=""
             clearable
             style="width: 160px;"
           >
-            <template slot="append">{{ form.type == 1 ? '%' : '元' }}</template>
+            <template slot="append">{{ form.priceType == 1 ? '%' : '元' }}</template>
           </el-input>
         </el-form-item>
 
       </el-form>
     </div>
     <span slot="footer" class="dialog-footer">
-      <el-button @click="cancel">取消</el-button>
+      <el-button v-if="!isDisabled" @click="cancel">取消</el-button>
       <el-button
+        v-if="!isDisabled"
         type="primary"
         @click="submitForm"
         v-loading.fullscreen.lock="loading"
@@ -125,13 +131,16 @@
         <span v-if="loading">提交中...</span>
         <span v-else>保存</span>
       </el-button>
+      <el-button v-if="isDisabled" type="primary" @click="cancel">确定</el-button>
     </span>
   </el-dialog>
 </template>
 
 <script>
-import { saveAndEdit, addSave } from "@/api/schedulingMr/schedulingMr";
+import { saveAndEdit } from "@/api/ticketMr/priceMr";
+import { SeatTypeList } from '@/api/seatTypeMr/seatTypeMr'
 import { pageList } from "@/api/venueMr/venueMr";
+import { ticketPageList } from '@/api/ticketMr/ticketMr'
 import { goodsPageList } from '@/api/programmeMr/programmeMr'
 import { merchantPageList } from '@/api/performanceHallMr/performanceHallMr'
 import Editor from "@/components/Editor";
@@ -154,17 +163,19 @@ export default {
       open: false,
       loading: false,
       tableType: false,
+      isDisabled: false,
       form: {
         id: undefined,
-        timeList: [],
-        insertType: '1'
+        priceType: '1'
       },
       rules: {
         venueId: [{ required: true, message: "请选择场馆", trigger: "blur" }],
         auditoriumId: [{ required: true, message: "请选择演出厅", trigger: "blur" }],
         performId: [{ required: true, message: "请选择剧目", trigger: "blur" }],
-        performDate: [{ required: true, message: "请选择日期", trigger: "blur" }],
-        timeList: [{ required: true, message: "请添加场次", trigger: "blur" }],
+        goodsId: [{ required: true, message: "请选择票务", trigger: "blur" }],
+        seatTypeId: [{ required: true, message: "请选择座位类型", trigger: "blur" }],
+        priceType: [{ required: true, message: "请选择结算方式", trigger: "blur" }],
+        priceAmount: [{ required: true, message: "请输入价格", trigger: "blur" }],
       },
       uploadObj: {
         url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
@@ -174,6 +185,8 @@ export default {
       goodsList: [],
       merchantList: [],
       editType: false,
+      ticketList: [],
+      seatList: []
     };
   },
   methods: {
@@ -186,77 +199,86 @@ export default {
     openDialog(title, obj, type) {
       this.open = true;
       this.editType = false;
+      this.isDisabled = false
       this.getList();
       this.goodsPageList();
+      this.ticketListApi();
+      this.getSeatTypeList();
       // this.merchantPageList();
       if (obj){
-        this.title = "编辑票务价格";
-        this.form.insertType = '1';
         this.editType = true;
+        if(type) {
+          this.title = "票务价格";
+          this.isDisabled = true
+        } else {
+          this.title = "编辑票务价格";
+        }
         this.$nextTick(() => {
           this.$set(this.form, 'id', obj.id);
-          this.$set(this.form, 'performDate', obj.performDate);
+          this.$set(this.form, 'goodsId', obj.goodsId);
+          this.$set(this.form, 'seatTypeId', obj.seatTypeId);
           this.$set(this.form, 'performId', obj.performId);
           this.$set(this.form, 'auditoriumId', obj.auditoriumId);
-          this.$set(this.form, 'theatreName', obj.theatreName);
+          this.$set(this.form, 'priceType', obj.priceType.toString());
+          this.$set(this.form, 'priceAmount', obj.priceAmount);
           this.getList(obj.theatreName);
-          let map = {
-            name: obj.timeSnapshot,
-            performTimeStart: obj.performTimeStart,
-            performTimeEnd: obj.performTimeEnd,
-          }
-          this.form.timeList = []
-          this.$set(this.form.timeList, 0, map);
         });
       }else{
         this.title = "新增票务价格";
         this.form = {
             id: undefined,
-            timeList: []
+            priceType: '1'
         };
-        if(type){
-          this.form.insertType = '2';
-        } else {
-          this.form.insertType = '1';
-        }
         this.$nextTick(() => {
           this.$refs["form"].clearValidate();
         });
       }
     },
+    /** 座位类型列表 */
+    getSeatTypeList() {
+      SeatTypeList(this.addDateRange({pageNum: 1, pageSize: 100}))
+        .then(response => {
+            this.seatList = response.data.rows;
+        });
+    },
     /** 场馆列表查询 */
     getList(name) {
       pageList(this.addDateRange({pageNum: 1, pageSize: 100}))
         .then(response => {
             this.theatreList = response.data.rows;
-            if(name){
-              this.theatreList.forEach(item => {
+            this.theatreList.forEach(item => {
+              if(name == item.name){
                 this.$set(this.form, 'venueId', item.id)
-              })
-            }
+              }
+            })
             this.merchantPageList(this.form.venueId)
-          }
-        );
+        });
     },
     /** 场馆选择 */
     changeTheatre(id) {
       this.merchantPageList(id)
+      this.$set(this.form, 'auditoriumId', '')
     },
     /** 剧目列表查询 */
     goodsPageList() {
       goodsPageList(this.addDateRange({pageNum: 1, pageSize: 100}))
         .then(response => {
             this.goodsList = response.data.rows;
-          }
-        );
+        });
+    },
+    /** 票务列表查询 */
+    ticketListApi() {
+      ticketPageList(this.addDateRange({pageNum: 1, pageSize: 100,  goodsType: 2, classifyId: 1}))
+        .then(response => {
+            this.ticketList = response.data.rows;
+        });
     },
     /** 演出厅列表查询 */
     merchantPageList(id) {
       merchantPageList(this.addDateRange({theatreId: id, pageNum: 1, pageSize: 100}))
         .then(response => {
             this.merchantList = response.data.rows;
-          }
-        );
+        });
     },
 
     /**
@@ -268,22 +290,8 @@ export default {
       this.$refs["form"].validate(async (valid) => {
         if (valid) {
           try {
-            if(this.form.insertType == '2') {
-              this.form.performStartDate = this.form.performDate[0];
-              this.form.performEndDate = this.form.performDate[1];
-            }
-            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
-            }
             this.loading = true;
-            const { code } = this.form.insertType == '2' ? await addSave({ ...this.form }) : await saveAndEdit({ ...postEdit });
+            const { code } = await saveAndEdit({ ...this.form });
             if (code === 200) {
               this.$message.success("操作成功!");
               this.$emit("getList");

+ 20 - 10
src/views/ticket/priceMr/index.vue

@@ -32,24 +32,30 @@
 
     <el-table ref="tables" v-loading="loading" :data="dataList" border>
       <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
-      <el-table-column label="票务ID" align="center" prop="theatreName" />
-      <el-table-column label="票务名称" align="center" prop="auditoriumName" />
-      <el-table-column label="场馆名称" align="center" prop="performName" />
-      <el-table-column label="演出厅名称" align="center" prop="performName" />
+      <el-table-column label="票务ID" align="center" prop="goodsId" />
+      <el-table-column label="票务名称" align="center" prop="goodsName" />
+      <el-table-column label="场馆名称" align="center" prop="theatreName" />
+      <el-table-column label="演出厅名称" align="center" prop="auditoriumName" />
       <el-table-column label="剧目名称" align="center" prop="performName" />
-      <el-table-column label="座位类型" align="center" prop="performDate" />
+      <el-table-column label="座位类型" align="center" prop="seatTypeName" />
       <el-table-column label="销售价" align="center" prop="performTimeStart" width="160">
         <template slot-scope="scope">
-          <span>{{ scope.row.performTimeStart }}</span>
+          <span>{{ scope.row.priceAmount }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="添加时间" align="center" prop="performTimeEnd" width="160">
+      <el-table-column label="添加时间" align="center" prop="createTime" width="160">
         <template slot-scope="scope">
-          <span>{{ scope.row.performTimeEnd }}</span>
+          <span>{{ scope.row.createTime }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
         <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleSee(scope.row)"
+            v-hasPermi="['priceMr:priceMr:details']"
+          >详情</el-button>
           <el-button
             size="mini"
             type="text"
@@ -108,7 +114,7 @@
 
 <script>
 
-import { pageList, deleteById } from '@/api/schedulingMr/schedulingMr'
+import { pageList, deleteById } from '@/api/ticketMr/priceMr'
 import addAndEdit from "./dialog/addAndEdit.vue";
 
 export default {
@@ -201,6 +207,10 @@ export default {
     handleUpdate(row) {
       this.$refs["addAndEdit"].openDialog("修改数据", row);
     },
+    /** 详情按钮操作 */
+    handleSee(row) {
+      this.$refs["addAndEdit"].openDialog("修改数据", row, 'see');
+    },
 
     /** 删除按钮操作 */
     handleDelete(row) {

+ 100 - 241
src/views/ticket/ticketMr/dialog/addAndEdit.vue

@@ -21,23 +21,19 @@
         <el-tabs v-model="activeName">
           <!--    基础信息     -->
           <el-tab-pane label="基础信息" name="01">
-            <el-form-item label="票务名称:" prop="name" style="margin-top: 20px">
+            <el-form-item label="票务名称:" prop="goodsName" style="margin-top: 20px">
               <el-input
-                v-model="form.name"
+                v-model="form.goodsName"
                 placeholder="票务名称"
                 clearable
               />
             </el-form-item>
-            <el-form-item label="实名信息:" prop="sponsorId">
-              <el-radio v-model="form.type" label="1">全部观影人员均实名</el-radio>
+            <el-form-item label="实名信息:" prop="isAuth">
+              <el-radio v-model="form.isAuth" label="1">全部观影人员均实名</el-radio>
             </el-form-item>
-<!--            <el-form-item label="实名信息:" prop="status">-->
-<!--              <el-radio v-model="form.type" label="1">全部观影人员均实名</el-radio>-->
-<!--              <el-radio v-model="form.type" label="2">1位观影人员实名即可</el-radio>-->
-<!--            </el-form-item>-->
-            <el-form-item label="核销播报次数:" prop="name">
+            <el-form-item label="核销播报次数:" prop="verificationSpeaker">
               <el-input
-                v-model="form.name"
+                v-model="form.verificationSpeaker"
                 placeholder="核销播报次数"
                 clearable
                 style="width: 100%;"
@@ -45,56 +41,36 @@
                 <template slot="append">次</template>
               </el-input>
             </el-form-item>
-            <el-form-item label="票务说明:" prop="sponsorId">
+            <el-form-item label="票务说明:" prop="detail">
               <el-input
                 type="textarea"
                 :rows="2"
                 placeholder="请输入内容"
-                v-model="form.textarea">
+                v-model="form.detail">
               </el-input>
             </el-form-item>
           </el-tab-pane>
 
           <!--    销售信息     -->
           <el-tab-pane label="销售信息" name="02">
-<!--            <el-form-item label="原价:" label-width="100px" style="margin-top: 20px">-->
-<!--              <el-input-->
-<!--                v-model="form.name"-->
-<!--                placeholder="原价"-->
-<!--                clearable-->
-<!--                style="width: 100%;"-->
-<!--              >-->
-<!--                <template slot="append">元</template>-->
-<!--              </el-input>-->
-<!--            </el-form-item>-->
-            <el-form-item label="销售价:" label-width="100px">
+            <el-form-item label="销售价:" label-width="100px" prop="salePrice">
               <el-input
-                v-model="form.name"
-                placeholder="价"
+                v-model="form.salePrice"
+                placeholder="销售价"
                 clearable
                 style="width: 100%;"
               >
                 <template slot="append">元</template>
               </el-input>
             </el-form-item>
-            <el-form-item label="每日限售:" prop="status" label-width="100px">
-              <el-input
-                v-model="form.name"
-                placeholder="每日限售"
-                clearable
-                style="width: 100%;"
-              >
-                <template slot="append">元</template>
-              </el-input>
-            </el-form-item>
-            <el-form-item label="是否限购:" prop="status" label-width="100px" style="margin-bottom: 10px">
-              <el-radio v-model="form.type" label="1">是</el-radio>
-              <el-radio v-model="form.type" label="2">否</el-radio>
+            <el-form-item label="是否限购:" prop="buyAstrictType" label-width="100px" style="margin-bottom: 10px">
+              <el-radio v-model="form.buyAstrictType" label="1">是</el-radio>
+              <el-radio v-model="form.buyAstrictType" label="2">否</el-radio>
             </el-form-item>
-            <el-form-item label="" prop="status" label-width="100px">
+            <el-form-item label="" prop="buyAstrict" label-width="100px" v-if="form.buyAstrictType == 1">
               <span><span style="color: red">*</span>每个账号在每个场次限购</span>
               <el-input
-                v-model.number="form.name"
+                v-model.number="form.buyAstrict"
                 placeholder=""
                 clearable
                 style="width: 140px;margin-left: 5px"
@@ -102,87 +78,38 @@
                 <template slot="append">张</template>
               </el-input>
             </el-form-item>
-<!--            <el-form-item label="售票时间:" prop="status" label-width="100px">-->
-<!--              <el-radio v-model="form.ticketing" label="1">不限</el-radio>-->
-<!--              <el-radio v-model="form.ticketing" label="2">限制</el-radio>-->
-<!--            </el-form-item>-->
-<!--            <el-form-item label="限制时间段:" v-if="form.ticketing == 2" label-width="100px">-->
-<!--              <el-date-picker-->
-<!--                v-model="form.value1"-->
-<!--                type="datetimerange"-->
-<!--                value-format="yyyy-MM-dd  HH:mm:ss"-->
-<!--                range-separator="至"-->
-<!--                start-placeholder="开始日期"-->
-<!--                end-placeholder="结束日期">-->
-<!--              </el-date-picker>-->
-<!--            </el-form-item>-->
-            <el-form-item label="售票渠道:" prop="status" label-width="100px">
-              <el-checkbox v-model="form.xcx">小程序</el-checkbox>
-              <el-checkbox v-model="form.ck">窗口</el-checkbox>
+            <el-form-item label="售票渠道:" required label-width="100px">
+              <el-checkbox v-model="form.channelWx">小程序</el-checkbox>
+              <el-checkbox v-model="form.channelWindow">窗口</el-checkbox>
             </el-form-item>
           </el-tab-pane>
 
           <!--    退票信息     -->
           <el-tab-pane label="退票信息" name="03">
-            <el-form-item label="是否支持退票:" prop="status" label-width="120px">
-              <el-radio v-model="form.type" label="1">是</el-radio>
-              <el-radio v-model="form.type" label="2">否</el-radio>
+            <el-form-item label="是否支持退票:" prop="backStatus" label-width="120px">
+              <el-radio v-model="form.backStatus" label="0">是</el-radio>
+              <el-radio v-model="form.backStatus" label="1">否</el-radio>
             </el-form-item>
-            <el-form-item label="退票时间:" prop="status" label-width="120px" style="margin-bottom: 10px">
-              <el-radio v-model="form.type" label="1">按购买日期结算</el-radio>
+            <el-form-item v-if="form.backStatus == '0'" label="退票时间:" prop="backTime" label-width="120px" style="margin-bottom: 10px">
+              <el-radio v-model="form.backTime" label="1">按购买日期结算</el-radio>
             </el-form-item>
-            <el-form-item label="" prop="status" label-width="120px">
+            <el-form-item label="" v-if="form.backStatus == '0'" prop="days" label-width="120px">
               <span>提前</span>
               <el-input
-                v-model.number="form.name"
+                v-model.number="form.days"
                 placeholder=""
                 clearable
                 style="width: 140px;margin-left: 5px"
               />
               <span style="padding: 0 10px">天</span>
               <el-time-select
-                v-model="form.value"
-                :picker-options="{ start: '08:30', step: '00:15', end: '18:30'}"
+                v-model="form.hour"
+                :picker-options="{ start: '00:00', step: '00:01', end: '23:59'}"
                 placeholder="选择时间">
               </el-time-select>
               <span style="padding-left: 10px">可退</span>
             </el-form-item>
-<!--            <el-form-item label="是否支持退票:" prop="status" label-width="180px">-->
-<!--              <el-radio v-model="form.type" label="1">百分比</el-radio>-->
-<!--              <el-radio v-model="form.type" label="2">固定值</el-radio>-->
-<!--            </el-form-item>-->
-<!--            <el-form-item label="手续费类型与扣费规则:" prop="status" label-width="180px">-->
-<!--              <div>-->
-<!--                <div style="margin-bottom: 10px">-->
-<!--                  <span style="padding-right: 5px">演出开始前</span>-->
-<!--                  <el-input v-model="form.name" placeholder="票务名称" style="width: 120px" clearable />-->
-<!--                  <span style="padding-left: 5px">分钟以上,  </span>-->
-<!--                  <span style="padding-right: 5px">收取</span>-->
-<!--                  <el-input v-model="form.name" placeholder="票务名称" style="width: 120px" clearable />-->
-<!--                  <span style="padding-left: 5px">元</span>-->
-<!--                  <el-button style="padding-left: 15px" type="text">添加</el-button>-->
-<!--                </div>-->
-<!--              </div>-->
-<!--              <div>-->
-<!--                <span style="padding-right: 5px">演出开始前</span>-->
-<!--                <el-input v-model="form.name" placeholder="票务名称" style="width: 120px" clearable />-->
-<!--                <span style="padding-left: 5px">分钟以上,  </span>-->
-<!--                <span>不允许退票</span>-->
-<!--              </div>-->
-<!--            </el-form-item>-->
           </el-tab-pane>
-
-          <!--    选座信息     -->
-<!--          <el-tab-pane label="选座信息" name="04">-->
-<!--            <el-form-item label="是否支持选座:" prop="status">-->
-<!--              <el-radio v-model="form.type" label="1">是</el-radio>-->
-<!--              <el-radio v-model="form.type" label="2">否</el-radio>-->
-<!--            </el-form-item>-->
-<!--            <el-form-item label="选座渠道:" prop="status">-->
-<!--              <el-checkbox v-model="form.xcx">小程序</el-checkbox>-->
-<!--              <el-checkbox v-model="form.ck">窗口</el-checkbox>-->
-<!--            </el-form-item>-->
-<!--          </el-tab-pane>-->
         </el-tabs>
       </el-form>
     </div>
@@ -205,7 +132,7 @@
 
 <script>
 // import { updateNoticeMgr } from "@/api/system/noticeMgr";
-import { saveAndEdit, getSelectById } from '@/api/programmeMr/programmeMr'
+import { saveAndEdit, getSelectById } from '@/api/ticketMr/ticketMr'
 import { getToken } from "@/utils/auth";
 import { pageList } from '@/api/performMr/performMr'
 export default {
@@ -231,12 +158,21 @@ export default {
         id: undefined,
         type: "",
         content: "",
-        checkedCities: []
+        isAuth: '1',
+        backTime: '1',
+        goodsPerform: {}
       },
       rules: {
-        name: [{ required: true, message: "请输入剧目名称", trigger: "blur" }],
-        sponsorId: [{ required: true, message: "请选择主办方", trigger: "blur" }],
-        status: [{ required: true, message: "请选择是否启用状态", trigger: "blur" }]
+        goodsName: [{ required: true, message: "请输入票务名称", trigger: "blur" }],
+        verificationSpeaker: [{ required: true, message: "请输入核销播报次数", trigger: "blur" }],
+        detail: [{ required: true, message: "请输入票务说明", trigger: "blur" }],
+        salePrice: [{ required: true, message: "请输入销售价", trigger: "blur" }],
+
+        buyAstrictType: [{ required: true, message: "请选择是否限购", trigger: "blur" }],
+        buyAstrict: [{ required: true, message: "请输入每个账号在每个场次限购张数", trigger: "blur" }],
+
+        backStatus: [{ required: true, message: "请选择是否支持退票", trigger: "blur" }],
+        days: [{ required: true, message: "请输入日期", trigger: "blur" }],
       },
       uploadObj: {
         url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
@@ -288,6 +224,11 @@ export default {
         this.getSelectByIdApi(obj)
       }else{
         this.title = "添加票务管理";
+        this.form = {
+            isAuth: '1',
+            backTime: '1',
+            goodsPerform: {}
+        };
         this.$nextTick(() => {
           this.$refs["form"].clearValidate();
         });
@@ -300,6 +241,30 @@ export default {
         const obj = response.data;
         this.$nextTick(() => {
           this.$set(this.form, 'id', obj.id);
+          this.$set(this.form, 'goodsName', obj.goodsName);
+          this.$set(this.form, 'isAuth', '1');
+          this.$set(this.form, 'verificationSpeaker', obj.goodsPerform.verificationSpeaker);
+          this.$set(this.form, 'detail', obj.goodsPerform.detail);
+
+
+          this.$set(this.form, 'salePrice', obj.salePrice);
+          if(obj.goodsPerform.buyAstrict > -1){
+            this.$set(this.form, 'buyAstrictType', '1');
+            this.$set(this.form, 'buyAstrict', obj.goodsPerform.buyAstrict);
+          } else {
+            this.$set(this.form, 'buyAstrictType', '2');
+            this.$set(this.form, 'buyAstrict', '');
+          }
+          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, 'backTime', '1');
+          this.$set(this.form, 'backStatus', obj.goodsPerform.backStatus.toString());
+          if(obj.goodsPerform.backStatus == '0') {
+            this.$set(this.form, 'days', obj.performRefundRule.days);
+            this.$set(this.form, 'hour', obj.performRefundRule.hour);
+          }
         });
       });
     },
@@ -312,10 +277,37 @@ export default {
       this.$refs["form"].validate(async (valid) => {
         if (valid) {
           try {
+            let postMap = {
+              goodsPerform: {},
+              performRefundRule: {}
+            }
+            if(this.form.id){
+              postMap.id = this.form.id;
+            }
+            postMap.goodsName = this.form.goodsName;
+            postMap.isAuth = this.form.isAuth;
+            postMap.goodsPerform.verificationSpeaker = this.form.verificationSpeaker;
+            postMap.goodsPerform.detail = this.form.detail;
+
+
+            postMap.salePrice = this.form.salePrice;
+            postMap.goodsPerform.buyAstrict = this.form.buyAstrictType == '1' ? this.form.buyAstrict : '-1';
+            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;
+              postMap.performRefundRule.hour = this.form.hour;
+            }
+            postMap.goodsType = 2;
+            postMap.classifyId = 1;
+            postMap.classifyName = "门票类";
+
             this.loading = true;
-            const { code } = await saveAndEdit({ ...this.form });
+            const { code } = await saveAndEdit({ ...postMap });
             if (code === 200) {
-              this.$message.success("修改成功!");
+              this.$message.success("操作成功!");
               this.$emit("getList");
               this.cancel();
             }
@@ -326,16 +318,6 @@ export default {
         }
       });
     },
-    /**
-     * 演员信息添加
-     * @date 2023-11-22
-     * @returns {any}
-     */
-    performerEven() {
-      let target=[...this.performerList];
-      this.form.performerList = JSON.parse(JSON.stringify(target));
-      this.performerVisible = false;
-    },
     /**
      * 重置
      * @date 2023-11-22
@@ -354,129 +336,6 @@ export default {
       this.reset();
       this.open = false;
     },
-    /**
-     * 上传成功
-     * @date 2023-11-22
-     * @param {any} res
-     * @returns {any}
-     */
-    handleAvatarSuccess(res) {
-      if (res.code === 200) {
-        // this.form.mainImg = res?.data?.url;
-        this.$set(this.form, 'showImg', res?.data?.url)
-      }
-    },
-    /**
-     * 剧目海报上传成功
-     * @date 2023-11-22
-     * @param {any} res
-     * @returns {any}
-     */
-    handlePhotoListSuccess(res) {
-      if (res.code === 200) {
-        let photo = {
-          imageUrl: res?.data?.url,
-          photoType: '2'
-        }
-        if(!this.form.photoList){
-          this.form.photoList = []
-        }
-        this.form.photoList.push(photo);
-      }
-    },
-    handleRemove(file, fileList) {
-      fileList.forEach(item => {
-        if(item.response && item.response.data){
-          let res = item.response.data;
-          let photo = {
-            imageUrl: res?.data?.url,
-            photoType: '2'
-          }
-          if(!this.form.photoList){
-            this.form.photoList = []
-          }
-          this.form.photoList.push(photo);
-        }
-      })
-    },
-    /**
-     * 上传文件之前之前
-     * @date 2023-11-22
-     * @param {any} file
-     * @returns {any}
-     */
-    beforeAvatarUpload(file) {
-      const isJPG = file.type === "image/jpeg" || "image/png";
-      if (!isJPG) {
-        this.$message.error("上传头像图片只能是jpg或png格式!");
-      }
-      return isJPG;
-    },
-    /**
-     * 演员新增
-     * @date 2023-11-22
-     */
-    handleAdd() {
-      if(!this.performerList){
-        this.performerList = []
-      }
-      this.performerList.push({})
-    },
-    /**
-     * 演员删除
-     * @date 2023-11-22
-     */
-    handleDelete(row, index) {
-      this.$confirm('是否确认删当前数据?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.performerList.splice(index, 1);
-        this.$message({
-          type: 'success',
-          message: '删除成功!'
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    /**
-     * 演员弹窗打开
-     * @date 2023-11-22
-     */
-    performerOpen() {
-      if(!this.form.performerList){
-        this.form.performerList = []
-      }
-      let target=[...this.form.performerList];
-      this.performerList = JSON.parse(JSON.stringify(target));
-      this.performerVisible = true;
-    },
-    /**
-     * 演员图片上传成功
-     * @date 2023-11-22
-     * @param {any} res
-     * @returns {any}
-     */
-    handlePerformerAvatarSuccess(res) {
-      if (res.code === 200) {
-        // this.form.mainImg = res?.data?.url;
-        this.$set(this.performerList[this.performerIndex], 'performerHead', res?.data?.url);
-      }
-    },
-    /**
-     * 演员图片上传点击记录当前索引
-     * @date 2023-11-22
-     * @param {any} row
-     * @returns {any}
-     */
-    changeIndexEven(row) {
-      this.performerIndex = row.$index;
-    }
   },
 };
 </script>

+ 24 - 140
src/views/ticket/ticketMr/dialog/details.vue

@@ -9,110 +9,57 @@
 -->
 <template>
   <el-dialog
-    title="剧目信息"
+    title="票务详情"
     :visible.sync="open"
     width="700px"
     append-to-body
     :close-on-click-modal="false"
     @close="cancel"
   >
-    <div class="dialog">
+    <div class="dialog" v-if="form">
       <!--   基础信息   -->
       <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.name }}</span></div>
+          <div class="grid-content bg-purple item-class">票务名称: <span>{{ form.goodsName }}</span></div>
         </el-col>
         <el-col :span="12">
-          <div class="grid-content bg-purple item-class">主办方: <span>{{ form.sponsorName }}</span></div>
+          <div class="grid-content bg-purple item-class">实名信息: <span>全部观影人员均实名</span></div>
         </el-col>
-        <el-col :span="24">
-          <div class="grid-content bg-purple item-class">是否启用: <span>{{ form.status == 1 ? '启用' : '未启用' }}</span></div>
+        <el-col :span="12" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">核销播报次数: <span>{{ form.goodsPerform.verificationSpeaker + '次' || '' }}</span></div>
+        </el-col>
+        <el-col :span="12" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">票务说明: <span>{{ form.goodsPerform.detail || '' }}</span></div>
         </el-col>
       </el-row>
 
       <!--   演出信息   -->
-      <div class="title-class">演出信息</div>
+      <div class="title-class">销售信息</div>
       <el-row>
         <el-col :span="12">
-          <div class="grid-content bg-purple item-class">上映日期: <span>{{ form.releaseDate }}</span></div>
-        </el-col>
-        <el-col :span="12">
-          <div class="grid-content bg-purple item-class">演出时长: <span>{{ form.showDuration }}分钟</span></div>
+          <div class="grid-content bg-purple item-class">销售价: <span>{{ form.salePrice + '元' || '' }}</span></div>
         </el-col>
-        <el-col :span="12">
-          <div class="grid-content bg-purple item-class">演出人数: <span>{{ form.peopleNum }}人</span></div>
-        </el-col>
-        <el-col :span="12">
-          <div class="grid-content bg-purple item-class">演员信息: <el-button style="padding: 0" type="text" @click="performerOpen">查看</el-button></div>
-        </el-col>
-        <el-col :span="24">
+        <el-col :span="12" v-if="form.goodsPerform">
           <div class="grid-content bg-purple item-class">
-            <el-row>
-              <el-col :span="3">
-                <div>宣传图:</div>
-              </el-col>
-              <el-col :span="12">
-                <div v-if="form.showImg">
-                  <el-image
-                    style="width: 100px; height: 100px"
-                    :src="form.showImg"
-                    fit="cover"
-                  />
-                </div>
-                <div v-else>--</div>
-              </el-col>
-            </el-row>
+            是否限购:
+            <span>{{ form.goodsPerform.buyAstrict == -1 ? '不限制' : '限售数量' }}</span>
+            <span v-if="form.goodsPerform.buyAstrict > -1">每个账号在每个场次限购{{ form.goodsPerform.buyAstrict }}</span>
           </div>
         </el-col>
-        <el-col :span="24">
-          <div class="grid-content bg-purple item-class">
-            <el-row>
-              <el-col :span="3">
-                <div>剧目海报:</div>
-              </el-col>
-              <el-col :span="12">
-                <div v-if="form.photoList && form.photoList.length > 0">
-                  <el-image
-                    v-for="(item, index) in form.photoList"
-                    style="width: 100px; height: 100px; margin-right: 10px; margin-bottom: 10px;"
-                    :src="item.imageUrl"
-                    :key="index"
-                    fit="cover"
-                  />
-                </div>
-                <div v-else>--</div>
-              </el-col>
-            </el-row>
-          </div>
-        </el-col>
-        <el-col :span="24">
-          <div class="grid-content bg-purple item-class">
-            <el-row>
-              <el-col :span="3">
-                <div>剧情介绍:</div>
-              </el-col>
-              <el-col :span="12">
-                <div v-html="form.performSnapshot"></div>
-              </el-col>
-            </el-row>
-          </div>
+        <el-col :span="12" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">售票渠道: <span>{{ (form.goodsPerform.channelWx == 0 ? '小程序' : '') + ' ' + (form.goodsPerform.channelWindow == 0 ? '窗口' : '')}}</span></div>
         </el-col>
       </el-row>
 
       <!--   观影须知   -->
-      <div class="title-class" style="margin-top: 0">观影须知</div>
+      <div class="title-class">退票信息</div>
       <el-row>
-        <el-col :span="24">
-          <div class="grid-content bg-purple">
-            <el-row>
-              <el-col :span="3">
-                <div>观影须知:</div>
-              </el-col>
-              <el-col :span="12">
-                <div v-html="form.performNotice"></div>
-              </el-col>
-            </el-row>
+        <el-col :span="24" v-if="form.goodsPerform">
+          <div class="grid-content bg-purple item-class">
+            是否支持退票:
+            <span>{{ form.goodsPerform.backStatus == 1 ? '不可退' : '可退' }}</span>
+            <span v-if="form.goodsPerform.backStatus == 0">(按购买日期结算, 提前{{ form.performRefundRule.days }}天{{ form.performRefundRule.hour }}时可退)</span>
           </div>
         </el-col>
       </el-row>
@@ -123,61 +70,11 @@
       <el-button type="primary" @click="cancel">确定</el-button>
     </span>
 
-
-    <el-dialog
-      title="演员信息"
-      :visible.sync="performerVisible"
-      width="800px"
-      append-to-body
-      :destroy-on-close="true"
-      :close-on-click-modal="false"
-    >
-      <div>
-        <el-table ref="tables"  :data="performerList" border>
-          <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
-          <el-table-column label="姓名" align="center">
-            <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.performerName"
-                placeholder="姓名"
-                disabled
-                clearable
-              />
-            </template>
-          </el-table-column>
-          <el-table-column label="图片" align="center">
-            <template slot-scope="scope">
-              <div class="avatar" v-if="scope.row.performerHead">
-                <el-image
-                  style="width: 100px; height: 100px"
-                  :src="scope.row.performerHead"
-                  fit="cover"
-                />
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column label="角色名" align="center">
-            <template slot-scope="scope">
-              <el-input
-                disabled
-                v-model="scope.row.performerRole"
-                placeholder="角色名"
-                clearable
-              />
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="performerVisible = false">确 定</el-button>
-      </div>
-    </el-dialog>
   </el-dialog>
 </template>
 
 <script>
-import { getSelectById } from "@/api/programmeMr/programmeMr";
+import { getSelectById } from "@/api/ticketMr/ticketMr";
 import Editor from "@/components/Editor";
 export default {
   name: "detailsDia",
@@ -215,21 +112,8 @@ export default {
       const id = row.id
       getSelectById(id).then(response => {
         this.form = response.data;
-
       });
     },
-    /**
-     * 演员弹窗打开
-     * @date 2023-11-22
-     */
-    performerOpen() {
-      if(!this.form.performerList){
-        this.form.performerList = []
-      }
-      let target=[...this.form.performerList];
-      this.performerList = JSON.parse(JSON.stringify(target));
-      this.performerVisible = true;
-    },
     /**
      * 关闭弹框
      * @date 2023-11-22

+ 26 - 45
src/views/ticket/ticketMr/index.vue

@@ -1,18 +1,9 @@
 <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="票务名称">
         <el-input
-          v-model="queryParams.name"
+          v-model="queryParams.goodsName"
           placeholder="请输入票务名称"
           clearable
           style="width: 240px;"
@@ -41,25 +32,23 @@
 
     <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="票务ID" align="center" prop="id" />
       <el-table-column label="票务名称" align="center" prop="goodsName" />
-      <el-table-column label="价" align="center" prop="type">
+      <el-table-column label="销售价" align="center" prop="type">
         <template slot-scope="scope">
-          <span>¥{{ scope.row.costPrice }}</span>
+          <span>¥{{ scope.row.salePrice }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="销售价" align="center" prop="type">
+      <el-table-column label="是否限购" align="center" prop="type">
         <template slot-scope="scope">
-          <span>¥{{ scope.row.salePrice }}</span>
+          <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">
+        <template slot-scope="scope">
+          <span>{{ (scope.row.goodsPerform.channelWx == 0 ? '小程序' : '') + ' ' + (scope.row.goodsPerform.channelWindow == 0 ? '窗口' : '')}}</span>
         </template>
       </el-table-column>
-      <el-table-column label="库存" align="center" prop="quantity" />
-<!--      <el-table-column label="销售时间段" align="center" prop="name" />-->
-<!--      <el-table-column label="售票渠道" align="center" prop="type">-->
-<!--        <template slot-scope="scope">-->
-
-<!--        </template>-->
-<!--      </el-table-column>-->
       <el-table-column label="是否可退" align="center" prop="type">
         <template slot-scope="scope">
           <el-tag type="success" v-if="scope.row.goodsPerform.backStatus == 0">可退</el-tag>
@@ -130,7 +119,7 @@
 
 <script>
 
-import { pageList, deleteById } from '@/api/ticketMr/ticketMr'
+import { pageList, deleteById, updateStatus } from '@/api/ticketMr/ticketMr'
 import addAndEdit from "./dialog/addAndEdit.vue";
 import detailsDia from "./dialog/details.vue";
 
@@ -206,18 +195,10 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
-      this.queryParams.id = "";
-      this.queryParams.name = "";
-      this.queryParams.sponsorName = "";
+      this.queryParams.goodsName = "";
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.userId);
-      this.single = selection.length != 1;
-      this.multiple = !selection.length;
-    },
     /** 新增按钮操作 */
     handleAdd() {
       this.$refs["addAndEdit"].openDialog("新增数据", null);
@@ -230,22 +211,22 @@ export default {
     openDetails(row) {
       this.$refs["detailsDia"].openDialog("详情", row);
     },
-    /** 票务信息按钮操作 */
-    handleMr(row) {
-      this.$refs["programmeAddAndEdit"].openDialog("票务信息", row);
-    },
 
     /** 发布或者取消发布按钮操作 */
     ionlineApi(row) {
-      online({ id: row.id, status: !row.status ? 2 : 1 }).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          });
-          this.getList();
-        }
-      });
+      try {
+        updateStatus({ id: row.id, status: row.status ? 1 : 0 }).then((res) => {
+          if (res.code == 200) {
+            this.$message({
+              type: 'success',
+              message: '操作成功!'
+            });
+            // this.getList();
+          }
+        });
+      }catch (e) {
+        this.getList();
+      }
     },
 
     // 修改是否启用

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

@@ -246,11 +246,11 @@ export default {
       pageList(this.addDateRange({pageNum: 1, pageSize: 100}))
         .then(response => {
             this.theatreList = response.data.rows;
-            if(name){
-              this.theatreList.forEach(item => {
+            this.theatreList.forEach(item => {
+              if(name == item.name){
                 this.$set(this.form, 'venueId', item.id)
-              })
-            }
+              }
+            })
             this.merchantPageList(this.form.venueId)
           }
         );
@@ -264,16 +264,14 @@ export default {
       goodsPageList(this.addDateRange({pageNum: 1, pageSize: 100}))
         .then(response => {
             this.goodsList = response.data.rows;
-          }
-        );
+        });
     },
     /** 演出厅列表查询 */
     merchantPageList(id) {
       merchantPageList(this.addDateRange({theatreId: id, pageNum: 1, pageSize: 100}))
         .then(response => {
             this.merchantList = response.data.rows;
-          }
-        );
+        });
     },
 
     /**