Browse Source

订单详情修改

master
unknown 11 months ago
parent
commit
edcb55965a
  1. 6
      pages/carEntry/examineAppointment/comp/step3.vue
  2. 7
      pages/indexEntry/examines/detail/detail.vue
  3. 6
      pages/mineEntry/myOrder/detail/comp/refundInfo.vue
  4. 121
      pages/mineEntry/myOrder/detail/detail.vue
  5. 5
      pages/mineEntry/myOrder/myOrder.vue
  6. 33
      pages/mineEntry/refund/comp/myform.vue
  7. 37
      pages/userCenter/login/login.vue

6
pages/carEntry/examineAppointment/comp/step3.vue

@ -5,7 +5,7 @@
<view class="btn_row">
<view class="border btn" @click="changeStep(2)">返回上一步</view>
<view class="btn" @click="show=true">确认预约</view>
<view class="btn" @click="showClick">确认预约</view>
</view>
<u-popup :show="show" mode="center" :round="8">
@ -79,6 +79,10 @@
},
updatedForm(val) {
this.$emit('updatedForm',val)
},
showClick() {
if(!this.FormData.courseIds) return this.$u.toast('请选择预约时间')
this.show = true
}
}

7
pages/indexEntry/examines/detail/detail.vue

@ -95,15 +95,10 @@
// url: '/pages/indexEntry/enroll/enroll?tit='
// })
// return
if(this.vuex_userInfo.schoolId) {
uni.navigateTo({
url: '/pages/carEntry/simulateAppointment/simulateAppointment'
})
}
await this.$store.dispatch('getUserInfo')
if(this.vuex_userInfo.schoolId) {
uni.navigateTo({
url: '/pages/carEntry/simulateAppointment/simulateAppointment'
url: '/pages/carEntry/examineAppointment/examineAppointment'
})
}else {
//

6
pages/mineEntry/myOrder/detail/comp/refundInfo.vue

@ -4,15 +4,15 @@
<view class="card">
<view class="row">
<view class="lab">退款原因</view>
<view class="val">个人原因</view>
<view class="val">{{info.feeReason}}</view>
</view>
<view class="row">
<view class="lab">退款金额</view>
<view class="val">{{$u.utils.priceTo(info.amount)}}</view>
</view>
<view class="border_bottom">
<view class="date">申请时间{{ $u.timeFomat(info.createTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
<view class="date" v-if="info.refundTime">退款完成时间{{ $u.timeFomat(info.refundTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
<view class="date" v-if="info.createTime">申请时间{{ $u.timeFormat(info.createTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
<view class="date" v-if="info.refundTime">退款完成时间{{ $u.timeFormat(info.refundTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
</view>
</view>
<view class="h1">收款信息</view>

121
pages/mineEntry/myOrder/detail/detail.vue

@ -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: ['', '学费', '理科费', '考场模拟', '额外学时购买'],//1234
refundData: {},
orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'], //1234
orderStatusTxt: ['待支付', '已支付', '已取消', '支付失败'], //01-12
}
},
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;

5
pages/mineEntry/myOrder/myOrder.vue

@ -101,6 +101,11 @@
if(obj.orderType==0) delete obj.orderType
if(!obj.sercheValue) delete obj.sercheValue
if(this.params.orderStatus==3) {
delete obj.orderStatus
if(obj.orderType) {
obj.feeType = obj.orderType
delete obj.orderType
}
var {data: res} = await refundPage(obj)
}else {
var {data: res} = await applyOrderPage(obj)

33
pages/mineEntry/refund/comp/myform.vue

@ -62,7 +62,7 @@
</view>
</view>
</view>
<view class="btnBg" @click="onsubmit">提交</view>
<view class="btnBg" @click="applyOnlineFundFn">提交</view>
<u-picker :show="showReason" :columns="reasonArr" keyName="label" @confirm="confirmReason" @cancel="showReason=false"></u-picker>
</view>
</template>
@ -91,13 +91,7 @@
},
showReason: false ,
codeOn: false,
reasonArr: [
[
{lab: '不想学了',id: 1},
{lab: '有事情',id: 2},
{lab: '去别的地方学',id: 3},
]
],
reasonArr: [],
codeText: '发送验证码',
}
},
@ -110,6 +104,17 @@
this.getdictDataListFn()
},
methods: {
// 退
applyOnlineFundFn() {
let _this = this
uni.showModal({
title: '确定要提交申请退款吗?',
content: '提交申请后,待教练和驾校审核通过即可收到退款~',
success: async ()=> {
_this.onsubmit()
}
})
},
//
async onsubmit() {
for(let key in this.FormDataToast) {
@ -126,8 +131,18 @@
const res = await applyOnlineFund(obj)
if(res.code==0) {
this.$u.toast('申请退款成功')
this.FormData = {
reasonType: '',
reasonName: '',
mobile: '',
amount: '',
stuName: '',
bankName: '',
idCard: '',
code: ''
}
setTimeout(()=>{
this.$goPage('/pages/mineEntry/myOrder/detail/detail?orderId='+this.orderId)
this.$goPage('/pages/mineEntry/myOrder/detail/detail?orderId='+this.orderId+'&refundId='+res.data)
},1500)
}
// console.log(res)

37
pages/userCenter/login/login.vue

@ -57,9 +57,44 @@
console.log(e.detail.errMsg) //
console.log(e.detail.errno) //
},
loginFn() {
//
uni.login({
provider: 'weixin',
success: loginRes => {
if (loginRes.code) {
//
this.getUserInfo(loginRes.code);
} else {
console.error('微信登录失败');
}
},
fail: err => {
console.error('微信登录失败', err);
}
});
},
getUserInfo(code) {
//
uni.getUserInfo({
provider: 'weixin',
success: userInfoRes => {
//
console.log('用户信息', userInfoRes);
// code
this.loginBackend(code, userInfoRes);
},
fail: err => {
console.error('获取用户信息失败', err);
}
});
},
loginBackend(code, userInfo) {
// code
// 使 uni.request HTTP
},
},
// code
getCode() {
uni.login({

Loading…
Cancel
Save