From b9055688b13a23f8e445de2bc3d5d0d2b85fec30 Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期三, 17 五月 2023 19:27:19 +0800
Subject: [PATCH] 包含超声

---
 force-app/main/default/pages/PCLLostReportPage.page        |  212 ++++++++++++++++++++++++++++++++++++-----
 force-app/main/default/classes/PCLLostReportController.cls |   25 ++++
 force-app/main/default/classes/Product2Handler.cls         |   30 ++++++
 3 files changed, 234 insertions(+), 33 deletions(-)

diff --git a/force-app/main/default/classes/PCLLostReportController.cls b/force-app/main/default/classes/PCLLostReportController.cls
index eb40a5d..3d47d08 100644
--- a/force-app/main/default/classes/PCLLostReportController.cls
+++ b/force-app/main/default/classes/PCLLostReportController.cls
@@ -20,6 +20,8 @@
 	public integer secondNum {get; set;}
 	// add tcm 20211122 end
 
+	public Decimal InclusionUltrasound {get; set;}     //20230506 lt DB202304618804  鍖呭惈瓒呭0 add
+
 
 	// 绔炰簤瀵规墜瀵圭収鍏崇郴琛紝key鏄搧鐗屽悕瀛楋紝value鏄疘D
 	public map<string,id> CompetitionMap;
@@ -98,6 +100,7 @@
 			 Lost_Reason_Sub__c,Lost_By_Company__c,
 			 LostTotalAmount__c,LostType__c,
 			 TotalAmountLost__c, //20230215 lt DB202302247719
+			 InclusionUltrasound__c, //20230506 lt DB202304618804  鍖呭惈瓒呭0
 			 Report_Status__c,Sales_assistant__c,
 			 Opportunity__c, Opportunity__r.Sales_assistant_ID__c,
 			 Opportunity__r.Sales_manager_departmentID__c,
@@ -110,6 +113,9 @@
 				pageStatus = null;
 				return;
 			}
+
+			InclusionUltrasound = lostReportList[0].InclusionUltrasound__c; //20230506 lt DB202304618804  鍖呭惈瓒呭0
+
 			lostReportList[0].Sales_assistant__c =
 				lostReportList[0].Opportunity__r.Sales_assistant_ID__c;
 			lostReportList[0].Manager_sales__c =
@@ -154,7 +160,6 @@
 					system.debug('check products:'+ (templostBrand.PCLLostBrandProduct__r != null) + '|' + (templostBrand.PCLLostBrandProduct__r.size() > 0));
 					if (templostBrand.PCLLostBrandProduct__r != null && templostBrand.PCLLostBrandProduct__r.size() > 0) {
 						for( PCLLostProduct__c tempProduct: templostBrand.PCLLostBrandProduct__r) {
-
 							tempProductList.add(new PCLLostProducts(productCount,tempProduct));
 							productCount++;
 						}
@@ -337,6 +342,15 @@
 				}
 				// 褰撳け鍗曞搧鐗屽悕涓哄叾浠栨椂,鎶ラ敊瀛楁涓哄け鍗曞鎵嬪瀷鍙凤紙鎵嬪姩锛� thh 2022-01-17 end
 				// update tcm 20211123 end
