初始化
This commit is contained in:
408
packages/creditScore/scorePersonal/AppScorePersonal.vue
Normal file
408
packages/creditScore/scorePersonal/AppScorePersonal.vue
Normal file
@@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<section class="scoreFamily">
|
||||
<ai-list v-show="!detailShow">
|
||||
<template slot="title">
|
||||
<ai-title title="个人积分" :isShowBottomBorder="true" :instance="instance" :isShowArea="true" @change="getList()" v-model="areaId"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template slot="left">
|
||||
<el-select size="small" v-model="searchObj.householdName" placeholder="是否户主" clearable @change="page.current = 1,getList()">
|
||||
<el-option
|
||||
v-for="(item,i) in householdNameList"
|
||||
:key="i"
|
||||
:label="item.dictName"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select size="small" v-model="searchObj.isPositive" placeholder="积分是否大于0" clearable @change="page.current = 1,getList()">
|
||||
<el-option
|
||||
v-for="(item,i) in isPositiveList"
|
||||
:key="i"
|
||||
:label="item.dictName"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="searchObj.con"
|
||||
size="small"
|
||||
placeholder="个人姓名"
|
||||
@keyup.enter.native="page.current = 1, getList()"
|
||||
@clear="page.current = 1, searchObj.con = '', getList()"
|
||||
clearable
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar class="mt10">
|
||||
<template slot="left">
|
||||
<ai-download :instance="instance" type="primary" url="/app/appvillagerintegraldetail/listExport?exportType=1" :params="params" fileName="个人积分"></ai-download>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="page.total"
|
||||
style="margin-top: 12px;"
|
||||
:current.sync="page.current"
|
||||
:size.sync="page.size"
|
||||
@getList="getList">
|
||||
<el-table-column label="操作" slot="options" fixed="right" align="center" width="180">
|
||||
<template v-slot="{row}">
|
||||
<div class="table-options">
|
||||
<el-button type="text" title="家庭成员" @click="familyMember(row)" :disabled="!$permissions('app_appvillagerintegralfamilymember_edit')">家庭成员</el-button>
|
||||
<el-button type="text" :disabled="!$permissions('app_appvillagerintegralfamily_detail')" title="详情" @click="goDetail(row)">详情</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<detail v-if="detailShow" @goBack="goBack" :detailInfo='detailInfo' :instance='instance' :dict='dict'></detail>
|
||||
<ai-dialog class="family-list"
|
||||
title="成员列表"
|
||||
:visible.sync="addMemberVisible"
|
||||
:customFooter="true"
|
||||
:destroyOnClose="true"
|
||||
width="780px">
|
||||
<ai-table
|
||||
:tableData="familyList"
|
||||
:col-configs="familycolConfigs"
|
||||
:total="familyPage.total"
|
||||
:current.sync="familyPage.current"
|
||||
:size.sync="familyPage.size"
|
||||
:isShowPagination="false"
|
||||
tableSize="small"
|
||||
@getList="familyMember(rowInfo)">
|
||||
<el-table-column label="与户主关系" slot="householdRelation" align="center" width="120">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.householdIdNumber == row.idNumber">户主</span>
|
||||
<span v-else>{{dict.getLabel('householdRelation', row.householdRelation)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身份证号" slot="idNumber" align="center" width="165">
|
||||
<template v-slot="{row}">
|
||||
<ai-id mode="show" :show-eyes="false" :value="row.idNumber"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<div class="dialog-footer" slot="footer">
|
||||
<el-button @click="addMemberVisible=false" size="medium">关 闭</el-button>
|
||||
</div>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex';
|
||||
import detail from './detail'
|
||||
|
||||
export default {
|
||||
name: 'scorePersonal',
|
||||
label: "个人积分",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
components: {detail},
|
||||
data() {
|
||||
return {
|
||||
areaId: '',
|
||||
searchObj: {
|
||||
householdName: '',
|
||||
con: '',
|
||||
isPositive: ''
|
||||
},
|
||||
householdNameList: [{
|
||||
dictName: '是',
|
||||
dictValue: '1'
|
||||
}, {
|
||||
dictName: '否',
|
||||
dictValue: '0'
|
||||
}],
|
||||
isPositiveList: [{
|
||||
dictName: '是',
|
||||
dictValue: '1'
|
||||
}, {
|
||||
dictName: '否',
|
||||
dictValue: '0'
|
||||
}],
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0
|
||||
},
|
||||
familyPage: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0
|
||||
},
|
||||
exportParams: {},
|
||||
tableData: [],
|
||||
dialog: {
|
||||
title: '添加家庭',
|
||||
visible: false
|
||||
},
|
||||
dialogInfo: {
|
||||
personType: '0',
|
||||
name: '',
|
||||
idNumber: '',
|
||||
phone: '',
|
||||
villageGroup: '',
|
||||
status: '',
|
||||
areaId: '',
|
||||
householdRelation: '',
|
||||
avatar: ''
|
||||
},
|
||||
addMemberVisible: false,
|
||||
detailShow: false,
|
||||
personUrl: '',
|
||||
familyList: [],
|
||||
familyId: '',
|
||||
detailInfo: {},
|
||||
rowInfo: {}
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
params () {
|
||||
return {
|
||||
...this.searchObj,
|
||||
areaId: this.areaId,
|
||||
exportType: 1
|
||||
}
|
||||
},
|
||||
colConfigs() {
|
||||
return [
|
||||
{
|
||||
prop: 'name',
|
||||
label: '姓名',
|
||||
},
|
||||
{
|
||||
prop: 'phone',
|
||||
align: 'center',
|
||||
label: '联系电话',
|
||||
},
|
||||
{
|
||||
prop: 'residentType',
|
||||
align: 'center',
|
||||
label: '类型',
|
||||
formart: v => this.dict.getLabel('residentType', v)
|
||||
},
|
||||
{
|
||||
prop: 'householdAreaName',
|
||||
align: 'center',
|
||||
label: '所在村'
|
||||
},
|
||||
{
|
||||
prop: 'personalIntegral',
|
||||
align: 'center',
|
||||
label: '个人积分',
|
||||
},
|
||||
{
|
||||
prop: 'personalUsedIntegral',
|
||||
align: 'center',
|
||||
label: '已用积分',
|
||||
},
|
||||
{
|
||||
prop: 'householdName',
|
||||
align: 'center',
|
||||
label: '是否户主',
|
||||
formart: v => v === '1' ? '是' : '否'
|
||||
}
|
||||
]
|
||||
},
|
||||
familycolConfigs() {
|
||||
return [
|
||||
{
|
||||
prop: 'householdRelation',
|
||||
align: 'center',
|
||||
slot: 'householdRelation',
|
||||
label: '与户主关系',
|
||||
width: 165,
|
||||
},
|
||||
|
||||
// {
|
||||
// prop: 'householdRelation',
|
||||
// align: 'center',
|
||||
// label: '与户主关系',
|
||||
// render(h, {row}) {
|
||||
// return h('span', {}, _.$dict.getLabel('householdRelation', row.householdRelation))
|
||||
// }
|
||||
// },
|
||||
{
|
||||
prop: 'residentType',
|
||||
align: 'center',
|
||||
label: '类型',
|
||||
formart: v => this.dict.getLabel('residentType', v)
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
align: 'center',
|
||||
label: '姓名',
|
||||
},
|
||||
{
|
||||
prop: 'idNumber',
|
||||
align: 'center',
|
||||
slot: 'idNumber',
|
||||
label: '身份证号',
|
||||
width: 165,
|
||||
},
|
||||
{
|
||||
prop: 'phone',
|
||||
align: 'center',
|
||||
label: '联系电话',
|
||||
width: 120,
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
formRules() {
|
||||
let IdNumberPass = (rule, value, callback) => {
|
||||
if (value) {
|
||||
console.log(this.idCardNoUtil);
|
||||
if (this.idCardNoUtil.checkIdCardNo(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("身份证号格式错误"));
|
||||
}
|
||||
} else {
|
||||
callback(new Error("请输入身份证号"));
|
||||
}
|
||||
};
|
||||
if (this.dialog.title.indexOf('家庭') != -1) {
|
||||
|
||||
return {
|
||||
personType: [{required: true, message: "请选择类型", trigger: 'change'}],
|
||||
name: [{required: true, message: "请填写户主", trigger: 'change'}],
|
||||
idNumber: [{required: true, validator: IdNumberPass, trigger: 'change'}],
|
||||
phone: [{required: true, message: "请填写联系电话", trigger: 'blur'}],
|
||||
villageGroup: [{required: true, message: "请选择所属组", trigger: 'change'}],
|
||||
status: [{required: true, message: "请选择状态", trigger: 'change'}],
|
||||
householdRelation: [{required: true, message: "请选择与户主关系", trigger: 'change'}]
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
personType: [{required: true, message: "请选择类型", trigger: 'change'}],
|
||||
name: [{required: true, message: "请填写户主", trigger: 'change'}],
|
||||
idNumber: [{required: true, validator: IdNumberPass, trigger: 'change'}],
|
||||
villageGroup: [{required: true, message: "请选择所属组", trigger: 'change'}],
|
||||
status: [{required: true, message: "请选择状态", trigger: 'change'}],
|
||||
householdRelation: [{required: true, message: "请选择与户主关系", trigger: 'change'}]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.areaId = this.user.info.areaId;
|
||||
this.dict.load('integralVillageGroup', 'integralRuleStatus', 'integralPersonType', 'householdRelation', 'residentType');
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post("/app/appresident/personalIntegral", null, {
|
||||
params: {
|
||||
...this.searchObj,
|
||||
...this.page,
|
||||
areaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records.map(v => {
|
||||
return v
|
||||
})
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
typeChange(val) {
|
||||
val == '0' ? this.personUrl = '/app/appresident/list?fileStatus=0' : this.personUrl = '/app/apprecurrentpopulation/list?fileStatus=0';
|
||||
this.dialogInfo.name = "";
|
||||
this.dialogInfo.idNumber = "";
|
||||
this.dialogInfo.phone = "";
|
||||
this.dialogInfo.avatar = "";
|
||||
this.dialogInfo.areaId = "";
|
||||
},
|
||||
add() {
|
||||
this.dialog.visible = true;
|
||||
this.dialog.title = '添加家庭';
|
||||
},
|
||||
addFamily() {
|
||||
this.dialog.visible = true;
|
||||
this.dialog.title = '添加成员';
|
||||
},
|
||||
|
||||
init(formName) {
|
||||
this.$refs[formName].clearValidate();
|
||||
Object.keys(this.dialogInfo).forEach(e => {
|
||||
this.dialogInfo[e] = ''
|
||||
})
|
||||
this.dialogInfo.personType = '0';
|
||||
this.personUrl = '';
|
||||
},
|
||||
|
||||
familyMember (row) {
|
||||
this.instance.post(`/app/appresident/detail?id=${row.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.familyList = res.data.family
|
||||
this.familyPage.total = res.data.family.length
|
||||
this.addMemberVisible = true
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
goBack() {
|
||||
this.detailShow = false;
|
||||
},
|
||||
|
||||
goDetail(row) {
|
||||
this.detailInfo = {...row};
|
||||
this.detailShow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.scoreFamily {
|
||||
height: 100%;
|
||||
background: #f3f6f9;
|
||||
overflow: auto;
|
||||
|
||||
.form_div {
|
||||
width: 380px;
|
||||
}
|
||||
|
||||
.add_btn {
|
||||
color: #5088FF;
|
||||
font-size: 14px;
|
||||
line-height: 36px;
|
||||
text-align: right;
|
||||
|
||||
span {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.iconAll_Profile {
|
||||
padding: 0 8px;
|
||||
}
|
||||
.family-list{
|
||||
::v-deep .el-table--small{
|
||||
font-size: 14px!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
207
packages/creditScore/scorePersonal/detail.vue
Normal file
207
packages/creditScore/scorePersonal/detail.vue
Normal file
@@ -0,0 +1,207 @@
|
||||
<template>
|
||||
<ai-detail class="family_detail">
|
||||
<template slot="title">
|
||||
<ai-title title="个人积分明细" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="$emit('goBack')" ></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<div class="detail-info">
|
||||
<div class="detail-info__item">
|
||||
<h2>姓名</h2>
|
||||
<span>{{ info.name }}</span>
|
||||
</div>
|
||||
<div class="detail-info__item">
|
||||
<h2>个人积分</h2>
|
||||
<span style="color: #2266FF;">{{ info.personalIntegral || 0 }}</span>
|
||||
</div>
|
||||
<div class="detail-info__item">
|
||||
<h2>已用积分</h2>
|
||||
<span style="color: #2266FF;">{{ info.personalUsedIntegral || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<ai-card title="余额变动明细">
|
||||
<template slot="right">
|
||||
<!-- <ai-download
|
||||
:instance="instance"
|
||||
url="/app/appvillagerintegraldetail/export"
|
||||
:disabled="!Boolean(tableData.length)"
|
||||
:params="{familyName:detailInfo.name,doType:doType}"
|
||||
fileName="余额变动明细">
|
||||
<span class="iconfont iconExported">导出</span>
|
||||
</ai-download> -->
|
||||
</template>
|
||||
<template #content>
|
||||
<el-select v-model="doType" placeholder="请选择类型" size='small' clearable @change="page.current=1,getList()">
|
||||
<el-option
|
||||
v-for="(item,i) in dict.getDict('integralDetailType')"
|
||||
:label="item.dictName"
|
||||
:key="i"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<ai-table class="fs-14"
|
||||
style="margin-top: 16px;"
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="page.total"
|
||||
:current.sync="page.current"
|
||||
:size.sync="page.size"
|
||||
:isShowPagination="false"
|
||||
tableSize="small"
|
||||
:border="true"
|
||||
@getList="getList">
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'balance',
|
||||
|
||||
props: {
|
||||
detailInfo: {
|
||||
type: Object,
|
||||
require: true
|
||||
},
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0
|
||||
},
|
||||
info: {},
|
||||
doType: '',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.dict.load('integralDetailType')
|
||||
this.getList()
|
||||
},
|
||||
|
||||
computed: {
|
||||
colConfigs () {
|
||||
const _this = this
|
||||
return [
|
||||
{
|
||||
prop: 'doTime',
|
||||
align: 'center',
|
||||
label: '时间',
|
||||
align:'left'
|
||||
},
|
||||
{
|
||||
prop: 'doType',
|
||||
align: 'center',
|
||||
label: '类型',
|
||||
render (h, {row}) {
|
||||
return h('span',{}, _this.dict.getLabel('integralDetailType', row.bizType))
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'changeIntegral',
|
||||
align: 'center',
|
||||
label: '变动积分'
|
||||
},
|
||||
{
|
||||
prop: 'nowIntegral',
|
||||
align: 'center',
|
||||
label: '剩余积分'
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
align: 'center',
|
||||
label: '事件类型',
|
||||
align:'left'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appresident/detail?id=${this.detailInfo.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data.resident
|
||||
this.instance.post(`/app/appvillagerintegraldetail/IntegralList?bizType=${this.doType}&type=1&residentId=${res.data.resident.id}`, null, {
|
||||
params: this.page
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.records
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.family_detail{
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
|
||||
::v-deep .ai-card__body {
|
||||
padding: 12px 16px 20px!important;
|
||||
}
|
||||
|
||||
.detail-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.detail-info__item {
|
||||
flex: 1;
|
||||
height: 96px;
|
||||
margin-right: 20px;
|
||||
padding: 16px 24px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15);
|
||||
border-radius: 4px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 8px;
|
||||
color: #888888;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
line-height: 32px;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
}
|
||||
}
|
||||
.iconExported{
|
||||
color:#5088FF;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.info{
|
||||
padding: 16px 0 16px 0;
|
||||
}
|
||||
.do_type{
|
||||
height: 56px;
|
||||
}
|
||||
.fs-14{
|
||||
::v-deep .el-table--small{
|
||||
font-size: 14px!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user