Commit 7bc9b0d2 by 谢中龙

Merge branch 'mall_dev_7.10.0-demolition-order' of…

Merge branch 'mall_dev_7.10.0-demolition-order' of ssh://gitlab.bigaka.net:2287/gaoshq/7-Eleven into mall_dev_7.10.0-demolition-order
parents 051a4667 908bb07f
...@@ -113,7 +113,7 @@ page{ ...@@ -113,7 +113,7 @@ page{
.expressRecord-single-close { .expressRecord-single-close {
width: 100%; width: 100%;
height: 122rpx; /* height: 122rpx; */
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
...@@ -5,8 +5,8 @@ const utils = require('../../utils/util') ...@@ -5,8 +5,8 @@ const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo const envInfo = require('../../config/index').envInfo
const ORDER_STATUS_TEXT = { const ORDER_STATUS_TEXT = {
N: "待付款", N: "待付款",
P: "已支付待发货", P: "待发货",
D: "已发货", D: "待收货",
R: "已完成", R: "已完成",
C: "已关闭", C: "已关闭",
PR : "退货中", PR : "退货中",
...@@ -149,7 +149,7 @@ wxService.page({ ...@@ -149,7 +149,7 @@ wxService.page({
}, },
//包裹的确认收货 //包裹的确认收货
packageConfirmReceive(findId, parcelId){ packageConfirmReceive(findId, parcelId){
wxService.post(`/sale/trade/buyer/parcelConfirm?findId=${id}&parcelId=${parcelId}`).then(res => { wxService.post(`/sale/trade/buyer/parcelConfirm?findId=${findId}&parcelId=${parcelId}`).then(res => {
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
...@@ -269,12 +269,14 @@ wxService.page({ ...@@ -269,12 +269,14 @@ wxService.page({
// 删除订单 // 删除订单
handelDelOrder(e) { handelDelOrder(e) {
let _this = this; let _this = this;
//先判断整个订单的所有包裹是否都已经
wx.showModal({ wx.showModal({
title: '订单删除提示', title: '订单删除提示',
content: '确认删除此订单?', content: '删除订单将删除订单中所有的包裹,请谨慎操作?',
showCancel: true, showCancel: true,
cancelText: '取消', cancelText: '取消',
confirmText: '删除', confirmText: '全部删除',
confirmColor: '#cb3c3c', confirmColor: '#cb3c3c',
success: function (modalRes) { success: function (modalRes) {
if (modalRes.confirm) { if (modalRes.confirm) {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
wx:for="{{orderList}}" wx:for="{{orderList}}"
wx:for-item="item" wx:for-item="item"
wx:for-index="idx" wx:for-index="idx"
wx:if="{{item.parcelList.length > 0}}"
wx:key="*this"> wx:key="*this">
<view class="order-new-no" bindtap="handelDetail" data-id="{{item.id}}"> <view class="order-new-no" bindtap="handelDetail" data-id="{{item.id}}">
<view class="order-new-no-lf"> <view class="order-new-no-lf">
...@@ -92,7 +93,7 @@ ...@@ -92,7 +93,7 @@
bindtap="handelConfirmReceipt">确认收货</view> bindtap="handelConfirmReceipt">确认收货</view>
<view class="btns normal-btn" <view class="btns normal-btn"
wx:if="{{packageInfo.orderCanRefund}}" wx:if="{{packageInfo.orderCanRefund && packageInfo.status != 'RE'}}"
data-id="{{item.id}}" data-id="{{item.id}}"
data-package="{{packageInfo}}" data-package="{{packageInfo}}"
bindtap="handelRequestRefund">申请退款</view> bindtap="handelRequestRefund">申请退款</view>
......
...@@ -176,8 +176,6 @@ wxService.page({ ...@@ -176,8 +176,6 @@ wxService.page({
}); });
} }
console.log(data)
this.data.totalGoodsPrice = parseFloat(sum).toFixed(2); this.data.totalGoodsPrice = parseFloat(sum).toFixed(2);
this.setData({ this.setData({
detail: data, detail: data,
...@@ -425,7 +423,40 @@ wxService.page({ ...@@ -425,7 +423,40 @@ wxService.page({
mask: true mask: true
}); });
wxService.post(`/sale/trade/buyer/parcelConfirm?findId=${id}&parcelId=${parcelId}`).then(res => { //兼容老数据
if(parcelId){
this.packageConfirmReceive(id,parcelId);
}
else{
this.oldVersionConfirmReceive(id);
}
},
//包裹的确认收货
packageConfirmReceive(findId, parcelId){
wxService.post(`/sale/trade/buyer/parcelConfirm?findId=${findId}&parcelId=${parcelId}`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
wx.showToast({
title: `您已确认收货!`,
icon: 'none'
})
setTimeout(() => {
this.getOrderDetail(this.data.id);
}, 200)
} else {
wx.showToast({
title: `确认收货失败!`,
icon: 'none'
})
}
}
})
},
//兼容以前老数据进行确认收货
oldVersionConfirmReceive(id){
wxService.post(`/sale/trade/buyer/confirm/${id}`).then(res => {
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
...@@ -436,7 +467,7 @@ wxService.page({ ...@@ -436,7 +467,7 @@ wxService.page({
}) })
setTimeout(() => { setTimeout(() => {
this.getOrderDetail(this.data.id); this.getOrderDetail(this.data.id);
}, 100); }, 200)
} else { } else {
wx.showToast({ wx.showToast({
title: `确认收货失败!`, title: `确认收货失败!`,
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
data-id="{{detail.id}}" bindtap="handelToPay">立即支付</view> data-id="{{detail.id}}" bindtap="handelToPay">立即支付</view>
<view class="btns normal-btn" <view class="btns normal-btn"
wx:if="{{item.orderCanRefund}}" wx:if="{{item.orderCanRefund && item.status != 'RE'}}"
data-id="{{detail.id}}" data-id="{{detail.id}}"
data-package="{{item}}" data-package="{{item}}"
bindtap="handelRequestRefund">申请退款</view> bindtap="handelRequestRefund">申请退款</view>
......
...@@ -19,9 +19,11 @@ ...@@ -19,9 +19,11 @@
wx:if="{{!utils.isVideo(item)}}" wx:if="{{!utils.isVideo(item)}}"
lazy-load/> lazy-load/>
<!-- object-fit="fill" -->
<video id="myVideo{{index}}" <video id="myVideo{{index}}"
class="swiper-image video-cover" class="swiper-image video-cover"
src="{{item}}" src="{{item}}"
object-fit="cover"
play-btn-position="center" play-btn-position="center"
enable-play-gesture="{{true}}" enable-play-gesture="{{true}}"
data-index="{{index}}" data-index="{{index}}"
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
"id": 16, "id": 16,
"name": "商品详情页", "name": "商品详情页",
"pathName": "pages/productDetail/productDetail", "pathName": "pages/productDetail/productDetail",
"query": "id=694920880513486848", "query": "id=697828280501407744",
"scene": null "scene": null
}, },
{ {
...@@ -530,7 +530,7 @@ ...@@ -530,7 +530,7 @@
"id": 72, "id": 72,
"name": "自提订单详情", "name": "自提订单详情",
"pathName": "subPackage/page/pages/selfPickUpOrderInfo/selfPickUpOrderInfo", "pathName": "subPackage/page/pages/selfPickUpOrderInfo/selfPickUpOrderInfo",
"query": "id=686957183723900928", "query": "id=697869431057027072",
"scene": null "scene": null
}, },
{ {
......
...@@ -32,8 +32,14 @@ wxService.page({ ...@@ -32,8 +32,14 @@ wxService.page({
},() => { },() => {
this.generateBarCode(); this.generateBarCode();
}); });
},
//onShow
onShow(){
this.getOrderInfo(); this.getOrderInfo();
}, },
//获取订单详情 //获取订单详情
getOrderInfo(){ getOrderInfo(){
wx.showLoading({ wx.showLoading({
...@@ -66,6 +72,27 @@ wxService.page({ ...@@ -66,6 +72,27 @@ wxService.page({
data.longitude = store.longitude; data.longitude = store.longitude;
} }
//能不能申请退单通过支付时间制定后多少天可以申请退款
if(data.status == 'C' || data.status == 'N' || data.status == 'RE'){
data.orderCanRefund = false;
}
else{
let diffObj = utils.getDateDiff(data.payTime);
if (diffObj.days <= this.data.canRefundDaysAfterDelivery){
let filter = skuVOList.filter(c => c.canRefundNum > 0);
if (filter.length > 0){
data.orderCanRefund = true;
}
else{
data.orderCanRefund = false;
}
}
else{
data.orderCanRefund = false;
}
}
//处理能不能退款 //处理能不能退款
let canApplyRefund = true; let canApplyRefund = true;
let filter = skuVOList.filter(c => c.canRefundNum > 0); let filter = skuVOList.filter(c => c.canRefundNum > 0);
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
wx:if="{{orderInfo.status == 'P'}}" wx:if="{{orderInfo.status == 'P'}}"
bindtap="handelConfirmReceipt" >确认收货</view> bindtap="handelConfirmReceipt" >确认收货</view>
<view class="bto-btn" <view class="bto-btn"
wx:if="{{orderInfo.status == 'P' && canApplyRefund}}" wx:if="{{orderInfo.orderCanRefund}}"
bindtap="handelRequestRefund">申请退款</view> bindtap="handelRequestRefund">申请退款</view>
<view class="bto-btn primary-red" <view class="bto-btn primary-red"
wx:if="{{orderInfo.status == 'N'}}" bindtap="onTapPayNow">立即支付</view> wx:if="{{orderInfo.status == 'N'}}" bindtap="onTapPayNow">立即支付</view>
......
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