+				// 20230418 ljh DB202304320022 start
+				String LostBrandNameS = tempLostBrand.lostBrand.Lost_By_Company__c != '鍏朵粬'?tempLostBrand.lostBrand.Lost_By_Company__c:tempLostBrand.lostBrand.Lost_By_Company_Mannual__c;
+				String LostBrandName = temlostProduct.LostProductss.LostBrandName__c;
+				if(LostBrandNameS != LostBrandName){
+					temlostProduct.LostProductss.LostBrandName__c.addError('澶卞崟鍝佺墝鍚嶄笉涓�鑷达紝璇风‘璁�');
+					dataCheck = false;
+				}
+				// 20230418 ljh DB202304320022 end
+				
 			}
 			// 褰撳け鍗曞搧鐗屽悕涓哄叾浠栨椂,鎶ラ敊瀛楁涓哄け鍗曞鎵嬪瀷鍙凤紙鎵嬪姩锛� thh 2022-01-17 start
 			if (productCount == 0 && tempLostBrand.LostProducts != null && tempLostBrand.LostProducts.size() > 0) {
@@ -387,8 +401,8 @@
 					//20230215 lt DB202302247719  start 
 					Decimal med = tempLostBrand.lostBrand.LostPrice__c/1.13/1000;
 					Decimal med1 = med.setScale(2);
-					System.debug('---lt123涓嶅惈绋庢暟鍊�(浜哄伐)Decimal---'+med);
-					System.debug('---lt123涓嶅惈绋庢暟鍊�(浜哄伐)Decimal涓や綅灏忔暟---'+med1);
+					// System.debug('---lt123涓嶅惈绋庢暟鍊�(浜哄伐)Decimal---'+med);
+					// System.debug('---lt123涓嶅惈绋庢暟鍊�(浜哄伐)Decimal涓や綅灏忔暟---'+med1);
 					LostReport.lostReport.TotalAmountLost__c += med1;
 					//LostReport.lostReport.TotalAmountLost__c += tempLostBrand.lostBrand.LostPrices_ThousandY__c;  //20230215 lt DB202302247719
 					// LostReport.lostReport.TotalAmountLost__c += tempLostBrand.lostBrand.LostPrice__c/1.13/1000;  //20230215 lt DB202302247719
@@ -575,7 +589,10 @@
 		system.debug('brandNo:'+brandNo);
 		LostBrand tempLostBrand = LostReport.LostBrands.get(brandNo);
 		// PCLLostProduct__c plp = new PCLLostProduct__c(Competitor__c=CompetitionMap.get(LostReport.LostBrands[brandNo].lostBrand.Lost_By_Company__c));
-		string brandName = tempLostBrand.lostBrand.Lost_By_Company__c;
+		// 20230418 ljh DB202304320022 start
+		// string brandName = tempLostBrand.lostBrand.Lost_By_Company__c;
+		string brandName = tempLostBrand.lostBrand.Lost_By_Company__c != '鍏朵粬'?tempLostBrand.lostBrand.Lost_By_Company__c:tempLostBrand.lostBrand.Lost_By_Company_Mannual__c;		
+		// 20230418 ljh DB202304320022 end
 		PCLLostProduct__c plp = new PCLLostProduct__c();
 		plp.LostBrandName__c = brandName;
 		tempLostBrand.LostProducts.add(new PCLLostProducts(tempLostBrand.LostProducts.size(),plp));
diff --git a/force-app/main/default/classes/Product2Handler.cls b/force-app/main/default/classes/Product2Handler.cls
index 061c194..89d3df3 100644
--- a/force-app/main/default/classes/Product2Handler.cls
+++ b/force-app/main/default/classes/Product2Handler.cls
@@ -32,6 +32,7 @@
     //SFDC鍋滄棰勮  lt  20210922 add start
     protected override void afterUpdate(){
         Calculate_AverageMonthSales(this.newList, this.oldMap);
+        AssignmentUltrasonic(this.newList, this.oldMap);  //20230506 lt DB202304618804  鍖呭惈瓒呭0 add
     }
     //SFDC鍋滄棰勮  lt  20210922 add end
 
@@ -466,4 +467,33 @@
         }
     }
 
+    //20230506 lt DB202304618804  鍖呭惈瓒呭0 start
+    private static void AssignmentUltrasonic(List<Product2> newList,Map<Id, Product2> oldMap){
+        List<String> proIdList = new List<String>();
+        List<PCLLostProduct__c> updateplpList = new List<PCLLostProduct__c>();
+
+        for(Product2 pro : newList){
+            if(pro.RecordTypeId == System.Label.Pro_RecordType && 
+            (pro.Lost_Product_Differ__c != oldMap.get(pro.Id).Lost_Product_Differ__c || 
+            pro.Lost_Product_Category__c != oldMap.get(pro.Id).Lost_Product_Category__c)){
+                proIdList.add(pro.Id);
+            }
+        }
+
+        List<PCLLostProduct__c> plpList = [Select Id, LostProduct__c, ProductClass__c, ProductCategory__c
+                                           From PCLLostProduct__c
+                                           Where LostProduct__c in: proIdList ];
+        if(plpList.size() > 0 ){
+            for(PCLLostProduct__c plp : plpList){
+                plp.ProductClass__c = '涓绘満';
+                plp.ProductCategory__c = '瓒呭0涓绘満';
+                updateplpList.add(plp);
+            }
+        }
+
+        update updateplpList;
+
+    }
+    //20230506 lt DB202304618804  鍖呭惈瓒呭0 end
+
 }
