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

页面修改

parent 550ce444
...@@ -147,75 +147,73 @@ ...@@ -147,75 +147,73 @@
<tr> <tr>
<td>培训课时数</td> <td>培训课时数</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" /> v-model="objOption.FirstClassHours" />
</td> </td>
<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" /> v-model="objOption.SecondClassHours" />
</td> </td>
<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" /> v-model="objOption.ThirdClassHours" />
</td> </td>
<td> <td>
<q-input disable filled v-model="firstTotal" /> <q-input disable filled v-model="totalHours" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>培训课程费</td> <td>培训课程费</td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'FirstCourseFee')" <q-input filled @keyup.native="checkPrice(objOption,'FirstCourseFee')" @input="calcTotal()"
@input="getTotalCourseFee(),getFirstFYXJ(),getfirstFeiyongTotal()" v-model="objOption.FirstCourseFee" /> v-model="objOption.FirstCourseFee" />
</td> </td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'SecondCourseFee')" <q-input filled @keyup.native="checkPrice(objOption,'SecondCourseFee')" @input="calcTotal()"
@input="getTotalCourseFee(),getSecondFYXJ(),getsecondFeiyongTotal()"
v-model="objOption.SecondCourseFee" /> v-model="objOption.SecondCourseFee" />
</td> </td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'ThirdCourseFee')" <q-input filled @keyup.native="checkPrice(objOption,'ThirdCourseFee')" @input="calcTotal()"
@input="getTotalCourseFee(),getthirdFYXJ(),getthirdFeiyongTotal()" v-model="objOption.ThirdCourseFee" /> v-model="objOption.ThirdCourseFee" />
</td> </td>
<td> <td>
<q-input disable filled v-model="secondTotal" /> <q-input disable filled v-model="totalCourseFee" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>培训教材费</td> <td>培训教材费</td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'FirstBookFee')" <q-input filled @keyup.native="checkPrice(objOption,'FirstBookFee')" @input="calcTotal()"
@input="getTotalCommon(),getFirstFYXJ(),getfirstFeiyongTotal()" v-model="objOption.FirstBookFee" /> v-model="objOption.FirstBookFee" />
</td> </td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'SecondBookFee')" <q-input filled @keyup.native="checkPrice(objOption,'SecondBookFee')" @input="calcTotal()"
@input="getTotalCommon(),getSecondFYXJ(),getsecondFeiyongTotal()" v-model="objOption.SecondBookFee" /> v-model="objOption.SecondBookFee" />
</td> </td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'ThirdBookFee')" <q-input filled @keyup.native="checkPrice(objOption,'ThirdBookFee')" @input="calcTotal()"
@input="getTotalCommon(),getthirdFYXJ(),getthirdFeiyongTotal()" v-model="objOption.ThirdBookFee" /> v-model="objOption.ThirdBookFee" />
</td> </td>
<td> <td>
<q-input disable filled v-model="thirdTotal" /> <q-input disable filled v-model="totalBookFee" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>培训课件费</td> <td>培训课件费</td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'FirstClassFee')" <q-input filled @keyup.native="checkPrice(objOption,'FirstClassFee')" @input="calcTotal()"
@input="getTotalClassFee(),getFirstFYXJ(),getfirstFeiyongTotal()" v-model="objOption.FirstClassFee" /> v-model="objOption.FirstClassFee" />
</td> </td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'SecondClassFee')" <q-input filled @keyup.native="checkPrice(objOption,'SecondClassFee')" @input="calcTotal()"
@input="getTotalClassFee(),getSecondFYXJ(),getsecondFeiyongTotal()"
v-model="objOption.SecondClassFee" /> v-model="objOption.SecondClassFee" />
</td> </td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'ThirdClassFee')" <q-input filled @keyup.native="checkPrice(objOption,'ThirdClassFee')" @input="calcTotal()"
@input="getTotalClassFee(),getthirdFYXJ(),getthirdFeiyongTotal()" v-model="objOption.ThirdClassFee" /> v-model="objOption.ThirdClassFee" />
</td> </td>
<td> <td>
<q-input disable filled v-model="fourthTotal" /> <q-input disable filled v-model="totalClassFee" />
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -236,19 +234,19 @@ ...@@ -236,19 +234,19 @@
<tr> <tr>
<td>折让价格</td> <td>折让价格</td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'FirstDiscountMoney')" <q-input filled @keyup.native="checkPrice(objOption,'FirstDiscountMoney')" @input="calcTotal()"
@input="getTotalDiscountMoney(),getfirstFeiyongTotal()" v-model="objOption.FirstDiscountMoney" /> v-model="objOption.FirstDiscountMoney" />
</td> </td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'SecondDiscountMoney')" <q-input filled @keyup.native="checkPrice(objOption,'SecondDiscountMoney')" @input="calcTotal()"
@input="getTotalDiscountMoney(),getsecondFeiyongTotal()" v-model="objOption.SecondDiscountMoney" /> v-model="objOption.SecondDiscountMoney" />
</td> </td>
<td> <td>
<q-input filled @keyup.native="checkPrice(objOption,'ThirdDiscountMoney')" <q-input filled @keyup.native="checkPrice(objOption,'ThirdDiscountMoney')" @input="calcTotal()"
@input="getTotalDiscountMoney(),getthirdFeiyongTotal()" v-model="objOption.ThirdDiscountMoney" /> v-model="objOption.ThirdDiscountMoney" />
</td> </td>
<td> <td>
<q-input disable filled v-model="fifthTotal" /> <q-input disable filled v-model="totalDiscountMoney" />
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -265,7 +263,7 @@ ...@@ -265,7 +263,7 @@
<q-input disable filled v-model="objOption.ThirdMoney" /> <q-input disable filled v-model="objOption.ThirdMoney" />
</td> </td>
<td> <td>
<q-input disable filled v-model="sixthTotal" /> <q-input disable filled v-model="totalMoney" />
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -304,12 +302,14 @@ ...@@ -304,12 +302,14 @@
</q-input> </q-input>
</td> </td>
<td> <td>
</td> </td>
</tr> </tr>
</table> </table>
<div class="row wrap"> <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;"> <div class="col-3" style="margin:10px 0 0 20px;">
是否有补充协议 是否有补充协议
<q-toggle size="md" label="" color="primary" :false-value="0" :true-value="1" <q-toggle size="md" label="" color="primary" :false-value="0" :true-value="1"
...@@ -393,21 +393,35 @@ ...@@ -393,21 +393,35 @@
Exam: '', //乙方当前选择考试 Exam: '', //乙方当前选择考试
IsSupplement: 1, // 0无 1 有 是否有补充协议 IsSupplement: 1, // 0无 1 有 是否有补充协议
}, },
firstTotal: 0, // 培训课时数总计 totalHours: 0, //培训课时数总计
secondTotal: 0, // 培训课程费总计 totalCourseFee: 0, //培训课程费总计
thirdTotal: 0, // 培训教材费总计 totalBookFee: 0, //培训教材费总计
fourthTotal: 0, // 培训课件费总计 totalClassFee: 0, //培训课件费总计
fifthTotal: 0, // 折让价格 totalDiscountMoney: 0, //折让价格
sixthTotal: 0, // 费用总计 totalMoney: 0, // 费用总计
firstFYXJ: 0, firstFYXJ: 0, //第一列费用小计
secondFYXJ: 0, secondFYXJ: 0, //第二列费用小计
thirdFYXJ: 0, thirdFYXJ: 0, //第三列费用小计
fyxjTotal: 0, fyxjTotal: 0, //费用小计合计
saveLoading: false, saveLoading: false,
StudentMsg: { StudentMsg: {
OrderId: 0, OrderId: 0,
GuestId: 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() {}, created() {},
...@@ -425,136 +439,150 @@ ...@@ -425,136 +439,150 @@
} }
}, },
methods: { methods: {
//计算培训课时数总价 //计算价格合计
getTotalClassHours() { calcTotal() {
if (this.objOption.FirstClassHours >= 0 && this.objOption.SecondClassHours >= 0 && this.objOption //计算培训课时数
.ThirdClassHours >= 0) { var classHoursArray = [this.objOption.FirstClassHours, this.objOption.SecondClassHours, this.objOption
this.firstTotal = (parseFloat(this.objOption.FirstClassHours) + parseFloat(this.objOption.SecondClassHours) + .ThirdClassHours
parseFloat(this.objOption.ThirdClassHours)).toFixed(2); ];
} this.totalHours = 0;
}, classHoursArray.forEach(x => {
//计算培训课程费总价
getTotalCourseFee() {
let arr = [this.objOption.FirstCourseFee, this.objOption.SecondCourseFee, this.objOption.ThirdCourseFee];
this.secondTotal = 0;
arr.forEach(x => {
if (x != '') { if (x != '') {
(this.secondTotal += parseFloat(x)).toFixed(2); this.totalHours += Number(x);
} }
}) })
},
//计算培训教材费总价 //计算培训课程费总价
getTotalCommon() { let courseFeeArray = [this.objOption.FirstCourseFee, this.objOption.SecondCourseFee, this.objOption
let arr = [this.objOption.FirstBookFee, this.objOption.SecondBookFee, this.objOption.ThirdBookFee]; .ThirdCourseFee
this.thirdTotal = 0; ];
arr.forEach(x => { var courseFee = 0;
this.totalCourseFee = 0;
courseFeeArray.forEach(x => {
if (x != '') { if (x != '') {
(this.thirdTotal += parseFloat(x)).toFixed(2); courseFee += Number(x);
} }
}) })
}, this.totalCourseFee = courseFee.toFixed(2);
//计算培训课件费总价
getTotalClassFee() { //计算培训教材费总价
let arr = [this.objOption.FirstClassFee, this.objOption.SecondClassFee, this.objOption.ThirdClassFee]; let bookFeeArr = [this.objOption.FirstBookFee, this.objOption.SecondBookFee, this.objOption.ThirdBookFee];
this.fourthTotal = 0; this.totalBookFee = 0;
arr.forEach(x => { var bookFee = 0;
bookFeeArr.forEach(x => {
if (x != '') { if (x != '') {
(this.fourthTotal += parseFloat(x)).toFixed(2); bookFee += Number(x);
} }
}) })
}, this.totalBookFee = bookFee.toFixed(2);
//计算折让价格总价
getTotalDiscountMoney() { //计算培训课件费总价
let arr = [this.objOption.FirstDiscountMoney, this.objOption.SecondDiscountMoney, this.objOption 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 .ThirdDiscountMoney
]; ];
this.fifthTotal = 0; this.totalDiscountMoney = 0;
arr.forEach(x => { var diacountMoney = 0;
discountMoneyArr.forEach(x => {
if (x != '') { if (x != '') {
(this.fifthTotal += parseFloat(x)).toFixed(2); diacountMoney += Number(x);
} }
}) })
}, this.totalDiscountMoney = diacountMoney.toFixed(2);
//计算第一列费用小计
getFirstFYXJ() { //计算第一列费用小计
let arr = [this.objOption.FirstCourseFee, this.objOption.FirstBookFee, this.objOption.FirstClassFee]; let firstSubArr = [this.objOption.FirstCourseFee, this.objOption.FirstBookFee, this.objOption.FirstClassFee];
this.firstFYXJ = 0; this.firstFYXJ = 0;
arr.forEach(x => { var firstSub = 0;
firstSubArr.forEach(x => {
if (x != '') { if (x != '') {
(this.firstFYXJ += parseFloat(x)).toFixed(2); firstSub += Number(x);
} }
}) })
this.getTotalFYXJ(); this.firstFYXJ = firstSub.toFixed(2);
},
//计算第二列费用小计 //计算第二列费用小计
getSecondFYXJ() { let secondSubArr = [this.objOption.SecondCourseFee, this.objOption.SecondBookFee, this.objOption
let arr = [this.objOption.SecondCourseFee, this.objOption.SecondBookFee, this.objOption.SecondClassFee]; .SecondClassFee
];
this.secondFYXJ = 0; this.secondFYXJ = 0;
arr.forEach(x => { var secondSub = 0;
secondSubArr.forEach(x => {
if (x != '') { if (x != '') {
(this.secondFYXJ += parseFloat(x)).toFixed(2); secondSub += Number(x);
} }
}) })
this.getTotalFYXJ(); this.secondFYXJ = secondSub.toFixed(2);
},
//计算第三列费用小计 //计算第三列费用小计
getthirdFYXJ() { let thirdSubArr = [this.objOption.ThirdCourseFee, this.objOption.ThirdBookFee, this.objOption.ThirdClassFee];
let arr = [this.objOption.ThirdCourseFee, this.objOption.ThirdBookFee, this.objOption.ThirdClassFee];
this.thirdFYXJ = 0; this.thirdFYXJ = 0;
arr.forEach(x => { var thirdSub = 0;
thirdSubArr.forEach(x => {
if (x != '') { if (x != '') {
(this.thirdFYXJ += parseFloat(x)).toFixed(2); thirdSub += Number(x);
} }
}) })
this.getTotalFYXJ(); this.thirdFYXJ = thirdSub.toFixed(2);
},
//获取费用小计总计 //获取费用小计总计
getTotalFYXJ() { let subArray = [this.firstFYXJ, this.secondFYXJ, this.thirdFYXJ];
let arr = [this.firstFYXJ, this.secondFYXJ, this.thirdFYXJ];
this.fyxjTotal = 0; this.fyxjTotal = 0;
arr.forEach(x => { var subTotal = 0;
subArray.forEach(x => {
if (x != '') { if (x != '') {
(this.fyxjTotal += parseFloat(x)).toFixed(2); subTotal += Number(x);
} }
}) })
}, this.fyxjTotal = subTotal.toFixed(2);
//计算第一列费用总计
getfirstFeiyongTotal() { //计算第一列费用总计
if (this.firstFYXJ != '' && this.objOption.FirstDiscountMoney != '') { var firstDiscountMoney = 0;
this.objOption.FirstMoney = (parseFloat(this.firstFYXJ) - parseFloat(this.objOption.FirstDiscountMoney)) if (this.objOption.FirstDiscountMoney && this.objOption.FirstDiscountMoney != '') {
.toFixed(2); firstDiscountMoney = Number(this.objOption.FirstDiscountMoney);
} }
this.getTotal(); this.objOption.FirstMoney = (Number(this.firstFYXJ) - Number(firstDiscountMoney)).toFixed(2);
},
//计算第二列费用总计 //计算第二列费用总计
getsecondFeiyongTotal() { var secondDiscountMoney = 0;
if (this.secondFYXJ != '' && this.objOption.SecondDiscountMoney != '') { if (this.objOption.SecondDiscountMoney && this.objOption.SecondDiscountMoney != '') {
this.objOption.SecondMoney = (parseFloat(this.secondFYXJ) - parseFloat(this.objOption.SecondDiscountMoney)) secondDiscountMoney = Number(this.objOption.SecondDiscountMoney);
.toFixed(2);
} }
this.getTotal(); this.objOption.SecondMoney = (Number(this.secondFYXJ) - Number(secondDiscountMoney))
}, .toFixed(2);
//计算第三列费用总计
getthirdFeiyongTotal() { //计算第三列费用总计
if (this.thirdFYXJ != '' && this.objOption.ThirdDiscountMoney != '') { var thirdDiscountMoney = 0;
this.objOption.ThirdMoney = (parseFloat(this.thirdFYXJ) - parseFloat(this.objOption.ThirdDiscountMoney)) if (this.objOption.ThirdDiscountMoney && this.objOption.ThirdDiscountMoney != '') {
.toFixed(2); thirdDiscountMoney = Number(this.objOption.ThirdDiscountMoney);
} }
this.getTotal(); this.objOption.ThirdMoney = (Number(this.thirdFYXJ) - Number(thirdDiscountMoney))
}, .toFixed(2);
//获取费用总计合计
getTotal() { //获取费用总计合计
let arr = [this.objOption.FirstMoney, this.objOption.SecondMoney, this.objOption.ThirdMoney] let totalMoneyArr = [this.objOption.FirstMoney, this.objOption.SecondMoney, this.objOption.ThirdMoney]
this.sixthTotal = 0; this.totalMoney = 0;
arr.forEach(x => { var totalMoney = 0;
totalMoneyArr.forEach(x => {
if (x != '') { if (x != '') {
(this.sixthTotal += parseFloat(x)).toFixed(2); totalMoney += Number(x);
} }
}) })
this.totalMoney = totalMoney.toFixed(2);
}, },
//保存合同 //保存合同
saveContract() { saveContract() {
this.objOption.Money = this.sixthTotal; this.objOption.Money = this.totalMoney;
SetEducationContractInfo(this.objOption).then(res => { SetEducationContractInfo(this.objOption).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
...@@ -598,16 +626,7 @@ ...@@ -598,16 +626,7 @@
this.objOption.CourseName = tempData.CourseName; this.objOption.CourseName = tempData.CourseName;
this.objOption.CourseConsultant = tempData.CourseConsultant; this.objOption.CourseConsultant = tempData.CourseConsultant;
this.objOption.CNYCaps = tempData.CNYCaps; this.objOption.CNYCaps = tempData.CNYCaps;
this.getTotalClassHours(); this.calcTotal();
this.getTotalCourseFee();
this.getTotalCommon();
this.getTotalClassFee();
this.getTotalDiscountMoney();
this.getFirstFYXJ();
this.getSecondFYXJ();
this.getthirdFYXJ();
this.getTotalFYXJ();
this.getTotal();
} }
}) })
}, },
...@@ -666,16 +685,7 @@ ...@@ -666,16 +685,7 @@
this.objOption.UrgentTel = tempData.UrgentTel; this.objOption.UrgentTel = tempData.UrgentTel;
this.objOption.ParentEmail = tempData.ParentEmail; this.objOption.ParentEmail = tempData.ParentEmail;
this.objOption.UrgentEmail = tempData.UrgentEmail; this.objOption.UrgentEmail = tempData.UrgentEmail;
this.getTotalClassHours(); this.calcTotal();
this.getTotalCourseFee();
this.getTotalCommon();
this.getTotalClassFee();
this.getTotalDiscountMoney();
this.getFirstFYXJ();
this.getSecondFYXJ();
this.getthirdFYXJ();
this.getTotalFYXJ();
this.getTotal();
} }
}) })
} }
...@@ -684,5 +694,4 @@ ...@@ -684,5 +694,4 @@
</script> </script>
<style> <style>
</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