| | |
| | | <apex:page id="Page" showHeader="false" sidebar="false" Controller="SetProvinceTargetController" action="{!init}"> |
| | | <apex:page id="Page" showHeader="false" sidebar="false" Controller="SetProvinceTargetController" action="{!init}" lightningStylesheets="true"> |
| | | <head> |
| | | <title>各省目标设定</title> |
| | | |
| | |
| | | <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); |
| | |
| | | } |
| | | |
| | | function calc() { |
| | | debugger; |
| | | // DB202305259561 fy 20230517 start |
| | | // var JianDangfalg3 =j$(escapeVfId('Page:Form:editBlock:JianDangfalg')).value(); |
| | | var JianDangfalg3 = '{!JianDangfalg}'; |
| | | // DB202305259561 fy 20230517 end |
| | | // alert('sss= '+s); |
| | | var isorgtbl = j$('div[name=bodyTable]'); |
| | | var tbl = document.getElementById('MainTable'); |
| | | var datarows = tbl.rows.length; |
| | |
| | | datarows -= 2; |
| | | } |
| | | var allSum = 0; |
| | | var cols = [0, 0, 0, 0, 0, 0, 0, 0]; |
| | | //DB202305277681 fy 20230517 start |
| | | // var cols = [0, 0, 0, 0, 0, 0, 0, 0]; |
| | | var cols = [0, 0, 0, 0, 0, 0, 0, 0, 0]; |
| | | //DB202305277681 fy 20230517 end |
| | | // 行 |
| | | for (var i = 0; i < datarows; i++) { |
| | | var rowSum = 0; |
| | | // 列 |
| | | for (var j = 0; j < 8; j++) { |
| | | for (var j = 0; j < 9; 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); |
| | |
| | | |
| | | } |
| | | // 列 |
| | | for (var j = 0; j < 8; j++) { |
| | | for (var j = 0; j < 9; j++) { |
| | | j$(escapeVfId('totalcol' + j)).text(toNumComma(cols[j])); |
| | | } |
| | | // 総計 |
| | |
| | | } |
| | | 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")){ |
| | |
| | | <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="" /> |
| | |
| | | |
| | | <!--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"/> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | </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="totalcol9"></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> |
| | |
| | | <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> |
| | | <!-- DB202305277681 fy 20230517 start --> |
| | | <td class="dataCell" style="text-align:right;" id="totalcol8"></td> |
| | | <!-- DB202305277681 fy 20230517 end --> |
| | | <td class="dataCell" style="text-align:right;" id="totalAll"></td> |
| | | </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.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" /> |
| | |
| | | <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(); |