|
@@ -692,10 +692,10 @@ export default {
|
|
|
var timeC=that.timeDifference(time1,time2,'min') //获取时间差
|
|
|
//事假,超过180分钟,年假大于0.5
|
|
|
if(category == '事假' &&timeC>=180&&that.leave>=0.5){
|
|
|
- that.$refs.KFB.setData({unit:'2'})
|
|
|
+ that.$refs.KFB.setData({unit:'天'})
|
|
|
that.$refs.KFB.setData({leave_category:'年假'})
|
|
|
}else if(category == '年假' && that.leave<0.5){ //类型为年假,剩余年假小于0.5
|
|
|
- that.$refs.KFB.setData({unit:'1'})
|
|
|
+ that.$refs.KFB.setData({unit:'分'})
|
|
|
that.$refs.KFB.setData({leave_category:''})
|
|
|
that.$message.error('剩余年假不足!');
|
|
|
}
|
|
@@ -714,22 +714,22 @@ export default {
|
|
|
var time2 = that.$refs.KFB.form.getFieldValue('end_date')
|
|
|
var timeC=that.timeDifference(time1,time2,'min') //获取时间差
|
|
|
if(timeC>=180 && that.leave>=0.5){ //事假,时间差大于180,剩余年假大于0.5
|
|
|
- that.$refs.KFB.setData({unit:'2'})
|
|
|
+ that.$refs.KFB.setData({unit:'天'})
|
|
|
that.$refs.KFB.setData({leave_category:'年假'})
|
|
|
}else{
|
|
|
- that.$refs.KFB.setData({unit:'1'})
|
|
|
+ that.$refs.KFB.setData({unit:'分'})
|
|
|
}
|
|
|
},0)
|
|
|
}else if(key == 'leave_category' && value == '病假'){ //病假
|
|
|
setTimeout(function(){
|
|
|
- that.$refs.KFB.setData({unit:'1'})
|
|
|
+ that.$refs.KFB.setData({unit:'分'})
|
|
|
},0)
|
|
|
}else if(key == 'leave_category' && value == '年假'){//年假
|
|
|
setTimeout(function(){
|
|
|
if(that.leave >=0.5){ //剩余年假大于0.5
|
|
|
- that.$refs.KFB.setData({unit:'2'})
|
|
|
+ that.$refs.KFB.setData({unit:'天'})
|
|
|
}else{ //剩余年假小于0.5
|
|
|
- that.$refs.KFB.setData({unit:'1'})
|
|
|
+ that.$refs.KFB.setData({unit:'分'})
|
|
|
that.$refs.KFB.setData({leave_category:''})
|
|
|
that.$message.error('剩余年假不足!');
|
|
|
}
|
|
@@ -738,8 +738,7 @@ export default {
|
|
|
|
|
|
}else if(key == 'leave_category'){
|
|
|
setTimeout(function(){
|
|
|
- debugger
|
|
|
- that.$refs.KFB.setData({unit:'2'})
|
|
|
+ that.$refs.KFB.setData({unit:'天'})
|
|
|
},0)
|
|
|
}
|
|
|
//时间间隔和类型
|
|
@@ -750,7 +749,7 @@ export default {
|
|
|
var timeC=that.timeDifference(time1,time2,'min')
|
|
|
var lx=that.$refs.KFB.form.getFieldValue('leave_category')
|
|
|
if(timeC>=180&&lx=='事假'&&that.leave>=0.5){ //事假,时间差大于180,剩余年假大于0.5
|
|
|
- that.$refs.KFB.setData({unit:'2'})
|
|
|
+ that.$refs.KFB.setData({unit:'天'})
|
|
|
that.$refs.KFB.setData({leave_category:'年假'})
|
|
|
}
|
|
|
},0)
|