WIDGET-LEAF-CSH-PAYMENT.lview 34.7 KB
Newer Older
niminmin's avatar
niminmin committed
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 256 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 503 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 673 674 675 676 677 678 679 680 681 682 683 684 685 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 717 718 719 720 721 722 723 724 725 726 727 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 812 813 814
<?xml version="1.0" encoding="UTF-8"?>

<!--
    :Think
    : 1.0
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view template="default" package="leaf.ui.std">
        <!--<meta name="_csrf" content="${/session/@_csrf.token}"/>-->
        <!--<meta name="_csrf_header" content="X-CSRF-TOKEN" />-->
        <a:link id="leaf_csh_csh504_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
                modelaction="update"/>
        <a:link id="leaf_csh_csh501_csh_payment_req_link_id"
                url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req.lview"/>
        <a:link id="leaf_csh_csh_transaction_receipt_return_maintain_link"
                url="${/request/@context_path}/modules/csh/CSH301/csh_transaction_receipt_detail_query.lview"/>
        <a:link id="leaf_csh_csh_transaction_returned_detail_link"
                url="${/request/@context_path}/modules/csh/CSH301/csh_transaction_returned_detail_query.lview"/>
        <a:link id="leaf_csh_csh_transaction_payment_detail_link"
                url="${/request/@context_path}/modules/csh/CSH301/csh_payment_req_pay_detail.lview"/>
        <style>
            html, body {
                width:1184px;
                height:552px;
                background:#FFFFFF;
                margin:0;
                padding:0;
            }

            .widget-leaf-csh-payment_bank {
                width:1184px;
                height:552px;
                background:#FFFFFF;
                border-radius: 4px;
            }

            .widget-leaf-csh-payment_bank .payment-title{
                height:20px;
                width:100%;
                padding-left:52px;
                padding-top:31px;
            }

            .widget-leaf-csh-payment_bank .payment-title .payment-title-img{
                height:20px;
                width:20px;
            }
            .widget-leaf-csh-payment_bank .payment-title .payment-title-font{
                height:20px;
                width:140px;
                font-family: NotoSansHans-Bold;
                font-size:18px;
                line-height:18px;
                letter-spacing: 2px;
                color: #333333;
                margin-left:14px;
                padding:0px;
            }

            .widget-leaf-csh-payment_bank .payment-search{
                height:386px;
                width:284px;
                float:left;
                margin-left:49px;
                margin-top:24px;
            }

            .widget-leaf-csh-payment_bank .widget_label {
                position: absolute;
                width: 29px;
                height: 4px;
                top: 99px;;
                left: 50px;
                background-color: #5A7FFF;
            }

            .widget-leaf-csh-payment_bank .row1 {
                position: relative;
                //padding: 16px 0 12px 16px;
                font-family: NotoSansHans-Bold;
                font-size: 14px;
                font-weight: normal;
                font-stretch: normal;
                letter-spacing: 2px;
                color: #333333;
            }
            .widget-leaf-csh-payment_bank .row1 .row1_right_img{
                float:right;
                width:15px;
                height:13px;
                margin-top:4px;
            }

            .widget-leaf-csh-payment_bank .row2 {
                box-sizing: border-box;
                height: 109px;
                <!--padding: 26px 40px 22px 16px;-->
                <!--border-bottom: 1px solid #F0F0F3;-->
            }

            .widget-leaf-csh-payment_bank .asset_query_form div {
                height: 24px;
                line-height: 24px;
            }

            .widget-leaf-csh-payment_bank .asset_query_form div:first-child {
                margin-bottom: 0px;
            }

            .widget-leaf-csh-payment_bank .asset_query_form .label_wrapper{
                width:100%;
                height:30px;
                border-bottom:4px solid rgba(101,126,254,0.07);
                margin-top:32px;
            }
            .widget-leaf-csh-payment_bank .asset_query_form .search_wrapper{
                width: 255px;
                height: 26px;
                border-radius: 4px;
                border: solid 1px #bfbfbf;
            }
            .widget-leaf-csh-payment_bank .asset_query_form .search_wrapper .search_icon_wrapper{
                width:32px;
                height:16px;
                border-right:1px solid #cccccc;
                float:left;
                margin-top:5px;
            }
            .widget-leaf-csh-payment_bank .asset_query_form .search_wrapper .search_icon{
                width: 16px;
                height: 16px;
                margin-left:7px;
            }
            .widget-leaf-csh-payment_bank .asset_query_form input {
                box-sizing: border-box;
                width: 213px;
                height: 26px;
                //margin: 0 30px 0 16px;
                //padding-left: 8px;
                display: inline-block;
                border: none;
                border-radius: 2px;
                font-size: 12px;
                color: rgba(75, 80, 90, 0.85);
                float:right;
            }
            ::-webkit-input-placeholder { /* WebKit, Blink, Edge */
            text-align:center;
            }
            :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
            text-align:center;
            }
            ::-moz-placeholder { /* Mozilla Firefox 19+ */
            text-align:center;
            }
            :-ms-input-placeholder { /* Internet Explorer 10-11 */
            text-align:center;
            }

            .widget-leaf-csh-payment_bank .asset_query_form .label {
                //display: inline-block;
                height: 14px;
                font-family: NotoSansHans-DemiLight;
                font-size: 14px;
                font-weight: normal;
                font-stretch: normal;
                letter-spacing: 1px;
                color: #333333;
            }

            .widget-leaf-csh-payment_bank .asset_query_form .query_item{
                margin-top:11px;
            }

            .widget-leaf-csh-payment_bank .asset_query_form .account_type_select_wrapper div{
                width: 54px;
                height: 22px;
                border-radius: 4px;
                border: solid 1px #999999;
                text-align:center;
                font-family: NotoSansHans-Light;
                font-size: 12px;
                line-height:22px;
                font-weight: normal;
                font-stretch: normal;
                letter-spacing: 0px;
                color: #999999;
                float:left;
                margin-left:11px;
            }
            .widget-leaf-csh-payment_bank .asset_query_form .account_type_select_wrapper div:first-child{
                margin-left:0px;
            }

            .widget-leaf-csh-payment_bank .asset_query_form .currency_type_select_wrapper div{
            width: 62px;
            height: 22px;
            border-radius: 4px;
            border: solid 1px #999999;
            text-align:center;
            font-family: NotoSansHans-Light;
            font-size: 12px;
            line-height:22px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 1px;
            color: #999999;
            float:left;
            margin-left:5px;
            }

            .widget-leaf-csh-payment_bank .asset_query_form .currency_type_select_wrapper div:first-child{
            margin-left:0px;
            }

            .widget-leaf-csh-payment_bank .asset_query_form .clickable {
                box-sizing: border-box;
                width: 88px;
                height: 26px;
                line-height: 26px;
                display: inline-block;
                //padding: 0 5px;
                //margin: 0 13px;
                border-radius: 2px;
                cursor: pointer;
                text-align: center;
            }

            .widget-leaf-csh-payment_bank .asset_query_form #widget_leaf_csh_submit {
                width: 255px;
                height: 27px;
                background-color: #434343;
                border-radius: 4px;
                opacity: 0.95;
                font-family: NotoSansHans-Regular;
                font-size: 14px;
                font-weight: normal;
                font-stretch: normal;
                letter-spacing: 1px;
                color: #ffffff;
                margin-top:65px;
            }

            .widget-leaf-csh-payment_bank .asset_query_form .asset_query_currency {
                border: 1px solid rgba(83, 93, 127, 0.50);
                color: #535D7F;
            }

            .widget-leaf-csh-payment_bank .asset_query_form .asset_query_currency_active {
                border-color: #5A7FFF;
                color: #5A7FFF;
            }
            .widget-leaf-csh-payment_bank .csh-payment-list{
                width: 792px;
                height: 429px;
                float:right;
                margin-top:22px;
                border-left: 7px solid #eef1fd;
            }
            .widget-leaf-csh-payment_bank .hls-pagging-grid {
                width: 792px;
                height: 417px;
                -webkit-box-shadow: none;
                box-shadow: none;
                float:right;
                margin-top:0px;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .grid-title {
                display: none;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .grid-body {
                padding: 0 0px;
                margin-left: 27px;
                margin-right: 36px;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tr td {
                text-align: center;
            }

            /*表头*/
            .widget-leaf-csh-payment_bank .hls-pagging-grid .grid-body table > tr {
                height: 54px;
                border-bottom: 6px solid #F0F0F3;
                font-family: NotoSansHans-Medium;
                font-size: 14px;
                font-weight: normal;
                font-stretch: normal;
                letter-spacing: 1px;
                color: #333333;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tr td:nth-child(1),
            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tr td:nth-child(5) {
                text-align: left;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .grid-body table > tr > td:first-child span {
                margin-left: 16px;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .grid-body table > tr > td:last-child span {
                margin-right: 16px;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tbody tr {
                height: 56px;
                font-size: 12px;
                color: rgba(0, 0, 0, 0.65);
                border-bottom: 1px solid #F0F0F3;
                font-family: NotoSansHans-Light;
                font-weight: normal;
                font-stretch: normal;
                letter-spacing: 1px;
                color: #333333;
                background: #fff;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .grid-body table tbody tr:first-child{
                height: 56px;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tbody td {
                max-width: 13em;
                text-align: center;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tbody td:first-child div {
                margin-left: 16px;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tbody td:last-child div {
                margin-right: 16px;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tbody td div p {
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tbody tr:hover {
                background: rgba(90, 127, 255, 0.08);
                font-family: NotoSansHans-Medium !important;
                color: #333333 !important;
            }

            .widget-leaf-csh-payment_bank .hls-table-active {
                /*background-color: rgba(90, 127, 255, 0.08);*/
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .icon {
                cursor: pointer;
                width: 15px;
                height: 14px;
            }

            .widget-leaf-csh-payment_bank .switch {
                width: 100%;
                height: 26px;
                cursor: pointer;
                <!--padding-bottom: 11px;-->
                margin-top: 6px;
                /*border-bottom: 1px solid #F0F0F3;*/
            }

            .widget-leaf-csh-payment_bank .switch .switch_approve {
                display: block;
                width: 93px;
                float: left;
                font-size: 16px;
                text-align: center;
                line-height: 13px;
                color: #cccccc;
                font-family: NotoSansHans-Regular;
                letter-spacing: 2px;
            }

            .widget-leaf-csh-payment_bank .switch .add_icon{
                float:right;
                width:31px;
                height:32px;
            }

            .widget-leaf-csh-payment_bank .switch .switch-label {
                width:100%;
                height:3px;
                margin-top:-12px;
            }

            .widget-leaf-csh-payment_bank .switch .widget_leaf_csh_unapprove_label{
                width:28px;
                height:4px;
                background-color:#657efe;
                float:left;
                margin-left:27px;
            }
            .widget-leaf-csh-payment_bank .switch .widget_leaf_csh_approve_label{
                visibility:hidden;
                width:28px;
                height:4px;
                background-color:#657efe;
                float:left;
                margin-left:82px;
            }

            .widget-leaf-csh-payment_bank .switch #widget_leaf_csh_switch_unapprove_id {
                border-bottom-left-radius: 3px;
                border-top-left-radius: 3px;
                margin-left: 27px;
                text-align:left;
                border-right:1px solid #e7e6e6;
                font-family: NotoSansHans-Bold;
                font-size: 16px;
                font-weight: normal;
                font-stretch: normal;
                letter-spacing: 1px;
                color: #333333;
            }

            .widget-leaf-csh-payment_bank .switch #widget_leaf_csh_switch_approved_id {
                border-top-right-radius: 3px;
                border-bottom-right-radius: 3px;
                /*margin-left: -1px;*/
                text-align:right;
                margin-left: 10px;
            }

            .widget-leaf-csh-payment_bank #widget_leaf_csh_payment_grid-wraper {
                display: block;
            }

            .widget-leaf-csh-payment_bank #widget_leaf_csh_transaction_grid-wraper {
                display: none;
            }

            .widget-leaf-csh-payment_bank #widget_leaf_csh_transaction_grid tbody {
                text-align: center !important;
            }

            .widget-leaf-csh-payment_bank #widget_leaf_csh_transaction_grid tbody .grid_no_date {
                margin-left: 0 !important;
                position: relative !important;
            }


            .widget-leaf-csh-payment_bank .asset_query_form .account_type_select_wrapper .selected{
                border: solid 1px #4f6dff;
                color: #657efe;
            }
            .widget-leaf-csh-payment_bank .asset_query_form .currency_type_select_wrapper .selected{
                border: solid 1px #4f6dff;
                background-color: #657efe;
                color: #ffffff;
            }

            .widget-leaf-csh-payment_bank .hls-pagging-grid .hls-table tbody tr .bp_code_font{
                 font-family: NotoSansHans-Light;
                 font-size: 12px;
                 font-weight: normal;
                 font-stretch: normal;
                 letter-spacing: 1px;
                 color: #999999;
                 margin-top: 6px;
             }
            .widget-leaf-csh-payment_bank .hls-pagging-grid .icon{
                cursor:pointer;
                width:16px;
                height:16px;
            }
            .widget-leaf-csh-payment_bank .hls-pagging-grid input[type='checkbox']{
                display:none;
            }
            .widget-leaf-csh-payment_bank .hls-pagging-grid input[type='checkbox'] ~ .label1{
                display:block;
                margin:0 auto;
                width:14px;
                height:14px;
                cursor:pointer;
                position:relative;
                top:0;
                left:0;
                /*border:1px solid #5A7FFF;*/
                border-radius:1.85px;
                color:#5A7FFF;
            }
            .widget-leaf-csh-payment_bank .hls-pagging-grid input[type='checkbox'] ~ .label0{
                display:none;
                margin:0 auto;
                width:14px;
                height:14px;
                cursor:pointer;
                position:relative;
                top:0;
                left:0;
                /*border:1px solid rgba(83,93,127,0.85);*/
                border-radius:1.85px;
            }
            .widget-leaf-csh-payment_bank .hls-pagging-grid input[type='checkbox']:checked ~ .label1{
                display:none;
            }
            .widget-leaf-csh-payment_bank .hls-pagging-grid input[type='checkbox']:checked ~ .label0{
                display:block;
            }
        </style>
        <script><![CDATA[
        jQuery(document).ready(function () {
//            jQuery(".account_type_select_wrapper div").click(function(){
//                jQuery(this).addClass("selected");
//                jQuery(this).siblings().removeClass("selected");
//            });
//
//            jQuery(".currency_type_select_wrapper div").click(function(){
//                jQuery(this).addClass("selected");
//                jQuery(this).siblings().removeClass("selected");
//            });
        });

        function csh_payment_detail_renderer(record, index) {

            return "<img onclick='winOpen_req_pay(\"" + record.id + "\")' class='icon' src='${/request/@context_path}/leafresource/images/menu-details@2x.png'/>";
        }

        function winOpen_req_pay(record_id) {

            var record = $('widget_leaf_csh_payment_ds').findById(record_id);
            var param = {};
            param['function_usage'] = 'UPDATE';
            param['payment_req_id'] = record.get('payment_req_id');
            param['document_category'] = record.get('document_category');
            param['business_type'] = record.get('business_type');
            if (record.get('business_type') == 'PAYMENT') {
                param['function_code'] = 'CSH501D';
            } else if (record.get('business_type') == 'PREPAYMENT') {
                param['function_code'] = 'CSH501_PRE_D';
            }
            param['winid'] = 'csh_payment_update_window';
            param['url_title'] = '付款申请';
            hls_doc_get_layout_code('leaf_csh_csh504_get_layout_code_link_id', param, 'leaf_csh_csh501_csh_payment_req_link_id', 'widget_leaf_csh_payment_ds');
        }

        function account_name_and_code_renderer(record, index) {
            var html;
            html='<div>'+record.get('bank_account_name')+'</div><div class="bp_code_font">'+record.get('bank_account_num')+'</div>';
            return html;
        }

        function tran_account_name_and_code_renderer(record, index) {
            var html;
            html='<div>'+record.get('bank_account_name')+'</div><div class="bp_code_font">'+record.get('bank_account_num')+'</div>';
            return html;
        }

        function edit_renderer(record, index) {
            return "<img onclick='winOpen_req_pay(\"" + record.id + "\")' class='icon' src='${/request/@context_path}/leafresource/images/widget/csh-edit.png'/>";
        }

        function enable_renderer(record, index) {
           //
            var html='';
            html='<input type="checkbox" class="icon" checked="checked" id="'+index+'_factoring_input"/>'
                +'<label class="label1" for="'+index+'_factoring_input"><img style="width: 16px" src="${/request/@context_path}/leafresource/images/widget/choose-asset.png"/></label>'
                +'<label class="label0" for="'+index+'_factoring_input"><img style="width: 16px" src="${/request/@context_path}/leafresource/images/widget/unchoose-asset.png"/></label>';
            return html;
            //return "<img class='icon' src='${/request/@context_path}/leafresource/images/widget/csh-tick.png'/>";
        }
        function leaf_enable_renderer(record, index){
            //
            var number=record.data.transaction_id
            var html='';
            html='<input type="checkbox" class="icon" checked="checked" id="'+number+'_factoring_input"/>'
                +'<label class="label1" for="'+number+'_factoring_input"><img style="width: 16px" src="${/request/@context_path}/leafresource/images/widget/choose-asset.png"/></label>'
                +'<label class="label0" for="'+number+'_factoring_input"><img style="width: 16px" src="${/request/@context_path}/leafresource/images/widget/unchoose-asset.png"/></label>';
            return html;
        }
        function csh_format_money(record, index) {
            var html;
            if (record.get('apply_amount')) {
                var money = Leaf.formatMoney(record.get('apply_amount'))
                html = '<div>'+ money +'</div>';
            } else {
                var money = Leaf.formatMoney(record.get('transaction_amount'))
                html = '<div>' + money + '</div>';
            }
            return html;
        }

        function csh_transaction_edit_renderer(record, index) {
            if (record.get('transaction_id')) {
                var url;
                if (record.get('transaction_type') == 'RECEIPT' && record.get('returned_flag') != 'RETURN') {
                    url = $('leaf_csh_csh_transaction_receipt_return_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
                    return "<img onclick='openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/widget/csh-edit.png'/>";
                } else if (record.get('transaction_type') == 'RECEIPT' && record.get('returned_flag') == 'RETURN') {
                    url = $('leaf_csh_csh_transaction_returned_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
                    //return '<a href="javascript:RETURN_openWindow(\'' + url + '\');">' + value + '</a>';
                    return "<img onclick='RETURN_openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/widget/csh-edit.png'/>";
                } else if (record.get('transaction_type') == 'PAYMENT') {
                    url = $('leaf_csh_csh_transaction_payment_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
                    //return '<a href="javascript:payment_openWindow(\'' + url + '\');">' + value + '</a>';
                    return "<img onclick='payment_openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/widget/csh-edit.png'/>";
                } else if (record.get('transaction_type') == 'PREPAYMENT' || record.get('transaction_type') == 'DEDUCTION') {
                    url = $('leaf_csh_csh_transaction_payment_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
                    //return '<a href="javascript:payment_openWindow(\'' + url + '\');">' + value + '</a>';
                    return "<img onclick='payment_openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/widget/csh-edit.png'/>";
                } else if (record.get('transaction_type') == 'ADVANCE_RECEIPT') {
                    url = $('leaf_csh_csh_transaction_receipt_return_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
                    //return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
                    return "<img onclick='openWindow(\"" + url + "\")' class='icon' src='${/request/@context_path}/leafresource/images/widget/csh-edit.png'/>";
                } else {
                    //return value;
                    return "<img  class='icon' src='${/request/@context_path}/leafresource/images/widget/csh-edit.png'/>";
                }

            }


        }

        function openWindow(url) {
            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
            });
        }
        function RETURN_openWindow(url) {
            new Leaf.Window({
                id: 'leaf_csh_csh_transaction_returned_detail_link_winid',
                params: {
                    winId: 'leaf_csh_csh_transaction_returned_detail_link_winid'
                },
                url: url,
                title: '${l:CSH515.CSH_REFUND_DETAILS}',
                fullScreen: true
            });
        }

        function payment_openWindow(url) {
            new Leaf.Window({
                id: 'csh_transaction_payment_link_winid',
                params: {
                    winId: 'csh_transaction_payment_link_winid'
                },
                url: url,
                title: '付款明细',
                fullScreen: true
            });
        }


        function clickCshPaymentBank() {
            document.getElementById('widget_leaf_csh_switch_unapprove_id').style.color = "#333333";
            document.getElementById('widget_leaf_csh_switch_unapprove_id').style.fontFamily = "NotoSansHans-Bold";
            document.getElementById('widget_leaf_csh_switch_approved_id').style.color = "#cccccc";
            document.getElementById('widget_leaf_csh_switch_approved_id').style.fontFamily = "NotoSansHans-Regular";
            document.getElementById('widget_leaf_csh_payment_grid-wraper').style.display = "block";
            document.getElementById('widget_leaf_csh_transaction_grid-wraper').style.display = "none";

            document.getElementById('widget_leaf_csh_unapprove_label').style.visibility = 'visible';
            document.getElementById('widget_leaf_csh_approve_label').style.visibility = 'hidden';
        }
        function clickCshTransactionBank() {
            //已办grid等
            document.getElementById('widget_leaf_csh_switch_approved_id').style.color = "#333333";
            document.getElementById('widget_leaf_csh_switch_unapprove_id').style.fontFamily = "NotoSansHans-Regular";
            document.getElementById('widget_leaf_csh_switch_unapprove_id').style.color = "#cccccc";
            document.getElementById('widget_leaf_csh_switch_approved_id').style.fontFamily = "NotoSansHans-Bold";
            document.getElementById('widget_leaf_csh_transaction_grid-wraper').style.display = "block";
            document.getElementById('widget_leaf_csh_payment_grid-wraper').style.display = "none";

            document.getElementById('widget_leaf_csh_unapprove_label').style.visibility = 'hidden';
            document.getElementById('widget_leaf_csh_approve_label').style.visibility = 'visible';
        }

        function cshQuery(){

            var account_type=jQuery('.account_type_select_wrapper .selected').text();
            var currency_type=jQuery('.currency_type_select_wrapper .selected').text();
            var widget_leaf_csh_keyword = $jq('[name="widget_leaf_csh_keyword"]').val();
            var cshparams = {
                'ln_bp_category_name':account_type,
                "currency_name":currency_type,
                "account_keyword":widget_leaf_csh_keyword
            }
            var traprams = {
                'ln_bp_category_name':account_type,
                "currency_name":currency_type,
                "keyword":widget_leaf_csh_keyword
            }
            console.log(cshparams);
            $("widget_leaf_csh_payment_ds").qpara = cshparams;
            $("widget_leaf_csh_payment_ds").query();

            $("csh_transaction_result_ds").qpara = traprams;
            $("csh_transaction_result_ds").query();
        }
        ]]>

        </script>
        <a:dataSets>
            <a:dataSet id="widget_leaf_csh_payment_ds" autoQuery="true" pageSize="6"
                       model="csh.CSH504.csh_payment_maintain_query_with_bank_info">
                <a:fields>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="csh_transaction_result_ds" autoQuery="true" pageSize="6"
                       queryUrl="${/request/@context_path}/autocrud/csh.CSH510.csh_transaction_query_with_bank_info/query?transaction_category=BUSINESS">
                <a:fields>
                </a:fields>
            </a:dataSet>
        </a:dataSets>

        <div class="widget-leaf-csh-payment_bank">
            <div class="payment-title">
                <img class="payment-title-img" src="${/request/@context_path}/leafresource/images/widget/bank-info.png"/>
                <span class="payment-title-font">银行账户信息</span>
            </div>
            <div class="payment-search">
                <span class="widget_label"> </span>
                <div class="row1">
                    <span>付款查询</span>
                    <img class="row1_right_img" src="${/request/@context_path}/leafresource/images/widget/detail.png"></img>
                </div>
                <div class="row2 asset_query_form">
                    <div>
                        <div class="label_wrapper">
                            <span class="label">账户类型</span>
                        </div>
                        <div class="account_type_select_wrapper query_item">
                            <div>基本</div>
                            <div>专用</div>
                            <div>一般</div>
                            <div>临时</div>
                        </div>
                        <div class="label_wrapper">
                            <span class="label">账户关键词</span>
                        </div>
                        <div class="search_wrapper query_item">
                            <div class="search_icon_wrapper">
                                <img class="search_icon" src="${/request/@context_path}/leafresource/images/widget/search-csh.png"/>
                            </div>
                            <input type="text" id="widget_leaf_csh_keyword" name="widget_leaf_csh_keyword" placeholder="请输入合同号、合同名称等关键字"/>
                        </div>
                        <div class="label_wrapper">
                            <span class="label">币种</span>
                        </div>
                        <div class="currency_type_select_wrapper query_item">
                            <div>人民币</div>
                            <div>美金</div>
                        </div>
                        <span class="clickable" id="widget_leaf_csh_submit" onclick="cshQuery()">查询</span>
                    </div>
                </div>
            </div>
            <div class="csh-payment-list">
                <div class="switch">
                    <div class="switch_approve" id="widget_leaf_csh_switch_unapprove_id" onclick="clickCshPaymentBank()">待支付清单</div>
                    <div class="switch_approve" id="widget_leaf_csh_switch_approved_id" onclick="clickCshTransactionBank()">已支付清单</div>
                    <img class="add_icon" src="${/request/@context_path}/leafresource/images/widget/csh-add.png"/>
                    <div style="clear:both;"></div>
                    <div class="switch-label">
                        <div class="widget_leaf_csh_unapprove_label" id="widget_leaf_csh_unapprove_label"> </div>
                        <div class="widget_leaf_csh_approve_label" id="widget_leaf_csh_approve_label"> </div>
                    </div>
                </div>
                <a:hapGrid id="widget_leaf_csh_payment_grid" bindTarget="widget_leaf_csh_payment_ds" canWheel="true">
                    <a:columns>
                        <a:column name="bank_code" prompt="银行代码"/>
                        <a:column name="bank_name" prompt="银行名称"/>
                        <a:column template="account_name_and_code_renderer" prompt="账户名/账户号"/>
                        <a:column name="bank_account_type_name" prompt="账户类型"/>
                        <a:column name="bank_branch_name" prompt="支行名称"/>
                        <a:column name="currency_name" prompt="币种"/>
                        <!--<a:column template="edit_renderer" prompt="编辑"/>-->
                        <a:column template="enable_renderer" prompt="启用"/>
                    </a:columns>
                </a:hapGrid>

                <a:hapGrid id="widget_leaf_csh_transaction_grid" bindTarget="csh_transaction_result_ds" canWheel="true">
                    <a:columns>
                        <a:column name="bank_code" prompt="银行代码"/>
                        <a:column name="bank_name" prompt="银行名称"/>
                        <a:column template="tran_account_name_and_code_renderer" prompt="账户名/账户号"/>
                        <a:column name="bank_account_type_name" prompt="账户类型"/>
                        <a:column name="bank_branch_name" prompt="支行名称"/>
                        <a:column name="currency_name" prompt="币种"/>
                        <!--<a:column template="csh_transaction_edit_renderer" prompt="编辑"/>-->
                        <a:column template="leaf_enable_renderer" prompt="启用"/>
                    </a:columns>
                </a:hapGrid>
            </div>
        </div>
        <a:screenBody style="display:none">
        </a:screenBody>
        <!--<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>-->
        <!--<a:screen-include-->
                <!--screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PAYMENT_REQ&amp;function_code=CSH504"/>-->

        <script>
            Leaf.onReady(function () {
                //document.getElementById('widget_leaf_csh_switch_unapprove_id').style.border = '1px solid #5A7FFF';
                //document.getElementById('widget_leaf_csh_switch_unapprove_id').style.color = '#5A7FFF';
            })
        </script>
    </a:view>
</a:screen>