Commit d5af9dc7041cc345578b68f1430b4d06cb5bcfd4
1 parent
2732603d
add 工时统计查询栏
Showing
3 changed files
with
138 additions
and
4 deletions
topages/hourscount/hourscount.css
1 | 1 | /*-----------------------时间*/ |
2 | +.hourscount-timeopr-wrap{ | |
3 | + height: 34px; | |
4 | + margin-top: 56px; | |
5 | + margin-bottom: 56px; | |
6 | +} | |
7 | +.hourscount-timeopr-wrap .timeopr-text{ | |
8 | + height: 34px; | |
9 | + line-height: 34px; | |
10 | + color: #363d5d; | |
11 | + font-size: 14px; | |
12 | + width: 72px; | |
13 | +} | |
14 | +.ITD-daterange-btn { | |
15 | + float: left; | |
16 | + width: 120px; | |
17 | + height: 34px; | |
18 | + line-height: 34px; | |
2 | 19 | |
20 | + padding-top: 1px !important; | |
21 | +} | |
22 | +.ITD-daterange-bg { | |
23 | + width: 90px; | |
24 | + text-align: left; | |
25 | + background: url(../../resource/img/dataicon.png) no-repeat 94% 9px !important; | |
26 | + background-color: #fff !important; | |
27 | + padding-right: 25px; | |
28 | + z-index: 9999; | |
29 | + border-radius: 4px !important; | |
30 | +} | |
31 | +.ITD-input-bordercolor { | |
32 | + color: rgba(0,0,0,0.45); | |
33 | + border: 1px solid #d8e2e5 !important; | |
34 | + border-radius: 4px !important; | |
35 | +} | |
36 | +.ITD-parkinput78 { | |
37 | + width: 180px; | |
38 | + height: 34px; | |
39 | + line-height: 34px; | |
40 | +} | |
41 | +.paddingleft-10 { | |
42 | + padding-left: 10px; | |
43 | +} | |
44 | +.hourscount-timeopr-div{ | |
45 | + width: 200px; | |
46 | + height: 34px; | |
47 | + line-height: 34px; | |
48 | +} | |
49 | +/*input 样式*/ | |
50 | +.bootstrap-select.btn-group .dropdown-toggle .filter-option { | |
51 | + text-align: left !important; | |
52 | +} | |
53 | +.bootstrap-select.btn-group .dropdown-toggle .caret{ | |
54 | + position: absolute; | |
55 | + top: 50%; | |
56 | + left:170px !important;; | |
57 | + margin-top: -2px; | |
58 | + vertical-align: middle; | |
59 | +} | |
60 | +.margin-right-40{ | |
61 | + margin-right: 40px; | |
62 | +} | |
63 | +/*查询按钮*/ | |
64 | +.hourscount-searchbtn{ | |
65 | + background: url("../../resource/img/search-btn.png") no-repeat; | |
66 | + width: 66px; | |
67 | + height: 66px; | |
68 | + top: -12px; | |
69 | + left: 700px; | |
70 | +} | |
3 | 71 | |
4 | 72 | |
5 | 73 | /*-----------------------内容*/ |
6 | 74 | \ No newline at end of file | ... | ... |
topages/hourscount/hourscount.html
1 | -<div>时间</div> | |
2 | - | |
3 | - | |
1 | +<!--查询 sta--> | |
4 | 2 | |
3 | +<div class="hourscount-timeopr-wrap pos-rel clearfix"> | |
4 | + <div class="timeopr-text float-left">选择时间</div> | |
5 | + <div class="input-group ITD-daterange-btn" > | |
6 | + <input type="text" class="form-control ITD-daterange-bg ITD-common-color070" id="hourscount-daterange-btnsta" readonly=""> | |
7 | + </div> | |
8 | + <span class="float-left" style="height: 34px;line-height: 34px;margin: 0 5px;">-</span> | |
9 | + <div class="input-group ITD-daterange-btn margin-right-40"> | |
10 | + <input type="text" class="form-control daterange-str ITD-daterange-bg ITD-common-color070" id="hourscount-daterange-btnend" readonly=""> | |
11 | + </div> | |
12 | + <div class="timeopr-text float-left">选择项目</div> | |
13 | + <div class="float-left hourscount-timeopr-div margin-right-40"> | |
14 | + <select id="hourscount-projectName" class="selectpicker" data-width="100%" data-size="5" data-live-search="true"> | |
15 | + <option value="1">企业云</option> | |
16 | + <option value="2">任你停</option> | |
17 | + <option value="3">政府云</option> | |
18 | + </select> | |
19 | + </div> | |
20 | + <div class="hourscount-searchbtn pos-abs cursor-pointer" id="queryBtn"></div> | |
21 | +</div> | |
22 | +<!--查询 end--> | |
5 | 23 | |
6 | 24 | <!--------------------------------------------内容--> |
7 | 25 | <div> |
8 | 26 | |
9 | 27 | |
10 | 28 | |
11 | -</div> | |
12 | 29 | \ No newline at end of file |
30 | +</div> | |
31 | + | |
32 | + | |
33 | +<script src="../topages/hourscount/hourscount.js"></script> | |
13 | 34 | \ No newline at end of file | ... | ... |
topages/hourscount/hourscount.js
1 | 1 | /** |
2 | 2 | * Created by mac on 18/7/24. |
3 | 3 | */ |
4 | +var fun= { | |
5 | + init: function () { | |
6 | + $('#hourscount-projectName').selectpicker('render'); | |
7 | + fun.dateInit(); | |
8 | + }, | |
9 | + dateInit: function () { | |
10 | + //时间初始化 | |
11 | + $('#hourscount-daterange-btnsta').val(moment().subtract('days', 6).format('YYYY-MM-DD')); | |
12 | + $('#hourscount-daterange-btnend').val(moment().subtract('days', 0).format('YYYY-MM-DD')); | |
13 | + //开始日期 | |
14 | + $("#hourscount-daterange-btnsta").datetimepicker({ | |
15 | + endDate: moment().subtract('days', 0).format('YYYY-MM-DD'), | |
16 | + format: 'yyyy-mm-dd', | |
17 | + autoclose: true, | |
18 | + startView: 2, | |
19 | + //maxDate:moment().subtract('months', 3), | |
20 | + minView: 2, | |
21 | + forceParse: false, | |
22 | + clearBtn: true, //添加清除按钮,可选值:true/false | |
23 | + locale: "zh-CN", | |
24 | + language: 'zh-CN', | |
25 | + pickerPosition: "bottom-right" | |
26 | + }).on("change", function () { | |
27 | + $("#hourscount-daterange-btnend").val(''); | |
28 | + }); | |
29 | + //结束日期 | |
30 | + $("#hourscount-daterange-btnend").datetimepicker({ | |
31 | + endDate: moment().subtract('days', 0).format('YYYY-MM-DD'), | |
32 | + //startDate:startVal, | |
33 | + format: 'yyyy-mm-dd', | |
34 | + weekStart: 1, | |
35 | + autoclose: true, | |
36 | + clearBtn: true, //添加清除按钮,可选值:true/false | |
37 | + startView: 2, | |
38 | + minView: 2, | |
39 | + forceParse: false, | |
40 | + locale: "zh-CN", | |
41 | + language: 'zh-CN', | |
42 | + pickerPosition: "bottom-right" | |
43 | + }).on("click", function () { | |
44 | + $("#hourscount-daterange-btnend").datetimepicker("setStartDate", $("#hourscount-daterange-btnsta").val()) | |
45 | + }); | |
46 | + }, | |
47 | +} | |
48 | +fun.init(); | |
4 | 49 | \ No newline at end of file | ... | ... |