|
|
@ -165,7 +165,7 @@ |
|
|
|
<view class="row"> |
|
|
|
<view class="lab ">已过科目</view> |
|
|
|
<view class="rightCon"> |
|
|
|
<view class="row" @click="showSubjectPass=true"> |
|
|
|
<view class="row" @click="subjectClick"> |
|
|
|
<view class="val"> |
|
|
|
<mySelect :value="form.finishSubjectName"/> |
|
|
|
</view> |
|
|
@ -190,12 +190,12 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="card"> |
|
|
|
<view class="card" v-if="form.totalAmount"> |
|
|
|
<view class="row"> |
|
|
|
<view class="lab">学费</view> |
|
|
|
<view class="rightCon"> |
|
|
|
<view class="row"> |
|
|
|
<view class="val blue">¥{{ $u.utils.priceTo(form.totalAmount) }}</view> |
|
|
|
<view class="val blue" >¥{{ $u.utils.priceTo(form.totalAmount) }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -226,7 +226,7 @@ |
|
|
|
<!-- 待学科目 --> |
|
|
|
<u-picker :show="showSubjectTreat" :columns="columnsSubject" keyName="label" @confirm="confirmTreat" @cancel="showSubjectTreat=false"></u-picker> |
|
|
|
<!-- 城市 --> |
|
|
|
<u-picker :show="showCity" ref="uPicker" :columns="[cityArr]" @confirm="confirmCity" @change="changeHandler" keyName="name"></u-picker> |
|
|
|
<u-picker :show="showCity" ref="uPicker" :columns="[cityArr]" @confirm="confirmCity" @change="changeHandler" keyName="name" @cancel="showCity=false"></u-picker> |
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -235,7 +235,7 @@ |
|
|
|
import comfigPopup from './comp/comfigPopup' |
|
|
|
import searchSchool from './comp/searchSchool' |
|
|
|
import oldDrive from './comp/oldDrive' |
|
|
|
import { areaTree, applyOnline, schoolClass, getSchoolDetail } from '@/config/api.js' |
|
|
|
import { areaTree, applyOnline, schoolClass, getSchoolDetail, paymentPrice } from '@/config/api.js' |
|
|
|
import { scanCodeFn } from '@/config/utils.js' |
|
|
|
export default { |
|
|
|
components: { comfigPopup, searchSchool, oldDrive }, |
|
|
@ -289,7 +289,7 @@ |
|
|
|
}, |
|
|
|
showSchool: false, |
|
|
|
radiolist1: [ {name: '初领', id: 0}, {name: '增驾', id: 1}],//0:初领,1:增驾, |
|
|
|
radiolist2: [ {name: '是', id: 1}, {name: '否', id: 2}], |
|
|
|
radiolist2: [{name: '否', id: 2}, {name: '是', id: 1}, ], |
|
|
|
radiolist3: [ {name: '全款', id: 1}, {name: '预付款', id: 2}], |
|
|
|
cityArr: [], |
|
|
|
cityArr2: [], |
|
|
@ -368,7 +368,7 @@ |
|
|
|
}, |
|
|
|
// 查班型 |
|
|
|
async schoolClassFn() { |
|
|
|
const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId}) |
|
|
|
const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId, carType: this.form.trainType}) |
|
|
|
this.columnsClassModel = [res.list] |
|
|
|
console.log(this.columnsClassModel) |
|
|
|
}, |
|
|
@ -488,16 +488,25 @@ |
|
|
|
this.showClassModel = false |
|
|
|
this.form.classModel = item.name |
|
|
|
this.form.schoolClassId = item.id |
|
|
|
this.form.totalAmount = item.totalAmount |
|
|
|
if(this.form.finishSubject&&this.form.transfer==1) { |
|
|
|
this.paymentPriceFn() |
|
|
|
}else { |
|
|
|
this.form.totalAmount = item.totalAmount |
|
|
|
} |
|
|
|
}, |
|
|
|
// 选择车型 |
|
|
|
confirmCar(val) { |
|
|
|
let item = val.value[0] |
|
|
|
console.log(item) |
|
|
|
this.showCar = false |
|
|
|
if(this.form.trainType == item) return |
|
|
|
this.form.trainType = item |
|
|
|
this.form.coach = '' |
|
|
|
this.form.coachId = '' |
|
|
|
this.form.classModel = '' |
|
|
|
this.form.schoolClassId = '' |
|
|
|
this.form.totalAmount = '' |
|
|
|
this.schoolClassFn() |
|
|
|
}, |
|
|
|
showCarClick() { |
|
|
|
if(!this.form.school) return this.$u.toast('请先选择驾校') |
|
|
@ -521,13 +530,30 @@ |
|
|
|
this.showOldDriveModel = false |
|
|
|
console.log(val) |
|
|
|
}, |
|
|
|
// 弹出选择已过科目 |
|
|
|
subjectClick() { |
|
|
|
if(!this.form.schoolClassId) return this.$u.toast('请先选择报名班型,方便计算价格') |
|
|
|
this.showSubjectPass=true |
|
|
|
}, |
|
|
|
// 选择已过科目 |
|
|
|
confirmSubjectPass(val) { |
|
|
|
this.showSubjectPass = false |
|
|
|
let item = val.value[0] |
|
|
|
if(this.form.finishSubject == item.id) return |
|
|
|
this.form.finishSubject = item.id |
|
|
|
this.form.finishSubjectName = item.label |
|
|
|
|
|
|
|
this.showSubjectPass = false |
|
|
|
this.paymentPriceFn() |
|
|
|
}, |
|
|
|
// 已过科目价格计算 |
|
|
|
async paymentPriceFn() { |
|
|
|
let obj = { |
|
|
|
schoolClassId: this.form.schoolClassId, |
|
|
|
finishSubject: this.form.finishSubject |
|
|
|
} |
|
|
|
const res = await paymentPrice(obj) |
|
|
|
if(res.code==0) { |
|
|
|
this.form.totalAmount = res.data |
|
|
|
} |
|
|
|
}, |
|
|
|
// 选择已过科目 |
|
|
|
confirmTreat(val) { |
|
|
@ -577,6 +603,7 @@ |
|
|
|
}, |
|
|
|
changeVal(val) { |
|
|
|
console.log(val) |
|
|
|
console.log(this.form.transfer) |
|
|
|
}, |
|
|
|
// 点击确认 |
|
|
|
confirmClick() { |
|
|
@ -590,7 +617,10 @@ |
|
|
|
console.log(val) |
|
|
|
this.showPopup = false |
|
|
|
if(!val) return false |
|
|
|
const {data: res} = await applyOnline(this.form) |
|
|
|
let obj = Object.assign({},this.form) |
|
|
|
obj.name = obj.name.replace(/\s+/g, '') |
|
|
|
obj.idcard = obj.idcard.replace(/\s+/g, '') |
|
|
|
const {data: res} = await applyOnline(obj) |
|
|
|
// 报名成功 |
|
|
|
console.log(res) |
|
|
|
await this.$store.dispatch('getUserInfo') |
|
|
|