liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<apex:page standardController="AssetModifyBelongsChange__c"  extensions="AssetModifyBelongsController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="最终用户变更申请" lightningStylesheets="true">
<!-- <apex:slds/> -->
<apex:includeLightning />
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<!-- <apex:includeScript value="{!$Resource.SLDSDynamicLookupScript}"/> -->
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
<style>
 
 
    #combobox-input-7-0-7{
        display: none;
    }
    .slds-scope .slds-has-error .slds-form-element__help {
        display: none;
    }
 
    #auraErrorMessage{
        display: none;
    }
 
</style>
<script>
 
    // //标准控件修改 start
    // let InputFieldCmpParam1={
    //     //输入框id,存储查询结果
    //     inputFieldId : 'allPage:allForm:allBlock:searchBlock:OEC',
    //     //存储值id,inputHidden,用于controller接收返回值
    //     inputHiddenId : 'allPage:allForm:AccountField__c',
    //     //lightning组件id
    //     lightningPageId : 'allPage:allForm:allBlock:searchBlock:lightningPage1',
    //     //查询对象api
    //     ObjectApiName : 'AssetModifyBelongsChange__c',
    //     //查询字段api
    //     FieldApiName : 'AccountField__c',
    //     //查询对象id
    //     recordId : '{!ambc.Id}',
    // }
 
    // $Lightning.use("c:LexSelectFieldApp", function() {
    //     $Lightning.createComponent(
    //         "c:LexSelectFieldCmp",
    //         {
    //             "objApiName": InputFieldCmpParam1.ObjectApiName,
    //             "fieldApiName": InputFieldCmpParam1.FieldApiName,
    //             "recordId" : InputFieldCmpParam1.recordId,
    //         },
    //         InputFieldCmpParam1.lightningPageId,
    //         function(cmp) {
    //         }
    //     );
    // });
 
 
 
 
    // function setValue(node,setid){
    //     return new Promise(function(resolve, reject) {
    //         node.attributes.getNamedItem('data-value').value=setid;
    //         resolve();
    //     });
    // }
    // function refreshLwcValue(InputFieldCmpParam){
    //     let lwcItem=document.getElementById(InputFieldCmpParam.lightningPageId);
    //     const inputFields = lwcItem.querySelectorAll('input');
    //     console.log(inputFields);
    //     if (inputFields) {
    //         try{
    //             let objName=inputFields[0].value;
    //             let objId=inputFields[1].value;
    //             j$(escapeVfId(InputFieldCmpParam.inputFieldId)).val(objName);
    //             j$(escapeVfId(InputFieldCmpParam.inputFieldId + '_lkold')).val(objName);
    //             j$(escapeVfId(InputFieldCmpParam.inputFieldId + '_lkid')).val(objId);
    //             j$(escapeVfId(InputFieldCmpParam.inputHiddenId)).val(objId);
    //         }catch(e){
    //             console.log(e);
    //         } 
    //     } 
    // }
    // //标准控件修改 end
function ClearJs(){
    blockme();
    document.getElementById("allPage:allForm:allBlock:searchBlock:text1").value = "";
    document.getElementById("allPage:allForm:allBlock:searchBlock:val1").value = "";
    searchConsumableorderdetails();
}
var selectedSize = 0;
var pageLimit = {!pageLimit};
function checkAll() {
    selectedSize = 0;
    var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCount')).value();
    if (j$(escapeVfId('checker')).attr('checked') == 'checked') {
        for (var i = 0; i < productCount; i++) {
            if(selectedSize >= pageLimit){
                window.alert("页面所选数据不能超过500条");
                return;
            }
            j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableinfo' + ':consumablesCountproRowCheckbox')).attr('checked',true);
            selectedSize ++;
        }
    } else {
        for (var i = 0; i < productCount; i++) {
            j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableinfo' + ':consumablesCountproRowCheckbox')).attr('checked',false);
        }
    }
}
 
function CheckSize(j){
    var a = j.id;
    var productCount = j$(escapeVfId(a)).attr('checked');
    if (productCount == 'checked') {
        if(selectedSize >= pageLimit){
            window.alert("页面所选数据不能超过500条");
            j$(escapeVfId(a)).attr('checked',false);
            return;
        }
        selectedSize ++;
    } else {
        selectedSize --;
    }
}
 
function searchdisableJS(){
    //解除不可写状态
    blockme();
    setEditAble();
}
 
 
function EditConsumable(){
    //解除不可写状态
    blockme();
    setEditAble();
}
 
