Răsfoiți Sursa

考勤,前端添加历史申述查询统计及历史申述审批

luojing 5 ani în urmă
părinte
comite
81f7121544

+ 1 - 1
o2web/source/x_component_Attendance/$MyDetail/listItem.json

@@ -72,7 +72,7 @@
     "contentStyles": "normalTdNode",
     "contentStyles": "normalTdNode",
     "item": "function( d ){  if(d.isExternal){ return '是' }else{ return '否' }}",
     "item": "function( d ){  if(d.isExternal){ return '是' }else{ return '否' }}",
     "name" : "appealStatus",
     "name" : "appealStatus",
-    "width" : "6%"
+    "width" : "7%"
   },
   },
   {
   {
     "title": "申诉状态",
     "title": "申诉状态",

+ 1 - 1
o2web/source/x_component_Attendance/$PeopleDetail/listItem.json

@@ -72,7 +72,7 @@
     "contentStyles": "normalTdNode",
     "contentStyles": "normalTdNode",
     "item": "function( d ){  if(d.isExternal){ return '是' }else{ return '否' }}",
     "item": "function( d ){  if(d.isExternal){ return '是' }else{ return '否' }}",
     "name" : "appealStatus",
     "name" : "appealStatus",
-    "width" : "6%"
+    "width" : "7%"
   },
   },
   {
   {
     "title": "申诉状态",
     "title": "申诉状态",

+ 1 - 1
o2web/source/x_component_Attendance/$TopUnitDetail/listItem.json

@@ -72,7 +72,7 @@
     "contentStyles": "normalTdNode",
     "contentStyles": "normalTdNode",
     "item": "function( d ){  if(d.isExternal){ return '是' }else{ return '否' }}",
     "item": "function( d ){  if(d.isExternal){ return '是' }else{ return '否' }}",
     "name" : "appealStatus",
     "name" : "appealStatus",
-    "width" : "6%"
+    "width" : "7%"
   },
   },
   {
   {
     "title": "申诉状态",
     "title": "申诉状态",

+ 1 - 1
o2web/source/x_component_Attendance/$UnitDetail/listItem.json

@@ -72,7 +72,7 @@
     "contentStyles": "normalTdNode",
     "contentStyles": "normalTdNode",
     "item": "function( d ){  if(d.isExternal){ return '是' }else{ return '否' }}",
     "item": "function( d ){  if(d.isExternal){ return '是' }else{ return '否' }}",
     "name" : "appealStatus",
     "name" : "appealStatus",
-    "width" : "6%"
+    "width" : "7%"
   },
   },
   {
   {
     "title": "申诉状态",
     "title": "申诉状态",

+ 7 - 7
o2web/source/x_component_Attendance/AppealExplorer.js

@@ -95,14 +95,14 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
         }).inject( this.fileterNode );
         }).inject( this.fileterNode );
         var tr = new Element("tr").inject(table);
         var tr = new Element("tr").inject(table);
 
 
-        var td = new Element("td", {  "styles" : this.css.filterTableTitle, "text" : this.preMonthDate.format(this.app.lp.dateFormatMonth)  }).inject(tr);
+        //var td = new Element("td", {  "styles" : this.css.filterTableTitle, "text" : this.preMonthDate.format(this.app.lp.dateFormatMonth)  }).inject(tr);
 
 
+        this.createYearSelectTd( tr );
+        this.createMonthSelectTd( tr );
         this.createStatusSelectTd(tr);
         this.createStatusSelectTd(tr);
         this.createAppealReasonTd(tr);
         this.createAppealReasonTd(tr);
         this.createUnitTd(tr);
         this.createUnitTd(tr);
         this.createPersonTd( tr );
         this.createPersonTd( tr );
-        //this.createYearSelectTd( tr );
-        //this.createMonthSelectTd( tr );
         this.createActionTd( tr );
         this.createActionTd( tr );
     },
     },
     createStatusSelectTd : function( tr ){
     createStatusSelectTd : function( tr ){
@@ -192,16 +192,16 @@ MWF.xApplication.Attendance.AppealExplorer = new Class({
             "styles" : this.css.filterButton
             "styles" : this.css.filterButton
         }).inject(td);
         }).inject(td);
         input.addEvent("click", function(){
         input.addEvent("click", function(){
-            var year = this.preMonthDate.getFullYear().toString();
+            /*var year = this.preMonthDate.getFullYear().toString();
             var month = (this.preMonthDate.getMonth()+1).toString();
             var month = (this.preMonthDate.getMonth()+1).toString();
-            if( month.length == 1 )month = "0"+month;
+            if( month.length == 1 )month = "0"+month;*/
             var filterData = {
             var filterData = {
                 status : this.status.getValue(),
                 status : this.status.getValue(),
                 appealReason : this.appealReason.getValue(),
                 appealReason : this.appealReason.getValue(),
                 unitName : this.unitName.getValue(),
                 unitName : this.unitName.getValue(),
                 empName : this.empName.getValue(),
                 empName : this.empName.getValue(),
-                yearString : year, //this.yearString.getValue(),
-                monthString : month //this.monthString.getValue()
+                yearString : this.yearString.getValue(),
+                monthString : this.monthString.getValue()
             }
             }
             this.loadView( filterData );
             this.loadView( filterData );
         }.bind(this))
         }.bind(this))

+ 40 - 5
o2web/source/x_component_Attendance/MyAppeal.js

@@ -39,9 +39,12 @@ MWF.xApplication.Attendance.MyAppeal = new Class({
             "styles" : this.css.fileterNode
             "styles" : this.css.fileterNode
         }).inject(this.node);
         }).inject(this.node);
 
 
-        var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' style='width: 560px;font-size: 14px;color:#666'>"+
+        var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' style='width: 580px;font-size: 14px;color:#666'>"+
             "<tr>" +
             "<tr>" +
-            "    <td styles='filterTableTitle' item='date'></td>"+
+            "    <td styles='filterTableTitle' lable='yearString'></td>"+
+            "    <td styles='filterTableValue' item='yearString'></td>" +
+            "    <td styles='filterTableTitle' lable='monthString'></td>"+
+            "    <td styles='filterTableValue' item='monthString'></td>" +
             "    <td styles='filterTableTitle' lable='status'></td>"+
             "    <td styles='filterTableTitle' lable='status'></td>"+
             "    <td styles='filterTableValue' item='status'></td>" +
             "    <td styles='filterTableValue' item='status'></td>" +
             "    <td styles='filterTableTitle' lable='appealReason'></td>"+
             "    <td styles='filterTableTitle' lable='appealReason'></td>"+
