This commit is contained in:
quantulr
2024-05-17 17:14:40 +08:00
parent 8e5986a8ef
commit e679915b6c
11 changed files with 272 additions and 61 deletions

View File

@ -11,6 +11,8 @@ Page({
ipUrl: app.globalData.ipUrl,
textarea: '',
total: 0,
package: null,
packageId: null
},
/**
@ -18,6 +20,7 @@ Page({
*/
onLoad: function (options) {
this.setData({
packageId: options.packageId,
orderId: options.id,
num: options.num,
sq: options.sq,
@ -51,6 +54,7 @@ Page({
let goods = res.data.value;
this.setData({
goods: goods,
package: goods.logistics ? JSON.parse(goods.logistics).find(el => el.id == this.data.packageId) : null
})
} else {
wx.showModal({
@ -144,7 +148,8 @@ Page({
orderRefund: this.data.textarea,
orderId: parseInt(this.data.orderId),
orderRefundImg: photos,
status: this.data.sq == 1 ? 62 : 61
status: this.data.sq == 1 ? 62 : 61,
packageId: this.data.packageId
},
success: res => {
console.log(res)

View File

@ -1,4 +1,45 @@
<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="{{package}}" class="goods">
<view class="cont display_J_B" wx:for='{{package.goods}}' wx:key='specId'>
<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 wx:else class="goods">
<view class="cont display_J_B" wx:for='{{goods.goodsList}}' wx:key='index'>
<view class="cont-l">
<image src="{{item.goodsPhoto}}"></image>

View File

@ -163,9 +163,9 @@ Page({
})
},
viewLogisticsDetails(e) {
const { logisticsNum, logisticsName } = e.currentTarget.dataset
const { logistics, logisticsName, orderNumber } = e.currentTarget.dataset
wx.navigateTo({
url: `/pages/logistics_details/logistics_details?logisticsNum=${logisticsNum}&logisticsName=${logisticsName}`,
url: `/pages/logistics_details/logistics_details?orderNumber=${orderNumber}&logistics=${logistics}&logisticsName=${logisticsName}`,
})
},

View File

@ -29,22 +29,22 @@
</view>
<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}}">
<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?'已完成':''}}
</view>
<view class="state" wx:if="{{item.status>5}}">
<view class="state" wx:if="{{item.afterSalesStatus && type==6}}">
{{
item.status==61?'换货审核中'
:item.status==62?'退货审核中'
:item.status==63&&item.orderRefundType==1?'换货申请成功'
:item.status==63&&item.orderRefundType==2?'退货申请成功'
:item.status==64&&item.orderRefundType==1?'换货待商家收货'
:item.status==64&&item.orderRefundType==2?'退货待商家收货'
:item.status==65&&item.orderRefundType==1?'换货完成'
:item.status==65&&item.orderRefundType==2?'退货完成'
:item.status==65&&item.orderRefundType==3?'退款完成'
:item.status==66&&item.orderRefundType==1?'换货失败'
:item.status==66&&item.orderRefundType==2?'退货失败'
item.afterSalesStatus==61?'换货审核中'
: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?'换货完成'
:item.afterSalesStatus==65&&item.orderRefundType==2?'退货完成'
:item.afterSalesStatus==65&&item.orderRefundType==3?'退款完成'
:item.afterSalesStatus==66&&item.orderRefundType==1?'换货失败'
:item.afterSalesStatus==66&&item.orderRefundType==2?'退货失败'
:''
}}
</view>
@ -75,7 +75,7 @@
您需要在<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-num='{{item.logisticsNum}}' data-logistics-name="{{item.logisticsName}}" catchtap="viewLogisticsDetails">物流查询</view>
<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="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>
@ -93,7 +93,6 @@
<!-- 退货待商家收货 完成 -->
<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.status==2}}" -->
<view class="btn display_J_E" style="margin-top: 24rpx;">