From 07390e2fcb4adf27c928335bf27ae7939c5a80ad Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 23 五月 2023 11:28:12 +0800
Subject: [PATCH] bakcup20230523

---
 force-app/main/default/pages/SetPersonalTarget.page |  131 ++++++++++++++++++++++++++++++++-----------
 1 files changed, 97 insertions(+), 34 deletions(-)

diff --git a/force-app/main/default/pages/SetPersonalTarget.page b/force-app/main/default/pages/SetPersonalTarget.page
index 54c94d3..5342f1c 100644
--- a/force-app/main/default/pages/SetPersonalTarget.page
+++ b/force-app/main/default/pages/SetPersonalTarget.page
@@ -1,11 +1,22 @@
-<apex:page id="Page" showHeader="false" sidebar="false" Controller="SetPersonalTargetController" action="{!init}">
+<apex:page id="Page" showHeader="false" sidebar="false" Controller="SetPersonalTargetController" action="{!init}" lightningStylesheets="true">
 <head>
 <title>閮ㄩ棬鎷呭綋鑰呯洰鏍囪瀹氾紙鍖婚櫌鎷呭綋锛�</title>
     
 <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
 <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
 <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
-<apex:includeScript value="{!URLFOR($Resource.jqueryTableFix)}"/>
+<!-- <apex:includeScript value="{!URLFOR($Resource.jqueryTableFix)}"/> -->
+<style>
+    body input[type="text"], .slds-vf-scope input[type="text"] {
+        padding: 0;
+    }
+    table > tbody > tr > th, .slds-vf-scope .listViewport table > tr > td, .slds-vf-scope .listViewport table > tr > th {
+        padding: .2rem;
+    }
+    #Page\:Form\:editBlock > div.pbBody {
+        height: 400px;
+    }
+</style>
 
 <script type="text/javascript">
 //CHAN-BDQBLX  20210125 you start 
@@ -77,12 +88,15 @@
         datarows -= 2;
     }
     var allSum = 0;
