27 changed files with 6680 additions and 91 deletions
@ -0,0 +1,631 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div class="dialog-h-content scroll-h"> |
||||
|
<el-form ref="ref_form" |
||||
|
:inline="false" |
||||
|
:model="dataForm" |
||||
|
:rules="dataRule" |
||||
|
class="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="type" |
||||
|
label-width="150px" |
||||
|
style="display: block"> |
||||
|
<el-radio-group v-model="dataForm.type"> |
||||
|
|
||||
|
<el-radio :label="'in'">{{'迁往'+rootAgency.organizationName+'内其他区域'}}</el-radio> |
||||
|
<el-radio :label="'out'">其他</el-radio> |
||||
|
|
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<div v-if="dataForm.type==='in'"> |
||||
|
<el-form-item label="迁出至" |
||||
|
prop='agencyId' |
||||
|
label-width="150px"> |
||||
|
<el-cascader ref="myCascader" |
||||
|
v-model="agencyIdArray" |
||||
|
style="width:480px" |
||||
|
:key="iscascaderShow" |
||||
|
:options="casOptions" |
||||
|
:props="optionProps" |
||||
|
@change="handleChangeAgency" |
||||
|
clearable></el-cascader> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="所属家庭" |
||||
|
label-width="150px" |
||||
|
prop="villageId"> |
||||
|
|
||||
|
<div class="resi-cell-col"> |
||||
|
|
||||
|
<el-select v-model.trim="dataForm.villageId" |
||||
|
placeholder="请选择小区" |
||||
|
clearable |
||||
|
class="item_width_1" |
||||
|
@change="handleChangeCommunity($event)"> |
||||
|
<el-option v-for="item in communityList" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
|
||||
|
<el-select v-model.trim="dataForm.buildId" |
||||
|
placeholder="请选择楼号" |
||||
|
clearable |
||||
|
class="item_width_1 margin_left10" |
||||
|
@change="handleChangeBuilding($event)"> |
||||
|
<el-option v-for="item in buildingList" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
|
||||
|
<el-select v-model.trim="dataForm.unitId" |
||||
|
placeholder="请选择单元" |
||||
|
clearable |
||||
|
class="item_width_1 margin_left10" |
||||
|
@change="handleChangeUnit($event)"> |
||||
|
<el-option v-for="item in unitList" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
|
||||
|
<el-select v-model.trim="dataForm.homeId" |
||||
|
placeholder="请选择房号" |
||||
|
clearable |
||||
|
class="item_width_1 margin_left10" |
||||
|
@change="handleChangeHome($event)"> |
||||
|
<el-option v-for="item in roomList" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</el-form-item> |
||||
|
|
||||
|
</div> |
||||
|
<div v-if="dataForm.type==='out'"> |
||||
|
<el-form-item label="外迁详细地址" |
||||
|
prop="address" |
||||
|
label-width="150px"> |
||||
|
<el-input type="textarea" |
||||
|
:autosize="{ minRows: 2, maxRows: 7}" |
||||
|
:rows="5" |
||||
|
resize="none" |
||||
|
style="width:600px" |
||||
|
placeholder='请输入外迁详细地址' |
||||
|
v-model="dataForm.address"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
<el-form-item label="迁出原因" |
||||
|
prop="reason" |
||||
|
label-width="150px"> |
||||
|
<el-input type="textarea" |
||||
|
:autosize="{ minRows: 4, maxRows: 7}" |
||||
|
:rows="5" |
||||
|
resize="none" |
||||
|
style="width:600px" |
||||
|
placeholder='请输入迁出原因' |
||||
|
v-model="dataForm.reason"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="" |
||||
|
prop="welfareFlag" |
||||
|
label-width="150px"> |
||||
|
<el-checkbox v-model="dataForm.welfareFlag">享受福利</el-checkbox> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
</div> |
||||
|
<!-- <div class="div_btn"> |
||||
|
<el-button @click="handleCancle">取 消</el-button> |
||||
|
<el-button type="primary" |
||||
|
:disabled="btnDisable" |
||||
|
@click="handleComfirm">确 定</el-button> |
||||
|
</div> --> |
||||
|
<div class="resi-btns"> |
||||
|
<el-button size="small" |
||||
|
@click="handleCancle">取消</el-button> |
||||
|
<el-button type="primary" |
||||
|
size="small" |
||||
|
:loading="btnDisable" |
||||
|
@click="handleComfirm">提交</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import util from '@js/util.js'; |
||||
|
import { Loading } from 'element-ui' // 引入Loading服务 |
||||
|
import { requestPost, requestGet } from '@/js/dai/request' |
||||
|
|
||||
|
let loading // 加载动画 |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
|
||||
|
btnDisable: false, |
||||
|
communityList: [], |
||||
|
buildingList: [], |
||||
|
unitList: [], |
||||
|
roomList: [], |
||||
|
|
||||
|
dataForm: { |
||||
|
icUserId: '', // 被调动人ID |
||||
|
type: 'in',//操作类型【客户外out,客户内in】 |
||||
|
agencyId: '',//调动到的组织Id |
||||
|
gridId: '',//调动到的网格Id |
||||
|
gridName: '', |
||||
|
villageId: '',//调动到的小区ID |
||||
|
villageName: '', |
||||
|
buildId: '',//调动到的楼宇Id |
||||
|
buildName: '', |
||||
|
unitId: '',//调动到的单元Id |
||||
|
unitName: '', |
||||
|
homeId: '', //调动到的房屋Id |
||||
|
homeName: '', |
||||
|
transferTime: '', //调动时间【日期类型】 |
||||
|
reason: '', //备注 |
||||
|
customerId: '', |
||||
|
oldHome: '', |
||||
|
oldDept: '', |
||||
|
oldAddress: '', |
||||
|
ownerName: '', |
||||
|
name: '', |
||||
|
gender: '', |
||||
|
age: '', |
||||
|
address: '', |
||||
|
outOfTime: '', |
||||
|
welfareFlag: false |
||||
|
}, |
||||
|
|
||||
|
customerId: '',//客户id |
||||
|
userId: '',//操作人员id |
||||
|
gridName: '', |
||||
|
rootAgency: {}, |
||||
|
|
||||
|
casOptions: [], |
||||
|
agencyIdArray: [], |
||||
|
customerList: [], |
||||
|
iscascaderShow: 0, |
||||
|
|
||||
|
optionProps: { |
||||
|
multiple: false, |
||||
|
value: 'agencyId', |
||||
|
label: 'agencyName', |
||||
|
children: 'subAgencyList', |
||||
|
// checkStrictly: true |
||||
|
}, |
||||
|
|
||||
|
selGrid: {}, |
||||
|
|
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
|
||||
|
}, |
||||
|
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' } |
||||
|
] |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
async initForm (row) { |
||||
|
|
||||
|
this.customerId = localStorage.getItem("customerId"); |
||||
|
|
||||
|
this.$refs.ref_form.resetFields(); |
||||
|
|
||||
|
// this.icUserId = row.icResiUserId |
||||
|
this.gridName = row.GRID_ID |
||||
|
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 |
||||
|
|
||||
|
await this.loadHouseInfo(row.HOME_ID_VALUE) |
||||
|
|
||||
|
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) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
//根据人员id获取根组织信息 |
||||
|
async loadRootAgency () { |
||||
|
|
||||
|
await this.$http.post('/gov/org/agency/customerrootagency/' + this.customerId).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
|
||||
|
if (res.data) { |
||||
|
this.rootAgency = res.data |
||||
|
} |
||||
|
}).catch(() => { }) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
async getAgencylist () { |
||||
|
|
||||
|
const url = '/gov/org/customeragency/rootagencygridtree' |
||||
|
|
||||
|
|
||||
|
const params = { |
||||
|
agencyId: this.rootAgency.id |
||||
|
} |
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
if (code === 0) { |
||||
|
++this.iscascaderShow |
||||
|
this.casOptions = [] |
||||
|
this.agencyIdArray.length = [] |
||||
|
|
||||
|
if (data) { |
||||
|
let treeData = [data] |
||||
|
this.resolveAgencyTree(treeData) |
||||
|
this.casOptions.push(data) |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
resolveAgencyTree (treeData) { |
||||
|
treeData.forEach(element => { |
||||
|
if (!element.subAgencyList || element.subAgencyList.length === 0) {//不存在下级,且level=grid的是true |
||||
|
|
||||
|
if (element.level === 'grid') { |
||||
|
element.disabled = false |
||||
|
} else { |
||||
|
element.disabled = true |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
this.resolveAgencyTree(element.subAgencyList) |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
handleChangeAgency () { |
||||
|
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data) |
||||
|
this.selGrid = this.$refs["myCascader"].getCheckedNodes()[0].data |
||||
|
this.dataForm.agencyId = this.selGrid.pid |
||||
|
this.dataForm.gridId = this.selGrid.agencyId |
||||
|
this.dataForm.gridName = this.selGrid.agencyName |
||||
|
this.loadCommunityList() |
||||
|
this.dataForm.villageId = ''//调动到的小区ID |
||||
|
this.dataForm.villageName = '' |
||||
|
this.dataForm.buildId = ''//调动到的楼宇Id |
||||
|
this.dataForm.buildName = '' |
||||
|
this.dataForm.unitId = ''//调动到的单元Id |
||||
|
this.dataForm.unitName = '' |
||||
|
this.dataForm.homeId = '' //调动到的房屋Id |
||||
|
this.dataForm.homeName = '' |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
async loadCommunityList () { |
||||
|
const url = '/gov/org/icneighborhood/neighborhoodoption' |
||||
|
|
||||
|
let params = { |
||||
|
gridId: this.dataForm.gridId, |
||||
|
agencyId: this.dataForm.agencyId |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.communityList = [] |
||||
|
this.communityList = [...data] |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async handleChangeCommunity (id) { |
||||
|
// 小区 |
||||
|
this.communityList.find((item) => { |
||||
|
if (item.value === id) { |
||||
|
this.dataForm.villageName = item.label |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const url = '/gov/org/icbuilding/buildingoption' |
||||
|
|
||||
|
let params = { |
||||
|
neighborHoodId: this.dataForm.villageId |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.buildingList = [] |
||||
|
this.buildingList = [...data] |
||||
|
this.dataForm.buildId = ''//调动到的楼宇Id |
||||
|
this.dataForm.unitId = ''//调动到的单元Id |
||||
|
this.dataForm.homeId = '' //调动到的房屋Id |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async handleChangeBuilding (id) { |
||||
|
|
||||
|
// 楼号 |
||||
|
this.buildingList.find((item) => { |
||||
|
if (item.value === id) { |
||||
|
this.dataForm.buildName = item.label |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const url = '/gov/org/icbuildingunit/unitoption' |
||||
|
|
||||
|
let params = { |
||||
|
buildingId: this.dataForm.buildId |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.unitList = [] |
||||
|
this.unitList = [...data] |
||||
|
this.dataForm.unitId = ''//调动到的单元Id |
||||
|
this.dataForm.homeId = '' //调动到的房屋Id |
||||
|
|
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async handleChangeUnit (id) { |
||||
|
// 单元号 |
||||
|
this.unitList.find((item) => { |
||||
|
if (item.value === id) { |
||||
|
this.dataForm.unitName = item.label |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const url = '/gov/org/ichouse/houseoption' |
||||
|
|
||||
|
let params = { |
||||
|
unitId: this.dataForm.unitId |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.roomList = [] |
||||
|
this.roomList = [...data] |
||||
|
this.dataForm.homeId = '' //调动到的房屋Id |
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async handleChangeHome (id) { |
||||
|
// 房屋号 |
||||
|
this.roomList.find((item) => { |
||||
|
if (item.value === id) { |
||||
|
this.dataForm.homeName = item.label |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
async handleComfirm () { |
||||
|
this.btnDisable = true |
||||
|
setTimeout(() => { |
||||
|
this.btnDisable = false |
||||
|
}, 2000) |
||||
|
this.$refs['ref_form'].validate((valid, messageObj) => { |
||||
|
if (!valid) { |
||||
|
app.util.validateRule(messageObj) |
||||
|
|
||||
|
} else { |
||||
|
if (this.dataForm.type === 'in') { |
||||
|
if (!this.dataForm.buildId) { |
||||
|
this.$message.warning('楼栋') |
||||
|
return false |
||||
|
} |
||||
|
if (!this.dataForm.unitId) { |
||||
|
this.$message.warning('请选择单元') |
||||
|
return false |
||||
|
} |
||||
|
if (!this.dataForm.homeId) { |
||||
|
this.$message.warning('请选择房间') |
||||
|
return false |
||||
|
} |
||||
|
} |
||||
|
this.saveForm() |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
async saveForm () { |
||||
|
const url = '/epmetuser/changeRelocation/saveOutOfInfo' |
||||
|
let noData = new Date() |
||||
|
noData = util.dateFormatter(noData, 'time') |
||||
|
this.dataForm.transferTime = noData |
||||
|
|
||||
|
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() |
||||
|
this.$emit('dialogCancle') |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
resetData () { |
||||
|
this.dataForm = { |
||||
|
icUserId: '', // 被调动人ID |
||||
|
type: 'in',//操作类型【客户外out,客户内in】 |
||||
|
agencyId: '',//调动到的组织Id |
||||
|
gridId: '',//调动到的网格Id |
||||
|
villageId: '',//调动到的小区ID |
||||
|
buildId: '',//调动到的楼宇Id |
||||
|
unitId: '',//调动到的单元Id |
||||
|
homeId: '', //调动到的房屋Id |
||||
|
transferTime: '', //调动时间【日期类型】 |
||||
|
reason: '', //备注 |
||||
|
outOfTime: '', |
||||
|
welfareFlag: false |
||||
|
} |
||||
|
|
||||
|
this.customerId = ''//客户id |
||||
|
this.userId = ''//操作人员id |
||||
|
this.gridName = '' |
||||
|
this.rootAgency = {} |
||||
|
|
||||
|
this.selGrid = {} |
||||
|
|
||||
|
}, |
||||
|
// 开启加载动画 |
||||
|
startLoading () { |
||||
|
loading = Loading.service({ |
||||
|
lock: true, // 是否锁定 |
||||
|
text: '正在加载……', // 加载中需要显示的文字 |
||||
|
background: 'rgba(0,0,0,.7)' // 背景颜色 |
||||
|
}) |
||||
|
}, |
||||
|
// 结束加载动画 |
||||
|
endLoading () { |
||||
|
// clearTimeout(timer); |
||||
|
if (loading) { |
||||
|
loading.close() |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
props: {} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.item_width_1 { |
||||
|
width: 150px; |
||||
|
} |
||||
|
.item_width_2 { |
||||
|
width: 400px; |
||||
|
} |
||||
|
.item_width_3 { |
||||
|
margin-left: 10px; |
||||
|
width: 200px; |
||||
|
} |
||||
|
|
||||
|
.div_btn { |
||||
|
display: flex; |
||||
|
justify-content: flex-end; |
||||
|
} |
||||
|
.resi-cell-col { |
||||
|
width: 750px; |
||||
|
display: flex; |
||||
|
justify-content: flex-start; |
||||
|
} |
||||
|
|
||||
|
.margin_left10 { |
||||
|
margin-left: 10px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,271 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
||||
|
<el-form-item label="姓名" prop="name"> |
||||
|
<el-input v-model="dataForm.name" placeholder="姓名"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="性别" prop="gender"> |
||||
|
<el-input v-model="dataForm.gender" placeholder="性别"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年龄" prop="age"> |
||||
|
<el-input v-model="dataForm.age" placeholder="年龄"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="组织PID" prop="pid"> |
||||
|
<el-input v-model="dataForm.pid" placeholder="组织PID"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="组织ID" prop="agencyId"> |
||||
|
<el-input v-model="dataForm.agencyId" placeholder="组织ID"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="组织名" prop="agencyName"> |
||||
|
<el-input v-model="dataForm.agencyName" placeholder="组织名"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋小区ID" prop="villageId"> |
||||
|
<el-input v-model="dataForm.villageId" placeholder="房屋小区ID"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋小区" prop="villageName"> |
||||
|
<el-input v-model="dataForm.villageName" placeholder="房屋小区"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="楼号ID" prop="buildId"> |
||||
|
<el-input v-model="dataForm.buildId" placeholder="楼号ID"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="楼号" prop="buildName"> |
||||
|
<el-input v-model="dataForm.buildName" placeholder="楼号"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单元ID" prop="unitId"> |
||||
|
<el-input v-model="dataForm.unitId" placeholder="单元ID"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单元" prop="unitName"> |
||||
|
<el-input v-model="dataForm.unitName" placeholder="单元"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋ID" prop="homeId"> |
||||
|
<el-input v-model="dataForm.homeId" placeholder="房屋ID"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋" prop="homeName"> |
||||
|
<el-input v-model="dataForm.homeName" placeholder="房屋"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="外迁详细地址" prop="address"> |
||||
|
<el-input v-model="dataForm.address" placeholder="外迁详细地址"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="操作类型【客户外out,客户内in】" prop="type"> |
||||
|
<el-input v-model="dataForm.type" placeholder="操作类型【客户外out,客户内in】"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="原房主姓名" prop="ownerName"> |
||||
|
<el-input v-model="dataForm.ownerName" placeholder="原房主姓名"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="原网格信息" prop="oldDept"> |
||||
|
<el-input v-model="dataForm.oldDept" placeholder="原网格信息"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="原房屋信息" prop="oldAddress"> |
||||
|
<el-input v-model="dataForm.oldAddress" placeholder="原房屋信息"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="原房间号" prop="oldHome"> |
||||
|
<el-input v-model="dataForm.oldHome" placeholder="原房间号"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="浅出原因" prop="reason"> |
||||
|
<el-input v-model="dataForm.reason" placeholder="浅出原因"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="删除标记 0:未删除,1:已删除" prop="delFlag"> |
||||
|
<el-input v-model="dataForm.delFlag" placeholder="删除标记 0:未删除,1:已删除"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="乐观锁" prop="revision"> |
||||
|
<el-input v-model="dataForm.revision" placeholder="乐观锁"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建人" prop="createdBy"> |
||||
|
<el-input v-model="dataForm.createdBy" placeholder="创建人"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdTime"> |
||||
|
<el-input v-model="dataForm.createdTime" placeholder="创建时间"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新人" prop="updatedBy"> |
||||
|
<el-input v-model="dataForm.updatedBy" placeholder="更新人"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedTime"> |
||||
|
<el-input v-model="dataForm.updatedTime" placeholder="更新时间"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="客户ID" prop="customerId"> |
||||
|
<el-input v-model="dataForm.customerId" placeholder="客户ID"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<template slot="footer"> |
||||
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
||||
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import debounce from 'lodash/debounce' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
name: '', |
||||
|
gender: '', |
||||
|
age: '', |
||||
|
pid: '', |
||||
|
agencyId: '', |
||||
|
agencyName: '', |
||||
|
villageId: '', |
||||
|
villageName: '', |
||||
|
buildId: '', |
||||
|
buildName: '', |
||||
|
unitId: '', |
||||
|
unitName: '', |
||||
|
homeId: '', |
||||
|
homeName: '', |
||||
|
address: '', |
||||
|
type: '', |
||||
|
ownerName: '', |
||||
|
oldDept: '', |
||||
|
oldAddress: '', |
||||
|
oldHome: '', |
||||
|
reason: '', |
||||
|
delFlag: '', |
||||
|
revision: '', |
||||
|
createdBy: '', |
||||
|
createdTime: '', |
||||
|
updatedBy: '', |
||||
|
updatedTime: '', |
||||
|
customerId: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
name: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
gender: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
age: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
pid: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
agencyId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
agencyName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
villageId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
villageName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
buildId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
buildName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
unitId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
unitName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
homeId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
homeName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
address: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
type: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
ownerName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
oldDept: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
oldAddress: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
oldHome: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
reason: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
delFlag: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
revision: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
customerId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/epmetuser/changeRelocation/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
// 表单提交 |
||||
|
dataFormSubmitHandle: debounce(function () { |
||||
|
this.$refs['dataForm'].validate((valid) => { |
||||
|
if (!valid) { |
||||
|
return false |
||||
|
} |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/epmetuser/changeRelocation/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}) |
||||
|
}, 1000, { 'leading': true, 'trailing': false }) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,544 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-change__changeRelocation} resi-container"> |
||||
|
<el-card ref="searchCard" class="search-card"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" label-width="70px"> |
||||
|
<el-form-item label="所属网格" |
||||
|
prop="gridId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.gridId" |
||||
|
placeholder="请选择" |
||||
|
clearable |
||||
|
@change="handleChangeGrid" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsG" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="迁往何地" > |
||||
|
<div class="resi-cell-value"> |
||||
|
<div class="resi-cell-col"> |
||||
|
<el-form-item prop="villageId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.villageId" |
||||
|
placeholder="请选择小区" |
||||
|
clearable |
||||
|
@clear="handleClearVillage" |
||||
|
@change="handleChangeV" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsV" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item prop="buildId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.buildId" |
||||
|
placeholder="楼号" |
||||
|
clearable |
||||
|
style="width: 120px;" |
||||
|
:disabled="changeVDisabled" |
||||
|
@clear="handleClearBuild" |
||||
|
@change="handleChangeB" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsB" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item prop="unitId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.unitId" |
||||
|
:disabled="changeBDisabled" |
||||
|
placeholder="单元" |
||||
|
clearable |
||||
|
style="width: 120px;" |
||||
|
@click="handleClearDan" |
||||
|
@change="handleChangeD" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsD" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item prop="homeId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.homeId" |
||||
|
:disabled="changeDDisabled" |
||||
|
placeholder="房号" |
||||
|
clearable |
||||
|
style="width: 120px;" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsH" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
</div> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<br/> |
||||
|
<el-form-item label="姓名" |
||||
|
prop="name"> |
||||
|
<el-input v-model="dataForm.name" |
||||
|
size="small" |
||||
|
class="list_item_width_1" |
||||
|
clearable |
||||
|
placeholder="请输入姓名"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证" |
||||
|
prop="idCard"> |
||||
|
<el-input v-model="dataForm.idCard" |
||||
|
size="small" |
||||
|
class="list_item_width_1" |
||||
|
clearable |
||||
|
placeholder="请输入身份证"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="手机" |
||||
|
prop="mobile"> |
||||
|
<el-input v-model="dataForm.mobile" |
||||
|
size="small" |
||||
|
class="list_item_width_1" |
||||
|
clearable |
||||
|
placeholder="请输入手机"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<br/> |
||||
|
<el-form-item label="迁出时间" |
||||
|
prop="startTime"> |
||||
|
<el-date-picker v-model="timeRange" |
||||
|
type="daterange" |
||||
|
clearable |
||||
|
size="small" |
||||
|
range-separator="至" |
||||
|
start-placeholder="选择日期" |
||||
|
end-placeholder="选择日期" |
||||
|
value-format="yyyy-MM-dd"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="享受福利" prop="isWelfare"> |
||||
|
<el-select v-model="dataForm.isWelfare" placeholder="请选择" clearable> |
||||
|
<el-option v-for="item in isWelfareArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" size="small" @click="getDataList()">{{ $t('query') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button class="diy-button--reset" size="small" @click="resetForm">重置</el-button> |
||||
|
</el-form-item> |
||||
|
<!--<el-form-item>--> |
||||
|
<!--<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>--> |
||||
|
<!--</el-form-item>--> |
||||
|
<!-- <el-form-item>--> |
||||
|
<!-- <el-button type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
<el-card class="resi-card-table"> |
||||
|
<div class="resi-row-btn"> |
||||
|
<el-button type="warning" size="small" class="diy-button--reset" @click="exportHandle()">{{ $t('export') }}</el-button> |
||||
|
</div> |
||||
|
<el-table class="resi-table" v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%"> |
||||
|
<!--<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>--> |
||||
|
<el-table-column label="序号" |
||||
|
type="index" |
||||
|
fixed="left" |
||||
|
align="center" |
||||
|
width="50"> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="name" label="姓名" header-align="center" align="center" min-width="120" show-overflow-tooltip> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button @click="handleLook(scope.row)" type="text" size="small" class="btn-color-look">{{scope.row.name}}</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="agencyName" label="所属网格" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="oldAddress" label="所属房屋" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="ownerName" label="户主姓名" header-align="center" align="center" min-width="100" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="mobile" label="手机号" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="idCard" label="身份证号" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="gender" label="性别" header-align="center" align="center" min-width="70" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="age" label="年龄" header-align="center" align="center" min-width="90" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="outOfTime" label="迁出时间" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="reason" label="迁出原因" header-align="center" align="center" min-width="100" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="address" label="迁往何地" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
</el-card> |
||||
|
<!-- 弹窗, 新增 / 修改 --> |
||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
||||
|
<people-more v-if="showedPeopleMoreInfo && lookInfo.userId" |
||||
|
:userId="lookInfo.userId" |
||||
|
:gridName="lookInfo.gridName" |
||||
|
@close="handleCancleLook" /> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
import AddOrUpdate from './changerelocation-add-or-update' |
||||
|
import peopleMore from "@/views/modules/shequ/cpts/people-more"; |
||||
|
import { requestPost } from "@/js/dai/request"; |
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/epmetuser/changeRelocation/page', |
||||
|
getDataListIsPage: true, |
||||
|
deleteURL: '/epmetuser/changeRelocation', |
||||
|
deleteIsBatch: true, |
||||
|
exportURL: '/epmetuser/changeRelocation/export' |
||||
|
}, |
||||
|
timeRange: '', |
||||
|
optionsV: [], |
||||
|
optionsB: [], |
||||
|
optionsH: [], |
||||
|
optionsD: [], |
||||
|
optionsG: [], |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
name: '', |
||||
|
mobile: '', |
||||
|
idCard: '', |
||||
|
gridId: '', |
||||
|
villageId: '', |
||||
|
buildId: '', |
||||
|
unitId: '', |
||||
|
homeId: '', |
||||
|
isWelfare: '' |
||||
|
}, |
||||
|
// 显示人员详情 |
||||
|
showedPeopleMoreInfo: false, |
||||
|
lookInfo: { |
||||
|
userId: '', |
||||
|
gridName: '' |
||||
|
}, |
||||
|
isWelfareArr: [ |
||||
|
{ dictValue: '0', dictName: '否' }, |
||||
|
{ dictValue: '1', dictName: '是' } |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
AddOrUpdate, |
||||
|
peopleMore |
||||
|
}, |
||||
|
computed: { |
||||
|
changeVDisabled() { |
||||
|
return !this.dataForm.villageId |
||||
|
}, |
||||
|
changeBDisabled() { |
||||
|
return !this.dataForm.buildId |
||||
|
}, |
||||
|
changeDDisabled() { |
||||
|
return !this.dataForm.unitId |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.getGridList() |
||||
|
this.getValiheList() |
||||
|
}, |
||||
|
watch: { |
||||
|
timeRange (val) { |
||||
|
if (Array.isArray(val) && val.length == 2) { |
||||
|
this.dataForm.startTime = val[0]; |
||||
|
this.dataForm.endTime = val[1]; |
||||
|
} else { |
||||
|
this.dataForm.startTime = ''; |
||||
|
this.dataForm.endTime = ''; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
exportHandle () { |
||||
|
const url = this.mixinViewModuleOptions.exportURL |
||||
|
this.$http({ |
||||
|
method: 'GET', |
||||
|
url, |
||||
|
responseType: 'blob', |
||||
|
params: this.dataForm |
||||
|
}).then(res => { |
||||
|
// this.download(res.data, title + '.xls') |
||||
|
if (res.headers["content-disposition"]) { |
||||
|
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) |
||||
|
console.log('filename', fileName) |
||||
|
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) |
||||
|
var url = window.URL.createObjectURL(blob) |
||||
|
var aLink = document.createElement('a') |
||||
|
aLink.style.display = 'none' |
||||
|
aLink.href = url |
||||
|
aLink.setAttribute('download', fileName) |
||||
|
document.body.appendChild(aLink) |
||||
|
aLink.click() |
||||
|
document.body.removeChild(aLink) //下载完成移除元素 |
||||
|
window.URL.revokeObjectURL(url) //释放掉blob对象 |
||||
|
} else this.$message.error('下载失败') |
||||
|
}).catch(err => { |
||||
|
console.log('err', err) |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
async handleLook (row) { |
||||
|
if(row.agencyId !== ''){ |
||||
|
const url = '/gov/org/grid/griddetail' |
||||
|
let params = { |
||||
|
gridId : row.agencyId, |
||||
|
} |
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
if(code === 0){ |
||||
|
this.lookInfo.gridName = data.gridName |
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}else{ |
||||
|
this.lookInfo.gridName = '' |
||||
|
} |
||||
|
this.lookInfo.userId = row.icUserId |
||||
|
this.showedPeopleMoreInfo = true |
||||
|
}, |
||||
|
handleCancleLook() { |
||||
|
this.lookInfo.userId = '' |
||||
|
this.lookInfo.gridName = '' |
||||
|
this.showedPeopleMoreInfo = false |
||||
|
}, |
||||
|
resetForm(formName) { |
||||
|
for(const n in this.dataForm) { |
||||
|
this.dataForm[n] = '' |
||||
|
} |
||||
|
this.timeRange = '' |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
handleClearVillage() { |
||||
|
this.dataForm.buildId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
}, |
||||
|
handleClearBuild() { |
||||
|
this.dataForm.buildId = '' |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
}, |
||||
|
handleClearDan() { |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
}, |
||||
|
handleChangeGrid(val) { |
||||
|
console.log('val', val) |
||||
|
this.dataForm.villageId = '' |
||||
|
this.dataForm.buildId = '' |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
this.getValiheList() |
||||
|
}, |
||||
|
getGridList() { |
||||
|
const { user } = this.$store.state |
||||
|
this.$http |
||||
|
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsG = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getValiheList() { |
||||
|
const { user } = this.$store.state |
||||
|
this.$http |
||||
|
.post('/gov/org/icneighborhood/neighborhoodoption', { |
||||
|
gridId: this.dataForm.gridId, |
||||
|
agencyId: '' |
||||
|
// agencyId: user.agencyId |
||||
|
}) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsV = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getBuildList() { |
||||
|
this.$http |
||||
|
.post('/gov/org/icbuilding/buildingoption', { |
||||
|
neighborHoodId: this.dataForm.villageId |
||||
|
}) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsB = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getUniList() { |
||||
|
this.$http |
||||
|
.post('/gov/org/icbuildingunit/unitoption', { |
||||
|
buildingId: this.dataForm.buildId |
||||
|
}) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsD = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getHouseList() { |
||||
|
this.$http |
||||
|
.post('/gov/org/ichouse/houseoption', { unitId: this.dataForm.unitId }) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsH = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
handleChangeV(val) { |
||||
|
console.log('val', val) |
||||
|
this.dataForm.buildId = '' |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
this.getBuildList() |
||||
|
}, |
||||
|
handleChangeB(val) { |
||||
|
console.log('val', val) |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
this.getUniList() |
||||
|
}, |
||||
|
handleChangeD(val) { |
||||
|
console.log('val', val) |
||||
|
this.dataForm.homeId = '' |
||||
|
this.getHouseList() |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/assets/scss/buttonstyle.scss"; |
||||
|
|
||||
|
.resi-container .resi-card-table { |
||||
|
::v-deep .el-table th { |
||||
|
color: #fff; |
||||
|
background-color: rgba(33, 149, 254, 1); |
||||
|
// border-right: 1px solid rgba(33, 149, 254, 1); |
||||
|
} |
||||
|
} |
||||
|
.resi-table { |
||||
|
::v-deep .el-button--text { |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
::v-deep .btn-color-del { |
||||
|
margin-left: 10px; |
||||
|
color: rgba(213, 16, 16, 1); |
||||
|
} |
||||
|
::v-deep .btn-color-edit { |
||||
|
color: rgba(0, 167, 169, 1); |
||||
|
} |
||||
|
} |
||||
|
.form-wr { |
||||
|
.input-width { |
||||
|
width: 260px; |
||||
|
|
||||
|
} |
||||
|
.input-width-textarea { |
||||
|
width: 500px; |
||||
|
} |
||||
|
.imsg-list { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
.imgs-item { |
||||
|
position: relative; |
||||
|
margin-right: 10px; |
||||
|
.el-icon-delete { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
right: 0; |
||||
|
font-size: 18px; |
||||
|
color: red; |
||||
|
z-index: 3; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.div-content { |
||||
|
width: 100%; |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
white-space: nowrap; |
||||
|
} |
||||
|
.resi-row-btn { |
||||
|
display: flex; |
||||
|
margin-bottom: 13px; |
||||
|
.el-button { |
||||
|
margin-left: 10px; |
||||
|
border: 0; |
||||
|
} |
||||
|
// .el-button--success { |
||||
|
// background: rgba(34, 193, 195, 1); |
||||
|
// } |
||||
|
// .el-button--warning { |
||||
|
// background: rgba(254, 179, 73, 1); |
||||
|
// } |
||||
|
// .el-button--danger { |
||||
|
// background: rgba(254, 98, 82, 1); |
||||
|
// } |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,201 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
||||
|
<el-form-item label="epmet用户主键" prop="userId"> |
||||
|
<el-input v-model="dataForm.userId" placeholder="epmet用户主键"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="epmet网格ID" prop="gridId"> |
||||
|
<el-input v-model="dataForm.gridId" placeholder="epmet网格ID"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="姓名" prop="name"> |
||||
|
<el-input v-model="dataForm.name" placeholder="姓名"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证" prop="idCard"> |
||||
|
<el-input v-model="dataForm.idCard" placeholder="身份证"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="手机号" prop="mobile"> |
||||
|
<el-input v-model="dataForm.mobile" placeholder="手机号"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="性别 0女 1男" prop="gender"> |
||||
|
<el-input v-model="dataForm.gender" placeholder="性别 0女 1男"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="类型" prop="type"> |
||||
|
<el-input v-model="dataForm.type" placeholder="类型"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="加入时间" prop="joinDate"> |
||||
|
<el-input v-model="dataForm.joinDate" placeholder="加入时间"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="加入原因" prop="joinReason"> |
||||
|
<el-input v-model="dataForm.joinReason" placeholder="加入原因"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="移除时间" prop="removeDate"> |
||||
|
<el-input v-model="dataForm.removeDate" placeholder="移除时间"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="移除原因" prop="removeReason"> |
||||
|
<el-input v-model="dataForm.removeReason" placeholder="移除原因"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="删除标记 0:未删除,1:已删除" prop="delFlag"> |
||||
|
<el-input v-model="dataForm.delFlag" placeholder="删除标记 0:未删除,1:已删除"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="乐观锁" prop="revision"> |
||||
|
<el-input v-model="dataForm.revision" placeholder="乐观锁"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建人" prop="createdBy"> |
||||
|
<el-input v-model="dataForm.createdBy" placeholder="创建人"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdTime"> |
||||
|
<el-input v-model="dataForm.createdTime" placeholder="创建时间"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新人" prop="updatedBy"> |
||||
|
<el-input v-model="dataForm.updatedBy" placeholder="更新人"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedTime"> |
||||
|
<el-input v-model="dataForm.updatedTime" placeholder="更新时间"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="客户ID" prop="customerId"> |
||||
|
<el-input v-model="dataForm.customerId" placeholder="客户ID"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<template slot="footer"> |
||||
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
||||
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import debounce from 'lodash/debounce' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
userId: '', |
||||
|
gridId: '', |
||||
|
name: '', |
||||
|
idCard: '', |
||||
|
mobile: '', |
||||
|
gender: '', |
||||
|
type: '', |
||||
|
joinDate: '', |
||||
|
joinReason: '', |
||||
|
removeDate: '', |
||||
|
removeReason: '', |
||||
|
delFlag: '', |
||||
|
revision: '', |
||||
|
createdBy: '', |
||||
|
createdTime: '', |
||||
|
updatedBy: '', |
||||
|
updatedTime: '', |
||||
|
customerId: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
userId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
gridId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
name: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
idCard: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
mobile: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
gender: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
type: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
joinDate: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
joinReason: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
removeDate: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
removeReason: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
delFlag: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
revision: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
customerId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/change/changeWelfare/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
// 表单提交 |
||||
|
dataFormSubmitHandle: debounce(function () { |
||||
|
this.$refs['dataForm'].validate((valid) => { |
||||
|
if (!valid) { |
||||
|
return false |
||||
|
} |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/change/changeWelfare/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}) |
||||
|
}, 1000, { 'leading': true, 'trailing': false }) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,325 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-rent__rentDeath} resi-container"> |
||||
|
<el-card ref="searchCard" class="search-card"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-form-item label="姓名" |
||||
|
prop="name"> |
||||
|
<el-input v-model="dataForm.name" |
||||
|
size="small" |
||||
|
class="list_item_width_1" |
||||
|
clearable |
||||
|
placeholder="请输入姓名"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证" |
||||
|
prop="idCard"> |
||||
|
<el-input v-model="dataForm.idCard" |
||||
|
size="small" |
||||
|
class="list_item_width_1" |
||||
|
clearable |
||||
|
placeholder="请输入身份证"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="手机" |
||||
|
prop="mobile"> |
||||
|
<el-input v-model="dataForm.mobile" |
||||
|
size="small" |
||||
|
class="list_item_width_1" |
||||
|
clearable |
||||
|
placeholder="请输入手机"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="加入时间" |
||||
|
prop="startTime"> |
||||
|
<el-date-picker v-model="timeRange" |
||||
|
type="daterange" |
||||
|
clearable |
||||
|
size="small" |
||||
|
range-separator="至" |
||||
|
start-placeholder="选择日期" |
||||
|
end-placeholder="选择日期" |
||||
|
value-format="yyyy-MM-dd"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" size="small" @click="getDataList()">{{ $t('query') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button class="diy-button--reset" size="small" @click="resetForm">重置</el-button> |
||||
|
</el-form-item> |
||||
|
<!--<el-form-item>--> |
||||
|
<!--<el-button type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>--> |
||||
|
<!--</el-form-item>--> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
<el-card class="resi-card-table"> |
||||
|
<div class="resi-row-btn"> |
||||
|
<el-button type="warning" size="small" class="diy-button--add" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> |
||||
|
</div> |
||||
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%"> |
||||
|
<!--<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>--> |
||||
|
<el-table-column label="序号" |
||||
|
type="index" |
||||
|
fixed="left" |
||||
|
align="center" |
||||
|
width="50"> |
||||
|
</el-table-column> |
||||
|
<!--<el-table-column prop="id" label="主键" header-align="center" align="center"></el-table-column>--> |
||||
|
<!--<el-table-column prop="userId" label="epmet用户主键" header-align="center" align="center"></el-table-column>--> |
||||
|
<!--<el-table-column prop="gridId" label="epmet网格ID" header-align="center" align="center"></el-table-column>--> |
||||
|
<el-table-column prop="name" label="姓名" header-align="center" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button @click="handleLook(scope.row)" type="text" size="small" class="btn-color-look">{{scope.row.name}}</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="idCard" label="身份证" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="mobile" label="手机号" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="gender" label="性别" header-align="center" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ |
||||
|
scope.row.gender == '2' |
||||
|
? "保密" |
||||
|
: scope.row.gender |
||||
|
}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<!--<el-table-column prop="type" label="类型" header-align="center" align="center"></el-table-column>--> |
||||
|
<el-table-column prop="joinDate" label="加入时间" header-align="center" align="center"></el-table-column> |
||||
|
<!--<el-table-column prop="joinReason" label="加入原因" header-align="center" align="center"></el-table-column>--> |
||||
|
<!--<el-table-column prop="removeDate" label="移除时间" header-align="center" align="center" width="100"></el-table-column>--> |
||||
|
<!--<el-table-column prop="removeReason" label="移除原因" header-align="center" align="center"></el-table-column>--> |
||||
|
<!--<el-table-column prop="createdTime" label="创建时间" header-align="center" align="center"></el-table-column>--> |
||||
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<!--<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>--> |
||||
|
<!--<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>--> |
||||
|
<el-button @click="handleLook(scope.row)" type="text" size="small" class="btn-color-look">查看</el-button> |
||||
|
<el-button @click="removeHandleList(scope.row)" |
||||
|
type="text" |
||||
|
size="small" |
||||
|
class="div-table-button--detail">移除福利人员</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
</el-card> |
||||
|
<!-- 弹窗, 新增 / 修改 --> |
||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
||||
|
<people-more v-if="showedPeopleMoreInfo && lookInfo.userId" |
||||
|
:userId="lookInfo.userId" |
||||
|
:gridName="lookInfo.gridName" |
||||
|
@close="handleCancleLook" /> |
||||
|
<el-dialog |
||||
|
title="移除原因" |
||||
|
:visible.sync="removeVisible" |
||||
|
width="40%"> |
||||
|
<textarea v-model="removeReason" placeholder="请输入移除福利人员的原因" class="blacklist-reason"></textarea> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button @click="removeVisible = false">取 消</el-button> |
||||
|
<el-button type="primary" @click="removeHandle">确 定</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
import AddOrUpdate from './changewelfare-add-or-update' |
||||
|
import peopleMore from "@/views/modules/shequ/cpts/people-more"; |
||||
|
import { requestPost } from "@/js/dai/request"; |
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/epmetuser/changeWelfare/page', |
||||
|
getDataListIsPage: true, |
||||
|
deleteURL: '/epmetuser/changeWelfare', |
||||
|
deleteIsBatch: true |
||||
|
}, |
||||
|
dataForm: { |
||||
|
id: '' |
||||
|
}, |
||||
|
timeRange: '', |
||||
|
// 显示人员详情 |
||||
|
showedPeopleMoreInfo: false, |
||||
|
lookInfo: { |
||||
|
userId: '', |
||||
|
gridName: '' |
||||
|
}, |
||||
|
removeReason: '', |
||||
|
removeVisible: false, |
||||
|
rowData: {}, |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
AddOrUpdate, |
||||
|
peopleMore |
||||
|
}, |
||||
|
watch: { |
||||
|
timeRange (val) { |
||||
|
if (Array.isArray(val) && val.length == 2) { |
||||
|
this.dataForm.startTime = val[0]; |
||||
|
this.dataForm.endTime = val[1]; |
||||
|
} else { |
||||
|
this.dataForm.startTime = ""; |
||||
|
this.dataForm.endTime = ""; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
resetForm(formName) { |
||||
|
for(const n in this.dataForm) { |
||||
|
this.dataForm[n] = '' |
||||
|
} |
||||
|
this.timeRange = '' |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
async handleLook (row) { |
||||
|
if(row.gridId !== ''){ |
||||
|
const url = '/gov/org/grid/griddetail' |
||||
|
let params = { |
||||
|
gridId : row.gridId, |
||||
|
} |
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
if(code === 0){ |
||||
|
this.lookInfo.gridName = data.gridName |
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}else{ |
||||
|
this.lookInfo.gridName = '' |
||||
|
} |
||||
|
if(row.userId === '' || row.userId === null){ |
||||
|
this.$message.error('未查询到该用户的相关信息') |
||||
|
return false |
||||
|
} |
||||
|
this.lookInfo.userId = row.userId |
||||
|
this.showedPeopleMoreInfo = true |
||||
|
}, |
||||
|
handleCancleLook() { |
||||
|
this.lookInfo.userId = '' |
||||
|
this.lookInfo.gridName = '' |
||||
|
this.showedPeopleMoreInfo = false |
||||
|
}, |
||||
|
removeHandleList (row) { |
||||
|
this.removeVisible = true |
||||
|
this.removeReason = '' |
||||
|
this.rowData = { ...row } |
||||
|
}, |
||||
|
removeHandle () { |
||||
|
const params = { |
||||
|
id: this.rowData.id, |
||||
|
removeReason: this.removeReason |
||||
|
} |
||||
|
this.$http.post('/epmetuser/changeWelfare/removeWelfare', params).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.removeVisible = false |
||||
|
this.getDataList() |
||||
|
} |
||||
|
}) |
||||
|
}).catch(err => { |
||||
|
this.$message.error(err.message) |
||||
|
}) |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/assets/scss/buttonstyle.scss"; |
||||
|
|
||||
|
.resi-container .resi-card-table { |
||||
|
::v-deep .el-table th { |
||||
|
color: #fff; |
||||
|
background-color: rgba(33, 149, 254, 1); |
||||
|
// border-right: 1px solid rgba(33, 149, 254, 1); |
||||
|
} |
||||
|
} |
||||
|
.resi-table { |
||||
|
::v-deep .el-button--text { |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
::v-deep .btn-color-del { |
||||
|
margin-left: 10px; |
||||
|
color: rgba(213, 16, 16, 1); |
||||
|
} |
||||
|
::v-deep .btn-color-edit { |
||||
|
color: rgba(0, 167, 169, 1); |
||||
|
} |
||||
|
} |
||||
|
.form-wr { |
||||
|
.input-width { |
||||
|
width: 260px; |
||||
|
|
||||
|
} |
||||
|
.input-width-textarea { |
||||
|
width: 500px; |
||||
|
} |
||||
|
.imsg-list { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
.imgs-item { |
||||
|
position: relative; |
||||
|
margin-right: 10px; |
||||
|
.el-icon-delete { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
right: 0; |
||||
|
font-size: 18px; |
||||
|
color: red; |
||||
|
z-index: 3; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.div-content { |
||||
|
width: 100%; |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
white-space: nowrap; |
||||
|
} |
||||
|
.blacklist-reason { |
||||
|
width: 100%; |
||||
|
height: 80px; |
||||
|
border: 1px solid #e4e4e4; |
||||
|
border-radius: 4px; |
||||
|
resize: none; |
||||
|
padding: 8px; |
||||
|
box-sizing: border-box; |
||||
|
} |
||||
|
.resi-row-btn { |
||||
|
display: flex; |
||||
|
margin-bottom: 13px; |
||||
|
.el-button { |
||||
|
margin-left: 10px; |
||||
|
border: 0; |
||||
|
} |
||||
|
// .el-button--success { |
||||
|
// background: rgba(34, 193, 195, 1); |
||||
|
// } |
||||
|
// .el-button--warning { |
||||
|
// background: rgba(254, 179, 73, 1); |
||||
|
// } |
||||
|
// .el-button--danger { |
||||
|
// background: rgba(254, 98, 82, 1); |
||||
|
// } |
||||
|
} |
||||
|
</style> |
||||
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,272 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : '查看'" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px" disabled> |
||||
|
<el-form-item label="房屋类型" prop="houseType"> |
||||
|
<el-select v-model="dataForm.houseType" placeholder="房屋类型" clearable> |
||||
|
<el-option v-for="item in houseTypeArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="用途" prop="purpose"> |
||||
|
<el-select v-model="dataForm.purpose" placeholder="用途" clearable> |
||||
|
<el-option v-for="item in purposeArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋状态" prop="rentFlag"> |
||||
|
<el-select v-model="dataForm.rentFlag" placeholder="房屋状态" clearable> |
||||
|
<el-option v-for="item in rentFlagArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房主姓名" prop="ownerName"> |
||||
|
<el-input v-model="dataForm.ownerName" placeholder="房主姓名"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房主电话" prop="ownerPhone"> |
||||
|
<el-input v-model="dataForm.ownerPhone" placeholder="房主电话"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房主身份证号" prop="ownerIdCard"> |
||||
|
<el-input v-model="dataForm.ownerIdCard" placeholder="房主身份证号"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="网格" prop="gridName"> |
||||
|
<el-input v-model="dataForm.gridName" placeholder="网格"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋小区" prop="villageName"> |
||||
|
<el-input v-model="dataForm.villageName" placeholder="房屋小区"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="楼号" prop="buildName"> |
||||
|
<el-input v-model="dataForm.buildName" placeholder="楼号"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单元" prop="unitName"> |
||||
|
<el-input v-model="dataForm.unitName" placeholder="单元"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋" prop="homeName"> |
||||
|
<el-input v-model="dataForm.homeName" placeholder="房屋"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="购房日期" prop="purchaseDate"> |
||||
|
<el-date-picker v-model="dataForm.purchaseDate" |
||||
|
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> |
||||
|
<template slot="footer"> |
||||
|
<el-button type="primary" size="small" @click="visible = false">{{ '返回' }}</el-button> |
||||
|
<!--<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>--> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import debounce from 'lodash/debounce' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
customerId: '', |
||||
|
neighborHoodId: '', |
||||
|
partId: '', |
||||
|
buildingId: '', |
||||
|
buildingUnitId: '', |
||||
|
houseName: '', |
||||
|
doorName: '', |
||||
|
houseType: '', |
||||
|
purpose: '', |
||||
|
rentFlag: '', |
||||
|
ownerName: '', |
||||
|
ownerPhone: '', |
||||
|
ownerIdCard: '', |
||||
|
sort: '', |
||||
|
communityId: '', |
||||
|
communityName: '', |
||||
|
gridId: '', |
||||
|
gridName: '', |
||||
|
villageId: '', |
||||
|
villageName: '', |
||||
|
buildId: '', |
||||
|
buildName: '', |
||||
|
unitId: '', |
||||
|
unitName: '', |
||||
|
homeId: '', |
||||
|
homeName: '', |
||||
|
purchaseDate: '' |
||||
|
}, |
||||
|
houseTypeArr: [ |
||||
|
{ dictValue: '1', dictName: '楼房' }, |
||||
|
{ dictValue: '2', dictName: '平房' }, |
||||
|
{ dictValue: '3', dictName: '别墅' } |
||||
|
], |
||||
|
rentFlagArr: [ |
||||
|
{ dictValue: 0, dictName: '自住' }, |
||||
|
{ dictValue: 1, dictName: '出租' }, |
||||
|
{ dictValue: 2, dictName: '闲置' } |
||||
|
], |
||||
|
purposeArr: [ |
||||
|
{ dictValue: '1', dictName: '住宅' }, |
||||
|
{ dictValue: '2', dictName: '商业' }, |
||||
|
{ dictValue: '3', dictName: '办公' }, |
||||
|
{ dictValue: '4', dictName: '工业' }, |
||||
|
{ dictValue: '5', dictName: '仓储' }, |
||||
|
{ dictValue: '6', dictName: '商住混用' }, |
||||
|
{ dictValue: '7', dictName: '其他' } |
||||
|
], |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
customerId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
neighborHoodId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
partId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
buildingId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
buildingUnitId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
houseName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
doorName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
houseType: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
purpose: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
rentFlag: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
ownerName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
ownerPhone: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
ownerIdCard: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
sort: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
delFlag: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
revision: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
communityId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
communityName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
gridId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
gridName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
villageId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
villageName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
buildId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
buildName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
unitId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
unitName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
homeId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
homeName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
purchaseDate: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/pli/power/rentHouse/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
// 表单提交 |
||||
|
dataFormSubmitHandle: debounce(function () { |
||||
|
this.$refs['dataForm'].validate((valid) => { |
||||
|
if (!valid) { |
||||
|
return false |
||||
|
} |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/pli/power/rentHouse/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}) |
||||
|
}, 1000, { 'leading': true, 'trailing': false }) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,514 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-rent__rentHouse}"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" label-width="70px"> |
||||
|
<el-form-item label="所属网格" |
||||
|
prop="gridId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.gridId" |
||||
|
placeholder="请选择" |
||||
|
clearable |
||||
|
@change="handleChangeGrid" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsG" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="所属房屋" > |
||||
|
<div class="resi-cell-value"> |
||||
|
<div class="resi-cell-col"> |
||||
|
<el-form-item prop="villageId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.villageId" |
||||
|
placeholder="请选择小区" |
||||
|
clearable |
||||
|
@clear="handleClearVillage" |
||||
|
@change="handleChangeV" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsV" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item prop="buildId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.buildId" |
||||
|
placeholder="楼号" |
||||
|
clearable |
||||
|
style="width: 120px;" |
||||
|
:disabled="changeVDisabled" |
||||
|
@clear="handleClearBuild" |
||||
|
@change="handleChangeB" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsB" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item prop="unitId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.unitId" |
||||
|
:disabled="changeBDisabled" |
||||
|
placeholder="单元" |
||||
|
clearable |
||||
|
style="width: 120px;" |
||||
|
@click="handleClearDan" |
||||
|
@change="handleChangeD" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsD" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item prop="homeId"> |
||||
|
<el-select |
||||
|
v-model.trim="dataForm.homeId" |
||||
|
:disabled="changeDDisabled" |
||||
|
placeholder="房号" |
||||
|
clearable |
||||
|
style="width: 120px;" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsH" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
</div> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<br/> |
||||
|
<el-form-item label="姓名" |
||||
|
prop="ownerName"> |
||||
|
<el-input v-model="dataForm.ownerName" |
||||
|
size="small" |
||||
|
class="list_item_width_1" |
||||
|
clearable |
||||
|
placeholder="请输入姓名"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证" |
||||
|
prop="ownerIdCard"> |
||||
|
<el-input v-model="dataForm.ownerIdCard" |
||||
|
size="small" |
||||
|
class="list_item_width_1" |
||||
|
clearable |
||||
|
placeholder="请输入身份证"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="手机" |
||||
|
prop="ownerPhone"> |
||||
|
<el-input v-model="dataForm.ownerPhone" |
||||
|
size="small" |
||||
|
class="list_item_width_1" |
||||
|
clearable |
||||
|
placeholder="请输入手机"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<br/> |
||||
|
<el-form-item label="房屋状态" prop="rentFlag"> |
||||
|
<el-select v-model="dataForm.rentFlag" placeholder="房屋状态" clearable> |
||||
|
<el-option v-for="item in rentFlagArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="购房时间" |
||||
|
prop="startTime"> |
||||
|
<el-date-picker v-model="timeRange" |
||||
|
type="daterange" |
||||
|
clearable |
||||
|
size="small" |
||||
|
range-separator="至" |
||||
|
start-placeholder="选择日期" |
||||
|
end-placeholder="选择日期" |
||||
|
value-format="yyyy-MM-dd"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" size="small" @click="getDataList()">{{ $t('query') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button class="diy-button--reset" size="small" @click="resetForm">重置</el-button> |
||||
|
</el-form-item> |
||||
|
<br/> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" size="small" @click="handleEdit()">{{ '购房登记' }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="warning" size="small" @click="exportHandle()">{{ $t('export') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<!--<el-form-item>--> |
||||
|
<!--<el-button type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>--> |
||||
|
<!--</el-form-item>--> |
||||
|
</el-form> |
||||
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%"> |
||||
|
<el-table-column label="序号" |
||||
|
type="index" |
||||
|
fixed="left" |
||||
|
align="center" |
||||
|
width="50"> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="villageName" label="所属小区" header-align="center" align="center" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="buildName" label="所属楼栋" header-align="center" align="center" min-width="70" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="unitName" label="单元号" header-align="center" align="center" min-width="70" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="homeName" label="门牌号" header-align="center" align="center" min-width="70" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="houseType" label="房屋类型" header-align="center" align="center" min-width="70" show-overflow-tooltip> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ |
||||
|
scope.row.houseType == '1' |
||||
|
? "楼房" |
||||
|
: scope.row.houseType == '2' |
||||
|
? "平房" |
||||
|
: scope.row.houseType == '3' |
||||
|
? "别墅" |
||||
|
: "" |
||||
|
}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="purpose" label="用途" header-align="center" align="center" min-width="70" show-overflow-tooltip> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ |
||||
|
scope.row.purpose == '1' |
||||
|
? "住宅" |
||||
|
: scope.row.purpose == '2' |
||||
|
? "商业" |
||||
|
: scope.row.purpose == '3' |
||||
|
? "办公" |
||||
|
: scope.row.purpose == '4' |
||||
|
? "工业" |
||||
|
: scope.row.purpose == '5' |
||||
|
? "仓储" |
||||
|
: scope.row.purpose == '6' |
||||
|
? "商住混用" |
||||
|
: scope.row.purpose == '7' |
||||
|
? "其他" |
||||
|
: "" |
||||
|
}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="rentFlag" label="房屋状态" header-align="center" align="center" min-width="70" show-overflow-tooltip> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ |
||||
|
scope.row.rentFlag == 1 |
||||
|
? "出租" |
||||
|
: scope.row.rentFlag == 2 |
||||
|
? "闲置" |
||||
|
: scope.row.rentFlag == 0 |
||||
|
? "自住" |
||||
|
: "" |
||||
|
}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="ownerName" label="房主姓名" header-align="center" align="center" min-width="70" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="ownerPhone" label="房主电话" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="ownerIdCard" label="房主身份证号" header-align="center" align="center" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column prop="purchaseDate" label="购房日期" header-align="center" align="center" min-width="100" show-overflow-tooltip></el-table-column> |
||||
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ '查看' }}</el-button> |
||||
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
<!-- 弹窗, 新增 / 修改 --> |
||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
||||
|
<!-- 购房登记弹出框 --> |
||||
|
<el-dialog :visible.sync="formShow" |
||||
|
:close-on-click-modal="false" |
||||
|
:close-on-press-escape="false" |
||||
|
:title="formTitle" |
||||
|
width="900px" |
||||
|
top="5vh" |
||||
|
class="dialog-h" |
||||
|
@closed="diaClose"> |
||||
|
<room-form ref="ref_form" |
||||
|
@dialogCancle="addFormCancle" |
||||
|
@dialogOk="addFormOk"></room-form> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
import AddOrUpdate from './renthouse-add-or-update' |
||||
|
import roomForm from './renthouseForm' |
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/pli/power/rentHouse/page', |
||||
|
getDataListIsPage: true, |
||||
|
deleteURL: '/pli/power/rentHouse/delete', |
||||
|
deleteIsBatch: true, |
||||
|
exportURL: '/pli/power/rentHouse/export' |
||||
|
}, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
name: '', |
||||
|
mobile: '', |
||||
|
idCard: '', |
||||
|
gridId: '', |
||||
|
villageId: '', |
||||
|
buildId: '', |
||||
|
unitId: '', |
||||
|
homeId: '', |
||||
|
rentFlag: '' |
||||
|
}, |
||||
|
timeRange: '', |
||||
|
optionsV: [], |
||||
|
optionsB: [], |
||||
|
optionsH: [], |
||||
|
optionsD: [], |
||||
|
optionsG: [], |
||||
|
rentFlagArr: [ |
||||
|
{ dictValue: 0, dictName: '自住' }, |
||||
|
{ dictValue: 1, dictName: '出租' }, |
||||
|
{ dictValue: 2, dictName: '闲置' } |
||||
|
], |
||||
|
//form相关 |
||||
|
formShow: false, |
||||
|
formTitle: '购房登记', |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
AddOrUpdate, |
||||
|
roomForm |
||||
|
}, |
||||
|
computed: { |
||||
|
changeVDisabled() { |
||||
|
return !this.dataForm.villageId |
||||
|
}, |
||||
|
changeBDisabled() { |
||||
|
return !this.dataForm.buildId |
||||
|
}, |
||||
|
changeDDisabled() { |
||||
|
return !this.dataForm.unitId |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.getGridList() |
||||
|
this.getValiheList() |
||||
|
}, |
||||
|
watch: { |
||||
|
timeRange (val) { |
||||
|
if (Array.isArray(val) && val.length == 2) { |
||||
|
this.dataForm.startTime = val[0]; |
||||
|
this.dataForm.endTime = val[1]; |
||||
|
} else { |
||||
|
this.dataForm.startTime = ''; |
||||
|
this.dataForm.endTime = ''; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
diaClose(){ |
||||
|
|
||||
|
}, |
||||
|
exportHandle () { |
||||
|
const url = this.mixinViewModuleOptions.exportURL |
||||
|
this.$http({ |
||||
|
method: 'GET', |
||||
|
url, |
||||
|
responseType: 'blob', |
||||
|
params: this.dataForm |
||||
|
}).then(res => { |
||||
|
// this.download(res.data, title + '.xls') |
||||
|
if (res.headers["content-disposition"]) { |
||||
|
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) |
||||
|
console.log('filename', fileName) |
||||
|
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) |
||||
|
var url = window.URL.createObjectURL(blob) |
||||
|
var aLink = document.createElement('a') |
||||
|
aLink.style.display = 'none' |
||||
|
aLink.href = url |
||||
|
aLink.setAttribute('download', fileName) |
||||
|
document.body.appendChild(aLink) |
||||
|
aLink.click() |
||||
|
document.body.removeChild(aLink) //下载完成移除元素 |
||||
|
window.URL.revokeObjectURL(url) //释放掉blob对象 |
||||
|
} else this.$message.error('下载失败') |
||||
|
}).catch(err => { |
||||
|
console.log('err', err) |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
addFormCancle () { |
||||
|
this.formShow = false |
||||
|
}, |
||||
|
addFormOk () { |
||||
|
this.formShow = false |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
handleEdit (row) { |
||||
|
this.formTitle = '购房登记' |
||||
|
this.formShow = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.ref_form.initForm('add', row, '') |
||||
|
}) |
||||
|
}, |
||||
|
resetForm(formName) { |
||||
|
for(const n in this.dataForm) { |
||||
|
this.dataForm[n] = '' |
||||
|
} |
||||
|
this.timeRange = '' |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
handleClearVillage() { |
||||
|
this.dataForm.buildId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
}, |
||||
|
handleClearBuild() { |
||||
|
this.dataForm.buildId = '' |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
}, |
||||
|
handleClearDan() { |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
}, |
||||
|
handleChangeGrid(val) { |
||||
|
console.log('val', val) |
||||
|
this.dataForm.villageId = '' |
||||
|
this.dataForm.buildId = '' |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
this.getValiheList() |
||||
|
}, |
||||
|
getGridList() { |
||||
|
const { user } = this.$store.state |
||||
|
this.$http |
||||
|
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsG = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getValiheList() { |
||||
|
const { user } = this.$store.state |
||||
|
this.$http |
||||
|
.post('/gov/org/icneighborhood/neighborhoodoption', { |
||||
|
gridId: this.dataForm.gridId, |
||||
|
agencyId: '' |
||||
|
// agencyId: user.agencyId |
||||
|
}) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsV = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getBuildList() { |
||||
|
this.$http |
||||
|
.post('/gov/org/icbuilding/buildingoption', { |
||||
|
neighborHoodId: this.dataForm.villageId |
||||
|
}) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsB = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getUniList() { |
||||
|
this.$http |
||||
|
.post('/gov/org/icbuildingunit/unitoption', { |
||||
|
buildingId: this.dataForm.buildId |
||||
|
}) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsD = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getHouseList() { |
||||
|
this.$http |
||||
|
.post('/gov/org/ichouse/houseoption', { unitId: this.dataForm.unitId }) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsH = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
handleChangeV(val) { |
||||
|
console.log('val', val) |
||||
|
this.dataForm.buildId = '' |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
this.getBuildList() |
||||
|
}, |
||||
|
handleChangeB(val) { |
||||
|
console.log('val', val) |
||||
|
this.dataForm.unitId = '' |
||||
|
this.dataForm.homeId = '' |
||||
|
this.getUniList() |
||||
|
}, |
||||
|
handleChangeD(val) { |
||||
|
console.log('val', val) |
||||
|
this.dataForm.homeId = '' |
||||
|
this.getHouseList() |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,607 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div class="dialog-h-content scroll-h"> |
||||
|
<el-form ref="ref_form" |
||||
|
:inline="true" |
||||
|
:model="dataForm" |
||||
|
:rules="dataRule" |
||||
|
:disabled="formType === 'detail'" |
||||
|
class="form"> |
||||
|
|
||||
|
<el-form-item label="所属网格" |
||||
|
prop="gridId" label-width="150px"> |
||||
|
<el-select |
||||
|
v-model.trim="gridId" |
||||
|
placeholder="请选择" |
||||
|
clearable |
||||
|
@change="handleChangeGrid" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsG" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="所属房屋" label-width="150px" prop="villageId"> |
||||
|
<div class="resi-cell-value"> |
||||
|
<div class="resi-cell-col"> |
||||
|
<el-form-item prop="villageId"> |
||||
|
<el-select |
||||
|
v-model.trim="villageId" |
||||
|
placeholder="请选择小区" |
||||
|
clearable |
||||
|
@clear="handleClearVillage" |
||||
|
@change="handleChangeV" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsV" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item prop="buildId"> |
||||
|
<el-select |
||||
|
v-model.trim="buildId" |
||||
|
placeholder="楼号" |
||||
|
style="width: 120px;" |
||||
|
:disabled="changeVDisabled" |
||||
|
@clear="handleClearBuild" |
||||
|
@change="handleChangeB" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsB" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item prop="unitId"> |
||||
|
<el-select |
||||
|
v-model.trim="unitId" |
||||
|
:disabled="changeBDisabled" |
||||
|
placeholder="单元" |
||||
|
style="width: 120px;" |
||||
|
@click="handleClearDan" |
||||
|
@change="handleChangeD" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsD" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item prop="homeId"> |
||||
|
<el-select |
||||
|
v-model.trim="homeId" |
||||
|
:disabled="changeDDisabled" |
||||
|
placeholder="房号" |
||||
|
style="width: 120px;" |
||||
|
@change="homeIdHandleChange" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsH" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
</div> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="购房时间" prop="purchaseDate" label-width="150px"> |
||||
|
<el-date-picker v-model="dataForm.purchaseDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
format="yyyy-MM-dd" |
||||
|
placeholder="选择日期" |
||||
|
style="width:200px" |
||||
|
:clearable="false"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋状态" |
||||
|
prop="rentFlag" |
||||
|
label-width="150px" |
||||
|
style="display: block"> |
||||
|
<el-radio-group v-model="rentFlag"> |
||||
|
|
||||
|
<el-radio :label="1">出租</el-radio> |
||||
|
<el-radio :label="2">闲置</el-radio> |
||||
|
<el-radio :label="0">自住</el-radio> |
||||
|
|
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="房主姓名" |
||||
|
prop="ownerName" |
||||
|
label-width="150px" |
||||
|
style="display: block"> |
||||
|
<el-input class="item_width_1" |
||||
|
placeholder="请输入房主姓名" |
||||
|
v-model="dataForm.ownerName"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房主电话" |
||||
|
prop="ownerPhone" |
||||
|
label-width="150px" |
||||
|
style="display: block"> |
||||
|
<el-input class="item_width_1" |
||||
|
type='number' |
||||
|
placeholder="请输入房主电话" |
||||
|
v-model="dataForm.ownerPhone"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房主身份证" |
||||
|
prop="ownerIdCard" |
||||
|
label-width="150px" |
||||
|
style="display: block"> |
||||
|
<el-input class="item_width_1" |
||||
|
placeholder="请输入房主身份证" |
||||
|
v-model="dataForm.ownerIdCard"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=" " prop="needUpdate" label-width="150px"> |
||||
|
<el-checkbox v-model="needUpdate">更新房屋信息</el-checkbox> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
</div> |
||||
|
<div class="div_btn"> |
||||
|
<el-button size="small" |
||||
|
@click="handleCancle">取 消</el-button> |
||||
|
<el-button size="small" |
||||
|
v-if="formType != 'detail'" |
||||
|
type="primary" |
||||
|
:disabled="btnDisable" |
||||
|
@click="handleComfirm">确 定</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapGetters } from 'vuex' |
||||
|
import { Loading } from 'element-ui' // 引入Loading服务 |
||||
|
import { requestPost, requestGet } from '@/js/dai/request' |
||||
|
|
||||
|
|
||||
|
let loading // 加载动画 |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 |
||||
|
btnDisable: false, |
||||
|
|
||||
|
houseId: '', //房屋ID |
||||
|
houseType: '1', |
||||
|
purpose: '1', |
||||
|
rentFlag: 1, |
||||
|
dataForm: { |
||||
|
neighborHoodId: '', // 所属小区ID |
||||
|
buildingId: '',//所属楼栋ID |
||||
|
buildingUnitId: '',//所属单元ID |
||||
|
doorName: '',//门牌号 |
||||
|
houseType: '',//房屋类型【楼房,平房,别墅】 |
||||
|
purpose: '',//房屋用途【住宅,商业,办公,工业,仓储,商住混用,其他】 |
||||
|
rentFlag: 1,//房屋状态【是:1,否:0】 出租1、闲置2、自住 0 |
||||
|
ownerPhone: '', //房主电话 |
||||
|
ownerName: '', //房主名字 |
||||
|
ownerIdCard: '', //房主身份证 |
||||
|
needUpdate: false, |
||||
|
purchaseDate: '', |
||||
|
villageId: '', |
||||
|
buildId: '', |
||||
|
unitId: '' |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
keyWords: '', |
||||
|
agencyObj: {}, |
||||
|
|
||||
|
optionsV: [], |
||||
|
optionsB: [], |
||||
|
optionsH: [], |
||||
|
optionsD: [], |
||||
|
optionsG: [], |
||||
|
|
||||
|
gridId: '', |
||||
|
gridName: '', |
||||
|
villageId: '', |
||||
|
villageName: '', |
||||
|
buildId: '', |
||||
|
buildName: '', |
||||
|
unitId: '', |
||||
|
unitName: '', |
||||
|
homeId: '', |
||||
|
homeName: '', |
||||
|
needUpdate: false |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
buildingUnitId: [ |
||||
|
{ required: true, message: '所属单元不能为空', trigger: 'blur' }, |
||||
|
], |
||||
|
doorName: [ |
||||
|
{ required: true, message: '门牌号不能为空', trigger: 'blur' } |
||||
|
], |
||||
|
houseType: [ |
||||
|
{ required: true, message: '房屋类型不能为空', trigger: 'blur' } |
||||
|
], |
||||
|
purpose: [ |
||||
|
{ required: true, message: '房屋用途不能为空', trigger: 'blur' } |
||||
|
], |
||||
|
rentFlag: [ |
||||
|
{ required: true, message: '是否出租不能为空', trigger: 'blur' } |
||||
|
], |
||||
|
ownerPhone: [ |
||||
|
{ required: false } |
||||
|
], |
||||
|
ownerName: [ |
||||
|
{ required: false } |
||||
|
], |
||||
|
ownerIdCard: [ |
||||
|
{ required: false } |
||||
|
], |
||||
|
villageId: [ |
||||
|
{ required: true, message: '所属房屋不能为空', trigger: 'blur' } |
||||
|
], |
||||
|
gridId: [ |
||||
|
{ required: true, message: '所属网格不能为空', trigger: 'blur' } |
||||
|
], |
||||
|
purchaseDate: [ |
||||
|
{ required: true, message: '购房时间不能为空', trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
changeVDisabled() { |
||||
|
return !this.villageId |
||||
|
}, |
||||
|
changeBDisabled() { |
||||
|
return !this.buildId |
||||
|
}, |
||||
|
changeDDisabled() { |
||||
|
return !this.unitId |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
created () { |
||||
|
this.getGridList() |
||||
|
this.getValiheList() |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
handleCancle () { |
||||
|
this.resetData() |
||||
|
this.$emit('dialogCancle') |
||||
|
|
||||
|
}, |
||||
|
async initForm (type, row, agencyObj) { |
||||
|
|
||||
|
this.$refs.ref_form.resetFields(); |
||||
|
this.resetData() |
||||
|
this.formType = type |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
async loadHouseInfo () { |
||||
|
if(this.houseId === '' || this.houseId === null){ |
||||
|
this.$message.error('请选择房号') |
||||
|
return false |
||||
|
} |
||||
|
|
||||
|
const url = "/gov/org/ichouse/" + this.houseId |
||||
|
|
||||
|
const { data, code, msg } = await requestGet(url) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
// debugger |
||||
|
this.dataForm = { ...data } |
||||
|
|
||||
|
this.houseType = this.dataForm.houseType |
||||
|
this.purpose = this.dataForm.purpose |
||||
|
this.rentFlag = parseInt(this.dataForm.rentFlag) |
||||
|
|
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
handleClearVillage() { |
||||
|
this.buildId = '' |
||||
|
this.homeId = '' |
||||
|
}, |
||||
|
handleClearBuild() { |
||||
|
this.buildId = '' |
||||
|
this.unitId = '' |
||||
|
this.homeId = '' |
||||
|
}, |
||||
|
handleClearDan() { |
||||
|
this.unitId = '' |
||||
|
this.homeId = '' |
||||
|
}, |
||||
|
handleChangeGrid(val) { |
||||
|
// 网格 |
||||
|
this.optionsG.find((item) => { |
||||
|
if (item.value === val) { |
||||
|
this.gridName = item.label |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
console.log('val', val) |
||||
|
this.villageId = '' |
||||
|
this.buildId = '' |
||||
|
this.unitId = '' |
||||
|
this.homeId = '' |
||||
|
this.getValiheList() |
||||
|
}, |
||||
|
getGridList() { |
||||
|
const { user } = this.$store.state |
||||
|
this.$http |
||||
|
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsG = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getValiheList() { |
||||
|
const { user } = this.$store.state |
||||
|
this.$http |
||||
|
.post('/gov/org/icneighborhood/neighborhoodoption', { |
||||
|
gridId: this.gridId, |
||||
|
agencyId: '' |
||||
|
// agencyId: user.agencyId |
||||
|
}) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsV = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getBuildList() { |
||||
|
this.$http |
||||
|
.post('/gov/org/icbuilding/buildingoption', { |
||||
|
neighborHoodId: this.villageId |
||||
|
}) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsB = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getUniList() { |
||||
|
this.$http |
||||
|
.post('/gov/org/icbuildingunit/unitoption', { |
||||
|
buildingId: this.buildId |
||||
|
}) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsD = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
getHouseList() { |
||||
|
this.$http |
||||
|
.post('/gov/org/ichouse/houseoption', { unitId: this.unitId }) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} else { |
||||
|
console.log('获取查询详情成功', res.data) |
||||
|
this.optionsH = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
return this.$message.error('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
handleChangeV(val) { |
||||
|
// 小区 |
||||
|
this.optionsV.find((item) => { |
||||
|
if (item.value === val) { |
||||
|
this.villageName = item.label |
||||
|
} |
||||
|
}) |
||||
|
console.log('val', val) |
||||
|
this.buildId = '' |
||||
|
this.unitId = '' |
||||
|
this.homeId = '' |
||||
|
this.getBuildList() |
||||
|
}, |
||||
|
handleChangeB(val) { |
||||
|
// 楼号 |
||||
|
this.optionsB.find((item) => { |
||||
|
if (item.value === val) { |
||||
|
this.buildName = item.label |
||||
|
} |
||||
|
}) |
||||
|
console.log('val', val) |
||||
|
this.unitId = '' |
||||
|
this.homeId = '' |
||||
|
this.getUniList() |
||||
|
}, |
||||
|
handleChangeD(val) { |
||||
|
// 单元号 |
||||
|
this.optionsD.find((item) => { |
||||
|
if (item.value === val) { |
||||
|
this.unitName = item.label |
||||
|
} |
||||
|
}) |
||||
|
console.log('val', val) |
||||
|
this.homeId = '' |
||||
|
this.getHouseList() |
||||
|
}, |
||||
|
homeIdHandleChange(val){ |
||||
|
// 房间号 |
||||
|
this.optionsH.find((item) => { |
||||
|
if (item.value === val) { |
||||
|
this.homeName = item.label |
||||
|
} |
||||
|
}) |
||||
|
this.houseId = val |
||||
|
this.loadHouseInfo() |
||||
|
}, |
||||
|
|
||||
|
async handleComfirm () { |
||||
|
this.btnDisable = true |
||||
|
setTimeout(() => { |
||||
|
this.btnDisable = false |
||||
|
}, 10000) |
||||
|
|
||||
|
this.dataForm.houseType = this.houseType |
||||
|
this.dataForm.purpose = this.purpose |
||||
|
this.dataForm.rentFlag = this.rentFlag |
||||
|
|
||||
|
// 小区到房号赋值 |
||||
|
this.dataForm.gridId = this.gridId |
||||
|
this.dataForm.villageId = this.villageId |
||||
|
this.dataForm.buildId = this.buildId |
||||
|
this.dataForm.unitId = this.unitId |
||||
|
this.dataForm.homeId = this.homeId |
||||
|
this.dataForm.gridName = this.gridName |
||||
|
this.dataForm.villageName = this.villageName |
||||
|
this.dataForm.buildName = this.buildName |
||||
|
this.dataForm.unitName = this.unitName |
||||
|
this.dataForm.homeName = this.homeName |
||||
|
this.dataForm.needUpdate = this.needUpdate |
||||
|
|
||||
|
this.$refs['ref_form'].validate((valid, messageObj) => { |
||||
|
if (!valid) { |
||||
|
this.btnDisable = false |
||||
|
app.util.validateRule(messageObj) |
||||
|
} else { |
||||
|
this.dataForm.id = '' |
||||
|
this.addRoom() |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
async addRoom () { |
||||
|
const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X |
||||
|
if (this.dataForm.ownerIdCard && regCard.test(this.dataForm.ownerIdCard) === false) { |
||||
|
this.btnDisable = false |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: '请输入正确的身份证号码' |
||||
|
}) |
||||
|
return false; |
||||
|
} |
||||
|
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 |
||||
|
if (this.dataForm.ownerPhone && regPhone.test(this.dataForm.ownerPhone) === false) { |
||||
|
this.btnDisable = false |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: '请输入正确的手机号码' |
||||
|
}) |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
let url = '' |
||||
|
|
||||
|
if (this.formType === 'add') { |
||||
|
url = '/pli/power/rentHouse/save' |
||||
|
} else { |
||||
|
url = '/gov/org/house/houseupdate' |
||||
|
this.dataForm.houseId = this.houseId |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, this.dataForm) |
||||
|
this.btnDisable = false |
||||
|
if (code === 0) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: '操作成功' |
||||
|
}) |
||||
|
this.resetData() |
||||
|
this.$emit('dialogOk') |
||||
|
|
||||
|
} else { |
||||
|
|
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
resetData () { |
||||
|
this.houseId = '' //房屋ID |
||||
|
this.houseType = '1' |
||||
|
this.purpose = '1' |
||||
|
this.rentFlag = 1 |
||||
|
this.dataForm = { |
||||
|
neighborHoodId: '', // 所属小区ID |
||||
|
buildingId: '',//所属楼栋ID |
||||
|
buildingUnitId: '',//所属单元ID |
||||
|
doorName: '',//门牌号 |
||||
|
houseType: '1',//房屋类型【楼房,平房,别墅】 |
||||
|
purpose: '1',//房屋用途【住宅,商业,办公,工业,仓储,商住混用,其他】 |
||||
|
rentFlag: 0,//是否出租【是:1,否:0】 |
||||
|
ownerPhone: '', //房主电话 |
||||
|
ownerName: '', //房主名字 |
||||
|
ownerIdCard: '', //房主身份证 |
||||
|
needUpdate: false, |
||||
|
purchaseDate: '', |
||||
|
id: '' |
||||
|
} |
||||
|
this.gridId = '' |
||||
|
this.villageId = '' |
||||
|
this.buildId = '' |
||||
|
this.unitId = '' |
||||
|
this.homeId = '' |
||||
|
this.gridName = '' |
||||
|
this.villageName = '' |
||||
|
this.buildName = '' |
||||
|
this.unitName = '' |
||||
|
this.homeName = '' |
||||
|
this.needUpdate = false |
||||
|
|
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
props: {} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped > |
||||
|
@import "@/assets/scss/modules/visual/communityManageForm.scss"; |
||||
|
</style> |
||||
Loading…
Reference in new issue