<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2015-5-21 下午8:09:26  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:view>
        <script type="text/javascript"><![CDATA[
            function hls812_line_add() {
                var ds = $('doc_file_temp_ln_set_ds');
                var record = ds.create(ds.currentIndex);
                $('doc_file_temp_ln_set_ds_id').showEditorByRecord(record);
                record.set('templet_set_id','${/parameter/@templet_set_id}');
               
            }
            
            function hls812_line_delete() {
                var ds = $('doc_file_temp_ln_set_ds');
                var records = ds.getSelected();
                if (records.length != 0) {
                    Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS030.CONFIRM_DELETE}', function() {
                        ds.remove(records);
                    });
                }
            
            }
            
            function hls812_line_save() {
                var ds = $('doc_file_temp_ln_set_ds');
                if (ds.validate()) {
                    ds.submit();
                }
            
            }
            
          
            
            
          
          
        ]]></script>
        <a:dataSets>
            <a:dataSet id="doc_file_temp_hd_set_ds" autoQuery="true" model="hls.HLS812.hls_doc_file_templet_set_hd" queryUrl="${/request/@context_path}/autocrud/hls.HLS812.hls_doc_file_templet_set_hd/query?templet_set_id=${/parameter/@templet_set_id}">
                <a:fields>
                    <a:field name="templet_set_code" readOnly="true"/>
                    <a:field name="templet_set_name" readOnly="true"/>
                    <a:field name="usage_code_des" readOnly="true"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="doc_file_temp_ln_set_ds" autoQuery="true" bindTarget="doc_file_temp_hd_set_ds" model="hls.HLS812.hls_doc_file_templet_set_ln" queryUrl="${/request/@context_path}/autocrud/hls.HLS812.hls_doc_file_templet_set_ln/query?templet_set_id=${/parameter/@templet_set_id}" selectable="true">
                <a:fields>
                    <a:field name="templet_set_id"/>
                    <a:field name="templet_code"/>
                    <a:field name="templet_id"/>
                    <a:field name="templet_name"/>
                    <a:field name="templet_file_name"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="templet_code" lovGridHeight="340" lovHeight="500" lovService="hls.HLS810.hls_doc_file_templet?usage_code=${/parameter/@usage_code}&amp;enabled_flag=Y" lovWidth="500" title="文件模板">
                        <a:mapping>
                            <a:map from="templet_id" to="templet_id"/>
                            <a:map from="templet_code" to="templet_code"/>
                            <a:map from="templet_name" to="templet_name"/>
                            <a:map from="templet_file_name" to="templet_file_name"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hls812_line_add" text="新增"/>
                <a:gridButton click="hls812_line_delete" text="删除"/>
                <a:gridButton click="hls812_line_save" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:form column="3" title="模板集" width="700">
                <a:textField name="templet_set_code" bindTarget="doc_file_temp_hd_set_ds" prompt="模板集代码"/>
                <a:textField name="templet_set_name" bindTarget="doc_file_temp_hd_set_ds" prompt="模板集名称"/>
                <a:textField name="usage_code_des" bindTarget="doc_file_temp_hd_set_ds" prompt="用途"/>
            </a:form>
            <a:grid id="doc_file_temp_ln_set_ds_id" bindTarget="doc_file_temp_ln_set_ds" height="400" navBar="true" width="700">
                <a:columns>
                    <a:column name="templet_code" editor="lov_e" prompt="模板代码" width="150"/>
                    <a:column name="templet_name" prompt="模板名称" width="150"/>
                    <a:column name="templet_file_name" prompt="文件名称" width="150"/>
                    <a:column name="enabled_flag" editor="check_e" prompt="启用" width="150"/>
                </a:columns>
                <a:editors>
                    <a:lov id="lov_e"/>
                    <a:checkBox id="check_e"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