-    var cols = [0, 0, 0, 0, 0, 0, 0, 0];
+    //DB202303443108 20230407 you start 澧炲姞涓�涓�0
+    var cols = [0, 0, 0, 0, 0, 0, 0, 0, 0];
+    //DB202303443108 20230407 you start
     // 琛�
     for (var i = 0; i < datarows; i++) {
         var rowSum = 0;
         // 鍒�
-        for (var j = 0; j < 8; j++) {
+        //DB202303443108 20230407 you start  8鏀规垚9 鍥犱负鍙樻垚浜�9鍒�
+        for (var j = 0; j < 9; j++) {
             var amount = 0;
             
             var raw = j$(escapeVfId('Page:Form:editBlock:dbRepeat:' + i + ':amountRepeat:' + j + ':inAmountValue')).value();
@@ -96,7 +110,7 @@
         j$(escapeVfId('Page:Form:editBlock:dbRepeat:' + i + ':totalrow')).text(toNumComma(rowSum));
     }
     // 鍒�
-    for (var j = 0; j < 8; j++) {
+    for (var j = 0; j < 9; j++) {
         j$(escapeVfId('totalcol' + j)).text(toNumComma(cols[j]));
     }
     // 绶忚▓
@@ -155,6 +169,15 @@
     } else {
         prev(false);
     }
+}
+function checkOwner(val, id, rownum) {
+    // changeFlg銈汇儍銉�
+    j$(escapeVfId('Page:Form:dataBlock:changeFlg')).val(1);
+    var ids = id.split(":");
+    var isChangedid = ids[0] + ":" + ids[1] + ":" + ids[2] + ":" + ids[3] + ":" + ids[4] + ":isChanged";
+    console.log('zheli:'+isChangedid);
+    j$(escapeVfId(isChangedid)).val("1");
+    j$(escapeVfId(id))[0].style.background="#FFFF33";
 }
 
 function searchByDptJs() {
@@ -259,7 +282,7 @@
     <apex:outputPanel id="MessageP">
         <apex:pagemessages />
     </apex:outputPanel>
-<font style="font-size:15px;font-weight:700;">褰曞叆鎷呭綋鑰呭悇鑷殑鐩爣&nbsp;锛堟敞锛氳杈撳叆鍚◣閲戦锛�</font>
+<font style="font-size:15px;font-weight:700;">褰曞叆鎷呭綋鑰呭悇鑷殑鐩爣 锛堟敞锛氳杈撳叆鍚◣閲戦锛�</font>
     <!--CHAN-BDQBLX  20210125 you start -->
      <apex:actionFunction name="exportcsv" action="{!exportBycsv}"/>
      <apex:actionFunction name="passToController" action="{!importCSVFile}" rerender="Form, MessageP" oncomplete="unblockUI();">
@@ -290,7 +313,7 @@
             <apex:outputPanel id="popupBox" layout="block">
                 <input type="file" id="file_input" name="attFile" accept=".csv" /><br/>
                 <center>
-                    <apex:commandButton value="纭" onclick="remoteLocationPost(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
+                    <apex:commandButton value="纭" onclick="remoteLocationPost(); return false;" style="width: 20%;"/>
                     <apex:commandButton value="鍙栨秷" onclick="popupBox.hide();" style="width: 20%; margin: 20px 10px 0px 10px" />
                 </center>
             </apex:outputPanel>
@@ -301,13 +324,16 @@
         <table id="ConditionTable" border="0" width="100%">
             <tr>
                 <!-- <apex:outputPanel rendered="{!loginUser.ProfileId == $Label.ProfileId_SystemAdmin}" layout="none"> -->
-                <td width="170">鏈儴&nbsp;<apex:selectList id="accTypeOptsId" value="{!salesDpt}" size="1" style="width:120px;" disabled="{!!(loginUser.ProfileId == $Label.ProfileId_SystemAdmin || loginUser.ProfileId == $Label.ProfileId_103 || loginUser.ProfileId == $Label.ProfileId_2s6dashboard )}" onchange="searchByDptJs();return false;"><apex:selectOptions value="{!salesDptOpts}" />
-                     <!--<apex:inputHidden id="salesDptOpts1" value="{!salesDptOpts}" />-->
+                <!--DB202303443108 20230410 you start-->
+                <td width="170">鏈儴 <apex:selectList id="accTypeOptsId" value="{!salesDpt}" size="1" style="width:120px;" disabled="{!!(loginUser.ProfileId == $Label.ProfileId_SystemAdmin || loginUser.ProfileId == $Label.ProfileId_103 || loginUser.ProfileId == $Label.ProfileId_2s6dashboard )}" onchange="searchByDptJs();return false;"><apex:selectOptions value="{!salesDptOpts}" />
+                
+                        <!--<apex:inputHidden id="salesDptOpts1" value="{!salesDptOpts}" />-->
                 </apex:selectList>
                  
                 </td>
-                <!-- </apex:outputPanel> -->
-                <td width="179">鐪�&nbsp;<apex:inputField id="province" value="{!loginUser.Province__c}" style="width:140px;" onchange="searchByProvinceJs();return false;"></apex:inputField>
+                <!--DB202303443108 20230410 you end -->
+                
+                <td width="179">鐪� <apex:inputField id="province" value="{!loginUser.Province__c}" style="width:140px;" onchange="searchByProvinceJs();return false;"></apex:inputField>
                 <script type="text/javascript">
                     var isadmin = {!(loginUser.ProfileId == $Label.ProfileId_SystemAdmin || loginUser.ProfileId == $Label.ProfileId_103 || loginUser.ProfileId == $Label.ProfileId_2s6dashboard)};
                     if (!isadmin) {
@@ -315,19 +341,21 @@
                     }
                 </script>
                 </td>
-                <td width="300">
-                    鑱岀&nbsp;<apex:selectList id="jobCategory" value="{!loginUser.Job_Category__c}" size="1" style="width:80px;" onchange="searchByFilterJs();return false;">
+                <td width="350">
+                    <!--DB202303443108 20230407 you start-->
+                    SFDC鑱岀 <apex:selectList id="jobCategory" value="{!loginUser.SFDCPosition_C__c}" size="1" style="width:80px;" onchange="searchByFilterJs();return false;">
                         <apex:selectOptions value="{!userJobCategorys}"/>
-                    </apex:selectList>&nbsp;&nbsp;&nbsp;
-                    鍖婚櫌鎷呭綋&nbsp;
+                    </apex:selectList>   
+                    <!--DB202303443108 20230407 you end-->
+                    鍖婚櫌鎷呭綋 
                     <apex:selectList value="{!productUser}" id="productUserid" size="1" style="width:100px;" onchange="searchByFilterJs();return false;">
                         <apex:selectOptions value="{!productUserOptions}"/>
-                    </apex:selectList>&nbsp;&nbsp;&nbsp;
+                    </apex:selectList>   
                 </td>
-                <td width="60"><apex:inputCheckBox id="checkAll" value="{!checkAll}" onchange="checkAll(this);return false;"/><apex:outputLabel value="鍏ㄩ��" for="checkAll"/></td>
+                <td width="60"><apex:inputCheckBox id="checkAll" value="{!checkAll}" onchange="checkAll(this);return false;" selected="true"/><apex:outputLabel value="鍏ㄩ��" for="checkAll"/></td>
                 <td>
                     <apex:repeat value="{!plist}" var="p" id="postRepeat">
-                        <apex:inputCheckBox value="{!p.check}" id="post" onchange="searchByFilterJs();return false;"/><apex:outputLabel value="{!p.positionName}" for="post"/>&nbsp;&nbsp;&nbsp;
+                        <apex:inputCheckBox value="{!p.check}" id="post" onchange="searchByFilterJs();return false;"/><apex:outputLabel value="{!p.positionName}" for="post"/>   
                     </apex:repeat>
                 </td>
                 <!-- 20220613 WLIG-CER9NQ you 椤甸潰涓嬁鎺夋敼鎴恇atch鎵ц
@@ -337,11 +365,11 @@
                 </td>
                -->
                 <!--CHAN-BDQBLX  20210125 you start -->
-                <td width="80">
+                <td width="108">
                     <apex:commandbutton onclick="exportJs();return false;" id="export" value="瀵煎嚭鏁版嵁妯℃澘">
                 </apex:commandbutton>
                 </td>
-                 <td width="40">
+                 <td width="60">
                     <apex:commandButton onclick="openPopupCSV(); return false;" value="瀵煎叆" rerender="Form"/>
                 </td>
                 <!--CHAN-BDQBLX  20210125 you end -->
@@ -373,21 +401,25 @@
         <!-- 銉愩儍銈伌銇儜銉┿儭銉笺偪銈掑銈勩仐銇熴亸銇亜銇熴倎銆侊紤銇仾銈屻仾銇勩儜銉┿儭銉笺偪銈掑叆銈屻伨銇� -->
         <!-- 銇撱亾銇�ゃ伅锛戙亱銇┿亞銇嬨伄鍒ゆ柇銇伩銇т娇銇勩伨銇� -->
         <apex:inputHidden id="changeFlg" value="{!saveFlg}"/>
-        <table class="list" style="border-bottom-width: 0px;" border="0" cellspacing="0" cellpadding="0" id="MainTable">
+        <table class="list" style="border-bottom-width: 0px;width:100%;" border="0" cellspacing="0" cellpadding="0" id="MainTable">
             <thead>
                 <tr class="headerRow">
-                    <th width="70px" class="headerRow  booleanColumn">鏈儴</th>
-                    <th width="70px" class="headerRow  booleanColumn">鐪�</th>
-                    <th class="headerRow  booleanColumn">瑙掕壊</th>
-                    <th width="70px" class="headerRow  booleanColumn">鎷呭綋</th>
+                    <th width="70px" class="headerRow  booleanColumn" style="min-width: 70px;">鏈儴</th>
+                    <th width="70px" class="headerRow  booleanColumn" style="min-width: 70px;">鐪�</th>
+                    <!--<th class="headerRow  booleanColumn">瑙掕壊</th>-->
+                    <th width="70px" class="headerRow  booleanColumn" style="min-width: 70px;">鎷呭綋</th>
                     <th width="70px" class="headerRow  booleanColumn">HR閫氱敤鑱岀骇</th>  <!-- 20220517 lt SWAG-CD28H3 Update -->
                     <th width="70px" class="headerRow  booleanColumn">璐熻矗<br/>浜у搧鍒嗙被锛堜富锛�</th>
                     <!--wangweipeng  20210615-->
                     <th width="70px" class="headerRow  booleanColumn">璐熻矗<br/>浜у搧鍒嗙被锛堝吋锛�</th>
+                    <th width="70px" class="headerRow  booleanColumn" style="min-width: 70px;">鐩爣绫诲瀷</th>
                     <apex:repeat value="{!opportunity_category}" var="oc" id="opportunityCategoryRepeat">
                         <th width="75px" class="headerRow  booleanColumn"><apex:outputText id="categoryValue" value="{!oc}"></apex:outputText></th>
                     </apex:repeat>
                     <th width="85" class="headerRow  booleanColumn" style="background-color:#AAAACC;">鍚堣</th>
+                    <!-- 20230510 ljh start -->
+                    <th width="70px" class="headerRow  booleanColumn"  style="min-width: 70px;">澶囨敞</th>
+                    <!-- 20230510 ljh end -->
                 </tr>
             </thead>
             <tbody>
@@ -395,10 +427,11 @@
                 <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" bgcolor="#AAAACC">
                     <td class="dataCell"></td>
                     <td class="dataCell"></td>
-                    <td class="dataCell"></td>
+                    <!--鏆傛椂闅愯棌<td class="dataCell"></td>-->
                     <td class="dataCell"></td>
                     <td class="dataCell"></td>
                     <!--wangweipeng  20210615-->
+                    <td class="dataCell"></td>
                     <td class="dataCell"></td>
                     <td class="dataCell" style="text-align:center;">鍚堣</td>
                     <td class="dataCell" style="text-align:right;" id="totalcol0"></td>
@@ -409,22 +442,38 @@
                     <td class="dataCell" style="text-align:right;" id="totalcol5"></td>
                     <td class="dataCell" style="text-align:right;" id="totalcol6"></td>
                     <td class="dataCell" style="text-align:right;" id="totalcol7"></td>
+                    <!--DB202303443108 20230407 you start-->
+                    <td class="dataCell" style="text-align:right;" id="totalcol8"></td>
+                    <!--DB202303443108 20230407 you end-->
                     <td class="dataCell" style="text-align:right;" id="totalAll"></td>
+                    <!-- 20230510 ljh start -->
+                    <td class="dataCell" style="text-align:right;" id="totalcol9"></td>
+                    <!-- 20230510 ljh end -->
                 </tr>
                 <apex:repeat value="{!dataBeans}" var="dbs" id="dbRepeat">
                     <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}">
-                        <td class="dataCell">{!dbs.user.Salesdepartment__c}</td>
+                        <td class="dataCell">{!dbs.user.Salesdepartment__c}<!--{!dbs.user.Dept__c}--></td>
                         <td class="dataCell">{!dbs.user.Province__c}</td>
-                        <td class="dataCell">{!dbs.user.UserRole.Name}</td>
+                        <!--鏆傛椂闅愯棌<td class="dataCell">{!dbs.user.UserRole.Name}</td>-->
                         <td class="dataCell">{!dbs.user.Alias}</td>
                         <td class="dataCell">{!dbs.user.HR_Post__c}</td> <!-- 20220517 lt SWAG-CD28H3 Update -->
-                        <td class="dataCell" style="word-wrap:break-word;max-width:70px;">{!SUBSTITUTE(dbs.user.Product_specialist_incharge_product__c, ";", "; ")}</td>
+                        <td class="dataCell" style="word-wrap:break-word;">{!SUBSTITUTE(dbs.user.Product_specialist_incharge_product__c, ";", "; ")}</td>
                         <!--wangweipeng  20210615-->
-                        <td class="dataCell" style="word-wrap:break-word;max-width:70px;">{!SUBSTITUTE(dbs.user.Responsible_for_Products_Concurrently__c, ";", "; ")}</td>
+                        <td class="dataCell" style="word-wrap:break-word;">{!SUBSTITUTE(dbs.user.Responsible_for_Products_Concurrently__c, ";", "; ")}</td>
+                         <td class="dataCell"> <apex:inputField id="inTargetType" value="{!dbs.opportunity.TargetType__c}" style="width:100%;text-align:left;" onchange="checkOwner(this.value, this.id, {!cnt});"></apex:inputField>
+                                <script type="text/javascript">
+                                    var ispast = {!isPast};
+                                    if (ispast) {
+                                        j$(escapeVfId('Page:Form:editBlock:dbRepeat:' + {!cnt-1} + ':inTargetType')).attr("disabled",true);
+                                    }
+                                    //j$(escapeVfId('Page:Form:editBlock:dbRepeat:' + {!cnt-1} + ':inTargetType')).val('涓汉');
+                                </script>
+                        </td> 
+                              
                         <apex:variable value="{!1}" var="cnt2" />
                         <apex:repeat value="{!dbs.amount}" var="amount" id="amountRepeat">
                             <td class="dataCell" style="text-align:right;">
-                                <apex:inputField id="inAmountValue" value="{!amount.Amount}" style="width:92%; text-align:right;" onchange="checkMoney(this.value, this.id);"></apex:inputField>
+                                <apex:inputField id="inAmountValue" value="{!amount.Amount}" style="width:100%; text-align:right;" onchange="checkMoney(this.value, this.id);"></apex:inputField>
                                 <script type="text/javascript">
                                     var ispast = {!isPast};
                                     if (ispast) {
@@ -435,11 +484,23 @@
                             <apex:variable value="{!cnt2 + 1}" var="cnt2" />
                         </apex:repeat>
                         <td class="dataCell" style="text-align:right; background-color:#AAAACC;">
-                            <apex:outputText id="totalrow" style="width:92%;" value="{0,number,#,##0.00}">
+                            <apex:outputText id="totalrow" style="width:100%;" value="{0,number,#,##0.00}">
                                 <apex:param value="" />
                             </apex:outputText>
                             <apex:inputHidden id="isChanged" value="{!dbs.isChanged}"/>
                         </td>
+                        <!-- 20230510 ljh start -->
+                        <td class="dataCell" style="word-wrap:break-word;">
+                        <apex:inputField id="inRemarks" value="{!dbs.opportunity.remarks__c}" style="width:100%;text-alig:left;" onchange="checkOwner(this.value, this.id, {!cnt});"  onkeyup="if(value.length>15)value=value.slice(0,15)"/>
+                            <script type="text/javascript">
+                                var ispast = {!isPast};
+                                if (ispast) {
+                                    j$(escapeVfId('Page:Form:editBlock:dbRepeat:' + {!cnt-1} + ':inRemarks')).attr("disabled",true);
+                                }
+                            </script>
+                        <!-- 鏄ョ湢涓嶈鏅撳澶勯椈鍟奸笩澶滄潵椋庨洦澹� -->
+                        </td>
+                        <!-- 20230510 ljh end -->
                     </tr>
                     <apex:variable value="{!cnt + 1}" var="cnt" />
                 </apex:repeat>
@@ -447,10 +508,12 @@
         </table>
 <script type="text/javascript">
 j$(function() {
-    var blockHeight = j$(window).innerHeight() - j$(escapeVfId('Page:Form:headBlock')).height() - 60;
-    j$(escapeVfId('MainTable')).tablefix({height: blockHeight, fixRows: 2, fixCols: 0});
+    // var blockHeight = j$(window).innerHeight() - j$(escapeVfId('Page:Form:headBlock')).height() - 60;
+    // j$(escapeVfId('MainTable')).tablefix({height: blockHeight, fixRows: 2, fixCols: 0});
 });
 calc();
+
+
 </script>
     </apex:pageBlock>
 </apex:form>

--
Gitblit v1.9.1