Commit 3d47fdb0 authored by 黄奎's avatar 黄奎

页面修改

parent 550ce444
......@@ -147,75 +147,73 @@
<tr>
<td>培训课时数</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'FirstClassHours')" @input="getTotalClassHours()"
<q-input filled @keyup.native="checkPrice(objOption,'FirstClassHours')" @input="calcTotal()"
v-model="objOption.FirstClassHours" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'SecondClassHours')" @input="getTotalClassHours()"
<q-input filled @keyup.native="checkPrice(objOption,'SecondClassHours')" @input="calcTotal()"
v-model="objOption.SecondClassHours" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'ThirdClassHours')" @input="getTotalClassHours()"
<q-input filled @keyup.native="checkPrice(objOption,'ThirdClassHours')" @input="calcTotal()"
v-model="objOption.ThirdClassHours" />
</td>
<td>
<q-input disable filled v-model="firstTotal" />
<q-input disable filled v-model="totalHours" />
</td>
</tr>
<tr>
<td>培训课程费</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'FirstCourseFee')"
@input="getTotalCourseFee(),getFirstFYXJ(),getfirstFeiyongTotal()" v-model="objOption.FirstCourseFee" />
<q-input filled @keyup.native="checkPrice(objOption,'FirstCourseFee')" @input="calcTotal()"
v-model="objOption.FirstCourseFee" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'SecondCourseFee')"
@input="getTotalCourseFee(),getSecondFYXJ(),getsecondFeiyongTotal()"
<q-input filled @keyup.native="checkPrice(objOption,'SecondCourseFee')" @input="calcTotal()"
v-model="objOption.SecondCourseFee" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'ThirdCourseFee')"
@input="getTotalCourseFee(),getthirdFYXJ(),getthirdFeiyongTotal()" v-model="objOption.ThirdCourseFee" />
<q-input filled @keyup.native="checkPrice(objOption,'ThirdCourseFee')" @input="calcTotal()"
v-model="objOption.ThirdCourseFee" />
</td>
<td>
<q-input disable filled v-model="secondTotal" />
<q-input disable filled v-model="totalCourseFee" />
</td>
</tr>
<tr>
<td>培训教材费</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'FirstBookFee')"
@input="getTotalCommon(),getFirstFYXJ(),getfirstFeiyongTotal()" v-model="objOption.FirstBookFee" />
<q-input filled @keyup.native="checkPrice(objOption,'FirstBookFee')" @input="calcTotal()"
v-model="objOption.FirstBookFee" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'SecondBookFee')"
@input="getTotalCommon(),getSecondFYXJ(),getsecondFeiyongTotal()" v-model="objOption.SecondBookFee" />
<q-input filled @keyup.native="checkPrice(objOption,'SecondBookFee')" @input="calcTotal()"
v-model="objOption.SecondBookFee" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'ThirdBookFee')"
@input="getTotalCommon(),getthirdFYXJ(),getthirdFeiyongTotal()" v-model="objOption.ThirdBookFee" />
<q-input filled @keyup.native="checkPrice(objOption,'ThirdBookFee')" @input="calcTotal()"
v-model="objOption.ThirdBookFee" />
</td>
<td>
<q-input disable filled v-model="thirdTotal" />
<q-input disable filled v-model="totalBookFee" />
</td>
</tr>
<tr>
<td>培训课件费</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'FirstClassFee')"
@input="getTotalClassFee(),getFirstFYXJ(),getfirstFeiyongTotal()" v-model="objOption.FirstClassFee" />
<q-input filled @keyup.native="checkPrice(objOption,'FirstClassFee')" @input="calcTotal()"
v-model="objOption.FirstClassFee" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'SecondClassFee')"
@input="getTotalClassFee(),getSecondFYXJ(),getsecondFeiyongTotal()"
<q-input filled @keyup.native="checkPrice(objOption,'SecondClassFee')" @input="calcTotal()"
v-model="objOption.SecondClassFee" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'ThirdClassFee')"
@input="getTotalClassFee(),getthirdFYXJ(),getthirdFeiyongTotal()" v-model="objOption.ThirdClassFee" />
<q-input filled @keyup.native="checkPrice(objOption,'ThirdClassFee')" @input="calcTotal()"
v-model="objOption.ThirdClassFee" />
</td>
<td>
<q-input disable filled v-model="fourthTotal" />
<q-input disable filled v-model="totalClassFee" />
</td>
</tr>
<tr>
......@@ -236,19 +234,19 @@
<tr>
<td>折让价格</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'FirstDiscountMoney')"
@input="getTotalDiscountMoney(),getfirstFeiyongTotal()" v-model="objOption.FirstDiscountMoney" />
<q-input filled @keyup.native="checkPrice(objOption,'FirstDiscountMoney')" @input="calcTotal()"
v-model="objOption.FirstDiscountMoney" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'SecondDiscountMoney')"
@input="getTotalDiscountMoney(),getsecondFeiyongTotal()" v-model="objOption.SecondDiscountMoney" />
<q-input filled @keyup.native="checkPrice(objOption,'SecondDiscountMoney')" @input="calcTotal()"
v-model="objOption.SecondDiscountMoney" />
</td>
<td>
<q-input filled @keyup.native="checkPrice(objOption,'ThirdDiscountMoney')"
@input="getTotalDiscountMoney(),getthirdFeiyongTotal()" v-model="objOption.ThirdDiscountMoney" />
<q-input filled @keyup.native="checkPrice(objOption,'ThirdDiscountMoney')" @input="calcTotal()"
v-model="objOption.ThirdDiscountMoney" />
</td>
<td>
<q-input disable filled v-model="fifthTotal" />
<q-input disable filled v-model="totalDiscountMoney" />
</td>
</tr>
<tr>
......@@ -265,7 +263,7 @@
<q-input disable filled v-model="objOption.ThirdMoney" />
</td>
<td>
<q-input disable filled v-model="sixthTotal" />
<q-input disable filled v-model="totalMoney" />
</td>
</tr>
<tr>
......@@ -304,12 +302,14 @@
</q-input>
</td>
<td>
</td>
</tr>
</table>
<div class="row wrap">
<q-input filled class="col-6 q-pb-lg" v-model="objOption.Exam" label="乙方当前选择考试" />
<q-select class="col-6 q-pb-lg " clearable filled stack-label use-input option-value="Id" option-label="Value"
v-model="objOption.Exam" ref="ManagerId" :options="ExamArray" label="乙方当前选择考试" :dense="false" emit-value
map-options>
</q-select>
<div class="col-3" style="margin:10px 0 0 20px;">
是否有补充协议
<q-toggle size="md" label="" color="primary" :false-value="0" :true-value="1"
......@@ -393,21 +393,35 @@
Exam: '', //乙方当前选择考试
IsSupplement: 1, // 0无 1 有 是否有补充协议
},
firstTotal: 0, // 培训课时数总计
secondTotal: 0, // 培训课程费总计
thirdTotal: 0, // 培训教材费总计
fourthTotal: 0, // 培训课件费总计
fifthTotal: 0, // 折让价格
sixthTotal: 0, // 费用总计
firstFYXJ: 0,
secondFYXJ: 0,
thirdFYXJ: 0,
fyxjTotal: 0,
totalHours: 0, //培训课时数总计
totalCourseFee: 0, //培训课程费总计
totalBookFee: 0, //培训教材费总计
totalClassFee: 0, //培训课件费总计
totalDiscountMoney: 0, //折让价格
totalMoney: 0, // 费用总计
firstFYXJ: 0, //第一列费用小计
secondFYXJ: 0, //第二列费用小计
thirdFYXJ: 0, //第三列费用小计
fyxjTotal: 0, //费用小计合计
saveLoading: false,
StudentMsg: {
OrderId: 0,
GuestId: 0
}
},
//考试数组
ExamArray: [{
Id: "A",
Value: "日语国际能力测试(JLPT):初级(N5-N4)、中级(N3-N2)、高级(N1)"
},
{
Id: "B",
Value: "实用日本语鉴定考试(J.TEST):初级(E-F级)、中高级(A-D级)"
},
{
Id: "C",
Value: "日本留学生考试(EJU):文科(日语)、综合科目、数学"
}
]
}
},
created() {},
......@@ -425,136 +439,150 @@
}
},
methods: {
//计算培训课时数总价
getTotalClassHours() {
if (this.objOption.FirstClassHours >= 0 && this.objOption.SecondClassHours >= 0 && this.objOption
.ThirdClassHours >= 0) {
this.firstTotal = (parseFloat(this.objOption.FirstClassHours) + parseFloat(this.objOption.SecondClassHours) +
parseFloat(this.objOption.ThirdClassHours)).toFixed(2);
}
},
//计算培训课程费总价
getTotalCourseFee() {
let arr = [this.objOption.FirstCourseFee, this.objOption.SecondCourseFee, this.objOption.ThirdCourseFee];
this.secondTotal = 0;
arr.forEach(x => {
//计算价格合计
calcTotal() {
//计算培训课时数
var classHoursArray = [this.objOption.FirstClassHours, this.objOption.SecondClassHours, this.objOption
.ThirdClassHours
];
this.totalHours = 0;
classHoursArray.forEach(x => {
if (x != '') {
(this.secondTotal += parseFloat(x)).toFixed(2);
this.totalHours += Number(x);
}
})
},
//计算培训教材费总价
getTotalCommon() {
let arr = [this.objOption.FirstBookFee, this.objOption.SecondBookFee, this.objOption.ThirdBookFee];
this.thirdTotal = 0;
arr.forEach(x => {
//计算培训课程费总价
let courseFeeArray = [this.objOption.FirstCourseFee, this.objOption.SecondCourseFee, this.objOption
.ThirdCourseFee
];
var courseFee = 0;
this.totalCourseFee = 0;
courseFeeArray.forEach(x => {
if (x != '') {
(this.thirdTotal += parseFloat(x)).toFixed(2);
courseFee += Number(x);
}
})
},
//计算培训课件费总价
getTotalClassFee() {
let arr = [this.objOption.FirstClassFee, this.objOption.SecondClassFee, this.objOption.ThirdClassFee];
this.fourthTotal = 0;
arr.forEach(x => {
this.totalCourseFee = courseFee.toFixed(2);
//计算培训教材费总价
let bookFeeArr = [this.objOption.FirstBookFee, this.objOption.SecondBookFee, this.objOption.ThirdBookFee];
this.totalBookFee = 0;
var bookFee = 0;
bookFeeArr.forEach(x => {
if (x != '') {
(this.fourthTotal += parseFloat(x)).toFixed(2);
bookFee += Number(x);
}
})
},
//计算折让价格总价
getTotalDiscountMoney() {
let arr = [this.objOption.FirstDiscountMoney, this.objOption.SecondDiscountMoney, this.objOption
this.totalBookFee = bookFee.toFixed(2);
//计算培训课件费总价
let classFeeArray = [this.objOption.FirstClassFee, this.objOption.SecondClassFee, this.objOption.ThirdClassFee];
this.totalClassFee = 0;
var classFee = 0;
classFeeArray.forEach(x => {
if (x != '') {
classFee += Number(x);
}
})
this.totalClassFee = classFee.toFixed(2);
//计算折让价格总价
let discountMoneyArr = [this.objOption.FirstDiscountMoney, this.objOption.SecondDiscountMoney, this.objOption
.ThirdDiscountMoney
];
this.fifthTotal = 0;
arr.forEach(x => {
this.totalDiscountMoney = 0;
var diacountMoney = 0;
discountMoneyArr.forEach(x => {
if (x != '') {
(this.fifthTotal += parseFloat(x)).toFixed(2);
diacountMoney += Number(x);
}
})
},
//计算第一列费用小计
getFirstFYXJ() {
let arr = [this.objOption.FirstCourseFee, this.objOption.FirstBookFee, this.objOption.FirstClassFee];
this.totalDiscountMoney = diacountMoney.toFixed(2);
//计算第一列费用小计
let firstSubArr = [this.objOption.FirstCourseFee, this.objOption.FirstBookFee, this.objOption.FirstClassFee];
this.firstFYXJ = 0;
arr.forEach(x => {
var firstSub = 0;
firstSubArr.forEach(x => {
if (x != '') {
(this.firstFYXJ += parseFloat(x)).toFixed(2);
firstSub += Number(x);
}
})
this.getTotalFYXJ();
},
//计算第二列费用小计
getSecondFYXJ() {
let arr = [this.objOption.SecondCourseFee, this.objOption.SecondBookFee, this.objOption.SecondClassFee];
this.firstFYXJ = firstSub.toFixed(2);
//计算第二列费用小计
let secondSubArr = [this.objOption.SecondCourseFee, this.objOption.SecondBookFee, this.objOption
.SecondClassFee
];
this.secondFYXJ = 0;
arr.forEach(x => {
var secondSub = 0;
secondSubArr.forEach(x => {
if (x != '') {
(this.secondFYXJ += parseFloat(x)).toFixed(2);
secondSub += Number(x);
}
})
this.getTotalFYXJ();
},
//计算第三列费用小计
getthirdFYXJ() {
let arr = [this.objOption.ThirdCourseFee, this.objOption.ThirdBookFee, this.objOption.ThirdClassFee];
this.secondFYXJ = secondSub.toFixed(2);
//计算第三列费用小计
let thirdSubArr = [this.objOption.ThirdCourseFee, this.objOption.ThirdBookFee, this.objOption.ThirdClassFee];
this.thirdFYXJ = 0;
arr.forEach(x => {
var thirdSub = 0;
thirdSubArr.forEach(x => {
if (x != '') {
(this.thirdFYXJ += parseFloat(x)).toFixed(2);
thirdSub += Number(x);
}
})
this.getTotalFYXJ();
},
//获取费用小计总计
getTotalFYXJ() {
let arr = [this.firstFYXJ, this.secondFYXJ, this.thirdFYXJ];
this.thirdFYXJ = thirdSub.toFixed(2);
//获取费用小计总计
let subArray = [this.firstFYXJ, this.secondFYXJ, this.thirdFYXJ];
this.fyxjTotal = 0;
arr.forEach(x => {
var subTotal = 0;
subArray.forEach(x => {
if (x != '') {
(this.fyxjTotal += parseFloat(x)).toFixed(2);
subTotal += Number(x);
}
})
},
//计算第一列费用总计
getfirstFeiyongTotal() {
if (this.firstFYXJ != '' && this.objOption.FirstDiscountMoney != '') {
this.objOption.FirstMoney = (parseFloat(this.firstFYXJ) - parseFloat(this.objOption.FirstDiscountMoney))
.toFixed(2);
this.fyxjTotal = subTotal.toFixed(2);
//计算第一列费用总计
var firstDiscountMoney = 0;
if (this.objOption.FirstDiscountMoney && this.objOption.FirstDiscountMoney != '') {
firstDiscountMoney = Number(this.objOption.FirstDiscountMoney);
}
this.getTotal();
},
//计算第二列费用总计
getsecondFeiyongTotal() {
if (this.secondFYXJ != '' && this.objOption.SecondDiscountMoney != '') {
this.objOption.SecondMoney = (parseFloat(this.secondFYXJ) - parseFloat(this.objOption.SecondDiscountMoney))
.toFixed(2);
this.objOption.FirstMoney = (Number(this.firstFYXJ) - Number(firstDiscountMoney)).toFixed(2);
//计算第二列费用总计
var secondDiscountMoney = 0;
if (this.objOption.SecondDiscountMoney && this.objOption.SecondDiscountMoney != '') {
secondDiscountMoney = Number(this.objOption.SecondDiscountMoney);
}
this.getTotal();
},
//计算第三列费用总计
getthirdFeiyongTotal() {
if (this.thirdFYXJ != '' && this.objOption.ThirdDiscountMoney != '') {
this.objOption.ThirdMoney = (parseFloat(this.thirdFYXJ) - parseFloat(this.objOption.ThirdDiscountMoney))
.toFixed(2);
this.objOption.SecondMoney = (Number(this.secondFYXJ) - Number(secondDiscountMoney))
.toFixed(2);
//计算第三列费用总计
var thirdDiscountMoney = 0;
if (this.objOption.ThirdDiscountMoney && this.objOption.ThirdDiscountMoney != '') {
thirdDiscountMoney = Number(this.objOption.ThirdDiscountMoney);
}
this.getTotal();
},
//获取费用总计合计
getTotal() {
let arr = [this.objOption.FirstMoney, this.objOption.SecondMoney, this.objOption.ThirdMoney]
this.sixthTotal = 0;
arr.forEach(x => {
this.objOption.ThirdMoney = (Number(this.thirdFYXJ) - Number(thirdDiscountMoney))
.toFixed(2);
//获取费用总计合计
let totalMoneyArr = [this.objOption.FirstMoney, this.objOption.SecondMoney, this.objOption.ThirdMoney]
this.totalMoney = 0;
var totalMoney = 0;
totalMoneyArr.forEach(x => {
if (x != '') {
(this.sixthTotal += parseFloat(x)).toFixed(2);
totalMoney += Number(x);
}
})
this.totalMoney = totalMoney.toFixed(2);
},
//保存合同
saveContract() {
this.objOption.Money = this.sixthTotal;
this.objOption.Money = this.totalMoney;
SetEducationContractInfo(this.objOption).then(res => {
if (res.Code == 1) {
this.$q.notify({
......@@ -598,16 +626,7 @@
this.objOption.CourseName = tempData.CourseName;
this.objOption.CourseConsultant = tempData.CourseConsultant;
this.objOption.CNYCaps = tempData.CNYCaps;
this.getTotalClassHours();
this.getTotalCourseFee();
this.getTotalCommon();
this.getTotalClassFee();
this.getTotalDiscountMoney();
this.getFirstFYXJ();
this.getSecondFYXJ();
this.getthirdFYXJ();
this.getTotalFYXJ();
this.getTotal();
this.calcTotal();
}
})
},
......@@ -666,16 +685,7 @@
this.objOption.UrgentTel = tempData.UrgentTel;
this.objOption.ParentEmail = tempData.ParentEmail;
this.objOption.UrgentEmail = tempData.UrgentEmail;
this.getTotalClassHours();
this.getTotalCourseFee();
this.getTotalCommon();
this.getTotalClassFee();
this.getTotalDiscountMoney();
this.getFirstFYXJ();
this.getSecondFYXJ();
this.getthirdFYXJ();
this.getTotalFYXJ();
this.getTotal();
this.calcTotal();
}
})
}
......@@ -684,5 +694,4 @@
</script>
<style>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment