Browse Source

迁出管理

dev-新版ui
jiangyy 3 years ago
parent
commit
91a7b88383
  1. 233
      src/views/components/resiChangeTransfer.vue
  2. 2
      src/views/components/resiSearch.vue

233
src/views/components/resiChangeTransfer.vue

@ -1,38 +1,38 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div class="dialog-h-content scroll-h m-edit">
<el-form ref="ref_form"
:inline="false"
:model="dataForm"
label-width="90px"
:rules="dataRule"
class="form">
class="m-form">
<el-form-item label="当前组织"
label-width="150px"
style="display: block">
<span>{{ gridName }}</span>
</el-form-item>
<el-form-item label="姓名"
label-width="150px"
style="display: block">
<span>{{ dataForm.name }}</span>
</el-form-item>
<el-form-item label="迁出时间" prop="outOfTime" label-width="150px">
<el-date-picker v-model="dataForm.outOfTime"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
placeholder="选择日期"
style="width:200px"
:clearable="false">
</el-date-picker>
</el-form-item>
<el-form-item label="迁出时间"
prop="outOfTime">
<el-date-picker v-model="dataForm.outOfTime"
class="edit_edit_item_width_1"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
placeholder="选择日期"
style="width:200px"
:clearable="false">
</el-date-picker>
</el-form-item>
<el-form-item label="迁出类型"
prop="type"
label-width="150px"
style="display: block">
<el-radio-group v-model="dataForm.type">
@ -44,11 +44,10 @@
<div v-if="dataForm.type==='in'">
<el-form-item label="迁出至"
prop='agencyId'
label-width="150px">
prop='agencyId'>
<el-cascader ref="myCascader"
v-model="agencyIdArray"
style="width:480px"
class="edit_edit_item_width_1"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@ -57,7 +56,6 @@
</el-form-item>
<el-form-item label="所属家庭"
label-width="150px"
prop="villageId">
<div class="resi-cell-col">
@ -65,7 +63,7 @@
<el-select v-model.trim="dataForm.villageId"
placeholder="请选择小区"
clearable
class="item_width_1"
class="edit_item_width_1"
@change="handleChangeCommunity($event)">
<el-option v-for="item in communityList"
:key="item.value"
@ -77,7 +75,7 @@
<el-select v-model.trim="dataForm.buildId"
placeholder="请选择楼号"
clearable
class="item_width_1 margin_left10"
class="edit_item_width_1 margin_left10"
@change="handleChangeBuilding($event)">
<el-option v-for="item in buildingList"
:key="item.value"
@ -89,7 +87,7 @@
<el-select v-model.trim="dataForm.unitId"
placeholder="请选择单元"
clearable
class="item_width_1 margin_left10"
class="edit_item_width_1 margin_left10"
@change="handleChangeUnit($event)">
<el-option v-for="item in unitList"
:key="item.value"
@ -101,7 +99,7 @@
<el-select v-model.trim="dataForm.homeId"
placeholder="请选择房号"
clearable
class="item_width_1 margin_left10"
class="edit_item_width_1 margin_left10"
@change="handleChangeHome($event)">
<el-option v-for="item in roomList"
:key="item.value"
@ -117,8 +115,7 @@
</div>
<div v-if="dataForm.type==='out'">
<el-form-item label="外迁详细地址"
prop="address"
label-width="150px">
prop="address">
<el-input type="textarea"
:autosize="{ minRows: 2, maxRows: 7}"
:rows="5"
@ -130,8 +127,7 @@
</el-form-item>
</div>
<el-form-item label="迁出原因"
prop="reason"
label-width="150px">
prop="reason">
<el-input type="textarea"
:autosize="{ minRows: 4, maxRows: 7}"
:rows="5"
@ -142,8 +138,7 @@
</el-input>
</el-form-item>
<el-form-item label=""
prop="welfareFlag"
label-width="150px">
prop="welfareFlag">
<el-checkbox v-model="dataForm.welfareFlag">享受福利</el-checkbox>
</el-form-item>
</el-form>
@ -239,29 +234,29 @@ export default {
},
mounted () {
},
computed: {
dataRule () {
return {
type: [
{ required: true, message: '操作类型不能为空', trigger: 'blur' },
],
agencyId: [
{ required: true, message: '所选组织不能为空', trigger: 'blur' }
],
villageId: [
{ required: true, message: '所属家庭不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '外迁详细地址不能为空', trigger: 'blur' }
],
outOfTime: [
{ required: true, message: '迁出时间不能为空', trigger: 'blur' }
]
}
},
computed: {
dataRule () {
return {
type: [
{ required: true, message: '操作类型不能为空', trigger: 'blur' },
],
agencyId: [
{ required: true, message: '所选组织不能为空', trigger: 'blur' }
],
villageId: [
{ required: true, message: '所属家庭不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '外迁详细地址不能为空', trigger: 'blur' }
],
outOfTime: [
{ required: true, message: '迁出时间不能为空', trigger: 'blur' }
]
}
},
},
methods: {
async initForm (row) {
@ -274,38 +269,38 @@ export default {
this.dataForm.icUserId = row.icResiUserId
//
if(row.DOOR_NAME !== null && row.DOOR_NAME !== '' && row.DOOR_NAME !== undefined){
this.dataForm.oldHome = row.DOOR_NAME
}else{
this.dataForm.oldHome = ''
}
this.dataForm.customerId = this.customerId
this.dataForm.idCard = row.ID_CARD
this.dataForm.mobile = row.MOBILE
if (row.DOOR_NAME !== null && row.DOOR_NAME !== '' && row.DOOR_NAME !== undefined) {
this.dataForm.oldHome = row.DOOR_NAME
} else {
this.dataForm.oldHome = ''
}
this.dataForm.customerId = this.customerId
this.dataForm.idCard = row.ID_CARD
this.dataForm.mobile = row.MOBILE
await this.loadHouseInfo(row.HOME_ID_VALUE)
await this.loadHouseInfo(row.HOME_ID_VALUE)
this.dataForm.name = row.NAME
this.dataForm.gender = row.GENDER
this.dataForm.age = ''
this.dataForm.name = row.NAME
this.dataForm.gender = row.GENDER
this.dataForm.age = ''
await this.loadRootAgency()
await this.getAgencylist()
},
async loadHouseInfo (homeIdValue) {
const url = "/gov/org/ichouse/" + homeIdValue
const { data, code, msg } = await requestGet(url)
if (code === 0) {
this.dataForm.oldDept = ''
this.dataForm.oldAddress = data.houseName
this.dataForm.ownerName = data.ownerName
} else {
this.$message.error(msg)
}
async loadHouseInfo (homeIdValue) {
const url = "/gov/org/ichouse/" + homeIdValue
const { data, code, msg } = await requestGet(url)
if (code === 0) {
this.dataForm.oldDept = ''
this.dataForm.oldAddress = data.houseName
this.dataForm.ownerName = data.ownerName
} else {
this.$message.error(msg)
}
},
},
//id
async loadRootAgency () {
@ -401,12 +396,12 @@ export default {
},
async handleChangeCommunity (id) {
//
this.communityList.find((item) => {
if (item.value === id) {
this.dataForm.villageName = item.label
}
})
//
this.communityList.find((item) => {
if (item.value === id) {
this.dataForm.villageName = item.label
}
})
const url = '/gov/org/icbuilding/buildingoption'
@ -430,12 +425,12 @@ export default {
async handleChangeBuilding (id) {
//
this.buildingList.find((item) => {
if (item.value === id) {
this.dataForm.buildName = item.label
}
})
//
this.buildingList.find((item) => {
if (item.value === id) {
this.dataForm.buildName = item.label
}
})
const url = '/gov/org/icbuildingunit/unitoption'
@ -458,12 +453,12 @@ export default {
},
async handleChangeUnit (id) {
//
this.unitList.find((item) => {
if (item.value === id) {
this.dataForm.unitName = item.label
}
})
//
this.unitList.find((item) => {
if (item.value === id) {
this.dataForm.unitName = item.label
}
})
const url = '/gov/org/ichouse/houseoption'
@ -482,14 +477,14 @@ export default {
}
},
async handleChangeHome (id) {
//
this.roomList.find((item) => {
if (item.value === id) {
this.dataForm.homeName = item.label
}
})
},
async handleChangeHome (id) {
//
this.roomList.find((item) => {
if (item.value === id) {
this.dataForm.homeName = item.label
}
})
},
async handleComfirm () {
this.btnDisable = true
@ -523,7 +518,7 @@ export default {
},
async saveForm () {
// saveOutOfInfo
const url = '/epmetuser/changeRelocation/moveOutHome'
let noData = new Date()
@ -539,23 +534,23 @@ export default {
this.$message.error(msg)
}
},
// async saveForm () {
// const url = '/epmetuser/icusertransferrecord/add'
// let noData = new Date()
// noData = util.dateFormatter(noData, 'time')
// this.dataForm.transferTime = noData
//
// console.log('-----------3--------------')
// console.log(this.dataForm)
// const { data, code, msg } = await requestPost(url, this.dataForm)
//
// if (code === 0) {
// this.$message.success('')
// this.handleCancle()
// } else {
// this.$message.error(msg)
// }
// },
// async saveForm () {
// const url = '/epmetuser/icusertransferrecord/add'
// let noData = new Date()
// noData = util.dateFormatter(noData, 'time')
// this.dataForm.transferTime = noData
//
// console.log('-----------3--------------')
// console.log(this.dataForm)
// const { data, code, msg } = await requestPost(url, this.dataForm)
//
// if (code === 0) {
// this.$message.success('')
// this.handleCancle()
// } else {
// this.$message.error(msg)
// }
// },
handleCancle () {
this.resetData()
@ -607,7 +602,9 @@ export default {
}
</script>
<style lang="scss" scoped>
.item_width_1 {
@import "@/assets/scss/modules/management/edit-main.scss";
.edit_item_width_1 {
width: 150px;
}
.item_width_2 {

2
src/views/components/resiSearch.vue

@ -363,7 +363,7 @@ export default {
'AGENCY_ID': 'like'
},
showSmartSearchForm: true,
showSmartSearchForm: false,
formType: 'add',
selBtnIndex: 1,
btnList: [

Loading…
Cancel
Save