Commit 4b13095992983738f0ffee1bf9e55c9e837a5b2e
1 parent
46270f5b
工时填报
Showing
3 changed files
with
88 additions
and
43 deletions
resource/js/unit.js
| ... | ... | @@ -44,6 +44,10 @@ dataUrl.util = { |
| 44 | 44 | queryAsraOpPage: function () { |
| 45 | 45 | return parkcloudbaseUrl + 'asraOp/queryAsraOpPage'; |
| 46 | 46 | }, |
| 47 | + //日报系统-工时填报 | |
| 48 | + queryAsraDailyList: function () { | |
| 49 | + return parkcloudbaseUrl + 'asraDaily/queryAsraDailyList'; | |
| 50 | + }, | |
| 47 | 51 | //查询项目列表 |
| 48 | 52 | queryAsraProjectForList:function(){ |
| 49 | 53 | return parkcloudbaseUrl + 'asraProject/queryAsraProjectForList'; | ... | ... |
topages/workfill/workfill.html
| 1 | 1 | <div class="time-opr-wrap clearfix"> |
| 2 | 2 | <div class="float-left time-opr-area"> |
| 3 | 3 | <div class="time-opr-nowtime" id="time-opr-nowtime"></div> |
| 4 | + <div class="time-opr-nowtime" id="querytime" style="display:none"></div> | |
| 4 | 5 | <div class="time-opr-btnwrap clearfix"> |
| 5 | 6 | <div class="time-opr-btn time-opr-prevbtn cursorpointer float-left" id="time-opr-prevbtn">上一周</div> |
| 6 | 7 | <div class="time-opr-btn time-opr-nextbtn cursorpointer float-left display-none" id="time-opr-nextbtn">下一周</div> |
| ... | ... | @@ -23,15 +24,10 @@ |
| 23 | 24 | <div class="workfill-list-projectname display-none">项目名称</div> |
| 24 | 25 | </div> |
| 25 | 26 | <div class="workfill-list-container" contenteditable="true" id="daily-report1"> |
| 26 | - 相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 27 | 27 | |
| 28 | - 异地购房、离婚购房提取公积金受限相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。 | |
| 29 | - | |
| 30 | - 此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 31 | - | |
| 32 | - 异地购房、离婚购房提取公积金受限 | |
| 33 | 28 | </div> |
| 34 | 29 | </li> |
| 30 | + | |
| 35 | 31 | <li class="workfill-list-li boxshadow"> |
| 36 | 32 | <div class="workfill-list-weekday-wrap clearfix"> |
| 37 | 33 | <span class="float-left workfill-list-weekday" id="weekday2">周二</span> |
| ... | ... | @@ -46,13 +42,7 @@ |
| 46 | 42 | <div class="workfill-list-projectname display-none">项目名称</div> |
| 47 | 43 | </div> |
| 48 | 44 | <div class="workfill-list-container" contenteditable="true" id="daily-report2"> |
| 49 | - 相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 50 | - | |
| 51 | - 异地购房、离婚购房提取公积金受限相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。 | |
| 52 | 45 | |
| 53 | - 此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 54 | - | |
| 55 | - 异地购房、离婚购房提取公积金受限 | |
| 56 | 46 | </div> |
| 57 | 47 | </li> |
| 58 | 48 | <li class="workfill-list-li boxshadow"> |
| ... | ... | @@ -69,13 +59,7 @@ |
| 69 | 59 | <div class="workfill-list-projectname display-none">项目名称</div> |
| 70 | 60 | </div> |
| 71 | 61 | <div class="workfill-list-container" contenteditable="true" id="daily-report3"> |
| 72 | - 相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 73 | - | |
| 74 | - 异地购房、离婚购房提取公积金受限相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。 | |
| 75 | 62 | |
| 76 | - 此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 77 | - | |
| 78 | - 异地购房、离婚购房提取公积金受限 | |
| 79 | 63 | </div> |
| 80 | 64 | </li> |
| 81 | 65 | <li class="workfill-list-li boxshadow"> |
| ... | ... | @@ -92,13 +76,7 @@ |
| 92 | 76 | <div class="workfill-list-projectname display-none">项目名称</div> |
| 93 | 77 | </div> |
| 94 | 78 | <div class="workfill-list-container" contenteditable="true" id="daily-report4"> |
| 95 | - 相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 96 | - | |
| 97 | - 异地购房、离婚购房提取公积金受限相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。 | |
| 98 | 79 | |
| 99 | - 此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 100 | - | |
| 101 | - 异地购房、离婚购房提取公积金受限 | |
| 102 | 80 | </div> |
| 103 | 81 | </li> |
| 104 | 82 | <li class="workfill-list-li boxshadow"> |
| ... | ... | @@ -115,13 +93,7 @@ |
| 115 | 93 | <div class="workfill-list-projectname display-none">项目名称</div> |
| 116 | 94 | </div> |
| 117 | 95 | <div class="workfill-list-container" contenteditable="true" id="daily-report5"> |
| 118 | - 相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 119 | - | |
| 120 | - 异地购房、离婚购房提取公积金受限相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。 | |
| 121 | 96 | |
| 122 | - 此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 123 | - | |
| 124 | - 异地购房、离婚购房提取公积金受限 | |
| 125 | 97 | </div> |
| 126 | 98 | </li> |
| 127 | 99 | <li class="workfill-list-li boxshadow"> |
| ... | ... | @@ -138,13 +110,7 @@ |
| 138 | 110 | <div class="workfill-list-projectname display-none">项目名称</div> |
| 139 | 111 | </div> |
| 140 | 112 | <div class="workfill-list-container" contenteditable="true" id="daily-report6"> |
| 141 | - 相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 142 | - | |
| 143 | - 异地购房、离婚购房提取公积金受限相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。 | |
| 144 | 113 | |
| 145 | - 此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 146 | - | |
| 147 | - 异地购房、离婚购房提取公积金受限 | |
| 148 | 114 | </div> |
| 149 | 115 | </li> |
| 150 | 116 | <li class="workfill-list-li boxshadow"> |
| ... | ... | @@ -161,13 +127,7 @@ |
| 161 | 127 | <div class="workfill-list-projectname display-none">项目名称</div> |
| 162 | 128 | </div> |
| 163 | 129 | <div class="workfill-list-container" contenteditable="true" id="daily-report7"> |
| 164 | - 相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 165 | - | |
| 166 | - 异地购房、离婚购房提取公积金受限相继调整公积金提取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。 | |
| 167 | - | |
| 168 | - 此外,由于房价普遍上涨,多地的公积金贷款上限已经明显偏低,难以满足购房者的资金需求。专家建议,各地应上调公积金贷款额度。 | |
| 169 | 130 | |
| 170 | - 异地购房、离婚购房提取公积金受限 | |
| 171 | 131 | </div> |
| 172 | 132 | </li> |
| 173 | 133 | ... | ... |
topages/workfill/workfill.js
| ... | ... | @@ -14,10 +14,12 @@ var fun = { |
| 14 | 14 | // 获取今天时间 |
| 15 | 15 | var todaytime = moment().subtract('days', 0).format('YYYY/MM/DD'); |
| 16 | 16 | $('#time-opr-nowtime').text(todaytime); |
| 17 | + $('#querytime').text(moment().subtract('days', weekOfday-1).format('YYYY-MM-DD')); | |
| 17 | 18 | // |
| 18 | 19 | fun.logout(); |
| 19 | 20 | //获取项目 |
| 20 | 21 | fun.getAsraProject(); |
| 22 | + fun.getAsraDailyListMsg(); | |
| 21 | 23 | }, |
| 22 | 24 | timeoprprevbtn:function () { |
| 23 | 25 | $('#time-opr-nextbtn').removeClass('display-none'); |
| ... | ... | @@ -26,6 +28,7 @@ var fun = { |
| 26 | 28 | var start = weekOfday+7*clicknum-1; |
| 27 | 29 | var end = weekOfday+ clicknum*7-7; |
| 28 | 30 | $('#time-opr-show').text(moment().subtract('days', start).format('YYYY/MM/DD')+' - '+moment().subtract('days',end).format('YYYY/MM/DD')); |
| 31 | + $('#querytime').text(moment().subtract('days', start).format('YYYY-MM-DD')); | |
| 29 | 32 | }, |
| 30 | 33 | timeoprnextbtn:function () { |
| 31 | 34 | |
| ... | ... | @@ -33,11 +36,13 @@ var fun = { |
| 33 | 36 | console.log(clicknum) |
| 34 | 37 | if(clicknum == 0){ |
| 35 | 38 | $('#time-opr-show').text(moment().subtract('days', weekOfday-1).format('YYYY/MM/DD')+' - '+moment().subtract('days', 0).format('YYYY/MM/DD')); |
| 39 | + $('#querytime').text(moment().subtract('days', weekOfday-1).format('YYYY-MM-DD')); | |
| 36 | 40 | $('#time-opr-nextbtn').addClass('display-none'); |
| 37 | 41 | }else{ |
| 38 | 42 | var start = weekOfday+7*clicknum-1; |
| 39 | 43 | var end = weekOfday+ clicknum*7-7; |
| 40 | 44 | $('#time-opr-show').text(moment().subtract('days', start).format('YYYY/MM/DD')+' - '+moment().subtract('days',end).format('YYYY/MM/DD')); |
| 45 | + $('#querytime').text(moment().subtract('days', start).format('YYYY-MM-DD')); | |
| 41 | 46 | } |
| 42 | 47 | |
| 43 | 48 | |
| ... | ... | @@ -65,16 +70,92 @@ var fun = { |
| 65 | 70 | } |
| 66 | 71 | } |
| 67 | 72 | }); |
| 68 | - } | |
| 73 | + }, | |
| 74 | + /*获取查询参数*/ | |
| 75 | + getQueryParam: function () { | |
| 76 | + /**员工名字*/ | |
| 77 | + var dailyDate = $("#querytime").text()+" 00:00:00"; | |
| 78 | + | |
| 79 | + var req = { | |
| 80 | + dailyDate: dailyDate | |
| 81 | + }; | |
| 82 | + | |
| 83 | + return req; | |
| 84 | + }, | |
| 85 | + queryAsraDailyList:function(callBack){ | |
| 86 | + // debugger; | |
| 87 | + var req = fun.getQueryParam(); | |
| 88 | + //设置请求参数 | |
| 89 | + req.sysCode = sysComm.sysCode; | |
| 90 | + var opt = { | |
| 91 | + method: 'post', | |
| 92 | + url: dataUrl.util.queryAsraDailyList(), | |
| 93 | + data: JSON.stringify(req), | |
| 94 | + contentType: 'application/json; charset=utf-8', | |
| 95 | + dataType: 'json', | |
| 96 | + success: function (res) { | |
| 97 | + if (res.success == true) { | |
| 98 | + console.log(res.data); | |
| 99 | + callBack(res.data); | |
| 100 | + } | |
| 101 | + } | |
| 102 | + }; | |
| 103 | + sysAjax(opt); | |
| 104 | + }, | |
| 105 | + /***获取日报信息.*/ | |
| 106 | + getAsraDailyListMsg:function(){ | |
| 107 | + debugger; | |
| 108 | + fun.queryAsraDailyList(function(data){ | |
| 109 | + for(var i=1;i<8;i++){ | |
| 110 | + $("#work-projectName"+i).selectpicker('val',''); | |
| 111 | + $("#work-projectName"+i).selectpicker('refresh'); | |
| 112 | + $("#daily-report"+i).html(""); | |
| 113 | + //如果不是本周则隐藏按钮 | |
| 114 | + if(clicknum == 1){ | |
| 115 | + $("#btn-commit"+i).attr("style","display:none;"); | |
| 116 | + $("#btn-commit"+i).parent().parent().find(".workfill-list-container").attr("contenteditable","false"); | |
| 117 | + $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); | |
| 118 | + var projectName=$("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); | |
| 119 | + $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').removeClass('display-none'); | |
| 120 | + $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); | |
| 121 | + | |
| 122 | + }else if(clicknum == 0){ | |
| 123 | + $("#btn-commit"+i).attr("style","display:block;"); | |
| 124 | + $("#btn-commit"+i).parent().parent().find(".workfill-list-container").attr("contenteditable","true"); | |
| 125 | + if($("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')) { | |
| 126 | + $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').removeClass('display-none'); | |
| 127 | + var projectName=$("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); | |
| 128 | + $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').addClass('display-none'); | |
| 129 | + $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); | |
| 130 | + } | |
| 131 | + | |
| 132 | + } | |
| 133 | + } | |
| 134 | + $.each(data,function(index,row){ | |
| 135 | + $("#daily-report"+row.weeksNum).html(row.dailyContent); | |
| 136 | + $("#work-projectName"+row.weeksNum).selectpicker('val',row.projectId); | |
| 137 | + $("#work-projectName"+row.weeksNum).selectpicker('refresh'); | |
| 138 | + | |
| 139 | + $("#btn-commit"+row.weeksNum).text('编辑'); | |
| 140 | + $("#btn-commit"+row.weeksNum).parent().parent().find(".workfill-list-container").attr("contenteditable","false"); | |
| 141 | + $("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); | |
| 142 | + var projectName=$("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); | |
| 143 | + $("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').removeClass('display-none'); | |
| 144 | + $("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); | |
| 145 | + }); | |
| 146 | + }); | |
| 147 | + }, | |
| 69 | 148 | }; |
| 70 | 149 | fun.init(); |
| 71 | 150 | // 上一周点击time-opr-prevbtn |
| 72 | 151 | $('#time-opr-prevbtn').on('click',function () { |
| 73 | 152 | fun.timeoprprevbtn(); |
| 153 | + fun.getAsraDailyListMsg(); | |
| 74 | 154 | }); |
| 75 | 155 | // 下一周点击time-opr-nextbtn |
| 76 | 156 | $('#time-opr-nextbtn').on('click',function () { |
| 77 | 157 | fun.timeoprnextbtn(); |
| 158 | + fun.getAsraDailyListMsg(); | |
| 78 | 159 | }); |
| 79 | 160 | |
| 80 | 161 | //提交事件 | ... | ... |