|
|
@ -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> |