From c895afcfc4a3a5959f4720eef772465bf56c63aa Mon Sep 17 00:00:00 2001
From: LiJinHuan <lijinhuan@prec-tech.com>
Date: 星期三, 07 六月 2023 18:55:25 +0800
Subject: [PATCH] 备品分配页面

---
 force-app/main/default/pages/RentalFixtureSetAssign.page |  479 +++++++++++++++++++++++++----------------------------------
 1 files changed, 202 insertions(+), 277 deletions(-)

diff --git a/force-app/main/default/pages/RentalFixtureSetAssign.page b/force-app/main/default/pages/RentalFixtureSetAssign.page
index 9915642..e79cec8 100644
--- a/force-app/main/default/pages/RentalFixtureSetAssign.page
+++ b/force-app/main/default/pages/RentalFixtureSetAssign.page
@@ -1,5 +1,6 @@
-<apex:page lightningStylesheets="true" controller="RentalFixtureSetAssignController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
+<apex:page lightningStylesheets="true" controller="RentalFixtureSetAssignController" showHeader="false" sidebar="false" id="allPage" action="{!init}" >
 <head>
+<title>澶囧搧鍑哄�熷垎閰嶈澶�</title>
 <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
 <apex:stylesheet value="{!URLFOR($Resource.RentalFixtureSetAssignCss)}"/>
 <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
@@ -8,253 +9,180 @@
 <!-- <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
 <apex:includeScript value="{!URLFOR($Resource.apex20)}"/> -->
 <style type="text/css">
-        .hideDropdown select{
-            display: none
-        }
-        .modal {
-           display:none;
-           position: fixed; /* Stay in place */
-           z-index: 10; /* Sit on top */
-           left: 0;
-           top: 0;
-           width: 100%; /* Full width */
-           height: 100%; /* Full height */
-           overflow: auto; /* Enable scroll if needed */
-           background-color: rgb(0,0,0); /* Fallback color */
-           background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
-        }
-        span.dateFormat {
-            display: none;
-        }
+    .hideDropdown select{
+        display: none
+    }
+    .modal {
+        display:none;
+        position: fixed; /* Stay in place */
+        z-index: 10; /* Sit on top */
+        left: 0;
+        top: 0;
+        width: 100%; /* Full width */
+        height: 100%; /* Full height */
+        overflow: auto; /* Enable scroll if needed */
+        background-color: rgb(0,0,0); /* Fallback color */
+        background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
+    }
+    span.dateFormat {
+        display: none;
+    }
 
-        /* Modal Content/Box */
-        .modal-content {
-           background-color: #fefefe;
-           margin-left: 6px;
-           margin-top: 100px;
-           padding: 20px;
-           border: 1px solid #888;
-           right: 5%;
-           position: absolute;
-           width: 200px;
-        }
-        .modal-content-cancel {
-           background-color: #fefefe;
-           margin-left: -150px;
-           margin-top: 100px;
-           padding: 20px;
-           border: 1px solid #888;
-           left: 50%;
-           position: absolute;
-           width: 300px;
-        }
+    /* Modal Content/Box */
+    .modal-content {
+        background-color: #fefefe;
+        margin-left: 6px;
+        margin-top: 100px;
+        padding: 20px;
+        border: 1px solid #888;
+        right: 5%;
+        position: absolute;
+        width: 200px;
+    }
+    .modal-content-cancel {
+        background-color: #fefefe;
+        margin-left: -150px;
+        margin-top: 100px;
+        padding: 20px;
+        border: 1px solid #888;
+        left: 50%;
+        position: absolute;
+        width: 300px;
+    }
+    /* 20230606 ljh lightning start */
+    body .detailList .dataCol input[type="text"],body .detailList .dataCol select{
+        min-width: 180px;
+    }
+    /* body .bPageBlock .detailList .dataCol{
+        width: 8%;
+    } */
+    body .bPageBlock .detailList .dataCol input[type="checkbox"]:first-child{
+        margin-top: 0;
+    }
+    body .detailList td{
+        position: static;
+    }
+    /*浠ヤ笅鏄笅鎷夊閫夋鐨勬牱寮�  start*/
+    * {
+        margin: 0;
+        padding: 0;
+        box-sizing: border-box;
+    }
+    .nav {
+        width: 180px;/*20230606 ljh*/
+        line-height: 30px;/*20230606 ljh*/
+        border: 1px solid #000;
+        -webkit-user-select: none;
+        -moz-user-select: none;
+        -ms-user-select: none;
+        user-select: none;
+        position: absolute;
+        top: 0;
+        right: 0;
+        left: 0;
+        margin: 0;
+        z-index: 9999;
+        display: inline-block;
+        border-radius: 0.25rem;
+    }
+    ul,li {
+        list-style: none;
+    }
+    .nav li input {
+        margin: 0px 3px 0px 3px;
+    }
 