function backOrderJs(){
    //解除不可写状态
    blockme();
    backOrder();
    // UnabletoEdit();
}
function DeleteConsumable(){
    //删除这一单
    if(window.confirm('删除是不可恢复的,你确认要删除吗?')){
        DelConsumable();
    }
}
 
 
function saveJs() {
    blockme();
    // beforeSaveJs();
    save();
}
 
// function beforeSaveJs() {
//     var OffersPrice = j$(escapeVfId('allPage:allForm:allBlock:unEditable:sumPrice_buttom2')).value();
//     j$(escapeVfId('allPage:allForm:allBlock:unEditable:theHiddenInput')).val(OffersPrice.replace(/,/g,""));
// }
 
 
function SorderJs() {
    blockme();
    Sorder();
}
function uploadingAttachmentJs(){
    uploadingAttachment();
}
function searchProductJs() {
    blockme();
    var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCount')).value();
    var isChanged = false;
    for (var i = 0; i < productCount; i++) {
        var nowChk = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':sumablesCountproRowCheckbox')).attr('checked');
        var oldChk = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':proRowOldCheckbox')).attr('checked');
        var consumablesCount= j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':consumablesCount')).value();
        var oldConsumableCount= j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':oldConsumableCount')).value();
        if (nowChk != oldChk || (nowChk == 'checked' && consumablesCount != oldConsumableCount)) {
            isChanged = true;
            break;
        }
    }
 
        searchConsumableorderdetails();
}
</script>
<style>
    .dateFormat  {
        display: none;
    }
    td.columuslowercolour {
        background-color:red;
        text-align: right;
    }
        td.columuscuperolour {
        background-color: yellow;
        text-align: right;
    }
