Ver Fonte

森语-请假单-剩余年假

jbb há 2 anos atrás
pai
commit
838d60c02c
1 ficheiros alterados com 12 adições e 2 exclusões
  1. 12 2
      src/views/activiti/form/demoForm2.vue

+ 12 - 2
src/views/activiti/form/demoForm2.vue

@@ -633,7 +633,17 @@ export default {
                               this.$store.getters.userInfo
                                var that = this
                                setTimeout(function(){
-                               that.$refs.KFB.setData({[item[0].label]:that.$store.getters.userInfo.realname})   
+                               that.$refs.KFB.setData({[item[0].label]:that.$store.getters.userInfo.realname})  
+                            //    森语-请假单-须根据当前用户带出剩余年假 
+                               if(that.processData.businessTable =='employee_leave'){
+                                  annualLeave({username:that.$store.getters.userInfo.username}).then(res => {
+                                  if (res.success) {
+                                    that.leave = res.result.nannualNowNum
+                                      that.$refs.KFB.setData({leave_remaining: that.leave})
+                                  }
+                      
+                                 })
+                               }
                                var jnDeparment = ''
                                if(getProjctName() =='技能博物馆'){   //获取技能博物馆登录人对应的部门
                                    that.dynamicData.personListJn.map(item =>{
@@ -795,7 +805,7 @@ export default {
                     if (res.success) {
                       //选择姓名获取页面的请假类型和时间间隔
                       that.leave = res.result.nannualNowNum
-                    //   that.$refs.KFB.setData({leave_remaining: that.leave})
+                      that.$refs.KFB.setData({leave_remaining: that.leave})
                       var category = that.$refs.KFB.form.getFieldValue('leave_category')
                       var time1 = that.$refs.KFB.form.getFieldValue('start_date')
                       var time2 = that.$refs.KFB.form.getFieldValue('end_date')