oth_other_auto_config.lview 7.86 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 80 81 82 83 84 85 86 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
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="oth011_oa_parameter1_sql_link" url="${/request/@context_path}/modules/oth/OTH011/oth_oa_parameter_sql.lview"/>
        <a:link id="oth011_oa_parameter2_sql_link" url="${/request/@context_path}/modules/oth/OTH011/oth_oa_parameter_sql.lview"/>
        <a:link id="oth011_oa_parameter3_sql_link" url="${/request/@context_path}/modules/oth/OTH011/oth_oa_parameter_sql.lview"/>
        <script type="text/javascript"><![CDATA[
        	function oa_parameter1_sql_window_open(id){
        	    var win = new Leaf.Window({
                    id: 'oth_oa_parameter_sql_id',
                    params: {
                        record_id: id,
                        ds_name:'oth011_auto_config_info_ds',
                        name:'oa_parameter1_sql',
                        winId: 'oth_oa_parameter_sql_id'
                    },
                    url: $('oth011_oa_parameter1_sql_link').getUrl(),
                    title: '参数SQL',
                    width: 600,
                    height: 430,
                    draggable: true
                });
        	}
        	
        	function oa_parameter2_sql_window_open(id){
        	    var win = new Leaf.Window({
                    id: 'oth_oa_parameter_sql_id',
                    params: {
                        record_id: id,
                        ds_name:'oth011_auto_config_info_ds',
                        name:'oa_parameter2_sql',
                        winId: 'oth_oa_parameter_sql_id'
                    },
                    url: $('oth011_oa_parameter2_sql_link').getUrl(),
                    title: '参数SQL',
                    width: 600,
                    height: 430,
                    draggable: true
                });
        	}
        	
        	function oa_parameter3_sql_window_open(id){
        	    var win = new Leaf.Window({
                    id: 'oth_oa_parameter_sql_id',
                    params: {
                        record_id: id,
                        ds_name:'oth011_auto_config_info_ds',
                        name:'oa_parameter2_sql',
                        winId: 'oth_oa_parameter_sql_id'
                    },
                    url: $('oth011_oa_parameter3_sql_link').getUrl(),
                    title: '参数SQL',
                    width: 600,
                    height: 430,
                    draggable: true
                });
        	}
        	
        	function renderer_sql(value,record,name){
        	    if(name == 'oa_parameter1_sql'){
        	        if(!value){
        	            return '<a  href="javascript:oa_parameter1_sql_window_open(' + record.id + ')">' + '编辑' + '</a>';
        	        }else{
        	            return '<a  href="javascript:oa_parameter1_sql_window_open(' + record.id + ')">' + '<font color="#FF9900">编辑</font>' + '</a>';
        	        }
        	    }else if(name == 'oa_parameter2_sql'){
        	        if(!value){
        	            return '<a  href="javascript:oa_parameter2_sql_window_open(' + record.id + ')">' + '编辑' + '</a>';
        	        }else{
        	            return '<a  href="javascript:oa_parameter2_sql_window_open(' + record.id + ')">' + '<font color="#FF9900">编辑</font>' + '</a>';
        	        }
        	    }else if(name == 'oa_parameter3_sql'){
        	        if(!value){
        	            return '<a  href="javascript:oa_parameter3_sql_window_open(' + record.id + ')">' + '编辑' + '</a>';
        	        }else{
        	            return '<a  href="javascript:oa_parameter3_sql_window_open(' + record.id + ')">' + '<font color="#FF9900">编辑</font>' + '</a>';
        	        }
        	    }
        	}
        	
        	function editor_fun(record,name){
        	    if(name == 'config_code'){
        	        if(record.isNew){
        	            return 'editor_tf_code';
        	        }
        	        return '';
        	    }
        	    return '';
        	}
        	
        	function oth011_query(){
        	    $('oth011_auto_config_info_ds').query();
        	}
		]]></script>
        <a:dataSets>
            <a:dataSet id="oth011_enabled_flag_ds" lookupCode="YES_NO"/>
            <a:dataSet id="oth011_auto_config_query_ds">
                <a:fields>
                    <a:field name="enabled_flag_desc" displayField="code_value_name" options="oth011_enabled_flag_ds" returnField="enabled_flag" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="oth011_auto_config_info_ds" autoPageSize="true" autoQuery="true" model="oth.OTH011.oth_bgfl_oa_auto_config" queryDataSet="oth011_auto_config_query_ds" selectable="true" selectionModel="single" submitUrl="${/request/@context_path}/autocrud/oth.OTH011.oth_other_auto_config/batch_update">
                <a:fields>
                    <a:field name="config_code" required="true"/>
                    <a:field name="description"/>
                    <a:field name="procedure_before"/>
                    <a:field name="procedure_after_approve"/>
                    <a:field name="procedure_after_reject"/>
                    <a:field name="procedure_cancel"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton bind="oth011_auto_config" type="add"/>
                <a:gridButton bind="oth011_auto_config" type="clear"/>
                <a:gridButton bind="oth011_auto_config" type="save"/>
                <a:gridButton click="oth011_query" text="查询"/>
            </a:screenTopToolbar>
            <a:form column="4" labelWidth="120" marginWidth="30" title="HLS.QUERY_TITLE">
                <a:textField name="config_code" bindTarget="oth011_auto_config_query_ds" prompt="自动配置代码"/>
                <a:comboBox name="enabled_flag_desc" bindTarget="oth011_auto_config_query_ds" prompt="是否启用"/>
            </a:form>
            <a:grid id="oth011_auto_config" bindTarget="oth011_auto_config_info_ds" marginHeight="180" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="config_code" align="left" editorFunction="editor_fun" lock="true" prompt="自动配置代码" width="100"/>
                    <a:column name="description" align="left" editor="editor_tf" prompt="自动配置描述" width="200"/>
                    <a:column name="procedure_before" align="left" editor="editor_tf" prompt="提交前调用过程" width="150"/>
                    <a:column name="procedure_after_approve" align="left" editor="editor_tf" prompt="审批通过调用过程" width="150"/>
                    <a:column name="procedure_after_reject" align="left" editor="editor_tf" prompt="审批拒绝调用过程" width="150"/>
                    <a:column name="procedure_cancel" align="left" editor="editor_tf" prompt="撤销调用过程" width="150"/>
                    <a:column name="oa_parameter1_sql" align="center" prompt="参数1SQL" renderer="renderer_sql" width="100"/>
                    <a:column name="oa_parameter2_sql" align="center" prompt="参数2SQL" renderer="renderer_sql" width="100"/>
                    <a:column name="oa_parameter3_sql" align="center" prompt="参数3SQL" renderer="renderer_sql" width="100"/>
                    <a:column name="enabled_flag" align="center" editor="editor_cb" prompt="启用标志" width="80"/>
                </a:columns>
                <a:editors>
                    <a:checkBox id="editor_cb"/>
                    <a:textField id="editor_tf_code" typeCase="upper"/>
                    <a:textField id="editor_tf"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>