<apex:page Controller="ConsumEquipmentSetReturnController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
|
<head>
|
<meta name="format-detection" content="telephone=no"/>
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
</head>
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
|
|
<apex:stylesheet value="{!URLFOR($Resource.ConsumEquipmentSetReturnCss)}"/>
|
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning -->
|
<!-- 标准控件弹出页面修改 start -->
|
<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
|
<!-- 标准控件弹出页面修改 end -->
|
|
<style type="text/css">
|
div#out_Div_L {
|
position:relative;
|
overflow: hidden;
|
float:left;
|
width: 30px;
|
}
|
div#in_Div_L {
|
position:relative;
|
overflow: hidden;
|
float:left;
|
height: 100px;
|
width: 30px;
|
}
|
.apexp .bPageBlock .pbHeader .btn
|
{
|
padding: 6px;
|
font-size: 110%;
|
margin-right: 20px;
|
}
|
/* add by yc 202202-17 **/
|
.col_EquipmentManagementCode_OldData__c {display: none;}
|
.col_Scroll{display: none;}
|
|
table.list .col_Fixture_Model_No__c {width:100px;}
|
table.list .col_Consumable_Guaranteen_end_F__c {width:100px;}
|
table.list .col_SerialNumber_F__c {width:100px;}
|
table.list .col_Salesdepartment__c {width:100px;}
|
table.list .col_Yi_Fa_Huo_Jia__c {width:100px;}
|
table.list .col_Dao_Huo_OK_Jia__c {width:100px;}
|
table.list .col_Dao_Huo_NG_Jia__c {width:100px;}
|
table.list .col_Yi_Xiao_Hao_Jia__c {width:100px;}
|
table.list .col_Hui_Ji_Jia__c {width:100px;}
|
table.list .col_Dai_Xiao_Hao_Jia__c {width:100px;}
|
table.list .col_ManagementCode__c {width:100px;}
|
table.list .col_EquipmentManagementCode__c {width:100px;}
|
table.list .col_EquipmentManagementCode_OldData__c {width:100px;}
|
|
tr.headerRow {
|
height: 40px;
|
}
|
input.btn {
|
padding: 1px 15px !important;
|
}
|
td.pbButton {
|
text-align: center!important;
|
}
|
body select {
|
width: 177px;
|
margin: 10px 0px;
|
}
|
span.lookupInput {
|
width: inherit;
|
padding-right: 5px;
|
}
|
</style>
|
|
<apex:form id="allForm">
|
<apex:inputHidden value="{!done_flg}" id="done_flg"/>
|
<apex:outputPanel id="pageallPanel">
|
<apex:pageBlock id="searchBlock" tabStyle="Report">
|
<apex:pageBlockButtons location="top">
|
<apex:commandButton onclick="blockme();" action="{!save}" value="保存" rerender="checEventFrame,allForm" oncomplete="unblockUI();checEventFrame()"/>
|
<apex:commandButton onclick="blockme();" action="{!cancel}" value="取消" rerender="checEventFrame,allForm" oncomplete="unblockUI();checEventFrame()"/>
|
</apex:pageBlockButtons>
|
<table>
|
<tr>
|
<td width="20px"/>
|
<td width="35%" colspan="2">
|
<apex:outputLabel for="slipNo" value="回寄-运输单号:" />
|
<apex:inputField id="slipNo" value="{!slip.Name}"/>
|
<apex:commandButton style="padding: 6px;font-size: 110%;" action="{!searchSlip}" value="检索" rerender="allForm,checEventFrame" oncomplete="checEventFrame()"/>
|
</td>
|
<!-- <td width="10px"></td> -->
|
<td width="30%">
|
<apex:outputLabel for="deliveryType" value="回寄-运输单种类:" />
|
<apex:inputField required="false" id="deliveryType" value="{!slip.DeliveryType__c}"/>
|
</td>
|
<td width="10px"></td>
|
<td width="30%">
|
<apex:outputLabel for="distributorMethod" value="回寄-运输方式:" />
|
<apex:inputField required="false" id="distributorMethod" value="{!slip.Distributor_method__c}"/>
|
</td>
|
</tr>
|
<tr>
|
<td width="20px"/>
|
<td >
|
<apex:outputLabel for="deliveryCompany" value="回寄-物流公司:" />
|
<apex:inputField required="false" id="deliveryCompany" value="{!slip.DeliveryCompany__c}"/>
|
</td>
|
<td width="10px"></td>
|
<td >
|
<apex:outputLabel for="whStaff" value="回寄-担当者:" style="float: left;"/>
|
<apex:inputField required="false" id="whStaff" value="{!slip.Wh_Staff__c}" style="float: right;width: 185px;"/>
|
</td>
|
<td width="10px"></td>
|
<td></td>
|
</tr>
|
</table>
|
|
<div style="clear:both;"></div>
|
|
</apex:pageBlock>
|
<apex:pageMessages id="message"/>
|
<c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true"/>
|
</apex:outputPanel>
|
</apex:form>
|
<apex:outputPanel id="checEventFrame">
|
<script type="text/javascript" >
|
function checEventFrame() {
|
// 运输单种类不可修改
|
j$('select[name$="deliveryType"]').val('回寄');
|
j$('select[name$="deliveryType"]').prop('disabled', true)
|
|
// j$('select[name$="distributorMethod"]').children('option[value="空运"]').remove();
|
j$('select[name$="deliveryCompany"]').children('option[value="莱比特"],option[value="嘉里大通"]').remove();
|
}
|
checEventFrame();
|
|
// 【待消耗件数】随【回寄件数】变化
|
j$("td.dataCellBorder1.col_Hui_Ji_Jia__c input").change(function(){
|
var names = this.name.split(':');
|
var i = names[names.length - 4];
|
j$("input.rowchkcls")[i].checked = true;
|
refreshLine(i);
|
});
|
checkMessage();
|
|
function refreshLine(i){
|
var Dao_Huo_OK_Jia__c =parseInt( j$(j$("td.dataCellBorder1.col_Dao_Huo_OK_Jia__c span")[i]).text());
|
var Dao_Huo_NG_Jia__c = parseInt(j$(j$("td.dataCellBorder1.col_Dao_Huo_NG_Jia__c span")[i]).text());
|
var Yi_Xiao_Hao_Jia__c = parseInt(j$(j$("td.dataCellBorder1.col_Yi_Xiao_Hao_Jia__c span")[i]).text());
|
var Hui_Ji_Jia__c = parseInt(j$(j$("td.dataCellBorder1.col_Hui_Ji_Jia__c input")[i]).val());
|
if(isNaN(Hui_Ji_Jia__c)){
|
Hui_Ji_Jia__c = 0;
|
}
|
var total = Dao_Huo_OK_Jia__c + Dao_Huo_NG_Jia__c - Yi_Xiao_Hao_Jia__c;
|
var Dai_Xiao_Hao_Jia__c = total - Hui_Ji_Jia__c;
|
if(Hui_Ji_Jia__c > total){
|
alert("回寄件数不可超过 "+(total).toString());
|
j$(j$("td.dataCellBorder1.col_Hui_Ji_Jia__c input")[i]).val(null);
|
}
|
else{
|
j$(j$("td.dataCellBorder1.col_Dai_Xiao_Hao_Jia__c span")[i]).text(Dai_Xiao_Hao_Jia__c);
|
}
|
return;
|
}
|
|
function checkMessage() {
|
if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
|
alert("保存成功");
|
j$(escapeVfId('allPage:allForm:done_flg')).val('false');
|
// 清除url里的save_flag (This can now be done in Chrome, Safari, Firefox 4+, and Internet Explorer 10pp4+!)
|
if (window.history.pushState)
|
window.history.pushState({},"", window.location.href.replace('&save=1',''));
|
}
|
}
|
var inputBoxs = j$("td.dataCellBorder1.col_Hui_Ji_Jia__c input");
|
for(var i = 0;i<inputBoxs.length;i++){
|
refreshLine(i);
|
}
|
//标准控件弹出页面修改 start
|
//查询参数列表
|
let SelectFieldParamList=[
|
//
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId : 'allPage:allForm:searchBlock:whStaff',
|
//查找字段所在对象
|
ObjectType : 'FixtureDeliverySlip__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'Wh_Staff__c',
|
//查找字段的查找对象
|
SelectObj : 'User',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
|
}
|
]
|
//初始化
|
resetOpenPage(SelectFieldParamList);
|
|
|
function unblockUI(){
|
j$("#sbArea").fadeOut(500, function(){
|
j$("#sbArea").remove();
|
});
|
resetOpenPage(SelectFieldParamList);
|
}
|
//标准控件弹出页面修改 end
|
|
</script>
|
</apex:outputPanel>
|
|
</apex:page>
|