\ No newline at end of file
diff --git a/force-app/main/default/pages/PCLLostReportPage.page b/force-app/main/default/pages/PCLLostReportPage.page
index bb3d375..4bb04f3 100644
--- a/force-app/main/default/pages/PCLLostReportPage.page
+++ b/force-app/main/default/pages/PCLLostReportPage.page
@@ -1,13 +1,16 @@
 <apex:page standardcontroller="Lost_cancel_report__c" extensions="PCLLostReportController" showHeader="false" sidebar="false"
-    id="allPage" action="{!init}" title="璇环澶卞崟/鍙栨秷鎶ュ憡" lightningStylesheets="true">
+    id="allPage" action="{!init}" title="璇环澶卞崟/鍙栨秷鎶ュ憡">
     <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}" />
-
-    <!-- <apex:stylesheet value="{!URLFOR($Resource.PCLLostReportPagecss)}" /> -->
 
     <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" />
     <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" />
     <apex:form id="allForm">
         <script>
+            // 20230418 ljh DB202304320022 start
+            window.onload = function init(){
+                clearBrandMannualName();
+            }
+            // 20230418 ljh DB202304320022 end
             function saveJs() {
                 blockme();
                 save();
@@ -34,6 +37,12 @@
                 search(topNum, secondNum);
             }
             // add tcm 20211118 end
+            // 20230418 ljh DB202304320022 start
+            function edit2JS() {
+                blockme();
+                edit2();
+            }
+            // 20230418 ljh DB202304320022 end
             function setLostTotalAmount() {
                 //console.log('setLostTotalAmount start:');
                 var totalAmount = document.getElementById("allPage:allForm:allBlock:EditPage:LostReport:lstReport:LostTotalAmountOut:LostTotalAmount");
@@ -70,6 +79,82 @@
                 }
                 //console.log('setLostTotalAmount end');
             }
