<apex:page controller="TransferApplySelectDetailSubController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
|
<head>
|
<title>受理批量更新</title>
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<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;
|
function searchOppJs() {
|
blockme();
|
|
var cnt = j$('td.dataCellBorder1 input.rowchkcls').length;
|
var isChanged = false;
|
for (var i = 0; i < cnt; i++) {
|
if (document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable:' + i + ':changeFlg').value == 1) {
|
isChanged = true;
|
break;
|
}
|
}
|
if (isChanged) {
|
if (window.confirm('画面上的数据有变化,要保存所做的变更吗?\n点击 [确定] 保存并检索\n点击 [取消] 只检索,放弃保存')) {
|
saveAndSearch(1);
|
} else {
|
searchOpp();
|
}
|
} else {
|
searchOpp();
|
}
|
}
|
</script>
|
</head>
|
<apex:form id="allForm">
|
<apex:actionFunction name="searchOpp" action="{!searchOpp}" rerender="allForm,checEventFrame" oncomplete="unblockUI();"/>
|
<apex:actionFunction name="saveAndSearch" action="{!saveAndSearch}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!saveType}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction action="{!saveAndSearchPrevious}" name="saveAndSearchPrevious" rerender="allForm, message, checEventFrame" status="statusPreload" oncomplete="unblockUI();"/>
|
<apex:actionFunction action="{!saveAndSearchNext}" name="saveAndSearchNext" rerender="allForm, message, checEventFrame" status="statusPreload" oncomplete="unblockUI();"/>
|
<apex:actionFunction action="{!saveAndSearchGoPage}" name="saveAndSearchGoPage" rerender="allForm, message, checEventFrame" status="statusPreload" oncomplete="unblockUI();"/>
|
<apex:outputPanel id="pageallPanel">
|
<apex:pageBlock id="searchBlock" tabStyle="Report">
|
<table>
|
<tr>
|
<td colspan="1">关键字<apex:inputText value="{!keyword}"/> </td>
|
<td colspan="1">固定资产编号(Key)<apex:inputText value="{!assetnumber}" /></td>
|
<!-- //add by rentx 2021-05-07 start 1802 start 待受理完善备品信息-->
|
<td colspan="2"> 备品信息是否已更新
|
<!-- <apex:inputCheckbox value="{!isPerfect}" /> -->
|
<apex:selectList value="{!isPerfect}" size="1">
|
<apex:selectOptions value="{!options}"/>
|
</apex:selectList>
|
</td>
|
<!-- //add by rentx 2021-05-07 start 1802 end -->
|
<td><apex:commandButton value="检索" onclick="searchOppJs(); return false;"/></td>
|
<td><apex:commandButton action="{!turnback}" value="返回" rerender="allForm,checEventFrame"/></td>
|
<!-- <td><apex:commandButton action="{!turnback}" value="批量导入" rerender="allForm,checEventFrame"/></td> -->
|
</tr>
|
<tr>
|
<td colspan="1">所在地区(本部)
|
<apex:selectList id="salesdepartmentOpts" size="1">
|
<apex:selectOptions value="{!salesdepartmentOpts}"/>
|
</apex:selectList>
|
</td>
|
<td colspan="1">所在地区(省)
|
<apex:selectList id="salesProvinceOpts" size="1">
|
<apex:selectOptions value="{!salesProvinceOpts}"/>
|
</apex:selectList>
|
</td>
|
<td colspan="1">备品分类
|
<apex:selectList id="equipmentTypeOpts" size="1">
|
<apex:selectOptions value="{!equipmentTypeOpts}"/>
|
</apex:selectList>
|
</td>
|
<td colspan="1">是否已受理完善备品信息
|
<input type="checkbox" id="isPerfect"/>
|
</td>
|
<td><apex:commandButton action="{!changeEdit}" value="编辑" onclick="blockme();" reRender="allForm,checEventFrame" oncomplete="unblockUI();"/></td>
|
<td><apex:commandButton value="适用" reRender="allForm" onclick="applyJs(); return false;"/></td>
|
<td><apex:commandButton action="{!savePage}" value="保存" onclick="blockme();" rerender="allForm,checEventFrame" oncomplete="unblockUI();" /></td>
|
</tr>
|
</table>
|
<div style="clear:both;"></div>
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
</apex:pageBlock>
|
<c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="false" userCPaging="false"/>
|
</apex:outputPanel>
|
</apex:form>
|
|
<apex:outputPanel id="checEventFrame">
|
<script type="text/javascript">
|
// 非集中以外的要去掉三个选项
|
if('{!parentObj.RecordType.DeveloperName}'!='CenterToOther') {
|
j$("select option[value='13.CTEC教育本部']").remove();
|
j$("select option[value='14.医疗人才教育培训本部']").remove();
|
j$("select option[value='15.医疗法规事务和质量管理本部']").remove();
|
}
|
j$("table#tableData tr.dataRow").each(function(index){
|
// 非主体只可修改本部
|
//20210512 update ljh 1832 start
|
// 非主体只可修改本部 即一对一附属品 备品附属品
|
//var accCheck ='';
|
// if (index < j$("#tableData td.dataCellBorder1.col_Main_OneToOne__c span img").length) {
|
// accCheck = j$("#tableData td.dataCellBorder1.col_Main_OneToOne__c span img")[index].title;
|
// }
|
var accessoryCheck ='';
|
var accessoryOneCheck ='';
|
|
|
if (index < j$("#tableData td.dataCellBorder1.col_Loaner_accsessary__c span img").length) {
|
accessoryCheck = j$("#tableData td.dataCellBorder1.col_Loaner_accsessary__c span img")[index].title;
|
}
|
if (index < j$("#tableData td.dataCellBorder1.col_OneToOneAccessory__c span img").length) {
|
accessoryOneCheck = j$("#tableData td.dataCellBorder1.col_OneToOneAccessory__c span img")[index].title;
|
}
|
//20210812 ljh 管理编码 start
|
if(index < j$("tr.dataRow td.dataCellBorder1.col_EquipmentSet_Managment_Code_After__c input").length) {
|
j$("tr.dataRow td.dataCellBorder1.col_EquipmentSet_Managment_Code_After__c input")[index].disabled = true;
|
}
|
//20210812 ljh 管理编码 end
|
//if(accCheck != 'Checked' && accCheck != '选取的' && accCheck != 'チェック'){
|
if((accessoryCheck == 'Checked' || accessoryCheck == '选取的' || accessoryCheck == 'チェック')
|
||
|
(accessoryOneCheck == 'Checked' || accessoryOneCheck == '选取的' || accessoryOneCheck == 'チェック')
|
){
|
if(index < j$("tr.dataRow td.dataCellBorder1.col_SalesProvince_After__c select").length) {
|
j$("tr.dataRow td.dataCellBorder1.col_SalesProvince_After__c select")[index].disabled = true;
|
}
|
if(index < j$("tr.dataRow td.dataCellBorder1.col_Equipment_Type_After__c select").length) {
|
j$("tr.dataRow td.dataCellBorder1.col_Equipment_Type_After__c select")[index].disabled = true;
|
}
|
if(index < j$("tr.dataRow td.dataCellBorder1.col_EquipmentSet_Managment_Code_After__c input").length) {
|
j$("tr.dataRow td.dataCellBorder1.col_EquipmentSet_Managment_Code_After__c input")[index].disabled = true;
|
}
|
}
|
});
|
</script>
|
</apex:outputPanel>
|
<script type="text/javascript">
|
// 适用按钮
|
function applyJs() {
|
var salesdepartment = document.getElementById('allPage:allForm:searchBlock:salesdepartmentOpts').value; // 所在地区本部
|
var salessalesProvince = document.getElementById('allPage:allForm:searchBlock:salesProvinceOpts').value; // 所在地区省
|
var equipmentType = document.getElementById('allPage:allForm:searchBlock:equipmentTypeOpts').value; // 备品分类
|
var isPerfect = document.getElementById('isPerfect').checked; // 备品分类
|
|
var salesdepartments = [];
|
j$("td.dataCellBorder1.col_Salesdepartment_After__c").each(function() {
|
salesdepartments.push(j$(this));
|
});
|
var salessalesProvinces = [];
|
j$("td.dataCellBorder1.col_SalesProvince_After__c").each(function() {
|
salessalesProvinces.push(j$(this));
|
});
|
var equipmentTypes = [];
|
j$("td.dataCellBorder1.col_Equipment_Type_After__c").each(function() {
|
equipmentTypes.push(j$(this));
|
});
|
var isPerfects = [];
|
j$("td.dataCellBorder1.col_IsPerfect__c").each(function() {
|
isPerfects.push(j$(this));
|
});
|
var currentPageRecordCount = j$("input.rowchkcls").length;
|
for (var i = 0; i < currentPageRecordCount; i++) {
|
var checked = j$("td.dataCellBorder1 input.rowchkcls")[i].checked;
|
if (checked) {
|
if (salesdepartment != '' && typeof(salesdepartment) != "undefined") {
|
salesdepartments[i].find("select:enabled").val(salesdepartment);
|
}
|
if (salessalesProvince != '' && typeof(salessalesProvince) != "undefined") {
|
salessalesProvinces[i].find("select:enabled").val(salessalesProvince);
|
}
|
if (equipmentType != '' && typeof(equipmentType) != "undefined") {
|
equipmentTypes[i].find("select:enabled").val(equipmentType);
|
}
|
if (isPerfects[i].find("input:enabled").length > 0) {
|
isPerfects[i].find("input:enabled").prop('checked', isPerfect);
|
}
|
}
|
}
|
}
|
function onFieldChanged (inputfield, lineno) {
|
document.getElementById('allPage:allForm:cmpid:cmpinnerid:dataBlock:oppTable_L:' + lineno + ':rowCheck').checked = true;
|
setChangeFlg(lineno);
|
}
|
</script>
|
</apex:page>
|