还款计算方式更新

master
十七 3 years ago
parent ee7e7ddf12
commit e844c5fe29

@ -84,7 +84,7 @@ export default {
},
confirm() {
this.dialogVisible = false;
this.form.proList = { ...this.list };
this.form.proList = [...this.list];
this.$emit("proData", this.form);
},
getSummaries(param) {

@ -48,6 +48,7 @@ export default {
row.payMoney = 0;
}
let form = { ...row };
form.cardOver = (form.cardRestMoney - form.payMoney).toFixed(2) * 1;
this.recIndex = -1;
this.list.splice(index, 1, form);
this.sumPay();
@ -81,7 +82,7 @@ export default {
},
confirm() {
this.dialogVisible = false;
this.form.recList = { ...this.list };
this.form.recList = [...this.list];
this.$emit("recData", this.form);
},
getSummaries(param) {

@ -110,10 +110,10 @@
<el-table-column v-if="headOffice" label="充值还款" align="center" width="90">
<template slot-scope="props">
<!-- 充值卡付列表 -->
<div @click.stop="" v-if="props.row.docType!='card_recharge'">
<el-button size="mini" slot="reference" @click="openRec(props.row)"></el-button>
<!-- <div @click.stop="" v-if="props.row.docType!='card_recharge'">
</div>
<div v-else click.stop="" class="text-red">不能卡付</div>
<div v-else click.stop="" class="text-red">不能卡付</div> -->
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="90" v-if="headOffice">
@ -247,21 +247,28 @@ export default {
this.$refs.pro.show(row);
},
proData(v) {
console.log(v);
// if (v.payNumber > 0) {
// var number = 0;
// this.list.forEach((item, index) => {
// item.proList.forEach((items) => {
// if (index == v.index) {
// number = items.payNumber;
// } else {
// if (items.payNumber == 0) {
// items.courseRestCount = items.courseRestCount - items.payNumber;
// }
// }
// });
// });
// }
if (v.courseMoney > 0) {
var list = [];
v.proList.forEach((item) => {
item.courseConsumeCount = item.courseConsumeCount - item.payNumber;
item.courseRestCount = item.courseRestCount - item.payNumber;
list.push(item);
});
this.list.forEach((item) => {
let proList = [];
if (item.index != v.index) {
item.proList.forEach((items, indexs) => {
if (items.payNumber == 0) {
list[indexs].payNumber = 0;
list[indexs].payMoney = 0;
items = list[indexs];
}
proList.push(items);
});
}
item.proList = proList;
});
}
this.list.splice(v.index, 1, v);
this.sumList();
},
@ -269,10 +276,31 @@ export default {
this.$refs.rec.show(row);
},
recData(v) {
if (v.recMoney > 0) {
var list = [];
v.recList.forEach((item) => {
item.cardRestMoney = item.cardRestMoney - item.payMoney;
item.cardConsumeMoney = item.cardConsumeMoney - item.payMoney;
list.push(item);
});
this.list.forEach((item) => {
let recList = [];
if (item.index != v.index) {
item.recList.forEach((items, indexs) => {
if (items.payMoney == 0) {
list[indexs].payMoney = 0;
items = list[indexs];
}
recList.push(items);
console.log(recList);
});
}
item.recList = recList;
});
}
this.list.splice(v.index, 1, v);
this.sumList();
},
//
handleClose() {
this.form = Object.assign({});

Loading…
Cancel
Save