<!--
|
* @Author: 小明丶
|
* @Date: 2019-08-27 10:24:42
|
* @LastEditors: 小明丶
|
* @LastEditTime: 2019-09-03 11:11:55
|
* @Description:
|
-->
|
<template>
|
<div class="phone-box h-100-g">
|
<v-navbar title="手机分期订单" fixed>
|
<template v-slot:right>
|
<div class="flex-center-g" @click="isShow = true;">
|
<span>筛选</span>
|
<svg class="icon" aria-hidden="true" style="width:18px;height:18px;">
|
<use xlink:href="#iconshaixuan"></use>
|
</svg>
|
</div>
|
</template>
|
</v-navbar>
|
|
<div class="num-box">
|
<v-datacard class='info' :list="orderData"></v-datacard>
|
</div>
|
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="init">
|
<div class="mobile-order-list" v-for="(item,index) in list" :key="index">
|
<div class="header vux-1px-b">
|
<span>{{item.mblBrand}} {{item.mblModel}}</span>
|
<span v-if="orgType==1">商户名称:{{item.merName}}</span>
|
</div>
|
<div class="body">
|
<div class="content">
|
<p>姓名:<span>{{item.userName}}</span></p>
|
<p>手机:<span>{{item.mblNo}}</span></p>
|
<p>手机价格:<span class="mony">{{item.settAmt}}元</span></p>
|
<p>门店收取首付:<span class="mony">{{item.firstAmt}}元</span></p>
|
<p>首付比例:<span>{{item.firstRate}}%</span></p>
|
<p>分期金额:<span class="mony">{{item.surplusAmt}}元</span></p>
|
<p>每期还款金额:<span class="mony">{{item.termAmt}}元</span></p>
|
<p>分期期数:<span>{{item.insTerm}}期</span></p>
|
</div>
|
<div class="status">{{item.statusStr}}</div>
|
</div>
|
<div class="footer vux-1px-b">
|
<time>
|
<i class="iconfont scene_Staging-shijian"></i>
|
<span>{{item.creTime | timeformat('yyyy-MM-dd HH:mm')}} </span>
|
</time>
|
<!-- <span>门店名称:{{item.storeName}}</span> -->
|
<span v-if="orgType==3">门店名称:{{item.storeName}}</span>
|
<span v-if="orgType==4">办单员:{{item.recordPerson}}</span>
|
<span v-if="orgType==2">商户名称:{{item.merName}}</span>
|
<span v-if="orgType==1">渠道名称:{{item.chanName}}</span>
|
</div>
|
</div>
|
</van-list>
|
|
<v-button-circle icon='icondaochu' title='导出' @click="exportFile"></v-button-circle>
|
|
<v-filter v-model="isShow" :belongArr="belongArr" :statusArr="statusArr" customTitle="手机价格" :hasSearch="true"
|
@search="(v)=>search(v,true)"></v-filter>
|
|
<van-popup v-model="exporShow">
|
<div class="popup-content">
|
<div class="icon-box flex-center-g">
|
<div class="child flex-center-g">
|
<svg class="icon" aria-hidden="true" style="width:33px;height:27px;fill:#fff;" @click="$router.back()">
|
<use xlink:href="#iconyoujian"></use>
|
</svg>
|
</div>
|
</div>
|
<p class="text">
|
<span class="top">已将信息发送至邮箱,请注意查收</span>
|
<span v-text="userinfo.email || ''">1244667@163.com</span>
|
</p>
|
<van-button class="btn-submit" @click="exporShow=false;">确定</van-button>
|
</div>
|
</van-popup>
|
</div>
|
</template>
|
<script>
|
import {
|
mapState,
|
mapGetters
|
} from 'vuex';
|
import {
|
getParams
|
} from '@/utils/index';
|
export default {
|
data() {
|
return {
|
finished: false,
|
loading: false,
|
|
isShow: false,
|
list: [],
|
statusArr: [],
|
belongArr: [],
|
filter: {},
|
orderData: [],
|
|
exporShow:false,
|
|
}
|
},
|
created() {
|
this.getOrderInit()
|
this.getOrderReport()
|
},
|
computed: {
|
...mapState(['userinfo']),
|
...mapGetters(['orgType']),
|
typeId() {
|
return this.$route.query.typeId
|
},
|
prodId() {
|
return this.$route.query.prodId
|
},
|
id() {
|
return this.$route.query.id;
|
},
|
dataLabel(){
|
if(this.orgType===1 || this.orgType===2){
|
return "交易商户数"
|
}else if(this.orgType ===3){
|
return "交易门店数"
|
}else{
|
return "交易门店数"
|
}
|
}
|
},
|
methods: {
|
search(v, isClear) {
|
this.filter.orderId = "";
|
this.finished = false;
|
this.init(v, isClear)
|
this.getOrderReport(v)
|
},
|
// 获取过滤条件
|
getOrderInit() {
|
this.$api.getOrderInit({
|
orgType: this.orgType,
|
prodTypeId: this.typeId
|
}).then((res) => {
|
let body = res.body,
|
orderStatusList = body.orderStatusList || [],
|
orgBaseInfVoList = body.orgBaseInfVoList || [];
|
this.statusArr = orderStatusList;
|
this.belongArr = orgBaseInfVoList;
|
}).catch((err) => {
|
|
});
|
|
},
|
//获取订单
|
init(params = this.filter, isClear) {
|
let p = getParams(this.orgType, this.id)
|
params.prodTypeId = this.typeId;
|
params = Object.assign(params, p)
|
this.loading = true;
|
this.$api.ljOrderList(params).then(res => {
|
this.filter = {
|
...params
|
};
|
if (isClear) {
|
this.list = [];
|
}
|
let list = res.body || [],
|
len = list.length;
|
if (len) {
|
this.filter.orderId = list[list.length - 1].orderId;
|
this.list.push(...list)
|
}
|
if (len < 10) {
|
this.finished = true;
|
}
|
this.loading = false;
|
this.isShow = false;
|
}).catch((err) => {
|
this.finished = true;
|
this.loading = false;
|
});
|
},
|
// 订单导出
|
exportFile() {
|
if (!this.list.length) {
|
this.$notify('暂无数据导出')
|
return;
|
}
|
this.$api.ljOrderExport(this.filter).then((res) => {
|
|
this.exporShow = true;
|
|
// this.$dialog.alert({
|
// showCancelButton: false,
|
// message: `<div>
|
// <p>已将信息发送至邮箱,请注意查收</p>
|
// <p>${this.userinfo.email}</p>
|
// </div>`
|
// }).then(() => {
|
//
|
// });
|
}).catch((err) => {
|
|
});
|
},
|
// 获取订单统计数据
|
getOrderReport(params) {
|
this.$api.getOrderReport({
|
...params,
|
prodId: this.prodId,
|
pageType: 2,
|
}).then(({
|
body
|
}) => {
|
this.orderData = [];
|
this.orderData.push({
|
title: '交易额',
|
num: body.amtNum || 0,
|
})
|
this.orderData.push({
|
title: '交易单数',
|
num: body.orderNum || 0,
|
})
|
let num = body.merNum || 0;
|
if(this.orgType==4){
|
num = "—";
|
}
|
this.orderData.push({
|
title: this.dataLabel,
|
num
|
})
|
}).catch((err) => {
|
|
})
|
},
|
},
|
}
|
</script>
|
<style lang="less" scoped>
|
.phone-box {
|
padding-top: 44px;
|
background-color: #f1f1f1;
|
|
}
|
|
.num-box {
|
margin: 0 8px;
|
}
|
|
.mobile-order-list {
|
background: @c-bg-fff;
|
margin-bottom: 10px;
|
|
}
|
|
.popup-content{
|
height: 150px;
|
width: 280px;
|
border-radius: 3px;
|
.icon-box{
|
z-index: 99999;
|
height: 64px;
|
width: 64px;
|
position: absolute;
|
left: 50%;
|
background:rgba(66,61,93,0.1);
|
border-radius: 50%;
|
transform: translate(-50%,-50%);
|
|
.child{
|
height: 55px;
|
width: 55px;
|
background:rgba(66,61,93,0.8);
|
border-radius: 50%;
|
}
|
}
|
.text{
|
width: 210px;
|
text-align: center;
|
margin: 0 auto;
|
padding-top: 50px;
|
line-height: 18px;
|
.top{
|
color: @c-text-666;
|
}
|
}
|
.btn-submit{
|
.lh(44px);
|
position: absolute;
|
width: 100%;
|
bottom: 0;
|
color: @c-text-default;
|
}
|
}
|
.header {
|
display: flex;
|
padding: 0 12px;
|
line-height: 44px;
|
font-size: @font-12;
|
|
|
>span:first-child {
|
font-size: 15px;
|
color: @c-text-default;
|
flex: 1;
|
}
|
}
|
|
.footer {
|
display: flex;
|
padding: 0 12px;
|
line-height: 44px;
|
font-size: @font-12;
|
background: rgba(191, 160, 115, 0.1);
|
|
time {
|
flex: 1;
|
}
|
}
|
|
.body {
|
display: flex;
|
padding: 12px;
|
align-items: center;
|
|
.content {
|
flex: 1;
|
font-size: @font-12;
|
line-height: 2;
|
|
span {
|
padding-left: 5px;
|
}
|
|
.mony {
|
color: @c-text-default;
|
|
}
|
}
|
|
.status {
|
color: @c-text-default;
|
}
|
}
|
</style>
|