|
|
|
|
@ -78,8 +78,9 @@
|
|
|
|
|
</u-number-box>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<view class="box-tips">
|
|
|
|
|
<text class="box-tips-txt" v-if="type=='user'">每单限购5张,同一身份证当天限购1张</text>
|
|
|
|
|
<text class="box-tips-txt" v-if="type=='team'">8人以上可团体预约,一个团体最多50人</text>
|
|
|
|
|
<text class="box-tips-txt" v-if="type=='user'">每单限购{{maxCount}}张,同一身份证当天限购1张</text>
|
|
|
|
|
<text class="box-tips-txt"
|
|
|
|
|
v-if="type=='team'">{{minCount}}人以上可团体预约,一个团体最多{{maxCount}}人</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-visitor">
|
|
|
|
|
<block v-for="(item,index) in form.details_list" :key="index">
|
|
|
|
|
@ -279,6 +280,8 @@
|
|
|
|
|
user: {},
|
|
|
|
|
minCount: 1,
|
|
|
|
|
maxCount: 1,
|
|
|
|
|
config: {},
|
|
|
|
|
info: {},
|
|
|
|
|
cardList: [{
|
|
|
|
|
idx: 1,
|
|
|
|
|
name: '身份证'
|
|
|
|
|
@ -296,6 +299,8 @@
|
|
|
|
|
this.$refs.formUser.setRules(this.rules);
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
this.loadConfig();
|
|
|
|
|
this.loadInfo();
|
|
|
|
|
if (options.currentDate) {
|
|
|
|
|
this.bcurrentDate = JSON.parse(options.currentDate);
|
|
|
|
|
this.currentDate = this.bcurrentDate;
|
|
|
|
|
@ -311,16 +316,53 @@
|
|
|
|
|
title: (options.from == 'user' ? "个人预约" : "团队预约")
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.form.total = this.minCount = (type == 'user' ? 1 : 8);
|
|
|
|
|
this.maxCount = (type == 'user' ? 5 : 50);
|
|
|
|
|
this.form.total = this.minCount; //= (type == 'user' ? 1 : 8);
|
|
|
|
|
//this.maxCount = (type == 'user' ? 5 : 50);
|
|
|
|
|
var that = this;
|
|
|
|
|
that.util.getUserInfo(function(r) {
|
|
|
|
|
that.user = r;
|
|
|
|
|
that.form.mobile = r.mobile;
|
|
|
|
|
}, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
loadConfig() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/visit/visit-defualt-config',
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.config = res;
|
|
|
|
|
if (that.type == "user") {
|
|
|
|
|
that.maxCount = res.person_max_count;
|
|
|
|
|
that.minCount = 1;
|
|
|
|
|
} else {
|
|
|
|
|
that.maxCount = res.team_max_count;
|
|
|
|
|
that.minCount = res.team_min_count;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
loadInfo() {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/visit/introduce',
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
console.log(res);
|
|
|
|
|
that.info = res;
|
|
|
|
|
that.notice[0].content = (that.type == 'user' ? res.person_notice : res.team_notice)
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
closeInfo() {
|
|
|
|
|
this.showInfo = false;
|
|
|
|
|
},
|
|
|
|
|
@ -331,6 +373,15 @@
|
|
|
|
|
submitOrder() {
|
|
|
|
|
this.form.date = this.currentDate.date;
|
|
|
|
|
this.form.rule_id = this.currentTime.id;
|
|
|
|
|
|
|
|
|
|
if (this.form.details_list.length != this.form.total) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: "请正确添加观众数量"
|
|
|
|
|
})
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.util.isNull(this.form.leader)) {
|
|
|
|
|
if (this.type == "user") {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
@ -390,14 +441,6 @@
|
|
|
|
|
})
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (this.form.details_list.length != this.form.total) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: "请正确添加观众数量"
|
|
|
|
|
})
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/visit/order',
|
|
|
|
|
|