hls_cashflow_item_company.lview 6.72 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-2-26 下午2:37:49  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query defaultWhereClause="v.code=&apos;HLS005_CF_STATUS&apos; and v.code_value=&apos;RELEASE&apos;" model="basic.sys_code_default_value" rootPath="cf_status_default_record"/>
    </a:init-procedure>
    <a:view>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <a:link id="bmLink_loadCashflowItem" model="hls.HLS006.hls_cashflow_item_company" modelaction="execute"/>
        <script type="text/javascript"><![CDATA[
        	
        	
        
        
        function cashflowItemScreen_quit() {
            location.href = $('sys_service_welcome_link').getUrl();
        }
    	
        function cashflowItemDs_grid_query() {
            $('cashflowItemDs').query();
        }
        
        function cashflowItemDs_grid_add() {
            $('cashflowItemDs_grid').showEditorByRecord($('cashflowItemDs').create());
        }
        
        function cashflowItemDs_grid_clear() {
            $('cashflowItemDs_grid').clear();
        }
        
        function cashflowItemDs_grid_save() {
            var result_ds = $('cashflowItemDs');
            if (result_ds.validate()) {
                result_ds.submit();
            }
        }
        
        function editorFunction_cashflowItemDs_grid(record,name)
        {
            if(record.isNew)
            {
                if(name=='cf_item')
                {
                    return 'cashflowItemDs_grid_lov';
                }
                return '';
            }
            return '';
        }
        
        function cashflowItem_load()
        {
            Leaf.request({
                url: $('bmLink_loadCashflowItem').getUrl(),
                success: function (res)
                {
                    $('cashflowItemDs').query();
                },
                scope: this
            });
        }
        
        
        ]]></script>
        <a:dataSets>
            <a:dataSet id="nc_cf_item_ds" lookupCode="NC_CF_ITEM"/>
            <a:dataSet id="cf_status_ds" lookupCode="HLS005_CF_STATUS"/>
            <a:dataSet id="cashflowItemScreen_basicDs" loadData="true" model="basic.sys_session_info">
                <a:fields>
                    <a:field name="company_short_name" readOnly="true"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="cashflowItemDs" autoQuery="true" model="hls.HLS006.hls_cashflow_item_company" pageSize="20" selectable="true">
                <a:fields>
                    <a:field name="default_cf_status" defaultValue="${/model/cf_status_default_record/record/@code_value}"/>
                    <a:field name="default_cf_status_desc" defaultValue="${/model/cf_status_default_record/record/@code_value_name}" displayField="code_value_name" options="cf_status_ds" required="true" returnField="default_cf_status" valueField="code_value"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="calc_penalty" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="cf_item" lovGridHeight="300" lovHeight="500" lovService="hls.HLS005.hls_cashflow_item_v_lov" lovWidth="850" required="true" title="HLS005.HLS_CASHFLOW_ITEM.CF_ITEM">
                        <a:mapping>
                            <a:map from="cf_item" to="cf_item"/>
                            <a:map from="cf_item_desc" to="cf_item_desc"/>
                            <a:map from="cf_direction" to="cf_direction"/>
                            <a:map from="cf_direction_desc" to="cf_direction_desc"/>
                            <a:map from="cf_type" to="cf_type"/>
                            <a:map from="cf_type_desc" to="cf_type_desc"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="ref_v01_n" displayField="code_value_name" options="nc_cf_item_ds" returnField="ref_v01" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="cashflowItemScreen_quit" text="HLS.EXIT"/>
                <a:gridButton click="cashflowItemDs_grid_query" text="HLS.QUERY"/>
                <a:gridButton click="cashflowItemDs_grid_add" text="HLS.NEW"/>
                <a:gridButton click="cashflowItemDs_grid_clear" text="HLS.CLEAR"/>
                <a:gridButton click="cashflowItemDs_grid_save" text="HLS.SAVE"/>
                <a:gridButton click="cashflowItem_load" text="HLS.IMPORT"/>
            </a:screenTopToolbar>
            <a:form title=" ">
                <a:textField name="company_short_name" bindTarget="cashflowItemScreen_basicDs" prompt="HLS.COMPANY_SHORT_NAME"/>
            </a:form>
            <a:grid id="cashflowItemDs_grid" bindTarget="cashflowItemDs" marginHeight="180" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="cf_item" align="right" editorFunction="editorFunction_cashflowItemDs_grid" width="80"/>
                    <a:column name="cf_item_desc" width="150"/>
                    <a:column name="cf_type" align="right" width="80"/>
                    <a:column name="cf_type_desc" width="150"/>
                    <a:column name="cf_direction_desc" width="100"/>
                    <a:column name="default_cf_status_desc" editor="cashflowItemDs_grid_comb"/>
                    <a:column name="write_off_order" align="right" editor="cashflowItemDs_grid_nf_integer" width="100"/>
                    <a:column name="calc_penalty" editor="cashflowItemDs_grid_check"/>
                    <a:column name="billing_desc" editor="cashflowItemDs_grid_tf" width="150"/>
                    <a:column name="enabled_flag" editor="cashflowItemDs_grid_check" width="80"/>
                    <a:column name="ref_v01_n" editor="nc_cf_item_com" prompt="NC现金流量项目" width="200"/>
                </a:columns>
                <a:editors>
                    <a:textField id="cashflowItemDs_grid_tf_upper" maxLength="30" typeCase="upper"/>
                    <a:textField id="cashflowItemDs_grid_tf"/>
                    <a:numberField id="cashflowItemDs_grid_nf_integer" allowDecimals="false"/>
                    <a:checkBox id="cashflowItemDs_grid_check"/>
                    <a:comboBox id="cashflowItemDs_grid_comb"/>
                    <a:lov id="cashflowItemDs_grid_lov"/>
                    <a:comboBox id="nc_cf_item_com"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>