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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>选择关联配置</title>
<!--(start) public flies-->
 
</head>
 
[#include "/business/pages/include/static.html" /]
[#include "/component/newsel.html"/]
[#include "/component/cfgcateSelector.html" /]
 
<body class="search_list_body">
<form id="myform" action="${base}/business/pages/bpbj/deliveryApply/editSpareSubmit.html" method="post">
         <input type="hidden" name="orderId" id="orderId"  value="${orderId}" />
         <input type="hidden" name="cate_id" id="cate_id"  value="${cate_id}" />
         <input type="hidden" name="id_test" id="id_test"  value="${id_test}" />
         <input type="hidden" name="spart_ids" id="spart_ids"  value="${spart_ids}" />
         <input type="hidden" name="spare_part_ids" id="spare_part_ids"  value="" />
         <div class="search_list">
            <div class="sl_search clearfix">
                <table>
                    <tr>
                     [#if cate_id??&&cate_id != null ]
                    [#else]
                       <td>
                            <label>备件分类:</label>
                            [@cfgcate id="full_cate_id" name="full_cate_name"  catetype="2"/]
                        </td>
                       [/#if]
                        <td>
                            <label>备件名称:</label><input class="general" type="text" id="name" name="name"/>
                        </td>
                        <td>
                           <label>实物编码:</label><input class="general" type="text" id="entity_no" name="entity_no"/>
                       </td>
                       <td>
                         <a class="retrievebtn" href="javascript:window.location.reload(true);">重置</a><a class="retrievebtn focus" href="javascript:query();">查询</a>
                     </td>
                    </tr>
                   </table>
            </div>
            <table class="display_form" id="main">
            </table>
            
            [#if RequestParameters.type=='bpbj']
            [/#if]
        </div>
</form>
<script type="text/javascript">
 var type = '${type}';
    function query() {
    var cate_id=$("#cate_id").val();
    var spart_ids=$("#spart_ids").val();
    if(cate_id!=null && cate_id!=""){
        cate_id= $("#cate_id").val();
    }else{
        var cate_ids =$("#full_cate_id").val();
        var arr = cate_ids.split("-");
        cate_id=arr[2]; 
    }
        
        var name = $.trim($("#name").val());
        var entity_no = $.trim($("#entity_no").val());
        $.post("${base}/business/pages/bpbj/deliveryApply/sparePartsList.html",{"cate_id":cate_id,"name":name,"entity_no":entity_no,"spart_ids":spart_ids},function(data,textStatus) {
            $("#main").html(data);
        })
        
    }
 
    
    function onDialogBtnClick(btnID, dialogID, config){
            var checkedBox = $("#main :checkbox:checked");
            if(checkedBox.length==0) {
                popupTips("请选择备件");
                return;
            }
            if(btnID == "btnSure"){
                var devices = new Array();
                checkedBox.each(function() {
                    var $str = $(this).parents("tr.linkTr");
                    var map = new $.HashMap();
                    devices.push($(this).val());
                });
                 var pri = devices.join(",");
                 $("#spare_part_ids").val(pri);
                 $("#myform").submit();
        
        }
        
    }
    
    $(function() {
        query();
    })
    
     //备件详细信息
function sparePartDetail(orderId){
       var url = "${base}/business/pages/bpbj/stockApply/sparePartDetail.html?id="+orderId;
       window.top.openDialog("3","详情",
         {},
         {"width":60,"height":70},
         [],
         url);
}
</script>
</body>
</html>