积分整合
This commit is contained in:
@@ -28,31 +28,20 @@
|
||||
:instance="instance"
|
||||
url="/app/appvillagerintegraldetail/export"
|
||||
:disabled="!Boolean(tableData.length)"
|
||||
:params="{familyId:detailInfo.id,bizType:doType}"
|
||||
:params="{familyId:detailInfo.id,type}"
|
||||
fileName="余额变动明细">
|
||||
<span class="iconfont iconExported">导出</span>
|
||||
<el-button type="text" icon="iconfont iconExported">导出</el-button>
|
||||
</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>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select v-model="type" placeholder="请选择类型" @change="page.current=1,getList()"
|
||||
:selectList="dict.getDict('integralDetailType')"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :col-configs="colConfigs"
|
||||
:total="page.total" border :dict="dict" :current.sync="page.current" :size.sync="page.size" @getList="getList"/>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
@@ -62,7 +51,6 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'balance',
|
||||
|
||||
props: {
|
||||
detailInfo: {
|
||||
type: Object,
|
||||
@@ -79,61 +67,31 @@ export default {
|
||||
size: 10,
|
||||
total: 0
|
||||
},
|
||||
doType: '',
|
||||
type: "",
|
||||
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: '事件类型',
|
||||
}
|
||||
{prop: 'doTime', label: '时间', width: 200},
|
||||
{prop: "type", label: "类型", dict: "integralDetailType", align: 'center'},
|
||||
{prop: 'changeIntegral', align: 'center', label: '变动积分', formart: v => v > 0 ? `+${v}` : `-${v}`},
|
||||
{prop: 'nowIntegral', align: 'center', label: '剩余积分'},
|
||||
{prop: 'eventDesc', label: '事件', width: 500}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post('/app/appvillagerintegraldetail/list', null, {
|
||||
params: {
|
||||
...this.page,
|
||||
familyId: this.detailInfo.id,
|
||||
bizType: this.doType
|
||||
}
|
||||
params: {...this.page, familyId: this.detailInfo.id}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
@@ -148,11 +106,6 @@ export default {
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
|
||||
::v-deep .ai-card__body {
|
||||
padding: 12px 16px 20px !important;
|
||||
}
|
||||
|
||||
|
||||
.detail-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -187,25 +140,5 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<ai-detail class="family_detail">
|
||||
<template slot="title">
|
||||
<ai-title title="个人积分明细" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="$emit('goBack')" ></ai-title>
|
||||
<ai-title title="个人积分明细" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="$emit('goBack')"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<div class="detail-info">
|
||||
@@ -19,37 +19,15 @@
|
||||
</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>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select v-model="type" placeholder="请选择类型" @change="page.current=1,getList()"
|
||||
:selectList="dict.getDict('integralDetailType')"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :col-configs="colConfigs"
|
||||
:total="page.total" border :dict="dict" :current.sync="page.current" :size.sync="page.size" @getList="getList"/>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
@@ -57,151 +35,124 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'balance',
|
||||
export default {
|
||||
name: 'balance',
|
||||
|
||||
props: {
|
||||
detailInfo: {
|
||||
type: Object,
|
||||
require: true
|
||||
props: {
|
||||
detailInfo: {
|
||||
type: Object,
|
||||
require: true
|
||||
},
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0
|
||||
},
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
info: {},
|
||||
type: '',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
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))
|
||||
created() {
|
||||
this.dict.load('integralDetailType')
|
||||
this.getList()
|
||||
},
|
||||
computed: {
|
||||
colConfigs() {
|
||||
return [
|
||||
{prop: 'doTime', label: '时间', width: 200},
|
||||
{prop: "type", label: "类型", dict: "integralDetailType", align: 'center'},
|
||||
{prop: 'changeIntegral', align: 'center', label: '变动积分', formart: v => v > 0 ? `+${v}` : `-${v}`},
|
||||
{prop: 'nowIntegral', align: 'center', label: '剩余积分'},
|
||||
{prop: 'eventDesc', label: '事件', width: 500}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appresident/detail?id=${this.detailInfo.id}`).then(res => {
|
||||
if (res?.data) {
|
||||
this.info = res.data.resident
|
||||
let {type, info: {id: residentId}} = this
|
||||
this.instance.post(`/app/appvillagerintegraldetail/IntegralList`, null, {
|
||||
params: {...this.page, queryType: 1, type, residentId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
}
|
||||
},
|
||||
{
|
||||
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;
|
||||
.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 {
|
||||
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;
|
||||
|
||||
.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;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.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;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.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