From fdc3765a2cfdb1801bad04513de038ec28c33906 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 19 Nov 2025 11:10:41 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=99=90=E6=97=B6=E6=8A=98=E6=89=A3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../confirm-order/confirm-order.vue | 70 ++++++++++++++----- pagesCreateOrder/util.js | 10 +-- pagesOrder/pay-order/pay-order.vue | 2 +- 3 files changed, 55 insertions(+), 27 deletions(-) diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue index 3fccc9c..849d767 100644 --- a/pagesCreateOrder/confirm-order/confirm-order.vue +++ b/pagesCreateOrder/confirm-order/confirm-order.vue @@ -295,7 +295,7 @@ v-else-if=" isVip && item.lowMemberPrice && - item.lowMemberPrice * 1 != item.lowPrice * 1 + item.lowMemberPrice * 1 !=0 " > 优惠金额 - ¥{{ orderCostSummary.totalDiscountAmount }} + @@ -477,6 +482,28 @@ :ref="setModel" name="packNumber" > + + + + + 商品优惠 + ¥{{ orderCostSummary.goodsDiscountAmount }} + + + 新客立减 + ¥{{ orderCostSummary.newUserDiscount }} + + + 满减活动 + ¥{{ orderCostSummary.fullReduction.actualAmount }} + + + 会员折扣 + ¥{{ orderCostSummary.vipDiscountAmount }} + + + + @@ -506,7 +533,6 @@ import { getSafeBottomHeight } from "@/commons/utils/safe-bottom.js"; import go from "@/commons/utils/go.js"; import { hasPermission } from "@/commons/utils/hasPermission.js"; import { getNowCart } from "@/pagesCreateOrder/util.js"; -import { number } from "uview-plus/libs/function/test"; import { getShopInfo } from "@/http/api/shop.js"; import { getShopTableDetail } from "@/http/api/table.js"; @@ -518,6 +544,9 @@ import BigNumber from "bignumber.js"; import * as limitTimeDiscountApi from "@/http/yskApi/limitTimeDiscount.js"; import yskUtils from "ysk-utils"; + +//优惠详情弹窗 +const showDiscountInfo = ref(false); // import yskUtils from "@/lib/index"; const limitUtils = yskUtils.limitUtils; provide("yskUtils", yskUtils); @@ -640,7 +669,7 @@ onLoad(async (opt) => { let bottomHeight = ref(100); onReady(() => { getSafeBottomHeight("safe-bottom").then((res) => { - bottomHeight.value = res+50; + bottomHeight.value = res + 50; }); }); @@ -687,10 +716,6 @@ const $seatFee = reactive({ totalAmount: 0, }); - - - - /** * 判断是否是会员 */ @@ -703,7 +728,6 @@ const isVip = computed(() => { ); }); - /** * init */ @@ -724,7 +748,7 @@ function onMessage() { websocketUtil.offMessage(); websocketUtil.onMessage((res) => { let msg = JSON.parse(res); - console.log('msg===',msg); + console.log("msg===", msg); let cartItem; if (msg.msg_id) { websocketUtil.send( @@ -742,9 +766,9 @@ function onMessage() { switch (msg.operate_type) { case "onboc_init": goods.list = []; - console.log('msg.data', msg.data); + console.log("msg.data", msg.data); msg.data.map((item) => { - console.log("item===",item) + console.log("item===", item); cartItem = getNowCart(item, $goods, pageData.user); console.log(cartItem); if (cartItem.isGrounding || cartItem.is_temporary == 1) { @@ -895,6 +919,9 @@ async function getTableInfo(opt) { // 获取购物车数据 getCart(); // 获取购物车数据 + if(shopInfo.registerType==='before'){ + return + } getHistoryOrderDetail(opt.tableCode); } @@ -1124,8 +1151,6 @@ function showModel(key, index, item) { } } - - /** * 更新就餐人数 */ @@ -1213,8 +1238,9 @@ async function createAnOrder() { tableCode: pageData.table.tableCode, //台桌编码 dineMode: pageData.eatTypes.active, //用餐模式 堂食 dine-in 外带 take-out 外卖 take-away remark: pageData.form.note, //备注 - seatNum: pageData.eatTypes.active == "dine-in" ? seatFeeConfig.personCount : 0, //用餐人数 - packFee:orderCostSummary.value.packFee, //打包费 + seatNum: + pageData.eatTypes.active == "dine-in" ? seatFeeConfig.personCount : 0, //用餐人数 + packFee: orderCostSummary.value.packFee, //打包费 originAmount: orderCostSummary.value.goodsRealAmount, //订单原金额(不包含打包费+餐位费) placeNum: placeNum, //当前订单下单次数 waitCall: 0, //是否等叫 0 否 1 等叫 @@ -1227,7 +1253,7 @@ async function createAnOrder() { if (pageData.orderInfo && pageData.shopInfo.registerType != "before") { par.orderId = pageData.orderInfo.id; } - let res = null + let res = null; if (goods.list.length) { res = await createOrder(par); console.log(res, "创建订单"); @@ -1366,7 +1392,9 @@ const allGoodsList = computed(() => { cur.map((v) => { v.number = v.num; v.salePrice = v.price; - v.discount_sale_amount=v.discount_sale_amount?v.discount_sale_amount*1:0; + v.discount_sale_amount = v.discount_sale_amount + ? v.discount_sale_amount * 1 + : 0; }); prve.push(...cur); return prve; @@ -1513,4 +1541,10 @@ watch( z-index: 9; color: #fff; } +.u-row-between { + justify-content: space-between; +} +.w-full{ + width: 100%; +} diff --git a/pagesCreateOrder/util.js b/pagesCreateOrder/util.js index 7c705f5..ce8995e 100644 --- a/pagesCreateOrder/util.js +++ b/pagesCreateOrder/util.js @@ -13,17 +13,11 @@ export function getNowCart(carItem,goodsList,user) { if(carItem.product_id == goodsItem.id){ goodsItem.skuList.map(item=>{ if(carItem.sku_id == item.id){ - carItem.lowPrice = item.salePrice + carItem.lowPrice = item.lowPrice||item.salePrice carItem.lowMemberPrice = item.memberPrice carItem.memberPrice = item.memberPrice carItem.specInfo = item.specInfo - carItem.salePrice = item.salePrice - - if( uni.getStorageSync('shopInfo').isMemberPrice && user && user.id && user.isVip ){ - carItem.salePrice = item.memberPrice - } else { - carItem.salePrice = item.salePrice - } + carItem.salePrice = item.lowPrice } }) diff --git a/pagesOrder/pay-order/pay-order.vue b/pagesOrder/pay-order/pay-order.vue index a210866..92bfba9 100644 --- a/pagesOrder/pay-order/pay-order.vue +++ b/pagesOrder/pay-order/pay-order.vue @@ -441,7 +441,7 @@ let res = await discountActivity({ shopId: uni.getStorageSync("shopInfo").id||'', }); - if (res.code == 200) { + if (res) { fullReductionActivities.value = res ? [res] : []; } } From 919a56cc7e71069169dccda218f6f434c8791e9d Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 19 Nov 2025 11:12:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=89=8D=E9=9D=A2=E5=8A=A0=E4=B8=AA=E5=87=8F?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesCreateOrder/confirm-order/confirm-order.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue index 849d767..ae6a642 100644 --- a/pagesCreateOrder/confirm-order/confirm-order.vue +++ b/pagesCreateOrder/confirm-order/confirm-order.vue @@ -487,19 +487,19 @@ 商品优惠 - ¥{{ orderCostSummary.goodsDiscountAmount }} + -¥{{ orderCostSummary.goodsDiscountAmount }} 新客立减 - ¥{{ orderCostSummary.newUserDiscount }} + -¥{{ orderCostSummary.newUserDiscount }} 满减活动 - ¥{{ orderCostSummary.fullReduction.actualAmount }} + -¥{{ orderCostSummary.fullReduction.actualAmount }} 会员折扣 - ¥{{ orderCostSummary.vipDiscountAmount }} + -¥{{ orderCostSummary.vipDiscountAmount }} From 050be3a85e8b4f0d904a21fad5ec94c57fba34a3 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 19 Nov 2025 11:29:55 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=86=E9=94=80?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=92=8C=E5=88=86=E9=94=80=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pageMarket/distribution/components/config.vue | 312 ++++++++++++++++++ .../distribution/components/user-types.vue | 70 ++++ pageMarket/distribution/index.vue | 221 +++++++++++++ pageMarket/static/images/distribution.png | Bin 0 -> 1165 bytes pages.json | 7 + pages/appliccation/marketing.vue | 2 +- 6 files changed, 611 insertions(+), 1 deletion(-) create mode 100644 pageMarket/distribution/components/config.vue create mode 100644 pageMarket/distribution/components/user-types.vue create mode 100644 pageMarket/distribution/index.vue create mode 100644 pageMarket/static/images/distribution.png diff --git a/pageMarket/distribution/components/config.vue b/pageMarket/distribution/components/config.vue new file mode 100644 index 0000000..c857bb5 --- /dev/null +++ b/pageMarket/distribution/components/config.vue @@ -0,0 +1,312 @@ + + + + + \ No newline at end of file diff --git a/pageMarket/distribution/components/user-types.vue b/pageMarket/distribution/components/user-types.vue new file mode 100644 index 0000000..d8988cf --- /dev/null +++ b/pageMarket/distribution/components/user-types.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/pageMarket/distribution/index.vue b/pageMarket/distribution/index.vue new file mode 100644 index 0000000..83e0124 --- /dev/null +++ b/pageMarket/distribution/index.vue @@ -0,0 +1,221 @@ + + + \ No newline at end of file diff --git a/pageMarket/static/images/distribution.png b/pageMarket/static/images/distribution.png new file mode 100644 index 0000000000000000000000000000000000000000..e9804d5c8f912e37d36a9685f7d445b16ec1336b GIT binary patch literal 1165 zcmV;81akX{P)NY!m0qR$6WTpc+XwCu+_#ajr2mwKZl*KhR(iwag-;s70%P(pp4VQDBrh z2q}M{mZK#mBMVC!3D!(8D|05Aiq3SJZpY_)U$66C&%MrhHxK7I@B6&Jp6~lU&+~nc zhdl+0{M^Dt{u-12O#CjE=fi%9=|^oQrBG9|8{c5*q*_HjjOq{Tc1nYTw(||UVC+Dr zcjg-iAnPjFeWZQ45!sNMLO7U?+Kz6!uDwq?&+6T-Uuw+@nsC|zOumlv$;XNV>Dvyt zovSYCVZd4~P*v}Y1OoWof-mp-_T_q8JoG#pguT*0K^o~*s_r}#(Js9V1W^Ac4DQQ0 z-zu1@jb6Y18(#m`Wra-1_=qg{<_~F|lRyCCZl&NWmWmOw(ehR6;lydx;HFG?tq{Z$ zZOL|ld@5tj|HFqR@a$L+{SLYshG)U-JK&>Im!b{-z^evCV8w_IUdO+IC!p#3jJu!s z0+!pgI_Vb2il5#G?-~0|G1gmYx7{owqZjSU{a_Om+~^qb;bDYnx^@Q4EryF_NL&B{ zAre~90A-)SlWQEqRaiOgb2|ZRZ!waR3v~5X7!x*Iii#`LUb`I>BkxRxG|LpN7bIR# zV{Dt)PU-ifU8~zI4W-A9*=4-3#h6c2{M^?d;Bzft2Nl_?3VB?-?6o^VClha_qyf0K9~9l}%;>%-w_mU( zbBnI>AeXt3g#Vx-^~);t+f`fxcP)0J`t$Z5p<6N0!a4ybulLqQ!mI zdY(t6jX8VsTdn)vW-o;*uf9CgXduSnvl_5p4ErYW4OmJpua!;NJ_7&%|NpHR6ixsD f00v1!K~w_(LSA^Osj(2y00000NkvXXu0mjf;&(9O literal 0 HcmV?d00001 diff --git a/pages.json b/pages.json index f475cfc..2a59bd3 100644 --- a/pages.json +++ b/pages.json @@ -631,6 +631,13 @@ "style": { "navigationBarTitleText": "限时折扣" } + }, + { + "pageId": "PAGES_MARKET_DISTRIBUTION_INDEX", + "path": "distribution/index", + "style": { + "navigationBarTitleText": "分销" + } } ] }, diff --git a/pages/appliccation/marketing.vue b/pages/appliccation/marketing.vue index 5a1fae2..22609cf 100644 --- a/pages/appliccation/marketing.vue +++ b/pages/appliccation/marketing.vue @@ -75,7 +75,7 @@ const menuList = ref([ { title: "分销", icon: "", - pageUrl: "PAGES_PAY", + pageUrl: "PAGES_MARKET_DISTRIBUTION_INDEX", intro: "用户成为业务员,可促进消费", }, {