MONSTER-ygh 1 tahun lalu
induk
melakukan
ee73a6bae0

+ 10 - 0
src/api/order/orderMr.js

@@ -27,3 +27,13 @@ export function downOrderListXls(params) {
     params
   });
 }
+
+
+// 打印
+export const printApi = (data) => {
+  return request({
+    url: '/order/orderInfo/ticketout',
+    method: 'post',
+    data: data
+  })
+}

+ 10 - 7
src/api/userMr/userMr.js

@@ -12,25 +12,28 @@ export const pageList = (query) => {
 // 取消认证状态
 export function updateAuthStatus(data) {
   return request({
-    url: '/member/memberInfo/updateAuthStatus?id=' + data.id,
-    method: 'get'
+    url: '/member/memberInfo/updateAuthStatus',
+    method: 'get',
+    params: data
   })
 }
 
 // 加入黑名单
 export function addBlackList(data) {
   return request({
-    url: '/member/memberInfo/addBlackList?id=' + data.id,
-    method: 'get'
+    url: '/member/memberInfo/blackList',
+    method: 'get',
+    params: data
   })
 }
 
 
 // ID获取详情
-export function getSelectById(id) {
+export function getSelectById(data) {
   return request({
-    url: '/merchant/merchantTheatre/selectById?id=' + id,
-    method: 'get'
+    url: '/member/memberInfo/detail',
+    method: 'get',
+    params: data
   })
 }
 

+ 21 - 0
src/api/windowTicketSales/ticketingCollection.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/order/orderInfo/getValidList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 打印
+export const printApi = (data) => {
+  return request({
+    url: '/order/orderInfo/ticketout',
+    method: 'post',
+    data: data
+  })
+}
+
+

+ 3 - 35
src/views/order/orderMr/dialog/details.vue

@@ -63,10 +63,10 @@
           <div class="grid-content bg-purple item-class">支付时间: <span>{{ form.payTime || '' }}</span></div>
         </el-col>
         <el-col :span="12">
-          <div class="grid-content bg-purple item-class">支付方式: <span>{{ payWayList[form.payWay] || '' }}</span></div>
+          <div class="grid-content bg-purple item-class" style="display: flex;">支付方式: <span style="display: block;margin-left: 5px;"><dict-tag :options="dict.type.pay_way_type" :value="form.payWay"/></span></div>
         </el-col>
         <el-col :span="12">
-          <div class="grid-content bg-purple item-class">订单状态: <span>{{ statusList[form.status] || '' }}</span></div>
+          <div class="grid-content bg-purple item-class" style="display: flex;">订单状态: <span style="display: block;margin-left: 5px;"><dict-tag :options="dict.type.order_status_type" :value="form.status"/></span></div>
         </el-col>
       </el-row>
 
@@ -104,7 +104,7 @@
 import { getSelectById } from '@/api/order/orderMr'
 export default {
   name: "detailsDia",
-  dicts: ['order_form_type'],
+  dicts: ['order_form_type','order_status_type','pay_way_type'],
   data() {
     return {
       title: "编辑",
@@ -117,38 +117,6 @@ export default {
       performerVisible: false,
       performerList: [],
       refund: false,
-      statusList: {
-        0: '待支付',
-        2: '超时取消',
-        3: '待使用',
-        4: '退款中',
-        5: '己退款',
-        6: '退款失败',
-        7: '己使用',
-        8: '己超期',
-        9: '关闭',
-      },
-      payList: {
-        0: '未支付',
-        1: '已支付',
-        2: '支付中',
-        3: '支付失败',
-        4: '支付退款',
-      },
-      payWayList: {
-        'cahsh': '现金',
-        'wecaht.applet': '微信小程序支付',
-        'alipay': '支付宝OTA',
-        'wecaht.h5': '微信公众号支付',
-        'meituan': '美团支付',
-      },
-      sourceList: {
-        1: '小程序',
-        2: '公众号',
-        3: '美团',
-        4: '携程',
-        5: '团购',
-      },
       dataList: []
     };
   },

+ 41 - 51
src/views/order/orderMr/index.vue

@@ -44,12 +44,12 @@
           clearable
           style="width: 100%"
         >
-          <el-option
-            v-for="dict in statusMapList"
-            :key="dict.value"
-            :label="dict.name"
-            :value="dict.value"
-          />
+            <el-option
+              v-for="dict in dict.type.order_status_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
         </el-select>
       </el-form-item>
       <el-form-item label="购票渠道">
@@ -148,7 +148,7 @@
       <el-table-column label="剧目名称" align="center" prop="performName" />
       <el-table-column label="票务名称" align="center" prop="goodsName" />
       <el-table-column label="票务类型" align="center" prop="seatTypeName" />
-      <el-table-column label="购票渠道" align="center" prop="type">
+      <el-table-column label="购票渠道" align="center" prop="source">
         <template slot-scope="scope">
           <!-- <span>{{ sourceList[scope.row.source] }}</span> -->
           <dict-tag :options="dict.type.order_form_type" :value="scope.row.source"/>
@@ -164,9 +164,9 @@
         </template>
       </el-table-column>
 <!--      <el-table-column label="优惠信息" align="center" prop="refundReason" />-->
-      <el-table-column label="支付方式" align="center" prop="type">
+      <el-table-column label="支付方式" align="center" prop="payWay">
         <template slot-scope="scope">
-          <span>{{ payWayList[scope.row.payWay] }}</span>
+          <dict-tag :options="dict.type.pay_way_type" :value="scope.row.payWay"/>
         </template>
       </el-table-column>
       
@@ -175,12 +175,12 @@
           <span>{{ parseTime(scope.row.payTime) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="订单状态" align="center" prop="type">
+      <el-table-column label="订单状态" align="center" prop="status">
         <template slot-scope="scope">
-          <span>{{statusList[scope.row.status]}}</span>
+          <dict-tag :options="dict.type.order_status_type" :value="scope.row.status"/>
         </template>
       </el-table-column>
-      <el-table-column label="已核销票数" align="center" prop="type">
+      <el-table-column label="已核销票数" align="center" prop="usedTotal">
         <template slot-scope="scope">
           <span>{{ scope.row.usedTotal }}</span>
         </template>
@@ -193,6 +193,12 @@
             @click="openDetails(scope.row)"
             v-hasPermi="['orderMr:orderMr:details']"
           >详情</el-button>
+          <el-button
+              size="mini"
+              type="text"
+              @click="print([scope.row])"
+              v-hasPermi="['orderMr:orderMr:print']"
+            >打印小票</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -213,13 +219,13 @@
 
 <script>
 
-import { pageList,downOrderListXls } from '@/api/order/orderMr'
-import detailsDia from "./dialog/details.vue";
+import { pageList,downOrderListXls, printApi } from '@/api/order/orderMr'
+import detailsDia from "./dialog/details";
 import { pagePerformTimeList } from "@/api/schedulingMr/schedulingMr"
 import { exportExcel } from '@/utils/exportexcel'
 export default {
   name: "agreement",
-  dicts: ['order_form_type'],
+  dicts: ['order_form_type','order_status_type','pay_way_type'],
   components: { detailsDia },
   data() {
     return {
@@ -249,42 +255,6 @@ export default {
         pageNum: 1,
         pageSize: 10,
       },
-      statusList: {
-        0: '待支付',
-        2: '超时取消',
-        3: '待使用',
-        4: '退款中',
-        5: '己退款',
-        6: '退款失败',
-        7: '己使用',
-        8: '己超期',
-        9: '关闭',
-      },
-      statusMapList: [
-        {id: 1, name: '待支付', value: 0},
-        {id: 2, name: '超时取消', value: 2},
-        {id: 3, name: '待使用', value: 3},
-        {id: 4, name: '退款中', value: 4},
-        {id: 5, name: '己退款', value: 5},
-        {id: 6, name: '退款失败', value: 6},
-        {id: 7, name: '己使用', value: 7},
-        {id: 8, name: '己超期', value: 8},
-        {id: 9, name: '关闭', value: 9},
-      ],
-      payList: {
-        0: '未支付',
-        1: '已支付',
-        2: '支付中',
-        3: '支付失败',
-        4: '支付退款',
-      },
-      payWayList: {
-        'cahsh': '现金',
-        'wecaht.applet': '微信小程序支付',
-        'alipay': '支付宝OTA',
-        'wecaht.h5': '微信公众号支付',
-        'meituan': '美团支付',
-      },
       visibleStatus: false,
       newObj: {},
       visibleType: '',
@@ -401,6 +371,26 @@ export default {
           this.$message.info('您已取消导出!');
         });
     },
+    // 打印 
+    async print(list = []){
+          if(!list||list.length==0) return
+          let idList = []
+          list.forEach((item,index)=>{
+            idList.push(item.id)
+          }) 
+          console.log("isList===",idList)
+          return
+          try {
+            let res = await printApi({viewerList:idList})
+            if(res.code == 200) {
+
+            }else {
+              throw new Error(res)
+            }
+          } catch (error) {
+            console.error("error=====",error)
+          }
+        },
   }
 };
 </script>

+ 1 - 1
src/views/otaMr/dialog/dataEdit.vue

@@ -160,7 +160,7 @@ export default {
           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, 'priceType', obj.priceType.toString());
+          this.$set(this.form, 'priceType', obj.priceType ? obj.priceType.toString():obj.priceType);
           this.$set(this.form, 'priceAmount', obj.priceAmount);
         });
       }else{

+ 13 - 0
src/views/ticket/ticketMr/dialog/addAndEdit.vue

@@ -31,6 +31,19 @@
             <el-form-item label="实名信息:" prop="isAuth">
               <el-radio v-model="form.isAuth" label="1">全部观影人员均实名</el-radio>
             </el-form-item>
+            <el-form-item label="停止售卖时间:" prop="beforeTime1">
+              <span style="margin-right: 5px">开演前</span>
+              <el-input
+                v-model="form.beforeTime1"
+                @change="changePriceAmount('beforeTime1')"
+                type="number"
+                placeholder="停止售卖时间"
+                clearable
+                style="width: 120px;"
+              >
+              </el-input>
+              <span style="margin-left: 5px">分钟内<i style="font-size: 12px;margin-left: 5px;">注:必须大于核销时间至少30秒</i></span>
+            </el-form-item>
             <el-form-item label="核销时间:" prop="beforeTime">
               <span style="margin-right: 5px">开演前</span>
               <el-input

+ 8 - 7
src/views/userMr/dialog/dataBox.vue

@@ -89,10 +89,10 @@ export default {
       this.type = type
       this.open = true;
       if (obj){
-        //this.getSelectByIdFun(obj)
-        this.$nextTick(() => {
-          this.form = Object.assign({},this.form,obj)
-        });
+        this.getSelectByIdFun(obj)
+        // this.$nextTick(() => {
+        //   this.form = Object.assign({},this.form,obj)
+        // });
       }else{
         this.$nextTick(() => {
           this.$refs["form"].clearValidate();
@@ -104,9 +104,10 @@ export default {
     async getSelectByIdFun(data) {
       try {
         this.loading = true
-        let res = await getSelectById(data.id)
-        if(res.code == 0){
-          this.form = Object.assign({},this.form,res.data)
+        let res = await getSelectById({id:data.id})
+        if(res.code == 200){
+          this.form = JSON.parse(JSON.stringify(res.data))
+          this.loading = false
         }else {
           throw new Error(res)
         }

+ 6 - 3
src/views/userMr/index.vue

@@ -101,9 +101,9 @@
             size="mini"
             type="text"
             v-hasPermi="['userMr:userMr:blacklist']"
-            v-if="scope.row.isBlackList == 0"
+            
             @click="addBlackListEven(scope.row)"
-          >加入黑名单</el-button>
+          >{{scope.row.isBlackList == 1?'取消黑名单':'加入黑名单'}}</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -230,7 +230,10 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        addBlackList({ id: row.id}).then((res) => {
+        addBlackList({ 
+          id: row.id,
+          type: row.isBlackList == 0 ? 1:2
+        }).then((res) => {
           if (res.code == 200) {
             this.$message({
               type: 'success',

+ 242 - 0
src/views/windowTicketSales/ticketingCollection.vue

@@ -0,0 +1,242 @@
+<template>
+    <div class="app-container">
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+        <el-form-item label="取票码" label-width="100px">
+          <el-input
+            v-model="queryParams.qrcodeNo"
+            placeholder="请输入取票码"
+            clearable
+            style="width: 240px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="手机号:" prop="mobile">
+          <el-input
+            v-model="queryParams.mobile"
+            placeholder="请输入手机号"
+            clearable
+            style="width: 240px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="身份证号:" label-width="120px" prop="idcard">
+          <el-input
+            v-model="queryParams.idcard"
+            placeholder="请输入身份证号"
+            clearable
+            style="width: 240px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="订单状态">
+          <el-select
+            v-model="queryParams.orderStatus"
+            placeholder="订单状态"
+            clearable
+            style="width: 100%"
+          >
+            <el-option
+              v-for="dict in dict.type.order_status_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </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">
+        <el-col :span="1.5">
+          <el-button
+                :disabled="multipleSelection.length == 0"
+                type="primary"
+                plain
+                icon="el-icon-plus"
+                size="mini"
+                @click="print(multipleSelection)"
+                v-hasPermi="['windowTicketSales:ticketingCollection:print']"
+              >批量打印名票</el-button>
+        </el-col>
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      </el-row>
+  
+      <el-table 
+      ref="tables" 
+      v-loading="loading" 
+      :data="dataList" 
+      
+      @selection-change="handleSelectionChange"
+      border>
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+        <el-table-column label="姓名" align="center" prop="name" />
+        <el-table-column label="身份证号" align="center" prop="qrcodeNo" />
+        <el-table-column label="取票码" align="center" prop="qrcodeNo" />
+        <el-table-column label="订单号" align="center" prop="orderId" />
+        <el-table-column label="剧目名称" align="center" prop="performName" />
+        <el-table-column label="票务名称" align="center" prop="goodsName" />
+        <el-table-column label="座位信息" align="center" prop="seatName" />
+        <el-table-column label="座位类型" align="center" prop="seatTypeName" />
+        <el-table-column label="节目播出日期" align="center" prop="performDate" />
+        <el-table-column label="下单时间" align="center" prop="createTime" />
+        <el-table-column label="购票渠道" align="center" prop="source">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.order_form_type" :value="scope.row.source"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="订单状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.order_status_type" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+        <el-table-column label="操作" align="center" fixed="right" width="80" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              @click="print([scope.row])"
+              v-hasPermi="['windowTicketSales:ticketingCollection:print']"
+            >打印门票</el-button>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+            <div>
+                <span>未查询到相关订单,请重新输入!</span>
+            </div>
+        </template>
+      </el-table>
+    </div>
+  </template>
+  
+  <script>
+  
+  import { pageList,printApi } from '@/api/windowTicketSales/ticketingCollection'
+  export default {
+    name: "distributionapplication",
+    dicts: ['order_form_type','order_status_type'],
+    data() {
+      return {
+        // 遮罩层
+        loading: false,
+        // 选中数组
+        multipleSelection: [],
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 用户表格数据
+        dataList: null,
+        // 查询参数
+        queryParams: {
+          // pageNum: 1,
+          // pageSize: 10,
+          // type: undefined
+          orderStatus: 3
+        },
+        visibleStatus: false,
+        visibleStatusLoading: false,
+        ruleForm: {},
+        rules: {
+          remark: [
+            { required: true, message: '请输入备注', trigger: ['blur','change'] },
+            { min: 0, max: 50, message: '长度在 0 到 50 个字符', trigger: ['blur','change'] }
+          ]
+        }
+      };
+    },
+    created() {
+      //this.getList();
+    },
+    methods: {
+      /** 查询列表 */
+      getList() {
+        this.loading = true;
+        pageList(this.queryParams,)
+        .then(response => {
+            this.dataList = response.data.list;
+            //this.total = response.data.total;
+            this.loading = false;
+          }
+        );
+      },
+      
+      // 取消按钮
+      cancel() {
+        this.open = false;
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.dateRange = [];
+        this.$set(this.queryParams, 'qrcodeNo', '');
+        this.$set(this.queryParams, 'idcard', '');
+        this.$set(this.queryParams, 'mobile', '');
+        this.$set(this.queryParams, 'orderStatus', '');
+        this.handleQuery();
+      },
+      setRemark(data) {
+        this.visibleStatus = true
+        this.resetForm.id = data.id
+      },
+      submitForm(formName) {
+          this.$refs[formName].validate(async (valid) => {
+            if (valid) {
+              try { 
+                this.visibleStatusLoading = true
+                let res = await setRemark({
+                  id: this.resetForm.id,
+                  "remark": this.ruleForm.remark
+                })
+                this.visibleStatus = false
+                this.visibleStatusLoading = false
+                this.resetForm('ruleForm')
+                this.queryParams.pageNum = 1;
+                this.getList()
+              } catch (error) {
+                this.visibleStatusLoading = false
+              }
+              
+            } else {
+              this.visibleStatusLoading = false
+              return false;
+            }
+          });
+        },
+        resetForm(formName) {
+          this.$refs[formName].resetFields();
+        },
+        handleSelectionChange(val) {
+          console.log("val====",val)
+          this.multipleSelection = val;
+        },
+        // 打印 
+        async print(list = []){
+          if(!list||list.length==0) return
+          let idList = []
+          list.forEach((item,index)=>{
+            idList.push(item.id)
+          }) 
+          console.log("isList===",idList)
+          return
+          try {
+            let res = await printApi({viewerList:idList})
+            if(res.code == 200) {
+
+            }else {
+              throw new Error(res)
+            }
+          } catch (error) {
+            console.error("error=====",error)
+          }
+        },
+    }
+  };
+  </script>
+  

+ 11 - 0
src/views/windowTicketSales/ticketingInquiry.vue

@@ -0,0 +1,11 @@
+<template>
+    <!--  票务查询  -->
+    <div>
+        票务查询
+    </div>
+</template>
+<script>
+    export default {
+        
+    }
+</script>

+ 11 - 0
src/views/windowTicketSales/ticketingSales.vue

@@ -0,0 +1,11 @@
+<template>
+    <!--  票务售票  -->
+    <div>
+        票务售票
+    </div>
+</template>
+<script>
+    export default {
+        
+    }
+</script>