Commit d4d2901c846a158ff321854f4d31f1d5d7424a18
提交
Showing
8 changed files
with
46 additions
and
21 deletions
login/login.html
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <div class="login-main"> |
| 18 | 18 | <div class="login-name">中兴智能工时系统</div> |
| 19 | 19 | <div class="login-hint">轻松工作每一天</div> |
| 20 | - <input type="text" autocomplete=”off” class="login-username" id="login-username" placeholder="邮箱或者账户名"> | |
| 20 | + <input type="text" autocomplete=”off” class="login-username" id="login-username" placeholder="邮箱或者用户名"> | |
| 21 | 21 | <input type="password" autocomplete=”off” class="login-password" id="login-password" placeholder="密码"> |
| 22 | 22 | <div class="login-errorifo" id="login-errorifo"></div> |
| 23 | 23 | <div class="login-btn" id="login-btn">登录</div> | ... | ... |
resource/js/unit.js
| ... | ... | @@ -566,5 +566,22 @@ var commonClass = { |
| 566 | 566 | } |
| 567 | 567 | } |
| 568 | 568 | } |
| 569 | +/** | |
| 570 | + * jquery 解绑绑定函数.<br/> | |
| 571 | + * wangfs 2018-01-11.<br/> | |
| 572 | + */ | |
| 573 | +var documentBindFunc ={ | |
| 574 | + /** | |
| 575 | + * @param event 事件名称如:click | |
| 576 | + * @param element 元素 如:id,class 元素等 | |
| 577 | + * @param func 函数 | |
| 578 | + * 例子:documentBindFunc.on('click','#berthmanage-addBtn',function () {}); | |
| 579 | + */ | |
| 580 | + on: function (event, element, func) { | |
| 581 | + $(document).off(event, element); | |
| 582 | + $(document).on(event, element, func); | |
| 583 | + } | |
| 584 | + | |
| 585 | +}; | |
| 569 | 586 | |
| 570 | 587 | $("#loginShowName").text(fn.getUserName()); | ... | ... |
topages/hourscount/hourscount.js
topages/staffmanage/staffmanage.js
topages/workfill/workfill.css
topages/workfill/workfill.html
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | <li class="workfill-list-li boxshadow"> |
| 14 | 14 | <div class="workfill-list-weekday-wrap clearfix"> |
| 15 | 15 | <span class="float-left workfill-list-weekday" id="weekday1" data-id="" data-date="">周一</span> |
| 16 | - <span class="float-right workfill-list-btn cursor-pointer" id="btn-commit1">提交</span> | |
| 16 | + <button class="float-right workfill-list-btn cursor-pointer" id="btn-commit1">提交</button> | |
| 17 | 17 | </div> |
| 18 | 18 | <div class="workfill-list-projectnamewrap"> |
| 19 | 19 | <div class="pos-abs workfill-projectCon"> |
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | <li class="workfill-list-li boxshadow"> |
| 32 | 32 | <div class="workfill-list-weekday-wrap clearfix"> |
| 33 | 33 | <span class="float-left workfill-list-weekday" id="weekday2" data-id="" data-date="">周二</span> |
| 34 | - <span class="float-right workfill-list-btn cursor-pointer" id="btn-commit2">提交</span> | |
| 34 | + <button class="float-right workfill-list-btn cursor-pointer" id="btn-commit2">提交</button> | |
| 35 | 35 | </div> |
| 36 | 36 | <div class="workfill-list-projectnamewrap"> |
| 37 | 37 | <div class="pos-abs workfill-projectCon"> |
| ... | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | <li class="workfill-list-li boxshadow"> |
| 49 | 49 | <div class="workfill-list-weekday-wrap clearfix"> |
| 50 | 50 | <span class="float-left workfill-list-weekday" id="weekday3" data-id="" data-date="">周三</span> |
| 51 | - <span class="float-right workfill-list-btn cursor-pointer" id="btn-commit3">提交</span> | |
| 51 | + <button class="float-right workfill-list-btn cursor-pointer" id="btn-commit3">提交</button> | |
| 52 | 52 | </div> |
| 53 | 53 | <div class="workfill-list-projectnamewrap"> |
| 54 | 54 | <div class="pos-abs workfill-projectCon"> |
| ... | ... | @@ -65,7 +65,7 @@ |
| 65 | 65 | <li class="workfill-list-li boxshadow"> |
| 66 | 66 | <div class="workfill-list-weekday-wrap clearfix"> |
| 67 | 67 | <span class="float-left workfill-list-weekday" id="weekday4" data-id="" data-date="">周四</span> |
| 68 | - <span class="float-right workfill-list-btn cursor-pointer" id="btn-commit4">提交</span> | |
| 68 | + <button class="float-right workfill-list-btn cursor-pointer" id="btn-commit4">提交</button> | |
| 69 | 69 | </div> |
| 70 | 70 | <div class="workfill-list-projectnamewrap"> |
| 71 | 71 | <div class="pos-abs workfill-projectCon"> |
| ... | ... | @@ -82,7 +82,7 @@ |
| 82 | 82 | <li class="workfill-list-li boxshadow"> |
| 83 | 83 | <div class="workfill-list-weekday-wrap clearfix"> |
| 84 | 84 | <span class="float-left workfill-list-weekday" id="weekday5" data-id="" data-date="">周五</span> |
| 85 | - <span class="float-right workfill-list-btn cursor-pointer" id="btn-commit5">提交</span> | |
| 85 | + <button class="float-right workfill-list-btn cursor-pointer" id="btn-commit5">提交</button> | |
| 86 | 86 | </div> |
| 87 | 87 | <div class="workfill-list-projectnamewrap"> |
| 88 | 88 | <div class="pos-abs workfill-projectCon"> |
| ... | ... | @@ -99,7 +99,7 @@ |
| 99 | 99 | <li class="workfill-list-li boxshadow"> |
| 100 | 100 | <div class="workfill-list-weekday-wrap clearfix"> |
| 101 | 101 | <span class="float-left workfill-list-weekday" id="weekday6" data-id="" data-date="">周六</span> |
| 102 | - <span class="float-right workfill-list-btn cursor-pointer" id="btn-commit6">提交</span> | |
| 102 | + <button class="float-right workfill-list-btn cursor-pointer" id="btn-commit6">提交</button> | |
| 103 | 103 | </div> |
| 104 | 104 | <div class="workfill-list-projectnamewrap"> |
| 105 | 105 | <div class="pos-abs workfill-projectCon"> |
| ... | ... | @@ -116,7 +116,7 @@ |
| 116 | 116 | <li class="workfill-list-li boxshadow"> |
| 117 | 117 | <div class="workfill-list-weekday-wrap clearfix"> |
| 118 | 118 | <span class="float-left workfill-list-weekday" id="weekday7" data-id="" data-date="">周日</span> |
| 119 | - <span class="float-right workfill-list-btn cursor-pointer" id="btn-commit7">提交</span> | |
| 119 | + <button class="float-right workfill-list-btn cursor-pointer" id="btn-commit7">提交</button> | |
| 120 | 120 | </div> |
| 121 | 121 | <div class="workfill-list-projectnamewrap"> |
| 122 | 122 | <div class="pos-abs workfill-projectCon"> | ... | ... |
topages/workfill/workfill.js
| ... | ... | @@ -49,7 +49,7 @@ var fun = { |
| 49 | 49 | }, |
| 50 | 50 | //退出 |
| 51 | 51 | logout:function(){ |
| 52 | - $(document).on('click','#logoutId',function(){ | |
| 52 | + documentBindFunc.on('click','#logoutId',function(){ | |
| 53 | 53 | fn.loginOut(); |
| 54 | 54 | }); |
| 55 | 55 | }, |
| ... | ... | @@ -146,7 +146,7 @@ var fun = { |
| 146 | 146 | $("#work-projectName"+row.weeksNum).selectpicker('val',row.projectId); |
| 147 | 147 | $("#work-projectName"+row.weeksNum).selectpicker('refresh'); |
| 148 | 148 | |
| 149 | - $("#btn-commit"+row.weeksNum).text('编辑'); | |
| 149 | + $("#btn-commit"+row.weeksNum).html('编辑'); | |
| 150 | 150 | $("#btn-commit"+row.weeksNum).parent().parent().find(".workfill-list-container").attr("contenteditable","false"); |
| 151 | 151 | $("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); |
| 152 | 152 | var projectName=$("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); |
| ... | ... | @@ -169,6 +169,7 @@ var fun = { |
| 169 | 169 | $('.ITD-alertmodel-contentmsg').text(''); |
| 170 | 170 | $('#ITD-tipsmodel').modal('hide'); |
| 171 | 171 | },3000); |
| 172 | + _this.removeAttr("disabled"); | |
| 172 | 173 | return false; |
| 173 | 174 | }else{ |
| 174 | 175 | var req= { |
| ... | ... | @@ -188,12 +189,13 @@ var fun = { |
| 188 | 189 | if(res.success == true){ |
| 189 | 190 | var asraId = res.data; |
| 190 | 191 | $("#weekday"+id).attr("data-id",asraId); |
| 191 | - _this.text('编辑'); | |
| 192 | + _this.html('编辑'); | |
| 192 | 193 | _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false"); |
| 193 | - _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none'); | |
| 194 | + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); | |
| 194 | 195 | var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); |
| 195 | - _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none'); | |
| 196 | + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').removeClass('display-none'); | |
| 196 | 197 | _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); |
| 198 | + _this.removeAttr("disabled"); | |
| 197 | 199 | |
| 198 | 200 | }else{ |
| 199 | 201 | $('.ITD-alertmodel-contentmsg').text('提交失败!'); |
| ... | ... | @@ -202,6 +204,7 @@ var fun = { |
| 202 | 204 | $('.ITD-alertmodel-contentmsg').text(''); |
| 203 | 205 | $('#ITD-tipsmodel').modal('hide'); |
| 204 | 206 | },3000); |
| 207 | + _this.removeAttr("disabled"); | |
| 205 | 208 | return false; |
| 206 | 209 | } |
| 207 | 210 | } |
| ... | ... | @@ -215,21 +218,21 @@ var fun = { |
| 215 | 218 | }; |
| 216 | 219 | fun.init(); |
| 217 | 220 | // 上一周点击time-opr-prevbtn |
| 218 | -$('#time-opr-prevbtn').on('click',function () { | |
| 221 | +documentBindFunc.on('click','#time-opr-prevbtn',function () { | |
| 219 | 222 | fun.timeoprprevbtn(); |
| 220 | 223 | fun.getAsraDailyListMsg(); |
| 221 | 224 | }); |
| 222 | 225 | // 下一周点击time-opr-nextbtn |
| 223 | -$('#time-opr-nextbtn').on('click',function () { | |
| 226 | +documentBindFunc.on('click','#time-opr-nextbtn',function () { | |
| 224 | 227 | fun.timeoprnextbtn(); |
| 225 | 228 | fun.getAsraDailyListMsg(); |
| 226 | 229 | }); |
| 227 | 230 | |
| 228 | 231 | //提交事件 |
| 229 | -$(document).on('click','.workfill-list-btn',function () { | |
| 232 | +documentBindFunc.on('click','.workfill-list-btn',function () { | |
| 230 | 233 | var _this=$(this); |
| 231 | 234 | if(_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')){ |
| 232 | - _this.text('提交'); | |
| 235 | + _this.html('提交'); | |
| 233 | 236 | _this.parent().parent().find(".workfill-list-container").attr("contenteditable","true"); |
| 234 | 237 | _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none'); |
| 235 | 238 | var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); |
| ... | ... | @@ -237,6 +240,7 @@ $(document).on('click','.workfill-list-btn',function () { |
| 237 | 240 | _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); |
| 238 | 241 | |
| 239 | 242 | }else { |
| 243 | + _this.attr("disabled","disabled"); | |
| 240 | 244 | var commitId = _this.attr("id"); |
| 241 | 245 | var id = commitId.substring(10,11); |
| 242 | 246 | fun.dailyReportCommit(id,_this); | ... | ... |
topages/workquery/workquery.js
| ... | ... | @@ -14,7 +14,7 @@ var fun={ |
| 14 | 14 | }, |
| 15 | 15 | dateInit:function () { |
| 16 | 16 | //时间初始化 |
| 17 | - $('#workquery-daterange-btnsta').val(moment().subtract('days', 6).format('YYYY-MM-DD')); | |
| 17 | + $('#workquery-daterange-btnsta').val(moment().subtract('days', 0).format('YYYY-MM-DD')); | |
| 18 | 18 | $('#workquery-daterange-btnend').val(moment().subtract('days', 0).format('YYYY-MM-DD')); |
| 19 | 19 | //开始日期 |
| 20 | 20 | $("#workquery-daterange-btnsta").datetimepicker({ |
| ... | ... | @@ -146,7 +146,7 @@ var fun={ |
| 146 | 146 | }, |
| 147 | 147 | //查询announce |
| 148 | 148 | queryBtn:function(){ |
| 149 | - $(document).on('click','#queryBtn',function(){ | |
| 149 | + documentBindFunc.on('click','#queryBtn',function(){ | |
| 150 | 150 | fun.queryAsraDailyAllForList(); |
| 151 | 151 | }); |
| 152 | 152 | }, | ... | ... |