From 675ad74a96337da89845179a9606116d1f32e621 Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期四, 17 十一月 2022 15:42:40 +0800
Subject: [PATCH] 新建修理提示信息

---
 force-app/main/default/pages/ChoiceAsset.page |  116 +++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 78 insertions(+), 38 deletions(-)

diff --git a/force-app/main/default/pages/ChoiceAsset.page b/force-app/main/default/pages/ChoiceAsset.page
index 901e8f3..1df3939 100644
--- a/force-app/main/default/pages/ChoiceAsset.page
+++ b/force-app/main/default/pages/ChoiceAsset.page
@@ -2,17 +2,43 @@
     <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"></apex:stylesheet>
     <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"></apex:includeScript>
     <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"></apex:includeScript>
-    <apex:includeScript value="/soap/ajax/29.0/connection.js"></apex:includeScript>
-    <apex:includeScript value="/soap/ajax/29.0/apex.js"></apex:includeScript>
+    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
+    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
     <style type="text/css"></style>
     <script>
-    	function searchProductJs() {
-    		searchAsset();
-    	}
+        function searchProductJs() {
+            searchAsset();
+        }
 
-    	function saveJs(){
-    		save();
-    	}
+        function saveJs(){
+            save();
+        }
+        //XLIU-CJM7Z9 銆愬鎵樸�戞柊寤轰慨鐞嗘彁绀轰俊鎭紙鍋滀骇鍙婇潪淇悊瀵硅薄鍝侊級LY 20221012 start
+        function checkPartSupplyFinishDateJs(){
+            var today = new Date();
+            var todayNew = today.toLocaleDateString();
+            var check;
+            var num = 100000;
+            for (var i = 0; i < 100; i++) {
+                check = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:'+i+':consumablesCountproRowCheckbox')).attr('checked');
+                if (check == 'checked'){
+                    num = i;
+                }
+            }
+            if (num != 100000){
+                var partSupplyFinishDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + num + ':partSupplyFinishDate')).value());
+                if (partSupplyFinishDate != 'Invalid Date'){
+                    var partSupplyFinishDateNew = partSupplyFinishDate.toLocaleDateString();
+                    if (partSupplyFinishDateNew > todayNew){
+                        alert('棰勮'+ partSupplyFinishDateNew +'闆朵欢鍗冲皢鍋滀骇锛岃閫佷慨鍓嶄笌宸ュ巶鍙奟C鑱旂粶');
+                    }
+                    if (partSupplyFinishDateNew <= todayNew){
+                        alert('璇ュ瀷鍙烽浂浠跺凡缁忓仠浜э紝鏈夌壒娈婇渶姹傦紝璇烽�佷慨鍓嶄笌宸ュ巶RC鑱旂粶');
+                    }
+                }
+            }
+        }
+        //XLIU-CJM7Z9 銆愬鎵樸�戞柊寤轰慨鐞嗘彁绀轰俊鎭紙鍋滀骇鍙婇潪淇悊瀵硅薄鍝侊級LY 20221012 end
 
         function ClearJs(){
             blockme();
@@ -26,9 +52,10 @@
     </script>
     <apex:form id="allForm">
     <apex:actionFunction name="searchAsset" action="{!searchAsset}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();SumCompute()">
-	</apex:actionFunction>
-	<apex:actionFunction name="save" action="{!save}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();SumCompute()">
-	</apex:actionFunction>
+    </apex:actionFunction>
+    <apex:actionFunction name="save" action="{!save}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();SumCompute()">
+    </apex:actionFunction>
+    
 
     <apex:outputPanel id="allPanel">
         <apex:pageBlock id="allBlock">
@@ -55,7 +82,7 @@
                             
                             <td colspan="2"/>
                             <td colspan="4">鏈鸿韩缂栫爜锛�
-                           		<apex:inputText value="{!FuselageNumber}" id="FuselageNumber"/>
+                                <apex:inputText value="{!FuselageNumber}" id="FuselageNumber"/>
                             </td>                           
                              
                             <td align="right"></td>
@@ -64,6 +91,7 @@
                            <!--  <td>
                             <apex:commandButton onclick="saveJs();" value="纭畾" rerender="dummy"  />
                             </td> -->
+                            
                             
                         </tr>
                         <!-- <td>
@@ -77,16 +105,16 @@
                         <tr>
                             <td colspan="2"/>
                             <td colspan="4">璁惧鍨嬪彿锛�
-                            	<apex:inputText value="{!AssetModel}" id="AssetModel"/>
+                                <apex:inputText value="{!AssetModel}" id="AssetModel"/>
                             </td>
                             
                         </tr>
                         <tr>
-                        	<td colspan="2"/>
-                        	<td colspan="4">鍖婚櫌鍚嶇О锛�
-                        		<apex:inputText value="{!HospitalName}" id="HospitalName"/>
-                        	</td>
-                        	
+                            <td colspan="2"/>
+                            <td colspan="4">鍖婚櫌鍚嶇О锛�
+                                <apex:inputText value="{!HospitalName}" id="HospitalName"/>
+                            </td>
+                            
                         </tr>
                     </table>
                 </apex:pageBlock>
@@ -94,7 +122,7 @@
                     <apex:pageMessages />
                  </apex:outputPanel>
                 <apex:pageBlock title="淇濇湁璁惧鏌ユ壘" id="ConsumableorderdetailsSection">
-                	<table class="list" border="0" cellpadding="0" cellspacing="0">
+                    <table class="list" border="0" cellpadding="0" cellspacing="0">
                         <tr class="headerRow">
                             <!-- <apex:variable var="v" value="" rendered="{!editAble}"> -->
                                 <!-- <th><input type='checkbox' onClick='checkAll()' id='checker'/>閫夋嫨</th> -->
@@ -102,21 +130,24 @@
                             
                             <th>閫夋嫨</th>
                             <th>淇濇湁璁惧鍚嶇О</th>
-                            <th>鐘舵��</th>
+                            <!-- 20220927 ljh XLIU-CJN62G update start-->
+                            <!-- <th>鐘舵��</th> -->
                             
                             <th>鏈鸿韩缂栫爜</th>
-                            <th>璁惧鍨嬪彿</th>
-                            <!-- <th>淇℃伅鏉ユ簮</th> -->
-                            <th>闆嗕腑绠$悊搴撳瓨</th>
                             <th>鍖婚櫌</th>
                             <th>鎴樼暐绉戝</th>
                             <th>绉戝</th>
+                            <th>鍙戣揣鏃�</th>
+                            <th>澶氬勾淇濅慨鏈熻嚦</th>
+                            <th>鏈�杩戜竴鏈熺淮淇悎鍚岀粨鏉熸棩</th>
+                            <!-- <th>闆嗕腑绠$悊搴撳瓨</th> -->
+                            <!-- 20220927 ljh XLIU-CJN62G update end-->
                         </tr>
                             <apex:repeat value="{!choiceAssetInfoRecordsview}" var="records" id="ConsumableorderdetailsTable">
                                 <tr class="dataRow">
-                                	<td>
-                                	<apex:inputCheckbox value="{!records.check}" onclick="CheckSize(this);" id="consumablesCountproRowCheckbox" disabled="{!!records.canSelect}"/>
-                                	</td>
+                                    <td>
+                                    <apex:inputCheckbox value="{!records.check}" onclick="CheckSize(this);" id="consumablesCountproRowCheckbox" onchange="checkPartSupplyFinishDateJs(); return false;" disabled="{!!records.canSelect}"/>
+                                    </td>
 
                                     <!-- <apex:variable var="v" value="" rendered="{!editAble}" id="variableinfo">
                                         <td>
@@ -126,21 +157,12 @@
                                     <td class="dataCell">
                                         <apex:outputText value="{!records.ast.Name}"/>
                                     </td>
-                                    <td class="dataCell">
+                                    <!-- <td class="dataCell">
                                         <apex:outputText value="{!records.ast.Status}"/>
-                                    </td>
+                                    </td> -->
                                     
                                     <td class="dataCell">
                                         <apex:outputText value="{!records.ast.SerialNumber}"/>
-                                    </td>
-                                    <!-- <td class="dataCell">
-                                        <apex:outputText value="{!records.ast.Product2.Asset_Model_No__c}"/>
-                                    </td> -->
-                                    <td class="dataCell">
-                                        <apex:outputText value="{!records.ast.Information_From__c}"/>
-                                    </td>
-                                    <td class="dataCell">
-                                        <apex:outputText value="{!records.ast.Ji_Zhong_Guan_Li_Ku_Cun__c}"/>
                                     </td>
                                     <td class="dataCell">
                                         <apex:outputText value="{!records.ast.Hospital__r.Name}"/>
@@ -151,10 +173,28 @@
                                     <td class="dataCell">
                                         <apex:outputText value="{!records.ast.Account.Name}"/>
                                     </td>
+                                    <!-- <td class="dataCell">
+                                        <apex:outputText value="{!records.ast.Product2.Asset_Model_No__c}"/>
+                                    </td> -->
+                                    <td class="dataCell">
+                                        <apex:outputField value="{!records.ast.Posting_Date__c}"/>
+                                    </td>
+                                    <td class="dataCell">
+                                        <apex:outputField value="{!records.ast.Extend_Gurantee_DateTo__c}"/>
+                                    </td>
+                                    <td class="dataCell">
+                                        <apex:outputField value="{!records.ast.CurrentContract_End_Date__c}"/>
+                                    </td>
+                                    <!--XLIU-CJM7Z9 銆愬鎵樸�戞柊寤轰慨鐞嗘彁绀轰俊鎭紙鍋滀骇鍙婇潪淇悊瀵硅薄鍝侊級LY 20221012 start -->
+                                    <td>
+                                        <apex:inputField value="{!records.ast.PartSupplyFinishDate__c}" id="partSupplyFinishDate" style="display: none" showDatePicker="false"/>
+                                    </td>
+                                    <!--XLIU-CJM7Z9 銆愬鎵樸�戞柊寤轰慨鐞嗘彁绀轰俊鎭紙鍋滀骇鍙婇潪淇悊瀵硅薄鍝侊級LY 20221012 end  -->
+                                    
                                 </tr>
                             </apex:repeat>
                     </table>
-            	</apex:pageBlock>
+                </apex:pageBlock>
         </apex:pageBlock>
     </apex:outputPanel>
 </apex:form>

--
Gitblit v1.9.1