Commit 3f5153e2 authored by zhengke's avatar zhengke

修改

parent 37681312
......@@ -162,11 +162,20 @@
</tr>
</table>
<div class="row" style="margin-top:20px;">
<q-input filled v-model="transMsg.EffectiveDate" class="col-6" mask="date" label="生效日期">
<q-input filled v-model="transMsg.OutTime" class="col-6 q-pr-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="transMsg.EffectiveDate" :options="optionsFn" @input="() => $refs.qDateProxy1.hide()" />
<q-date v-model="transMsg.OutTime" :options="optionsFn2" @input="getOutTime" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-input filled v-model="transMsg.EffectiveDate" class="col-6" mask="date" label="生效日期">
<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="transMsg.EffectiveDate" :options="optionsFn" @input="checkEffectDate()" />
</q-popup-proxy>
</q-icon>
</template>
......@@ -328,6 +337,7 @@
NewClassId: 0, //新班级编号
NewCourseId: 0, //新课程编号
EffectiveDate: '', //生效日期
OutTime:'', //转出本班时间
Remarks: '' //变更原因
},
classPageCount: 0,
......@@ -354,13 +364,26 @@
},
methods: {
optionsFn (date) {
if(this.transMsg.OutTime==''){
 var myDate = new Date();
let month = myDate.getMonth() + 1;
if(month<10){
month = '0'+month
}
var toDay = myDate.getFullYear()+'/'+ month +'/' + myDate.getDate()
return date >= toDay
} else {
return date >= this.transMsg.OutTime
}
},
optionsFn2 (date) {
 var myDate = new Date();
let month = myDate.getMonth() + 1;
if(month<10){
month = '0'+month
}
var toDay = myDate.getFullYear()+'/'+ month +'/' + myDate.getDate()
return date >= toDay
return date > toDay
},
//取消申请
cancelApply() {
......@@ -451,6 +474,22 @@
})
return;
}
if (this.transMsg.OutTime=='') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择转出日期`
})
return;
}
if (this.transMsg.EffectiveDate=='') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择生效日期`
})
return;
}
SetOrderChange(this.transMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
......@@ -515,6 +554,21 @@
this.classMsg.pageIndex = val;
this.getRenewClassList()
},
getOutTime(){
this.$refs.qDateProxy1.hide();
this.transMsg.EffectiveDate=''
},
checkEffectDate(){
if(this.transMsg.OutTime==''){
this.$q.notify({
type: 'negative',
position: "top",
message: `请先选择转出日期`
})
this.transMsg.EffectiveDate=''
}
this.$refs.qDateProxy2.hide()
}
}
}
......
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