wangfukang 1 month ago
parent
commit
eb875e12d1
  1. 10
      package1/buyFood/buyFood.vue
  2. 9
      package1/order/orderDetail.vue
  3. 11
      package1/order/returnOrder.vue

10
package1/buyFood/buyFood.vue

@ -2,7 +2,7 @@
<!-- 代买饭页 --> <!-- 代买饭页 -->
<page-meta :page-style="addressBookVisible ? 'overflow: hidden;' : 'overflow: visible;'"></page-meta> <page-meta :page-style="addressBookVisible ? 'overflow: hidden;' : 'overflow: visible;'"></page-meta>
<view class="page1" :class="{'store-group-checkout': isStoreGroupOrder, 'page1--locked': addressBookVisible}"> <view class="page1" :class="{'store-group-checkout': isStoreGroupOrder, 'page1--locked': addressBookVisible}">
<view class="checkout-fixed-header" :class="{'checkout-fixed-header--store': isStoreGroupOrder, 'checkout-fixed-header--paying': payPopupVisible}"> <view class="checkout-fixed-header" :class="{'checkout-fixed-header--store': isStoreGroupOrder, 'checkout-fixed-header--paying': payPopupVisible || commissionPopupVisible}">
<view class="title"> <view class="title">
<view class="title-sreach"> <view class="title-sreach">
<view class="back-btn" @tap="back" :style="{'top': menuButtonInfo.top +'px'}"> <view class="back-btn" @tap="back" :style="{'top': menuButtonInfo.top +'px'}">
@ -28,7 +28,7 @@
<view class="store-float-tag tag-b">同校热拼</view> --> <view class="store-float-tag tag-b">同校热拼</view> -->
</view> </view>
</view> </view>
<view class="pay-popup-header-mask" v-if="payPopupVisible"></view> <view class="pay-popup-header-mask" v-if="payPopupVisible || commissionPopupVisible" @tap.stop></view>
<view class="tab-wrap" v-if="!isStoreGroupOrder"> <view class="tab-wrap" v-if="!isStoreGroupOrder">
<view class="tab1" v-if="isPaotui"> <view class="tab1" v-if="isPaotui">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6b3a4d4c61ee42feb29e69d6fcfd2c1e.png" alt="" <img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6b3a4d4c61ee42feb29e69d6fcfd2c1e.png" alt=""
@ -611,6 +611,7 @@
isNavigatingToWorkerList: false, isNavigatingToWorkerList: false,
isSeckillOrder: false, isSeckillOrder: false,
payPopupVisible: false, payPopupVisible: false,
commissionPopupVisible: false,
baseDeliveryFee: 0 baseDeliveryFee: 0
} }
}, },
@ -875,6 +876,7 @@
openCommissionPopup() { openCommissionPopup() {
this.commissionInputValue = ''; this.commissionInputValue = '';
this.commissionInputFocus = false; this.commissionInputFocus = false;
this.commissionPopupVisible = true;
this.$refs.commissionPopup.open('center'); this.$refs.commissionPopup.open('center');
this.$nextTick(() => { this.$nextTick(() => {
setTimeout(() => { setTimeout(() => {
@ -884,10 +886,12 @@
}, },
closeCommissionPopup() { closeCommissionPopup() {
this.commissionInputFocus = false; this.commissionInputFocus = false;
this.commissionPopupVisible = false;
uni.hideKeyboard(); uni.hideKeyboard();
this.$refs.commissionPopup.close(); this.$refs.commissionPopup.close();
}, },
onCommissionPopupChange(e) { onCommissionPopupChange(e) {
this.commissionPopupVisible = e.show;
if (!e.show) { if (!e.show) {
this.commissionInputFocus = false; this.commissionInputFocus = false;
uni.hideKeyboard(); uni.hideKeyboard();
@ -1628,7 +1632,7 @@
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.45); background: rgba(0, 0, 0, 0.45);
z-index: 20; z-index: 20;
pointer-events: none; pointer-events: auto;
} }
.checkout-fixed-header--store { .checkout-fixed-header--store {

9
package1/order/orderDetail.vue

@ -510,6 +510,15 @@
快递/跑腿 快递/跑腿
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 2 && orderDetail.otherOrder == null && orderDetail.isPack != null">
<view style="flex: 1;color: #777;font-weight: 700;">
用餐方式
</view>
<view style="color: #000;font-weight: 700;">
{{orderDetail.isPack == 1 ? '打包' : '堂食'}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.numberCode != null"> v-if="orderDetail.numberCode != null">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">

11
package1/order/returnOrder.vue

@ -57,7 +57,7 @@
</view> </view>
<view> <view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.packageFee != null && orderDetail.packageFee > 0"> v-if="shouldIncludePackageFee() && orderDetail.packageFee != null && orderDetail.packageFee > 0">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
打包费 打包费
</view> </view>
@ -465,6 +465,9 @@
let num = Number(value) let num = Number(value)
return isNaN(num) ? 0 : num return isNaN(num) ? 0 : num
}, },
shouldIncludePackageFee() {
return this.orderDetail.deliveryType == 1 || this.orderDetail.isPack == 1
},
getCouponAmount() { getCouponAmount() {
if (this.toAmount(this.orderDetail.userCouponNum) > 0) { if (this.toAmount(this.orderDetail.userCouponNum) > 0) {
return this.toAmount(this.orderDetail.userCouponNum) return this.toAmount(this.orderDetail.userCouponNum)
@ -586,7 +589,7 @@
this.returnData.shopId = this.orderDetail.shopId this.returnData.shopId = this.orderDetail.shopId
this.returnData.totalAmount = this.orderDetail.totalAmount this.returnData.totalAmount = this.orderDetail.totalAmount
this.returnData.goodsAmount = this.orderDetail.goodsAmount this.returnData.goodsAmount = this.orderDetail.goodsAmount
this.returnData.packageFee = this.orderDetail.packageFee this.returnData.packageFee = this.shouldIncludePackageFee() ? this.orderDetail.packageFee : 0
if (this.orderDetail.deliveryInfo) { if (this.orderDetail.deliveryInfo) {
this.returnData.workerId = this.orderDetail.deliveryInfo.workerId this.returnData.workerId = this.orderDetail.deliveryInfo.workerId
this.returnData.deliveryFee = this.orderDetail.deliveryFee this.returnData.deliveryFee = this.orderDetail.deliveryFee
@ -658,7 +661,7 @@
if ((this.orderDetail.goodsList[index].returnCount + 1) <= this.orderDetail.goodsList[index] if ((this.orderDetail.goodsList[index].returnCount + 1) <= this.orderDetail.goodsList[index]
.quantity) { .quantity) {
this.orderDetail.goodsList[index].returnCount += 1 this.orderDetail.goodsList[index].returnCount += 1
if (this.orderDetail.deliveryType == 1 || this.orderDetail.isPack == 1) { if (this.shouldIncludePackageFee()) {
if(this.orderDetail.packageFee > 0){ if(this.orderDetail.packageFee > 0){
this.returnData.refundAmount += Number((this.toAmount(this.orderDetail.goodsList[index].price) + this this.returnData.refundAmount += Number((this.toAmount(this.orderDetail.goodsList[index].price) + this
.toAmount(this.orderDetail.goodsList[index].packageFee)).toFixed(2)) .toAmount(this.orderDetail.goodsList[index].packageFee)).toFixed(2))
@ -674,7 +677,7 @@
} }
} else { } else {
if (this.orderDetail.goodsList[index].returnCount > 0) { if (this.orderDetail.goodsList[index].returnCount > 0) {
if (this.orderDetail.deliveryType == 1 || this.orderDetail.isPack == 1) { if (this.shouldIncludePackageFee()) {
if(this.orderDetail.packageFee > 0){ if(this.orderDetail.packageFee > 0){
this.returnData.refundAmount -= Number((this.toAmount(this.orderDetail.goodsList[index].price) + this this.returnData.refundAmount -= Number((this.toAmount(this.orderDetail.goodsList[index].price) + this
.toAmount(this.orderDetail.goodsList[index].packageFee)).toFixed(2)) .toAmount(this.orderDetail.goodsList[index].packageFee)).toFixed(2))

Loading…
Cancel
Save