|
|
@ -100,7 +100,16 @@ |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
<order-refund-fixed |
|
|
|
:pay_amount="orderInfo.pay_amount || 0" |
|
|
|
:refund_amount="orderInfo.refund_amount || 0" |
|
|
|
:refund_times="refundTimes" |
|
|
|
@click:button="refunndBtn" |
|
|
|
></order-refund-fixed> |
|
|
|
|
|
|
|
<order-refund-modal |
|
|
|
ref="orderRefundModal" |
|
|
|
></order-refund-modal> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -109,7 +118,13 @@ import a_line from '../../../../../components/order_list/a_line/a_line.vue'; |
|
|
|
import util from '../../../../../utils/util'; |
|
|
|
import { ORDER_API } from '../../../js/api'; |
|
|
|
import server from '../../../js/server'; |
|
|
|
import orderRefundFixed from '@/components/order_refund/fixed.vue' |
|
|
|
import orderRefundModal from '@/components/order_refund/modal.vue'; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
'order-refund-fixed': orderRefundFixed, |
|
|
|
'order-refund-modal': orderRefundModal, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
course_period_nums_give(){ |
|
|
|
let { orderInfo } = this; |
|
|
@ -125,13 +140,43 @@ export default { |
|
|
|
return { |
|
|
|
orderInfo: { |
|
|
|
user_info: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
refundTimes: -1, // 退款次数 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options){ |
|
|
|
this.getInfo(options.order_no); |
|
|
|
this.getRefundTimes(options.order_no); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
refunndBtn(){ |
|
|
|
let { orderInfo, refundTimes } = this; |
|
|
|
this.$refs.orderRefundModal.show({ |
|
|
|
stadium_name: orderInfo?.extension?.stadium_name ?? '', |
|
|
|
order_no: orderInfo?.order_no ?? '', |
|
|
|
mobile: orderInfo?.student_phone ?? '', |
|
|
|
refundable_amount: orderInfo?.extension?.refundable_amount ?? 0, |
|
|
|
refundable_integral: orderInfo?.extension?.refundable_integral ?? 0, |
|
|
|
refund_times: refundTimes, |
|
|
|
confirm: e => { |
|
|
|
// this.siteAndPeopleRefund({ |
|
|
|
// order_no: pageInfo?.order_no ?? '', |
|
|
|
// amount: e?.refund_amount || 0, |
|
|
|
// integral: e?.refund_integral || 0, |
|
|
|
// }) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
async getRefundTimes(order_no){ |
|
|
|
try{ |
|
|
|
let _refundRes = await this.$store.dispatch('getOrderRefundList', order_no); |
|
|
|
let _refundLs = _refundRes?.data?.data?.list || []; |
|
|
|
this.refundTimes = _refundLs.length; |
|
|
|
console.log('refundRes', _refundRes); |
|
|
|
}catch(err){ |
|
|
|
console.warn('getRefundTimes err', err); |
|
|
|
} |
|
|
|
}, |
|
|
|
getInfo(order_no){ |
|
|
|
server.get({ |
|
|
|
url: ORDER_API.venueCourse_orderInfo, |
|
|
|