Browse Source

年假计算

jbb 2 years ago
parent
commit
bd60bfff80
1 changed files with 17 additions and 4 deletions
  1. 17 4
      src/views/activiti/form/demoForm2.vue

+ 17 - 4
src/views/activiti/form/demoForm2.vue

@@ -130,7 +130,7 @@ export default {
                 invoiceTypeList: [], // 发票类型下拉数据
                 add: this.add,
                 gv:this.funName,
-                handle:this.funName1
+                deptList:[],//技能博物管下拉框信息
             },
             postInfo: {},//职位信息
             deptInfo: {},//部门信息
@@ -162,6 +162,14 @@ export default {
     },
     created () {
         window.deleteRow = this.deleteRow
+        //技能博物馆部门信息
+        // this.getAction('/sys/sysDepart/queryMyDeptList').then(res => {
+        //         if (res.success) {
+        //             res.result.map(item=>{this.dynamicData.deptList.push(item.departName)})
+        //         } else {
+        //             this.$message.error(res.message)
+        //         }
+        //     })
         // console.log('流程数据', this.processData)
         // 加载一些下拉选择数据等
         // this.getDataList()
@@ -296,6 +304,11 @@ export default {
              this.$refs.MaterialSlModal.materialSlModVis = true
             this.$refs.MaterialSlModal.personLists()
         },
+        //获取部门信息
+        getDepartment(){
+         this.$refs.DepartmentModal.departmentModVis = true
+            this.$refs.DepartmentModal.personLists()
+        },
         closeP(value){
              var that = this
             this.cvarr.map(item=>{
@@ -544,7 +557,7 @@ export default {
                       var time2 = that.$refs.KFB.form.getFieldValue('end_date')
                       var timeC=that.timeDifference(time1,time2,'min') //获取时间差
                       //事假,超过180分钟,年假大于0.5
-                      if(category == 1 &&timeC>180&&that.leave>=0.5){
+                      if(category == 1 &&timeC>=180&&that.leave>=0.5){
                           that.$refs.KFB.setData({unit:'2'})
                           that.$refs.KFB.setData({leave_category:'2'})
                         }else if(category == 2 && that.leave<0.5){   //类型为年假,剩余年假小于0.5
@@ -566,7 +579,7 @@ export default {
                 var time1 = that.$refs.KFB.form.getFieldValue('start_date')
                 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
+                if(timeC>=180 && that.leave>=0.5){ //事假,时间差大于180,剩余年假大于0.5
                     that.$refs.KFB.setData({unit:'2'})
                     that.$refs.KFB.setData({leave_category:'2'})
                 }else{
@@ -601,7 +614,7 @@ export default {
                     var time1 = that.$refs.KFB.form.getFieldValue('start_date')
                     var timeC=that.timeDifference(time1,time2,'min')
                     var lx=that.$refs.KFB.form.getFieldValue('leave_category')
-                    if(timeC>180&&lx=='1'&&that.leave>=0.5){ //事假,时间差大于180,剩余年假大于0.5
+                    if(timeC>=180&&lx=='1'&&that.leave>=0.5){ //事假,时间差大于180,剩余年假大于0.5
                         that.$refs.KFB.setData({unit:'2'})
                           that.$refs.KFB.setData({leave_category:'2'})
                      }