diff --git a/topages/hourscount/hourscount.css b/topages/hourscount/hourscount.css index d6c1e5e..201b77b 100644 --- a/topages/hourscount/hourscount.css +++ b/topages/hourscount/hourscount.css @@ -1,5 +1,73 @@ /*-----------------------时间*/ +.hourscount-timeopr-wrap{ + height: 34px; + margin-top: 56px; + margin-bottom: 56px; +} +.hourscount-timeopr-wrap .timeopr-text{ + height: 34px; + line-height: 34px; + color: #363d5d; + font-size: 14px; + width: 72px; +} +.ITD-daterange-btn { + float: left; + width: 120px; + height: 34px; + line-height: 34px; + padding-top: 1px !important; +} +.ITD-daterange-bg { + width: 90px; + text-align: left; + background: url(../../resource/img/dataicon.png) no-repeat 94% 9px !important; + background-color: #fff !important; + padding-right: 25px; + z-index: 9999; + border-radius: 4px !important; +} +.ITD-input-bordercolor { + color: rgba(0,0,0,0.45); + border: 1px solid #d8e2e5 !important; + border-radius: 4px !important; +} +.ITD-parkinput78 { + width: 180px; + height: 34px; + line-height: 34px; +} +.paddingleft-10 { + padding-left: 10px; +} +.hourscount-timeopr-div{ + width: 200px; + height: 34px; + line-height: 34px; +} +/*input 样式*/ +.bootstrap-select.btn-group .dropdown-toggle .filter-option { + text-align: left !important; +} +.bootstrap-select.btn-group .dropdown-toggle .caret{ + position: absolute; + top: 50%; + left:170px !important;; + margin-top: -2px; + vertical-align: middle; +} +.margin-right-40{ + margin-right: 40px; +} +/*查询按钮*/ +.hourscount-searchbtn{ + background: url("../../resource/img/search-btn.png") no-repeat; + width: 66px; + height: 66px; + top: -12px; + left: 700px; +} /*-----------------------内容*/ \ No newline at end of file diff --git a/topages/hourscount/hourscount.html b/topages/hourscount/hourscount.html index 3f254e6..7750b3e 100644 --- a/topages/hourscount/hourscount.html +++ b/topages/hourscount/hourscount.html @@ -1,11 +1,32 @@ -
时间
- - + +
+
选择时间
+
+ +
+ - +
+ +
+
选择项目
+
+ +
+
+
+
-
\ No newline at end of file + + + + \ No newline at end of file diff --git a/topages/hourscount/hourscount.js b/topages/hourscount/hourscount.js index b5ac7f1..05966dd 100644 --- a/topages/hourscount/hourscount.js +++ b/topages/hourscount/hourscount.js @@ -1,3 +1,48 @@ /** * Created by mac on 18/7/24. */ +var fun= { + init: function () { + $('#hourscount-projectName').selectpicker('render'); + fun.dateInit(); + }, + dateInit: function () { + //时间初始化 + $('#hourscount-daterange-btnsta').val(moment().subtract('days', 6).format('YYYY-MM-DD')); + $('#hourscount-daterange-btnend').val(moment().subtract('days', 0).format('YYYY-MM-DD')); + //开始日期 + $("#hourscount-daterange-btnsta").datetimepicker({ + endDate: moment().subtract('days', 0).format('YYYY-MM-DD'), + format: 'yyyy-mm-dd', + autoclose: true, + startView: 2, + //maxDate:moment().subtract('months', 3), + minView: 2, + forceParse: false, + clearBtn: true, //添加清除按钮,可选值:true/false + locale: "zh-CN", + language: 'zh-CN', + pickerPosition: "bottom-right" + }).on("change", function () { + $("#hourscount-daterange-btnend").val(''); + }); + //结束日期 + $("#hourscount-daterange-btnend").datetimepicker({ + endDate: moment().subtract('days', 0).format('YYYY-MM-DD'), + //startDate:startVal, + format: 'yyyy-mm-dd', + weekStart: 1, + autoclose: true, + clearBtn: true, //添加清除按钮,可选值:true/false + startView: 2, + minView: 2, + forceParse: false, + locale: "zh-CN", + language: 'zh-CN', + pickerPosition: "bottom-right" + }).on("click", function () { + $("#hourscount-daterange-btnend").datetimepicker("setStartDate", $("#hourscount-daterange-btnsta").val()) + }); + }, +} +fun.init(); \ No newline at end of file