<apex:page controller="FixtureSetManageController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
|
<head>
|
<title>备品配套明细管理</title>
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<!-- FixtureSetManageページ用css -->
|
<apex:stylesheet value="{!URLFOR($Resource.FixtureSetManageCss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
|
|
<script type="text/javascript">
|
var heightAjustment = 120;
|
var widthAjustment = 30;
|
|
</script>
|
</head>
|
<apex:form id="allForm">
|
|
<apex:actionFunction name="saveAndSearch" action="{!save}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!saveType}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="saveAndSort" action="{!save}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!saveType}" value="" />
|
<apex:param name="secondParam" assignTo="{!sortKey}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="searchOpp" action="{!searchOpp}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
|
</apex:actionFunction>
|
|
<apex:outputPanel id="pageallPanel">
|
<apex:pageBlock id="searchBlock" tabStyle="Report">
|
<apex:variable value="{!$ObjectType.Fixture_Set_Detail__c.updateable && $ObjectType.Fixture_Set_Detail__c.createable}" var="savedisabled" />
|
<apex:pageBlockButtons location="bottom">
|
<apex:commandButton style="float:left;" disabled="{!Not(savedisabled)}" action="{!save}" value="保存" onclick="blockme();" rerender="allForm,checEventFrame,message" oncomplete="unblockUI();" />
|
<apex:commandButton style="float:right;" action="{!cancel}" value="取消" rerender="message"/>
|
</apex:pageBlockButtons>
|
<div style="clear:both;"></div>
|
|
<apex:inputHidden value="{!multiStatus}" id="multiStatus"/>
|
<table>
|
<tr>
|
<td colspan="2">{!$ObjectType.Fixture_Set__c.fields.Name.label}</td>
|
|
<td colspan="2">
|
<apex:outputPanel layout="none">
|
<apex:outputfield value="{!parentObj.Name}" />
|
</apex:outputPanel>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="2">{!$ObjectType.Product2.fields.Asset_Model_No__c.label}</td>
|
<td colspan="3"><apex:inputText value="{!assetModelNo}" style="width:100px"/></td>
|
</tr>
|
<tr>
|
<td width="50px">{!$ObjectType.Product2.fields.Family.label}</td>
|
<td>
|
<apex:selectList id="Family" style="width:100px" value="{!family}" size="1"><apex:selectOptions value="{!familyOpts}"/></apex:selectList>
|
</td>
|
<td width="20px"/>
|
<td width="50px">{!$ObjectType.Product2.fields.Category2__c.label}</td>
|
<td><apex:inputText value="{!category2}" style="width:100px"/></td>
|
<td width="20px"/>
|
<td width="50px">{!$ObjectType.Product2.fields.Category3__c.label}</td>
|
<td><apex:inputText value="{!category3}" style="width:100px"/></td>
|
<td width="20px"/>
|
<td width="50px">{!$ObjectType.Product2.fields.Category4__c.label}</td>
|
<td><apex:inputText value="{!category4}" style="width:100px"/></td>
|
<td width="20px"/>
|
<td width="50px">{!$ObjectType.Product2.fields.Category5__c.label}</td>
|
<td><apex:inputText value="{!category5}" style="width:100px"/></td>
|
</tr>
|
<tr>
|
<td><apex:commandButton value="搜索" onclick=" searchOppJs(); return false;"/></td>
|
</tr>
|
</table>
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
</apex:pageBlock>
|
<c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" noSort="true"/>
|
</apex:outputPanel>
|
</apex:form>
|
|
<apex:outputPanel id="checEventFrame">
|
<script type="text/javascript">
|
// 数量添加加减符号
|
j$(".dataCellBorder1.col_Quantity__c").each(function () {
|
j$(this).append('<input type="button" style="width: auto;" class="inc btn" value="+" /><input type="button" style="width: auto;" class="dec btn" value="-" />');
|
});
|
j$(".dataCellBorder1.col_Quantity__c input[type=button]").on("click", function() {
|
var $button = j$(this);
|
var oldValue = $button.parent().find("input[type=text]").val();
|
if ($button.val() == "+") {
|
var newVal = parseFloat(oldValue) + 1;
|
} else {
|
// Don't allow decrementing below zero
|
if (oldValue > 0) {
|
var newVal = parseFloat(oldValue) - 1;
|
} else {
|
newVal = 0;
|
}
|
}
|
$button.parent().find("input[type=text]").val(newVal);
|
});
|
j$(".dataCellBorder1.col_SortInt_F__c").each(function () {
|
j$(this).append('<input type="button" style="width: auto;" class="inc btn" value="↑" onclick="lineMoveUpDown(this)" /><input type="button" style="width: auto;" class="dec btn" value="↓" onclick="lineMoveUpDown(this)" />');
|
});
|
|
function lineMoveUpDown(pObj) {
|
var eleList = j$(".dataCellBorder1.col_SortInt_F__c input[type=button]");
|
var $button = j$(pObj);
|
var line = parseInt(eleList.index(j$(pObj)) / 2) + 1; // ↑ と ↓ 2つbtnあります
|
if ($button.val() == "↑") {
|
return resetOrderNoMoveUpDown(true, line);
|
} else {
|
return resetOrderNoMoveUpDown(false, line);
|
}
|
}
|
|
function setPageElementAfterLoadedCmp(){
|
// 备品配套设定页面用
|
j$('.col_Is_Body__c').children('input[type=checkbox]').each(function() {
|
if (j$(this).prop('checked')){
|
j$(this).parent().parent().children('.col_Is_OneToOne__c').children('input[type=checkbox]').prop('disabled', true).prop('checked', false);
|
//20210727 you 新品收货_集中备品_建立新品入库标准配套
|
// j$(this).parent().parent().children('.col_Fixture_Set_New__c').children('input[type=checkbox]').prop('disabled', true).prop('checked', false);
|
// j$(this).parent().parent().children('.col_Fixture_Set_New_Quantity__c').children('input[type=text]').prop('disabled', true);
|
} else {
|
j$(this).parent().parent().children('.col_Is_OneToOne__c').children('input[type=checkbox]').prop('disabled', false);
|
//20210727 you 新品收货_集中备品_建立新品入库标准配套
|
// j$(this).parent().parent().children('.col_Fixture_Set_New__c').children('input[type=checkbox]').prop('disabled', false);
|
// j$(this).parent().parent().children('.col_Fixture_Set_New_Quantity__c').children('input[type=text]').prop('disabled', false);
|
}
|
});
|
|
// 主体の場合は、一対一 自動でFalseにする。
|
j$('.col_Is_Body__c').children('input[type=checkbox]').click(function(){
|
if (j$(this).prop('checked')){
|
console.log();
|
if(j$('.col_Is_Body__c').children('input[type=checkbox]:checked').length >=2){
|
window.confirm('一个配套内、主体备品最多只能勾选一个。');
|
j$(this).prop('checked',false);
|
return;
|
}
|
j$(this).parent().parent().children('.col_Is_OneToOne__c').children('input[type=checkbox]').prop('disabled', true).prop('checked', false);
|
//20210727 you 新品收货_集中备品_建立新品入库标准配套
|
// j$(this).parent().parent().children('.col_Fixture_Set_New__c').children('input[type=checkbox]').prop('disabled', true).prop('checked', false);
|
// j$(this).parent().parent().children('.col_Fixture_Set_New_Quantity__c').children('input[type=text]').prop('disabled', true).prop('value', '');
|
} else {
|
j$(this).parent().parent().children('.col_Is_OneToOne__c').children('input[type=checkbox]').prop('disabled', false);
|
//20210727 you 新品收货_集中备品_建立新品入库标准配套
|
// j$(this).parent().parent().children('.col_Fixture_Set_New__c').children('input[type=checkbox]').prop('disabled', false);
|
// j$(this).parent().parent().children('.col_Fixture_Set_New_Quantity__c').children('input[type=text]').prop('disabled', false);
|
|
}
|
});
|
}
|
|
j$(function() {
|
setPageElementAfterLoadedCmp();
|
});
|
</script>
|
</apex:outputPanel>
|
</apex:page>
|