From 5f8c97f8716088019ad9a0302c5dea461bc668b1 Mon Sep 17 00:00:00 2001
From: zhangzhengmei <zhangzhengmei@prec-tech.com>
Date: 星期一, 07 八月 2023 15:35:56 +0800
Subject: [PATCH] CIC相关按钮
---
force-app/main/default/pages/StraightBackAddress.page | 61 ++++++++++++++++++++----------
1 files changed, 41 insertions(+), 20 deletions(-)
diff --git a/force-app/main/default/pages/StraightBackAddress.page b/force-app/main/default/pages/StraightBackAddress.page
index 91c9f1c..64314b8 100644
--- a/force-app/main/default/pages/StraightBackAddress.page
+++ b/force-app/main/default/pages/StraightBackAddress.page
@@ -5,7 +5,7 @@
@last modified on : 03-30-2022
@last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
-->
-<apex:page controller="StraightBackAddressController" action="{!init}" showHeader="false" lightningStylesheets="true" sidebar="true" id="allPage" title="鐩磋繑鏀惰揣鍦板潃">
+<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)}"/>
@@ -13,6 +13,13 @@
<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)}"/>
+ <style>
+ body .bPageBlock .detailList .dataCol {
+ width: 20%;
+ }
+ </style>
+
<script type="text/javascript">
var checkedTrue;
var tableDataStr = '';
@@ -37,6 +44,10 @@
var telePhonePlaintext = '';
var zipCodePlaintext = '';
var detailedAddressPlaintext = '';
+ //add by xq 2023/06/30 Start
+ var tableDataJsons = JSON.parse('{!tableDataJson}');
+ console.log('tableDataJsons = ' + JSON.stringify(tableDataJsons))
+ //add by xq 2023/06/30 end
function b(){
if (!isBlocking) {
blockme();
@@ -398,6 +409,8 @@
// Address__c DatetimeUpdate = new Address__c();
// DatetimeUpdate = tableData[i].address;
//璇︾粏鍦板潃
+ debugger
+ console.log('杩涘叆閲囩敤')
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;
@@ -440,7 +453,6 @@
let rc = new sforce.SObject('Repair__c');
rc.Id='{!RepairId}';
rc.address_Contacts__c=contactsName;
- debugger
rc.address_ZipCode__c = address.ZipCode__c;
rc.address_City__c = cityName;
rc.address_Contacts_Name__c = ContactPerson;
@@ -658,7 +670,7 @@
console.log('contacts == null')
return;
}
- let temp = {}
+ let temp = {};
temp.telephone = result.object.telephone;
temp.zipCode = result.object.zipCode;
temp.detailedAddress = result.object.detailedAddress;
@@ -681,7 +693,7 @@
var interval=self.setInterval(function (){
console.log('setInterval index= ' + index);
if(index == correct){
- console.log('PIDATA = ' + JSON.stringify(PIData))
+ console.log('PIDATA = ' + JSON.stringify(PIData));
resolve('success')
clearInterval(interval)
}
@@ -692,6 +704,16 @@
//zhj PIPL 2022-06-08 start
function q2(){
+ //瑙e瘑淇℃伅add by xq 2023/07/03 Start
+ for(var i in tableDataJsons){
+ if(PIData[tableDataJsons[i]]){
+ document.getElementById(tableDataJsons[i]).innerText = PIData[tableDataJsons[i]].lastName;
+ document.getElementById(tableDataJsons[i] + '_phone').innerText = PIData[tableDataJsons[i]].telephone;
+ document.getElementById(tableDataJsons[i]+'_ZipCode').innerText = PIData[tableDataJsons[i]].zipCode;
+ document.getElementById(tableDataJsons[i]+'_Detailed_Address').innerText = PIData[tableDataJsons[i]].detailedAddress;
+ }
+ }
+ //瑙e瘑淇℃伅add by xq 2023/07/03 end
// sforce.connection.sessionId = '{!GETSESSIONID()}';
// var p = new Promise(function(resolve, reject){
// //鏌ヨ鑱旂郴浜虹殑鏁版嵁
@@ -780,7 +802,7 @@
createDiv.style.background="#dddddd";
createDiv.style.position = "absolute";
parentNode.appendChild(createDiv);
- parentNode.style.position = "relative";
+ parentNode.style.position = "relative";
}
function hidePIDiv(awsDataId){
@@ -873,7 +895,6 @@
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) {
@@ -882,6 +903,7 @@
}
}
+ ub();
},staticResource.token)
}
@@ -890,7 +912,6 @@
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) {
@@ -899,6 +920,7 @@
}
}
+ ub();
},staticResourceContact.token)
}
}
@@ -944,7 +966,7 @@
<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="display: inline;">
+ <a class="inlineEditUndoLink" title="娓呯┖" href="#" onclick="document.getElementById('allPage:allForm:searchBlock:txtNameId').value = '';document.getElementById('allPage:allForm:searchBlock:txtNameId').focus();" style="display: inline;">
<img width="16px" height="16px" src="/img/s.gif" alt="娓呯┖" class="inlineEditUndo"/>
</a>
</td>
@@ -1013,12 +1035,13 @@
<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> -->
- <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>
+ <!-- <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> -->
+ <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-->
</td>
- <td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;">
- <apex:outputText value="{!or.address.Telephone__c}" />
+ <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;">
+ <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;">
@@ -1027,16 +1050,16 @@
<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;">
+ <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:30px;">
+ <td align="center" style="vertical-align: inherit;width:70px;border-width: 0px 0px 1px 0px;display:{!or.canEdit};">
<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:30px;">
+ <td align="center" style="vertical-align: inherit;width:70px;border-width: 0px 0px 1px 0px;display:{!or.canCopy};">
<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;">
+ <td align="center" style="vertical-align: inherit;width:70px;border-width: 0px 0px 1px 0px;display:{!or.canAdopt};">
<apex:commandButton value=" 閲囩敤 " onclick="onAdoptJs(event,JSON.parse('{!or.addressJson}'));return false;" style="background: #98c1fbf7;display:{!or.canAdopt};"/>
</td>
</tr>
@@ -1084,11 +1107,9 @@
<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;width: 98%"/>
+ <apex:inputfield value="{!insUpdData.Detailed_Address__c}" id="Detailed_Address__c" style="resize:vertical;"/>
- <!-- 2023-02-13 zyh add Start -->
- <div id="errorMsg" style="color: red;"></div>
- <!-- 2023-02-13 zyh add end -->
+ <div id="errorMsg" class="errorMsg"></div>
</apex:pageblocksection>
<div style="text-align: center;">
--
Gitblit v1.9.1