积分应用暂时修改
This commit is contained in:
@@ -1,573 +0,0 @@
|
|||||||
<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.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="户主姓名"
|
|
||||||
v-throttle="() => {page.current = 1, getList()}"
|
|
||||||
@clear="search.current = 1, search.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" :params="params" fileName="家庭积分"></ai-download>
|
|
||||||
</template>
|
|
||||||
</ai-search-bar>
|
|
||||||
<ai-table
|
|
||||||
:tableData="tableData"
|
|
||||||
:col-configs="colConfigs"
|
|
||||||
:total="page.total"
|
|
||||||
ref="aitableex"
|
|
||||||
: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="edit(row)" :disabled="!$permissions('app_appvillagerintegralfamily_edit')">编辑</el-button> -->
|
|
||||||
<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
|
|
||||||
:title="dialog.title"
|
|
||||||
:visible.sync="dialog.visible"
|
|
||||||
:customFooter="true"
|
|
||||||
:destroyOnClose="true"
|
|
||||||
@close="init('ruleForm')"
|
|
||||||
width="520px">
|
|
||||||
<div class="form_div">
|
|
||||||
<el-form ref="ruleForm" :model="dialogInfo" :rules="formRules" size="small" label-suffix=":"
|
|
||||||
label-width="120px">
|
|
||||||
<el-form-item label="类型" prop="personType">
|
|
||||||
<el-radio-group v-model="dialogInfo.personType" @change="typeChange"
|
|
||||||
:disabled="dialog.title.indexOf('修改')!=-1">
|
|
||||||
<el-radio label="0">户籍居民</el-radio>
|
|
||||||
<el-radio label="1">外来人员</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="dialog.title.indexOf('家庭')!=-1?'户主':'姓名'" prop="name">
|
|
||||||
<el-row type="flex" :gutter="8">
|
|
||||||
<el-col>
|
|
||||||
<el-input v-model="dialogInfo.name" disabled clearable/>
|
|
||||||
</el-col>
|
|
||||||
<el-col>
|
|
||||||
<ai-person-select :instance="instance" :key="personUrl" :url="personUrl" @selectPerson="getSelect"
|
|
||||||
v-if="dialog.title.indexOf('添加')!=-1"></ai-person-select>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="身份证号" prop="idNumber">
|
|
||||||
<el-input v-model="dialogInfo.idNumber" disabled clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="联系电话" prop="phone">
|
|
||||||
<el-input type="number" v-model="dialogInfo.phone" maxlength="11" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属组" prop="villageGroup" v-if="dialog.title.indexOf('家庭')!=-1">
|
|
||||||
<el-select v-model="dialogInfo.villageGroup" placeholder="请选择...">
|
|
||||||
<el-option
|
|
||||||
v-for="(item,i) in dict.getDict('integralVillageGroup')"
|
|
||||||
:key="i"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictValue"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status" v-if="dialog.title.indexOf('家庭')!=-1">
|
|
||||||
<el-select v-model="dialogInfo.status" placeholder="请选择...">
|
|
||||||
<el-option
|
|
||||||
v-for="(item,i) in dict.getDict('integralRuleStatus')"
|
|
||||||
:key="i"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictValue"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="与户主关系" prop="householdRelation" v-if="dialog.title.indexOf('成员')!=-1">
|
|
||||||
<el-select
|
|
||||||
v-model="dialogInfo.householdRelation"
|
|
||||||
placeholder="请选择"
|
|
||||||
size="mini"
|
|
||||||
clearable
|
|
||||||
style="width:216px;"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="(item,i) in dict.getDict('householdRelation')"
|
|
||||||
:label="item.dictName"
|
|
||||||
:key="i"
|
|
||||||
:value="item.dictValue"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<div class="dialog-footer" slot="footer">
|
|
||||||
<el-button @click="dialog.visible=false" size="medium">取消</el-button>
|
|
||||||
<el-button @click="onConfirm('ruleForm')" type="primary" size="medium">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</ai-dialog>
|
|
||||||
<ai-dialog class="family-list"
|
|
||||||
title="成员列表"
|
|
||||||
:visible.sync="addMemberVisible"
|
|
||||||
:customFooter="true"
|
|
||||||
:destroyOnClose="true"
|
|
||||||
width="780px">
|
|
||||||
<!-- <p class="add_btn">
|
|
||||||
<span class="iconfont iconAdd" @click="addFamily()"></span>
|
|
||||||
<span @click="addFamily()">添加家庭成员</span>
|
|
||||||
</p> -->
|
|
||||||
<ai-table
|
|
||||||
:tableData="familyList"
|
|
||||||
:col-configs="familycolConfigs"
|
|
||||||
:total="familyPage.total"
|
|
||||||
:current.sync="familyPage.current"
|
|
||||||
:size.sync="familyPage.size"
|
|
||||||
:isShowPagination="false"
|
|
||||||
@getList="familyMember(rowInfo)">
|
|
||||||
<el-table-column label="与户主关系" slot="householdRelation" align="center" width="120">
|
|
||||||
<template v-slot="{row}">
|
|
||||||
<span v-if="row.householdName == 1">户主</span>
|
|
||||||
<span v-else>{{dict.getLabel('householdRelation', row.householdRelation)}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="类型" slot="personType" align="center" width="120">
|
|
||||||
<template v-slot="{row}">户籍居民</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>
|
|
||||||
<!-- <el-table-column label="操作" slot="options" align="center">
|
|
||||||
<template v-slot="{row}">
|
|
||||||
<el-button type="text"
|
|
||||||
v-if="row.householdRelation!=11&&$permissions('app_appvillagerintegralfamilymember_edit')"
|
|
||||||
icon="iconfont iconEdit" title="编辑" @click="editFamily(row)"/>
|
|
||||||
<el-button type="text"
|
|
||||||
v-if="row.householdRelation!=11&&$permissions('app_appvillagerintegralfamilymember_del')"
|
|
||||||
icon="iconfont iconDelete" title="删除" @click="deleteFamily(row.id)"/>
|
|
||||||
</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: 'AppScoreFamily',
|
|
||||||
label: "家庭积分",
|
|
||||||
props: {
|
|
||||||
instance: Function,
|
|
||||||
dict: Object,
|
|
||||||
permissions: Function
|
|
||||||
},
|
|
||||||
components: {detail},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
areaId: '',
|
|
||||||
searchObj: {
|
|
||||||
personType: '',
|
|
||||||
villageGroup: '',
|
|
||||||
status: '',
|
|
||||||
con: '',
|
|
||||||
isPositive: '',
|
|
||||||
},
|
|
||||||
isPositiveList: [{
|
|
||||||
dictName: '是',
|
|
||||||
dictValue: '1'
|
|
||||||
}, {
|
|
||||||
dictName: '否',
|
|
||||||
dictValue: '0'
|
|
||||||
}],
|
|
||||||
page: {
|
|
||||||
current: 1,
|
|
||||||
size: 10,
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
familyPage: {
|
|
||||||
current: 1,
|
|
||||||
size: 100,
|
|
||||||
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: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
colConfigs() {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
prop: 'name',
|
|
||||||
label: '户主',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'phone',
|
|
||||||
align: 'center',
|
|
||||||
label: '联系电话',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'householdAreaName',
|
|
||||||
align: 'center',
|
|
||||||
label: '所在村',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'familyIntegral',
|
|
||||||
align: 'center',
|
|
||||||
label: '家庭积分',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'familyUsedIntegral',
|
|
||||||
align: 'center',
|
|
||||||
label: '已用积分',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'familySurplusIntegral',
|
|
||||||
align: 'center',
|
|
||||||
label: '剩余积分',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'familyNum',
|
|
||||||
align: 'center',
|
|
||||||
label: '成员数',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
familycolConfigs() {
|
|
||||||
return [
|
|
||||||
// {
|
|
||||||
// prop: 'householdRelation',
|
|
||||||
// align: 'center',
|
|
||||||
// label: '与户主关系',
|
|
||||||
// render(h, {row}) {
|
|
||||||
// return h('span', {}, _.$dict.getLabel('householdRelation', row.householdRelation))
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
slot: '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/familyIntegral", null, {
|
|
||||||
params: {
|
|
||||||
...this.searchObj,
|
|
||||||
...this.page,
|
|
||||||
areaId: this.areaId
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.tableData = res.data.records
|
|
||||||
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 = '添加成员';
|
|
||||||
},
|
|
||||||
onConfirm(formName) {
|
|
||||||
this.$refs[formName].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.dialog.title.indexOf('家庭') != -1) {
|
|
||||||
this.instance.post("/app/appvillagerintegralfamily/addOrUpdate", {
|
|
||||||
...this.dialogInfo,
|
|
||||||
}, null).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.dialog.visible = false;
|
|
||||||
if (this.dialog.title.indexOf('添加') != -1) {
|
|
||||||
this.$message.success("添加成功")
|
|
||||||
} else {
|
|
||||||
this.$message.success("修改成功")
|
|
||||||
}
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.instance.post("/app/appvillagerintegralfamilymember/addOrUpdate", {
|
|
||||||
...this.dialogInfo,
|
|
||||||
familyId: this.familyId,
|
|
||||||
familyIdNumber: this.rowInfo.idNumber,
|
|
||||||
familyName: this.rowInfo.name
|
|
||||||
}, null).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.dialog.visible = false;
|
|
||||||
if (this.dialog.title.indexOf('添加') != -1) {
|
|
||||||
this.$message.success("添加成功")
|
|
||||||
} else {
|
|
||||||
this.$message.success("修改成功")
|
|
||||||
}
|
|
||||||
this.familyMember(this.rowInfo);
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
init(formName) {
|
|
||||||
this.$refs[formName].clearValidate();
|
|
||||||
Object.keys(this.dialogInfo).forEach(e => {
|
|
||||||
this.dialogInfo[e] = ''
|
|
||||||
})
|
|
||||||
this.dialogInfo.personType = '0';
|
|
||||||
this.personUrl = '';
|
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
Object.keys(this.searchObj).forEach(e => {
|
|
||||||
this.searchObj[e] = ''
|
|
||||||
});
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
edit(row) {
|
|
||||||
this.dialog.visible = true;
|
|
||||||
this.dialog.title = '修改家庭';
|
|
||||||
this.dialogInfo = {...row}
|
|
||||||
},
|
|
||||||
editFamily(row) {
|
|
||||||
this.dialog.visible = true;
|
|
||||||
this.dialog.title = '修改成员';
|
|
||||||
this.dialogInfo = {...row}
|
|
||||||
},
|
|
||||||
deleteFamily(ids) {
|
|
||||||
ids && this.$confirm("是否要删除该家庭成员", {
|
|
||||||
type: 'error'
|
|
||||||
}).then(() => {
|
|
||||||
this.instance.post("/app/appvillagerintegralfamilymember/delete", null, {
|
|
||||||
params: {ids}
|
|
||||||
}).then(res => {
|
|
||||||
if (res?.code == 0) {
|
|
||||||
this.$message.success("删除成功!")
|
|
||||||
this.familyMember(this.rowInfo);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getSelect(val) {
|
|
||||||
console.log(val)
|
|
||||||
if (val) {
|
|
||||||
|
|
||||||
this.dialogInfo.name = val.name;
|
|
||||||
this.dialogInfo.idNumber = val.idNumber;
|
|
||||||
this.dialogInfo.avatar = val.photo;
|
|
||||||
if (this.dialogInfo.personType == 0) {
|
|
||||||
this.dialogInfo.areaId = val.householdAreaId;
|
|
||||||
} else {
|
|
||||||
this.dialogInfo.areaId = val.currentAreaId;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.dialogInfo.name = '';
|
|
||||||
this.dialogInfo.idNumber = '';
|
|
||||||
this.dialogInfo.phone = '';
|
|
||||||
this.dialogInfo.areaId = '';
|
|
||||||
this.dialogInfo.avatar = '';
|
|
||||||
this.$refs['rules'].clearValidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
familyMember(row) {
|
|
||||||
this.rowInfo = {...row}
|
|
||||||
this.familyId = row.id;
|
|
||||||
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>
|
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
<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>{{ detailInfo.name }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="detail-info__item">
|
|
||||||
<h2>累计积分</h2>
|
|
||||||
<span style="color: #2266FF;">{{ detailInfo.familyIntegral || 0 }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="detail-info__item">
|
|
||||||
<h2>剩余积分</h2>
|
|
||||||
<span style="color: #2266FF;">{{ detailInfo.familySurplusIntegral || 0 }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="detail-info__item">
|
|
||||||
<h2>已消费</h2>
|
|
||||||
<span>{{ detailInfo.familyUsedIntegral || 0 }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ai-card title="余额变动明细">
|
|
||||||
<template slot="right">
|
|
||||||
<ai-download
|
|
||||||
:instance="instance"
|
|
||||||
url="/app/appvillagerintegraldetail/export"
|
|
||||||
:disabled="!Boolean(tableData.length)"
|
|
||||||
:params="{familyId:detailInfo.id,bizType: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
|
|
||||||
style="margin-top: 16px;"
|
|
||||||
:tableData="tableData"
|
|
||||||
:col-configs="colConfigs"
|
|
||||||
:total="page.total"
|
|
||||||
:border="true"
|
|
||||||
:stripe="false"
|
|
||||||
:current.sync="page.current"
|
|
||||||
:size.sync="page.size"
|
|
||||||
@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
|
|
||||||
},
|
|
||||||
doType: '',
|
|
||||||
tableData: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
created() {
|
|
||||||
this.dict.load('integralDetailType')
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
colConfigs() {
|
|
||||||
const _this = this
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
prop: 'doTime',
|
|
||||||
label: '时间'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'bizType',
|
|
||||||
align: 'center',
|
|
||||||
label: '类型',
|
|
||||||
render(h, {row}) {
|
|
||||||
return h('span', {}, _this.dict.getLabel('integralDetailType', row.bizType))
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'changeIntegral',
|
|
||||||
align: 'center',
|
|
||||||
label: '变动积分',
|
|
||||||
formart: v => v > 0 ? `+${v}` : v
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'nowIntegral',
|
|
||||||
align: 'center',
|
|
||||||
label: '剩余积分'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'description',
|
|
||||||
label: '事件类型',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
getList() {
|
|
||||||
this.instance.post('/app/appvillagerintegraldetail/list', null, {
|
|
||||||
params: {
|
|
||||||
...this.page,
|
|
||||||
familyId: this.detailInfo.id,
|
|
||||||
bizType: this.doType
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.page.total = res.data.total
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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: 0 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>
|
|
||||||
@@ -24,7 +24,7 @@ import scoreChange from "./scoreChange";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppScoreManage',
|
name: 'AppScoreManage',
|
||||||
label: "积分管理",
|
label: "积分管理(秀山)",
|
||||||
components: {pointsDeclaration, pointsDetails, pointsAppeal, scoreChange},
|
components: {pointsDeclaration, pointsDetails, pointsAppeal, scoreChange},
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
|
|||||||
@@ -1,408 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="scoreFamily">
|
<section class="AppScorePersonal">
|
||||||
<ai-list v-show="!detailShow">
|
<component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||||
<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="个人姓名"
|
|
||||||
v-throttle="() => {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>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex';
|
|
||||||
import detail from './detail'
|
import detail from './detail'
|
||||||
|
import SpList from "./spList";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppScorePersonal',
|
name: 'AppScorePersonal',
|
||||||
label: "个人积分",
|
label: "积分统计(秀山)",
|
||||||
|
components: {SpList, detail},
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
permissions: Function
|
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: {
|
computed: {
|
||||||
...mapState(['user']),
|
currentComponent() {
|
||||||
params () {
|
return this.$route.query.id ? detail : SpList
|
||||||
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() {
|
created() {
|
||||||
this.areaId = this.user.info.areaId;
|
this.dict.load('integralVillageGroup', 'integralRuleStatus', 'integralPersonType', 'householdRelation', 'residentType', "integralDetailType");
|
||||||
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.scoreFamily {
|
.AppScorePersonal {
|
||||||
height: 100%;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-detail class="family_detail">
|
<ai-detail class="spDetail">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="个人积分明细" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="$emit('goBack')" ></ai-title>
|
<ai-title title="积分明细" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="$router.push({})"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<div class="detail-info">
|
<div class="detail-info">
|
||||||
<div class="detail-info__item">
|
<div class="detail-info__item">
|
||||||
<h2>姓名</h2>
|
<h2>账号</h2>
|
||||||
<span>{{ info.name }}</span>
|
<span>{{ info.phone || "-" }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-info__item">
|
<div class="detail-info__item">
|
||||||
<h2>个人积分</h2>
|
<h2>个人积分</h2>
|
||||||
@@ -20,35 +20,27 @@
|
|||||||
</div>
|
</div>
|
||||||
<ai-card title="余额变动明细">
|
<ai-card title="余额变动明细">
|
||||||
<template slot="right">
|
<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>
|
||||||
<template #content>
|
<template #content>
|
||||||
<el-select v-model="doType" placeholder="请选择类型" size='small' clearable @change="page.current=1,getList()">
|
<el-select v-model="doType" placeholder="请选择类型" size='small' clearable @change="page.current=1,getList()">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,i) in dict.getDict('integralDetailType')"
|
v-for="(item,i) in dict.getDict('integralDetailType')"
|
||||||
:label="item.dictName"
|
:label="item.dictName"
|
||||||
:key="i"
|
:key="i"
|
||||||
:value="item.dictValue">
|
:value="item.dictValue">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<ai-table class="fs-14"
|
<ai-table class="fs-14"
|
||||||
style="margin-top: 16px;"
|
style="margin-top: 16px;"
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="page.total"
|
:total="page.total"
|
||||||
:current.sync="page.current"
|
:current.sync="page.current"
|
||||||
:size.sync="page.size"
|
:size.sync="page.size"
|
||||||
:isShowPagination="false"
|
:isShowPagination="false"
|
||||||
tableSize="small"
|
tableSize="small"
|
||||||
:border="true"
|
:border="true"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
</ai-table>
|
</ai-table>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
@@ -57,149 +49,148 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'balance',
|
name: 'spDetail',
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object
|
||||||
|
},
|
||||||
|
|
||||||
props: {
|
data() {
|
||||||
detailInfo: {
|
return {
|
||||||
type: Object,
|
page: {
|
||||||
require: true
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0
|
||||||
},
|
},
|
||||||
instance: Function,
|
info: {},
|
||||||
dict: Object
|
doType: '',
|
||||||
},
|
tableData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
data () {
|
created() {
|
||||||
return {
|
this.getList()
|
||||||
page: {
|
},
|
||||||
current: 1,
|
|
||||||
size: 10,
|
computed: {
|
||||||
total: 0
|
colConfigs() {
|
||||||
|
const _this = this
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
prop: 'doTime',
|
||||||
|
label: '时间',
|
||||||
|
align: 'left'
|
||||||
},
|
},
|
||||||
info: {},
|
{
|
||||||
doType: '',
|
prop: 'doType',
|
||||||
tableData: []
|
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',
|
||||||
|
label: '事件类型',
|
||||||
|
align: 'left'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
created () {
|
methods: {
|
||||||
this.dict.load('integralDetailType')
|
getList() {
|
||||||
this.getList()
|
let {id} = this.$route.query
|
||||||
},
|
this.instance.post(`/app/appresident/detail?id=${id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
computed: {
|
this.info = res.data.resident
|
||||||
colConfigs () {
|
this.instance.post(`/app/appvillagerintegraldetail/IntegralList?bizType=${this.doType}&type=1&residentId=${res.data.resident.id}`, null, {
|
||||||
const _this = this
|
params: this.page
|
||||||
return [
|
}).then(res => {
|
||||||
{
|
if (res.code == 0) {
|
||||||
prop: 'doTime',
|
this.tableData = res.data.records
|
||||||
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',
|
|
||||||
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.family_detail{
|
.spDetail {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
::v-deep .ai-card__body {
|
::v-deep .ai-card__body {
|
||||||
padding: 12px 16px 20px!important;
|
padding: 12px 16px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-info {
|
.detail-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
||||||
.detail-info__item {
|
.detail-info__item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
padding: 16px 24px;
|
padding: 16px 24px;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0 4px 6px -2px rgba(15, 15, 21, 0.15);
|
box-shadow: 0 4px 6px -2px rgba(15, 15, 21, 0.15);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-right: 0;
|
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{
|
h2 {
|
||||||
color:#5088FF;
|
margin-bottom: 8px;
|
||||||
font-size: 12px;
|
color: #888888;
|
||||||
cursor: pointer;
|
font-size: 16px;
|
||||||
}
|
font-weight: bold;
|
||||||
.info{
|
}
|
||||||
padding: 16px 0 16px 0;
|
|
||||||
}
|
span {
|
||||||
.do_type{
|
display: block;
|
||||||
height: 56px;
|
line-height: 32px;
|
||||||
}
|
font-size: 24px;
|
||||||
.fs-14{
|
font-weight: bold;
|
||||||
::v-deep .el-table--small{
|
color: #222;
|
||||||
font-size: 14px!important;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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>
|
</style>
|
||||||
|
|||||||
358
project/xiushan/apps/creditScore/scorePersonal/spList.vue
Normal file
358
project/xiushan/apps/creditScore/scorePersonal/spList.vue
Normal file
@@ -0,0 +1,358 @@
|
|||||||
|
<template>
|
||||||
|
<section class="spList">
|
||||||
|
<ai-list>
|
||||||
|
<ai-title slot="title" title="个人积分" isShowBottomBorder/>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-search-bar bottomBorder>
|
||||||
|
<template slot="left">
|
||||||
|
<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="个人姓名"
|
||||||
|
@change="page.current = 1, searchObj.con = '', getList()" clearable
|
||||||
|
suffix-icon="iconfont iconSearch"/>
|
||||||
|
</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" :disabled="!$permissions('app_appvillagerintegralfamily_detail')" title="详情"
|
||||||
|
@click="goDetail(row)">详情
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
<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";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "spList",
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
permissions: Function
|
||||||
|
},
|
||||||
|
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,
|
||||||
|
personUrl: '',
|
||||||
|
familyList: [],
|
||||||
|
familyId: '',
|
||||||
|
detailInfo: {},
|
||||||
|
rowInfo: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
|
params() {
|
||||||
|
return {
|
||||||
|
...this.searchObj,
|
||||||
|
areaId: this.areaId,
|
||||||
|
exportType: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
colConfigs() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
prop: 'phone',
|
||||||
|
align: 'center',
|
||||||
|
label: '用户账号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'personalIntegral',
|
||||||
|
align: 'center',
|
||||||
|
label: '获取积分',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'personalUsedIntegral',
|
||||||
|
align: 'center',
|
||||||
|
label: '已用积分',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'center',
|
||||||
|
label: '剩余积分',
|
||||||
|
render: (h, {row}) => h('span', null, row.personalIntegral - row.personalUsedIntegral)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
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.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.instance.post("/app/appportaluser/list", 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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goDetail(row) {
|
||||||
|
this.$router.push({query: {id: row.id}})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.spList {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.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>
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "AppScoreRules",
|
name: "AppScoreRules",
|
||||||
label: "积分规则",
|
label: "积分规则(秀山)",
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
|
|||||||
@@ -2,25 +2,27 @@
|
|||||||
<div class="AppScoreSupermarket">
|
<div class="AppScoreSupermarket">
|
||||||
<ai-list v-show="!detailShow">
|
<ai-list v-show="!detailShow">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="积分超市" :isShowBottomBorder="false" :instance="instance" :isShowArea="true" v-model="areaId" @change="changeArea"></ai-title>
|
<ai-title title="积分超市" :isShowBottomBorder="false" :instance="instance" :isShowArea="true" v-model="areaId"
|
||||||
|
@change="changeArea"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template slot="tabs">
|
<template slot="tabs">
|
||||||
<el-tabs v-model="currIndex">
|
<el-tabs v-model="currIndex">
|
||||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :name="String(i)" :label="tab.label">
|
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :name="String(i)" :label="tab.label">
|
||||||
<component
|
<component
|
||||||
:is="tab.comp"
|
:is="tab.comp"
|
||||||
v-if="currIndex === String(i)"
|
v-if="currIndex === String(i)"
|
||||||
:areaId="areaId"
|
:areaId="areaId"
|
||||||
:ref="tab.name"
|
:ref="tab.name"
|
||||||
@showDetail="showDetail"
|
@showDetail="showDetail"
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
:dict="dict"
|
:dict="dict"
|
||||||
:permissions="permissions" />
|
:permissions="permissions"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
<component v-if="detailShow" :is="currDet" :areaId="areaId" :info="info" @goBack="goBack" :instance="instance" :dict="dict" :permissions="permissions"/>
|
<component v-if="detailShow" :is="currDet" :areaId="areaId" :info="info" @goBack="goBack" :instance="instance"
|
||||||
|
:dict="dict" :permissions="permissions"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -34,7 +36,7 @@ import {mapState} from 'vuex'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AppScoreSupermarket",
|
name: "AppScoreSupermarket",
|
||||||
label: "积分超市",
|
label: "积分超市(秀山)",
|
||||||
components: {orderManagement, goodsManagement, storeManagement, addOrderDetail, addGoods},
|
components: {orderManagement, goodsManagement, storeManagement, addOrderDetail, addGoods},
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
|
|||||||
Reference in New Issue
Block a user