From 3ed1a1abdffc7ada3741bac27e7a96b5a3afcb1f Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Sat, 18 Apr 2026 16:59:11 +0800 Subject: [PATCH] 11 --- pages/index/index.vue | 5 ++-- pages/login/login.vue | 2 ++ pages/shop/orderDetail.vue | 16 ++++++++++--- pages/shop/shopOrderList.vue | 45 ++++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 5 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index b0eac84..0da2f2d 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -96,7 +96,7 @@ - {{shopData.orderRevenueAndCount.count}} + {{shopData.orderRevenueAndCount.count == undefined ?0:shopData.orderRevenueAndCount.count}} 今日订单 @@ -104,7 +104,7 @@ - {{shopData.orderRevenueAndCount.amount}} + {{shopData.orderRevenueAndCount.amount == undefined ?0:shopData.orderRevenueAndCount.amount}} 营业额 @@ -354,6 +354,7 @@ }) }, getData(){ + let that = this; that.NB.sendRequest("/mall/order/countByShop/"+uni.getStorageSync('shopId'), {}, true, 'GET', 'application/x-www-form-urlencoded').then((res) => { if (res.code == 200) { this.shopData = res.result diff --git a/pages/login/login.vue b/pages/login/login.vue index 7f54e5a..a63a313 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -332,6 +332,8 @@ uni.setStorageSync('shopRemark',res.result.remark) uni.setStorageSync("shopOwnerPhone", item.shopOwnerPhone) uni.setStorageSync('schoolShop',res.result.shop) + uni.setStorageSync('schoolShop',res.result.shop) + uni.setStorageSync('shopTakeaway',item.shopTakeaway) uni.setStorageSync('area',JSON.stringify(item)) uni.setStorageSync("isShop",true) setTimeout(() => { diff --git a/pages/shop/orderDetail.vue b/pages/shop/orderDetail.vue index 958d64b..010b267 100644 --- a/pages/shop/orderDetail.vue +++ b/pages/shop/orderDetail.vue @@ -91,7 +91,7 @@ 平台服务费 - ¥12.00假的 + ¥{{(data.chouyong).toFixed(2)}} @@ -119,7 +119,7 @@ 用户账号 - 13521030111假的 + {{data.receiverPhone}} @@ -131,7 +131,7 @@ 预计收入 - ¥10.32假的 + ¥{{(data.yujishouru).toFixed(2)}} @@ -179,6 +179,16 @@ if (res.code == 200) { that.data = res.result + //商家预计收入的计算 + let price = that.data.goodsAmount+that.data.packageFee + if(that.data.orderType == 1){ + that.data.chouyong = price/100 * uni.getStorageSync('shopTakeaway').commissionRateOne + that.data.yujishouru = price - that.data.chouyong + }else{ + that.data.chouyong = price/100 * uni.getStorageSync('shopTakeaway').commissionRateMore + that.data.yujishouru = price - that.data.chouyong + } + that.data.goodsNum = 0 for(let m=0;m + + + + 已出餐 + + @@ -194,6 +200,35 @@ uni.hideLoading(); }).catch((res) => {}); }, + mealServing(item){ + let that = this + uni.showModal({ + title: '提示', + content: '确定要出餐吗?', + success: function (res) { + if (res.confirm) { + let data = {} + let url = '' + if(item.deliveryType == 2){ //自取单 + url = '/mall/order/complete' + }else if(item.deliveryType == 1){ //外卖单 + url = '/mall/order/shopMakeTime' + } + that.tui.request(url, "post", { + orderId:item.id + }, false, true).then((res) => { + if (res.code == 200) { + that.getList() + } else { + that.tui.toast(res.message); + return; + } + uni.hideLoading(); + }).catch((res) => {}); + } + } + }); + }, goDetail(id){ uni.navigateTo({ url:'/package2/shop/orderDetail?id=' + id @@ -246,6 +281,16 @@ bottom: 0; left: 0; } + .btn{ + background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1)); + padding:0 5px; + height: 30px; + border-radius: 7px; + line-height: 30px; + text-align: center; + font-weight: 700; + margin-top: 10px; + } .title-name { padding-top: 110rpx;