|
@@ -183,13 +183,14 @@
|
|
<view>总金额</view>
|
|
<view>总金额</view>
|
|
<view><text class="pf">¥</text>{{totalAmount}}</view>
|
|
<view><text class="pf">¥</text>{{totalAmount}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="flex align_center justify_between">
|
|
|
|
|
|
+ <view class="flex align_center justify_between" v-if="detail.shopProductSubsidy.subsidyAmount">
|
|
<view v-if="storeAccount">抵扣(余额:<text class="pf">¥</text>{{storeAccount.giveBalance}})</view>
|
|
<view v-if="storeAccount">抵扣(余额:<text class="pf">¥</text>{{storeAccount.giveBalance}})</view>
|
|
<view class="flex align_center" v-if="!disKdk" @click="hasKdk=!hasKdk">
|
|
<view class="flex align_center" v-if="!disKdk" @click="hasKdk=!hasKdk">
|
|
<uni-icons size="18" :type="hasKdk?'checkbox-filled':'checkbox'" color="#2196f3"></uni-icons>
|
|
<uni-icons size="18" :type="hasKdk?'checkbox-filled':'checkbox'" color="#2196f3"></uni-icons>
|
|
<text class="pf">¥</text>{{detail.shopProductSubsidy.subsidyAmount}}
|
|
<text class="pf">¥</text>{{detail.shopProductSubsidy.subsidyAmount}}
|
|
</view>
|
|
</view>
|
|
<view class="flex align_center" v-else>
|
|
<view class="flex align_center" v-else>
|
|
|
|
+ <uni-icons size="18" type="checkbox" color="#999"></uni-icons>
|
|
<text class="pf">¥</text>{{detail.shopProductSubsidy.subsidyAmount}}
|
|
<text class="pf">¥</text>{{detail.shopProductSubsidy.subsidyAmount}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -352,8 +353,8 @@
|
|
},
|
|
},
|
|
// 禁用抵扣金额
|
|
// 禁用抵扣金额
|
|
disKdk(){
|
|
disKdk(){
|
|
- const kdk = this.detail&&this.detail.shopProductSubsidy&&this.storeAccount&&this.detail.shopProductSubsidy.subsidyAmount>0&&this.detail.shopProductSubsidy.subsidyAmount<this.storeAccount.giveBalance
|
|
|
|
- return this.payType==2 || !kdk
|
|
|
|
|
|
+ const kdk = this.detail&&this.detail.shopProductSubsidy&&this.storeAccount&&this.detail.shopProductSubsidy.subsidyAmount>0&&this.detail.shopProductSubsidy.subsidyAmount<=this.storeAccount.giveBalance
|
|
|
|
+ return this.payType=='2' || !kdk
|
|
},
|
|
},
|
|
// 经销商电话
|
|
// 经销商电话
|
|
dealerPhone(){
|
|
dealerPhone(){
|
|
@@ -365,7 +366,7 @@
|
|
},
|
|
},
|
|
// 总金额
|
|
// 总金额
|
|
totalAmount(){
|
|
totalAmount(){
|
|
- return this.hasLogin&&this.detail&&this.detail.price * this.qty
|
|
|
|
|
|
+ return Number(this.hasLogin&&this.detail&&this.detail.price * this.qty).toFixed(2)
|
|
},
|
|
},
|
|
// 支付合计,结算金额
|
|
// 支付合计,结算金额
|
|
payAmount(){
|
|
payAmount(){
|
|
@@ -538,17 +539,28 @@
|
|
// 打开数量选择弹框
|
|
// 打开数量选择弹框
|
|
if(!this.showPopu){
|
|
if(!this.showPopu){
|
|
this.showPopu = true
|
|
this.showPopu = true
|
|
- this.payType = this.showBalanceAuth ? 0 : (this.hasPay ? 1 : 2)
|
|
|
|
-
|
|
|
|
|
|
+ this.payType = this.showBalanceAuth ? '0' : (this.hasPay ? '1' : '2')
|
|
|
|
+ if(this.hasBalancePay){
|
|
|
|
+ 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.hasKdk = this.detail.shopProductSubsidy&&this.detail.shopProductSubsidy.subsidyAmount>0&&this.detail.shopProductSubsidy.subsidyAmount<this.storeAccount.giveBalance
|
|
}else{
|
|
}else{
|
|
// 充值余额支付
|
|
// 充值余额支付
|
|
if(this.payType == 0){
|
|
if(this.payType == 0){
|
|
if(this.storeAccount.rechargeBalance<this.payAmount){
|
|
if(this.storeAccount.rechargeBalance<this.payAmount){
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.payType = this.hasPay ? '1' : '2'
|
|
|
|
+ },100)
|
|
uni.showModal({
|
|
uni.showModal({
|
|
content: '充值余额不足!',
|
|
content: '充值余额不足!',
|
|
- showCancel:false,
|
|
|
|
- confirmText:'知道了'
|
|
|
|
|
|
+ confirmText:'去充值',
|
|
|
|
+ success: (res) => {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pagesB/accountBalance/accountBalance'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -599,7 +611,8 @@
|
|
productCode: item.productCode,
|
|
productCode: item.productCode,
|
|
qty: item.qty,
|
|
qty: item.qty,
|
|
price:item.price,
|
|
price:item.price,
|
|
- promoSn: item.promoSn
|
|
|
|
|
|
+ promoSn: item.promoSn,
|
|
|
|
+ payOnlineType: this.payType == 0 ? 'RECHARGE_BALANCE' : this.payType == 1 ? 'WXPAY_ONLINE' : ''
|
|
}
|
|
}
|
|
}) : []
|
|
}) : []
|
|
const removeList = res.data.removeList ? res.data.removeList.map(item => item.productCode) : []
|
|
const removeList = res.data.removeList ? res.data.removeList.map(item => item.productCode) : []
|
|
@@ -764,12 +777,16 @@
|
|
// 充值余额支付,判断是否不足
|
|
// 充值余额支付,判断是否不足
|
|
if(v==0){
|
|
if(v==0){
|
|
if(this.payAmount>this.storeAccount.rechargeBalance){
|
|
if(this.payAmount>this.storeAccount.rechargeBalance){
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.payType = this.hasPay ? '1' : '2'
|
|
|
|
+ },100)
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: '充值余额不足',
|
|
|
|
- icon: 'none'
|
|
|
|
|
|
+ title: '充值余额不足',
|
|
|
|
+ icon: 'none'
|
|
})
|
|
})
|
|
- this.payType = this.hasPay ? 1 : 2
|
|
|
|
}
|
|
}
|
|
|
|
+ }else{
|
|
|
|
+ this.payType = v
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 确认付款
|
|
// 确认付款
|