Files
dvcp_v2_wxcp_app/src/apps/AppIntegralAudit/AppIntegralAudit.vue

230 lines
5.6 KiB
Vue
Raw Normal View History

2022-02-14 15:02:14 +08:00
<template>
2022-02-25 15:15:18 +08:00
<div class="AppIntegralAudit" v-if="flag">
2022-02-14 17:31:52 +08:00
<!-- tab栏 -->
2022-02-25 15:15:18 +08:00
<div style="position: fixed; top: 0; left: 0;width: 100%;">
<div class="tab-select">
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
</div>
2022-02-23 20:41:40 +08:00
<div class="search-box">
2022-02-16 18:53:12 +08:00
<div class="integral-types" @click="showType = true">{{ type? type : '积分类型' }}<u-icon name="arrow-down"></u-icon></div>
2022-02-17 19:45:25 +08:00
<u-search placeholder="请输入关键字" v-model="keyword" :show-action="false" @search="search" @clear="getList()"/>
2022-02-14 17:31:52 +08:00
</div>
2022-02-25 15:15:18 +08:00
</div>
<!-- 列表 -->
<div class="card-list" v-if="integralList.length">
<div class="card-item" @click="toDetail(item)" v-for="(item,index) in integralList" :key="index">
<div class="card-title">{{ item.description }}</div>
<div class="card-name">
<div class="name">{{ $dict.getLabel('atWillReportType',item.applyIntegralType) }}</div>
<div class="time">{{ item.createTime }}</div>
</div>
<div class="card-type">
<div class="type" :style="{color: item.auditStatus==0? '#4181FF':item.auditStatus==1? '#07c160' : '#dd5347'}">{{ $dict.getLabel('integralDeclareStatus',item.auditStatus) }}</div>
<div class="num" v-if="item.auditIntegral">{{ item.auditIntegral }}</div>
2022-02-14 17:31:52 +08:00
</div>
</div>
</div>
2022-02-25 15:15:18 +08:00
<AiEmpty description="暂无数据" class="emptyWrap" v-else style="padding-top: 100px;"></AiEmpty>
<u-select v-model="showType" :list="$dict.getDict('atWillReportType')" label-name="dictName" value-name="dictValue"
@confirm="confirmTypeSelect"/>
<div style="height: 20px"></div>
2022-02-14 15:02:14 +08:00
</div>
</template>
<script>
export default {
name: 'AppIntegralAudit',
2022-02-14 18:37:56 +08:00
appName: '积分审核',
2022-02-14 17:31:52 +08:00
data () {
2022-02-14 15:02:14 +08:00
return {
2022-02-14 17:31:52 +08:00
tabs: ['全部', '待审核', '已审核'],
tabIndex: 0,
showType: false,
keyword: '',
typeList: [],
2022-02-16 18:53:12 +08:00
current: 1,
integralList: [],
type: '',
applyIntegralType: '', // 积分类型
2022-02-25 15:15:18 +08:00
flag: false,
2022-02-14 15:02:14 +08:00
}
},
2022-02-16 18:53:12 +08:00
created() {
this.$dict.load('atWillReportType','integralDeclareStatus').then(()=>{
this.getList()
2022-02-17 19:45:25 +08:00
uni.$on('update',()=>{
this.current = 1
this.getList()
})
2022-02-16 18:53:12 +08:00
})
},
2022-02-14 17:31:52 +08:00
methods: {
tabClick(index) {
2022-02-16 18:53:12 +08:00
this.current=1
2022-02-18 10:43:46 +08:00
this.type = '',
this.applyIntegralType = ''
2022-02-16 18:53:12 +08:00
this.integralList=[]
2022-02-14 17:31:52 +08:00
this.tabIndex = index
2022-02-16 18:53:12 +08:00
this.getList()
},
getList() {
this.$http.post('/app/appvillagerintegraldeclare/list',null,{
params: {
current: 1,
2022-02-17 11:54:43 +08:00
size: 10,
2022-02-16 18:53:12 +08:00
description : this.keyword,
2022-02-17 11:54:43 +08:00
applyIntegralType: this.applyIntegralType,
2022-02-17 19:45:25 +08:00
auditType: this.tabIndex== 0 ? "" : this.tabIndex == 1 ? 0 : 1
2022-02-16 18:53:12 +08:00
}
}).then(res => {
2022-02-17 19:45:25 +08:00
if(res?.data){
2022-02-17 08:54:50 +08:00
this.integralList = this.current > 1 ? [...this.integralList, ...res.data.records] : res.data.records
2022-02-16 18:53:12 +08:00
this.$forceUpdate()
2022-02-25 15:15:18 +08:00
this.flag = true
2022-02-16 18:53:12 +08:00
}
})
},
search() {
this.current = 1,
this.getList()
2022-02-14 17:31:52 +08:00
},
2022-02-14 15:02:14 +08:00
2022-02-14 17:31:52 +08:00
confirmTypeSelect(e) {
2022-02-16 18:53:12 +08:00
this.type = e[0].label
this.applyIntegralType = e[0].value
this.current = 1,
this.integralList = []
this.getList()
2022-02-14 17:31:52 +08:00
},
2022-02-14 18:37:56 +08:00
2022-02-16 18:53:12 +08:00
toDetail(item) {
2022-02-17 19:45:25 +08:00
uni.navigateTo({url: `./detail?id=${item.id}&nopass=${item.auditType}`})
2022-02-14 18:37:56 +08:00
}
2022-02-14 17:31:52 +08:00
},
2022-02-14 15:02:14 +08:00
onShow() {
document.title = '积分审核'
},
}
</script>
<style lang="scss" scoped>
.AppIntegralAudit {
2022-02-14 17:31:52 +08:00
.tab-select {
width: 100%;
height: 96px;
line-height: 96px;
background: #3975C6;
display: flex;
.item{
flex: 1;
text-align: center;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #CDDCF0;
}
.active{
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
position: relative;
color: #fff;
span{
width: 48px;
height: 4px;
background: #FFF;
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -24px;
}
}
}
.search-box {
display: flex;
width: 100%;
height: 112px;
line-height: 112px;
background-color: #FFFFFF;
padding: 0 32px;
box-sizing: border-box;
.integral-types {
2022-02-16 18:53:12 +08:00
width: 45%;
2022-02-14 17:31:52 +08:00
}
}
.card-list {
width: 100%;
2022-02-25 15:15:18 +08:00
padding: 200px 32px 0 32px;
2022-02-14 17:31:52 +08:00
box-sizing: border-box;
2022-02-25 14:43:34 +08:00
background: #f5f5f5;
2022-02-14 17:31:52 +08:00
.card-item {
margin-top: 24px;
background-color: #FFFFFF;
box-shadow: 0px 0px 8px 8px rgba(0, 0, 0, 0.02);
border-radius: 16px;
padding: 30px 32px 20px 32px;
.card-title {
height: 60px;
line-height: 60px;
font-size: 36px;
color: #333333;
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
.card-name {
margin-top: 30px;
display: flex;
height: 50px;
line-height: 50px;
font-size: 28px;
color: #999999;
.name {
2022-02-17 19:45:25 +08:00
padding: 0 20px;
2022-02-14 17:31:52 +08:00
background: #EEEEEE;
border-radius: 24px;
2022-02-17 19:45:25 +08:00
margin-right: 24px;
2022-02-14 17:31:52 +08:00
}
}
.card-type {
margin-top: 30px;
display: flex;
justify-content: space-between;
.type {
font-size: 28px;
}
.num {
font-size: 34px;
2022-02-15 09:09:50 +08:00
color: #E6736E;
2022-02-14 17:31:52 +08:00
}
2022-02-22 20:11:11 +08:00
// .status0 {
// color: #FF9B2B;
// }
2022-02-14 17:31:52 +08:00
2022-02-22 20:11:11 +08:00
// .status1 {
// color: #4181FF;
// }
2022-02-14 17:31:52 +08:00
}
}
}
2022-02-14 15:02:14 +08:00
}
</style>