cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <title>过保查询</title>
[#include "/business/pages/include/static.html" /]
[#include "/component/DatePicker.html" /]
[#include "/component/cfgcateSelector.html" /]
</head>
 
<body class="fullscreen">
[#include "/business/pages/include/header.html" /]
[#assign label = GnConstants.BPBJGBCX]
[#include "/business/pages/include/gps.html" /]
 
<div class="fs_main clearfix">
    <div class="event_fill list_common_select">
        <form id="myform">
            <table>
                <tr>
                    <th width="85%">
                        <div class="fill_item">
                            <label>备件分类:</label>
                             [@cfgcate id="full_cate_id" name="full_cate_name" catetype="2"/]
                           </div>
                        <div class="fill_item"><label>实物编码:</label><input class="general" type="text" id="entity_no"/></div>
                        <div class="fill_item"><label>备件名称:</label><input class="general" type="text" id="name"/></div>
                        <div class="fill_item"><label>资产编码:</label><input class="general" type="text" id="asset_no"/></div>
                        <div class="fill_item"><label>过保状态:</label><input type="radio" name="overFlag" value="2">&nbsp;已过保&nbsp;&nbsp;<input type="radio" name="overFlag" value="1" checked>&nbsp;未过保&nbsp;&nbsp; </div>
 
                        <div id="conditionDiv" class="fill_item"><label>过保条件:</label>
                            <select class="mysel" id="overState">
                                <option value="">请选择</option>
                                <option value="oneMonth">一月内过保</option>
                                <option value="twoMonth">两月内过保</option>
                                <option value="threeMonth">三月内过保</option>
                                <option value="free">自定义</option>
                            </select>
                        </div>
 
                        <div id="overEndDiv" class="fill_item" style="display: none;"><label>过保期限:</label>[@datepicker id="overEndDate" value=""/]</div>
 
                    </th>
                    <td width="15%">
                        <a class="retrievebtn" id="reset">重置</a><a class="retrievebtn focus" href="javascript:query();">查询</a>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
 
<div class="fs_main clearfix">
    <div id="mainData"></div>
    <div class="paging clearfix" id="pagination"></div>
</div>
 
 
 
[#include "/business/pages/include/footer.html" /]
<script type="text/javascript">
    var nowPage = 1;
    function query() {
        var cate_ids =$("#full_cate_id").val();
        var arr = cate_ids.split("-");
        var cate_id=arr[2];
        var entity_no = $.trim($("#entity_no").val());
        var name = $.trim($("#name").val());
        var asset_no = $.trim($("#asset_no").val());
        var overFlag = $("input[name=overFlag]:checked").val();
        var overEndDate = $.trim($("#overEndDate").val());
        var overState = $.trim($("#overState").val());
        var params = {"entity_no":entity_no,"cate_id":cate_id,"name":name,"asset_no":asset_no,"overFlag":overFlag,"overEndDate":overEndDate,"overState":overState};
        pagination("${base}/business/pages/supplier/sparePartOverProtectListData.html", "${base}/business/pages/supplier/sparePartOverProtectListCount.html", "mainData", "pagination", {cpage: nowPage, psize: 10}, params, function (data, page) {
            nowPage = page;
        });
    }
 
 
    $(function () {
 
        $("input[name=overFlag]").change(function () {
            if($(this).val()=='2'){//已过保
                $("#conditionDiv").hide();
                $("#overEndDiv").hide();
                $("#overState").val("");
                $("#overEndDate").val("");
                $("#_overEndDate").val("");
            }else{//未过保
                $("#conditionDiv").show();
            }
        });
 
        query();
        $("#reset").click(function () {
         $("#full_cate_id").val("");
            $("#myform")[0].reset();
        });
 
        //自定义过保查询
        $("#overState").change(function () {
            $("#overEndDate").val("");
            $("#_overEndDate").val("");
            if($("#overState").val()=="free"){
                $("#overEndDiv").show();
            }else{
                $("#overEndDiv").hide();
            }
        })
 
    })
 
    function detail(id) {
        var url = "${base}/business/pages/bpbj/stockApply/sparePartDetail.html?id="+id;
        window.top.openDialog("0", "详情",
                {},
                {"width": 60, "height": 80},
                [], url);
    }
 
 
</script>
 
</body>
</html>