Просмотр исходного кода

Merge branch 'fix/Attendcance' into 'develop'

Merge of fix/Attendcance to develop【考勤管理--添加自定义审批流程】

See merge request o2oa/o2oa!740
胡起 5 лет назад
Родитель
Сommit
0c6b6e16f4

+ 3 - 3
o2web/source/x_component_Attendance/$AppealExplorer/listItem.json

@@ -5,7 +5,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "checkbox",
     "name" : "checkbox",
-    "condition" : "function(d){ return d.status==0 ? true : false }",
+    "condition" : "function(d){ return d.status==0&&d.APPEAL_AUDIFLOWTYPE=='BUILTIN' ? true : false }",
     "width" : "5%"
   },
   {
@@ -102,14 +102,14 @@
     "sub" : [{
       "title" : "同意",
       "action" : "agree",
-      "condition" : "function(d){ return d.APPEALABLE; }",
+      "condition" : "function(d){ return d.APPEALABLE&&d.APPEAL_AUDIFLOWTYPE=='BUILTIN';  }",
       "styles" : "actionAgreeNode",
       "overStyles" : "actionAgreeNode_over",
       "downStyles" : "actionAgreeNode_down"
     }, {
       "title" : "不同意",
       "action" : "deny",
-      "condition" : "function(d){ return d.APPEALABLE; }",
+      "condition" : "function(d){ return d.APPEALABLE&&d.APPEAL_AUDIFLOWTYPE=='BUILTIN'; }",
       "styles" : "actionDenyNode",
       "overStyles" : "actionDenyNode_over",
       "downStyles" : "actionDenyNode_down"

+ 25 - 9
o2web/source/x_component_Attendance/$MyDetail/listItem.json

@@ -5,7 +5,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "function( d ){ return d.empName.split('@')[0] }",
     "name" : "empName",
-    "width" : "15%"
+    "width" : "9%"
   },
   {
     "title" : "日期",
@@ -14,7 +14,7 @@
     "defaultSort" : "desc",
     "item" : "recordDateString",
     "name" : "recordDateString",
-    "width" : "15%"
+    "width" : "9%"
   },
 
   {
@@ -23,7 +23,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "function( data ){ if(data.isHoliday){return '节假日'}else if(data.isWeekend){return '周末'}else if(data.isWorkday){return '调休工作日'}else{return '工作日'}  }",
     "name" : "description",
-    "width" : "15%"
+    "width" : "9%"
   },
 
   {
@@ -32,7 +32,23 @@
     "contentStyles" : "normalTdNode",
     "item" : "onDutyTime",
     "name" : "onDutyTime",
-    "width" : "10%"
+    "width" : "9%"
+  },
+  {
+    "title" : "午休开始时间",
+    "headStyles" : "normalThNode",
+    "contentStyles" : "normalTdNode",
+    "item" : "morningOffDutyTime",
+    "name" : "morningOffDutyTime",
+    "width" : "9%"
+  },
+  {
+    "title" : "午休结束时间",
+    "headStyles" : "normalThNode",
+    "contentStyles" : "normalTdNode",
+    "item" : "afternoonOnDutyTime",
+    "name" : "afternoonOnDutyTime",
+    "width" : "9%"
   },
   {
     "title" : "下班打卡时间",
@@ -40,7 +56,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "offDutyTime",
     "name" : "offDutyTime",
-    "width" : "10%"
+    "width" : "9%"
   },
   {
     "title": "考勤状态",
@@ -48,7 +64,7 @@
     "contentStyles": "normalTdNode",
     "item": "function( d ){  var status=''; if(d.isGetSelfHolidays){ status = '请假或外出报备' }else if(d.isLate){ status = '迟到' }else if(d.isLeaveEarlier){ status = '早退' }else if(d.isAbsent){ status = '缺勤' }else if(d.isAbnormalDuty){ status = '异常打卡' }else if(d.isLackOfTime){ status = '工时不足' }else{ status = '正常' }; return status; }",
     "name" : "status",
-    "width" : "10%"
+    "width" : "9%"
   } ,
   {
     "title": "申诉状态",
@@ -56,7 +72,7 @@
     "contentStyles": "normalTdNode",
     "item": "function( d ){  if(d.appealStatus==1){ return '申诉中' }else if(d.appealStatus==-1){ return '申诉未通过' }else if(d.appealStatus==9){ return '申诉通过' }else{ return '' } }",
     "name" : "appealStatus",
-    "width" : "10%"
+    "width" : "9%"
   },
   {
     "title": "申诉审核人",
@@ -64,7 +80,7 @@
     "contentStyles": "normalTdNode",
     "item": "function( d ){  return d.appealProcessor ? d.appealProcessor.split('@')[0] : '' }",
     "name" : "appealStatus",
-    "width" : "10%"
+    "width" : "9%"
   },
   {
     "title" : "申诉",
@@ -72,7 +88,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "actions",
     "name" : "actions",
-    "width" : "10%",
+    "width" : "9%",
     "sub" : [{
       "title" : "发起申诉",
       "action" : "appeal",

+ 23 - 7
o2web/source/x_component_Attendance/$PeopleDetail/listItem.json

@@ -5,7 +5,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "function( d ){ return d.empName.split('@')[0] }",
     "name" : "empName",
-    "width" : "15%"
+    "width" : "11%"
   },
   {
     "title" : "日期",
@@ -14,7 +14,7 @@
     "defaultSort" : "desc",
     "item" : "recordDateString",
     "name" : "recordDateString",
-    "width" : "15%"
+    "width" : "11%"
   },
 
   {
@@ -23,7 +23,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "function( data ){ if(data.isHoliday){return '节假日'}else if(data.isWeekend){return '周末'}else if(data.isWorkday){return '调休工作日'}else{return '工作日'}  }",
     "name" : "description",
-    "width" : "15%"
+    "width" : "11%"
   },
 
   {
@@ -32,7 +32,23 @@
     "contentStyles" : "normalTdNode",
     "item" : "onDutyTime",
     "name" : "onDutyTime",
-    "width" : "15%"
+    "width" : "11%"
+  },
+  {
+    "title" : "午休开始时间",
+    "headStyles" : "normalThNode",
+    "contentStyles" : "normalTdNode",
+    "item" : "morningOffDutyTime",
+    "name" : "morningOffDutyTime",
+    "width" : "11%"
+  },
+  {
+    "title" : "午休结束时间",
+    "headStyles" : "normalThNode",
+    "contentStyles" : "normalTdNode",
+    "item" : "afternoonOnDutyTime",
+    "name" : "afternoonOnDutyTime",
+    "width" : "11%"
   },
   {
     "title" : "下班打卡时间",
@@ -40,7 +56,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "offDutyTime",
     "name" : "offDutyTime",
-    "width" : "15%"
+    "width" : "11%"
   },
   {
     "title": "考勤状态",
@@ -48,7 +64,7 @@
     "contentStyles": "normalTdNode",
     "item": "function( d ){  var status=''; if(d.isGetSelfHolidays){ status = '请假或外出报备' }else if(d.isLate){ status = '迟到' }else if(d.isLeaveEarlier){ status = '早退' }else if(d.isAbsent){ status = '缺勤' }else if(d.isAbnormalDuty){ status = '异常打卡' }else if(d.isLackOfTime){ status = '工时不足' }else{ status = '正常' }; return status; }",
     "name" : "status",
-    "width" : "10%"
+    "width" : "11%"
   },
   {
     "title": "申诉状态",
@@ -56,7 +72,7 @@
     "contentStyles": "normalTdNode",
     "item": "function( d ){  if(d.appealStatus==1){ return '申诉中' }else if(d.appealStatus==-1){ return '申诉未通过' }else if(d.appealStatus==9){ return '申诉通过' }else{ return '' } }",
     "name" : "appealStatus",
-    "width" : "10%"
+    "width" : "11%"
   }
 //  {
 //    "access" : "admin",

+ 23 - 7
o2web/source/x_component_Attendance/$TopUnitDetail/listItem.json

@@ -5,7 +5,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "function( d ){ return d.empName.split('@')[0] }",
     "name" : "empName",
-    "width" : "15%"
+    "width" : "11%"
   },
   {
     "title" : "日期",
@@ -14,7 +14,7 @@
     "defaultSort" : "desc",
     "item" : "recordDateString",
     "name" : "recordDateString",
-    "width" : "15%"
+    "width" : "11%"
   },
 
   {
@@ -23,7 +23,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "function( data ){ if(data.isHoliday){return '节假日'}else if(data.isWeekend){return '周末'}else if(data.isWorkday){return '调休工作日'}else{return '工作日'}  }",
     "name" : "description",
-    "width" : "15%"
+    "width" : "11%"
   },
 
   {
@@ -32,7 +32,23 @@
     "contentStyles" : "normalTdNode",
     "item" : "onDutyTime",
     "name" : "onDutyTime",
-    "width" : "15%"
+    "width" : "11%"
+  },
+  {
+    "title" : "午休开始时间",
+    "headStyles" : "normalThNode",
+    "contentStyles" : "normalTdNode",
+    "item" : "morningOffDutyTime",
+    "name" : "morningOffDutyTime",
+    "width" : "11%"
+  },
+  {
+    "title" : "午休结束时间",
+    "headStyles" : "normalThNode",
+    "contentStyles" : "normalTdNode",
+    "item" : "afternoonOnDutyTime",
+    "name" : "afternoonOnDutyTime",
+    "width" : "11%"
   },
   {
     "title" : "下班打卡时间",
@@ -40,7 +56,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "offDutyTime",
     "name" : "offDutyTime",
-    "width" : "15%"
+    "width" : "11%"
   },
   {
     "title": "考勤状态",
@@ -48,7 +64,7 @@
     "contentStyles": "normalTdNode",
     "item": "function( d ){  var status=''; if(d.isGetSelfHolidays){ status = '请假或外出报备' }else if(d.isLate){ status = '迟到' }else if(d.isLeaveEarlier){ status = '早退' }else if(d.isAbsent){ status = '缺勤' }else if(d.isAbnormalDuty){ status = '异常打卡' }else if(d.isLackOfTime){ status = '工时不足' }else{ status = '正常' }; return status; }",
     "name" : "status",
-    "width" : "10%"
+    "width" : "11%"
   },
   {
     "title": "申诉状态",
@@ -56,7 +72,7 @@
     "contentStyles": "normalTdNode",
     "item": "function( d ){  if(d.appealStatus==1){ return '申诉中' }else if(d.appealStatus==-1){ return '申诉未通过' }else if(d.appealStatus==9){ return '申诉通过' }else{ return '' } }",
     "name" : "appealStatus",
-    "width" : "15%"
+    "width" : "11%"
   }
 //  {
 //    "access" : "admin",

+ 23 - 7
o2web/source/x_component_Attendance/$UnitDetail/listItem.json

@@ -6,7 +6,7 @@
     "item" : "function( d ){ return d.empName.split('@')[0] }",
     "name" : "empName",
     "defaultSort" : "asc",
-    "width" : "15%"
+    "width" : "11%"
   },
   {
     "title" : "日期",
@@ -14,7 +14,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "recordDateString",
     "name" : "recordDateString",
-    "width" : "15%"
+    "width" : "11%"
   },
 
   {
@@ -23,7 +23,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "function( data ){ if(data.isHoliday){return '节假日'}else if(data.isWeekend){return '周末'}else if(data.isWorkday){return '调休工作日'}else{return '工作日'}  }",
     "name" : "description",
-    "width" : "15%"
+    "width" : "11%"
   },
 
   {
@@ -32,7 +32,23 @@
     "contentStyles" : "normalTdNode",
     "item" : "onDutyTime",
     "name" : "onDutyTime",
-    "width" : "15%"
+    "width" : "11%"
+  },
+  {
+    "title" : "午休开始时间",
+    "headStyles" : "normalThNode",
+    "contentStyles" : "normalTdNode",
+    "item" : "morningOffDutyTime",
+    "name" : "morningOffDutyTime",
+    "width" : "11%"
+  },
+  {
+    "title" : "午休结束时间",
+    "headStyles" : "normalThNode",
+    "contentStyles" : "normalTdNode",
+    "item" : "afternoonOnDutyTime",
+    "name" : "afternoonOnDutyTime",
+    "width" : "11%"
   },
   {
     "title" : "下班打卡时间",
@@ -40,7 +56,7 @@
     "contentStyles" : "normalTdNode",
     "item" : "offDutyTime",
     "name" : "offDutyTime",
-    "width" : "15%"
+    "width" : "11%"
   },
   {
     "title": "考勤状态",
@@ -48,7 +64,7 @@
     "contentStyles": "normalTdNode",
     "item": "function( d ){  var status=''; if(d.isGetSelfHolidays){ status = '请假或外出报备' }else if(d.isLate){ status = '迟到' }else if(d.isLeaveEarlier){ status = '早退' }else if(d.isAbsent){ status = '缺勤' }else if(d.isAbnormalDuty){ status = '异常打卡' }else if(d.isLackOfTime){ status = '工时不足' }else{ status = '正常' }; return status; }",
     "name" : "status",
-    "width" : "10%"
+    "width" : "11%"
   },
   {
     "title": "申诉状态",
@@ -56,7 +72,7 @@
     "contentStyles": "normalTdNode",
     "item": "function( d ){  if(d.appealStatus==1){ return '申诉中' }else if(d.appealStatus==-1){ return '申诉未通过' }else if(d.appealStatus==9){ return '申诉通过' }else{ return '' } }",
     "name" : "appealStatus",
-    "width" : "10%"
+    "width" : "11%"
   }
 //  {
 //    "access" : "admin",

+ 44 - 4
o2web/source/x_component_Attendance/AppSetting.js

@@ -145,10 +145,14 @@ MWF.xApplication.Attendance.AppSetting = new Class({
             "<tr><td colspan='4' styles='formTableHead'>系统设置</td></tr>" +
             "<tr><td styles='formTableTitle' lable='APPEALABLE'></td>"+
             "    <td styles='formTableValue' item='APPEALABLE'></td>"+
-            "<tr><td styles='formTableTitle' lable='APPEAL_AUDITOR_TYPE'></td>"+
+            "<tr><td styles='formTableTitle' lable='APPEAL_AUDIFLOWTYPE'></td>"+
+            "    <td styles='formTableValue' item='APPEAL_AUDIFLOWTYPE'></td>"+
+            "<tr item='AUDITOR_TYPE' style='display:"+ (d.APPEAL_AUDIFLOWTYPE == "WORKFLOW" ? "none" : "") +"'><td styles='formTableTitle' lable='APPEAL_AUDITOR_TYPE'></td>"+
             "    <td styles='formTableValue' item='APPEAL_AUDITOR_TYPE'></td>"+
-            "<tr item='valueArea' style='display:"+ (d.APPEAL_AUDITOR_TYPE == "汇报对象" ? "none" : "") +"' ><td styles='formTableTitle' lable='APPEAL_AUDITOR_VALUE'></td>"+
-            "    <td styles='formTableValue' item='APPEAL_AUDITOR_VALUE'></td>"+
+            "<tr item='valueArea' style='display:"+ (d.APPEAL_AUDITOR_TYPE == "汇报对象" || d.APPEAL_AUDIFLOWTYPE == "WORKFLOW" ? "none" : "") +"' ><td styles='formTableTitle' lable='APPEAL_AUDITOR_VALUE'></td>"+
+            "    <td styles='formTableValue' style='width: 60%' item='APPEAL_AUDITOR_VALUE'></td>" +
+            "<tr item='AUDIFLOW' style='display:"+ (d.APPEAL_AUDIFLOWTYPE == "BUILTIN" ? "none" : "") +"'><td styles='formTableTitle' lable='APPEAL_AUDIFLOW_ID'></td>" +
+            "    <td styles='formTableValue' style='width: 60%' item='APPEAL_AUDIFLOW_ID'></td>" +
             //"<tr><td styles='formTableTitle' lable='APPEAL_CHECKER_TYPE'></td>"+
             //"    <td styles='formTableValue' item='APPEAL_CHECKER_TYPE'></td>"+
             //"<tr><td styles='formTableTitle' lable='APPEAL_CHECKER_VALUE'></td>"+
@@ -156,6 +160,7 @@ MWF.xApplication.Attendance.AppSetting = new Class({
             "</table>";
         this.createTableArea.set("html",html);
 
+
         this.itemTemplate = {
             APPEALABLE : { text:"申诉及审批功能启用状态",
                 type : "select",
@@ -163,6 +168,19 @@ MWF.xApplication.Attendance.AppSetting = new Class({
                 selectText : ["开启","关闭"],
                 selectValue : ["true","false"]
             },
+            APPEAL_AUDIFLOWTYPE : { text : "考勤结果申诉流程类型",
+                type : "select",
+                value : d.APPEAL_AUDIFLOWTYPE ,
+                selectValue : this.dataJson.APPEAL_AUDIFLOWTYPE.selectContent.split("|"), //["人员属性","所属部门职位","指定人","汇报对象"],
+                selectText : ["自定义流程","内置流程"],
+                event : {
+                    change : function( item, ev ){
+                        this.createTableArea.getElement("[item='AUDITOR_TYPE']").setStyle( "display" , (item.getValue() == "WORKFLOW") ? "none" : "" );
+                        this.createTableArea.getElement("[item='valueArea']").setStyle( "display" , (item.getValue() == "WORKFLOW") ? "none" : "" );
+                        this.createTableArea.getElement("[item='AUDIFLOW']").setStyle( "display" , (item.getValue() == "BUILTIN") ? "none" : "" );
+                    }.bind(this)
+                }
+            },
             APPEAL_AUDITOR_TYPE : { text : "申诉审核人确定方式",
                 type : "select",
                 value : d.APPEAL_AUDITOR_TYPE ,
@@ -177,7 +195,25 @@ MWF.xApplication.Attendance.AppSetting = new Class({
                 type : "text",
                 value : d.APPEAL_AUDITOR_VALUE ,
                 defaultValue : "直属领导"
-            }//,
+            },
+            APPEAL_AUDIFLOW_ID : { text : "自定义申请流程",
+                type : "org",
+                orgType: ["process"],
+                count : 1,
+                isEdited : this.isEdited || this.isNew,
+                value : !d.APPEAL_AUDIFLOW_ID||d.APPEAL_AUDIFLOW_ID=="无" ?"":d.APPEAL_AUDIFLOW_ID,
+                defaultValue : "",
+                orgWidgetOptions : {
+                    "onLoadedInfor": function(item){
+                        // this.loadAcceptAndReject( item );
+                        console.log(item);
+                    }.bind(this),
+                    "onComplete": function(item){
+                        console.log(item);
+                    }.bind(this)
+                }
+            }
+            //,
             //APPEAL_CHECKER_TYPE : { text : "考勤结果申诉复核人确定方式",
             //    type : "select",
             //    value : d.APPEAL_CHECKER_TYPE ,
@@ -255,6 +291,10 @@ MWF.xApplication.Attendance.AppSetting = new Class({
     okCreate: function(e){
         var data = this.document.getResult(true,",",true,false,false);
         if(data){
+            var APPEAL_AUDIFLOW_ID = data.APPEAL_AUDIFLOW_ID
+            if(!!APPEAL_AUDIFLOW_ID&&APPEAL_AUDIFLOW_ID!="无"&&APPEAL_AUDIFLOW_ID!=""){
+                data.APPEAL_AUDIFLOW_ID = this.document.items.APPEAL_AUDIFLOW_ID.orgObject[0].data.id;
+            }
             var arr = this.encodeData( this.data, data );
             this.save( arr );
         }

+ 34 - 5
o2web/source/x_component_Attendance/AppealExplorer.js

@@ -39,11 +39,31 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
 
     },
     loadConfig : function(){
-        this.config = {};
+        /*this.config = {};
         var v;
         this.actions.getSettingCode( "APPEALABLE", function(json){
             v =  json.data ? json.data.configValue : null
         },null, false)
+        if( !v ){
+            this.config.APPEALABLE = true;
+        }else{
+            this.config.APPEALABLE = (v != "false" )
+        }*/
+        this.config = {};
+        var v;
+        //需要判断申述类型listSetting2020年6月16日 by gee
+        this.configSetting = new Object(null);
+        this.actions.listSetting(function(json){
+            var data = json.data;
+            if(!!data){
+                json.data.map(function(e){
+                    this.configSetting[e.configCode]=e;
+                }.bind(this));
+                v = this.configSetting.APPEALABLE.configValue;
+            }else{
+                v = null;
+            }
+        }.bind(this),null,false);
         if( !v ){
             this.config.APPEALABLE = true;
         }else{
@@ -300,6 +320,7 @@ MWF.xApplication.Attendance.AppealExplorer.View = new Class({
             var data = json.data;
             data.each(function(d){
                 d.APPEALABLE = this.explorer.config.APPEALABLE;
+                d.APPEAL_AUDIFLOWTYPE = this.explorer.configSetting.APPEAL_AUDIFLOWTYPE.configValue;
             }.bind(this));
             data.sort( function( a, b ){
                 return parseInt( b.appealDateString.replace(/-/g,"") ) -  parseInt( a.appealDateString.replace(/-/g,"") );
@@ -315,12 +336,20 @@ MWF.xApplication.Attendance.AppealExplorer.View = new Class({
 
     },
     _openDocument: function( documentData ){
-        var appeal = new MWF.xApplication.Attendance.AppealExplorer.Appeal(this.explorer, documentData );
-        if( !documentData.status ){
-            appeal.edit();
+
+        if(!!documentData.appealAuditInfo){
+            var workid = documentData.appealAuditInfo.workId;
+            var options = {"workId":workid, "appId": "process.Work"+workid};
+            this.app.desktop.openApplication(null, "process.Work", options);
         }else{
-            appeal.open();
+            var appeal = new MWF.xApplication.Attendance.AppealExplorer.Appeal(this.explorer, documentData );
+            if( !documentData.status ){
+                appeal.edit();
+            }else{
+                appeal.open();
+            }
         }
+
     }
 
 })

+ 9 - 2
o2web/source/x_component_Attendance/MyAppeal.js

@@ -285,8 +285,15 @@ MWF.xApplication.Attendance.MyAppeal.View = new Class({
 
     },
     _openDocument: function( documentData ){
-        var appeal = new MWF.xApplication.Attendance.MyAppeal.Appeal(this.explorer, documentData );
-        appeal.open();
+        if(!!documentData.appealAuditInfo){
+            var workid = documentData.appealAuditInfo.workId;
+            var options = {"workId":workid, "appId": "process.Work"+workid};
+            this.app.desktop.openApplication(null, "process.Work", options);
+        }else{
+            var appeal = new MWF.xApplication.Attendance.MyAppeal.Appeal(this.explorer, documentData );
+            appeal.open();
+        }
+
     }
 
 });

+ 129 - 9
o2web/source/x_component_Attendance/MyDetail.js

@@ -124,9 +124,22 @@ MWF.xApplication.Attendance.MyDetail.Explorer = new Class({
     loadConfig : function(){
         this.config = {};
         var v;
-        this.actions.getSettingCode( "APPEALABLE", function(json){
-            v =  json.data ? json.data.configValue : null
-        },null, false);
+        //需要判断申述类型listSetting2020年6月16日 by gee
+        this.configSetting = new Object(null);
+        this.actions.listSetting(function(json){
+            var data = json.data;
+            if(!!data){
+                json.data.map(function(e){
+                    this.configSetting[e.configCode]=e;
+                }.bind(this));
+                v = this.configSetting.APPEALABLE.configValue;
+            }else{
+                v = null;
+            }
+        }.bind(this),null,false);
+        /*this.actions.getSettingCode( "APPEALABLE", function(json){
+            v =  json.data ? json.data.configValue : null;
+        },null, false);*/
         if( !v ){
             this.config.APPEALABLE = true;
         }else{
@@ -666,12 +679,111 @@ MWF.xApplication.Attendance.MyDetail.SelfHolidayStaticView = new Class({
 MWF.xApplication.Attendance.MyDetail.Document = new Class({
     Extends: MWF.xApplication.Attendance.Explorer.Document,
     appeal :function(){
-        var form = new MWF.xApplication.Attendance.MyDetail.Appeal( this.explorer, this.data );
-        form.create();
+
+        if(this.explorer.configSetting.APPEAL_AUDIFLOWTYPE.configValue=="BUILTIN"){
+            var form = new MWF.xApplication.Attendance.MyDetail.Appeal( this.explorer, this.data );
+            form.create();
+        }else{
+            this.loadProcess(this.explorer.configSetting.APPEAL_AUDIFLOW_ID.configValue,{record:this.data} ,null);
+        }
+
+    },
+    loadProcess: function(id, processData, latest){
+
+        this.getProcess(id, function(process){
+            MWF.xDesktop.requireApp("process.TaskCenter", "ProcessStarter", function(){
+                var starter = new MWF.xApplication.process.TaskCenter.ProcessStarter(process, this.app, {
+                    "latest" : latest,
+                    "workData" : processData,
+                    "onStarted": function(data, title, processName){
+                        this.afterStartProcess(data, title, processName);
+                    }.bind(this)
+                });
+                starter.load();
+            }.bind(this));
+        }.bind(this));
+    },
+    afterStartProcess: function(data, title, processName){
+        var workInfors = [];
+        var currentTask = [];
+        data.each(function(work){
+            if (work.currentTaskIndex !== -1) currentTask.push(work.taskList[work.currentTaskIndex].work);
+            workInfors.push(this.getStartWorkInforObj(work));
+        }.bind(this));
+
+        if (currentTask.length===1){
+            var options = {"workId": currentTask[0], "appId": currentTask[0]};
+            this.app.desktop.openApplication(null, "process.Work", options);
+
+            this.createStartWorkResault(workInfors, title, processName, false);
+        }else{
+            this.createStartWorkResault(workInfors, title, processName, true);
+        }
+    },
+    createStartWorkResault: function(workInfors, title, processName, isopen){
+        var content = "";
+        workInfors.each(function(infor){
+            var users = [];
+            infor.users.each(function(uname){
+                users.push(MWF.name.cn(uname));
+            });
+
+            content += "<div><b>"+this.app.lp.nextActivity+"<font style=\"color: #ea621f\">"+infor.activity+"</font>, "+this.app.lp.nextUser+"<font style=\"color: #ea621f\">"+users.join(", ")+"</font></b>";
+            if (infor.currentTask && isopen){
+                content += "&nbsp;&nbsp;&nbsp;&nbsp;<span value=\""+infor.currentTask+"\">"+this.app.lp.deal+"</span></div>";
+            }else{
+                content += "</div>";
+            }
+        }.bind(this));
+
+        var t = workInfors[0].title || title;
+        var msg = {
+            "subject": this.app.lp.processStarted,
+            "content": "<div>"+this.app.lp.processStartedMessage+"“["+processName+"]"+t+"”</div>"+content
+        };
+
+        var tooltip = layout.desktop.message.addTooltip(msg);
+        var item = layout.desktop.message.addMessage(msg);
+
+        this.setStartWorkResaultAction(tooltip);
+        this.setStartWorkResaultAction(item);
+    },
+    getStartWorkInforObj: function(work){
+        var title = "";
+        var users = [];
+        var currentTask = "";
+        work.taskList.each(function(task, idx){
+            title = task.title;
+            users.push(task.person+"("+task.department + ")");
+            if (work.currentTaskIndex===idx) currentTask = task.id;
+        }.bind(this));
+        return {"activity": work.fromActivityName, "users": users, "currentTask": currentTask, "title" : title };
+    },
+    setStartWorkResaultAction: function(item){
+        var node = item.node.getElements("span");
+        node.setStyles(this.css.dealStartedWorkAction);
+        var _self = this;
+        node.addEvent("click", function(e){
+            var options = {"taskId": this.get("value"), "appId": this.get("value")};
+            _self.app.desktop.openApplication(e, "process.Work", options);
+        });
+    },
+    getProcess: function(id, callback){
+        this.action = new o2.xDesktop.Actions.RestActions("", "x_processplatform_assemble_surface", "");
+        this.action.actions = {"getProces": {"uri": "/jaxrs/process/{id}/complex"}};
+        this.action.invoke({"name": "getProces", "async": false, "parameter": {"id": id}, "success": function(json){
+                if (callback) callback(json.data);
+            }.bind(this)});
     },
     seeAppeal : function(){
-        var form = new MWF.xApplication.Attendance.MyDetail.Appeal( this.explorer, this.data );
-        form.open();
+        if(!this.data.appealInfos){
+            var form = new MWF.xApplication.Attendance.MyDetail.Appeal( this.explorer, this.data );
+            form.open();
+        }else{
+            var workid = this.data.appealInfos[0].appealAuditInfo.workId;
+            var options = {"workId":workid, "appId": "process.Work"+workid};
+            this.app.desktop.openApplication(null, "process.Work", options);
+        }
     }
 });
 
@@ -842,6 +954,12 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({
             "    <td styles='formTableValue' item='recordDateString'></td></tr>"
             +"<tr><td styles='formTableTitle' lable='onDutyTime'></td>"+
             "    <td styles='formTableValue' item='onDutyTime'></td>" +
+            ((this.data.signProxy=="2"||this.data.signProxy=="3")?
+            "    <td styles='formTableTitle' lable='morningOffDutyTime'></td>"+
+            "    <td styles='formTableValue' item='morningOffDutyTime'></td></tr>" +
+            "<tr><td styles='formTableTitle' lable='afternoonOnDutyTime'></td>"+
+            "    <td styles='formTableValue' item='afternoonOnDutyTime'></td>" : ""
+            ) +
             "    <td styles='formTableTitle' lable='offDutyTime'></td>"+
             "    <td styles='formTableValue' item='offDutyTime'></td></tr>" +
             ( ( this.isNew && identityList.identities.length > 1 ) ?
@@ -872,14 +990,16 @@ MWF.xApplication.Attendance.MyDetail.Appeal = new Class({
             "    <td styles='formTableValue' item='appealDescription' colspan='3'></td></tr>" +
             "</table>";
         this.createTableArea.set("html",html);
-
-
+        var lp = this.app.lp.schedule;
+        var signProxy = this.data.signProxy||1;
         this.document = new MForm( this.createTableArea, this.data, {
             style : "popup",
             isEdited : this.isEdited || this.isNew,
             itemTemplate : {
                 recordDateString : { text:"考勤日期",  type : "innertext"},
                 onDutyTime : { text:"上班打卡时间",  type : "innertext"},
+                morningOffDutyTime : { text:signProxy==1?"":lp.signProxy[signProxy].middayRestStartTime,  type : "innertext"},
+                afternoonOnDutyTime : { text:signProxy==1?"":lp.signProxy[signProxy].middayRestEndTime,  type : "innertext"},
                 offDutyTime : { text:"下班打卡时间",  type : "innertext"},
                 statusShow : {  text:"考勤状态", type : "innertext" },
                 appealStatusShow : { text:"审批状态",type : "innertext"},

+ 6 - 1
o2web/source/x_component_Attendance/lp/zh-cn.js

@@ -139,5 +139,10 @@ MWF.xApplication.Attendance.LP = {
 	},
 	"selfHoliday" : {
 		"inputValid" : "部门、员工姓名、休假类型、开始时间、结束时间、休假天数必填,请填写!"
-	}
+	},
+	"nextActivity": "下一个活动:",
+	"nextUser": "处理人:",
+	"deal": "处理",
+	"processStarted": "文件已启动",
+	"processStartedMessage": "您启动了一个新的工作:"
 };