+
+            //20230506 lt DB202304618804  鍖呭惈瓒呭0  start
+            function setInclusionUltrasound() {
+                debugger
+                //鍖呭惈瓒呭0
+                // var Inc = document.getElementById("allPage:allForm:allBlock:ReadPage:LostReport:lstReport1:InclusionUltrasoundOut1:InclusionUltrasound");
+                // //鈥嬪け鍗曚骇鍝佺被鍒�
+                // var Inc = document.getElementById("allPage:allForm:allBlock:ReadPage:LostReport:lstReport1:InclusionUltrasoundOut1:InclusionUltrasound");
+                // //澶卞崟浜у搧鍖哄垎
+                // var Inc = document.getElementById("allPage:allForm:allBlock:ReadPage:LostReport:lstReport1:InclusionUltrasoundOut1:InclusionUltrasound");
+
+                var Inc = document.getElementById("allPage:allForm:allBlock:EditPage:LostReport:lstReport1:InclusionUltrasoundOut:InclusionUltrasound");
+                var IncHidden = document.getElementById("allPage:allForm:allBlock:InclusionUltrasound");
+                
+                if(Inc == null || Inc == undefined){
+                    Inc = '0';
+                }
+                
+                // if (!!Inc && !!IncHidden) {
+                    var tempInc = '0';
+
+                    //澶卞崟鍝佺墝
+                    var i = 0;
+                    var brandCount = parseInt("{!brandCount}");
+                    //澶卞崟鍨嬪彿
+                    var j = 0;
+
+                    for (var i = 0; i < brandCount; i++){
+                        for (var j = 0; j < 10; j++) {
+                            //鈥嬪け鍗曚骇鍝佺被鍒�
+                            //allPage:allForm:allBlock:ReadPage:LostBrands:0:LostBrand:productTable:0:LostPRoductClass
+                            // var LostProClassObject =
+                            //     document.getElementById("allPage:allForm:allBlock:EditPage:LostBrands:" +
+                            //         i + ":LostBrand:productTable:"+ j +":LostPRoductClass1");
+                            var LostProClassObject = j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:' +
+                                                     i + ':LostBrand:productTable:'+ j +':LostPRoductClass1')).value();
+
+                            var LostProClassObject1 = j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:' +
+                                                     i + ':LostBrand:productTable:'+ j +':LostPRoductClass')).value();
+                            //澶卞崟浜у搧鍖哄垎
+                            //allPage:allForm:allBlock:ReadPage:LostBrands:0:LostBrand:productTable:0:LostProductCategory
+                            // var LostProCategoryObject =
+                            //     document.getElementById("allPage:allForm:allBlock:EditPage:LostBrands:" +
+                            //         i + ":LostBrand:productTable:"+ j +":LostProductCategory1");
+                            var LostProCategoryObject = j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:' +
+                                                     i + ':LostBrand:productTable:'+ j +':LostProductCategory1')).value();
+
+                            var LostProCategoryObject1 = j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:' +
+                                                     i + ':LostBrand:productTable:'+ j +':LostProductCategory')).value();
+                            
+                            if(tempInc != '1'){
+                                if((LostProClassObject == '涓绘満' && LostProCategoryObject == '瓒呭0涓绘満') || (LostProClassObject1 == '涓绘満' && LostProCategoryObject1 == '瓒呭0涓绘満')){
+                                    tempInc = '1';
+                                }
+                            }
+
+                            // if (!!LostProClassObject && !!LostProCategoryObject) {
+
+                            //     var LostProClassText = LostProClassObject.innerText;
+                            //     var LostProClassValue = LostProClassObject.value;
+
+                            //     var LostProCategoryText = LostProCategoryObject.innerText;
+                            //     var LostProCategoryValue = LostProCategoryObject.value;
+
+                            // }
+                        }
+                    }
+                    
+                    Inc.innerText = tempInc;
+                    IncHidden.value = tempInc;
+
+                // }
+
+            }
+            //20230506 lt DB202304618804  鍖呭惈瓒呭0  end
+
             function setBrandName(brandNumber) {
                 blockme();
                 setbrand(brandNumber);
@@ -79,14 +164,32 @@
                 setbrandmannual(brandNumber);
             }
             // 澶卞崟鍝佺墝涓嶇瓑浜庡叾浠栨椂,澶卞崟鍝佺墝锛堟墜鍔級娓呯┖骞朵笖涓嶅厑璁稿~鍐�,澶卞崟鍝佺墝绛変簬鍏朵粬鏃�,澶卞崟瀵规墜鍨嬪彿涓嶅彲鐢�  thh 2022-01-13 start
-            function clearBrandMannualName(){
-                if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company').value == '鍏朵粬'){
-                    j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:productTable:0:LostProduct')).attr("disabled", true);
-                } else{
-                    document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value = '';
-                    j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual')).attr("disabled", true);
+            // function clearBrandMannualName(){
+            //     if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company').value == '鍏朵粬'){
+            //         j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:productTable:0:LostProduct')).attr("disabled", true);
+            //     } else{
+            //         document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value = '';
+            //         j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual')).attr("disabled", true);
+            //     }
+            // }
+            // 20230418 ljh DB202304320022 start
+            function clearBrandMannualName(){ 
+                var pageStatus = "{!pageStatus}";
+                if(pageStatus == 'Create'|| pageStatus == 'Edit'){
+                    var brandCount = parseInt("{!brandCount}");
+                    for(var i = 0;i<brandCount;i++){
+                        if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company').value == '鍏朵粬'){
+                            if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value == '' || document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value == null){
+                                j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:productTable:0:LostProduct')).attr("disabled", true);
+                            }
+                        } else{
+                            document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value = '';
+                            j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual')).attr("disabled", true);
+                        }
+                    }
                 }
             }