-        body {
-            position: relative;
-        }
-        ul,
-        li {
-            list-style: none;
-        }
-        .nav_1st {
-            width: 180px;
-            height: 6px;
-            line-height: 20px;
-            padding: 5px 30px 5px 5px;
-            border: 1px solid #000;
-            background-color: rgb(255, 255, 255);
-            background-size: 5%;
-            -webkit-user-select: none;
-            -moz-user-select: none;
-            -ms-user-select: none;
-            user-select: none;
-            margin: 0 auto;
-        }
-        .nav_1st0 {
-            width: 160px;
-            height: 6px;
-            margin-left: 19px;
-            line-height: 20px;
-            padding: 5px 30px 5px 5px;
-            background-color: rgb(255, 255, 255);
-            border: 1px solid #000;
-            background-size: 5%;
-            -webkit-user-select: none;
-            -moz-user-select: none;
-            -ms-user-select: none;
-            user-select: none;
-            margin: 0 auto;
-        }
-        
-        .nav {
-            width: 180px;
-            line-height: 20px;
-            border: 1px solid #000;
-            -webkit-user-select: none;
-            -moz-user-select: none;
-            -ms-user-select: none;
-            user-select: none;
-            position: absolute; 
-            top: 11.4rem;
-            z-index: 9999;
-            display: none;
-        }
-        .nav0 {
-            width: 160px;
-            line-height: 20px;
-            border: 1px solid #000;
-            -webkit-user-select: none;
-            -moz-user-select: none;
-            -ms-user-select: none;
-            user-select: none;
-            position: absolute; 
-            top: 9.5rem;
-            z-index: 9999;
-            display: none;
-        }
-        
-
-        .nav_close {
-            position: fixed;
-            top: 0;
-            bottom: 0;
-            left: 0;
-            right: 0;
-            z-index: 9990;
-            display: none;
-        }
-        .nav_close0 {
-            position: fixed;
-            top: 0;
-            bottom: 0;
-            left: 0;
-            right: 0;
-            z-index: 9990;
-            display: none;
-        }
-        
-        .nav li input {
-            margin: 0px 3px 0px 3px;
-        }
-
-        .nav li p:hover {
-            background: #1e90ff;
-            color: #fff;
-        }
-        .nav0 li input {
-            margin: 0px 3px 0px 3px;
-        }
-
-        .nav0 li p:hover {
-            background: #1e90ff;
-            color: #fff;
-        }
-        
-        #classification {
-            white-space: nowrap;
-            overflow: hidden;
-            text-overflow: ellipsis;
-        }
-        #classification0 {
-            white-space: nowrap;
-            overflow: hidden;
-            text-overflow: ellipsis;
-        }
-        
+    .nav li p:hover {
+        background: #1e90ff;
+        color: #fff;
+    }
+    #classification_f,#classification_b {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }      
 </style>
 <script type="text/javascript">
 var heightAjustment = 120;
 var widthAjustment = 30;
 var clickLineNo;
 var iszhu;