</style>
    <apex:form id="allForm">
        <apex:inputHidden value="{!ambc.AccountField__c}" id="AccountField__c" />
        <apex:actionFunction name="save" action="{!save}" rerender="editAble,ConsumableorderdetailsSection, message,editAble" onComplete="unblockUI();CheckStatusAfter();">
        </apex:actionFunction>
        <apex:actionFunction name="Sorder" action="{!Sorder}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();init();">
        </apex:actionFunction>
        <apex:actionFunction name="searchConsumableorderdetails" action="{!searchConsumableorderdetails}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();SumCompute()">
        </apex:actionFunction>
        <apex:actionFunction name="setEditAble" action="{!setEditAble}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction>
         <apex:actionFunction name="DelConsumable" action="{!DelConsumable}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction>
        <apex:actionFunction name="uploadingAttachmentJs" action="{!uploadingAttachmentLightning}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction>
        <apex:actionFunction name="returnChangePage" action="{!returnChangePage}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction>
 
        <apex:actionFunction name="backOrder" action="{!backOrder}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();searchConsumableorderdetails()">
        </apex:actionFunction>
        <!-- <apex:actionFunction name="UnabletoEdit" action="{!UnabletoEdit}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI()">
        </apex:actionFunction> -->
        <apex:outputPanel id="allPanel">
            <apex:pageBlock id="allBlock" >
                <apex:pageBlock id="EDCline_1" >
 
                    <apex:commandButton style="display:none"/>
                    <apex:commandButton onclick="EditConsumable();"   value="编辑" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(editAble)}"  disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准'||ambc.Change_status__c='驳回',true,false)}"/>
                    <apex:commandButton onclick="SorderJs();"         value="提交订单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(editAble )}" disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准',true,false)}"/>
                    <apex:commandButton onclick="saveJs();"           value="保存变更申请单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!IF((editAble) && ambc.Change_status__c !='驳回',true,false)}" />
                    <apex:commandButton onclick="saveJs();"           value="保存变更申请单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!IF(ambc.Change_status__c='驳回' && editAble,true,false)}" />
                    <apex:commandButton onclick="DeleteConsumable();" value="删除" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(editAble)}" disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准'||ambc.Change_status__c='驳回',true,false)}"/>
                   <apex:commandButton onclick="backOrderJs();"   value="再申请" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!IF(ambc.Change_status__c='驳回' && !editAble,true,false)}" />
                </apex:pageBlock>
                
                 <apex:pageBlock title="变更申请单信息" id="unEditable" rendered="{!!(editAble)}">
                    <table>
                        <colgroup>
                            <col width="160px"/>
                            <col width="300px"/>
                            <col width="30px"/>
                            <col width="300px"/>
                            <col width="300px"/>
                            <col width="300px"/>
                            <col width="300px"/>
                        </colgroup>
 
                        <tr style='line-height: 25px;'>
                            <td align="right" >申请单编码:</td>
                            <td align="left" ><apex:outputField id="OrderCode_out"  value="{!ambc.Name}" style="width:300px"/></td>
                            <td/>
                            <td align="right" >状 态:</td>
                            <td align="left" ><apex:outputField id="OrderStatus_out" value="{!ambc.Change_status__c}" style="width:100px"/></td>
                            <td/>
                        </tr>
                        <tr  style='line-height: 25px;'>
                            <td align="right" >原客户:</td>
                            <td align="left" ><apex:outputField value="{!ambc.rawAccount__r.Name}"/></td>
                            <td/>
                            <td align="right" >目标客户:</td>
                            <td align="left" ><apex:outputField value="{!ambc.AccountField__r.Name}"/></td>
                            <td/>
                        </tr> 
                        
                        <tr  style='line-height: 25px;'>
                            <apex:outputPanel rendered="{!checkUser}">
                                <!-- WYL  2024/1/25 DB202401065815 start -->
                                <td align="right" >合同申请编码:</td>
                                 <!-- WYL  2024/1/25 DB202401065815 end -->
                                <td align="left" ><apex:outputField value="{!ambc.SPOLink__c}"/></td>
                            </apex:outputPanel>
                            <td/>
                            <!-- CHAN-B9B68N Start -->
                            <td align="right">变更原因:</td>
                            <td align="left">
                             <apex:outputField value="{!ambc.ChangeReason__c}"/>
                            </td>
                            <!-- CHAN-B9B68N Stop -->
                        </tr>
                        <!-- WYL  2024/1/25 DB202401065815 start -->
                        <tr  style='line-height: 25px;'>
                            <apex:outputPanel rendered="{!checkUser}">
                                <td align="right" >ServiceRequest单号:</td>
                                <td align="left" ><apex:outputField value="{!ambc.ServiceRequestTrackingNumber__c}"/></td>
                            </apex:outputPanel>
                            <td/>
                            <td align="right">变更设备总数:</td>
                            <td align="left">
                             <apex:outputField value="{!ambc.DetailCnt__c}"/>
                            </td>
                        </tr>
                        <!-- WYL  2024/1/25 DB202401065815 end-->
                        <tr  style='line-height: 25px;'>
                            <td align="right">详情描述/备注:</td> <!-- zzm 20240308 DB202401391766 -->
                             <td align="left"><apex:outputField value="{!ambc.remark__c}" style="width:200px"/></td>
                            <!-- LZHU-BPJ8DF 20200513  Start -->
                            <td/>
                            <!-- WYL  2024/1/25 DB202401065815 挪到上方 start -->
                            <!-- <td align="right">变更设备总数:</td>
                            <td align="left">
                             <apex:outputField value="{!ambc.DetailCnt__c}"/>
                            </td> -->
                             <!-- WYL  2024/1/25 DB202401065815 end -->
                            <!--  LZHU-BPJ8DF 20200513 End -->
                        </tr>
                        <!-- WLIG-BS7B4T ---20200806---update By rentongxiao---Start -->
                        <tr  style='line-height: 25px;'>
                            <td align="right">共享:</td>
                             <td align="left"><apex:outputField value="{!ambc.share__c}" style="width:50px"/></td>
                            <td/>
                        </tr>
                         <!-- WLIG-BS7B4T ---20200806---update By rentongxiao---End -->
                    </table>
                </apex:pageBlock>
                <apex:pageBlock id="searchBlock" rendered="{!editAble}">
                    <table>
                        <colgroup>
                            <col width="0px"/>
                            <col width="0px"/>
                            <col width="60px"/>
                            <col width="85px"/>
                            <col width="60px"/>
                            <col width="60px"/>
                            <col width="180px"/>
                            <col width="60px"/>
                            <col width="60px"/>
                            <col width="180px"/>
                            <col width="60px"/>
                            <col width="60px"/>
                            
                        </colgroup>
                        <tr>
                            <td align="right"></td>
                            <td></td>
                            <td/>
                            <td align="right">&nbsp;&nbsp;&nbsp;选择条件:</td>
                            <td>
                             <apex:selectList value="{!text1}" id="text1" size="1" style="width:90px"><apex:selectOptions value="{!textOpts}"/>
                            </apex:selectList>
                            </td>                           
                            <td>
                            <apex:inputText value="{!val1}"
                            id="val1" style="width:200px"/>
                            </td>
                            <td align="left"><div id="seachdiv">合同编码精确查询<apex:inputCheckbox value="{!checkexact}" id="RowCheckbox"/></div></td>
                            <td><apex:commandButton value="保有设备搜索" style="width: 120px;" onclick="searchProductJs('0');return false;" /></td>
                            <td><input type="button" value="清空" style="width: 100px;" onclick="ClearJs();return false;" class="btn"/></td>
                            <td/>
                        </tr>
                        <tr>
                            <td colspan="14"></td>
                        </tr>
                        <tr>
                            <td colspan="3"/>
                            <td colspan="4" style="width:100px;">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;原客户:<apex:outputField value="{!ambc.rawAccount__c}"/></td>
                            <td colspan="4">目标客户:<apex:inputField id="OEC" value="{!ambc.AccountField__c}" style="height:25px;width:200px"/></td>
