|
@@ -9,30 +9,84 @@
|
|
|
:model="form"
|
|
|
:rules="formRules"
|
|
|
label-width="160px">
|
|
|
+ <el-form-item label="订座编号:"
|
|
|
+ prop="order_number">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input v-model="form.order_number"
|
|
|
+ clearable
|
|
|
+ placeholder=""
|
|
|
+ readonly></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="预定时间:"
|
|
|
+ prop="order_pre_time">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input v-model="form.order_pre_time"
|
|
|
+ clearable
|
|
|
+ placeholder=""
|
|
|
+ readonly></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item prop="order_user_name"
|
|
|
label="预订人:">
|
|
|
<el-col :span="16">
|
|
|
<el-input v-model="form.order_user_name"
|
|
|
+ clearable
|
|
|
placeholder=""
|
|
|
- disabled
|
|
|
- clearable></el-input>
|
|
|
+ readonly></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="order_user_phone"
|
|
|
- label="手机号:">
|
|
|
+ <el-form-item label="手机号:"
|
|
|
+ prop="order_user_phone">
|
|
|
<el-col :span="16">
|
|
|
<el-input v-model="form.order_user_phone"
|
|
|
+ clearable
|
|
|
placeholder=""
|
|
|
- disabled
|
|
|
- clearable></el-input>
|
|
|
+ readonly></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="预定人数:"
|
|
|
+ prop="order_user_num">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input v-model="form.order_user_num"
|
|
|
+ clearable
|
|
|
+ placeholder=""
|
|
|
+ readonly></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="place_name"
|
|
|
- label="预定座位类型:">
|
|
|
+ <el-form-item label="座位名称:"
|
|
|
+ prop="place_name">
|
|
|
<el-col :span="16">
|
|
|
<el-input v-model="form.place_name"
|
|
|
+ clearable
|
|
|
+ placeholder=""
|
|
|
+ readonly></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="下单时间:"
|
|
|
+ prop="created_at">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input v-model="form.created_at"
|
|
|
+ clearable
|
|
|
+ placeholder=""
|
|
|
+ readonly></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="支付金额(元):"
|
|
|
+ prop="order_pay_price">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input v-model="form.order_pay_price"
|
|
|
+ placeholder=""
|
|
|
+ readonly
|
|
|
+ clearable></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="支付方式:"
|
|
|
+ prop="order_pay_type">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input v-model="form.order_pay_type"
|
|
|
placeholder=""
|
|
|
- disabled
|
|
|
+ readonly
|
|
|
clearable></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
@@ -42,6 +96,15 @@
|
|
|
<el-radio v-model="form.order_sign_status" label="1">已签到</el-radio>
|
|
|
<el-radio v-model="form.order_sign_status" label="0">未签到</el-radio>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="签到时间:"
|
|
|
+ prop="order_sign_date">
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-input v-model="form.order_sign_date"
|
|
|
+ clearable
|
|
|
+ placeholder=""
|
|
|
+ readonly></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer text-center">
|
|
|
<el-button @click="dialog = false">取 消</el-button>
|
|
@@ -55,6 +118,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { fen2Yuan } from '@/utils'
|
|
|
+
|
|
|
export default {
|
|
|
components: {},
|
|
|
props: {
|
|
@@ -69,20 +134,27 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
dialog: !!this.value,
|
|
|
form: {
|
|
|
- order_user_name: '',
|
|
|
- order_user_phone: '',
|
|
|
- place_name: '',
|
|
|
- order_sign_status: '0' // 签到状态(0未签到1已签到)
|
|
|
+ order_number: '', // 订座编号
|
|
|
+ order_pre_time: '', // 预定时间
|
|
|
+ order_user_name: '', // 预订人
|
|
|
+ order_user_phone: '', // 手机号
|
|
|
+ order_user_num: '', // 预定人数
|
|
|
+ place_name: '', // 座位名称
|
|
|
+ created_at: '', // 下单时间
|
|
|
+ order_pay_price: '', // 支付金额(元)
|
|
|
+ order_pay_type: '', // 支付方式
|
|
|
+ order_sign_status: '0', // 签到状态(0未签到1已签到)
|
|
|
+ order_sign_date: '' // 签到时间
|
|
|
},
|
|
|
booLock: false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- handleSubmit () {
|
|
|
+ handleSubmit() {
|
|
|
const url = '/v1/prepare/order/sign'
|
|
|
this.$refs.form.validate(async valid => {
|
|
|
if (valid) {
|
|
@@ -100,7 +172,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- mounted () {
|
|
|
+ mounted() {
|
|
|
if (this.exData.id) {
|
|
|
this.$set(this.form, 'id', this.exData.id)
|
|
|
for (const key in this.exData) {
|
|
@@ -109,6 +181,10 @@ export default {
|
|
|
if ((Array.isArray(value) && value.length >= 1) || (Object.prototype.toString.call(value) === '[object Object]') || (typeof value === 'string' && value) || typeof value === 'number') {
|
|
|
if (key === 'order_sign_status') {
|
|
|
value = value.toString()
|
|
|
+ } else if (key === 'order_pay_price') {
|
|
|
+ value = fen2Yuan(value)
|
|
|
+ } else if (key === 'order_pay_type') {
|
|
|
+ value = ['', '微信', '支付宝', '现场支付', '美团支付', '赠送'][value]
|
|
|
}
|
|
|
this.$set(this.form, key, value)
|
|
|
}
|
|
@@ -117,7 +193,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- dialog (val) {
|
|
|
+ dialog(val) {
|
|
|
if (!val) this.$emit('input', val)
|
|
|
}
|
|
|
}
|