|
|
|
|
@ -55,7 +55,7 @@
|
|
|
|
|
</el-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 选择预约时段设置 -->
|
|
|
|
|
<el-dialog title="预约时段" :visible.sync="showRules" width="60%">
|
|
|
|
|
<el-form :model="currentVisit" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
|
|
|
|
|
@ -71,14 +71,14 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="2">
|
|
|
|
|
<el-form-item label="特殊时段" prop="special">
|
|
|
|
|
<el-select v-model="specialVisitid" @change="changeSpecialVisit" placeholder="请选择特殊时段" style="width:100%">
|
|
|
|
|
<el-option v-for="item in specialVisitList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="2">
|
|
|
|
|
<el-form-item label="特殊时段" prop="special">
|
|
|
|
|
<el-select v-model="specialVisitid" @change="changeSpecialVisit" placeholder="请选择特殊时段" style="width:100%">
|
|
|
|
|
<el-option v-for="item in specialVisitList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-table :data="visitInfo" height="400" class="v-table" style="width: 100%;margin-bottom: 20px;">
|
|
|
|
|
@ -130,72 +130,72 @@
|
|
|
|
|
<el-form-item label="活动名称" prop="name">
|
|
|
|
|
<el-input v-model="form.name" placeholder="请填写活动名称" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
|
<el-form-item label="预定截止" prop="end_plan">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="form.end_plan" type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择预定截止时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="活动时间" prop="dateRange">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="dateRange" type="datetimerange"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="活动开始日期"
|
|
|
|
|
end-placeholder="活动结束日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<div class="table-tree tableswidth">
|
|
|
|
|
<div style="display: flex;justify-content: space-between;margin-right: 20px;margin-bottom: 10px;">
|
|
|
|
|
<div style="font-size: 18px;color: #303133;">活动场次</div>
|
|
|
|
|
<Button type="primary" @click="addRow()" size="small" style="margin-left: 10px;" ghost>新增</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="form.numbers_list" height="200" class="v-table" style="width: 100%;margin-bottom: 20px;">
|
|
|
|
|
<el-table-column type="index" align="center">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="name" label="活动名称">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.name" placeholder="请填写活动名称" autocomplete="off"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="start_time" label="活动时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="scope.row.dateRange" type="datetimerange"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="活动开始日期"
|
|
|
|
|
end-placeholder="活动结束日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="end_time" label="预定截止">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="scope.row.end_plan" type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择预定截止时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="total" label="总人数">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.total" placeholder="请填写总人数(0为不限制)" autocomplete="off"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="total" label="预约时段">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="primary" @click="openVisit(scope.$index)">
|
|
|
|
|
{{form.numbers_list[scope.$index].time?form.numbers_list[scope.$index].time:currentVisit.text}}
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="120px" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input style="display: none;" type="hidden" v-model="scope.row.id"></el-input>
|
|
|
|
|
<Button type="error" @click="delRow(scope.$index,scope.row.id)" size="small" style="margin-left: 10px;"
|
|
|
|
|
ghost>删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
|
<el-form-item label="预定截止" prop="end_plan">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="form.end_plan" type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择预定截止时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="活动时间" prop="dateRange">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="dateRange" type="datetimerange"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="活动开始日期"
|
|
|
|
|
end-placeholder="活动结束日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<div class="table-tree tableswidth">
|
|
|
|
|
<div style="display: flex;justify-content: space-between;margin-right: 20px;margin-bottom: 10px;">
|
|
|
|
|
<div style="font-size: 18px;color: #303133;">活动场次</div>
|
|
|
|
|
<Button type="primary" @click="addRow()" size="small" style="margin-left: 10px;" ghost>新增</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="form.numbers_list" height="200" class="v-table" style="width: 100%;margin-bottom: 20px;">
|
|
|
|
|
<el-table-column type="index" align="center">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="name" label="活动名称">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.name" placeholder="请填写活动名称" autocomplete="off"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="start_time" label="活动时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="scope.row.dateRange" type="datetimerange"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="活动开始日期"
|
|
|
|
|
end-placeholder="活动结束日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="end_time" label="预定截止">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="scope.row.end_plan" type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择预定截止时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="total" label="总人数">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.total" placeholder="请填写总人数(0为不限制)" autocomplete="off"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="total" label="预约时段">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="primary" @click="openVisit(scope.$index)">
|
|
|
|
|
{{form.numbers_list[scope.$index].time?form.numbers_list[scope.$index].time:currentVisit.text}}
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="120px" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input style="display: none;" type="hidden" v-model="scope.row.id"></el-input>
|
|
|
|
|
<Button type="error" @click="delRow(scope.$index,scope.row.id)" size="small" style="margin-left: 10px;"
|
|
|
|
|
ghost>删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="所属区域" prop="area">
|
|
|
|
|
@ -214,13 +214,13 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" >
|
|
|
|
|
<el-form-item label="地址" prop="address">
|
|
|
|
|
<avue-input-map :params="mapparams" placeholder="请选择地图" v-model="mapform"></avue-input-map>
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" >
|
|
|
|
|
<el-form-item label="地址" prop="address">
|
|
|
|
|
<input-map :params="mapparams" city="苏州" placeholder="请选择地图" v-model="mapform"></input-map>
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
|
<el-form-item label="关联内容" prop="con">
|
|
|
|
|
@ -276,23 +276,23 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="7" :offset="1">
|
|
|
|
|
<el-form-item class="longtext" label="个人最大预定数量" prop="person_max_count">
|
|
|
|
|
<el-input v-model="form.person_max_count" placeholder="请填写个人最大预定数量" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7" :offset="1">
|
|
|
|
|
<el-form-item class="longtext" label="团队最大预定数" prop="team_max_count">
|
|
|
|
|
<el-input v-model="form.team_max_count" placeholder="请填写团队最大预定数" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7" :offset="1">
|
|
|
|
|
<el-form-item class="longtext" label="团队最小预定数" prop="team_min_count">
|
|
|
|
|
<el-input v-model="form.team_min_count" placeholder="请填写团队最小预定数" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="7" :offset="1">
|
|
|
|
|
<el-form-item class="longtext" label="个人最大预定数量" prop="person_max_count">
|
|
|
|
|
<el-input v-model="form.person_max_count" placeholder="请填写个人最大预定数量" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7" :offset="1">
|
|
|
|
|
<el-form-item class="longtext" label="团队最大预定数" prop="team_max_count">
|
|
|
|
|
<el-input v-model="form.team_max_count" placeholder="请填写团队最大预定数" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7" :offset="1">
|
|
|
|
|
<el-form-item class="longtext" label="团队最小预定数" prop="team_min_count">
|
|
|
|
|
<el-input v-model="form.team_min_count" placeholder="请填写团队最小预定数" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item class='nextlabel' label="海报图(建议上传图片宽度750px)" prop="cover">
|
|
|
|
|
<el-upload action="/api/admin/upload-file" list-type="picture-card" :file-list="coverlist" ref="pictureUpload"
|
|
|
|
|
@ -370,7 +370,7 @@
|
|
|
|
|
<script>
|
|
|
|
|
import LxHeader from "@/components/LxHeader/index.vue";
|
|
|
|
|
import Tinymce from '@/components/Tinymce'
|
|
|
|
|
import AvueMap from 'avue-plugin-map'
|
|
|
|
|
import InputMap from '@/components/InputMap/index.vue'
|
|
|
|
|
import {
|
|
|
|
|
getToken
|
|
|
|
|
} from '@/utils/auth'
|
|
|
|
|
@ -380,22 +380,22 @@
|
|
|
|
|
save,
|
|
|
|
|
del,
|
|
|
|
|
get,
|
|
|
|
|
chanStatus,
|
|
|
|
|
chanStatus,
|
|
|
|
|
delNum
|
|
|
|
|
} from "../../api/active/activity.js";
|
|
|
|
|
import {
|
|
|
|
|
listvisit,
|
|
|
|
|
get as getVisit
|
|
|
|
|
} from "../../api/resource/visitresource.js";
|
|
|
|
|
import {
|
|
|
|
|
listvisitspecial,
|
|
|
|
|
get as getSpecialVisit
|
|
|
|
|
} from "../../api/resource/visitresource.js";
|
|
|
|
|
import {
|
|
|
|
|
listvisitspecial,
|
|
|
|
|
get as getSpecialVisit
|
|
|
|
|
} from "../../api/resource/visitspecial.js";
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
LxHeader,
|
|
|
|
|
Tinymce,
|
|
|
|
|
AvueMap
|
|
|
|
|
InputMap
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -469,26 +469,26 @@
|
|
|
|
|
}, {
|
|
|
|
|
id: 2,
|
|
|
|
|
value: "成年人"
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// id: 3,
|
|
|
|
|
// value: "初中生"
|
|
|
|
|
// }, {
|
|
|
|
|
// id: 4,
|
|
|
|
|
// value: "高中生"
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
id: 5,
|
|
|
|
|
value: "不限"
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
mapparams: {
|
|
|
|
|
zoom: 11,
|
|
|
|
|
zoom: 11
|
|
|
|
|
},
|
|
|
|
|
mapform: [],
|
|
|
|
|
form: {
|
|
|
|
|
person_max_count:8,
|
|
|
|
|
team_max_count:100,
|
|
|
|
|
form: {
|
|
|
|
|
person_max_count:8,
|
|
|
|
|
team_max_count:100,
|
|
|
|
|
team_min_count:8,
|
|
|
|
|
name: "",
|
|
|
|
|
area: "",
|
|
|
|
|
@ -509,7 +509,7 @@
|
|
|
|
|
banners_list: [],
|
|
|
|
|
join_type: 0,
|
|
|
|
|
numbers_list: [{
|
|
|
|
|
name: "",
|
|
|
|
|
name: "",
|
|
|
|
|
dateRange:"",
|
|
|
|
|
start_time: "",
|
|
|
|
|
end_time: "",
|
|
|
|
|
@ -519,17 +519,17 @@
|
|
|
|
|
rule_id: "",
|
|
|
|
|
time: ""
|
|
|
|
|
}],
|
|
|
|
|
},
|
|
|
|
|
// 选择预约
|
|
|
|
|
currentVisit:{
|
|
|
|
|
text:"选择预约时段"
|
|
|
|
|
},
|
|
|
|
|
// 选择预约
|
|
|
|
|
currentVisit:{
|
|
|
|
|
text:"选择预约时段"
|
|
|
|
|
},
|
|
|
|
|
visitList: [], // 预约时段列表
|
|
|
|
|
visitInfo: [], // 预约时段详情
|
|
|
|
|
visitid: "",
|
|
|
|
|
specialVisitid: "",
|
|
|
|
|
visitid: "",
|
|
|
|
|
specialVisitid: "",
|
|
|
|
|
specialVisitList: [],
|
|
|
|
|
showRules: false,
|
|
|
|
|
showRules: false,
|
|
|
|
|
|
|
|
|
|
dateRange: "",
|
|
|
|
|
showTime: "",
|
|
|
|
|
@ -634,12 +634,12 @@
|
|
|
|
|
this.form.address = newVal[2];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
methods: {
|
|
|
|
|
// 增加活动场次
|
|
|
|
|
addRow() {
|
|
|
|
|
var len = this.form.numbers_list.length;
|
|
|
|
|
this.form.numbers_list.push({
|
|
|
|
|
name: "",
|
|
|
|
|
name: "",
|
|
|
|
|
dateRange:"",
|
|
|
|
|
start_time: "",
|
|
|
|
|
end_time: "",
|
|
|
|
|
@ -649,49 +649,49 @@
|
|
|
|
|
rule_id: "",
|
|
|
|
|
time: ""
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// 删除活动场次
|
|
|
|
|
delRow(index,id) {
|
|
|
|
|
var that = this
|
|
|
|
|
if (id) {
|
|
|
|
|
delNum(id).then(response => {
|
|
|
|
|
that.$Message.success('删除成功');
|
|
|
|
|
that.form.numbers_list.splice(index, 1);
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.form.rules_list.splice(index, 1);
|
|
|
|
|
var that = this
|
|
|
|
|
if (id) {
|
|
|
|
|
delNum(id).then(response => {
|
|
|
|
|
that.$Message.success('删除成功');
|
|
|
|
|
that.form.numbers_list.splice(index, 1);
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.form.rules_list.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 打开预约时段
|
|
|
|
|
openVisit(index){
|
|
|
|
|
this.showRules=true
|
|
|
|
|
this.currentVisit.index = index
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// 打开预约时段
|
|
|
|
|
openVisit(index){
|
|
|
|
|
this.showRules=true
|
|
|
|
|
this.currentVisit.index = index
|
|
|
|
|
},
|
|
|
|
|
// 获取预约时段规则
|
|
|
|
|
changeVisit(val) {
|
|
|
|
|
console.log("visit", val)
|
|
|
|
|
console.log("visit", val)
|
|
|
|
|
this.specialVisitid = ""
|
|
|
|
|
getVisit(val).then(res => {
|
|
|
|
|
this.visitInfo = res.rules
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取特殊预约时段规则
|
|
|
|
|
changeSpecialVisit(val) {
|
|
|
|
|
console.log("Specialvisit", val)
|
|
|
|
|
this.visitid = ""
|
|
|
|
|
getSpecialVisit(val).then(res => {
|
|
|
|
|
this.visitInfo = res.rules
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 选择 预约时段
|
|
|
|
|
chooseVisit(val){
|
|
|
|
|
this.form.numbers_list[this.currentVisit.index]['rule_id'] = val.id
|
|
|
|
|
this.form.numbers_list[this.currentVisit.index]['time'] = val.start_time + "-" + val.end_time
|
|
|
|
|
this.showRules = false
|
|
|
|
|
console.log("this.form.numbers_list",this.form.numbers_list)
|
|
|
|
|
},
|
|
|
|
|
// 获取特殊预约时段规则
|
|
|
|
|
changeSpecialVisit(val) {
|
|
|
|
|
console.log("Specialvisit", val)
|
|
|
|
|
this.visitid = ""
|
|
|
|
|
getSpecialVisit(val).then(res => {
|
|
|
|
|
this.visitInfo = res.rules
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 选择 预约时段
|
|
|
|
|
chooseVisit(val){
|
|
|
|
|
this.form.numbers_list[this.currentVisit.index]['rule_id'] = val.id
|
|
|
|
|
this.form.numbers_list[this.currentVisit.index]['time'] = val.start_time + "-" + val.end_time
|
|
|
|
|
this.showRules = false
|
|
|
|
|
console.log("this.form.numbers_list",this.form.numbers_list)
|
|
|
|
|
},
|
|
|
|
|
initLoad() {
|
|
|
|
|
var that = this;
|
|
|
|
|
@ -722,7 +722,7 @@
|
|
|
|
|
this.visitList = res.data;
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
listvisitspecial({
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 999,
|
|
|
|
|
@ -740,12 +740,12 @@
|
|
|
|
|
that.form = result;
|
|
|
|
|
that.dateRange = [result.start_time, result.end_time];
|
|
|
|
|
that.mapform = [result.longitude, result.latitude, result.address]
|
|
|
|
|
console.log(that.dateRange);
|
|
|
|
|
let numArr = []
|
|
|
|
|
for(var k of result.numbers){
|
|
|
|
|
k.dateRange = [k.start_time,k.end_time]
|
|
|
|
|
numArr.push(k)
|
|
|
|
|
}
|
|
|
|
|
console.log(that.dateRange);
|
|
|
|
|
let numArr = []
|
|
|
|
|
for(var k of result.numbers){
|
|
|
|
|
k.dateRange = [k.start_time,k.end_time]
|
|
|
|
|
numArr.push(k)
|
|
|
|
|
}
|
|
|
|
|
that.form.numbers_list = numArr
|
|
|
|
|
// that.showTime = result.start_time.substring(11, result.start_time.length);
|
|
|
|
|
// that.form.end_time = result.end_time.substring(11, result.end_time.length);
|
|
|
|
|
@ -786,46 +786,46 @@
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
submitForm(formName) {
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.form.start_time = this.dateRange[0];
|
|
|
|
|
this.form.end_time = this.dateRange[1];
|
|
|
|
|
if (!this.form.start_time || !this.form.end_time) {
|
|
|
|
|
that.$message.error('请选择活动时间');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//比较预约截止不能大于活动开始时间
|
|
|
|
|
// let checktime = that.compareDate(that.form.start_time, that.form.end_plan);
|
|
|
|
|
// if (!checktime) {
|
|
|
|
|
// that.$message.error('截止时间不能晚于开始时间');
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
let upTotal = 0
|
|
|
|
|
if(that.form.numbers_list.length==0){
|
|
|
|
|
that.$message.error('请填写活动场次');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
for(var k of that.form.numbers_list){
|
|
|
|
|
console.log(!k.name)
|
|
|
|
|
if(!k.name){
|
|
|
|
|
that.$message.error('请填写活动场次名称');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
k.start_time = k.dateRange[0];
|
|
|
|
|
k.end_time = k.dateRange[1];
|
|
|
|
|
k.date= this.$moment(k.dateRange[0]).format("YYYY-MM-DD");
|
|
|
|
|
if (!k.start_time || !k.end_time) {
|
|
|
|
|
that.$message.error('请选择活动场次时间');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
let checktime = that.compareDate(k.start_time, k.end_plan);
|
|
|
|
|
if (!checktime) {
|
|
|
|
|
that.$message.error('截止时间不能晚于开始时间');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
upTotal += parseInt(k.total)
|
|
|
|
|
}
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.form.start_time = this.dateRange[0];
|
|
|
|
|
this.form.end_time = this.dateRange[1];
|
|
|
|
|
if (!this.form.start_time || !this.form.end_time) {
|
|
|
|
|
that.$message.error('请选择活动时间');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//比较预约截止不能大于活动开始时间
|
|
|
|
|
// let checktime = that.compareDate(that.form.start_time, that.form.end_plan);
|
|
|
|
|
// if (!checktime) {
|
|
|
|
|
// that.$message.error('截止时间不能晚于开始时间');
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
let upTotal = 0
|
|
|
|
|
if(that.form.numbers_list.length==0){
|
|
|
|
|
that.$message.error('请填写活动场次');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
for(var k of that.form.numbers_list){
|
|
|
|
|
console.log(!k.name)
|
|
|
|
|
if(!k.name){
|
|
|
|
|
that.$message.error('请填写活动场次名称');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
k.start_time = k.dateRange[0];
|
|
|
|
|
k.end_time = k.dateRange[1];
|
|
|
|
|
k.date= this.$moment(k.dateRange[0]).format("YYYY-MM-DD");
|
|
|
|
|
if (!k.start_time || !k.end_time) {
|
|
|
|
|
that.$message.error('请选择活动场次时间');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
let checktime = that.compareDate(k.start_time, k.end_plan);
|
|
|
|
|
if (!checktime) {
|
|
|
|
|
that.$message.error('截止时间不能晚于开始时间');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
upTotal += parseInt(k.total)
|
|
|
|
|
}
|
|
|
|
|
that.form.total = upTotal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -843,8 +843,8 @@
|
|
|
|
|
"upload_id": m.upload_id
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
that.form.banners_list = listUrl;
|
|
|
|
|
console.log("this.form",this.form)
|
|
|
|
|
that.form.banners_list = listUrl;
|
|
|
|
|
console.log("this.form",this.form)
|
|
|
|
|
// return
|
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
@ -1016,4 +1016,4 @@
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|