Commit c6bc79cc authored by Mac's avatar Mac

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents 6594c46c 267b80c9
...@@ -317,6 +317,8 @@ ...@@ -317,6 +317,8 @@
"path":"guidecarList" "path":"guidecarList"
},{ },{
"path": "orderList" "path": "orderList"
},{
"path": "orderDetail"
}] }]
}, },
{ {
......
<style>
.orderDetail {
background-color: #FAF8F9;
}
.orderDetail .orderItem {
background-color: #fff;
margin-bottom: 10px;
padding: 0 15px;
}
.orderDetail .orderDay {
display: flex;
justify-content: space-between;
padding-top: 20px;
}
.orderDetail .order_big {
font-size: 14px;
color: #08090E;
font-weight: bold;
}
.orderDetail .order_mini {
font-size: 11px;
color: #919191;
margin-top: 10px;
}
.orderDetail .orderCar {
display: flex;
justify-content: space-between;
padding: 30px 0;
}
.orderDetail .order_carImg image {
width: 200rpx;
height: 200rpx;
}
.orderDetail .order_small {
font-size: 14px;
color: #919191;
}
.orderDetail .order_GName {
width: 100%;
height: 50px;
border-top: 1px solid #e2e2e2;
display: flex;
align-items: center;
justify-content: space-between;
}
.orderDetail .order_dList {
border-bottom: 1px solid #e2e2e2;
padding: 20px 0;
}
.order_dList:last-child {
border-bottom: 0;
}
.orderDetail .order_comLeft {
margin-left: 70px;
}
.orderDetail .order_Tprice {
display: flex;
justify-content: space-between;
}
.order_redPrice {
color: #F20707;
font-size: 14px;
}
.orderDetail .order_BtnList {
display: flex;
justify-content: space-between;
align-items: center;
}
.order_Apply,
.order_Sure {
width: 50%;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
height: 60px;
}
.orderDetail .order_ImgS {
width: 17px;
height: 17px;
margin-right: 5px;
}
.orderDetail .order_Line {
width: 1px;
height: 40px;
background-color: #e2e2e2;
}
.orderDetail .order_nonBtm{
border-bottom: 0!important;
}
</style>
<template>
<view class="orderDetail" style="height:100vh;">
<view class="orderItem">
<view class="orderDay">
<view>
<template v-if="dataList.DetailList&&dataList.DetailList.length>0">
<view class="order_big">{{getStart(dataList.DetailList[0].TripSTime)}}</view>
<view class="order_mini">{{getWeek(dataList.DetailList[0].TripSTime)}}</view>
</template>
</view>
<view style="text-align: center;margin-top:8px;">
<view style="font-size:13px;color:#1B1D1E;" v-if="dataList.DetailList&&dataList.DetailList.length>0">{{getDays()}}</view>
<view style="position: relative;top:-8px;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/dir_arrow.png" mode="aspectFill" style="width: 55px;height: 4px;"></image>
</view>
</view>
<view>
<template v-if="dataList.DetailList&&dataList.DetailList.length>0">
<view class="order_big">{{getStart(dataList.DetailList[0].TripETime)}}</view>
<view class="order_mini">{{getWeek(dataList.DetailList[0].TripETime)}}</view>
</template>
</view>
</view>
<view class="orderCar">
<view class="order_carImg">
<image mode="aspectFit" :src="dataList.DetailList[0].CoverImagePath" />
</image>
</view>
<view style="width:55%">
<view class="order_big">{{dataList.DetailList[0].CarName}}</view>
<view class="order_small" style="margin-top:5px;">
{{dataList.DetailList[0].GoodsName}}
</view>
</view>
<view style="text-align: right;">
<view class="order_big">¥ {{getPrice()}}</view>
<view style="color:#727272;font-size:13px;">×{{dataList.DetailList[0].Number}}</view>
</view>
</view>
<view class="order_GName">
<view class="order_small order_comLeft">匹配导游</view>
<view style="display: flex;align-items: center;">
<u-avatar mode="circle" :src="dataList.DetailList[0].GuidePhoto" size="60"></u-avatar>
<text class="order_big" style="margin-left:5px;">{{dataList.DetailList[0].GuideName}}</text>
</view>
</view>
</view>
<view class="orderItem">
<view class="order_dList">
<text class="order_small order_comLeft">订单编号:</text>
<text class="order_big" style="margin-left:20px;">{{dataList.OrderNo}}</text>
</view>
<view class="order_dList">
<text class="order_small order_comLeft">下单时间:</text>
<text class="order_big" style="margin-left:20px;">{{dataList.CreateDate}}</text>
</view>
<view class="order_dList">
<text class="order_small order_comLeft">支付方式:</text>
<text class="order_big" style="margin-left:20px;">{{dataList.PaymentWayName}}</text>
</view>
</view>
<view class="orderItem" style="margin-bottom:0;">
<view class="order_dList order_Tprice">
<text class="order_small order_comLeft">商品总额</text>
<text class="order_big">¥ {{dataList.Income}}</text>
</view>
<view class="order_dList order_Tprice">
<text class="order_small order_comLeft">优惠</text>
<text class="order_big">¥ {{dataList.CouponMoney}}</text>
</view>
<view class="order_dList" style="text-align: right" :class="{'order_nonBtm':dataList.OrderStatus!=3}">
<text class="order_big">实付款:</text>
<text class="order_redPrice">¥ {{dataList.Income}}</text>
</view>
<view class="order_BtnList">
<view class="order_Apply" @click="openAfterHandler" v-if="dataList.OrderStatus == '3'&& dataList.PresentFXGrade!=1">
<image class="order_ImgS" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/o_apply.png"></image>申请售后
</view>
<view class="order_Line" v-if="dataList.OrderStatus == '3'"></view>
<view class="order_Sure" @click="shouhuoHandler" v-if="dataList.OrderStatus == '3'">
<image class="order_ImgS" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/o_shouhuo.png"></image>确认收货
</view>
</view>
</view>
<after-sale :list="dataList.DetailList" v-if="showAfter" @close="closeAfterHandler"></after-sale>
<u-modal v-model="showReviceModal" content="是否确认收货?" :show-cancel-button="true" :show-title="false" @confirm="submitReviceGoodHandler"
:border-radius="20"></u-modal>
</view>
</template>
<script>
import afterSale from "@/components/userorder/after-sale";
export default {
components: {
afterSale
},
data() {
return {
pageTitle: '订单详情',
mainColor: '',
msg: {
OrderId: 0,
NewUserId: 0
},
dataList: {},
showAfter: false,
showReviceModal: false,
}
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata") ?
wx.getStorageSync("basedata").bar_title : [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(option) {
this.u = uni.getStorageSync("mall_UserInfo");
this.msg.OrderId = option.OrderId;
this.getData();
},
methods: {
//获取数据
getData() {
this.request2({
url: "/api/AppletGCOrder/GetAppletGuidecarOrderOrderInfo",
data: this.msg,
},
(res) => {
if (res.resultCode == 1) {
this.dataList = res.data;
}
}
);
},
//获取价格
getPrice() {
if (this.dataList.DetailList && this.dataList.DetailList.length > 0) {
var price = 0;
var p1 = this.dataList.DetailList[0].Final_Price;
var number = this.dataList.DetailList[0].Number;
price = p1 / number;
return price;
}
},
//获取日期
getStart(data) {
if (data) {
var data = data;
var year = data.split(' ')[0];
var days = year.split('-');
return days[1] + '月' + days[2] + '日';
}
},
//获取周几
getWeek(data) {
if (data) {
var data = data;
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
var year = data.split(' ')[0];
var b = new Date(Date.parse(year.replace(/\-/g, "/")));
var days = b.getDay();
var days = weekArray[days];
var time = data.split(' ')[1];
var time2 = time.split(':');
return '周' + days + ' ' + time2[0] + ':' + time2[1];
}
},
//计算天数
getDays() {
let startTime = new Date(this.dataList.DetailList[0].TripSTime);
let endTime = new Date(this.dataList.DetailList[0].TripETime);
let usedTime = endTime - startTime; // 相差的毫秒数
let days = Math.floor(usedTime / (24 * 3600 * 1000)); // 计算出天数
let leavel = usedTime % (24 * 3600 * 1000); // 计算天数后剩余的时间
let hours = Math.floor(leavel / (3600 * 1000)); // 计算剩余的小时数
let Str = '';
if (days > 0) {
if (leavel > 0) {
Str = days + 1 + ' ' + '天'
} else {
Str = days + ' ' + '天'
}
} else {
if (hours >= 6) {
Str = 1 + ' ' + '天'
} else {
Str = '半天'
}
}
return Str;
},
//申请售后
openAfterHandler() {
this.showAfter = true;
},
closeAfterHandler() {
this.showAfter = false;
},
//确认收货
shouhuoHandler() {
this.showReviceModal = true;
},
submitReviceGoodHandler() {
let that = this
that.request2({
url: '/api/AppletOrder/SetAppletOrderGoodsReceiving',
data: {
OrderId: that.dataList.OrderId
}
},
(res) => {
uni.showToast({
title: res.message
})
that.getData()
}
);
}
}
}
</script>
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;" :enable-back-to-top="true" :enable-flex="true" <scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;" :enable-back-to-top="true" :enable-flex="true"
@scrolltolower="lower" :style="{ 'height': `calc(100% - ${scrollHeight})`}"> @scrolltolower="lower" :style="{ 'height': `calc(100% - ${scrollHeight})`}">
<view class="order_Content"> <view class="order_Content">
<view class="order_Inner" v-for="(item,index) in dataList" :key="index"> <view class="order_Inner" v-for="(item,index) in dataList" :key="index" @click="goDetail(item)">
<view class="order_NContent"> <view class="order_NContent">
<view>订单号:{{item.OrderNo}}</view> <view>订单号:{{item.OrderNo}}</view>
<view class="order_Status">{{item.OrderStatusName}}</view> <view class="order_Status">{{item.OrderStatusName}}</view>
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
</view> </view>
<view class="order_BtnList"> <view class="order_BtnList">
<view class="order_Btn_inner"> <view class="order_Btn_inner">
<view class="order_Btn_Com" style="color:#FF4048;border-color:#FF4048;">再次购买</view> <view class="order_Btn_Com" @click.stop="buy(item)" style="color:#FF4048;border-color:#FF4048;">再次购买</view>
<!-- <view class="order_Btn_Com">评价晒单</view> --> <!-- <view class="order_Btn_Com">评价晒单</view> -->
<view class="order_Btn_Com" @click="cancel(item,index)" v-if="item.OrderStatus==1||item.OrderStatus==2||item.OrderStatus==3">取消订单</view> <view class="order_Btn_Com" @click="cancel(item,index)" v-if="item.OrderStatus==1||item.OrderStatus==2||item.OrderStatus==3">取消订单</view>
</view> </view>
...@@ -253,7 +253,6 @@ ...@@ -253,7 +253,6 @@
data: this.msg, data: this.msg,
}, },
(res) => { (res) => {
console.log(res, '头部');
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.headData = res.data; this.headData = res.data;
var obj = { var obj = {
...@@ -313,7 +312,6 @@ ...@@ -313,7 +312,6 @@
}, },
//取消订单 //取消订单
cancel(e, index) { cancel(e, index) {
console.log(e, 'eee');
this.showModal = true; this.showModal = true;
this.Cancelmsg.Remark = '', this.Cancelmsg.Remark = '',
this.index = index; this.index = index;
...@@ -362,8 +360,38 @@ ...@@ -362,8 +360,38 @@
); );
} }
}) })
}, },
//再次购买
buy(y) {
let ShoppingCartIdList = [];
let forms = {};
let good = {
// MallId: y.MallId,
DetailList: [],
Use_Integral: 0,
User_Coupon_Id: 0,
DeliveryMethod: 0,
AddressId: 0,
};
y.DetailList.forEach((x) => {
ShoppingCartIdList.push(x.Id)
let g = {
GoodsId: x.GoodsId,
Number: x.Number,
SpecificationSort: x.SpecificationSort,
};
good.DetailList.push(g);
});
forms = good;
uni.navigateTo({
url: '/pages/order-submit/order-submit?formData=' + encodeURIComponent(JSON.stringify(forms)) +
'&IsFormShoppingCart=2&ShoppingCartIdList=' + JSON.stringify(ShoppingCartIdList)
});
},
//跳转到详情
goDetail(item){
uni.navigateTo({ url: '/pages/guidecar/orderDetail?OrderId='+item.OrderId})
}
}, },
}; };
</script> </script>
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }"> <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<!-- <view style="display: flex;flex-direction: column;align-items: center;"> --> <!-- <view style="display: flex;flex-direction: column;align-items: center;"> -->
<view> <view>
<u-swipe-action :show="item.show" :disabled="item.disabled" :index="index" v-for="(item, index) in g" :key="item.id" @click="click" @open="open" <u-swipe-action :show="item.show" :disabled="item.disabled" :index="index" v-for="(item, index) in g" @content-click="goUrl" :key="item.id" @click="click" @open="open"
:options="options"> :options="options">
<view class="share_Item u-border-bottom"> <view class="share_Item u-border-bottom">
<!-- <u-avatar :src="item.Photo" size="64"></u-avatar> --> <!-- <u-avatar :src="item.Photo" size="64"></u-avatar> -->
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 --> <!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
<view class="title-wrap" style="width:100%;" @click="goUrl(item.UserId)"> <view class="title-wrap" style="width:100%;">
<view class="box_top"> <view class="box_top">
<u-avatar :src="item.Photo" size="64"></u-avatar> <u-avatar :src="item.Photo" size="64"></u-avatar>
<view class="box_r"> <view class="box_r">
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
pageSize: 10, pageSize: 10,
GradeId: 1 GradeId: 1
}, },
titleDirect:1, titleDirect:0,
msg2: { msg2: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
GradeName: '普通会员' GradeName: '普通会员'
}, ] //设置默认值 }, ] //设置默认值
this.getUserMyTeamTitelListForFX() this.getUserMyTeamTitelListForFX()
// this.init2()
} else { } else {
this.init() this.init()
} }
...@@ -165,7 +165,6 @@ ...@@ -165,7 +165,6 @@
}, },
methods: { methods: {
open() { open() {
}, },
getDirest() { getDirest() {
if (this.isCheckIn) { if (this.isCheckIn) {
...@@ -175,7 +174,7 @@ ...@@ -175,7 +174,7 @@
} }
this.titleDirect=this.msg2.IsDirect this.titleDirect=this.msg2.IsDirect
this.getUserMyTeamTitelListForFX(); this.getUserMyTeamTitelListForFX();
this.init2(1);
}, },
getUserMyTeamTitelListForFX() { getUserMyTeamTitelListForFX() {
uni.showLoading({ uni.showLoading({
...@@ -192,7 +191,8 @@ ...@@ -192,7 +191,8 @@
uni.hideLoading(); uni.hideLoading();
this.list = res.data; this.list = res.data;
this.msg2.FXGradeId = this.list[0].Id; this.msg2.FXGradeId = this.list[0].Id;
this.init2() this.current=0;
this.init2(1);
} }
); );
}, },
...@@ -214,6 +214,7 @@ ...@@ -214,6 +214,7 @@
} }
this.init2(1); this.init2(1);
}, },
//获取数据
init2(num) { init2(num) {
if (num == 1) { if (num == 1) {
this.g = []; this.g = [];
...@@ -298,7 +299,8 @@ ...@@ -298,7 +299,8 @@
} }
}, },
//跳转详情 //跳转详情
goUrl(UserId) { goUrl(index) {
let UserId = this.g[index].UserId
uni.navigateTo({ uni.navigateTo({
url: '/pages/share-team/share-detail?UserId=' + UserId url: '/pages/share-team/share-detail?UserId=' + UserId
}); });
...@@ -315,18 +317,25 @@ ...@@ -315,18 +317,25 @@
(res) => { (res) => {
this.request2({ this.request2({
url: '/api/AppletUser/GerUserMyTeamTitelListForFX', url: '/api/AppletUser/GerUserMyTeamTitelListForFX',
data: {} data: {
IsDirect:this.titleDirect
}
}, },
(res) => { (res) => {
this.list = res.data; this.list = res.data;
} }
); );
this.init2(1) this.getNewTitle();
// this.init2(1)
} }
); );
this.g[index].show = false; this.g[index].show = false;
}, },
getNewTitle(){
this.msg2.FXGradeId = this.list[this.current].Id;
this.init2(1);
},
open(index) { open(index) {
// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制, // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
// 原本为'false',再次设置为'false'会无效 // 原本为'false',再次设置为'false'会无效
......
...@@ -227,24 +227,25 @@ ...@@ -227,24 +227,25 @@
this.isshowagreement = false this.isshowagreement = false
}, },
getapply(){ getapply(){
this.prohibit = true;
let that = this let that = this
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: that.cash.template_message_list, tmplIds: that.cash.template_message_list,
complete (res) { complete (res) {
console.log(that.msg.AppliedMoney)
if(that.msg.AppliedMoney<0){ if(that.msg.AppliedMoney<0){
uni.showToast({ uni.showToast({
title: "请输入提现金额", title: "请输入提现金额",
icon: "none" icon: "none"
}); });
that.prohibit =false
return false return false
} }
if(that.txmode==''){ if(that.txmode==''){
uni.showToast({ uni.showToast({
title: "请选择提现方式", title: "请选择提现方式",
icon: "none" icon: "none"
}); });
that.prohibit =false
return false return false
} }
if(that.msg.WithdrawalWay==2|| that.msg.WithdrawalWay==3 || that.msg.WithdrawalWay==4){ if(that.msg.WithdrawalWay==2|| that.msg.WithdrawalWay==3 || that.msg.WithdrawalWay==4){
...@@ -252,21 +253,24 @@ ...@@ -252,21 +253,24 @@
uni.showToast({ uni.showToast({
title: "账户名称不能为空", title: "账户名称不能为空",
icon: "none" icon: "none"
}); });
that.prohibit =false
return false return false
} }
if(that.msg.AccountNumber==''){ if(that.msg.AccountNumber==''){
uni.showToast({ uni.showToast({
title: "账户号不能为空", title: "账户号不能为空",
icon: "none" icon: "none"
}); });
that.prohibit =false
return false return false
} }
if(that.msg.BankName=='' && that.msg.WithdrawalWay==4){ if(that.msg.BankName=='' && that.msg.WithdrawalWay==4){
uni.showToast({ uni.showToast({
title: "银行名称不能为空", title: "银行名称不能为空",
icon: "none" icon: "none"
}); });
that.prohibit =false
return false return false
} }
} }
...@@ -276,7 +280,8 @@ ...@@ -276,7 +280,8 @@
uni.showToast({ uni.showToast({
title: "提现金额大于等于"+that.cash.MinimumWithdrawalLimit, title: "提现金额大于等于"+that.cash.MinimumWithdrawalLimit,
icon: "none" icon: "none"
}); });
that.prohibit =false
return false return false
} }
} }
...@@ -284,7 +289,8 @@ ...@@ -284,7 +289,8 @@
uni.showToast({ uni.showToast({
title: '余额不足', title: '余额不足',
icon: "none" icon: "none"
}); });
that.prohibit =false
return false return false
} }
...@@ -294,7 +300,7 @@ ...@@ -294,7 +300,7 @@
title:'加载中', title:'加载中',
icon:'none' icon:'none'
}) })
that.prohibit = true;//禁止接口没回来时候的再次操作
that.request2( that.request2(
{ {
url: '/api/AppletUser/SetUserDistrbutorWithdrawDeposit', url: '/api/AppletUser/SetUserDistrbutorWithdrawDeposit',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment