预约人数手动修改

master
lion 12 months ago
parent 4c4b1b7922
commit df147be475

@ -52,8 +52,10 @@
<view class="box-card-content">
<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"
bgColor="#FCF6E3" :min="(list.form==2?10:(type=='user'?1:list.team_min_count))"
:max="(type=='user'?list.person_max_count:list.team_max_count)" class="plus">
bgColor="#FCF6E3" :min="minTotal" :max="maxTotal" 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">
@ -268,6 +270,8 @@
list: {},
numberlist: {},
common_user: [],
minTotal: 1,
maxTotal: 1,
form: {
unit: "",
leader: "",
@ -361,16 +365,19 @@
key: 'activityinfo',
success(res) {
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) {
if (that.form.activity_number_id == m.id) {
that.numberlist = m
}
}
if (that.form.type == 2) {
that.form.total = 1
} else if (that.form.type == 1) {
that.form.total = 1; //res.data.team_min_count;
}
// if (that.form.type == 2) {
// that.form.total = 1
// } else if (that.form.type == 1) {
// that.form.total = 1; //res.data.team_min_count;
// }
}
})
@ -400,7 +407,14 @@
clearTimeout(this.timer)
},
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() {
const downloadTask = uni.downloadFile({
url: 'https://leyitest.ali251.langye.net/Template.xlsx', //
@ -643,7 +657,6 @@
})
},
submitOrder() {
// if (this.form.details_list.length != this.form.total) {
// uni.showToast({
// icon: "none",
@ -750,6 +763,16 @@
@import url("@/static/css/bookbox.css");
@import url("@/static/css/activitybox.css");
.slotinput {
&>view {
width: 80rpx;
height: 30rpx;
border-radius: 0;
border: none;
}
}
.box-visitor-item {
display: flex;
justify-content: space-between;

@ -87,6 +87,9 @@
<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>
</view>
</u-number-box>
</u-form-item>
@ -95,6 +98,9 @@
<!-- {{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'">
@ -516,6 +522,13 @@
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;
}
},
//
closePhone() {
this.showAuthorization = false
@ -1150,7 +1163,15 @@
<style lang="scss">
@import url("@/static/css/bookbox.css");
.slotinput {
&>view {
width: 80rpx;
height: 30rpx;
border-radius: 0;
border: none;
}
}
.timeitem-none {
color: #ccc;
}

Loading…
Cancel
Save