<!--Trans
|
@description :
|
@author : ChangeMeIn@UserSettingsUnder.SFDoc
|
@group :
|
@last modified on : 03-30-2022
|
@last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
|
-->
|
<apex:page controller="StraightBackAddressController" action="{!init}" showHeader="false" sidebar="true" id="allPage" title="直返收货地址" lightningStylesheets="true">
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
|
<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
|
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
|
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
|
|
<style>
|
body .bPageBlock .detailList .dataCol {
|
width: 20% !important;
|
}
|
body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
|
min-width: 180px !important;
|
padding: 0;
|
}
|
body .inlineEditUndoLink, .slds-vf-scope .inlineEditUndoLink {
|
position: static;
|
}
|
</style>
|
|
<script type="text/javascript">
|
var checkedTrue;
|
console.log('tableDataStr = ' + '{!tableDataStr}')
|
//deloitte-zhj 20231114 PIPL还原
|
// var tableDataStr = '';
|
|
// var PIData = {};
|
// var contactDataIds = [];
|
// var ObjIdDecrypt = '';
|
// var closeField = '';
|
// var add_aws_result = '';
|
// var con_aws_result = '';
|
// var isAddCon = false;
|
// var contactInfoStr = '';
|
|
// var addressAwsData = {};
|
|
var isBlocking = false;
|
|
var contactNamePlaintext = '';
|
var telePhonePlaintext = '';
|
var zipCodePlaintext = '';
|
var detailedAddressPlaintext = '';
|
//deloitte-zhj 20231114 PIPL还原
|
//add by xq 2023/06/30 Start
|
//add by xq 2023/06/30 end
|
function b(){
|
if (!isBlocking) {
|
blockme();
|
isBlocking = true;
|
}
|
}
|
|
function ub(){
|
if (isBlocking) {
|
unblockUI();
|
isBlocking = false;
|
}
|
}
|
|
//替换vlookup
|
var newSearchContactWindow = null;
|
window.onload = function () {
|
document.getElementById("tab01").style.height = screen.availHeight*0.07+'px';
|
document.getElementById("tab02").style.height = screen.availHeight*0.53+'px';
|
document.getElementById("tab03").style.height = screen.availHeight*0.25+'px';
|
}
|
//编辑按钮
|
function onEditorJs(ObjId){
|
//ObjIdDecrypt = ObjId; //deloitte-zhj 20231114 PIPL还原
|
onEditor(ObjId);
|
}
|
//复制按钮
|
function onCopyJs(ObjId){
|
//ObjIdDecrypt = ObjId; //deloitte-zhj 20231114 PIPL还原
|
if(ObjId == ''){
|
onCopy('空');//设置为空,便于后端做数据处理
|
}else{
|
onCopy(ObjId);
|
}
|
}
|
//deloitte-zhj 20231114 PIPL还原 start
|
/*
|
//aws 确认
|
function Trans(){
|
debugger
|
let b = HasError();
|
if(b){
|
//还原联系人电话地址邮编
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = contactNamePlaintext;
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = telePhonePlaintext;
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = zipCodePlaintext
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = detailedAddressPlaintext
|
return
|
}
|
|
//{!IF(isSearchBtn,'searchBtnJs()',false)};
|
let b1= false;
|
let b2= false;
|
|
let Foo = function(){
|
// if (b1 && b2 && !b) {
|
// window.location.reload();
|
// }
|
if (b1 && !b) {
|
window.location.reload();
|
}
|
}
|
|
|
}
|
**/
|
//deloitte-zhj 20231114 PIPL还原 end
|
|
function HasError(){
|
// if (IsAddmessage) {
|
// return true;
|
// }
|
let e = document.getElementById("allPage:allForm:message");
|
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 cls in divs[i].classList){
|
// console.log('cls = ' + cls);
|
// if (cls.indexOf('error')>-1) {
|
// return true;
|
// }
|
// }
|
if (divs[i].classList[j].indexOf('error')>-1) {
|
return true;
|
}
|
}
|
|
}
|
|
|
return false;
|
}
|
//解密
|
//deloitte-zhj 20231114 PIPL还原 start
|
/*
|
function decrypt(){
|
if(PIData[ObjIdDecrypt] == null){
|
// document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = '';
|
//document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:contactIdValue').value = '000000000000000';
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = '';
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = '';
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = '';
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = '';
|
}else{
|
// document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Contacts__c').value = PIData[ObjIdDecrypt].lastName!=null?PIData[ObjIdDecrypt].lastName:'';
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value = PIData[ObjIdDecrypt].lastName;
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value = PIData[ObjIdDecrypt].telephone;
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value = PIData[ObjIdDecrypt].zipCode;
|
document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value = PIData[ObjIdDecrypt].detailedAddress;
|
}
|
}
|
function getPIPayload() {
|
let leadPayloadList = [];
|
var telePhone = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Telephone__c').value;
|
var zipCode = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value;
|
var detailedAddress = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value;
|
let leadPIData = new Object();
|
leadPIData.telePhone = telePhone;
|
leadPIData.zipCode = zipCode;
|
leadPIData.detailedAddress = detailedAddress;
|
leadPIData.sfRecordId = '';
|
leadPayloadList.push(leadPIData);
|
console.log(JSON.stringify(leadPayloadList));
|
return JSON.stringify(leadPayloadList);
|
}**/
|
//deloitte-zhj 20231114 PIPL还原 end
|
//WLIG-CCX4BB 【委托】修理直返收货地址功能改造 thh 20220513 start
|
//保存方法
|
function savaJs(){
|
//b();
|
//不会新建联系人,所以这里不需要将isAddCon设置为true
|
// if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ContactName__c').value != ''){
|
// isAddCon = true;
|
// }
|
document.getElementById("errorMsg").innerHTML = '';
|
|
if(!document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:ContactName__c").value){
|
document.getElementById("errorMsg").style.display = 'inline-block';
|
document.getElementById("errorMsg").innerHTML = '<strong>【联系人】不能为空!</strong> ';
|
return;
|
}
|
// else if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Contacts__c").value&&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
|
// document.getElementById("errorMsg").innerHTML = '<strong>【联系人】和【联系人(新建)】不能同时有值!</strong> ';
|
// return;
|
// }
|
b();
|
console.log('{!insUpdData}')
|
// if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
|
// //new contact
|
// ProcessPI({},GetEditObj('contact'),'contact',function(){
|
// //new address
|
// ProcessPI({},
|
// GetEditObj('address'),'address',function(){
|
// save();
|
// });
|
// });
|
// }else{
|
//new address
|
//deloitte-zhj 20231114 PIPL还原
|
// debugger
|
// ProcessPI({},GetEditObj('address'),'address',function(){
|
// save();
|
// });
|
// }
|
save();
|
}
|
//WLIG-CCX4BB 【委托】修理直返收货地址功能改造 thh 20220513 end
|
|
//复选框选中触发事件
|
//obj 当前对象 checkIndex 当前点击的第几行
|
function onCheckBoxJd(obj,checkIndex){
|
//如果为true,那么其他的所有复选框必须为不选择状态
|
if(obj.checked){
|
checkedTrue = checkIndex;
|
var lawtable = document.getElementById("tableHeader_L");//获取id为tableHeader_L的table
|
var rows = lawtable.rows;//获取所有行
|
for(var i=1; i < rows.length; i++){
|
var InputObj = rows[i].cells[0].getElementsByTagName("input")[0];
|
if(obj != InputObj){
|
InputObj.checked = false;
|
}
|
}
|
}else{
|
checkedTrue = null;
|
}
|
}
|
function searchBtnJs(){
|
b();
|
//deloitte-zhj 20231114 PIPL还原
|
searchBtn();
|
}
|
|
sforce.connection.sessionId = '{!GETSESSIONID()}';
|
|
function adoptSaveJs(address,isUpload){
|
//由于要把采用时间记录到地址表中,所以新建一个地址对象
|
// Address__c DatetimeUpdate = new Address__c();
|
// DatetimeUpdate = tableData[i].address;
|
//详细地址
|
let address_str = address.Detailed_Address__c != null ? address.Detailed_Address__c.trim() : '';
|
//deloitte-zhj 20231114 PIPL还原
|
// if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
|
// address_str = addressAwsData[address.AWS_Data_Id__c].detailedAddress;
|
// }
|
let cityName = '';//市
|
//市不为空,因为要使用 __r.Name 如果为空,会报错
|
if(address.City__c){
|
cityName = address.City__r.Name.trim();
|
//省 同上
|
if(address.Province__c){
|
let ProvinceCity = address.Province__r.Name.trim()+cityName;
|
//防止详细地址里面带着省份和市
|
if(address_str.indexOf(ProvinceCity) < 0){
|
address_str = ProvinceCity + address_str;
|
}
|
}
|
}
|
//联系人
|
let contactsName = '';
|
// WLIG-CCX4BB 【委托】修理直返收货地址功能改造 thh 20220513 start
|
if(address.ContactName__c){
|
contactsName = address.ContactName__c;
|
}
|
// WLIG-CCX4BB 【委托】修理直返收货地址功能改造 thh 20220513 end
|
|
// if (addressAwsData.hasOwnProperty(address.Contacts__r.AWS_Data_Id__c)) {
|
// contactsName = addressAwsData[address.Contacts__r.AWS_Data_Id__c].lastName;
|
// }
|
//deloitte-zhj 20231114 PIPL还原
|
// if(PIData[address.Id]){
|
// contactsName = PIData[address.Id].lastName;
|
// }
|
|
//客户
|
let ContactPerson = '';
|
if(address.Customer__c){
|
ContactPerson = address.Customer__r.Name;
|
}
|
try{
|
//保存数据到修理表中
|
let rc = new sforce.SObject('Repair__c');
|
rc.Id='{!RepairId}';
|
rc.address_Contacts__c=contactsName;
|
rc.address_ZipCode__c = address.ZipCode__c;
|
rc.address_City__c = cityName;
|
rc.address_Contacts_Name__c = ContactPerson;
|
let AddressTypeIndex = {!AddressTypeIndex};
|
//isUpload:是否上传SAP FSEApplyForRepairTime:SAP修理申请时间
|
if(isUpload && '{!pc.SAP_Transfer_time__c}'){
|
rc.Address_type__c = 'X';
|
rc.Address_Type_Index__c = AddressTypeIndex+1;
|
}
|
rc.address_Telephone__c=address.Telephone__c;
|
rc.Detailed_Address__c=address_str;
|
|
//deloitte-zhj 20231114 PIPL还原
|
// if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
|
// rc.address_Telephone__c=addressAwsData[address.AWS_Data_Id__c].telephone;
|
// rc.address_ZipCode__c=addressAwsData[address.AWS_Data_Id__c].zipCode;
|
// }
|
|
let GetAsset = function(){
|
let ast = new sforce.SObject('Asset');
|
ast.Id = '{!pc.Delivered_Product__c}',
|
ast.address_Contacts__c= contactsName,
|
ast.address_ZipCode__c = address.ZipCode__c,
|
ast.address_City__c = cityName,
|
ast.address_Telephone__c = address.Telephone__c,
|
ast.address_Contacts_Name__c = ContactPerson,
|
ast.Detailed_Address__c= address_str
|
//deloitte-zhj 20231114 PIPL还原
|
// if (addressAwsData.hasOwnProperty(address.AWS_Data_Id__c)) {
|
// ast.address_ZipCode__c=addressAwsData[address.AWS_Data_Id__c].zipCode;
|
// ast.address_Telephone__c=addressAwsData[address.AWS_Data_Id__c].telephone;
|
// }
|
return ast;
|
}
|
|
//保存数据到保有设备表中
|
let UpdateAsset = function(){
|
let ast = GetAsset();
|
let result = sforce.connection.update([ast]);
|
let b = result[0].getBoolean('success');
|
return b;
|
}
|
|
let UpdateRepair = function(callback){
|
Visualforce.remoting.Manager.invokeAction(
|
'StraightBackAddressController.SaveEx',
|
JSON.stringify(rc), JSON.stringify(GetAsset()), address.Id,
|
function (result, event) {
|
let message = '';
|
if (event.status) {
|
if (result) {
|
message = result;
|
}
|
}
|
if (message) {
|
ub();
|
alert(message);
|
}else{
|
window.location.href = '/{!RepairId}';
|
}
|
},
|
{ escape: true }
|
);
|
}
|
//deloitte-zhj 20231114 PIPL还原 end
|
|
|
|
|
let UpdateAddress = function(){
|
let add = new sforce.SObject('Address__c');
|
add.Id = address.Id;
|
//最后把当前时间保存到地址表中,作为采用时间
|
add.Using_Datetime__c = new Date();
|
let result = sforce.connection.update([add]);
|
let b = result[0].getBoolean('success');
|
return b;
|
}
|
|
b();
|
UpdateRepair();
|
}catch( e){
|
//失败提示
|
//ApexPages.addMessages(e);
|
}
|
}
|
//采用按钮
|
function onAdoptJs(e, address){
|
|
//判断当前修理单是否已经申请修理
|
var uploadTime = '{!FSEApplyForRepairTime}';
|
if(uploadTime != 'null' && uploadTime){
|
var prompt = '由于当前修理单已申请修理,请问是否采用并上传数据到SAP?';
|
if(confirm(prompt)){
|
adoptSaveJs(address,true);
|
}
|
}else{
|
adoptSaveJs(address,false);
|
}
|
|
}
|
//返回父页面
|
function sendBackJs(){
|
redirectPag();
|
}
|
//刷新当前页面
|
function refreshJs(){
|
window.location.reload();
|
}
|
|
function htmlToElement(html) {
|
var template = document.createElement('template');
|
html = html.trim(); // Never return a text node of whitespace as the result
|
template.innerHTML = html;
|
return template.content.firstChild;
|
}
|
|
function closePopupWindow() {
|
if (null != newSearchContactWindow) {
|
newSearchContactWindow.close();
|
}
|
contactInfoStr = document.getElementById('allPage:allForm:contactId').value;
|
console.log('closePopup:'+contactInfoStr);
|
let contactInfo = JSON.parse(contactInfoStr);
|
let contactNodeId = 'allPage:allForm:oppBlock2:UpdAddressId:contactIdValue';
|
document.getElementById(contactNodeId).value = contactInfo.ContactId;
|
document.getElementById(closeField).value = contactInfo.Name;
|
}
|
//2022 02 28 张华建 display PI Data end
|
</script>
|
<script type="text/javascript">
|
</script>
|
<apex:form id="allForm">
|
<!-- <apex:inputHidden id="tableValueFrontEnd" value="{!tableDataStr}"/> //deloitte-zhj 20231114 PIPL还原 start -->
|
<apex:inputHidden value="{!contactId}" id="contactId"/>
|
<apex:inputHidden value="{!insUpdDataStr}" id="insUpdDataStr"/>
|
<div id="tab01">
|
<!-- 页面数据初始化方法 -->
|
<apex:actionFunction name="init" action="{!init}" rerender="oppBlock1,message,checEventFrame" onComplete="ub();"></apex:actionFunction>
|
<!-- 检索数据查询方法 -->
|
<apex:actionFunction name="searchBtn" action="{!searchBtn}" rerender="oppBlock1,message,checEventFrame,tableValueFrontEnd" onComplete="ub();">
|
<!-- <apex:param name="addressDataIds" assignTo="{!addressDataIds}" value=""></apex:param> deloitte-zhj 20231011 PIPL还原-->
|
</apex:actionFunction>
|
<!-- 采用方法 -->
|
<!--<actionFunction name="adoptSave" action="{!adoptSave}" rerender="oppBlock2,message" onComplete="ub();">
|
<apex:param name="adoptId" assignTo="{!adoptId}" value="" />
|
<apex:param name="isUpload" assignTo="{!isUpload}" value="" />
|
</actionFunction>-->
|
<!-- 保存和修改方法 -->
|
<!-- 去掉Trans() decrypt() PIPL还原 20231122 -->
|
<apex:actionFunction name="save" action="{!save}" rerender="oppBlock2,message" onComplete="ub();"></apex:actionFunction>
|
<!-- 点击修改按钮获取修改数据方法 -->
|
<apex:actionFunction name="onEditor" action="{!onEditor}" rerender="oppBlock2,checEventFrame,insUpdDataStr" onComplete="ub();">
|
<apex:param name="UpdId" assignTo="{!UpdId}" value="" />
|
</apex:actionFunction>
|
<!-- 复制方法 -->
|
<apex:actionFunction name="onCopy" action="{!onCopy}" rerender="oppBlock2,checEventFrame," onComplete="ub();">
|
<apex:param name="UpdId" assignTo="{!UpdId}" value="" />
|
</apex:actionFunction>
|
<!-- 返回父页面 -->
|
<apex:actionFunction name="redirectPag" action="{!redirectPag}" rerender="true" onComplete="ub();"></apex:actionFunction>
|
<apex:pageBlock id="searchBlock" tabStyle="Report">
|
<table style="border-bottom-width: 0px; font-size:12px;width:100%">
|
<tr>
|
<td style="width: 15%">
|
<font>类 型 </font>
|
<!-- <apex:selectList id="numtextA1Id" value="{!numtextA1}" size="1" style="width:110px">
|
<apex:selectOptions value="{!optionType}"/>
|
</apex:selectList> -->
|
<apex:inputField value="{!optionAddressClassification.Address_Classification__c}" id="AddressClassificationId"/>
|
</td>
|
<td style="width: 20%">
|
<font>客 户 名 </font>
|
<apex:inputText id="txtNameId" value="{!txtName}"/>
|
<a class="inlineEditUndoLink" title="清空" href="#" onclick="document.getElementById('allPage:allForm:searchBlock:txtNameId').value = '';document.getElementById('allPage:allForm:searchBlock:txtNameId').focus();" style="width: 20px;display: inline;left: 445px;top: 28px;">
|
<img width="16px" height="16px" src="/img/s.gif" alt="清空" class="inlineEditUndo"/>
|
</a>
|
</td>
|
<td style="width: 20%">
|
<font>地 址 </font>
|
<apex:inputText id="txtAddressId" value="{!txtAddress}"/>
|
<a class="inlineEditUndoLink" title="清空" href="#" onclick="document.getElementById('allPage:allForm:searchBlock:txtAddressId').value = '';document.getElementById('allPage:allForm:searchBlock:txtAddressId').focus(); " style="width: 20px;display: inline;left: 690px;top: 28px;">
|
<img width="16px" height="16px" src="/s.gif" alt="清空" class="inlineEditUndo"/>
|
</a>
|
</td>
|
<td style="width: 20%">
|
<apex:commandButton onclick="searchBtnJs();return false;" rendered="true" value="检索" style="width:60px;" onComplete=""/>
|
|
<!-- <apex:commandButton onclick="onAdoptJs();return false;" rendered="true" value="采用" style="width:60px;background:#98c1fbf7"/>
|
-->
|
<apex:commandButton onclick="sendBackJs();return false;" rendered="true" value="返回" style="width:60px;"/>
|
</td>
|
<td style="width: 25%">
|
|
</td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
|
</div>
|
<div>
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
</div>
|
<div id="tab02" style="overflow-x: auto; overflow-y: auto;">
|
<apex:pageBlock id="oppBlock1" tabStyle="Report">
|
<apex:pageblocksection title="地址列表" id="edmpdDetails" rendered="true" columns="1" >
|
<apex:outputPanel >
|
<table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L" >
|
<thead>
|
<tr class="headerRow" height="30px" align="center">
|
<!--标题 -->
|
<td style="">序号</td>
|
<td style="">类型</td>
|
<td style="">客户名</td>
|
<td style="">联系人</td>
|
<td style="">电话</td>
|
<td style="">邮编</td>
|
<td style="">省</td>
|
<td style="">市</td>
|
<td style="">详细地址</td>
|
<td style="" colspan="3">
|
操作
|
</td>
|
</tr>
|
</thead>
|
<tbody>
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!tableData}" var="or" id="oppTable">
|
<tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" 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 align="center" style="vertical-align: inherit;width:25px;border-width: 0px 1px 1px 0px;">
|
{!cnt+1}
|
</td>
|
<td align="center" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
|
<apex:outputText value="{!or.address.Address_Classification__c}" />
|
</td>
|
<td align="left" class="Customer__c" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
|
<apex:outputfield value="{!or.address.Customer__c}" />
|
</td>
|
<td align="left" class="oraddress" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
|
<!-- <apex:outputfield value="{!or.address.Contacts__c}" id="{!or.address.Contacts__c}_{!or.address.Id}"/> -->
|
<!-- <a href="#" id="{!or.address.Id}" onmouseover="showPIDiv('{!or.address.Id}')" onmouseout="hidePIDiv('{!or.address.Id}')" aws-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}">{!or.address.Contacts__r.Name}</a> -->
|
<!-- <a href="#" id="{!or.address.Id}" onmouseover="showPIDiv('{!or.address.Id}')" onmouseout="hidePIDiv('{!or.address.Id}')" aws-data-id="{!or.address.AWS_Data_Id__c}">{!or.address.ContactName__c}</a> -->
|
<!-- deloitte-zhj 20231011 PIPL还原 -->
|
<!-- <a href="#" id="{!or.address.Id}" aws-data-id="{!or.address.AWS_Data_Id__c}">{!or.address.ContactName__c}</a>add by xq 2023/06/30 Start -->
|
<apex:outputfield value="{!or.address.ContactName__c}"/>
|
</td>
|
<td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" id="{!or.address.Id + '_phone'}">
|
<apex:outputText value="{!or.address.Telephone__c}" />
|
</td>
|
<td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" id="{!or.address.Id + '_ZipCode'}">
|
<apex:outputText value="{!or.address.ZipCode__c}" />
|
</td>
|
<td align="center" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
|
<apex:outputfield value="{!or.address.Province__c}" />
|
</td>
|
<td align="center" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
|
<apex:outputfield value="{!or.address.City__c}" />
|
</td>
|
<td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" id="{!or.address.Id + '_Detailed_Address'}">
|
<apex:outputText value="{!or.address.Detailed_Address__c}" />
|
</td>
|
<td align="center" style="vertical-align: inherit;width:70px;border-width: 0px 0px 1px 0px;">
|
<apex:commandButton value=" 编辑 " onclick="onEditorJs('{!or.address.id}');return false;" style="background:#98c1fbf7;display:{!or.canEdit};"/>
|
</td>
|
<td align="center" style="vertical-align: inherit;width:70px;border-width: 0px 0px 1px 0px;">
|
<apex:commandButton value=" 复制 " onclick="onCopyJs('{!or.address.id}');return false;" style="background: #98c1fbf7;display:{!or.canCopy};"/>
|
</td>
|
<td align="center" style="vertical-align: inherit;width:70px;border-width: 0px 0px 1px 0px;">
|
<apex:commandButton value=" 采用 " onclick="onAdoptJs(event,JSON.parse('{!or.addressJson}'));return false;" style="background: #98c1fbf7;display:{!or.canAdopt};"/>
|
</td>
|
</tr>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</tbody>
|
<script>
|
// deloitte-zhj 20231011 PIPL还原
|
// console.log('queryPI();')
|
// queryPI();
|
</script>
|
</table>
|
</apex:outputPanel>
|
</apex:pageblocksection>
|
</apex:pageBlock>
|
|
</div>
|
<div id="tab03">
|
<apex:pageBlock id="oppBlock2" tabStyle="Report">
|
<!-- <apex:inputHidden id="LastName_Encrypted__c" value="{!newCon.LastName_Encrypted__c}"/>
|
<apex:inputHidden id="Con_AWS_Data_Id__c" value="{!newCon.AWS_Data_Id__c}"/> -->
|
<!-- <apex:inputHidden id="Add_AWS_Data_Id__c" value="{!insUpdData.AWS_Data_Id__c}"/> deloitte-zhj 20231011 PIPL还原 -->
|
<!-- zhj 新方案改造 2022-12-05 start -->
|
<!-- <apex:inputHidden id="Telephone_Encrypted__c" value="{!insUpdData.Telephone_Encrypted__c}"/>
|
<apex:inputHidden id="ContactName_Encrypted__c" value="{!insUpdData.ContactName_Encrypted__c}"/>
|
<apex:inputHidden id="ZipCode_Encrypted__c" value="{!insUpdData.ZipCode_Encrypted__c}"/>
|
<apex:inputHidden id="Detailed_Address_Encrypted__c" value="{!insUpdData.Detailed_Address_Encrypted__c}"/> -->
|
<!-- zhj 新方案改造 2022-12-05 end -->
|
<apex:pageblocksection title="编辑地址" id="UpdAddressId" rendered="true" columns="3">
|
<apex:inputfield value="{!insUpdData.Address_Classification__c}" id="Address_Classification__c"/>
|
<apex:inputfield value="{!insUpdData.Customer__c}" id="Customer__r_Name" required="false" />
|
<!-- Before PIPL 20220308 -->
|
<!-- <apex:inputfield value="{!insUpdData.Contacts__c}" id="Contacts__c" required="false"/> -->
|
<!-- WLIG-CCX4BB 【委托】修理直返收货地址功能改造 thh 20220513 start -->
|
<!-- Add By Li Jun for PIPL 20220308 Start -->
|
<!-- <apex:inputText label="联系人" disabled="true" value="{!contactNameValue}" id="Contacts__c">
|
</apex:inputText>
|
<apex:inputHidden id="contactIdValue" value="{!contactIdValue}"/> -->
|
<apex:inputfield value="{!insUpdData.ContactName__c}" id="ContactName__c"/>
|
<!-- Add By Li Jun for PIPL 20220308 End -->
|
<!-- <apex:inputfield value="{!insUpdData.Create_Contacts__c}" id="Create_Contacts__c" required="false"/> -->
|
<!-- WLIG-CCX4BB 【委托】修理直返收货地址功能改造 thh 20220513 end -->
|
<apex:inputfield value="{!insUpdData.Province__c}" id="Province__r_Name" style="" />
|
<apex:inputfield value="{!insUpdData.City__c}" id="City__r_name" onmouseover="changeProvince()"/>
|
<apex:inputfield value="{!insUpdData.Telephone__c}" id="Telephone__c" />
|
<apex:inputfield value="{!insUpdData.ZipCode__c}" id="ZipCode__c" />
|
<!-- <apex:pageblockSectionItem /> -->
|
<!-- <apex:inputTextarea value="{!insUpdData.Detailed_Address__c}" id="Detailed_Address__c" style="resize:vertical;width: 90%" rows="3" cols="3"/> -->
|
<apex:inputfield value="{!insUpdData.Detailed_Address__c}" id="Detailed_Address__c" style="resize:vertical;"/>
|
|
<div id="errorMsg" class="errorMsg" style="display:none;"></div>
|
</apex:pageblocksection>
|
|
<div style="text-align: center;">
|
<apex:commandButton immediate="true" value="保存" onclick="savaJs();" rerender="dummy" />
|
</div>
|
<!-- <script>
|
replaceSearchContactLookup();
|
</script> -->
|
</apex:pageBlock>
|
</div>
|
|
</apex:form>
|
<apex:outputPanel id="checEventFrame">
|
<script type="text/javascript">
|
|
|
j$("select option[value='办事处']")[1].remove();
|
|
//DecryptAddress(); //deloitte-zhj 20231011 PIPL还原
|
|
|
let SelectFieldParamList=[
|
//
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId: 'allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name',
|
//查找字段所在对象
|
ObjectType : 'Address__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'Customer__c',
|
//查找字段的查找对象
|
SelectObj : 'Account',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
},
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId: 'allPage:allForm:oppBlock2:UpdAddressId:Province__r_Name',
|
//查找字段所在对象
|
ObjectType : 'Address__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'Province__c',
|
//查找字段的查找对象
|
SelectObj : 'Address_Level__c',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
},
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId: 'allPage:allForm:oppBlock2:UpdAddressId:City__r_name',
|
//查找字段所在对象
|
ObjectType : 'Address__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'City__c',
|
//查找字段的查找对象
|
SelectObj : 'Address_Level2__c',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
setVal : document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Province__r_Name_lkid').value,
|
},
|
]
|
//初始化
|
resetOpenPage(SelectFieldParamList);
|
function changeProvince(){
|
console.log("change:");
|
let SelectFieldParamList=[
|
{
|
//原apex:inputField的id值,需要在页面上获取
|
inputFieldId: 'allPage:allForm:oppBlock2:UpdAddressId:City__r_name',
|
//查找字段所在对象
|
ObjectType : 'Address__c',
|
//查找字段的api名称
|
QueryFieldApiName : 'City__c',
|
//查找字段的查找对象
|
SelectObj : 'Address_Level2__c',
|
//搜索时使用的字段
|
SelectFld : 'Name',
|
setVal : document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Province__r_Name_lkid').value,
|
},
|
]
|
//初始化
|
resetOpenPage(SelectFieldParamList);
|
}
|
function unblockUI(){
|
j$("#sbArea").fadeOut(500, function(){
|
j$("#sbArea").remove();
|
});
|
}
|
</script>
|
</apex:outputPanel>
|
|
</apex:page>
|