高章伟
2022-03-18 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d
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
<apex:page action="{!init}" controller="ChoiceAssetController" id="allPage" showHeader="false" sidebar="false" title="选择保有设备">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"></apex:stylesheet>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"></apex:includeScript>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"></apex:includeScript>
    <apex:includeScript value="/soap/ajax/29.0/connection.js"></apex:includeScript>
    <apex:includeScript value="/soap/ajax/29.0/apex.js"></apex:includeScript>
    <style type="text/css"></style>
    <script>
        function searchProductJs() {
            searchAsset();
        }
 
        function saveJs(){
            save();
        }
 
        function ClearJs(){
            blockme();
            document.getElementById("allPage:allForm:allBlock:searchBlock:FuselageNumber").value = "";
            document.getElementById("allPage:allForm:allBlock:searchBlock:AssetModel").value = "";
            document.getElementById("allPage:allForm:allBlock:searchBlock:HospitalName").value = "";
            searchAsset();
            
            // searchConsumableorderdetails();
        }
    </script>
    <apex:form id="allForm">
    <apex:actionFunction name="searchAsset" action="{!searchAsset}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();SumCompute()">
    </apex:actionFunction>
    <apex:actionFunction name="save" action="{!save}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();SumCompute()">
    </apex:actionFunction>
 
    <apex:outputPanel id="allPanel">
        <apex:pageBlock id="allBlock">
            <apex:pageBlock id="searchBlock" >
                    <table>
                        <colgroup>
                            
                            <col width="9%"/>
                            <col width="9%"/>
                            <col width="9%"/>
                            <col width="9%"/>
                            <col width="8%"/>
                            <col width="8%"/>
                            <col width="8%"/>
                            <col width="8%"/>
                            <col width="8%"/>
                            <col width="8%"/>
                            <col width="8%"/>
                            <col width="8%"/>
                            
                        </colgroup>
 
                        <tr>
                            
                            <td colspan="2"/>
                            <td colspan="4">机身编码:
                                   <apex:inputText value="{!FuselageNumber}" id="FuselageNumber"/>
                            </td>                           
                             
                            <td align="right"></td>
                            <td><apex:commandButton value="保有设备搜索"  onclick="searchProductJs('0');return false;" /></td>
                            <td><input type="button" value="清空"  onclick="ClearJs();return false;" class="btn"/><apex:commandButton onclick="saveJs();" value="确定" rerender="dummy"  /></td>
                           <!--  <td>
                            <apex:commandButton onclick="saveJs();" value="确定" rerender="dummy"  />
                            </td> -->
                            
                        </tr>
                        <!-- <td>
                            </td>
                            <td align="right"></td>
                            <td><apex:commandButton value="保有设备搜索" style="width: 80px;" onclick="searchProductJs('0');return false;" /></td>
                            <td><input type="button" value="清空" style="width: 80px;" onclick="ClearJs();return false;" class="btn"/></td>
                            <td>
                            <apex:commandButton onclick="saveJs();"           value="确定" style="width:80px" rerender="dummy"  />
                            </td> -->
                        <tr>
                            <td colspan="2"/>
                            <td colspan="4">设备型号:
                                <apex:inputText value="{!AssetModel}" id="AssetModel"/>
                            </td>
                            
                        </tr>
                        <tr>
                            <td colspan="2"/>
                            <td colspan="4">医院名称:
                                <apex:inputText value="{!HospitalName}" id="HospitalName"/>
                            </td>
                            
                        </tr>
                    </table>
                </apex:pageBlock>
                <apex:outputPanel id="message">
                    <apex:pageMessages />
                 </apex:outputPanel>
                <apex:pageBlock title="保有设备查找" id="ConsumableorderdetailsSection">
                    <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>
                            <!-- <th>信息来源</th> -->
                            <th>集中管理库存</th>
                            <th>医院</th>
                            <th>战略科室</th>
                            <th>科室</th>
                        </tr>
                            <apex:repeat value="{!choiceAssetInfoRecordsview}" var="records" id="ConsumableorderdetailsTable">
                                <tr class="dataRow">
                                    <td>
                                    <apex:inputCheckbox value="{!records.check}" onclick="CheckSize(this);" id="consumablesCountproRowCheckbox" disabled="{!!records.canSelect}"/>
                                    </td>
 
                                    <!-- <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.Status}"/>
                                    </td>
                                    
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.SerialNumber}"/>
                                    </td>
                                    <!-- <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Product2.Asset_Model_No__c}"/>
                                    </td> -->
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Information_From__c}"/>
                                    </td>
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Ji_Zhong_Guan_Li_Ku_Cun__c}"/>
                                    </td>
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Hospital__r.Name}"/>
                                    </td>   
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Department_Class__r.Name}"/>
                                    </td>   
                                    <td class="dataCell">
                                        <apex:outputText value="{!records.ast.Account.Name}"/>
                                    </td>
                                </tr>
                            </apex:repeat>
                    </table>
                </apex:pageBlock>
        </apex:pageBlock>
    </apex:outputPanel>
</apex:form>
</apex:page>