<apex:page id="Page" controller="NewRepairPartsController" action="{!init}" sidebar="false" showHeader="false">
|
<!-- <apex:page standardController="RepairPart__c" id="Page" extensions="NewRepairPartsController" action="{!init}" sidebar="false" showHeader="false"> -->
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<style>
|
.pbSubheader {
|
background: #BFB19C!important;
|
/*background-color: #FFFFFF!important;*/
|
/*background: #BFB19C;*/
|
/*background-color: #44A3BB!important;
|
background-color: #E6E6FA!important;*/
|
/*background-color: #1797c0!important;*/
|
background-color: #DFE6F0!important;
|
/*color:#607799;*/
|
/*color:#FFFFFF!important;*/
|
/*background-color: #FFFFFF!important;*/
|
/*font-size:12pt;
|
font-family:verdana;*/
|
font-weight:bold;
|
}
|
</style>
|
<script>
|
//var isReturn = true;
|
function returnSWOPage(){
|
var pageClose = j$(escapeVfId("pageClose")).value();
|
if(pageClose == "true" ){
|
var repairPartId = j$(escapeVfId("repairPartId")).value();
|
var swoId = j$(escapeVfId("swoId")).value();
|
window.opener.repairReturnJS(repairPartId,swoId);
|
window.close();
|
}
|
}
|
|
function saveJS(){
|
blockme();
|
save();
|
}
|
|
function closePage(){
|
window.close();
|
}
|
|
function deleteJS(){
|
if(confirm('是否删除?')==true){
|
var Id = j$(escapeVfId("id")).value();
|
if(Id == null || Id == ""){
|
closePage();
|
return;
|
}
|
blockme();
|
deleteAction();
|
}
|
}
|
function toSearchProduct(){
|
var baseUrl = j$(escapeVfId("baseUrl")).value();
|
window.open(baseUrl + '/apex/NewSearchProductPage','_blank', 'width=500,height=300,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
|
}
|
function searchProduct(){
|
var baseUrl = '{!baseUrl}';
|
|
openPopup(baseUrl + '/apex/NewSearchProductPage', 'setsearch', 950, 450, 'width=500,height=300,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true);
|
}
|
function productReturnJS(id,code,eccode,description){
|
j$(escapeVfId("Product")).val(id);
|
j$(escapeVfId("Page:formInfo:RepairPartInfo:j_id42:j_id46:ITEM")).val(code);
|
j$(escapeVfId("PART_NUMBER")).val(eccode);
|
j$(escapeVfId("DESCRIPTION")).val(description);
|
}
|
|
function setProduct(){
|
blockme();
|
var productId = j$(escapeVfId("Page:formInfo:RepairPartInfo:j_id39:j_id43:Product")).val();
|
productReturn(productId);
|
}
|
|
</script>
|
|
<apex:form id="formInfo">
|
<apex:outputPanel id="message">
|
<apex:pagemessages />
|
</apex:outputPanel>
|
<apex:actionFunction name="save" action="{!save}" oncomplete="returnSWOPage();unblockUI();" reRender="formInfo,message"/>
|
<apex:actionFunction name="deleteAction" action="{!deleteAction}" oncomplete="returnSWOPage();unblockUI();" reRender="formInfo,message"/>
|
<apex:actionFunction name="productReturn" action="{!productReturn}" oncomplete="unblockUI();" reRender="formInfo">
|
<apex:param name="productId" value="{!productId}" />
|
</apex:actionFunction>
|
<input type="hidden" id="repairPartId" value="{!repairId}" />
|
<input type="hidden" id="pageClose" value="{!pageClose}" />
|
<input type="hidden" id="swoId" value="{!repairPart.SWO_ID__c}" />
|
<input type="hidden" id="id" value="{!repairPart.Id}" />
|
<input type="hidden" id="baseUrl" value="{!baseUrl}" />
|
<input type="hidden" id="Product" value="{!repairPart.Product__c}" />
|
<input type="hidden" id="PART_NUMBER" value="{!repairPart.PART_NUMBER__c}" />
|
<input type="hidden" id="DESCRIPTION" value="{!repairPart.DESCRIPTION__c}" />
|
<apex:pageBlock id="RepairPartInfo" title="RepairPart">
|
<apex:pageBlockButtons location="top">
|
<apex:commandButton onclick="saveJS()" value="Save" oncomplete="returnSWOPage();" reRender="formInfo,messageInfo" style="width: 10%">
|
|
</apex:commandButton>
|
|
<apex:commandButton onclick="closePage();" value="Cancel" style="width: 10%">
|
|
</apex:commandButton>
|
<!-- onclick="deleteJS();" -->
|
<apex:commandButton onclick="deleteJS();" oncomplete="returnSWOPage();" value="Delete" style="width: 10%">
|
<!-- <apex:commandButton action="{!deleteAction}" oncomplete="returnSWOPage();" reRender="formInfo" value="删除" > -->
|
|
</apex:commandButton>
|
</apex:pageBlockButtons>
|
<apex:pageBlockSection title="RepairPart" columns="2">
|
<apex:pageBlockSectionItem >
|
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.SWO_ID__c.label}" for="SWO_ID"/>
|
<apex:outputField value="{!repairPart.SWO_ID__c}" id="SWO_ID" />
|
</apex:pageBlockSectionItem>
|
|
<!-- <apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.Product__c.label}" for="ITEM"/>
|
<apex:inputField value="{!repairPart.Product__c}" id="ITEM" required="true"/>
|
</apex:pageBlockSectionItem> -->
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.Product__c.label}" for="Product"/>
|
<apex:inputField value="{!repairPart.Product__c}" id="Product" required="true" />
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.ITEM_ProductCode__c.label}" for="ITEM"/>
|
<apex:inputField value="{!repairPart.ITEM_ProductCode__c}" id="ITEM"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.PART_NUMBERNew__c.label}" for="PART_NUMBER"/>
|
<apex:inputField value="{!repairPart.PART_NUMBERNew__c}" id="PART_NUMBER"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.DescriptionNew__c.label}" for="Description"/>
|
<apex:inputField value="{!repairPart.DescriptionNew__c}" id="Description"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.QUANTITY__c.label}" for="QUANTITY"/>
|
<apex:inputField value="{!repairPart.QUANTITY__c}" id="QUANTITY" required="true"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.INST_SERIAL__c.label}" for="INST_SERIAL"/>
|
<apex:inputField value="{!repairPart.INST_SERIAL__c}" id="INST_SERIAL"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.DEFECT_PART_NUMBER__c.label}" for="DEFECT_PART_NUMBER"/>
|
<apex:inputField value="{!repairPart.DEFECT_PART_NUMBER__c}" id="DEFECT_PART_NUMBER"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.LOCATION__c.label}" for="LOCATION"/>
|
<apex:inputField value="{!repairPart.LOCATION__c}" id="LOCATION" required="true"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.DEFECT_SERIAL_NUMBER__c.label}" for="DEFECT_SERIAL_NUMBER"/>
|
<apex:inputField value="{!repairPart.DEFECT_SERIAL_NUMBER__c}" id="DEFECT_SERIAL_NUMBER"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.ECN__c.label}" for="ECN"/>
|
<apex:inputField value="{!repairPart.ECN__c}" id="ECN"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.ANI_DEFECT_CATEGORY__c.label}" for="ANI_DEFECT_CATEGORY"/>
|
<apex:inputField value="{!repairPart.ANI_DEFECT_CATEGORY__c}" id="ANI_DEFECT_CATEGORY"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.PICKED_BY__c.label}" for="PICKED_BY"/>
|
<apex:inputField value="{!repairPart.PICKED_BY__c}" id="PICKED_BY"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.HOURS__c.label}" for="HOURS"/>
|
<apex:inputField value="{!repairPart.HOURS__c}" id="HOURS"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.INVENTORY_AVAILABILITY__c.label}" for="INVENTORY_AVAILABILITY"/>
|
<apex:inputField value="{!repairPart.INVENTORY_AVAILABILITY__c}" id="INVENTORY_AVAILABILITY"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.BILL_AT_0_VALUE__c.label}" for="BILL_AT_0_VALUE"/>
|
<apex:inputField value="{!repairPart.BILL_AT_0_VALUE__c}" id="BILL_AT_0_VALUE"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.Webster_Loaner__c.label}" for="Webster_Loaner"/>
|
<apex:inputField value="{!repairPart.Webster_Loaner__c}" id="Webster_Loaner"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.QTY_PICKED__c.label}" for="QTY_PICKED"/>
|
<apex:inputField value="{!repairPart.QTY_PICKED__c}" id="QTY_PICKED"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.PICKED_DATE__c.label}" for="PICKED_DATE"/>
|
<apex:inputField value="{!repairPart.PICKED_DATE__c}" id="PICKED_DATE"/>
|
</apex:pageBlockSectionItem>
|
|
<apex:pageBlockSectionItem >
|
|
</apex:pageBlockSectionItem>
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel value="{!$ObjectType.RepairPart__c.fields.NOTES__c.label}" for="NOTES"/>
|
<apex:inputField value="{!repairPart.NOTES__c}" id="NOTES"/>
|
</apex:pageBlockSectionItem>
|
</apex:pageBlockSection>
|
</apex:pageBlock>
|
</apex:form>
|
|
<!-- 选择产品弹出层部分 -->
|
|
<!-- <div id="popBox">
|
<div class="close">
|
<a href="javascript:void(0)" onclick="closeBox()">关闭</a>
|
</div>
|
<div class="content">
|
<table width="100%">
|
<colgroup>
|
<col width="33%"></col>
|
<col width="33%"></col>
|
<col width="33%"></col>
|
</colgroup>
|
<tr>
|
<td>
|
<apex:selectList id="type" value="{!ConditionType}" size="1">
|
<apex:selectOption itemLabel="产品名称" itemValue="name"></apex:selectOption>
|
<apex:selectOption itemLabel="产品代码" itemValue="code"></apex:selectOption>
|
<apex:selectOption itemLabel="EC代码" itemValue="eccode"></apex:selectOption>
|
</apex:selectList>
|
</td>
|
<td>
|
<apex:inputText value="{!ByCondition}"></apex:inputText>
|
</td>
|
<td>
|
<apex:commandButton action="{!doSearch}" onclick="blockme();" reRender="data" oncomplete="unblockUI();" value="查询"></apex:commandButton>
|
</td>
|
</tr>
|
<tr>
|
<th>产品名称</th>
|
<th>产品代码</th>
|
<th>EC代码</th>
|
</tr>
|
</table>
|
<div style="width: 100%;height: 100%;overflow:auto;">
|
<table width="100%">
|
<colgroup>
|
<col width="33%"></col>
|
<col width="33%"></col>
|
<col width="33%"></col>
|
</colgroup>
|
<apex:repeat value="{!dataList}" var="line" id="result">
|
<tr>
|
<td><apex:outputLink value="javascript:void(0)" onclick="returnBefore('{!line.id}','{!line.code}','{!line.eccode}','{!line.description}')">{!line.name}</apex:outputLink></td>
|
<td><apex:outputLink value="javascript:void(0)" onclick="returnBefore('{!line.id}','{!line.code}','{!line.eccode}','{!line.description}')">{!line.code}</apex:outputLink></td>
|
<td><apex:outputLink value="javascript:void(0)" onclick="returnBefore('{!line.id}','{!line.code}','{!line.eccode}','{!line.description}')">{!line.eccode}</apex:outputLink></td>
|
</tr>
|
</apex:repeat>
|
</table>
|
</div>
|
</div>
|
</div>
|
<div id="popLayer">
|
</div> -->
|
</apex:page>
|