cy
2022-06-22 6e06bba1c89f8077e29d0fbf0ce12f89f027d8d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<script src="${common_static}/static/script/select/chosen.jquery.js"></script>
<script src="${common_static}/static/script/select/chosen.jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="${common_static}/static/script/select/chosen.css"/>
 
 
<div class="fs_main clearfix">
<div class="event_fill sa_event_fill">
 <form id="myform">
        <table style="width: 95%">
            <tr>
                <th width="85%">
                  <div class="fill_item">
                    <label>项目名称:</label>
                       [@sel id="customer_id" name="customer_id" value="${RequestParameters.customerId}" source=customers textField="ID" valueField="CUSTOMER_NAME" labelName="customer_name" /]
                    </div>
                    <div class="fill_item">
                        <label>申领单号:</label> 
                        <input type="text" id="order_code"  name="order_code"  class="name"/>               
                    </div>
                    <div class="fill_item">
                        <label>工单名称:</label> 
                        <input type="text" id="order_name"  name="order_name"  class="name"/>               
                    </div>
                     
                    <div id="selectDay">
                        <div class="fill_item">
                            <label>开始时间:</label> [@datepicker id="start_time" value="${start_time}" class="general" length=8 /]
                        </div>
                        <div class="fill_item">
                            <label>结束时间:</label> [@datepicker id="end_time" class="general" length=8 value="${end_time}" /]
                        </div>
                    </div>
                    <!-- <div class="fill_item">
                         <label>状态:</label>
                            [@select id="state" source=Constants.SPARE_PART_APPLY_STATE_MAP /]
                    </div> -->
                    
                     [#if type == "bjsl"]
                    <div class="fill_item">
                         <label>备件申领状态:</label>
                            [@select id="state" source=Constants.SPARE_PART_APPLY_STATE_MAP /]
                    </div>
                        [#elseif  type == "bjsh"]
                        <div class="fill_item">
                          <label>备件申领状态:</label>
                             <select id="state" class="mysel">
                            <option value="">请选择</option>
                            <option value="2">待审核</option>
                            <option value="3">待出库</option>
                            <option value="4">待确认</option>
                            <option value="5">申领成功</option>
                            <option value="6">申领失败</option>
                          </select>
                        </div>
                       [#else]
                      [/#if]
                        
                        
                </th>
                <td width="15%">
                    <!-- <a class="retrievebtn" href="javascript:window.location.reload(true);">重置</a> -->
                    <a class="retrievebtn" id="reset">重置</a>
                    <a class="retrievebtn focus" href="javascript:checkSel();">查询</a>
                </td>
            </tr>
        </table>
        </form>
    </div>
</div>
<script>
$("#customer_id").chosen({
            no_results_text: "没有找到结果!",//搜索无结果时显示的提示
            search_contains:true,   //关键字模糊搜索,设置为false,则只从开头开始匹配
            allow_single_deselect:true, //是否允许取消选择
            max_selected_options:1  //当select为多选时,最多选择个数
        });
$(function(){
    showNoData('report');
});
 
//无数据显示
function showNoData(containerId) {
    var strHrml = '<div id="noDailyReport" style="position:relative;width:100%;height:400px">';
    strHrml = strHrml + '<span class="nodata"></span>';
    strHrml = strHrml + '</div>';
    $('#'+containerId).html(strHrml);
}
 
function checkSel(){
    var start_time = $("#start_time").val();
    var end_time = $("#end_time").val();
    if(start_time>end_time) {
        window.top.popupTips("开始时间不能晚于结束时间");
        return ;
    }
    query();
}
 
function getDays(day1,day2){
    var newDay1 = new Date(day1.substring(0,4),day1.substring(4,6)-1,day1.substring(6,8));
    var newDay2 = new Date(day2.substring(0,4),day2.substring(4,6)-1,day2.substring(6,8));
    return parseInt(Math.abs(newDay2-newDay1)/1000/60/60/24);
}
 
 
 
 
</script>