Commit 6913b5d1 authored by zhengke's avatar zhengke

修改

parent 0bdd3548
...@@ -75,12 +75,6 @@ ...@@ -75,12 +75,6 @@
font-size: 14px; font-size: 14px;
} }
.orderDetail .order_BtnList {
display: flex;
justify-content: space-between;
align-items: center;
}
.order_Apply, .order_Apply,
.order_Sure { .order_Sure {
width: 50%; width: 50%;
...@@ -102,8 +96,34 @@ ...@@ -102,8 +96,34 @@
height: 40px; height: 40px;
background-color: #e2e2e2; background-color: #e2e2e2;
} }
.orderDetail .order_nonBtm{
border-bottom: 0!important; .orderDetail .order_nonBtm {
border-bottom: 0 !important;
}
.orderDetail .btn-box {
display: flex;
flex-direction: row-reverse;
height: 60px;
padding: 10px 20px;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 2;
border-top: 1px solid #f5f5f5;
background: #fff;
display: flex;
align-items: center;
}
.order_Btn_Com {
padding: 5px 10px;
border: 1px solid #888888;
border-radius: 14px;
color: #888888;
font-size: 12px;
float: right;
margin-right: 15px;
} }
</style> </style>
<template> <template>
...@@ -143,10 +163,10 @@ ...@@ -143,10 +163,10 @@
{{dataList.DetailList[0].RideNum}}座, {{dataList.DetailList[0].RideNum}}座,
</view> </view>
<view class="order_small" style="margin-top:5px;"> <view class="order_small" style="margin-top:5px;">
车牌号:{{dataList.DetailList[0].CarNumber}}, 车牌号:{{dataList.DetailList[0].CarNumber}},
{{dataList.DetailList[0].IsSpell==1?'拼座':'不拼座'}}, {{dataList.DetailList[0].IsSpell==1?'拼座':'不拼座'}},
</view> </view>
</view> </view>
<view style="text-align: right;"> <view style="text-align: right;">
...@@ -176,7 +196,7 @@ ...@@ -176,7 +196,7 @@
<text class="order_big" style="margin-left:20px;">{{dataList.PaymentWayName}}</text> <text class="order_big" style="margin-left:20px;">{{dataList.PaymentWayName}}</text>
</view> </view>
</view> </view>
<view class="orderItem" style="margin-bottom:0;"> <view class="orderItem" style="padding-bottom:60px;">
<view class="order_dList order_Tprice"> <view class="order_dList order_Tprice">
<text class="order_small order_comLeft">商品总额</text> <text class="order_small order_comLeft">商品总额</text>
<text class="order_big">¥ {{dataList.Income}}</text> <text class="order_big">¥ {{dataList.Income}}</text>
...@@ -189,27 +209,67 @@ ...@@ -189,27 +209,67 @@
<text class="order_big">实付款:</text> <text class="order_big">实付款:</text>
<text class="order_redPrice">¥ {{dataList.Income}}</text> <text class="order_redPrice">¥ {{dataList.Income}}</text>
</view> </view>
<view class="order_BtnList"> <view class="btn-box" v-if="dataList.OrderStatus != 5">
<view class="order_Apply" @click="openAfterHandler" v-if="dataList.OrderStatus == '3'&& dataList.PresentFXGrade!=1"> <view class="item" v-if="dataList.OrderStatus == 1">
<image class="order_ImgS" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/o_apply.png"></image>申请售后 <view class="order_Btn_Com" v-on:click.stop="payment(dataList)" style="color:#FF4048;border-color:#FF4048;">立即支付</view>
</view> </view>
<view class="order_Line" v-if="dataList.OrderStatus == '3'"></view> <view class="item" v-if="dataList.OrderStatus == 1||dataList.OrderStatus==2||dataList.OrderStatus==3">
<view class="order_Sure" @click="shouhuoHandler" v-if="dataList.OrderStatus == '3'"> <view class="order_Btn_Com" @click="cancel">取消订单</view>
<image class="order_ImgS" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/o_shouhuo.png"></image>确认收货 </view>
<view class="item" style="line-height: 34px;" v-if="dataList.OrderStatus == 6">
待处理
</view>
<view class="item" style="
line-height: 34px;
font-size: 16px;
color: gray;
font-weight: 600;
"
v-if="dataList.OrderStatus == 7">
已取消
</view> </view>
</view> </view>
</view> </view>
<after-sale :list="dataList.DetailList" v-if="showAfter" @close="closeAfterHandler"></after-sale> <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" <u-popup v-model="showModal" mode="center" length="80%">
:border-radius="20"></u-modal> <view style='display: flex;flex-direction: column;align-items: center;background: #fff;'>
<view style="display: flex;align-items: center;justify-content: center;height:70px ;">
<Text>是否取消订单?</Text>
</view>
<view style="display: flex;flex-direction: column;height:80px ;margin-left: 15px;width: 100%;" v-if='dataList.OrderStatus==2'>
<Text style='margin-left: 10px;margin-top: 5px;'>备注</Text>
<input class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;' v-model="Cancelmsg.Remark" placeholder="输入备注" />
</view>
<view style="display: flex;flex-direction: row;align-items: center;height: 50px;border-top: 1px solid #F5F5F5;width: 100%;">
<view style="width: 50%;display: flex;align-items: center;justify-content: center" @click="showModal=false">
<Text>取消</Text>
</view>
<view style="width: 50%;color: #a0cfff;display: flex;align-items: center;justify-content: center" @click="confirm">
<Text>确定</Text>
</view>
</view>
</view>
</u-popup>
<payCom v-if="payBtn" :payInfo="payInfo" @closePay="closePay"></payCom>
<u-popup v-model="payExit" mode="center" :mask-close-able="false">
<view style="background:#fff;width:500rpx">
<view style="padding:10px 0 0 10px">提交失败</view>
<view style="text-align:center;padding-bottom:40rpx">
<view style="margin:80rpx 0">支付取消</view>
<span @click="exitPay" style="padding:10rpx 50rpx;color:#fff;background:#19be6b;border-radius: 12px;">确定</span>
</view>
</view>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
import payCom from '@/components/pay/pay';
import afterSale from "@/components/userorder/after-sale"; import afterSale from "@/components/userorder/after-sale";
export default { export default {
components: { components: {
afterSale afterSale,
payCom
}, },
data() { data() {
return { return {
...@@ -221,7 +281,25 @@ ...@@ -221,7 +281,25 @@
}, },
dataList: {}, dataList: {},
showAfter: false, showAfter: false,
showReviceModal: false, themCustomStyle: {
marginLeft: "20px",
padding: "0 2rpx",
color: "#FFF",
},
showModal: false,
Cancelmsg: {
OrderId: 0,
Type: 1,
Remark: '',
},
payInfo: {
OpenId: 'ow_7I5XC1-RGwwk8QANBmWKYKmOc',
OrderId: '',
OrderPayType: 1,
GoodsName: ''
},
payBtn:false,
payExit:false
} }
}, },
created() { created() {
...@@ -244,6 +322,7 @@ ...@@ -244,6 +322,7 @@
onLoad(option) { onLoad(option) {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
this.msg.OrderId = option.OrderId; this.msg.OrderId = option.OrderId;
this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId;
this.getData(); this.getData();
}, },
methods: { methods: {
...@@ -318,33 +397,63 @@ ...@@ -318,33 +397,63 @@
} }
return Str; return Str;
}, },
//申请售后
openAfterHandler() {
this.showAfter = true;
},
closeAfterHandler() { closeAfterHandler() {
this.showAfter = false; this.showAfter = false;
}, },
//确认收货 //取消订单
shouhuoHandler() { cancel() {
this.showReviceModal = true; this.showModal = true;
this.Cancelmsg.OrderId = this.dataList.OrderId;
this.Cancelmsg.Type = this.dataList.OrderStatus;
this.Cancelmsg.Remark = ''
}, },
submitReviceGoodHandler() { confirm() {
let that = this let that = this
that.request2({ if (that.Cancelmsg.Type == 2 && that.Cancelmsg.Remark == '') {
url: '/api/AppletOrder/SetAppletOrderGoodsReceiving', uni.showToast({
data: { title: '备注不能为空',
OrderId: that.dataList.OrderId icon: 'none'
} })
}, return
(res) => { }
uni.showToast({ let pages = getCurrentPages(); // 当前页面
title: res.message uni.requestSubscribeMessage({ //订阅消息 退款和审核通知
}) tmplIds: that.dataList.template_message_list,
that.getData() complete(res) {
that.request2({
url: '/api/AppletOrder/CancelAppletGoodsOrderInfo',
data: that.Cancelmsg
},
(res) => {
that.showModal = false;
uni.showToast({
title: res.message,
icon: 'none'
})
uni.redirectTo({
url: "/pages/guidecar/orderList?status=1",
});
}
);
} }
); })
} },
//支付
payment(e){
this.payInfo.OrderId = e.OrderId;
this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0,10);
this.payInfo.PaymentWay = e.PaymentWay;
this.payInfo.total_price = e.Income;
this.payBtn=true
},
closePay() {
this.payBtn = false;
this.payExit = true;
},
exitPay() {
this.payExit = false;
},
} }
} }
</script> </script>
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,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" @click.stop="buy(item)" style="color:#FF4048;border-color:#FF4048;">再次购买</view> <view class="order_Btn_Com" @click.stop="payment(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.stop="cancel(item,index)" v-if="item.OrderStatus==1||item.OrderStatus==2||item.OrderStatus==3">取消订单</view> <view class="order_Btn_Com" @click.stop="cancel(item,index)" v-if="item.OrderStatus==1||item.OrderStatus==2||item.OrderStatus==3">取消订单</view>
</view> </view>
...@@ -169,12 +169,28 @@ ...@@ -169,12 +169,28 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<payCom v-if="payBtn" :payInfo="payInfo" @closePay="closePay"></payCom>
<u-popup v-model="payExit" mode="center" :mask-close-able="false">
<view style="background:#fff;width:500rpx">
<view style="padding:10px 0 0 10px">提交失败</view>
<view style="text-align:center;padding-bottom:40rpx">
<view style="margin:80rpx 0">支付取消</view>
<span @click="exitPay" style="padding:10rpx 50rpx;color:#fff;background:#19be6b;border-radius: 12px;">确定</span>
</view>
</view>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
import payCom from '@/components/pay/pay';
import auth from "@/components/auth/index"; import auth from "@/components/auth/index";
import tabbar from "@/components/tabbar/index"; import tabbar from "@/components/tabbar/index";
export default { export default {
components: {
auth,
payCom
},
data() { data() {
return { return {
pageTitle: "司导订单", pageTitle: "司导订单",
...@@ -210,10 +226,15 @@ ...@@ -210,10 +226,15 @@
Type: 1, Type: 1,
Remark: '', Remark: '',
}, },
payInfo: {
OpenId: '',
OrderId: '',
OrderPayType: 1,
GoodsName: ''
},
payBtn:false,
payExit:false,
}; };
},
components: {
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
...@@ -238,6 +259,7 @@ ...@@ -238,6 +259,7 @@
onLoad(option) { onLoad(option) {
this.current = option.status || -1; this.current = option.status || -1;
this.getHeadList(); this.getHeadList();
this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId;
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
}, },
methods: { methods: {
...@@ -292,7 +314,6 @@ ...@@ -292,7 +314,6 @@
(res) => { (res) => {
uni.hideLoading(); uni.hideLoading();
if (res.resultCode == 1) { if (res.resultCode == 1) {
console.log(res, '数据');
this.dataList = this.dataList.concat(res.data.pageData); this.dataList = this.dataList.concat(res.data.pageData);
this.pageCount = res.data.pageCount; this.pageCount = res.data.pageCount;
} }
...@@ -395,6 +416,20 @@ ...@@ -395,6 +416,20 @@
'&IsFormShoppingCart=2&ShoppingCartIdList=' + JSON.stringify(ShoppingCartIdList) '&IsFormShoppingCart=2&ShoppingCartIdList=' + JSON.stringify(ShoppingCartIdList)
}); });
}, },
payment(e){
this.payInfo.OrderId = e.OrderId;
this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0,10);
this.payInfo.PaymentWay = e.PaymentWay;
this.payInfo.total_price = e.Income;
this.payBtn=true
},
exitPay() {
this.payExit = false;
},
closePay() {
this.payBtn = false;
this.payExit = true;
},
//跳转到详情 //跳转到详情
goDetail(item){ goDetail(item){
uni.navigateTo({ url: '/pages/guidecar/orderDetail?OrderId='+item.OrderId}) uni.navigateTo({ url: '/pages/guidecar/orderDetail?OrderId='+item.OrderId})
......
...@@ -734,7 +734,7 @@ ...@@ -734,7 +734,7 @@
exitPay() { exitPay() {
this.payExit = false; this.payExit = false;
uni.redirectTo({ uni.redirectTo({
url: "/pages/guidecar/index", url: "/pages/guidecar/orderList?status=1",
}); });
}, },
}, },
......
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