dhz
2022-06-22 4d198cd78684d17c849b0bd7d323894009ca17f5
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
 
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>维保方案配置</title>
[#include "/business/pages/include/static.html" /]
[#include "/component/newsel.html" /]
</head>
<body >
<div class=" clearfix">
    <div class="nopadding" id="fsmCenter">
        <div class="deal_switch">
            <div class="dls_btn" id="dlsBtn">
                <a class="basicinfo focus"><span><em>基本信息</em></span></a>
                <a class="basicinfo"><span><em>出库备件</em></span></a>
                <a class="basicinfo"><span><em>处理记录</em></span></a>
            </div>
        </div>
        <form id="myform" action="editItem.html" method="post">
        <input type="hidden" name="orderId" id="orderId" value="${RequestParameters.orderId}"/>
        <div>
            <div class="deal_switch_con iframecon" style="display:block;">
                <div>
                        <table class="edit_layout2">
                        <tr>
                            <th><label>申请人:</label></th>
                            <td><span class="infotxt">${baseMsg.CREATE_NAME}</span></td>
                            <th><label>申请时间:</label></th>
                            <td><span class="infotxt">${DateUtil.format("yyyy-MM-dd",baseMsg.GMT_CREATE)}</span></td>
                        </tr>
                        <tr>
                            <th><label>出库单号:</label></th>
                            <td><span class="infotxt">${baseMsg.ORDER_CODE}</span></td>
                            
                           
                        </tr>
                         <tr>
                            <th><label>工单名称:</label></th>
                            <td><span class="infotxt">${baseMsg.ORDER_NAME}</span></td>
                         </tr>
                         <tr>
                            <th><label>出库类型:</label></th>
                            <td><span class="infotxt">${baseMsg.DELIVERY_TYPE_NAME}</span></td> 
                            <th><label>关联工单:</label></th>
                            <td><span class="infotxt">${baseMsg.order_code_c}</span></td> 
                           
                        </tr>
                       
                        <tr>
                            <th><label>出库原因:</label></th>
                            <td><span class="infotxt">${baseMsg.DELIVERY_REASON}</span></td>
                        </tr>
                        
                    </table>
                     [#if RequestParameters.type == 1]
                     
                        <div class="edit_title"><h3>审核信息</h3></div>
                        <table class="edit_layout2" style="width:auto;">
                         <tr>
                             <th><label class="required">审核结果:</label></th>
                         <td >
                          <input class="audit" type="radio" name="isNext" value="1" checked />通过
                          <input class="audit" type="radio" name="isNext" value="2" />不通过
                         </td>
                          <td id="sh_div" style="display:none;" >
                                [@sel id="note_key"  labelName="note_val" source=noteKeyList textField="id" valueField="name"  /]
                          </td>
                         </tr>
                          <tr>
                            <th ><label>备注:</label></th>
                            <td>
                            <textarea rows="5" cols="100" name="note" id="note" class="general"></textarea>
                            </td>
                            <td></td>
                        </tr>
                     </table>
                         [#else]
                       [/#if] 
                </div>
                   
               </div>
            <div class="deal_switch_con iframecon" style="display:none;">
                   <div>               
                   <div class="fs_main clearfix">    
                        <div id="main"></div>   
                        <div class="paging clearfix" id="pagination"></div>
                   </div>
                </div>
               </div>
            <div class="deal_switch_con iframecon" style="display:none;">
                   <div>
                   <div class="fs_main clearfix">    
                        <div id="mainlc"></div>   
                        <div class="paging clearfix" id="pagination"></div>
                   </div>
                </div>
               </div>
        </div>
   </form>
    </div>
</div>
 
 
<script type="text/javascript">
var nowPage = 1;
var orderId = '${orderId}';
var flowId = '${flowId}';
var apply_order_id='${apply_order_id}'
$(function(){
    $("#dlsBtn>a").click(function() {
        var index = $("#dlsBtn>a").index(this);
        $("#dlsBtn>a").removeClass("focus");
        $(this).addClass("focus");
        
        var $dom = $("div.deal_switch_con:eq("+index+")");
        $("div.deal_switch_con").hide();
        $dom.show();
            if(index==1){
           loading($("#main"));
          var params = {"orderId":orderId,"type":"xq"};
             $.post("${base}/business/pages/bpbj/spareParts/entityListTreeData.html",params,function(data,page) {
             loaded($("#main"));
             $("#main").html(data);
           });
       
        } 
        if(index==2){
          loading($("#mainlc"));
          var params = {"flowId":flowId};
            $.post("${base}/business/pages/bpbj/spareParts/lcRecord.html",params,function(data,page) {
            loaded($("#mainlc"));
            $("#mainlc").html(data);
           });
        }
    })
    
    $('input[name="isNext"]').change(function(){
            $("#sh_div").toggle();
    });
})
 
function onDialogBtnClick(btnID, dialogID, config){
    if(btnID == "btnSure"){
      var resolve = $(":radio[name=isNext]:checked").val();
     if(resolve=="2"){
        var note_key = $("#note_key").val();
        if ($.util.isEmpty(note_key)) {
            popupTips("请先选择不通过原因!");
            return;
        }
     
      }
    
      if(resolve=="1"){
          initSparePart();
      }else{
          $("#myform").submit();
      }
    }
}
 
 
function initSparePart(){
  var orderId=$("#orderId").val()
 
    $.post("${base}/business/pages/bpbj/deliveryAuditing/initSparePart.html", {"orderId":orderId},function(data){
          if(data == "0"){
               $("#myform").submit();
          }else{
           popupTips("存在备件名称为("+data+")的备件状态不正常!不能审批通过!");
          
          }
    },"json");
 
}
 //备件详细信息
function sparePartDetail(orderId){
 
       var url = "${base}/business/pages/bpbj/stockApply/sparePartDetail.html?id="+orderId;
       window.top.openDialog("1","详情",
         {},
         {"width":60,"height":70},
         [],
         url);
}
     
</script>
</body>
</html>