2 changed files with 1517 additions and 0 deletions
@ -0,0 +1,754 @@ |
|||||
|
<template> |
||||
|
<div class="resi-container"> |
||||
|
<el-card ref="searchCard" class="search-card"> |
||||
|
<el-form |
||||
|
ref="searchForm" |
||||
|
:inline="true" |
||||
|
:model="fmData" |
||||
|
:label-width="'100px'" |
||||
|
class="demo-form-inline" |
||||
|
> |
||||
|
<div> |
||||
|
<el-form-item prop="gridId" label="所属网格"> |
||||
|
<div class="resi-cell-value"> |
||||
|
<el-select |
||||
|
v-model.trim="fmData.gridId" |
||||
|
placeholder="请选择网格" |
||||
|
size="small" |
||||
|
clearable |
||||
|
class="resi-cell-select" |
||||
|
@change="handleChangeGrid" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsG" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
</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="fmData.villageId" |
||||
|
placeholder="请选择小区" |
||||
|
size="small" |
||||
|
clearable |
||||
|
class="resi-cell-select" |
||||
|
@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="fmData.buildId" |
||||
|
placeholder="楼号" |
||||
|
size="small" |
||||
|
clearable |
||||
|
:disabled="changeVDisabled" |
||||
|
class="resi-cell-select resi-cell-select-middle" |
||||
|
@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="fmData.unitId" |
||||
|
placeholder="单元" |
||||
|
size="small" |
||||
|
clearable |
||||
|
:disabled="changeBDisabled" |
||||
|
class="resi-cell-select resi-cell-select-middle" |
||||
|
@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="fmData.homeId" |
||||
|
placeholder="房号" |
||||
|
size="small" |
||||
|
clearable |
||||
|
:disabled="changeDDisabled" |
||||
|
class="resi-cell-select resi-cell-select-middle" |
||||
|
> |
||||
|
<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> |
||||
|
</div> |
||||
|
|
||||
|
<div> |
||||
|
<el-form-item label="姓名" prop="name"> |
||||
|
<el-input |
||||
|
v-model="fmData.name" |
||||
|
class="resi-cell-input" |
||||
|
size="small" |
||||
|
clearable |
||||
|
placeholder="请输入" |
||||
|
> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="手机号" prop="mobile"> |
||||
|
<el-input |
||||
|
v-model="fmData.mobile" |
||||
|
class="resi-cell-input" |
||||
|
size="small" |
||||
|
clearable |
||||
|
placeholder="请输入" |
||||
|
> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="身份证号" prop="idCard"> |
||||
|
<el-input |
||||
|
v-model="fmData.idCard" |
||||
|
class="resi-cell-input" |
||||
|
size="small" |
||||
|
clearable |
||||
|
placeholder="请输入" |
||||
|
> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
<div> |
||||
|
<!-- <el-form-item label="迁入时间" prop="startTime"> |
||||
|
<el-date-picker |
||||
|
v-model="rangeTime" |
||||
|
type="daterange" |
||||
|
range-separator="至" |
||||
|
start-placeholder="开始日期" |
||||
|
end-placeholder="结束日期" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> --> |
||||
|
|
||||
|
<el-form-item label="审核状态" prop="confirmResult"> |
||||
|
<el-select |
||||
|
v-model.trim="fmData.confirmResult" |
||||
|
placeholder="审核状态" |
||||
|
size="small" |
||||
|
clearable |
||||
|
class="resi-cell-select" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in optionsWelfare" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item> |
||||
|
<el-button |
||||
|
class="diy-button--search" |
||||
|
size="small" |
||||
|
@click="handleSearch" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
<el-button |
||||
|
class="diy-button--reset" |
||||
|
size="small" |
||||
|
@click="resetForm('searchForm')" |
||||
|
>重置</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</el-card> |
||||
|
<el-card class="resi-card-table"> |
||||
|
<el-table |
||||
|
:data="tableData" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
class="resi-table" |
||||
|
:height="tableHeight" |
||||
|
> |
||||
|
<el-table-column |
||||
|
label="序号" |
||||
|
fixed="left" |
||||
|
type="index" |
||||
|
align="center" |
||||
|
width="50" |
||||
|
/> |
||||
|
|
||||
|
<el-table-column |
||||
|
prop="name" |
||||
|
width="100" |
||||
|
fixed="left" |
||||
|
label="姓名" |
||||
|
align="center" |
||||
|
/> |
||||
|
<!-- <template slot-scope="scope"> |
||||
|
<a class="name-a" @click="handleWatch(scope.$index)"> |
||||
|
{{ scope.row.name }} |
||||
|
</a> |
||||
|
</template> |
||||
|
</el-table-column> --> |
||||
|
<el-table-column prop="gender" align="center" width="60" label="性别"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="mobile" |
||||
|
width="140" |
||||
|
align="center" |
||||
|
label="手机号" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
prop="idCard" |
||||
|
align="center" |
||||
|
width="180" |
||||
|
label="身份证号" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
prop="gridName" |
||||
|
align="center" |
||||
|
label="所属网格" |
||||
|
min-width="160" |
||||
|
:show-overflow-tooltip="true" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
prop="homeName" |
||||
|
label="所属房屋" |
||||
|
align="center" |
||||
|
min-width="160" |
||||
|
:show-overflow-tooltip="true" |
||||
|
/> |
||||
|
<!-- <el-table-column |
||||
|
prop="allName" |
||||
|
label="迁出类型" |
||||
|
align="center" |
||||
|
min-width="160" |
||||
|
:show-overflow-tooltip="true" |
||||
|
/> --> |
||||
|
<el-table-column |
||||
|
prop="newHomeName" |
||||
|
label="迁往房屋" |
||||
|
align="center" |
||||
|
min-width="160" |
||||
|
:show-overflow-tooltip="true" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
prop="confirmResult" |
||||
|
label="审核状态" |
||||
|
align="center" |
||||
|
width="100" |
||||
|
/> |
||||
|
|
||||
|
|
||||
|
<el-table-column fixed="right" label="操作" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
@click="handleWatch(scope.row)" |
||||
|
type="text" |
||||
|
size="small" |
||||
|
>查看</el-button |
||||
|
> |
||||
|
|
||||
|
<el-button |
||||
|
v-if="scope.row.confirmResult == '未审核'" |
||||
|
@click="handleEdit(scope.row)" |
||||
|
type="text" |
||||
|
size="small" |
||||
|
class="div-table-button--edit" |
||||
|
>审核</el-button |
||||
|
> |
||||
|
|
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<div> |
||||
|
<el-pagination |
||||
|
@size-change="handleSizeChange" |
||||
|
@current-change="handleCurrentChange" |
||||
|
:current-page.sync="pageNo" |
||||
|
:page-sizes="[20, 50, 100, 200]" |
||||
|
:page-size="parseInt(pageSize)" |
||||
|
layout="sizes, prev, pager, next, total" |
||||
|
:total="total" |
||||
|
> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
|
||||
|
<!-- 修改弹出框 --> |
||||
|
<el-dialog |
||||
|
:visible.sync="formShow" |
||||
|
:close-on-click-modal="false" |
||||
|
:close-on-press-escape="false" |
||||
|
:title="formTitle" |
||||
|
width="1000px" |
||||
|
top="5vh" |
||||
|
class="dialog-h" |
||||
|
@close="handleClose(false)" |
||||
|
> |
||||
|
<verify-form |
||||
|
v-if="formShow" |
||||
|
ref="eleEditForm" |
||||
|
@dialogCancle="handleClose" |
||||
|
></verify-form> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { requestPost } from '@/js/dai/request' |
||||
|
import nextTick from 'dai-js/tools/nextTick' |
||||
|
import { mapGetters } from 'vuex' |
||||
|
import verifyForm from './verifyForm' |
||||
|
import axios from 'axios' |
||||
|
|
||||
|
export default { |
||||
|
components: { verifyForm }, |
||||
|
data() { |
||||
|
return { |
||||
|
openSearch: false, |
||||
|
|
||||
|
formShow: false, |
||||
|
formTitle: '审核信息', |
||||
|
|
||||
|
pageNo: 1, |
||||
|
pageSize: window.localStorage.getItem('pageSize') || 20, |
||||
|
total: 1, |
||||
|
|
||||
|
tableData: [], |
||||
|
|
||||
|
optionsV: [], |
||||
|
optionsB: [], |
||||
|
optionsH: [], |
||||
|
optionsD: [], |
||||
|
optionsG: [], |
||||
|
|
||||
|
optionsWelfare: [ |
||||
|
{ |
||||
|
value: '1', |
||||
|
label: '已通过' |
||||
|
}, |
||||
|
{ |
||||
|
value: '2', |
||||
|
label: '未通过' |
||||
|
} |
||||
|
], |
||||
|
|
||||
|
fmData: { |
||||
|
gridId: '', |
||||
|
villageId: '', |
||||
|
buildId: '', |
||||
|
unitId: '', |
||||
|
homeId: '', |
||||
|
name: '', |
||||
|
mobile: '', |
||||
|
idCard: '', |
||||
|
// isWeifare: '', //福利0否,1是 |
||||
|
// startTime: '', |
||||
|
// endTime: '', |
||||
|
submitType: '', |
||||
|
confirmResult: '' |
||||
|
}, |
||||
|
rangeTime: [], |
||||
|
|
||||
|
importBtnTitle: '导入', |
||||
|
importLoading: false, |
||||
|
|
||||
|
searchH: 0, |
||||
|
tableHeight: 0 |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
...mapGetters(['clientHeight', 'iframeHeight']), |
||||
|
maxTableHeight() { |
||||
|
console.log('computed-searchH---', this.searchH) |
||||
|
const h = this.clientHeight - this.searchH + this.iframeHeight |
||||
|
const _h = this.clientHeight - this.searchH |
||||
|
console.log('computed-searchH---_h', _h) |
||||
|
return this.$store.state.inIframe ? h : _h |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
changeVDisabled() { |
||||
|
return !this.fmData.villageId |
||||
|
}, |
||||
|
changeBDisabled() { |
||||
|
return !this.fmData.buildId |
||||
|
}, |
||||
|
changeDDisabled() { |
||||
|
return !this.fmData.unitId |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
rangeTime: function (val) { |
||||
|
console.log('val----', val) |
||||
|
if (Array.isArray(val) && val.length == 2) { |
||||
|
this.fmData.startTime = val[0] |
||||
|
this.fmData.endTime = val[1] |
||||
|
} else { |
||||
|
this.fmData.startTime = '' |
||||
|
this.fmData.endTime = '' |
||||
|
} |
||||
|
}, |
||||
|
searchH() { |
||||
|
const h = this.clientHeight - this.searchH + this.iframeHeight |
||||
|
const _h = this.clientHeight - this.searchH |
||||
|
console.log('computed-searchH---_h', _h) |
||||
|
|
||||
|
this.$nextTick(() => { |
||||
|
this.tableHeight = this.$store.state.inIframe ? h : _h |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getGridList() |
||||
|
this.getValiheList() |
||||
|
this.getTableData() |
||||
|
this.searchH = this.$refs.searchCard.$el.offsetHeight + 270 |
||||
|
console.log('searchH----', this.$refs.searchCard.$el.offsetHeight) |
||||
|
}, |
||||
|
methods: { |
||||
|
handleClearVillage() { |
||||
|
this.fmData.buildId = '' |
||||
|
this.fmData.homeId = '' |
||||
|
}, |
||||
|
handleClearBuild() { |
||||
|
this.fmData.buildId = '' |
||||
|
this.fmData.unitId = '' |
||||
|
this.fmData.homeId = '' |
||||
|
}, |
||||
|
handleClearDan() { |
||||
|
this.fmData.unitId = '' |
||||
|
this.fmData.homeId = '' |
||||
|
}, |
||||
|
handleChangeGrid(val) { |
||||
|
console.log('val', val) |
||||
|
this.fmData.villageId = '' |
||||
|
this.fmData.buildId = '' |
||||
|
this.fmData.unitId = '' |
||||
|
this.fmData.homeId = '' |
||||
|
this.getValiheList() |
||||
|
}, |
||||
|
handleChangeV(val) { |
||||
|
console.log('val', val) |
||||
|
this.fmData.buildId = '' |
||||
|
this.fmData.unitId = '' |
||||
|
this.fmData.homeId = '' |
||||
|
this.getBuildList() |
||||
|
}, |
||||
|
handleChangeB(val) { |
||||
|
console.log('val', val) |
||||
|
this.fmData.unitId = '' |
||||
|
this.fmData.homeId = '' |
||||
|
this.getUniList() |
||||
|
}, |
||||
|
handleChangeD(val) { |
||||
|
console.log('val', val) |
||||
|
this.fmData.homeId = '' |
||||
|
this.getHouseList() |
||||
|
}, |
||||
|
|
||||
|
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.fmData.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.fmData.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.fmData.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.fmData.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('网络错误') |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
handleSizeChange(val) { |
||||
|
console.log(`每页 ${val} 条`) |
||||
|
this.pageSize = val |
||||
|
window.localStorage.setItem('pageSize', val) |
||||
|
this.getTableData() |
||||
|
}, |
||||
|
handleCurrentChange(val) { |
||||
|
console.log(`当前页: ${val}`) |
||||
|
this.pageNo = val |
||||
|
this.getTableData() |
||||
|
}, |
||||
|
|
||||
|
handleClose(val) { |
||||
|
console.log('val-----', val) |
||||
|
if (val) { |
||||
|
this.handleEditSuccess() |
||||
|
} |
||||
|
this.formShow = false |
||||
|
}, |
||||
|
handleSearch(val) { |
||||
|
console.log(this.fmData) |
||||
|
this.pageNo = 1 |
||||
|
this.getTableData() |
||||
|
}, |
||||
|
resetForm(formName) { |
||||
|
this.$refs[formName].resetFields() |
||||
|
this.handleSearch() |
||||
|
}, |
||||
|
async handleAdd() { |
||||
|
this.formShow = true |
||||
|
await nextTick() |
||||
|
console.log(this.$refs) |
||||
|
this.$refs.eleEditForm.initForm('add') |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
async handleWatch(row) { |
||||
|
this.formShow = true |
||||
|
await nextTick() |
||||
|
this.$refs.eleEditForm.getDatail('detail', row.id) |
||||
|
}, |
||||
|
|
||||
|
async handleEdit(row) { |
||||
|
this.formShow = true |
||||
|
await nextTick() |
||||
|
this.$refs.eleEditForm.getDatail('edit', row.id) |
||||
|
}, |
||||
|
handleEditSuccess() { |
||||
|
// this.handleClose() |
||||
|
this.getTableData() |
||||
|
}, |
||||
|
|
||||
|
async handleDel(rowData, rowIndex) { |
||||
|
console.log(rowData, rowIndex) |
||||
|
const url = |
||||
|
'/heart/iccommunityselforganization/delcommunityselforganization' |
||||
|
const { tableData } = this |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, { |
||||
|
orgId: tableData[rowIndex].orgId |
||||
|
}) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.$message.success('删除成功!') |
||||
|
this.getTableData() |
||||
|
} else { |
||||
|
this.$message.success('操作失败!') |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async getTableData() { |
||||
|
const url = '/epmetuser/myHome/confirmList' |
||||
|
const { pageSize, pageNo, fmData } = this |
||||
|
const { data, code, msg } = await requestPost(url, { |
||||
|
pageSize, |
||||
|
pageNo, |
||||
|
...fmData |
||||
|
}) |
||||
|
if (code === 0) { |
||||
|
console.log('列表请求成功!!!!!!!!!!!!!!') |
||||
|
this.total = data.total || 0 |
||||
|
this.tableData = data.list |
||||
|
? data.list.map((item) => { |
||||
|
return item |
||||
|
}) |
||||
|
: [] |
||||
|
} else { |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</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; |
||||
|
} |
||||
|
} |
||||
|
.resi-card-table { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
.resi-row-btn { |
||||
|
margin-bottom: 13px; |
||||
|
.upload-btn { |
||||
|
display: inline-block; |
||||
|
margin: 0 10px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.resi-btns { |
||||
|
margin-top: 20px; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.resi-container .resi-card { |
||||
|
position: relative; |
||||
|
overflow: visible; |
||||
|
} |
||||
|
|
||||
|
.demo-form-inline { |
||||
|
// display: flex; |
||||
|
// align-items: center; |
||||
|
// margin-bottom: 20px; |
||||
|
|
||||
|
.resi-cell-label { |
||||
|
flex-shrink: 0; |
||||
|
min-width: 0; |
||||
|
box-sizing: border-box; |
||||
|
margin-right: 15px; |
||||
|
// text-align: right; |
||||
|
// line-height: 32; |
||||
|
} |
||||
|
.resi-cell-label1 { |
||||
|
width: max-content; |
||||
|
} |
||||
|
.resi-cell-value-radio { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
min-height: 32px; |
||||
|
} |
||||
|
.resi-cell-input { |
||||
|
width: 200px; |
||||
|
} |
||||
|
.resi-cell--daterange { |
||||
|
max-width: 260px; |
||||
|
} |
||||
|
.resi-cell-select { |
||||
|
width: 200px; |
||||
|
box-sizing: border-box; |
||||
|
margin-right: 10px; |
||||
|
&-middle { |
||||
|
width: 120px; |
||||
|
} |
||||
|
&-small { |
||||
|
width: 88px; |
||||
|
} |
||||
|
} |
||||
|
.resi-cell-select:last-child { |
||||
|
margin-right: 0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.mt10 { |
||||
|
margin-top: 10px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,763 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div class="dialog-h-content scroll-h"> |
||||
|
<el-form :model="detailInfo" :disabled="btnType == 'detail'"> |
||||
|
<el-form-item |
||||
|
label="迁出人姓名:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.name }}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="手机号:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.mobile }}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="身份证号:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.idCard }}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="所在网格:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.gridName }}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="所在房屋:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span> |
||||
|
{{ detailInfo.villageName + detailInfo.buildName + detailInfo.unitName + detailInfo.homeName }} |
||||
|
</span> |
||||
|
</el-form-item> |
||||
|
<el-divider></el-divider> |
||||
|
<el-form-item |
||||
|
label="迁出类型:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span v-if="detailInfo.outType == 'in'">{{'迁往' + rootAgency.organizationName + '内其他区域' }}</span> |
||||
|
<span v-else>其他</span> |
||||
|
</el-form-item> |
||||
|
<template v-if="detailInfo.outType == 'in'"> |
||||
|
<el-form-item |
||||
|
label="迁往区域:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.newGridName }}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="迁至房屋:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.newHomeName }}</span> |
||||
|
</el-form-item> |
||||
|
</template> |
||||
|
<el-form-item |
||||
|
v-else |
||||
|
label="迁至地址:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.newHomeName }}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="迁出时间:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.moveOutDate }}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="迁出原因:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span> |
||||
|
{{ detailInfo.deleteReason }} |
||||
|
</span> |
||||
|
</el-form-item> |
||||
|
<el-divider></el-divider> |
||||
|
<el-form-item |
||||
|
label="审核结果:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<el-select |
||||
|
v-model.trim="confirmResult" |
||||
|
placeholder="请选择结果" |
||||
|
clearable |
||||
|
class="item_width_1" |
||||
|
> |
||||
|
<el-option label="通过" value="1" /> |
||||
|
<el-option label="不通过" value="2" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
v-if="confirmResult == 2" |
||||
|
label="审核备注:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<el-input type="textarea" v-model="reason" style="width: 300px;"></el-input> |
||||
|
</el-form-item> |
||||
|
<!-- <template v-if="btnType == 'detail' && confirmResult == '1'"> |
||||
|
<el-form-item |
||||
|
label="迁往区域:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.newGridName }}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="迁至房屋:" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<span>{{ detailInfo.newHomeName }}</span> |
||||
|
</el-form-item> |
||||
|
</template> --> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-form |
||||
|
v-if="confirmResult == 1 && btnType == 'edit'" |
||||
|
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 v-if="dataForm.type == 'in'" :label="'in'">{{ |
||||
|
'迁往' + rootAgency.organizationName + '内其他区域' |
||||
|
}}</el-radio> |
||||
|
<el-radio v-else :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 v-if="confirmResult == 1" class="resi-btns"> |
||||
|
<el-button size="small" @click="handleCancle(false)">取消</el-button> |
||||
|
<el-button |
||||
|
v-if="btnType != 'detail'" |
||||
|
type="primary" |
||||
|
size="small" |
||||
|
:loading="btnDisable" |
||||
|
@click="handleComfirm" |
||||
|
>提交</el-button |
||||
|
> |
||||
|
</div> |
||||
|
<div v-if="confirmResult == 2" class="resi-btns"> |
||||
|
<el-button size="small" @click="handleCancle(false)">取消</el-button> |
||||
|
<el-button |
||||
|
v-if="btnType != 'detail'" |
||||
|
type="primary" |
||||
|
size="small" |
||||
|
:loading="btnDisable" |
||||
|
@click="handleVerify" |
||||
|
>提交</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: [], |
||||
|
confirmResult: '1', |
||||
|
reason: '', |
||||
|
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, |
||||
|
btnType: '', |
||||
|
optionProps: { |
||||
|
multiple: false, |
||||
|
value: 'agencyId', |
||||
|
label: 'agencyName', |
||||
|
children: 'subAgencyList' |
||||
|
// checkStrictly: true |
||||
|
}, |
||||
|
|
||||
|
selGrid: {}, |
||||
|
detailInfo: {} |
||||
|
} |
||||
|
}, |
||||
|
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.gridName |
||||
|
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.idCard |
||||
|
this.dataForm.mobile = row.mobile |
||||
|
this.dataForm.type = row.outType |
||||
|
this.dataForm.outOfTime = row.moveOutDate |
||||
|
this.dataForm.reason = row.deleteReason |
||||
|
this.dataForm.address = row.xxdz |
||||
|
// await this.loadHouseInfo(row.HOME_ID_VALUE) |
||||
|
|
||||
|
this.dataForm.name = row.name |
||||
|
// this.dataForm.gender = row.GENDER |
||||
|
// this.dataForm.age = '' |
||||
|
this.confirmResult = (row.confirmResult == '1' || row.confirmResult == '2') ? row.confirmResult : '1' |
||||
|
this.reason = row.reason |
||||
|
|
||||
|
await this.loadRootAgency() |
||||
|
await this.getAgencylist() |
||||
|
}, |
||||
|
async getDatail(type, id) { |
||||
|
let url = '/epmetuser/myHome/moveOutConfirmDetail' |
||||
|
this.btnType = type |
||||
|
const params = { |
||||
|
id: id || '' |
||||
|
} |
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
if (code === 0) { |
||||
|
this.detailInfo = { ...data } |
||||
|
this.initForm(data) |
||||
|
} else this.$message.error(msg) |
||||
|
}, |
||||
|
async loadHouseInfo(homeIdValue) { |
||||
|
const url = '/gov/org/ichouse/' + homeIdValue |
||||
|
const { data, code, msg } = await requestGet(url) |
||||
|
if (code === 0) { |
||||
|
this.dataForm.oldDept = '' |
||||
|
this.dataForm.oldAddress = data.houseName |
||||
|
this.dataForm.ownerName = data.ownerName |
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
//根据人员id获取根组织信息 |
||||
|
async loadRootAgency() { |
||||
|
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 handleVerify() { |
||||
|
const params = { |
||||
|
id: this.detailInfo.id, |
||||
|
confirmResult: this.confirmResult, |
||||
|
reason: this.reason |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost('/epmetuser/myHome/moveOutConfirm', params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.$message.success('提交成功') |
||||
|
this.handleCancle(true) |
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
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() |
||||
|
this.handleVerify() |
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
handleCancle(val) { |
||||
|
this.resetData() |
||||
|
this.$emit('dialogCancle', val) |
||||
|
}, |
||||
|
|
||||
|
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> |
Loading…
Reference in new issue