<apex:page controller="CheckAllOlympusAssetController" title="检索保有设备" showHeader="true" sidebar="false" id="allPage" action="{!init}" tabStyle="CheckAllOlympusAsset__tab" docType="html-5.0">
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<style>
|
.dateFormat {
|
display: none;
|
}
|
.requiredBlock {
|
display: none;
|
}
|
.message {
|
margin: 0px;
|
/*width: 1125px;*/
|
}
|
table {
|
table-layout: fixed;
|
border-collapse: collapse;
|
}
|
a {
|
text-decoration: none;
|
}
|
/*TODO width margin-left 这里调节宽度*/
|
div#out_Div_L {
|
position: relative;
|
overflow: hidden;
|
width: 1300px;
|
}
|
div#out_Div_R {
|
position: relative;
|
overflow: hidden;
|
width: 1200px;
|
margin-left: 686px;
|
}
|
|
div#in_Div_L {
|
position: relative;
|
width: 745px;
|
height: 451px;
|
}
|
div#in_Div_R {
|
position: relative;
|
overflow: auto;
|
height: 451px;
|
margin-left: 686px;
|
margin-top: -451px;
|
}
|
div#in_Div_L td.dataCellBorder1 {
|
border-width: 1px;
|
}
|
div#in_Div_R td.dataCellBorder1 {
|
border-width: 1px;
|
}
|
/* 默认 */
|
table.list td {width:100px;}
|
table.list td select {width:95%;}
|
table.list td input {width:95%;}
|
table.list td textarea {
|
height:50px;
|
width:90%;
|
}
|
table.list .col_Internal_asset_location__c {width:130px;}
|
table.list .col_Salesdepartment__c {width:110px;}
|
table.list .col_SalesProvince__c {width:70px;}
|
table.list .col_Asset_loaner_category__c {width:80px;}
|
table.list .col_Fixture_Model_No_F__c {width:80px;}
|
table.list .col_CompanyOfEquipment__c {width:60px;}
|
table.list .col_Asset_name__c {width:60px;}
|
table.list .col_Internal_Asset_number__c {width:80px;}
|
table.list .col_Internal_Asset_number_key__c {width:80px;}
|
|
table.list .col_SerialNumber {width:60px;} /*机身编号*/
|
table.list .col_Product_Serial_No__c {width:60px;} /*产品 + 机体编码*/
|
table.list .col_Product_category__c {width:60px;}
|
table.list .col_Equipment_Type__c {width:120px;}
|
table.list .col_Consumable_Guaranteen_end__c {width:70px;}
|
table.list .col_Manage_type__c {width:80px;} /*管理种类*/
|
table.list .col_Loaner_accsessary__c {width:50px;}
|
table.list .col_EquipmentSet_Managment_Code__c {width:50px;}
|
table.list .col_AssetManageConfirm__c {width:50px;}
|
table.list .col_Fixture_QRCode__c {width:50px;}
|
table.list .col_WH_location__c {width:30px;}
|
table.list .col_Quantity {width:30px;}
|
table.list .col_You_Xiao_Ku_Cun__c {width:30px;}
|
table.list .col_Ji_Zhong_Guan_Li_Ku_Cun__c {width:30px;}
|
table.list .col_Out_of_wh__c {width:30px;}
|
table.list .col_Rental_Count__c {width:30px;}
|
table.list .col_Frozen_Quantity__c {width:30px;}
|
table.list .col_Abandoned_RealThing__c {width:30px;}
|
table.list .col_Abandoned_Inventory__c {width:40px;}
|
table.list .col_Repairing_Count__c {width:30px;}
|
table.list .col_Fixture_Status__c {width:30px;}
|
table.list .col_Main_OneToOne__c {width:40px;}
|
|
.navigationBarBlock {
|
width: 100%;
|
}
|
.apexp .bPageBlock.apexDefaultPageBlock .pbBody {
|
margin: 0px;
|
}
|
.checkButtonStyle input {
|
width: 100%;
|
text-align: left;
|
}
|
.searchButtonStyle {
|
width: 50%;
|
}
|
.searchButtonStyle input {
|
width: 80%;
|
background: #9BC2E6;
|
}
|
.setButtonStyle {
|
width: 8%;
|
}
|
.setButtonStyle input {
|
width: 100%;
|
background: #9BC2E6;
|
}
|
.startInventoryButtonStyle {
|
width: 12%;
|
}
|
.labelSettingStyle {
|
width: 8%;
|
text-align: right;
|
}
|
.labelStyle {
|
width: 8%;
|
text-align: left;
|
}
|
.blankStyle {
|
width: 1%;
|
}
|
.inputTextStyle {
|
width: 9%;
|
}
|
.inputTextStyle input {
|
width: 90%;
|
}
|
.inputTextStyle select {
|
width: 95%;
|
}
|
.redStyle {
|
background-color: #F00;
|
}
|
.greyStyle {
|
background-color: #AAA;
|
}
|
.blueStyle input {
|
background: #9BC2E6;
|
}
|
#pageBlockButton1 {
|
margin: 0pxt;
|
}
|
</style>
|
<script type="text/javascript">
|
// 改变table尺寸
|
var heightAjustment = 120;
|
var widthAjustment = 30;
|
function windowResize() {
|
blockHeight = j$(window).innerHeight() - j$(escapeVfId('allPage:allForm:searchBlock')).height() - j$(escapeVfId('allPage:allForm:dataBlock:pageBlockButton1')).height() - j$('table#msg').height() - heightAjustment;
|
sbwidth = scrollbarWidth();
|
R_width = j$(escapeVfId('allPage:allForm:dataBlock')).width();
|
blockWidth = 490;
|
j$(escapeVfId('allPage:allForm:dataBlock')).css('height', blockHeight + 150 + 'px');
|
j$('div#in_Div_L').css('width', blockWidth + 220 + 'px');
|
j$('div#out_Div_L').css('width', blockWidth + 220 + 'px'); // 调整out_Div_L宽度
|
j$('div#in_Div_L').css('height', blockHeight + 'px');
|
// **************************************************************
|
j$('div#in_Div_R').css('width', R_width - blockWidth - 220 + 'px');
|
j$('div#out_Div_R').css('width', R_width - blockWidth - 220 + 'px');
|
j$('div#in_Div_R').css('height', blockHeight + 20 + 'px');
|
var titleHeight_L = j$('div#out_Div_L').height();
|
var titleHeight_R = j$('div#out_Div_R').height();
|
if (titleHeight_L >= titleHeight_R) {
|
j$('div#out_Div_R').css('height', (titleHeight_L) + 'px');
|
j$('div#out_Div_R').css('margin-top', (-titleHeight_L) + 'px');
|
j$('table#table_out_Div_R').css('height', (titleHeight_L) + 'px');
|
} else {
|
j$('div#out_Div_L').css('height', titleHeight_R+'px');
|
}
|
j$('div#in_Div_R').css('margin-top', (-j$('div#in_Div_L').height()) + 'px');
|
var number = j$('table#tableData_L').find('tr').length;
|
if (number>0) {
|
for (var i = 0 ; i < number ;i++) {
|
if (j$('tr#tableData_R_'+i).height() > j$('tr#tableData_L_'+i).height()){
|
j$('tr#tableData_L_'+i).css('height', j$('tr#tableData_R_'+i).height());
|
} else {
|
j$('tr#tableData_R_'+i).css('height', j$('tr#tableData_L_'+i).height());
|
}
|
}
|
}
|
if (j$('table#tableData_R').height() > j$('div#in_Div_R').height()) {
|
j$('div#in_Div_R').css('width', (R_width-blockWidth-220 + sbwidth) + 'px');
|
} else {
|
j$('div#out_Div_R').css('width', (R_width-blockWidth-240 + sbwidth) + 'px');
|
j$('div#in_Div_R').css('width', (R_width-blockWidth-240 + sbwidth) + 'px');
|
}
|
}
|
// 全选功能
|
function selectAllJs() {
|
j$(escapeVfId('checker')).prop('disabled', true);
|
var productCount = j$('input#count_hidden').val();
|
if (j$(escapeVfId('checker')).attr('checked') == 'checked') {
|
for (var i = 0; i < productCount; i++) {
|
var disabled = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).prop('disabled');
|
if (disabled == false) {
|
j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked', true);
|
}
|
}
|
} else {
|
for (var i = 0; i < productCount; i++) {
|
var disabled = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).prop('disabled');
|
if (disabled == false) {
|
j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked', false);
|
}
|
}
|
}
|
j$(escapeVfId('checker')).prop('disabled', false);
|
}
|
var globalQueryCondition;
|
var fromQuickBarFlag = 'false';
|
function checkAssetJs(queryCondition) {
|
fromQuickBarFlag = 'true';
|
globalQueryCondition = queryCondition;
|
var changeFlg = checkChangeFlg();
|
if (changeFlg == '1') {
|
blockme();
|
checkAssetFunc(queryCondition, fromQuickBarFlag);
|
} else if (changeFlg == '3') {
|
blockme();
|
checkAssetFunc(queryCondition, fromQuickBarFlag);
|
globalQueryCondition = '';
|
}
|
fromQuickBarFlag = 'false';
|
return false;
|
}
|
|
// 检索按钮
|
function searchBtnJs() {
|
var changeFlg = checkChangeFlg();
|
if (changeFlg == '1') {
|
blockme();
|
checkAssetFunc(globalQueryCondition, fromQuickBarFlag);
|
} else if (changeFlg == '3') {
|
blockme();
|
checkAssetFunc(globalQueryCondition, fromQuickBarFlag);
|
}
|
}
|
|
function checkAssetFuncJs() {
|
checkAssetFunc(globalQueryCondition, fromQuickBarFlag);
|
globalQueryCondition = '';
|
}
|
// 取消时数据存在变更检测
|
function checkChangeFlagWhenCancel() {
|
var changeFlag = document.getElementById('allPage:allForm:dataBlock:changeFlg').value;
|
if (changeFlag == 1) {
|
if (window.confirm('画面上的数据有变化,要取消所做的变更吗?\n点击 [确定] 取消所有变更\n点击 [取消] 返回之前的结果。')) {
|
document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
|
return '1';
|
} else {
|
return '2';
|
}
|
}
|
return '3';
|
}
|
// 取消按钮
|
function cancelBtnJs() {
|
var changeFlg = checkChangeFlagWhenCancel();
|
// 点击取消并确定时
|
if (changeFlg == '1') {
|
blockme();
|
clearAllCheckedJs(); // apex:actionFunction
|
|
j$(escapeVfId('checker')).prop('disabled', true);
|
var productCount = j$('input#count_hidden').val();
|
|
for (var i = 0; i < productCount; i++) {
|
var disabled = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).prop('checked');
|
if (disabled == true) {
|
j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked', false);
|
}
|
}
|
j$(escapeVfId('checker')).prop('disabled', false);
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:stockId')).val('');
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:applyEquipmentTypeId')).val('');
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:applyAssetTypeListId')).val('');
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:otherSelectionId')).val('');
|
clearAllSearchConditionWhenCancel(); // 取消确定后清空检索条件 // apex:actionFunction
|
} else if (changeFlg == '3') {
|
blockme();
|
clearAllCheckedJs();
|
|
j$(escapeVfId('checker')).prop('disabled', true);
|
var productCount = j$('input#count_hidden').val();
|
|
for (var i = 0; i < productCount; i++) {
|
var disabled = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).prop('checked');
|
if (disabled == true) {
|
j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked', false);
|
}
|
}
|
j$(escapeVfId('checker')).prop('disabled', false);
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:stockId')).val('');
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:applyEquipmentTypeId')).val('');
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:applyAssetTypeListId')).val('');
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:otherSelectionId')).val('');
|
clearAllSearchConditionWhenCancel(); // 取消确定后清空检索条件
|
}
|
}
|
|
// 当用户点击检索等按钮时检查setChangeFlg,若为true则alert
|
function setChangeFlg() {
|
document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 1;
|
}
|
var dataSortKey;
|
function saveAndSort(dataColumn) {
|
dataSortKey = dataColumn;
|
if (checkChangeFlg2() == '3') {
|
sortTableJs(dataSortKey);
|
dataSortKey = '';
|
}
|
return false;
|
}
|
function checkChangeFlg() {
|
var currentPageRecordCount = j$('input#count_hidden').val();
|
var allCheckedFalse = false;
|
for (var i = 0; i < currentPageRecordCount; i++) {
|
var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
|
if (checkBox.prop('checked') == true) {
|
allCheckedFalse = true;
|
}
|
}
|
|
var onlyReadFlag = j$(escapeVfId('onlyReadFlagId')).val();
|
var changeFlag = document.getElementById('allPage:allForm:dataBlock:changeFlg').value;
|
if (changeFlag == 1 && onlyReadFlag == 'false' && allCheckedFalse) {
|
if (window.confirm('画面上的数据有变化,要保存所做的变更吗?\n点击 [确定] 保存打钩项数据并检索\n点击 [取消] 返回之前的结果。')) {
|
saveBeforeSearch();
|
document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
|
setSaveSuccessMsg(); // 保存完了
|
return '1';
|
} else {
|
return '2';
|
}
|
} else if (changeFlag == 1 && onlyReadFlag == 'true' && allCheckedFalse) {
|
if (window.confirm('备品存放地选项与您的权限不符,您不具有保存权限。\n画面上的数据有变化,要继续操作吗?\n点击 [确定] 继续操作\n点击 [取消] 返回之前的结果。')) {
|
document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
|
return '3';
|
} else {
|
return '2';
|
}
|
}
|
return '3';
|
}
|
|
function gotoInventoryResultRecord() {
|
window.open('{!$Page.InventoryResultRecord}');
|
}
|
|
function gotoInventoryReport() {
|
window.open('{!$Page.InventoryReport}');
|
}
|
function gotoConsumInventoryReport() {
|
window.open('{!$Page.InventoryReport}?isConsum=true');
|
}
|
function gotoAssetMaintain() {
|
window.open('{!$Page.AssetMaintain}');
|
}
|
|
function checkChangeFlg2() {
|
var currentPageRecordCount = j$('input#count_hidden').val();
|
var allCheckedFalse = false;
|
for (var i = 0; i < currentPageRecordCount; i++) {
|
var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
|
if (checkBox.prop('checked') == true) {
|
allCheckedFalse = true;
|
}
|
}
|
|
var onlyReadFlag = j$(escapeVfId('onlyReadFlagId')).val();
|
var changeFlag = document.getElementById('allPage:allForm:dataBlock:changeFlg').value;
|
if (changeFlag == 1 && onlyReadFlag == 'false' && allCheckedFalse) {
|
if (window.confirm('画面上的数据有变化,要保存所做的变更吗?\n点击 [确定] 保存打钩项数据并检索\n点击 [取消] 返回之前的结果。')) {
|
saveBeforeSearch2();
|
document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
|
setSaveSuccessMsg();
|
return '1';
|
} else {
|
return '2';
|
}
|
} else if (changeFlag == 1 && onlyReadFlag == 'true' && allCheckedFalse) {
|
if (window.confirm('备品存放地选项与您的权限不符,您不具有保存权限。\n画面上的数据有变化,要继续操作吗?\n点击 [确定] 继续操作\n点击 [取消] 返回之前的结果。')) {
|
document.getElementById('allPage:allForm:dataBlock:changeFlg').value = 0;
|
return '3';
|
} else {
|
return '2';
|
}
|
}
|
return '3';
|
}
|
|
function sorTableJs2() {
|
if (dataSortKey != '' && dataSortKey != null) {
|
sortTableJs(dataSortKey);
|
dataSortKey = '';
|
}
|
return false;
|
}
|
|
// 排序适用
|
function sortTableJs(key) {
|
blockme();
|
sortTablefunc(key);
|
return false;
|
}
|
// function checkExcessFlag() {
|
// var excess2000Flag = j$(escapeVfId('excess2000FlagId')).val();
|
// if (excess2000Flag == 'true') {
|
// alert('检索数据已超过2000条,无法显fromQuickBarFlag示超过2000条的部分,请追加检索条件。');
|
// }
|
// }
|
window.onresize = windowResize;
|
</script>
|
<apex:form id="allForm">
|
<!-- 判断检索数量上限2000 -->
|
<input type="hidden" id="excess2000FlagId" value="{!excess2000Flag}"/>
|
<input type="hidden" id="isSavingSuccessId" value="{!isSavingSuccess}"/>
|
<input type="hidden" id="onlyReadFlagId" value="{!onlyReadFlag}"/>
|
<input type="hidden" id="internalAssetLocationUser" value="{!internalAssetLocationLogin}" />
|
<apex:pageBlock id="edit">
|
<!-- 保存成功 -->
|
<apex:actionFunction name="setSaveSuccessMsg" action="{!setSaveSuccessMsg}" />
|
<!-- 查看保有设备 -->
|
<apex:actionFunction name="checkAssetFunc" action="{!checkAssetBtn}" rerender="allForm" onComplete="unblockUI(); checkExcessFlag();">
|
<apex:param name="assertCondition" value="" />
|
<apex:param name="fromQuickBarFlag" value="" />
|
</apex:actionFunction>
|
<!-- 取消按钮 -->
|
<apex:actionFunction name="clearAllCheckedJs" action="{!clearAllCheckedBtn}" rerender="allForm" onComplete="unblockUI();" />
|
<!-- 检索按钮 -->
|
<apex:actionFunction name="searchBtnFunc" action="{!searchBtn}" rerender="allForm" onComplete="unblockUI(); checkExcessFlag();"></apex:actionFunction>
|
<!-- 取消是清空检索区 -->
|
<apex:actionFunction name="clearAllSearchConditionWhenCancel" action="{!clearAllSearchConditionWhenCancel}"></apex:actionFunction>
|
<!-- 左侧按钮区 -->
|
<apex:outputPanel layout="block" style="width: 13%; float: left;">
|
<apex:pageBlock mode="maindetail">
|
<table style='height: 220px'>
|
<tr><td class="checkButtonStyle"><apex:commandButton value="查看全部保有设备" rendered="{!!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看全部保有设备" rendered="{!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle"><apex:commandButton value="查看有效库存" rendered="{!!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看有效库存" rendered="{!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle"><apex:commandButton value="查看借出分配数" rendered="{!!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看借出分配数" rendered="{!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle"><apex:commandButton value="查看修理中保有设备" rendered="{!!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看修理中保有设备" rendered="{!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle"><apex:commandButton value="查看待报废保有设备" rendered="{!!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看待报废保有设备" rendered="{!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
|
<apex:outputText rendered="{!angecylookrole}"> <!-- 1650-->
|
<tr><td class="checkButtonStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!!scrappedBlueFlag && angecylookrole}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
|
<!-- OLY_OCM-818 -->
|
<tr><td class="checkButtonStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!!consumedBlueFlag && angecylookrole}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!!soonExpiredBlueFlag && angecylookrole}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!!expiredBlueFlag && angecylookrole}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
|
<tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
|
</apex:outputText>
|
<!-- OLY_OCM-818 -->
|
<tr>
|
<td class="checkButtonStyle">
|
<apex:commandButton value="盘点结果记录" onclick="checkChangeFlg(); gotoInventoryResultRecord(); return false;" />
|
</td>
|
</tr>
|
<tr>
|
<td class="checkButtonStyle">
|
<apex:commandButton value="备品盘点报告" onclick="checkChangeFlg(); gotoInventoryReport(); return false;" />
|
</td>
|
</tr>
|
<tr>
|
<td class="checkButtonStyle">
|
<apex:commandButton value="耗材盘点报告" rendered="{!angecylookrole}" onclick="checkChangeFlg(); gotoConsumInventoryReport(); return false;" />
|
</td>
|
</tr>
|
<tr>
|
<td class="checkButtonStyle">
|
<apex:commandButton value="数据维护" rendered="{!angecylookrole}" onclick="checkChangeFlg(); gotoAssetMaintain(); return false;" />
|
</td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!-- 右侧检索区 -->
|
<apex:outputPanel layout="block" style="width: 87%; float: right;">
|
<apex:pageBlock mode="maindetail">
|
<table style='width: 95%; height: 220px'>
|
<tr>
|
<td class="labelStyle">备品存放地</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.internal_asset_location}" id="stockStorageId" size="1">
|
<apex:selectOptions value="{!internalAssetLocationOptionList}"/>
|
</apex:selectList>
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">备品配套明细型号</td>
|
<td class="inputTextStyle"><apex:inputText value="{!searchB.fixture_Model_No}" id="fixtureModelNoId" /></td>
|
<td class="blankStyle"></td><!-- 1650-->
|
<td class="labelStyle">货架号</td>
|
<td class="inputTextStyle"><apex:inputText value="{!searchB.wh_location}" id="shelfNumId" rendered="{!angecylookrole}"/>
|
<apex:inputText disabled="true" rendered="{!!angecylookrole}" />
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">备品状态</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.fixture_Status}" id="assetStatusId" size="1">
|
<apex:selectOptions value="{!assetStatusOptionList}"/>
|
</apex:selectList>
|
</td>
|
</tr>
|
<tr><td><br /><br /></td></tr>
|
<tr>
|
<td class="labelStyle">备品管理编码</td> <!-- シリアル番号 -->
|
<td class="inputTextStyle">
|
<apex:inputText value="{!searchB.equipmentSet_Managment_Code}" id="stockManagementCodeId" rendered="{!equipmentSetManagmentCodeEditableFlag}" />
|
<apex:inputText value="{!searchB.equipmentSet_Managment_Code}" id="stockManagementCodeId2" rendered="{!!equipmentSetManagmentCodeEditableFlag}" />
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">固定资产号</td>
|
<td class="inputTextStyle">
|
<apex:inputText value="{!searchB.internal_Asset_number}" id="fixedAssetNumId" rendered="{!internalAssetNumberEditableFlag}" />
|
<apex:inputText value="{!searchB.internal_Asset_number}" id="fixedAssetNumId2" rendered="{!!internalAssetNumberEditableFlag}" />
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">机身号</td>
|
<td class="inputTextStyle"><apex:inputText value="{!searchB.serialNumber}" id="serialNoId" /></td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">分公司号</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.companyOfEquipment}" id="companyOfEquipment" size="1">
|
<apex:selectOptions value="{!companyOfEquipmentOpts}"/>
|
</apex:selectList>
|
</td>
|
</tr>
|
<tr><td><br /><br /></td></tr>
|
<tr>
|
<td class="labelStyle">主体/附属品</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.bodyOrAccessory}" id="bodyOrAccessoryId" size="1">
|
<apex:selectOptions value="{!bodyOrAccessoryOptionList}"/>
|
</apex:selectList>
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">产品分类</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.product_category}" id="product_category" size="1">
|
<apex:selectOptions value="{!product_categoryOpts}"/>
|
</apex:selectList>
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">备品分类</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.equipment_Type}" id="equipment_Type" size="1">
|
<apex:selectOptions value="{!equipment_TypeOpts}"/>
|
</apex:selectList>
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">管理种类</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.manage_type}" id="manage_type" size="1">
|
<apex:selectOptions value="{!manage_typeOpts}"/>
|
</apex:selectList>
|
</td>
|
</tr>
|
<tr><td><br /><br /></td></tr>
|
<tr>
|
<td class="labelStyle">所在地区(本部)</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.salesdepartment}" id="salesdepartment" size="1">
|
<apex:selectOptions value="{!salesdepartmentOpts}"/>
|
</apex:selectList>
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">所在地区(省)</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.salesProvince}" id="salesProvince" size="1">
|
<apex:selectOptions value="{!salesProvinceopts}"/>
|
</apex:selectList>
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">消耗品有效期至</td>
|
<td class="inputTextStyle">
|
<apex:inputText id="consumable_Guaranteen_endStr" value="{!searchB.consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumable_Guaranteen_endStr}', false)" />
|
</td>
|
<td class="blankStyle"></td>
|
<td class="searchButtonStyle" colspan="2">
|
<apex:commandButton style="width: 30%" value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" />
|
<apex:commandButton style="width: 30%" value="取消" onclick="cancelBtnJs(); return false;" rerender="allForm" />
|
<apex:commandButton style="width: 30%" value="导出数据" disabled="{!onlyReadFlag}" onclick="checkCsvExport(); return false;" />
|
</td>
|
<apex:actionFunction name="csvExprot" action="{!csvExprot}" />
|
<script type="text/javascript">
|
function checkCsvExport() {
|
var currentPageRecordCount = j$('input#count_hidden').val();
|
var isCheckSaveFlag = false;
|
for (var i = 0; i < currentPageRecordCount; i++) {
|
var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
|
if (checkBox.prop('checked') == true) {
|
isCheckSaveFlag = true;
|
}
|
}
|
if (!isCheckSaveFlag) {
|
alert("未选择任何数据,无法导出。");
|
} else {
|
csvExprot();
|
}
|
}
|
</script>
|
</tr>
|
<tr><td><br /><br /></td></tr>
|
<tr>
|
<td class="labelStyle">备品类别</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.asset_loaner_category}" id="assetLoanerCategory" size="1">
|
<apex:selectOptions value="{!assetLoanerCategoryOpts}"/>
|
</apex:selectList>
|
</td>
|
<td class="blankStyle"></td>
|
<td class="labelStyle">到期时间</td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!searchB.daysToExpired}" id="daysToExpired" size="1">
|
<apex:selectOptions value="{!daysToExpiredOpts}"/>
|
</apex:selectList>
|
</td>
|
<td class="blankStyle"></td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
</apex:pageBlock>
|
<!-- 设置区 -->
|
<apex:pageBlock id="pageBlockButton1">
|
<apex:actionFunction name="applyButton" action="{!applyBtn}" rerender="allForm" onComplete="unblockUI();" />
|
<apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="allForm" onComplete="unblockUI(); checkExcessFlag(); return false;">
|
<!-- <apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="allForm" onComplete="unblockUI(); return false;"> -->
|
<apex:param name="sortKey" value="" />
|
</apex:actionFunction>
|
<apex:inputHidden id="clearApplyFlagId" />
|
<table>
|
<tr>
|
<td style="width: 2%"></td>
|
<td class="labelSettingStyle">备品存放地</td>
|
<td class="blankStyle"></td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!internalAssetLocationSet}" id="stockId" size="1" rendered="{!beipincunfangdiEditableFlag}">
|
<apex:selectOptions value="{!internalAssetDataLocationOptionList}"/>
|
</apex:selectList>
|
<apex:inputText disabled="true" rendered="{!!beipincunfangdiEditableFlag}" />
|
</td>
|
<td class="labelSettingStyle">备品分类</td>
|
<td class="blankStyle"></td>
|
<td class="inputTextStyle">
|
<apex:inputField value="{!assetSetting.Equipment_Type__c}" id="applyEquipmentTypeId" rendered="{!beipinfenleiEditableFlag}" />
|
<apex:inputText disabled="true" rendered="{!!beipinfenleiEditableFlag}" />
|
</td>
|
<td class="labelSettingStyle">其他选项</td>
|
<td class="blankStyle"></td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!appliedSelectOption}" id="applyAssetTypeListId" size="1" rendered="{!angecylookrole}">
|
<apex:selectOptions value="{!appliedSelectOptionList}"/>
|
</apex:selectList>
|
<apex:selectList disabled="true" rendered="{!!angecylookrole}">
|
</apex:selectList>
|
</td>
|
<td><apex:inputText id="otherSelectionId" rendered="{!angecylookrole}"/>
|
<apex:inputText disabled="true" rendered="{!!angecylookrole}" /></td>
|
|
<td class="setButtonStyle">
|
<apex:commandButton value="适用" reRender="allForm" onclick="applyJs(); return false;" disabled="{!onlyReadFlag}" />
|
<script type="text/javascript">
|
// 适用按钮
|
function applyJs() {
|
var appliedFlag = true;
|
var selectFlag = true;
|
var isCheckFlag = false;
|
var internalAssetLocation = j$(escapeVfId('{!$Component.stockId}')).val(); // 备品存放地
|
var productCategory = j$(escapeVfId('{!$Component.applyEquipmentTypeId}')).val(); // 备品分类
|
var otherSelectOptionValue = j$(escapeVfId('{!$Component.otherSelectionId}')).val(); // 其他选项值
|
otherSelectOptionValue = j$.trim(otherSelectOptionValue);
|
var otherSelectOptionValues = [];
|
var otherSelectOptionApi = j$(escapeVfId('{!$Component.applyAssetTypeListId}')).val(); // 其他选项的api
|
var otherSelectOptionText = j$(escapeVfId('{!$Component.applyAssetTypeListId}')).find("option:selected").text(); // 其他选项的text
|
if (otherSelectOptionApi != "") {
|
j$("td." + "col_" + otherSelectOptionApi + ".dataCellBorder1." + otherSelectOptionApi).each(function() {
|
otherSelectOptionValues.push(j$(this));
|
});
|
}
|
|
var internalAssetLocations = []; // 备品存放地
|
j$("td.col_Internal_asset_location__c.dataCellBorder1.Internal_asset_location__c").each(function() {
|
internalAssetLocations.push(j$(this));
|
});
|
var equipmentTypes = []; // 备品分类
|
j$("td.col_Equipment_Type__c.dataCellBorder1.Equipment_Type__c").each(function() {
|
equipmentTypes.push(j$(this));
|
});
|
var currentPageRecordCount = j$('input#count_hidden').val();
|
for (var i = 0; i < currentPageRecordCount; i++) {
|
var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
|
if (checkBox.prop('checked') == true) {
|
isCheckFlag = true;
|
// if (internalAssetLocations[i].find("select").val() != internalAssetLocation && internalAssetLocation != '') {
|
if (internalAssetLocation != '' && typeof(internalAssetLocation) != "undefined") {
|
setChangeFlg();
|
internalAssetLocations[i].find("select").val(internalAssetLocation);
|
appliedFlag = false;
|
}
|
// if (equipmentTypes[i].find("select").val() != productCategory && productCategory != '') {
|
if (productCategory != '' && typeof(productCategory) != "undefined") {
|
setChangeFlg();
|
equipmentTypes[i].find("select").val(productCategory);
|
appliedFlag = false;
|
}
|
if (otherSelectOptionApi != '' && otherSelectOptionValue != '') {
|
if (typeof(otherSelectOptionValues[i].find("input").val()) != "undefined") {
|
if (otherSelectOptionValues[i].find("input").attr("type") == "text") {
|
// if (otherSelectOptionValues[i].find("input").val() != otherSelectOptionValue) {
|
setChangeFlg();
|
otherSelectOptionValues[i].find("input").val(otherSelectOptionValue);
|
appliedFlag = false;
|
// }
|
|
} else if (otherSelectOptionValues[i].find("input").attr("type") == "checkbox") {
|
if (otherSelectOptionValue == "true") {
|
setChangeFlg();
|
otherSelectOptionValues[i].find("input").attr("checked", true);
|
appliedFlag = false;
|
} else if (otherSelectOptionValue == "false") {
|
setChangeFlg();
|
otherSelectOptionValues[i].find("input").attr("checked", false);
|
appliedFlag = false;
|
}
|
}
|
} else if (typeof(otherSelectOptionValues[i].find("select").val()) != "undefined") {
|
selectFlag = false;
|
|
var oldOtherSelectOptionValues = otherSelectOptionValues[i].find("select").val();
|
setChangeFlg();
|
var tempvalue = otherSelectOptionValues[i].find("select").val();
|
otherSelectOptionValues[i].find("select").val(otherSelectOptionValue);
|
if (otherSelectOptionValues[i].find("select").val() == "") { // 若选项值无效,则为空
|
otherSelectOptionValues[i].find("select").val(tempvalue);
|
appliedFlag = true;
|
} else {
|
appliedFlag = false;
|
}
|
}
|
}
|
}
|
}
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
|
// var clearApplyFlag = false;
|
window.setTimeout(function () {
|
if (internalAssetLocation == '' && productCategory== '' && (otherSelectOptionText == '' || otherSelectOptionValue == '')) { // 适用入力框全为空
|
// alert('适用区输入框为空,请输入适用值。');
|
var applyMsg = '适用区输入框为空,请输入适用值。';
|
passApplyMsgToController(applyMsg, 'Fail');
|
return;
|
}
|
if (isCheckFlag == false) {
|
// alert('未勾选任何待适用数据。');
|
var applyMsg = '未勾选任何待适用数据。';
|
passApplyMsgToController(applyMsg, 'Fail');
|
return;
|
}
|
|
if (selectFlag) {
|
if (!appliedFlag) {
|
var alertMsg = "适用完了 \r\n";
|
if (internalAssetLocation != '' && typeof(internalAssetLocation) != "undefined") {
|
var alertMsg1 = "已将打勾数据中的 " + "备品存放地" + " 适用为 " + internalAssetLocation + " \r\n";
|
alertMsg += alertMsg1;
|
}
|
if (productCategory != '' && typeof(productCategory) != "undefined") {
|
var alertMsg2 = "已将打勾数据中的 " + "备品分类" + " 适用为 " + productCategory + " \r\n";
|
alertMsg += alertMsg2;
|
}
|
if (otherSelectOptionText != '' && otherSelectOptionValue != '') {
|
var alertMsg3 = "已将打勾数据中的 " + otherSelectOptionText + " 适用为 " + otherSelectOptionValue + " \r\n";
|
alertMsg += alertMsg3;
|
}
|
// alert(alertMsg);
|
// clearApplyFlag = true;
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
|
passApplyMsgToController(alertMsg, 'Success');
|
}
|
} else {
|
if (!appliedFlag) {
|
var alertMsg = "适用完了, ";
|
if (internalAssetLocation != '') {
|
var alertMsg1 = "已将打勾数据中的 " + "备品存放地" + " 适用为 " + internalAssetLocation + "。 ";
|
alertMsg += alertMsg1;
|
}
|
if (productCategory != '') {
|
var alertMsg2 = "已将打勾数据中的 " + "备品分类" + " 适用为 " + productCategory + "。 ";
|
alertMsg += alertMsg2;
|
}
|
if (otherSelectOptionText != '' && otherSelectOptionValue != '') {
|
var alertMsg3 = "已将打勾数据中的 " + otherSelectOptionText + " 适用为 " + otherSelectOptionValue + "。";
|
alertMsg += alertMsg3;
|
}
|
passApplyMsgToController(alertMsg, 'Success');
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
|
} else {
|
var alertMsg = "其他选项: " + otherSelectOptionText +"中无此选项值" + otherSelectOptionValue + ",无法更新。";
|
passApplyMsgToController(alertMsg, 'Fail');
|
}
|
}
|
}, 5);
|
}
|
|
function clearApplyValue() {
|
var clearApplyValueFlag = j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val();
|
if(clearApplyValueFlag) {
|
j$(escapeVfId('{!$Component.stockId}')).val('');
|
j$(escapeVfId('{!$Component.applyEquipmentTypeId}')).val('');
|
j$(escapeVfId('{!$Component.applyAssetTypeListId}')).val('');
|
j$(escapeVfId('{!$Component.otherSelectionId}')).val('');
|
}
|
j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
|
}
|
|
function checkSavingJs() {
|
var isSavingSuccess = j$(escapeVfId('isSavingSuccessId')).val();
|
// alert(isSavingSuccess);
|
if (isSavingSuccess != 'false') {
|
setSaveSuccessMsg();
|
}
|
}
|
</script>
|
</td>
|
<apex:actionFunction name="saveBeforeSearch" action="{!saveBtn}" rerender="allForm" oncomplete="unblockUI(); checkAssetFuncJs();" />
|
<apex:actionFunction name="saveBeforeSearch2" action="{!saveBtn}" rerender="allForm" oncomplete="unblockUI(); sorTableJs2(); return false" rendered="false" />
|
<apex:actionFunction name="passApplyMsgToController" action="{!showApplyMsg}" oncomplete="clearApplyValue(); return false;" rerender="allForm">
|
<apex:param name="applyMsg" value="" />
|
<apex:param name="applyMsgType" value="" />
|
</apex:actionFunction>
|
|
<td class="setButtonStyle"><apex:commandButton action="{!saveBtn}" value="保存" onclick="blockme();" rerender="allForm" oncomplete="unblockUI(); checkSavingJs();" disabled="{!onlyReadFlag}" /></td>
|
<!-- 批量更新 -->
|
<td class="setButtonStyle"><apex:commandButton value="批量更新" onclick="openPopup(); return false;" oncomplete="refresh" disabled="{!onlyReadFlag}" /></td>
|
<td style="width: auto"></td>
|
<script type="text/javascript">
|
var popupBox;
|
var filename = "";
|
var blobfile = "";
|
|
popupBox = new SimpleDialog("CSVImportDialogId", false); // 不可拖动
|
popupBox.createDialog();
|
|
function openPopup() {
|
popupBox.setTitle("导入CSV文件");
|
popupBox.importContentNode(document.getElementById("{!$Component.popupBox}"));
|
// popupBox.importContentNode(document.getElementById("popupBox"));
|
popupBox.show(document.getElementById("{!$Component.popupBox}"));
|
}
|
|
function remoteLocationPost() {
|
var fbody = document.getElementById("file_input").files[0];
|
if (typeof fbody === "undefined") {
|
alert("请选择CSV文件");
|
return;
|
} else {
|
var reader = new FileReader();
|
reader.readAsText(fbody);
|
reader.onload = function(val) {
|
// 判断CSV文件BOM,若包含BOM,则删除。
|
if (this.result.charCodeAt(0) === 0xFEFF) { // 如果第一个字符的编码为utf8
|
this.result = this.result.substr(1); // 在utf-8编码中,三个隐藏的字节 0xEF 0xBB 0xBF被视为一个字符 EFBBBF(UTF8) FEFF(unicode) 65279
|
}
|
//this.result = this.result.substr(0, 3);
|
passToController(this.result);
|
}
|
popupBox.hide();
|
}
|
}
|
</script>
|
<apex:actionFunction name="passToController" action="{!importCSVFile}" rerender="allForm">
|
<apex:param name="csvData" value="" />
|
</apex:actionFunction>
|
</tr>
|
</table>
|
<apex:outputPanel style="display:none">
|
<apex:outputPanel id="popupBox" layout="block">
|
<input type="file" id="file_input" name="attFile" accept=".csv" /><br/>
|
<center>
|
<apex:commandButton value="确认" onclick="remoteLocationPost(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
|
<apex:commandButton value="取消" onclick="popupBox.hide();" style="width: 20%; margin: 20px 10px 0px 10px" />
|
</center>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
<table>
|
<tr>
|
<td style="width: 5%"></td>
|
<td>显示未选中数据数量</td>
|
<td class="blankStyle"></td>
|
<td class="inputTextStyle">
|
<apex:selectList value="{!selRecordOption}" size="1" onchange="searchBtnJs(); return false;"><apex:selectOptions value="{!limitOpts}"/></apex:selectList>
|
</td>
|
<td width="45px"></td>
|
<td align="right">共检索出 {!totalSoqlRecordNum + totalFixDataNum} 条数据</td>
|
<td width="45px"></td>
|
<td id="checkedNumId" align="right">本页已选中 {!totalFixDataNum} 条数据</td>
|
<td width="45px"></td>
|
<td id="uncheckedNumId" align="right"> 本页未选中 {!totalUnfixDataNum} 条数据</td>
|
<script>
|
j$(function() {
|
// 统计打勾数量
|
var totalCheckedNum = 0;
|
var productCount = j$('input#count_hidden').val();
|
for (var i = 0; i < productCount; i++) {
|
if (j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked')) {
|
totalCheckedNum ++;
|
}
|
}
|
j$('#checkedNumId').text('其中打勾固定数据的数量为 ' + totalCheckedNum);
|
var totalUncheckedNum = productCount - totalCheckedNum;
|
j$('#uncheckedNumId').text('未打勾数据的数量为 ' + totalUncheckedNum);
|
});
|
</script>
|
<td width="45px"></td>
|
<td align="right">第 {!currPage} 页</td>
|
<td width="45px"></td>
|
<td align="right">共 {!totalPage} 页</td>
|
<td width="45px"></td>
|
<td align="right" width="45px">
|
<apex:commandLink action="{!firstPage}" value="首页" id="firstPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
|
<apex:outputText value="首页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
|
</td>
|
<td width="45px"></td>
|
<td align="right" width="45px">
|
<apex:commandLink action="{!previousPage}" value="上一页" id="previous" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
|
<apex:outputText value="上一页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
|
</td>
|
<td width="45px"></td>
|
<td align="right" width="45px">
|
<apex:commandLink action="{!nextPage}" value="下一页" id="next" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage ||totalPage == 0,'display: none;','')}color: blue;"/>
|
<apex:outputText value="下一页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
|
</td>
|
<td width="45px"></td>
|
<td align="right" width="45px">
|
<apex:commandLink action="{!endPage}" value="尾页" id="endPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage||totalPage == 0,'display: none;','')}color: blue;"/>
|
<apex:outputText value="尾页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
|
</td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
<apex:pageMessages id="msg" />
|
<apex:pageBlock id="dataBlock" mode="maindetail">
|
<!-- 检索出的数据数量 -->
|
<input type="hidden" id="count_hidden" value="{!allAssetDataListSize}"/>
|
<!-- 查看全部保有设备 -->
|
<div id="out_Div_L" style="overflow:auto">
|
<table class="list" border="1" style="border-collapse: collapse; table-layout: fixed; border-bottom-width: 0px; border-spacing: 0px; height: 80px; width: 600px;">
|
<tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
|
<!-- 全选 -->
|
<td style="width:20px"><input type='checkbox' onclick='selectAllJs()' id='checker' onchange='checkboxOnclick(); return false;'/></td>
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!leftLabelList}" var="t">
|
<td class="col_{!columnLeftCssList[cnt]}" style="word-wrap:break-word">
|
<a href="javascript:void()" onclick="saveAndSort('{!cnt + 1}'); return false;" style="text-decoration: underline;"><apex:outputText value="{!t}" /> {!sortOrderList[cnt + 1]}</a>
|
</td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</tr>
|
</table>
|
</div>
|
<div id="out_Div_R">
|
<table class="list" border="1" style="border-collapse: collapse; table-layout:fixed; border-bottom-width: 0px; border-spacing:0; width:700px; height: 80px;">
|
<tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!rightLabelList}" var="t">
|
<td class="col_{!columnRightCssList[cnt]}" style="word-wrap:break-word">
|
<apex:variable value="{!leftLabelSize + cnt}" var="cnt_order" />
|
<a href="javascript:void()" onclick="saveAndSort('{!cnt_order + 1}'); return false;" style="text-decoration: underline;"><apex:outputText value="{!t}" /> {!sortOrderList[cnt_order + 1]}</a>
|
</td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</tr>
|
</table>
|
</div>
|
<div id="in_Div_L" style="overflow:hidden">
|
<table class="list" border="1" style="border-collapse:collapse;table-layout:fixed;border-bottom-width:0px;border-spacing:0;width:600px;" id="tableData_L">
|
<apex:variable value="{!0}" var="Cnt_L" />
|
<apex:repeat id="dataline_L" value="{!allAssetInfoList}" var="eachAssetData">
|
<tr class="dataRow" id="tableData_L_{!Cnt_L}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
|
<!-- 全选 -->
|
<td class="dataCellBorder1" style="width:20px" align="center">
|
<apex:inputCheckbox id="rowCheck" value="{!eachAssetData.isCheck}" disabled="{!IF((internalAssetLocationLogin != 'All' && eachAssetData.assetQuertResult['Internal_asset_location__c'] != internalAssetLocationLogin), true, false)}" onchange="checkboxOnclick(); return false;" />
|
<apex:inputHidden id="canChange" />
|
</td>
|
<apex:variable value="{!0}" var="cnt2" />
|
<apex:repeat id="eachdata_L" value="{!leftApiList}" var="eachLeftApi">
|
<td class="col_{!columnLeftCssList[cnt2]} dataCellBorder1 {!eachLeftApi[0]}" style="word-wrap:break-word">
|
<!-- r -->
|
<apex:outputPanel rendered="{!(eachLeftApi.size>1 || columnLeftRWMap[eachLeftApi[0]]=='r')}" layout="none">
|
<!-- 若eachLeftApi为关联的,其api.spilt('.')后获得的list大于1 -->
|
<apex:outputField value="{!eachAssetData.assetQuertResult[eachLeftApi[0]]}" />
|
</apex:outputPanel>
|
<!-- w rw -->
|
<apex:outputPanel rendered="{!(eachLeftApi.size==1 && (columnLeftRWMap[eachLeftApi[0]]=='w' || columnLeftRWMap[eachLeftApi[0]]=='wm'))}" layout="none">
|
<apex:outputPanel id="internal_asset_location_id2" rendered="{!eachLeftApi[0]=='Internal_asset_location__c'}" layout="none">
|
<apex:selectList value="{!eachAssetData.assetQuertResult[eachLeftApi[0]]}" id="stockStorageId2" size="1" onchange="if(j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + '{!Cnt_L}' + ':rowCheck')).attr('checked')) {setChangeFlg();}" style="width:90%">
|
<apex:selectOptions value="{!internalAssetDataLocationOptionList}"/>
|
</apex:selectList>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!eachLeftApi[0]<>'Internal_asset_location__c'}" layout="none">
|
<apex:inputField value="{!eachAssetData.assetQuertResult[eachLeftApi[0]]}" onchange="if(j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + '{!Cnt_L}' + ':rowCheck')).attr('checked')) {setChangeFlg();}" rendered="{!angecylookrole}"/>
|
<!--20210702 you 1650 办事处只读权限 -->
|
<apex:outputField value="{!eachAssetData.assetQuertResult[eachLeftApi[0]]}" html-disabled="true" rendered="{!!angecylookrole}"/>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
</td>
|
<apex:variable value="{!cnt2+1}" var="cnt2" />
|
</apex:repeat>
|
</tr>
|
<apex:variable value="{!Cnt_L+1}" var="Cnt_L" />
|
</apex:repeat>
|
</table>
|
</div>
|
<script>
|
// 统计打勾数量
|
function checkboxOnclick() {
|
var totalCheckedNum = 0;
|
var productCount = j$('input#count_hidden').val();
|
for (var i = 0; i < productCount; i++) {
|
if (j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:'+ i + ':rowCheck')).attr('checked')) {
|
totalCheckedNum ++;
|
}
|
}
|
j$('#checkedNumId').text('其中打勾固定数据数量为 ' + totalCheckedNum);
|
|
var totalUncheckedNum = productCount - totalCheckedNum;
|
j$('#uncheckedNumId').text('未打勾数据的数量为 ' + totalUncheckedNum);
|
}
|
</script>
|
<div id="in_Div_R" style="overflow:auto;">
|
<table class="list" border="1" style="border-collapse:collapse;table-layout:fixed;border-bottom-width:0px;border-spacing:0;width:660px;" id="tableData_R">
|
<apex:variable value="{!0}" var="Cnt_R" />
|
<apex:repeat id="dataline_R" value="{!allAssetInfoList}" var="eachAssetData">
|
<tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" >
|
<apex:variable value="{!0}" var="cnt2" />
|
<apex:repeat id="eachdata_R" value="{!rightApiList}" var="eachRightApi">
|
<td class="col_{!columnRightCssList[cnt2]} dataCellBorder1 {!eachRightApi[0]}" style="word-wrap:break-word">
|
<!-- r -->
|
<apex:outputPanel rendered="{!(eachRightApi.size>1 || columnRightRWMap[eachRightApi[0]]=='r')}" layout="none">
|
<apex:outputPanel rendered="{!eachRightApi.size == 1}" layout="none">
|
<apex:outputField value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" />
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!eachRightApi.size > 1}" layout="none">
|
<apex:outputField value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" />
|
</apex:outputPanel>
|
</apex:outputPanel>
|
<!-- w rw -->
|
<apex:outputPanel rendered="{!(eachRightApi.size==1 && (columnRightRWMap[eachRightApi[0]]=='w' || columnRightRWMap[eachRightApi[0]]=='wm'))}" layout="none">
|
<apex:outputPanel rendered="{!eachRightApi[0]=='Equipment_Type__c'}" layout="none">
|
<apex:inputField id="equipment_Type__c_id2" value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" onchange="if(j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + '{!Cnt_R}' + ':rowCheck')).attr('checked')) {setChangeFlg();}" style="width:90%" />
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!eachRightApi[0]<>'Equipment_Type__c'}" layout="none">
|
<apex:outputPanel rendered="{!eachRightApi.size == 1}" layout="none">
|
<apex:inputField value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" onchange="if(j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + '{!Cnt_R}' + ':rowCheck')).attr('checked')) {setChangeFlg();}" rendered="{!angecylookrole}"/>
|
<!--20210702 you 1650 办事处只读权限 -->
|
<apex:outputField value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" html-disabled="true" rendered="{!!angecylookrole}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!eachRightApi.size > 1}" layout="none">
|
<apex:outputText value="{!eachAssetData.assetQuertResult[eachRightApi[0]]}" />
|
</apex:outputPanel>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
</td>
|
<apex:variable value="{!cnt2+1}" var="cnt2" />
|
</apex:repeat>
|
</tr>
|
<apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
|
</apex:repeat>
|
</table>
|
</div>
|
<apex:inputHidden value="{!changeFlg}" id="changeFlg"/>
|
<script>
|
j$('div#in_Div_R').scroll(function() {
|
j$('div#out_Div_R').scrollLeft(j$(this).scrollLeft());
|
});
|
j$('div#in_Div_R').scroll(function() {
|
j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
|
});
|
windowResize();
|
</script>
|
</apex:pageBlock>
|
</apex:form>
|
</apex:page>
|