This commit is contained in:
changjinpeng
2022-03-15 09:48:51 +08:00
parent 690c67375f
commit 7eef374de3
2 changed files with 34 additions and 2 deletions

View File

@@ -16,6 +16,14 @@
<div class="line"></div> <div class="line"></div>
<u-form-item label="走访时间" prop="visitTime" required :right-icon="id ? '' : 'arrow-right'" class="realitys">
<u-input v-model="forms.visitTime" disabled placeholder="请选择走访时间" @click="showVisitTime = true" />
<u-calendar v-model="showVisitTime" mode="date" @change="change"></u-calendar>
</u-form-item>
<div class="line"></div>
<u-form-item label="现实状态" prop="reality" :right-icon="id ? '' : 'arrow-right'" class="realitys"> <u-form-item label="现实状态" prop="reality" :right-icon="id ? '' : 'arrow-right'" class="realitys">
<u-input v-model="forms.reality" disabled placeholder="请选择现实状态" @click="realityClick" /> <u-input v-model="forms.reality" disabled placeholder="请选择现实状态" @click="realityClick" />
@@ -85,6 +93,7 @@ export default {
name: '', name: '',
optionId: '', optionId: '',
showVisitTime: false,
} }
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
@@ -144,6 +153,9 @@ export default {
if (!this.forms.name) { if (!this.forms.name) {
return this.$u.toast('请选择走访对象') return this.$u.toast('请选择走访对象')
} }
if (!this.forms.visitTime) {
return this.$u.toast('请选择走访时间')
}
if (!this.forms.title) { if (!this.forms.title) {
return this.$u.toast('请输入入户走访事项') return this.$u.toast('请输入入户走访事项')
} }
@@ -161,6 +173,7 @@ export default {
areaId: this.forms.areaId, areaId: this.forms.areaId,
applicationId: this.forms.applicationId, applicationId: this.forms.applicationId,
name: this.forms.name, name: this.forms.name,
visitTime: this.forms.visitTime,
optionId: this.forms.optionId, optionId: this.forms.optionId,
// menuLevel3Name: this.forms.menuLevel3Name, // menuLevel3Name: this.forms.menuLevel3Name,
applicationId: this.forms.applicationId, applicationId: this.forms.applicationId,
@@ -193,6 +206,10 @@ export default {
this.forms.areaId = e this.forms.areaId = e
}, },
change(e) {
this.forms.visitTime = e.result
},
realityStstus(e) { realityStstus(e) {
this.forms.reality = e[0].label this.forms.reality = e[0].label
this.forms.realityValue = e[0].value this.forms.realityValue = e[0].value

View File

@@ -3,14 +3,20 @@
<div v-if="addList"> <div v-if="addList">
<div class="header-description"> <div class="header-description">
<u-form :model="forms" ref="uForm" label-width="auto"> <u-form :model="forms" ref="uForm" label-width="auto">
<u-form-item label="走访对象" prop="name" required :right-icon="id ? '' : 'arrow-right'" class="create_user_names"> <u-form-item label="走访对象" prop="name" required :right-icon="id ? '' : 'arrow-right'" class="create_user_names">
<u-input v-model="forms.name" disabled placeholder="请选择走访对象" @click="toWalkObject" /> <u-input v-model="forms.name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
</u-form-item> </u-form-item>
<div class="line"></div> <div class="line"></div>
<u-form-item label="走访时间" prop="visitTime" required :right-icon="id ? '' : 'arrow-right'" class="realitys">
<u-input v-model="forms.visitTime" disabled placeholder="请选择走访时间" @click="showVisitTime = true" />
<u-calendar v-model="showVisitTime" mode="date" @change="change"></u-calendar>
</u-form-item>
<div class="line"></div>
<u-form-item label="现实状态" prop="reality" :right-icon="id ? '' : 'arrow-right'" class="realitys"> <u-form-item label="现实状态" prop="reality" :right-icon="id ? '' : 'arrow-right'" class="realitys">
<u-input v-model="forms.reality" disabled placeholder="请选择现实状态" @click="realityClick" /> <u-input v-model="forms.reality" disabled placeholder="请选择现实状态" @click="realityClick" />
@@ -80,6 +86,7 @@ export default {
name: '', name: '',
optionId: '', optionId: '',
showVisitTime: false,
} }
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
@@ -139,6 +146,9 @@ export default {
if (!this.forms.name) { if (!this.forms.name) {
return this.$u.toast('请选择走访对象') return this.$u.toast('请选择走访对象')
} }
if (!this.forms.visitTime) {
return this.$u.toast('请选择走访时间')
}
if (!this.forms.title) { if (!this.forms.title) {
return this.$u.toast('请输入入户走访事项') return this.$u.toast('请输入入户走访事项')
} }
@@ -156,6 +166,7 @@ export default {
areaId: this.forms.areaId, areaId: this.forms.areaId,
applicationId: this.forms.applicationId, applicationId: this.forms.applicationId,
name: this.forms.name, name: this.forms.name,
visitTime: this.forms.visitTime,
optionId: this.forms.optionId, optionId: this.forms.optionId,
// menuLevel3Name: this.forms.menuLevel3Name, // menuLevel3Name: this.forms.menuLevel3Name,
applicationId: this.forms.applicationId, applicationId: this.forms.applicationId,
@@ -188,6 +199,10 @@ export default {
this.forms.areaId = e this.forms.areaId = e
}, },
change(e) {
this.forms.visitTime = e.result
},
realityStstus(e) { realityStstus(e) {
this.forms.reality = e[0].label this.forms.reality = e[0].label
this.forms.realityValue = e[0].value this.forms.realityValue = e[0].value