<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: ouyangzhaochang2663 $ $Date: 2010/11/15 07:47:59 $ $Revision: 1.4 $ $Purpose: 科目结构定义 --> <a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true"> <a:init-procedure><![CDATA[ ]]></a:init-procedure> <a:view> <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/> <a:screen-include screen="modules/hls/hls_common_javascript.lview"/> <script type="text/javascript"><![CDATA[ function queryStructure(){ $('gld_coa_structure_result_ds').query(); } function fnd_2130_grid_add(){ $('gld_coa_structure_grid').showEditorByRecord($('gld_coa_structure_result_ds').create()); } function fnd_2130_grid_clear(){ $('gld_coa_structure_grid').clear(); } function fnd_2130_grid_submit() { var result_ds = $('gld_coa_structure_result_ds'); if (result_ds.validate()) { result_ds.submit(); } } function fnd_2130_next(){ history.go(1); } function fnd_2130_back(){ history.go(-1); } function fnd_2130_quit(){ location.href = $('sys_service_welcome_link').getUrl(); parent.shMenu('show'); } function structureCodeEdit(record,name){ if(record.isNew){ if(name=='coa_structure_code'){ return 'coa_structure_code_grid_tf'; } if(name=='structure_format'){ return 'structure_format_grid_tf'; } } return ''; } function structureFormatValidator(record, name, value){ var valid = true; value = String(value) for (var i=0;i<value.length;i++){ if (value.substr(i,1)!='9'&& value.substr(i,1)!='.'){ Leaf.showMessage('${l:PROMPT}','${l:COURSE_STRUCTURE_FORMAT_ERROR}',null,420); valid = '${l:COURSE_STRUCTURE_FORMAT_ERROR}'; break; } } return valid; } function reset(){ $('gld_coa_structure_query_ds').reset(); } ]]></script> <a:dataSets> <a:dataSet id="gld_coa_structure_query_ds" model="gld.gld_coa_structure"/> <a:dataSet id="gld_coa_structure_result_ds" autoQuery="true" fetchAll="false" model="gld.gld_coa_structure" notification="有数据没有保存" pageSize="15" queryDataSet="gld_coa_structure_query_ds" selectable="true"> <a:fields> <a:field name="coa_structure_code" required="true" validator="hlsCommon_validateCode"/> <a:field name="structure_format" required="true" validator="structureFormatValidator"/> <a:field name="description" required="true"/> <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> </a:fields> </a:dataSet> </a:dataSets> <a:screenBody> <a:screenTopToolbar> <a:gridButton click="fnd_2130_quit" text="HLS.EXIT"/> <a:gridButton click="queryStructure" text="HLS.QUERY"/> <a:gridButton click="fnd_2130_grid_add" text="HLS.NEW"/> <a:gridButton click="fnd_2130_grid_clear" text="HLS.CLEAR"/> <a:gridButton click="fnd_2130_grid_submit" text="HLS.SAVE"/> </a:screenTopToolbar> <a:grid id="gld_coa_structure_grid" bindTarget="gld_coa_structure_result_ds" height="490" marginWidth="20" navBar="true" width="1000"> <a:columns> <a:column name="coa_structure_code" align="left" editorFunction="structureCodeEdit" sortable="true" width="150"/> <a:column name="structure_format" align="left" editorFunction="structureCodeEdit" sortable="true" width="200"/> <a:column name="description" align="left" editor="description_grid_tf" width="220"/> <a:column name="enabled_flag" align="center" editor="description_grid_ckb"/> </a:columns> <a:editors> <a:textField id="coa_structure_code_grid_tf" typeCase="upper"/> <a:textField id="structure_format_grid_tf"/> <a:textField id="description_grid_tf"/> <a:checkBox id="description_grid_ckb"/> </a:editors> </a:grid> </a:screenBody> </a:view> </a:screen>