+            // 20230418 ljh DB202304320022 end
             // 澶卞崟鍝佺墝涓嶇瓑浜庡叾浠栨椂,澶卞崟鍝佺墝锛堟墜鍔級娓呯┖骞朵笖涓嶅厑璁稿~鍐�,澶卞崟鍝佺墝绛変簬鍏朵粬鏃�,澶卞崟瀵规墜鍨嬪彿涓嶅彲鐢�  thh 2022-01-13 end
         </script>
         <apex:actionFunction name="save" action="{!save}" oncomplete="unblockUI();clearBrandMannualName();" rerender="allForm,EditButton2"></apex:actionFunction>
@@ -96,22 +199,35 @@
         </apex:actionFunction>
         <!-- 澶卞崟鍝佺墝涓嶇瓑浜庡叾浠栨椂,澶卞崟鍝佺墝锛堟墜鍔級娓呯┖骞朵笖涓嶅厑璁稿~鍐�,澶卞崟鍝佺墝绛変簬鍏朵粬鏃�,澶卞崟瀵规墜鍨嬪彿涓嶅彲鐢�  thh 2022-01-13 end -->
 
-        <apex:actionFunction name="setbrandmannual" action="{!setbrandmannual}" oncomplete="unblockUI();" rerender="allForm">
+        <!-- 20230418 ljh DB202304320022 start -->
+        <!-- <apex:actionFunction name="setbrandmannual" action="{!setbrandmannual}" oncomplete="unblockUI();" rerender="allForm"> -->
+        <apex:actionFunction name="setbrandmannual" action="{!setbrandmannual}" oncomplete="clearBrandMannualName(),unblockUI();" rerender="allForm">
+        <!-- 20230418 ljh DB202304320022 end -->
             <apex:param assignTo="{!setBrandNo}" name="setBrandNo" value="" />
         </apex:actionFunction>
 
         <apex:actionFunction name="submit" action="{!submit}" oncomplete="unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction>
-
-
-        <apex:actionFunction name="addBrand" action="{!addBrand}" oncomplete="unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction>
-        <apex:actionFunction action="{!addProduct}" name="addProduct" reRender="allForm" oncomplete="unblockUI();">
+        <!-- 20230418 ljh DB202304320022 start -->
+        <apex:actionFunction name="edit2" action="{!edit2}" oncomplete="clearBrandMannualName(),unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction>
+        <!-- <apex:actionFunction name="addBrand" action="{!addBrand}" oncomplete="unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> -->
+        <apex:actionFunction name="addBrand" action="{!addBrand}" oncomplete="clearBrandMannualName(),unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction>
+        
+        <!-- <apex:actionFunction action="{!addProduct}" name="addProduct" reRender="allForm" oncomplete="unblockUI();"> -->
+        <apex:actionFunction action="{!addProduct}" name="addProduct" reRender="allForm" oncomplete="clearBrandMannualName(),unblockUI();">
+        <!-- 20230418 ljh DB202304320022 end -->
             <apex:param assignTo="{!brandNo}" name="brandNo" value="" />
         </apex:actionFunction>
-        <apex:actionFunction action="{!Remove}" name="Remove" reRender="allForm" oncomplete="unblockUI();">
+        <!-- 20230418 ljh DB202304320022 start -->
+        <!-- <apex:actionFunction action="{!Remove}" name="Remove" reRender="allForm" oncomplete="unblockUI();"> -->
+        <apex:actionFunction action="{!Remove}" name="Remove" reRender="allForm" oncomplete="clearBrandMannualName(),unblockUI();">
+        <!-- 20230418 ljh DB202304320022 end -->
             <apex:param assignTo="{!RemoveBrandNo}" name="RemoveBrandNo" value="" />
         </apex:actionFunction>
         <!-- add tcm 20211118 start -->
