From c427566ba3a33dfc5d59eb59fbadec8b6443c9cb Mon Sep 17 00:00:00 2001
From: zhangzhengmei <zhangzhengmei@prec-tech.com>
Date: 星期二, 25 四月 2023 15:31:14 +0800
Subject: [PATCH] 点检计划->打印筛选条件页面 修改
---
force-app/main/default/pages/PrintInspectupReport.page-meta.xml | 7 +
force-app/main/default/pages/PrintInspectupReport.page | 400 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 407 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/pages/PrintInspectupReport.page b/force-app/main/default/pages/PrintInspectupReport.page
new file mode 100644
index 0000000..dcaf610
--- /dev/null
+++ b/force-app/main/default/pages/PrintInspectupReport.page
@@ -0,0 +1,400 @@
+<apex:page id="allPage" showHeader="false" sidebar="false" controller="PrintInspectupReportController" applyBodyTag="false" applyHtmlTag="false" action="{!init}" pageStyle="PageStyleCss" lightningStylesheets="true">
+<html>
+<head>
+ <title>鎵撳嵃绛涢�夋潯浠�</title>
+ <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
+ <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+<!-- css -->
+<style type="text/css">
+ /*浠ヤ笅鏄笅鎷夊閫夋鐨勬牱寮� start*/
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+ body {
+ position: relative;
+ }
+ ul,
+ li {
+ list-style: none;
+ }
+ .nav_1st {
+ width: 300px;
+ height: 32px;
+ line-height: 32px;
+ padding: 5px 30px 5px 5px;
+ border: 1px solid #c9c9c9;
+ background-size: 5%;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ margin: 0 auto;
+ }
+ .nav {
+ width: 300px;
+ line-height: 20px;
+ border: 1px solid #c9c9c9;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ position: absolute;
+ top: 30px;
+ right: 0;
+ left: 0;
+ margin: 10px 0 0 94px;
+ z-index: 9999;
+ display: none;
+ }
+
+ .nav_close {
+ 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;
+ }
+ #classification {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ /*浠ヤ笅鏄笅鎷夊閫夋鐨勬牱寮� start*/
+</style>
+<!-- js -->
+<script type="text/javascript">
+ //涓嬫媺澶氶�夋 strat
+ window.onload = () => {
+ j$(".nav_1st").click(function () {
+ j$(".nav,.nav_close").toggle();
+ });
+ j$(".nav_close").click(function () {
+ j$(".nav,.nav_close").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);
+ }
+ });
+ j$(".ul-nav").click(function () {
+ var checked1 = j$(this).children("input").prop("checked");
+ 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()) + "'>" + (j$(this)
+ .text().trim() + ",") + "</span>");
+ } else {
+ j$(this).children("input").prop("checked", false);
+ j$("#classification").children("#" + (j$(this).children("input")[0].value.trim())).remove();
+ var length = j$("#classification").html().length;
+ if (length === 0) {
+ j$("#classification").append("<span class='valClass' id='initial'>--鏃�--</span>");
+ }
+ }
+
+ var optioncheck = j$(".valClass");
+ var hint = '';
+ for(var i = 0;i<optioncheck.length;i++){
+ hint +=optioncheck[i].innerText;
+ }
+ j$("#valId").attr("title",hint);
+ });
+ }
+ //鐢熸垚pdf
+ function createPDFJs(){
+ //blockme();
+ //璁℃暟浣跨敤锛岀敤浜庡垽鏂�夋嫨鐨勭偣妫�鏄惁瓒呰繃4涓�
+ var index = 0;
+ var strId = '';
+ var lawtable = document.getElementById("tableHeader_L");//鑾峰彇id涓簍ableHeader_L鐨則able
+ var rows = lawtable.rows;//鑾峰彇鎵�鏈夎
+ //寰幆鑾峰彇鎵�鏈夐�変腑鐨勭偣妫�
+ for(var i=1; i < rows.length; i++){
+ var row = rows[i];//鑾峰彇姣忎竴琛�
+ var getChecked = row.cells[2].getElementsByTagName("input")[0].checked;//鑾峰彇澶嶉�夋鏄惁閫変腑
+ if(getChecked){
+ //涓嶈兘瓒呰繃4鏉℃暟鎹�
+ if(index < 4){
+ index++;
+ if(strId == ''){
+ strId = row.cells[2].getElementsByTagName("input")[0].id;//鑾峰彇閫変腑鐨勫閫夋id
+ }else{
+ strId += ','+row.cells[2].getElementsByTagName("input")[0].id;//鑾峰彇閫変腑鐨勫閫夋id
+ }
+ }else{
+ alert('閫夋嫨鐨勭偣妫�涓嶈兘瓒呰繃4鏉★紒');
+ return;
+ }
+ }
+ }
+
+ var parameter = '';
+ //鍔犵敓鎴愮被鍨嬫潯浠�
+ var produceTypeVal = document.getElementById('allPage:allForm:allBlock:paymentPlan1:isResultShow').value;
+ parameter = produceTypeVal;
+ //淇濇湁璁惧鐨勭被鍨�
+ var assetType = document.getElementById('allPage:allForm:allBlock:paymentPlan1:selectAssetType').value;
+ parameter += ',,'+assetType;
+ //淇濇湁璁惧 鍐呭
+ var assetStr = '';
+ var assetList = j$("#classification").children();
+ if(j$("#classification").children().text().trim() != '--鏃�--'){
+ for(var i = 0;i < assetList.length;i++){
+ if(j$("#classification").children()[i].id != '' && j$("#classification").children()[i].id != null){
+ if(assetStr == ''){
+ assetStr = assetList[i].id;
+ }else{
+ assetStr += ','+assetList[i].id;
+ }
+ }
+ }
+ }
+ parameter += ',,'+assetStr;
+ //鏄惁鍒嗛〉
+ var isPaging = document.getElementById('allPage:allForm:allBlock:paymentPlan1:isPaging').checked;
+ parameter += ',,'+isPaging;
+ //+ 娲楁秷淇℃伅鏉′欢
+ var falg = document.getElementById("allPage:allForm:allBlock:paymentPlan2:activeOnId").checked;
+ parameter += ',,'+falg;
+ //+ 鐐规瀵硅薄
+ if(strId != ''){
+ parameter += ',,'+strId;
+ }else{
+ alert('璇烽�夋嫨鐐规璁″垝锛�');
+ return false;
+ }
+
+ //+ 鍚坕d
+ parameter += ',,' + '{!maintenanceContractId}';
+ // 鎵撳嵃鍖婚櫌鍚堝悓閰嶇疆
+ window.open('/apex/PrintInspectupReportPDF?parameter=' + parameter);
+ window.close();
+ //createPDF(parameter);
+ }
+
+ //鍏ㄩ��
+ function onCheckAllJS(Obj){
+ if(!Obj.checked){
+ Obj.checked = false;
+ var lawtable = document.getElementById("tableHeader_L");//鑾峰彇id涓簍ableHeader_L鐨則able
+ var rows = lawtable.rows;//鑾峰彇鎵�鏈夎
+ for(var i=1; i < rows.length; i++){
+ var row = rows[i];//鑾峰彇姣忎竴琛�
+ var getChecked = row.cells[3].getElementsByTagName("input")[0].checked;//鑾峰彇澶嶉�夋鏄惁閫変腑
+ if(getChecked){
+ row.cells[3].getElementsByTagName("input")[0].checked = false;
+ }
+ }
+ }else{
+ Obj.checked = true;
+ var lawtable = document.getElementById("tableHeader_L");//鑾峰彇id涓簍ableHeader_L鐨則able
+ var rows = lawtable.rows;//鑾峰彇鎵�鏈夎
+ for(var i=1; i < rows.length; i++){
+ var row = rows[i];//鑾峰彇姣忎竴琛�
+ var getChecked = row.cells[3].getElementsByTagName("input")[0].checked;//鑾峰彇澶嶉�夋鏄惁閫変腑
+ if(!getChecked){
+ row.cells[3].getElementsByTagName("input")[0].checked = true;
+ }
+ }
+ }
+ }
+
+ //閫夋嫨涓嬫媺妗嗗�兼湁鍙樺姩浠ュ悗瑙﹀彂
+ function selectAssetTypeJs(Obj){
+ var selectId = Obj.value;
+ //濡傛灉淇濇湁璁惧閫夋嫨鏃�
+ if(selectId == '' || selectId == null){
+ j$("#isPagingId").hide();
+ j$("#selectCheckId").hide();
+ }else{
+ //娑堥櫎閫夋嫨鐨勫叾浠栭�夐」
+ if(j$("#classification").children().text() != "--鏃�--"){
+ j$("#classification").children().remove();
+ j$("#classification").append("<span class='valClass' id='initial'>--鏃�--</span>");
+ }
+ var inputObj = j$(".li-input");
+ if(inputObj != null){
+ for(var i = 0; i < inputObj.length;i++){
+ if(inputObj[i].checked){
+ inputObj[i].checked = false;
+ }
+ }
+ }
+ //鏄惁鍒嗛〉璁剧疆鎴愪笉鍕鹃�夌姸鎬�
+ document.getElementById('allPage:allForm:allBlock:paymentPlan1:isPaging').checked = false;
+
+ if(selectId == "4" || selectId == "0"){
+ j$("#selectCheckId").hide();
+ j$("#isPagingId").hide();
+ }else{
+ j$("#selectCheckId").show();
+ j$("#isPagingId").show();
+ if(selectId == "1"){
+ j$("#divId1").show();
+ j$("#divId2").hide();
+ j$("#divId3").hide();
+ }
+ if(selectId == "2"){
+ j$("#divId1").hide();
+ j$("#divId2").show();
+ j$("#divId3").hide();
+ }
+ if(selectId == "3"){
+ j$("#divId1").hide();
+ j$("#divId2").hide();
+ j$("#divId3").show();
+ }
+ }
+ }
+
+ }
+</script>
+
+</head>
+<body>
+ <apex:form styleClass="BlockSytle" id="allForm">
+ <!-- 椤甸潰鏁版嵁鍒濆鍖栨柟娉� -->
+ <apex:actionFunction name="init" action="{!init}" rerender="oppBlock1,message,checEventFrame" onComplete="unblockUI();"></apex:actionFunction>
+ <div>
+ <apex:pageBlock id="allBlock" >
+ <apex:pageBlockSection id="paymentPlan1" title="閫夋嫨鏉′欢1" columns="2">
+ <apex:outputPanel >
+ <table style="width:1000px;">
+ <tr style="">
+ <td style="width: 76px;float: left;line-height: 40px;">
+ <font>鏄惁绌虹櫧</font>
+ </td>
+ <td style="float: left;">
+ <apex:selectList value="{!isResultShow}" id="isResultShow" size="1" style="width:85px;min-width: 80px;">
+ <apex:selectOptions value="{!isResultShowLOption}"/>
+
+ </apex:selectList>
+ </td>
+ <td style="width: 76px;float: left;line-height: 40px;">
+ <font>淇濇湁璁惧</font>
+ </td>
+ <td style="min-width: 400px;float: left;">
+ <apex:selectList value="{!selectAssetType}" id="selectAssetType" size="1" style="width:85px;min-width: 80px;float: left;" onchange="selectAssetTypeJs(this);return false;">
+ <apex:selectOptions value="{!selectAssetTypeOption}"/>
+ </apex:selectList>
+
+ <div style="float: left;display: none;line-height: 32px;" id="selectCheckId">
+ <div class="nav_1st" id="valId" title="">
+ <p id="classification" style="margin-top: -7px;"><span id="initial">--鏃�--</span></p>
+ </div>
+ <ul class="nav" style="background-color: #FFFFFF;">
+ <div id="divId1" style="display:">
+ <!-- 鎴樼暐绉戝涓嬫媺妗� -->
+ <apex:repeat value="{!strategyDepartment}" var="orr" id="selSD">
+ <li class="sdclass" style="margin-left:0px">
+ <p class="ul-nav" name="cate_id[]" >
+ <input type="checkbox" value="{!orr.parameterName}" class="li-input" style="display: inline-block;vertical-align: middle;" />
+ <font style="">{!orr.parameterName}</font>
+ </p>
+ </li>
+ </apex:repeat>
+ </div>
+ <div id="divId2" style="display:">
+ <!-- 绉戝涓嬫媺妗� -->
+ <apex:repeat value="{!department}" var="orrr" id="selD">
+ <li class="dclass" style="margin-left:0px">
+ <p class="ul-nav" name="cate_id[]" >
+ <input type="checkbox" value="{!orrr.parameterName}" class="li-input" style="display: inline-block;vertical-align: middle;"/>
+ <font style="">{!orrr.parameterName}</font></p>
+ </li>
+ </apex:repeat>
+ </div>
+ <div id="divId3" style="display:;">
+ <apex:repeat value="{!installationSite}" var="orrrr" id="seliD">
+ <li class="iclass" style="margin-left:0px">
+ <p class="ul-nav" name="cate_id[]" >
+ <input type="checkbox" value="{!orrrr.parameterName}" class="li-input" style="display: inline-block;vertical-align: middle;"/><font style="">{!orrrr.parameterName}</font>
+ </p>
+ </li>
+ </apex:repeat>
+ </div>
+ </ul>
+ <div class="nav_close"></div>
+ </div>
+ </td>
+ <td style="float: left;display: none;line-height: 40px;" id="isPagingId">
+ <font>鏄惁鍒嗛〉</font>
+ <apex:inputCheckBox value="{!isPaging}" id="isPaging" style="display: inline-block;vertical-align: middle;"/>
+ </td>
+ </tr>
+ </table>
+ </apex:outputPanel>
+ </apex:pageBlockSection>
+ <apex:pageBlockSection id="paymentPlan2" title="绛涢�夋潯浠�2" columns="2">
+ <apex:outputPanel >
+ <table style="width:800px;">
+ <tr>
+ <td>
+ <span style="vertical-align: text-bottom;float: left;">
+ <font>娲楁秷淇℃伅 </font>
+ <apex:inputCheckBox value="{!activeOn}" id="activeOnId" style="display: inline-block;vertical-align: middle;"/>
+ </span>
+ </td>
+ </tr>
+ </table>
+ </apex:outputPanel>
+ </apex:pageBlockSection>
+ <apex:pageBlockSection id="paymentPlan3" title="绛涢�夋潯浠�3" columns="1">
+ <apex:outputPanel >
+ <table class="list" style="font-size:11px;width: 100%;" border="" id="tableHeader_L" >
+ <thead>
+ <tr class="headerRow" height="30px" align="center">
+ <!--鏍囬 -->
+ <td style="">淇℃伅瀵硅薄</td>
+ <td style="">鏈�鍚庣偣妫�鏃�</td>
+ <td style="width:100px" colspan="1">
+ <!-- <input type="checkbox" name="reading" onchange="onCheckAllJS(this);return false;" id="checkAll"/> -->
+ 鍕鹃��
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ <apex:variable value="{!0}" var="cnt" />
+ <apex:repeat value="{!inspectupPlanList}" var="or" id="oppTable">
+ <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
+ <td style="border-width: 0 0 0px 0;" align="center" >
+ <apex:outputText value="{!or.Chack_Plan_NO__c}娆$偣妫�" />
+ </td>
+ <td style="border-width: 0 0 0px 0;" align="center">
+ <apex:outputfield value="{!or.Execution_End_Date__c}" />
+ </td>
+ <td align="center" style="border-width: 0 0 0px 0;" colspan="1">
+ <input type="checkbox" name="reading" id="{!or.id}"/>
+ </td>
+ </tr>
+ <apex:variable value="{!cnt + 1}" var="cnt" />
+ </apex:repeat>
+ </tbody>
+ </table>
+ </apex:outputPanel>
+ </apex:pageBlockSection>
+ </apex:pageBlock>
+ <div style="width: 98%;">
+ <apex:commandButton onclick="createPDFJs();return false;" rendered="true" value="鐢熸垚PDF" style="width:80px;float: right;"/>
+ </div>
+ </div>
+ </apex:form>
+</body>
+</html>
+</apex:page>
\ No newline at end of file
diff --git a/force-app/main/default/pages/PrintInspectupReport.page-meta.xml b/force-app/main/default/pages/PrintInspectupReport.page-meta.xml
new file mode 100644
index 0000000..43e33b9
--- /dev/null
+++ b/force-app/main/default/pages/PrintInspectupReport.page-meta.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>45.0</apiVersion>
+ <availableInTouch>false</availableInTouch>
+ <confirmationTokenRequired>false</confirmationTokenRequired>
+ <label>PrintInspectupReport</label>
+</ApexPage>
--
Gitblit v1.9.1