Browse Source

死亡登记

dev-新版ui
jiangyy 3 years ago
parent
commit
348287ed32
  1. 6
      src/assets/scss/modules/management/edit-main.scss
  2. 25
      src/views/components/resiChangeTransfer.vue
  3. 2
      src/views/modules/base/community/buildForm.vue
  4. 2
      src/views/modules/base/community/communityForm.vue
  5. 2
      src/views/modules/base/community/roomForm.vue
  6. 33
      src/views/modules/base/resi.vue
  7. 53
      src/views/modules/plugins/change/resideath.vue
  8. 207
      src/views/modules/plugins/change/resideathAdd.vue

6
src/assets/scss/modules/management/edit-main.scss

@ -98,7 +98,7 @@
line-height: 36px
}
/deep/ .el-input__inner{
width:100%;
width:95%;
background-color: #F6F6F6;
border:0px;
line-height: 26px;
@ -117,6 +117,10 @@
background:none;
}
/deep/ .el-input__prefix{
left:700px;
}
}
.edit_item_width_1{

25
src/views/components/resiChangeTransfer.vue

@ -115,15 +115,14 @@
</el-form-item>
</div>
<div v-if="dataForm.type==='out'">
<div v-if="dataForm.type==='out'"
class="item-textarea">
<el-form-item label="外迁详细地址"
style="display: block"
prop="address">
<el-input type="textarea"
:autosize="{ minRows: 2, maxRows: 7}"
:rows="5"
resize="none"
style="width:600px"
class="edit_item_width_1"
placeholder='请输入外迁详细地址'
v-model="dataForm.address">
</el-input>
@ -149,20 +148,16 @@
</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">
<div class="div_btn">
<el-button size="small"
class="diy-button--gray"
@click="handleCancle"> </el-button>
<el-button size="small"
@click="handleCancle">取消</el-button>
<el-button type="primary"
size="small"
class="diy-button--blue"
:loading="btnDisable"
@click="handleComfirm">提交</el-button>
@click="handleComfirm"> </el-button>
</div>
</div>
</template>

2
src/views/modules/base/community/buildForm.vue

@ -173,7 +173,7 @@
</div>
<div class="div_btn">
<el-button size="small"
class="diy-button--other"
class="diy-button--gray"
@click="handleCancle"> </el-button>
<el-button size="small"
v-if="formType != 'detail'"

2
src/views/modules/base/community/communityForm.vue

@ -175,7 +175,7 @@
</div>
<div class="div_btn">
<el-button size="small"
class="diy-button--other"
class="diy-button--gray"
@click="handleCancle"> </el-button>
<el-button size="small"
class="diy-button--blue"

2
src/views/modules/base/community/roomForm.vue

@ -175,7 +175,7 @@
</div>
<div class="div_btn">
<el-button size="small"
class="diy-button--other"
class="diy-button--gray"
@click="handleCancle"> </el-button>
<el-button size="small"
class="diy-button--blue"

33
src/views/modules/base/resi.vue

@ -174,7 +174,7 @@
type="text"
class="div-table-button--green"
size="small">迁出登记</el-button>
<el-button @click="handleChangeRecord(scope.row)"
<el-button @click="handleDeath(scope.row)"
type="text"
class="div-table-button--red"
size="small">死亡登记</el-button>
@ -339,11 +339,11 @@
@close="handleCancleLook" />
<baobiao ref="baobiao" />
<!-- 迁出 -->
<!-- 迁出登记 -->
<el-dialog :visible.sync="tranferShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'迁出管理'"
:title="'迁出登记'"
width="950px"
top="5vh"
class="dialog-h"
@ -351,6 +351,18 @@
<resi-change-transfer ref="ref_change_transfer"
@dialogCancle="transferClose"></resi-change-transfer>
</el-dialog>
<!-- 死亡登记 -->
<el-dialog :visible.sync="deathShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'死亡登记'"
width="950px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<resideath-add ref="ref_death"
@dialogCancle="deathClose"></resideath-add>
</el-dialog>
</div>
</template>
@ -364,12 +376,14 @@ import { mapGetters } from "vuex";
import resiTransfer from "../../components/resiTransfer.vue";
import resiChangeRecord from "../../components/resiChangeRecord.vue";
import peopleMore from "@/views/modules/shequ/cpts/people-more";
import baobiao from "@/views/modules/cpts/baobiao";
import diyInfo from "./diyInfo.vue";
import { requestPost } from "@/js/dai/request";
import resiChangeTransfer from "../../components/resiChangeTransfer.vue";
import resideathAdd from "../plugins/change/resideathAdd.vue";
export default {
components: {
@ -383,6 +397,7 @@ export default {
diyInfo,
resiChangeTransfer,
resideathAdd,
},
data () {
return {
@ -433,6 +448,7 @@ export default {
defaultCategotyKey: "",
tranferShow: false,
deathShow: false,
changeRecordShow: false,
lookInfo: {
userId: "",
@ -548,6 +564,12 @@ export default {
await nextTick(200);
this.$refs.ref_change_transfer.initForm(row)
},
//
async handleDeath (row) {
this.deathShow = true;
await nextTick(200);
this.$refs.ref_death.initForm(row)
},
//
async handleChangeRecord (row) {
@ -558,6 +580,7 @@ export default {
diaClose () {
this.tranferShow = false;
this.deathShow = false;
this.changeRecordShow = false;
},
@ -565,6 +588,10 @@ export default {
this.tranferShow = false;
this.getTableData();
},
deathClose () {
this.deathShow = false;
this.getTableData();
},
handleDiyClose () {
this.diyDialog = false;
},

53
src/views/modules/plugins/change/resideath.vue

@ -1,10 +1,10 @@
<template>
<div class="resi-container">
<death-search v-if="searchList.length > 0"
ref="deathSearch"
:form-list="searchList"
:column-name="defaultCategotyKey"
@search="handleSearch" />
ref="deathSearch"
:form-list="searchList"
:column-name="defaultCategotyKey"
@search="handleSearch" />
<el-card class="resi-card-table">
<!-- <div class="resi-row-btn">
<el-button size="small"
@ -66,10 +66,9 @@
:label="item.label"
align="center"
:fixed="item.columnName == 'NAME' ? 'left' : false"
:show-overflow-tooltip="true"
>
<!-- :width="item.width || computedWidth(item.label, item.itemType)" -->
<!-- :width="item.itemType === 'radio' ? computedWidth(item.label) : 180" -->
:show-overflow-tooltip="true">
<!-- :width="item.width || computedWidth(item.label, item.itemType)" -->
<!-- :width="item.itemType === 'radio' ? computedWidth(item.label) : 180" -->
<template slot-scope="scope">
<a v-if="item.columnName == 'NAME'"
class="name-a"
@ -83,7 +82,7 @@
align="center"
width="150">
<template slot-scope="scope">
<el-button @click="joinBlacklist(scope.row)"
<el-button @click="joinBlacklist(scope.row)"
type="text"
size="small"
class="div-table-button--detail">新增死亡人口</el-button>
@ -257,18 +256,24 @@
@closed="diaClose">
<resi-change-record ref="ref_changerecord"></resi-change-record>
</el-dialog>
<people-more v-if="showedPeopleMoreInfo && lookInfo.userId"
:userId="lookInfo.userId"
:gridName="lookInfo.gridName"
@close="handleCancleLook" />
<el-dialog title="新增死亡人口的原因" :visible.sync="blacklistVisible" width="40%">
<textarea v-model="blacklistReason" placeholder="请输入新增死亡人口的原因" class="blacklist-reason"></textarea>
<el-dialog title="新增死亡人口的原因"
:visible.sync="blacklistVisible"
width="40%">
<textarea v-model="blacklistReason"
placeholder="请输入新增死亡人口的原因"
class="blacklist-reason"></textarea>
<div>
<br/>
<br />
</div>
<el-checkbox v-model="welfareFlag">享受福利</el-checkbox>
<div>
<br/>
<br />
</div>
<el-date-picker v-model="deathDate"
type="date"
@ -278,9 +283,11 @@
style="width:200px"
:clearable="false">
</el-date-picker>
<span slot="footer" class="dialog-footer">
<span slot="footer"
class="dialog-footer">
<el-button @click="blacklistVisible = false"> </el-button>
<el-button type="primary" @click="confirmJoinDeathlist"> </el-button>
<el-button type="primary"
@click="confirmJoinDeathlist"> </el-button>
</span>
</el-dialog>
</div>
@ -299,7 +306,7 @@ import peopleMore from "@/views/modules/shequ/cpts/people-more";
export default {
components: {
deathSearch,
deathSearch,
resiForm,
editResi,
resiTransfer,
@ -359,7 +366,7 @@ export default {
blacklistReason: '', //
welfareFlag: false,
rowData: {}, //
deathDate: ''
deathDate: ''
}
},
props: {
@ -378,7 +385,7 @@ export default {
},
computed: {
...mapGetters(['clientHeight', 'iframeHeight']),
tableHeight() {
tableHeight () {
const h = this.clientHeight - this.searchH - 280 + this.iframeHeigh
const _h = this.clientHeight - 280 - this.searchH
return this.$store.state.inIframe ? h : _h
@ -414,13 +421,13 @@ export default {
},
methods: {
searchFilter (columnName) {
const filterName = [ 'NAME', 'MOBILE', 'ID_CARD' ]
const filterName = ['NAME', 'MOBILE', 'ID_CARD']
return filterName.some(item => {
return item == columnName
})
},
tableHeaderFilter (columnName) {
const filterName = [ 'NAME', 'GRID_ID', 'HOME_ID', 'MOBILE', 'ID_CARD', 'GENDER' ]
const filterName = ['NAME', 'GRID_ID', 'HOME_ID', 'MOBILE', 'ID_CARD', 'GENDER']
return filterName.some(item => {
return item == columnName
})
@ -447,7 +454,7 @@ export default {
if (this.deathDate === '') {
this.$message({
message: '请选择死亡日期',
type:'warning'
type: 'warning'
})
return false
}
@ -502,7 +509,7 @@ export default {
let wd = ''
if (type == 'input' || type == 'select') wd = 40 * label.length
else if(type == 'radio') wd = 20 * label.length
else if (type == 'radio') wd = 20 * label.length
console.log('type-----wd', wd)
return wd > 80 ? wd : 80
},
@ -794,7 +801,7 @@ export default {
// await this.getFormList('edit')
// this.getrowInfo(row.icResiUserId)
},
handleCancleLook() {
handleCancleLook () {
this.lookInfo.userId = ''
this.lookInfo.gridName = ''
this.showedPeopleMoreInfo = false;

207
src/views/modules/plugins/change/resideathAdd.vue

@ -0,0 +1,207 @@
<template>
<div>
<div class="dialog-h-content scroll-h m-edit">
<el-form ref="ref_form"
:inline="true"
:model="dataForm"
label-width="90px"
:rules="dataRule"
class="m-form">
<div class="item-textarea">
<el-form-item label="死亡原因"
style="display: block"
prop="blacklistReason">
<el-input type="textarea"
resize="none"
class="edit_item_width_1"
placeholder='请输入迁出原因'
v-model="dataForm.blacklistReason">
</el-input>
</el-form-item>
</div>
<el-form-item label="死亡日期"
style="display: block"
prop="deathDate">
<el-date-picker v-model="dataForm.deathDate"
class="edit_item_width_1"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
placeholder="选择日期"
:clearable="false">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="享受福利"
style="display: block"
prop="welfareFlag">
<el-checkbox v-model="dataForm.welfareFlag">享受</el-checkbox>
</el-form-item> -->
</el-form>
</div>
<div class="div_btn">
<el-button size="small"
class="diy-button--gray"
@click="handleCancle"> </el-button>
<el-button size="small"
class="diy-button--blue"
: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,
dataForm: {
blacklistReason: '',
deathDate: '',
},
}
},
components: {
},
mounted () {
},
computed: {
dataRule () {
return {
blacklistReason: [
{ required: true, message: '死亡原因不能为空', trigger: 'blur' },
],
deathDate: [
{ required: true, message: '死亡日期不能为空', trigger: 'blur' }
],
}
},
},
methods: {
async initForm (row) {
this.customerId = localStorage.getItem("customerId");
this.$refs.ref_form.resetFields();
this.dataForm.idCard = row.ID_CARD
this.dataForm.name = row.NAME
this.dataForm.mobile = row.MOBILE
this.dataForm.gender = row.GENDER == '女' ? '0' : row.GENDER == '男' ? '1' : ''
this.dataForm.type = '1'
this.dataForm.userId = row.icResiUserId
},
async handleComfirm () {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 2000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
// app.util.validateRule(messageObj)
console.log('error submit!')
} else {
this.saveForm()
}
})
},
async saveForm () {
const url = '/epmetuser/rentDeath/save'
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
}
},
//
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>
@import "@/assets/scss/modules/management/edit-main.scss";
.resi-cell-col {
width: 750px;
display: flex;
justify-content: flex-start;
}
.margin_left10 {
margin-left: 10px;
}
</style>
Loading…
Cancel
Save