<style>
  .jobInfo_item {
    margin-bottom: 20px;
  }

  .job_Line {
    width: 3px;
    height: 11px;
    margin-right: 10px;
    background-color: #3FC4FF;
    display: inline-block;
  }

  .conTable {
    width: 100%;
  }

  .conTable th {
    height: 40px;
  }

</style>
<template>
  <q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
    <q-card style="width: 900px;max-width:1000px;">
      <q-card-section>
        <div class="text-h6">{{objOption.Id==0?'新增合同':'修改合同'}}</div>
      </q-card-section>
      <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
        <div class="jobInfo_item">
          <span class="job_Line"></span>学员信息
        </div>
        <div class="row wrap">
          <q-input clearable filled class="col-6 q-pr-lg q-pb-lg" v-model="objOption.StudentName" label="学生姓名" />
          <q-input filled v-model="objOption.StuBirth" class="col-6 q-pb-lg" mask="date" label="学生生日">
            <template v-slot:append>
              <q-icon name="event" class="cursor-pointer">
                <q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
                  <q-date v-model="objOption.StuBirth" @input="() => $refs.qDateProxy1.hide()" />
                </q-popup-proxy>
              </q-icon>
            </template>
          </q-input>
          <q-input clearable filled class="col-6 q-pr-lg q-pb-lg" v-model="objOption.StuEmail" label="学生邮箱" />
          <q-input clearable filled class="col-6 q-pb-lg" v-model="objOption.StuAddress" label="学生地址" />
          <q-input clearable filled class="col-6 q-pr-lg q-pb-lg" v-model="objOption.StuTel" label="学生电话" />
          <div class="col-6 q-pb-lg">
            学生性别：
            <q-radio v-model="objOption.StuSex" :val="0" label="男" />
            <q-radio v-model="objOption.StuSex" :val="1" label="女" />
          </div>
           <q-input clearable filled class="col-6 q-pr-lg q-pb-lg" v-model="objOption.StuIDCard" label="学生身份证号码" />
        </div>
        <div class="jobInfo_item">
          <span class="job_Line"></span>家长信息
        </div>
        <table class="conTable">
          <tr>
            <th>家长信息</th>
            <th>家长</th>
            <th>紧急联系人</th>
            <th>监护人身份证后4位</th>
          </tr>
          <tr>
            <td>姓名</td>
            <td>
              <q-input filled v-model="objOption.ParentName" />
            </td>
            <td>
              <q-input filled v-model="objOption.UrgentName" />
            </td>
            <td rowspan="4" style="vertical-align:top;">
              <q-input filled v-model="objOption.GuardianIDCard" />
            </td>
          </tr>
          <tr>
            <td>与学员的关系</td>
            <td>
              <q-input filled v-model="objOption.ParentRelation" />
            </td>
            <td>
              <q-input filled v-model="objOption.UrgentRelation" />
            </td>
          </tr>
          <tr>
            <td>联系电话</td>
            <td>
              <q-input filled v-model="objOption.ParentTel " />
            </td>
            <td>
              <q-input filled v-model="objOption.UrgentTel" />
            </td>
          </tr>
          <tr>
            <td>电子邮箱</td>
            <td>
              <q-input filled v-model="objOption.ParentEmail" />
            </td>
            <td>
              <q-input filled v-model="objOption.UrgentEmail" />
            </td>
          </tr>
        </table>
        <div class="jobInfo_item" style="margin-top:20px;">
          <span class="job_Line"></span>培训课程信息
        </div>
        <table class="conTable">
          <tr>
            <th>培训课程信息</th>
            <th></th>
            <th>校区信息</th>
            <th></th>
            <th></th>
            <th></th>
          </tr>
          <tr>
            <td>培训课程内容</td>
            <td>
              <q-input filled v-model="objOption.CourseName" />
            </td>
            <td>校区名称</td>
            <td>
              <q-input filled v-model="objOption.SchoolName" />
            </td>
            <td>校区负责人</td>
            <td>
              <q-input filled v-model="objOption.SchoolPrincipal" />
            </td>
          </tr>
          <tr>
            <td>起始级别</td>
            <td>
              <q-input filled v-model="objOption.StartLevel" />
            </td>
            <td>课程顾问</td>
            <td>
              <q-input filled v-model="objOption.CourseConsultant" />
            </td>
            <td>收款人</td>
            <td>
              <q-input filled v-model="objOption.Payee" />
            </td>
          </tr>
        </table>
        <div class="jobInfo_item" style="margin-top:20px;">
          <span class="job_Line"></span>费用类别
        </div>
        <table class="conTable">
          <tr>
            <th style="width:80px;">费用类别</th>
            <th>第一期</th>
            <th>第二期</th>
            <th>第三期</th>
            <th>总计</th>
          </tr>
          <tr>
            <td>培训课时数</td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'FirstClassHours')" @input="calcTotal()"
                v-model="objOption.FirstClassHours" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'SecondClassHours')" @input="calcTotal()"
                v-model="objOption.SecondClassHours" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'ThirdClassHours')" @input="calcTotal()"
                v-model="objOption.ThirdClassHours" />
            </td>
            <td>
              <q-input disable filled v-model="totalHours" />
            </td>
          </tr>
          <tr>
            <td>培训课程费</td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'FirstCourseFee')" @input="calcTotal()"
                v-model="objOption.FirstCourseFee" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'SecondCourseFee')" @input="calcTotal()"
                v-model="objOption.SecondCourseFee" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'ThirdCourseFee')" @input="calcTotal()"
                v-model="objOption.ThirdCourseFee" />
            </td>
            <td>
              <q-input disable filled v-model="totalCourseFee" />
            </td>
          </tr>
          <tr>
            <td>培训教材费</td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'FirstBookFee')" @input="calcTotal()"
                v-model="objOption.FirstBookFee" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'SecondBookFee')" @input="calcTotal()"
                v-model="objOption.SecondBookFee" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'ThirdBookFee')" @input="calcTotal()"
                v-model="objOption.ThirdBookFee" />
            </td>
            <td>
              <q-input disable filled v-model="totalBookFee" />
            </td>
          </tr>
          <tr>
            <td>培训课件费</td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'FirstClassFee')" @input="calcTotal()"
                v-model="objOption.FirstClassFee" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'SecondClassFee')" @input="calcTotal()"
                v-model="objOption.SecondClassFee" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'ThirdClassFee')" @input="calcTotal()"
                v-model="objOption.ThirdClassFee" />
            </td>
            <td>
              <q-input disable filled v-model="totalClassFee" />
            </td>
          </tr>
          <tr>
            <td>费用小计</td>
            <td>
              <q-input disable filled v-model="firstFYXJ" />
            </td>
            <td>
              <q-input disable filled v-model="secondFYXJ" />
            </td>
            <td>
              <q-input disable filled v-model="thirdFYXJ" />
            </td>
            <td>
              <q-input disable filled v-model="fyxjTotal" />
            </td>
          </tr>
          <tr>
            <td>折让价格</td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'FirstDiscountMoney')" @input="calcTotal()"
                v-model="objOption.FirstDiscountMoney" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'SecondDiscountMoney')" @input="calcTotal()"
                v-model="objOption.SecondDiscountMoney" />
            </td>
            <td>
              <q-input filled disable @keyup.native="checkPrice(objOption,'ThirdDiscountMoney')" @input="calcTotal()"
                v-model="objOption.ThirdDiscountMoney" />
            </td>
            <td>
              <q-input disable filled v-model="totalDiscountMoney" />
            </td>
          </tr>
          <tr>
            <td>
              <span style="color:red;">费用总计</span>
            </td>
            <td>
              <q-input disable filled v-model="objOption.FirstMoney" />
            </td>
            <td>
              <q-input disable filled v-model="objOption.SecondMoney" />
            </td>
            <td>
              <q-input disable filled v-model="objOption.ThirdMoney" />
            </td>
            <td>
              <q-input disable filled v-model="totalMoney" />
            </td>
          </tr>
          <tr>
            <td>支付日期</td>
            <td>
              <q-input filled v-model="objOption.FirstPayDate" class="col-6 q-pb-lg" mask="date">
                <template v-slot:append>
                  <q-icon name="event" class="cursor-pointer">
                    <q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
                      <q-date v-model="objOption.FirstPayDate" @input="() => $refs.qDateProxy1.hide()" />
                    </q-popup-proxy>
                  </q-icon>
                </template>
              </q-input>
            </td>
            <td>
              <q-input filled v-model="objOption.SecondPayDate" class="col-6 q-pb-lg" mask="date">
                <template v-slot:append>
                  <q-icon name="event" class="cursor-pointer">
                    <q-popup-proxy ref="qDateProxy2" transition-show="scale" transition-hide="scale">
                      <q-date v-model="objOption.SecondPayDate" @input="() => $refs.qDateProxy2.hide()" />
                    </q-popup-proxy>
                  </q-icon>
                </template>
              </q-input>
            </td>
            <td>
              <q-input filled v-model="objOption.ThirdPayDate" class="col-6 q-pb-lg" mask="date">
                <template v-slot:append>
                  <q-icon name="event" class="cursor-pointer">
                    <q-popup-proxy ref="qDateProxy3" transition-show="scale" transition-hide="scale">
                      <q-date v-model="objOption.ThirdPayDate" @input="() => $refs.qDateProxy3.hide()" />
                    </q-popup-proxy>
                  </q-icon>
                </template>
              </q-input>
            </td>
            <td>
            </td>
          </tr>
        </table>
        <div class="row wrap">
          <q-select class="col-6 q-pb-lg " clearable filled stack-label   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"
              v-model="objOption.IsSupplement" />
          </div>
        </div>
      </q-card-section>
      <q-separator />
      <q-card-actions align="right" class="bg-white">
        <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
        <q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
          @click="saveContract" />
      </q-card-actions>
    </q-card>
  </q-dialog>
