|
@@ -45,7 +45,7 @@
|
|
<checkbox-group @change="chechboxChangeAM">
|
|
<checkbox-group @change="chechboxChangeAM">
|
|
<view class="th2_0">上午</view>
|
|
<view class="th2_0">上午</view>
|
|
<label v-for="item in timeAM" :key="item.value">
|
|
<label v-for="item in timeAM" :key="item.value">
|
|
- <checkbox class="th2_1" :value="item.value"></checkbox>
|
|
|
|
|
|
+ <checkbox class="th2_1" :value="item.value" :checked="item.checked"></checkbox>
|
|
</label>
|
|
</label>
|
|
</checkbox-group>
|
|
</checkbox-group>
|
|
</view>
|
|
</view>
|
|
@@ -53,7 +53,7 @@
|
|
<checkbox-group @change="chechboxChangePM">
|
|
<checkbox-group @change="chechboxChangePM">
|
|
<view class="th2_0">下午</view>
|
|
<view class="th2_0">下午</view>
|
|
<label v-for="item in timePM" :key="item.value">
|
|
<label v-for="item in timePM" :key="item.value">
|
|
- <checkbox class="th2_1" :value="item.value"></checkbox>
|
|
|
|
|
|
+ <checkbox class="th2_1" :value="item.value" :checked="item.checked"></checkbox>
|
|
</label>
|
|
</label>
|
|
</checkbox-group>
|
|
</checkbox-group>
|
|
</view>
|
|
</view>
|
|
@@ -61,7 +61,7 @@
|
|
<checkbox-group @change="chechboxChangeEvening">
|
|
<checkbox-group @change="chechboxChangeEvening">
|
|
<view class="th2_0">晚上</view>
|
|
<view class="th2_0">晚上</view>
|
|
<label v-for="item in timeEvening" :key="item.value">
|
|
<label v-for="item in timeEvening" :key="item.value">
|
|
- <checkbox class="th2_1" :value="item.value"></checkbox>
|
|
|
|
|
|
+ <checkbox class="th2_1" :value="item.value" :checked="item.checked"></checkbox>
|
|
</label>
|
|
</label>
|
|
</checkbox-group>
|
|
</checkbox-group>
|
|
</view>
|
|
</view>
|
|
@@ -105,6 +105,7 @@
|
|
courseAM: [],
|
|
courseAM: [],
|
|
coursePM: [],
|
|
coursePM: [],
|
|
courseEV: [],
|
|
courseEV: [],
|
|
|
|
+ courseWeekday: [],
|
|
// 表单数据
|
|
// 表单数据
|
|
baseFormData: {
|
|
baseFormData: {
|
|
name: '',
|
|
name: '',
|
|
@@ -210,94 +211,114 @@
|
|
// 上课时间
|
|
// 上课时间
|
|
// 上午
|
|
// 上午
|
|
timeAM: [{
|
|
timeAM: [{
|
|
- value: 'A1',
|
|
|
|
- name: '1'
|
|
|
|
|
|
+ value: 'A1',
|
|
|
|
+ name: '1',
|
|
|
|
+ checked: false
|
|
|
|
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '2',
|
|
name: '2',
|
|
- value: 'A2'
|
|
|
|
|
|
+ value: 'A2',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '3',
|
|
name: '3',
|
|
- value: 'A3'
|
|
|
|
|
|
+ value: 'A3',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '4',
|
|
name: '4',
|
|
- value: 'A4'
|
|
|
|
|
|
+ value: 'A4',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '5',
|
|
name: '5',
|
|
- value: 'A5'
|
|
|
|
|
|
+ value: 'A5',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '6',
|
|
name: '6',
|
|
- value: 'A6'
|
|
|
|
|
|
+ value: 'A6',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '7',
|
|
name: '7',
|
|
- value: 'A7'
|
|
|
|
|
|
+ value: 'A7',
|
|
|
|
+ checked: false
|
|
}
|
|
}
|
|
],
|
|
],
|
|
// 下午
|
|
// 下午
|
|
timePM: [{
|
|
timePM: [{
|
|
- value: 'P1',
|
|
|
|
- name: '1'
|
|
|
|
-
|
|
|
|
|
|
+ value: 'P1',
|
|
|
|
+ name: '1',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '2',
|
|
name: '2',
|
|
- value: 'P2'
|
|
|
|
|
|
+ value: 'P2',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '3',
|
|
name: '3',
|
|
- value: 'P3'
|
|
|
|
|
|
+ value: 'P3',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '4',
|
|
name: '4',
|
|
- value: 'P4'
|
|
|
|
|
|
+ value: 'P4',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '5',
|
|
name: '5',
|
|
- value: 'P5'
|
|
|
|
|
|
+ value: 'P5',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '6',
|
|
name: '6',
|
|
- value: 'P6'
|
|
|
|
|
|
+ value: 'P6',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '7',
|
|
name: '7',
|
|
- value: 'P7'
|
|
|
|
|
|
+ value: 'P7',
|
|
|
|
+ checked: false
|
|
}
|
|
}
|
|
],
|
|
],
|
|
// 晚上
|
|
// 晚上
|
|
timeEvening: [{
|
|
timeEvening: [{
|
|
name: '1',
|
|
name: '1',
|
|
- value: 'E1'
|
|
|
|
|
|
+ value: 'E1',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '2',
|
|
name: '2',
|
|
- value: 'E2'
|
|
|
|
|
|
+ value: 'E2',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '3',
|
|
name: '3',
|
|
- value: 'E3'
|
|
|
|
|
|
+ value: 'E3',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '4',
|
|
name: '4',
|
|
- value: 'E4'
|
|
|
|
|
|
+ value: 'E4',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '5',
|
|
name: '5',
|
|
- value: 'E5'
|
|
|
|
|
|
+ value: 'E5',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '6',
|
|
name: '6',
|
|
- value: 'E6'
|
|
|
|
|
|
+ value: 'E6',
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: '7',
|
|
name: '7',
|
|
- value: 'E7'
|
|
|
|
|
|
+ value: 'E7',
|
|
|
|
+ checked: false
|
|
}
|
|
}
|
|
],
|
|
],
|
|
rules: {
|
|
rules: {
|
|
@@ -328,6 +349,50 @@
|
|
created() {
|
|
created() {
|
|
this.getPriceAndTree()
|
|
this.getPriceAndTree()
|
|
},
|
|
},
|
|
|
|
+ onLoad(option) {
|
|
|
|
+ if (option.item !== undefined) {
|
|
|
|
+ let item = JSON.parse(decodeURIComponent(option.item))
|
|
|
|
+ item.datetime = null
|
|
|
|
+ item.deal = null
|
|
|
|
+ item.deleted = null
|
|
|
|
+ item.display = null
|
|
|
|
+ item.id = null
|
|
|
|
+ item.locked = null
|
|
|
|
+ item.requireId = null
|
|
|
|
+ item.uid = null
|
|
|
|
+ item.verifyRefuseReason = null
|
|
|
|
+ item.verifyStatus = null
|
|
|
|
+ // console.log(item)
|
|
|
|
+ this.baseFormData = item
|
|
|
|
+ this.courseWeekday = item.courseWeekday.split(",")
|
|
|
|
+ this.baseFormData.courseWeekday = this.courseWeekday
|
|
|
|
+ console.log(this.baseFormData)
|
|
|
|
+ console.log("选中的日期:" + this.courseWeekday)
|
|
|
|
+ for (let i = 0; i < this.courseWeekday.length; i++) {
|
|
|
|
+ for (let x = 0; x < this.timeAM.length; x++) {
|
|
|
|
+ if (this.courseWeekday[i] == this.timeAM[x].value) {
|
|
|
|
+ this.timeAM[x].checked = true
|
|
|
|
+ this.courseAM.push(this.courseWeekday[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (let y = 0; y < this.timePM.length; y++) {
|
|
|
|
+ if (this.courseWeekday[i] == this.timePM[y].value) {
|
|
|
|
+ // console.log(this.timePM[y].value)
|
|
|
|
+ this.timePM[y].checked = true
|
|
|
|
+ this.coursePM.push(this.courseWeekday[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (let z = 0; z < this.timeEvening.length; z++) {
|
|
|
|
+ if (this.courseWeekday[i] == this.timeEvening[z].value) {
|
|
|
|
+ this.timeEvening[z].checked = true
|
|
|
|
+ this.courseEV.push(this.courseWeekday[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 手机号
|
|
// 手机号
|
|
// 手机号
|
|
// 手机号
|
|
@@ -399,19 +464,23 @@
|
|
return uni.$showMsg('操作过快,请耐心等待…')
|
|
return uni.$showMsg('操作过快,请耐心等待…')
|
|
}
|
|
}
|
|
this.isLoading = true
|
|
this.isLoading = true
|
|
|
|
+
|
|
this.baseFormData.courseWeekday = []
|
|
this.baseFormData.courseWeekday = []
|
|
this.$refs.baseForm.validate().then(res => {
|
|
this.$refs.baseForm.validate().then(res => {
|
|
if (this.baseFormData.phone === '') return uni.$showMsg('手机号未获取!')
|
|
if (this.baseFormData.phone === '') return uni.$showMsg('手机号未获取!')
|
|
if (this.baseFormData.locationStr === '') return uni.$showMsg('请选择地址!')
|
|
if (this.baseFormData.locationStr === '') return uni.$showMsg('请选择地址!')
|
|
if (this.baseFormData.subjectSmall === '1-1' || this.baseFormData.subjectSmall === '') return uni.$showMsg('请选择课程')
|
|
if (this.baseFormData.subjectSmall === '1-1' || this.baseFormData.subjectSmall === '') return uni.$showMsg('请选择课程')
|
|
- if (this.courseAM.length === 0 && this.coursePM.length === 0 && this.courseEV.length === 0) return uni.$showMsg('请选择上课时间!')
|
|
|
|
- if (this.courseAM[this.courseAM.length - 1] == '' && this.coursePM.length === 0 && this.courseEV.length === 0) return uni.$showMsg('请选择上课时间!')
|
|
|
|
- if (this.courseAM.length === 0 && this.coursePM[this.coursePM.length - 1] == '' && this.courseEV.length === 0) return uni.$showMsg('请选择上课时间!')
|
|
|
|
- if (this.courseAM.length === 0 && this.coursePM.length === 0 && this.courseEV[this.courseEV.length - 1] == '') return uni.$showMsg('请选择上课时间!')
|
|
|
|
- if (this.courseAM[this.courseAM.length - 1] == '' && this.coursePM[this.coursePM.length - 1] == '' && this.courseEV.length === 0) return uni.$showMsg('请选择上课时间!')
|
|
|
|
- if (this.courseAM[this.courseAM.length - 1] == '' && this.coursePM.length === 0 && this.courseEV[this.courseEV.length - 1] == '') return uni.$showMsg('请选择上课时间!')
|
|
|
|
- if (this.courseAM.length === 0 && this.coursePM[this.coursePM.length - 1] == '' && this.courseEV[this.courseEV.length - 1] == '') return uni.$showMsg('请选择上课时间!')
|
|
|
|
- if (this.courseAM[this.courseAM.length - 1] == '' && this.coursePM[this.coursePM.length - 1] == '' && this.courseEV[this.courseEV.length - 1] == '') return uni.$showMsg('请选择上课时间!')
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (this.courseAM.length === 0 && this.coursePM.length === 0 && this.courseEV.length === 0 ) return uni.$showMsg('请选择上课时间!')
|
|
|
|
+ if (this.courseAM[this.courseAM.length - 1] == '' && this.coursePM.length === 0 && this.courseEV.length === 0 ) return uni.$showMsg('请选择上课时间!')
|
|
|
|
+ if (this.courseAM.length === 0 && this.coursePM[this.coursePM.length - 1] == '' && this.courseEV.length === 0 ) return uni.$showMsg('请选择上课时间!')
|
|
|
|
+ if (this.courseAM.length === 0 && this.coursePM.length === 0 && this.courseEV[this.courseEV.length - 1] == '' ) return uni.$showMsg('请选择上课时间!')
|
|
|
|
+ if (this.courseAM[this.courseAM.length - 1] == '' && this.coursePM[this.coursePM.length - 1] == '' && this.courseEV.length === 0 ) return uni.$showMsg('请选择上课时间!')
|
|
|
|
+ if (this.courseAM[this.courseAM.length - 1] == '' && this.coursePM.length === 0 && this.courseEV[this.courseEV.length - 1] == '' ) return uni.$showMsg('请选择上课时间!')
|
|
|
|
+ if (this.courseAM.length === 0 && this.coursePM[this.coursePM.length - 1] == '' && this.courseEV[this.courseEV.length - 1] == '' ) return uni.$showMsg('请选择上课时间!')
|
|
|
|
+ if (this.courseAM[this.courseAM.length - 1] == '' && this.coursePM[this.coursePM.length - 1] == '' && this.courseEV[this.courseEV.length - 1] == '' ) return uni.$showMsg('请选择上课时间!')
|
|
|
|
+
|
|
if (this.courseAM.length > 0) {
|
|
if (this.courseAM.length > 0) {
|
|
this.baseFormData.courseWeekday.push(this.courseAM[this.courseAM.length - 1])
|
|
this.baseFormData.courseWeekday.push(this.courseAM[this.courseAM.length - 1])
|
|
}
|
|
}
|
|
@@ -423,7 +492,16 @@
|
|
}
|
|
}
|
|
// 上课时间
|
|
// 上课时间
|
|
this.baseFormData.courseWeekday = this.baseFormData.courseWeekday.join()
|
|
this.baseFormData.courseWeekday = this.baseFormData.courseWeekday.join()
|
|
- // console.log(this.baseFormData.courseWeekday)
|
|
|
|
|
|
+ // 末尾为,
|
|
|
|
+ if (this.baseFormData.courseWeekday.slice(-1) === ',') {
|
|
|
|
+ this.baseFormData.courseWeekday = this.baseFormData.courseWeekday.substring(0, this.baseFormData.courseWeekday.length - 1)
|
|
|
|
+ }
|
|
|
|
+ // 开始为,
|
|
|
|
+ if (this.baseFormData.courseWeekday.slice(0,1) === ',') {
|
|
|
|
+ let temp = this.baseFormData.courseWeekday.substring(1, this.baseFormData.courseWeekday.length )
|
|
|
|
+ this.baseFormData.courseWeekday = temp
|
|
|
|
+ }
|
|
|
|
+
|
|
// 教员学历
|
|
// 教员学历
|
|
if (this.baseFormData.teacherEdu === '') return uni.$showMsg('请选择教员学历!')
|
|
if (this.baseFormData.teacherEdu === '') return uni.$showMsg('请选择教员学历!')
|
|
|
|
|
|
@@ -442,7 +520,7 @@
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (this.coursePrice[i].priceMapping.fulltime_price_2_l > this.baseFormData.salary || this.baseFormData.salary > this.coursePrice[i].priceMapping.fulltime_price_2_h) {
|
|
if (this.coursePrice[i].priceMapping.fulltime_price_2_l > this.baseFormData.salary || this.baseFormData.salary > this.coursePrice[i].priceMapping.fulltime_price_2_h) {
|
|
- this.errorPrice = '价格在' + this.coursePrice[i].priceMapping.fulltime_price_2_l + '~' + this.coursePrice[i].priceMapping.fulltime_price_2_h + '之间'
|
|
|
|
|
|
+ this.errorPrice = '价格在' + this.coursePrice[i].priceMapping.fulltime_price_2_l + '~' + this.coursePrice[i].priceMapping.fulltime_price_2_h + '元之间'
|
|
return uni.$showMsg('请合理选择课时费')
|
|
return uni.$showMsg('请合理选择课时费')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -472,7 +550,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- // console.log(this.baseFormData)
|
|
|
|
|
|
+ console.log(this.baseFormData)
|
|
|
|
|
|
uni.request({
|
|
uni.request({
|
|
url: 'http://192.168.0.207:8222/education/student-requirements/publishRequirements',
|
|
url: 'http://192.168.0.207:8222/education/student-requirements/publishRequirements',
|
|
@@ -484,7 +562,9 @@
|
|
success: res => {
|
|
success: res => {
|
|
uni.$showMsg(res.data.message)
|
|
uni.$showMsg(res.data.message)
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- uni.navigateBack()
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/subpkg/student_require/student_require'
|
|
|
|
+ })
|
|
}, 1000)
|
|
}, 1000)
|
|
}
|
|
}
|
|
})
|
|
})
|