sys_notice_msg.lviewbak 3.54 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
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure><![CDATA[
    ]]></a:init-procedure>
    <a:view>
        <a:link id="hls_public_notice_detail_link" url="${/request/@context_path}/hls_public_notice_detail.lview"/>
        <script type="text/javascript"><![CDATA[
        function notice_query() {
                $('sys_notice_list').query();
            }
            
        function notice_reset() {
                $('sys_notice_query').reset();
            }
    	function notice_name_renderer(value,record,name){
               var hls_notice_definition_id = record.get('hls_notice_definition_id');
               var url = '<a href="javascript:NoticeViewDetail(' + hls_notice_definition_id + ')">' + '详细' + '</a>';
               return url;
           } 
           
        function NoticeViewDetail(hls_notice_definition_id){
               url = $('hls_public_notice_detail_link').getUrl();
               new Leaf.Window({
                   id:'notice_detail_window',
                   url:url + '?hls_notice_definition_id=' + hls_notice_definition_id,
                   title:'通知明细',
                   height:520,
                   width:590
               });
         }
    ]]></script>
        <a:dataSets>
            <a:dataSet id="sys_notice_query">
                <a:fields>
                    <a:field name="notice_name"/>
                    <a:field name="notice_msg"/>
                    <a:field name="start_date"/>
                </a:fields>
                <a:events>
                    <a:event name="enter" handler="notice_query"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="sys_notice_list" autoQuery="true" fetchAll="true" model="sys.sys_notice" pageSize="10" queryDataSet="sys_notice_query"/>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="notice_query" text="查询"/>
                <a:gridButton click="notice_reset" text="重置"/>
            </a:screenTopToolbar>
            <a:form title="查询条件" width="1100">
                <a:hBox width="1080">
                    <a:textField name="notice_name" bindTarget="sys_notice_query" prompt="公告标题"/>
                    <a:textField name="notice_msg" bindTarget="sys_notice_query" prompt="公告内容"/>
                    <a:datePicker name="start_date" bindTarget="sys_notice_query" prompt="开始时间"/>
                    <a:datePicker name="start_date" bindTarget="sys_notice_query" prompt="结束时间"/>
                </a:hBox>
            </a:form>
            <div>
                <a:grid bindTarget="sys_notice_list" height="400" navBar="true" width="1100">
                    <a:columns>
                        <a:column name="sequence_num" align="center" prompt="序号" width="50"/>
                        <a:column name="notice_name" prompt="公告标题" width="200"/>
                        <a:column name="notice_msg" prompt="公告内容" width="589"/>
                        <a:column name="start_date" align="center" prompt="开始时间" renderer="Leaf.formatDate" width="100"/>
                        <a:column name="end_date" align="center" prompt="结束时间" renderer="Leaf.formatDate" width="100"/>
                        <!--<a:column name="attachment" align="center" prompt="详细" renderer="notice_name_renderer" width="60"/>-->
                    </a:columns>
                </a:grid>
            </div>
        </a:screenBody>
    </a:view>
</a:screen>