<!--
|
* @Author: 小明丶
|
* @Date: 2019-08-19 16:20:48
|
* @LastEditors: 小明丶
|
* @LastEditTime: 2019-10-22 08:56:10
|
* @Description: 花呗分期——订单详情
|
-->
|
<template>
|
<div class="hb-detail-box h-100-g">
|
<v-navbar title="订单详情" fixed></v-navbar>
|
<div class="content">
|
<div class="cell-group">
|
<van-cell :value="form.usrName" title='姓名' readonly></van-cell>
|
<van-cell :value="form.usrNo" title='手机号' readonly></van-cell>
|
</div>
|
|
<div class="cell-group">
|
<van-cell v-if="form.creTime" :value="form.creTime | timeformat('yyyy-MM-dd')" title='交易时间' readonly></van-cell>
|
<van-cell v-else title='交易时间' readonly></van-cell>
|
<van-cell :value="form.status" :value-class="statusColor" title='订单状态' readonly>{{ form.status == 0 ? '待确认' : form.status == 1? '拉新' : form.status == 2? '拉新+绑卡' : '无效' }}</van-cell>
|
</div>
|
|
<div class="cell-group" >
|
<van-cell :value="form.chanName || '无'" title='办理渠道' readonly></van-cell>
|
<van-cell :value="form.merName || '无'" title='办理商户' readonly></van-cell>
|
<van-cell :value="form.storeName || '无'" title='办理门店' readonly></van-cell>
|
<van-cell :value="form.mgrName || '无'" title='办单员' readonly></van-cell>
|
</div>
|
|
<!-- <div class="cell-group">
|
<van-cell :value="form.rate + '%'" title='费率' readonly></van-cell>
|
</div> -->
|
</div>
|
|
<!-- <footer class="footer flex-center-g">
|
<van-button class="btn" v-if="form.refundStatus==1" @click="refund">退款</van-button>
|
<van-button class="btn" v-if="form.status==0" @click="showCode">显示支付二维码</van-button>
|
</footer> -->
|
|
</div>
|
</template>
|
|
<script>
|
import {
|
mapState
|
} from 'vuex';
|
export default {
|
data() {
|
return {
|
form: {},
|
statusColor:'',
|
id: this.$route.query.id, //lx订单详情id
|
}
|
},
|
computed: {
|
id() {
|
return this.$route.query.id
|
},
|
typeId() {
|
return this.$route.query.typeId
|
},
|
...mapState(['userinfo'])
|
},
|
created() {
|
this.init()
|
},
|
methods: {
|
init() {
|
// this.$api.getHBDetail(this.id).then((res) => {
|
// this.form = res.body || {};
|
// if(this.form) {
|
// if (this.form.status == 1) {
|
// this.statusColor = 'status-val-done';
|
// } else if (this.form.status == 2) {
|
// this.statusColor = 'status-val-error';
|
// } else if (this.form.status == 3) {
|
// this.statusColor = 'status-val-refund';
|
// } else if (this.form.status == 0) {
|
// this.statusColor = 'status-val-wait';
|
// } else {
|
// this.statusColor = 'status-val-done';
|
// }
|
// }
|
// }).catch((err) => {
|
|
// });
|
//拉新列表初始化
|
this.$api.zfbLxList().then(res => {
|
res.body.filter( item => {
|
if(item.id == this.id) this.form = item
|
})
|
// console.log(this.form)
|
switch (this.form.status) {
|
case 0:
|
this.statusColor = 'status-val-wait'
|
break;
|
case 1:
|
this.statusColor = 'status-val-done'
|
case 2:
|
this.statusColor = 'status-val-done'
|
break;
|
case 2:
|
this.statusColor = 'status-val-error'
|
break;
|
|
default:
|
break;
|
}
|
}).catch((err) => {
|
|
});
|
},
|
//退款
|
refund() {
|
this.$dialog.confirm({
|
message: '是否确认退款'
|
}).then(() => {
|
this.$api.hbOrderRefund(this.id).then((res) => {
|
if (res.errorCode == 0) {
|
this.$notify('退款成功');
|
this.$router.back();
|
}
|
}).catch((err) => {
|
|
});
|
}).catch(() => {
|
// on cancel
|
});
|
// this
|
|
},
|
//展示二维码
|
showCode() {
|
if (this.form.payCode) {
|
// window.sessionStorage.setItem("hbpayQrCodeUrl", this.payCode);
|
let queryObj = {
|
payQrCodeUrl:this.form.payCode,
|
orderId: this.form.orderId,
|
totalAmount: this.form.insAmt,
|
term: this.form.insTerm,
|
typeId:this.typeId || ''
|
}
|
this.$router.push({
|
path: "/hb-getHBQRCode",
|
query: queryObj
|
})
|
}
|
}
|
},
|
}
|
</script>
|
<style lang="less" scoped>
|
.status-val-done {
|
color:#19BE6B;
|
}
|
.status-val-refund {
|
color:#FF9900;
|
}
|
.status-val-wait {
|
color:#333333;
|
}
|
.status-val-error {
|
color:#ED4014;
|
}
|
.hb-detail-box {
|
padding-top: 44px;
|
background-color: @c-bg-f5;
|
|
.content {
|
padding: 10px 8px;
|
}
|
|
.cell-group {
|
margin-bottom: 10px;
|
}
|
}
|
|
.footer {
|
padding-bottom: 30px;
|
margin: 0 8px;
|
background-color: @c-bg-f5;
|
|
.btn {
|
width: 50%;
|
color: @c-text-fff;
|
background-color: @c-bg-default;
|
}
|
}
|
</style>
|