|
@@ -32,7 +32,7 @@
|
|
|
<view class="plant-area" v-if="orderType == 3">面积:{{orderData.areaSize}}㎡</view>
|
|
|
<view class="goods-price-number">
|
|
|
<text class="goods-unit">¥</text>
|
|
|
- <text class="goods-price">{{orderType == 1 ? item.bizPrice : paySum}}</text>
|
|
|
+ <text class="goods-price">{{(orderType == 1 || orderType == 3) ? item.bizPrice : paySum}}</text>
|
|
|
<text class="goods-number">x{{item.buyNum}}</text>
|
|
|
<text class="plant-text" v-if="orderType == 3">有效期:{{orderData.term}}天</text>
|
|
|
</view>
|
|
@@ -42,7 +42,7 @@
|
|
|
<view class="order-info">
|
|
|
<u-cell-group :border="false">
|
|
|
<u-cell-item title="商品金额" :arrow="false" :border-bottom="false" title-width="170" :title-style="{textAlign: 'right'}">
|
|
|
- <text class="order-text-right">¥{{orderType == 1 ? getAllGoodsInitialPrice() : paySum}}</text>
|
|
|
+ <text class="order-text-right">¥{{(orderType == 1 || orderType == 3) ? getAllGoodsInitialPrice() : paySum}}</text>
|
|
|
</u-cell-item>
|
|
|
<u-cell-item title="积分抵扣" :arrow="false" :border-bottom="false" title-width="170" :title-style="{textAlign: 'right'}"
|
|
|
v-if="orderType == 1">
|
|
@@ -65,14 +65,14 @@
|
|
|
<view class="pay-info">
|
|
|
<text class="pay-text">共{{getAllGoodsNumber()}}件</text>
|
|
|
<text class="pay-text">总计</text>
|
|
|
- <text class="pay-price">¥{{orderType == 1 ? getAllGoodsPrice() : paySum}}</text>
|
|
|
+ <text class="pay-price">¥{{(orderType == 1 || orderType == 3) ? getAllGoodsPrice() : paySum}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="handle-box">
|
|
|
<view class="handle-info">
|
|
|
<text class="handle-text" style="margin-right: 12px;">共{{getAllGoodsNumber()}}件</text>
|
|
|
<text class="handle-text">合计:</text>
|
|
|
- <text class="handle-price">¥{{orderType == 1 ? getAllGoodsPrice() : paySum}}</text>
|
|
|
+ <text class="handle-price">¥{{(orderType == 1 || orderType == 3) ? getAllGoodsPrice() : paySum}}</text>
|
|
|
</view>
|
|
|
<view class="handle-button" @click="submitOrder()">提交订单</view>
|
|
|
</view>
|
|
@@ -253,7 +253,7 @@
|
|
|
type: 'warning',
|
|
|
})
|
|
|
} else {
|
|
|
- let paySum = this.orderType == 1 ? this.getAllGoodsPrice() : this.paySum
|
|
|
+ let paySum = (this.orderType == 1 || this.orderType == 3) ? this.getAllGoodsPrice() : this.paySum
|
|
|
NET.request(API.submitOrder, {
|
|
|
// 会员
|
|
|
mid: this.userData.userId,
|
|
@@ -275,22 +275,24 @@
|
|
|
...site,
|
|
|
supplierName: this.orderData.supplierName,
|
|
|
tenantCode: this.orderData.tenantCode,
|
|
|
- bizPrice: this.orderType == 1 ? site.bizPrice : this.paySum,
|
|
|
+ bizPrice: (this.orderType == 1 || this.orderType == 3) ? site.bizPrice : this.paySum,
|
|
|
}
|
|
|
}),
|
|
|
// 优惠券
|
|
|
couponId: this.orderType == 1 ? this.coupon.couponId : '',
|
|
|
+ // 优惠券优惠总额
|
|
|
couponDiscountAmount: this.orderType == 1 ? this.coupon.discountAmount : '',
|
|
|
couponType: this.orderType == 1 ? this.coupon.couponType : '',
|
|
|
// 积分
|
|
|
integralValue: this.orderType == 1 ? this.getIntegral() : 0,
|
|
|
+ // 积分优惠总额
|
|
|
integralAmount: this.orderType == 1 ? this.getIntegral() / 100 : 0,
|
|
|
- // 金额
|
|
|
- discountAmount: this.orderType == 1 ? (parseFloat(this.coupon.discountAmount) + (this.getIntegral() / 100)) : 0,
|
|
|
- orderSum: this.orderType == 1 ? this.orderData.goodsList.reduce((total, site) => {
|
|
|
+ // 总优惠金额
|
|
|
+ discountAmount: this.orderType == 1 ? (parseFloat(this.coupon.discountAmount) + (this.getIntegral() / 100)) : 0, // 订单总金额(优惠前)
|
|
|
+ orderSum: (this.orderType == 1 || this.orderType == 3) ? this.orderData.goodsList.reduce((total, site) => {
|
|
|
return total + site.bizPrice * site.buyNum
|
|
|
}, 0) : this.paySum,
|
|
|
- paySum: this.orderType == 1 ? this.getAllGoodsPrice() : this.paySum,
|
|
|
+ paySum: (this.orderType == 1 || this.orderType == 3) ? this.getAllGoodsPrice() : this.paySum,
|
|
|
// 支付类型
|
|
|
flag: this.flag,
|
|
|
orderType: this.orderType,
|