fix button status
This commit is contained in:
4
app.js
4
app.js
@ -146,8 +146,8 @@ App({
|
||||
bgImg: 'https://sanpinhuicai.com/wisdommining/static/icon/bg/',//背景图片地址
|
||||
|
||||
// ip: 'http://106.54.198.47/', //接口地址
|
||||
ip: 'https://sanpinhuicai.com/', //接口地址
|
||||
// ip: 'http://192.168.0.112:9000/', //接口地址/
|
||||
// ip: 'https://sanpinhuicai.com/', //接口地址
|
||||
ip: 'http://192.168.0.112:9000/', //接口地址/
|
||||
// ip: 'http://127.0.0.1:9000/', //接口地址/
|
||||
|
||||
//appId wx65c9560afc9cbaa7
|
||||
|
@ -12,7 +12,7 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 包裹内容, 物流公司 -->
|
||||
<view style="height: 400rpx; width: 100%;background-color: #fff;border-radius: 24rpx;overflow: hidden;">
|
||||
<view style="width: 100%;background-color: #fff;border-radius: 24rpx;overflow: hidden;">
|
||||
<view style="background-color: #fef8ec;color: #f85900;font-size: 24rpx;padding: 12rpx 12rpx;">快递走件,催派等物流信息,请联系物流公司,如需平台接入请联系客服</view>
|
||||
<view style="margin: 36rpx 0 0 24rpx;display: flex;align-items: center;">
|
||||
<picker range="{{expressComName}}" value="{{currentExpressComIndex}}" bindchange="pickExpressCom">
|
||||
@ -26,8 +26,8 @@
|
||||
<text>运单号: {{logistics[activePackage].logisticsNumber}}</text>
|
||||
<button data-logistics-number="{{logistics[activePackage].logisticsNumber}}" style="border-radius: 999rpx;margin: 0 0 0 12rpx;" plain size="mini" bind:tap="copyLogisticsNumber">复制</button>
|
||||
</view>
|
||||
<view style="margin: 24rpx 48rpx 0">
|
||||
<view style="justify-content: space-between;align-items: center;display: flex;height: 48rpx;" wx:for="{{logistics[activePackage].goods}}" wx:key="id">
|
||||
<view style="margin: 0rpx 48rpx 24rpx">
|
||||
<view style="margin-top:24rpx;justify-content: space-between;align-items: center;display: flex;" wx:for="{{logistics[activePackage].goods}}" wx:key="id">
|
||||
<view class="goods-name" style="flex:7;">{{item.name}}</view>
|
||||
<view class="goods-name" style="flex:3;text-align: center;">{{item.spec}}</view>
|
||||
<view style="flex:1;text-align: right;">{{item.num}}</view>
|
||||
|
@ -48,9 +48,9 @@ page {
|
||||
padding-left: 48rpx;
|
||||
}
|
||||
.goods-name {
|
||||
overflow: hidden;
|
||||
/* overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
white-space: nowrap; */
|
||||
}
|
||||
|
||||
.record-item:not(:last-child) {
|
||||
|
@ -26,6 +26,48 @@ Page({
|
||||
url: '/pages/my/after_sales_next/after_sales_next?id=' + this.data.id + '&&num=' + this.data.num,
|
||||
})
|
||||
},
|
||||
// 撤销退换货申请
|
||||
cancel() {
|
||||
wx.showModal({
|
||||
title: '确定要撤销申请吗?',
|
||||
// content: '',
|
||||
complete: (res) => {
|
||||
if (res.cancel) {
|
||||
|
||||
}
|
||||
|
||||
if (res.confirm) {
|
||||
wx.request({
|
||||
url: app.globalData.ip + '/wisdommining/api/order/cancelRefund',
|
||||
method: 'GET',
|
||||
header: {
|
||||
"content-type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
data: {
|
||||
orderId: this.data.id
|
||||
},
|
||||
success(res) {
|
||||
if (res.data.code == 1) {
|
||||
wx.showToast({
|
||||
title: res.data.message,
|
||||
})
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/my_order/my_order?state=' + 3,
|
||||
})
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '提示!',
|
||||
content: res.data.message,
|
||||
showCancel: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
@ -81,6 +81,8 @@
|
||||
<!-- 申请中 -->
|
||||
<view class="btn-1" wx:if='{{goods.afterSalesStatus==61||goods.afterSalesStatus==62}}'>下一步</view>
|
||||
|
||||
<view class="btn btn-cancel" wx:if='{{goods.afterSalesStatus==61||goods.afterSalesStatus==62}}' catchtap="cancel">撤销申请</view>
|
||||
|
||||
<view class="height100"></view>
|
||||
<view class="height100"></view>
|
||||
|
||||
|
@ -64,9 +64,7 @@ page{
|
||||
width: 690rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background-image: linear-gradient(90deg,
|
||||
#fdac04 0%,
|
||||
#ee7c1d 100%);
|
||||
background-image: linear-gradient(90deg, #fdac04 0%, #ee7c1d 100%);
|
||||
border-radius: 40rpx;
|
||||
position: fixed;
|
||||
left: 30rpx;
|
||||
@ -75,6 +73,10 @@ page{
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-cancel {
|
||||
bottom: 160rpx;
|
||||
}
|
||||
.btn-1 {
|
||||
width: 690rpx;
|
||||
height: 80rpx;
|
||||
@ -88,6 +90,19 @@ page{
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
.btn-2 {
|
||||
width: 690rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background-color: #999;
|
||||
border-radius: 40rpx;
|
||||
position: fixed;
|
||||
left: 30rpx;
|
||||
bottom: 160rpx;
|
||||
font-size: 32rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
.dengdai {
|
||||
margin-top: 200rpx;
|
||||
font-size: 32rpx;
|
||||
@ -109,9 +124,6 @@ page{
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.goods {
|
||||
width: 690rpx;
|
||||
padding: 0 30rpx;
|
||||
@ -176,7 +188,6 @@ page{
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
margin: 0 0 30rpx 0;
|
||||
|
||||
}
|
||||
|
||||
.title text {
|
||||
@ -184,7 +195,6 @@ page{
|
||||
color: #bababa;
|
||||
}
|
||||
|
||||
|
||||
.photo {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
@ -211,7 +221,6 @@ page{
|
||||
margin-right: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
float: left;
|
||||
|
||||
}
|
||||
|
||||
.photo_cont image {
|
||||
@ -236,9 +245,7 @@ page{
|
||||
.submit {
|
||||
width: 690rpx;
|
||||
height: 80rpx;
|
||||
background-image: linear-gradient(-90deg,
|
||||
#ee7b1e 0%,
|
||||
#fdae03 100%);
|
||||
background-image: linear-gradient(-90deg, #ee7b1e 0%, #fdae03 100%);
|
||||
border-radius: 40rpx;
|
||||
font-size: 36rpx;
|
||||
line-height: 80rpx;
|
||||
@ -247,7 +254,6 @@ page{
|
||||
position: fixed;
|
||||
bottom: 100rpx;
|
||||
left: 30rpx;
|
||||
|
||||
}
|
||||
|
||||
.aArice {
|
||||
|
@ -210,7 +210,7 @@ Page({
|
||||
url: app.globalData.ip + '/wisdommining/api/order/afterSales',
|
||||
method: 'POST',
|
||||
header: {
|
||||
"content-type": "application/x-www-form-urlencoded",
|
||||
"content-type": "application/json",
|
||||
},
|
||||
data: {
|
||||
orderRefund: '',
|
||||
|
@ -30,14 +30,19 @@
|
||||
<view class="orderAll">
|
||||
<view class="order" wx:for="{{orderList}}" wx:key='index' data-num="{{item.orderNumber}}" catchtap="toOrderDetail">
|
||||
<view class="state" wx:if="{{item.status<6 && (item.afterSalesStatus == 66 || !item.afterSalesStatus) && type != 6}}">
|
||||
{{item.status==5?'已取消':item.status==1?'待支付':item.status==2?'待发货':item.status==3?'待收货':item.status==4?'已完成':''}}
|
||||
{{item.status==5?'已取消'
|
||||
:item.status==1?'待支付'
|
||||
:item.status==2?'待发货'
|
||||
:item.status==3?'待收货'
|
||||
:item.status==4?'已完成'
|
||||
:''}}
|
||||
</view>
|
||||
<view class="state" wx:if="{{item.afterSalesStatus && type==6}}">
|
||||
{{
|
||||
item.afterSalesStatus==61?'换货审核中'
|
||||
:item.afterSalesStatus==62?'退货审核中'
|
||||
:item.afterSalesStatus==63&&item.orderRefundType==1?'换货申请成功'
|
||||
:item.afterSalesStatus==63&&item.orderRefundType==2?'退货申请成功'
|
||||
:item.afterSalesStatus==62?'退款审核中'
|
||||
:item.afterSalesStatus==63&&item.orderRefundType==1?'请退回商品'
|
||||
:item.afterSalesStatus==63&&item.orderRefundType==2?'请退货'
|
||||
:item.afterSalesStatus==64&&item.orderRefundType==1?'换货待商家收货'
|
||||
:item.afterSalesStatus==64&&item.orderRefundType==2?'退货待商家收货'
|
||||
:item.afterSalesStatus==65&&item.orderRefundType==1?'换货完成'
|
||||
@ -45,6 +50,7 @@
|
||||
:item.afterSalesStatus==65&&item.orderRefundType==3?'退款完成'
|
||||
:item.afterSalesStatus==66&&item.orderRefundType==1?'换货失败'
|
||||
:item.afterSalesStatus==66&&item.orderRefundType==2?'退货失败'
|
||||
:item.afterSalesStatus==66&&item.orderRefundType==3?'退款失败'
|
||||
:''
|
||||
}}
|
||||
</view>
|
||||
@ -74,31 +80,33 @@
|
||||
<view wx:if="{{item.timeStr}}" style="font-size: 28rpx">
|
||||
您需要在<text style="color:#ee7b1e;">{{item.timeStr}}</text>内处理
|
||||
</view>
|
||||
<view class="btn display_J_E">
|
||||
<view class="btn1" wx:if="{{item.status==3}}" data-item='{{item}}' data-logistics="{{item.logistics}}" data-order-number="{{item.orderNumber}}" data-logistics-name="{{item.logisticsName}}" catchtap="viewLogisticsDetails">物流查询</view>
|
||||
<view class="btn1 btn2" wx:if="{{item.status==3}}" data-id='{{item.id}}' catchtap="confirm">确认收货</view>
|
||||
<view class="btn display_J_E" style="flex-wrap: wrap;row-gap: 24rpx;">
|
||||
<view class="btn1" wx:if="{{item.status==3&&item.afterSalesStatus!=64}}" data-item='{{item}}' data-logistics="{{item.logistics}}" data-order-number="{{item.orderNumber}}" data-logistics-name="{{item.logisticsName}}" catchtap="viewLogisticsDetails">物流查询</view>
|
||||
<view class="btn1 btn2" wx:if="{{item.status==3&&type==3&&item.afterSalesStatus!=64}}" data-id='{{item.id}}' catchtap="confirm">确认收货</view>
|
||||
<view class="btn1" wx:if="{{item.status==1}}">立即支付</view>
|
||||
<view class="btn1" wx:if="{{item.status==4||item.status==5}}" catchtap="del" data-id='{{item.id}}' data-index="{{index}}">删除订单</view>
|
||||
|
||||
<!-- 退货流程 -->
|
||||
<!-- 待发货 申请 -->
|
||||
|
||||
<view class="btn1 btn2" wx:if="{{item.status==2}}" data-id='{{item.id}}' catchtap="apply1">
|
||||
<!-- 申请退款按钮只在代发货或者退款申请被驳回时显示 -->
|
||||
<view class="btn1 btn2" wx:if="{{item.status==2 && (item.afterSalesStatus<66 || !item.afterSalesStatus)}}" data-id='{{item.id}}' catchtap="apply1">
|
||||
申请退款</view>
|
||||
<!-- 待收货申请 -->
|
||||
<view class="btn1 btn2" wx:if="{{item.status==3&& (item.afterSalesStatus<60 || item.afterSalesStatus == null)}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' data-s='{{item.status}}' data-sq='1' catchtap="apply">申请退货</view>
|
||||
<view class="btn1 btn2" wx:if="{{item.status==3&& item.afterSalesStatus==null }}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' data-s='{{item.status}}' data-sq='2' catchtap="apply">申请换货</view>
|
||||
<view class="btn1 btn2" wx:if="{{item.status==3&& type==3 && (item.afterSalesStatus==66 || !item.afterSalesStatus)}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' data-s='{{item.status}}' data-sq='1' catchtap="apply">申请退货</view>
|
||||
<view class="btn1 btn2" wx:if="{{item.status==3&& type==3 && ( item.afterSalesStatus==66 || !item.afterSalesStatus) }}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' data-s='{{item.status}}' data-sq='2' catchtap="apply">申请换货</view>
|
||||
<!-- 申请中 -->
|
||||
<view class="btn1 btn2" wx:if="{{item.afterSalesStatus==61||item.afterSalesStatus==62||item.afterSalesStatus==63||item.afterSalesStatus==66}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' catchtap="after">查看进度</view>
|
||||
<!-- -->
|
||||
<view class="btn1 btn2" wx:if="{{(item.afterSalesStatus==61||item.afterSalesStatus==62||item.afterSalesStatus==63||item.afterSalesStatus==66) && item.afterSalesStatus!=64&&type==6}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' catchtap="after">查看进度</view>
|
||||
<!-- 退货待商家收货 完成 -->
|
||||
<view class="btn1 btn2" wx:if="{{(item.status==64||item.status==65)&&item.orderRefundType!=3}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' data-sq='{{item.orderRefundType==1?2:1}}' catchtap="jilu">
|
||||
退换货记录</view>
|
||||
<!-- 后台同意退换货后不显示 -->
|
||||
<view wx:if="{{item.afterSalesStatus!=63&&item.afterSalesStatus!=64}}" class="btn1 btn2" data-id='{{item.id}}' data-address-id="{{item.addressId}}" data-order-address="{{item.orderAddress}}" catchtap="updateAddress">
|
||||
修改地址</view>
|
||||
<!-- <view class="btn display_J_E" style="margin-top: 24rpx;">
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- wx:if="{{item.status==2}}" -->
|
||||
<view class="btn display_J_E" style="margin-top: 24rpx;">
|
||||
<view class="btn1 btn2" data-id='{{item.id}}' data-address-id="{{item.addressId}}" data-order-address="{{item.orderAddress}}" catchtap="updateAddress">
|
||||
修改地址</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -23,6 +23,14 @@
|
||||
findGoods: findGoods,
|
||||
}
|
||||
</wxs>
|
||||
<wxs module="num">
|
||||
function toFixed(num, precise) {
|
||||
return typeof (num) === "undefined" ? num : num.toFixed(precise)
|
||||
}
|
||||
module.exports = {
|
||||
toFixed: toFixed,
|
||||
}
|
||||
</wxs>
|
||||
<!-- 倒计时 -->
|
||||
<view wx:if='{{goods.status==1}}'>
|
||||
<view class="djs" wx:if="{{ticker!=''}}">还剩余<text>{{ticker}}</text>订单将自动取消</view>
|
||||
@ -100,7 +108,7 @@
|
||||
<view class="data">
|
||||
<view class="data-t display_J_B display_A_C">
|
||||
<view class="t-l">商品合计</view>
|
||||
<view class="t-r t-r__1">{{goods.orderPayWay!=2?'¥'+total:goods.orderOtherPay+'积分'}}</view>
|
||||
<view class="t-r t-r__1">{{goods.orderPayWay!=2?'¥'+ num.toFixed(total, 2) : goods.orderOtherPay+'积分'}}</view>
|
||||
</view>
|
||||
<view class="data-t display_J_B display_A_C">
|
||||
<view class="t-l">运费</view>
|
||||
@ -130,7 +138,7 @@
|
||||
</view>
|
||||
<view class="data-t display_J_B display_A_C">
|
||||
<view class="t-l">实际支付</view>
|
||||
<view class="t-r t-r__4">{{goods.orderPayWay!=2?'¥'+goods.orderActualPay:goods.orderOtherPay+'积分'}}</view>
|
||||
<view class="t-r t-r__4">{{goods.orderPayWay!=2?'¥'+num.toFixed(goods.orderActualPay, 2):goods.orderOtherPay+'积分'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
<view style="height:34rpx"></view>
|
||||
|
||||
<view class="address display_J_S">
|
||||
@ -36,9 +35,11 @@
|
||||
<view class="data-t display_J_B display_A_C">
|
||||
<view class="t-l">优惠</view>
|
||||
<view class="t-r t-r__3 display_A_C" wx:if='{{goods.orderPayWay!=5&&goods.orderPayWay!=4&&goods.orderPayWay!=3}}'>
|
||||
<text>无</text></view>
|
||||
<text>无</text>
|
||||
</view>
|
||||
<view class="t-r t-r__3 display_A_C" wx:if='{{goods.orderPayWay==5||goods.orderPayWay==4}}'>
|
||||
<text>{{goods.orderPayWay==4?'现金券':goods.orderPayWay==5?'折扣券':''}}</text>-¥{{goods.orderOtherPay}}</view>
|
||||
<text>{{goods.orderPayWay==4?'现金券':goods.orderPayWay==5?'折扣券':''}}</text>-¥{{goods.orderOtherPay}}
|
||||
</view>
|
||||
<view class="t-r t-r__3 display_A_C" wx:if='{{goods.orderPayWay==3}}'><text>套餐券</text>-1</view>
|
||||
</view>
|
||||
<view class="data-t display_J_B">
|
||||
|
Reference in New Issue
Block a user