jufubao-mall 2.0.93-beta2 → 2.0.93-beta3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-mall",
3
- "version": "2.0.93-beta2",
3
+ "version": "2.0.93-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -54,14 +54,20 @@
54
54
  <view style="display:flex;align-items:center">
55
55
  <!-- <xd-unit :price="prod.sale_price" :isOld="false" color="#333" :iconSize="0.3" :fontSize="32"/> -->
56
56
  <CusPrice :isPlus="is_plus_site" :type="order" :showPrice="prod.show_prices"></CusPrice>
57
+ <view style="font-size: 28rpx;color:#999;margin-left: 16rpx;">{{prod['product_num'] ? 'x': ''}} {{prod['product_num']}}</view>
58
+ </view>
59
+ <view v-if="prod['paid_amount'] && prod['paid_amount'] > 0" class="coupon_paid">
60
+ 实付: <xd-unit :price="prod['paid_amount']" :isOld="false" color="#333" :iconSize="0.3" :fontSize="32"/>
57
61
  </view>
58
- <view style="font-size: 28rpx;color:#999">{{prod['product_num'] ? 'x': ''}} {{prod['product_num']}}</view>
59
62
  </view>
60
63
  <view v-if="prod.error_message" :style="{color:priceTextColor,fontSize:'24rpx'}">{{prod.error_message}}</view>
61
64
  <view v-else-if="showActivityPrice==='Y'&&prod.is_activity==='Y'"
62
65
  :style="{color:priceTextColor,fontSize:'24rpx'}">活动价</view>
63
66
  </view>
64
67
  </view>
68
+ <view v-if="showLogisticsTip === 'Y' &&
69
+ logisticsTipType === 'prod' &&
70
+ shop.deliveryPickValue === 'logistics'" class="postage_tip">{{ prod.postage_tip || logisticsTipText }}</view>
65
71
  <view v-if="prod.blessingKey" class="wish_comment">
66
72
  <input :maxlength="prod.blessingData.struct.maxlength||16" v-model="prod.blessing" :placeholder="prod.blessingData.value" />
67
73
  <view class="bless_tip"
@@ -107,8 +113,8 @@
107
113
  </template>
108
114
  </view>
109
115
  <!-- <xd-list-item v-if="shop.delivery_message" :label="shop.delivery_message" paddingLR="48rpx" size="large"></xd-list-item> -->
110
- <view v-if="showLogisticsTip === 'Y' && shop.deliveryPickValue === 'logistics'" class="logistics_tip">
111
- {{logisticsTipText}}
116
+ <view v-if="showLogisticsTip === 'Y' && logisticsTipType === 'shop' && shop.deliveryPickValue === 'logistics'" class="logistics_tip">
117
+ {{shop.postage_tip || logisticsTipText}}
112
118
  </view>
113
119
  <view v-if="shop.is_support_delivery == 'N'" :style="{background:bgColor,color:warningColor}" class="err_message">
114
120
  {{shop.message}}
@@ -580,6 +586,7 @@
580
586
  guidePay: "",
581
587
  showLogisticsTip: "Y",
582
588
  logisticsTipText: "",
589
+ logisticsTipType: "", //shop:拆单, prod: 商品
583
590
  checkPayMethod: [],
584
591
  ticketPositionStatus: "N",
585
592
  openVipBtnBgImg: "",
@@ -942,6 +949,7 @@
942
949
  this.guidePay = getContainerPropsValue(container, "content.guidePay", "");
943
950
  this.showLogisticsTip = gCPVal(container, 'showLogisticsTip', "Y");
944
951
  this.logisticsTipText = gCPVal(container, 'logisticsTipText', '订单生成后72小时发货,如遇节假日发货顺延');
952
+ this.logisticsTipType = gCPVal(container, 'logisticsTipType', "shop");
945
953
  this.ticketPositionStatus = gCPVal(container, 'ticketPositionStatus', "N")
946
954
  console.log("this.showLogisticsTip", this.showLogisticsTip);
947
955
  if(this.useMode === "market"){
@@ -1065,11 +1073,46 @@
1065
1073
  if(!this.canUseCoupon) return;
1066
1074
  this.showCouponChose = true;
1067
1075
  },
1076
+ //选择完优惠券,需要在商品上展示实付款信息(商品价格-优惠券优惠价格)
1077
+ handleCouponChoseResult(data){
1078
+ //data.total_coupon_parts: [{"card_number":"10001000008865","part_id":"60031172_0_0","sale_amount":8000,"coupon_amount":5000,"coupon_split":"[{\"card_number\":\"10001000008865\",\"coupon_amount\":5000,\"coupon_point\":5000}]","coupon_point":5000}]
1079
+ if(!data || !this.shopList) return;
1080
+ // total_coupon_parts 为空字符串或空数组代表取消选择优惠券,清除已展示的实付金额
1081
+ if(!data.total_coupon_parts || data.total_coupon_parts.length === 0){
1082
+ this.shopList.forEach(shop => {
1083
+ if(!shop.product) return;
1084
+ shop.product.forEach(prod => {
1085
+ delete prod.paid_amount;
1086
+ });
1087
+ });
1088
+ return;
1089
+ }
1090
+ // 按 part_id 建立映射,快速查找
1091
+ const couponMap = {};
1092
+ data.total_coupon_parts.forEach(item => {
1093
+ couponMap[item.part_id] = item;
1094
+ });
1095
+ // 遍历 shopList 下每个商品的 product,匹配 part_id 计算实付金额
1096
+ this.shopList.forEach(shop => {
1097
+ if(!shop.product) return;
1098
+ shop.product.forEach(prod => {
1099
+ const partId = prod.part_id;
1100
+ const couponItem = couponMap[partId];
1101
+ if(couponItem) {
1102
+ // sale_price、coupon_point 均为分,实付金额 = 商品价格 x 数量 - 优惠券优惠价格
1103
+ prod.paid_amount = (prod.sale_price || 0) * (prod.product_num || 1) - (couponItem.coupon_point || 0);
1104
+ } else {
1105
+ prod.paid_amount = (prod.sale_price || 0) * (prod.product_num || 1);
1106
+ }
1107
+ });
1108
+ });
1109
+ },
1068
1110
  //only选择满减券结果
