|
@@ -18,7 +18,7 @@
|
|
|
clearable></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="座位说明">
|
|
|
+ <el-form-item label="说明:">
|
|
|
<el-col :span="16">
|
|
|
<el-input type="textarea"
|
|
|
:rows="4"
|
|
@@ -56,47 +56,48 @@
|
|
|
clearable></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="bar_status"
|
|
|
- :rules="formRules.required"
|
|
|
- label="门店状态:">
|
|
|
- <el-radio v-model="form.bar_status"
|
|
|
- label="1">有效
|
|
|
- <el-radio v-model="form.bar_status"
|
|
|
- label="0">无效
|
|
|
- </el-radio>
|
|
|
- </el-radio>
|
|
|
- </el-form-item>
|
|
|
<el-form-item prop="bar_song_start_time"
|
|
|
:rules="formRules.required"
|
|
|
- label="点歌开始时间:">
|
|
|
- <el-time-select placeholder="起始时间"
|
|
|
+ label="最晚到店时间:">
|
|
|
+ <el-time-select placeholder="请选择最晚到店时间"
|
|
|
v-model="form.bar_song_start_time"
|
|
|
:picker-options="{start: '00:00', step: '00:05', end: '23:59'}">
|
|
|
</el-time-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="bar_song_end_time"
|
|
|
:rules="formRules.required"
|
|
|
- label="点歌结束时间:">
|
|
|
- <el-time-select placeholder="结束时间"
|
|
|
- v-model="form.bar_song_end_time"
|
|
|
- :picker-options="{start: '00:00', step: '00:05', end: '23:59', minTime: form.bar_song_start_time}">
|
|
|
- </el-time-select>
|
|
|
+ label="最晚保留时间(分钟):">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input v-model="form.b"
|
|
|
+ placeholder="请输入分钟数"
|
|
|
+ @input="form.b=form.b.replace(/[^\d]/g, '').replace(/^0*/, '')"
|
|
|
+ clearable></el-input>
|
|
|
+ </el-col>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="bar_place_reserve_start_time"
|
|
|
- :rules="formRules.required"
|
|
|
- label="座位预定开始时间:">
|
|
|
- <el-time-select placeholder="起始时间"
|
|
|
- v-model="form.bar_place_reserve_start_time"
|
|
|
- :picker-options="{start: '00:00', step: '00:05', end: '23:59'}">
|
|
|
- </el-time-select>
|
|
|
+ <el-form-item label="备注:">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input type="textarea"
|
|
|
+ :rows="4"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ v-model="form.note">
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="bar_place_reserve_end_time"
|
|
|
- :rules="formRules.required"
|
|
|
- label="座位预定结束时间:">
|
|
|
- <el-time-select placeholder="结束时间"
|
|
|
- v-model="form.bar_place_reserve_end_time"
|
|
|
- :picker-options="{start: '00:00', step: '00:05', end: '23:59', minTime: form.bar_place_reserve_start_time}">
|
|
|
- </el-time-select>
|
|
|
+ <el-form-item>
|
|
|
+ <h3>桌号设置</h3>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-for="(domain, index) in form.domains"
|
|
|
+ :label="(index + 1) + '桌'"
|
|
|
+ :key="domain.key"
|
|
|
+ :prop="'domains.' + index + '.value'"
|
|
|
+ :rules="{required: true, message: '桌号不能为空', trigger: 'blur'}">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input v-model="domain.value" placeholder="请设置桌号"></el-input>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7" :offset="1">
|
|
|
+ <el-button type="primary" @click.prevent="removeDomain(domain)">删除</el-button>
|
|
|
+ <el-button type="primary" @click.prevent="addDomain">新增</el-button>
|
|
|
+ </el-col>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer text-center">
|
|
@@ -134,11 +135,26 @@ export default {
|
|
|
bar_song_end_time: '', // 点歌结束时间
|
|
|
bar_place_reserve_start_time: '', // 座位预定开始时间
|
|
|
bar_place_reserve_end_time: '', // 座位预定结束时间
|
|
|
- note: '' // 备注
|
|
|
+ note: '', // 备注
|
|
|
+ domains: [{
|
|
|
+ value: ''
|
|
|
+ }]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ removeDomain (item) {
|
|
|
+ var index = this.form.domains.indexOf(item)
|
|
|
+ if (index !== -1) {
|
|
|
+ this.form.domains.splice(index, 1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addDomain () {
|
|
|
+ this.form.domains.push({
|
|
|
+ value: '',
|
|
|
+ key: Date.now()
|
|
|
+ })
|
|
|
+ },
|
|
|
handleSubmit () {
|
|
|
const url = this.exData.id ? '/v1/bar/modify' : '/v1/bar/add'
|
|
|
this.$refs.form.validate(async valid => {
|