Browse Source

审核退款功能

master
unknown 6 months ago
parent
commit
c5c6dbfe93
  1. 7
      config/api.js
  2. 3
      pages/recordEntry/operate/mySchedule/comp/pickDateTimer/pickDateTimer.vue
  3. 2
      pages/tabbar/mine/index.vue
  4. 58
      pages/userCenter/refund/comp/item.vue
  5. 173
      pages/userCenter/refund/refund.vue

7
config/api.js

@ -9,6 +9,13 @@
export const getSettlementStatistics = (data) => http.post('business/coach/getSettlementStatistics', data)
// 获得教练的学员结算列表
export const settle_list = (data) => http.post('business/coach/settle_list', data)
// 学员学费退款列表
export const headmasterPage = (params) => http.get('app/refund/headmasterPage', {params})
// 学员学费退款审核通过
export const updateRefundStatusOpend = (params) => http.get('app/refund/updateRefundStatusOpend', {params})
// 学员学费退款审核不通过
export const updateRefundStatusOut = (params) => http.get('app/refund/updateRefundStatusOut', {params})

3
pages/recordEntry/operate/mySchedule/comp/pickDateTimer/pickDateTimer.vue

@ -211,8 +211,10 @@
for(let j=0; j<this.dateArr[i].length; j++) {
let date = this.dateArr[i][j].date
if(startDate==date) {
console.log(date)
this.currentDay = i
this.chooseDay = date
this.scheduleClassGetFn()
}
}
}
@ -220,6 +222,7 @@
},
//
chooseDate(item) {
if(this.chooseDay == item.date) return
this.chooseDay = item.date
this.radioVal = ''
this.scheduleClassGetFn()

2
pages/tabbar/mine/index.vue

@ -96,7 +96,7 @@
{text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
{text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
// {text: '', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/signature/signature'},
// {text: '退', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
{text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
]
}else if(this.identity=='校长'||this.identity=='驾校财务') {

58
pages/userCenter/refund/comp/item.vue

@ -3,10 +3,11 @@
<view class="consultItem">
<view class="top_row">
<view class="flex">
<view class="schoolName">张三三 18265468753</view>
<view class="schoolName">{{item.studentName}} {{item.studentPhone}}</view>
</view>
<view class="status">
<view class="text">待处理</view>
<text class="text red" v-if="item.refundStatus==-1">取消{{item.refundStatus}}</text>
<view class="text" v-else :class="{red: item.refundStatus==2}">{{stateTxt[item.refundStatus]}}</view>
<view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>
@ -15,38 +16,49 @@
<view class="target">
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/timerIcon.png" mode="widthFix"></image>
</view>
<view class="name">报名时间2023/08/08</view>
<view class="name">报名时间{{$u.timeFormat(item.createTime, 'yyyy/mm/dd')}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/carIcon.png" mode="widthFix"></image>
</view>
<view class="name">学驾车型C1小型汽车手动挡</view>
<view class="name">学驾车型{{item.tranType}}</view>
</view>
<view class="row">
<view class="iconImg">
<image src="@/static/images/index/radio_nor.png" mode=""></image>
<image src="@/static/images/index/carNum.png" mode="widthFix"></image>
</view>
<view class="name">报名班型C1一对一VIP班</view>
<view class="name">报名班型{{item.className}}</view>
</view>
</view>
<view class="border_bottom">
<view class="row">
<view class="lab">申请退款金额</view>
<view class="val">8880.13</view>
<view class="lab">不通过原因</view>
<view class="val hui">{{ item.auditFailReason }}</view>
</view>
<view class="btn_row">
<view class="btnBg">审核通过</view>
<view class="btnBg">审核不通过</view>
</view>
<view class="border_bottom">
<view class="row">
<view class="lab">申请退款金额</view>
<view class="val">{{ $u.utils.priceTo(item.refundAmount)}}</view>
</view>
<slot ></slot>
</view>
</view>
</template>
<script>
export default {
props: ['item'],
data() {
return {
stateTxt: ['待审核','审核通过', '审核不通过'],//01-12,(2)
}
}
}
</script>
<style lang="scss" scoped>
@ -82,6 +94,9 @@
.text {
font-size: 28rpx;
color: $themC;
&.red {
color: red;
}
}
}
}
@ -93,8 +108,7 @@
display: flex;
align-items: center;
.iconImg {
width: 25rpx;
height: 25rpx;
width: 28rpx;
}
.name {
font-size: 28rpx;
@ -112,19 +126,11 @@
justify-content: space-between;
.val {
color: $themC;
}
}
.btn_row {
display: flex;
justify-content: center;
padding: 30rpx 0;
.btnBg {
width: 188rpx;
margin: 0 26rpx;
&:first-child {
width: 168rpx;
&.hui {
color: #999;
}
}
}
}
</style>

173
pages/userCenter/refund/refund.vue

@ -1,39 +1,129 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<topNavbar title="学员退款"></topNavbar>
<view class="pad">
<view class="navBox">
<cardNav :navData="navData" :currentNav="currentNav" @changeNav="changeNav"/>
</view>
<view class="list">
<view class="card">
<refundItem/>
<view class="pageBgImg">
<topNavbar title="学员退款"></topNavbar>
<view class="pad">
<view class="navBox">
<cardNav :navData="navData" :currentNav="params.status" @changeNav="changeNav"/>
</view>
<view class="list">
<view class="card" v-for="(item,index) in list" :key="index">
<refundItem :item="item">
<template >
<view class="btn_row" v-if="item.refundStatus==0">
<view class="btnBg" @click="passFn(item)">审核通过</view>
<view class="btnBg" @click="noPassClick(item)">审核不通过</view>
</view>
</template>
</refundItem>
</view>
</view>
</view>
<view style="padding-bottom: 20rpx;" v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</view>
<u-popup :show="show" :round="16" mode="center" @close="show=false" @open="show=true" closeable>
<view class="popCon">
<view class="inputBox">
<!-- <input type="text" placeholder="请输入不通过原因" > -->
<!-- <u--textarea v-model="value3" placeholder="请输入内容" autoHeight ></u--textarea> -->
<textarea placeholder="请输入不通过原因" maxlength="40" v-model.trim="auditFailReason"></textarea>
</view>
<view class="footBox">
<view class="btn">取消</view>
<view class="btn blue" @click="noPass">确定</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import refundItem from './comp/item'
import { headmasterPage, updateRefundStatusOpend,updateRefundStatusOut } from '@/config/api.js'
export default {
components: { refundItem },
data() {
return {
currentNav: 1,
show: false,
navData: [
{text: '待审核', id: 1},
{text: '已审核', id: 2}
]
{text: '待审核', id: 0},
{text: '已审核', id: 1}
],
params: {
pageNo: 1,
pageSize: 20,
status: 0,
},
status: 'loading',
list: [],
auditFailReason: '',
curRefundId: '',
}
},
onLoad() {
this.headmasterPageFn()
},
methods: {
changeNav(val) {
this.currentNav = val
console.log(val)
if(this.params.status == val) return
this.params.status = val
this.listInit()
},
async headmasterPageFn() {
const {data: res} = await headmasterPage(this.params)
this.params.pageNo ++
this.list.push(...res.list)
this.total = res.total
if(this.list.length>=this.total) {
this.status = 'nomore'
}else {
this.status = 'loading'
}
console.log(res)
},
listInit() {
this.list = []
this.params.pageNo = 1
this.headmasterPageFn()
},
//
noPassClick(item) {
this.auditFailReason = ''
this.show = true
this.curRefundId = item.refundId
},
//
async noPass() {
console.log(this.auditFailReason)
if(!this.auditFailReason) return this.$u.toast('请输入不通过原因')
const res = await updateRefundStatusOut({id: this.curRefundId, auditFailReason: this.auditFailReason})
if(res.code==0) {
this.$u.toast('已驳回')
this.auditFailReason = ''
this.show = false
this.listInit()
}
console.log(res)
},
//
passFn(item) {
let _this = this
uni.showModal({
title: '审核通过',
content: `学员${item.studentName}的申请确定审通过吗?`,
success: async function (res) {
if (res.confirm) {
const reslut = await updateRefundStatusOpend({id: item.refundId})
if(reslut.code==0) _this.$u.toast('已通过')
_this.listInit()
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
}
@ -47,4 +137,53 @@
padding: 0 28rpx;
margin-bottom: 24rpx;
}
.popCon {
width: calc(100vw - 100rpx);
.inputBox {
width: 100%;
// height: 200rpx;
padding: 90rpx 44rpx 24rpx 44rpx;
textarea {
border: 1rpx solid #eee;
border-radius: 20rpx;
display: block;
width: 100%;
height: 180rpx;
padding: 20rpx 20rpx 0 20rpx;
box-sizing: border-box;
font-size: 30rpx;
}
}
.footBox {
width: 100%;
height: 112rpx;
display: flex;
border-top: 1rpx solid #eee;
.btn {
flex: 1;
text-align: center;
line-height: 112rpx;
font-size: 34rpx;
color: #999;
&.blue {
color: $themC;
border-left: 1rpx solid #eeeeee;
}
}
}
}
.btn_row {
display: flex;
justify-content: center;
padding: 10rpx 0 30rpx 0;
.btnBg {
width: 188rpx;
margin: 0 26rpx;
&:first-child {
width: 168rpx;
}
}
}
</style>
Loading…
Cancel
Save