diff --git a/src/store/modules/carts.ts b/src/store/modules/carts.ts index 6a03a8b..f25ceaa 100644 --- a/src/store/modules/carts.ts +++ b/src/store/modules/carts.ts @@ -5,7 +5,6 @@ import { useUserStoreHook } from "@/store/modules/user"; import productApi from "@/api/product/index"; import shopUserApi from '@/api/account/shopUser' import limitTimeDiscountApi from '@/api/market/limitTimeDiscount.js' -import * as UTILS from "@/utils/coupon-utils.js"; import { BigNumber } from "bignumber.js"; import _ from "lodash"; // 导入工具库及相关类型 @@ -16,7 +15,8 @@ import { BackendCoupon, ActivityConfig, OrderExtraConfig, MerchantReductionConfig, MerchantReductionType, - GoodsType, FullReductionActivity + GoodsType, FullReductionActivity, + couponUtils } from "ysk-utils"; // import { @@ -253,10 +253,9 @@ export const useCartsStore = defineStore("carts", () => { }) // 获取满减活动 - const fullReductionRes = await limitTimeDiscountApi.getDiscountActivity({ + fullReductionActivities.value = await limitTimeDiscountApi.getDiscountActivity({ shopId: localStorage.getItem("shopId") }); - fullReductionActivities.value = fullReductionRes?.data || []; if (limitDiscountRes.value !== null) { checkLinkFinished().then(() => { @@ -431,13 +430,13 @@ export const useCartsStore = defineStore("carts", () => { console.log('setCoupons', cps); let goodsCoupon = cps.filter((v) => v.type == 2); let otherCoupon = cps.filter((v) => v.type != 2); - const canDikouGoodsArr = UTILS.returnCanDikouGoods(allGoods.value, [], vipUser.value); + const canDikouGoodsArr = couponUtils.returnCanDikouGoods(allGoods.value, [], vipUser.value); //商品订单金额 const goodsOrderPrice = new BigNumber(orderCostSummary.value.goodsOriginalAmount) .minus(orderCostSummary.value.goodsDiscountAmount) .toFixed(2); goodsCoupon = goodsCoupon.map((v) => { - const discount = UTILS.returnCouponDiscount(canDikouGoodsArr, v, vipUser.value, goodsOrderPrice, [], shopUser.userInfo); + const discount = couponUtils.returnCouponDiscount(canDikouGoodsArr, v, vipUser.value, goodsOrderPrice, [], shopUser.userInfo); return { ...v, discount, @@ -445,7 +444,7 @@ export const useCartsStore = defineStore("carts", () => { }; }); otherCoupon = otherCoupon.map((v) => { - const discount = UTILS.returnCouponDiscount(canDikouGoodsArr, v, vipUser.value, goodsOrderPrice, goodsCoupon, shopUser.userInfo); + const discount = couponUtils.returnCouponDiscount(canDikouGoodsArr, v, vipUser.value, goodsOrderPrice, goodsCoupon, shopUser.userInfo); return { ...v, discount, diff --git a/src/views/inventory/operation_in/index.vue b/src/views/inventory/operation_in/index.vue index 6e65f8f..bb3a65b 100644 --- a/src/views/inventory/operation_in/index.vue +++ b/src/views/inventory/operation_in/index.vue @@ -387,10 +387,10 @@ export default { conName: v.conName, purchasePrice: v.price, unitName: v.conUnit, - inOutNumber: v.number, + inOutNumber: inOutNumber, subTotal: this.xiaoji(v), imgUrls: v.imgUrls, - number: inOutNumber, + number: v.number, }; }); if (this.type == "in") { diff --git a/src/views/marketing_center/king_dine/index.vue b/src/views/marketing_center/king_dine/index.vue index ef3cf7b..b990c8a 100644 --- a/src/views/marketing_center/king_dine/index.vue +++ b/src/views/marketing_center/king_dine/index.vue @@ -137,6 +137,7 @@ async function freeDingGetAjax() { const res = await freeDingGet(); form.value = { ...res } form.value.enable = res.enable ? 1 : 0 + form.value.useShopType = res.useShopType || 'all' if (res.enable == true) { if (shopInfo.value.shopType == 'only') { diff --git a/src/views/tool/Instead/components/goods-item.vue b/src/views/tool/Instead/components/goods-item.vue index d16cf42..e59bb9c 100644 --- a/src/views/tool/Instead/components/goods-item.vue +++ b/src/views/tool/Instead/components/goods-item.vue @@ -15,7 +15,7 @@ ¥{{ item.time_discount_price }}
-