<?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>