wangfukang 2 weeks ago
parent
commit
8cdd8a4577
  1. 1
      package1/buyFood/buyFood.vue
  2. 193
      package1/order/orderDetail.vue
  3. 11
      package1/order/orderList.vue

1
package1/buyFood/buyFood.vue

@ -842,6 +842,7 @@
if (this.selected === 'zhiding' && this.assignedWorker) {
payload.workerParam = {
workerId: this.assignedWorker.workerId,
workerName: this.assignedWorker.workerName,
orderBkge: parseFloat(this.assignedWorker.orderBkge || 0)
};
} else if (this.selected === 'buzhiding') {

193
package1/order/orderDetail.vue

@ -10,35 +10,34 @@
</view>
</view>
<view class="box11">
<view class="ziqu-xuanfu1">
<view class="ziqu-xuanfu1" v-if="orderDetail.deliveryType == 1">
外卖配送
</view>
<view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;">
竹仔园牛仔农庄(第六分店)
{{orderDetail.shopName}}
</view>
<view style="display: flex;padding: 20rpx 0;background: #eee;border-radius: 20rpx;">
<view class="goods-img1">
<img src="/static/images/img/shangpintu.png" alt="">
</view>
<view class="goods-content1">
<view class="goods-content1" v-for="(item1,index1) in orderDetail.goodsList" :key="index1" v-if="orderDetail.goodsList != null && orderDetail.goodsList.length > 0">
<view class="goods-name1">
牛仔农庄(医专店)
{{item1.productName}}
</view>
<view class="goods-content-center1">
<view>
打分不要啦
{{item1.specs}}
</view>
</view>
<view class="goods-content-bottom1">
<view style="width: 45%;">
X1
X{{item1.quantity}}
</view>
<view class="pintuan-left-price1">
90.00
<view
style="background: rgba(255, 57, 57, 0.2);padding: 0px 12rpx;border-radius: 20rpx;margin-left: 20rpx;">
<text>拼团</text>
<text style="color: red;">59.9</text>
<text style="color: red;">{{item1.price}}</text>
</view>
</view>
</view>
@ -48,7 +47,7 @@
<view class="box11" style="position: absolute;top: 800rpx;left: 2.5%;">
<view class="kaituan11">
<view class="kaituan1-title1">
1人即可成团
{{orderDetail.groupInfo.targetMembers - orderDetail.groupInfo.currentMembers}}人即可成团
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/21b403bd13414ce79ad73cf1c8e3de98.png" alt="" style="width: 120rpx;height: 11px;position: absolute;bottom: 0;right: 15px;" />
</view>
<view class="kaituan1-title11">
@ -60,21 +59,22 @@
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/801c569079da4540990c1cc634186fdd.png" alt="" style="width: 90rpx;height: 90rpx;border-radius: 90rpx;margin: 0 auto;display: block;" />
</view>
<view class="kaituan221">
<view class="weipincheng1">
<view class="weipincheng1" v-for="(item1,index1) in (orderDetail.groupInfo.targetMembers - orderDetail.groupInfo.currentMembers)" :key="index1">
+
</view>
</view>
<view class="kaituan221">
<view class="weipincheng1">
+
</view>
<view class="kaituan41">
分享至微信 <uni-icons type="weixin" size="15"></uni-icons>
</view>
<view class="status-btn" v-if="orderStatus(orderDetail)" @tap="returnPopupProp(orderDetail)">
取消订单
</view>
<view class="kaituan31">
剩余<text style="font-size: 32rpx;font-weight: 700;padding: 0 20rpx;color: red;">23:59:23</text>结束
<view class="status-btn" v-if="orderStatus(orderDetail)" @tap="returnPopupProp(orderDetail)">
补差价转直接购买
</view>
<view class="kaituan41">
分享至微信 <uni-icons type="weixin" size="15"></uni-icons>
<view style="padding-right: 100rpx;" @tap="refreah(orderDetail)">
刷新
</view>
<view class="kaituan51">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c1f1b45c98fa4db1a1e5f98b3a0573c2.png" alt="" style="width: 520rpx;height: 150rpx;margin: 0 auto;display: block;" />
@ -92,7 +92,12 @@
<view class="content">
<view class="box1" style="display: flex;">
<view class="status-img">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6cf6fff020614ebebb34f7c371e11331.png" alt="" />
<img v-if="orderDetail.status == 0 || (orderDetail.status == 3 && orderDetail.deliveryType == 2)" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6cf6fff020614ebebb34f7c371e11331.png" alt="" />
<img v-if="orderDetail.status == 2" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/35ff6276eb3a4e58b8baa724ca44d5dc.png" alt="" />
<img v-if="orderDetail.status == 5 || orderDetail.status == 8" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/dbfa6dc934e2414c912c67430d5f802c.png" alt="" />
<img v-if="orderDetail.status == 6" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/03d7e8d5914e4b9ca04728113900d1fe.png" alt="" />
<img v-if="orderDetail.status == 7" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/35ff6276eb3a4e58b8baa724ca44d5dc.png" alt="" />
<img v-if="(orderDetail.status == 3 && orderDetail.deliveryType == 1) || (orderDetail.status == 4 && orderDetail.deliveryType == 1)" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/0ab87a35cbca473997c679a023337df6.png" alt="" />
<!--
待支付 https://jewel-shop.oss-cn-beijing.aliyuncs.com/6cf6fff020614ebebb34f7c371e11331.png
订单取消 https://jewel-shop.oss-cn-beijing.aliyuncs.com/03d7e8d5914e4b9ca04728113900d1fe.png
@ -103,38 +108,46 @@
</view>
<view class="status-text">
<view class="status-zhu">
<text>待支付剩余9:51</text>
<!-- <text>订单已取消</text>
<text>等待商家接单</text>
<text>等待配送员接单</text>
<text>配送员已接单</text>
<text>配送员已到店</text>
<text>配送中</text>
<text>订单已送达</text>
<text>请等待商家同意</text>
<text>订单已取消</text> -->
</view>
<view class="status-fu">
<view class="">预计<text>10:51</text>送达</view>
<text v-if="orderDetail.status == 0">待支付</text>
<text v-if="orderDetail.status == 2">等待配送员接单</text>
<text v-if="orderDetail.status == 3 && orderDetail.deliveryType == 1">配送员已接单</text>
<text v-if="orderDetail.status == 3 && orderDetail.deliveryType == 2">待消费</text>
<text v-if="orderDetail.status == 4 && orderDetail.deliveryType == 1">配送员已取货</text>
<text v-if="orderDetail.status == 5">订单已完成</text>
<text v-if="orderDetail.status == 7">等待商家同意退款</text>
<text v-if="orderDetail.status == 6">订单已取消</text>
<text v-if="orderDetail.status == 8">订单已退款</text>
</view>
<view class="status-fu" v-if="orderDetail.deliveryInfo">
<view class="">预计<text>{{orderDetail.deliveryInfo.mustFinishTime | formatHourMinute }}</text>送达</view>
<!-- <view class="">超过15分钟未支付订单自动取消</view>
<view class="">您申请了取消订单请等待商家同意</view>
<view class="">商家已同意取消订单订单金额将原路返回</view>
<view class="">商家已拒绝取消订单将会继续为您配送</view> -->
</view>
<view class="status-address">
送至 <text>北校区1号宿舍楼6楼612</text>
<view class="status-address" v-if="orderDetail.deliveryInfo">
送至 <text>{{orderDetail.deliveryInfo.receiverAddress}}</text>
</view>
<view class="status-btn">
<view class="status-btn" v-if="orderStatus(orderDetail)" @tap="returnPopupProp(orderDetail)">
取消订单
</view>
<view style="padding-right: 100rpx;" @tap="refreah(orderDetail)">
刷新
</view>
<!-- <view class="status-btn">
去评价
</view> -->
</view>
</view>
<view class="btn-box">
<view class="btn" @tap="openCode">
核销取餐码
<view class="btn" v-if="orderDetail.status == 3 && orderDetail.deliveryType == 2" @tap="openCode">
核销取餐码 需要画二维码
</view>
<view class="btn" v-if="orderDetail.status == 3 && orderDetail.deliveryType == 2" @tap="openCode">
立即备餐
</view>
<view class="btn" v-if="orderDetail.status == 2" @tap="">
增加配送佣金
</view>
<!-- <view class="btn">
再来一单
@ -151,46 +164,46 @@
</view>
<view class="box1">
<view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;">
竹仔园牛仔农庄(第六分店)
{{orderDetail.shopName}}
</view>
<view style="display: flex;padding: 20rpx;background: #eee;border-radius: 20rpx;">
<view v-for="(item1,index1) in orderDetail.goodsList" :key="index1" v-if="orderDetail.goodsList != null && orderDetail.goodsList.length > 0" style="display: flex;padding: 20rpx;background: #eee;border-radius: 20rpx;">
<view class="goods-img">
<img src="/static/images/img/shangpintu.png" alt="">
<img :src="item1.productPicture" alt="">
</view>
<view class="goods-content">
<view class="goods-name">
牛仔农庄(医专店)
{{item1.productName}}
</view>
<view class="goods-content-center">
<view class="goods-deal1">
打分不要啦
{{item1.specs}}
</view>
</view>
<view class="goods-content-bottom">
<view style="width: 50%;">
X1
X{{item1.quantity}}
</view>
<view class="pintuan-left-price">
90.00
{{item1.price}}
</view>
</view>
</view>
</view>
<view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.packageFee != null && orderDetail.packageFee > 0">
<view style="flex: 1;color: #777;font-weight: 700;">
打包费
</view>
<view style="color: #000;font-weight:700;">
1
{{orderDetail.packageFee}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;">
配送费
</view>
<view style="color: #000;font-weight:700;">
5
{{orderDetail.deliveryFee}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
@ -207,34 +220,37 @@
实付
</view>
<view class="">
90.00
{{orderDetail.totalAmount}}
</view>
</view>
</view>
<view class="box1">
<view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
<!-- <view style="height: 80rpx;line-height: 80rpx;display: flex;">
<view style="flex: 1;color: #777;font-weight: 700;">
收件地址
</view>
<view style="color: #000;font-weight: 700;">
北校区1号宿舍楼5楼512(0702)
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
</view> -->
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;">
配送员
</view>
<view style="color: #000;font-weight: 700;">
不指定
<view style="color: #000;font-weight: 700;" v-if="orderDetail.deliveryInfo.workerId != null && orderDetail.deliveryInfo.workerId != ''">
{{orderDetail.deliveryInfo.workerName != null ? orderDetail.deliveryInfo.workerName : ''}}
</view>
<view style="color: #000;font-weight: 700;" v-else>
未指定等待接单中
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.numberCode != null">
<view style="flex: 1;color: #777;font-weight: 700;">
订单号
</view>
<view style="color: #000;font-weight: 700;">
3847283739782938
{{orderDetail.numberCode}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
@ -250,7 +266,7 @@
下单时间
</view>
<view style="color: #000;font-weight: 700;">
2026-02-01 23:00:00
{{orderDetail.createTime}}
</view>
</view>
</view>
@ -263,6 +279,18 @@
<img :src="codeImg" alt="" style="width: 330rpx;height: 330rpx;margin: 282rpx 0 0 136rpx;border: 20rpx solid rgba(222, 255, 248, 1);border-radius: 20rpx;">
</view>
</uni-popup>
<uni-popup ref="returnPopup" background-color="#fff" style="height: 1600rpx !important;">
<view class="guize-list">
<view style="height: 80rpx;line-height: 80rpx;font-size: 36rpx;font-weight: 700;text-align: center;">
确定要取消订单吗
<text v-if="payData.status == 2 || payData.status == 3 || payData.status == 4 || payData.status == 4">取消订单需要商家同意</text>
</view>
<view class="btn" @tap="returnOrder()">
确认取消
</view>
</view>
</uni-popup>
</view>
</template>
@ -273,12 +301,32 @@
pintuan:false,
menuButtonInfo: {},
orderId:'',
payData:{},
orderDetail:{},
codeImg:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3a4e68eb14d7417cbb4f15fa85907c64.jpg'
}
},
components: {
},
filters: {
formatHourMinute(value) {
if (!value) return '';
const date = new Date(value);
// (getDate)0
const day = String(date.getDate()).padStart(2, '0');
// (getHours)0
const hour = String(date.getHours()).padStart(2, '0');
// (getMinutes)0
const minute = String(date.getMinutes()).padStart(2, '0');
// --:
return `${day}-${hour}:${minute}`;
}
},
onLoad(option) {
if (option.id) {
@ -293,6 +341,36 @@
openCode(){
this.$refs.imgPopup.open()
},
orderStatus(item){
if(item.status == 0 || item.status == 10 || item.status == 2 || (item.status == 3 && item.deliveryType == 1) || (item.status == 3 && item.deliveryType == 2) || item.status == 4){
return true;
}
return false;
},
returnPopupProp(item){
this.payData = item;
this.$refs.returnPopup.open('bottom');
},
returnOrder(){
this.$refs.returnPopup.close();
let item = this.payData
let that = this
that.tui.request("/mall/order/cancel", "POST", {orderId:item.id,userId:uni.getStorageSync('id')}, false, true).then((res) => {
if (res.code == 200) {
that.tui.toast("取消订单成功");
that.getOrderDetail(item.id)
that.$forceUpdate();
} else {
that.tui.toast(res.message);
return;
}
uni.hideLoading();
}).catch((res) => {});
},
refreah(item){
this.getOrderDetail(item.id)
this.$forceUpdate();
},
getOrderDetail(id){
let that = this
that.tui.request("/mall/order/detail/"+id, "GET", {}, false, true).then((res) => {
@ -300,10 +378,11 @@
that.orderDetail = res.result;
if(that.orderDetail.groupInfo){
// 0: 1: 2: 3:()
if(that.orderDetail.groupInfo.status != 1){
if(that.orderDetail.groupInfo.status != 1 && that.orderDetail.groupInfo.status != 2){
that.pintuan = true;
}
}
that.$forceUpdate();
} else {
that.tui.toast(res.message)
return

11
package1/order/orderList.vue

@ -182,13 +182,13 @@
style="background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));color: #000;">
去支付
</view>
<view class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;">
<view class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;" @tap.stop="orderDetail(item.id)">
查看订单
</view>
<!-- <view class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;">
<view v-if="item.status == 5" class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;">
去评价
</view>
<view class="btn1">
<!-- <view class="btn1">
删除订单
</view> -->
</view>
@ -355,6 +355,11 @@
}
return false;
},
orderDetail(id){
uni.redirectTo({
url: '/package1/order/orderDetail?id=' + id
});
},
checkTabs2(type) {
this.tab2Checked = type;
this.searchForm.searchStatus = type;

Loading…
Cancel
Save