<apex:page id="Page" showHeader="false" sidebar="false" controller="OFSInsReportLayoutController" applyBodyTag="false" applyHtmlTag="false" action="{!init}" lightningStylesheets="true">
|
<!-- <apex:page id="Page" showHeader="false" sidebar="false" standardcontroller="Inspection_Item__c" extensions="OFSInsReportLayoutController" applyBodyTag="false" applyHtmlTag="false" action="{!init}"> -->
|
<html>
|
|
<head>
|
<meta name="viewport" content="width=1150,user-scalable=yes" /> <!-- TODO 1150はコンテンツの幅 -->
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<!-- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> deloitte-zhj 20231114 PIPL还原 -->
|
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
|
|
<style type="text/css">
|
table#AssetTable select {
|
width: 98%;
|
}
|
table#AssetTableHeader .headerCell {
|
box-sizing: border-box;
|
padding: 2px 1px;
|
}
|
table#AssetTable .dataCell {
|
box-sizing: border-box;
|
padding: 1px 1px;
|
}
|
.bPageBlock .dataCol .requiredInput {
|
display: inline-table;
|
}
|
.bPageBlock .detailList .labelCol {
|
width: 1%;
|
}
|
.dateFormat {
|
display: none;
|
}
|
body label, .slds-vf-scope label {
|
font-size: .875rem;
|
}
|
table.detailList th, table.detailList td{
|
|
vertical-align: middle;
|
}
|
body .bPageBlock .detailList .labelCol label, .slds-vf-scope .bPageBlock .detailList .labelCol label {
|
margin-top: -0.125rem;
|
}
|
|
/* body .bPageBlock .detailList .dataCol {
|
width: auto;
|
}*/
|
/*
|
table.detailList td.dataCol.last input {
|
width: 150px;
|
}*/
|
div[field-api="Reporter__c"] .lookupInput {
|
margin-left: 10px;
|
}
|
|
|
body .detailList .dataCol input[type="text"] {
|
min-width: 10% ;
|
margin-top: -4px;
|
}
|
table.detailList td.dataCol.last input[field-api="Responsible_Person_F__c"] {
|
/*margin-left: -5px;*/
|
min-width: 368px;
|
}
|
table.detailList td.dataCol input[field-api="Manual_Department__c"] {
|
margin-left: 5px;
|
min-width: 368px;
|
max-width: 368px;
|
}
|
|
table.detailList td.dataCol input[field-api="Hospital__c"] {
|
min-width: 368px;
|
}
|
body .requiredInput .requiredBlock:after {
|
top: 10px;
|
}
|
body .mytable .requiredInput .requiredBlock:after {
|
top: -3px !important;
|
}
|
|
/*20230719 ljh start*/
|
.mytable .pbSubsection .detailList tr td,.mytable .pbSubsection .detailList th td{
|
height: 40px;
|
line-height: 40px;
|
}
|
.mytable tr td label{
|
margin-right: 0;
|
margin-left: 5px;
|
}
|
body .bPageBlock .mytable .detailList .labelCol{
|
width:10%;
|
height: 40px;
|
line-height: 40px;
|
}
|
.mytable .dataCol select{
|
margin-bottom: 0;
|
}
|
.mytable .detailList .dataCol:nth-child(2)>span{
|
display: inline-block;
|
padding-left: 7px;
|
}
|
body .detailList .dataCol select {
|
min-width: 10%;
|
}
|
/*20230719 ljh end*/
|
.hideDropdown select {
|
display: none
|
}
|
div[field-api="Reporter__c"] select {
|
display: none;
|
}
|
</style>
|
<script type="text/javascript">
|
|
// function openLookup(){
|
|
// // Following is the url of Custom Lookup page. You need to change that accordingly
|
// baseURL = "apex/SearchContactPageLWC?ObjectType=QuoteIrai__c&QueryFieldApiName=Agency1_entrust__c&inputHiddenId=undefined&inputFieldId=Page:mainForm:block:SalesName1&SelectObj=Account&SelectFld=Name";
|
|
// openPopup(baseURL, "lookup", 350, 480, "width=300"+",height=480,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollable=no", true);
|
|
// function openLookup(){
|
// var baseURL = '';
|
// var ObjectType = 'Inspection_Item__c';
|
// var QueryFieldApiName = 'Product_Manual__c';
|
// var ObjectType = 'Inspection_Item__c';
|
// var inputFieldId = '';
|
// var SelectObj = 'Product2';
|
// var SelectFld = 'Name';
|
// var cnt = j$(escapeVfId('ProductCnt')).val();
|
// for (var i = 0; i < cnt; i++) {
|
// inputFieldId = 'Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert';
|
// baseURL = 'apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
|
// // var obj = document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert_lkwgt');
|
// // obj.setAttribute('href', baseURL);
|
// openPopup(baseURL, "lookup", 350, 480, "width=700"+",height=480,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollable=no", true);
|
// }
|
// }
|
|
// }
|
|
|
var name = '';
|
var tmpaid = "";
|
var tmpan = "";
|
var tmpahid = "";
|
var tmpahn = "";
|
var tmpadid = "";
|
var tmpadn = "";
|
var tmpaaid = "";
|
var tmpaan = "";
|
var tmpinsid = "";
|
var tmpinsn = "";
|
var tmprstr = "";
|
var respPersonId = "";
|
sforce.connection.sessionId = '{!$Api.Session_ID}';
|
function toggleIrNameDisabled(checker) {
|
if (checker.checked) {
|
j$(escapeVfId('Page:Form:Block:Ir_Name')).prop("disabled", false);
|
} else {
|
j$(escapeVfId('Page:Form:Block:Ir_Name')).prop("disabled", true);
|
}
|
}
|
function changeAllCheckResult(val) {
|
var cnt = j$(escapeVfId('ProductCnt')).val();
|
for (var i = 0; i < cnt; i++) {
|
if (val == ' ') {
|
document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:' + i + ':AssetRowCheckboxIsNormal').value = '';
|
} else {
|
document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:' + i + ':AssetRowCheckboxIsNormal').value = val;
|
}
|
}
|
}
|
|
function clearAndSearch() {
|
document.getElementById("Page:Form:Block:UnCheckSection:text1").value = "";
|
document.getElementById("Page:Form:Block:UnCheckSection:cond1").value = "equals";
|
document.getElementById("Page:Form:Block:UnCheckSection:val1").value = "";
|
blockme();
|
searchfunc();
|
}
|
|
function searchJs() {
|
blockme();
|
searchfunc();
|
}
|
|
function sortTableJs(key) {
|
blockme();
|
sortTablefunc(key);
|
}
|
|
function exchangeAssetJs() {
|
blockme();
|
exchangeAssetfunc();
|
}
|
|
function saveByRepairJs(aid, an, ahid, ahn, adid, adn, aaid, aan, rstr) {
|
tmpaid = aid;
|
tmpan = an;
|
tmpahid = ahid;
|
tmpahn = ahn;
|
tmpadid = adid;
|
tmpadn = adn;
|
tmpaaid = aaid;
|
tmpaan = aan;
|
tmprstr = rstr;
|
// 点検報告書変更できなくても、修理を作れる?
|
if (tmpinsid == "") {
|
blockme();
|
saveByRepair();
|
} else {
|
openRepair();
|
}
|
}
|
|
function openRepair() {
|
// TODO 今後採番テーブルを使いNameを取得、点検報告書は一時的なものです
|
window.open('/a0J/e?retURL=%2F' + tmpaid + '&{!$Label.OFSInsReport_1}=' + tmpahid + '&{!$Label.OFSInsReport_2}=' + encodeURIComponent(tmpahn) + '&{!$Label.OFSInsReport_3}=' + tmpadid + '&{!$Label.OFSInsReport_4}=' + encodeURIComponent(tmpadn) + '&{!$Label.OFSInsReport_5}=' + tmpaaid + '&{!$Label.OFSInsReport_6}=' + encodeURIComponent(tmpaan) + '&{!$Label.OFSInsReport_7}=' + tmpaid + '&{!$Label.OFSInsReport_8}=' + encodeURIComponent(tmpan) + '&{!$Label.new_repaire_source}=' + encodeURIComponent(tmprstr) + '&{!$Label.OFSInsReport_9}=' + encodeURIComponent(tmpinsn) + '&{!$Label.OFSInsReport_10}=' + tmpinsid, '_blank');
|
}
|
//add by rentx 20210809 全选功能 start
|
function checkAll(checker) {
|
var cnt = j$(escapeVfId('ProductCnt')).val();
|
for (var i = 0; i < cnt; i++) {
|
if (j$(escapeVfId('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':AssetRowCheckbox1')).size() == 0) {
|
break;
|
}
|
document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':AssetRowCheckbox1').checked = checker.checked;
|
}
|
}
|
function checkAll2(checker) {
|
var cnt = j$(escapeVfId('ProductCnt2')).val();
|
var tempi = parseInt(cnt / 900 )+1;
|
for (var j = 0; j < tempi; j++) {
|
for (var i = 0; i < 900; i++) {
|
if (j$(escapeVfId('Page:Form:Block:UnCheckSection:unCheckedInfoListForThousend:'+j+':UnCheckedInfoList:'+i+':AssetRowCheckbox2')).size() == 0) {
|
break;
|
}
|
document.getElementById('Page:Form:Block:UnCheckSection:unCheckedInfoListForThousend:'+j+':UnCheckedInfoList:'+i+':AssetRowCheckbox2').checked = checker.checked;
|
}
|
}
|
|
}
|
//add by rentx 20210809 全选功能 end
|
|
//deloitte-zhj 20231114 PIPL还原
|
|
// AWSService.sfSessionId = '{!GETSESSIONID()}';
|
// //2023 08 30 张赫阳 PIPL页面改造 start
|
|
// //2023 08 30 张赫阳 PIPL页面改造 end
|
// var aws_data = {};
|
// var txid = null;
|
// function Encrypt(callback){
|
// blockme();
|
// //callback();return;
|
// //<input type="hidden" value="{!ir.Id}" id="IrId"/>
|
// let e_id = document.getElementById("IrId");
|
// let url = staticResource.newUrl;
|
|
// debugger
|
// aws_data = {
|
// "phone":j$("[field-api='phone__c']").val() == null ? '' : j$("[field-api='phone__c']").val(),
|
// //deloitte-zhj 20231102 将Responsible_Person__c 改为 Responsible_Person_F__c
|
// "responsiblePerson":j$("[field-api='Responsible_Person__c']").val() == null ? '' : j$("[field-api='Responsible_Person__c']").val(),
|
// };
|
|
// if(e_id && e_id.value && document.getElementById("Page:Form:Block:AWS_Data_Id__c").value){
|
// url = staticResource.updateUrl;
|
// aws_data.dataId = document.getElementById("Page:Form:Block:AWS_Data_Id__c").value;
|
// }
|
|
|
|
// AWSService.post(url, JSON.stringify([aws_data]), function(data){
|
|
// if (!(data && data.object && data.object.length)) {
|
// console.log('AWSService.post failed');
|
// return;
|
// }
|
// let aws_data1 = data.object[0];
|
// txid = data.txId;
|
|
// document.getElementById("Page:Form:Block:AWS_Data_Id__c").value = aws_data1.dataId;
|
// j$("[field-api='phone__c']").val(aws_data1.phone);
|
// j$("[field-api='Responsible_Person__c']").val(aws_data1.responsiblePerson);
|
|
// if (callback) {
|
// debugger
|
// callback();
|
// }
|
// }, staticResource.token);
|
// }
|
//deloitte-zhj 20231114 PIPL还原 end
|
|
function saveBtnJs(){
|
//deloitte-zhj 20231114 PIPL还原
|
//document.querySelector("[field-api='Responsible_Person_F__c']").value = document.getElementById('Page:Form:contactId').value;
|
//Encrypt(saveBtn);
|
blockme();
|
saveBtn();
|
}
|
function submitJs(){
|
//Encrypt(submit);deloitte-zhj 20231114 PIPL还原 ''
|
blockme();
|
submit();
|
}
|
function showPDFJs(){
|
//deloitte-zhj 20231114 PIPL还原
|
//debugger;
|
//Encrypt(showPDF);
|
blockme();
|
showPDF();
|
}
|
|
function afterSaveBtnJs(){
|
//Trans();
|
unblockUI();
|
}
|
|
function afterSubmitJs(){
|
//Trans();
|
unblockUI();
|
}
|
|
function afterShowPDFJs(){
|
//deloitte-zhj 20231114 PIPL还原
|
// if (!HasError()) {
|
// Trans(function(){
|
// window.location.href = '/apex/InsReportPDFOuter?id=' + document.getElementById("IrId").value;
|
// });
|
// }else{
|
// Decrypt(aws_data);
|
// unblockUI();
|
// }
|
|
if (!HasError()) {
|
unblockUI();
|
window.location.href = '/apex/InsReportPDFOuter?id=' + document.getElementById("IrId").value;
|
}else{
|
unblockUI();
|
}
|
|
}
|
|
function HasError(){
|
|
// if (IsAddmessage) {
|
// return true;
|
// }
|
let e = document.getElementById("Page:Form:MessageP");
|
if (!e) {
|
return false;
|
}
|
|
let divs = j$(e).find("div.message");
|
for (let i = 0; i < divs.length; i++) {
|
for (let j = 0; j < divs[i].classList.length; j++) {
|
for(let clsi in divs[i].classList){let cls=divs[i].classList[clsi];
|
if (typeof cls == 'string' && cls.indexOf('error')>-1) {
|
return true;
|
}
|
}
|
|
}
|
|
}
|
|
|
return false;
|
}
|
|
//deloitte-zhj 20231114 PIPL还原 start
|
// function Decrypt(data){
|
|
// j$("[field-api='phone__c']").val(data.phone);
|
// j$("[field-api='Responsible_Person__c']").val(data.responsiblePerson);
|
|
|
// }
|
|
// function Trans(callback){
|
// debugger
|
// console.log('txid = ' + txid);
|
// let payload = {
|
// "txId":txid,
|
// "sfRecordId":document.getElementById("IrId").value,
|
// "isSuccess":(txid && !HasError()) ? 1 : 0
|
// };
|
// AWSService.post(staticResource.transactionUrl, JSON.stringify(payload), function(result){
|
// Decrypt(aws_data);
|
// if(callback)callback();
|
// unblockUI();
|
// }, staticResource.token);
|
// }
|
|
// function Query(){
|
// let ele = document.getElementById("Page:Form:Block:AWS_Data_Id__c");
|
// if (ele && ele.value) {
|
// blockme();
|
// AWSService.query(staticResource.queryUrl, ele.value, function(data){
|
// if (data && data.object) {
|
// Decrypt(data.object);
|
// }
|
// unblockUI();
|
// }, staticResource.token);
|
// }
|
// }
|
// //2023 08 30 张赫阳 PIPL页面改造 start
|
// function returnName(){
|
// document.querySelector("[field-api='Responsible_Person_F__c']").value = name;
|
// }
|
// function Query2(){
|
// debugger
|
// replaceSearchContactLookup();
|
// var contactAwsIdMapStr = document.getElementById('Page:Form:contactAwsIdMap').value;
|
// console.log('contactAwsIdMapStr:'+contactAwsIdMapStr);
|
// if(contactAwsIdMapStr != ''){
|
// console.log('enter q2');
|
// let agencyNodeId = document.querySelector("[field-api='Agency_Contact_Id__c']").id + '_lkid';
|
// let responsibleNodeId = document.querySelector("[field-api='Responsible_Person_F__c']").id + '_lkid';
|
// let responsibleContactId = contactAwsIdMap.Responsible_Person_F__c;
|
// if (responsibleContactId) {
|
|
// AWSService.query(staticResourceContact.queryUrl, responsibleContactId, function(data){
|
// if (data && data.object) {
|
// console.log('data.object.lastname '+ data.object.lastName);
|
// j$("[field-api='Responsible_Person_F__c']").val(data.object.lastName);
|
// document.getElementById(document.querySelector("[field-api='Responsible_Person_F__c']").id+'_lkold').value = data.object.lastName
|
// name = data.object.lastName;
|
// console.log('name = ' + name);
|
// let respPersonNode = document.getElementById(responsibleNodeId);
|
// //respPersonNode.value = '{!ir.Responsible_Person_F__c}'; //deloitte-zhj 20231102
|
// respPersonNode.value = data.object.sfRecordId;
|
// //document.getElementById('Page:Form:contactId').value = '{!ir.Responsible_Person_F__c}';
|
// document.getElementById('Page:Form:contactId').value = data.object.sfRecordId; //deloitte-zhj 20231102
|
// }
|
// }, staticResourceContact.token);
|
// }
|
// unblockUI();
|
// }
|
// }
|
// var newSearchContactWindow = null;
|
// function searchContact() {
|
// debugger;
|
// //1. Check account value
|
// //let accountNodeId = document.querySelector("[field-api='Hospital__c']").id + '_lkid';
|
// //deloitte-zhj 20231105 获取accountValue start
|
// let accountValue1 = '{!ir.Hospital__c}';
|
// let accountValue = '';
|
// if(accountValue1){
|
// accountValue = accountValue1;
|
// }else{
|
// let accountNodeId = document.querySelector("[field-api='Hospital__c']").id + '_lkid';
|
// let accountValue2 = document.getElementById(accountNodeId).value;
|
// accountValue = accountValue2;
|
// }
|
// //deloitte-zhj 20231105 获取accountValue end
|
// //let responsibleNodeId = document.querySelector("[field-api='Responsible_Person_F__c']").id + '_lkid';
|
// let searchContactKeyWord = document.querySelector("[field-api='Responsible_Person_F__c']").value;
|
// let responsibleNodeId = document.getElementById('Page:Form:contactId').value == null ? '' : document.getElementById('Page:Form:contactId').value ;
|
// console.log(accountValue);
|
// if (accountValue != '000000000000000') {
|
// let baseUrl = "/apex/SearchContactForReport";
|
// let suffixUrl = "?contactId=" + responsibleNodeId + "&accountId=" + accountValue+"&searchContactKeyWord=" + searchContactKeyWord+"&Type=OFS";
|
// let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no';
|
// newSearchContactWindow = window.open(baseUrl + suffixUrl, 'Popup', newSearchContactParam);
|
// if (window.focus) {
|
// newSearchContactWindow.focus();
|
// }
|
// return false;
|
// } else {
|
// alert('请先选择医院名');
|
// }
|
// }
|
// function closePopupWindow() {
|
// debugger
|
// if (null != newSearchContactWindow) {
|
// newSearchContactWindow.close();
|
// }
|
// let contactInfoStr = document.getElementById('Page:Form:contactId').value;
|
// console.log('closePopup:' + contactInfoStr);
|
// let contactInfo = JSON.parse(contactInfoStr);
|
// //let contactNodeId = document.querySelector("[data-id='Contact_Name__c']").id + '_lkid';
|
// //'{!ir.Responsible_Person_F__c}' = contactInfo.ContactId;
|
// //document.querySelector("[data-id='Contact_Name__c']").value = contactInfo.Name;
|
// document.querySelector("[field-api='Responsible_Person_F__c']").value = contactInfo.Name;
|
// document.getElementById(document.querySelector("[field-api='Responsible_Person_F__c']").id + '_lkold').value = contactInfo.Name;
|
// document.getElementById(document.querySelector("[field-api='Responsible_Person_F__c']").id + '_lkid').value = contactInfo.ContactId;
|
// document.getElementById('Page:Form:contactId').value = contactInfo.ContactId;
|
// }
|
|
// function replaceSearchContactLookup() {
|
// console.log('======================');
|
// document.querySelector("[field-api='Responsible_Person_F__c']").parentNode.children[2].removeAttribute("href");
|
// document.querySelector("[field-api='Responsible_Person_F__c']").parentNode.children[2].onclick = function() {
|
// searchContact();
|
// };
|
// }
|
// //2023 08 30 张赫阳 PIPL页面改造 end
|
|
// j$(function(){
|
// Query2();
|
// replaceSearchContactLookup();
|
// })
|
|
//deloitte-zhj 20231114 PIPL还原 end
|
|
</script>
|
<title>{!ir.Name}</title>
|
</head>
|
<body>
|
<!-- HWAG-B4Q3G5 20180918Start -->
|
<apex:form id="Form" style="margin:0 5px;" onkeydown="if(event.keyCode==13){return false;}">
|
<!-- HWAG-B4Q3G5 20180918End -->
|
<!-- //2023 08 30 张赫阳 PIPL页面改造 start -->
|
<!-- deloitte-zhj 20231114 PIPL还原 start -->
|
<!-- <apex:inputHidden value="{!ir.Responsible_Person_F__c}" id="contactId" />
|
<apex:inputHidden value="{!contactAwsIdMap}" id="contactAwsIdMap" /> -->
|
<!-- //2023 08 30 张赫阳 PIPL页面改造 end -->
|
<script type="text/javascript">
|
// 保存後、新規の報告書IDを取得
|
tmpinsid = '{!ir.Id}';
|
tmpinsn = '{!JSENCODE(ir.Name)}';
|
//var IsAddmessage = {IsAddmessage};
|
var isPDF = {!isPDF};
|
|
</script>
|
<!-- deloitte-zhj 20231114 PIPL还原 去除Query2() -->
|
<apex:actionFunction name="searchfunc" action="{!searchBtn}" rerender="Form,Block,UnCheckSection" onComplete="unblockUI();"></apex:actionFunction>
|
|
<apex:actionFunction name="exchangeAssetfunc" action="{!exchangeAsset}" rerender="Form" onComplete="unblockUI();"></apex:actionFunction> <!-- deloitte-zhj20231105 -->
|
|
<apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="Form" onComplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!sortKey}" value="" />
|
</apex:actionFunction>
|
|
<apex:actionFunction name="getAssetFromHp" action="{!getAssetFromHp}" rerender="Form" onComplete="unblockUI();" />
|
|
<apex:actionFunction name="saveByRepair" action="{!saveBtn}" rerender="Form" onComplete="unblockUI();openRepair();"/>
|
|
<apex:actionFunction name="saveBtn" action="{!saveBtn}" rerender="Form" onComplete="afterSaveBtnJs();"/>
|
<apex:actionFunction name="submit" action="{!submit}" rerender="Form" onComplete="afterSubmitJs();"/>
|
<apex:actionFunction name="showPDF" action="{!showPDF}" rerender="Form" onComplete="afterShowPDFJs();"/>
|
|
<apex:outputPanel id="MessageP">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
|
<div><apex:pageBlock mode="maindetail" Id="Block" rendered="{!initFlag}">
|
<div style="position: relative;top:0;width:100%;">
|
<table>
|
<tr>
|
<td><apex:outputLabel value="{!$ObjectType.Inspection_Report__c.Label}:" style="font-size:18px;font-weight:bold;padding-right: 5px;"/></td>
|
<td>( <apex:inputCheckBox value="{!ir.Name_Manual__c}" id="Name_Manual" onchange="toggleIrNameDisabled(this);return false;"/>
|
<apex:outputLabel value="{!$ObjectType.Inspection_Report__c.fields.Name_Manual__c.Label}" for="Name_Manual"/>)
|
<apex:inputField value="{!ir.Name}" id="Ir_Name" html-disabled="disabled" style="border-width:1px;font-size:18px;font-weight:bold;padding-right:20px;margin-right: 10px;-webkit-text-fill-color:black;"/>
|
</td>
|
<td style="text-align: center;padding-right: 90px;"><input class="btn" type="Button" style="width:80px;" value="保存" action="" onclick="saveBtnJs();" rerender="Form" onComplete="unblockUI();"/></td>
|
<td style="text-align: center;padding-right: 90px;"><input class="btn" type="Button" value="提交" action="" onclick="submitJs();" style="width:80px" rerender="Form" id="submitButton" onComplete="unblockUI();"/></td>
|
<td style="text-align: center;padding-right: 90px;"><apex:commandButton style="width:90px;" value="关闭窗口" onclick="location.href='/apex/OFSWindowClose';return false;" id="closeButton"/></td>
|
<td style="text-align: center;"><input class="btn" type="Button" style="width:80px;" value="PDF" action="" onclick="showPDFJs();" rerender="Form" onComplete="unblockUI();" id="showPDF"/></td>
|
</tr>
|
</table>
|
<apex:pageBlockSection title="{!sectionList[0].title}" columns="{!sectionList[0].column}" showHeader="{!sectionList[0].showHeader}" rendered="{!sectionList.size>0}">
|
<apex:repeat value="{!sectionList[0].sectionItemList}" var="sectionItem" id="SectionItemList">
|
<apex:outputField value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&NOT(sectionItem.isInput)}"/>
|
<apex:inputField style="width:{!sectionItem.width};height:{!sectionItem.height};" value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&§ionItem.isInput}" required="{!sectionItem.isRequired}" html-tabindex="{!sectionItem.index}"/>
|
<apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&Not(isNull(sectionItem.customizeLable))}">
|
<apex:outputLabel value="{!sectionItem.customizeLable}"/>
|
<apex:outputPanel layout="none">
|
<apex:repeat value="{!sectionItem.apiList}" var="api">
|
<!-- 保存後、病院は強制outputField -->
|
<apex:outputPanel layout="none" rendered="{!api == 'Hospital__c' && ir.Id != ''}">
|
<apex:outputField value="{!ir[api]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!NOT(api == 'Hospital__c' && ir.Id != '')}">
|
<apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
|
<apex:inputField value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
|
<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
|
<apex:outputField value="{!ir[api]}"/>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
</apex:repeat>
|
</apex:outputPanel>
|
</apex:pageblockSectionItem>
|
<apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&(isNull(sectionItem.customizeLable))}">
|
<apex:outputPanel layout="none">
|
<apex:repeat value="{!sectionItem.apiList}" var="api">
|
<apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/>
|
<apex:inputField value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
|
<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
|
<apex:outputField value="{!ir[api]}"/>
|
</apex:outputPanel>
|
</apex:repeat>
|
</apex:outputPanel>
|
</apex:pageblockSectionItem>
|
<apex:pageBlockSectionItem rendered="{!sectionItem.isDummy}"/>
|
</apex:repeat>
|
</apex:pageBlockSection>
|
</div>
|
<div style="position: relative;top:-20px;height:550px;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling: touch;">
|
<input type="hidden" value="{!ir.Id}" id="IrId"/>
|
<!-- zhj 新方案改造 2022-12-05 start-->
|
<!-- <apex:inputHidden value="{!ir.Responsible_Person_Encrypted__c}" id="Responsible_Person_Encrypted__c"/>
|
<apex:inputHidden value="{!ir.phone_Encrypted__c}" id="phone_Encrypted__c"/> -->
|
<!-- zhj 新方案改造 2022-12-05 end-->
|
<!-- deloitte-zhj 20231114 PIPL还原 -->
|
<!-- <apex:inputHidden value="{!ir.AWS_Data_Id__c}" id="AWS_Data_Id__c"/> -->
|
|
<apex:repeat value="{!sectionList}" var="section" id="SectionList">
|
<apex:pageBlockSection title="{!section.title}" columns="{!section.column}" showHeader="{!section.showHeader}" rendered="{!!section.isTop}" html-class="mytable" id="leval">
|
<apex:repeat value="{!section.sectionItemList}" var="sectionItem" id="SectionItemList">
|
<apex:outputField html-field-api="{!sectionItem.api}" value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&&NOT(sectionItem.isInput)}"/>
|
<!-- 20230719 ljh -->
|
<!-- <apex:inputField html-field-api="{!sectionItem.api}" style="width:{!sectionItem.width};height:{!sectionItem.height};margin-left:17px;" value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&§ionItem.isInput}" required="{!sectionItem.isRequired}" html-tabindex="{!sectionItem.index}"/> -->
|
<apex:inputField html-field-api="{!sectionItem.api}" style="width:{!sectionItem.width};height:{!sectionItem.height};" value="{!ir[sectionItem.api]}" rendered="{!NOT(sectionItem.isDummy)&&NOT(sectionItem.isCustomize)&§ionItem.isInput}" required="{!sectionItem.isRequired}" html-tabindex="{!sectionItem.index}"/>
|
<apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&Not(isNull(sectionItem.customizeLable))}" id="leval1">
|
<apex:outputLabel value="{!sectionItem.customizeLable}" />
|
<apex:outputPanel layout="none">
|
<apex:repeat value="{!sectionItem.apiList}" var="api" id="leval2">
|
<!-- 保存後、病院は強制outputField -->
|
<apex:outputPanel layout="none" rendered="{!api == 'Hospital__c' && ir.Id != ''}">
|
<apex:outputField html-field-api="api" value="{!ir[api]}" style="padding-left:15px;"/>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!NOT(api == 'Hospital__c' && ir.Id != '')}">
|
<!-- 20230719 ljh -->
|
<!-- <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/> -->
|
<apex:outputLabel style="font-weight: bold;" value="{!sectionItem.apiLabelMap[api]}"/>
|
<!-- //2023 08 30 张赫阳 PIPL页面改造 start -->
|
<apex:inputField html-field-api="{!api}" value="{!ir[api]}" id="test5" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='')&&(sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
|
<!-- <apex:inputText html-field-api="{!api}" value="{!ir[api]}" onclick="searchContact()" style="{!sectionItem.apiStyleMap[api]}" rendered="{!api=='Responsible_Person_F__c'}" required="{!sectionItem.apiRequireMap[api]}"/> -->
|
<!-- <script>
|
// let respPersonNode = document.getElementById(document.querySelector("[field-api='Responsible_Person_F__c']").id + '_lkid');
|
// respPersonNode.value = '{!ir.Responsible_Person_F__c}';
|
replaceSearchContactLookup();
|
function replaceSearchContactLookup() {
|
document.querySelector("[field-api='Responsible_Person_F__c']").parentNode.children[2].removeAttribute("href");
|
document.querySelector("[field-api='Responsible_Person_F__c']").parentNode.children[2].onclick = function() {
|
searchContact();
|
};
|
}
|
Query2();
|
function Query2(){
|
var contactAwsIdMap = JSON.parse('{!contactAwsIdMap}');
|
console.log('enter q2');
|
//let agencyNodeId = document.querySelector("[field-api='Agency_Contact_Id__c']").id + '_lkid';
|
let responsibleNodeId = document.querySelector("[field-api='Responsible_Person_F__c']").id + '_lkid';
|
let responsibleContactId = contactAwsIdMap.Responsible_Person_F__c;
|
if (responsibleContactId) {
|
|
AWSService.query(staticResourceContact.queryUrl, responsibleContactId, function(data){
|
if (data && data.object) {
|
console.log('data.object.lastname '+ data.object.lastName);
|
j$("[field-api='Responsible_Person_F__c']").val(data.object.lastName);
|
document.getElementById(document.querySelector("[field-api='Responsible_Person_F__c']").id+'_lkold').value = data.object.lastName
|
name = data.object.lastName;
|
console.log('name = ' + name);
|
let respPersonNode = document.getElementById(responsibleNodeId);
|
respPersonNode.value = '{!ir.Responsible_Person_F__c}';
|
document.getElementById('Page:Form:contactId').value = '{!ir.Responsible_Person_F__c}';
|
}
|
}, staticResourceContact.token);
|
}
|
unblockUI();
|
}
|
</script> -->
|
<!-- //2023 08 30 张赫阳 PIPL页面改造 end -->
|
<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
|
<!-- <apex:outputField value="{!ir[api]}"/> -->
|
{!ir[api]}
|
</apex:outputPanel>
|
</apex:outputPanel>
|
</apex:repeat>
|
</apex:outputPanel>
|
</apex:pageblockSectionItem>
|
<apex:pageblockSectionItem rendered="{!NOT(sectionItem.isDummy)&&(sectionItem.isCustomize)&&(isNull(sectionItem.customizeLable))}">
|
<apex:outputPanel layout="none">
|
<apex:repeat value="{!sectionItem.apiList}" var="api">
|
<!-- 20230719 ljh -->
|
<!-- <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="{!sectionItem.apiLabelMap[api]}"/> -->
|
<apex:outputLabel style="font-weight: bold;" value="{!sectionItem.apiLabelMap[api]}"/>
|
<!-- //2023 08 30 张赫阳 PIPL页面改造 end -->
|
<apex:inputField html-field-api="api" value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='')&& (sectionItem.isInput || sectionItem.apiInputMap[api])}" required="{!sectionItem.apiRequireMap[api]}" html-tabindex="{!sectionItem.index}"/>
|
<!-- <apex:inputText html-field-api="{!api}" value="{!ir[api]}" style="{!sectionItem.apiStyleMap[api]}" rendered="{!api=='Responsible_Person_F__c'}" required="{!sectionItem.apiRequireMap[api]}"/> -->
|
<!-- //2023 08 30 张赫阳 PIPL页面改造 end -->
|
<apex:outputPanel style="display:inline-block;{!sectionItem.apiStyleMap[api]}" rendered="{!NOT(api=='') && NOT((sectionItem.isInput || sectionItem.apiInputMap[api]))}">
|
<apex:outputField value="{!ir[api]}"/>
|
</apex:outputPanel>
|
</apex:repeat>
|
</apex:outputPanel>
|
</apex:pageblockSectionItem>
|
<apex:pageBlockSectionItem rendered="{!sectionItem.isDummy}"/>
|
</apex:repeat>
|
</apex:pageBlockSection>
|
</apex:repeat>
|
<!-- zzm add 230726 start -->
|
<apex:outputPanel >
|
<table class="edittable detailList" border="0" style="border-collapse: collapse; table-layout:fixed;margin-bottom:20px;margin-top: -10px;">
|
<tr>
|
<th class='labelCol vfLabelColTextWrap last ' style='width: 10%;text-align: right;font-size: .875rem;'>{!$ObjectType.Inspection_Report__c.fields.Agency__c.Label}</th>
|
<td class='dataCol last '><apex:inputField value="{!ir.Agency__c}" id="Agency" style="min-width: 368px;margin-left:5px;" /></td>
|
<th class='labelCol vfLabelColTextWrap last ' style='width: 10%;text-align: right;font-size: .875rem;'>{!$ObjectType.Inspection_Report__c.fields.Agency_Contact_Id__c.Label}</th>
|
<!-- //2023 08 30 张赫阳 PIPL页面改造 start -->
|
<td class='dataCol last '><apex:inputField html-field-api="Agency_Contact_Id__c" value="{!ir.Agency_Contact_Id__c}" id="Agency_Contact_Id" style="width:160px;margin-left:5px;"/></td>
|
<!-- //2023 08 30 张赫阳 PIPL页面改造 end -->
|
</tr>
|
</table>
|
</apex:outputPanel>
|
<!-- zzm add 230726 end -->
|
<script type="text/javascript">
|
// 病院の左側「刷新」ボタン追加
|
var labels = document.getElementsByTagName("label");
|
for (var i = 0; i < labels.length; i++) {
|
var lbl = labels[i];
|
if (lbl.innerText == "医院" || lbl.innerText == "病院") {
|
var html = lbl.parentNode.innerHTML;
|
html = "<input type='button' value='刷新' class='btn' onclick='blockme();getAssetFromHp();' /> " + html;
|
lbl.parentNode.innerHTML = html;
|
break;
|
}
|
}
|
</script>
|
<!-- zzm add 230726 start -->
|
<apex:pageBlockSection title="医院科室情况调查" columns="1" id="UnCheckSection1" >
|
<apex:outputPanel >
|
<table class="edittable" border="0" style="border-collapse: collapse; table-layout:fixed;">
|
<tr>
|
<td>{!$ObjectType.Inspection_Report__c.fields.Department_Leakage_Frequency__c.Label}:</td>
|
<td><apex:inputField value="{!ir.Department_Leakage_Frequency__c}" style="width: 90%" required="true"/></td>
|
<td>{!$ObjectType.Inspection_Report__c.fields.Original_Leakage_Device__c.Label}:</td>
|
<td>
|
<apex:inputField value="{!ir.Original_Leakage_Device__c}" style="width: 90%" required="true"/>
|
</td>
|
<td>{!$ObjectType.Inspection_Report__c.fields.Leakage_Status__c.Label}:</td>
|
<td>
|
<apex:inputField value="{!ir.Leakage_Status__c}" id="Leakage_Status" required="true" style="width: 90%"/>
|
</td>
|
|
</tr>
|
|
<tr>
|
<td>{!$ObjectType.Inspection_Report__c.fields.Disinfectant_type__c.Label}:</td>
|
<td><apex:inputField value="{!ir.Disinfectant_type__c}" required="true" style="width: 90%"/></td>
|
<td>{!$ObjectType.Inspection_Report__c.fields.Cleaning_Solution_Brand__c.Label}:</td>
|
<td><apex:inputField value="{!ir.Cleaning_Solution_Brand__c}" style="width: 90%" required="true"/></td>
|
<td>{!$ObjectType.Inspection_Report__c.fields.Disinfection_Method__c.Label}:</td>
|
<td><apex:inputField value="{!ir.Disinfection_Method__c}" style="width: 90%" required="true"/></td>
|
|
</tr>
|
<tr>
|
<td>{!$ObjectType.Inspection_Report__c.fields.Escrow__c.Label}:</td>
|
<td><apex:inputField value="{!ir.Escrow__c}" style="width: 90%" required="true"/></td>
|
<td>{!$ObjectType.Inspection_Report__c.fields.Third_Party_Maintenance__c.Label}:</td>
|
<td><apex:inputField value="{!ir.Third_Party_Maintenance__c}" style="width: 90%" required="true"/></td>
|
<td>{!$ObjectType.Inspection_Report__c.fields.CustomerSuggestion__c.Label}:</td>
|
<td>
|
<apex:inputField value="{!ir.CustomerSuggestion__c}" style="width: 90%"/>
|
</td>
|
|
</tr>
|
|
</table>
|
<!-- zzm add 230726 end -->
|
</apex:outputPanel>
|
</apex:pageBlockSection>
|
<apex:pageBlockSection title="设备点检结果" columns="1" id="CheckSection">
|
<input type="hidden" id="ProductCnt" value="{!productCount}" />
|
|
<apex:outputPanel style="padding-top:0px;">
|
<table width="100%">
|
<tr>
|
<td> </td>
|
<td width="120px">
|
<span style='display: inline-block;line-height: 30px; vertical-align: middle; margin-top: -18px;'>全</span>
|
<select style="vertical-align:text-bottom" id="allCheckResult" size="1" onchange="changeAllCheckResult(this.value);">
|
<option value=" ">--无--</option>
|
<!-- 默认全OK -->
|
<option value="OK" selected = "selected" >OK</option>
|
<!-- 默认全OK -->
|
<option value="NG">NG</option>
|
<!-- add by rentx 20210630 start -->
|
<option value="医院放弃">医院放弃</option>
|
<!-- add by rentx 20210630 end -->
|
</select>
|
</td>
|
<td width="485px"> </td>
|
</tr>
|
</table>
|
<!-- TODO minus scroll with -->
|
<table id="AssetTableHeader" class="list" style="border-bottom-width: 0px; font-size:13px;" border="0" cellspacing="0" cellpadding="0">
|
<tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);background: #f2f3f3;">
|
<!-- add by rentx 20210809 -->
|
<th class="headerCell" style="width:14px"> <apex:inputCheckbox id="checkAll1" onclick="checkAll(this)" style="margin-left: 5px;"/> </th>
|
<!-- <th class="headerCell" style="width:14px" /> -->
|
<!-- add by rentx 202120809 -->
|
<th class="headerCell" style="width:24px">No.</th>
|
<th class="headerCell" style="width:60px">{!$ObjectType.Asset.fields.Asset_situation__c.label}</th>
|
<th class="headerCell" style="width:302px">{!$ObjectType.Asset.fields.Name.label}</th>
|
<th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.SerialNumber__c.Label}</th>
|
<!-- TODO 項目の作成 -->
|
<th class="headerCell" style="width:80px">上次点检日</th>
|
<th class="headerCell" style="width:100px">上次修理完毕日</th>
|
<th class="headerCell" style="width:80px">
|
{!$ObjectType.Inspection_Item__c.Fields.ItemStatus__c.Label}
|
</th>
|
<th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Fault_Classification1__c.Label}</th>
|
<th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Fault_Classification2__c.Label}</th>
|
<th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Fault_Classification3__c.Label}</th>
|
<th class="headerCell" style="width:100px">{!$ObjectType.Inspection_Item__c.Fields.Diagnosis__c.Label}</th>
|
<!-- add by rentx 20210630 -->
|
<th class="headerCell" style="width:85px">{!$ObjectType.Inspection_Item__c.Fields.Abandonment_Reasons__c.Label}</th>
|
<!-- <th class="headerCell" style="width:16px"></th> -->
|
<!-- add by rentx 20210630 -->
|
<!-- <th class="headerCell" style="width:35px">{!$ObjectType.Asset.Fields.Create_repair__c.Label}</th> -->
|
<!-- <td class="headerScroll"></td> -->
|
</tr>
|
</table>
|
|
<div style="height:350px; width:100%; overflow:auto;">
|
<table style="border-collapse:collapse; width:100%;" id="AssetTable">
|
<apex:variable value="{!1}" var="cnt" />
|
<apex:repeat value="{!checkedInfoList}" var="cInfo" id="CheckedInfoList" >
|
<tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);">
|
<td style="width:33px">
|
<apex:inputCheckbox value="{!cInfo.rec_checkBox_c}" id="AssetRowCheckbox1" rendered="{!Not(cInfo.IsManual)}"/>
|
<apex:outputText value="{!cInfo.IsManual}" id="IsManual" style="display:none;" />
|
<input type="hidden" value="{!cInfo.rec.Id}" id="CheckAssetId"/>
|
</td>
|
<td style="font-weight:bold; text-align:right; width:24px;">{!cnt}</td>
|
<td class="dataCell" style="width:60px">
|
<apex:outputField value="{!cInfo.rec.Asset_situation__c}"/>
|
</td>
|
<td class="dataCell" style="width:302px">
|
<!-- HWAG-BDCA9J 添加了 onclick blurProduct 内容 start-->
|
<apex:outputField value="{!cInfo.rec.Name}" rendered="{!Not(cInfo.IsManual)}"/>
|
<apex:inputField value="{!cInfo.ah.Product_Manual__c}" id="Assert" style="width:100%;" rendered="{!cInfo.IsManual}"
|
onclick="if(!blurProduct(this))return false;"/>
|
<!-- HWAG-BDCA9J 添加了 onclick blurProduct 内容 end-->
|
</td>
|
<td class="dataCell" style="width:100px">
|
<apex:outputField value="{!cInfo.ah.SerialNumber__c}" rendered="{!Not(cInfo.IsManual)}"/>
|
<apex:inputField value="{!cInfo.ah.SerialNo_Manual__c}" id="SerialNo" style="width:90%;" rendered="{!cInfo.IsManual}" />
|
</td>
|
<td class="dataCell" style="width:80px">
|
<apex:outputField value="{!cInfo.rec.Final_Examination_Date__c}" rendered="{!Not(cInfo.IsManual)}"/>
|
</td>
|
<td class="dataCell" style="width:100px">
|
<apex:outputField value="{!cInfo.rec.After_repair_last_internal_check_day__c}" rendered="{!Not(cInfo.IsManual)}"/>
|
</td>
|
<td class="dataCell" style="width:80px">
|
<apex:inputField value="{!cInfo.ah.ItemStatus__c}" id="AssetRowCheckboxIsNormal" style="width:98%"/>
|
</td>
|
<td class="dataCell" style="width:100px">
|
<apex:inputField value="{!cInfo.ah.Fault_Classification1__c}" />
|
</td>
|
<td class="dataCell" style="width:100px">
|
<apex:inputField value="{!cInfo.ah.Fault_Classification2__c}" id="cat2" />
|
</td>
|
<td class="dataCell" style="width:100px">
|
<apex:inputField value="{!cInfo.ah.Fault_Classification3__c}" id="cat3" />
|
</td>
|
<td class="dataCell" style="width:100px">
|
<apex:inputField value="{!cInfo.ah.Diagnosis__c}" style="width:98%"/>
|
</td>
|
<!-- add by rentx 20210630 -->
|
<td class="dataCell" style="width:85px">
|
<apex:inputField value="{!cInfo.ah.Abandonment_Reasons__c}" style="width:93%" />
|
</td>
|
<!-- add by rentx 20210630 -->
|
<!-- <td class="dataCell" style="width:35px">
|
<apex:outputPanel layout="none" rendered="{!Not(cInfo.IsManual)}">
|
<a href="#" onclick="saveByRepairJs('{!cInfo.rec.Id}', '{!JSENCODE(cInfo.rec.Name)}', '{!cInfo.rec.Hospital__r.Id}', '{!JSENCODE(cInfo.rec.Hospital__r.Name)}', '{!cInfo.rec.Department_Class__r.Id}', '{!JSENCODE(cInfo.rec.Department_Class__r.Name)}', '{!cInfo.rec.Account.Id}', '{!JSENCODE(cInfo.rec.Account.Name)}', '只修理');">■</a>
|
</apex:outputPanel>
|
</td> -->
|
</tr>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</table>
|
</div>
|
</apex:outputPanel>
|
|
</apex:pageBlockSection>
|
|
<apex:outputPanel id="ButtonPanel">
|
<table style="width:100%;margin:10px 0 10px 0;">
|
<tr>
|
<td>
|
<apex:commandButton value="行追加" action="{!addNewRows}" disabled="{!Not($ObjectType.Inspection_Item__c.createable)}"
|
style="margin-left:10px;float:left;" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" />
|
<apex:commandButton value="刷新选中的保有设备" onclick="exchangeAssetJs();return false;" rerender="dummy" />
|
<!-- <apex:commandButton value="刷新选中的保有设备" action="{!exchangeAsset}" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" /> -->
|
<!-- <apex:commandButton value="刷新医院下的全部保有设备" action="{!getAssetFromHp}" onclick="blockme();" oncomplete="unblockUI();" rerender="Form" /> -->
|
</td>
|
</tr>
|
</table>
|
</apex:outputPanel>
|
<table>
|
<tr>
|
<td><div id="ErrorName" style="color: red;font-weight: bold;">{!alertMessage}</div>
|
</td>
|
</tr>
|
</table>
|
<!-- HWAG-B4Q3G5 20180918Start -->
|
<apex:pageBlockSection title="未选保有设备字段历史" columns="1" id="UnCheckSection" onkeydown="if(event.keyCode==13){searchJs(); return false;}">
|
<!-- HWAG-B4Q3G5 20180918End -->
|
<input type="hidden" id="ProductCnt2" value="{!productCount2}" />
|
<apex:outputPanel >
|
<!-- <div align="center">
|
<apex:outputPanel id="countorder">第{!countorder}页</apex:outputPanel>
|
<apex:commandButton value="上一页" action="{!UpPage}" onclick="blockme();" disabled="{!IF(countorder=1,true,false)}" oncomplete="unblockUI();" reRender="Form"/>
|
<apex:commandButton value="下一页" action="{!DownPage}" onclick="blockme();" disabled="{!IF(countorder >=nowAssetcount ,true,false)}" oncomplete="unblockUI();" rerender="Form"/>
|
<apex:outputPanel id="NowOrdercount">共{!nowAssetcount}页</apex:outputPanel>
|
</div> -->
|
|
<table>
|
<tr>
|
<td style="width:85px" align="right">选择条件</td>
|
<td style="width:85px" align="right"><apex:selectList value="{!text1}" id="text1" size="1" style="width:80px"><apex:selectOptions value="{!textOpts}"/></apex:selectList></td>
|
<td style="width:85px" align="center"><apex:selectList value="{!cond1}" id="cond1" size="1" style="width:80px"><apex:selectOptions value="{!equalOpts}"/></apex:selectList></td>
|
<td style="width:95px" align="left"><apex:inputText value="{!val1}" id="val1" style="width:100px"/></td>
|
<td align="left" style="width:450px">
|
|
<apex:commandButton value="检索" onclick="searchJs();return false;" style="width:130px" rerender="dummy" oncomplete="unblockUI()"/><!-- //deloitte-zhj 20231114 PIPL还原 去除Query2() -->
|
|
<apex:commandButton value="清除条件" onclick="clearAndSearch();" style="width:130px" rerender="dummy" oncomplete="unblockUI()"/><!-- //deloitte-zhj 20231114 PIPL还原 去除Query2() -->
|
|
<span style="vertical-align: text-bottom;">使用中<apex:inputCheckBox value="{!activeOn}" /></span>
|
</td>
|
<td>
|
<apex:outputPanel id="countorder">第{!countorder}页 </apex:outputPanel>
|
<apex:commandButton value="上一页" action="{!UpPage}" onclick="blockme();" disabled="{!IF(countorder=1,true,false)}" oncomplete="unblockUI();" reRender="Form"/><!-- //deloitte-zhj 20231114 PIPL还原 去除Query2() -->
|
<apex:commandButton value="下一页" action="{!DownPage}" onclick="blockme();" disabled="{!IF(countorder >=nowAssetcount ,true,false)}" oncomplete="unblockUI();" rerender="Form"/><!-- //deloitte-zhj 20231114 PIPL还原 去除Query2() -->
|
<apex:outputPanel id="NowOrdercount"> 共{!nowAssetcount}页</apex:outputPanel>
|
</td>
|
</tr>
|
</table>
|
<table style="border-collapse:collapse;" id="AssetTable2">
|
<tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);background: #f2f3f3;">
|
<!-- add by rentx 20210809 start 全选功能 -->
|
<!-- <th class="headerCell" style="width:25px"></th> -->
|
<th class="headerCell" style="padding: 2px 5px; width:25px"><apex:inputCheckbox id="checkAll1" onclick="checkAll2(this)" /> </th>
|
<!-- add by rentx 20210809 end 全选功能 -->
|
<th class="headerCell" style="width:70px">
|
<a href="#" onclick="sortTableJs('0');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Asset_situation__c.label}</a>{!sortOrder[0]}
|
</th>
|
<th class="headerCell">
|
<a href="#" onclick="sortTableJs('1');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Name.label}</a>{!sortOrder[1]}
|
</th>
|
<th class="headerCell" style="width:70px">
|
<a href="#" onclick="sortTableJs('2');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.SerialNumber.label}</a>{!sortOrder[2]}
|
</th>
|
<th class="headerCell" style="width:70px">
|
<a href="#" onclick="sortTableJs('3');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.CurrentContract__c.label}</a>{!sortOrder[3]}
|
</th>
|
<th class="headerCell" style="width:70px">
|
<a href="#" onclick="sortTableJs('4');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Department_Name__c.label}</a>{!sortOrder[4]}
|
</th>
|
<th class="headerCell" style="width:70px">
|
<a href="#" onclick="sortTableJs('5');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Status.label}</a>{!sortOrder[5]}
|
</th>
|
<th class="headerCell" style="width:90px">
|
<a href="#" onclick="sortTableJs('6');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Installation_Site__c.label}</a>{!sortOrder[6]}
|
</th>
|
<th class="headerCell" style="width:90px">
|
<a href="#" onclick="sortTableJs('7');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Room_Number__c.label}</a>{!sortOrder[7]}
|
</th>
|
<th class="headerCell" style="width:90px">
|
<a href="#" onclick="sortTableJs('8');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.InstallDate.label}</a>{!sortOrder[8]}
|
</th>
|
<th class="headerCell" style="width:90px">
|
<a href="#" onclick="sortTableJs('9');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Asset_Owner__c.label}</a>{!sortOrder[9]}
|
</th>
|
<th class="headerCell" style="width:90px">
|
<a href="#" onclick="sortTableJs('10');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Accumulation_Repair_Amount__c.label}</a>{!sortOrder[10]}
|
</th>
|
</tr>
|
<apex:variable value="{!1}" var="cnt" />
|
<apex:variable value="{!0}" var="cntOut" />
|
<apex:repeat value="{!IF(ThousandFLG>0,unCheckedInfoListForThousend,1)}" var="Thoinfo" id="unCheckedInfoListForThousend">
|
<apex:repeat value="{!IF(ThousandFLG>0,Thoinfo,unCheckedInfoList)}" var="ucInfo" id="UnCheckedInfoList" >
|
|
<tr style="border-bottom: 1px groove rgba(254, 254, 254, 0.48);">
|
<td style="padding: 2px 5px; width:25px">
|
<apex:inputCheckbox value="{!ucInfo.rec_checkBox_c}" id="AssetRowCheckbox2"/>
|
<input type="hidden" value="{!ucInfo.rec.Id}" id="UncheckAssetId"/>
|
</td>
|
<td style="padding: 2px 5px; width:70px">
|
<apex:outputField value="{!ucInfo.rec.Asset_situation__c}"/>
|
</td>
|
<td style="padding: 2px 5px;">
|
<a href="#" onclick="window.open('/{!ucInfo.rec.Id}', '_blank');">{!ucInfo.rec.Name}</a>
|
<!-- <apex:outputField value="{!ucInfo.rec.name}" id="assetName"/> -->
|
</td>
|
<td style="padding: 2px 5px; width:70px">
|
<apex:outputField value="{!ucInfo.rec.SerialNumber}"/>
|
</td>
|
<td style="padding: 2px 5px; width:70px">
|
<!-- <apex:outputField value="{!ucInfo.rec.CurrentContract__c}"/> -->
|
<a href="#" onclick="window.open('/{!ucInfo.rec.CurrentContract__c}', '_blank');">{!ucInfo.rec.CurrentContract__r.Management_Code__c}</a>
|
</td>
|
<td style="padding: 2px 5px; width:70px">
|
<apex:outputField value="{!ucInfo.rec.Department_Name__c}"/>
|
</td>
|
<td style="padding: 2px 5px; width:70px">
|
<apex:outputField value="{!ucInfo.rec.Status}"/>
|
</td>
|
<td style="padding: 2px 5px; width:70px">
|
<apex:outputField value="{!ucInfo.rec.Installation_Site__c}"/>
|
</td>
|
<td style="padding: 2px 5px; width:70px">
|
<apex:outputField value="{!ucInfo.rec.Room_Number__c}"/>
|
</td>
|
<td style="padding: 2px 5px; width:90px;text-align:center">
|
<apex:outputField value="{!ucInfo.rec.InstallDate}"/>
|
</td>
|
<td style="padding: 2px 5px; width:90px">
|
<apex:outputField value="{!ucInfo.rec.Asset_Owner__c}"/>
|
</td>
|
<td style="padding: 2px 5px; width:90px;text-align:center">
|
<apex:outputField value="{!ucInfo.rec.Accumulation_Repair_Amount__c}"/>
|
</td>
|
</tr>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
<apex:variable value="{!cntOut + 1}" var="cntOut" />
|
</apex:repeat>
|
</table>
|
</apex:outputPanel>
|
</apex:pageBlockSection>
|
<!-- fxk 2021/8/4 新加 Start-->
|
<!-- <apex:pageBlockSection title="打印时洗消信息" columns="1" id="UnCheckSection1" > -->
|
<!-- <apex:outputPanel > -->
|
<!-- <table class="edittable" border="0" style="border-collapse: collapse; width:600px; table-layout:fixed;"> -->
|
<!-- <tr> -->
|
<!-- <td>{!$ObjectType.Inspection_Report__c.fields.CleaningFluid__c.Label}:</td> -->
|
<!-- <td><apex:inputField value="{!ir.CleaningFluid__c}" style="width: 90%"/></td> -->
|
<!-- 方式 add by rentx 20210927 start-->
|
<!-- <td>{!$ObjectType.Inspection_Report__c.fields.Mode__c.Label}:</td> -->
|
<!-- <td><apex:inputField value="{!ir.Mode__c}" style="width: 90%"/></td> -->
|
<!-- 方式 add by rentx 20210927 end -->
|
<!-- <td>{!$ObjectType.Inspection_Report__c.fields.SterilizationMethod__c.Label}:</td> -->
|
<!-- <td><apex:inputField value="{!ir.SterilizationMethod__c}" style="width: 90%"/></td> -->
|
<!-- <td>{!$ObjectType.Inspection_Report__c.fields.Remarks__c.Label}:</td> -->
|
<!-- <td><apex:inputText value="{!ir.Remarks__c}" style="width: 90%"/></td> -->
|
<!-- </tr> -->
|
<!-- <tr> -->
|
<!-- <td>{!$ObjectType.Inspection_Report__c.fields.Disinfectant__c.Label}:</td> -->
|
<!-- <td><apex:inputField value="{!ir.Disinfectant__c}" style="width: 90%"/></td> -->
|
<!-- <td>{!$ObjectType.Inspection_Report__c.fields.UsedMachine__c.Label}:</td> -->
|
<!-- <td><apex:inputField value="{!ir.UsedMachine__c}" style="width: 90%"/></td> -->
|
<!-- <td>{!$ObjectType.Inspection_Report__c.fields.Used_ET__c.Label}:</td> -->
|
<!-- <td><apex:inputText value="{!ir.Used_ET__c}" style="width: 90%"/></td> -->
|
<!-- </tr> -->
|
<!-- </table> -->
|
<!-- </apex:outputPanel> -->
|
<!-- </apex:pageBlockSection> -->
|
<!-- fxk 2021/8/4 新加 End-->
|
</div>
|
</apex:pageBlock></div>
|
<script type="text/javascript">
|
// 已签字の場合、変更不能にする
|
var status = '{!ir.Status__c}';
|
if (status == "申请中" || status == "批准") {
|
var inputs = document.getElementsByTagName("input");
|
for (var i = 0; i < inputs.length; i++) {
|
var obj = inputs[i];
|
|
if (obj.id == "Page:Form:Block:closeButton") continue;
|
if (obj.id == "showPDF") continue;
|
|
//if (obj.id == "Page:Form:Block:submitButton") continue;
|
//if (status == "已签字" && obj.id == "Page:Form:Block:submitButton") continue;
|
|
if (obj.type == "button") {
|
setButtonDisable(obj, true);
|
} else {
|
obj.disabled = true;
|
}
|
}
|
var selects = document.getElementsByTagName("select");
|
console.log(selects);
|
for (var i = 0; i < selects.length; i++) {
|
selects[i].disabled = true;
|
}
|
} else {
|
//var smb = j$(escapeVfId("Page:Form:Block:submitButton"))[0];
|
//setButtonDisable(smb, true);
|
}
|
// HWAG-BDCA9J 提醒未保存和刷新前不能选择产品 start
|
function blurProduct(obj) {
|
var irID = "{!ir.Id}";
|
var productCount2 = "{!productCount2}";
|
if(!irID && productCount2 == 0){
|
alert('请先输入医院并点击刷新按钮调出保有设备,否则点检结果无法与设备关联。');
|
obj.blur();
|
return false;
|
}
|
return true;
|
}
|
// HWAG-BDCA9J 提醒未保存和刷新前不能选择产品 end
|
|
|
let SelectFieldParamList=[
|
//deloitte-zhj 20231128 PIPL还原 院方负责人Responsible_Person_F__c
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId: 'Page:Form:Block:SectionList:1:leval:SectionItemList:4:leval1:leval2:0:test5',
|
//查找字段所在对象
|
ObjectType : 'Inspection_Report__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'Responsible_Person_F__c',
|
//查找字段的查找对象
|
SelectObj : 'Contact',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
//FilterSql: ' Account.Hospital__c ='+document.getElementById('Page:Form:Block:SectionList:1:leval:SectionItemList:0:leval1:leval2:0:test5').value
|
},
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId: 'Page:Form:Block:Agency',
|
//查找字段所在对象
|
ObjectType : 'Inspection_Report__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'Agency__c',
|
//查找字段的查找对象
|
SelectObj : 'Account',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
},
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId: 'Page:Form:Block:SectionList:1:leval:SectionItemList:1:leval1:leval2:1:test5',
|
//查找字段所在对象
|
ObjectType : 'Inspection_Report__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'Reporter__c',
|
//查找字段的查找对象
|
SelectObj : 'User',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
},
|
//add by Link 2023-10-07
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId: 'Page:Form:Block:Agency_Contact_Id',
|
//查找字段所在对象
|
ObjectType : 'Inspection_Report__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'Agency_Contact_Id__c',
|
//查找字段的查找对象
|
SelectObj : 'Contact',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
},
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId: 'Page:Form:Block:SectionList:1:leval:SectionItemList:0:leval1:leval2:0:test5',
|
//查找字段所在对象
|
ObjectType : 'Inspection_Report__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'IR_Hospital__c',//20231113 李文涛
|
//查找字段的查找对象
|
SelectObj : 'Account',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
}
|
]
|
//初始化
|
resetOpenPage(SelectFieldParamList);
|
var baseURL = '';
|
var ObjectType = 'Inspection_Item__c';
|
var QueryFieldApiName = 'Product_Manual__c';
|
var inputFieldId = '';
|
var inputFieldId_lktp = '';
|
var SelectObj = 'Product2';
|
var SelectFld = 'Name';
|
var cnt = j$(escapeVfId('ProductCnt')).val();
|
for (var i = 0; i < cnt; i++) {
|
console.log('cnt = ' + cnt);
|
inputFieldId = 'Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert';
|
inputFieldId_lktp = 'Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert_lktp';
|
baseURL = '/apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
|
var obj = document.getElementById('Page:Form:Block:CheckSection:CheckedInfoList:'+i+':Assert_lkwgt');
|
if (obj != null) {
|
obj.setAttribute('href', 'javascript:%20openLookup%28%27' + baseURL + '%26lktp%3D%27%20%2B%20getElementByIdCS%28%27' + inputFieldId_lktp + '%27%29.value%2C670%2C%271%27%2C%27%26lksrch%3D%27%20%2B%20escapeUTF%28getElementByIdCS%28%27' + inputFieldId + '%27%29.value.substring%280%2C%2080%29%29%29');
|
}
|
}
|
function unblockUI(){
|
j$("#sbArea").fadeOut(500, function(){
|
j$("#sbArea").remove();
|
});
|
}
|
|
</script>
|
</apex:form>
|
</body>
|
</html>
|
</apex:page>
|