走访慰问人员选择
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<u-form-item label="走访对象" prop="create_user_name" required :right-icon="id ? '' : 'arrow-right'" class="create_user_names">
|
||||
<u-input v-model="forms.create_user_name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
|
||||
<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-form-item>
|
||||
|
||||
<div class="line"></div>
|
||||
@@ -68,8 +68,10 @@ export default {
|
||||
forms: {
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
|
||||
optionId: '',
|
||||
create_user_name: '',
|
||||
name: '',
|
||||
|
||||
reality: '',
|
||||
realityValue: '',
|
||||
menuLevel3Name: '',
|
||||
@@ -84,11 +86,14 @@ export default {
|
||||
areaIdProps: '',
|
||||
clickedUserSelect: false,
|
||||
id: '',
|
||||
|
||||
name: '',
|
||||
optionId: '',
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
onLoad(o) {
|
||||
this.id = o.id
|
||||
this.id = o.id ? o.id : ''
|
||||
this.areaIdProps = this.user.areaId
|
||||
if (!this.id) {
|
||||
this.forms.areaId = this.user.areaId
|
||||
@@ -97,6 +102,13 @@ export default {
|
||||
this.$dict.load('realityStatus').then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
|
||||
uni.$on('goBack', (data) => {
|
||||
console.log(data)
|
||||
this.forms.menuLevel3Name = data.applicationName
|
||||
this.forms.name = data.selectUser.name
|
||||
this.forms.optionId = data.selectUser.id
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = '新建走访'
|
||||
@@ -105,11 +117,12 @@ export default {
|
||||
methods: {
|
||||
realityClick() {
|
||||
if (this.id) return
|
||||
if (!this.forms.create_user_name) {
|
||||
if (!this.forms.name) {
|
||||
return this.$u.toast('请选择走访对象')
|
||||
}
|
||||
this.showStstus = true
|
||||
},
|
||||
|
||||
getDetail() {
|
||||
if (this.id) {
|
||||
this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
|
||||
@@ -131,7 +144,7 @@ export default {
|
||||
|
||||
this.$refs.uForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.forms.create_user_name) {
|
||||
if (!this.forms.name) {
|
||||
return this.$u.toast('请选择走访对象')
|
||||
}
|
||||
if (!this.forms.title) {
|
||||
@@ -150,9 +163,10 @@ export default {
|
||||
.post(`/app/appvisitvondolence/addOrUpdate`, {
|
||||
areaId: this.forms.areaId,
|
||||
applicationId: this.forms.applicationId,
|
||||
name: this.forms.create_user_name,
|
||||
name: this.forms.name,
|
||||
optionId: this.forms.optionId,
|
||||
menuLevel3Name: this.forms.menuLevel3Name,
|
||||
optionId: this.forms.applicationId,
|
||||
|
||||
reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
|
||||
title: this.forms.title,
|
||||
description: this.forms.description,
|
||||
@@ -182,13 +196,13 @@ export default {
|
||||
this.forms.areaId = e
|
||||
},
|
||||
|
||||
backlist(e) {
|
||||
this.forms.create_user_name = e.item.create_user_name
|
||||
this.forms.menuLevel3Name = e.menuLevel3Name
|
||||
this.forms.applicationId = e.appId
|
||||
this.forms.optionId = e.item.id
|
||||
this.addList = true
|
||||
},
|
||||
// backlist(e) {
|
||||
// this.forms.create_user_name = e.item.create_user_name
|
||||
// this.forms.menuLevel3Name = e.menuLevel3Name
|
||||
// this.forms.applicationId = e.appId
|
||||
// this.forms.optionId = e.item.id
|
||||
// this.addList = true
|
||||
// },
|
||||
|
||||
realityStstus(e) {
|
||||
this.forms.reality = e[0].label
|
||||
|
||||
Reference in New Issue
Block a user