-
-window.onload = () => {
-   j$(".nav_1st").click(function () {
-        j$(".nav,.nav_close").toggle();
-    });
-   j$(".nav_1st0").click(function () {
-        j$(".nav0,.nav_close0").toggle();
-    });
-   
-    j$(".nav_close").click(function () {
-        j$(".nav,.nav_close").hide();
-    });
-    j$(".nav_close0").click(function () {
-        j$(".nav0,.nav_close0").hide();
-    });
-    
-    j$(".li-input").click(function () {
-        var checked2 = j$(this).prop("checked");
-        if (checked2 == true) {
-            j$(this).prop("checked", false);
-        } else {
-            j$(this).prop("checked", true);
+// 20230607 ljh lightning start
+j$(document).bind("click",function(e){
+    var e = e || window.event;    //浜嬩欢瀵硅薄锛屽吋瀹笽E
+    var target = e.target || e.srcElement;  //婧愬璞★紝鍏煎鐏嫄鍜孖E
+    while(target){
+        // console.log(target.id);
+        if (target.id && (target.id == "nav_f" ||target.id == "nav_b")){   
+            //寰幆鍒ゆ柇鑷虫牴鑺傜偣锛岄槻姝㈢偣鍑荤殑鏄�#selected鍜屽畠鐨勫瓙鍏冪礌
+            return;
         }
-    });
-    j$(".ul-nav").click(function () {
-        var checked1 = j$(this).children("input").prop("checked");
-        console.log('checked1***',checked1);
-        if (checked1 == false) {
-            j$("#classification").children("#initial").remove();
-            j$(this).children("input").prop("checked", true);
-            j$("#classification").append("<span class='valClass' id='" + (j$(this).children("input")[0].value.trim().replace('.','')) + "'>" + (j$(this)
-                .text().trim() + ",") + "</span>");
-        } else {
-            j$(this).children("input").prop("checked", false);
-            j$("#classification").children("#" + (j$(this).children("input")[0].value.trim().replace('.',''))).remove();
-            var length = j$("#classification").html().length;
-            if (length === 0) {
-                j$("#classification").append("<span class='valClass' id='initial'>--鏃�--</span>");
-            }
+        target = target.parentNode;
+    }
+    j$("#selectCheckId_f").hide();   //鐐瑰嚮鐨勪笉鏄�#selected鍜屽畠鐨勫瓙鍏冪礌锛岄殣钘忎笅鎷夎彍鍗�
+    j$("#selectCheckId_b").hide();
+})
+//鐐瑰嚮 鍒嗙被閫夋嫨
+function selectFenLei(obj,name){
+    var checked1 = j$(obj).prop("checked");
+    if (checked1 == true) {
+        j$("#classification_f").children("#initial_f").remove();
+        var idTemp = j$(obj).value().trim();
+        idTemp = 'Id'+idTemp.split('.')[0];
+        j$("#classification_f").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
+            .value().trim() + ",") + "</span>");
+    } else {
+        var idTemp = 'Id'+name.split('.')[0];
+        j$("#classification_f").children("#" + (idTemp)).remove();
+        var length = j$("#classification_f").html().length;
+        if (length === 0) {
+            j$("#classification_f").append("<span class='valClass' id='initial_f'>--鏃�--</span>");
         }
-
-        var optioncheck = j$(".valClass");
-        var hint = '';
-        for(var i = 0;i<optioncheck.length;i++){
+    }
+    var optioncheck = j$(".valClass");
+    var hint = '';
+    for(var i = 0;i<optioncheck.length;i++){
+        if(optioncheck[i].innerText != '--鏃�--'){
             hint +=optioncheck[i].innerText;
         }
-        j$("#valId").attr("title",hint);
-        j$("[id*='salesdepartments']").val(hint);
-        // j$("#salesdepartments").val(hint);
-        // alert(j$("[id*='salesdepartments']").val());
-    });
-    j$(".ul-nav0").click(function () {
-        var checked1 = j$(this).children("input").prop("checked");
-        console.log('checked1***00',checked1);
-        if (checked1 == false) {
-            j$("#classification0").children("#initial0").remove();
-            j$(this).children("input").prop("checked", true);
-            j$("#classification0").append("<span class='valClass0' id='" + (j$(this).children("input")[0].value.trim()) + "'>" + (j$(this)
-                .text().trim() + ",") + "</span>");
-        } else {
-            j$(this).children("input").prop("checked", false);
-            j$("#classification0").children("#" + (j$(this).children("input")[0].value.trim())).remove();
-            var length = j$("#classification0").html().length;
-            if (length === 0) {
-                j$("#classification0").append("<span class='valClass0' id='initial0'>--鏃�--</span>");
-            }
-        }
-
-        var optioncheck = j$(".valClass0");
-        var hint = '';
-        for(var i = 0;i<optioncheck.length;i++){
-            hint +=optioncheck[i].innerText;
-        }
-        j$("#valId0").attr("title",hint);
-        j$("[id*='equipmenttypes']").val(hint);
-        // j$("#equipmenttypes").val(hint);
-    });
-    
+    }
+    j$("[id*='equipmenttypes']").val(hint);
 }
-
-// function tagclick() {
-//     j$(".nav,.nav_close").toggle();
-// }
-// function tagclick0() {
-//      j$(".nav0,.nav_close0").toggle();
-// }
-
-
+//鐐瑰嚮 鏈儴閫夋嫨
+function selectBenBu(obj,name){
+    var checked1 = j$(obj).prop("checked");
+    if (checked1 == true) {
+        j$("#classification_b").children("#initial_b").remove();
+        var idTemp = j$(obj).value().trim();
+        idTemp = 'Id'+idTemp.split('.')[0];
+        j$("#classification_b").append("<span class='valClass' id='" + (idTemp) + "'>" + (j$(obj)
+            .value().trim() + ",") + "</span>");
+    } else {
+        var idTemp = 'Id'+name.split('.')[0];
+        j$("#classification_b").children("#" + (idTemp)).remove();
+        var length = j$("#classification_b").html().length;
+        if (length === 0) {
+            j$("#classification_b").append("<span class='valClass' id='initial_b'>--鏃�--</span>");
+        }
+    }
+    var optioncheck = j$(".valClass");
+    var hint = '';
+    for(var i = 0;i<optioncheck.length;i++){
+        if(optioncheck[i].innerText != '--鏃�--'){
+            hint +=optioncheck[i].innerText;
+        }
+    }
+    j$("[id*='salesdepartments']").val(hint);
+}
+// 鍒嗙被
+function navClose_f(){
+    j$("#selectCheckId_f").toggle();
+}
+// 鏈儴
+function navClose_b(){
+    j$("#selectCheckId_b").toggle();
+}
+// 20230607 ljh lightning end
 function saveGoPageJs(clickLineNo1, iszhu1) {
     blockme();
     clickLineNo = clickLineNo1;
@@ -264,9 +192,6 @@
     lock.prop('checked', true);
     saveGoPageJs_save();
 }
-
-
-
 function saveGoPageJsComplete() {
     var errorFlag = j$(escapeVfId('allPage:allForm:hasError')).value();
     if(errorFlag == 'false'){
@@ -447,56 +372,56 @@
                     <apex:outputField value="{!parentObj.Request_shipping_day__c}"/>
                     <apex:outputField value="{!parentObj.Request_return_day__c}"/>
                     <apex:outputField value="{!parentObj.Product_category__c}"/>
-                    <apex:outputPanel id="SelectOP" style="display:flex;margin-left: 27%;" rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}">
+                    <apex:pageBlockSectionItem id="SelectOP"  rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}">
                     <!-- 20220106 ljh 鏀惧紑 鏈嶅姟鍩硅/瀛︿細 parentObj.CampaignType__c=='鏈嶅姟鍩硅/瀛︿細'|| -->
-                        <apex:outputLabel for="bieBeiPinFenLei" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="澶囧搧鍒嗙被" />
-                        <div  id="selectCheckId0" style="margin-left: 19px;">
-                            <div class="nav_1st0" id="valId0" title="" style="height: 19px;">  <!-- lighting鍗囩骇 20230210 lt 澶氶�夋鐨勬牱寮忎笉姝g‘闂 add style="height: 19px;" -->
-                                <p id="classification0"  style="margin-top: -7px;"><span id="initial0">--鏃�--</span></p>
-                            </div>
-                            <ul class="nav0" style="background-color: #FFFFFF;">
-                                <div id="divId0" style="display:">
-                                    <apex:repeat value="{!bieBeiPinFenLeiOps}" var="orr" id="selSD0">
-                                        <li class="sdclass" style="margin-left:0px">
-                                            <p class="ul-nav0" name="cate_id[]" >
-                                                <input type="checkbox" value="{!orr.value}" class="li-input" style="display: inline-block;vertical-align: middle;" />
-                                                <font style="">{!orr.label}</font>
-                                            </p>
-                                        </li>
-                                    </apex:repeat>
-                                </div>
-                            </ul>
-                            <div class="nav_close0"></div>
-                        </div>
+                    <apex:outputLabel for="bieBeiPinFenLei" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="澶囧搧鍒嗙被" />
+                    <apex:outputPanel style="position:absolute; " id="S_bieFenLei">
+                        <ul class="nav" id="nav_f" style="background-color: #FFFFFF;left:0px;top:-5px;">
+                            <li id="classification_f" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_f();return false;">
+                                <span id="initial_f">--鏃�--</span>
+                            </li>
+                            <li id="selectCheckId_f" style="margin-left:0px;display: none;">
+                                <ul style="margin-left:0px;">
+                                <apex:repeat value="{!bieBeiPinFenLeiOps}" var="orr" id="selFL">
+                                <li class="sdclass" style="margin-left:0px">
+                                    <p class="ul-nav" name="cate_id[]" >
+                                        <input type="checkbox" value="{!orr.value}" onclick="selectFenLei(this,'{!orr.value}');"  class="li-input" style="display: inline-block;vertical-align: middle;"/>
+                                        <font style="">{!orr.label}</font>
+                                    </p>
+                                </li>
+                                </apex:repeat>
+                                </ul>
+                            </li>
+                        </ul>
                     </apex:outputPanel>
-                    <apex:outputPanel id="Selectsalesd" style="display:flex;margin-left: 30%;" rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}">
+                    </apex:pageBlockSectionItem>
+                    <apex:pageBlockSectionItem id="Selectsalesd" rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}">
                         <!-- 20220106 ljh 鏀惧紑 鏈嶅姟鍩硅/瀛︿細 parentObj.CampaignType__c=='鏈嶅姟鍩硅/瀛︿細'|| -->
                         <apex:outputLabel for="salesd" style="font-weight: bold; font-family: Arial,Helvetica,sans-serif; font-size: 91%;color: #4a4a56;" value="鏈儴" />
