wangfukang 3 weeks ago
parent
commit
de6a736889
  1. 25
      package1/buyFood/buyFood.vue
  2. 23
      package1/group/groupBuySingle.vue
  3. 1
      package1/index/deliveryPersonList.vue

25
package1/buyFood/buyFood.vue

@ -36,7 +36,10 @@
<view class="ziqu-address">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/e13c675ffd4547d0b271900902ffea66.png" alt="" />
<view class="ziqu-text">
北校区1食堂3楼12号窗口杨国福麻辣烫
{{shopItem.shopName || '未知商家'}}
</view>
<view class="ziqu-text">
地址{{shopItem.shopAddress || ''}}
</view>
</view>
</view>
@ -188,7 +191,7 @@
</block>
<view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;">
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="isPaotui">
<view style="flex: 1;color: #777;font-weight: 700;">
打包费
</view>
@ -198,7 +201,7 @@
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="isPaotui">
<view style="flex: 1;color: #777;font-weight: 700;">
配送费 <text v-if="isGroupBuy" style="font-size: 20rpx;color: #999;">(均摊)</text>
配送费 <text v-if="isFaceToFace" style="font-size: 20rpx;color: #999;">(均摊 | 超过2人每多一人配送费总额增加0.5)</text>
</view>
<view style="color: #000;font-weight:700;">
{{deliveryFeeCalc.toFixed(2)}}
@ -289,7 +292,7 @@
<view style="position: absolute;bottom: 0;width: 100%;height: 760rpx;">
<view class="kaituan1">
<view class="kaituan1-title">
差1人即可成团
{{groupItem.groupRule.groupCount - 1}}人即可成团
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/21b403bd13414ce79ad73cf1c8e3de98.png"
alt="" style="width: 120rpx;height: 22rpx;position: absolute;bottom: 0;right: 30rpx;" />
</view>
@ -299,7 +302,7 @@
</view>
<view class="kaituan2">
<view class="kaituan22">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/801c569079da4540990c1cc634186fdd.png"
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/ecd00dab1c9c44198d765bc08bc1bd71.png"
alt=""
style="width: 90rpx;height: 90rpx;border-radius: 90rpx;margin: 0 auto;display: block;" />
</view>
@ -430,15 +433,19 @@
let members = parseInt(this.groupItem.groupRule.groupCount) || 1;
if (this.selected === 'zhiding') {
let extra = members > 2 ? (members - 2) * 0.5 : 0;
return Math.ceil(((commission + extra) / members) * 10) / 10;
return Math.ceil(((commission + extra) / members) * 100) / 100;
} else {
return Math.ceil((commission / members) * 10) / 10;
return Math.ceil((commission / members) * 100) / 100;
}
}
return commission;
},
totalAmountCalc() {
return this.goodsAmountCalc + this.packageFee + this.deliveryFeeCalc;
if(this.isPaotui==true){
return this.goodsAmountCalc + this.packageFee + this.deliveryFeeCalc;
}else{
return this.goodsAmountCalc;
}
}
},
onShow() {
@ -462,7 +469,7 @@
},
onShareAppMessage(res) {
if (this.isPaymentSuccessGroupInitiate) {
let groupId = this.createdOrderInfo?.groupId || this.createdOrderInfo?.groupDeliveryOrderId || this.createdOrderInfo?.id || this.currentOrderId;
let groupId = this.createdOrderInfo.groupInfo.id;
let targetMembers = this.groupItem?.groupRule?.groupCount || 2;
let shopItemStr = encodeURIComponent(JSON.stringify(this.shopItem));
let isFTF = this.isFaceToFace ? 1 : 0;

23
package1/group/groupBuySingle.vue

@ -134,7 +134,7 @@
style="background: rgba(166, 255, 234, 0.3);margin-right: 6%;border: 1px solid rgba(166, 255, 234, 0.5);">
直接购买¥{{item.attributeListPrice | sliceMsg}}
</view>
<view class="goods-btn" :style="groupId ? 'width:100%;' : ''" @tap="openPopup('xiadan','pintuan',item)">
<view class="goods-btn" :style="{'float':groupId != ''?'right':''}" @tap="openPopup('xiadan','pintuan',item)">
拼团购买¥{{ getGroupPrice(item) }}
</view>
</view>
@ -285,7 +285,7 @@
</view>
<template
v-if="isPintuan && currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
v-if="groupId == '' && isPintuan && currentItem.productGroupBuyPrices && currentItem.productGroupBuyPrices.length > 0">
<view class="spec11">
成团选择
</view>
@ -348,7 +348,7 @@
</template>
<template v-else>
<view class="pintuan2"
style="width: 100%; border-radius: 50px; background: rgba(0, 35, 28, 1); color: rgba(166, 255, 234, 1);"
style="width: 100%; border-radius: 50px; "
@tap="submitPintuan(false)">
参与拼团{{selectedGroupRule && selectedGroupRule.groupPrice ? parseFloat(selectedGroupRule.groupPrice).toFixed(2) : '0.00'}}
</view>
@ -485,6 +485,9 @@
<view style="height: 40rpx;text-align: center;color: red;">
若拼团失败将会为您自动退款
</view>
<view v-if="groupId != '' && isFaceToFaceGroup" style="height: 40rpx;text-align: center;color: red;">
包含打包费 {{currentItem.lunchBox}} 配送费(均摊) {{tuanzhangOrder.deliveryFee}}
</view>
</view>
<view class="box1" style="display: flex;padding: 40rpx;">
<view style="flex: 1;">
@ -546,6 +549,7 @@
shopItem: {},
productId: '',
productItem: [],
tuanzhangOrder:{},
cartItems: [],
currentItem: {},
parsedSpecs: [],
@ -654,6 +658,17 @@
}
if (option.isFaceToFace) {
this.isFaceToFaceGroup = option.isFaceToFace === '1' || option.isFaceToFace === 'true';
if(this.isFaceToFaceGroup){
this.tui.request("/mall/order/selectMallOrderByGroupId/"+this.groupId, "GET", {}, false, true).then((res) => {
if (res.code == 200) {
this.tuanzhangOrder = res.result;
} else {
that.tui.toast(res.message)
return
}
uni.hideLoading()
}).catch((res) => {})
}
}
if (option.targetMembers) {
this.targetMembers = parseInt(option.targetMembers);
@ -910,7 +925,7 @@
let payload = {
userId: uni.getStorageSync('id') || 'test-user123',
shopId: this.shopItem.id,
deliveryType: 1,
deliveryType: this.tuanzhangOrder.deliveryType,
packageFee: packageFee,
remark: '',
items: items,

1
package1/index/deliveryPersonList.vue

@ -123,6 +123,7 @@
// Fake request to our new endpoint
let payload = {
shopAreaId: this.shopAreaId,
orderType: 0,
putAreaId: this.putAreaId,
baozhang: this.baozhang,
xiangtong: this.xiangtong,

Loading…
Cancel
Save