|
@@ -183,15 +183,15 @@
|
|
|
<view>总金额</view>
|
|
|
<view><text class="pf">¥</text>{{totalAmount}}</view>
|
|
|
</view>
|
|
|
- <view class="flex align_center justify_between" v-if="detail.shopProductSubsidy.subsidyAmount">
|
|
|
+ <view class="flex align_center justify_between" v-if="subsidyAmount">
|
|
|
<view v-if="storeAccount">抵扣(余额:<text class="pf">¥</text>{{storeAccount.giveBalance}})</view>
|
|
|
<view class="flex align_center" v-if="!disKdk" @click="hasKdk=!hasKdk">
|
|
|
<uni-icons size="18" :type="hasKdk?'checkbox-filled':'checkbox'" color="#2196f3"></uni-icons>
|
|
|
- <text class="pf">¥</text>{{detail.shopProductSubsidy.subsidyAmount}}
|
|
|
+ <text class="pf">¥</text>{{subsidyAmount}}
|
|
|
</view>
|
|
|
<view class="flex align_center" v-else>
|
|
|
<uni-icons size="18" type="circle-filled" color="#aaa"></uni-icons>
|
|
|
- <text class="pf">¥</text>{{detail.shopProductSubsidy.subsidyAmount}}
|
|
|
+ <text class="pf">¥</text>{{subsidyAmount}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex align_center justify_end" v-if="detail.shopProductSubsidy">
|
|
@@ -363,9 +363,13 @@
|
|
|
},
|
|
|
// 禁用抵扣金额
|
|
|
disKdk(){
|
|
|
- const kdk = this.detail&&this.detail.shopProductSubsidy&&this.storeAccount&&this.detail.shopProductSubsidy.subsidyAmount>0&&this.detail.shopProductSubsidy.subsidyAmount<=this.storeAccount.giveBalance
|
|
|
+ const kdk = this.detail&&this.detail.shopProductSubsidy&&this.storeAccount&&this.subsidyAmount>0&&this.subsidyAmount<=this.storeAccount.giveBalance
|
|
|
return this.payType=='2' || !kdk
|
|
|
},
|
|
|
+ // 抵扣金额
|
|
|
+ subsidyAmount(){
|
|
|
+ return this.detail&&this.detail.shopProductSubsidy&&this.detail.shopProductSubsidy.subsidyAmount||0
|
|
|
+ },
|
|
|
// 经销商电话
|
|
|
dealerPhone(){
|
|
|
const shelfInfo = this.shelfInfo
|
|
@@ -381,7 +385,7 @@
|
|
|
},
|
|
|
// 支付合计,结算金额
|
|
|
payAmount(){
|
|
|
- return Number(this.totalAmount-(this.hasKdk&&this.detail&&this.detail.shopProductSubsidy?this.detail.shopProductSubsidy.subsidyAmount:0)).toFixed(2)
|
|
|
+ return Number(this.totalAmount-(this.hasKdk&&this.detail&&this.detail.shopProductSubsidy?this.subsidyAmount:0)).toFixed(2)
|
|
|
},
|
|
|
// 赠品数量
|
|
|
giftNum(){
|
|
@@ -554,7 +558,7 @@
|
|
|
this.payType = this.storeAccount.rechargeBalance<this.payAmount ? (this.hasPay? '1' : '2'):'0'
|
|
|
}
|
|
|
// 有余额支付权限,且没有促销活动,且有抵扣金额,且抵扣金额小于等于抵扣余额
|
|
|
- this.hasKdk = this.detail.shopProductSubsidy&&this.detail.shopProductSubsidy.subsidyAmount>0&&this.detail.shopProductSubsidy.subsidyAmount<this.storeAccount.giveBalance&&!this.detail.shopPromoProduct&&this.showBalanceAuth
|
|
|
+ this.hasKdk = this.detail.shopProductSubsidy&&this.subsidyAmount>0&&this.subsidyAmount<this.storeAccount.giveBalance&&!this.detail.shopPromoProduct&&this.showBalanceAuth
|
|
|
}else{
|
|
|
// 充值余额支付
|
|
|
if(this.payType == 0){
|
|
@@ -607,12 +611,15 @@
|
|
|
mask: true
|
|
|
})
|
|
|
const _this = this
|
|
|
- purchaseCheck({detailList: [{
|
|
|
+ purchaseCheck({
|
|
|
+ detailList: [{
|
|
|
productSn:this.detail.productSn,
|
|
|
productCode:this.detail.productCode,
|
|
|
qty: this.qty,
|
|
|
price:this.detail.price,
|
|
|
- promoSn: this.detail.promoSn
|
|
|
+ promoSn: this.detail.promoSn,
|
|
|
+ shopProductSubsidy: this.detail.shopProductSubsidy,
|
|
|
+ shopPromoProduct: this.detail.shopPromoProduct
|
|
|
}]}).then(res => {
|
|
|
uni.hideLoading()
|
|
|
if(res.status == 200){
|
|
@@ -623,6 +630,8 @@
|
|
|
qty: item.qty,
|
|
|
price:item.price,
|
|
|
promoSn: item.promoSn,
|
|
|
+ shopProductSubsidy: item.shopProductSubsidy,
|
|
|
+ shopPromoProduct: item.shopPromoProduct
|
|
|
}
|
|
|
}) : []
|
|
|
const removeList = res.data.removeList ? res.data.removeList.map(item => item.productCode) : []
|