master
parent
98959dd0f6
commit
1ac9c5046e
|
@ -132,7 +132,7 @@
|
|||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
isScreenshot:true,
|
||||
isScreenshot:false,
|
||||
upImg:'',
|
||||
chooseIndex:0,
|
||||
activityList:[],//活动列表
|
||||
|
@ -243,10 +243,9 @@
|
|||
count:1,
|
||||
sourceType:['album'],
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
this.upImg = res.tempFilePaths[0];
|
||||
this.$requst.upload('file/upload/image',{file:this.upImg}).then(res=>{
|
||||
this.upImg = this.$http + res.data.src
|
||||
this.upImg = this.$http + res.data.src;
|
||||
this.$toolAll.tools.showToast('图片上传成功(*^▽^*)')
|
||||
},error=>{})
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 体验券使用弹框 -->
|
||||
<view v-if="isTY" @tap="isTY=false" class="disjcac tc quan-tk-box">
|
||||
<view v-if="isTY" @tap="isTY=false" class="disjcac tc quan-tk-box" catchtouchmove="return">
|
||||
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isTY=true">
|
||||
<view class="fon28 col3">体验券使用</view>
|
||||
<view class="mar-sx30">
|
||||
|
|
|
@ -484,6 +484,9 @@
|
|||
},
|
||||
fail() {
|
||||
this.times = 0;
|
||||
uni.navigateTo({
|
||||
url:'/pagesA/myOrder/myOrder'
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -12,7 +12,10 @@
|
|||
</view>
|
||||
<view :style="{paddingTop:(statusHNH+12+chuTop)+'px'}" class="pad-sx20 pad-zy32">
|
||||
<view v-if="orderList.length!=0" v-for="(item,index) in orderList" :key="index" class="radius20 bacf pad20 mar-x20 order-item-box">
|
||||
<view @tap="goDetail(item.id)" class="bbot disjbac pad-x20 mar-x20"><view class="fon28 col3 bold">{{item.isShop==0?'商城订单':'积分商城订单'}}</view><view class="fon24 col9">{{item.establish}}</view></view>
|
||||
<view @tap="goDetail(item.id)" class="bbot disjbac pad-x20 mar-x20"><view class="fon28 col3 bold">{{item.isShop==0?'商城订单':'积分商城订单'}}</view>
|
||||
<view v-if="item.is_only==0 && item.open_one==1 && item.is_group_make==1 && item.open_one_success==0" class="fon24 col9">{{item.group_make_end_at}}</view>
|
||||
<view v-else class="fon24 col9">{{item.establish}}</view>
|
||||
</view>
|
||||
<view @tap="goDetail(item.id)" class="disjbac fon24">
|
||||
<view class="col3">订单号:{{item.orderNum}}</view>
|
||||
<view v-if="item.virtual_check==0" class="bold" :class="(item.orderStatus==1 || item.orderStatus==2 || item.orderStatus==3) ? 'colf8':'col9'">{{['','待付款','待发货','待核验','待收货','交易完成'][item.orderStatus]}}</view>
|
||||
|
@ -31,7 +34,7 @@
|
|||
<view v-if="itemc.is_virtual!=0 && itemc.check_type!='frontend'" class="order-btn" style="background-color: #CCCCCC;">线上核销</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="itemc.is_virtual!=0" class="disjbac mar-s10 posia colf8" style="bottom: 20rpx;">已核验 x{{itemc.not_check_num}}</view>
|
||||
<view v-if="itemc.is_virtual!=0 && itemc.not_check_num!=0" class="mar-s10 posia col6" style="bottom: 20rpx; right: 0rpx;">待核验 x{{itemc.not_check_num}}</view>
|
||||
</view>
|
||||
<!-- <view class="fon28 col3 pad-s20 disjbac">
|
||||
<view class="flexs"><span v-if="item.isShop==0">合计:<span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> +<span v-if="item.coin!=0">{{item.coin}}孔雀币</span></span><span v-else>合计积分:{{item.total}}</span></view>
|
||||
|
@ -46,8 +49,8 @@
|
|||
<view class="fon28 col3">
|
||||
<view class="mar-sx20 disje"><span v-if="item.isShop==0">合计:<span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> <span v-if="item.coin!=0">+{{item.coin}}孔雀币</span></span><span v-else>合计积分:{{item.total}}</span></view>
|
||||
<view class="width100 disje">
|
||||
<view v-if="item.is_only==0 && item.open_one==1" class="order-btn mar-y20">直接免拼</view>
|
||||
<view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5 && item.virtual_check==0" class="order-cancle">取消订单</view>
|
||||
<view @tap="comeing(item.orderNum)" v-if="item.is_only==0 && item.open_one==1 && item.is_group_make==1 && item.open_one_success==0" class="order-btn mar-y20">直接免拼</view>
|
||||
<view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5 && item.virtual_check==0 && item.orderStatus!=5" class="order-cancle">取消订单</view>
|
||||
<view @tap="payMentEv(index)" v-if="item.orderStatus == 1" class="order-btn">付款</view>
|
||||
<!-- <view class="order-btn" v-if="item.is_only==1">单人拼团</view> -->
|
||||
<view @tap="confirmReceipt(item.id)" v-if="item.orderStatus == 4" class="order-btn">确认收货</view>
|
||||
|
@ -57,7 +60,7 @@
|
|||
<nothing-page v-if="orderList.length==0" :content="`暂无更多订单列表`"></nothing-page>
|
||||
</view>
|
||||
<!-- 待核验弹框 -->
|
||||
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;">
|
||||
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;" catchtouchmove="return">
|
||||
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
|
||||
<view class="fon28 col3">订单二维码</view>
|
||||
<view class="mar-sx30">
|
||||
|
@ -134,7 +137,9 @@
|
|||
size: 162,
|
||||
colorDark: '#000000',
|
||||
colorLight: '#ffffff',
|
||||
timer:null
|
||||
timer:null,
|
||||
zanArr:[],
|
||||
timeList:[]
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
|
@ -163,6 +168,14 @@
|
|||
options.index==undefined ? this.activeIndex = 0 : this.activeIndex = options.index;
|
||||
},
|
||||
methods: {
|
||||
comeing(coding){
|
||||
this.$requst.post('user/open-one',{order_coding:coding}).then(res=>{
|
||||
if(res.code==0){
|
||||
this.$toolAll.tools.showToast('免拼成功');
|
||||
this.checkList(this.activeIndex);
|
||||
}
|
||||
})
|
||||
},
|
||||
make(index,index2){
|
||||
this.isHeyan = true;
|
||||
this.text = `${this.orderList[index].orderNum},${this.orderList[index].childrenList[index2].id}`;
|
||||
|
@ -216,16 +229,18 @@
|
|||
duration: 0
|
||||
});
|
||||
this.orderList = [];
|
||||
this.zanArr = [];
|
||||
this.timeList = [];
|
||||
}
|
||||
this.total = res.data.total;
|
||||
if(res.data.list.length!=0){
|
||||
res.data.list.forEach(item=>{
|
||||
let statusNum = 0;
|
||||
if(item.status=="waiting") statusNum = 1;
|
||||
if(item.status=="paid" && item.has_virtual==1) {
|
||||
statusNum = 3;
|
||||
}
|
||||
if(item.status=="paid" && item.has_virtual==0) {
|
||||
// if(item.status=="paid" && item.has_virtual==1) {
|
||||
// statusNum = 3;
|
||||
// }
|
||||
if(item.status=="paid") {
|
||||
statusNum = 2;
|
||||
}
|
||||
// if(item.status=="check")
|
||||
|
@ -262,15 +277,61 @@
|
|||
isShop:item.is_score,//0 商城订单,1 积分商城订单
|
||||
total: nprice,//合计
|
||||
coin:item.coin,//孔雀币
|
||||
is_only:item.is_only,//是否单独购买
|
||||
is_only:item.is_only,//是否单独购买,1、单独购买
|
||||
virtual_check:item.virtual_check,
|
||||
// open_one:item.open_one
|
||||
open_one:item.open_one,
|
||||
is_group_make:item.is_group_make,
|
||||
open_one_success:item.open_one_success,
|
||||
group_make_end_at:item.group_make_end_at
|
||||
}
|
||||
this.orderList.push(obj);
|
||||
this.zanArr.push(obj);
|
||||
})
|
||||
this.zanArr.forEach((item,index)=>{
|
||||
if(item.group_make_end_at!='' && item.group_make_end_at!=null) {
|
||||
let obj = {
|
||||
id:item.id,
|
||||
time:item.group_make_end_at,
|
||||
nIndex:index
|
||||
}
|
||||
this.timeList.push(obj);
|
||||
}
|
||||
})
|
||||
if(this.timeList!=0){
|
||||
uni.showToast({
|
||||
title:'加载中...',
|
||||
icon:'none',
|
||||
duration:100000
|
||||
})
|
||||
this.timer = setInterval(()=>{//定时器
|
||||
if(this.timeList.length!=0){
|
||||
this.timeList.forEach((item,index)=>{
|
||||
if(item.id==this.zanArr[item.nIndex].id){
|
||||
let endTime = new Date(this.timeList[index].time).getTime();//把结束时间转时间戳
|
||||
let startTime = new Date().getTime() + 1000;//请求接口的时间递增,即:开始时间
|
||||
if(startTime - endTime >=0) {//如果开始时间的时间戳 - 结束时间的时间戳 >= 0 活动结束
|
||||
// this.checkList(this.activeIndex);
|
||||
} else {
|
||||
// 继续进行倒计时
|
||||
this.zanArr[item.nIndex].group_make_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,startTime);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},1000)
|
||||
setTimeout(()=>{
|
||||
uni.hideToast();
|
||||
this.orderList = this.zanArr;
|
||||
// this.search_result = true;
|
||||
},1000)
|
||||
} else {
|
||||
uni.hideToast();
|
||||
this.orderList = this.zanArr;
|
||||
}
|
||||
this.zanList = this.orderList;
|
||||
if(index==0) {
|
||||
this.orderList = this.zanList;
|
||||
} else if(index==3){
|
||||
console.log(1234);
|
||||
} else {
|
||||
this.orderList = this.zanList.filter(item=>{
|
||||
return item.orderStatus==index;
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
<view v-if="orderInfo.status=='closed'" class="col9 bold">订单已取消</view>
|
||||
</view>
|
||||
<view class="bold col3 mar-s40 mar-x20">订单号:{{orderInfo.coding}}</view>
|
||||
<view class="fon24 col9">{{orderInfo.created_at}}</view>
|
||||
<view class="fon24 col9" v-if="orderInfo.is_only==0 && orderInfo.open_one==1 && orderInfo.is_group_make==1 && orderInfo.open_one_success==0 ">{{daoTime}}</view>
|
||||
<view class="fon24 col9" v-else>{{orderInfo.created_at}}</view>
|
||||
</view>
|
||||
<!-- 物流信息 -->
|
||||
<view class="bacf radius20 mar-s20 fon28" style="padding: 27rpx 20rpx;">
|
||||
|
@ -78,6 +79,7 @@
|
|||
<view class="fon28 col3">分享</view>
|
||||
<button open-type="share" class="posia-op"></button>
|
||||
</view>
|
||||
<view @tap="comeing(orderInfo.coding)" v-if="orderInfo.is_only==0 && orderInfo.open_one==1 && orderInfo.is_group_make==1 && orderInfo.open_one_success==0 " class="orderInfo-btn">直接免拼</view>
|
||||
<!-- 待付款 -->
|
||||
<view class="disac paid-btn-box" v-if="orderInfo.status=='waiting'">
|
||||
<view @tap="cancleEv">取消订单</view>
|
||||
|
@ -91,7 +93,7 @@
|
|||
<view @tap="confirmReceipt(orderInfo.id)" class="orderInfo-btn" v-if="orderInfo.status=='shipped'">确认收货</view>
|
||||
</view>
|
||||
<!-- 待核验弹框 -->
|
||||
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;">
|
||||
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;" catchtouchmove="return">
|
||||
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
|
||||
<view class="fon28 col3">订单二维码</view>
|
||||
<view class="mar-sx30">
|
||||
|
@ -137,7 +139,8 @@
|
|||
size: 162,
|
||||
colorDark: '#000000',
|
||||
colorLight: '#ffffff',
|
||||
timer:null
|
||||
timer:null,
|
||||
daoTime:''
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
|
@ -150,6 +153,14 @@
|
|||
this.checkInfo(options.id);
|
||||
},
|
||||
methods: {
|
||||
comeing(coding){
|
||||
this.$requst.post('user/open-one',{order_coding:coding}).then(res=>{
|
||||
if(res.code==0){
|
||||
this.$toolAll.tools.showToast('免拼成功');
|
||||
this.checkInfo(this.orderInfo.id);
|
||||
}
|
||||
})
|
||||
},
|
||||
confirmReceipt(id){//确认收货事件
|
||||
this.$requst.post('order/accepted',{order_id:id}).then(res=>{
|
||||
if(res.code==0){
|
||||
|
@ -251,6 +262,14 @@
|
|||
this.allPrice = this.allPrice;
|
||||
}
|
||||
this.orderInfo = narr;
|
||||
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
|
||||
this.timerDao = setInterval(()=>{
|
||||
if(new Date().getTime()-new Date().getTime(this.orderInfo.group_make_end_at)>0){
|
||||
this.checkInfo(this.orderInfo.id);
|
||||
} else {
|
||||
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
|
||||
}
|
||||
},1000)
|
||||
let naddress = this.orderInfo.address.split(',');
|
||||
if(naddress[0]!='自提'){
|
||||
let nphone = this.$toolAll.tools.hideMPhone(naddress[1].trim())
|
||||
|
|
Loading…
Reference in New Issue