|
|
|
|
@ -75,7 +75,7 @@
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item prop="summation" label="退款金额:">
|
|
|
|
|
<div class="form-width-ms">
|
|
|
|
|
<el-input :disabled="refundCourseNum==0" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" @change="endRefundMoney" @blur="endRefundMoney" v-model="refund.courseRefundMoney"></el-input>
|
|
|
|
|
<el-input oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" @change="endRefundMoney" @blur="endRefundMoney" v-model="refund.courseRefundMoney"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<br />
|
|
|
|
|
@ -509,7 +509,6 @@ export default {
|
|
|
|
|
inject: ["reload"],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
refundCourseNum: null,
|
|
|
|
|
headOffice: sessionStorage.getItem("headOffice") * 1,
|
|
|
|
|
printDialogVisible: false, //打印弹窗开关
|
|
|
|
|
openAccountDialog: false,
|
|
|
|
|
@ -666,80 +665,15 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
endNum() {
|
|
|
|
|
console.log();
|
|
|
|
|
this.refund.refundNumber =
|
|
|
|
|
(this.refund.courseRefundMoney / this.refund.price).toFixed(2) * 1;
|
|
|
|
|
this.refund.refundNumber = parseInt(this.refund.refundNumber);
|
|
|
|
|
this.upNum = this.refund.refundNumber;
|
|
|
|
|
if (this.refundCourseNum == 0) {
|
|
|
|
|
if (this.refund.refundNumber * 1 > this.refund.courseConsumeCount) {
|
|
|
|
|
this.$alert(
|
|
|
|
|
"退款次数不能大于: " + this.refund.courseConsumeCount,
|
|
|
|
|
"提示",
|
|
|
|
|
{
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
confirmButtonClass: "confirmbtnFalses",
|
|
|
|
|
type: "warning",
|
|
|
|
|
center: true,
|
|
|
|
|
callback: (action) => {},
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
this.refund.refundNumber = this.refund.courseConsumeCount;
|
|
|
|
|
} else {
|
|
|
|
|
this.refund.courseRefundMoney =
|
|
|
|
|
(this.refund.price * this.refund.refundNumber).toFixed(2) * 1;
|
|
|
|
|
let form = { ...this.refund };
|
|
|
|
|
this.refund = JSON.parse(JSON.stringify(form));
|
|
|
|
|
console.log(this.refund.courseRefundMoney);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.log(this.upNum);
|
|
|
|
|
console.log(this.refund.refundNumber);
|
|
|
|
|
if (
|
|
|
|
|
this.refund.refundNumber == this.upNum ||
|
|
|
|
|
this.refund.refundNUmber == this.upNum + 1
|
|
|
|
|
) {
|
|
|
|
|
} else {
|
|
|
|
|
this.$alert(
|
|
|
|
|
"当前退款金额只能退 " +
|
|
|
|
|
this.upNum +
|
|
|
|
|
" 次或者 " +
|
|
|
|
|
(this.upNum + 1) +
|
|
|
|
|
" 次",
|
|
|
|
|
"提示",
|
|
|
|
|
{
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
confirmButtonClass: "confirmbtnFalses",
|
|
|
|
|
type: "warning",
|
|
|
|
|
center: true,
|
|
|
|
|
callback: (action) => {},
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
this.refund.refundNumber = this.upNum;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
endMoney() {
|
|
|
|
|
let money =
|
|
|
|
|
(this.refund.courseConsumeCount * this.refund.price).toFixed(2) * 1;
|
|
|
|
|
if (this.refund.courseRefundMoney * 1 > money) {
|
|
|
|
|
this.$alert("退款金额不能高于: " + money, "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
confirmButtonClass: "confirmbtnFalses",
|
|
|
|
|
type: "warning",
|
|
|
|
|
center: true,
|
|
|
|
|
callback: (action) => {},
|
|
|
|
|
});
|
|
|
|
|
this.refund.courseRefundMoney = money;
|
|
|
|
|
} else {
|
|
|
|
|
this.refund.refundNumber =
|
|
|
|
|
(this.refund.courseRefundMoney / this.refund.price).Math.floor() * 1;
|
|
|
|
|
let form = { ...this.refund };
|
|
|
|
|
this.refund = JSON.parse(JSON.stringify(form));
|
|
|
|
|
console.log(this.refund.courseRefundMoney);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
close() {
|
|
|
|
|
this.refDialogVisible = false;
|
|
|
|
|
this.openCollNumber = 0;
|
|
|
|
|
@ -1584,10 +1518,6 @@ export default {
|
|
|
|
|
this.sessionStorageData = JSON.parse(
|
|
|
|
|
sessionStorage.getItem("sessionStorageData")
|
|
|
|
|
);
|
|
|
|
|
this.refundCourseNum = JSON.parse(
|
|
|
|
|
sessionStorage.getItem("sessionStorageData")
|
|
|
|
|
).refundCourseNum;
|
|
|
|
|
console.log(this.refundCourseNum);
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
refDialogVisible(val, oldVal) {
|
|
|
|
|
|