From c51e03fbf2f6633d8e88aeec9dcb8df13524df8f Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期四, 13 七月 2023 12:00:06 +0800
Subject: [PATCH] backup0713
---
force-app/main/default/pages/ChoiceAsset.page | 119 ++++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 80 insertions(+), 39 deletions(-)
diff --git a/force-app/main/default/pages/ChoiceAsset.page b/force-app/main/default/pages/ChoiceAsset.page
index 901e8f3..0a0eadc 100644
--- a/force-app/main/default/pages/ChoiceAsset.page
+++ b/force-app/main/default/pages/ChoiceAsset.page
@@ -1,18 +1,45 @@
-<apex:page action="{!init}" controller="ChoiceAssetController" id="allPage" showHeader="false" sidebar="false" title="閫夋嫨淇濇湁璁惧">
+<apex:page action="{!init}" controller="ChoiceAssetController" id="allPage" showHeader="false" sidebar="false" title="閫夋嫨淇濇湁璁惧" lightningStylesheets="true" >
<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 targetDate = (today.getFullYear()+1) + '/' + (today.getMonth()+1) + '/' + today.getDate();
+ 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 && partSupplyFinishDateNew <= targetDate){
+ alert('棰勮'+ partSupplyFinishDateNew +'闆朵欢鍗冲皢鍋滀骇锛岃閫佷慨鍓嶄笌宸ュ巶鍙奟C鑱旂粶');
+ }
+ if (partSupplyFinishDateNew <= todayNew){
+ alert('璇ュ瀷鍙烽浂浠跺凡缁忓仠浜э紝鏈夌壒娈婇渶姹傦紝璇烽�佷慨鍓嶄笌宸ュ巶RC鑱旂粶');
+ }
+ }
+ }
+ }
+ //XLIU-CJM7Z9 銆愬鎵樸�戞柊寤轰慨鐞嗘彁绀轰俊鎭紙鍋滀骇鍙婇潪淇悊瀵硅薄鍝侊級LY 20221012 end
function ClearJs(){
blockme();
@@ -26,9 +53,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 +83,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 +92,7 @@
<!-- <td>
<apex:commandButton onclick="saveJs();" value="纭畾" rerender="dummy" />
</td> -->
+
</tr>
<!-- <td>
@@ -77,16 +106,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 +123,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 +131,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 +158,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 +174,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.NoPartRiskDate_F__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