wangfukang 1 day ago
parent
commit
d59532907f
  1. 5
      package1/buyFood/buyFood.vue
  2. 23
      package1/order/returnOrder.vue

5
package1/buyFood/buyFood.vue

@ -751,7 +751,10 @@
}, },
wxPayment() { wxPayment() {
let that = this; let that = this;
if (!this.currentOrderId || !this.backendTotalAmount) return; if (!this.currentOrderId || !this.backendTotalAmount) {
that.tui.toast(this.currentOrderId + this.backendTotalAmount);
return;
}
let amountInCents = Math.round(this.backendTotalAmount * 100); let amountInCents = Math.round(this.backendTotalAmount * 100);
let payDesc = '商城订单'; let payDesc = '商城订单';

23
package1/order/returnOrder.vue

@ -67,12 +67,12 @@
{{orderDetail.deliveryFee}} {{orderDetail.deliveryFee}}
</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.userCouponNum > 0">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
优惠券 优惠券
</view> </view>
<view style="color: #000;font-weight:700;"> <view style="color: #000;font-weight:700;">
-1 <uni-icons type="right" size="12"></uni-icons> -{{orderDetail.userCouponNum}} <uni-icons type="right" size="12"></uni-icons>
</view> </view>
</view> </view>
</view> </view>
@ -411,7 +411,7 @@
this.returnData.orderId = this.orderDetail.id this.returnData.orderId = this.orderDetail.id
this.returnData.userId = this.orderDetail.userId this.returnData.userId = this.orderDetail.userId
this.returnData.shopId = this.orderDetail.shopId this.returnData.shopId = this.orderDetail.shopId
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.orderDetail.packageFee
if(this.orderDetail.deliveryInfo){ if(this.orderDetail.deliveryInfo){
@ -422,7 +422,9 @@
for(let i = 0; i< this.orderDetail.goodsList.length;i++){ for(let i = 0; i< this.orderDetail.goodsList.length;i++){
if(this.orderDetail.goodsList[i].returnCount){ if(this.orderDetail.goodsList[i].returnCount){
this.orderDetail.goodsList[i].quantity = this.orderDetail.goodsList[i].returnCount this.orderDetail.goodsList[i].quantity = this.orderDetail.goodsList[i].returnCount
this.orderDetail.goodsList[i].price = Number(this.orderDetail.goodsList[i].price) + Number(this.orderDetail.goodsList[i].packageFee) if(this.orderDetail.deliveryType == 1){
this.orderDetail.goodsList[i].price = Number(this.orderDetail.goodsList[i].price) + Number(this.orderDetail.goodsList[i].packageFee)
}
this.returnData.items.push(this.orderDetail.goodsList[i]) this.returnData.items.push(this.orderDetail.goodsList[i])
} }
} }
@ -466,12 +468,21 @@
if(type == 'plus'){ if(type == 'plus'){
if((this.orderDetail.goodsList[index].returnCount + 1) <= this.orderDetail.goodsList[index].quantity){ if((this.orderDetail.goodsList[index].returnCount + 1) <= this.orderDetail.goodsList[index].quantity){
this.orderDetail.goodsList[index].returnCount += 1 this.orderDetail.goodsList[index].returnCount += 1
this.returnData.refundAmount += Number(Number(this.orderDetail.goodsList[index].price + this.orderDetail.goodsList[index].packageFee).toFixed(2)) if(this.orderDetail.deliveryType == 1){
this.returnData.refundAmount += Number(Number(this.orderDetail.goodsList[index].price + this.orderDetail.goodsList[index].packageFee).toFixed(2))
}else{
this.returnData.refundAmount += Number(this.orderDetail.goodsList[index].price)
}
this.returnData.refundAmount = Number(this.returnData.refundAmount.toFixed(2)) this.returnData.refundAmount = Number(this.returnData.refundAmount.toFixed(2))
} }
}else{ }else{
if(this.orderDetail.goodsList[index].returnCount > 0){ if(this.orderDetail.goodsList[index].returnCount > 0){
this.returnData.refundAmount -= Number(Number(this.orderDetail.goodsList[index].price + this.orderDetail.goodsList[index].packageFee).toFixed(2)) if(this.orderDetail.deliveryType == 1){
this.returnData.refundAmount -= Number(Number(this.orderDetail.goodsList[index].price + this.orderDetail.goodsList[index].packageFee).toFixed(2))
}else{
this.returnData.refundAmount -= Number(this.orderDetail.goodsList[index].price)
}
this.returnData.refundAmount = Number(this.returnData.refundAmount.toFixed(2)) this.returnData.refundAmount = Number(this.returnData.refundAmount.toFixed(2))
} }
this.orderDetail.goodsList[index].returnCount = this.orderDetail.goodsList[index].returnCount > 0 ?this.orderDetail.goodsList[index].returnCount -= 1:0 this.orderDetail.goodsList[index].returnCount = this.orderDetail.goodsList[index].returnCount > 0 ?this.orderDetail.goodsList[index].returnCount -= 1:0

Loading…
Cancel
Save