|
@@ -30,10 +30,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="flex margin-top" style="align-items: center">
|
|
<view class="flex margin-top" style="align-items: center">
|
|
|
- <view style="font-size: 32rpx;color: #333333;font-weight: bold;">是否店内就餐?</view>
|
|
|
|
|
- <view style="margin-left: 140px;transform: scale(0.8); "><switch :checked="ispackType" @change="handleSwitchChange" color="#4cd964"/></view>
|
|
|
|
|
|
|
+ <view style="font-size: 32rpx; color: #333333; font-weight: bold">是否店内就餐?</view>
|
|
|
|
|
+ <view style="margin-left: 140px; transform: scale(0.8)"><switch :checked="ispackType" @change="handleSwitchChange" color="#4cd964" /></view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view style="color: #ea0018;">(店内就餐减免打包费)</view>
|
|
|
|
|
|
|
+ <view style="color: #ea0018">(店内就餐减免打包费)</view>
|
|
|
<view class="flex margin-top" style="align-items: center" v-if="shopTypeName == '三大运营商'">
|
|
<view class="flex margin-top" style="align-items: center" v-if="shopTypeName == '三大运营商'">
|
|
|
<view>请填写身份证号:</view>
|
|
<view>请填写身份证号:</view>
|
|
|
<input type="idcard" v-model="idcard1" style="border: 1px solid" />
|
|
<input type="idcard" v-model="idcard1" style="border: 1px solid" />
|
|
@@ -95,7 +95,7 @@
|
|
|
<view v-if="item.skuMessage">{{ item.skuMessage }}</view>
|
|
<view v-if="item.skuMessage">{{ item.skuMessage }}</view>
|
|
|
<view>x{{ item.goodsNum }}</view>
|
|
<view>x{{ item.goodsNum }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="flex justify-between align-center text-gray margin-tb-sm" v-if="item.goodsPack&&packType==1">
|
|
|
|
|
|
|
+ <view class="flex justify-between align-center text-gray margin-tb-sm" v-if="item.goodsPack && packType == 1">
|
|
|
<view>打包费</view>
|
|
<view>打包费</view>
|
|
|
<view class="">¥{{ item.goodsPack }} / 份</view>
|
|
<view class="">¥{{ item.goodsPack }} / 份</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -113,32 +113,32 @@
|
|
|
<view>特殊地址跑腿费</view>
|
|
<view>特殊地址跑腿费</view>
|
|
|
<view class="tosend_header_do_ri">¥{{ address.insideDeliveryFee }}</view>
|
|
<view class="tosend_header_do_ri">¥{{ address.insideDeliveryFee }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="tosend_header_do justify-between" v-if="Vipmoney.canReduceFlag=='1'">
|
|
|
|
|
|
|
+ <view class="tosend_header_do justify-between" v-if="Vipmoney.canReduceFlag == '1'">
|
|
|
<view>会员立减</view>
|
|
<view>会员立减</view>
|
|
|
<view class="tosend_header_do_ri">- ¥{{ Vipmoney.reduceAmount }}</view>
|
|
<view class="tosend_header_do_ri">- ¥{{ Vipmoney.reduceAmount }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag=='1'">
|
|
|
|
|
|
|
+ <view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag == '1'">
|
|
|
<view>优惠券</view>
|
|
<view>优惠券</view>
|
|
|
<!-- <view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
|
|
<!-- <view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
|
|
|
<view v-else>
|
|
<view v-else>
|
|
|
<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
|
|
<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
|
|
|
</view> -->
|
|
</view> -->
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="tosend_header_do justify-between do_bot" @click="isShow" v-if="Vipmoney.canReduceFlag=='0'">
|
|
|
|
|
|
|
+ <view class="tosend_header_do justify-between do_bot" @click="isShow" v-if="Vipmoney.canReduceFlag == '0'">
|
|
|
<view>优惠券</view>
|
|
<view>优惠券</view>
|
|
|
<view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
|
|
<view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
|
|
|
<view v-else>
|
|
<view v-else>
|
|
|
<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
|
|
<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag=='1'">
|
|
|
|
|
|
|
+ <view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag == '1'">
|
|
|
<view>优惠活动</view>
|
|
<view>优惠活动</view>
|
|
|
<!-- <view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
|
|
<!-- <view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
|
|
|
<view v-else>
|
|
<view v-else>
|
|
|
<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
|
|
<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
|
|
|
</view> -->
|
|
</view> -->
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="tosend_header_do justify-between do_bot" @click="huodongShow" v-if="Vipmoney.canReduceFlag=='0'">
|
|
|
|
|
|
|
+ <view class="tosend_header_do justify-between do_bot" @click="huodongShow" v-if="Vipmoney.canReduceFlag == '0'">
|
|
|
<view>优惠活动</view>
|
|
<view>优惠活动</view>
|
|
|
<view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
|
|
<view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
|
|
|
<view v-else>
|
|
<view v-else>
|
|
@@ -357,7 +357,7 @@ export default {
|
|
|
packMoney: 0, //打包费
|
|
packMoney: 0, //打包费
|
|
|
totalPrice: 0,
|
|
totalPrice: 0,
|
|
|
totalPrice1: 0,
|
|
totalPrice1: 0,
|
|
|
- totalPrice12:0,
|
|
|
|
|
|
|
+ totalPrice12: 0,
|
|
|
address: {
|
|
address: {
|
|
|
insideDeliveryFee: 0
|
|
insideDeliveryFee: 0
|
|
|
}, //地址
|
|
}, //地址
|
|
@@ -369,11 +369,11 @@ export default {
|
|
|
coupon: '',
|
|
coupon: '',
|
|
|
shopDet: '',
|
|
shopDet: '',
|
|
|
huodong: '', //选择的活动信息
|
|
huodong: '', //选择的活动信息
|
|
|
- Vipmoney:{
|
|
|
|
|
- canReduceFlag:'0',
|
|
|
|
|
- reduceAmount:0,
|
|
|
|
|
- vipReduceDesc:''
|
|
|
|
|
- },//会员立减金额
|
|
|
|
|
|
|
+ Vipmoney: {
|
|
|
|
|
+ canReduceFlag: '0',
|
|
|
|
|
+ reduceAmount: 0,
|
|
|
|
|
+ vipReduceDesc: ''
|
|
|
|
|
+ }, //会员立减金额
|
|
|
couponList: [],
|
|
couponList: [],
|
|
|
huoList: [], //可用活动
|
|
huoList: [], //可用活动
|
|
|
orderType: 2, //1表示到店自取 2表示外卖配送
|
|
orderType: 2, //1表示到店自取 2表示外卖配送
|
|
@@ -423,8 +423,8 @@ export default {
|
|
|
isIntegral: false,
|
|
isIntegral: false,
|
|
|
shopTypeName: '', //店铺类型
|
|
shopTypeName: '', //店铺类型
|
|
|
idcard1: '', //身份证号
|
|
idcard1: '', //身份证号
|
|
|
- packType:1,//堂食0,到店外卖打包1
|
|
|
|
|
- ispackType:false,
|
|
|
|
|
|
|
+ packType: 1, //堂食0,到店外卖打包1
|
|
|
|
|
+ ispackType: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
@@ -472,7 +472,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
this.getMsgData()
|
|
this.getMsgData()
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId')
|
|
this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId')
|
|
|
if (this.addressId) {
|
|
if (this.addressId) {
|
|
|
this.getAddressDet(this.addressId)
|
|
this.getAddressDet(this.addressId)
|
|
@@ -497,54 +497,64 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
// 开关状态变化时触发
|
|
// 开关状态变化时触发
|
|
|
handleSwitchChange(e) {
|
|
handleSwitchChange(e) {
|
|
|
- this.ispackType = e.detail.value; // 更新状态
|
|
|
|
|
- console.log("开关状态:", this.ispackType);
|
|
|
|
|
- // 可在此处添加业务逻辑(如保存状态到缓存、调用接口等)
|
|
|
|
|
- if (this.ispackType) {
|
|
|
|
|
- this.packType=0
|
|
|
|
|
- } else {
|
|
|
|
|
- this.packType=1
|
|
|
|
|
- }
|
|
|
|
|
- console.log("堂食或:packType", this.packType);
|
|
|
|
|
- if (this.orderType == 2) {
|
|
|
|
|
- this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
|
|
- } else {
|
|
|
|
|
- if(this.packType==1){
|
|
|
|
|
- this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- this.getvipMoney()
|
|
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (totalMoney <= 0) {
|
|
|
|
|
- this.totalPrice12 = 0.01
|
|
|
|
|
- } else {
|
|
|
|
|
- this.totalPrice12 = totalMoney
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.ispackType = e.detail.value // 更新状态
|
|
|
|
|
+ console.log('开关状态:', this.ispackType)
|
|
|
|
|
+ // 可在此处添加业务逻辑(如保存状态到缓存、调用接口等)
|
|
|
|
|
+ if (this.ispackType) {
|
|
|
|
|
+ this.packType = 0
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.packType = 1
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log('堂食或:packType', this.packType)
|
|
|
|
|
+ if (this.orderType == 2) {
|
|
|
|
|
+ this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
|
|
+ this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.getvipMoney()
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (totalMoney <= 0) {
|
|
|
|
|
+ this.totalPrice12 = 0.01
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.totalPrice12 = totalMoney
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
//获取会员立减金额
|
|
//获取会员立减金额
|
|
|
getvipMoney() {
|
|
getvipMoney() {
|
|
|
let data = {
|
|
let data = {
|
|
|
// shopId: this.shopId,
|
|
// shopId: this.shopId,
|
|
|
- userId: uni.getStorageSync('userId'),
|
|
|
|
|
|
|
+ userId: uni.getStorageSync('userId')
|
|
|
// originalPrice:this.totalPrice1
|
|
// originalPrice:this.totalPrice1
|
|
|
}
|
|
}
|
|
|
- this.$Request.get(`/app/vip/get-can-reduce/${this.dataList.orderId}`,data).then((res) => {
|
|
|
|
|
|
|
+ this.$Request.get(`/app/vip/get-can-reduce/${this.dataList.orderId}`, data).then((res) => {
|
|
|
console.log(res, '会员立减')
|
|
console.log(res, '会员立减')
|
|
|
if (res.code == 0 && res.data) {
|
|
if (res.code == 0 && res.data) {
|
|
|
- this.Vipmoney=res.data
|
|
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ this.Vipmoney = res.data
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
}
|
|
}
|
|
|
if (totalMoney <= 0) {
|
|
if (totalMoney <= 0) {
|
|
|
this.totalPrice12 = 0.01
|
|
this.totalPrice12 = 0.01
|
|
@@ -821,7 +831,6 @@ export default {
|
|
|
this.getOrderList()
|
|
this.getOrderList()
|
|
|
// this.getQishou()
|
|
// this.getQishou()
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
goBack() {
|
|
goBack() {
|
|
@@ -875,25 +884,30 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (this.orderType == 2) {
|
|
if (this.orderType == 2) {
|
|
|
- this.packType=1
|
|
|
|
|
- this.ispackType =false
|
|
|
|
|
|
|
+ this.packType = 1
|
|
|
|
|
+ this.ispackType = false
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
this.getvipMoney()
|
|
this.getvipMoney()
|
|
|
} else {
|
|
} else {
|
|
|
- this.packType=1
|
|
|
|
|
- this.ispackType =false
|
|
|
|
|
- if(this.packType==1){
|
|
|
|
|
|
|
+ this.packType = 1
|
|
|
|
|
+ this.ispackType = false
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
this.getvipMoney()
|
|
this.getvipMoney()
|
|
|
}
|
|
}
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
}
|
|
}
|
|
|
if (totalMoney <= 0) {
|
|
if (totalMoney <= 0) {
|
|
|
this.totalPrice12 = 0.01
|
|
this.totalPrice12 = 0.01
|
|
@@ -904,17 +918,22 @@ export default {
|
|
|
if (this.orderType == 2) {
|
|
if (this.orderType == 2) {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
} else {
|
|
} else {
|
|
|
- if(this.packType==1){
|
|
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
}
|
|
}
|
|
|
if (totalMoney <= 0) {
|
|
if (totalMoney <= 0) {
|
|
|
this.totalPrice12 = 0.01
|
|
this.totalPrice12 = 0.01
|
|
@@ -927,38 +946,49 @@ export default {
|
|
|
if (this.orderType == 2) {
|
|
if (this.orderType == 2) {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
} else {
|
|
} else {
|
|
|
- if(this.packType==1){
|
|
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
}
|
|
}
|
|
|
if (totalMoney <= 0) {
|
|
if (totalMoney <= 0) {
|
|
|
this.totalPrice12 = 0.01
|
|
this.totalPrice12 = 0.01
|
|
|
} else {
|
|
} else {
|
|
|
this.totalPrice12 = totalMoney
|
|
this.totalPrice12 = totalMoney
|
|
|
}
|
|
}
|
|
|
- }if (this.Vipmoney.canReduceFlag=='1') {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
if (this.orderType == 2) {
|
|
if (this.orderType == 2) {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
} else {
|
|
} else {
|
|
|
- if(this.packType==1){
|
|
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
}
|
|
}
|
|
|
if (totalMoney <= 0) {
|
|
if (totalMoney <= 0) {
|
|
|
this.totalPrice12 = 0.01
|
|
this.totalPrice12 = 0.01
|
|
@@ -983,17 +1013,22 @@ export default {
|
|
|
if (this.orderType == 2) {
|
|
if (this.orderType == 2) {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
} else {
|
|
} else {
|
|
|
- if(this.packType==1){
|
|
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
}
|
|
}
|
|
|
if (totalMoney <= 0) {
|
|
if (totalMoney <= 0) {
|
|
|
this.totalPrice12 = 0.01
|
|
this.totalPrice12 = 0.01
|
|
@@ -1020,18 +1055,23 @@ export default {
|
|
|
if (this.orderType == 2) {
|
|
if (this.orderType == 2) {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
} else {
|
|
} else {
|
|
|
- if(this.packType==1){
|
|
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (totalMoney <= 0) {
|
|
if (totalMoney <= 0) {
|
|
@@ -1053,11 +1093,10 @@ export default {
|
|
|
shopId: this.dataList.shopId,
|
|
shopId: this.dataList.shopId,
|
|
|
page: 1,
|
|
page: 1,
|
|
|
limit: 20,
|
|
limit: 20,
|
|
|
- minMoney:minMoney
|
|
|
|
|
-
|
|
|
|
|
|
|
+ minMoney: minMoney
|
|
|
}
|
|
}
|
|
|
this.$Request.get('/app/coupon/selectUserCouponList', data).then((res) => {
|
|
this.$Request.get('/app/coupon/selectUserCouponList', data).then((res) => {
|
|
|
- console.log(res,'优惠券')
|
|
|
|
|
|
|
+ console.log(res, '优惠券')
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
this.couponList = res.data.list
|
|
this.couponList = res.data.list
|
|
|
if (this.coupon) {
|
|
if (this.coupon) {
|
|
@@ -1067,18 +1106,23 @@ export default {
|
|
|
if (this.orderType == 2) {
|
|
if (this.orderType == 2) {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
} else {
|
|
} else {
|
|
|
- if(this.packType==1){
|
|
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (totalMoney <= 0) {
|
|
if (totalMoney <= 0) {
|
|
@@ -1118,20 +1162,25 @@ export default {
|
|
|
if (this.orderType == 2) {
|
|
if (this.orderType == 2) {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
} else {
|
|
} else {
|
|
|
- if(this.packType==1){
|
|
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let totalMoney =0
|
|
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
- }else{
|
|
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ let totalMoney = 0
|
|
|
|
|
+ if (this.Vipmoney.canReduceFlag == '1') {
|
|
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ totalMoney = parseFloat(
|
|
|
|
|
+ this.totalPrice1 -
|
|
|
|
|
+ (this.coupon.money ? this.coupon.money : 0) -
|
|
|
|
|
+ (this.huodong.discountAmount ? this.huodong.discountAmount : 0) -
|
|
|
|
|
+ (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)
|
|
|
|
|
+ ).toFixed(2)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (totalMoney <= 0) {
|
|
if (totalMoney <= 0) {
|
|
|
this.totalPrice12 = 0.01
|
|
this.totalPrice12 = 0.01
|
|
|
} else {
|
|
} else {
|
|
@@ -1164,12 +1213,12 @@ export default {
|
|
|
getOrderList() {
|
|
getOrderList() {
|
|
|
this.paotuiMoney = 0
|
|
this.paotuiMoney = 0
|
|
|
this.totalPrice1 = 0
|
|
this.totalPrice1 = 0
|
|
|
- this.totalPrice12=0
|
|
|
|
|
|
|
+ this.totalPrice12 = 0
|
|
|
let data = {
|
|
let data = {
|
|
|
orderId: this.orderId
|
|
orderId: this.orderId
|
|
|
}
|
|
}
|
|
|
this.$Request.get('/app/order/selectBuyGoods', data).then((res) => {
|
|
this.$Request.get('/app/order/selectBuyGoods', data).then((res) => {
|
|
|
- console.log(res, '666')
|
|
|
|
|
|
|
+ console.log(res, '6661')
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
this.dataList = res.data
|
|
this.dataList = res.data
|
|
@@ -1206,9 +1255,9 @@ export default {
|
|
|
if (this.orderType == 2) {
|
|
if (this.orderType == 2) {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
} else {
|
|
} else {
|
|
|
- if(this.packType==1){
|
|
|
|
|
|
|
+ if (this.packType == 1) {
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1217,9 +1266,9 @@ export default {
|
|
|
// if(this.Vipmoney.canReduceFlag=='1'){
|
|
// if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
// totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
// totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
// }else{
|
|
// }else{
|
|
|
- // totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
|
+ // totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
// }
|
|
// }
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// if (totalMoney <= 0) {
|
|
// if (totalMoney <= 0) {
|
|
|
// this.totalPrice12 = 0.01
|
|
// this.totalPrice12 = 0.01
|
|
|
// } else {
|
|
// } else {
|
|
@@ -1232,7 +1281,6 @@ export default {
|
|
|
this.getHuoList()
|
|
this.getHuoList()
|
|
|
this.detCoupon()
|
|
this.detCoupon()
|
|
|
this.getDistance()
|
|
this.getDistance()
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -1354,7 +1402,7 @@ export default {
|
|
|
orderType: this.orderType,
|
|
orderType: this.orderType,
|
|
|
type: res.enable ? 1 : 3,
|
|
type: res.enable ? 1 : 3,
|
|
|
idCard: this.idcard1,
|
|
idCard: this.idcard1,
|
|
|
- packType:this.packType
|
|
|
|
|
|
|
+ packType: this.packType
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
console.log(data)
|
|
console.log(data)
|