hls_doc_file_templet.lview 11 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2015-5-21 下午1:37:08  
    $Revision: 1.0  
    $Purpose: 文件模板定义 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:view>
        <a:link id="hls810_param_link_link" url="${/request/@context_path}/modules/hls/HLS810/hls_doc_file_tmp_para_link.lview"/>
congzhao's avatar
congzhao committed
11
        <a:link id="hls810_templet_signer_link" url="${/request/@context_path}/modules/hls/HLS810/hls_doc_file_templet_signer.lview"/>
Spencer Chang's avatar
Spencer Chang committed
12 13 14 15 16 17
        <a:link id="hls810_atm_link" url="${/request/@context_path}/uploadFile.lview"/>
        <script type="text/javascript"><![CDATA[
       function hls810_add() {
           var ds = $('hls_doc_file_temp_ds');
           var record = ds.create(ds.currentIndex);
           $('hls_doc_file_temp_ds_id').showEditorByRecord(record);
18
       
Spencer Chang's avatar
Spencer Chang committed
19
       }
20
       
Spencer Chang's avatar
Spencer Chang committed
21 22 23 24 25 26 27 28
       function hls810_delete() {
           var ds = $('hls_doc_file_temp_ds');
           var records = ds.getSelected();
           if (records.length != 0) {
               Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS030.CONFIRM_DELETE}', function() {
                   ds.remove(records);
               });
           }
29
       
Spencer Chang's avatar
Spencer Chang committed
30
       }
31
       
Spencer Chang's avatar
Spencer Chang committed
32 33 34 35 36
       function hls810_save() {
           var ds = $('hls_doc_file_temp_ds');
           if (ds.validate()) {
               ds.submit();
           }
37
       
Spencer Chang's avatar
Spencer Chang committed
38
       }
39
       
Spencer Chang's avatar
Spencer Chang committed
40 41 42 43 44 45 46 47 48
       function editor_check(record, name) {
                if (record.isNew) {
                    if(name=='templet_code' )
                    {
                        return 'textFied_ed_up' ;
                    }
                }
                return '' ;
            }
49
            
Spencer Chang's avatar
Spencer Chang committed
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
       function hls810_query(){
           $('hls_doc_file_temp_ds').query();
       }
       //模板参数链接
       function hls810_param_link_rener(value,record,name){
           var tmpt_id = record.get('templet_id');
               if(!record.isNew){
                    return '<a href="javascript:hls810_link_jump(\''+tmpt_id+'\')">参数集</a>';
                }
       }
       function hls810_link_jump(templet_id){
           var url = $('hls810_param_link_link').getUrl()+'?templet_id='+templet_id;
    	        wd = new Leaf.Window({
                    id: 'hls810_param_link_screen',
                    url: url,
                    title: '关联参数',
                    height: 500,
                    width: 830
                });
       }
congzhao's avatar
congzhao committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
        //模板签署人链接 add by 24976
        function hls810_templet_signer_link_rener(value,record,name){
            var tmpt_id = record.get('templet_id');
            if(!record.isNew){
                return '<a href="javascript:hls810_signer_jump(\''+tmpt_id+'\')">签署人</a>';
            }
        }
        function hls810_signer_jump(templet_id){
            var url = $('hls810_templet_signer_link').getUrl()+'?templet_id='+templet_id;
            wd = new Leaf.Window({
                id: 'hls810_templet_signer_link_screen',
                url: url,
                title: '签署人参数',
                height: 500,
                width: 830
            });
        }
