|
|
@ -13,9 +13,9 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
<view class="box1" style="display: flex;font-size: 28rpx;font-weight: 700;"> |
|
|
<view class="box1" style="display: flex;font-size: 28rpx;font-weight: 700;"> |
|
|
<text>{{'#'+data.numberCode}}</text> |
|
|
<text v-if="data.numberCode" style="margin-right: 20rpx;">{{'#'+data.numberCode}}</text> |
|
|
<text style="margin: 0 20rpx;">期望送达</text> |
|
|
<text style="margin-right: 20rpx;">期望送达</text> |
|
|
<text>明天 06:30</text> |
|
|
<text>{{formattedMustFinishTime}}</text> |
|
|
<text style="flex: 1;text-align: right;color: red;"> |
|
|
<text style="flex: 1;text-align: right;color: red;"> |
|
|
{{data.status == 0?'待支付':data.status == 2?'待配送员接单':(data.status == 3 && data.deliveryType == 1 && data.shopMakeTime == null) || (data.status == 3 && data.deliveryType == 2 && data.userRequireMake == 1)?'待出餐':(data.status == 3 && data.deliveryType == 1 && data.shopMakeTime != null)?'待取货':(data.status == 3 && data.deliveryType == 2)?'待消费':data.status == 4?'待送达':data.status == 5?'已完成':data.status == 7?'待同意退款':data.status == 8?'已退款':data.status == 6?'已取消':data.status == 11?'售后中':data.status == 12?'已售后':""}} |
|
|
{{data.status == 0?'待支付':data.status == 2?'待配送员接单':(data.status == 3 && data.deliveryType == 1 && data.shopMakeTime == null) || (data.status == 3 && data.deliveryType == 2 && data.userRequireMake == 1)?'待出餐':(data.status == 3 && data.deliveryType == 1 && data.shopMakeTime != null)?'待取货':(data.status == 3 && data.deliveryType == 2)?'待消费':data.status == 4?'待送达':data.status == 5?'已完成':data.status == 7?'待同意退款':data.status == 8?'已退款':data.status == 6?'已取消':data.status == 11?'售后中':data.status == 12?'已售后':""}} |
|
|
</text> |
|
|
</text> |
|
|
@ -91,7 +91,7 @@ |
|
|
平台服务费 |
|
|
平台服务费 |
|
|
</view> |
|
|
</view> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
¥{{(data.chouyong).toFixed(2)}} |
|
|
¥{{data.chouyong ?data.chouyong:0}} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -155,11 +155,11 @@ |
|
|
<uni-popup ref="groupPopup" background-color="#fff"> |
|
|
<uni-popup ref="groupPopup" background-color="#fff"> |
|
|
<view class="group-content"> |
|
|
<view class="group-content"> |
|
|
<view style="height: 100rpx;text-align: center;line-height: 100rpx;font-size: 36rpx;font-weight: 700;"> |
|
|
<view style="height: 100rpx;text-align: center;line-height: 100rpx;font-size: 36rpx;font-weight: 700;"> |
|
|
<text>{{data.groupInfo.targetMembers}}人团/</text><text>已拼{{data.groupInfo.currentMembers}}人</text> |
|
|
<text>{{data.groupInfo?data.groupInfo.targetMembers:0}}人团/</text><text>已拼{{data.groupInfo?data.groupInfo.currentMembers:0}}人</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="kaituan2"> |
|
|
<view class="kaituan2"> |
|
|
<view class="kaituan22" style="display: flex;"> |
|
|
<view class="kaituan22" style="display: flex;"> |
|
|
<view class="" @tap="goDetail(item)" v-for="(item,index) in data.groupInfo.groupIdList" :key="index" style="width: 90rpx;height: 90rpx;margin: 0 auto;position: relative;"> |
|
|
<view class="" @tap="goDetail(item)" v-for="(item,index) in (data.groupInfo?data.groupInfo.groupIdList:[])" :key="index" style="width: 90rpx;height: 90rpx;margin: 0 auto;position: relative;"> |
|
|
<view style="z-index: 99;position: absolute;top:0;width: 90rpx;height: 90rpx;border-radius: 90rpx;border:4rpx solid #48D1CC"></view> |
|
|
<view style="z-index: 99;position: absolute;top:0;width: 90rpx;height: 90rpx;border-radius: 90rpx;border:4rpx solid #48D1CC"></view> |
|
|
<view style=""> |
|
|
<view style=""> |
|
|
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/801c569079da4540990c1cc634186fdd.png" alt="" style="width: 90rpx;height: 90rpx;border-radius: 90rpx;display: block;" /> |
|
|
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/801c569079da4540990c1cc634186fdd.png" alt="" style="width: 90rpx;height: 90rpx;border-radius: 90rpx;display: block;" /> |
|
|
@ -171,7 +171,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view v-if="(data.groupInfo.targetMembers - data.groupInfo.currentMembers) > 0" class="kaituan22"> |
|
|
<view v-if="(data.groupInfo?data.groupInfo.targetMembers - data.groupInfo.currentMembers:0) > 0" class="kaituan22"> |
|
|
<view class="weipincheng"> |
|
|
<view class="weipincheng"> |
|
|
+ |
|
|
+ |
|
|
</view> |
|
|
</view> |
|
|
@ -211,6 +211,38 @@ |
|
|
this.shopId = option.id |
|
|
this.shopId = option.id |
|
|
this.getDetail() |
|
|
this.getDetail() |
|
|
}, |
|
|
}, |
|
|
|
|
|
computed: { |
|
|
|
|
|
// 计算属性:格式化后的完成时间 |
|
|
|
|
|
formattedMustFinishTime() { |
|
|
|
|
|
// 1. 安全判断:deliveryInfo 存在且有 mustFinishTime 字段 |
|
|
|
|
|
const deliveryInfo = this.data.deliveryInfo; |
|
|
|
|
|
if (!deliveryInfo || !deliveryInfo.mustFinishTime) { |
|
|
|
|
|
return ''; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 2. 获取原始时间字符串 (例如: "2026-05-19T17:40:11.000+08:00") |
|
|
|
|
|
let rawTime = deliveryInfo.mustFinishTime; |
|
|
|
|
|
|
|
|
|
|
|
// 3. 关键:安卓对 ISO 日期中的 "-" 解析可能不兼容,先替换为 "/" |
|
|
|
|
|
// 同时处理可能的时区后缀,直接截取前19个字符(标准格式 "YYYY-MM-DDTHH:mm:ss") |
|
|
|
|
|
rawTime = rawTime.replace(/-/g, '/'); |
|
|
|
|
|
// 去掉时区部分,仅保留 "YYYY/MM/DD HH:mm:ss" 格式 |
|
|
|
|
|
rawTime = rawTime.replace('T', ' ').split('.')[0]; |
|
|
|
|
|
|
|
|
|
|
|
// 4. 解析为 Date 对象 |
|
|
|
|
|
const date = new Date(Date.parse(rawTime)); |
|
|
|
|
|
|
|
|
|
|
|
// 5. 格式化输出,例如 "2026-05-19 17:40:11" |
|
|
|
|
|
const year = date.getFullYear(); |
|
|
|
|
|
const month = (date.getMonth() + 1).toString().padStart(2, '0'); |
|
|
|
|
|
const day = date.getDate().toString().padStart(2, '0'); |
|
|
|
|
|
const hours = date.getHours().toString().padStart(2, '0'); |
|
|
|
|
|
const minutes = date.getMinutes().toString().padStart(2, '0'); |
|
|
|
|
|
const seconds = date.getSeconds().toString().padStart(2, '0'); |
|
|
|
|
|
|
|
|
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
getDetail(){ |
|
|
getDetail(){ |
|
|
let that = this |
|
|
let that = this |
|
|
@ -218,19 +250,18 @@ |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
that.data = res.result |
|
|
that.data = res.result |
|
|
|
|
|
|
|
|
//商家预计收入的计算 |
|
|
//商家预计收入的计算1 |
|
|
let price = that.data.goodsAmount+that.data.packageFee |
|
|
let price = that.data.goodsAmount+that.data.packageFee |
|
|
if(that.data.orderType == 1){ |
|
|
if(that.data.orderType == 1){ |
|
|
that.data.chouyong = price/100 * uni.getStorageSync('shopTakeaway').commissionRateOne |
|
|
that.data.chouyong = (price/100 * uni.getStorageSync('shopTakeaway').commissionRateOne).toFixed(2) |
|
|
that.data.yujishouru = price - that.data.chouyong |
|
|
that.data.yujishouru = (price - that.data.chouyong).toFixed(2) |
|
|
}else{ |
|
|
}else{ |
|
|
that.data.chouyong = price/100 * uni.getStorageSync('shopTakeaway').commissionRateMore |
|
|
that.data.chouyong = (price/100 * uni.getStorageSync('shopTakeaway').commissionRateMore).toFixed(2) |
|
|
that.data.yujishouru = price - that.data.chouyong |
|
|
that.data.yujishouru = (price - that.data.chouyong).toFixed(2) |
|
|
} |
|
|
} |
|
|
if(that.data.groupInfo != null){ |
|
|
if(that.data.groupInfo != null && that.data.groupInfo != undefined){ |
|
|
that.data.groupInfo.groupIdList = that.data.groupInfo.groupOrderIds.split(','); |
|
|
that.data.groupInfo.groupIdList = that.data.groupInfo.groupOrderIds.split(','); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
that.data.goodsNum = 0 |
|
|
that.data.goodsNum = 0 |
|
|
for(let m=0;m<that.data.goodsList.length;m++){ |
|
|
for(let m=0;m<that.data.goodsList.length;m++){ |
|
|
that.data.goodsNum += that.data.goodsList[m].quantity |
|
|
that.data.goodsNum += that.data.goodsList[m].quantity |
|
|
|