hls_monthly_statement.lview 64.7 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2
<?xml version="1.0" encoding="UTF-8"?>
<!--
3 4 5 6
    $Author: qwm  
    $Date: 2013-12-28 下午1:24:13  
    $Revision: 1.0  
    $Purpose: 
Spencer Chang's avatar
Spencer Chang committed
7 8 9
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure>
Darming's avatar
Darming committed
10 11 12 13 14 15
        <a:model-query defaultWhereClause="t1.role_id=${/session/@role_id} and t1.company_id=${/session/@company_id}"
                       fetchAll="true" model="hls.HLS109.hls_default_parameter" rootPath="hls_default_parameter_path"/>
        <a:model-query defaultWhereClause="fc.company_id=${/session/@company_id}" fetchAll="true"
                       model="fnd.fnd_companies" rootPath="default_company_path"/>
        <a:model-query autoCount="false" fetchAll="true" model="gld.FND5800.gld_period_status_fieldset"
                       rootPath="fieldset"/>
liyuan.chen's avatar
liyuan.chen committed
16
        <a:model-query autoCount="false" model="hls.HLS801.sys_role_flag" rootPath="sys_role_path"/>
Spencer Chang's avatar
Spencer Chang committed
17 18
    </a:init-procedure>
    <a:view>
Darming's avatar
Darming committed
19 20 21 22 23 24
        <a:link id="con_finance_income_link"
                url="${/request/@context_path}/modules/cont/CON901/con_finance_income.lview"/>
        <!--   <a:link id="tre_accrued_interest_link" url="${/request/@context_path}/modules/hls/HLS801/tre_accrued_interest.lview"/>
        <a:link id="con_unearned_finance_income_link" url="${/request/@context_path}/modules/hls/HLS801/con_unearned_finance_income.lview"/> -->
        <a:link id="hls_monthly_statement_link"
                url="${/request/@context_path}/modules/hls/HLS801/hls_monthly_statement.lview"/>
Spencer Chang's avatar
Spencer Chang committed
25 26 27
        <a:link id="gld_period_pkg_init_period_link" model="db.gld_period_pkg.init_period" modelaction="update"/>
        <a:link id="gld_period_pkg_close_period_link" model="db.gld_period_pkg.close_period" modelaction="execute"/>
        <a:link id="gld_period_pkg_open_period_link" model="db.gld_period_pkg.open_period" modelaction="execute"/>
Darming's avatar
Darming committed
28 29 30 31 32
        <a:link id="formula_sheets_excel_id"
                url="${/request/@context_path}/modules/hls/HLS801/con_unearned_finance_income_excel_sheets.lsc"/>
        <a:link id="insert_tre_accrued_interest_link" model="hls.HLS801.insert_tre_accrued_interest"
                modelaction="execute"/>
        <a:link id="insert_con_finance_income_link" model="hls.HLS801.con_finance_income" modelaction="update"/>
Spencer Chang's avatar
Spencer Chang committed
33 34 35
        <a:link id="period_month_close_link" model="hls.HLS801.period_month_close" modelaction="execute"/>
        <a:link id="tre_interest_confirm_link" model="hls.HLS801.tre_interest_confirm" modelaction="execute"/>
        <a:link id="main_link" url="${/request/@context_path}/welcome.lview"/>
liyuan.chen's avatar
liyuan.chen committed
36
        <a:link id="user_main_link" url="${/request/@context_path}/user_role_home_page.lview"/>
liyuan.chen's avatar
liyuan.chen committed
37
        <a:link id="csh_current_period_link" model="hls.HLS801.csh_current_period_query" modelaction="update"/>
38
        <a:link id="csh_check_acr_link" model="hls.HLS801.csh_current_period_query" modelaction="execute"/>
niminmin's avatar
niminmin committed
39 40 41 42
        <a:link id="hls_tax_confirm_link" model="hls.HLS801.hls_tax_act_confirm" modelaction="update"/>
        <a:link id="hls_tax_refresh_link" model="hls.HLS801.hls_tax_act_confirm" modelaction="execute"/>
        <a:link id="hls_tax_confirm_create_je_link"
                url="${/request/@context_path}/modules/hls/HLS801/tax_confirm.lsc"/>
43
        <script><![CDATA[
Darming's avatar
Darming committed
44 45 46 47
        //HLS801.NEXT_STEP
        var step = 0;
        var g_company_id;
        var g_company_id_2;
niminmin's avatar
niminmin committed
48 49

        var first_flag = 'Y';
liyuan.chen's avatar
liyuan.chen committed
50
        //alert('${/model/sys_role_path/record/@role_code}');
Darming's avatar
Darming committed
51

liyuan.chen's avatar
liyuan.chen committed
52
        $L.onReady(function () {
53
            if ('${/model/sys_role_path/record/@role_code}' == 'N') {
liyuan.chen's avatar
liyuan.chen committed
54
                var win = $L.showInfoMessage('${l:PROMPT}', '您暂无权限查看!');
55
                win.on('close', function () {
liyuan.chen's avatar
liyuan.chen committed
56 57 58 59
                    history.back();
                });
            }
        });
60

Darming's avatar
Darming committed
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
        function nextStep() {
            var stepTabPanel = $('step');
            step = step + 1;
            stepTabPanel.setEnabled(step);
            stepTabPanel.selectTab(step);
            stepTabPanel.setDisabled(step - 1);
        }

        //HLS801.LAST_STEP

        function upStep() {
            var stepTabPanel = $('step');

            step = step - 1;
            stepTabPanel.setEnabled(step);
            stepTabPanel.selectTab(step);
            stepTabPanel.setDisabled(step + 1);

        }

        //取消

        function cancelFun() {
            //history.go(-1);
            window.location.href = $('main_link').getUrl();
        }

        function backFun() {
            Leaf.showConfirm('${l:HLS.PROMPT}', '确定返回?', function okFun() {
                window.location.href = $('hls_monthly_statement_link').getUrl();
            }, function canFun() {
            });
        }

        function step_0NextStep() {
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);
            var period_name = typeof (record.get('period_name')) == 'undefined' ? 0 : record.get('period_name');
Darming's avatar
Darming committed
99 100 101
            var calc_end_date = typeof (record.get('calc_end_date')) == 'undefined' ? 0 : record.get('calc_end_date');
            if (period_name == 0 || period_name == '' || calc_end_date == 0 || calc_end_date == '') {
                Leaf.showMessage('${l:HLS.PROMPT}', '请确认期间以及截止日!');
Darming's avatar
Darming committed
102
            } else {
niminmin's avatar
niminmin committed
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
                Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
                Leaf.request({
                    url: $('hls_tax_confirm_link').getUrl(),
                    para: {
                        internal_period_num: record.get('internal_period_num'),
                        first_flag: first_flag,
                        period_name: record.get('period_name'),
                        calc_end_date: record.get('calc_end_date')
                    },
                    success: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                        first_flag = 'N';
                        $('hl_sales_tax_act_ds').setQueryParameter('period_name', record.get('period_name'));
                        $('hl_sales_tax_act_ds').query();
                        nextStep();

                    },
                    failure: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    error: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });

Darming's avatar
Darming committed
129

Spencer Chang's avatar
Spencer Chang committed
130
            }
Darming's avatar
Darming committed
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
        }

        function step_1NextStep() {
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);
            var period_name = record.get('period_name');
            var calc_end_date = record.get('calc_end_date');

            $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
            $('unearned_finance_income_ds').query();
            nextStep();
            /* year = period_name.substring(0, 4);
             month = period_name.substring(5, 7);
             var query_ds = $('unearned_finance_income_query_ds');
             var qrecord = query_ds.getAt(0);
             qrecord.set('year',year);
             qrecord.set('month',month);
             $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
             $('unearned_finance_income_ds').query(); */

        }

        function step_2NextStep() {
            nextStep();
        }

        function hls202_link_con901_fun() {
            // window.location.href = $('con_finance_income_link').getUrl();
            new Leaf.Window({
                id: 'con_finance_income_window',
                url: $('con_finance_income_link').getUrl(),
                params: {
                    winId: 'con_finance_income_window'
                },
                title: '',
                fullScreen: true
            });
        }


        function accrued_interest_query() {
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);
            $('tre_accrued_interest_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
            $('tre_accrued_interest_ds').query();

        }

        function do_accrued_interest_excel() {
            var url;
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);
            if (Ext.isEmpty(g_company_id)) {
                url = $('formula_sheets_excel_id').getUrl() + '?internal_period_num=' + record.get('internal_period_num') + '&period_name=' + record.get('period_name') + '&datasoure_type=accrued_interest';
            } else {
                url = $('formula_sheets_excel_id').getUrl() + '?company_id=' + g_company_id + '&internal_period_num=' + record.get('internal_period_num') + '&period_name=' + record.get('period_name') + '&datasoure_type=accrued_interest';
187
            }
Darming's avatar
Darming committed
188 189 190 191 192 193
            window.open(url);
        }

        function accrued_interest_Onupdate(ds, record, name, value, oldVlaue) {
            if (name == 'company_id') {
                g_company_id = value;
194
            }
Darming's avatar
Darming committed
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214


        }

        function unearned_finance_income_query() {
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);
            $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
            $('unearned_finance_income_ds').query();

        }

        function do_unearned_finance_income_excel() {
            var url;
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);
            if (Ext.isEmpty(g_company_id_2)) {
                url = $('formula_sheets_excel_id').getUrl() + '?internal_period_num=' + record.get('internal_period_num') + '&period_name=' + record.get('period_name') + '&datasoure_type=unearned_finance_income';
            } else {
                url = $('formula_sheets_excel_id').getUrl() + '?company_id=' + g_company_id_2 + '&internal_period_num=' + record.get('internal_period_num') + '&period_name=' + record.get('period_name') + '&datasoure_type=unearned_finance_income';
Spencer Chang's avatar
Spencer Chang committed
215
            }
Darming's avatar
Darming committed
216 217 218 219 220 221
            window.open(url);
        }

        function unearned_finance_income_Onupdate(ds, record, name, value, oldVlaue) {
            if (name == 'company_id') {
                g_company_id_2 = value;
Spencer Chang's avatar
Spencer Chang committed
222
            }
Darming's avatar
Darming committed
223 224 225 226 227 228 229 230 231 232
        }

        function monthly_statement_Onupdate(ds, record, name, value, oldVlaue) {
            if (name == 'period_name') {
                year = value.substring(0, 4);
                month = value.substring(5, 7);
                var query_ds = $('accrued_interest_query_ds');
                var qrecord = query_ds.getAt(0);
                var query_ds_1 = $('unearned_finance_income_query_ds');
                var qrecord_1 = query_ds_1.getAt(0);
liyuan.chen's avatar
liyuan.chen committed
233 234 235

                record.set('calc_end_date', '');

Darming's avatar
Darming committed
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
                qrecord.set('year', year);
                qrecord.set('month', month);
                qrecord_1.set('year', year);
                qrecord_1.set('month', month);
                $('tre_accrued_interest_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
                $('tre_accrued_interest_ds').query();
                $('unearned_finance_income_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
                $('unearned_finance_income_ds').query();
                $('close_open_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
                $('close_open_ds').setQueryParameter('period_set_code', '${/model/fieldset/record/@period_set_code}');
                $('close_open_ds').query();
                record.getField('calc_end_date').setLovPara('internal_period_num', record.get('internal_period_num'));
            } else if (name == 'calc_end_date') {
                // day = value.substring(8, 10);
                // var quer_ds_1 = $('unearned_finance_income_query_ds');
                // var qrec_1 = quer_ds_1.getAt(0);
                // qrec_1.set('day', day);
253
                // qrec_1.set('calc_end_date', value);
Darming's avatar
Darming committed
254 255
                $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
                $('unearned_finance_income_ds').query();
Spencer Chang's avatar
Spencer Chang committed
256
            }
Darming's avatar
Darming committed
257 258 259 260 261 262 263 264 265 266 267 268
        }


        function openPeriodDs(value, record, name) {

            var period_status_code = record.get('period_status_code');
            var ds = "close_open_ds";
            if (period_status_code == 'C' || period_status_code == 'U') {
                var url = $('gld_period_pkg_open_period_link').getUrl();
                return '<a href="javascript:executeOpen(\'' + ds + '\',\'' + url + '\',' + record.id + ')">${l:OPEN_PERIOD}</a>';
            } else if (period_status_code == 'O') {
                return '';
Spencer Chang's avatar
Spencer Chang committed
269
            }
Darming's avatar
Darming committed
270 271 272 273 274 275 276 277 278 279
        }

        function closePeriodDs(value, record, name) {
            var period_status_code = record.get('period_status_code');
            var ds = "close_open_ds";
            if (period_status_code == 'C' || period_status_code == 'U') {
                return '';
            } else if (period_status_code == 'O') {
                var url = $('gld_period_pkg_close_period_link').getUrl();
                return '<a href="javascript:executeClose(\'' + ds + '\',\'' + url + '\',' + record.id + ')">${l:CLOSE_PERIOD}</a>';
280
            }
Darming's avatar
Darming committed
281 282 283 284 285 286 287 288 289 290 291
        }


        function statusRenderer(value, record, name) {

            if (value == null || value == undefined) {
                return '${l:PROMPT.NOT_OPEN}';
            } else if (value == 'O') {
                return '${l:PROMPT.OPENED}';
            } else if (value == 'C') {
                return '${l:PROMPT.CLOSED}';
292
            }
Darming's avatar
Darming committed
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
        }

        function executeOpen(ds, url, id) {
            record = $(ds).findById(id);
            Leaf.request({
                url: url,
                para: record.data,
                success: function () {

                    record.set('period_status_code', 'O');
                    Leaf.SideBar.enable = true;
                    Leaf.SideBar.show({
                        msg: '打开成功',
                        duration: 3000
                    });

                },
                scope: this
            });
        }

        function executeClose(ds, url, id) {
            record = $(ds).findById(id);
            if ($('close_open_ds').getAll().length == 0) {
                Leaf.request({
                    url: $('gld_period_pkg_init_period_link').getUrl(),
                    para: record.data,
                    success: function () {
                        Leaf.showMessage('${l:PROMPT}', '${l:FND_DIMENSION_VALUES.OPR_SUC}', function (cmp) {
                            document.location.reload();
                            cmp.close();
                        });
                    },
                    scope: this
                });
            } else {
Spencer Chang's avatar
Spencer Chang committed
329 330 331
                Leaf.request({
                    url: url,
                    para: record.data,
Darming's avatar
Darming committed
332 333 334 335
                    success: function () {

                        record.set('period_status_code', 'C');

Spencer Chang's avatar
Spencer Chang committed
336 337
                        Leaf.SideBar.enable = true;
                        Leaf.SideBar.show({
Darming's avatar
Darming committed
338
                            msg: '关闭成功',
Spencer Chang's avatar
Spencer Chang committed
339 340
                            duration: 3000
                        });
Darming's avatar
Darming committed
341

Spencer Chang's avatar
Spencer Chang committed
342 343 344 345
                    },
                    scope: this
                });
            }
Darming's avatar
Darming committed
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
        }

        function unearned_finance_income_clear() {
            $('unearned_finance_income_grid').clear();
        }

        function accrued_interest_clear() {
            $('tre_accrued_interest_grid').clear();
        }

        var g_return_value_1;

        function accrued_interest_calculate() {
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);
            year = record.get('period_name').substring(0, 4);
            month = record.get('period_name').substring(5, 7);
            Leaf.showConfirm('${l:HLS.PROMPT}', year + '年' + month + '月' + '结算,确认计算计提利息?', function okFun() {
                Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
                Leaf.request({
                    url: $('insert_tre_accrued_interest_link').getUrl(),
                    para: {
                        internal_period_num: record.get('internal_period_num')
                    },
liyuan.chen's avatar
liyuan.chen committed
370
                    success: function (args) {
Darming's avatar
Darming committed
371 372 373 374 375 376 377 378
                        var result = args.result;
                        if (!result) {
                            Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
                            return;
                        }
                        g_return_value_1 = result.return_value_1;
                        if (g_return_value_1 != 'SUCCESS') {
                            Leaf.showWarningMessage('', '计提利息计算出错!', null, 200, 100);
Spencer Chang's avatar
Spencer Chang committed
379
                            Leaf.Masker.unmask(Ext.getBody());
Darming's avatar
Darming committed
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
                            return;
                        }
                        Leaf.Masker.unmask(Ext.getBody());
                        $('tre_accrued_interest_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
                        $('tre_accrued_interest_ds').query();

                    },
                    failure: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    error: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });
            }, Leaf.Masker.unmask(Ext.getBody()));
        }

        var g_return_value;

        function unearned_finance_income_confirm() {
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);

            //add by wdd 20180514
405 406 407 408 409 410 411 412 413 414 415 416 417
            // var income_ds = $('unearned_finance_income_ds');
            // var income_record = income_ds.getAll();
            // if (income_record.length) {
            //     for (var i = 0; i < income_record.length; i++) {
            //         var line_income_record = income_record[i];
            //         var finance_income_recognized = line_income_record.get('finance_income_recognized');
            //         if (finance_income_recognized == 'Y') {
            //             Leaf.showMessage('提示', '该日收入已确认,请勿重复确认!', null, 250, 100);
            //             return;
            //         }
            //
            //     }
            // }
Darming's avatar
Darming committed
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461
            //end by wdd
            year = record.get('period_name').substring(0, 4);
            month = record.get('period_name').substring(5, 7);
            day = record.get('calc_end_date').substring(8, 10);
            Leaf.showConfirm('${l:HLS.PROMPT}', year + '年' + month + '月' + day + '日' + '结算,确定执行收入确认?', function okFun() {
                Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
                Leaf.request({
                    url: $('insert_con_finance_income_link').getUrl(),
                    para: {
                        internal_period_num: record.get('internal_period_num'),
                        calc_end_date: record.get('calc_end_date')
                    },
                    success: function (args) {
                        // modify by wdd 20180514
                        // 收入确认出错校验移至PKG
                        // var result = args.result;
                        // if (!result) {
                        // Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
                        // return;
                        // }
                        // g_return_value = result.return_value;
                        // if (g_return_value != 'SUCCESS') {
                        // Leaf.showWarningMessage('', '收入确认出错!', null, 200, 100);
                        // Leaf.Masker.unmask(Ext.getBody());
                        // return;
                        // }
                        //end by wdd
                        Leaf.Masker.unmask(Ext.getBody());
                        $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
                        $('unearned_finance_income_ds').query();

                    },
                    failure: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    error: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });
            }, Leaf.Masker.unmask(Ext.getBody()));
        }

        function monthlyendFun() {
liyuan.chen's avatar
liyuan.chen committed
462 463 464 465 466 467
            /*
             @Added: Liyuan.Chen
             @Date: 2020/5/20
             @Description: 月结结束校验
             @Param:
             */
Darming's avatar
Darming committed
468 469
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);
liyuan.chen's avatar
liyuan.chen committed
470
            var role_flag = '${/model/sys_role_path/record/@role_code}';
Darming's avatar
Darming committed
471 472
            Leaf.showConfirm('${l:HLS.PROMPT}', '本次月结结束后不可执行当月其他相关操作,是否确认结束?', function okFun() {
                Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
liyuan.chen's avatar
liyuan.chen committed
473 474
                $L.request({
                    url: $('csh_current_period_link').getUrl(),
Darming's avatar
Darming committed
475
                    para: {
476 477
                        csh_date: record.get('period_name'),
                        role_flag: role_flag
Darming's avatar
Darming committed
478
                    },
479
                    success: function (args) {
liyuan.chen's avatar
liyuan.chen committed
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498
                        Leaf.request({
                            url: $('period_month_close_link').getUrl(),
                            para: {
                                internal_period_num: record.get('internal_period_num'),
                                calc_end_date: record.get('calc_end_date')
                            },
                            success: function (args) {
                                var result = args.result;
                                if (!result) {
                                    Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
                                    return;
                                }
                                var period_return_value = result.period_return_value;
                                if (period_return_value != 'SUCCESS') {
                                    Leaf.showWarningMessage('', '月结结束出错!', null, 200, 100);
                                    Leaf.Masker.unmask(Ext.getBody());
                                    return;
                                }
                                Leaf.Masker.unmask(Ext.getBody());
Darming's avatar
Darming committed
499

liyuan.chen's avatar
liyuan.chen committed
500 501 502 503 504 505 506 507 508
                            },
                            failure: function () {
                                Leaf.Masker.unmask(Ext.getBody());
                            },
                            error: function () {
                                Leaf.Masker.unmask(Ext.getBody());
                            },
                            scope: this
                        });
Darming's avatar
Darming committed
509
                    },
510
                    failure: function () {
liyuan.chen's avatar
liyuan.chen committed
511
                        $L.Masker.unmask(Ext.getBody());
Darming's avatar
Darming committed
512
                    },
513
                    error: function () {
liyuan.chen's avatar
liyuan.chen committed
514
                        $L.Masker.unmask(Ext.getBody());
Darming's avatar
Darming committed
515 516 517
                    },
                    scope: this
                });
liyuan.chen's avatar
liyuan.chen committed
518

Darming's avatar
Darming committed
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534
            }, Leaf.Masker.unmask(Ext.getBody()));
        }

        function accrued_interest_confirm() {
            var headers_ds = $('hls_monthly_statement_ds');
            var record = headers_ds.getAt(0);
            year = record.get('period_name').substring(0, 4);
            month = record.get('period_name').substring(5, 7);
            Leaf.showConfirm('${l:HLS.PROMPT}', year + '年' + month + '月' + '结算,确认计提利息?', function okFun() {
                Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
                Leaf.request({
                    url: $('tre_interest_confirm_link').getUrl(),
                    para: {
                        internal_period_num: record.get('internal_period_num'),
                        calc_end_date: record.get('calc_end_date')
                    },
liyuan.chen's avatar
liyuan.chen committed
535
                    success: function (args) {
Darming's avatar
Darming committed
536 537 538 539 540 541 542 543
                        var result = args.result;
                        if (!result) {
                            Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
                            return;
                        }
                        var confirm_return_value = result.confirm_return_value;
                        if (confirm_return_value != 'SUCCESS') {
                            Leaf.showWarningMessage('', '计提利息确认出错!', null, 200, 100);
544
                            Leaf.Masker.unmask(Ext.getBody());
Darming's avatar
Darming committed
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564
                            return;
                        }
                        Leaf.Masker.unmask(Ext.getBody());

                    },
                    failure: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    error: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });
            }, Leaf.Masker.unmask(Ext.getBody()));

        }

        function ratePercentRender(value, record, name) {
            if (!Ext.isEmpty(value)) {
                return parseFloat(mul(value, 100)) + '%';
565
            }
Darming's avatar
Darming committed
566 567
        }

liyuan.chen's avatar
liyuan.chen committed
568
        function csh_onload(ds) {
569
            if ('${/model/sys_role_path/record/@role_code}' == 'NO') {
liyuan.chen's avatar
liyuan.chen committed
570 571
                var records = $(ds.id).getAll();
                records.forEach(function (v, i) {
572
                    if (v.get('csh_confirm_flag') == 'Y') {
liyuan.chen's avatar
liyuan.chen committed
573 574 575 576 577 578 579
                        v.getField('ref_v04').setReadOnly(true);
                    }
                });
            }
        }

        function csh_transaction_confirm() {
580
            //gzj 111
liyuan.chen's avatar
liyuan.chen committed
581 582
            var role_flag = '${/model/sys_role_path/record/@role_code}';
            var record = $('csh_transaction_confirm_ds').getSelected()[0];
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611
            //校验是否还有未审核的保证金划转
            var trans_review_count;

            $L.request({
                url: '${/request/@context_path}/autocrud/csh.CSH531.get_trans_review_status/query',
                para: {
                    csh_date: record.get('csh_date')
                },
                sync: true,
                success: function (res) {
                    trans_review_count=res.result.record.trans_review_number;
                },
                error: function () {

                },
                failure: function () {

                },
                scope: this,
                sync: true,
            });

            if( trans_review_count >0){
                $L.showMessage('提示','有复核中的保证金,请完成复核后,再进行会计关账');
                return ;
            }



612 613 614
            if (role_flag == 'NO') {
                if (record.get('csh_confirm_flag') == 'Y') {
                    $L.showMessage('提示', '该月收款已确认,无需再次确认');
liyuan.chen's avatar
liyuan.chen committed
615 616
                    return;
                }
617

618
                $L.showConfirm('提示', '是否进行月结确认?', function () {
liyuan.chen's avatar
liyuan.chen committed
619 620 621 622
                    $L.Masker.mask(Ext.getBody(), '正在确认......');
                    $L.request({
                        url: $('csh_current_period_link').getUrl(),
                        para: {
623 624 625
                            ref_v04: record.get('ref_v04'),
                            csh_date: record.get('csh_date'),
                            role_flag: role_flag
liyuan.chen's avatar
liyuan.chen committed
626
                        },
627

628
                        success: function (args) {
liyuan.chen's avatar
liyuan.chen committed
629
                            $L.Masker.unmask(Ext.getBody());
630
                            if (args.result.p_err_msg) {
niminmin's avatar
niminmin committed
631
                                $L.showErrorMessage("提示", args.result.p_err_msg, null, 800, 300);
632 633 634 635 636 637 638 639 640
                            } else {
                                $L.SideBar.show({
                                    msg: '已确认',
                                    duration: 2000
                                });
                                $('csh_transaction_confirm_ds').query();

                            }

liyuan.chen's avatar
liyuan.chen committed
641
                        },
642
                        failure: function () {
liyuan.chen's avatar
liyuan.chen committed
643 644
                            $L.Masker.unmask(Ext.getBody());
                        },
645
                        error: function () {
liyuan.chen's avatar
liyuan.chen committed
646 647
                            $L.Masker.unmask(Ext.getBody());
                        },
648 649
                        scope: this,
                        sync: true,
liyuan.chen's avatar
liyuan.chen committed
650 651 652 653
                    });
                });
            }

654
            if (role_flag == 'YES') {
chenzhuo's avatar
chenzhuo committed
655
                /*if (record.get('csh_confirm_flag') == 'N') {
656
                    $L.showMessage('提示', '请先进行营业确认');
liyuan.chen's avatar
liyuan.chen committed
657
                    return;
chenzhuo's avatar
chenzhuo committed
658
                }*/
659 660 661 662 663 664 665 666
                $L.Masker.mask(Ext.getBody(), '正在执行......');
                $L.request({
                    url: $('csh_check_acr_link').getUrl(),
                    para: {},
                    success: function (args) {
                        $L.Masker.unmask(Ext.getBody());
                        if (args.result.p_err_msg) {
                            $L.Masker.unmask(Ext.getBody());
niminmin's avatar
niminmin committed
667 668 669 670 671

                            $L.showConfirm('提示', args.result.p_err_msg, function () {
                                set_value_for_next_step(record.get('csh_date'));
                            });
                            //$L.showErrorMessage("提示", args.result.p_err_msg, null, 800, 400);
672 673 674 675 676 677 678 679 680 681 682 683 684 685

                        } else {
                            set_value_for_next_step(record.get('csh_date'));
                        }

                    },
                    failure: function () {
                        $L.Masker.unmask(Ext.getBody());
                    },
                    error: function () {
                        $L.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });
liyuan.chen's avatar
liyuan.chen committed
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716
                /*$L.showConfirm('提示', '是否确认下一步?', function() {
                    $L.Masker.mask(Ext.getBody(), '正在执行......');
                    $L.request({
                        url: $('csh_current_period_link').getUrl(),
                        para: {
                            ref_v04 : record.get('ref_v04'),
                            csh_date : record.get('csh_date'),
                            role_flag : role_flag
                        },
                        success: function(args) {
                            $L.SideBar.show({
                                msg: '操作成功',
                                duration: 2000
                            });
                            $L.Masker.unmask(Ext.getBody());
                            set_value_for_next_step(record.get('csh_date'));
                        },
                        failure: function() {
                            $L.Masker.unmask(Ext.getBody());
                        },
                        error: function() {
                            $L.Masker.unmask(Ext.getBody());
                        },
                        scope: this
                    });
                });*/
            }

        }

        function set_value_for_next_step(value) {
niminmin's avatar
niminmin committed
717 718 719
            var internal_period_num = (value.substr(0, 4) + value.substr(5, 2)) * 1;
            var year = value.substring(0, 4);
            var month = value.substring(5, 7);
liyuan.chen's avatar
liyuan.chen committed
720
            var record = $('hls_monthly_statement_ds').getAt(0);
niminmin's avatar
niminmin committed
721
            record.set('internal_period_num', internal_period_num);
liyuan.chen's avatar
liyuan.chen committed
722
            record.set('period_name', value);
niminmin's avatar
niminmin committed
723 724
            var lastDay = new Date(year, month, 0);
            record.set('calc_end_date', Leaf.formatDate(lastDay));
liyuan.chen's avatar
liyuan.chen committed
725 726
            nextStep();
        }
727

niminmin's avatar
niminmin committed
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811
        function hl_sales_tax_act_refresh() {
            var record = $('hls_monthly_statement_ds').getAt(0);
            Leaf.Masker.mask(Ext.getBody(), '正在刷新...');
            Leaf.request({
                url: $('hls_tax_refresh_link').getUrl(),
                para: {
                    period_name: record.get('period_name'),
                    calc_end_date: record.get('calc_end_date')
                },
                success: function () {
                    Leaf.Masker.unmask(Ext.getBody());
                    Leaf.SideBar.enable = true;
                    Leaf.SideBar.show({
                        msg: '刷新成功',
                        duration: 3000
                    });
                    $('hl_sales_tax_act_ds').setQueryParameter('period_name', record.get('period_name'));
                    $('hl_sales_tax_act_ds').query();
                },
                failure: function () {
                    Leaf.Masker.unmask(Ext.getBody());
                },
                error: function () {
                    Leaf.Masker.unmask(Ext.getBody());
                },
                scope: this
            });
        }

        function tax_confirm_beforeremove(ds, records) {
            for (var i = 0; i < records.length; i++) {
                if (records[i].get('tax_create_je_flag') == 'Y') {
                    Leaf.showMessage('${l:HLS.PROMPT}', '本该期间内增值税已确认,不能删除!');
                    return false;
                }
            }
        }

        function tax_confirm() {
            debugger;
            var records = $('hl_sales_tax_act_ds').getAll();
            var calc_end_date = $('hls_monthly_statement_ds').getAt(0).get('calc_end_date');
            var period_name = $('hls_monthly_statement_ds').getAt(0).get('period_name');
            var param = {};
            var saveData = [];
            for (i = 0; i < records.length; i++) {
                var record = records[i];
                if (record.get('tax_create_je_flag') == 'Y') {
                    Leaf.showMessage('${l:HLS.PROMPT}', '该期间内增值税已确认!');
                    return false;
                }
                record.set('_status', 'update');
                saveData.push(record.data);
            }
            param['details'] = saveData;
            param['calc_end_date']=calc_end_date;
            param['period_name']=period_name;
            $L.showConfirm('提示', '是否进行增值税确认?', function () {
                Leaf.Masker.mask(Ext.getBody(), '正在进行增值税确认...');
                Leaf.request({
                    url: $('hls_tax_confirm_create_je_link').getUrl(),
                    para: param,
                    success: function (args) {
                        Leaf.SideBar.enable = true;
                        Leaf.SideBar.show({
                            msg: '操作成功',
                            duration: 3000
                        });
                        Leaf.Masker.unmask(Ext.getBody());
                        $('hl_sales_tax_act_ds').setQueryParameter('period_name', record.get('period_name'));
                        $('hl_sales_tax_act_ds').query();
                    },
                    failure: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    error: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });
            });
        }


Spencer Chang's avatar
Spencer Chang committed
812 813
        ]]></script>
        <a:dataSets>
Darming's avatar
Darming committed
814
            <a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
815 816
            <a:dataSet id="csh_transaction_confirm_ds" selectable="true" selectionModel="single" autoQuery="true"
                       fetchAll="true" model="hls.HLS801.csh_current_period_query"
liyuan.chen's avatar
liyuan.chen committed
817 818 819 820 821 822 823 824 825 826 827 828 829
                       queryUrl="${/request/@context_path}/autocrud/hls.HLS801.csh_current_period_query/query">
                <a:fields>
                    <a:field name="csh_date" readOnly="true"/>
                    <a:field name="csh_count" readOnly="true"/>
                    <a:field name="csh_not" readOnly="true"/>
                    <a:field name="csh_partial" readOnly="true"/>
                    <a:field name="ref_v04"/>
                    <a:field name="csh_confirm_flag" readOnly="true" checkedValue="Y" uncheckedValue="N"/>
                </a:fields>
                <a:events>
                    <a:event name="load" handler="csh_onload"/>
                </a:events>
            </a:dataSet>
Spencer Chang's avatar
Spencer Chang committed
830 831
            <a:dataSet id="hls_monthly_statement_ds" autoCreate="true">
                <a:fields>
Darming's avatar
Darming committed
832 833
                    <a:field name="period_name" lovGridHeight="300" lovHeight="500"
                             lovService="gld.gld_period_lov?monthly_closed_flag=N&amp;period_status_code=O"
liyuan.chen's avatar
liyuan.chen committed
834
                             lovWidth="500" required="true" title="GLD_PERIODS.PERIOD_NAME" readOnly="true">
Spencer Chang's avatar
Spencer Chang committed
835 836 837 838 839
                        <a:mapping>
                            <a:map from="internal_period_num" to="internal_period_num"/>
                            <a:map from="period_name" to="period_name"/>
                        </a:mapping>
                    </a:field>
Darming's avatar
Darming committed
840 841
                    <a:field name="internal_period_num"/>
                    <a:field name="calc_end_date" lovGridHeight="300" lovHeight="500"
niminmin's avatar
niminmin committed
842 843
                             lovService="hls.HLS801.calc_end_date_ds" lovWidth="500" required="true" title="截止日查询"
                             readOnly="true">
Darming's avatar
Darming committed
844 845 846 847 848
                        <a:mapping>
                            <!--   <a:map from="internal_period_num" to="internal_period_num"/> -->
                            <a:map from="calc_end_date" to="calc_end_date"/>
                        </a:mapping>
                    </a:field>
Spencer Chang's avatar
Spencer Chang committed
849 850 851 852 853 854 855
                </a:fields>
                <a:events>
                    <a:event name="update" handler="monthly_statement_Onupdate"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="accrued_interest_query_ds" autoCreate="true">
                <a:fields>
Darming's avatar
Darming committed
856 857
                    <a:field name="company_code" lovGridHeight="300" lovHeight="450"
                             lovService="hls.HLS801.fnd_companies_for_lov" lovWidth="500" title="">
Spencer Chang's avatar
Spencer Chang committed
858 859 860 861 862 863 864 865 866 867 868 869 870 871
                        <a:mapping>
                            <a:map from="company_id" to="company_id"/>
                            <a:map from="company_code" to="company_code"/>
                            <a:map from="company_short_name" to="company_short_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="year" defaultValue="${/parameter/@year}"/>
                    <a:field name="month" defaultValue="${/parameter/@month}"/>
                    <a:field name="internal_period_num" defaultValue="${/parameter/@internal_period_num}"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="accrued_interest_Onupdate"/>
                </a:events>
            </a:dataSet>
Darming's avatar
Darming committed
872 873 874
            <a:dataSet id="tre_accrued_interest_ds" autoPageSize="true" autoQuery="false"
                       model="hls.HLS801.tre_accrued_interest" queryDataSet="accrued_interest_query_ds"
                       selectable="true">
Spencer Chang's avatar
Spencer Chang committed
875
                <a:fields>
Darming's avatar
Darming committed
876 877
                    <a:field name="recognized_flag" checkedValue="Y" defaultValue="Y" readOnly="true"
                             uncheckedValue="N"/>
Spencer Chang's avatar
Spencer Chang committed
878 879 880 881
                </a:fields>
            </a:dataSet>
            <a:dataSet id="unearned_finance_income_query_ds" autoCreate="true">
                <a:fields>
Darming's avatar
Darming committed
882 883
                    <a:field name="company_code" lovGridHeight="300" lovHeight="450"
                             lovService="hls.HLS801.fnd_companies_for_lov" lovWidth="500" title="">
Spencer Chang's avatar
Spencer Chang committed
884 885 886 887 888 889 890 891 892
                        <a:mapping>
                            <a:map from="company_id" to="company_id"/>
                            <a:map from="company_code" to="company_code"/>
                            <a:map from="company_short_name" to="company_short_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="year" defaultValue="${/parameter/@year}"/>
                    <a:field name="month" defaultValue="${/parameter/@month}"/>
                    <a:field name="internal_period_num" defaultValue="${/parameter/@internal_period_num}"/>
Darming's avatar
Darming committed
893 894 895
                    <a:field name="calc_end_date" defaultValue="${/parameter/@calc_end_date}"/>
                    <a:field name="finance_income_recognized" displayField="code_value_name" options="yes_no_ds"
                             returnField="finance_income_recognized" valueField="code_value"/>
Spencer Chang's avatar
Spencer Chang committed
896 897 898 899 900
                </a:fields>
                <a:events>
                    <a:event name="update" handler="unearned_finance_income_Onupdate"/>
                </a:events>
            </a:dataSet>
Darming's avatar
Darming committed
901 902 903
            <a:dataSet id="unearned_finance_income_ds" autoPageSize="true" autoQuery="false"
                       model="hls.HLS801.con_unearned_finance_income" queryDataSet="unearned_finance_income_query_ds"
                       selectable="true">
Spencer Chang's avatar
Spencer Chang committed
904
                <a:fields>
Darming's avatar
Darming committed
905 906
                    <a:field name="finance_income_recognized" checkedValue="Y" defaultValue="Y" readOnly="true"
                             uncheckedValue="N"/>
Spencer Chang's avatar
Spencer Chang committed
907 908
                </a:fields>
            </a:dataSet>
Darming's avatar
Darming committed
909 910
            <a:dataSet id="close_open_ds" autoQuery="false" fetchAll="true" model="hls.HLS801.hls_current_period_query"
                       queryUrl="${/request/@context_path}/autocrud/hls.HLS801.hls_current_period_query/query">
Spencer Chang's avatar
Spencer Chang committed
911
            </a:dataSet>
niminmin's avatar
niminmin committed
912 913 914 915 916 917 918 919
            <a:dataSet id="hl_sales_tax_act_ds" autoQuery="true" fetchAll="true"
                       model="hls.HLS801.hls_tax_act_confirm"
                       queryUrl="${/request/@context_path}/autocrud/hls.HLS801.hls_tax_act_confirm/query"
                       selectable="true" selectionModel="multiple">
                <a:events>
                    <a:event name="beforeremove" handler="tax_confirm_beforeremove"/>
                </a:events>
            </a:dataSet>
Spencer Chang's avatar
Spencer Chang committed
920 921 922 923 924
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
            </a:screenTopToolbar>
liyuan.chen's avatar
liyuan.chen committed
925 926 927 928 929 930
            <!--——————————————————————美丽的分割线————————————————————————-->
            <a:switch test="/model/sys_role_path/record/@role_code">
                <a:case value="NO">
                    <a:hBox>
                        <a:tabPanel id="step" marginHeight="80" marginWidth="50">
                            <a:tabs>
931 932
                                <a:tab id="step_0" disabled="false" marginHeight="20" width="100" prompt="营业月结"
                                       selected="true">
liyuan.chen's avatar
liyuan.chen committed
933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948
                                    <a:hBox height="50">
                                        <!--<a:button click="upStep" text="HLS801.LAST_STEP"/>-->
                                        <!--<a:label width="5"/>
                                        <a:button click="nextStep" text="HLS801.NEXT_STEP"/>-->
                                        <a:label width="5"/>
                                        <a:button click="csh_transaction_confirm" text="月结确认"/>
                                        <a:label width="5"/>
                                    </a:hBox>

                                    <p/>
                                    <a:grid id="csh_transaction_confirm_grid" bindTarget="csh_transaction_confirm_ds"
                                            marginHeight="200" marginWidth="80" navBar="true" style="margin-left:3px">
                                        <a:toolBar>
                                            <!--<a:button click="unearned_finance_income_query"
                                                      icon="${/request/@context_path}/images/search.png" text="HLS.QUERY"/>-->
                                            <!--                                    <a:button type="clear"/>-->
949 950
                                            <a:button icon="${/request/@context_path}/images/excel_16.png"
                                                      text="HLS.EXPORT"
liyuan.chen's avatar
liyuan.chen committed
951 952 953 954 955 956 957 958
                                                      type="excel"/>
                                        </a:toolBar>
                                        <a:columns>
                                            <a:column name="csh_date" prompt="月结日期" width="150" align="center"/>
                                            <a:column name="csh_count" prompt="收款总个数" width="120" align="center"/>
                                            <a:column name="csh_not" prompt="未核销收款数" width="120" align="center"/>
                                            <a:column name="csh_partial" prompt="部分核销收款数" width="120" align="center"/>
                                            <a:column name="ref_v04" prompt="备注" width="250" editor="csh_area_id"/>
959 960
                                            <a:column name="csh_confirm_flag" prompt="营业月结确认" width="80"
                                                      editor="csh_check_id"/>
liyuan.chen's avatar
liyuan.chen committed
961 962 963 964 965 966 967 968 969 970 971 972 973 974 975
                                        </a:columns>
                                        <a:editors>
                                            <a:textArea id="csh_area_id"/>
                                            <a:checkBox id="csh_check_id"/>
                                        </a:editors>
                                    </a:grid>
                                </a:tab>
                            </a:tabs>
                        </a:tabPanel>
                    </a:hBox>
                </a:case>
                <a:case value="YES">
                    <a:hBox>
                        <a:tabPanel id="step" marginHeight="80" marginWidth="50">
                            <a:tabs>
976 977
                                <a:tab id="step_0" disabled="false" marginHeight="20" width="100" prompt="营业月结"
                                       selected="true">
liyuan.chen's avatar
liyuan.chen committed
978 979 980 981 982 983 984 985 986 987 988 989
                                    <a:hBox height="50">
                                        <a:button disabled="true" click="upStep" text="HLS801.LAST_STEP"/>
                                        <a:label width="5"/>
                                        <a:button click="csh_transaction_confirm" text="HLS801.NEXT_STEP"/>
                                    </a:hBox>
                                    <p/>
                                    <a:grid id="csh_transaction_confirm_grid" bindTarget="csh_transaction_confirm_ds"
                                            marginHeight="200" marginWidth="80" navBar="true" style="margin-left:3px">
                                        <a:toolBar>
                                            <!--<a:button click="unearned_finance_income_query"
                                                      icon="${/request/@context_path}/images/search.png" text="HLS.QUERY"/>-->
                                            <!--                                    <a:button type="clear"/>-->
990 991
                                            <a:button icon="${/request/@context_path}/images/excel_16.png"
                                                      text="HLS.EXPORT"
liyuan.chen's avatar
liyuan.chen committed
992 993 994 995 996 997 998 999
                                                      type="excel"/>
                                        </a:toolBar>
                                        <a:columns>
                                            <a:column name="csh_date" prompt="月结日期" width="150" align="center"/>
                                            <a:column name="csh_count" prompt="收款总个数" width="120" align="center"/>
                                            <a:column name="csh_not" prompt="未核销收款数" width="120" align="center"/>
                                            <a:column name="csh_partial" prompt="部分核销收款数" width="120" align="center"/>
                                            <a:column name="ref_v04" prompt="备注" width="250" editor="csh_area_id"/>
1000 1001
                                            <a:column name="csh_confirm_flag" prompt="营业月结确认" width="80"
                                                      editor="csh_check_id"/>
liyuan.chen's avatar
liyuan.chen committed
1002 1003 1004
                                        </a:columns>
                                        <a:editors>
                                            <a:textArea id="csh_area_id" readOnly="true"/>
1005
                                            <a:checkBox id="csh_check_id"/>
liyuan.chen's avatar
liyuan.chen committed
1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020
                                        </a:editors>
                                    </a:grid>
                                </a:tab>

                                <a:tab id="step_1" disabled="true" prompt="GLD_PERIODS.PERIOD_NAME" selected="false"
                                       width="100">
                                    <a:hBox height="50">
                                        <a:button click="upStep" text="HLS801.LAST_STEP"/>
                                        <a:label width="5"/>
                                        <a:button click="step_0NextStep" text="HLS801.NEXT_STEP"/>
                                    </a:hBox>
                                    <a:hBox>
                                        <a:fieldSet height="250" title="GLD_PERIODS.PERIOD_NAME" width="300">
                                            <a:lov name="period_name" bindTarget="hls_monthly_statement_ds"
                                                   prompt="GLD_PERIODS.PERIOD_NAME" width="200"/>
1021 1022
                                            <a:lov name="calc_end_date" bindTarget="hls_monthly_statement_ds"
                                                   prompt="截止日"
liyuan.chen's avatar
liyuan.chen committed
1023 1024 1025 1026
                                                   width="200"/>
                                        </a:fieldSet>
                                    </a:hBox>
                                </a:tab>
niminmin's avatar
niminmin committed
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072
                                <a:tab id="step_2" disabled="true" marginHeight="200" prompt="提前收款确认增值税"
                                       selected="false"
                                       width="140">
                                    <a:hBox height="50">
                                        <a:button click="upStep" text="HLS801.LAST_STEP"/>
                                        <a:label width="5"/>
                                        <a:button click="nextStep" text="HLS801.NEXT_STEP"/>
                                        <a:label width="80"/>
                                        <a:button click="tax_confirm" text="增值税确认" width="95"/>
                                        <a:label width="5"/>
                                    </a:hBox>
                                    <p/>
                                    <a:grid id="hl_sales_tax_act_grid" bindTarget="hl_sales_tax_act_ds"
                                            marginHeight="195" marginWidth="80" navBar="true" style="margin-left:3px">
                                        <a:toolBar>
                                            <a:button click="hl_sales_tax_act_refresh"
                                                      icon="${/request/@context_path}/images/zjwfl/zjwfl_refresh.png"
                                                      text="刷新"/>
                                            <a:button type="delete"/>
                                            <a:button icon="${/request/@context_path}/images/excel_16.png"
                                                      text="HLS.EXPORT"
                                                      type="excel"/>
                                        </a:toolBar>
                                        <a:columns>
                                            <a:column name="contract_number" align="center" prompt="合同编号" width="150"/>
                                            <a:column name="times" prompt="期数" width="60" align="center"/>
                                            <a:column name="cf_item_n" prompt="现金流项目" align="center" width="90"/>
                                            <a:column name="due_date" align="center" prompt="应收日"
                                                      renderer="Leaf.formatDate"
                                                      width="100"/>
                                            <a:column name="due_amount" align="right" renderer="Leaf.formatMoney" prompt="应收金额" width="100"/>
                                            <a:column name="vat_due_amount" align="right" prompt="增值税金额"
                                                      width="100" renderer="Leaf.formatMoney"/>
                                            <a:column name="received_amount" align="right" prompt="已收金额"
                                                      renderer="Leaf.formatMoney" width="100"/>
                                            <a:column name="last_received_date" align="center" prompt="最后收款日"
                                                      renderer="Leaf.formatDate" width="105"/>
                                            <a:column name="full_write_off_date" align="center" prompt="核销日"
                                                      renderer="Leaf.formatDate"
                                                      width="105"/>
                                            <a:column name="tax_create_je_flag" prompt="增值税确认标志" align="center"
                                                      width="90"/>
                                        </a:columns>
                                    </a:grid>
                                </a:tab>
                                <a:tab id="step_3" disabled="true" marginHeight="20" prompt="HLS801.INCOME"
1073
                                       selected="false"
liyuan.chen's avatar
liyuan.chen committed
1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091
                                       width="100">
                                    <a:hBox height="50">
                                        <a:button click="upStep" text="HLS801.LAST_STEP"/>
                                        <a:label width="5"/>
                                        <a:button click="nextStep" text="HLS801.NEXT_STEP"/>
                                        <a:label width="80"/>
                                        <a:button click="unearned_finance_income_confirm" text="HLS801.INCOME_CONFIRM"/>
                                        <a:label width="5"/>
                                    </a:hBox>
                                    <a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE">
                                        <a:box column="2" labelWidth="150" style="margin-left:-80px">
                                            <a:textField name="year" bindTarget="unearned_finance_income_query_ds"
                                                         prompt="HLS801.YEAR" readOnly="true"/>
                                            <a:textField name="month" bindTarget="unearned_finance_income_query_ds"
                                                         prompt="HLS801.MONTH" readOnly="true"/>
                                            <!--   <a:textField name="day" bindTarget="unearned_finance_income_query_ds" prompt="日" readOnly="true"/> -->
                                            <a:lov name="company_code" bindTarget="unearned_finance_income_query_ds"
                                                   prompt="HLS.COMPANY_CODE"/>
1092 1093
                                            <a:textField name="company_short_name"
                                                         bindTarget="unearned_finance_income_query_ds"
liyuan.chen's avatar
liyuan.chen committed
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
                                                         prompt="HLS.COMPANY_NAME" readOnly="true"/>
                                            <a:comboBox name="finance_income_recognized"
                                                        bindTarget="unearned_finance_income_query_ds" prompt="是否确认"/>
                                        </a:box>
                                    </a:form>
                                    <p/>
                                    <a:grid id="unearned_finance_income_grid" bindTarget="unearned_finance_income_ds"
                                            marginHeight="300" marginWidth="80" navBar="true" style="margin-left:3px">
                                        <a:toolBar>
                                            <a:button click="unearned_finance_income_query"
1104 1105
                                                      icon="${/request/@context_path}/images/search.png"
                                                      text="HLS.QUERY"/>
liyuan.chen's avatar
liyuan.chen committed
1106
                                            <!--                                    <a:button type="clear"/>-->
1107 1108
                                            <a:button icon="${/request/@context_path}/images/excel_16.png"
                                                      text="HLS.EXPORT"
liyuan.chen's avatar
liyuan.chen committed
1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125
                                                      type="excel"/>
                                        </a:toolBar>
                                        <a:columns>
                                            <a:column name="seq" prompt="HLS801.SEQ" width="50"/>
                                            <a:column name="contract_number" prompt="合同编号" width="150"/>
                                            <a:column name="contract_name" prompt="合同名称" width="150"/>
                                            <a:column name="finance_amount" align="right" prompt="HLS.FINANCE_AMOUNT"
                                                      renderer="Leaf.formatMoney" width="110"/>
                                            <a:column name="times" prompt="期数" width="80" align="center"/>
                                            <a:column name="period" prompt="GLD_BALANCES.PERIOD_NAME" width="150"/>
                                            <a:column name="calc_end_date" align="center" prompt="截止日"
                                                      renderer="Leaf.formatDate" width="150"/>
                                            <a:column name="interest" align="right" prompt="HLS801.INTEREST"
                                                      renderer="Leaf.formatMoney" width="100"/>
                                            <a:column name="int_rate_implicit" align="right" prompt="HLS801.INT_RATE"
                                                      renderer="ratePercentRender" width="70"/>
                                            <a:column name="calc_period" prompt="HLS801.CALC_PERIOD" width="150"/>
1126 1127
                                            <a:column name="calc_date_count" prompt="HLS801.CALC_DATE_COUNT"
                                                      width="100"/>
liyuan.chen's avatar
liyuan.chen committed
1128
                                            <a:column name="vat_unearned_finance_income" align="right"
1129 1130
                                                      prompt="HLS801.VAT_UNEARNED_FINANCE_INCOME"
                                                      renderer="Leaf.formatMoney"
liyuan.chen's avatar
liyuan.chen committed
1131 1132 1133 1134 1135 1136 1137 1138 1139
                                                      width="110"/>
                                            <a:column name="adjustvat" align="right"
                                                      prompt="税改16%调整额" renderer="Leaf.formatMoney"
                                                      width="110"/>
                                            <a:column name="adjustvat13" align="right"
                                                      prompt="税改13%调整额" renderer="Leaf.formatMoney"
                                                      width="110"/>

                                            <a:column name="unearned_finance_income" align="right"
1140 1141
                                                      prompt="HLS801.UNEARNED_FINANCE_INCOME"
                                                      renderer="Leaf.formatMoney"
liyuan.chen's avatar
liyuan.chen committed
1142
                                                      width="110"/>
1143 1144
                                            <a:column name="finance_income_recognized"
                                                      prompt="HLS801.FINANCE_INCOME_RECOGNIZED"
liyuan.chen's avatar
liyuan.chen committed
1145 1146 1147 1148 1149
                                                      width="80"/>

                                        </a:columns>
                                    </a:grid>
                                </a:tab>
1150 1151
                                <a:tab id="step_3" disabled="true" prompt="HLS801.MONTH_END" selected="false"
                                       width="100">
liyuan.chen's avatar
liyuan.chen committed
1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167
                                    <a:hBox height="50">
                                        <a:button click="upStep" text="HLS801.LAST_STEP"/>
                                        <a:label width="5"/>
                                        <a:button click="nextStep" text="HLS801.NEXT_STEP"/>
                                        <a:label width="80"/>
                                        <a:button click="monthlyendFun" text="HLS801.MONTH_END"/>
                                    </a:hBox>
                                    <a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE">
                                        <a:box column="2" labelWidth="150" style="margin-left:-80px">
                                            <a:textField name="year" bindTarget="unearned_finance_income_query_ds"
                                                         prompt="HLS801.YEAR" readOnly="true"/>
                                            <a:textField name="month" bindTarget="unearned_finance_income_query_ds"
                                                         prompt="HLS801.MONTH" readOnly="true"/>
                                        </a:box>
                                    </a:form>
                                </a:tab>
niminmin's avatar
niminmin committed
1168
                                <a:tab id="step_5" disabled="true" prompt="HLS801.PERIOD_CONTROL" selected="false"
1169
                                       width="100">
liyuan.chen's avatar
liyuan.chen committed
1170 1171 1172 1173 1174 1175
                                    <a:hBox height="50">
                                        <a:button click="upStep" text="HLS801.LAST_STEP"/>
                                        <a:label width="5"/>
                                        <a:button disabled="true" text="HLS801.NEXT_STEP"/>
                                        <a:label width="50"/>
                                    </a:hBox>
1176 1177
                                    <a:grid id="close_open_grid" bindTarget="close_open_ds" marginHeight="300"
                                            marginWidth="80">
liyuan.chen's avatar
liyuan.chen committed
1178 1179 1180 1181
                                        <a:columns>
                                            <a:column name="period_year" align="center" prompt="GLD_PERIODS.PERIOD_YEAR"
                                                      sortable="true" width="100"/>
                                            <a:column name="period_num" align="center"
1182 1183 1184 1185
                                                      prompt="FND_DIMENSIONS.DIMENSION_SEQUENCE" sortable="true"
                                                      width="80"/>
                                            <a:column name="start_date_c" align="center"
                                                      prompt="GLD_EXCHANGE_RATE.START_DATE"
liyuan.chen's avatar
liyuan.chen committed
1186
                                                      sortable="true" width="150"/>
1187 1188
                                            <a:column name="end_date_c" align="center"
                                                      prompt="GLD_EXCHANGE_RATE.END_DATE"
liyuan.chen's avatar
liyuan.chen committed
1189
                                                      sortable="true" width="150"/>
1190 1191
                                            <a:column name="quarter_num" align="center"
                                                      prompt="GLD_PERIOD_STATUS.QUARTER"
liyuan.chen's avatar
liyuan.chen committed
1192 1193 1194
                                                      sortable="true" width="80"/>
                                            <a:column name="period_name" align="center" prompt="GLD_PERIODS.PERIOD_NAME"
                                                      sortable="true" width="120"/>
1195 1196
                                            <a:column name="adjustment_flag" align="center"
                                                      prompt="GLD_PERIOD_STATUS.ADJUST"
liyuan.chen's avatar
liyuan.chen committed
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215
                                                      width="100"/>
                                            <a:column name="period_status_code" align="center"
                                                      prompt="GLD_PERIOD_STATUS.PERIOD_STATUS" renderer="statusRenderer"
                                                      width="120"/>
                                            <a:column name="actionOpen" align="center" prompt="HLS.OPEN_PERIOD"
                                                      renderer="openPeriodDs" sortable="true" width="120"/>
                                            <a:column name="actionClose" align="center" prompt="HLS.CLOSE_PERIOD"
                                                      renderer="closePeriodDs" sortable="true" width="120"/>
                                        </a:columns>
                                        <a:editors>
                                            <a:checkBox id="closed_grid_cb"/>
                                        </a:editors>
                                    </a:grid>
                                </a:tab>
                            </a:tabs>
                        </a:tabPanel>
                    </a:hBox>
                </a:case>
            </a:switch>
Spencer Chang's avatar
Spencer Chang committed
1216 1217 1218
        </a:screenBody>
    </a:view>
</a:screen>