buli
2022-05-09 0953b3b5fcf19c627c6479a6b86648df653c40db
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
<apex:page Controller="AllAssetController" showHeader="false" sidebar="false" id="allPage" action="{!init}" >
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <script>
        function searchProductJs() {
            blockme(); 
            searchLoanerApp();
        }
        function notArrDetJs(setid,deatilNo){
            blockme();
            getLoanerSetdet(setid);
            var productCount = j$(escapeVfId('loanerSetNo')).value();
            for (var i = 0; i < productCount; i++) {
                j$(escapeVfId('allPage:allForm:dataBlock0:loanerSetTable:' + i +':loanerSetNamelinK')).css('color', 'black');
            }
            j$(escapeVfId('allPage:allForm:dataBlock0:loanerSetTable:' + deatilNo +':loanerSetNamelinK')).css('color', 'red');
        }
        
    </script>
    <apex:form id="allForm">
        <apex:outputPanel id="message">
            <apex:pageMessages />
        </apex:outputPanel>
        <apex:actionFunction name="getLoanerSetdet" action="{!getLoanerSetdet}" rerender="dataBlock, message" onComplete="unblockUI();">
            <apex:param name="firstParam" assignTo="{!setId}" value="" />
        </apex:actionFunction>
 
        <apex:actionFunction name="searchLoanerApp" action="{!searchLoanerApp}" rerender="dataBlock, message" onComplete="unblockUI();overwriteRedJs();">
         </apex:actionFunction>
        <!-- 搜索 -->
        <apex:pageBlock id="searchBlock">
            <table style="border-collapse: collapse;table-layout:fixed; width:1200px" >
                <colgroup>
                    <col width="8%"/>
                    <col width="25%"/>
                    <col width="9%"/>
                    <col width="25%"/>
                    <col width="8%"/>
                    <col width="25%"/>
                </colgroup>
                <tr>
                    <td align="right">机身号</td>
                    <td><apex:inputField value="{!rec.SerialNumber}" style="width:150px"/></td>
                    <td align="right">{!$ObjectType.Asset.fields.EC_Code__c.label}</td>
                    <td><apex:inputText value="{!assECcode}" style="width:150px"/></td>
                    <td align="right">{!$ObjectType.Asset.fields.OT_Code__c.label}</td>
                    <td><apex:inputText value="{!rec.OT_Code__c}" style="width:150px"/></td>
                </tr>
                <tr>
                    <td align="right">{!$ObjectType.Asset.fields.Equipment_Type__c.label}</td>
                    <td><apex:inputField value="{!rec.Equipment_Type__c}" style="width:150px"/></td>
                    <td align="right">{!$ObjectType.Asset.fields.loaner_place__c.label}</td>
                    <td><apex:inputField value="{!rec.loaner_place__c}" style="width:150px"/></td>
                    <td align="right">{!$ObjectType.Asset.fields.Status.label}</td>
                    <td><apex:inputField value="{!rec.Status}" style="width:150px"/></td>
                </tr>
                <tr>
                    <td align="right" >样机名称</td>
                    <td><apex:inputText value="{!assName}" style="width:150px"/></td>
                    <td align="right">{!$ObjectType.Asset.fields.Internal_Asset_number__c.label}</td>
                    <td><apex:inputText value="{!rec.Internal_Asset_number__c}" style="width:150px"/></td>
                    <td align="center"  ></td>
                    <td ><apex:commandButton value="搜索" style="width: 120px;" onclick="searchProductJs(); return false;" /></td>
                </tr>
            </table>
        </apex:pageBlock>
        <!-- 样机套装 -->
        <div style="position: relative;top:0;height:100%;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling: touch;">
            <input type="hidden" id="loanerSetNo" value="{!loanerSetNo}" />
            <apex:pageBlock id="dataBlock0" title="样机套装一览">
                <div style="position: relative;top:0;height:150px;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling: touch;">
                    <table class="list" border="0" cellpadding="0" cellspacing="0" id="example0">
                        <tr class="headerRow">
                            <th style="text-align: center;">{!$ObjectType.Loaner_Set__c.fields.Name.label}</th>
                            <th style="text-align: center;">{!$ObjectType.Loaner_Set__c.fields.SerialNumber__c.label}</th>
                            <th style="text-align: center;">{!$ObjectType.Loaner_Set__c.fields.Internal_Asset_number__c.label}</th>
                            <th style="text-align: center;">{!$ObjectType.Loaner_Set__c.fields.status__c.label}</th>
                            <th style="text-align: center;">{!$ObjectType.Loaner_Set__c.fields.Equipment_Type__c.label}</th>
                            <th style="text-align: center;">{!$ObjectType.Loaner_Set__c.fields.loaner_place__c.label}</th>
                            <th style="text-align: center;">{!$ObjectType.Loaner_Set__c.fields.Reservation_information__c.label}</th>
                        </tr>
                        <apex:repeat value="{!loanerSetRecords}" var="records" id="loanerSetTable">
                            <tr class="dataRow">
                                <td class="dataCell" align="center">
                                    <apex:outputLink onclick="notArrDetJs('{!records.lSet.Id}','{!records.deatilNo}'); return false;" id="loanerSetNamelinK" ><apex:outputField value="{!records.lSet.Name}" id="loanerSetName"/></apex:outputLink>
                                </td>                           
                                <td class="dataCell" align="center">{!records.lSet.SerialNumber__c}</td>
                                <td class="dataCell" align="center">{!records.lSet.Internal_Asset_number__c}</td>
                                <td class="dataCell" align="center">{!records.lSet.status__c}</td>                           
                                <td class="dataCell" align="center">{!records.lSet.Equipment_Type__c}</td>
                                <td class="dataCell" align="center">{!records.lSet.loaner_place__c}</td>
                                <td class="dataCell" align="center">{!records.lSet.Reservation_information__c}</td>
                            </tr>
                        </apex:repeat>
                    </table>
                </div>
            </apex:pageBlock>
        </div>
 
        <div style="position: relative;top:0;height:700px;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling: touch;">
                <apex:pageBlock id="dataBlock">
                <input type="hidden" id="pageRecordNo" value="{!pageRecordNo}" />
                    <table class="list" border="0" cellpadding="0" cellspacing="0" id="example">
                        <tr class="headerRow">
                            <th style="text-align: center;">样机名称</th> 
                            <th style="text-align: center;">样机类型</th> 
                            <!-- <th style="text-align: center;">{!$ObjectType.loaner_application_detail__c.fields.Internal_Asset_number__c.label}</th> -->
                            <th style="text-align: center;"><a href="#" onclick="sortTableJs('0');return false;" style="text-decoration: underline;">{!$ObjectType.loaner_application_detail__c.fields.SerialNumber__c.label}</a></th>
                            <!-- <th style="text-align: center;"><a href="#" onclick="sortTableJs('1');return false;" style="text-decoration: underline;">{!$ObjectType.loaner_application_detail__c.fields.OTCODE__c.label}</a></th> -->
                            <th style="text-align: center;"><a href="#" onclick="sortTableJs('2');return false;" style="text-decoration: underline;">{!$ObjectType.loaner_application_detail__c.fields.ECCode__c.label}</a></th>
                            <th style="text-align: center;"><a href="#" onclick="sortTableJs('3');return false;" style="text-decoration: underline;">{!$ObjectType.loaner_application_detail__c.fields.loaner_place__c.label}</a></th>
                            <th style="text-align: center;width: 50Px;"><a href="#" onclick="sortTableJs('4');return false;" style="text-decoration: underline;">{!$ObjectType.loaner_application_detail__c.fields.loaner_Status__c.label}</a></th>
                            <th style="text-align: center;">借用代理商</th>
                            <th style="text-align: center;">借出开始日</th>
                            <th style="text-align: center;">借出结束日</th>
                            <th style="text-align: center;">数量</th>
                            <th style="text-align: center;">描述</th>
                            <th style="text-align: center;">{!$ObjectType.loaner_application_detail__c.fields.Remark__c.label}</th>
                        </tr>
                        <apex:repeat value="{!equipmentSetRecords}" var="records" id="equipmentSetTable">
                        <tr class="dataRow">
                            <td class="dataCell" align="center">
                                 {!records.aset.Name}
                            </td>
                            <td class="dataCell" align="center">
                                 {!records.aset.AssetType__c}
                            </td>
                           <!--  <td class="dataCell" align="center">
                                 {!records.aset.Internal_Asset_number__c}
                            </td> -->
                            <td class="dataCell" align="center">
                                {!records.aset.SerialNumber}
                            </td>
                           <!--  <td class="dataCell" align="center">
                                {!records.aset.OT_Code__c}
                            </td> -->
                            <td class="dataCell" align="center">
                                {!records.aset.EC_Code__c}
                            </td>
                            <td class="dataCell" align="center">
                                {!records.aset.loaner_place__c}
                            </td>
                            <td class="dataCell" align="center">
                                <apex:variable var="v" value="" rendered="{!!records.showNo}" > {!records.aset.Status}</apex:variable>
                                <apex:variable var="v" value="" rendered="{!records.showNo}"> {!records.aset.Count_can_allocate_F__c} </apex:variable>
                            </td>
 
                            <td class="dataCell" align="center">
                                {!records.aset.Rental_Customer__r.Name}
                            </td>
                            <td class="dataCell" align="center">
                                {!records.aset.Rental_Start_Date__c}
                            </td>
                            <td class="dataCell" align="center">
                                {!records.aset.Rental_End_Date__c}
                            </td>
 
                            <td class="dataCell" align="center">
                            <apex:variable var="v" value="" rendered="{!!records.canInput}" ><apex:outputText id="ProductIdOut" value="{!records.deatilNo}"/> </apex:variable>
                            <apex:variable var="v" id="ProductCountIn" value="" rendered="{!records.canInput}" ><apex:inputText id="ProductCount" value="{!records.deatilNo}" onblur="ComputePriceJs(this)" style="width: 50Px;text-align: right;"/>
                            </apex:variable>
                            </td>
 
                            <td class="dataCell" align="center">
                                {!records.aset.Description}
                            </td>
 
                            <td class="dataCell" align="center">
                            <apex:inputText id="ProductCount" value="{!records.remark}" style="text-align: right;"/>
                            </td>
                           
                        </tr>
                        </apex:repeat>
                    </table>
                </apex:pageBlock>
                </div>
 
    </apex:form>
</apex:page>