gld_currency.lview 6.21 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ouyangzhaochang2663 $
    $Date: 2010/11/15 07:47:59 $
    $Revision: 1.2 $
    $Purpose: 币种定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query autoCount="false" fetchAll="true" model="gld.FND1070.gld_currency_message_query" rootPath="messageQuery"/>
    </a:init-procedure>
    <a:view>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
            function queryCurrency() {
                $('gld_currency_result_ds').query();
            }
            
            function resetCurrency() {
                $('gld_currency_query_ds').reset();
            }
            
            function fnd_1050_grid_submit() {
                var result_ds = $('gld_currency_result_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            
            function fnd_1050_next() {
                history.go(1);
            }
            
            function fnd_1050_back() {
                history.go(-1);
            }
            
            function fnd_1050_quit() {
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }
            
            function onPrecisionValuesChange(cmp, newValue, oldValue) {
                if (newValue < oldValue) {
                    var confirm = new Leaf.showConfirm("${l:PROMPT}", "${l:GLD_CURRENCY_SYS_MESSAGE_1}", function() {
                        confirm.close();
                    }, null);
                }
            }
            
            function onTransactionValuesChange(cmp, newValue, oldValue) {
                if (newValue < oldValue) {
                    var confirm = new Leaf.showConfirm("${l:PROMPT}", "${l:GLD_CURRENCY_SYS_MESSAGE_1}", function() {
                        confirm.close();
                    }, null);
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="enabled_flag_ds" lookupCode="ENABLED_STATUS"/>
            <a:dataSet id="gld_currency_query_ds" autoCreate="true" model="gld.gld_currency">
                <a:fields>
                    <a:field name="enabled_flag_desc" displayField="code_value_name" options="enabled_flag_ds" returnField="enabled_flag" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="gld_currency_result_ds" autoCount="true" autoQuery="true" fetchAll="false" model="gld.gld_currency" pageSize="15" queryDataSet="gld_currency_query_ds" selectable="true">
                <a:fields>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="fnd_1050_back" text="HLS.BACK"/>
                <a:gridButton click="fnd_1050_next" text="HLS.FORWARD"/>
                <a:gridButton click="fnd_1050_quit" text="HLS.EXIT"/>
                <a:gridButton click="fnd_1050_grid_submit" text="HLS.SAVE"/>
                <a:gridButton click="queryCurrency" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:form column="4" title="HAP_QUERY_TITLE">
                <a:textField name="currency_code" bindTarget="gld_currency_query_ds" typeCase="upper">
                    <a:events>
                        <a:event name="enterdown" handler="queryCurrency"/>
                    </a:events>
                </a:textField>
                <a:textField name="currency_name" bindTarget="gld_currency_query_ds">
                    <a:events>
                        <a:event name="enterdown" handler="queryCurrency"/>
                    </a:events>
                </a:textField>
                <a:textField name="country_name" bindTarget="gld_currency_query_ds" prompt="GLD_CURRENCY.COUNTRY_NAME">
                    <a:events>
                        <a:event name="enterdown" handler="queryCurrency"/>
                    </a:events>
                </a:textField>
                <a:comboBox name="enabled_flag_desc" bindTarget="gld_currency_query_ds" prompt="HLS.ENABLED_FLAG">
                    <a:events>
                        <a:event name="enterdown" handler="queryCurrency"/>
                    </a:events>
                </a:comboBox>
            </a:form>
            <a:grid id="grid" bindTarget="gld_currency_result_ds" marginHeight="180" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="currency_code" align="left" sortable="true"/>
                    <a:column name="currency_name" align="left"/>
                    <a:column name="country_name" align="left" prompt="GLD_CURRENCY.COUNTRY_NAME" width="300"/>
                    <a:column name="precision" align="right" editor="gld_currency_result_grid_nf"/>
                    <a:column name="transaction_precision" align="right" editor="gld_currency_result_transaction_grid_nf" sortable="true"/>
                    <a:column name="currency_symbol" align="left" editor="gld_currency_result_grid_tf" sortable="true"/>
                    <a:column name="enabled_flag" align="center" editor="gld_currency_result_grid_cb"/>
                </a:columns>
                <a:editors>
                    <a:numberField id="gld_currency_result_grid_nf" allowDecimals="false">
                        <a:events>
                            <a:event name="change" handler="onPrecisionValuesChange"/>
                        </a:events>
                    </a:numberField>
                    <a:numberField id="gld_currency_result_transaction_grid_nf" allowDecimals="false">
                        <a:events>
                            <a:event name="change" handler="onTransactionValuesChange"/>
                        </a:events>
                    </a:numberField>
                    <a:textField id="gld_currency_result_grid_tf"/>
                    <a:checkBox id="gld_currency_result_grid_cb"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>