-        <apex:actionFunction action="{!search}" name="search" reRender="allForm" oncomplete="unblockUI();">
+        <!-- 20230418 ljh DB202304320022 start -->
+        <!-- <apex:actionFunction action="{!search}" name="search" reRender="allForm" oncomplete="unblockUI();"> -->
+        <apex:actionFunction action="{!search}" name="search" reRender="allForm" oncomplete="clearBrandMannualName(),unblockUI();">
+        <!-- 20230418 ljh DB202304320022 end -->
             <apex:param assignTo="{!topNum}" name="topNum" value="" />
             <apex:param assignTo="{!secondNum}" name="secondNum" value="" />
         </apex:actionFunction>
@@ -121,9 +237,12 @@
                 <apex:pageMessages />
             </apex:outputPanel>
             <apex:inputHidden id="LostTotalAmount" value="{!LostReport.lostReport.LostTotalAmount__c}" />
+
+            <apex:inputHidden id="InclusionUltrasound" value="{!InclusionUltrasound}" /> <!-- 20230506 lt DB202304618804  鍖呭惈瓒呭0  add -->
+            
             <apex:outputPanel rendered="{!IF(pageStatus == 'Create'|| pageStatus == 'Edit' , 'true', 'false')}">
                 <apex:pageBlock title="澶卞崟鎶ュ憡缂栬緫椤甸潰" id="EditPage">
-                    <apex:pageBlockSection columns="2" id="LostReport">
+                    <apex:pageBlockSection columns="3" id="LostReport">
                         <apex:pageBlockSectionItem id="lstReport" labelStyle="text-align:left;">
                             <apex:pageBlockSectionItem labelStyle="text-align:left;">
                                 <apex:outputLabel value="澶卞崟绫诲瀷: ">
@@ -135,12 +254,24 @@
                                 <apex:outputLabel value="澶卞崟鎬婚噾棰濓紙鍏冿級: "></apex:outputLabel>
                                 <apex:outputField id="LostTotalAmount" value="{!LostReport.lostReport.LostTotalAmount__c}" />
                             </apex:pageBlockSectionItem>
-
                         </apex:pageBlockSectionItem>
+
+                    <!-- 20230506 lt DB202304618804  鍖呭惈瓒呭0  start -->
+                    <apex:pageBlockSectionItem id="lstReport1" labelStyle="text-align:left;">
+
+                        <apex:pageBlockSectionItem id="InclusionUltrasoundOut" labelStyle="text-align:left;">
+                            <apex:outputLabel value="鍖呭惈瓒呭0: "></apex:outputLabel>
+                            <apex:outputLabel id="InclusionUltrasound" value="{!InclusionUltrasound}" />
+                        </apex:pageBlockSectionItem>
+
                         <apex:pageBlockSectionItem id="Report_Statusout" labelStyle="text-align:left;">
                             <apex:outputLabel value="鐘舵��: "></apex:outputLabel>
                             <apex:outputField id="Report_Status" value="{!LostReport.lostReport.Report_Status__c}" />
                         </apex:pageBlockSectionItem>
+
+                    </apex:pageBlockSectionItem>
+                    <!-- 20230506 lt DB202304618804  鍖呭惈瓒呭0  end -->
+
                     </apex:pageBlockSection>
                     <apex:variable value="{!0}" var="BCnt" />
                     <apex:repeat value="{!LostReport.LostBrands}" var="brand" id="LostBrands">
@@ -150,7 +281,7 @@
                                     <apex:outputText id="LostBrandName" value="澶卞崟鍝佺墝{!brand.lineNo + 1}" />
                                     <apex:commandButton rendered="{!IF(brandCount > 1 , 'true', 'false')}" onclick="RemoveJs({!brand.lineNo});return false;"
                                         value="鍒犻櫎" style="width: 100px;margin-left: 50px;float: right;" />
