sys_tmp_query.lview 3.31 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhuxianfei  
    $Date: 2017-11-23 上午11:11:15  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <div/>
        <a:link id="rsc_rick_mon_upload_link" url="${/request/@context_path}/uploadFile.lview"/>
        <script type="text/javascript"><![CDATA[
            function mon_upload_win(table_name,table_pk_value) {
                var url = $('rsc_rick_mon_upload_link').getUrl() + '?table_name='+table_name+'&header_id=' + table_pk_value;
              wd=  new Leaf.Window({
                    url: url,
                    title: '${l:HLS.SUPPORTING_DOCUMENT}',
                    id: 'rsc_risk_mon_report_win',
                    width: 850,
                    height: 400
                });
            
            }
            function upload_renderer(value, record, name) {
                    return '<a href="javascript:mon_upload_win(\'' + 'HLS_ATTACHMENT_MODULE'+'\','+record.get('attachment_module_id')+ ');">' + '附件上传/下载' + '</a>';
            }
            
            function bpQueryScreen_query() {
                $('upload_ds').query();
            }
            function sys120_editor_func(record,name) {
            if(name == 'code'){
                if(record.isNew){
                    return 'mon_tf';
                }}
                return '';
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="para_bpQueryDs" autoCreate="true">
                <a:fields>
                    <a:field name="description"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="upload_ds" autoQuery="true" fetchAll="true" model="sys.SYS120.hls_attachment_module" queryDataSet="para_bpQueryDs" selectable="true">
                <a:fields>
                    <a:field name="description"/>
                    <a:field name="code" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="bpQueryScreen_query" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:form column="2" labelWidth="120" title="模板查询" width="600">
                <a:textField name="description" bindTarget="para_bpQueryDs" prompt="模板名称"/>
            </a:form>
            <a:grid id="mon_grid_id" bindTarget="upload_ds" marginHeight="200" marginWidth="200" navBar="true">
                <a:toolBar>
                    <a:button type="delete"/>
                    <a:button type="add"/>
                    <a:button type="save"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="code" editorFunction="sys120_editor_func" prompt="模板代码" width="120"/>
                    <a:column name="description" editor="mon_tf" prompt="模板名称" width="200"/>
                    <a:column name="upload" align="center" prompt="附件上传/下载" renderer="upload_renderer"/>
                </a:columns>
                <a:editors>
                    <a:textField id="mon_tf"/>
                    <a:checkBox id="mon_cb"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>