居民审核

This commit is contained in:
liuye
2022-02-16 14:23:54 +08:00
parent 28be9ca0c5
commit a1ff252028
6 changed files with 127 additions and 42 deletions

View File

@@ -2,9 +2,9 @@
<div class="Content"> <div class="Content">
<div class="text-area"> <div class="text-area">
<div class="title">不通过理由</div> <div class="title">不通过理由</div>
<textarea placeholder="请输入" maxlength="200"></textarea> <textarea placeholder="请输入" maxlength="200" v-model="opinion"></textarea>
</div> </div>
<div class="footer" @click="submit"> <div class="footer" @click="examine(0)">
<div class="btn">保存</div> <div class="btn">保存</div>
</div> </div>
</div> </div>
@@ -15,18 +15,27 @@ export default {
name: "Content", name: "Content",
data() { data() {
return { return {
value: '', opinion: '',
id: '',
}; };
}, },
onShow() { onShow() {
document.title = '居民档案审核' document.title = '居民档案审核'
}, },
onLoad(option) { onLoad(option) {
// this.id = option.id this.id = option.id
}, },
methods: { methods: {
submit() { examine(pass) {
this.$http.post(`/app/appresident/examine?id=${this.id}&pass=${pass}&opinion=${this.opinion}`).then((res) => {
if (res.code == 0) {
this.$u.toast('审核成功')
uni.$emit('updatePeople')
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
} }
}, },
}; };

View File

@@ -105,10 +105,10 @@
</div> </div>
</div> </div>
<div class="pad-b112"></div> <div class="pad-b112" v-if="!data.resident.auditStatus == 0"></div>
<div class="footer"> <div class="footer" v-if="!data.resident.auditStatus == 0">
<div>不通过</div> <div @click="toContent">不通过</div>
<div class="pass">通过</div> <div class="pass" @click="examine(1)">通过</div>
</div> </div>
</div> </div>
</template> </template>
@@ -131,6 +131,9 @@ export default {
this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => { this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => {
this.getDetail() this.getDetail()
}) })
uni.$on('updatePeople', res => {
this.getDetail()
})
}, },
onShow() { onShow() {
document.title = '家庭成员信息' document.title = '家庭成员信息'
@@ -149,6 +152,20 @@ export default {
callPhone(phone) { callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone }) uni.makePhoneCall({ phoneNumber: phone })
}, },
examine(pass) {
this.$confirm('确认通过该审核?').then(() => {
this.$http.post(`/app/appresident/examine?id=${this.id}&pass=${pass}`).then((res) => {
if (res.code == 0) {
this.getDetail()
this.$u.toast('审核成功')
}
})
})
},
toContent() {
uni.navigateTo({url: `./Content?id=${this.id}`})
}
}, },
} }
</script> </script>

View File

