卡券订单

This commit is contained in:
邱贞招 2025-03-21 15:00:45 +08:00
parent 2fe30722b2
commit c6b8afa633
6 changed files with 799 additions and 46 deletions

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询卡券订单列表
export function listCardOrder(query) {
return request({
url: '/system/cardOrder/list',
method: 'get',
params: query
})
}
// 查询卡券订单详细
export function getCardOrder(orderId) {
return request({
url: '/system/cardOrder/' + orderId,
method: 'get'
})
}
// 新增卡券订单
export function addCardOrder(data) {
return request({
url: '/system/cardOrder',
method: 'post',
data: data
})
}
// 修改卡券订单
export function updateCardOrder(data) {
return request({
url: '/system/cardOrder',
method: 'put',
data: data
})
}
// 删除卡券订单
export function delCardOrder(orderId) {
return request({
url: '/system/cardOrder/' + orderId,
method: 'delete'
})
}

View File

@ -191,7 +191,7 @@
<el-input v-model="form.name" placeholder="请输入卡券名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="类型" prop="type">
<el-radio-group v-model="form.type" @change="handleTypeChange">
<el-radio
@ -203,32 +203,27 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="form.type === '1'" label="折扣比例" prop="discountPercent">
<el-input-number v-model='form.discountPercent' :precision="2" :step="0.1" />%
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="form.type === '2'" label="抵扣金额" prop="discountAmount">
<el-input-number v-model='form.discountAmount' :precision="2" :step="0.1" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="form.type !== '3'" label="次数" prop="limitNum">
<el-input-number v-model='form.limitNum' :step="1" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="form.type !== '3'" label="零售价" prop="retailPrice">
<el-input-number v-model='form.retailPrice' :precision="2" :step="0.1" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="form.type !== '3'" label="原价" prop="originalPrice">
<el-input-number v-model='form.originalPrice' :precision="2" :step="0.1" />
<el-form-item v-if="form.type === '1'" label="储值金额" prop="retailPrice">
<el-input-number v-model='form.storedAmount' :precision="2" :step="0.1" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="form.type === '4'" label="次数" prop="limitNum">
<el-input-number v-model='form.limitNum' :step="1" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="form.type === '2'" label="充值小时" prop="hours">
<el-input-number v-model='form.hours' :min="1" :step="1" />小时
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item v-if="form.type !== '3'" label="有效期" prop="validityValue">
<el-input v-model="form.validityValue" placeholder="请输入有效期" type="number">
<template #append>
@ -244,7 +239,7 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<!-- 表单项 - 可用星期 -->
<el-form-item label="可用星期" prop="availableWeek">
<el-select v-model="form.availableWeek" multiple placeholder="请选择可用星期">
@ -257,7 +252,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="可用时间段" prop="availableTime">
<div class="time-range">
<el-time-picker
@ -280,13 +275,13 @@
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="描述" prop="descr">
<el-input v-model="form.descr" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="抖音sku_id" prop="skuId">
<el-form-item v-if="form.type === '3'" label="抖音sku_id" prop="skuId">
<el-input v-model="form.skuId" placeholder="请输入抖音sku_id" />
</el-form-item>
</el-col>
@ -333,9 +328,11 @@ export default {
{key: 'roomNames', visible: true, label: '可用房间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'name', visible: true, label: '名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'type', visible: true, label: '类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'discountPercent', visible: true, label: '折扣比例', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'discountAmount', visible: true, label: '抵扣金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'discountPercent', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'discountAmount', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'limitNum', visible: true, label: '使用次数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storedAmount', visible: true, label: '储值金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'hours', visible: true, label: '小时数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'descr', visible: true, label: '描述', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'retailPrice', visible: true, label: '零售价', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'validityValue', visible: true, label: '有效期', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},

View File

@ -0,0 +1,701 @@
<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="订单号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户ID" prop="userId">
<el-input
v-model="queryParams.userId"
placeholder="请输入用户ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户手机号" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入用户手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户名" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="真实姓名" prop="realName">
<el-input
v-model="queryParams.realName"
placeholder="请输入真实姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="支付时间" prop="payTime">
<el-date-picker clearable
v-model="queryParams.payTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择支付时间">
</el-date-picker>
</el-form-item>
<el-form-item label="支付状态:1-待支付2-支付中3-支付成功4-已取消" prop="paid">
<el-input
v-model="queryParams.paid"
placeholder="请输入支付状态:1-待支付2-支付中3-支付成功4-已取消"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="支付单id" prop="payId">
<el-input
v-model="queryParams.payId"
placeholder="请输入支付单id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="订单总金额" prop="totalFee">
<el-input
v-model="queryParams.totalFee"
placeholder="请输入订单总金额"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="实际支付金额" prop="payFee">
<el-input
v-model="queryParams.payFee"
placeholder="请输入实际支付金额"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="支付渠道id" prop="payChannel">
<el-input
v-model="queryParams.payChannel"
placeholder="请输入支付渠道id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="渠道名称" prop="channelName">
<el-input
v-model="queryParams.channelName"
placeholder="请输入渠道名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="渠道成本" prop="channelCost">
<el-input
v-model="queryParams.channelCost"
placeholder="请输入渠道成本"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="商户id(用于隔离)" prop="merchantId">
<el-input
v-model="queryParams.merchantId"
placeholder="请输入商户id(用于隔离)"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="店铺id" prop="storeId">
<el-input
v-model="queryParams.storeId"
placeholder="请输入店铺id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="店铺名称" prop="storeName">
<el-input
v-model="queryParams.storeName"
placeholder="请输入店铺名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="卡券名称" prop="cardName">
<el-input
v-model="queryParams.cardName"
placeholder="请输入卡券名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="限制次数0-无限制;其他数字直接显示次数" prop="limitNum">
<el-input
v-model="queryParams.limitNum"
placeholder="请输入限制次数0-无限制;其他数字直接显示次数"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="储值金额" prop="storedAmount">
<el-input
v-model="queryParams.storedAmount"
placeholder="请输入储值金额"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="有效期的值" prop="validityValue">
<el-input
v-model="queryParams.validityValue"
placeholder="请输入有效期的值"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="有效期单位day-天week-周month-月quarter-季度year-年" prop="validityUnit">
<el-input
v-model="queryParams.validityUnit"
placeholder="请输入有效期单位day-天week-周month-月quarter-季度year-年"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="可用的房间id" prop="availableRooms">
<el-input
v-model="queryParams.availableRooms"
placeholder="请输入可用的房间id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="可使用周: 1、2、3、4、5、6" prop="availableWeek">
<el-input
v-model="queryParams.availableWeek"
placeholder="请输入可使用周: 1、2、3、4、5、6"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="可用时间结束" prop="availableTimeEnd">
<el-date-picker clearable
v-model="queryParams.availableTimeEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择可用时间结束">
</el-date-picker>
</el-form-item>
<el-form-item label="可用时间开始" prop="availableTimeStart">
<el-date-picker clearable
v-model="queryParams.availableTimeStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择可用时间开始">
</el-date-picker>
</el-form-item>
<el-form-item label="抖音sKuid" prop="skuId">
<el-input
v-model="queryParams.skuId"
placeholder="请输入抖音sKuid"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="小时" prop="hours">
<el-input
v-model="queryParams.hours"
placeholder="请输入小时"
clearable
@keyup.enter.native="handleQuery"
/>
</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
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:cardOrder:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:cardOrder:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:cardOrder:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:cardOrder:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="cardOrderList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
<el-table-column type="selection" width="55" align="center" />
<template v-for="column of showColumns">
<el-table-column
:key="column.key"
:label="column.label"
:prop="column.key"
:align="column.align"
:min-width="column.minWidth"
:sort-orders="orderSorts"
:sortable="column.sortable"
:show-overflow-tooltip="column.overflow"
:width="column.width"
>
<template slot-scope="d">
<template v-if="column.key === 'orderId'">
{{d.row[column.key]}}
</template>
<template v-else>
{{d.row[column.key]}}
</template>
</template>
</el-table-column>
</template>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:cardOrder:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:cardOrder:remove']"
>删除</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"
/>
<!-- 添加或修改卡券订单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
</el-form-item>
<el-form-item label="用户ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入用户ID" />
</el-form-item>
<el-form-item label="用户手机号" prop="phone">
<el-input v-model="form.phone" placeholder="请输入用户手机号" />
</el-form-item>
<el-form-item label="用户名" prop="userName">
<el-input v-model="form.userName" placeholder="请输入用户名" />
</el-form-item>
<el-form-item label="真实姓名" prop="realName">
<el-input v-model="form.realName" placeholder="请输入真实姓名" />
</el-form-item>
<el-form-item label="支付时间" prop="payTime">
<el-date-picker clearable
v-model="form.payTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择支付时间">
</el-date-picker>
</el-form-item>
<el-form-item label="支付状态:1-待支付2-支付中3-支付成功4-已取消" prop="paid">
<el-input v-model="form.paid" placeholder="请输入支付状态:1-待支付2-支付中3-支付成功4-已取消" />
</el-form-item>
<el-form-item label="支付单id" prop="payId">
<el-input v-model="form.payId" placeholder="请输入支付单id" />
</el-form-item>
<el-form-item label="订单总金额" prop="totalFee">
<el-input v-model="form.totalFee" placeholder="请输入订单总金额" />
</el-form-item>
<el-form-item label="实际支付金额" prop="payFee">
<el-input v-model="form.payFee" placeholder="请输入实际支付金额" />
</el-form-item>
<el-form-item label="备注" prop="mark">
<el-input v-model="form.mark" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="支付渠道id" prop="payChannel">
<el-input v-model="form.payChannel" placeholder="请输入支付渠道id" />
</el-form-item>
<el-form-item label="渠道名称" prop="channelName">
<el-input v-model="form.channelName" placeholder="请输入渠道名称" />
</el-form-item>
<el-form-item label="渠道成本" prop="channelCost">
<el-input v-model="form.channelCost" placeholder="请输入渠道成本" />
</el-form-item>
<el-form-item label="商户id(用于隔离)" prop="merchantId">
<el-input v-model="form.merchantId" placeholder="请输入商户id(用于隔离)" />
</el-form-item>
<el-form-item label="店铺id" prop="storeId">
<el-input v-model="form.storeId" placeholder="请输入店铺id" />
</el-form-item>
<el-form-item label="店铺名称" prop="storeName">
<el-input v-model="form.storeName" placeholder="请输入店铺名称" />
</el-form-item>
<el-form-item label="卡券名称" prop="cardName">
<el-input v-model="form.cardName" placeholder="请输入卡券名称" />
</el-form-item>
<el-form-item label="限制次数0-无限制;其他数字直接显示次数" prop="limitNum">
<el-input v-model="form.limitNum" placeholder="请输入限制次数0-无限制;其他数字直接显示次数" />
</el-form-item>
<el-form-item label="储值金额" prop="storedAmount">
<el-input v-model="form.storedAmount" placeholder="请输入储值金额" />
</el-form-item>
<el-form-item label="有效期的值" prop="validityValue">
<el-input v-model="form.validityValue" placeholder="请输入有效期的值" />
</el-form-item>
<el-form-item label="有效期单位day-天week-周month-月quarter-季度year-年" prop="validityUnit">
<el-input v-model="form.validityUnit" placeholder="请输入有效期单位day-天week-周month-月quarter-季度year-年" />
</el-form-item>
<el-form-item label="可用的房间id" prop="availableRooms">
<el-input v-model="form.availableRooms" placeholder="请输入可用的房间id" />
</el-form-item>
<el-form-item label="可使用周: 1、2、3、4、5、6" prop="availableWeek">
<el-input v-model="form.availableWeek" placeholder="请输入可使用周: 1、2、3、4、5、6" />
</el-form-item>
<el-form-item label="可用时间结束" prop="availableTimeEnd">
<el-date-picker clearable
v-model="form.availableTimeEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择可用时间结束">
</el-date-picker>
</el-form-item>
<el-form-item label="可用时间开始" prop="availableTimeStart">
<el-date-picker clearable
v-model="form.availableTimeStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择可用时间开始">
</el-date-picker>
</el-form-item>
<el-form-item label="抖音sKuid" prop="skuId">
<el-input v-model="form.skuId" placeholder="请输入抖音sKuid" />
</el-form-item>
<el-form-item label="小时" prop="hours">
<el-input v-model="form.hours" placeholder="请输入小时" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listCardOrder, getCardOrder, delCardOrder, addCardOrder, updateCardOrder } from "@/api/system/cardOrder";
import { $showColumns } from '@/utils/mixins';
//
const defaultSort = {
prop: "createTime",
order: "descending"
}
export default {
name: "CardOrder",
mixins: [$showColumns],
data() {
return {
//
columns: [
{key: 'orderId', visible: true, label: '订单id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'orderNo', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userId', visible: true, label: '用户ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'phone', visible: true, label: '用户手机号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userName', visible: true, label: '用户名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'realName', visible: true, label: '真实姓名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payTime', visible: true, label: '支付时间', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'payType', visible: true, label: '支付方式wx-微信alipay-支付宝,sys-系统自动(免费骑行)', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'paid', visible: true, label: '支付状态:1-待支付2-支付中3-支付成功4-已取消', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payId', visible: true, label: '支付单id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'type', visible: true, label: '订单类型1-茶室订单;2-棋牌订单;3-台球订单;4-货柜订单', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'totalFee', visible: true, label: '订单总金额(元)', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payFee', visible: true, label: '实际支付金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'mark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'status', visible: true, label: '状态0-待支付1-支付中、2-待使用、3-使用中、4-已完成、5-超时自动取消、6-用户取消、7-退款中、8-已退款、9-用户结束订单', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payChannel', visible: true, label: '支付渠道id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'channelName', visible: true, label: '渠道名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'channelCost', visible: true, label: '渠道成本', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'merchantId', visible: true, label: '商户id(用于隔离)', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storeId', visible: true, label: '店铺id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storeName', visible: true, label: '店铺名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'cardName', visible: true, label: '卡券名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'limitNum', visible: true, label: '限制次数0-无限制;其他数字直接显示次数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storedAmount', visible: true, label: '储值金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'validityValue', visible: true, label: '有效期的值', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'validityUnit', visible: true, label: '有效期单位day-天week-周month-月quarter-季度year-年', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'availableRooms', visible: true, label: '可用的房间id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'availableWeek', visible: true, label: '可使用周: 1、2、3、4、5、6', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'availableTimeEnd', visible: true, label: '可用时间结束', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'availableTimeStart', visible: true, label: '可用时间开始', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'skuId', visible: true, label: '抖音sKuid', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'hours', visible: true, label: '小时', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
],
//
orderSorts: ['ascending', 'descending', null],
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
cardOrderList: [],
//
title: "",
//
open: false,
defaultSort,
//
queryParams: {
pageNum: 1,
pageSize: 20,
orderByColumn: defaultSort.prop,
isAsc: defaultSort.order,
orderNo: null,
userId: null,
phone: null,
userName: null,
realName: null,
payTime: null,
payType: null,
paid: null,
payId: null,
type: null,
totalFee: null,
payFee: null,
mark: null,
status: null,
payChannel: null,
channelName: null,
channelCost: null,
merchantId: null,
storeId: null,
storeName: null,
cardName: null,
limitNum: null,
storedAmount: null,
validityValue: null,
validityUnit: null,
availableRooms: null,
availableWeek: null,
availableTimeEnd: null,
availableTimeStart: null,
skuId: null,
hours: null
},
//
form: {},
//
rules: {
orderNo: [
{ required: true, message: "订单号不能为空", trigger: "blur" }
],
userId: [
{ required: true, message: "用户ID不能为空", trigger: "blur" }
],
paid: [
{ required: true, message: "支付状态:1-待支付2-支付中3-支付成功4-已取消不能为空", trigger: "blur" }
],
type: [
{ required: true, message: "订单类型1-茶室订单;2-棋牌订单;3-台球订单;4-货柜订单不能为空", trigger: "change" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 当排序按钮被点击时触发 **/
onSortChange(column) {
if (column.order == null) {
this.queryParams.orderByColumn = defaultSort.prop;
this.queryParams.isAsc = defaultSort.order;
} else {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
}
this.getList();
},
/** 查询卡券订单列表 */
getList() {
this.loading = true;
listCardOrder(this.queryParams).then(response => {
this.cardOrderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
orderId: null,
orderNo: null,
userId: null,
phone: null,
userName: null,
realName: null,
payTime: null,
payType: null,
paid: null,
payId: null,
type: null,
totalFee: null,
payFee: null,
mark: null,
status: null,
createTime: null,
payChannel: null,
channelName: null,
channelCost: null,
merchantId: null,
storeId: null,
storeName: null,
cardName: null,
limitNum: null,
storedAmount: null,
validityValue: null,
validityUnit: null,
availableRooms: null,
availableWeek: null,
availableTimeEnd: null,
availableTimeStart: null,
skuId: null,
hours: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加卡券订单";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const orderId = row.orderId || this.ids
getCardOrder(orderId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改卡券订单";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.orderId != null) {
updateCardOrder(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCardOrder(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const orderIds = row.orderId || this.ids;
this.$modal.confirm('是否确认删除卡券订单编号为"' + orderIds + '"的数据项?').then(function() {
return delCardOrder(orderIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/cardOrder/export', {
...this.queryParams
}, `cardOrder_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -101,7 +101,12 @@
{{d.row[column.key]}}
</template>
<template v-else-if="column.key === 'payTime'">
<span>{{ parseTime(d.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<div>
创建时间<span>{{ parseTime(d.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span><br>
支付时间<span>{{ parseTime(d.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span><br>
预约开始<span>{{ parseTime(d.row.reserveStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span><br>
预约结束<span>{{ parseTime(d.row.reserveEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</div>
</template>
<template v-else-if="column.key === 'merchantName' || column.key === 'userName'">
<el-link
@ -314,7 +319,7 @@ export default {
{key: 'storeName', visible: true, label: '店铺', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'roomName', visible: true, label: '房间/设施', minWidth: null, sortable: true, overflow: false, align: 'center', width: 100},
{key: 'picture', visible: true, label: '图片', minWidth: null, sortable: true, overflow: false, align: 'center', width: 100},
{key: 'payTime', visible: true, label: '支付时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payTime', visible: true, label: '时间', minWidth: null, sortable: true, overflow: false, align: 'left', width: 200},
{key: 'payType', visible: true, label: '支付方式', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'payId', visible: true, label: 'id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'paid', visible: true, label: '支付状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},

View File

@ -87,23 +87,28 @@
<!-- 添加保洁设置 -->
<el-row>
<group-title title="保洁设置"/>
<form-col :span="8" label="保洁时长" label-width="12em" prop="cleanDuration">
<el-input
v-model.number="form.cleanDuration"
type="number"
:min="1"
placeholder="保洁时长">
<template #append>分钟</template>
</el-input>
</form-col>
<form-col :span="10" label="保洁通知" label-width="12em" prop="cleanNotice">
<el-radio-group v-model="form.cleanNotice">
<el-radio
v-for="dict in dict.type.ss_clean_notice"
:key="dict.value"
:label="dict.value">{{dict.label}}</el-radio>
</el-radio-group>
<form-col :span="8" label="保洁开关" label-width="12em" prop="cleanSwitch">
<el-switch v-model="form.cleanSwitch" active-text="" inactive-text=""/>
</form-col>
<div v-if="form.cleanSwitch">
<form-col :span="8" label="保洁时长" label-width="12em" prop="cleanDuration">
<el-input
v-model.number="form.cleanDuration"
type="number"
:min="1"
placeholder="保洁时长">
<template #append>分钟</template>
</el-input>
</form-col>
<form-col :span="10" label="保洁通知" label-width="12em" prop="cleanNotice">
<el-radio-group v-model="form.cleanNotice">
<el-radio
v-for="dict in dict.type.ss_clean_notice"
:key="dict.value"
:label="dict.value">{{dict.label}}</el-radio>
</el-radio-group>
</form-col>
</div>
<!-- 多店权限 -->
<form-col :span="6" label="多店权限" label-width="12em" prop="multiStore">
@ -213,6 +218,7 @@ export default {
penalty: 0,
beforeTime: 0,
cleanDuration: 0,
cleanSwitch: true,
reminder: 10,
cleanNotice: '',
channelIds: [],

View File

@ -32,10 +32,10 @@
<div>用户详情</div>
</el-row>
<el-row type="flex" justify="end" >
<el-button v-if="detail.userType === '01'" type="text" icon="el-icon-plus" size="mini" @click="handleAddAccount"
v-hasPermi="['system:smUser:edit']">加账</el-button>
<el-button v-if="detail.userType === '01' || detail.userType === '05'" type="text" icon="el-icon-minus" size="mini" @click="handleReduceAccount"
v-hasPermi="['system:smUser:edit']">减账</el-button>
<!-- <el-button v-if="detail.userType === '01'" type="text" icon="el-icon-plus" size="mini" @click="handleAddAccount"-->
<!-- v-hasPermi="['system:smUser:edit']">加账</el-button>-->
<!-- <el-button v-if="detail.userType === '01' || detail.userType === '05'" type="text" icon="el-icon-minus" size="mini" @click="handleReduceAccount"-->
<!-- v-hasPermi="['system:smUser:edit']">减账</el-button>-->
<el-button v-if="detail.userType !== '00'" type="text" icon="el-icon-setting" size="mini" @click="handleUpdateRisk"
v-hasPermi="['system:smUser:edit']">配置</el-button>
</el-row>