Commit 3f5153e2 authored by zhengke's avatar zhengke

修改

parent 37681312
...@@ -162,11 +162,20 @@ ...@@ -162,11 +162,20 @@
</tr> </tr>
</table> </table>
<div class="row" style="margin-top:20px;"> <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> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale"> <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-popup-proxy>
</q-icon> </q-icon>
</template> </template>
...@@ -328,6 +337,7 @@ ...@@ -328,6 +337,7 @@
NewClassId: 0, //新班级编号 NewClassId: 0, //新班级编号
NewCourseId: 0, //新课程编号 NewCourseId: 0, //新课程编号
EffectiveDate: '', //生效日期 EffectiveDate: '', //生效日期
OutTime:'', //转出本班时间
Remarks: '' //变更原因 Remarks: '' //变更原因
}, },
classPageCount: 0, classPageCount: 0,
...@@ -354,6 +364,7 @@ ...@@ -354,6 +364,7 @@
}, },
methods: { methods: {
optionsFn (date) { optionsFn (date) {
if(this.transMsg.OutTime==''){
 var myDate = new Date();  var myDate = new Date();
let month = myDate.getMonth() + 1; let month = myDate.getMonth() + 1;
if(month<10){ if(month<10){
...@@ -361,6 +372,18 @@ ...@@ -361,6 +372,18 @@
} }
var toDay = myDate.getFullYear()+'/'+ month +'/' + myDate.getDate() var toDay = myDate.getFullYear()+'/'+ month +'/' + myDate.getDate()
return date >= toDay 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
}, },
//取消申请 //取消申请
cancelApply() { cancelApply() {
...@@ -451,6 +474,22 @@ ...@@ -451,6 +474,22 @@
}) })
return; 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 => { SetOrderChange(this.transMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
...@@ -515,6 +554,21 @@ ...@@ -515,6 +554,21 @@
this.classMsg.pageIndex = val; this.classMsg.pageIndex = val;
this.getRenewClassList() 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