aut_trx_user_bp.lview 7.23 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 147 148 149 150 151 152 153 154 155 156 157 158
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2013-11-29 上午10:07:22  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="basic.hls_sys_time_default_value" rootPath="default_value_path"/>
    </a:init-procedure>
    <a:view template="default">
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
            function queryFunction() {
                $('aut_trx_user_bp_ds').query();
            }
            
            function aut_103_back() {
                $('${/parameter/@winId}').close();
            }
            
            function aut_103_next() {
                history.go(1);
            }
            
            function aut_103_quit() {
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }
            
            function aut_103_grid_add() {
                var grid=$('aut_trx_user_bp_grid');
                var index=$('aut_trx_user_bp_ds').indexOf($('aut_trx_user_bp_ds').getCurrentRecord());
                $('aut_trx_user_bp_grid').showEditorByRecord(2,$('aut_trx_user_bp_ds').create(index+1));
            }
            
            function aut_103_grid_clear() {
                $('aut_trx_user_bp_grid').clear();
            }
            
            function aut_103_grid_delete() {
                $('aut_trx_user_bp_grid').remove();
            }
            
            function aut_103_grid_submit() {
                $('aut_trx_user_bp_ds').submit();
            }
            
            
            function aut103trxCategoryFunction(record,name){
			    if(record.isNew){
                    return 'aut103_grid_comb';
                }else{
                    return '';
                }
			}
			
			function aut103lovFunction(record,name){
			    if(record.isNew){
                    return 'aut103_grid_lov';
                }else{
                    return '';
                }
			}
			
			function trx_id_ef(record,name){
			    if(record.isNew){
                    return 'aut103_grid_tf';
                }else{
                    return '';
                }
			}
			
			function aut_trx_user_bp_ds_add(ds,record){
			    record.set('trx_category','${/parameter/@trx_category}');
			    record.set('trx_category_desc','${/parameter/@trx_category_desc}');
			}
			
			function aut103_trx_id_ef(record,name){
			    if(record.isNew){
                    return 'aut103_grid_lov';
                }else{
                    return '';
                }
			}
        ]]></script>
        <a:dataSets>
            <a:dataSet id="aut_trx_user_query_ds">
                <a:fields>
                    <a:field name="trx_number"/>
                    <a:field name="trx_name"/>
                    <a:field name="user_desc"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="aut_trx_user_bp_ds" autoPageSize="true" autoQuery="true" model="aut.AUT103.aut_trx_user_authorize" queryDataSet="aut_trx_user_query_ds" queryUrl="${/request/@context_path}/autocrud/aut.AUT103.aut_trx_user_bp_query/query" selectable="true">
                <a:fields>
                    <a:field name="trx_category"/>
                    <a:field name="trx_category_desc"/>
                    <a:field name="trx_number" lovGridHeight="350" lovHeight="550" lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" required="true">
                        <a:mapping>
                            <a:map from="bp_id" to="trx_id"/>
                            <a:map from="bp_code" to="trx_number"/>
                            <a:map from="bp_name" to="trx_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="user_id" required="true"/>
                    <a:field name="user_desc" autoComplete="true" lovGridHeight="350" lovHeight="550" lovService="basic.sys_user_for_lov" lovWidth="550" prompt="AUT_TRX_USER_AUTHORIZE.USER_ID" required="true" title="AUT103.USER_ID">
                        <a:mapping>
                            <a:map from="description" to="user_desc"/>
                            <a:map from="employee_name" to="user_employee_name"/>
                            <a:map from="user_id" to="user_id"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="user_employee_name"/>
                    <a:field name="start_date" defaultValue="${/model/default_value_path/record/@now_time}" required="true"/>
                    <a:field name="end_date" defaultValue="${/model/default_value_path/record/@never_date}"/>
                </a:fields>
                <a:events>
                    <a:event name="add" handler="aut_trx_user_bp_ds_add"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="aut_103_back" text="HLS.RETURN"/>
                <a:gridButton click="queryFunction" text="HLS.QUERY"/>
                <a:gridButton click="aut_103_grid_add" text="HLS.NEW"/>
                <!-- <a:gridButton click="aut_103_grid_delete" text="HLS.REMOVE"/> -->
                <a:gridButton click="aut_103_grid_clear" text="HLS.CLEAR"/>
                <a:gridButton click="aut_103_grid_submit" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:form column="3" title="HLS.QUERY_TITLE">
                <a:textField name="trx_number" bindTarget="aut_trx_user_query_ds" prompt="AUT103.TRX_NUMBER"/>
                <a:textField name="trx_name" bindTarget="aut_trx_user_query_ds" prompt="AUT103.TRX_NAME"/>
                <a:textField name="user_desc" bindTarget="aut_trx_user_query_ds" prompt="AUT_TRX_USER_AUTHORIZE.USER_ID"/>
            </a:form>
            <a:grid id="aut_trx_user_bp_grid" bindTarget="aut_trx_user_bp_ds" marginHeight="200" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="trx_category_desc" prompt="AUT103.TRX_CATEGORY" width="120"/>
                    <a:column name="trx_number" editorFunction="aut103_trx_id_ef" prompt="AUT103.TRX_NUMBER" width="120"/>
                    <a:column name="trx_name" prompt="AUT103.TRX_NAME" width="150"/>
                    <a:column name="trx_id" prompt="AUT103.TRX_ID" width="100"/>
                    <a:column name="user_desc" editorFunction="aut103lovFunction" prompt="AUT_TRX_USER_AUTHORIZE.USER_ID" width="100"/>
                    <a:column name="user_employee_name" prompt="EXP_EMPLOYEES.NAME"/>
                    <a:column name="start_date" editor="aut103_datepicker_lov" prompt="HLS.START_DATE" renderer="Leaf.formatDate"/>
                    <a:column name="end_date" editor="aut103_datepicker_lov" prompt="HLS.END_DATE" renderer="Leaf.formatDate"/>
                </a:columns>
                <a:editors>
                    <a:textField id="aut103_grid_tf"/>
                    <a:comboBox id="aut103_grid_comb"/>
                    <a:lov id="aut103_grid_lov"/>
                    <a:datePicker id="aut103_datepicker_lov"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>