|
@@ -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>
|