From cb4bae31a02af72fea30e1a57c1d498eabef5d01 Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期四, 16 三月 2023 10:17:12 +0800
Subject: [PATCH] 同步代码
---
force-app/main/default/pages/SetProvinceTarget.page | 46 ++++++++++++++++++++++++++++++++++++++--------
1 files changed, 38 insertions(+), 8 deletions(-)
diff --git a/force-app/main/default/pages/SetProvinceTarget.page b/force-app/main/default/pages/SetProvinceTarget.page
index 48ea85f..dcd8e4d 100644
--- a/force-app/main/default/pages/SetProvinceTarget.page
+++ b/force-app/main/default/pages/SetProvinceTarget.page
@@ -8,6 +8,20 @@
<apex:includeScript value="{!URLFOR($Resource.jqueryTableFix)}"/>
<script type="text/javascript">
+function DisableAllButtons (actionText) {
+ var button = document.getElementById("Page:Form:headBlock:setTarget");
+ button.disabled = true;
+ button.classList.add("btnDisabled");
+}
+function UpdateJs(actionText) {
+ blockme();
+ if (window.confirm('纭畾瑕佸弽搴斿埌鐩爣鍚楋紵')) {
+ Update();
+ DisableAllButtons(actionText);
+ } else {
+ unblockUI();
+ }
+}
function checkMoney(val, id) {
// changeFlg銈汇儍銉�
j$(escapeVfId('Page:Form:editBlock:changeFlg')).val(1);
@@ -29,6 +43,9 @@
}
function calc() {
+ debugger;
+ var JianDangfalg3 =j$(escapeVfId('Page:Form:editBlock:JianDangfalg')).value();
+ // alert('sss= '+s);
var isorgtbl = j$('div[name=bodyTable]');
var tbl = document.getElementById('MainTable');
var datarows = tbl.rows.length;
@@ -44,8 +61,11 @@
// 鍒�
for (var j = 0; j < 8; j++) {
var amount = 0;
-
- var raw = j$(escapeVfId('Page:Form:editBlock:dbRepeat:' + i + ':amountRepeat:' + j + ':inAmountValue')).value();
+ var x=j;
+ if(JianDangfalg3=='true'){
+ x=j+1;
+ }
+ var raw = j$(escapeVfId('Page:Form:editBlock:dbRepeat:' + i + ':amountRepeat:' + x + ':inAmountValue')).value();
raw = (raw + '').replace(/[^0-9+\-Ee.]/g, '');
var amount = localParseFloat(raw);
@@ -125,6 +145,7 @@
}
function hiddeHalf(){
var tbl = document.getElementById('MainTable');
+ console.warn('123123++++'+tbl.rows.length);
for(var i = 0; i< tbl.rows.length;i++){
//Page:Form:editBlock:dbRepeat:0:owner_mlktp
if(document.getElementById("Page:Form:editBlock:dbRepeat:"+i+":owner_mlktp")){
@@ -195,6 +216,7 @@
<apex:param name="csvData" value="" />
</apex:actionFunction>
<!--CHAN-BDQBLX 20210129 you end -->
+ <apex:actionFunction name="Update" action="{!UpdateBtn}" rerender="MessageP,dataBlock,ButtonTable" oncomplete="unblockUI();" />
<apex:actionFunction name="save" action="{!saveBtn}" rerender="MessageP,editBlock" oncomplete="unblockUI();" />
<apex:actionFunction name="next" action="{!next}" rerender="Form" oncomplete="unblockUI();">
<apex:param name="saveFlg" assignTo="{!saveFlg}" value="" />
@@ -226,6 +248,7 @@
<!--CHAN-BDQBLX 20210129 you start -->
<td align="center" width="10%">
+ <apex:commandButton value="鍙嶅簲鍒扮洰鏍�" rerender="dummy" onclick="UpdateJs(this);return false;" rendered="{!Not(isPast)}" id="setTarget"/>
<apex:commandbutton onclick="exportJs();return false;" id="export" value="瀵煎嚭鏁版嵁妯℃澘">
</apex:commandbutton>
<apex:commandButton onclick="openPopupCSV(); return false;" value="瀵煎叆" rerender="Form"/>
@@ -237,7 +260,7 @@
<tr>
<td width="15%"></td>
<td align="center">
- <apex:commandButton value="淇濆瓨" rerender="dummy" onclick="saveJs();return false;" rendered="{!Not(isPast) && loginUser.ProfileId == $Label.ProfileId_SystemAdmin}"/>
+ <apex:commandButton value="淇濆瓨" rerender="dummy" onclick="saveJs();return false;" rendered="{!Not(isPast) && (loginUser.ProfileId == $Label.ProfileId_SystemAdmin || JianDangfalg)}"/>
</td>
<td width="15%" align="right"><apex:commandButton action="{!backBtn}" value="杩斿洖" rerender="dummy"/></td>
</tr>
@@ -261,7 +284,7 @@
<tr class="headerRow">
<th width="110px" class="headerRow booleanColumn" id="baseName">閿�鍞湰閮�</th>
<th width="110px" class="headerRow booleanColumn">鐪�</th>
- <th width="110px" class="headerRow booleanColumn" id="NameHeader">鎷呭綋</th>
+ <!-- <th width="110px" class="headerRow booleanColumn" id="NameHeader">鎷呭綋</th> -->
<th width="30" class="headerRow booleanColumn"></th>
<apex:repeat value="{!opportunity_category}" var="oc" id="opportunityCategoryRepeat">
<th width="85" class="headerRow booleanColumn"><apex:outputText id="categoryValue" value="{!oc}"></apex:outputText></th>
@@ -271,11 +294,15 @@
</thead>
<tbody>
<apex:variable value="{!1}" var="cnt" />
+ <apex:inputHidden id="JianDangfalg" value="{!JianDangfalg}"/>
<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" id="NameHold"></td>
+ <!-- <td class="dataCell" id="NameHold"></td> -->
<td class="dataCell" style="text-align:center;">鍚堣</td>
+ <apex:variable value="JianDangfalg" var="JianDangfalg2" rendered="{!IF(JianDangfalg, true, false)}" >
+ <td class="dataCell" style="text-align:right;" id="totalcol8"></td>
+ </apex:variable>
<td class="dataCell" style="text-align:right;" id="totalcol0"></td>
<td class="dataCell" style="text-align:right;" id="totalcol1"></td>
<td class="dataCell" style="text-align:right;" id="totalcol2"></td>
@@ -290,7 +317,10 @@
<tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}">
<td class="dataCell">{!dbs.department}</td>
<td class="dataCell"><apex:outputField value="{!dbs.opportunity.SAP_Province__c}"></apex:outputField></td>
- <td class="dataCell" id="opportunity.Owner_System__c"><apex:inputField id="owner" value="{!dbs.opportunity.Owner_System__c}" onchange="checkOwner(this.value, this.id, {!cnt});" style="width:80%;"></apex:inputField></td>
+ <!-- <td class="dataCell" id="opportunity.Owner_System__c">
+ <apex:inputField id="owner" value="{!dbs.opportunity.Owner_System__c}" onchange="checkOwner(this.value, this.id, {!cnt});" style="width:80%;">
+ </apex:inputField>
+ </td> -->
<td class="dataCell" id="SumCal" >
</td>
<apex:variable value="{!1}" var="cnt2" />
@@ -320,8 +350,8 @@
<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: 4,id:"LeftTable"});
+ // var blockHeight = j$(window).innerHeight() - j$(escapeVfId('Page:Form:headBlock')).height() - 60;
+ // j$(escapeVfId('MainTable')).tablefix({height: blockHeight, fixRows: 2, fixCols: 4,id:"LeftTable"});
});
calc();
hiddeHalf();
--
Gitblit v1.9.1