<!--                         <td colspan="4" style="display:flex;flex-direction:column;">
                            <div>目标客户:</div>
                            <div style="width:200px;height:100%;" id="lightningPage"></div></td> -->
<!--                            <td colspan="4" style="height:50px;width:300px;display: flex;flex-direction:column;justify-content:center;">
                                <apex:inputField id="OEC" value="{!ambc.AccountField__c}" style="display: none;"/>
                                <div style="display: flex;flex-direction:row;justify-content:flex-start;" onmousemove="" onmouseleave="refreshLwcValue(InputFieldCmpParam1)">
                                    <div style="height:50px;display: flex;flex-direction:column;justify-content:center;">目标客户:</div>
                                    <apex:outputPanel id="lightningPage1" style="height:50px;width: 230px;padding-top: 8px;" onmouseout="refreshLwcValue(InputFieldCmpParam1)"></apex:outputPanel>
                                </div>
                            </td> -->
<!--                             <td colspan="4">目标客户:<apex:inputField onclick="openPage()" id="OEC" value="{!ambc.AccountField__c}"  style="height:25px;width:200px"/><div style="width:100%;height:100%;" id="lightningPage"></div></td>
 -->
<!--                             <td colspan="4" style="height:50px;display: flex;flex-direction:column;justify-content:center;">
                                <div style="display: flex;flex-direction:row;justify-content:flex-start;">
                                    <div style="height:50px;display: flex;flex-direction:column;justify-content:center;">目标客户:</div>
                                    <div style="height:50px;display: flex;flex-direction:column;justify-content:center;padding-bottom: 10px">
                                        <apex:inputField id="OEC" value="{!ambc.AccountField__c}" style="display: none;"/>
                                        <c:SLDSDynamicLookup  SLDSResourceName="{!$Resource.SLDS}" ObjectApiName="Account" DisplayFieldApiNames="Name" DisplayFieldsPattern="Name"  LabelName="Name" SetValueToField="{!ambc.AccountField__c}" setStyleCss="width:300px;"/>
                                    </div>
                                </div>
                            </td> -->
                        </tr>
                       
                        <tr  >
                            <apex:outputPanel rendered="{!checkUser}">
                                <td colspan="3"/>
                                <!-- WYL 2024/1/25 DB202401065815 start -->
                                <td colspan="4">&nbsp;&nbsp;&nbsp;合同申请编码:<apex:inputText value="{!ambc.SPOLink__c}" style="width:200px"/></td>
                                 <!-- WYL 2024/1/25 DB202401065815 end -->
                            </apex:outputPanel>
                            <!-- CHAN-B9B68N Start -->
                            <td  colspan="4">变更原因:<!-- <apex:selectList value="{!ambc.ChangeReason__c}" id="changeReason01" size="1" style="width:204px"><apex:selectOptions value="{!changeReasonOpts}"/> --><apex:inputField value="{!ambc.ChangeReason__c}"></apex:inputField>
                            <!-- </apex:selectList> -->
                            </td>
                            <!-- CHAN-B9B68N Stop -->
                           
                        </tr>
                        <tr  >
                            <apex:outputPanel rendered="{!checkUser}">
                                <td colspan="3"/>
                                <!-- WYL 2024/1/25 DB202401065815 start -->
                                <td colspan="4">&nbsp;&nbsp;&nbsp;ServiceRequest单号:<apex:inputText value="{!ambc.ServiceRequestTrackingNumber__c}" style="width:200px"/></td>
                                <td colspan="4" style="height:50px;">变更设备总数:<apex:outputField value="{!ambc.DetailCnt__c}"/></td> 
                                <!-- WYL 2024/1/25 DB202401065815 end -->
                            </apex:outputPanel>
                        </tr>
                         <tr>
                            <td colspan="3"/>
                            <!-- zzm 20240308 DB202401391766 -->
                                <td colspan="4" style="height:50px;">详情描述/备注:<apex:inputText value="{!ambc.remark__c}" style="width:200px"/></td>
                             <!-- LZHU-BPJ8DF 20200513  Start -->
                             <!-- WYL 2024/1/25 DB202401065815 挪至上方 start -->
                                <!-- <td colspan="4" style="height:50px;">变更设备总数:<apex:outputField value="{!ambc.DetailCnt__c}"/></td> -->
                                 <!-- WYL 2024/1/25 DB202401065815 挪至上方 end -->
                            <!--  LZHU-BPJ8DF 20200513 End -->
                            </tr>
                        <!-- WLIG-BS7B4T ---20200806---update By rentongxiao---Start -->
                         <tr>
                            <!-- 共享字段的回显 -->
                             <td colspan="3"/>
                                <td colspan="4">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;共享:<apex:inputCheckbox value="{!ambc.share__c}" style="height:20px;width:20px"/>
                                </td>
                                <td colspan="4"></td>
                        </tr>
                        <!-- WLIG-BS7B4T ---20200806---update By rentongxiao---End -->
                    </table>
                </apex:pageBlock>
                <apex:outputPanel id="message">
                    <apex:pageMessages />
                 </apex:outputPanel>
                <apex:pageBlock title="保有设备所属变更明细" id="ConsumableorderdetailsSection">
                <input type="hidden" id="allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCount" value="{!ConsumableorderdetailsviewCount}" />
                <input type="hidden" id="allPage:allForm:allBlock:ConsumableorderdetailsSection:Id" value="{!Id}" />
                    <table class="list" border="0" cellpadding="0" cellspacing="0">
                        <tr class="headerRow">
                            <apex:variable var="v" value="" rendered="{!editAble}">
                                <th><input type='checkbox' onClick='checkAll()' id='checker'/>选择</th>
                            </apex:variable>
                            <th>保有设备名称</th>
                            <th>订单编码</th>
                            <th>机身编码</th>
                            <th>装机地点</th>
                            <th>科室</th>
                        </tr>
                            <apex:repeat value="{!assetModifyBelongsChangeDetailRecordsview}" var="records" id="ConsumableorderdetailsTable">
                                <tr class="dataRow">
                                    <apex:variable var="v" value="" rendered="{!editAble}" id="variableinfo">
                                        <td>
                                        <apex:inputCheckbox value="{!records.check}" onclick="CheckSize(this);" id="consumablesCountproRowCheckbox" disabled="{!!records.canSelect}"/>
                                         <apex:inputCheckbox value="{!records.oldCheck}" id="proRowOldCheckbox" style="display:none"/></td>
                                     </apex:variable>
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Name}"/>
                                    </td>
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Order_No__c}"/>
                                    </td>
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.SerialNumber}"/>
                                    </td>
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Installation_Site__c}"/>
                                    </td>
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Account.Name}"/>
                                    </td>
                                </tr>
                            </apex:repeat>
                    </table>
 
                </apex:pageBlock>
                
                <!-- CHAN-BC6BV2 XHL AddStart 20190522 -->
                <apex:pageBlock title="文件" id="accessory" rendered="{!isShow}">
                
                    <apex:pageBlockButtons location="top">
                        <apex:commandButton value="文件上传"  onclick="uploadingAttachmentJs();" disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准',true,false)}"/>
                    </apex:pageBlockButtons>
                    
                    <apex:pageBlockTable value="{!contents}" var="attachment" >
                        
                        
                        <apex:column headerValue="标题" style="width: 33%">
                            <apex:outputField value="{!attachment.Title}"/>
                        </apex:column>
                        <apex:column headerValue="上次修改时间" style="width: 33%">
                            <apex:outputField value="{!attachment.ContentModifiedDate}"/>
                        </apex:column>
                        <apex:column headerValue="创建人" style="width: 33%">
                            <apex:outputField value="{!attachment.OwnerId}"/>
                        </apex:column>
 
                    </apex:pageBlockTable>
                </apex:pageBlock>
                <!-- CHAN-BC6BV2 XHL AddEnd 20190522 -->
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
<script>
        let SelectFieldParamList=[
            // 
            {
                //原apex:inputField的id值,需要在页面上获取
                inputFieldId : 'allPage:allForm:allBlock:searchBlock:OEC',
                //查找字段所在对象
                ObjectType : 'AssetModifyBelongsChange__c',
                //查找字段的api名称
                QueryFieldApiName : 'AccountField__c',
                //查找字段的查找对象
                SelectObj : 'Account',
                //搜索时使用的字段
                SelectFld : 'Name',
            },
        ]
        //初始化
        resetOpenPage(SelectFieldParamList);
</script>
</apex:page>