|
|
@ -6,7 +6,8 @@ |
|
|
|
<view class="consultItem"> |
|
|
|
<view class="top_row"> |
|
|
|
<view class="flex"> |
|
|
|
<view class="tag":class="{yellow: info.orderType==1}"> {{orderTypeTxt[info.orderType]}}</view> |
|
|
|
<view class="tag" :class="{yellow: (info.orderType==1||info.feeType==1)}"> |
|
|
|
{{orderTypeTxt[info.orderType||info.feeType]}}</view> |
|
|
|
<view class="schoolName">{{ $u.utils.truncateText(info.schoolName, 12) }}</view> |
|
|
|
</view> |
|
|
|
<view class="status"> |
|
|
@ -42,7 +43,7 @@ |
|
|
|
</view> |
|
|
|
<view class="lab">驾校类型</view> |
|
|
|
</view> |
|
|
|
<view class="name">合作驾校</view> |
|
|
|
<view class="name">{{ info.appSchoolType }}</view> |
|
|
|
</view> |
|
|
|
<view class="row"> |
|
|
|
<view class="leftLab"> |
|
|
@ -51,7 +52,7 @@ |
|
|
|
</view> |
|
|
|
<view class="lab">支付形式</view> |
|
|
|
</view> |
|
|
|
<view class="name">全额支付</view> |
|
|
|
<view class="name">{{info.appPayForm}}</view> |
|
|
|
</view> |
|
|
|
<view class="row"> |
|
|
|
<view class="leftLab"> |
|
|
@ -60,7 +61,7 @@ |
|
|
|
</view> |
|
|
|
<view class="lab">支付方式</view> |
|
|
|
</view> |
|
|
|
<view class="name">微信支付</view> |
|
|
|
<view class="name">{{info.appPayType}}</view> |
|
|
|
</view> |
|
|
|
<view class="row"> |
|
|
|
<view class="leftLab"> |
|
|
@ -69,122 +70,140 @@ |
|
|
|
</view> |
|
|
|
<view class="lab">支付时间</view> |
|
|
|
</view> |
|
|
|
<view class="name">2023/08/08 10:00:00</view> |
|
|
|
<view class="name">{{ $u.timeFormat(info.payTime, 'yyyy-mm-dd hh:MM:ss')}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="border_bottom"> |
|
|
|
<view class="rows"> |
|
|
|
<view class="label">培训费总价</view> |
|
|
|
<!-- <view class="value">¥2000.02</view> --> |
|
|
|
<view class="value">¥{{$u.utils.priceTo(info.totalAmount)}}</view> |
|
|
|
</view> |
|
|
|
<view class="rows"> |
|
|
|
<!-- <view class="rows"> |
|
|
|
<view class="label hui">学驾培训费</view> |
|
|
|
<view class="value hui">¥2000.02</view> |
|
|
|
</view> |
|
|
|
<view class="value hui">¥{{$u.utils.priceTo(info.totalAmount)}}</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
<view class="border_bottom"> |
|
|
|
<view class="rows"> |
|
|
|
<view class="label hui">实际支付</view> |
|
|
|
<view class="value hui">¥2000.02</view> |
|
|
|
<view class="value hui">¥{{$u.utils.priceTo(info.payActual)}}</view> |
|
|
|
</view> |
|
|
|
<view class="rows"> |
|
|
|
<view class="label hui">已支付定金</view> |
|
|
|
<view class="value blue">¥1000.02</view> |
|
|
|
<view class="value blue">¥没字段</view> |
|
|
|
</view> |
|
|
|
<view class="rows"> |
|
|
|
<view class="label hui">待支付尾款</view> |
|
|
|
<view class="value blue">¥2000.02</view> |
|
|
|
<view class="value blue">¥没字段</view> |
|
|
|
</view> |
|
|
|
<view class="refundBtn" @click="goFund">申请退款</view> |
|
|
|
<view class="refundBtn" @click="goFund" v-if="!info.refundId">申请退款</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<refundInfo :info="refundInfo" v-if="info.refundId"/> |
|
|
|
<refundInfo :info="refundData" v-if="refundData.id" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import refundInfo from './comp/refundInfo.vue' |
|
|
|
import { applyOrderGet, selectRefundDetail } from '@/config/api.js' |
|
|
|
import { |
|
|
|
applyOrderGet, |
|
|
|
selectRefundDetail |
|
|
|
} from '@/config/api.js' |
|
|
|
export default { |
|
|
|
components: { refundInfo }, |
|
|
|
components: { |
|
|
|
refundInfo |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
value: '', |
|
|
|
orderId: '', |
|
|
|
refundId: '', |
|
|
|
info: {}, |
|
|
|
refundInfo: {}, |
|
|
|
orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'],//1:驾校培训费用,2:理科培训费用,3:考场适应性费用,4:额外学时购买 |
|
|
|
refundData: {}, |
|
|
|
orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'], //1:驾校培训费用,2:理科培训费用,3:考场适应性费用,4:额外学时购买 |
|
|
|
orderStatusTxt: ['待支付', '已支付', '已取消', '支付失败'], //0:待支付,1:已支付,-1:已取消,2:支付失败 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
if(options.orderId) { |
|
|
|
this.orderId =options.orderId |
|
|
|
|
|
|
|
|
|
|
|
// setTimeout(obj.say, 500) |
|
|
|
if (options.orderId) { |
|
|
|
this.orderId = options.orderId |
|
|
|
this.applyOrderGetFn() |
|
|
|
} |
|
|
|
if(options.refundId) { |
|
|
|
this.refundId = options.refundId |
|
|
|
this.selectRefundDetailFn() |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
onPullDownRefresh() { |
|
|
|
this.applyOrderGetFn() |
|
|
|
if(this.refundId) { |
|
|
|
this.selectRefundDetailFn() |
|
|
|
}else if(this.orderId) { |
|
|
|
this.applyOrderGetFn() |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
debounce(func, wait) { |
|
|
|
this.timeout; |
|
|
|
let context = this; // this |
|
|
|
// let args = arguments; // event |
|
|
|
if(this.timeout) clearTimeout(this.timeout) |
|
|
|
console.log(111) |
|
|
|
this.timeout = setTimeout(function() { |
|
|
|
func() |
|
|
|
}, wait); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
inputFn(val) { |
|
|
|
console.log('1111111111') |
|
|
|
}, |
|
|
|
async applyOrderGetFn() { |
|
|
|
const {data: res} = await applyOrderGet({ orderId: this.orderId}) |
|
|
|
const { |
|
|
|
data: res |
|
|
|
} = await applyOrderGet({ |
|
|
|
orderId: this.orderId |
|
|
|
}) |
|
|
|
this.info = res |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
if (res.refundId) { |
|
|
|
this.selectRefundDetailFn() |
|
|
|
} |
|
|
|
}, |
|
|
|
async selectRefundDetailFn() { |
|
|
|
const {data: res} = await selectRefundDetail({ id: this.refundId}) |
|
|
|
console.log(res) |
|
|
|
this.info = res |
|
|
|
const { |
|
|
|
data: res |
|
|
|
} = await selectRefundDetail({ |
|
|
|
id: this.info.refundId |
|
|
|
}) |
|
|
|
// console.log(res) |
|
|
|
this.refundData = res |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
goFund() { |
|
|
|
this.$goPage('/pages/mineEntry/refund/refund?orderId='+this.orderId) |
|
|
|
this.$goPage('/pages/mineEntry/refund/refund?orderId=' + this.orderId) |
|
|
|
}, |
|
|
|
// 申请退款 |
|
|
|
// applyOnlineFundFn() { |
|
|
|
// uni.showModal({ |
|
|
|
// title: '确定要申请退款吗?', |
|
|
|
// success: async ()=> { |
|
|
|
// let obj = { |
|
|
|
// studentId: this.studentId, |
|
|
|
// orderId: this.orderId, |
|
|
|
// // schoolId: |
|
|
|
// } |
|
|
|
// const {data: res} = await applyOnlineFund(obj) |
|
|
|
// console.log(res) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
@import '../comp/comp.scss'; |
|
|
|
|
|
|
|
.feeIcon { |
|
|
|
width: 28rpx; |
|
|
|
height: 28rpx; |
|
|
|
margin-left: 12rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.card { |
|
|
|
padding: 20rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.pad { |
|
|
|
padding-bottom: 60rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.refundBtn { |
|
|
|
width: 200rpx; |
|
|
|
height: 72rpx; |
|
|
|