Spencer Chang's avatar
Spencer Chang committed
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
       function hls810_plugin_render(value,record,name){
                var tmpt_id = record.get('templet_id');
               if(!record.isNew){
                    return '<a href="javascript:hls810_upload_fun(\''+tmpt_id+'\')">模板上传</a>';
                }
            }
            function hls810_upload_fun(templet_id){
                var url = $('hls810_atm_link').getUrl()+'?table_name=HLS_DOC_FILE_TEMPLET' + '&' + 'header_id=' + templet_id;
    	        wd = new Leaf.Window({
                    id: 'acr515_vat_upload_link',
                    url: url,
                    title: '模板上传',
                    height: 350,
                    width: 850
                });
            }
            function setPassword(value, record, name){
                var passwd ='';
                if(typeof(record.get('pwd')) != 'undefined' ){
                    for(var i=0; i<value.length ; i++){
                        passwd = passwd + '●';
                    }
                    return passwd;
                }
            }
   ]]></script>
        <a:dataSets>
            <a:dataSet id="enable_flag_ds" lookupCode="ENABLED_STATUS"/>
            <a:dataSet id="hls_doc_file_usage_ds" lookupCode="HLS_DOC_FILE_USAGE"/>
            <a:dataSet id="for_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="templet_code"/>
                    <a:field name="templet_name"/>
                    <a:field name="usage_code"/>
                    <a:field name="usage_code_des" displayField="code_value_name" options="hls_doc_file_usage_ds" returnField="usage_code" valueField="code_value"/>
                    <a:field name="enabled_flag"/>
                    <a:field name="enabled_flag_des" displayField="code_value_name" options="enable_flag_ds" returnField="enabled_flag" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="hls_doc_file_temp_ds" autoQuery="true" model="hls.HLS810.hls_doc_file_templet" queryDataSet="for_query_ds" selectable="true">
                <a:fields>
                    <a:field name="templet_code" required="true"/>
                    <a:field name="templet_name" required="true"/>
                    <a:field name="usage_code" required="true"/>
                    <a:field name="usage_code_des" displayField="code_value_name" options="hls_doc_file_usage_ds" required="true" returnField="usage_code" valueField="code_value"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>


                    <a:field name="main_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="tenant_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="guarantor_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="agent_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>


                    <a:field name="tenant_loop_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="guarantor_loop_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="agent_loop_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>

                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hls810_query" text="HLS.QUERY"/>
                <a:gridButton click="hls810_add" text="新增"/>
                <a:gridButton click="hls810_delete" text="删除"/>
                <a:gridButton click="hls810_save" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:form column="4" marginWidth="200" title="查询条件">
                <a:textField name="templet_code" bindTarget="for_query_ds" prompt="模板代码"/>
                <a:textField name="templet_name" bindTarget="for_query_ds" prompt="模板名称"/>
                <a:comboBox name="usage_code_des" bindTarget="for_query_ds" prompt="模板用途"/>
                <a:comboBox name="enabled_flag_des" bindTarget="for_query_ds" prompt="启用"/>
            </a:form>
            <a:grid id="hls_doc_file_temp_ds_id" bindTarget="hls_doc_file_temp_ds" marginHeight="200" marginWidth="200" navBar="true">
                <a:columns>
                    <a:column name="templet_code" editorFunction="editor_check" prompt="模板代码" width="150"/>
                    <a:column name="templet_name" editor="textFied_ed" prompt="模板名称" width="150"/>
                    <a:column name="usage_code_des" editor="combobox_ed" prompt="模板用途" width="100"/>
                    <!-- <a:column name="templet_file_path" editor="textFied_ed" prompt="模板路径" width="200"/>
                    <a:column name="templet_file_name" editor="textFied_ed" prompt="文件名" width="200"/> -->
                    <a:column align="center" prompt="模板上传" renderer="hls810_plugin_render"/>
                    <a:column name="note" editor="textArea_ed" prompt="说明" width="200"/>
                    <a:column name="enabled_flag" editor="checkbox_ed" prompt="启用" width="50"/>
                    <a:column name="param_link" align="center" prompt="参数集" renderer="hls810_param_link_rener"/>
congzhao's avatar
congzhao committed
173
                    <a:column name="templet_signer_link" align="center" prompt="签署人" renderer="hls810_templet_signer_link_rener"/>
Spencer Chang's avatar
Spencer Chang committed
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
                    <a:column name="pwd" align="center" editor="hls810_pwd_ed" prompt="密码" renderer="setPassword"/>

                    <a:column name="main_flag" editor="checkbox_ed" prompt="宏菱" width="150"/>
                    <a:column name="main_key_word" editor="textFied_ed" prompt="宏菱盖章关键字" width="150"/>
                    <a:column name="tenant_flag" editor="checkbox_ed" prompt="承租人(个人/法人)" width="150"/>
                    <a:column name="tenant_key_word" editor="textFied_ed" prompt="承租人盖章关键字" width="150"/>
                    <a:column name="tenant_loop_flag" editor="checkbox_ed" prompt="承租人关键字循环标志" width="150"/>
                    <a:column name="guarantor_flag" editor="checkbox_ed" prompt="担保人(个人/法人)" width="150"/>
                    <a:column name="guarantor_key_word" editor="textFied_ed" prompt="担保人盖章关键字" width="150"/>
                    <a:column name="guarantor_loop_flag" editor="checkbox_ed" prompt="担保人关键字循环标志" width="150"/>
                    <a:column name="agent_flag" editor="checkbox_ed" prompt="代理商" width="150"/>
                    <a:column name="agent_key_word" editor="textFied_ed" prompt="代理商盖章关键字" width="150"/>
                    <a:column name="agent_loop_flag" editor="checkbox_ed" prompt="代理商关键字循环标志" width="150"/>

                    <a:column name="main_timestamp_key_word" editor="textFied_ed" prompt="宏菱时间戳盖章关键字" width="200"/>
                    <a:column name="tenant_timestamp_key_word" editor="textFied_ed" prompt="承租人时间戳盖章关键字" width="200"/>
                    <a:column name="guarantor_timestamp_key_word" editor="textFied_ed" prompt="担保人时间戳盖章关键字" width="200"/>
                    <a:column name="agent_timestamp_key_word" editor="textFied_ed" prompt="代理商时间戳盖章关键字" width="200"/>


                </a:columns>
                <a:editors>
                    <a:textField id="textFied_ed"/>
                    <a:textField id="textFied_ed_up" typeCase="upper"/>
                    <a:comboBox id="combobox_ed"/>
                    <a:checkBox id="checkbox_ed"/>
                    <a:textArea id="textArea_ed" height="60"/>
                    <a:passWord id="hls810_pwd_ed"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>