<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LPC
    $Date: 2018-6-26 11:08:57
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script"
          customizationEnabled="true" dynamiccreateenabled="true"
          trace="true">
    <a:view>
        <a:link id="${/parameter/@layout_code}con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
                modelaction="update"/>
        <script type="text/javascript"><![CDATA[


        function lon120W_submit() {
            window['${/parameter/@pre_layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](lon120_submit);
            $('${/parameter/@winid}').close();
        }

        //提交审批
        window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
            Leaf.showConfirm('提示', '确认提交吗?', function () {
                window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](lon120W_submit);
            });
        }

        //加载时调用(grid,table,gridBox)
        window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_con_repayment_plan');
            if (ds_id == ds.id) {
                if (record.get('ref_v01') == 'FULL' || record.get('ref_v01') == 'PARTIAL') {
                    for (var i = 0; i < config_records.length; i++) {
                        record.getField(config_records[i].data.column_name).setReadOnly(true);
                        record.getField(config_records[i].data.column_name+'_n').setReadOnly(true);
                    }
                }
            }
        };

        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>