|
@@ -162,7 +162,7 @@
|
|
|
v-loading="loadingBtn"
|
|
|
:before-close="paymentClose">
|
|
|
<div>
|
|
|
- <div style="font-size: 16px">应收金额为{{zhifdingdan}}</div>
|
|
|
+ <div style="font-size: 16px">金额:{{zhifdingdan}}</div>
|
|
|
|
|
|
<div style="display: flex;align-items: center;margin-top: 20px">
|
|
|
<div style="margin-right: 10px;width: 90px;text-align: right">优惠金额:</div>
|
|
@@ -182,14 +182,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="display: flex;align-items: center;margin-top: 20px">
|
|
|
- <div style="margin-right: 10px;width: 90px;text-align: right">收款金额:</div>
|
|
|
- <div>
|
|
|
- <el-input style="width: 200px;" type="number" v-model="form.currentAmount" size="small" placeholder="请输入支付金额"
|
|
|
- @change="currentchange"
|
|
|
- ></el-input>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="display: flex;align-items: center;margin-top: 20px">
|
|
|
<div style="margin-right: 10px;width: 90px;text-align: right">账户:</div>
|
|
|
<div>
|
|
|
<el-select v-model="form.account" size="small" placeholder="请选择">
|
|
@@ -202,6 +194,14 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div style="display: flex;align-items: center;margin-top: 20px">
|
|
|
+ <div style="margin-right: 10px;width: 90px;text-align: right">收款金额:</div>
|
|
|
+ <div>
|
|
|
+ <el-input style="width: 200px;" type="number" v-model="form.currentAmount" size="small" placeholder="请输入支付金额"
|
|
|
+ @change="currentchange"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<span slot="footer" style="text-align: left" class="dialog-footer">
|
|
|
<el-button @click="paymentClose">取 消</el-button>
|
|
@@ -600,6 +600,7 @@ export default {
|
|
|
// 优惠金额的监听
|
|
|
thisUsedchange(){
|
|
|
// this.form.memberBalance = this.form.memberBalance?this.form.memberBalance:0
|
|
|
+ this.form.memberAmout = 0
|
|
|
if(Number(this.form.thisUsedProfit) < 0) {
|
|
|
this.$nextTick(()=>{
|
|
|
this.form.thisUsedProfit = 0
|
|
@@ -625,11 +626,10 @@ export default {
|
|
|
this.$nextTick(()=>{
|
|
|
// console.log(sum - this.form.thisUsedProfit)
|
|
|
this.form.settlmentAmount = this.form.settlmentAmount?this.form.settlmentAmount:0
|
|
|
- this.$set(this.form,'currentAmount',sum - this.form.thisUsedProfit - this.form.settlmentAmount)
|
|
|
- // this.form.currentAmount = sum - this.form.thisUsedProfit
|
|
|
+ // this.$set(this.form,'currentAmount',sum - this.form.thisUsedProfit - this.form.settlmentAmount)
|
|
|
+ this.form.currentAmount = sum - this.form.thisUsedProfit - this.form.settlmentAmount - this.form.memberAmout
|
|
|
this.form.debitAmount = subtract(this.form.orderAmount, this.form.thisUsedProfit)
|
|
|
this.zhifdingdan = Number(this.form.debitAmount) - Number(this.form.settlmentAmount)
|
|
|
- console.log(this.zhifdingdan,628)
|
|
|
})
|
|
|
},
|
|
|
// 会员卡金额的监听
|
|
@@ -645,6 +645,8 @@ export default {
|
|
|
if (this.form.memberAmout < 0) {
|
|
|
this.$nextTick(()=>{
|
|
|
this.form.memberAmout = 0
|
|
|
+ let a = Number(this.form.debitAmount) - Number(this.form.settlmentAmount)
|
|
|
+ this.$set(this.form,'currentAmount',a)
|
|
|
})
|
|
|
}
|
|
|
if (this.form.memberAmout > Number(this.balanceAmounts)) {
|
|
@@ -657,13 +659,19 @@ export default {
|
|
|
if (this.form.memberAmout > sum) {
|
|
|
this.$nextTick(()=>{
|
|
|
this.form.memberAmout = sum
|
|
|
+ this.$delete(this.form, 'currentAmount')
|
|
|
+ this.$set(this.form,'currentAmount',0)
|
|
|
})
|
|
|
}
|
|
|
this.$nextTick(()=>{
|
|
|
console.log(sum - this.form.memberAmout)
|
|
|
- this.$set(this.form,'currentAmount',(sum - this.form.memberAmout).toFixed(2))
|
|
|
- // this.form.currentAmount = (sum - this.form.memberAmout).toFixed(2)
|
|
|
+
|
|
|
+ // this.$set(this.form,'currentAmount',(sum - this.form.memberAmout).toFixed(2))
|
|
|
+ // this.form.currentAmount = sum - this.form.memberAmout
|
|
|
})
|
|
|
+ this.$delete(this.form, 'currentAmount')
|
|
|
+ this.$set(this.form,'currentAmount',sum - this.form.memberAmout)
|
|
|
+ console.log(this.form.currentAmount,666)
|
|
|
},
|
|
|
// 本次金额监听
|
|
|
currentchange(){
|
|
@@ -671,7 +679,7 @@ export default {
|
|
|
this.form.currentAmount = 0
|
|
|
}
|
|
|
this.form.memberAmout = this.form.memberAmout?this.form.memberAmout:0
|
|
|
- if ((this.form.currentAmount + this.form.memberAmout) > this.zhifdingdan) {
|
|
|
+ if ((Number(this.form.currentAmount) + Number(this.form.memberAmout)) > this.zhifdingdan) {
|
|
|
this.form.currentAmount = this.zhifdingdan
|
|
|
this.form.memberAmout = 0
|
|
|
}
|
|
@@ -978,6 +986,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.form.currentAmount = 0
|
|
|
+ this.form.whetherIntegral = 0 //为了区分是否是积分支付还是会员卡支付
|
|
|
this.loadingBtn = true;
|
|
|
save({ ...this.form, billType: 'XS', tradeType: 'YPJ', orderItemsList: this.data, settlementList: this.settlementList, orderFilesList: this.orderFilesList })
|
|
|
.then(res => {
|