|
|
|
@ -31,8 +31,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
<view class="activityBox-row">
|
|
|
|
<view class="activityBox-row">
|
|
|
|
<text class="icon-renshu iconfont"></text>
|
|
|
|
<text class="icon-renshu iconfont"></text>
|
|
|
|
<text>{{list.form==2?'起约人数':'人数限制'}}:{{(list.form==2?10 : (numberlist.total==0?'不限':numberlist.total))}}</text>
|
|
|
|
<text>{{list.form==2?'起约人数':'人数限制'}}:{{(list.form==2?10 : (numberlist.total==0?'不限':numberlist.total))}}</text>
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="activityBox-row flex-row align-center" @click="tothere">
|
|
|
|
<view class="activityBox-row flex-row align-center" @click="tothere">
|
|
|
|
<text class="icon-ditu-dibiao iconfont"></text>
|
|
|
|
<text class="icon-ditu-dibiao iconfont"></text>
|
|
|
|
@ -52,8 +52,10 @@
|
|
|
|
<view class="box-card-content">
|
|
|
|
<view class="box-card-content">
|
|
|
|
<u-form-item label="人数" labelWidth="120" prop="total" ref="total" v-if="type=='team'">
|
|
|
|
<u-form-item label="人数" labelWidth="120" prop="total" ref="total" v-if="type=='team'">
|
|
|
|
<u-number-box slot="right" v-model="form.total" inputWidth="44" color="#EF9525"
|
|
|
|
<u-number-box slot="right" v-model="form.total" inputWidth="44" color="#EF9525"
|
|
|
|
bgColor="#FCF6E3" :min="(list.form==2?10:(type=='user'?1:list.team_min_count))"
|
|
|
|
bgColor="#FCF6E3" :min="minTotal" :max="maxTotal" class="plus">
|
|
|
|
:max="(type=='user'?list.person_max_count:list.team_max_count)" class="plus">
|
|
|
|
<view slot="input" class="slotinput">
|
|
|
|
|
|
|
|
<u-input @blur="checkValue" type="number" v-model='form.total'></u-input>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</u-number-box>
|
|
|
|
</u-number-box>
|
|
|
|
</u-form-item>
|
|
|
|
</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">
|
|
|
|
@ -137,8 +139,8 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view> -->
|
|
|
|
</view> -->
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- v-if="type=='team'" -->
|
|
|
|
<!-- v-if="type=='team'" -->
|
|
|
|
<view class="box-card">
|
|
|
|
<view class="box-card">
|
|
|
|
<view class="box-card-title">
|
|
|
|
<view class="box-card-title">
|
|
|
|
联系人信息
|
|
|
|
联系人信息
|
|
|
|
@ -268,6 +270,8 @@
|
|
|
|
list: {},
|
|
|
|
list: {},
|
|
|
|
numberlist: {},
|
|
|
|
numberlist: {},
|
|
|
|
common_user: [],
|
|
|
|
common_user: [],
|
|
|
|
|
|
|
|
minTotal: 1,
|
|
|
|
|
|
|
|
maxTotal: 1,
|
|
|
|
form: {
|
|
|
|
form: {
|
|
|
|
unit: "",
|
|
|
|
unit: "",
|
|
|
|
leader: "",
|
|
|
|
leader: "",
|
|
|
|
@ -361,16 +365,19 @@
|
|
|
|
key: 'activityinfo',
|
|
|
|
key: 'activityinfo',
|
|
|
|
success(res) {
|
|
|
|
success(res) {
|
|
|
|
that.list = res.data;
|
|
|
|
that.list = res.data;
|
|
|
|
|
|
|
|
that.minTotal = that.list.form == 2 ? 10 : (that.type == 'user' ? 1 : that.list.team_min_count)
|
|
|
|
|
|
|
|
that.maxTotal = that.type == 'user' ? that.list.person_max_count : that.list.team_max_count
|
|
|
|
|
|
|
|
that.form.total = that.minTotal
|
|
|
|
for (var m of that.list.numbers) {
|
|
|
|
for (var m of that.list.numbers) {
|
|
|
|
if (that.form.activity_number_id == m.id) {
|
|
|
|
if (that.form.activity_number_id == m.id) {
|
|
|
|
that.numberlist = m
|
|
|
|
that.numberlist = m
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (that.form.type == 2) {
|
|
|
|
// if (that.form.type == 2) {
|
|
|
|
that.form.total = 1
|
|
|
|
// that.form.total = 1
|
|
|
|
} else if (that.form.type == 1) {
|
|
|
|
// } else if (that.form.type == 1) {
|
|
|
|
that.form.total = 1; //res.data.team_min_count;
|
|
|
|
// that.form.total = 1; //res.data.team_min_count;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
@ -400,7 +407,14 @@
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
checkValue(value) {
|
|
|
|
|
|
|
|
console.log("value", value, this.maxTotal, this.minTotal)
|
|
|
|
|
|
|
|
if (value > this.maxTotal) {
|
|
|
|
|
|
|
|
this.form.total = this.maxTotal;
|
|
|
|
|
|
|
|
} else if (value < this.minTotal) {
|
|
|
|
|
|
|
|
this.form.total = this.minTotal;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
downLoad() {
|
|
|
|
downLoad() {
|
|
|
|
const downloadTask = uni.downloadFile({
|
|
|
|
const downloadTask = uni.downloadFile({
|
|
|
|
url: 'https://leyitest.ali251.langye.net/Template.xlsx', //仅为示例,并非真实的资源
|
|
|
|
url: 'https://leyitest.ali251.langye.net/Template.xlsx', //仅为示例,并非真实的资源
|
|
|
|
@ -643,7 +657,6 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
submitOrder() {
|
|
|
|
submitOrder() {
|
|
|
|
|
|
|
|
|
|
|
|
// if (this.form.details_list.length != this.form.total) {
|
|
|
|
// if (this.form.details_list.length != this.form.total) {
|
|
|
|
// uni.showToast({
|
|
|
|
// uni.showToast({
|
|
|
|
// icon: "none",
|
|
|
|
// icon: "none",
|
|
|
|
@ -653,66 +666,66 @@
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// if (this.type != "user") {
|
|
|
|
// if (this.type != "user") {
|
|
|
|
if (this.util.isNull(this.form.leader)) {
|
|
|
|
if (this.util.isNull(this.form.leader)) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
title: "请填写姓名"
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.type != "user") {
|
|
|
|
|
|
|
|
if (this.util.isNull(this.form.unit)) {
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
icon: "none",
|
|
|
|
icon: "none",
|
|
|
|
title: "请填写姓名"
|
|
|
|
title: "请填写单位名称"
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(this.type != "user"){
|
|
|
|
}
|
|
|
|
if (this.util.isNull(this.form.unit)) {
|
|
|
|
|
|
|
|
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)) {
|
|
|
|
// if (this.util.isNull(this.form.idcard)) {
|
|
|
|
uni.showToast({
|
|
|
|
// uni.showToast({
|
|
|
|
icon: "none",
|
|
|
|
// icon: "none",
|
|
|
|
title: "请填写手机号"
|
|
|
|
// title: "请填写证件号"
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
return false;
|
|
|
|
// return false;
|
|
|
|
} else if (!this.util.phoneRegex.test(this.form.mobile)) {
|
|
|
|
// }
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
// if (this.form.card_type == 1) {
|
|
|
|
title: "请正确填写手机号"
|
|
|
|
// if (!this.util.isValidCardID(this.form.idcard)) {
|
|
|
|
})
|
|
|
|
// uni.showToast({
|
|
|
|
return false;
|
|
|
|
// icon: "none",
|
|
|
|
}
|
|
|
|
// title: "请正确输入身份证号"
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
if(this.type=='user'){
|
|
|
|
// return false;
|
|
|
|
this.form.details_list.push({
|
|
|
|
// }
|
|
|
|
name:this.form.leader,
|
|
|
|
// }
|
|
|
|
mobile:this.form.mobile,
|
|
|
|
|
|
|
|
card_type:1,
|
|
|
|
if (this.util.isNull(this.form.mobile)) {
|
|
|
|
idcard:''
|
|
|
|
uni.showToast({
|
|
|
|
})
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
title: "请填写手机号"
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
} else if (!this.util.phoneRegex.test(this.form.mobile)) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
title: "请正确填写手机号"
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
if (this.type == 'user') {
|
|
|
|
|
|
|
|
this.form.details_list.push({
|
|
|
|
|
|
|
|
name: this.form.leader,
|
|
|
|
|
|
|
|
mobile: this.form.mobile,
|
|
|
|
|
|
|
|
card_type: 1,
|
|
|
|
|
|
|
|
idcard: ''
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
console.log("this.form",this.form)
|
|
|
|
console.log("this.form", this.form)
|
|
|
|
// return
|
|
|
|
// return
|
|
|
|
var that = this;
|
|
|
|
var that = this;
|
|
|
|
this.util.request({
|
|
|
|
this.util.request({
|
|
|
|
@ -750,6 +763,16 @@
|
|
|
|
@import url("@/static/css/bookbox.css");
|
|
|
|
@import url("@/static/css/bookbox.css");
|
|
|
|
@import url("@/static/css/activitybox.css");
|
|
|
|
@import url("@/static/css/activitybox.css");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.slotinput {
|
|
|
|
|
|
|
|
&>view {
|
|
|
|
|
|
|
|
width: 80rpx;
|
|
|
|
|
|
|
|
height: 30rpx;
|
|
|
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.box-visitor-item {
|
|
|
|
.box-visitor-item {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
justify-content: space-between;
|
|
|
|
|