|
|
|
|
@ -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>
|
|
|
|
|
<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({});
|
|
|
|
|
|