|
|
|
|
@ -37,7 +37,6 @@
|
|
|
|
|
@click='openPro(1)'>添加
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="width: 150px;">总金额 : {{ outMoneys }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="outList" empty-text='暂无数据 , 点击添加疗程' max-height="200"
|
|
|
|
|
:header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee' }"
|
|
|
|
|
@ -84,7 +83,10 @@
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button v-if="proForm.memberName" size="mini" type="warning" @click='backout'>撤销</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="width: 150px;">总金额 : {{ inMoneys }}</div>
|
|
|
|
|
<div style="width: 150px;">成交金额 : {{ inMoneys }}</div>
|
|
|
|
|
<div style="width: 150px;">转入金额 : {{ outMoneys }}</div>
|
|
|
|
|
<div style="width: 150px;">现付金额 : {{ payMoneys }}</div>
|
|
|
|
|
<div style="width: 150px;">欠款金额金额 : {{ debtMoney }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="inList" max-height="150" empty-text='暂无数据 , 点击添加疗程'
|
|
|
|
|
:header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee' }"
|
|
|
|
|
@ -117,9 +119,8 @@
|
|
|
|
|
@blur="endEditTimes(scope.row)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="转入金额" align="center" prop="changeInMoney" min-width="90"></el-table-column>
|
|
|
|
|
<el-table-column label="欠款金额" v-if="sessionStorageData.allowdebt" align="center" prop="debtMoney"
|
|
|
|
|
min-width="90"></el-table-column>
|
|
|
|
|
<!-- <el-table-column label="欠款金额" v-if="sessionStorageData.allowdebt" align="center" prop="debtMoney"
|
|
|
|
|
min-width="90"></el-table-column> -->
|
|
|
|
|
<el-table-column label="成交金额" align="center" prop="transactionMoney" min-width="80">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
@ -135,12 +136,20 @@
|
|
|
|
|
{{ scope.row.payMoney }}
|
|
|
|
|
<i class="el-icon-edit text-cyan"></i>
|
|
|
|
|
</div>
|
|
|
|
|
<el-input v-else v-focus @blur="endEdit(scope.row)" @change="endEdit(scope.row)"
|
|
|
|
|
@keydown.enter="endEdit(scope.row)" v-model="scope.row.payMoney" type="number"
|
|
|
|
|
class="form-input-wdith-xs"></el-input>
|
|
|
|
|
<el-input v-else v-focus @click="endEdit(scope.row)" @blur="endEdit(scope.row)"
|
|
|
|
|
@change="endEdit(scope.row)" @keydown.enter="endEdit(scope.row)" v-model="scope.row.payMoney"
|
|
|
|
|
type="number" class="form-input-wdith-xs"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<div style="text-align:center;width: 100%;" @click="endEdits()" v-if="!shows">合计</div>
|
|
|
|
|
<div style="display:flex" v-if="shows">
|
|
|
|
|
<div style="margin-left:30%">现付金额为:</div>
|
|
|
|
|
<div style="margin-left: 20%;">{{ payMoneys }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@ -194,11 +203,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
projectDialogVisible: false,
|
|
|
|
|
shows: false,
|
|
|
|
|
recDateShow: false,
|
|
|
|
|
activeName: "现付",
|
|
|
|
|
outMoneyIndex: -1,
|
|
|
|
|
inNumberIndex: -1,
|
|
|
|
|
inNumberIndexs: -1,
|
|
|
|
|
payMoneys: 0,
|
|
|
|
|
proForm: {
|
|
|
|
|
additionDate: null,
|
|
|
|
|
manageStaffName: null,
|
|
|
|
|
@ -393,21 +404,16 @@ export default {
|
|
|
|
|
if (this.openProText == 0) {
|
|
|
|
|
(form.priceMember * form.minumumTimes).toFixed(2) * 1;
|
|
|
|
|
form.prices = form.priceMember
|
|
|
|
|
form.changeInTime = form.minumumTimes;
|
|
|
|
|
form.changeInTime = 0;
|
|
|
|
|
form.projectId = form.id;
|
|
|
|
|
form.debtMoney = 0;
|
|
|
|
|
form.transactionMoney = form.changeInMoney;
|
|
|
|
|
form.changeInMoneyShow = false;
|
|
|
|
|
form.debtMoneyShow = false;
|
|
|
|
|
form.changeInCaseTimeShow = false;
|
|
|
|
|
let num = 0;
|
|
|
|
|
this.outList.forEach((item) => {
|
|
|
|
|
num = num + item.changeOutMoney
|
|
|
|
|
});
|
|
|
|
|
form.changeInMoney = num
|
|
|
|
|
form.changeInMoney
|
|
|
|
|
if (this.inList.length < 1) {
|
|
|
|
|
this.inList.push(form);
|
|
|
|
|
this.inMoneys = 0;
|
|
|
|
|
} else {
|
|
|
|
|
this.$alert("只能选择一个项目进行转入", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
@ -428,8 +434,9 @@ export default {
|
|
|
|
|
form.changeOutTimeShow = false;
|
|
|
|
|
form.accountId = form.id;
|
|
|
|
|
this.outList.push(form);
|
|
|
|
|
this.sumMoney();
|
|
|
|
|
}
|
|
|
|
|
this.sumMoney();
|
|
|
|
|
//
|
|
|
|
|
},
|
|
|
|
|
//查询会员信息
|
|
|
|
|
memberOne() {
|
|
|
|
|
@ -471,12 +478,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
//选择金额.
|
|
|
|
|
editPay(row, index) {
|
|
|
|
|
// if (this.debtMoney < 0) {
|
|
|
|
|
// this.$message.error({
|
|
|
|
|
// message: "支付金额已超出 , 无需进行现付 !",
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
|
|
console.log(row)
|
|
|
|
|
var form = {
|
|
|
|
|
...row,
|
|
|
|
|
@ -485,21 +486,36 @@ export default {
|
|
|
|
|
var payLists = [...this.proForm.payLists];
|
|
|
|
|
payLists[index] = form;
|
|
|
|
|
form.isShow = true;
|
|
|
|
|
form.payMoney = (this.debtMoney + form.payMoney).toFixed(2) * 1;
|
|
|
|
|
this.proForm.payLists = [];
|
|
|
|
|
this.proForm.payLists = payLists;
|
|
|
|
|
console.log(this.proForm.payLists)
|
|
|
|
|
this.sumMoney()
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
endEdit(row) {
|
|
|
|
|
console.log(row);
|
|
|
|
|
console.log(this.inList);
|
|
|
|
|
if (row.payMoney) {
|
|
|
|
|
|
|
|
|
|
if (row.payMoney && row.payMoney <= this.debtMoney) {
|
|
|
|
|
row.payMoney = row.payMoney * 1;
|
|
|
|
|
} else {
|
|
|
|
|
row.payMoney = 0;
|
|
|
|
|
if (row.payMoney > this.debtMoney) {
|
|
|
|
|
this.$alert("现付金额大于需付金额,已将金额调整适合金额", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
confirmButtonClass: "confirmbtnFalses",
|
|
|
|
|
type: "warning",
|
|
|
|
|
center: true,
|
|
|
|
|
callback: (action) => { },
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
row.payMoney = this.debtMoney;
|
|
|
|
|
}
|
|
|
|
|
row.isShow = false;
|
|
|
|
|
this.shows = false;
|
|
|
|
|
// this.endEditTimes()
|
|
|
|
|
this.sumMoney()
|
|
|
|
|
},
|
|
|
|
|
endEdits() {
|
|
|
|
|
this.shows = true,
|
|
|
|
|
this.sumMoney()
|
|
|
|
|
},
|
|
|
|
|
openPro(num) {
|
|
|
|
|
this.openProText = num;
|
|
|
|
|
@ -596,9 +612,9 @@ export default {
|
|
|
|
|
num = num + item.changeOutMoney
|
|
|
|
|
});
|
|
|
|
|
this.outMoneys = num;
|
|
|
|
|
if(this.outList.length!=0){
|
|
|
|
|
this.inList[0].changeInMoney=num
|
|
|
|
|
}
|
|
|
|
|
// if(this.outList.length!=0){
|
|
|
|
|
// this.inList[0].changeInMoney=num
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
openOutMoney(row, index) {
|
|
|
|
|
@ -638,6 +654,19 @@ export default {
|
|
|
|
|
row.transactionMoney = row.changeInMoney;
|
|
|
|
|
this.inNumberIndex = -1;
|
|
|
|
|
this.sumMoney();
|
|
|
|
|
if (this.outMoneys > row.changeInMoney) {
|
|
|
|
|
this.$alert("成交金额不能小于转入金额: ", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
confirmButtonClass: "confirmbtnFalses",
|
|
|
|
|
type: "warning",
|
|
|
|
|
center: true,
|
|
|
|
|
callback: (action) => { },
|
|
|
|
|
});
|
|
|
|
|
this.inList[0].changeInTime = 0
|
|
|
|
|
this.inList[0].transactionMoney = 0
|
|
|
|
|
this.sumMoney();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
endEditprices(row, index) {
|
|
|
|
|
// if (row.changeInTime < row.minumumTimes) {
|
|
|
|
|
@ -646,10 +675,41 @@ export default {
|
|
|
|
|
// });
|
|
|
|
|
// row.changeInTime = row.minumumTimes;
|
|
|
|
|
// }
|
|
|
|
|
if (row.minumumPriceMember > row.prices) {
|
|
|
|
|
this.$alert("单价不可以低于最低单价: ", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
confirmButtonClass: "confirmbtnFalses",
|
|
|
|
|
type: "warning",
|
|
|
|
|
center: true,
|
|
|
|
|
callback: (action) => { },
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
row.prices = row.minumumPriceMember
|
|
|
|
|
} else if (row.priceMember < row.prices) {
|
|
|
|
|
this.$alert("单价不可以高于标准单价: ", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
confirmButtonClass: "confirmbtnFalses",
|
|
|
|
|
type: "warning",
|
|
|
|
|
center: true,
|
|
|
|
|
callback: (action) => { },
|
|
|
|
|
});
|
|
|
|
|
row.prices = row.priceMember
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
row.changeInMoney = (row.prices * row.changeInTime).toFixed(2) * 1;
|
|
|
|
|
row.transactionMoney = row.changeInMoney;
|
|
|
|
|
this.inNumberIndexs = -1;
|
|
|
|
|
this.sumMoney();
|
|
|
|
|
if (this.outMoneys > row.changeInMoney) {
|
|
|
|
|
this.$alert("成交金额不能小于转入金额,请修改单价或者转入次数: ", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
confirmButtonClass: "confirmbtnFalses",
|
|
|
|
|
type: "warning",
|
|
|
|
|
center: true,
|
|
|
|
|
callback: (action) => { },
|
|
|
|
|
});
|
|
|
|
|
this.sumMoney();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
projectRadio(row) {
|
|
|
|
|
if (row) {
|
|
|
|
|
@ -674,6 +734,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
this.outMoneys = outMoneys.toFixed(2) * 1;
|
|
|
|
|
this.inMoneys = inMoneys.toFixed(2) * 1;
|
|
|
|
|
this.payMoneys = payMoneys.toFixed(2) * 1;
|
|
|
|
|
if (inMoneys != 0) {
|
|
|
|
|
this.debtMoney =
|
|
|
|
|
(inMoneys - outMoneys - payMoneys - debtMoney).toFixed(2) * 1;
|
|
|
|
|
|