rsc_five_class_rules.lview 8.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 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ericyin  
    $Date: 2012-12-19 下午3:45:03  
    $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 rsc_202_class_rule_query() {
                $('rsc202_class_rule_result_ds').query();
            }
            
            function rsc_202_class_rule_grid_submit() {
                var result_ds = $('rsc202_class_rule_result_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            
            function rsc_202_class_rule_grid_add() {
                $('rsc_class_rule_grid').showEditorByRecord($('rsc202_class_rule_result_ds').create());
            }
           
            function rsc_202_class_rule_quit() {
                $('rsc_five_class_rule_window').close();
            }
            
            function rsc_202_class_rule_grid_remove() {
                $('rsc_class_rule_grid').remove();
            }
            
            function rsc202ClassRuleOnAdd(ds, record, index) {
                record.set('five_class_code', '${/parameter/@class_code}');
            }
            
            function rsc202ClassRuleUpdate(ds, record, name,value) {
                if (name == 'five_class_target_code') {
                    var options = $('rsc202_class_target_value_ds');
                    options.setQueryParameter('five_class_target_code',value);
                    options.query();
                }
            }
            function rsc202CalValueEditFun(record, name){
                var flag=record.get('include_target_value');
                if(flag=='Y'){
                    return 'rsc202_five_class_rule_comb';
                }
                else{
                    return 'rsc202_five_class_rule_tf';
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="left_bracket_ds">
                <a:datas>
                    <a:record name=" " code=""/>
                    <a:record name="(" code="("/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="calculate_symbol_ds">
                <a:datas>
                    <a:record name="=" code="="/>
                    <a:record name="&lt;" code="&lt;"/>
                    <a:record name="&gt;" code="&gt;"/>
                    <a:record name="&lt;=" code="&lt;="/>
                    <a:record name="&gt;=" code="&gt;="/>
                    <a:record name="&lt;&gt;" code="&lt;&gt;"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="right_bracket_ds">
                <a:datas>
                    <a:record name=" " code=""/>
                    <a:record name=")" code=")"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="logic_calc_symbol_ds">
                <a:datas>
                    <a:record name="并且" code="And"/>
                    <a:record name="或者" code="Or"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="rsc202_class_target_ds" loadData="true" model="rsc.RSC202.rsc_five_class_targets_vl"/>
            <a:dataSet id="rsc202_class_target_value_ds" loadData="true" model="rsc.RSC202.rsc_five_class_target_value_vl"/>
            <a:dataSet id="rsc202_class_rule_query_ds" model="rsc.RSC202.rsc_five_class_rules"/>
            <a:dataSet id="rsc202_class_rule_result_ds" autoCount="true" autoQuery="true" fetchAll="false" model="rsc.RSC202.rsc_five_class_rules" pageSize="15" queryDataSet="rsc202_class_rule_query_ds" queryUrl="${/request/@context_path}/autocrud/rsc.RSC202.rsc_five_class_rules/query?five_class_code=${/parameter/@class_code}" selectable="true">
                <a:fields>
                    <a:field name="five_class_code"/>
                    <a:field name="sequence_no" required="true"/>
                    <a:field name="left_bracket" displayField="name" options="left_bracket_ds" returnField="left_bracket" valueField="code"/>
                    <a:field name="five_class_target_description"/>
                    <a:field name="include_target_value"/>
                    <a:field name="five_class_target_name"/>
                    <a:field name="five_class_target_code_disp" displayField="five_class_target_name" options="rsc202_class_target_ds" required="true" returnField="five_class_target_code" valueField="five_class_target_code">
                        <a:mapping>
                            <a:map from="five_class_target_description" to="five_class_target_description"/>
                            <a:map from="include_target_value" to="include_target_value"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="calculate_symbol" displayField="name" options="calculate_symbol_ds" required="true" returnField="calculate_symbol" valueField="code"/>
                    <a:field name="calculate_value" displayField="value_name" options="rsc202_class_target_value_ds" required="true" returnField="calculate_value" valueField="five_class_target_value"/>
                    <a:field name="right_bracket" displayField="name" options="right_bracket_ds" returnField="right_bracket" valueField="code"/>
                    <a:field name="logic_calc_symbol_disp" displayField="name" options="logic_calc_symbol_ds" required="true" returnField="logic_calc_symbol" valueField="code"/>
                    <a:field name="logic_calc_symbol"/>
                </a:fields>
                <a:events>
                    <a:event name="add" handler="rsc202ClassRuleOnAdd"/>
                    <a:event name="update" handler="rsc202ClassRuleUpdate"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar height="29">
                <a:button click="rsc_202_class_rule_quit" height="20" icon="${/request/@context_path}/images/quit.png" iconAlign="left" text="HLS.EXIT" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="rsc_202_class_rule_grid_add" height="20" icon="${/request/@context_path}/images/add.png" iconAlign="left" text="HLS.NEW" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="rsc_202_class_rule_grid_remove" height="20" icon="${/request/@context_path}/images/remove.png" iconAlign="left" text="HLS_REMOVE" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="rsc_202_class_rule_grid_submit" height="20" icon="${/request/@context_path}/images/save.png" iconAlign="left" text="HLS.SAVE" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="rsc_202_class_rule_query" height="20" icon="${/request/@context_path}/images/search.png" iconAlign="left" text="HAP_QUERY" width="50"/>
                <a:separator style="margin-left:3px;"/>
            </a:screenTopToolbar>
            <a:grid id="rsc_class_rule_grid" bindTarget="rsc202_class_rule_result_ds" height="385" navBar="true" width="850">
                <a:columns>
                    <a:column name="five_class_code" align="left" width="100"/>
                    <a:column name="sequence_no" align="left" editor="rsc202_five_class_rule_tf" sortable="true" width="80"/>
                    <a:column name="left_bracket" align="left" editor="rsc202_five_class_rule_comb" width="50"/>
                    <a:column name="five_class_target_code_disp" align="left" editor="rsc202_five_class_rule_comb" prompt="RSC_FIVE_CLASS_RULES.FIVE_CLASS_TARGET_CODE" width="100"/>
                    <a:column name="five_class_target_description" align="left" prompt="RSC_FIVE_CLASS_RULES.FIVE_CLASS_TARGET_DESCRIPTION" width="200"/>
                    <a:column name="calculate_symbol" align="left" editor="rsc202_five_class_rule_comb" width="80"/>
                    <a:column name="calculate_value" align="left" editorFunction="rsc202CalValueEditFun" width="80"/>
                    <a:column name="right_bracket" align="center" editor="rsc202_five_class_rule_comb" width="50"/>
                    <a:column name="logic_calc_symbol_disp" align="center" editor="rsc202_five_class_rule_comb" prompt="RSC_FIVE_CLASS_RULES.LOGIC_CALC_SYMBOL" width="80"/>
                </a:columns>
                <a:editors>
                    <a:textField id="rsc202_five_class_rule_tf"/>
                    <a:comboBox id="rsc202_five_class_rule_comb"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>