From 744f42c5496e656a1f9927740a3b37c0b97a6cba Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 14 七月 2023 14:34:12 +0800
Subject: [PATCH] lexcommunityupload0714
---
force-app/main/default/pages/ConsumTrial.page | 1101 ++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 695 insertions(+), 406 deletions(-)
diff --git a/force-app/main/default/pages/ConsumTrial.page b/force-app/main/default/pages/ConsumTrial.page
index ef576a7..c1f5089 100644
--- a/force-app/main/default/pages/ConsumTrial.page
+++ b/force-app/main/default/pages/ConsumTrial.page
@@ -5,6 +5,13 @@
<apex:stylesheet value="{!URLFOR($Resource.ConsumTrialPageCss)}"/>
<apex:includeScript value="{!URLFOR($Resource.ReceivingNotePageJS)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
+ <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
+
+ <script type="text/javascript">
+ var txIds = [];
+ var trialuserMap={};
+ </script>
+
<apex:form id="allForm">
<style>
table.headTable td {
@@ -23,288 +30,555 @@
background-repeat:no-repeat;
}
</style>
-<script type="text/javascript">
- var heightAjustment = 120;
- var widthAjustment = 30;
+ <script type="text/javascript">
+ var heightAjustment = 120;
+ var widthAjustment = 30;
+ var staticResource = JSON.parse('{!staticResource}');
+
- // 閫傜敤鎸夐挳
- function applyJs() {
- var appliedFlag = true;
- var selectFlag = true;
- var isCheckFlag = false;
- var ShowDemonstration = j$(escapeVfId('allPage:allForm:searchBlock:ShowDemonstration')).val(); // 灞曠ず/婕旂ず
- var OperationType = j$(escapeVfId('allPage:allForm:searchBlock:OperationType')).val(); // 鏈紡绫诲埆
- var ConsumStartDate = j$(escapeVfId('allPage:allForm:searchBlock:ConsumStartDate')).val(); // 棰勮浣跨敤鏃�
- var CaseOrAnimalOrgan = j$(escapeVfId('allPage:allForm:searchBlock:CaseOrAnimalOrgan')).val(); // 鐥呬緥/鍔ㄧ墿鑴忓櫒
- var TrialUser= j$(escapeVfId('allPage:allForm:searchBlock:TrialUser')).val(); // 璇曠敤鑰�
- var FollowerUserid = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkid')).val(); // 璺熷彴鑰匢d
- var FollowerUsername = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkold')).val(); // 璺熷彴鑰匩ame
+ // 閫傜敤鎸夐挳
+ function applyJs() {
+ var appliedFlag = true;
+ var selectFlag = true;
+ var isCheckFlag = false;
+ var ShowDemonstration = j$(escapeVfId('allPage:allForm:searchBlock:ShowDemonstration')).val(); // 灞曠ず/婕旂ず
+ var OperationType = j$(escapeVfId('allPage:allForm:searchBlock:OperationType')).val(); // 鏈紡绫诲埆
+ var ConsumStartDate = j$(escapeVfId('allPage:allForm:searchBlock:ConsumStartDate')).val(); // 棰勮浣跨敤鏃�
+ var CaseOrAnimalOrgan = j$(escapeVfId('allPage:allForm:searchBlock:CaseOrAnimalOrgan')).val(); // 鐥呬緥/鍔ㄧ墿鑴忓櫒
+ var TrialUser= j$(escapeVfId('allPage:allForm:searchBlock:TrialUser')).val(); // 璇曠敤鑰�
+ var FollowerUserid = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkid')).val(); // 璺熷彴鑰匢d
+ var FollowerUsername = j$(escapeVfId('allPage:allForm:searchBlock:FollowerUser_lkold')).val(); // 璺熷彴鑰匩ame
- var ShowDemonstrations = []; // 灞曠ず/婕旂ず
- j$("td.intf.dataCellBorder1.Show_demonstration__c").each(function() {
- ShowDemonstrations.push(j$(this));
- });
- var OperationTypes = []; // 鏈紡绫诲埆
- j$("td.intf.dataCellBorder1.Operation_Type__c").each(function() {
- OperationTypes.push(j$(this));
- });
- var ConsumStartDates = []; // 澶囧搧棰勮浣跨敤鏃�
- j$("td.intf.dataCellBorder1.Consum_Start_Date__c").each(function() {
- ConsumStartDates.push(j$(this));
- });
- var CaseOrAnimalOrgans = []; // 鐥呬緥/鍔ㄧ墿鑴忓櫒
- j$("td.intf.dataCellBorder1.Case_OR_animal_organ__c").each(function() {
- CaseOrAnimalOrgans.push(j$(this));
- });
+ var ShowDemonstrations = []; // 灞曠ず/婕旂ず
+ j$("td.intf.dataCellBorder1.Show_demonstration__c").each(function() {
+ ShowDemonstrations.push(j$(this));
+ });
+ var OperationTypes = []; // 鏈紡绫诲埆
+ j$("td.intf.dataCellBorder1.Operation_Type__c").each(function() {
+ OperationTypes.push(j$(this));
+ });
+ var ConsumStartDates = []; // 澶囧搧棰勮浣跨敤鏃�
+ j$("td.intf.dataCellBorder1.Consum_Start_Date__c").each(function() {
+ ConsumStartDates.push(j$(this));
+ });
+ var CaseOrAnimalOrgans = []; // 鐥呬緥/鍔ㄧ墿鑴忓櫒
+ j$("td.intf.dataCellBorder1.Case_OR_animal_organ__c").each(function() {
+ CaseOrAnimalOrgans.push(j$(this));
+ });
- var TrialUsers = []; // 璇曠敤鑰�
- j$("td.intf.dataCellBorder1.Trial_User__c").each(function() {
- TrialUsers.push(j$(this));
- });
+ var TrialUsers = []; // 璇曠敤鑰�
+ j$("td.intf.dataCellBorder1.Trial_User__c").each(function() {
+ TrialUsers.push(j$(this));
+ });
- var FollowerUsers = []; // 璺熷彴鑰�:
- j$("td.intf.dataCellBorder1.Follower_User__c").each(function() {
- FollowerUsers.push(j$(this));
- });
+ var FollowerUsers = []; // 璺熷彴鑰�:
+ j$("td.intf.dataCellBorder1.Follower_User__c").each(function() {
+ FollowerUsers.push(j$(this));
+ });
- var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).val();
- for (var i = 0; i < currentPageRecordCount; i++) {
- var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
- if (checkBox.prop('checked') == true) {
- isCheckFlag = true;
- // 'x'鏃朵笉閫傜敤
- if (ShowDemonstration != 'x') {
- ShowDemonstrations[i].find("select").val(ShowDemonstration);
- appliedFlag = false;
- }
- if (OperationType != 'x') {
- OperationTypes[i].find("select").val(OperationType);
- appliedFlag = false;
- }
- if (ConsumStartDate != null && ConsumStartDate != '' && typeof(ConsumStartDate) != "undefined") {
- ConsumStartDates[i].find("input").val(ConsumStartDate);
- appliedFlag = false;
- }
- if (CaseOrAnimalOrgan != 'x') {
- CaseOrAnimalOrgans[i].find("select").val(CaseOrAnimalOrgan);
- appliedFlag = false;
- }
-
- if (TrialUser != null && TrialUser != '' && typeof(TrialUser) != "undefined") {
- TrialUsers[i].find("input").val(TrialUser);
- appliedFlag = false;
- }
-
- // if (equipmentTypes[i].find("select").val() != productCategory && productCategory != '') {
- if (FollowerUserid != null && parseInt(FollowerUserid) != 0 && typeof(FollowerUserid) != "undefined"
- && FollowerUsername != null && FollowerUsername != 'null' && typeof(FollowerUsername) != "undefined") {
- // setChangeFlg();
-
- var inputs = FollowerUsers[i].find("input");
- for (var j = 0; j < inputs.length; j++) {
- if(inputs[j].name.endsWith('_lkid')) {
- inputs[j].value = FollowerUserid;
- }
- else if (inputs[j].name.endsWith('_lkold')
- || inputs[j].name.endsWith('inputField')) {
- inputs[j].value = FollowerUsername;
- }
+ var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).val();
+ for (var i = 0; i < currentPageRecordCount; i++) {
+ var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
+ if (checkBox.prop('checked') == true) {
+ isCheckFlag = true;
+ // 'x'鏃朵笉閫傜敤
+ if (ShowDemonstration != 'x') {
+ ShowDemonstrations[i].find("select").val(ShowDemonstration);
+ appliedFlag = false;
}
- appliedFlag = false;
+ if (OperationType != 'x') {
+ OperationTypes[i].find("select").val(OperationType);
+ appliedFlag = false;
+ }
+ if (ConsumStartDate != null && ConsumStartDate != '' && typeof(ConsumStartDate) != "undefined") {
+ ConsumStartDates[i].find("input").val(ConsumStartDate);
+ appliedFlag = false;
+ }
+ if (CaseOrAnimalOrgan != 'x') {
+ CaseOrAnimalOrgans[i].find("select").val(CaseOrAnimalOrgan);
+ appliedFlag = false;
+ }
+
+ if (TrialUser != null && TrialUser != '' && typeof(TrialUser) != "undefined") {
+ TrialUsers[i].find("input").val(TrialUser);
+ appliedFlag = false;
+ }
+
+ // if (equipmentTypes[i].find("select").val() != productCategory && productCategory != '') {
+ if (FollowerUserid != null && parseInt(FollowerUserid) != 0 && typeof(FollowerUserid) != "undefined"
+ && FollowerUsername != null && FollowerUsername != 'null' && typeof(FollowerUsername) != "undefined") {
+ // setChangeFlg();
+
+ var inputs = FollowerUsers[i].find("input");
+ for (var j = 0; j < inputs.length; j++) {
+ if(inputs[j].name.endsWith('_lkid')) {
+ inputs[j].value = FollowerUserid;
+ }
+ else if (inputs[j].name.endsWith('_lkold')
+ || inputs[j].name.endsWith('inputField')) {
+ inputs[j].value = FollowerUsername;
+ }
+ }
+ appliedFlag = false;
+ }
}
}
- }
- j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
- // var clearApplyFlag = false;
- window.setTimeout(function () {
- if (ConsumStartDate == null
+ j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
+ // var clearApplyFlag = false;
+ window.setTimeout(function () {
+ if (ConsumStartDate == null
&& TrialUser == null
&& (FollowerUserid== null || FollowerUsername == null)) { // 閫傜敤鍏ュ姏妗嗗叏涓虹┖
- // alert('閫傜敤鍖鸿緭鍏ユ涓虹┖锛岃杈撳叆閫傜敤鍊笺��');
- var applyMsg = '閫傜敤鍖鸿緭鍏ユ涓虹┖锛岃杈撳叆閫傜敤鍊笺��';
- //passApplyMsgToController(applyMsg, 'Fail');
- return;
- }
- if (isCheckFlag == false) {
- // alert('鏈嬀閫変换浣曞緟閫傜敤鏁版嵁銆�');
- var applyMsg = '鏈嬀閫変换浣曞緟閫傜敤鏁版嵁銆�';
- //passApplyMsgToController(applyMsg, 'Fail');
- return;
- }
-
- if (selectFlag) {
- if (!appliedFlag) {
- var alertMsg = "閫傜敤瀹屼簡 \r\n";
- if (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
- var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "澶囧搧棰勮浣跨敤鏃�" + " 閫傜敤涓� " + ConsumStartDate + " \r\n";
- alertMsg += alertMsg1;
- }
- if (TrialUser != null && typeof(TrialUser) != "undefined") {
- var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璇曠敤鑰�" + " 閫傜敤涓� " + TrialUser + " \r\n";
- alertMsg += alertMsg1;
- }
- if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
- && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
- var alertMsg2 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璺熷彴鑰�:" + " 閫傜敤涓� " + FollowerUsername + " \r\n";
- alertMsg += alertMsg2;
- }
- // alert(alertMsg);
- // clearApplyFlag = true;
- j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
- //passApplyMsgToController(alertMsg, 'Success');
+ // alert('閫傜敤鍖鸿緭鍏ユ涓虹┖锛岃杈撳叆閫傜敤鍊笺��');
+ var applyMsg = '閫傜敤鍖鸿緭鍏ユ涓虹┖锛岃杈撳叆閫傜敤鍊笺��';
+ //passApplyMsgToController(applyMsg, 'Fail');
+ return;
}
- } else {
- if (!appliedFlag) {
- var alertMsg = "閫傜敤瀹屼簡 \r\n";
- if (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
- var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "澶囧搧棰勮浣跨敤鏃�" + " 閫傜敤涓� " + ConsumStartDate + " \r\n";
- alertMsg += alertMsg1;
- }
- if (TrialUser != null && typeof(TrialUser) != "undefined") {
- var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + " 璇曠敤鑰�" + " 閫傜敤涓� " + TrialUser + " \r\n";
- alertMsg += alertMsg1;
- }
- if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
- && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
- var alertMsg2 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璺熷彴鑰�:" + " 閫傜敤涓� " + FollowerUsername + " \r\n";
- alertMsg += alertMsg2;
- }
- //passApplyMsgToController(alertMsg, 'Success');
- j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
- } else {
- var alertMsg = "鍏朵粬閫夐」: " + otherSelectOptionText +"涓棤姝ら�夐」鍊�" + otherSelectOptionValue + "锛屾棤娉曟洿鏂般��";
- //passApplyMsgToController(alertMsg, 'Fail');
- }
- }
- }, 5);
- }
-
- function clearApplyValue() {
- var clearApplyValueFlag = j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val();
- if(clearApplyValueFlag) {
- j$(escapeVfId('{!$Component.stockId}')).val('');
- j$(escapeVfId('{!$Component.applyEquipmentTypeId}')).val('');
- j$(escapeVfId('{!$Component.applyAssetTypeListId}')).val('');
- j$(escapeVfId('{!$Component.otherSelectionId}')).val('');
- }
- j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
- }
-
- function checkSavingJs() {
- var isSavingSuccess = j$(escapeVfId('isSavingSuccessId')).val();
- // alert(isSavingSuccess);
- if (isSavingSuccess != 'false') {
- //setSaveSuccessMsg();
- }
- }
-
- function resetMove(d, up, len) {
- var line = j$(escapeVfId(d)).find('input')[0].value;
- resetMoveUpDown(up, parseInt(line), len);
- }
-
- function moveToTop(d, up, len) {
- var line = j$(escapeVfId(d)).find('input')[0].value;
- console.log(line);
- var isSuccessful = true;
- if (up) {
- for(var i = parseInt(line) ; i > 1 && isSuccessful; i-- ) {
- isSuccessful = resetMoveUpDown(up, i, len);
- }
- }
- else {
- for(var i = parseInt(line) ; i < len && isSuccessful; i++ ) {
- isSuccessful = resetMoveUpDown(up, i, len);
- }
- }
- unblockUI();
- }
-
- function resetMoveUpDown(up, line, len) {
-
- var items = j$(".dataCellBorder2");
- var item1 = j$("td.intf.dataCellBorder1.Degree_Of_Importance__c");
- var item2 = j$("td.dataCellBorder1.col_Fixture_Model_No__c");
- var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).val();
- var isSuccessful = false;
- // alert(item1);
- var i = line - 1;
- var i1 = line + 1;
- // var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
- if (up == true){
- var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
- var trL = j$('#tableData_L').find('tbody').find('tr:eq(' + (i) + ')');
- if(line != 1) {
- var model1 = j$(item2[i - 1]).find("span").text();
- var model2 = j$(item2[i]).find("span").text();
- if (model1 != model2) {
- unblockUI();
+ if (isCheckFlag == false) {
+ // alert('鏈嬀閫変换浣曞緟閫傜敤鏁版嵁銆�');
+ var applyMsg = '鏈嬀閫変换浣曞緟閫傜敤鏁版嵁銆�';
+ //passApplyMsgToController(applyMsg, 'Fail');
return;
}
- var v1 = j$(item1[i - 1]).find("input").val();
- var v2 = j$(item1[i]).find("input").val();
- setChangeFlg(i-1);
- setChangeFlg(i);
- j$(items[i - 1]).children('.ordernocls').val(line);
- j$(items[i]).children('.ordernocls').val(line - 1);
- j$(item1[i - 1]).find("input").val(v2);
- j$(item1[i]).find("input").val(v1);
+ if (selectFlag) {
+ if (!appliedFlag) {
+ var alertMsg = "閫傜敤瀹屼簡 \r\n";
+ if (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
+ var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "澶囧搧棰勮浣跨敤鏃�" + " 閫傜敤涓� " + ConsumStartDate + " \r\n";
+ alertMsg += alertMsg1;
+ }
+ if (TrialUser != null && typeof(TrialUser) != "undefined") {
+ var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璇曠敤鑰�" + " 閫傜敤涓� " + TrialUser + " \r\n";
+ alertMsg += alertMsg1;
+ }
+ if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
+ && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
+ var alertMsg2 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璺熷彴鑰�:" + " 閫傜敤涓� " + FollowerUsername + " \r\n";
+ alertMsg += alertMsg2;
+ }
+ // alert(alertMsg);
+ // clearApplyFlag = true;
+ j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
+ //passApplyMsgToController(alertMsg, 'Success');
+ }
+ } else {
+ if (!appliedFlag) {
+ var alertMsg = "閫傜敤瀹屼簡 \r\n";
+ if (ConsumStartDate != null && typeof(ConsumStartDate) != "undefined") {
+ var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "澶囧搧棰勮浣跨敤鏃�" + " 閫傜敤涓� " + ConsumStartDate + " \r\n";
+ alertMsg += alertMsg1;
+ }
+ if (TrialUser != null && typeof(TrialUser) != "undefined") {
+ var alertMsg1 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + " 璇曠敤鑰�" + " 閫傜敤涓� " + TrialUser + " \r\n";
+ alertMsg += alertMsg1;
+ }
+ if (FollowerUserid != null && typeof(FollowerUserid) != "undefined"
+ && FollowerUsername != null && typeof(FollowerUsername) != "undefined") {
+ var alertMsg2 = "宸插皢鎵撳嬀鏁版嵁涓殑 " + "璺熷彴鑰�:" + " 閫傜敤涓� " + FollowerUsername + " \r\n";
+ alertMsg += alertMsg2;
+ }
+ //passApplyMsgToController(alertMsg, 'Success');
+ j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
+ } else {
+ var alertMsg = "鍏朵粬閫夐」: " + otherSelectOptionText +"涓棤姝ら�夐」鍊�" + otherSelectOptionValue + "锛屾棤娉曟洿鏂般��";
+ //passApplyMsgToController(alertMsg, 'Fail');
+ }
+ }
+ }, 5);
+ }
- isSuccessful = true;
- // j$(item1[i - 1]).children('.ordernocls').val('' + line);
- // j$(item1[i]).children('.ordernocls').val('' + i);
+ function clearApplyValue() {
+ var clearApplyValueFlag = j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val();
+ if(clearApplyValueFlag) {
+ j$(escapeVfId('{!$Component.stockId}')).val('');
+ j$(escapeVfId('{!$Component.applyEquipmentTypeId}')).val('');
+ j$(escapeVfId('{!$Component.applyAssetTypeListId}')).val('');
+ j$(escapeVfId('{!$Component.otherSelectionId}')).val('');
+ }
+ j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
+ }
+
+ function checkSavingJs() {
+ var isSavingSuccess = j$(escapeVfId('isSavingSuccessId')).val();
+ // alert(isSavingSuccess);
+ if (isSavingSuccess != 'false') {
+ //setSaveSuccessMsg();
+ }
+ }
+
+ function resetMove(d, up, len) {
+ var line = j$(escapeVfId(d)).find('input')[0].value;
+ resetMoveUpDown(up, parseInt(line), len);
+ }
+
+ function moveToTop(d, up, len) {
+ var line = j$(escapeVfId(d)).find('input')[0].value;
+ console.log(line);
+ var isSuccessful = true;
+ if (up) {
+ for(var i = parseInt(line) ; i > 1 && isSuccessful; i-- ) {
+ isSuccessful = resetMoveUpDown(up, i, len);
+ }
}
else {
- j$(items[i]).children('.ordernocls').val(line);
- }
- var tr1 = j$(items[i]).parents("tr");
- tr.prev().before(tr);
- trL.prev().before(trL);
- }
- else {
- if(line < currentPageRecordCount) {
- var model1 = j$(item2[i]).find("span").text();
- var model2 = j$(item2[line]).find("span").text();
- if (model1 != model2) {
- unblockUI();
- return;
+ for(var i = parseInt(line) ; i < len && isSuccessful; i++ ) {
+ isSuccessful = resetMoveUpDown(up, i, len);
}
+ }
+ unblockUI();
+ }
+
+ function resetMoveUpDown(up, line, len) {
+
+ var items = j$(".dataCellBorder2");
+ var item1 = j$("td.intf.dataCellBorder1.Degree_Of_Importance__c");
+ var item2 = j$("td.dataCellBorder1.col_Fixture_Model_No__c");
+ var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).val();
+ var isSuccessful = false;
+ // alert(item1);
+ var i = line - 1;
+ var i1 = line + 1;
+ // var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
+ if (up == true){
var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
var trL = j$('#tableData_L').find('tbody').find('tr:eq(' + (i) + ')');
- var v1 = j$(item1[i]).find("input").val();
- var v2 = j$(item1[i + 1]).find("input").val();
- setChangeFlg(i);
- setChangeFlg(i + 1);
- j$(items[i]).children('.ordernocls').val(line + 1);
- j$(items[i + 1]).children('.ordernocls').val(line);
- j$(item1[i]).find("input").val(v2);
- j$(item1[line]).find("input").val(v1);
+ if(line != 1) {
+ var model1 = j$(item2[i - 1]).find("span").text();
+ var model2 = j$(item2[i]).find("span").text();
+ if (model1 != model2) {
+ unblockUI();
+ return;
+ }
+
+ var v1 = j$(item1[i - 1]).find("input").val();
+ var v2 = j$(item1[i]).find("input").val();
+ setChangeFlg(i-1);
+ setChangeFlg(i);
+ j$(items[i - 1]).children('.ordernocls').val(line);
+ j$(items[i]).children('.ordernocls').val(line - 1);
+ j$(item1[i - 1]).find("input").val(v2);
+ j$(item1[i]).find("input").val(v1);
+
+ isSuccessful = true;
+ // j$(item1[i - 1]).children('.ordernocls').val('' + line);
+ // j$(item1[i]).children('.ordernocls').val('' + i);
+ }
+ else {
+ j$(items[i]).children('.ordernocls').val(line);
+ }
var tr1 = j$(items[i]).parents("tr");
- tr.next().after(tr);
- trL.next().after(trL);
- isSuccessful = true;
+ tr.prev().before(tr);
+ trL.prev().before(trL);
}
else {
- j$(items[i]).children('.ordernocls').val(line);
+ if(line < currentPageRecordCount) {
+ var model1 = j$(item2[i]).find("span").text();
+ var model2 = j$(item2[line]).find("span").text();
+ if (model1 != model2) {
+ unblockUI();
+ return;
+ }
+ var tr = j$('#tableData').find('tbody').find('tr:eq(' + (i) + ')');
+ var trL = j$('#tableData_L').find('tbody').find('tr:eq(' + (i) + ')');
+ var v1 = j$(item1[i]).find("input").val();
+ var v2 = j$(item1[i + 1]).find("input").val();
+ setChangeFlg(i);
+ setChangeFlg(i + 1);
+ j$(items[i]).children('.ordernocls').val(line + 1);
+ j$(items[i + 1]).children('.ordernocls').val(line);
+ j$(item1[i]).find("input").val(v2);
+ j$(item1[line]).find("input").val(v1);
+ var tr1 = j$(items[i]).parents("tr");
+ tr.next().after(tr);
+ trL.next().after(trL);
+ isSuccessful = true;
+ }
+ else {
+ j$(items[i]).children('.ordernocls').val(line);
+ }
+ }
+ unblockUI();
+ return isSuccessful;
+ }
+
+ function refopener() {
+ window.opener.location.href = '/apex/ConsumTrial?id={!parId}';
+ }
+
+ if (window.history.pushState) {
+ if (window.location.href.indexOf('&saveType=1') > -1) {
+ refopener();
+ }
+ window.history.pushState({}, "", window.location.href.replace('&saveType=1', ''));
+ }
+
+ //2022 02 24 寮犲崕寤� display PI Data start
+ var rowBList;
+ var TrialUser = {};
+ var ids = [];
+
+ function HasError(){
+ // 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;
+ // }
+ // }
+
+ // }
+
+ // }
+ // return false;
+
+ if(document.getElementById("allPage:allForm:message").children[0] && document.getElementById("allPage:allForm:message").children[0].children[0].className == 'message errorM3'){
+ return true;
+ }
+ return false;
+ }
+
+ function isError(){
+ if(HasError()){
+ alert('xxxx');
}
}
- unblockUI();
- return isSuccessful;
- }
- function refopener() {
- window.opener.location.href = '/apex/ConsumTrial?id={!parId}';
- }
- if (window.history.pushState) {
- if (window.location.href.indexOf('&saveType=1') > -1) {
- refopener();
+
+ queryUser();
+
+ function q1(){
+ var p = new Promise(function(resolve, reject){
+ rowBList = JSON.parse('{!rowListString}')
+ var x = 0;
+ var y = 0;
+ let searchCallBack = function searchCallBack(result){
+ let contacts = result.object;
+ if(contacts == null){
+ return;
+ }
+ let temp = {}
+ temp.trialUser = contacts.trialUser;
+ TrialUser[contacts.dataId] = temp;
+ x++;
+ };
+ for(var i=0;i<rowBList.length;i++){
+ if(rowBList[i].rnd.AWS_Data_Id__c ){
+ y++;
+ ids.push(rowBList[i].rnd.AWS_Data_Id__c + '_' + rowBList[i].rnd.Id);
+ AWSService.query(staticResource.queryUrl,rowBList[i].rnd.AWS_Data_Id__c,searchCallBack,staticResource.token);
+ }
+ }
+ var id = setInterval(function(){
+ if(x == y){
+ console.log('success')
+ resolve('success');
+ clearInterval(id);
+ }
+ },500);
+ });
+ return p;
}
- window.history.pushState({},"", window.location.href.replace('&saveType=1',''));
- }
-</script>
- <apex:pageMessages />
+
+ function q2(value){
+ var p = new Promise(function(resolve, reject){
+ console.log('杩涘叆q2'+value)
+ for(var i=0;i<ids.length;i++){
+ console.log('i = '+i);
+ //document.getElementById(ids[i]).children[0].children[0].children[0].value = TrialUser[ids[i].substring(0,18)].trialUser;
+ document.getElementById(ids[i]).children[0].children[0].children[0].value = TrialUser[ids[i].split('_')[0]].trialUser; //zhj 鏀瑰杽鍙栧�� 2022-12-30
+ console.log('i = '+i);
+ }
+ });
+ }
+
+ function queryUser(){
+ debugger
+ rowBList = JSON.parse('{!rowListString}')
+ console.log('pageB.fixMode = '+'{!pageB.fixMode}')
+ if('{!pageB.fixMode}' == 'true'){
+ q1().then(function(data){
+ return q2(data);
+ })
+ unblockUI();
+ }else{
+ blockme();
+ console.log(rowBList)
+ let searchCallBack = function searchCallBack(result){
+ let contacts = result.object;
+ if(contacts == null){
+ return;
+ }
+ let temp = {}
+ temp.trialUser = contacts.trialUser;
+ TrialUser[contacts.dataId] = temp;
+ };
+ for(var i=0;i<rowBList.length;i++){
+ ids.push(rowBList[i].rnd.AWS_Data_Id__c + '_' + rowBList[i].rnd.Id);
+ AWSService.query(staticResource.queryUrl,rowBList[i].rnd.AWS_Data_Id__c,searchCallBack,staticResource.token);
+ }
+ unblockUI();
+ }
+ }
+
+ function showPIDiv(awsDataId){
+ if(awsDataId.length == 0){
+ return
+ }
+ let index = awsDataId.indexOf('_');
+ console.log('show index = ' + index);
+ if(TrialUser[awsDataId.substring(0,index)] == null){
+ return
+ }
+ console.log('awsDataId Value:'+awsDataId);
+ let parentNode = document.getElementById(awsDataId);
+ let createDiv = document.createElement("div");
+ createDiv.id = awsDataId+"_PI";
+ let piInformation = TrialUser[awsDataId.substring(0,index)].trialUser
+ //let piInformation = 'Name:'+contact['943114607025717249'].lastName +'\n' +'Phone:'+contact['943114607025717249'].phone
+ createDiv.innerText = piInformation;
+ let x=window.event.x;
+ let y=window.event.y;
+ createDiv.style.left=x;
+ createDiv.style.top=y;
+ createDiv.style.background="#dddddd";
+ createDiv.style.position = "absolute";
+ parentNode.appendChild(createDiv);
+ parentNode.style.position = "relative";
+ }
+
+ function hidePIDiv(awsDataId){
+ if(awsDataId.length == 0){
+ return
+ }
+ let index = awsDataId.indexOf('_');
+ console.log('show index = ' + index);
+ if(TrialUser[awsDataId.substring(0,index)] == null){
+ return
+ }
+ document.getElementById(awsDataId+'_PI').remove();
+ }
+
+
+ function q3(){
+ var p = new Promise(function(resolve, reject){
+ console.log('saveRecordJS')
+ txIds = [];
+ trialuserMap = {};
+ var a = 0;
+ var b = 0;
+ debugger
+ let newCallBack = function newCallBack(result,indexNumber){
+ //璧嬪�糳ataId鍜宼rialUser
+ document.getElementById('allPage:allForm:dataBlock:dataline_R_aws:'+indexNumber+':EditAWSDataId').value = result.object[0].dataId;
+ //document.getElementById('allPage:allForm:dataBlock:dataline_R_aws:'+indexNumber+':TrialUserEncrypt').value = result.object[0].trialUserEncrypt; //zhj 鏂版柟妗堟敼閫� 2022-12-30
+ document.getElementById('allPage:allForm:dataBlock:dataline_R:'+indexNumber+':inputField:6:inputField').value = result.object[0].trialUser;
+ // let transParameters = {
+ // txId: result.txId,
+ // isSuccess: 1
+ // };
+ // let confirmCallBack = function confirmCallBack(result){
+ // console.log('confirmCallBack = '+JSON.stringify(result))
+ // }
+ b++;
+ txIds.push(result.txId)
+ //AWSService.confirmTrans(staticResource.transactionUrl,JSON.stringify(transParameters),confirmCallBack,staticResource.token)
+ };
+ for(var i=0;i<rowBList.length;i++){
+ if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
+ a++;
+ }
+ }
+ for(var i=0;i<rowBList.length;i++){
+ if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
+ //鍔犲瘑璇曠敤鑰�
+ let e = document.getElementById('allPage:allForm:dataBlock:dataline_R:'+i+':inputField:6:j_id86').children[0].children[0];
+ var trialUser = e.value;
+ trialuserMap['allPage:allForm:dataBlock:dataline_R:'+i+':inputField:6:j_id86'] = trialUser;
+ let consumApplyPayloadList = [];
+ let consumApplyPIData = new Object();
+ consumApplyPIData.trialUser = trialUser;
+ consumApplyPIData.sfRecordId = '';
+ consumApplyPayloadList.push(consumApplyPIData);
+ AWSService.postConsumTrial(staticResource.newUrl,i,JSON.stringify(consumApplyPayloadList),newCallBack,staticResource.token);
+ }
+ }
+ var id = setInterval(function(){
+ if(a == b){
+ console.log('a==b success')
+ resolve('success');
+ clearInterval(id);
+ }
+ },500);
+ });
+ return p;
+ }
+
+ function q4(){
+ debugger
+ let b = false;
+ for(var i=0;i<rowBList.length;i++){
+ if(document.getElementById('allPage:allForm:dataBlock:dataline_L:'+i+':rowCheck').checked == true){
+ b = true;
+ }
+ }
+ if(!b){
+ //unblockUI();
+ window.location.href='/apex/ConsumTrial?id=' + '{!parId}' + '&canedit=true&saveType=1';
+ return;
+ }
+ saveRecord();
+ }
+
+ function Trans(){
+ if(HasError()){
+ unblockUI();
+ for(var e in trialuserMap){
+ document.getElementById(e).children[0].children[0].value = trialuserMap[e];
+ }
+ return;
+ }
+ var x = 0;
+ let confirmCallBack = function confirmCallBack(result){
+ console.log('confirmCallBack = '+JSON.stringify(result))
+ x++;
+ if(x == txIds.length){
+ //refopener();
+ //unblockUI();
+ window.location.href='/apex/ConsumTrial?id=' + '{!parId}' + '&canedit=true&saveType=1';
+ }
+ }
+ for(var i=0;i<txIds.length;i++){
+ let transParameters = {
+ txId: txIds[i],
+ isSuccess: 1
+ };
+ AWSService.confirmTrans(staticResource.transactionUrl,JSON.stringify(transParameters),confirmCallBack,staticResource.token)
+ }
+ }
+
+ function saveRecordJS(){
+ if('{!pageB.fixMode}' != 'true'){
+ unblockUI();
+ return
+ }
+ q3().then(function(data){
+ return q4(data);
+ })
+ //unblockUI();
+ }
+ //2022 02 24 寮犲崕寤� display PI Data end
+ </script>
+ <apex:pageMessages id="message"/>
<!-- oncomplete="clearApplyValue(); return false;" -->
<apex:actionFunction name="passApplyMsgToController" action="{!showApplyMsg}" rerender="allForm">
<apex:param name="applyMsg" value="" />
@@ -313,7 +587,7 @@
<apex:actionFunction name="sendEmail" action="{!sendEmail}" rerender="allForm" oncomplete="unblockUI();">
<apex:param name="emailBody" value="" />
</apex:actionFunction>
- <apex:actionFunction name="saveRecord" action="{!saveRecord}" oncomplete="refopener();unblockUI();" rerender="allForm"/>
+ <apex:actionFunction name="saveRecord" action="{!saveRecord}" oncomplete="Trans();" rerender="allForm"/>
<apex:inputHidden id="clearApplyFlagId" />
<apex:outputPanel id="pageallPanel">
<apex:pageBlock id="searchBlock">
@@ -352,6 +626,15 @@
<!-- 璇曠敤鑰� -->
{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Trial_User__c.label}
<apex:inputField id="TrialUser" value="{!pageB.caesdInput.Trial_User__c}"/>
+ <!-- <script>
+ sfdcPage.appendToOnloadQueue(function () {
+ var queryBack = function queryBack(data) {
+ console.log('data = ' + data);
+ document.getElementById('{!pageB.caesdInput.AWS_Data_Id__c}') = data.object.trialUser;
+ };
+ AWSService.query(staticResources.queryUrl, '{!pageB.caesdInput.AWS_Data_Id__c}', queryBack, staticResources.token);
+ });
+ </script> -->
</td>
<td>
<!-- 璺熷彴鑰� -->
@@ -359,11 +642,11 @@
<apex:inputField id="FollowerUser" value="{!pageB.caesdInput.Follower_User__c}"/>
</td>
</apex:outputPanel>
- <!-- </tr> -->
- <!-- <tr> -->
+ <!-- </tr> -->
+ <!-- <tr> -->
<td>
- <!-- </td> -->
- <!-- <td colspan="5"> -->
+ <!-- </td> -->
+ <!-- <td colspan="5"> -->
<span style="margin-left: 10px;">
<apex:commandButton value="缂栬緫" rendered="{!canEdit}" onclick="blockme();" action="{!changeFixModel}" reRender="allForm" oncomplete="unblockUI();windowResize();"/>
<apex:commandButton value="缂栬緫" style="float: right; margin-right: 40px;" rendered="{!AND(canEdit == false, redOnly == false)}" onclick="var w = window.open('/apex/ConsumTrial?id={!parId}&canedit=true', '缂栬緫璇曠敤琛ㄧ敾闈�', 'width='+(window.screen.width-200)+',height='+(window.screen.height-200)+',left=100,top=100'); w.focus(); return false;"/>
@@ -372,16 +655,16 @@
<apex:commandButton value="閫傜敤" rendered="{!canEdit}" onclick="applyJs();return false;"/>
</span>
<span style="margin-left: 10px;">
- <apex:commandButton value="淇濆瓨" onclick="blockme();saveRecord(); return false;" rendered="{!canEdit}"/>
+ <apex:commandButton value="淇濆瓨" onclick="blockme();saveRecordJS(); return false;" rendered="{!canEdit}"/>
</span>
</td>
</tr>
</table>
</apex:outputPanel>
- </apex:pageBlock>
- <apex:pageBlock id="dataBlock" tabStyle="Report">
+ </apex:pageBlock>
+ <apex:pageBlock id="dataBlock" tabStyle="Report">
<apex:inputHidden id="currentPageRecordCnt" value="{!pageB.currentPageRecordCnt}"/>
-<!-- <table id="msgtable">
+ <!-- <table id="msgtable">
<tr>
<td>
<apex:outputPanel id="message">
@@ -390,39 +673,39 @@
</td>
</tr>
</table> -->
- <div id="out_Div_L">
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
- <tr class="headerRow" height="30px">
- <apex:outputPanel layout="none" rendered="{!canEdit}">
- <td class="col_chk" align="center">
- <input type='checkbox' onClick='checkAll()' id="checker" />
- </td>
- </apex:outputPanel>
- <apex:repeat value="{!outputFieldList}" var="info">
- <td class="col_{!info.value}">
- {!info.label}
- </td>
- </apex:repeat>
- </tr>
- </table>
- </div>
- <div id="out_Div" >
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
- <tr class="headerRow" height="30px">
- <apex:repeat value="{!inputFieldList}" var="info">
- <td class="col_{!info.value} colViewing" >
- {!info.label}
- </td>
- </apex:repeat>
- <td class="col_UpDown"> 鍚戜笂/鍚戜笅 </td>
- <td class="col_Scroll"></td>
- </tr>
- </table>
- </div>
- <div style="clear:both;"/>
- <div id="in_Div_L">
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
- <apex:variable value="{!0}" var="Cnt" />
+ <div id="out_Div_L">
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
+ <tr class="headerRow" height="30px">
+ <apex:outputPanel layout="none" rendered="{!canEdit}">
+ <td class="col_chk" align="center">
+ <input type='checkbox' onClick='checkAll()' id="checker" />
+ </td>
+ </apex:outputPanel>
+ <apex:repeat value="{!outputFieldList}" var="info">
+ <td class="col_{!info.value}">
+ {!info.label}
+ </td>
+ </apex:repeat>
+ </tr>
+ </table>
+ </div>
+ <div id="out_Div" >
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
+ <tr class="headerRow" height="30px">
+ <apex:repeat value="{!inputFieldList}" var="info">
+ <td class="col_{!info.value} colViewing" >
+ {!info.label}
+ </td>
+ </apex:repeat>
+ <td class="col_UpDown"> 鍚戜笂/鍚戜笅 </td>
+ <td class="col_Scroll"></td>
+ </tr>
+ </table>
+ </div>
+ <div style="clear:both;"/>
+ <div id="in_Div_L">
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
+ <apex:variable value="{!0}" var="Cnt" />
<apex:repeat id="dataline_L" value="{!pageB.rowBList}" var="var">
<tr class="dataRow" id="tableData_L_{!Cnt}" style="{!IF(var.isOddnumber, 'background-color : #EFF4FC;', '')}">
<apex:outputPanel layout="none" rendered="{!canEdit}">
@@ -434,120 +717,126 @@
<td class="dataCellBorder1 {!'col_' + info.value}"><apex:outputField value="{!var.rnd[info.value]}" /></td>
</apex:repeat>
</tr>
- <apex:variable value="{!Cnt+1}" var="Cnt" />
- </apex:repeat>
- </table>
- </div>
- <div id="in_Div" style="overflow:auto;">
- <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData">
- <apex:variable value="{!0}" var="Cnt_R" />
- <apex:repeat id="dataline_R" value="{!pageB.rowBList}" var="var">
- <tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" style="{!IF(var.isOddnumber, 'background-color : #EFF4FC;', '')}">
- <apex:repeat value="{!inputFieldList}" var="info" id="inputField">
- <td class="dataCellBorder1 intf {!info.value} col_{!info.value}">
- <apex:outputPanel rendered="{!(contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true && info.value != 'Degree_Of_Importance__c'}">
- <!-- onchange="setChangeFlg('{!var.lineNo}')" -->
- <apex:outputPanel rendered="{!info.value != 'Case_OR_animal_organ__c'}">
- <apex:inputField id="inputField" value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo - 1}')" style="{!IF(info.value == 'Follower_User__c', 'width: 75%; ', '')}"/>
- <script>
- if( document.getElementById('{!$Component.inputField}' + ':inputField_mlktp')){
- document.getElementById('{!$Component.inputField}' + ':inputField_mlktp').style.display="none" ;
- }
- </script>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!info.value == 'Case_OR_animal_organ__c'}">
- <apex:selectList value="{!var.rnd.Case_OR_animal_organ__c}" multiselect="false" size="1">
- <apex:selectOptions value="{!Case_OR_animal_organOps}"/>
- </apex:selectList>
- </apex:outputPanel>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!(contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true && info.value == 'Degree_Of_Importance__c'}">
- <input id="Degree_Of_Importance__c" value="{!var.rnd[info.value]}" disabled="true"/>
- <apex:inputHidden value="{!var.rnd[info.value]}"/>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!((contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true) == false}">
- <apex:outputField value="{!var.rnd[info.value]}"/>
- </apex:outputPanel>
- </td>
+ <apex:variable value="{!Cnt+1}" var="Cnt" />
</apex:repeat>
- <td class="dataCellBorder2 col_UpDown" id="row{!Cnt_R}">
- <apex:outputPanel rendered="{!pageB.fixMode}">
- <button value="鈫戔啈" id="top" onclick="blockme(); moveToTop('row{!Cnt_R}', true, '{!var.maxDegree_Of_Importance}'); return false;">鈫戔啈</button>
- <button value="鈫�" id="up" onclick="blockme(); resetMove('row{!Cnt_R}', true, '{!var.maxDegree_Of_Importance}'); return false;">鈫�</button>|
- <button value="鈫�" id="down" onclick="blockme(); resetMove('row{!Cnt_R}', false, '{!var.maxDegree_Of_Importance}'); return false;">鈫�</button>
- <button value="鈫撯啌" id="bottom" onclick="blockme(); moveToTop('row{!Cnt_R}', false, '{!var.maxDegree_Of_Importance}'); return false;">鈫撯啌</button>
- </apex:outputPanel>
- <apex:inputText value="{!var.lineNo}" styleClass="ordernocls" style="display:none;"/>
- <!-- <apex:inputHidden value="{!var.rnd.Degree_Of_Importance__c}"/> -->
- </td>
- <td class="col_Scroll"></td>
- </tr>
- <apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
- </apex:repeat>
- </table>
- </div>
+ </table>
+ </div>
+ <apex:repeat id="dataline_R_aws" value="{!pageB.rowBList}" var="var">
+ <apex:inputHidden value="{!var.rnd.AWS_Data_Id__c}" id="EditAWSDataId"/>
+ <!-- <apex:inputHidden value="{!var.rnd.Trial_User_Encrypt__c}" id="TrialUserEncrypt"/> zhj 鏂版柟妗堟敼閫� 2022-12-30 -->
+ </apex:repeat>
+ <div id="in_Div" style="overflow:auto;">
+ <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData">
+ <apex:variable value="{!0}" var="Cnt_R" />
+ <apex:repeat id="dataline_R" value="{!pageB.rowBList}" var="var">
+ <tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" style="{!IF(var.isOddnumber, 'background-color : #EFF4FC;', '')}">
+ <apex:repeat value="{!inputFieldList}" var="info" id="inputField">
+ <td class="dataCellBorder1 intf {!info.value} col_{!info.value}" id="{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,info.value)}" onmouseover="showPIDiv('{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,'')}')" onmouseout="hidePIDiv('{! IF(info.value=='Trial_User__c',var.rnd.AWS_Data_Id__c+'_'+var.rnd.Id,'')}')">
+ <apex:outputPanel rendered="{!(contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true && info.value != 'Degree_Of_Importance__c'}">
+ <!-- onchange="setChangeFlg('{!var.lineNo}')" -->
+ <apex:outputPanel rendered="{!info.value != 'Case_OR_animal_organ__c'}">
+ <apex:inputField id="inputField" value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo - 1}')" style="{!IF(info.value == 'Follower_User__c', 'width: 75%; ', '')}"/>
+ <script>
+ if( document.getElementById('{!$Component.inputField}' + ':inputField_mlktp')){
+ document.getElementById('{!$Component.inputField}' + ':inputField_mlktp').style.display="none" ;
+ }
+ </script>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!info.value == 'Case_OR_animal_organ__c'}">
+ <apex:selectList value="{!var.rnd.Case_OR_animal_organ__c}" multiselect="false" size="1">
+ <apex:selectOptions value="{!Case_OR_animal_organOps}"/>
+ </apex:selectList>
+ </apex:outputPanel>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!(contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true && info.value == 'Degree_Of_Importance__c'}">
+ <input id="Degree_Of_Importance__c" value="{!var.rnd[info.value]}" disabled="true"/>
+ <apex:inputHidden value="{!var.rnd[info.value]}"/>
+ </apex:outputPanel>
+ <apex:outputPanel rendered="{!((contains(var.canChangeField, info.value) || var.canChangeField == '') && pageB.fixMode == true && var.canChange == true) == false}">
+ <apex:outputField value="{!var.rnd[info.value]}"/>
+ </apex:outputPanel>
+ </td>
+ </apex:repeat>
+ <td class="dataCellBorder2 col_UpDown" id="row{!Cnt_R}">
+ <apex:outputPanel rendered="{!pageB.fixMode}">
+ <button value="鈫戔啈" id="top" onclick="blockme(); moveToTop('row{!Cnt_R}', true, '{!var.maxDegree_Of_Importance}'); return false;">鈫戔啈</button>
+ <button value="鈫�" id="up" onclick="blockme(); resetMove('row{!Cnt_R}', true, '{!var.maxDegree_Of_Importance}'); return false;">鈫�</button>|
+ <button value="鈫�" id="down" onclick="blockme(); resetMove('row{!Cnt_R}', false, '{!var.maxDegree_Of_Importance}'); return false;">鈫�</button>
+ <button value="鈫撯啌" id="bottom" onclick="blockme(); moveToTop('row{!Cnt_R}', false, '{!var.maxDegree_Of_Importance}'); return false;">鈫撯啌</button>
+ </apex:outputPanel>
+ <apex:inputText value="{!var.lineNo}" styleClass="ordernocls" style="display:none;"/>
+ <!-- <apex:inputHidden value="{!var.rnd.Degree_Of_Importance__c}"/> -->
+ </td>
+ <td class="col_Scroll"></td>
+
+ </tr>
+ <apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
+
+ </apex:repeat>
+ </table>
+ </div>
</apex:pageBlock>
-<script type="text/javascript">
- function runSFDCAddRemote(MetadataConnectionWarning) {
- if (MetadataConnectionWarning) SFDCAddRemote('{!$Api.Session_ID}');
- }
- function sortTableJs(key) {
- // blockme();
- sortTablefunc(key);
- }
+ <script type="text/javascript">
+ function runSFDCAddRemote(MetadataConnectionWarning) {
+ if (MetadataConnectionWarning) SFDCAddRemote('{!$Api.Session_ID}');
+ }
+ function sortTableJs(key) {
+ // blockme();
+ sortTablefunc(key);
+ }
- j$(function() {
- var tableWidth = 0;
- j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
- var colClass = getColClassName(this);
- if (colClass != 'col_Scroll') {
- var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
- tableWidth += headerCol.width();
- }
- });
- j$('table#tableData').css('width', (1260 + 2) + 'px');
- j$('table#tableHeader').css('width', (1260 + 2) + 'px');
+ j$(function() {
+ var tableWidth = 0;
+ j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
+ var colClass = getColClassName(this);
+ if (colClass != 'col_Scroll') {
+ var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
+ tableWidth += headerCol.width();
+ }
+ });
+ j$('table#tableData').css('width', (1260 + 2) + 'px');
+ j$('table#tableHeader').css('width', (1260 + 2) + 'px');
- // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
- bindTdToggleWidth();
- if( document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp')){
- document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp').style.display="none" ;
- }
- });
- // var elements = document.getElementsByTagName("select");
- // for (i = 0; i < elements.length; i++) {
- // var id = elements[i].id;
- // if (id.length > 5 && id.substring(id.length - 5, id.length) == 'mlktp') {
- // elements[i].style.display = "none";
- // }
- // }
- // var tbl_l = document.getElementById("tableData_L");
- // var input_l = tbl_l.getElementsByTagName("input");
- // for (i = 0; i < input_l.length; i++) {
- // var id = input_l[i].id + '_lkid';
- // if (document.getElementById(id) != null) {
- // input_l[i].style.width = "75%";
- // }
- // }
- // var tbl = document.getElementById("tableData");
- // var input = tbl.getElementsByTagName("input");
- // for (i = 0; i < input.length; i++) {
- // var id = input[i].id + '_lkid';
- // if (document.getElementById(id) != null) {
- // input[i].style.width = "75%";
- // }
- // }
- //a銈掋偗銉儍銈仚銈嬮殯銇�乼d銈ゃ儥銉炽儓銈掑疅瑁呫仐銇亜
- // j$("a[name='out_Div_a']").bind("click",function(event){
- // event.stopPropagation();
- // });
- windowResize();
- j$("td.dataCellBorder1 input").change(function(){
- var names = this.name.split(':');
- var i = names[names.length - 4];
- j$("input.rowchkcls")[i].checked = true;
- })
-</script>
+ // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
+ bindTdToggleWidth();
+ if( document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp')){
+ document.getElementById('allPage:allForm:searchBlock:FollowerUser_mlktp').style.display="none" ;
+ }
+ });
+ // var elements = document.getElementsByTagName("select");
+ // for (i = 0; i < elements.length; i++) {
+ // var id = elements[i].id;
+ // if (id.length > 5 && id.substring(id.length - 5, id.length) == 'mlktp') {
+ // elements[i].style.display = "none";
+ // }
+ // }
+ // var tbl_l = document.getElementById("tableData_L");
+ // var input_l = tbl_l.getElementsByTagName("input");
+ // for (i = 0; i < input_l.length; i++) {
+ // var id = input_l[i].id + '_lkid';
+ // if (document.getElementById(id) != null) {
+ // input_l[i].style.width = "75%";
+ // }
+ // }
+ // var tbl = document.getElementById("tableData");
+ // var input = tbl.getElementsByTagName("input");
+ // for (i = 0; i < input.length; i++) {
+ // var id = input[i].id + '_lkid';
+ // if (document.getElementById(id) != null) {
+ // input[i].style.width = "75%";
+ // }
+ // }
+ //a銈掋偗銉儍銈仚銈嬮殯銇�乼d銈ゃ儥銉炽儓銈掑疅瑁呫仐銇亜
+ // j$("a[name='out_Div_a']").bind("click",function(event){
+ // event.stopPropagation();
+ // });
+ windowResize();
+ j$("td.dataCellBorder1 input").change(function(){
+ var names = this.name.split(':');
+ var i = names[names.length - 4];
+ j$("input.rowchkcls")[i].checked = true;
+ })
+ </script>
</apex:outputPanel>
</apex:form>
</apex:page>
\ No newline at end of file
--
Gitblit v1.9.1