From 3affb8b01f55f90cc047d3048e4ec04aad249e9d Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期二, 23 四月 2024 09:56:47 +0800
Subject: [PATCH] 123
---
force-app/main/default/pages/InventoryReport.page | 240 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 196 insertions(+), 44 deletions(-)
diff --git a/force-app/main/default/pages/InventoryReport.page b/force-app/main/default/pages/InventoryReport.page
index 03fb0d3..97b36c8 100644
--- a/force-app/main/default/pages/InventoryReport.page
+++ b/force-app/main/default/pages/InventoryReport.page
@@ -1,7 +1,9 @@
-<apex:page extensions="InventoryReportController" standardController="Inventory_Header__c" showHeader="false" sidebar="false" id="allPage" action="{!init}" tabStyle="CheckAllOlympusAsset__tab" applyHtmlTag="false">
+<apex:page extensions="InventoryReportController" standardController="Inventory_Header__c" showHeader="false" sidebar="false" id="allPage" action="{!init}" tabStyle="CheckAllOlympusAsset__tab" lightningStylesheets="true" applyHtmlTag="false">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+<apex:stylesheet value="{!URLFOR($Resource.StyleUtilColorCss)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
<style>
.dateFormat {
display: none;
@@ -158,9 +160,9 @@
border:1px;
background-color:black;
}
- .datePicker {
- width: 300px;
- height: 200px;
+ body .datePicker {
+ width: 250px;
+ /* height: 200px;*/
}
/****************** 椤甸潰搴曢儴瀹℃壒娴乧ss璋冩暣 *******************/
.bRelatedList .relatedProcessHistory .extraRow td.actionColumn .actionLink, .bRelatedList .relatedProcessHistory .extraRow td, .bRelatedList .relatedProcessHistory .extraRow th {
@@ -193,7 +195,13 @@
.requiredInput {
position: relative;
height: 100%;
+ display:inline-block;/*20230912 ljh add*/
}
+ /* 20230912 ljh start */
+ .InventoryResult .requiredInput{
+ display:block;
+ }
+ /* 20230912 ljh end */
.requiredBlock {
background-color: #c00;
position: absolute;
@@ -202,6 +210,16 @@
top: 1px;
bottom: 1px;
}
+ .my-left{
+ width: 49%;
+ padding: 5px;
+ text-align: left;
+ }
+ /*20230921 ljh add start*/
+ body td.actionColumn:before {
+ content: normal;
+ }
+ /*20230921 ljh add end*/
</style>
<style type="text/css" media="print">
.hiddenPrint{display:none !important;}
@@ -255,33 +273,54 @@
}
// 缁翠慨璁板綍
function weixiu_report() {
- window.open("{!$Label.Environment_Url}{!weixiuReportId}?pv1={!ihId}");
+ // 20230907 ljh start
+ // window.open("{!$Label.Environment_Url}{!weixiuReportId}?pv1={!ihId}");
+ window.open("{!$Label.Environment_Url}lightning/r/Report/{!weixiuReportId}/view?fv1={!ihId}");
+ // 20230907 ljh end
}
// 鍑哄�熻褰�
function chujie_report() {
- window.open("{!$Label.Environment_Url}{!chujieReportId}?pv1={!ihId}");
+ // 20230907 ljh start
+ // window.open("{!$Label.Environment_Url}{!chujieReportId}?pv1={!ihId}");
+ window.open("{!$Label.Environment_Url}lightning/r/Report/{!chujieReportId}/view?fv1={!ihId}");
+ // 20230907 ljh end
}
// 涓㈠け璁板綍
function diushi_report() {
- window.open("{!$Label.Environment_Url}{!diushiReportId}?pv1={!ihId}");
+ // 20230907 ljh start
+ // window.open("{!$Label.Environment_Url}{!diushiReportId}?pv1={!ihId}");
+ window.open("{!$Label.Environment_Url}lightning/r/Report/{!diushiReportId}/view?fv1={!ihId}");
+ // 20230907 ljh end
}
- <!--20210525 you 1650 start-->
+ // <!--20210525 you 1650 start-->
// 璋冩嫧鍑哄�熻褰�
function transfer_chujie_report() {
- window.open("{!$Label.Environment_Url}{!transferchujieReportId}?pv1={!ihId}");
+ // 20230907 ljh start
+ // window.open("{!$Label.Environment_Url}{!transferchujieReportId}?pv1={!ihId}");
+ window.open("{!$Label.Environment_Url}lightning/r/Report/{!transferchujieReportId}/view?fv1={!ihId}");
+ // 20230907 ljh end
}
// 璋冩嫧閬楀け璁板綍
function transfer_diushi_report() {
- window.open("{!$Label.Environment_Url}{!transferdiushiReportId}?pv1={!ihId}");
+ // 20230907 ljh start
+ // window.open("{!$Label.Environment_Url}{!transferdiushiReportId}?pv1={!ihId}");
+ window.open("{!$Label.Environment_Url}lightning/r/Report/{!transferdiushiReportId}/view?fv1={!ihId}");
+ // 20230907 ljh end
}
- <!--20210525 you 1650 end-->
+ // <!--20210525 you 1650 end-->
// 鑰楁潗鍑哄�熻褰�
function consum_chujie_report() {
- window.open("{!$Label.Environment_Url}{!consumChujieReportId}?pv1={!ihId}");
+ // 20230907 ljh start
+ // window.open("{!$Label.Environment_Url}{!consumChujieReportId}?pv1={!ihId}");
+ window.open("{!$Label.Environment_Url}lightning/r/Report/{!consumChujieReportId}/view?fv1={!ihId}");
+ // 20230907 ljh end
}
// 鑰楁潗娑堣�楄褰�
function consum_xiaohao_report() {
- window.open("{!$Label.Environment_Url}{!consumXiaohaoReportId}?pv1={!ihId}");
+ // 20230907 ljh start
+ // window.open("{!$Label.Environment_Url}{!consumXiaohaoReportId}?pv1={!ihId}");
+ window.open("{!$Label.Environment_Url}lightning/r/Report/{!consumXiaohaoReportId}/view?fv1={!ihId}");
+ // 20230907 ljh end
}
</script>
@@ -291,8 +330,11 @@
<apex:param value="" name="saveType"/>
</apex:actionFunction>
<apex:pageBlock id="searchBlock">
- <apex:outputPanel id="RightArea" layout="block" style="margin:0 20%">
- <apex:outputPanel id="message">
+ <!-- 20230912 ljh update -->
+ <!-- <apex:outputPanel id="RightArea" layout="block" style="margin: 0 20%;"> -->
+ <apex:outputPanel id="RightArea" layout="block" style="margin: 0 5%;" >
+ <!-- 20230912 ljh update end -->
+ <apex:outputPanel id="message" style="width: auto" >
<apex:pageMessages />
</apex:outputPanel>
<div style="margin-top: 1%" class="startInventory">
@@ -305,63 +347,101 @@
rendered="{!canDoFlg}" />
</div>
<p style="margin:10px auto; width:100%; text-align: center; font-weight:bold; font-size:22px;">OCSM鍖荤枟澶囧搧绠$悊涓績{!IF(isConsum,'鑰楁潗','澶囧搧')}鐩樼偣鎶ュ憡涔�</p>
- <table class="inventoryReportTable" style="width: 50%;">
+ <table class="inventoryReportTable" style="width: 100%;">
+ <colgroup>
+ <col width="49%"/>
+ <col width="49%"/>
+ </colgroup>
<tr>
- <td class="labelStyle">鐩樼偣閮ㄩ棬/鍒嗗叕鍙革細</td>
- <td class="labelStyle">{!inventoryDepartment}</td>
+ <!-- 20230912 ljh update -->
+ <td class="labelStyle">鐩樼偣閮ㄩ棬/鍒嗗叕鍙革細{!inventoryDepartment}</td>
+ <!-- <td class="labelStyle">{!inventoryDepartment}</td> -->
</tr>
<tr>
- <td class="labelStyle">鐩樼偣鎶ュ憡涔︾紪鍙凤細</td>
- <td class="labelStyle" style="color: blue">{!ihObj.Name}</td>
+ <!-- 20230912 ljh update -->
+ <td class="labelStyle">鐩樼偣鎶ュ憡涔︾紪鍙凤細<span style="color: blue">{!ihObj.Name}</span></td>
+ <!-- <td class="labelStyle" style="color: blue">{!ihObj.Name}</td> -->
</tr>
<tr>
- <td class="labelStyle">鎻愪氦鎶ュ憡鏃ユ湡锛�</td>
- <td class="labelStyle">
+ <!-- 20230912 ljh update -->
+ <td class="labelStyle">鎻愪氦鎶ュ憡鏃ユ湡锛�<span class="labelStyle">
+ <apex:outputText id="ivSubmitDate" value="{0,date,yyyy'/'MM'/'dd}">
+ <apex:param value="{!ihObj.Inventory_Submit_Date__c}" />
+ </apex:outputText>
+ </span></td>
+ <!-- <td class="labelStyle">
<apex:outputText id="ivSubmitDate" value="{0,date,yyyy'/'MM'/'dd}">
<apex:param value="{!ihObj.Inventory_Submit_Date__c}" />
</apex:outputText>
- </td>
+ </td> -->
</tr>
</table>
<hr class="line" />
- <table class="inventoryReportTable">
+ <table class="inventoryReportTable" width="100%">
<tr>
- <td class="labelStyle">鐩樼偣鍦扮偣锛�</td>
- <td class="labelStyle">
+ <!-- 20230912 ljh update -->
+ <td class="my-left"><label>鐩樼偣鍦扮偣锛�</label>
<apex:outputText id="ivLocation" value="{!ihObj.Internal_asset_location__c}" />
</td>
- <td class="labelStyle">寮�濮嬬洏鐐规椂闂达細</td>
- <td class="labelStyle">
+ <!-- <td class="labelStyle">
+ <apex:outputText id="ivLocation" value="{!ihObj.Internal_asset_location__c}" />
+ </td> -->
+ <td class="my-left"><label>寮�濮嬬洏鐐规椂闂达細</label>
<apex:outputText id="ivDate" value="{0,date,yyyy'/'MM'/'dd}">
<apex:param value="{!ihObj.Inventory_Start_Date__c}" />
</apex:outputText>
</td>
+ <!-- <td class="labelStyle">
+ <apex:outputText id="ivDate" value="{0,date,yyyy'/'MM'/'dd}">
+ <apex:param value="{!ihObj.Inventory_Start_Date__c}" />
+ </apex:outputText>
+ </td> -->
</tr>
<tr>
- <td class="labelStyle">鐩樼偣鏃堕棿From锛�</td>
- <td class="labelStyle">
+ <!-- 20230912 ljh update -->
+ <td class="my-left" width="50%" ><label>鐩樼偣鏃堕棿From锛�</label>
+ <apex:inputField id="ivDateFrom" value="{!ihObj.Inventory_Date_From__c}"
+ required="{!DESC_RW1['Inventory_Date_From__c'] == 'wm'}" />
+ </td>
+ <!-- <td class="labelStyle">
<apex:inputField id="ivDateFrom" value="{!ihObj.Inventory_Date_From__c}"
required="{!DESC_RW1['Inventory_Date_From__c'] == 'wm'}" />
+ </td> -->
+ <!-- 20230912 ljh update -->
+ <td class="my-left" width="50%" ><label>鐩樼偣鏃堕棿To锛�</label>
+ <apex:inputField id="ivDateTo" value="{!ihObj.Inventory_Date_To__c}"
+ required="{!DESC_RW1['Inventory_Date_To__c'] == 'wm'}" />
</td>
- <td class="labelStyle">鐩樼偣鏃堕棿To锛�</td>
- <td class="labelStyle">
+ <!-- <td class="labelStyle">
<apex:inputField id="ivDateTo" value="{!ihObj.Inventory_Date_To__c}"
required="{!DESC_RW1['Inventory_Date_To__c'] == 'wm'}" />
- </td>
+ </td> -->
</tr>
<tr>
- <td class="labelStyle">鐩樼偣浜哄憳锛�</td>
- <td class="labelStyle" colspan="3">
+
+ <td colspan="2" aligh="left" style="padding: 5px;width:100%;"><label>鐩樼偣浜哄憳锛�</label><apex:inputField id="ivPIC" style="width: 90%;" value="{!ihObj.Inventory_Persons__c}"
+ required="{!DESC_RW1['Inventory_Persons__c'] == 'wm'}" /></td>
+ <!-- <td class="labelStyle" colspan="3">
<apex:inputField id="ivPIC" style="width: 100%;" value="{!ihObj.Inventory_Persons__c}"
required="{!DESC_RW1['Inventory_Persons__c'] == 'wm'}" />
- </td>
+ </td> -->
</tr>
</table>
<hr class="line" />
<table class="inventoryReportTable" width="100%" >
<tr>
- <td class="tdStyle-left">鐩樼偣鎶ュ憡鎻愪氦浜猴細</td>
- <td class="tdStyle-left">
+ <!-- 20230912 ljh update -->
+ <td class="my-left"><label>鐩樼偣鎶ュ憡鎻愪氦浜猴細</label>
+ <apex:inputField id="ivsubmitPIC" value="{!ihObj.InventorySubmit_PIC__c}"
+ required="{!DESC_RW1['InventorySubmit_PIC__c'] == 'wm'}" >
+ <script>
+ if( document.getElementById('allPage:allForm:searchBlock:ivsubmitPIC_mlktp')){
+ document.getElementById('allPage:allForm:searchBlock:ivsubmitPIC_mlktp').style.display="none" ;
+ }
+ </script>
+ </apex:inputField>
+ </td>
+ <!-- <td class="tdStyle-left">
<apex:inputField id="ivsubmitPIC" value="{!ihObj.InventorySubmit_PIC__c}"
required="{!DESC_RW1['InventorySubmit_PIC__c'] == 'wm'}" >
<script>
@@ -370,14 +450,15 @@
}
</script>
</apex:inputField>
- </td>
- <td class="tdStyle-right">鑱屼綅锛�</td>
- <td class="tdStyle-left">
+ </td> -->
+ <td class="my-left"><label>鑱屼綅锛�</label><apex:outputText id="ivsubmitPICPost" value="{!ihObj.InventorySubmit_PIC__r.Post__c}" /></td>
+ <!-- <td class="tdStyle-left">
<apex:outputText id="ivsubmitPICPost" value="{!ihObj.InventorySubmit_PIC__r.Post__c}" />
- </td>
+ </td> -->
</tr>
<tr>
- <td class="tdStyle-left">鐩樼偣鎶ュ憡纭浜猴細</td>
+ <!-- 20230912 ljh update -->
+ <!-- <td class="tdStyle-left">鐩樼偣鎶ュ憡纭浜猴細</td>
<td class="tdStyle-left">
<apex:inputField id="ivcheckPIC" value="{!ihObj.InventoryCheck_PIC__c}"
required="{!DESC_RW1['InventoryCheck_PIC__c'] == 'wm'}" >
@@ -391,6 +472,18 @@
<td class="tdStyle-right">鑱屼綅锛�</td>
<td class="tdStyle-left">
<apex:outputText id="ivcheckPICPost" value="{!ihObj.InventoryCheck_PIC__r.Post__c}" />
+ </td> -->
+ <td class="my-left"><label>鐩樼偣鎶ュ憡纭浜猴細</label>
+ <apex:inputField id="ivcheckPIC" value="{!ihObj.InventoryCheck_PIC__c}"
+ required="{!DESC_RW1['InventoryCheck_PIC__c'] == 'wm'}" >
+<script>
+if( document.getElementById('allPage:allForm:searchBlock:ivcheckPIC_mlktp')){
+ document.getElementById('allPage:allForm:searchBlock:ivcheckPIC_mlktp').style.display="none" ;
+}
+</script>
+ </apex:inputField>
+ </td>
+ <td class="my-left"><label>鑱屼綅锛�</label><apex:outputText id="ivcheckPICPost" value="{!ihObj.InventoryCheck_PIC__r.Post__c}" />
</td>
</tr>
</table>
@@ -430,7 +523,7 @@
<apex:commandButton styleClass="hiddenPrint" value="鑰楁潗娑堣�楄褰�" onclick="consum_xiaohao_report(); return false;" />
</apex:outputPanel>
</div>
- <apex:outputPanel id="InventoryResult">
+ <apex:outputPanel id="InventoryResult" styleClass="InventoryResult">
<table style="{!IF(isConsum,'display: none;','')}" class="inventoryReportTable" border="1px">
<tr>
<th class="labelStyle">鍥哄畾璧勪骇</th>
@@ -556,4 +649,63 @@
<apex:outputPanel styleClass="hiddenPrint" id="process">
<apex:relatedList list="ProcessSteps" ></apex:relatedList>
</apex:outputPanel>
+ <script>
+ let SelectFieldParamList=[
+
+{
+
+ //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙�
+
+ inputFieldId : 'allPage:allForm:searchBlock:ivsubmitPIC',
+
+ //鏌ユ壘瀛楁鎵�鍦ㄥ璞�
+
+ ObjectType : 'Inventory_Header__c',
+
+ //鏌ユ壘瀛楁鐨刟pi鍚嶇О
+
+ QueryFieldApiName : 'InventorySubmit_PIC__c',
+
+ //鏌ユ壘瀛楁鐨勬煡鎵惧璞�
+
+ SelectObj : 'User',
+
+ //鎼滅储鏃朵娇鐢ㄧ殑瀛楁
+
+ SelectFld : 'Name',
+
+},
+
+{
+
+ //鍘焌pex:inputField鐨刬d鍊硷紝闇�瑕佸湪椤甸潰涓婅幏鍙�
+
+ inputFieldId : 'allPage:allForm:searchBlock:ivcheckPIC',
+
+ //鏌ユ壘瀛楁鎵�鍦ㄥ璞�
+
+ ObjectType : 'Inventory_Header__c',
+
+ //鏌ユ壘瀛楁鐨刟pi鍚嶇О
+
+ QueryFieldApiName : 'InventoryCheck_PIC__c',
+
+ //鏌ユ壘瀛楁鐨勬煡鎵惧璞�
+
+ SelectObj : 'User',
+
+ //鎼滅储鏃朵娇鐢ㄧ殑瀛楁
+
+ SelectFld : 'Name',
+
+},
+
+
+
+]
+
+//鍒濆鍖�
+
+resetOpenPage(SelectFieldParamList);
+ </script>
</apex:page>
\ No newline at end of file
--
Gitblit v1.9.1