-                                    <apex:commandButton onclick="saveJs();return false;" value="淇濆瓨" style="width: 100px;margin-left: 50px;float: right;" />
+                                    <apex:commandButton onclick="setInclusionUltrasound();saveJs();return false;" value="淇濆瓨" style="width: 100px;margin-left: 50px;float: right;" />
                                 </apex:outputPanel>
                             </apex:facet>
                             <apex:pageBlockSection id="BrandContent" columns="3">
@@ -159,7 +290,8 @@
                                     <apex:outputLabel value="澶卞崟鍝佺墝:">
                                         <span style="color:red;font-size: 18px;">* </span>
                                     </apex:outputLabel>
-                                    <apex:inputField id="Lost_By_Company" onchange="setLostTotalAmount();setBrandName({!brand.lineNo});" value="{!brand.lostBrand.Lost_By_Company__c}"/>
+                                    <!-- 20230506 lt DB202304618804  鍖呭惈瓒呭0  add setInclusionUltrasound(); -->
+                                    <apex:inputField id="Lost_By_Company" onchange="setLostTotalAmount();setInclusionUltrasound();setBrandName({!brand.lineNo});" value="{!brand.lostBrand.Lost_By_Company__c}"/>
                                 </apex:pageBlockSectionItem>
 
                                 <apex:pageBlockSectionItem dataStyle="width:10%;border-top:2px solid;border-left:2px solid;border-bottom:2px solid;" labelStyle="width:23%;white-space:none;text-align:left;border-top:2px solid; solid ;border-bottom:2px solid;">
@@ -238,7 +370,8 @@
                                 </apex:column>
                                 <apex:column headerValue="澶卞崟鏁伴噺">
                                     <span style="color:red;font-size: 18px;">* </span>
-                                    <apex:inputField id="Quantity" style="min-width: 150px;" value="{!product.LostProductss.Quantity__c}" />
+                                    <!-- 20230506 lt DB202304618804  鍖呭惈瓒呭0  add onclick="setInclusionUltrasound();" -->
+                                    <apex:inputField id="Quantity" style="min-width: 150px;" value="{!product.LostProductss.Quantity__c}" onclick="setInclusionUltrasound();" />
                                 </apex:column>
                                 <!-- SWAG-C6P9PX lt 20210913 add start -->
                                 <apex:column headerValue="澶卞崟瀵规墜鍨嬪彿(鎵嬪姩)">
@@ -251,7 +384,7 @@
                                     <apex:outputPanel rendered="{!IF(product.bool=true,true,false)}">
                                         <apex:outputField id="LostPRoductClass1" value="{!product.LostProductss.ProductClass__c}" />
                                     </apex:outputPanel>
-                                    <apex:outputPanel rendered="{!!IF(product.bool==true,true,false)}">
+                                    <apex:outputPanel rendered="{!!IF(product.bool==true,true,false)}" > 
                                         <apex:inputField id="LostPRoductClass" value="{!product.LostProductss.ProductClass__c}" />
                                     </apex:outputPanel>
                                 </apex:column>
@@ -261,7 +394,8 @@
                                         <apex:outputField id="LostProductCategory1" value="{!product.LostProductss.ProductCategory__c}" />
                                     </apex:outputPanel>
                                     <apex:outputPanel rendered="{!!IF(product.bool==true,true,false)}">
-                                        <apex:inputField id="LostProductCategory" value="{!product.LostProductss.ProductCategory__c}" />
+                                        <!-- 20230506 lt DB202304618804  鍖呭惈瓒呭0  add onchange="setInclusionUltrasound();" -->
+                                        <apex:inputField id="LostProductCategory" value="{!product.LostProductss.ProductCategory__c}" onchange="setInclusionUltrasound();"/>
                                     </apex:outputPanel>
                                 </apex:column>
                                 <!-- tcm 20211117 add end -->
@@ -275,14 +409,14 @@
                     </apex:repeat>
                     <apex:pageBlockButtons >
                         <apex:commandButton onclick="addBrandJs();return false;" value="杩藉姞鍝佺墝" style="width: 150px;margin-left: 50px;" />
