<apex:page Controller="ConsumReassignController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="重新分配">
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
|
<script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
|
<style>
|
.decrypt {
|
position: absolute;
|
top: 0;
|
left: 100%;
|
display: none;
|
text-align: left;
|
padding-left: 5px;
|
}
|
|
a:hover .decrypt {
|
display: block;
|
width: 100px
|
}
|
</style>
|
<script type="text/javascript">
|
function savejs() {
|
if (confirm('是否操作重新分配?')) {
|
blockme();
|
saveBtn();
|
}
|
}
|
function checkAll(checker) {
|
var checkList = document.getElementsByClassName("checker");
|
Array.prototype.filter.call(checkList, function(testElement){
|
testElement.checked = checker.checked;
|
});
|
// j$(escapeVfId('Page:Form:headBlock:postRepeat:' + i + ':post'))[0].checked = checker.checked;
|
}
|
function returnjs() {
|
var rentalApplyId = j$(escapeVfId('allPage:allForm:allBlock:rentalApplyId')).text();
|
var url = "/" + rentalApplyId;
|
window.location.href = url;
|
}
|
function refresh() {
|
var hasError = j$(escapeVfId('allPage:allForm:allBlock:hasError')).text();
|
if (hasError == 'false') {
|
alert('保存成功');
|
returnjs();
|
}
|
}
|
|
AWSService.sfSessionId = '{!GETSESSIONID()}';
|
var staticResource = JSON.parse('{!staticResource}');
|
|
document.body.onload = function () {
|
blockme();
|
DecryptContactName(() => unblockUI());
|
}
|
var awsdata_map = {};
|
|
function DecryptContactName(callback) {
|
|
let no_in_ids = [];
|
j$("[aws-data-id]").each(function (i, e) {
|
let id = e.getAttribute("aws-data-id");
|
if (!(id && awsdata_map.hasOwnProperty(id))) {
|
no_in_ids.push(id);
|
}
|
});
|
if (no_in_ids.length > 0) {
|
AWSService.search(staticResource.searchUrl, JSON.stringify({
|
"dataIds": no_in_ids
|
}), function (data) {
|
if (data.object && data.object.length > 0) {
|
for (let d of data.object) {
|
if (d.dataId) {
|
awsdata_map[d.dataId] = d;
|
}
|
}
|
}
|
BindToTile();
|
if (callback) callback();
|
}, staticResource.token);
|
}
|
else {
|
BindToTile();
|
if (callback) callback();
|
}
|
}
|
|
function BindToTile() {
|
j$("[aws-data-id]").each(function (i, e) {
|
let id = e.getAttribute("aws-data-id");
|
if (id && awsdata_map.hasOwnProperty(id) && awsdata_map[id].trialUser) {
|
j$(e).find(".decrypt").html(awsdata_map[id].trialUser);
|
}
|
});
|
}
|
</script>
|
|
<apex:form id="allForm">
|
<apex:actionFunction name="saveBtn" action="{!saveBtn}" rerender="allBlock,message" onComplete="unblockUI();refresh();">
|
</apex:actionFunction>
|
<apex:outputPanel id="allPanel">
|
<apex:pageBlock title="重新分配" id="allBlock">
|
<apex:pageBlockButtons >
|
<apex:commandButton onclick="savejs(); return false;" value="保存" disabled="{!saveBtn}" rerender="dummy" />
|
<apex:commandButton onclick="returnjs(); return false;" value="返回" rerender="dummy"/>
|
</apex:pageBlockButtons>
|
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
|
<apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
|
<apex:outputText id="rentalApplyId" value="{!rentalApplyId}" style="display:none"/>
|
|
<table class="linetable" border="1" style="border-collapse: collapse;width: 750px;">
|
<colgroup>
|
<col width="25"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="175"/>
|
</colgroup>
|
<tr style="background-color:#DCDCDC;">
|
<th style="text-align:center">全选
|
<apex:inputCheckbox id="checkAll" value="{!checkAll}" onclick="checkAll(this);" />
|
</th>
|
<th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Consum_Apply_Equipment_Set__c.label}</th>
|
<th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Fixture_Model_No_F__c.label}</th>
|
<th style="text-align:center">数量</th>
|
<th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Asset__c.label}</th>
|
<th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}</th>
|
<th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.RAESD_Status__c.label}</th>
|
<th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Trial_User__c.label}</th>
|
<th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Degree_Of_Importance__c.label}</th>
|
</tr>
|
<apex:repeat value="{!lineInfoList}" var="info" id="records">
|
<tr>
|
<!--<td align="center"><apex:inputCheckbox value="{!info.isSelect}" id="rowCheck" disabled="{!IF(info.status=='cantCancel', true, false)}"/></td>-->
|
<td align="center">
|
<apex:inputCheckbox styleClass="checker" value="{!info.isSelect}" id="rowCheck" />
|
</td>
|
<td align="left">
|
<apex:outputField value="{!info.caesd.Consum_Apply_Equipment_Set__c}"></apex:outputField>
|
</td>
|
<td align="left">
|
<apex:outputField value="{!info.caesd.Fixture_Model_No_F__c}"></apex:outputField>
|
</td>
|
<td align="left">
|
<apex:outputField value="{!info.caesd.Trial_Num__c}"></apex:outputField>
|
</td>
|
<td align="left">
|
<apex:outputField value="{!info.caesd.Asset__c}"></apex:outputField>
|
</td>
|
<td align="left">
|
<apex:outputField value="{!info.caesd.SerialNumber_F__c}"></apex:outputField>
|
</td>
|
<td align="center">
|
<apex:outputField value="{!info.caesd.RAESD_Status__c}"></apex:outputField>
|
</td>
|
<td align="center">
|
<a style="position: relative" href="/{!info.caesd.Id}" aws-data-id="{!info.caesd.AWS_Data_Id__c}" title="">
|
<span>{!info.caesd.Trial_User__c}</span>
|
<span class="decrypt"></span>
|
</a>
|
<!-- <apex:outputField value="{!info.caesd.Trial_User__c}"></apex:outputField> -->
|
</td>
|
<td align="center">
|
<apex:outputField value="{!info.caesd.Degree_Of_Importance__c}"></apex:outputField>
|
</td>
|
</tr>
|
</apex:repeat>
|
</table>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
</apex:form>
|
</apex:page>
|