BUG 28086

This commit is contained in:
aixianling
2022-03-08 14:33:32 +08:00
parent cdd570fae0
commit 74f84fe07b

View File

@@ -1,7 +1,7 @@
<template> <template>
<ai-detail class="family_detail"> <ai-detail class="family_detail">
<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="$emit('goBack')"></ai-title>
</template> </template>
<template slot="content"> <template slot="content">
<div class="detail-info"> <div class="detail-info">
@@ -25,33 +25,33 @@
<ai-card title="余额变动明细"> <ai-card title="余额变动明细">
<template slot="right"> <template slot="right">
<ai-download <ai-download
:instance="instance" :instance="instance"
url="/app/appvillagerintegraldetail/export" url="/app/appvillagerintegraldetail/export"
:disabled="!Boolean(tableData.length)" :disabled="!Boolean(tableData.length)"
:params="{familyName:detailInfo.name,doType:doType}" :params="{familyId:detailInfo.familyId,bizType:detailInfo.bizType}"
fileName="余额变动明细"> fileName="余额变动明细">
<span class="iconfont iconExported">导出</span> <span class="iconfont iconExported">导出</span>
</ai-download> </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 <ai-table
style="margin-top: 16px;" style="margin-top: 16px;"
:tableData="tableData" :tableData="tableData"
:col-configs="colConfigs" :col-configs="colConfigs"
:total="page.total" :total="page.total"
:border="true" :border="true"
:stripe="false" :stripe="false"
:current.sync="page.current" :current.sync="page.current"
:size.sync="page.size" :size.sync="page.size"
@getList="getList"> @getList="getList">
</ai-table> </ai-table>
</template> </template>
</ai-card> </ai-card>
@@ -60,153 +60,152 @@
</template> </template>
<script> <script>
export default { export default {
name: 'balance', name: 'balance',
props: { props: {
detailInfo: { detailInfo: {
type: Object, type: Object,
require: true require: true
},
instance: Function,
dict: Object
},
data() {
return {
page: {
current: 1,
size: 10,
total: 0
}, },
instance: Function, doType: '',
dict: Object tableData: []
}, }
},
data () { created() {
return { this.dict.load('integralDetailType')
page: { this.getList()
current: 1, },
size: 10,
total: 0 computed: {
colConfigs() {
const _this = this
return [
{
prop: 'doTime',
label: '时间'
}, },
doType: '', {
tableData: [] prop: 'bizType',
} align: 'center',
}, label: '类型',
render(h, {row}) {
created () { return h('span', {}, _this.dict.getLabel('integralDetailType', row.bizType))
this.dict.load('integralDetailType')
this.getList()
},
computed: {
colConfigs () {
const _this = this
return [
{
prop: 'doTime',
align: 'center',
label: '时间',
align:'left'
},
{
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',
align: 'center',
label: '事件类型',
align:'left'
} }
] },
} {
}, prop: 'changeIntegral',
align: 'center',
label: '变动积分',
formart: v => v > 0 ? `+${v}` : v
},
{
prop: 'nowIntegral',
align: 'center',
label: '剩余积分'
},
{
prop: 'description',
label: '事件类型',
}
]
}
},
methods: { methods: {
getList () { getList() {
this.instance.post('/app/appvillagerintegraldetail/list', null, { this.instance.post('/app/appvillagerintegraldetail/list', null, {
params: { params: {
...this.page, ...this.page,
familyId:this.detailInfo.id, familyId: this.detailInfo.id,
bizType:this.doType bizType: this.doType
} }
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = res.data.records this.tableData = res.data.records
this.page.total = res.data.total this.page.total = res.data.total
} }
}) })
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.family_detail{ .family_detail {
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: 0px 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;
} }
} }
} }
</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>