| | |
| | | <!-- |
| | | @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="直返收货地址"> |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | |
| | | var tableDataStr = ''; |
| | | var staticResource = JSON.parse('{!staticResource}'); |
| | | var staticResourceContact = JSON.parse('{!staticResourceContact}'); |
| | | var staticResourceRepair = JSON.parse('{!staticResourceRepair}'); |
| | | |
| | | var PIData = {}; |
| | | var contactDataIds = []; |
| | | var ObjIdDecrypt = ''; |
| | |
| | | var isAddCon = false; |
| | | var contactInfoStr = ''; |
| | | |
| | | var addressAwsData = {}; |
| | | |
| | | var isBlocking = false; |
| | | function b(){ |
| | | if (!isBlocking) { |
| | | blockme(); |
| | | isBlocking = true; |
| | | } |
| | | } |
| | | |
| | | function ub(){ |
| | | if (isBlocking) { |
| | | unblockUI(); |
| | | isBlocking = false; |
| | | } |
| | | } |
| | | |
| | | //替换vlookup |
| | | var newSearchContactWindow = null; |
| | | window.onload = function () { |
| | |
| | | document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:ZipCode__c').value='' |
| | | document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Detailed_Address__c').value='' |
| | | } |
| | | |
| | | //{!IF(isSearchBtn,'searchBtnJs()',false)}; |
| | | let b1= false; |
| | | let b2= false; |
| | | |
| | | let Foo = function(){ |
| | | if (b1 && b2 && !b) { |
| | | window.location.reload(); |
| | | } |
| | | } |
| | | |
| | | AWSService.post(staticResource.transactionUrl, JSON.stringify({ |
| | | "txId":add_aws_result.txId, |
| | | "txId":add_aws_result.txId, |
| | | "isSuccess":b ? 0 : 1 |
| | | }), function(result){ |
| | | b1 = true; |
| | | Foo(); |
| | | }, staticResource.token); |
| | | |
| | | if(isAddCon){ |
| | | AWSService.post(staticResourceContact.transactionUrl, JSON.stringify({ |
| | | "txId":con_aws_result.txId, |
| | | "isSuccess":b ? 0 : 1 |
| | | }), function(result){ |
| | | if(isAddCon){ |
| | | AWSService.post(staticResourceContact.transactionUrl, JSON.stringify({ |
| | | "txId":con_aws_result.txId, |
| | | "isSuccess":b ? 0 : 1 |
| | | }), function(result){ |
| | | if(!b) |
| | | window.location.reload(); |
| | | }, staticResourceContact.token); |
| | | }else{ |
| | | if(!b) |
| | | window.location.reload(); |
| | | } |
| | | }, staticResource.token); |
| | | b2 = true; |
| | | Foo(); |
| | | }, staticResourceContact.token); |
| | | }else{ |
| | | b2 = true; |
| | | Foo(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | //保存方法 |
| | | function savaJs(){ |
| | | //blockme(); |
| | | //b(); |
| | | if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c').value != ''){ |
| | | isAddCon = true; |
| | | } |
| | |
| | | document.getElementById("errorMsg").innerHTML = '<strong>【联系人】和【联系人(新建)】不能同时有值!</strong> '; |
| | | return; |
| | | } |
| | | blockme(); |
| | | b(); |
| | | console.log('{!insUpdData}') |
| | | if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value //【联系人(新建)】不为空 |
| | | &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accOfficeTypeId}'////记录类型id 办事处 |
| | | &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accAgencyTypeId}'//记录类型id 販売店 |
| | | &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accAgencyContactTypeId}'){//记录类型id 经销商联系人 |
| | | if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){ |
| | | //new contact |
| | | ProcessPI({},GetEditObj('contact'),'contact',function(){ |
| | | //new address |
| | |
| | | } |
| | | } |
| | | function searchBtnJs(){ |
| | | blockme(); |
| | | b(); |
| | | var addressDataIds = ''; |
| | | //查询地址 |
| | | if(document.getElementById('allPage:allForm:searchBlock:txtAddressId').value != ''){ |
| | |
| | | searchBtn('\''+addressName+'\''); |
| | | return |
| | | }else{ |
| | | |
| | | for(var i=0;i<result.object.length;i++){ |
| | | addressDataIds += ',\''+ result.object[i].dataId + '\''; |
| | | addressAwsData[result.object[i].dataId] = result.object[i]; |
| | | } |
| | | addressDataIds = addressDataIds.substring(1); |
| | | resolve('success'); |
| | | } |
| | | }; |
| | | var addressName = document.getElementById('allPage:allForm:searchBlock:txtAddressId').value; |
| | | AWSService.queryAddress('https://sfpi-mebg-test.olympuschina.com/api/address/search',addressName.trim(),queryBack,staticResource.token); |
| | | AWSService.post(staticResource.searchUrl,{ |
| | | detailedAddress:addressName.trim() |
| | | },queryBack,staticResource.token); |
| | | }).then(function(data){ |
| | | console.log('data = '+data) |
| | | console.log('addressDataIds = '+addressDataIds) |
| | |
| | | searchBtn(addressDataIds); |
| | | } |
| | | } |
| | | //采用按钮 |
| | | function onAdoptJs(objId){ |
| | | if(objId != null){ |
| | | //判断当前修理单是否已经申请修理 |
| | | var uploadTime = '{!FSEApplyForRepairTime}'; |
| | | if(uploadTime != 'null'){ |
| | | var prompt = '由于当前修理单已申请修理,请问是否采用并上传数据到SAP?'; |
| | | if(confirm(prompt)){ |
| | | blockme(); |
| | | adoptSave(objId+"",true); |
| | | } |
| | | }else{ |
| | | adoptSave(objId+"",false); |
| | | //加密客户名字段 |
| | | // function encryptCustomer(e){ |
| | | // let obj = JSON.parse(payloadForNewPI); |
| | | // let payloadForNewPIJson = JSON.stringify(obj); |
| | | // let payloadForNewPI = jQuery(e.target).closest("tr").find("a.cusmer__c"); |
| | | // AWSService.update(staticResources.updateUrl, '', payloadForNewPI, updateMethod, staticResources.token, staticResources.transactionUrl, false, insertOrUpdateBack, redirectCallBack); |
| | | // }, |
| | | |
| | | sforce.connection.sessionId = '{!GETSESSIONID()}'; |
| | | function UpdateSobject(staticResource,sobj,transId,callback){ |
| | | |
| | | let result = sforce.connection.update([sobj]); |
| | | let tobj = { |
| | | txId: transId |
| | | }; |
| | | let b = result[0].getBoolean('success'); |
| | | if(b) { |
| | | console.log('call sf Log Id: ' + result[0].id); |
| | | tobj.sfRecordId = result[0].id; |
| | | tobj.isSuccess = 1; |
| | | |
| | | //return result[0].id; |
| | | }else { |
| | | console.log('call sf to insert log'); |
| | | tobj.isSuccess = 0; |
| | | //return ''; |
| | | } |
| | | |
| | | AWSService.post(staticResource.transactionUrl,tobj,function(data){ |
| | | if (callback) { |
| | | data.isSuccess = b; |
| | | callback(data) |
| | | } |
| | | } |
| | | },staticResource.token); |
| | | } |
| | | |
| | | |
| | | |
| | | function adoptSaveJs(address,isUpload){ |
| | | //由于要把采用时间记录到地址表中,所以新建一个地址对象 |
| | | // Address__c DatetimeUpdate = new Address__c(); |
| | | // DatetimeUpdate = tableData[i].address; |
| | | //详细地址 |
| | | let address_str = address.Detailed_Address__c.trim(); |
| | | 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 = ''; |
| | | if(address.Contacts__c){ |
| | | contactsName = address.Contacts__r.Name; |
| | | } |
| | | |
| | | if (addressAwsData.hasOwnProperty(address.Contacts__r.AWS_Data_Id__c)) { |
| | | contactsName = addressAwsData[address.Contacts__r.AWS_Data_Id__c].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; |
| | | |
| | | 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 UpdateRepair = function(callback){ |
| | | AWSService.post(staticResourceRepair.updateUrl,[{ |
| | | dataId:'{!pc.AWS_Data_Id__c}', |
| | | addressContactsName:rc.address_Contacts_Name__c, |
| | | addressContacts:rc.address_Contacts__c, |
| | | addressTelephone:rc.address_Telephone__c, |
| | | addressZipCode:rc.address_ZipCode__c, |
| | | detailedAddress:rc.Detailed_Address__c |
| | | }],function(data){ |
| | | if(data && data.object){ |
| | | console.log(data); |
| | | rc.address_Contacts_Name__c = data.object[0].addressContactsName; |
| | | rc.Address_Contacts_Name_Encrypt__c = data.object[0].addressContactsNameEncrypt; |
| | | rc.address_Contacts__c = data.object[0].addressContacts; |
| | | rc.Address_Contacts_Encrypt__c = data.object[0].addressContactsEncrypt; |
| | | rc.address_Telephone__c = data.object[0].addressTelephone; |
| | | rc.Address_Telephone_Encrypt__c = data.object[0].addressTelephoneEncrypt; |
| | | rc.address_ZipCode__c = data.object[0].addressZipCode; |
| | | rc.Address_ZipCode_Encrypt__c = data.object[0].addressZipCodeEncrypt; |
| | | rc.Detailed_Address__c = data.object[0].detailedAddress; |
| | | rc.Detailed_Address_Encrypt__c = data.object[0].detailedAddressEncrypt; |
| | | |
| | | UpdateSobject(staticResourceRepair,rc,data.txId,callback); |
| | | }else{ |
| | | alert('AWS更新修理失败'); |
| | | ub(); |
| | | } |
| | | },staticResourceRepair.token) |
| | | } |
| | | |
| | | //保存数据到保有设备表中 |
| | | let UpdateAsset = 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 |
| | | 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; |
| | | } |
| | | let result = sforce.connection.update([ast]); |
| | | let b = result[0].getBoolean('success'); |
| | | return b; |
| | | } |
| | | |
| | | |
| | | 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(function(data){ |
| | | if (data.isSuccess) { |
| | | let b = UpdateAsset(); |
| | | if (b) { |
| | | b = UpdateAddress(); |
| | | if (b) { |
| | | window.location.href = '/{!RepairId}'; |
| | | }else{ |
| | | ub(); |
| | | alert('采用失败'); |
| | | } |
| | | }else{ |
| | | ub(); |
| | | alert('采用失败'); |
| | | } |
| | | }else{ |
| | | |
| | | ub(); |
| | | alert('SF更新修理失败'); |
| | | } |
| | | }) |
| | | |
| | | //页面重定向 |
| | | //return redirectPag(); |
| | | }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 onAdoptJs(){ |
| | | if(checkedTrue != null){ |
| | | blockme(); |
| | | b(); |
| | | var lawtable = document.getElementById("tableHeader_L");//获取id为tableHeader_L的table |
| | | var rows = lawtable.rows;//获取所有行 |
| | | var InputObj = rows[checkedTrue].cells[0].getElementsByTagName("input")[0]; |
| | |
| | | } |
| | | //查询敏感字段 |
| | | function queryPI(){ |
| | | //blockme(); |
| | | //b(); |
| | | tableDataStr = JSON.parse(document.getElementById('allPage:allForm:tableValueFrontEnd').value); |
| | | PIData = {}; |
| | | contactDataIds = []; |
| | |
| | | q1().then(function(data){ |
| | | return q2(data); |
| | | }) |
| | | //unblockUI(); |
| | | //ub(); |
| | | } |
| | | |
| | | |
| | |
| | | createDiv.style.background="#dddddd"; |
| | | createDiv.style.position = "absolute"; |
| | | parentNode.appendChild(createDiv); |
| | | parentNode.style.position = "relative"; |
| | | parentNode.style.position = "relative"; |
| | | } |
| | | |
| | | function hidePIDiv(awsDataId){ |
| | |
| | | //自定义lookup查询 |
| | | function searchContact(contactNodeId,field){ |
| | | closeField = field; |
| | | let searchContactKeyWord = document.getElementById(field).value |
| | | let accountValue = ""; |
| | | if (document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name')!=null) { |
| | | let accountNodeId = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name').id + '_lkid'; |
| | |
| | | console.log(accountValue); |
| | | if(accountValue !='000000000000000'){ |
| | | let baseUrl = "/apex/SearchContactPage"; |
| | | let suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue+"&searchContactKeyWord=" + searchContactKeyWord; |
| | | let suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue; |
| | | 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) { |
| | |
| | | } |
| | | return false; |
| | | }else{ |
| | | alert('请先选择客户再选择联系人') |
| | | console.log('请先选择客户再选择联系人') |
| | | } |
| | | } |
| | | |
| | |
| | | document.getElementById(contactNodeId).value = contactInfo.ContactId; |
| | | document.getElementById(closeField).value = contactInfo.Name; |
| | | } |
| | | function queryRecordType(){ |
| | | if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name').value){ |
| | | queryRecordType(); |
| | | //2022 02 28 张华建 display PI Data end |
| | | </script> |
| | | <script type="text/javascript"> |
| | | |
| | | function DecryptAddress(){ |
| | | let arr1 = [];let a1=false; |
| | | let arr2 = [];let a2=false; |
| | | j$('td.oraddress').each(function(i,e){ |
| | | let did = j$(e).attr('address-data-id'); |
| | | if (did) { |
| | | arr1.push(did); |
| | | } |
| | | |
| | | did = j$(e).attr('contact-data-id'); |
| | | if (did) { |
| | | arr2.push(did); |
| | | } |
| | | }) |
| | | |
| | | if (arr1.length) { |
| | | b(); |
| | | AWSService.post(staticResource.searchUrl,{ |
| | | dataIds:arr1 |
| | | },function(data){ |
| | | ub(); |
| | | if(data && data.object && data.object.length > 0){ |
| | | for (let di in data.object) { |
| | | if (data.object[di] && data.object[di].dataId) { |
| | | addressAwsData[data.object[di].dataId] = data.object[di]; |
| | | } |
| | | } |
| | | |
| | | } |
| | | },staticResource.token) |
| | | } |
| | | |
| | | if (arr2.length) { |
| | | b(); |
| | | AWSService.post(staticResourceContact.searchUrl,{ |
| | | dataIds:arr2 |
| | | },function(data){ |
| | | ub(); |
| | | if(data && data.object && data.object.length > 0){ |
| | | for (let di in data.object) { |
| | | if (data.object[di] && data.object[di].dataId) { |
| | | addressAwsData[data.object[di].dataId] = data.object[di]; |
| | | } |
| | | } |
| | | |
| | | } |
| | | },staticResourceContact.token) |
| | | } |
| | | } |
| | | //2022 02 28 张华建 display PI Data end |
| | | </script> |
| | | <apex:form id="allForm"> |
| | | <apex:inputHidden id="tableValueFrontEnd" value="{!tableDataStr}"/> |
| | |
| | | <apex:inputHidden value="{!insUpdDataStr}" id="insUpdDataStr"/> |
| | | <div id="tab01"> |
| | | <!-- 页面数据初始化方法 --> |
| | | <apex:actionFunction name="init" action="{!init}" rerender="oppBlock1,message,checEventFrame" onComplete="unblockUI();"></apex:actionFunction> |
| | | <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="unblockUI();"> |
| | | <apex:actionFunction name="searchBtn" action="{!searchBtn}" rerender="oppBlock1,message,checEventFrame,tableValueFrontEnd" onComplete="ub();DecryptAddress();"> |
| | | <apex:param name="addressDataIds" assignTo="{!addressDataIds}" value=""></apex:param> |
| | | </apex:actionFunction> |
| | | <!-- 采用方法 --> |
| | | <apex:actionFunction name="adoptSave" action="{!adoptSave}" rerender="oppBlock2,message" onComplete="unblockUI();"> |
| | | <apex:actionFunction name="adoptSave" action="{!adoptSave}" rerender="oppBlock2,message" onComplete="ub();"> |
| | | <apex:param name="adoptId" assignTo="{!adoptId}" value="" /> |
| | | <apex:param name="isUpload" assignTo="{!isUpload}" value="" /> |
| | | </apex:actionFunction> |
| | | <!-- 保存和修改方法 --> |
| | | <apex:actionFunction name="save" action="{!save}" rerender="oppBlock2,message" onComplete="unblockUI();{!IF(isSearchBtn,'searchBtnJs()',false)};Trans()"></apex:actionFunction> |
| | | <!-- 查询客户记录类型方法 --> |
| | | <apex:actionFunction name="queryRecordType" action="{!queryRecordType}" rerender="oppBlock2,message" onComplete="unblockUI();"></apex:actionFunction> |
| | | <apex:actionFunction name="save" action="{!save}" rerender="oppBlock2,message" onComplete="ub();Trans()"></apex:actionFunction> |
| | | <!-- 点击修改按钮获取修改数据方法 --> |
| | | <apex:actionFunction name="onEditor" action="{!onEditor}" rerender="oppBlock2,checEventFrame,insUpdDataStr" onComplete="decrypt();unblockUI();"> |
| | | <apex:actionFunction name="onEditor" action="{!onEditor}" rerender="oppBlock2,checEventFrame,insUpdDataStr" onComplete="decrypt();ub();"> |
| | | <apex:param name="UpdId" assignTo="{!UpdId}" value="" /> |
| | | </apex:actionFunction> |
| | | <!-- 复制方法 --> |
| | | <apex:actionFunction name="onCopy" action="{!onCopy}" rerender="oppBlock2,checEventFrame," onComplete="decrypt();unblockUI();"> |
| | | <apex:actionFunction name="onCopy" action="{!onCopy}" rerender="oppBlock2,checEventFrame," onComplete="decrypt();ub();"> |
| | | <apex:param name="UpdId" assignTo="{!UpdId}" value="" /> |
| | | </apex:actionFunction> |
| | | <!-- 返回父页面 --> |
| | | <apex:actionFunction name="redirectPag" action="{!redirectPag}" rerender="true" onComplete="unblockUI();"></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> |
| | |
| | | </a> |
| | | </td> |
| | | <td style="width: 20%"> |
| | | <apex:commandButton onclick="searchBtnJs();return false;" rendered="true" value="检索" style="width:60px;" onComplete="unblockUI();"/> |
| | | <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"/> |
| | | --> |
| | |
| | | <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" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;"> |
| | | <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" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" aws-data-id="{!or.address.AWS_Data_Id__c}"> |
| | | <td align="left" class="oraddress" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;" address-data-id="{!or.address.AWS_Data_Id__c}" contact-data-id="{!or.address.Contacts__r.AWS_Data_Id__c}"> |
| | | <!-- <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> |
| | | </td> |
| | |
| | | <td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;"> |
| | | <apex:outputText value="{!or.address.Detailed_Address__c}" /> |
| | | </td> |
| | | <!-- <td align="center" style="vertical-align: inherit;width:30px;"> |
| | | <td align="center" style="vertical-align: inherit;width:30px;"> |
| | | <apex:commandButton value=" 编辑 " onclick="onEditorJs('{!or.address.id}');return false;" style="background:#98c1fbf7;display:{!or.canEdit};"/> |
| | | </td> --> |
| | | </td> |
| | | <td align="center" style="vertical-align: inherit;width:30px;"> |
| | | <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:30px;"> |
| | | <apex:commandButton value=" 采用 " onclick="onAdoptJs('{!or.address.id}');return false;" style="background: #98c1fbf7;display:{!or.canAdopt};"/> |
| | | <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:pageBlock id="oppBlock2" tabStyle="Report"> |
| | | <apex:pageblocksection title="编辑地址" id="UpdAddressId" rendered="true" columns="4"> |
| | | <apex:inputfield value="{!insUpdData.Address_Classification__c}" id="Address_Classification__c" /> |
| | | <apex:inputfield value="{!insUpdData.Customer__c}" id="Customer__r_Name" required="false" onchange="queryRecordType();" /> |
| | | <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"/> --> |
| | | <!-- Add By Li Jun for PIPL 20220308 Start --> |
| | | <!-- <apex:inputText label="联系人" disabled="true" value="{!contactNameValue}" id="Contacts__c">--> |
| | | <apex:inputText label="联系人" value="{!contactNameValue}" id="Contacts__c"> |
| | | <apex:inputText label="联系人" disabled="true" value="{!contactNameValue}" id="Contacts__c"> |
| | | </apex:inputText> |
| | | <apex:inputHidden id="contactIdValue" value="{!contactIdValue}"/> |
| | | <!-- Add By Li Jun for PIPL 20220308 End --> |
| | |
| | | <apex:inputHidden id="Telephone_Encrypted__c" value="{!insUpdData.Telephone_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}"/> |
| | | <apex:inputHidden id="CustomerRecordType" value="{!accRecordTypeId}"/> |
| | | </apex:pageblocksection> |
| | | |
| | | <div style="text-align: center;"> |
| | |
| | | </apex:form> |
| | | <apex:outputPanel id="checEventFrame"> |
| | | <script type="text/javascript"> |
| | | |
| | | |
| | | j$("select option[value='办事处']")[1].remove(); |
| | | DecryptAddress(); |
| | | |
| | | </script> |
| | | </apex:outputPanel> |
| | | <script type="javascript/text"> |
| | | |
| | | </script> |
| | | |
| | | </apex:page> |