<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:c="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" trace="true">

    <a:view template="default" package="leaf.ui.std">
        <a:link id="con_contract_update_link_id" url="${/request/@context_path}/modules/cont/CON501N/con_contract_modify.lview"/>
        <a:link id="hap_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <script><![CDATA[
        function click1(data){
            alert(data);
        }
        function click2(data){
            alert(data);
        }
        function click3(data){
            alert(data);
        }
        function rwerw(){
            return '<a href="javascript:legal_detail();">链接</a>';
        }
        function legal_detail(){
            var param = {};
            param['document_id'] = 3969;
            param['function_code'] = 'CON501';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = 'UPDATE';
            param['cond_para2'] = '99';
            param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
            hls_doc_get_layout_code('hap_con_contract_get_layout_code_link_id', param, 'con_contract_update_link_id');
            $jq('#con_contract_update_link_id').css('z-index',160);
        }
        function testRowClickFn(record,index){
            console.log(record)
        }



        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
        <a:dataSets>
        <a:dataSet id="leg_contract_result_ds" pageSize="2" autoPageSize="true" autoQuery="true" model="leg.LEG501.leg_contract_query">
            <a:fields>
            </a:fields>
        </a:dataSet>
        </a:dataSets>

        <a:hapGrid id="leg_contract_result_grid" title="基本信息" bindTarget="leg_contract_result_ds" titleImg="/images/home_page/next.png" rowClick="testRowClickFn">
            <a:toolBar>
                <a:button text="按钮测试" click="click1"/>
                <a:button icon="/images/home_page/next.png" click="click2"/>
                <a:button type="search" click="click3" width="150px" placeholder="请输入合同编号"/>
            </a:toolBar>
            <a:columns>
                <a:column name="contract_number" prompt="合同编号" width="150"/>
                <a:column name="contract_name" prompt="合同名称" width="200"/>
                <a:column name="overdue_max_days"  prompt="最大逾期天数"/>
                <a:column name="overdue_amount"  prompt="逾期租金" />
                <a:column name="unreceived_fine_amount"  prompt="延迟履行金" />
                <a:column name="contract_status_desc"  prompt="合同状态"/>
                <a:column name="legal_status_desc" prompt="法务状态"/>
                <a:column name="legal_info"  prompt="诉讼情况" template="rwerw"/>
            </a:columns>
        </a:hapGrid>
    </a:view>

</a:screen>