1069
1111
  handleCouponChose(data){
1070
1112
  console.log(data,'alalalal')
1071
1113
  this.choseCoupon = data;
1072
1114
  this.showCouponChose = false;
1115
+ this.handleCouponChoseResult(data);
1073
1116
  //共同使用模式:优惠券 + 积分 + 钱包可叠加
1074
1117
  //串行逻辑:先选积分 → 积分选完后检查 orderNeedPayPrice > 0 才选钱包
1075
1118
  if(this.is_wallet_use_with_coupon === "Y"){
@@ -1952,6 +1995,11 @@
1952
1995
  font-size: 24rpx;
1953
1996
  color: var(--g-theme-dangerColor);
1954
1997
  }
1998
+ .shop_postage{
1999
+ padding: 0 var(--cont-lr-padding) 24rpx;
2000
+ font-size: 24rpx;
2001
+ color: var(--g-theme-dangerColor);
2002
+ }
1955
2003
  .err_message{
1956
2004
  padding: 20rpx var(--cont-lr-padding);
1957
2005
  font-size: 24rpx;
@@ -2026,6 +2074,18 @@
2026
2074
  align-items: flex-end;
2027
2075
  justify-content: space-between;
2028
2076
  }
2077
+ .coupon_paid{
2078
+ font-size: 28rpx;
2079
+ color:#999;
2080
+ display:flex;
2081
+ align-items: center;
2082
+ }
2083
+ }
2084
+ .postage_tip{
2085
+ color: rgb(229, 116, 112);
2086
+ font-size: 24rpx;
2087
+ padding: 0 var(--cont-lr-padding);
2088
+ margin: 10px 0;
2029
2089
  }
2030
2090
  .wish_comment{
2031
2091
  padding: 0 var(--cont-lr-padding);
@@ -163,6 +163,7 @@ module.exports = {
163
163
  group_id: "61527_3_1_1_1_0_YLYO6_3-vLG2sP8ytvmHF",
164
164
  is_support_delivery: "Y",
165
165
  message: "可以配送.",
166
+ postage_tip: "订单将在活动结算后5个工作日内完成发货",
166
167
  user_logistics_amount_origin: "50",
167
168
  supplier_partner_id: 161,
168
169
  show_subscribe_time_list: [],
@@ -207,6 +208,7 @@ module.exports = {
207
208
  "https://sandbox-img.jufubao.cn/uploads/20230406/0b890cd5a947d9c5724b412d34cd4000.png",
208
209
  product_form_data:
209
210
  '[{"id":"blessing","type":"input","struct":{"title":"祝福语","explain":"请务必准确填写号码,号码错误将无法进行退还操作。","default":"","placeholder":"","required":true},"options":[],"value":"祝福语"}]',
211
+ postage_tip: "订单生成后72小时发货",
210
212
  brand_id: 3,
211
213
  brand_name: "北京味多美蛋糕叔叔/HEYTEA/喜茶/凯蒂猫/Quange/全格",
212
214
  aftersale_service: ",refund,exchange",
@@ -339,6 +339,19 @@ export default function (data, gValue,gColor,oldData){
339
339
  notice:'仅针对配送方式为快递的商品展示',
340
340
  },
341
341
  {ele: 'group_start'},
342
+ {
343
+ label: "展示方式",
344
+ ele: "xd-radio",
345
+ valueKey: "logisticsTipType",
346
+ value: dataVal({data, key:'logisticsTipType', dValue: 'shop', gValue}),
347
+ groupKey:'content',
348
+ list: [
349
+ { label: "按拆单展示", value: "shop"},
350
+ { label: "按商品展示", value: "prod"},
351
+ ],
352
+ hidden: data.showLogisticsTip === 'N',
353
+ labelInline: true,
354
+ },
342
355
  {
343
356
  label: "",
344
357
  ele: "el-input",
@@ -105,14 +105,12 @@ export default {
105
105
  this.showShopList = false;
106
106
  return;
107
107
  }
108
+
108
109
  jfbRootExec("getShopTakeTime", {
109
110
  vm: this,
110
111
  data: {
111
112
  resource_shop_id: shop.resource_shop_id,
112
- shop_id: shop.shop_id,
113
- cart_order_id: this.order_id,
114
- address_nnid: this.curAddr ? this.curAddr.address_nnid : "",
115
- delivery_method: curShop.deliveryPickValue
113
+ shop_id: shop.shop_id
116
114
  }
117
115
  }).then(res => {
118
116
  this.shopList = this.shopList.map((item, index) => {
@@ -361,7 +361,7 @@ module.exports = {
361
361
  "a": "",
362
362
  },
363
363
  ],
364
- desc:'到店消费任意金额可用',
364
+ desc:'请到店出示电子券核验',
365
365
  consume_mode:'JHD'
366
366
  },
367
367
  {