多包裹换货
This commit is contained in:
@ -15,7 +15,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 申请通过或失败 -->
|
<!-- 申请通过或失败 -->
|
||||||
<view class="jl" style="margin-top:70rpx;" wx:if='{{goods.status==63||goods.status==66}}'>
|
<view class="jl" style="margin-top:70rpx;" wx:if='{{goods.afterSalesStatus==63||goods.afterSalesStatus==66}}'>
|
||||||
<view class="title">申请结果</view>
|
<view class="title">申请结果</view>
|
||||||
<view class="jieguo_cont">{{goods.orderRefundRemarke}}</view>
|
<view class="jieguo_cont">{{goods.orderRefundRemarke}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -60,26 +60,26 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- 申请驳回 -->
|
<!-- 申请驳回 -->
|
||||||
<view class="dengdai" wx:if='{{goods.status==66}}'>
|
<view class="dengdai" wx:if='{{goods.afterSalesStatus==66}}'>
|
||||||
<view class="display_J_C"><image src="/icon/sq_2.png"></image></view>
|
<view class="display_J_C"><image src="/icon/sq_2.png"></image></view>
|
||||||
<view style=" margin: 35rpx auto 0;color: #e02e2e;">您的申请被驳回~</view>
|
<view style=" margin: 35rpx auto 0;color: #e02e2e;">您的申请被驳回~</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 申请通过 -->
|
<!-- 申请通过 -->
|
||||||
<view class="dengdai" wx:if='{{goods.status==63}}'>
|
<view class="dengdai" wx:if='{{goods.afterSalesStatus==63}}'>
|
||||||
<view class="display_J_C"><image src="/icon/sq_3.png"></image></view>
|
<view class="display_J_C"><image src="/icon/sq_3.png"></image></view>
|
||||||
<view style=" margin: 35rpx auto 0;color: #3fb265;">您的申请已通过~</view>
|
<view style=" margin: 35rpx auto 0;color: #3fb265;">您的申请已通过~</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 申请通过 -->
|
<!-- 申请通过 -->
|
||||||
<view class="btn" wx:if='{{goods.status==63}}' catchtap="next">下一步</view>
|
<view class="btn" wx:if='{{goods.afterSalesStatus==63}}' catchtap="next">下一步</view>
|
||||||
|
|
||||||
<!-- 申请中 -->
|
<!-- 申请中 -->
|
||||||
<view class="dengdai" wx:if='{{goods.status==61||goods.status==62}}'>
|
<view class="dengdai" wx:if='{{goods.afterSalesStatus==61||goods.afterSalesStatus==62}}'>
|
||||||
<view class="display_J_C"><image src="/icon/sq_1.png"></image></view>
|
<view class="display_J_C"><image src="/icon/sq_1.png"></image></view>
|
||||||
<view style=" margin: 35rpx auto 0;">等待商家审核~</view>
|
<view style=" margin: 35rpx auto 0;">等待商家审核~</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 申请中 -->
|
<!-- 申请中 -->
|
||||||
<view class="btn-1" wx:if='{{goods.status==61||goods.status==62}}'>下一步</view>
|
<view class="btn-1" wx:if='{{goods.afterSalesStatus==61||goods.afterSalesStatus==62}}'>下一步</view>
|
||||||
|
|
||||||
<view class="height100"></view>
|
<view class="height100"></view>
|
||||||
<view class="height100"></view>
|
<view class="height100"></view>
|
||||||
|
@ -12,6 +12,9 @@ Page({
|
|||||||
textarea: '',
|
textarea: '',
|
||||||
textRefund: '',
|
textRefund: '',
|
||||||
total: 0,
|
total: 0,
|
||||||
|
logistics: null,
|
||||||
|
isAllRefund: false,
|
||||||
|
refundPackageGoods: []
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,9 +41,12 @@ Page({
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
let goods = res.data.value;
|
const goods = res.data.value;
|
||||||
this.setData({
|
this.setData({
|
||||||
goods: goods,
|
goods: goods,
|
||||||
|
logistics: goods.logistics ? JSON.parse(goods.logistics) : null,
|
||||||
|
isAllRefund: !!!(goods.logistics ? JSON.parse(goods.logistics) : []).find(el => el.afterSalesStatus),
|
||||||
|
refundPackage: (goods.logistics ? JSON.parse(goods.logistics) : []).find(el => el.afterSalesStatus) ?? []
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
|
@ -1,4 +1,29 @@
|
|||||||
<view class="goods">
|
<wxs module="findGoods">
|
||||||
|
function findGoods(goodsList, id) {
|
||||||
|
// 初始化一个变量来存储找到的商品
|
||||||
|
var found = null;
|
||||||
|
|
||||||
|
// 遍历商品列表以查找具有指定ID的商品
|
||||||
|
for (var i = 0; i < goodsList.length; i++) {
|
||||||
|
if (goodsList[i].id === id) {
|
||||||
|
found = goodsList[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果找到了商品,返回商品的照片
|
||||||
|
if (found !== null) {
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果没有找到,返回undefined
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
module.exports = {
|
||||||
|
findGoods: findGoods,
|
||||||
|
}
|
||||||
|
</wxs>
|
||||||
|
<view wx:if="{{isAllRefund}}" class="goods">
|
||||||
<view class="cont display_J_B" wx:for='{{goods.goodsList}}' wx:key='index'>
|
<view class="cont display_J_B" wx:for='{{goods.goodsList}}' wx:key='index'>
|
||||||
<view class="cont-l">
|
<view class="cont-l">
|
||||||
<image src="{{item.goodsPhoto}}"></image>
|
<image src="{{item.goodsPhoto}}"></image>
|
||||||
@ -14,6 +39,22 @@
|
|||||||
<view class="cont-r">x{{item.goodsNum}}</view>
|
<view class="cont-r">x{{item.goodsNum}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view wx:else class="goods">
|
||||||
|
<view class="cont display_J_B" wx:for='{{refundPackage.goods}}' wx:key='index'>
|
||||||
|
<view class="cont-l">
|
||||||
|
<image src="{{findGoods.findGoods(goods.goodsList,item.id).goodsPhoto}}"></image>
|
||||||
|
</view>
|
||||||
|
<view class="cont-m">
|
||||||
|
<view class="name GStitleOne">{{item.name}}</view>
|
||||||
|
<view class="specs" wx:if="{{findGoods.findGoods(goods.goodsList,item.id).orderPayWay!=3}}">规格:{{item.spec}}</view>
|
||||||
|
<view class="price" wx:if="{{findGoods.findGoods(goods.goodsList,item.id).orderPayWay!=3}}">
|
||||||
|
{{findGoods.findGoods(goods.goodsList,item.id).orderPayWay!=2?'¥':''}}{{findGoods.findGoods(goods.goodsList,item.id).wisdGoodsSpec.specBulyPrice==null?findGoods.findGoods(goods.goodsList,item.id).wisdGoodsSpec.specPrice:findGoods.findGoods(goods.goodsList,item.id).wisdGoodsSpec.specBulyPrice}}{{findGoods.findGoods(goods.goodsList,item.id).orderPayWay!=2?'':'积分'}}
|
||||||
|
</view>
|
||||||
|
<view class="price" wx:if="{{findGoods.findGoods(goods.goodsList,item.id).orderPayWay==3}}">¥0</view>
|
||||||
|
</view>
|
||||||
|
<view class="cont-r">x{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="aArice display_J_S">
|
<view class="aArice display_J_S">
|
||||||
<view class="aArice-l">{{goods.orderRefundType==1?'换货':'退货'}}说明:</view>
|
<view class="aArice-l">{{goods.orderRefundType==1?'换货':'退货'}}说明:</view>
|
||||||
<input type="text" placeholder="必填(填写货物的信息)" bindinput="textarea1" value="{{textarea1}}" />
|
<input type="text" placeholder="必填(填写货物的信息)" bindinput="textarea1" value="{{textarea1}}" />
|
||||||
|
@ -142,7 +142,7 @@ Page({
|
|||||||
url: IP + '/wisdommining/api/order/afterSales',
|
url: IP + '/wisdommining/api/order/afterSales',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
header: {
|
header: {
|
||||||
"content-type": "application/x-www-form-urlencoded",
|
"content-type": "application/json",
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
orderRefund: this.data.textarea,
|
orderRefund: this.data.textarea,
|
||||||
|
@ -86,10 +86,10 @@
|
|||||||
<view class="btn1 btn2" wx:if="{{item.status==2}}" data-id='{{item.id}}' catchtap="apply1">
|
<view class="btn1 btn2" wx:if="{{item.status==2}}" data-id='{{item.id}}' catchtap="apply1">
|
||||||
申请退款</view>
|
申请退款</view>
|
||||||
<!-- 待收货申请 -->
|
<!-- 待收货申请 -->
|
||||||
<view class="btn1 btn2" wx:if="{{item.status==3}}" 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<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}}" 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&& 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==61||item.status==62||item.status==63||item.status==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}}" 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 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>
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
<view>
|
<view>
|
||||||
包裹{{index+1}}
|
包裹{{index+1}}
|
||||||
</view>
|
</view>
|
||||||
<view class="btn btn-red" data-id='{{goods.id}}' data-num='{{goods.orderNumber}}' data-s='{{goods.status}}' data-sq='2' data-package-id="{{item.id}}" capture-bind:tap="apply">换货申请</view>
|
<view wx:if="{{goods.status == 3 && !goods.afterSalesStatus}}" class="btn btn-red" data-id='{{goods.id}}' data-num='{{goods.orderNumber}}' data-s='{{goods.status}}' data-sq='2' data-package-id="{{item.id}}" capture-bind:tap="apply">换货申请</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cont display_J_B" wx:for='{{item.goods}}' wx:key="specId" wx:for-item="goodsItem" catchtap="">
|
<view class="cont display_J_B" wx:for='{{item.goods}}' wx:key="specId" wx:for-item="goodsItem" catchtap="">
|
||||||
<view class="cont-l">
|
<view class="cont-l">
|
||||||
|
Reference in New Issue
Block a user