master
lion 1 year ago
parent 1f7424e371
commit 21860221f0

@ -49,22 +49,22 @@
参观人数
</view>
<view class="box-card-content">
<u-form-item v-if="type=='user'" label="人数" labelWidth="120" prop="total" ref="total">
<u-form-item label="人数" labelWidth="120" prop="total" ref="total">
<u-number-box slot="right" v-model="form.total" inputWidth="44" color="#EF9525"
bgColor="#FCF6E3" :min="(type=='user'?1:list.team_min_count)"
:max="(type=='user'?list.person_max_count:list.team_max_count)" class="plus">
</u-number-box>
</u-form-item>
<u-form-item v-else label="人数" labelWidth="120" prop="total" ref="total">
<!-- <u-form-item v-else label="人数" labelWidth="120" prop="total" ref="total">
{{form.total}} 请添加参与名单
</u-form-item>
<view class="box-tips" v-if="type=='team'">
</u-form-item> -->
<!-- <view class="box-tips" v-if="type=='team'">
<text class="box-tips-txt"
v-if="type=='user'">每单限购{{list.person_max_count}}同一身份证当天限购1张</text>
<text class="box-tips-txt"
v-if="type=='team'">{{list.form==2?10:list.team_min_count}}人以上可团体预约<!-- 一个团体最多{{list.team_max_count}} --></text>
</view>
<view>
v-if="type=='team'">{{list.form==2?10:list.team_min_count}}人以上可团体预约</text>
</view> -->
<!-- <view>
<view class="box-card-content">
<view class="book-box" style="padding-top: 20rpx;">
<view class="book-box-card">
@ -83,7 +83,6 @@
</u-icon>
</view>
<view>{{item.name}}</view>
<!-- <view>{{item.datef}}</view> -->
</view>
</block>
</view>
@ -95,8 +94,8 @@
</view>
</view>
<view class="box-visitor">
</view> -->
<!-- <view class="box-visitor">
<block v-for="(item,index) in form.details_list" :key="index">
<view class="box-visitor-item">
<view class="box-visitor-item-left">
@ -113,9 +112,9 @@
</view>
</view>
</block>
</view>
</view> -->
<view class="box-footer">
<!-- <view class="box-footer">
<view class="box-footer-left">
<view class="box-button" @click="openAdd">
<u-icon name="plus" color="#EF9525"></u-icon>
@ -135,15 +134,16 @@
<u-icon name="question-circle-fill" color="#EF9525" size="40rpx"></u-icon>
<text class="book-box-selectInfo-righttxt" style="margin-left: 20rpx;">批量导入说明</text>
</view>
</view>
</view> -->
</view>
</view>
<view class="box-card" v-if="type=='team'">
</view>
<!-- v-if="type=='team'" -->
<view class="box-card">
<view class="box-card-title">
联系人信息
</view>
<view class="box-card-content">
<u-form-item :label="(type=='team'?'领队人':'联系人')" labelWidth="80" prop="leader" ref="leader"
<u-form-item :label="(type=='team'?'预约人':'联系人')" labelWidth="80" prop="leader" ref="leader"
required>
<u-input placeholder="请输入联系人" v-model="form.leader"></u-input>
</u-form-item>
@ -151,12 +151,7 @@
<u-form-item label="单位名称" labelWidth="80" prop="unit" required>
<u-input placeholder="请输入单位名称" v-model="form.unit"></u-input>
</u-form-item>
<u-form-item label="证件类型" labelWidth="80" prop="card_type1" required>
<!-- <u-radio-group v-model="form.card_type">
<u-radio width="50%" activeColor="#EF9525" v-for="(item, index) in cardType"
:key="index" :name=item.id :label="item.name">
</u-radio>
</u-radio-group> -->
<!-- <u-form-item label="证件类型" labelWidth="80" prop="card_type1" required>
<u-cell-group :border="false">
<u-cell @click="showCards" :title="card_type_names" :isLink="true"
arrow-direction="down"></u-cell>
@ -164,7 +159,7 @@
</u-form-item>
<u-form-item label="证件号码" labelWidth="80" prop="from.idcard" required>
<u-input placeholder="请输入证件号码" v-model="form.idcard"></u-input>
</u-form-item>
</u-form-item> -->
</block>
<u-form-item label="手机号" labelWidth="80" prop="mobile" ref="mobile" required>
<u-input readonly placeholder="请输入手机号" v-model="form.mobile"></u-input>
@ -567,20 +562,20 @@
return false;
}
if (that.formUser.card_type == 1) {
if (this.util.isNull(this.formUser.idcard)) {
uni.showToast({
icon: "none",
title: "请填写身份证号"
})
return false;
}
if (!that.util.isValidCardID(that.formUser.idcard)) {
uni.showToast({
icon: "none",
title: "请正确输入身份证号"
})
return false;
}
// if (this.util.isNull(this.formUser.idcard)) {
// uni.showToast({
// icon: "none",
// title: ""
// })
// return false;
// }
// if (!that.util.isValidCardID(that.formUser.idcard)) {
// uni.showToast({
// icon: "none",
// title: ""
// })
// return false;
// }
}
if (that.isEdit) {
that.form.details_list[that.isEditIndex] = that.formUser;
@ -648,21 +643,19 @@
},
submitOrder() {
if (this.form.details_list.length != this.form.total) {
uni.showToast({
icon: "none",
title: "请正确添加观众数量"
})
return false;
}
if (this.type != "user") {
// if (this.form.details_list.length != this.form.total) {
// uni.showToast({
// icon: "none",
// title: ""
// })
// return false;
// }
// if (this.type != "user") {
if (this.util.isNull(this.form.leader)) {
uni.showToast({
icon: "none",
title: "请填写领队姓名"
title: "请填写姓名"
})
return false;
}
@ -675,23 +668,23 @@
return false;
}
if (this.util.isNull(this.form.idcard)) {
uni.showToast({
icon: "none",
title: "请填写证件号"
})
return false;
}
if (this.form.card_type == 1) {
if (!this.util.isValidCardID(this.form.idcard)) {
uni.showToast({
icon: "none",
title: "请正确输入身份证号"
})
return false;
}
}
// if (this.util.isNull(this.form.idcard)) {
// uni.showToast({
// icon: "none",
// title: ""
// })
// return false;
// }
// if (this.form.card_type == 1) {
// if (!this.util.isValidCardID(this.form.idcard)) {
// uni.showToast({
// icon: "none",
// title: ""
// })
// return false;
// }
// }
if (this.util.isNull(this.form.mobile)) {
uni.showToast({
@ -706,7 +699,15 @@
})
return false;
}
}
// }
// if(this.type=='user'){
// this.form.details_list.push({
// name:this.form.leader,
// mobile:this.form.mobile,
// card_type:1,
// idcard:''
// })
// }
var that = this;

@ -96,7 +96,6 @@
</view>
</view>
<view class="infofooter" v-if="list.isCanBook&&list.total!=list.orders_total">
<u-popup :show="showNumbers" mode="bottom" @close="closeNum" :round="10" closeable>
<view class="mpopup">
<view class="mpopup-title">
@ -113,7 +112,7 @@
</view>
</view>
</u-popup>
<view class="flex-row" v-if="list.status==1&&isCanBook">
<view class="flex-row" v-if="list.status==1&&list.isCanBook">
<view style="margin-right: 14rpx;flex: 1;" v-if="list.join_type==1||list.join_type==0">
<u-button type="primary" @click="tobook('team')"></u-button>
</view>
@ -225,7 +224,8 @@
longitude: that.longitude
},
utilSuccess: function(res) {
res.isCanBook = that.$moment(nt).isBefore(res.end_plan);
res.isCanBook = that.$moment(nt).isBefore(res.end_plan);
console.log("res.isCanBook",res.isCanBook)
that.list = res;
let numberArr = []
let nowTime = that.getNowTime();

Loading…
Cancel
Save