This commit is contained in:
2024-03-18 14:53:52 +08:00
parent 8ebba279dc
commit d5bf877c80
6 changed files with 339 additions and 11 deletions

View File

@ -0,0 +1,23 @@
import request from "../../request.js"
export function approvalList(data) {
return request({
url: `/applet/score/prizeExchange/approvalList`,
method: 'POST',
data: data,
header: {
region: uni.getStorageSync('region'),
}
})
}
export function revokeById(approvalId) {
return request({
url: `/applet/score/prizeExchange/revokeById/${approvalId}`,
method: 'get',
header: {
region: uni.getStorageSync('region'),
}
})
}

View File

@ -460,6 +460,14 @@
"navigationBarTitleText": "五卡套餐", "navigationBarTitleText": "五卡套餐",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path" : "applicationRecord/applicationRecord",
"style" :
{
"navigationBarTitleText" : "申请记录",
"enablePullDownRefresh" : false
}
} }
] ]
}, { }, {

View File

@ -24,12 +24,12 @@
<view class="item" @tap='gointegral'> <view class="item" @tap='gointegral'>
积分商城 积分商城
</view> </view>
<view class="item" @tap="goapplicationRecord">
申请记录
</view>
<view class="item" @tap="goexchange"> <view class="item" @tap="goexchange">
兑换记录 兑换记录
</view> </view>
<view class="item" v-if="region==2" @tap="gowxSport">
微信运动
</view>
</view> </view>
</view> </view>
<view class="content" style="height: 200rpx;" v-if="region==2"> <view class="content" style="height: 200rpx;" v-if="region==2">
@ -37,22 +37,23 @@
<view class="item" @tap='gointegral'> <view class="item" @tap='gointegral'>
积分商城 积分商城
</view> </view>
<view class="item" @tap="goapplicationRecord">
申请记录
</view>
<view class="item" @tap="goexchange"> <view class="item" @tap="goexchange">
兑换记录 兑换记录
</view> </view>
</view>
<view class="flex" style="top:50%">
<view class="item" @tap="gowxSport"> <view class="item" @tap="gowxSport">
微信运动 微信运动
</view> </view>
</view>
<view class="flex" style="top:50%">
<view class="item" @tap='gobehavior'> <view class="item" @tap='gobehavior'>
健康行为 健康行为
</view> </view>
<view class="item" @tap='goFiveCardPackage'> <view class="item" @tap='goFiveCardPackage'>
五卡套餐 五卡套餐
</view> </view>
<view style="width:25%">
</view>
</view> </view>
</view> </view>
<view class="bottomitem"> <view class="bottomitem">
@ -179,6 +180,11 @@
url: "/pagesB/FiveCardPackage/FiveCardPackage" url: "/pagesB/FiveCardPackage/FiveCardPackage"
}) })
}, },
goapplicationRecord() {
uni.navigateTo({
url: '/pagesB/applicationRecord/applicationRecord'
})
},
}, },
onReachBottom() { // onReachBottom() { //
if (this.list.length >= this.total) {} else { if (this.list.length >= this.total) {} else {

View File

@ -0,0 +1,291 @@
<template>
<view class="app">
<u-sticky>
<view class="">
<u-tabs :list="tabslist" :is-scroll="false" :current="tabscurrent" @change="tabschange"
inactive-color='#fff' active-color='#fff'></u-tabs>
<view class="inputs">
<view class="inputitem">
<i class="icon"></i>
<input type="text" name="" id="" class="input" placeholder="搜索" v-model="query.prizeName">
</view>
</view>
</view>
</u-sticky>
<view class="" v-if="list&&list.length>0">
<view class="content" v-for="(item,index) in list" :key="index">
<view class="time">
{{item.applicantTime?item.applicantTime:''}}
<span>
{{Number(item.status)==1?'待审批':''}}
{{Number(item.status)==2?'已批准':''}}
{{Number(item.status)==3?'已驳回':''}}
{{Number(item.status)==4?'已撤销':''}}
</span>
</view>
<u-image width="180rpx" height="180rpx" :src="item.src"></u-image>
<view class="servename">
{{item.prizeName?item.prizeName:''}}
</view>
<view class="prizeScore">
{{item.prizeScore?item.prizeScore:0}} 积分
</view>
<view class="button" @tap="tapitem(item)" v-if="Number(item.status)==1">
撤销
</view>
</view>
</view>
<u-empty v-else mode="list" icon-size='220' text='暂无申请记录'></u-empty>
<u-modal v-model="revokeshow" content="是否确认撤销此次申请记录?" :show-cancel-button='true'
@confirm='revokeconfirm'></u-modal>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
approvalList,
revokeById
} from '@/api/pagesB/applicationRecord/index.js'
import {
getImgById
} from '@/api/pagesB/getimg/index.js'
export default {
data() {
return {
revokeshow: false,
revokeitem: {},
query: {
identity: uni.getStorageSync('userinfo').cardNo,
pageNum: 1,
pageSize: 10,
prizeName: '',
status: '',
},
list: [],
total: 0,
tabslist: [{
name: '全部',
value: '',
}, {
name: '待审批',
value: 1,
}, {
name: '已批准',
value: 2,
}, {
name: '已驳回',
value: 3,
}, {
name: '已撤销',
value: 4,
}],
tabscurrent: 0,
};
},
onLoad() {
this.info()
},
watch: {
"query.prizeName": {
handler(newvalue, oldvalue) {
this.info()
},
}
},
methods: {
revokeconfirm() {
revokeById(this.revokeitem.approvalId).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '撤销成功',
type: 'success',
})
}
})
},
tabschange(index) {
this.tabscurrent = index;
this.query.status = this.tabslist[index].value
this.query.pageNum = 1
this.info();
},
tapitem(item) {
this.revokeshow = true
this.revokeitem = item
},
async getimg(id) {
try {
const res = await getImgById(id);
return res.data
} catch (error) {
return null;
}
},
info() {
approvalList(this.query).then(res => {
if (this.query.pageNum == 1) {
this.list = []
}
res.rows.forEach(e => {
e.src = ''
})
this.list = [
...this.list,
...res.rows
]
this.list.forEach(async (e) => {
if (e.src == '') {
e.src = await this.getimg(e.prizeId);
}
});
this.total = res.total
})
},
},
onReachBottom() { //
if (this.list.length >= this.total) {} else {
this.query.pageNum++
this.info();
}
},
onPullDownRefresh() { //
this.query.pageNum = 1;
this.info();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
.app {
width: 100%;
text-align: justify;
padding: 0 0 30rpx 0;
::v-deep .u-tabs {
background-color: #26A888 !important;
}
::v-deep .u-empty {
margin-top: 25vh !important;
}
.inputs {
background-color: #fff;
background-color: #ffffff;
z-index: 999;
position: relative;
top: 50%;
width: 96%;
height: 80rpx;
padding: 10rpx 0 0;
transform: none;
margin: 0 auto;
.inputitem {
background: #F6F6F6;
width: 100%;
height: 60rpx;
border-radius: 10rpx;
}
.input {
margin: 0 auto;
position: absolute;
height: 60rpx;
// top: 8%;
left: 13%;
width: 80%;
font-size: 26rpx;
color: #000000;
}
.icon {
background: url(@/static/pagesB/sousuo.png) no-repeat;
width: 30rpx;
height: 28rpx;
background-size: cover;
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 3%;
}
}
.content {
width: 94%;
height: 321rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 5rpx;
margin: 20rpx auto;
position: relative;
.prizeScore {
color: #333333;
position: absolute;
left: 35%;
bottom: 90rpx;
}
.button {
width: 110rpx;
height: 45rpx;
line-height: 45rpx;
background-color: #26A888;
border-radius: 5rpx;
text-align: center;
color: #fff;
position: absolute;
right: 20rpx;
bottom: 20rpx;
}
.servename {
font-size: 32rpx;
font-weight: 500;
color: #333333;
line-height: 38rpx;
position: absolute;
top: 38%;
left: 35%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .u-image {
position: absolute;
left: 3%;
top: 28%;
width: 180rpx;
height: 180rpx;
}
.time {
text-align: justify;
padding: 25rpx 0 0 20rpx;
font-size: 28rpx;
font-weight: 400;
color: #000000;
line-height: 38rpx;
position: relative;
span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
position: absolute;
font-weight: 500;
color: #26A888;
line-height: 38rpx;
right: 3%;
}
}
}
}
</style>

View File

@ -18,9 +18,9 @@
<view class="title"> <view class="title">
{{item.teamMemberTypeName?item.teamMemberTypeName:''}} {{item.teamMemberTypeName?item.teamMemberTypeName:''}}
</view> </view>
<view class="zixunbtn" @tap='goseekadvicefrom'> <!-- <view class="zixunbtn" @tap='goseekadvicefrom'>
咨询 咨询
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>

View File

@ -407,7 +407,7 @@
senderName: that.currentItem.doctorName, senderName: that.currentItem.doctorName,
messageType: 1, messageType: 1,
sendTime: new Date(), sendTime: new Date(),
content: '请输入您要询问的问题,咨询人数较多时,可能无法快速回复,请谅解!', content: '您好,正在努力联系您的家庭医生,请稍等...',
sourcePlatform: 'APPLET', sourcePlatform: 'APPLET',
autoResponder: 'AUTORESPONDER' autoResponder: 'AUTORESPONDER'
} }
@ -415,7 +415,7 @@
if (res.code == 200) { if (res.code == 200) {
that.newsList.push({ that.newsList.push({
senderName: that.currentItem.doctorName, senderName: that.currentItem.doctorName,
content: '请输入您要询问的问题,咨询人数较多时,可能无法快速回复,请谅解!', content: '您好,正在努力联系您的家庭医生,请稍等...',
messageType: 1, messageType: 1,
}) })
setTimeout(() => { setTimeout(() => {