<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2016-12-20 上午9:04:27  
    $Revision: 1.0  
    $Purpose:贷后工具 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.document_category=&apos;COLL_CALL&apos; and t1.enabled_flag=&apos;Y&apos;  and  t1.document_type!=${/parameter/@pre_document_type}" model="hls.HLS003.hls_document_type" rootPath="hls_document_type_path"/>
    </a:init-procedure>
    <a:view>
        <a:link id="con_collection_tool_trans_other_link_id" model="cont.CON641.con_collection_tool" modelaction="update"/>
        <a:link id="con641_function_page_link" url="${/request/@context_path}/modules/cont/CON641/con_collection_law_entrance.lview"/>
        <script type="text/javascript"><![CDATA[
         function con641_coll_trans_exit(){
             $('${/parameter/@winid}').close();
         }
         
         function con641_coll_trans_other(){
            if($('trans_other_group_ds').validate()){
              var record=$('trans_other_group_ds').getAt(0);
                  Leaf.showConfirm('提示','确认提交'+record.get('document_type_desc')+'吗?',function(){
        	        Leaf.Masker.mask($('${/parameter/@winid}').wrap, '提交中...');
        	        Leaf.request({
		                url: $('con_collection_tool_trans_other_link_id').getUrl(),
		                para: {
		                    col_id :'${/parameter/@col_id}',
		                    document_type:record.get('document_type')
		                },
		                success: function(res) {
		                    
		    	            Leaf.SideBar.show({
		    	            	msg:'提交成功！',
		    	            	duration:2000
		    	            });
		    	            Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
		                   location.href = $('con641_function_page_link').getUrl()+'?function_code=CON641';
                            parent.shMenu('show');
		                },
		                failure:function(){
		                    Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
		                },
		                error:function(){
		                   Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
		                },
		                scope: this
	            	}); 
        	    });
             }
         }
       ]]></script>
        <a:dataSets>
            <a:dataSet id="document_type_ds">
                <a:datas dataSource="/model/hls_document_type_path"/>
            </a:dataSet>
            <a:dataSet id="trans_other_group_ds" autoCreate="true">
                <a:fields>
                    <a:field name="document_type"/>
                    <a:field name="document_type_desc" displayField="description" options="document_type_ds" required="true" returnField="document_type" valueField="document_type"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="con641_coll_trans_exit" text="退出"/>
                <a:gridButton click="con641_coll_trans_other" text="提交"/>
            </a:screenTopToolbar>
            <a:form title="贷后工具">
                <a:comboBox name="document_type_desc" bindTarget="trans_other_group_ds" prompt="贷后工具"/>
            </a:form>
        </a:screenBody>
    </a:view>
</a:screen>
