<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: DJ $Date: 2013-2-26 下午2:37:49 $Revision: 1.0 $Purpose: configScreen --> <a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:view> <a:link id="bmLink_configScreen_load" model="hls.HLS030.hls_doc_layout_config" modelaction="execute"/> <a:link id="bmLink_configScreen_reload" model="hls.HLS030.hls_doc_layout_config" modelaction="batch_update"/> <script type="text/javascript"><![CDATA[ function configScreen_getTabType() { var config = { 0: 'H', 1: 'L_BP', 2: 'L_AST' }; return config[$('configScreen_tab').selectedIndex]; } function configScreen_getDs() { var config = { 'H': 'configScreen_headDs', 'L_BP': 'configScreen_lineBpDs', 'L_AST': 'configScreen_lineAstDs' }; return config[configScreen_getTabType()]; } function configScreen_query() { var dsName = configScreen_getDs(); $(dsName).query(); } function configScreen_save() { var dsName = configScreen_getDs(); var ds = $(dsName); if (ds.validate()) { ds.submit(); } } function configScreen_close() { $('hls_fin_calc_config').close(); } function configScreen_load() { Leaf.request({ url: $('bmLink_configScreen_load').getUrl(), para: { layout_code: '${/parameter/@layout_code}' }, success: function(res) { Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); $('configScreen_headDs').query(); $('configScreen_lineBpDs').query(); $('configScreen_lineAstDs').query(); }, scope: this }); } function configScreen_reload() { var tab = $('configScreen_tab'); var dsName = configScreen_getDs(); var records = $(dsName).getSelected(); if (records.length == 0) { Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.SELECT_RECORD}'); return; } var datas = []; for (var i = 0;i < records.length;i++) { datas[i] = { config_id: records[i].get('config_id'), layout_code: '${/parameter/@layout_code}', _status: 'insert' }; } Leaf.request({ url: $('bmLink_configScreen_reload').getUrl(), para: datas, success: function(res) { Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); configScreen_query(); }, scope: this }); } function tab_select(tab, index) { if (index == 0) { $('configScreen_headDs').query(); } else if (index == 1) { $('configScreen_lineBpDs').query(); } else if (index == 2) { $('configScreen_lineAstDs').query(); } } function onSubmitSuccess_configScreen_headDs(ds) { ds.query(); } function onSubmitSuccess_configScreen_lineBpDs(ds) { ds.query(); } function onSubmitSuccess_configScreen_lineAstDs(ds) { ds.query(); } ]]></script> <a:dataSets> <a:dataSet id="configScreen_alignmentDs" lookupCode="HLS050_ALIGNMENT"/> <a:dataSet id="configScreen_inputModeDs" lookupCode="HLS050_INPUT_MODE"/> <a:dataSet id="configScreen_validationTypeDs" lookupCode="HLS050_VALIDATION_TYPE"/> <a:dataSet id="configScreen_headDs" autoQuery="true" fetchAll="true" model="hls.HLS030.hls_doc_layout_config" queryUrl="${/request/@context_path}/autocrud/hls.HLS030.hls_doc_layout_config/query?layout_area_seq=H&layout_code=${/parameter/@layout_code}" selectable="true"> <a:fields> <a:field name="config_id"/> <a:field name="layout_code" defaultValue="${/parameter/@layout_code}"/> <a:field name="data_type_display" readOnly="true"/> <a:field name="input_mode_display" displayField="code_value_name" options="configScreen_inputModeDs" returnField="input_mode" valueField="code_value"/> <a:field name="validation_type_display" displayField="code_value_name" options="configScreen_validationTypeDs" returnField="validation_type" valueField="code_value"/> <a:field name="system_flag" checkedValue="Y" readOnly="true" uncheckedValue="N"/> <a:field name="display_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="key_field_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="lov_return_vcode" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="zero_fill" checkedValue="TRUE" defaultValue="TRUE" uncheckedValue="FALSE"/> <a:field name="allow_format" checkedValue="TRUE" defaultValue="TRUE" uncheckedValue="FALSE"/> <a:field name="allow_decimal" checkedValue="TRUE" defaultValue="TRUE" uncheckedValue="FALSE"/> <a:field name="percent" checkedValue="%" defaultValue="%" uncheckedValue=""/> <a:field name="alignment_display" displayField="code_value_name" options="configScreen_alignmentDs" returnField="alignment" valueField="code_value"/> </a:fields> <a:events> <a:event name="submitsuccess" handler="onSubmitSuccess_configScreen_headDs"/> </a:events> </a:dataSet> <a:dataSet id="configScreen_lineBpDs" autoQuery="true" fetchAll="true" model="hls.HLS030.hls_doc_layout_config" queryUrl="${/request/@context_path}/autocrud/hls.HLS030.hls_doc_layout_config/query?layout_area_seq=L_BP&layout_code=${/parameter/@layout_code}" selectable="true"> <a:fields> <a:field name="config_id"/> <a:field name="layout_code" defaultValue="${/parameter/@layout_code}"/> <a:field name="data_type_display" readOnly="true"/> <a:field name="input_mode_display" displayField="code_value_name" options="configScreen_inputModeDs" returnField="input_mode" valueField="code_value"/> <a:field name="validation_type_display" displayField="code_value_name" options="configScreen_validationTypeDs" returnField="validation_type" valueField="code_value"/> <a:field name="system_flag" checkedValue="Y" readOnly="true" uncheckedValue="N"/> <a:field name="display_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="key_field_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="lov_return_vcode" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="zero_fill" checkedValue="TRUE" defaultValue="TRUE" uncheckedValue="FALSE"/> <a:field name="allow_format" checkedValue="TRUE" defaultValue="TRUE" uncheckedValue="FALSE"/> <a:field name="allow_decimal" checkedValue="TRUE" defaultValue="TRUE" uncheckedValue="FALSE"/> <a:field name="percent" checkedValue="%" defaultValue="%" uncheckedValue=""/> <a:field name="alignment_display" displayField="code_value_name" options="configScreen_alignmentDs" returnField="alignment" valueField="code_value"/> </a:fields> <a:events> <a:event name="submitsuccess" handler="onSubmitSuccess_configScreen_lineBpDs"/> </a:events> </a:dataSet> <a:dataSet id="configScreen_lineAstDs" autoQuery="true" fetchAll="true" model="hls.HLS030.hls_doc_layout_config" queryUrl="${/request/@context_path}/autocrud/hls.HLS030.hls_doc_layout_config/query?layout_area_seq=L_AST&layout_code=${/parameter/@layout_code}" selectable="true"> <a:fields> <a:field name="config_id"/> <a:field name="layout_code" defaultValue="${/parameter/@layout_code}"/> <a:field name="data_type_display" readOnly="true"/> <a:field name="input_mode_display" displayField="code_value_name" options="configScreen_inputModeDs" returnField="input_mode" valueField="code_value"/> <a:field name="validation_type_display" displayField="code_value_name" options="configScreen_validationTypeDs" returnField="validation_type" valueField="code_value"/> <a:field name="system_flag" checkedValue="Y" readOnly="true" uncheckedValue="N"/> <a:field name="display_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="key_field_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="lov_return_vcode" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="zero_fill" checkedValue="TRUE" defaultValue="TRUE" uncheckedValue="FALSE"/> <a:field name="allow_format" checkedValue="TRUE" defaultValue="TRUE" uncheckedValue="FALSE"/> <a:field name="allow_decimal" checkedValue="TRUE" defaultValue="TRUE" uncheckedValue="FALSE"/> <a:field name="percent" checkedValue="%" defaultValue="%" uncheckedValue=""/> <a:field name="alignment_display" displayField="code_value_name" options="configScreen_alignmentDs" returnField="alignment" valueField="code_value"/> </a:fields> <a:events> <a:event name="submitsuccess" handler="onSubmitSuccess_configScreen_lineAstDs"/> </a:events> </a:dataSet> </a:dataSets> <a:screenBody> <a:screenTopToolbar> <a:gridButton click="configScreen_close" text="HLS.CLOSE"/> <a:gridButton click="configScreen_save" text="HLS.SAVE"/> <a:gridButton click="configScreen_query" text="HLS.QUERY"/> <a:gridButton click="configScreen_load" text="HLS050.BUTTON.LOAD"/> <a:gridButton click="configScreen_reload" text="HLS050.BUTTON.RELOAD"/> </a:screenTopToolbar> <a:tabPanel id="configScreen_tab" marginHeight="120" marginWidth="30"> <a:tabs> <a:tab prompt="HLS050.HEAD_TITLE" selected="true"> <a:grid id="configScreen_headDs_grid" bindTarget="configScreen_headDs" marginHeight="170" marginWidth="60"> <a:columns> <a:column name="column_code" autoAdjust="false" width="60"/> <a:column name="column_name" autoAdjust="false" width="150"/> <a:column name="data_type_display" autoAdjust="false" width="35"/> <a:column name="system_flag" autoAdjust="false" editor="configScreen_headDs_grid_check" width="35"/> <a:column name="enabled_flag" autoAdjust="false" editor="configScreen_headDs_grid_check" width="35"/> <a:column name="display_flag" autoAdjust="false" editor="configScreen_headDs_grid_check" width="35"/> <a:column name="prompt" autoAdjust="false" editor="configScreen_headDs_grid_tf" width="100"/> <a:column name="display_order" align="right" autoAdjust="false" editor="configScreen_headDs_grid_tf" width="40"/> <a:column name="input_mode_display" autoAdjust="false" editor="configScreen_headDs_grid_comb" width="60"/> <a:column name="validation_type_display" autoAdjust="false" editor="configScreen_headDs_grid_comb" width="80"/> <a:column name="allow_decimal" autoAdjust="false" editor="configScreen_headDs_grid_check" width="35"/> <a:column name="precision" autoAdjust="false" editor="configScreen_headDs_grid_integer_nf" width="35"/> <a:column name="zero_fill" autoAdjust="false" editor="configScreen_headDs_grid_check" width="35"/> <a:column name="allow_format" autoAdjust="false" editor="configScreen_headDs_grid_check" width="40"/> <a:column name="key_field_flag" autoAdjust="false" editor="configScreen_headDs_grid_check" width="60"/> <a:column name="lov_return_vcode" autoAdjust="false" editor="configScreen_headDs_grid_check" width="80"/> <a:column name="percent" align="right" autoAdjust="false" editor="configScreen_headDs_grid_check" width="40"/> <a:column name="alignment_display" autoAdjust="false" editor="configScreen_headDs_grid_comb" width="60"/> <a:column name="validation_sql" autoAdjust="false" editor="configScreen_headDs_grid_tf" width="100"/> <a:column name="default_value" autoAdjust="false" editor="configScreen_headDs_grid_tf" width="60"/> <a:column name="lower_limit" align="right" autoAdjust="false" editor="configScreen_headDs_grid_nf" width="35"/> <a:column name="upper_limit" align="right" autoAdjust="false" editor="configScreen_headDs_grid_nf" width="35"/> </a:columns> <a:editors> <a:textField id="configScreen_headDs_grid_tf"/> <a:comboBox id="configScreen_headDs_grid_comb"/> <a:lov id="configScreen_headDs_grid_lov"/> <a:checkBox id="configScreen_headDs_grid_check"/> <a:numberField id="configScreen_headDs_grid_integer_nf" allowDecimals="false"/> <a:numberField id="configScreen_headDs_grid_nf" allowDecimals="false"/> </a:editors> </a:grid> </a:tab> <a:tab prompt="商业伙伴"> <a:grid id="configScreen_lineBpDs_grid" bindTarget="configScreen_lineBpDs" marginHeight="170" marginWidth="60"> <a:columns> <a:column name="column_code" autoAdjust="false" width="60"/> <a:column name="column_name" autoAdjust="false" width="150"/> <a:column name="data_type_display" autoAdjust="false" width="35"/> <a:column name="system_flag" autoAdjust="false" editor="configScreen_lineBpDs_grid_check" width="35"/> <a:column name="enabled_flag" autoAdjust="false" editor="configScreen_lineBpDs_grid_check" width="35"/> <a:column name="display_flag" autoAdjust="false" editor="configScreen_lineBpDs_grid_check" width="35"/> <a:column name="prompt" autoAdjust="false" editor="configScreen_lineBpDs_grid_tf" width="100"/> <a:column name="display_order" align="right" autoAdjust="false" editor="configScreen_lineBpDs_grid_tf" width="40"/> <a:column name="input_mode_display" autoAdjust="false" editor="configScreen_lineBpDs_grid_comb" width="60"/> <a:column name="validation_type_display" autoAdjust="false" editor="configScreen_lineBpDs_grid_comb" width="80"/> <a:column name="allow_decimal" autoAdjust="false" editor="configScreen_headDs_grid_check" width="35"/> <a:column name="precision" autoAdjust="false" editor="configScreen_lineBpDs_grid_integer_nf" width="35"/> <a:column name="zero_fill" autoAdjust="false" editor="configScreen_lineBpDs_grid_check" width="35"/> <a:column name="allow_format" autoAdjust="false" editor="configScreen_lineBpDs_grid_check" width="40"/> <a:column name="key_field_flag" autoAdjust="false" editor="configScreen_headDs_grid_check" width="60"/> <a:column name="lov_return_vcode" autoAdjust="false" editor="configScreen_headDs_grid_check" width="80"/> <a:column name="percent" align="right" autoAdjust="false" editor="configScreen_lineBpDs_grid_check" width="40"/> <a:column name="alignment_display" autoAdjust="false" editor="configScreen_lineBpDs_grid_comb" width="60"/> <a:column name="width" align="right" autoAdjust="false" editor="configScreen_lineBpDs_grid_integer_nf" width="60"/> <a:column name="validation_sql" autoAdjust="false" editor="configScreen_lineBpDs_grid_tf" width="100"/> <a:column name="default_value" autoAdjust="false" editor="configScreen_lineBpDs_grid_tf" width="60"/> <a:column name="lower_limit" align="right" autoAdjust="false" editor="configScreen_lineBpDs_grid_nf" width="35"/> <a:column name="upper_limit" align="right" autoAdjust="false" editor="configScreen_lineBpDs_grid_nf" width="35"/> </a:columns> <a:editors> <a:textField id="configScreen_lineBpDs_grid_tf"/> <a:comboBox id="configScreen_lineBpDs_grid_comb"/> <a:lov id="configScreen_lineBpDs_grid_lov"/> <a:checkBox id="configScreen_lineBpDs_grid_check"/> <a:numberField id="configScreen_lineBpDs_grid_integer_nf" allowDecimals="false"/> <a:numberField id="configScreen_lineBpDs_grid_nf" allowDecimals="false"/> </a:editors> </a:grid> </a:tab> <a:tab prompt="资产"> <a:grid id="configScreen_lineAstDs_grid" bindTarget="configScreen_lineAstDs" marginHeight="170" marginWidth="60"> <a:columns> <a:column name="column_code" autoAdjust="false" width="60"/> <a:column name="column_name" autoAdjust="false" width="150"/> <a:column name="data_type_display" autoAdjust="false" width="35"/> <a:column name="system_flag" autoAdjust="false" editor="configScreen_lineAstDs_grid_check" width="35"/> <a:column name="enabled_flag" autoAdjust="false" editor="configScreen_lineAstDs_grid_check" width="35"/> <a:column name="display_flag" autoAdjust="false" editor="configScreen_lineAstDs_grid_check" width="35"/> <a:column name="prompt" autoAdjust="false" editor="configScreen_lineAstDs_grid_tf" width="100"/> <a:column name="display_order" align="right" autoAdjust="false" editor="configScreen_lineAstDs_grid_tf" width="40"/> <a:column name="input_mode_display" autoAdjust="false" editor="configScreen_lineAstDs_grid_comb" width="60"/> <a:column name="validation_type_display" autoAdjust="false" editor="configScreen_lineAstDs_grid_comb" width="80"/> <a:column name="allow_decimal" autoAdjust="false" editor="configScreen_headDs_grid_check" width="35"/> <a:column name="precision" autoAdjust="false" editor="configScreen_lineAstDs_grid_integer_nf" width="35"/> <a:column name="zero_fill" autoAdjust="false" editor="configScreen_lineAstDs_grid_check" width="35"/> <a:column name="allow_format" autoAdjust="false" editor="configScreen_lineAstDs_grid_check" width="40"/> <a:column name="key_field_flag" autoAdjust="false" editor="configScreen_headDs_grid_check" width="60"/> <a:column name="lov_return_vcode" autoAdjust="false" editor="configScreen_headDs_grid_check" width="80"/> <a:column name="percent" align="right" autoAdjust="false" editor="configScreen_lineAstDs_grid_check" width="40"/> <a:column name="alignment_display" autoAdjust="false" editor="configScreen_lineAstDs_grid_comb" width="60"/> <a:column name="width" align="right" autoAdjust="false" editor="configScreen_lineAstDs_grid_integer_nf" width="60"/> <a:column name="validation_sql" autoAdjust="false" editor="configScreen_lineAstDs_grid_tf" width="100"/> <a:column name="default_value" autoAdjust="false" editor="configScreen_lineAstDs_grid_tf" width="60"/> <a:column name="lower_limit" align="right" autoAdjust="false" editor="configScreen_lineAstDs_grid_nf" width="35"/> <a:column name="upper_limit" align="right" autoAdjust="false" editor="configScreen_lineAstDs_grid_nf" width="35"/> </a:columns> <a:editors> <a:textField id="configScreen_lineAstDs_grid_tf"/> <a:comboBox id="configScreen_lineAstDs_grid_comb"/> <a:lov id="configScreen_lineAstDs_grid_lov"/> <a:checkBox id="configScreen_lineAstDs_grid_check"/> <a:numberField id="configScreen_lineAstDs_grid_integer_nf" allowDecimals="false"/> <a:numberField id="configScreen_lineAstDs_grid_nf" allowDecimals="false"/> </a:editors> </a:grid> </a:tab> </a:tabs> </a:tabPanel> </a:screenBody> </a:view> </a:screen>