fnd_request_program.lview 7.44 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
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="fnd_request_program_edit_link" url="${/request/@context_path}/modules/fnd/FND5020/fnd_request_program_insert.lview"/>
        <a:link id="fnd_request_program_job_edit_link" url="${/request/@context_path}/modules/fnd/FND5020/fnd_request_program_job_edit.lview"/>
        <script type="text/javascript"><![CDATA[
        
            function query(){
                $('fnd_request_program_result_ds').query();
            }
			function reset(){
				$('fnd_request_program_query_ds').reset();
			}
			
			
            function actionRenderer(value,record, name){
                if (value){
                    var window_id="fnd_request_program_create_window";
                    var cycle_flag=record.get('cycle_flag');
                    if (cycle_flag=='Y'){
                        var path=$('fnd_request_program_job_edit_link').getUrl()+'?program_id='+value;
                    }else{
                        var path=$('fnd_request_program_edit_link').getUrl()+'?program_id='+value;
                    }
                    
                    return "<a href=\"javascript:editProgram('"+window_id+"','"+path+"')\">${l:HAP_EDIT}</a>";
                }else{
                    return '';
                }
            }
           
           function editProgram(window_id,path) {
                new Leaf.Window({
                    id: window_id,
                    url: path,
                    title: '可执行编辑',
                     height:590,
                     width:590
            
                });
            }
            
           
            function canedit(record, name) {
                return record.isNew ? 'program_code_tf' : '';
            }       
        ]]></script>
        <a:dataSets>
            <a:dataSet id="enable_flag_ds">
                <a:datas>
                    <a:record name="是" code="Y"/>
                    <a:record name="否" code="N"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="cycle_flag_ds">
                <a:datas>
                    <a:record name="是" code="Y"/>
                    <a:record name="否" code="N"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="fnd_request_program_query_ds" model="fnd.FND5020.fnd_request_program">
                <a:fields>
                    <a:field name="enable_flag_display" displayField="name" options="enable_flag_ds" prompt="是否有效" returnField="enable_flag" valueField="code"/>
                    <a:field name="cycle_flag_desc" displayField="name" options="cycle_flag_ds" prompt="是否周期性" returnField="cycle_flag" valueField="code"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="fnd_request_program_result_ds" autoCount="true" autoQuery="false" fetchAll="false" model="fnd.FND5020.fnd_request_program" queryDataSet="fnd_request_program_query_ds" selectable="true">
                <a:fields>
                    <a:field name="enable_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="cycle_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
                    <a:field name="program_code" required="true"/>
                    <a:field name="program_name" required="true"/>
                    <a:field name="fixed_flag" defaultValue="N"/>
                    <a:field name="request_code" lovHeight="500" lovService="fnd.FND5020.fnd_request_info_lov" lovWidth="500" required="true" title="请求编码">
                        <a:mapping>
                            <a:map from="request_info_id" to="request_info_id"/>
                            <a:map from="request_code" to="request_code"/>
                            <a:map from="request_name" to="request_name"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:form column="3" labelWidth="100" marginWidth="65" title="请求定义" width="750">
                <a:textField name="program_code" bindTarget="fnd_request_program_query_ds" prompt="编码" typeCase="upper">
                    <a:events>
                        <a:event name="enterdown" handler="query"/>
                    </a:events>
                </a:textField>
                <a:textField name="program_name" bindTarget="fnd_request_program_query_ds" prompt="名称">
                    <a:events>
                        <a:event name="enterdown" handler="query"/>
                    </a:events>
                </a:textField>
                <a:textField name="description" bindTarget="fnd_request_program_query_ds" prompt="描述">
                    <a:events>
                        <a:event name="enterdown" handler="query"/>
                    </a:events>
                </a:textField>
                <a:comboBox name="enable_flag_display" bindTarget="fnd_request_program_query_ds" prompt="是否有效">
                    <a:events>
                        <a:event name="enterdown" handler="query"/>
                    </a:events>
                </a:comboBox>
                <a:comboBox name="cycle_flag_desc" bindTarget="fnd_request_program_query_ds" prompt="是否周期性">
                    <a:events>
                        <a:event name="enterdown" handler="query"/>
                    </a:events>
                </a:comboBox>
            </a:form>
            <a:hBox>
                <a:button click="query" text="HAP_QUERY"/>
                <a:button click="reset" text="HAP_RESET"/>
            </a:hBox>
            <a:grid id="grid" bindTarget="fnd_request_program_result_ds" height="450" marginWidth="65" navBar="true" width="750">
                <a:toolBar>
                    <a:button type="add"/>
                    <a:button type="clear"/>
                    <a:button type="save"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="program_code" align="center" editor="program_code_tf" editorFunction="canedit" prompt="编码" sortable="true" width="80"/>
                    <a:column name="program_name" align="left" editor="program_name_tf" prompt="名称" width="100"/>
                    <a:column name="description" align="left" editor="description_tf" prompt="描述" width="150"/>
                    <a:column name="request_code" align="left" editor="request_code_lov" prompt="请求编码" width="80"/>
                    <a:column name="request_name" align="left" prompt="请求名称" width="100"/>
                    <a:column name="cycle_flag" editor="cycle_flag_comboBox" prompt="是否周期性" sortable="true" width="75"/>
                    <a:column name="enable_flag" editor="enable_flag_comboBox" prompt="是否有效" sortable="true" width="75"/>
                    <a:column name="program_id" align="center" prompt="编辑" renderer="actionRenderer" width="45"/>
                </a:columns>
                <a:editors>
                    <a:textField id="program_code_tf"/>
                    <a:textField id="program_name_tf"/>
                    <a:textField id="description_tf"/>
                    <a:checkBox id="enable_flag_comboBox"/>
                    <a:checkBox id="cycle_flag_comboBox"/>
                    <a:lov id="request_code_lov"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>