|
@@ -196,7 +196,10 @@
|
|
|
applyObj:{
|
|
|
applyAreasJson:null,
|
|
|
examDateJson:null
|
|
|
- }
|
|
|
+ },
|
|
|
+ pAreaIndex:0,
|
|
|
+ cAreaIndex:0,
|
|
|
+ examIndex:0,
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
@@ -215,6 +218,21 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ bindChangeE(e){
|
|
|
+ console.log(e.detail.value)
|
|
|
+ this.examIndex = e.detail.value[0]
|
|
|
+ },
|
|
|
+ bindChange(e) {
|
|
|
+ const val = e.detail.value
|
|
|
+ if(this.pAreaIndex!=e.detail.value[0]){
|
|
|
+ this.pAreaIndex = e.detail.value[0]
|
|
|
+ this.getCityList(this.provinceList[this.pAreaIndex].areaId)
|
|
|
+ }
|
|
|
+ if(this.cAreaIndex!=e.detail.value[1]){
|
|
|
+ this.cAreaIndex = e.detail.value[1]
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
checkAreaData(){
|
|
|
if(this.examine.length==0){
|
|
|
uni.showModal({
|
|
@@ -280,6 +298,7 @@
|
|
|
return
|
|
|
}
|
|
|
this.gradeIndex = this.gradeValue
|
|
|
+ this.list[this.detailIndex].gradObj = this.gradeList[this.gradeIndex] //商品赋值选中班级
|
|
|
this.show = false
|
|
|
}else{
|
|
|
if(!this.checkAreaData()){
|
|
@@ -289,8 +308,10 @@
|
|
|
let pData = this.provinceList[this.pAreaIndex]
|
|
|
let cData = this.cityList[this.cAreaIndex]
|
|
|
this.applyAreas = {areaName:pData.areaName,areaId:pData.areaId,cityId:cData.areaId,cityName:cData.areaName}
|
|
|
- this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas)
|
|
|
- this.applyObj.examDateJson = JSON.stringify(this.examDate)
|
|
|
+ // this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas)
|
|
|
+ // this.applyObj.examDateJson = JSON.stringify(this.examDate)
|
|
|
+ this.list[this.detailIndex].examDate = this.examDate //商品赋值选中考期地区
|
|
|
+ this.list[this.detailIndex].applyAreas = this.applyAreas //商品赋值选中考期地区
|
|
|
this.show1 = false
|
|
|
}
|
|
|
},
|
|
@@ -352,9 +373,12 @@
|
|
|
applyAreasJson:null,
|
|
|
examDateJson:null
|
|
|
}
|
|
|
+ this.pAreaIndex=0,
|
|
|
+ this.cAreaIndex=0,
|
|
|
+ this.examIndex=0,
|
|
|
this.show1 = true
|
|
|
this.getProvinceList()
|
|
|
- self.getExamine(item.projectId)
|
|
|
+ this.getExamine(item.projectId)
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -407,8 +431,38 @@
|
|
|
item.show = e;
|
|
|
},
|
|
|
goBuy(){
|
|
|
- console.log(this.checkboxList,66)
|
|
|
- return
|
|
|
+ if(this.checkboxList.length==0){
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: '请选择商品',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for(let i =0;i<this.checkboxList.length;i++){
|
|
|
+ let index = this.checkboxList[i]
|
|
|
+ let item = this.list[index]
|
|
|
+ if(item.templateType=='class'){
|
|
|
+ if(!item.gradObj.className){
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: '请选择班级',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(item.templateType=='apply'){
|
|
|
+ if(!item.applyAreas.areaName){
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: '请选择报考地区',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$navTo.togo('/pages2/order/confirm_pay');
|
|
|
},
|
|
|
checkboxChange(n) {
|