</template>

<script>
  import {
    SetEducationContractInfo,
    GetStudentInfo,
    GetEducationContractInfo
  } from '../../api/sale/contract'
  export default {
    props: {
      setingObj: {
        type: Object,
        default: null
      }
    },
    data() {
      return {
        persistent: true,
        objOption: {
          Id: 0,
          OrderId: 0,
          GuestId: 0,
          CType: 1, //类型1培训 2留学
          StudentName: '', //学生姓名
          StuBirth: '', //学生生日
          StuSex: 0, //学生性别0男1女
          StuAddress: '', //学生地址
          StuTel: '', //学生电话
          StuEmail: '', //学生邮箱
          ParentName: '', //家长姓名
          ParentRelation: '', //家长与学员关系
          ParentTel: '', //家长电话
          ParentEmail: '', //家长邮箱
          UrgentName: '', //紧急联系人姓名
          UrgentRelation: '', //紧急联系人与学生关系
          UrgentTel: '', //紧急联系人电话
          UrgentEmail: '', //紧急联系人邮箱
          GuardianIDCard: '', //监护人身份证后4位
          CourseName: '', //培训课程内容
          SchoolName: '', //校区名称
          SchoolPrincipal: '', //校区负责人
          StartLevel: '', //起始级别
          CourseConsultant: '', //课程顾问
          Payee: '', //收款人
          FirstClassHours: 0, //第一期-培训课时数
          FirstCourseFee: '', //第一期-培训课程费
          FirstBookFee: '', //第一期-培训教材费
          FirstClassFee: '', //第一期-培训课件费
          FirstDiscountMoney: '', // 第一期-折让价格
          FirstMoney: '', //第一期-费用总计
          FirstPayDate: '', //第一期-支付日期
          SecondClassHours: 0, //第二期-培训课时数
          SecondCourseFee: '', // 第二期-培训课程费
          SecondBookFee: '', //第二期-培训教材费
          SecondClassFee: '', //第二期-培训课件费
          SecondDiscountMoney: '', //第二期-折让价格
          SecondMoney: '', //第二期-费用总计
          SecondPayDate: '', //第二期-支付日期
          ThirdClassHours: 0, //第三期-培训课时数
          ThirdCourseFee: '', //第三期-培训课程费
          ThirdBookFee: '', //第三期-培训教材费
          ThirdClassFee: '', // 第三期-培训课件费
          ThirdDiscountMoney: '', //第三期-折让价格
          ThirdMoney: '', //第三期-费用总计
          ThirdPayDate: '', //第三期-支付日期
          Exam: '', //乙方当前选择考试
          IsSupplement: 0, // 0无 1 有 是否有补充协议
          StuIDCard:"",//学员身份证号码
        },
        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 日语国际能力测试（JLPT）- 初级（N5-N4）",
            Value: "A 日语国际能力测试（JLPT）- 初级（N5-N4）"
          },
          {
            Id: "A 日语国际能力测试（JLPT）- 中级（N3-N2）",
            Value: "A 日语国际能力测试（JLPT）- 中级（N3-N2）"
          },
          {
            Id: "A 日语国际能力测试（JLPT）- 高级（N1）",
            Value: "A 日语国际能力测试（JLPT）- 高级（N1）"
          },
          {
            Id: "B 实用日本语鉴定考试（J.TEST）- 初级（E-F级）",
            Value: "B 实用日本语鉴定考试（J.TEST）- 初级（E-F级）"
          },
          {
            Id: "B 实用日本语鉴定考试（J.TEST）- 中高级（A-D级）",
            Value: "B 实用日本语鉴定考试（J.TEST）- 中高级（A-D级）"
          },
          {
            Id: "日本留学生考试（EJU）- 文科（日语）",
            Value: "日本留学生考试（EJU）- 文科（日语）"
          },
          {
            Id: "日本留学生考试（EJU）- 综合科目",
            Value: "日本留学生考试（EJU）- 综合科目"
          },
          {
            Id: "日本留学生考试（EJU）- 数学",
            Value: "日本留学生考试（EJU）- 数学"
          }
        ]
      }
    },
    created() {},
    mounted() {
      if (this.setingObj) {
        this.StudentMsg.OrderId = this.setingObj.OrderId;
        this.StudentMsg.GuestId = this.setingObj.GuestId;
        this.objOption.OrderId = this.setingObj.OrderId;
        this.objOption.GuestId = this.setingObj.GuestId;
        if (this.setingObj.ContractId > 0) {
          this.getInfoList();
        } else {
          this.getStudentContract();
        }
      }
    },
    methods: {
      //计算价格合计
      calcTotal() {
        //计算培训课时数
        var classHoursArray = [this.objOption.FirstClassHours, this.objOption.SecondClassHours, this.objOption
          .ThirdClassHours
        ];
        this.totalHours = 0;
        classHoursArray.forEach(x => {
          if (x != '') {
            this.totalHours += Number(x);
          }
        })

        //计算培训课程费总价
        let courseFeeArray = [this.objOption.FirstCourseFee, this.objOption.SecondCourseFee, this.objOption
          .ThirdCourseFee
        ];
        var courseFee = 0;
        this.totalCourseFee = 0;
        courseFeeArray.forEach(x => {
          if (x != '') {
            courseFee += Number(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 != '') {
            bookFee += Number(x);
          }
        })
        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.totalDiscountMoney = 0;
        var diacountMoney = 0;
        discountMoneyArr.forEach(x => {
          if (x != '') {
            diacountMoney += Number(x);
          }
        })
        this.totalDiscountMoney = diacountMoney.toFixed(2);

        //计算第一列费用小计
        let firstSubArr = [this.objOption.FirstCourseFee, this.objOption.FirstBookFee, this.objOption.FirstClassFee];
        this.firstFYXJ = 0;
        var firstSub = 0;
        firstSubArr.forEach(x => {
          if (x != '') {
            firstSub += Number(x);
          }
        })
        this.firstFYXJ = firstSub.toFixed(2);

        //计算第二列费用小计
        let secondSubArr = [this.objOption.SecondCourseFee, this.objOption.SecondBookFee, this.objOption
          .SecondClassFee
        ];
        this.secondFYXJ = 0;
        var secondSub = 0;
        secondSubArr.forEach(x => {
          if (x != '') {
            secondSub += Number(x);
          }
        })
        this.secondFYXJ = secondSub.toFixed(2);

        //计算第三列费用小计
        let thirdSubArr = [this.objOption.ThirdCourseFee, this.objOption.ThirdBookFee, this.objOption.ThirdClassFee];
        this.thirdFYXJ = 0;
        var thirdSub = 0;
        thirdSubArr.forEach(x => {
          if (x != '') {
            thirdSub += Number(x);
          }
        })
        this.thirdFYXJ = thirdSub.toFixed(2);

        //获取费用小计总计
        let subArray = [this.firstFYXJ, this.secondFYXJ, this.thirdFYXJ];
        this.fyxjTotal = 0;
        var subTotal = 0;
        subArray.forEach(x => {
          if (x != '') {
            subTotal += Number(x);
          }
        })
        this.fyxjTotal = subTotal.toFixed(2);

        //计算第一列费用总计
        var firstDiscountMoney = 0;
        if (this.objOption.FirstDiscountMoney && this.objOption.FirstDiscountMoney != '') {
          firstDiscountMoney = Number(this.objOption.FirstDiscountMoney);
        }
        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.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.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 != '') {
            totalMoney += Number(x);
          }
        })
        this.totalMoney = totalMoney.toFixed(2);
      },
      //保存合同
      saveContract() {
        this.objOption.Money = this.totalMoney;
        SetEducationContractInfo(this.objOption).then(res => {
          if (res.Code == 1) {
            this.$q.notify({
              icon: 'iconfont icon-chenggong',
              color: 'accent',
              timeout: 2000,
              message: '修改成功！',
              position: 'top'
            })
          }
          this.$emit('success');
          this.closeSaveForm();
        })
      },
      closeSaveForm() {
        this.$emit('close')
        this.persistent = false
      },
      //获取学生信息
      getStudentContract() {
        GetStudentInfo(this.StudentMsg).then(res => {
          if (res.Code == 1) {
            var tempData = res.Data;
            this.objOption.StudentName = tempData.StudentName;
            this.objOption.StuTel = tempData.StuTel;
            this.objOption.StuSex = tempData.StuSex;
            this.objOption.StuEmail = tempData.StuEmail;
            this.objOption.StuBirth = tempData.StuBirth;
            this.objOption.StuAddress = tempData.StuAddress;
            this.objOption.StartLevel = tempData.StartLevel;
            this.objOption.SchoolPrincipal = tempData.SchoolPrincipal;
            this.objOption.SchoolName = tempData.SchoolName;
            this.objOption.Payee = tempData.Payee;
            this.objOption.Money = tempData.Money;
            this.objOption.FirstMoney = tempData.FirstMoney;
            this.objOption.FirstDiscountMoney = tempData.FirstDiscountMoney;
            this.objOption.FirstCourseFee = tempData.FirstCourseFee;
            this.objOption.FirstClassHours = tempData.FirstClassHours;
            this.objOption.FirstClassFee = tempData.FirstClassFee;
            this.objOption.FirstBookFee = tempData.FirstBookFee;
            this.objOption.CourseName = tempData.CourseName;
            this.objOption.CourseConsultant = tempData.CourseConsultant;
            this.objOption.CNYCaps = tempData.CNYCaps;
            this.calcTotal();
          }
        })
      },
      //获取详情
      getInfoList() {
        let msg = {
          ContractId: this.setingObj.ContractId
        }
        GetEducationContractInfo(msg).then(res => {
          if (res.Code == 1) {
            var tempData = res.Data;
            this.objOption.Id = tempData.Id;
            this.objOption.StudentName = tempData.StudentName;
            this.objOption.StuTel = tempData.StuTel;
            this.objOption.StuSex = tempData.StuSex;
            this.objOption.StuEmail = tempData.StuEmail;
            this.objOption.StuBirth = tempData.StuBirthStr;
            this.objOption.StuAddress = tempData.StuAddress;
            this.objOption.StartLevel = tempData.StartLevel;
            this.objOption.SchoolPrincipal = tempData.SchoolPrincipal;
            this.objOption.SchoolName = tempData.SchoolName;
            this.objOption.Payee = tempData.Payee;
            this.objOption.Money = tempData.Money;
            this.objOption.FirstMoney = tempData.FirstMoney;
            this.objOption.FirstPayDate = tempData.FirstPayDateStr;
            this.objOption.FirstDiscountMoney = tempData.FirstDiscountMoney;
            this.objOption.FirstCourseFee = tempData.FirstCourseFee;
            this.objOption.FirstClassHours = tempData.FirstClassHours;
            this.objOption.FirstClassFee = tempData.FirstClassFee;
            this.objOption.FirstBookFee = tempData.FirstBookFee;
            this.objOption.SecondClassHours = tempData.SecondClassHours;
            this.objOption.SecondCourseFee = tempData.SecondCourseFee;
            this.objOption.SecondBookFee = tempData.SecondBookFee;
            this.objOption.SecondClassFee = tempData.SecondClassFee;
            this.objOption.SecondDiscountMoney = tempData.SecondDiscountMoney;
            this.objOption.SecondMoney = tempData.SecondMoney;
            this.objOption.SecondPayDate = tempData.SecondPayDateStr;
            this.objOption.ThirdClassHours = tempData.ThirdClassHours;
            this.objOption.ThirdCourseFee = tempData.ThirdCourseFee;
            this.objOption.ThirdBookFee = tempData.ThirdBookFee;
            this.objOption.ThirdClassFee = tempData.ThirdClassFee;
            this.objOption.ThirdDiscountMoney = tempData.ThirdDiscountMoney;
            this.objOption.ThirdMoney = tempData.ThirdMoney;
            this.objOption.ThirdPayDate = tempData.ThirdPayDateStr;
            this.objOption.CourseName = tempData.CourseName;
            this.objOption.CourseConsultant = tempData.CourseConsultant;
            this.objOption.CNYCaps = tempData.CNYCaps;
            this.objOption.Exam = tempData.Exam;
            this.objOption.IsSupplement = tempData.IsSupplement;
            this.objOption.ParentName = tempData.ParentName;
            this.objOption.ParentRelation = tempData.ParentRelation;
            this.objOption.UrgentName = tempData.UrgentName;
            this.objOption.GuardianIDCard = tempData.GuardianIDCard;
            this.objOption.UrgentRelation = tempData.UrgentRelation;
            this.objOption.ParentTel = tempData.ParentTel;
            this.objOption.UrgentTel = tempData.UrgentTel;
            this.objOption.ParentEmail = tempData.ParentEmail;
            this.objOption.UrgentEmail = tempData.UrgentEmail;
            this.calcTotal();
          }
        })
      }
    },
  }

</script>
<style>
</style>
