|
|
|
|
@ -86,21 +86,21 @@
|
|
|
|
|
<view class="box-card-content">
|
|
|
|
|
<u-form-item label="参观人数" v-if="type=='user'" labelWidth="120" prop="total" ref="total">
|
|
|
|
|
<u-number-box slot="right" v-model="form.total" inputWidth="44" color="#EF9525"
|
|
|
|
|
bgColor="#FCF6E3" :min="minCount" :max="maxCount" class="plus">
|
|
|
|
|
<view slot="input" class="slotinput">
|
|
|
|
|
<u-input @blur="checkValue" type="number" v-model='form.total'></u-input>
|
|
|
|
|
bgColor="#FCF6E3" :min="minCount" :max="maxCount" class="plus">
|
|
|
|
|
<view slot="input" class="slotinput">
|
|
|
|
|
<u-input @blur="checkValue" type="number" v-model='form.total'></u-input>
|
|
|
|
|
</view>
|
|
|
|
|
</u-number-box>
|
|
|
|
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
<u-form-item v-else label="人数" labelWidth="120" prop="total" ref="total">
|
|
|
|
|
<!-- {{form.total}} 请添加参与名单 -->
|
|
|
|
|
<u-number-box slot="right" v-model="form.total" inputWidth="44" color="#EF9525"
|
|
|
|
|
bgColor="#FCF6E3" :min="minCount" :max="maxCount" class="plus">
|
|
|
|
|
<view slot="input" class="slotinput">
|
|
|
|
|
<u-input @blur="checkValue" type="number" v-model='form.total'></u-input>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- {{form.total}} 请添加参与名单 -->
|
|
|
|
|
<u-number-box slot="right" v-model="form.total" inputWidth="44" color="#EF9525"
|
|
|
|
|
bgColor="#FCF6E3" :min="minCount" :max="maxCount" class="plus">
|
|
|
|
|
<view slot="input" class="slotinput">
|
|
|
|
|
<u-input @blur="checkValue" type="number" v-model='form.total'></u-input>
|
|
|
|
|
</view>
|
|
|
|
|
</u-number-box>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- <view class="box-tips" v-if="type=='team'">
|
|
|
|
|
@ -138,7 +138,7 @@
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-visitor">
|
|
|
|
|
<block v-for="(item,index) in form.details_list" :key="index">
|
|
|
|
|
<view class="box-visitor-item">
|
|
|
|
|
@ -336,10 +336,10 @@
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
const d = new Date()
|
|
|
|
|
const year = d.getFullYear()
|
|
|
|
|
let month = d.getMonth() + 1
|
|
|
|
|
month = month < 10 ? `0${month}` : month
|
|
|
|
|
const date = d.getDate()
|
|
|
|
|
const pad = (n) => (n < 10 ? '0' + n : '' + n)
|
|
|
|
|
const fmtDate = (dt) => `${dt.getFullYear()}-${pad(dt.getMonth() + 1)}-${pad(dt.getDate())}`
|
|
|
|
|
const dMax = new Date(d.getTime())
|
|
|
|
|
dMax.setDate(dMax.getDate() + 6)
|
|
|
|
|
return {
|
|
|
|
|
showAuthorization: false,
|
|
|
|
|
successshow: false,
|
|
|
|
|
@ -350,11 +350,11 @@
|
|
|
|
|
scrollheight: "",
|
|
|
|
|
notice: [{
|
|
|
|
|
title: "观展须知",
|
|
|
|
|
content: "观展须知的内容",
|
|
|
|
|
content: "观展须知的内容",
|
|
|
|
|
isTemplate:false
|
|
|
|
|
}, {
|
|
|
|
|
title: "批量上传帮助",
|
|
|
|
|
content: "<p>1.批量上传EXCEL的以xlsx结尾</p><p>2.第一行为标题行 姓名 手机号 证件号 行动不便者</p><p>3.文件是从微信聊天记录中选取或者微信文件传输助手</p><img src='@host@/export.png?v=1.1' style='width:100%'/>",
|
|
|
|
|
content: "<p>1.批量上传EXCEL的以xlsx结尾</p><p>2.第一行为标题行 姓名 手机号 证件号 行动不便者</p><p>3.文件是从微信聊天记录中选取或者微信文件传输助手</p><img src='@host@/export.png?v=1.1' style='width:100%'/>",
|
|
|
|
|
isTemplate:true
|
|
|
|
|
}],
|
|
|
|
|
specialtype: false,
|
|
|
|
|
@ -403,8 +403,8 @@
|
|
|
|
|
showAdd: false,
|
|
|
|
|
showInfo: false,
|
|
|
|
|
showBook: false,
|
|
|
|
|
minDate: `${year}-${month}-${date + 1}`,
|
|
|
|
|
maxDate: `${year}-${month}-${date + 7}`,
|
|
|
|
|
minDate: fmtDate(d),
|
|
|
|
|
maxDate: fmtDate(dMax),
|
|
|
|
|
showCalendar: false,
|
|
|
|
|
listDatePrice: [],
|
|
|
|
|
currentDate: {},
|
|
|
|
|
@ -470,6 +470,8 @@
|
|
|
|
|
this.$refs.formUser.setRules(this.rules);
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
this.minDate = this.$moment().format('YYYY-MM-DD');
|
|
|
|
|
this.maxDate = this.$moment().add(6, 'days').format('YYYY-MM-DD');
|
|
|
|
|
this.loadConfig();
|
|
|
|
|
this.loadInfo();
|
|
|
|
|
this.openNoticeInfo(0);
|
|
|
|
|
@ -521,13 +523,13 @@
|
|
|
|
|
clearInterval(this.t)
|
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
checkValue(value) {
|
|
|
|
|
if (value > this.maxCount) {
|
|
|
|
|
this.form.total = this.maxCount;
|
|
|
|
|
} else if (value < this.minCount) {
|
|
|
|
|
this.form.total = this.minCount;
|
|
|
|
|
}
|
|
|
|
|
methods: {
|
|
|
|
|
checkValue(value) {
|
|
|
|
|
if (value > this.maxCount) {
|
|
|
|
|
this.form.total = this.maxCount;
|
|
|
|
|
} else if (value < this.minCount) {
|
|
|
|
|
this.form.total = this.minCount;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//关闭手机授授权
|
|
|
|
|
closePhone() {
|
|
|
|
|
@ -625,7 +627,7 @@
|
|
|
|
|
downLoad() {
|
|
|
|
|
const downloadTask = uni.downloadFile({
|
|
|
|
|
url: 'https://leyiyuyue.szgmbwg.org.cn/res/Template.xlsx', //仅为示例,并非真实的资源
|
|
|
|
|
success: (res) => {
|
|
|
|
|
success: (res) => {
|
|
|
|
|
var filePath = res.tempFilePath
|
|
|
|
|
if (res.statusCode === 200) {
|
|
|
|
|
uni.openDocument({
|
|
|
|
|
@ -957,18 +959,25 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
filterCalendarByRange(list) {
|
|
|
|
|
var that = this;
|
|
|
|
|
return (list || []).filter(function(p) {
|
|
|
|
|
return !that.$moment(p.date).isAfter(that.maxDate, 'day') && !that.$moment(p.date).isBefore(that.minDate, 'day');
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
openCalendar() {
|
|
|
|
|
var that = this;
|
|
|
|
|
var edate = this.$moment().add('days', 7).format("yyyy-MM-DD");
|
|
|
|
|
var ndate = this.$moment().add('days', 1).format("yyyy-MM-DD")
|
|
|
|
|
this.loadCalendar(ndate, edate, function(res) {
|
|
|
|
|
that.listCalendar = res;
|
|
|
|
|
this.loadCalendar(this.minDate, this.maxDate, function(res) {
|
|
|
|
|
that.listCalendar = that.filterCalendarByRange(res);
|
|
|
|
|
that.showCalendar = true;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
formatter(day) {
|
|
|
|
|
let date = this.$moment(day.date).format("yyyy-MM-DD");
|
|
|
|
|
if (this.$moment(date).isAfter(this.maxDate, 'day') || this.$moment(date).isBefore(this.minDate, 'day')) {
|
|
|
|
|
return day;
|
|
|
|
|
}
|
|
|
|
|
for (var m of this.listCalendar) {
|
|
|
|
|
let date = this.$moment(day.date).format("yyyy-MM-DD");
|
|
|
|
|
if (date == m.date) {
|
|
|
|
|
if (m.is_open == 1) {
|
|
|
|
|
if (m.remain_count == 0) {
|
|
|
|
|
@ -1163,14 +1172,14 @@
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
@import url("@/static/css/bookbox.css");
|
|
|
|
|
|
|
|
|
|
.slotinput {
|
|
|
|
|
&>view {
|
|
|
|
|
width: 80rpx;
|
|
|
|
|
height: 30rpx;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.slotinput {
|
|
|
|
|
&>view {
|
|
|
|
|
width: 80rpx;
|
|
|
|
|
height: 30rpx;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.timeitem-none {
|
|
|
|
|
color: #ccc;
|
|
|
|
|
@ -1341,15 +1350,15 @@
|
|
|
|
|
.u-radio-group .u-radio {
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
margin-right: 10rpx
|
|
|
|
|
}
|
|
|
|
|
.book-box-row-timeitem {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
width: 32%;
|
|
|
|
|
padding: 19rpx 21rpx!important;
|
|
|
|
|
}
|
|
|
|
|
.book-box-row-timeitem-txt {
|
|
|
|
|
width:100%
|
|
|
|
|
}
|
|
|
|
|
.book-box-row-timeitem {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
width: 32%;
|
|
|
|
|
padding: 19rpx 21rpx!important;
|
|
|
|
|
}
|
|
|
|
|
.book-box-row-timeitem-txt {
|
|
|
|
|
width:100%
|
|
|
|
|
}
|
|
|
|
|
</style>
|