-                        <apex:commandButton onclick="saveJs();return false;" value="淇濆瓨" style="width: 150px;margin-left: 50px;" />
+                        <apex:commandButton onclick="setInclusionUltrasound();saveJs();return false;" value="淇濆瓨" style="width: 150px;margin-left: 50px;" />
                         <apex:commandButton id="CancelButton" action="{!cancel}" value="杩斿洖璇环" style="width: 150px;margin-left: 50px;" />
                     </apex:pageBlockButtons>
                 </apex:pageBlock>
             </apex:outputPanel>
             <apex:outputPanel rendered="{!IF(pageStatus == 'View', 'true', 'false')}">
                 <apex:pageBlock title="澶卞崟鎶ュ憡鏌ョ湅椤甸潰" id="ReadPage">
-                    <apex:pageBlockSection columns="2" id="LostReport">
+                    <apex:pageBlockSection columns="3" id="LostReport">
                         <apex:pageBlockSectionItem labelStyle="text-align:left;">
                             <apex:pageBlockSectionItem labelStyle="text-align:left;">
                                 <apex:outputLabel value="澶卞崟绫诲瀷: "></apex:outputLabel>
@@ -294,10 +428,25 @@
                             </apex:pageBlockSectionItem>
 
                         </apex:pageBlockSectionItem>
-                        <apex:pageBlockSectionItem id="Report_Statusout" labelStyle="text-align:left;">
-                            <apex:outputLabel value="鐘舵��: "></apex:outputLabel>
-                            <apex:outputField id="Report_Status" value="{!LostReport.lostReport.Report_Status__c}" />
+
+                        <!-- 20230506 lt DB202304618804  鍖呭惈瓒呭0  start -->
+                        <apex:pageBlockSectionItem id="lstReport1" labelStyle="text-align:left;">
+
+                            <apex:pageBlockSectionItem id="InclusionUltrasoundOut1" labelStyle="text-align:left;">
+                                <apex:outputLabel value="鍖呭惈瓒呭0: "></apex:outputLabel>
+                                <apex:outputLabel id="InclusionUltrasound" value="{!InclusionUltrasound}" />
+                            </apex:pageBlockSectionItem>
+
+                            <apex:pageBlockSectionItem id="Report_Statusout" labelStyle="text-align:left;">
+                                <apex:outputLabel value="鐘舵��: "></apex:outputLabel>
+                                <apex:outputField id="Report_Status" value="{!LostReport.lostReport.Report_Status__c}" />
+                            </apex:pageBlockSectionItem>
+
                         </apex:pageBlockSectionItem>
+                            
+                        <!-- 20230506 lt DB202304618804  鍖呭惈瓒呭0  end -->
+
+                        
                     </apex:pageBlockSection>
                     <apex:variable value="{!0}" var="BCnt" />
                     <apex:repeat value="{!LostReport.LostBrands}" var="brand" id="LostBrands">
@@ -406,9 +555,14 @@
 
                         <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '鑽夋', 'true', 'false')}" id="SubmitButton" onclick="submitJS();return false;"
                             value="鎻愪氦" style="width: 150px;margin-left: 50px;" />
-                        <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '鑽夋' || $Profile.Id = '00e10000000Y3o5AAC', 'true', 'false')}"
+                        <!-- 20230418 ljh DB202304320022 start -->
+                        <!-- <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '鑽夋' || $Profile.Id = '00e10000000Y3o5AAC', 'true', 'false')}"
                             id="EditButton" reRender="allForm" action="{!edit2}" value="缂栬緫" style="width: 150px;margin-left: 50px;"
+                        /> -->
+                        <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '鑽夋' || $Profile.Id = '00e10000000Y3o5AAC', 'true', 'false')}"
+                            id="EditButton" reRender="allForm"  onclick="edit2JS();return false;" value="缂栬緫" style="width: 150px;margin-left: 50px;"
                         />
+                        <!-- 20230418 ljh DB202304320022 end -->
                         <apex:commandButton id="CancelButton" action="{!cancel}" value="杩斿洖璇环" style="width: 150px;margin-left: 50px;" />
 
                     </apex:pageBlockButtons>

--
Gitblit v1.9.1