|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
|
<el-dialog :title="exData.id ? '编辑': '新增'"
|
|
|
:visible.sync="dialog"
|
|
|
- width="50%"
|
|
|
+ width="600px"
|
|
|
:close-on-click-modal="false"
|
|
|
top="50px">
|
|
|
<el-form ref="form"
|
|
@@ -12,61 +12,53 @@
|
|
|
<el-form-item prop="place_time"
|
|
|
:rules="formRules.time"
|
|
|
label="开放预定日期:">
|
|
|
- <el-col :span="16">
|
|
|
- <el-date-picker
|
|
|
- v-model="form.place_time"
|
|
|
- align="right"
|
|
|
- type="date"
|
|
|
- placeholder="选择日期"
|
|
|
- :picker-options="pickerOptions"
|
|
|
- value-format="yyyy-MM-dd">
|
|
|
- </el-date-picker>
|
|
|
- </el-col>
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="form.place_time"
|
|
|
+ align="right"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择日期"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ value-format="yyyy-MM-dd">
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="place_name"
|
|
|
:rules="formRules.required"
|
|
|
label="座位名称:">
|
|
|
- <el-col :span="16">
|
|
|
- <el-input v-model="form.place_name"
|
|
|
- placeholder="请输入座位名称"
|
|
|
- clearable></el-input>
|
|
|
- </el-col>
|
|
|
+ <el-input v-model="form.place_name"
|
|
|
+ placeholder="请输入座位名称"
|
|
|
+ clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="place_desc"
|
|
|
:rules="formRules.required"
|
|
|
label="说明:">
|
|
|
- <el-col :span="16">
|
|
|
- <el-input type="textarea"
|
|
|
- :rows="4"
|
|
|
- placeholder="请输入座位说明"
|
|
|
- v-model="form.place_desc">
|
|
|
- </el-input>
|
|
|
- </el-col>
|
|
|
+ <el-input type="textarea"
|
|
|
+ :rows="4"
|
|
|
+ placeholder="请输入座位说明"
|
|
|
+ v-model="form.place_desc">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="place_user_max"
|
|
|
:rules="formRules.InterNum"
|
|
|
label="单桌人数:">
|
|
|
- <el-col :span="16">
|
|
|
- <el-input v-model="form.place_user_max"
|
|
|
- placeholder="请输入人数"
|
|
|
- @input="form.place_user_max=form.place_user_max.replace(/[^\d]/g, '').replace(/^0*/, '')"
|
|
|
- clearable></el-input>
|
|
|
- </el-col>
|
|
|
+ <el-input v-model="form.place_user_max"
|
|
|
+ placeholder="请输入人数"
|
|
|
+ @input="form.place_user_max=form.place_user_max.replace(/[^\d]/g, '').replace(/^0*/, '')"
|
|
|
+ clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="place_price"
|
|
|
:rules="formRules.numPot2"
|
|
|
label="单价(元):">
|
|
|
- <el-col :span="16">
|
|
|
- <el-input v-model="form.place_price"
|
|
|
- placeholder="请输入单价"
|
|
|
- @input="form.place_price=form.place_price.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
|
|
|
- clearable></el-input>
|
|
|
- </el-col>
|
|
|
+ <el-input v-model="form.place_price"
|
|
|
+ placeholder="请输入单价"
|
|
|
+ @input="form.place_price=form.place_price.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
|
|
|
+ clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="place_latest_time"
|
|
|
:rules="formRules.required"
|
|
|
label="最晚到店时间:">
|
|
|
- <el-time-select placeholder="请选择最晚到店时间"
|
|
|
+ <el-time-select style="width: 100%"
|
|
|
+ placeholder="请选择最晚到店时间"
|
|
|
v-model="form.place_latest_time"
|
|
|
:picker-options="{start: '00:00', step: '00:05', end: '23:59'}">
|
|
|
</el-time-select>
|
|
@@ -74,40 +66,35 @@
|
|
|
<el-form-item prop="place_max_time"
|
|
|
:rules="formRules.checkInterNum"
|
|
|
label="最晚保留时间(分钟):">
|
|
|
- <el-col :span="16">
|
|
|
- <el-input v-model="form.place_max_time"
|
|
|
- placeholder="请输入分钟数"
|
|
|
- @input="form.place_max_time=form.place_max_time.replace(/[^\d]/g, '').replace(/^0*/, '')"
|
|
|
- clearable></el-input>
|
|
|
- </el-col>
|
|
|
+ <el-input v-model="form.place_max_time"
|
|
|
+ placeholder="请输入分钟数"
|
|
|
+ @input="form.place_max_time=form.place_max_time.replace(/[^\d]/g, '').replace(/^0*/, '')"
|
|
|
+ clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="place_pre_num"
|
|
|
:rules="form.id !== '' ? [] : formRules.required"
|
|
|
label="已预定:"
|
|
|
v-if="form.id">
|
|
|
- <el-col :span="16">
|
|
|
- <el-input v-model="form.place_pre_num"
|
|
|
- disabled
|
|
|
- placeholder=""
|
|
|
- clearable></el-input>
|
|
|
- </el-col>
|
|
|
+ <el-input v-model="form.place_pre_num"
|
|
|
+ disabled
|
|
|
+ placeholder=""
|
|
|
+ clearable></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item :label="!form.id ? '桌号设置:' : '开放预定数量:'" required></el-form-item>
|
|
|
+ <el-form-item :label="!form.id ? '桌号设置:' : '开放预定数量:'"></el-form-item>
|
|
|
<el-form-item v-for="(desk, index) in form.place_number"
|
|
|
:label="(index + 1) + '桌'"
|
|
|
:key="index"
|
|
|
:prop="'place_number.' + index + '.value'"
|
|
|
:rules="formRules.required">
|
|
|
- <el-col :span="16">
|
|
|
- <el-input v-model="desk.value"
|
|
|
- placeholder="请设置桌号"></el-input>
|
|
|
- </el-col>
|
|
|
- <el-col :span="7" :offset="1">
|
|
|
+ <el-input style="width: 75%"
|
|
|
+ v-model="desk.value"
|
|
|
+ placeholder="请设置桌号"></el-input>
|
|
|
+ <div style="display: inline-block;width: 25%;text-align: right;">
|
|
|
<el-button type="warning"
|
|
|
:disabled="form.place_number.length <= 1"
|
|
|
@click.prevent="removeDeskNum(desk)">删除
|
|
|
</el-button>
|
|
|
- </el-col>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer text-center">
|