zhangzhengmei
2023-05-29 15791f058aef8363b7bc690f49325e8fa1241287
force-app/main/default/pages/SetProvinceTarget.page
@@ -1,4 +1,4 @@
<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>
    
@@ -6,6 +6,28 @@
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<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;
    }
    body .bPageBlock.apexDefaultPageBlock {
        border-top: 2px solid #cfc1c1;
    }
    #MainTable th {
        border-right: 1px solid #c9c9c9;
    }
    #MainTable {
        border: 1px solid #c9c9c9;
    }
</style>
<script type="text/javascript">
function DisableAllButtons (actionText) {
@@ -15,7 +37,7 @@
}
function UpdateJs(actionText) {
    blockme();
    if (window.confirm('确定要反应到目标吗?')) {
    if (window.confirm('确定要反映到目标吗?')) {
        Update();
        DisableAllButtons(actionText);
    } else {
@@ -44,7 +66,10 @@
function calc() {
    debugger;
    var JianDangfalg3 =j$(escapeVfId('Page:Form:editBlock:JianDangfalg')).value();
     // 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');
@@ -54,12 +79,15 @@
        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 x=j;
            if(JianDangfalg3=='true'){
@@ -78,7 +106,7 @@
    }
    // 列
    for (var j = 0; j < 8; j++) {
    for (var j = 0; j < 9; j++) {
        j$(escapeVfId('totalcol' + j)).text(toNumComma(cols[j]));
    }
    // 総計
@@ -233,7 +261,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>
@@ -248,7 +276,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 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"/>
@@ -279,7 +307,7 @@
        <!-- バック側にパラメータを増やしたくないため、1になれないパラメータを入れます -->
        <!-- ここの値は1かどうかの判断のみで使います -->
        <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"   cellspacing="0" cellpadding="0" id="MainTable">
            <thead>
                <tr class="headerRow">
                    <th width="110px" class="headerRow  booleanColumn" id="baseName">销售本部</th>
@@ -301,7 +329,7 @@
                    <!-- <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>
                    <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>
@@ -311,6 +339,9 @@
                    <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">
@@ -326,7 +357,7 @@
                        <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) {
@@ -337,7 +368,7 @@
                            <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}"/>