hls_fnd_evaluate_standard.lview 6.38 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wubin  
    $Date: 2011-6-23 09:49:46  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
        	function dateValidator(record, name, value){
            	var score_from = record.get('score_from');
            	var score_to = record.get('score_to');
            	if(typeof(score_to) != 'undefined' && !Ext.isEmpty(score_to)){
            		var result = score_to - score_from;
                        if(result < 0){
                            return '总分至 不能小于 总分从! ';
                        }
                } 
                return true;
            }
            
            function queryEvaluateStandard(){
            	$('hls_fnd_evaluate_standard_result_ds').query();
            }
            
            function dsReset(){
            	$('hls_fnd_evaluate_standard_query_ds').reset();
            }
            
            function submitSuccess(ds,res){
            	$('hls_fnd_evaluate_standard_result_ds').query();
            }
            
            function comboxEditFunction(record,name){
            	 if (record.isNew){
                    return 'combox_edit';
                	}
                 return '';
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="targetValueScreen_leftBracketDs" lookupCode="FND_SCORE_TARGET_LEFT_BRACKET_TYPE"/>
            <a:dataSet id="targetValueScreen_rightBracketDs" lookupCode="FND_SCORE_TARGET_RIGHT_BRACKET_TYPE"/>
            <a:dataSet id="enabled_flag_list_ds" lookupCode="YES_NO"/>
            <a:dataSet id="hls_fnd_evaluate_standard_query_ds">
                <a:fields>
                    <a:field name="evaluate_level"/>
                    <a:field name="enabled_flag_display" displayField="code_value_name" options="enabled_flag_list_ds" returnField="enabled_flag" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="hls_fnd_evaluate_standard_result_ds" autoCount="true" autoQuery="true" fetchAll="true" model="fnd.FND721.hls_fnd_evaluate_standard_for_maintain" queryDataSet="hls_fnd_evaluate_standard_query_ds" selectable="true">
                <a:fields>
                    <a:field name="score_template_code" lovGridHeight="300" lovHeight="500" lovService="fnd.FND713.fnd_score_template" lovWidth="600" required="true" title="LOV">
                        <a:mapping>
                            <a:map from="score_template_id" to="score_template_id"/>
                            <a:map from="score_template_code" to="score_template_code"/>
                            <a:map from="score_template_name" to="score_template_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="score_template_name"/>
                    <a:field name="evaluate_level" required="true"/>
                    <a:field name="score_from" required="true" validator="dateValidator"/>
                    <a:field name="score_to" required="true" validator="dateValidator"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="right_bracket_display" displayField="code_value_name" options="targetValueScreen_rightBracketDs" returnField="right_bracket" valueField="code_value"/>
                    <a:field name="left_bracket_display" displayField="code_value_name" options="targetValueScreen_leftBracketDs" returnField="left_bracket" valueField="code_value"/>
                </a:fields>
                <a:events>
                    <a:event name="submitsuccess" handler="submitSuccess"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="queryEvaluateStandard" text="HLS.QUERY"/>
                <a:gridButton click="dsReset" text="HLS.RESET"/>
            </a:screenTopToolbar>
            <a:form column="3" labelWidth="100" marginWidth="800" title="SYS_PROMPT.QUERY_TITLE">
                <a:textField name="evaluate_level" bindTarget="hls_fnd_evaluate_standard_query_ds" prompt="信用级别"/>
                <a:comboBox name="enabled_flag_display" bindTarget="hls_fnd_evaluate_standard_query_ds" prompt="是否启用">
                    <a:events>
                        <a:event name="enterdown" handler="queryEvaluateStandard"/>
                    </a:events>
                </a:comboBox>
            </a:form>
            <a:grid id="grid" bindTarget="hls_fnd_evaluate_standard_result_ds" marginHeight="150" marginWidth="500" navBar="true">
                <a:toolBar>
                    <a:button type="add"/>
                    <a:button type="save"/>
                    <a:button type="clear"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="score_template_code" align="center" editor="lov_edit" prompt="指标模板代码" width="150"/>
                    <a:column name="score_template_name" align="center" prompt="指标模板" width="150"/>
                    <a:column name="left_bracket_display" editor="combox_edit" prompt="FND712.FND_SCORE_TARGET_VALUES.LEFT_BRACKET" width="50"/>
                    <a:column name="score_from" align="right" editor="grid_tf" prompt="总分从" width="100"/>
                    <a:column name="score_to" align="right" editor="grid_tf" prompt="总分到" width="100"/>
                    <a:column name="right_bracket_display" editor="combox_edit" prompt="FND712.FND_SCORE_TARGET_VALUES.RIGHT_BRACKET" width="50"/>
                    <a:column name="evaluate_level" editor="grid_tf" prompt="信用级别" sortable="true" width="120"/>
                    <a:column name="description" editor="grid_tf" prompt="评价建议" width="215"/>
                    <a:column name="enabled_flag" align="center" editor="grid_ckb" prompt="启用" width="40"/>
                </a:columns>
                <a:editors>
                    <a:textField id="grid_tf"/>
                    <a:checkBox id="grid_ckb"/>
                    <a:numberField id="number_edit"/>
                    <a:comboBox id="combox_edit"/>
                    <a:lov id="lov_edit"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>