Commit 92266051 authored by levante's avatar levante

修改提交字段

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