@@ -55,7 +58,39 @@ MWF.xApplication.Attendance.MyAppeal = new Class({
             this.form = new MForm( this.fileterNode, {}, {
             this.form = new MForm( this.fileterNode, {}, {
                 isEdited : true,
                 isEdited : true,
                 itemTemplate : {
                 itemTemplate : {
-                    date : { "type" : "innerText", value : (new Date).format(this.app.lp.dateFormatMonth) },
+                    yearString : {
+                        text : "年度",
+                        "type" : "select",
+                        "selectValue" : function(){
+                            var years = [];
+                            var year = new Date().getFullYear();
+                            for(var i=0; i<6; i++ ){
+                                years.push( year-- );
+                            }
+                            return years;
+                        },
+                        "event" : {
+                            "change" : function( item, ev ){
+                                var values = this.getDateSelectValue();
+                                item.form.getItem( "date").resetItemOptions( values , values )
+                            }.bind(this)
+                        }
+                    },
+                    monthString : {
+                        text : "月份",
+                        "type" : "select",
+                        "defaultValue" : function(){
+                            var month = (new Date().getMonth() + 1 ).toString();
+                            return  month.length == 1 ? "0"+month : month;
+                        },
+                        "selectValue" :["","01","02","03","04","05","06","07","08","09","10","11","12"],
+                        "event" : {
+                            "change" : function( item, ev ){
+                                var values = this.getDateSelectValue();
+                                item.form.getItem( "date").resetItemOptions( values , values )
+                            }.bind(this)
+                        }
+                    },
                     status : {
                     status : {
                         "text" : "申述状态",
                         "text" : "申述状态",
                         "type" : "select",
                         "type" : "select",
@@ -263,10 +298,10 @@ MWF.xApplication.Attendance.MyAppeal.View = new Class({
         var id = (this.items.length) ? this.items[this.items.length-1].data.id : "(0)";
         var id = (this.items.length) ? this.items[this.items.length-1].data.id : "(0)";
         var filter = this.filterData || {};
         var filter = this.filterData || {};
 
 
-        var month = (new Date().getMonth()+1).toString();
+        /*var month = (new Date().getMonth()+1).toString();
         if( month.length == 1 )month = "0"+month;
         if( month.length == 1 )month = "0"+month;
         filter.yearString = new Date().getFullYear().toString();
         filter.yearString = new Date().getFullYear().toString();
-        filter.monthString = month;
+        filter.monthString = month;*/
         filter.empName = layout.desktop.session.user.distinguishedName;
         filter.empName = layout.desktop.session.user.distinguishedName;
 
 
         this.actions.listAppealFilterNext(id, count, filter, function(json){
         this.actions.listAppealFilterNext(id, count, filter, function(json){

+ 39 - 3
o2web/source/x_component_Attendance/MyDetail.js

@@ -153,7 +153,10 @@ MWF.xApplication.Attendance.MyDetail.Explorer = new Class({
 
 
         var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='filterTable'>"+
         var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='filterTable'>"+
             "<tr>" +
             "<tr>" +
-            "    <td styles='filterTableTitle'>"+ (new Date()).format("%Y年%m月") +"</td>"+
+            "    <td styles='filterTableTitle' lable='cycleYear'></td>"+
+            "    <td styles='filterTableValue' item='cycleYear'></td>" +
+            "    <td styles='filterTableTitle' lable='cycleMonth'></td>"+
+            "    <td styles='filterTableValue' item='cycleMonth'></td>" +
             "    <td styles='filterTableTitle' lable='date'></td>"+
             "    <td styles='filterTableTitle' lable='date'></td>"+
             "    <td styles='filterTableValue' item='date'></td>" +
             "    <td styles='filterTableValue' item='date'></td>" +
             "    <td styles='filterTableTitle' lable='isAbsent'></td>"+
             "    <td styles='filterTableTitle' lable='isAbsent'></td>"+
@@ -171,6 +174,39 @@ MWF.xApplication.Attendance.MyDetail.Explorer = new Class({
             this.form = new MForm( this.fileterNode, {}, {
             this.form = new MForm( this.fileterNode, {}, {
                 isEdited : true,
                 isEdited : true,
                 itemTemplate : {
                 itemTemplate : {
+                    cycleYear : {
+                        text : "年度",
+                        "type" : "select",
+                        "selectValue" : function(){
+                            var years = [];
+                            var year = new Date().getFullYear();
+                            for(var i=0; i<6; i++ ){
+                                years.push( year-- );
+                            }
+                            return years;
+                        },
+                        "event" : {
+                            "change" : function( item, ev ){
+                                var values = this.getDateSelectValue();
+                                item.form.getItem( "date").resetItemOptions( values , values )
+                            }.bind(this)
+                        }
+                    },
+                    cycleMonth : {
+                        text : "月份",
+                        "type" : "select",
+                        "defaultValue" : function(){
+                            var month = (new Date().getMonth() + 1 ).toString();
+                            return  month.length == 1 ? "0"+month : month;
+                        },
+                        "selectValue" :["","01","02","03","04","05","06","07","08","09","10","11","12"],
+                        "event" : {
+                            "change" : function( item, ev ){
+                                var values = this.getDateSelectValue();
+                                item.form.getItem( "date").resetItemOptions( values , values )
+                            }.bind(this)
+                        }
+                    },
                     date : { text : "日期",  "type" : "select", "selectValue" : function(){
                     date : { text : "日期",  "type" : "select", "selectValue" : function(){
                             var year =  this.preMonthDate.getFullYear() ;
                             var year =  this.preMonthDate.getFullYear() ;
                             var month =  this.preMonthDate.getMonth() ;
                             var month =  this.preMonthDate.getMonth() ;
@@ -193,11 +229,11 @@ MWF.xApplication.Attendance.MyDetail.Explorer = new Class({
                             click : function(){
                             click : function(){
                                 var result = this.form.getResult(false,null,false,true,false);
                                 var result = this.form.getResult(false,null,false,true,false);
 
 
-                                var year = this.preMonthDate.getFullYear().toString();
+                               /* var year = this.preMonthDate.getFullYear().toString();
                                 var month = (this.preMonthDate.getMonth()+1).toString();
                                 var month = (this.preMonthDate.getMonth()+1).toString();
                                 if( month.length == 1 )month = "0"+month;
                                 if( month.length == 1 )month = "0"+month;
                                 result.cycleYear = year;
                                 result.cycleYear = year;
-                                result.cycleMonth = month;
+                                result.cycleMonth = month;*/
 
 
                                 if( typeOf( result.isAbsent ) == "string" )result.isAbsent = this.getBoolean( result.isAbsent );
                                 if( typeOf( result.isAbsent ) == "string" )result.isAbsent = this.getBoolean( result.isAbsent );
                                 if( typeOf( result.isLate ) == "string" )result.isLate = this.getBoolean( result.isLate );
                                 if( typeOf( result.isLate ) == "string" )result.isLate = this.getBoolean( result.isLate );