@@ -14,8 +14,8 @@
<u-search v-model="keyword" :clearabled="true" placeholder="请输入姓名" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999" color="#999" height="58" @search="handerSearch" @clear="handerClear"></u-search> <u-search v-model="keyword" :clearabled="true" placeholder="请输入姓名" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999" color="#999" height="58" @search="handerSearch" @clear="handerClear"></u-search>
</div> </div>
</AiTopFixed> </AiTopFixed>
<div v-if="data.family && data.family.length > 0"> <div v-if="datas && datas.length > 0" class="list-content">
<div class="card" v-for="(item, i) in data.family" :key="i" @click="toDetailPeople(item)"> <div class="card" v-for="(item, i) in datas" :key="i" @click="toDetailPeople(item)">
<div class="photos"> <div class="photos">
<img :src="item.photo" alt="" v-if="item.photo" /> <img :src="item.photo" alt="" v-if="item.photo" />
<img src="./components/img/44.png" alt="" v-else /> <img src="./components/img/44.png" alt="" v-else />
@@ -29,6 +29,7 @@
<span class="householdNames" v-else> <span class="householdNames" v-else>
{{ $dict.getLabel('householdRelation', item.householdRelation) }} {{ $dict.getLabel('householdRelation', item.householdRelation) }}
</span> </span>
<span class="audit-status" :class="'status'+item.auditStatus">{{ $dict.getLabel('auditStatus', item.auditStatus) }}</span>
</div> </div>
<div class="rightTop-rights"> <div class="rightTop-rights">
@@ -57,7 +58,7 @@ export default {
data() { data() {
return { return {
id: '', id: '',
data: [], datas: [],
resident: {}, resident: {},
areaId: '', areaId: '',
areaName: '', areaName: '',
@@ -70,38 +71,76 @@ export default {
}, },
], ],
currentTabs: 0, currentTabs: 0,
keyword: ''
} }
}, },
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
}, },
onLoad() {
this.$dict.load('householdRelation', 'auditStatus').then(() => {
this.getList()
})
},
onShow() { onShow() {
document.title = '居民档案审核' document.title = '居民档案审核'
}, },
methods: { methods: {
change(index) { getListInit() {
this.data = [] this.current = 1
// this.keyword = '' this.datas = []
this.currentTabs = index this.getList()
// this.current = 1 },
// this.getList() getList() {
var auditType = 0 // 0待处理; 2已处理
if(this.currentTabs == 1) {
auditType = 2
}
this.$http.post('/app/appresident/list', null, {
params: {
size: 10,
current: this.current,
con: this.keyword,
areaId: this.areaId,
auditType
}, },
getDetail() {
this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.data = res.data
this.$forceUpdate()
this.$nextTick(() => {
this.resident = res.data.resident
this.$forceUpdate()
}) })
.then((res) => {
if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages
} }
}) })
}, },
change(index) {
this.currentTabs = index
this.getListInit()
},
toDetailPeople(item) { toDetailPeople(item) {
uni.navigateTo({ url: `./DetailPeople?id=${item.id}` }) uni.navigateTo({ url: `./DetailPeople?id=${item.id}` })
}, },
seachObj(e) {
this.areaId = e
this.getListInit()
},
handerSearch(e) {
this.keyword = e
this.getListInit()
},
handerClear() {
this.keyword = ''
this.getListInit()
},
},
onReachBottom() {
this.current = this.current + 1
this.getList()
}, },
} }
</script> </script>
@@ -109,12 +148,18 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.ExamineList { .ExamineList {
height: 100%; height: 100%;
.list-content{
padding: 0 60px;
background-color: #fff;
}
.card { .card {
display: flex; display: flex;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08); box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08);
border-radius: 16px; border-radius: 16px;
padding: 48px 32px; padding: 48px 32px;
margin-bottom: 32px; margin-bottom: 32px;
background: url(http://respub.sinoecare.net/20211222/装饰2-20211222162934.png) no-repeat;
background-size: 100% 100%;
.photos { .photos {
img { img {
width: 96px; width: 96px;
@@ -141,6 +186,8 @@ export default {
font-size: 26px; font-size: 26px;
font-weight: 500; font-weight: 500;
color: #5aad6a; color: #5aad6a;
display: inline-block;
width: 100px;
} }
.fileStatuss { .fileStatuss {
display: inline-block; display: inline-block;
@@ -174,16 +221,6 @@ export default {
} }
} }
} }
.card:nth-child(2n-1) {
// background: royalblue;
background: url(http://respub.sinoecare.net/20211222/装饰-20211222162743.png) no-repeat;
background-size: 100% 100%;
}
.card:nth-child(2n) {
// background: pink;
background: url(http://respub.sinoecare.net/20211222/装饰2-20211222162934.png) no-repeat;
background-size: 100% 100%;
}
.middle { .middle {
display: flex; display: flex;
padding: 24px 32px; padding: 24px 32px;
@@ -206,5 +243,27 @@ export default {
padding: 0; padding: 0;
} }
.audit-status{
display: inline-block;
padding: 0 8px;
line-height: 40px;
background: #EAF0FE;
border-radius: 8px;
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
}
.status1{
color: #3E95FF;
background-color: #EAF0FE;
}
.status0{
color: #5AAD6A;
background-color: #E9FFED;
}
.status2{
color: #f46;
background-color: #FFECEF;
}
} }
</style> </style>

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="AppResidentDocument"> <div class="PeopleList">
<div class="areatop"> <div class="areatop">
<!-- <div>区域选择</div> <!-- <div>区域选择</div>
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj"></AiAreaPicker> <AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj"></AiAreaPicker>
@@ -46,8 +46,7 @@
import { mapState } from 'vuex' import { mapState } from 'vuex'
export default { export default {
name: 'AppResidentDocument', name: 'PeopleList',
appName: '居民档案',
components: {}, components: {},
props: {}, props: {},
data() { data() {
@@ -142,7 +141,7 @@ export default {
uni-page-body { uni-page-body {
height: 100%; height: 100%;
} }
.AppResidentDocument { .PeopleList {
height: 100%; height: 100%;
.areatop { .areatop {
display: flex; display: flex;

View File

@@ -69,6 +69,7 @@ export default {
this.isMyGird = params.isMyGird this.isMyGird = params.isMyGird
} }
this.isGirdUser() this.isGirdUser()
}, },
methods: { methods: {
isGirdUser() { isGirdUser() {