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
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!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>
                 [#if detail.BUS_TYPE==Constants.OVERAGE_LOSS_BUS_TYPE_BS]
                <a class="basicinfo"><span><em>报损备件</em></span></a>
                [#else]
                 <a class="basicinfo"><span><em>报溢备件</em></span></a>
                [/#if]
                <a class="basicinfo"><span><em>处理记录</em></span></a>
               
            </div>
        </div>
 
        <div>
            <div class="deal_switch_con iframecon" style="display:block;">
                <div>
                    <form id="myform" action="" method="post">
                        <input type="hidden" id="flowId" name="flowId" value="${detail.flow_id}"/>
                        <input type="hidden" id="orderId" name="orderId" value="${detail.id}"/>
                         <input type="hidden" id="BUS_TYPE" name="BUS_TYPE" value="${detail.BUS_TYPE}"/>
                        <table class="edit_layout2">
                            <tr>
                                <th style="width:120px;"><label>申请人:</label></th>
                                <td>${detail.create_name}</td>
                            </tr>
                             <tr>
                                <th style="width:120px;"><label>申请时间:</label></th>
                                <td>${DateUtil.format("yyyy-MM-dd HH:mm",detail.gmt_create)}</td>
                            </tr>
                            <tr>
                                <th style="width:120px;"><label>工单名称:</label></th>
                                <td>${detail.order_name}</td>
                               
                            </tr>
                           <tr>
                                <th style="width:120px;"><label>工单编号:</label></th>
                                <td>${detail.order_code}</td>
                            </tr>
                            <tr>
                                <th class="postop"><label>业务类型:</label></th>
                                <td colspan="3"><span class="infotxt">${Constants.getOVERAGE_LOSS_BUS_TYPE(detail.BUS_TYPE)}</span></td>
                            </tr>
                            <tr>
                                [#if detail.BUS_TYPE==Constants.OVERAGE_LOSS_BUS_TYPE_BS]
                                 <th class="postop"><label>报损备件数:</label></th>
                                [#else]
                                  <th class="postop"><label>报溢备件数:</label></th>
                                [/#if]
                                
                                <td colspan="3"><span class="infotxt">${detail.num}</span></td>
                            </tr>
                            <tr>
                                <th class="postop"><label>备注:</label></th>
                                <td colspan="3"><span class="infotxt">${detail.note}</span></td>
                            </tr>
                        </table>
 
                        [#if RequestParameters.flowIdentify=='approve']
                        <div>
                            <div class="edit_title"><h3>审核信息</h3></div>
                            <table class="edit_layout2">
                                <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;" width=70%>
                                            [@sel id="note_key"  labelName="note_val" source=noteKeyList textField="id" valueField="name"  /]
                                      </td>
                                </tr>
                                <tr>
                                    <th ><label>审核意见:</label></th>
                                    <td colspan="4">
                                        <textarea rows="5" cols="100" name="note" id="note" class="general"></textarea>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        [/#if]
                    </form>
                </div>
            </div>
            <div class="deal_switch_con iframecon" style="display:none;">
                <div>
                    <div class="fs_main clearfix">
                    [#if detail.list?? && detail.list?size>0]
                        <table class="display_form common_list_table">
                            <tr class="title">
                                <td width="5%">序号</td>
                                <td width="20%">备件分类</td>
                                <td width="15%">实物编码</td>
                                <td width="15%">备件名称</td>
                                <td width="10%">资产编码</td>
                                <td width="10%">型号</td>
                                <td width="10%">货位</td>
                                 [#if detail.BUS_TYPE==Constants.OVERAGE_LOSS_BUS_TYPE_BS]
                                <td width="10%">报损原因</td>
                                [#else]
                                  <td width="10%">报溢原因</td>
                                [/#if]
                             
                                <td width="5%">操作</td>
                            </tr>
                            [#list detail.list as item]
 
                                <tr>
                                    <td>${item_index+1}</td>
                                    <td>${item.lv1_name}-${item.lv2_name}-${item.lv3_name}</td>
                                    <td>${item.ENTITY_NO}</td>
                                    <td>${item.NAME}</td>
                                    <td>${item.ASSET_NO}</td>
                                    <td>${item.MODEL_NO}</td>
                                    <td>${item.LOCATION}</td>
                                    <td>${item.REASON}</td>  
                                    <td class="list_btnmore_wrap">
                                        <a class="blue_txt" href="javascript:sparePartDetail('${item.id}');"><span>详情</span></a>
                                    </td>
                                </tr>
 
                            [/#list]
                        </table>
                    [/#if]
                    </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>
 
    </div>
</div>
 
 
<script type="text/javascript">
 
    var flowId = '${detail.flow_id}';
    $(function () {
        $("#myform").attr("action", "${base}/business/pages/bpbj/overageLossAuditing/doApprove.html");
 
        $("#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 == 2) {
                var params = {"flowId": flowId};
                $.post("${base}/business/pages/bpbj/spareParts/lcRecord.html", params, function (data, page) {
                    $("#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;
            }
            $("#myform").submit();
          }else{
            var BUS_TYPE = $("#BUS_TYPE").val();
               if(BUS_TYPE==2){
                $("#myform").submit();
               }else{
                initSparePart();
                }
          }
        }
    }
    
    function initSparePart(){
     var orderId=$("#orderId").val()
     $.post("${base}/business/pages/bpbj/deliveryAuditing/initSparePart.html", {"orderId":orderId,"type":"bsjy"},function(data){
          if(data == "0"){
               $("#myform").submit();
          }else{
           popupTips("存在备件名称为("+data+")的备件状态不正常!不能审批通过!");
          
          }
    },"json");
 
}
    
     //备件详细信息
function sparePartDetail(bjId){
    var orderId=$("#orderId").val();
       var url = "${base}/business/pages/bpbj/stockApply/sparePartDetail.html?id="+bjId+"&orderId="+orderId+"&type=bpbj";
       window.top.openDialog("1","详情",
         {},
         {"width":50,"height":80},
         [],
         url);
}
</script>
</body>
</html>