-                        <div id="selectCheckId" style="margin-left: 19px;">
-                            <div class="nav_1st" id="valId" title="" style="height: 19px;">  
-                                <!-- lighting鍗囩骇 20230210 lt 澶氶�夋鐨勬牱寮忎笉姝g‘闂 add style="height: 19px;" -->
-                                <p id="classification"  style="margin-top: -7px;"><span id="initial">--鏃�--</span></p>
-                            </div>
-                            <ul class="nav" style="background-color: #FFFFFF;">
-                                <div id="divId" style="display:">
+                        <apex:outputPanel style="position:absolute; " id="S_bieBenBu">
+                            <ul class="nav" id="nav_b" style="background-color: #FFFFFF;left:0px;">
+                                <li id="classification_b" class="transparent_class" style="margin-left:0px;height:30px;" onclick="navClose_b();return false;">
+                                    <span id="initial_b">--鏃�--</span>
+                                </li>
+                                <li id="selectCheckId_b" style="margin-left:0px;display: none;">
+                                    <ul style="margin-left:0px;">
                                     <apex:repeat value="{!bieBenBuOps}" var="orr" id="selSD">
-                                        <li class="sdclass" style="margin-left:0px">
-                                            <p class="ul-nav" name="cate_id[]" >
-                                                <input type="checkbox" value="{!orr.value}" class="li-input" style="display: inline-block;vertical-align: middle;" />
-                                                <font style="">{!orr.label}</font>
-                                            </p>
-                                        </li>
+                                    <li class="sdclass" style="margin-left:0px">
+                                        <p class="ul-nav" name="cate_id[]" >
+                                            <input type="checkbox" value="{!orr.value}" onclick="selectBenBu(this,'{!orr.value}');"  class="li-input" style="display: inline-block;vertical-align: middle;"/>
+                                            <font style="">{!orr.label}</font>
+                                        </p>
+                                    </li>
                                     </apex:repeat>
-                                </div>
+                                    </ul>
+                                </li>
                             </ul>
-                            <div class="nav_close"></div>
-                        </div>
-                    </apex:outputPanel>
+                        </apex:outputPanel>
+                    </apex:pageBlockSectionItem>
                     <apex:inputField rendered="{!!(parentObj.Demo_purpose1__c=='缁翠慨浠g敤'||parentObj.Demo_purpose1__c=='鍗忚鍊熺敤')}" id="product_category" value="{!parentObj.Product_category_Sys__c}" />
                     <!-- 20220106 ljh 鏀惧紑 鏈嶅姟鍩硅/瀛︿細 parentObj.CampaignType__c=='鏈嶅姟鍩硅/瀛︿細'|| -->
                 </apex:pageBlockSection>
                 
-
                 <table style="width: 450px;margin: auto;float: left;margin-top: 1.5%;" >
                     <!-- <tr>
                         

--
Gitblit v1.9.1