Commit 92266051 authored by levante's avatar levante

修改提交字段

parent b99c2346
......@@ -7,8 +7,8 @@
<van-form @submit="onSubmit" style="border-radius: 10px; margin: 10px">
<van-field
v-model="sectName"
label="小区名称"
v-model="postPerson"
label="报修人"
placeholder="请输入"
:rules="[{ required: true, message: '此项为必填项!' }]"
required
......@@ -16,8 +16,8 @@
label-width='8em'
/>
<van-field
v-model="sectAddrRoad"
label="小区地址(路名)"
v-model="repairAddr"
label="报修地址"
placeholder="请输入"
:rules="[{ required: true, message: '此项为必填项!' }]"
required
......@@ -25,27 +25,8 @@
label-width='8em'
/>
<van-field
v-model="sectAddrLong"
label="小区地址(弄/号)"
placeholder="请输入"
:rules="[{ required: true, message: '此项为必填项!' }]"
required
clearable
label-width='8em'
/>
<van-field
v-model="mpzAddr"
label="门牌幢地址"
placeholder="例:19号101室"
:rules="[{ required: true, message: '此项为必填项!' }]"
required
clearable
label-width='8em'
/>
<!-- 报修部位 -->
<!-- <van-field
<van-field
readonly
clickable
name="picker"
......@@ -54,6 +35,7 @@
placeholder="请选择"
@click="showrepairAreaPicker = true"
:rules="[{ required: true, message: '请至少选择一项!' }]"
label-width='8em'
/>
<van-popup v-model="showrepairAreaPicker" position="bottom">
<van-picker
......@@ -62,7 +44,7 @@
@confirm="repairAreaConfirm"
@cancel="showrepairAreaPicker = false"
/>
</van-popup> -->
</van-popup>
<!-- 报修类型 -->
......@@ -90,7 +72,7 @@
v-model="description"
rows="2"
autosize
label="描述"
label="报修问题"
type="textarea"
maxlength="150"
placeholder="请输入详细信息"
......@@ -106,7 +88,7 @@
clickable
name="calendar"
:value="dueDate"
label="上门日期"
label="期望日期"
placeholder="请选择"
@click="showCalendar = true"
:rules="[{ required: true, message: '此项为必填项!' }]"
......@@ -119,21 +101,20 @@
<van-field
readonly
clickable
name="datetimePicker"
name="picker"
:value="dueTime"
label="上门时间"
label="期望时间"
placeholder="请选择"
@click="showTime = true"
:rules="[{ required: true, message: '此项为必填项!' }]"
required
clearable
@click="showDueTimePicker = true"
:rules="[{ required: true, message: '请至少选择一项!' }]"
label-width='8em'
/>
<van-popup v-model="showTime" position="bottom">
<van-datetime-picker
type="time"
@confirm="timeOnConfirm"
@cancel="showTime = false"
<van-popup v-model="showDueTimePicker" position="bottom">
<van-picker
show-toolbar
:columns="dueTimeColumns"
@confirm="dueTimeConfirm"
@cancel="showDueTimePicker = false"
/>
</van-popup>
<div style="margin: 16px;">
......@@ -147,13 +128,12 @@
export default {
data() {
return {
areaColumns: [],
typeColumns: [],
areaColumns: ['自用部位', '公用部位'],
dueTimeColumns: ['上午', '下午'],
postPerson: '',
repairAddr: '',
sectName: '',
sectAddrRoad: '',
sectAddrLong: '',
mpzAddr: '',
repairArea: '',
repairType: '',
description: '',
......@@ -168,7 +148,8 @@ export default {
showCalendar: false,
showTime: false,
showDialog: false
showDialog: false,
showDueTimePicker: false
}
},
mounted() {
......@@ -179,12 +160,9 @@ export default {
this.$ajax.post({
url: this.$api.POST_RESERVATION_FORM,
params: {
'stNameFrst': this.sectName,
'unitLoad': this.sectAddrRoad,
'unitLong': this.sectAddrLong,
'addrFrst': this.mpzAddr,
'reportorName': this.postPerson,
'address': this.repairAddr,
'place': this.repairArea,
'type': this.repairType,
'dscr': this.description,
'homeDate': this.dueDate,
'homeTime': this.dueTime
......@@ -196,8 +174,14 @@ export default {
}
})
},
repairAreaConfirm() {},
repairTypeConfirm() {},
repairAreaConfirm(val) {
this.repairArea = val
this.showrepairAreaPicker = !this.showrepairAreaPicker
},
dueTimeConfirm(val) {
this.dueTime = val
this.showDueTimePicker = !this.showDueTimePicker
},
calendarOnConfirm(val) {
this.dueDate = this.$moment(val).format('YYYY-MM-DD')
this.showCalendar = !this.showCalendar
......@@ -207,10 +191,8 @@ export default {
this.showTime = !this.showTime
},
clearAllFormFields() {
this.sectName = ''
this.sectAddrRoad = ''
this.sectAddrLong = ''
this.mpzAddr = ''
this.postPerson = ''
this.repairAddr = ''
this.repairArea = ''
this.repairType = ''
this.description = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment