csh_transaction_receipt_maintain.lview 46.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 99 100 101 102 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 129 130 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 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: sf
    $Date: 2019-09-06 上午11:10:33
    $Revision: 1.0  
    $Purpose: design the function of written_off money
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
        <a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
        <a:model-query defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/>
        <a:model-query defaultWhereClause="t.code = &apos;CSH510_RETURN_SELECT&apos; and t.code_value not in (&apos;RETURN&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="returned_flag_rp"/>
        <a:model-query defaultWhereClause="t.code = &apos;CSH510_REVERSE_SELECT&apos; and t.code_value not in (&apos;R&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="reversed_flag_rp"/>
    </a:init-procedure>
    <a:view>
        <a:link id="csh_transaction_receipt_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <a:link id="csh_transaction_receipt_update_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
        <!-- <a:link id="csh_transaction_receipt_maintain_post_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>-->
        <a:link id="csh_transaction_receipt_maintain_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update.lview"/>
        <a:link id="csh_transaction_receipt_maintain_readonly_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update_readonly.lview"/>

        <a:link id="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete" modelaction="batch_update"/>
        <a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post" modelaction="batch_update"/>
        <!--更新收款单据的状态-->
        <a:link id="csh509N_batch_update_confirmed_flag" model="csh.CSH509.query_roles_info" modelaction="batch_update"/>
        <a:link id="csh510N_csh_transaction_batch_update_confirmed_flag" model="csh.CSH510.csh_transaction_update" modelaction="batch_update"/>

        <!-- <a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_import.lview"/>-->

        <a:link id="csh510_csh_transaction_import_link" url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
        <script type="text/javascript"><![CDATA[
        Leaf.onReady(function(){
            //console.log($('csh_transaction_receipt_maintain_result_ds'));
        })
        //新增单据的作废
        function csh510_csh_trx_bank_drop(){
            $('csh510_csh_trx_bank_drop').disable();
            var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
            if (datas.length == 0) {
                $L.showMessage("提示", '请选择要作废的单据');
                $('csh510_csh_trx_bank_drop').enable();
                return;
            }
            var post_data=[];
            for(var i=0;i<datas.length;i=i+1) {
                var confirmed_flag= datas[i].get('confirmed_flag');
                //不是新增就报错
                if(confirmed_flag!='NEW'&&confirmed_flag!='CT_REJECTED'){
                    $L.showInfoMessage("提示", '请选择单据为新建或收款退回的数据', null, null);
                    return;
                }
                //将对象封装到json对象数组
                post_data.push({
                    'transaction_id': datas[i].get('transaction_id'),
                    //提交想改变之后的状态
                    'wanted_confirmed_flag': 'CANCELLED',
                    '_status': 'update'
                });
            };

            //弹出确认修改的提示框
            $L.showConfirm("提示",'确认执行该操作?',function(){
                //锁屏
                lock_current_window();
                //作废单据
                Leaf.request({
                    url: $('csh509N_batch_update_confirmed_flag').getUrl(),
                    para: post_data,
                    success: function () {
                        unlock_current_window();
                        $('csh_transaction_receipt_maintain_result_ds').query();
                        Leaf.showMessage('${l:PROMPT}', '该单据已作废!');
                        $('csh510_csh_trx_bank_drop').enable();
                    }, failure: function () {
                        unlock_current_window();
                        $('csh510_csh_trx_bank_drop').enable();
                    },
                    error: function () {
                        unlock_current_window();
                        $('csh510_csh_trx_bank_drop').enable();
                    },
                    scope: this
                });
            })

        }
        //新增申请按钮
        function csh510_csh_trx_bank_apply_new() {
            $('csh510_csh_trx_bank_apply_new').disable();
            var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
            //获得所选择的的未提交的单据,如果有不是未提交的数据,提示重新进行选择
            if (datas.length == 0) {
                $L.showMessage("提示", '请至少选择一条数据');
                $('csh510_csh_trx_bank_apply_new').enable();
                return;
            }
            var post_data=[];

            for(var i=0;i<datas.length;i=i+1) {
                var confirmed_flag = datas[i].get('confirmed_flag');
                var bp_name=datas[i].get('bp_name');
                if(bp_name==''||bp_name==undefined){
                    $L.showInfoMessage("提示", '商业伙伴为空,不能提交', null, null);
                    $('csh510_csh_trx_bank_apply_new').enable();
                    return;
                }
                //不是新增就报错
                if (confirmed_flag != 'NEW' && confirmed_flag != 'CT_REJECTED') {
                    $L.showInfoMessage("提示", '请选择单据为新建或收款退回的数据', null, null);
                    $('csh510_csh_trx_bank_apply_new').enable();
                    return;
                }


                //将对象封装到json对象数组
                post_data.push({
                    'transaction_id': datas[i].get('transaction_id'),
                    '_status': 'update'
                });
            }
            //弹出确认修改的提示框
            $L.showConfirm("提示", '确认执行该操作?', function () {
                //锁屏
                lock_current_window();
                //改变未提交单据数据的状态
                Leaf.request({
                    url: $('csh510N_csh_transaction_batch_update_confirmed_flag').getUrl(),
                    para: post_data,
                    success: function () {
                        unlock_current_window();
                        $('csh_transaction_receipt_maintain_result_ds').query();
                        Leaf.showMessage('${l:PROMPT}', '提交成功!');
                        //启用按钮
                        $('csh510_csh_trx_bank_apply_new').enable();
                    }, failure: function () {
                        //启用按钮
                        $('csh510_csh_trx_bank_apply_new').enable();
                        unlock_current_window();
                    },
                    error: function () {
                        //启用按钮
                        $('csh510_csh_trx_bank_apply_new').enable();
                        unlock_current_window();
                    },
                    scope: this
                });
            },function(){
                $('csh510_csh_trx_bank_apply_new').enable();
            });
        }

        //跳转到收款新增页面
        function csh510_csh_trx_bank_hand_add(){
            //按钮失效
            $('csh510_csh_trx_bank_hand_add').disable();
            var url = $('csh_transaction_receipt_link').getUrl();
            var win = new Leaf.Window({
                title:'${l:CSH510.NEW_MANUAL_RECEIPT}',
                url: url,
                id: 'csh_trx_receipt_id',
                fullScreen: true,
                draggable: true
            }).on('close', function() {
                //按钮启用
                $('csh510_csh_trx_bank_hand_add').enable();
                $('csh_transaction_receipt_maintain_result_ds').query();
            });

        }
        //锁表

        function lock_current_window() {
            Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
        }

        //解锁

        function unlock_current_window() {
            Leaf.Masker.unmask(Ext.getBody());
        }

        function dateValidator(record, name, value) { //日期校验方法
            if (name == 'transaction_date_from' || name == 'transaction_date_to') {
                var start_date = Leaf.formatDate(record.get('transaction_date_from'));
                var end_date = Leaf.formatDate(record.get('transaction_date_to'));
                if (!!end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较
                    if (!compareDate(start_date, end_date)) {
                        return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串
                    }
                }
                return true; //校验通过返回true
            }
        }

        function compareDate(start, end) {
            if (start > end) {
                return false;
            }
            return true;
        }

        function csh510_receipt_query() {

            var record = $('csh_transaction_receipt_maintain_query_ds').getAt(0);
            var dirty_flag = 'N';
            for (var name in record.data) {
                var value = record.get(name);
                if (value != 'undefined' && value != null && value != '') {
                    dirty_flag = 'Y';
                }
            }
            if (dirty_flag == 'N') {
                Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function () {
                    return;
                }, function () {
                    $('csh_transaction_receipt_maintain_result_ds').query();
                }, null, null);
            } else {
                $('csh_transaction_receipt_maintain_result_ds').query();
            }
        }

        function csh510_receipt_reset() {
            $('csh_transaction_receipt_maintain_query_ds').reset();
        }

        function csh510_receipt_back() {
            history.go(-1);
        }

        function csh510_receipt_forward() {
            history.go(1);
        }

        function csh510_receipt_quit() {
            location.href = $('sys_service_welcome_link').getUrl();
            parent.shMenu('show');
        }

        function seedetail_transaction_num(value, record, name) {
            /*   console.log(record.get('receipt_type'));
               console.log( record.get('bp_name'));
               console.log( record.get('confirmed_flag'));*/
            if (record.get('transaction_id')) {
                var url;
                /*if (record.get('posted_flag') == 'N') {
                    url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
                } /!*else*!/ else if (record.get('posted_flag') == 'Y') {
                    url = $('csh_transaction_receipt_update_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
                } else {
                    return value;
                }*/
                if(record.get('confirmed_flag')=='NEW' || record.get('confirmed_flag') == 'CT_REJECTED'){
lizhe's avatar
lizhe committed
256
                    url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=true'+'&import_source='+ record.get('import_source');
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 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 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 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 405 406 407 408 409 410 411 412 413 414 415 416 417 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 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502
                }else{
                    url = $('csh_transaction_receipt_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id')+'&update_flag=false';
                }

                return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
            }
        }

        function openWindow(url) {
            var win = new Leaf.Window({
                id: 'csh_transaction_receipt_link_winid',
                params: {
                    winId: 'csh_transaction_receipt_link_winid'
                },
                url: url,
                title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
                fullScreen: true
            });
            win.on('close',function(){
                $('csh_transaction_receipt_maintain_result_ds').query();
            });
        }

        function construct_from_to() {
            var config = ['transaction_num', 'bank_slip_num', 'transaction_amount', 'currency_code', 'bank_account_code'];
            var pattern = ['_from', '_to'];
            var obj = {};
            for (var i = 0,
                     j = config.length; i < j; i++) {
                for (var m = 0,
                         n = pattern.length; m < n; m++) {
                    obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
                }
            }
            return obj;
        }

        function csh510_receipt_maintain_update(ds, record, name, value, oldvalue) {
            var from_to = construct_from_to();
            var opposite_name = from_to[name];
            if (!Ext.isEmpty(opposite_name)) {
                var opposite_value = record.get(opposite_name);
                if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
                    record.set(opposite_name, value);
                }
            }
        }

        function csh510_receipt_remove() {
            var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
            if (!records.length) {
                Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.SELECT_RECORD}');
                return;
            }
            var saveData = [];
            for (var i = 0; i < records.length; i++) {
                if(records[i].get('confirmed_flag') != 'NEW' && records[i].get('confirmed_flag') != 'CT_REJECTED'){
                    Leaf.showInfoMessage("提示","请选择新建或者收款退回的单据进行收款取消操作!");
                    return;
                }
                records[i].set('_status', 'delete');
                saveData.push(records[i].data);
            }
            Leaf.showConfirm('${l:PROMPT}', '${l:HLS.DELETE_CONFIRM}', function () {
                Leaf.Masker.mask(Ext.getBody(), '${l:HLS.DELETING}');
                Leaf.request({
                    url: '${/request/@context_path}/autocrud/csh.CSH510.csh_transaction_delete/batch_update',
                    para: saveData,
                    success: function () {
                        Leaf.SideBar.show({
                            msg: '${l:HLS.SUBMIT_SUCCESS}',
                            duration: 2000
                        });
                        csh510_delete_remove(records);
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    failure: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    error: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });
            }, function () {
                return;
            }, null, null);
        }

        function csh510_delete_remove(records) {
            while (records[0]) {
                $('csh_transaction_receipt_maintain_result_ds').removeLocal(records[0]);
            }
        }

        function csh510_receipt() {
            Leaf.showConfirm('${l:PROMPT}', '非财务人员请勿操作!', function () {
                var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
                if (records.length != 1) {
                    Leaf.showMessage('${l:PROMPT}', '请选择1条数据!');
                    return;
                }
                if (records[0].get('transaction_id')) {
                    var url;
                    if (records[0].get('posted_flag') == 'N') {
                        url = $('csh_transaction_receipt_maintain_post_link').getUrl() + '?transaction_id=' + records[0].get('transaction_id') + '&claim=F';
                    } else {
                        Leaf.showMessage('${l:PROMPT}', '该单据已经被认领,无需再次认领!');
                        return;
                    }
                    openWindow(url);
                }
            });
        }

        function csh510_batch_update() {

            var ds_id = 'csh_transaction_receipt_maintain_result_ds';
            var ds = $(ds_id)
            var records = ds.getSelected();
            if (records.length < 1) {
                Leaf.showMessage('${l:PROMPT}', '请至少选择一条要处理的单据');
                return;
            }


            var auto_write_record = $('csh510_collection_classes_batch_update_ds').getAt(0);

            var collection_classes = auto_write_record.get('collection_classes');
            if (collection_classes) {
                lock_current_window();

                var post_data = [];
                for (var i = 0; i < records.length; i++) {
                    if (records[i].get('write_off_flag') == 'FULL') {
                        Leaf.showMessage('${l:PROMPT}', '选择数据中包含已完全核销的数据');
                        return;
                    }
                    post_data.push({
                        'transaction_id': records[i].get('transaction_id'),
                        'collection_classes': auto_write_record.get('collection_classes'),
                        '_status': 'update'
                    });
                }
                Leaf.request({
                    url: $('csh510_csh_transaction_batch_update').getUrl(),
                    para: post_data,
                    success: function () {
                        unlock_current_window();
                        ds.query(ds.currentpage);
                        Leaf.showMessage('${l:PROMPT}', '修改成功!');
                    }, failure: function () {
                        unlock_current_window();
                    },
                    error: function () {
                        unlock_current_window();
                    },
                    scope: this
                });
            }
        }

        function csh510_csh_transaction_batch_update(){

            //
            var records = $('csh_transaction_receipt_maintain_result_ds').getSelected();
            if (records.length == 0) {
                Leaf.showMessage('${l:PROMPT}', '请选择一条记录!');
                return;
            }

            var post_data = [];
            for (var i = 0; i < records.length; i++) {

                post_data.push({
                    'transaction_id': records[i].get('transaction_id'),
                    '_status': 'update'
                });
            }

            Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
            Leaf.request({
                url: $('csh511_csh_transaction_batch_post_link').getUrl(),
                para: post_data,
                success: function (res) {

                    Leaf.showMessage('${l:PROMPT}', '${l:HLS.SUBMIT_SUCCESS}');
                    csh510_receipt_query();
                    Leaf.Masker.unmask(Ext.getBody());
                },
                failure: function() {
                    Leaf.Masker.unmask(Ext.getBody());
                },
                error: function() {
                    Leaf.Masker.unmask(Ext.getBody());
                },
                scope: this
            });



        }

        function csh510_csh_trx_bank_import(){
            //按钮失效
            $('csh510_csh_trx_bank_import').disable();
            //只有债权内勤才能
            var url_l = $('csh510_csh_transaction_import_link').getUrl();

            var win = new Leaf.Window({
                id: 'csh510_csh_transaction_import_win',
                url: url_l,
                params: {

                    'winid': 'csh510_csh_transaction_import_win',
                    'session_id': '${/session/@session_id}',
                    'parent_ds_id': 'csh_transaction_receipt_maintain_result_ds'
                },
                title: '信息导入',
                width: 430,
                height: 390
            });
            win.on('close', function () {
                $('csh_transaction_receipt_maintain_result_ds').query();
                //按钮启用
                $('csh510_csh_trx_bank_import').enable();
            });

        }

        function csh510_export() {
            $('csh_transaction_receipt_maintain_grid_ds')._export(null,'收款维护');
        }

        ]]></script>
        <a:dataSets>
            <a:dataSet id="confirmed_flag_ds">
                <a:datas>
                    <a:record code_value="NEW" code_value_name="新建"/>
                    <a:record code_value="ACCAUDITING" code_value_name="收款确认中"/>
                    <a:record code_value="CT_REJECTED" code_value_name="收款退回"/>
                    <a:record code_value="ACCAUDITED" code_value_name="收款已确认"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="bp_category_ds" lookupCode="BP_CATEGORY">
            </a:dataSet>
503
            <a:dataSet id="import_source_ds" lookupCode="CSH510_IMPORT_SOURCE"/>
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 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 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672
            <!--            <a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG">-->
            <!--            </a:dataSet>-->
            <a:dataSet id="payment_method_ds">
                <a:datas dataSource="/model/payment_method_path"/>
            </a:dataSet>
            <a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/>
            <a:dataSet id="currency_ds">
                <a:datas dataSource="/model/currency"/>
            </a:dataSet>
            <a:dataSet id="transaction_type_ds">
                <a:datas dataSource="/model/transaction_type"/>
            </a:dataSet>
            <!-- <a:dataSet id="transaction_type_ds" lookupCode="CSH511_TRANSACTION_TYPE"/> -->
            <a:dataSet id="posted_flag_ds" lookupCode="CSH510_POST_SELECT"/>
            <!-- 去掉退款事务 -->
            <a:dataSet id="returned_flag_ds">
                <a:datas dataSource="/model/returned_flag_rp"/>
            </a:dataSet>
            <!-- 去掉反冲事务 -->
            <a:dataSet id="reversed_flag_ds">
                <a:datas dataSource="/model/reversed_flag_rp"/>
            </a:dataSet>
            <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
            <a:dataSet id="csh510_collection_classes_batch_update_ds">
                <a:fields>
                    <a:field name="collection_classes_desc" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>

                </a:fields>
            </a:dataSet>
            <a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
                <a:fields>

                    <a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"  title="CSH511.BANK_ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="precision" to="precision"/>
                            <a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
                            <a:map from="bank_account_id" to="bank_account_id"/>
                            <a:map from="bank_account_num" to="bank_account_num"/>
                            <a:map from="bank_account_name" to="bank_account_name"/>
                            <a:map from="bank_account_code" to="bank_account_code"/>
                            <a:map from="currency_code" to="currency_code"/>
                            <a:map from="currency_name" to="currency_name"/>
                            <a:map from="bank_account_type" to="bank_account_type"/>
                            <a:map from="bank_account_type_name" to="bank_account_type_name"/>
                            <a:map from="bank_branch_name" to="bank_branch_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bank_branch_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"  title="CSH511.BANK_ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="precision" to="precision"/>
                            <a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
                            <a:map from="bank_account_id" to="bank_account_id"/>
                            <a:map from="bank_account_num" to="bank_account_num"/>
                            <a:map from="bank_account_name" to="bank_account_name"/>
                            <a:map from="bank_account_code" to="bank_account_code"/>
                            <a:map from="currency_code" to="currency_code"/>
                            <a:map from="currency_name" to="currency_name"/>
                            <a:map from="bank_account_type" to="bank_account_type"/>
                            <a:map from="bank_account_type_name" to="bank_account_type_name"/>
                            <a:map from="bank_branch_name" to="bank_branch_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bank_account_num" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"  title="CSH511.BANK_ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="precision" to="precision"/>
                            <a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
                            <a:map from="bank_account_id" to="bank_account_id"/>
                            <a:map from="bank_account_num" to="bank_account_num"/>
                            <a:map from="bank_account_name" to="bank_account_name"/>
                            <a:map from="bank_account_code" to="bank_account_code"/>
                            <a:map from="currency_code" to="currency_code"/>
                            <a:map from="currency_name" to="currency_name"/>
                            <a:map from="bank_account_type" to="bank_account_type"/>
                            <a:map from="bank_account_type_name" to="bank_account_type_name"/>
                            <a:map from="bank_branch_name" to="bank_branch_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="confirmed_flag_desc"  options="confirmed_flag_ds" valueField="code_value" displayField="code_value_name" returnField="confirmed_flag"/>
                    <a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
                    <a:field name="bp_name_from" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id_from"/>
                            <a:map from="bp_name" to="bp_name_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_id_from"/>
                    <a:field name="bp_name_to" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id_to"/>
                            <a:map from="bp_name" to="bp_name_to"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_id_to"/>
                    <a:field name="transaction_num_from"/>
                    <a:field name="transaction_num_to"/>
                    <a:field name="transaction_num"/>
                    <a:field name="bank_slip_num_from"/>
                    <a:field name="bank_slip_num_to"/>
                    <a:field name="transaction_date_from" validator="dateValidator"/>
                    <a:field name="transaction_date_to" validator="dateValidator"/>
                    <a:field name="bank_account_code" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="bank_account_code" to="bank_account_code"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bank_account_code_from" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="bank_account_code" to="bank_account_code_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bank_account_from_id"/>
                    <a:field name="bank_account_code_to" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="bank_account_code" to="bank_account_code_to"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="transaction_amount_from"/>
                    <a:field name="transaction_amount_to"/>
                    <a:field name="posted_flag_display" displayField="code_value_name" options="posted_flag_ds" returnField="posted_flag" valueField="code_value"/>
                    <!--                    <a:field name="posted_flag" defaultValue="N"/>-->
                    <a:field name="returned_flag_display" displayField="code_value_name" options="returned_flag_ds" returnField="returned_flag" valueField="code_value"/>
                    <a:field name="reversed_flag_display" displayField="code_value_name" options="reversed_flag_ds" returnField="reversed_flag" valueField="code_value"/>
                    <a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
                        <a:mapping>
                            <a:map from="period_name" to="period_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="user_desc" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="basic.sys_user_for_lov" lovWidth="500" prompt="AUT_TRX_USER_AUTHORIZE.USER_ID" title="员工选择">
                        <a:mapping>
                            <a:map from="description" to="user_desc"/>
                            <a:map from="user_id" to="user_id"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="transaction_type_display" displayField="code_value_name" options="transaction_type_ds" returnField="transaction_type" valueField="code_value"/>
                    <a:field name="currency_name_from_display" displayField="currency_name" options="currency_ds" returnField="currency_code_from" valueField="currency_code"/>
                    <a:field name="currency_code_from"/>
                    <a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/>
                    <a:field name="currency_code_to"/>
                    <a:field name="confirmed" defaultValue="N"/>
                    <!--                    <a:field name="transaction_type" defaultValue="RECEIPT"/>-->
                    <a:field name="transaction_category" defaultValue="BUSINESS"/>
                    <!--                    <a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds" returnField="write_off_flag" valueField="code_value"/>-->
                    <a:field name="not_reversed_flag_r" defaultValue="NOT"/>
                    <a:field name="receipt_type"/>
                    <a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds" returnField="receipt_type" valueField="code_value"/>
                    <a:field name="description"/>
                    <a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id"/>
                            <a:map from="bp_name" to="bp_name"/>
                        </a:mapping>
                    </a:field>

                    <a:field name="collection_classes_n" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
                    <!--对方账户的-->
                    <a:field name="bp_bank_account_name" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
                        <a:mapping>
                            <a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
                            <a:map from="opposite_band_na" to="opposite_band_na"/>
                            <a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="opposite_band_na" lovGridHeight="350" lovHeight="550" lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
                        <a:mapping>
                            <a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
                            <a:map from="opposite_band_na" to="opposite_band_na"/>
                            <a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
                        </a:mapping>
                    </a:field>
xiaochao's avatar
xiaochao committed
673 674
                    <a:field name="bp_bank_account_num" lovGridHeight="350" lovHeight="550"
                     lovService="csh.CSH510.csh_transaction_for_lov" lovLabelWidth="90" lovWidth="580" title="对方账户信息">
675 676 677 678 679 680 681
                        <a:mapping>
                            <a:map from="bp_bank_account_name" to="bp_bank_account_name"/>
                            <a:map from="opposite_band_na" to="opposite_band_na"/>
                            <a:map from="bp_bank_account_num" to="bp_bank_account_num"/>
                        </a:mapping>
                    </a:field>

xiaochao's avatar
xiaochao committed
682 683 684 685 686 687
                    <a:field name="extra_nam" lovGridHeight="350" lovHeight="550"
                                    lovService="csh.CSH510.csh_extra_nam_for_lov"
                                    lovLabelWidth="90" lovWidth="580" title="代理店简称">
                               <a:mapping>
                                   <a:map from="extra_nam" to="extra_nam"/>
                               </a:mapping>
688 689
                    </a:field>
                    <a:field name="import_source_desc"  options="import_source_ds" valueField="code_value" displayField="code_value_name" returnField="import_source"/>
690 691 692 693 694 695
                </a:fields>
                <a:events>
                    <a:event name="update" handler="csh510_receipt_maintain_update"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="csh_transaction_receipt_maintain_result_ds" autoPageSize="true" autoQuery="true" model="csh.CSH510.csh_transaction_miantain_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true">
696 697 698
                <a:fields>
                    <a:field name="import_source_desc"  options="import_source_ds" valueField="code_value" displayField="code_value_name" returnField="import_source"/>
                </a:fields>
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <!-- <a:gridButton click="csh510_receipt_back" text="HLS.BACK"/>
                <a:gridButton click="csh510_receipt_forward" text="HLS.FORWARD"/> -->
                <!-- <a:gridButton click="csh510_receipt_quit" text="HLS.EXIT"/> -->
                <a:gridButton click="csh510_receipt_query" text="HLS.QUERY" id="csh510_receipt_query"/>
                <a:gridButton click="csh510_csh_trx_bank_import" text="CSH510.CSH_TRANSACTION.RECEIVE_MONEY_IMPORT_BTN" id="csh510_csh_trx_bank_import"/>
                <a:gridButton click="csh510_csh_trx_bank_hand_add" text="CSH510.CSH_TRANSACTION.MONEY_HAND_ADD_BTN" id="csh510_csh_trx_bank_hand_add"/>
                <a:gridButton click="csh510_receipt_remove" text="收款取消"/>
                <a:gridButton click="csh510_csh_trx_bank_apply_new" text="提交复核" id="csh510_csh_trx_bank_apply_new"/>
                <!--                <a:gridButton click="csh510_csh_trx_bank_drop" text="CSH510.CSH_TRANSACTION.DROP_BTN" id="csh510_csh_trx_bank_drop"/>-->
                <a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/>
                <!--  <a:gridButton click="csh510_csh_transaction_batch_update" text="批量过账"/>-->
                <!-- <a:gridButton click="csh510_receipt" text="财务认领"/> -->
            </a:screenTopToolbar>
            <a:form bindTarget="csh_transaction_receipt_write_off_query_ds" labelWidth="120" marginWidth="80"
                    title="收款核销" style="margin-left:20px">
                <a:hBox>
                    <a:fieldSet column="4" labelWidth="150" title="HLS.QUERY_TITLE">
                        <a:datePicker name="transaction_date_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_FROM"/>
                        <a:datePicker name="transaction_date_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_TO"/>
                        <a:numberField name="transaction_amount_from" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_FROM" align="right"/>
                        <a:numberField name="transaction_amount_to" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_TO" align="right"/>
                        <!--我方账户户名-->
726 727 728
<!--                        <a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>-->
<!--                        <a:lov name="bank_branch_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME"/>-->
<!--                        <a:lov name="bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME"/>-->
729
                        <!--银行流水号-->
730
<!--                        <a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/>-->
731 732 733
                        <!--对方账户户名-->
                        <a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
                        <!--对方银行名称-->
734
<!--                        <a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>-->
735
                        <!--对方账户账号-->
736
<!--                        <a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>-->
737 738 739 740 741 742
                        <a:textField name="transaction_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="现金事务编号"/>
<!--                        <a:textField style="display:none"/>-->
                        <a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
                        <a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="单据审批状态"/>
                        <!--                        <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>-->
                        <a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
xiaochao's avatar
xiaochao committed
743
                        <a:lov name="extra_nam" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="代理店简称"/>
744
                        <a:comboBox name="import_source_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="新增路径"/>
745 746 747 748 749 750
                    </a:fieldSet>


                </a:hBox>
            </a:form>
            <a:fieldSet  labelWidth="150" title="收款单" style="margin-left:20px">
751
                <a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="csh_transaction_receipt_maintain_result_ds" marginHeight="190" marginWidth="80" navBar="true" >
752 753 754 755 756 757 758 759 760 761 762 763 764 765
                    <!--<a:toolBar>
                        <a:button click="csh510_export" text="导出"/>
                    </a:toolBar>-->

                    <a:columns>
                        <a:column name="transaction_num" prompt="CSH510.CSH_TRANSACTION.CSH_TRANSACTION_NUM" renderer="seedetail_transaction_num" width="110" align="center"/>
<!--                        <a:column name="receipt_type_n" align="center" prompt="CSH510.CSH_TRANSACTION.RECEIPT_TYPE" width="100"/>-->
                        <a:column name="transaction_type_desc" align="center" prompt="现金事务类型" width="100"/>
                        <a:column name="transaction_amount" align="right" prompt="CSH510.CSH_TRANSACTION.RECEIPT_AMOUNT" width="100" renderer="Leaf.formatMoney"/>
                        <a:column name="transaction_date" renderer="Leaf.formatDate" align="center"/>
                        <a:column name="returned_amount" prompt="CSH510.CSH_TRANSACTION.RETURN_AMOUNT" align="right" renderer="Leaf.formatMoney"/>
                        <a:column name="use_money_amount" prompt="CSH510.CSH_TRANSACTION.USEFUL_AMOUNT" align="right" renderer="Leaf.formatMoney"/>
                        <a:column name="collection_classes_desc" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS" align="center"/>
                        <a:column name="bp_name" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER" align="center"/>
xiaochao's avatar
xiaochao committed
766
                        <a:column name="extra_nam" prompt="代理店简称" align="center"/>
xiaochao's avatar
xiaochao committed
767
                        <a:column name="guarantor_name_duty_desc" prompt="担保人履行担保义务" align="center"/>
768 769
                        <a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center"/>
                        <a:column name="description"   prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
770
                        <a:column name="import_source_desc"   prompt="新增路径" align="center"/>
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794
                        <a:column name="confirmed_flag_desc"   prompt="单据审批状态" align="center"/>
                        <!--                        <a:column name="written_off_flag_desc"   prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS" align="center"/>-->
                        <a:column prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT">
                            <a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name" align="center"/>
                            <a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="bank_branch_name" align="center"/>
                            <a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bank_account_num" align="center"/>
                        </a:column>
                        <a:column prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT">
                            <a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bp_bank_account_name" align="center"/>
                            <a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="opposite_band_na" align="center"/>
                            <a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bp_bank_account_num" align="center"/>
                        </a:column>
                        <a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY" align="center"/>
                        <!--                        <a:column name="debt_confirmed_by_desc" prompt="CSH510.CSH_TRANSACTION.DEPT_CONFIRMER" align="center"/>-->
                        <a:column name="acc_confirmed_by_desc" prompt="确认人" align="center"/>
                    </a:columns>
                    <a:editors>
                        <a:numberField id="number_editor" allowDecimals="true" decimalPrecision="2" editable="false"/>
                    </a:editors>
                </a:grid>
            </a:fieldSet>
        </a:screenBody>
    </a:view>
</a:screen>