feat(ticket): 迁移购票活动页面
This commit is contained in:
parent
54cf550b2a
commit
43996ed250
|
@ -0,0 +1,49 @@
|
|||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新零售门票活动-列表
|
||||
export function ticketList(params) {
|
||||
return request({
|
||||
url: '/activity/manage/ticket/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 新零售门票活动-新增
|
||||
export function ticketSave(data) {
|
||||
return request({
|
||||
url: '/activity/manage/ticket/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新零售门票活动-修改
|
||||
export function ticketUpdate(data) {
|
||||
return request({
|
||||
url: '/activity/manage/ticket/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新零售门票活动-删除
|
||||
export function delTicket(id) {
|
||||
return request({
|
||||
url: '/activity/manage/ticket/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 获取单条门票活动
|
||||
export function getOneTicket(id) {
|
||||
return request({
|
||||
url: '/activity/manage/ticket/getOne/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 会员消费赠送-查看
|
||||
export function memberConsumeRule(params) {
|
||||
return request({
|
||||
url: '/activity/manage/member-consume-rule/detail',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
import ParentView from '@/components/ParentView'
|
||||
export const tickets = [
|
||||
{
|
||||
path: 'ticket',
|
||||
name: 'Ticket',
|
||||
component: ParentView,
|
||||
children: [
|
||||
{
|
||||
path: 'ticketList',
|
||||
name: 'TicketList',
|
||||
component: () => import('@/views/marketing/ticket/index'),
|
||||
meta: { title: '门票活动' }
|
||||
},
|
||||
{
|
||||
path: 'addTicket',
|
||||
name: 'AddTicket',
|
||||
component: () => import('@/views/marketing/ticket/addTicket'),
|
||||
meta: { title: '基本信息' },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'ticketQuery',
|
||||
name: 'TicketQuery',
|
||||
component: ParentView,
|
||||
children: [
|
||||
{
|
||||
path: 'ticketQueryList',
|
||||
name: 'TickeQuerytList',
|
||||
component: () => import('@/views/marketing/ticketQueryList/index'),
|
||||
meta: { title: '自助购票' }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,409 @@
|
|||
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="topbox">
|
||||
<div
|
||||
v-for="(item, index) in topList"
|
||||
:key="index"
|
||||
class="levelList_i"
|
||||
:class="tabActive == item.id ? 'act' : ''"
|
||||
@click.prevent="handleLink(item.id)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="main_a"> -->
|
||||
<div class="main">
|
||||
<div v-show="tabActive == 0">
|
||||
<div class="tit">{{ '基本信息' }}</div>
|
||||
<div class="xian" />
|
||||
<el-form
|
||||
ref="ruleForm"
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
label-width="auto"
|
||||
class="demo-ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动名称'" prop="actName">
|
||||
<el-input
|
||||
v-model="ruleForm.actName"
|
||||
clearable
|
||||
:disabled="lookOver"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="16">
|
||||
<el-form-item :label="'活动说明'" prop="actExplain">
|
||||
<!-- <el-input clearable
|
||||
type="textarea"
|
||||
v-model="ruleForm.actExplain"
|
||||
:disabled="lookOver"></el-input> -->
|
||||
<editor
|
||||
ref="sptwEditor"
|
||||
v-model="ruleForm.actExplain"
|
||||
:read-only="lookOver"
|
||||
:min-height="196"
|
||||
:upload-url="uploadImgUrl"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动封面'" prop="actCover">
|
||||
<imageUpload v-model="ruleForm.actCover" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('门票金额')" required>
|
||||
<el-input
|
||||
v-model="ruleForm.payMoney"
|
||||
:disabled="lookOver"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('数量')" required>
|
||||
<el-input
|
||||
v-model="ruleForm.quantity"
|
||||
:disabled="lookOver"
|
||||
clearable
|
||||
type="number"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('限购数量')" required>
|
||||
<el-input
|
||||
v-model="ruleForm.limitQuantity"
|
||||
:disabled="lookOver"
|
||||
clearable
|
||||
type="number"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动时间'" prop="ruleFormTime">
|
||||
<el-date-picker
|
||||
v-model="ruleForm.ruleFormTime"
|
||||
:disabled="lookOver"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'展示时间'" prop="ruleFormTime1">
|
||||
<el-date-picker
|
||||
v-model="ruleForm.ruleFormTime1"
|
||||
:disabled="lookOver"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- <directUpdata v-show="tabActive==2"
|
||||
ref="directUpdata"></directUpdata> -->
|
||||
</div>
|
||||
<div v-show="controlType != 4" class="footer">
|
||||
<el-button size="small" class="cancelBtn" @click="cancel">
|
||||
{{ '取消' }}
|
||||
</el-button>
|
||||
<el-button size="small" class="sureBtn" @click="submit('ruleForm')">
|
||||
{{ '确认' }}
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Editor from '@/components/Editor'
|
||||
|
||||
import * as api from '@/api/ticket.js'
|
||||
import ImageUpload from '@/components/ImageUpload'
|
||||
// import directUpdata from '@/views/marketing/benefitsGift/directUpdata'
|
||||
export default {
|
||||
name: 'AddTicket',
|
||||
components: {
|
||||
ImageUpload,
|
||||
// directUpdata,
|
||||
Editor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabActive: 0,
|
||||
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
|
||||
ruleForm: {
|
||||
payMoney: '',
|
||||
quantity: '',
|
||||
limitQuantity: '',
|
||||
ruleFormTime: [],
|
||||
ruleFormTime1: []
|
||||
},
|
||||
rules: {
|
||||
actName: [
|
||||
{ required: true, message: this.$t('请输入活动名称'), trigger: 'blur' }
|
||||
],
|
||||
actExplain: [
|
||||
{ required: true, message: this.$t('请输入活动说明'), trigger: 'blur' }
|
||||
],
|
||||
actCover: [
|
||||
{ required: true, message: this.$t('请上传活动封面'), trigger: 'change' }
|
||||
],
|
||||
payMoney: [
|
||||
{ required: true, message: this.$t('请输入金额'), trigger: 'blur' }
|
||||
],
|
||||
quantity: [
|
||||
{ required: true, message: this.$t('请输入数量'), trigger: 'blur' },
|
||||
{ type: 'number', min: 1, max: 999999, message: this.$t('数量必须在1~999999之间'), trigger: 'blur' }
|
||||
],
|
||||
limitQuantity: [
|
||||
{ required: true, message: this.$t('请输入限购数量'), trigger: 'blur' },
|
||||
{ type: 'number', min: 1, max: 999999, message: this.$t('限购数量必须在1~999999之间'), trigger: 'blur' }
|
||||
],
|
||||
ruleFormTime: [
|
||||
{ required: true, message: this.$t('请输入活动时间'), trigger: 'change' }
|
||||
],
|
||||
ruleFormTime1: [
|
||||
{ required: true, message: this.$t('请输入展示时间'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
lookOver: false,
|
||||
pkId: '',
|
||||
controlType: '',
|
||||
addData: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
// (1=新增,2=修改,3=删除)4查看
|
||||
if (
|
||||
this.$route.query.controlType == 4 ||
|
||||
this.$route.query.controlType == 3
|
||||
) {
|
||||
this.lookOver = true
|
||||
} else {
|
||||
this.lookOver = false
|
||||
}
|
||||
this.controlType = this.$route.query.controlType
|
||||
this.pkId = this.$route.query.pkId || ''
|
||||
if (this.pkId) {
|
||||
this.getDetails()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
getDetails() {
|
||||
api.getOneTicket(this.pkId).then((res) => {
|
||||
this.addData = res.data
|
||||
this.$set(this.ruleForm, 'actName', res.data.actName)
|
||||
this.$set(this.ruleForm, 'actExplain', res.data.actExplain)
|
||||
this.$set(this.ruleForm, 'actCover', res.data.actCover)
|
||||
this.ruleForm.pkId = res.data.pkId
|
||||
this.ruleForm.actStartDate = res.data.actStartDate
|
||||
this.ruleForm.actEndDate = res.data.actEndDate
|
||||
this.ruleForm.disStartDate = res.data.disStartDate
|
||||
this.ruleForm.disEndDate = res.data.disEndDate
|
||||
this.ruleForm.payMoney = res.data.payMoney
|
||||
this.ruleForm.quantity = res.data.quantity
|
||||
this.ruleForm.limitQuantity = res.data.limitQuantity
|
||||
this.$set(this.ruleForm, 'ruleFormTime', [
|
||||
res.data.actStartDate,
|
||||
res.data.actEndDate
|
||||
])
|
||||
this.$set(this.ruleForm, 'ruleFormTime1', [
|
||||
res.data.disStartDate,
|
||||
res.data.disEndDate
|
||||
])
|
||||
// let that = this;
|
||||
// setTimeout(() => {
|
||||
// that.getCheck();
|
||||
// }, 50);
|
||||
})
|
||||
},
|
||||
// 切换tab
|
||||
handleLink(id) {
|
||||
this.tabActive = id
|
||||
},
|
||||
changeTime(val) {
|
||||
this.ruleForm.actStartDate = val[0]
|
||||
this.ruleForm.actEndDate = val[1]
|
||||
},
|
||||
changeTime1(val) {
|
||||
this.ruleForm.disStartDate = val[0]
|
||||
this.ruleForm.disEndDate = val[1]
|
||||
},
|
||||
|
||||
submit() {
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
let obj = {}
|
||||
obj = this.ruleForm
|
||||
if (this.controlType == 1) {
|
||||
api.ticketSave(obj).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
this.$router.push({
|
||||
path: 'TicketList'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
api.ticketUpdate(obj).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
this.$router.push({
|
||||
path: 'TicketList'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
padding: 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
|
||||
.main_a {
|
||||
height: calc(100vh - 144px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.main {
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
// height: calc(100vh - 124px);
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
height: 68px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px -3px 20px 0px rgba(204, 204, 204, 0.5);
|
||||
// margin: 0 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.thebtn1 {
|
||||
background: #3181e5;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
|
||||
.thebtn2 {
|
||||
background: #cccccc;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
padding: 0 20px;
|
||||
border-left: 5px solid #c8161d;
|
||||
margin: 20px 0 10px 0;
|
||||
}
|
||||
|
||||
.xian {
|
||||
height: 1px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.demo-ruleForm {
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
::v-deep .el-date-editor--datetimerange {
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
.flexed {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flexed_l {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.topbox {
|
||||
align-items: center;
|
||||
padding: 0px 0 5px 0;
|
||||
display: flex;
|
||||
// background: skyblue;
|
||||
.levelList_i {
|
||||
padding: 4px 15px;
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
min-width: 88px;
|
||||
// height: 28px;
|
||||
border-radius: 17px;
|
||||
border: 1px solid #cccccc;
|
||||
font-size: 12px;
|
||||
font-family: MicrosoftYaHei;
|
||||
text-align: center;
|
||||
// line-height: 28px;
|
||||
}
|
||||
|
||||
.act {
|
||||
color: #ffffff;
|
||||
background: #c8161d;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,341 @@
|
|||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2022-10-24 15:45:01
|
||||
-->
|
||||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="moren"
|
||||
/>
|
||||
<div class="main">
|
||||
<div class="form_all">
|
||||
<el-form ref="select" :model="select" label-width="auto">
|
||||
<el-row :gutter="40">
|
||||
<!-- 一层 -->
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动名称'">
|
||||
<el-input v-model="select.actName" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('活动时间')">
|
||||
<el-date-picker
|
||||
v-model="creationTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" size="small" @click="getDataList">
|
||||
{{ '搜索' }}</el-button>
|
||||
<el-button size="small" class="resetBtn" @click="reset">
|
||||
{{ '重置' }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main_a">
|
||||
<div class="mainbtn">
|
||||
<el-button
|
||||
v-hasButtons="['TourismActAdd']"
|
||||
size="small"
|
||||
class="addBtn"
|
||||
@click="openDig"
|
||||
>{{ '添加' }}</el-button>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="710px"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actName"
|
||||
width="150"
|
||||
:label="'活动名称'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actCover"
|
||||
:label="$t('活动封面')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<img
|
||||
style="width: 48px; height: 48px"
|
||||
:src="scope.row.actCover"
|
||||
alt=""
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="payMoney"
|
||||
width="120"
|
||||
:label="$t('门票金额')"
|
||||
/>
|
||||
|
||||
<el-table-column align="center" prop="quantity" :label="$t('数量')" width="120" />
|
||||
|
||||
<el-table-column align="center" prop="limitQuantity" :label="$t('限购数量')" width="120" />
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actStartDate"
|
||||
width="150"
|
||||
:label="$t('活动开始时间')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actEndDate"
|
||||
width="150"
|
||||
:label="$t('活动结束时间')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="disStartDate"
|
||||
width="150"
|
||||
:label="$t('活动显示开始时间')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="disEndDate"
|
||||
width="150"
|
||||
:label="$t('活动显示结束时间')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="time"
|
||||
:label="'操作'"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: #48b2fd"
|
||||
size="small"
|
||||
@click="toFixed(scope.row.pkId, 4)"
|
||||
>
|
||||
{{ '查看' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['TourismActUp']"
|
||||
type="text"
|
||||
style="color: #f3a900"
|
||||
size="small"
|
||||
@click="toFixed(scope.row.pkId, 2)"
|
||||
>
|
||||
{{ '修改' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['TourismActDel']"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #c8161d"
|
||||
@click="toFixed(scope.row.pkId, 3)"
|
||||
>
|
||||
{{ '删除' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from '@/components/topBar'
|
||||
import * as api from '@/api/ticket.js'
|
||||
export default {
|
||||
name: 'Bzpz',
|
||||
components: {
|
||||
topBar
|
||||
},
|
||||
filters: {
|
||||
isAgree(val) {
|
||||
if (!val) {
|
||||
return this.$t('ENU_POPUP_TYPE_1')
|
||||
} else {
|
||||
return this.$t('ENU_POPUP_TYPE_2')
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
creationTime: [],
|
||||
creationTime1: [],
|
||||
creationTime2: [],
|
||||
select: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
addOrEdit: '',
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
moren: 'ticketList',
|
||||
topList: [
|
||||
{
|
||||
name: '门票活动',
|
||||
path: 'ticketList'
|
||||
}
|
||||
],
|
||||
form: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 获取列表
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 重置
|
||||
reset() {
|
||||
this.select = {}
|
||||
this.creationTime = []
|
||||
this.creationTime1 = []
|
||||
this.creationTime2 = []
|
||||
this.getDataList()
|
||||
},
|
||||
|
||||
changeTime(val) {
|
||||
this.select.actStartDate = val ? val[0] : ''
|
||||
this.select.actEndDate = val ? val[1] : ''
|
||||
},
|
||||
// 点击修改
|
||||
toFixed(id, index) {
|
||||
if (index == 3) {
|
||||
this.$confirm('是否确认删除该活动?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
api.delTicket(id).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
this.getDataList()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: 'AddTicket',
|
||||
query: {
|
||||
pkId: id,
|
||||
controlType: index
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
openDig() {
|
||||
this.$router.push({
|
||||
path: 'AddTicket',
|
||||
query: {
|
||||
controlType: 1
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true
|
||||
api
|
||||
.ticketList(Object.assign({}, this.queryParams, this.select))
|
||||
.then((res) => {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
::v-deep .el-table .success-row {
|
||||
background: #ffffff;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.page {
|
||||
padding: 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.main {
|
||||
// background: #ffffff;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.main_a {
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
.mainbtn {
|
||||
padding: 0;
|
||||
}
|
||||
.maintable {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-date-editor.el-input,
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
.form_all {
|
||||
padding: 0 20px;
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,368 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="moren"
|
||||
/>
|
||||
<div class="main">
|
||||
<div class="form_all">
|
||||
<el-form ref="select" :model="select" label-width="auto">
|
||||
<el-row :gutter="40">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="会员编号">
|
||||
<el-input v-model="select.memberCode" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="会员姓名">
|
||||
<el-input v-model="select.memberName" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item label="活动名称">
|
||||
<el-input v-model="select.actName" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="订单编号">
|
||||
<el-input v-model="select.orderCode" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="select.buyName" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="select.phone" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="隶属体系">
|
||||
<el-select
|
||||
v-model="select.pkTeamListStr"
|
||||
multiple
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.pkId"
|
||||
:label="item.vertexName"
|
||||
:value="item.pkId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="隶属团队">
|
||||
<el-select
|
||||
v-model="select.pkTeamCodeListStr"
|
||||
multiple
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamNameList"
|
||||
:key="item.pkId"
|
||||
:label="`${item.vertexName}--${item.teamName} `"
|
||||
:value="item.pkId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" size="small" @click="getDataList">
|
||||
{{ '搜索' }}</el-button>
|
||||
<el-button size="small" class="resetBtn" @click="reset">
|
||||
{{ '重置' }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main_a">
|
||||
<div class="mainbtn">
|
||||
<el-button
|
||||
v-hasButtons="['TicketQueryExport']"
|
||||
size="small"
|
||||
class="addBtn"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="710px"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actName"
|
||||
width="150"
|
||||
:label="'活动名称'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actStartDate"
|
||||
width="150"
|
||||
:label="$t('门票开始日期')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actEndDate"
|
||||
width="150"
|
||||
:label="$t('门票结束日期')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="memberCode"
|
||||
:label="$t('会员编号')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="memberName"
|
||||
:label="$t('会员姓名')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="orderCode"
|
||||
:label="$t('订单编号')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="orderAmount"
|
||||
:label="$t('订单金额')"
|
||||
/>
|
||||
<el-table-column align="center" prop="price" :label="$t('单价')" />
|
||||
<!-- <el-table-column align="center" prop="quantity" :label="$t('数量')">
|
||||
</el-table-column> -->
|
||||
<el-table-column align="center" prop="buyName" :label="$t('姓名')" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="phone"
|
||||
width="150"
|
||||
:label="$t('手机号')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="idCard"
|
||||
width="150"
|
||||
:label="$t('身份证号')"
|
||||
/>
|
||||
<el-table-column align="center" prop="sexVal" :label="$t('性别')" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="clothSize"
|
||||
:label="$t('尺码')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="cohabitant"
|
||||
:label="$t('同住人')"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="emergencyPhone"
|
||||
width="150"
|
||||
:label="$t('紧急联系人')"
|
||||
/>
|
||||
<el-table-column align="center" prop="vertexName" label="隶属体系" />
|
||||
<el-table-column align="center" prop="teamName" label="隶属团队" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="creationTime"
|
||||
label="支付时间"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from '@/components/topBar'
|
||||
import * as api from '@/api/ticket.js'
|
||||
export default {
|
||||
name: 'Bzpz',
|
||||
components: {
|
||||
topBar
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
creationTime: [],
|
||||
creationTime1: [],
|
||||
creationTime2: [],
|
||||
select: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
addOrEdit: '',
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
moren: 'ticketQueryList',
|
||||
topList: [
|
||||
{
|
||||
name: '自助购票',
|
||||
path: 'ticketQueryList'
|
||||
}
|
||||
],
|
||||
form: {
|
||||
name: ''
|
||||
},
|
||||
actStatus: [],
|
||||
teamNameList: [],
|
||||
options: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 获取下拉
|
||||
this.getData()
|
||||
// 获取列表
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 重置
|
||||
reset() {
|
||||
this.select = {}
|
||||
this.creationTime = []
|
||||
this.creationTime1 = []
|
||||
this.creationTime2 = []
|
||||
this.getDataList()
|
||||
},
|
||||
getData() {
|
||||
api.vertexFindAll().then((res) => {
|
||||
this.options = res.data
|
||||
})
|
||||
api.listNoPage().then((res) => {
|
||||
this.teamNameList = res.rows
|
||||
})
|
||||
},
|
||||
changeTime(val) {
|
||||
this.select.actStartDate = val ? val[0] : ''
|
||||
this.select.actEndDate = val ? val[1] : ''
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.$refs['form'].clearValidate()
|
||||
this.$refs['form'].resetFields()
|
||||
},
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true
|
||||
api
|
||||
.ticketQuery(Object.assign({}, this.queryParams, this.select))
|
||||
.then((res) => {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.$confirm(this.$t('MN_F_T_407'), this.$t('MN_F_T_304'), {
|
||||
confirmButtonText: this.$t('w_0035'),
|
||||
cancelButtonText: this.$t('ENU_P_TYPE0'),
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
process.env.VUE_APP_BASE_API + '/sale/manage/ticket/export',
|
||||
Object.assign(
|
||||
{},
|
||||
{
|
||||
actType: 22
|
||||
},
|
||||
this.queryParams,
|
||||
this.select
|
||||
),
|
||||
`自助购票${new Date().getTime()}.xlsx`
|
||||
)
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
::v-deep .el-table .success-row {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.page {
|
||||
padding: 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
|
||||
.main {
|
||||
// background: #ffffff;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.main_a {
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
|
||||
.mainbtn {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.maintable {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-date-editor.el-input,
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form_all {
|
||||
padding: 0 20px;
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue