摘要: 常见的表单布局 var pnForm = new Ext.form.FormPanel({ title:'主体信息', labelAlign: 'right', buttonAlign: 'center', labelWidth: 140, defaults: { autoWidth: true }, padding: 20, fra... 阅读全文
posted @ 2012-06-05 17:09 angus_csh 阅读(467) 评论(0) 推荐(0)
摘要: 表单元素(id必须定义) var txtState = new Ext.form.ComboBox({ fieldLabel: '起运国', id:'txtState', resizable: true, mode: 'local', store: STATENAMEstore, displayField: 'STATENAME', valueField: 'STA... 阅读全文
posted @ 2012-06-05 16:57 angus_csh 阅读(816) 评论(0) 推荐(0)
摘要: 1.首先引用聚合js,css文件 <script src="http://www.cnblogs.com/js/ux/GroupSummary.js" type="text/javascript"></script> <link href="http://www.cnblogs.com/js/ux/css/GroupSummary.css" rel="stylesheet" type="text/css" />2.分组聚合代码如下 var rowNum = n 阅读全文
posted @ 2012-06-05 16:51 angus_csh 阅读(1332) 评论(0) 推荐(0)
摘要: var rowNum = new Ext.grid.RowNumberer({ hidden: false, name: '序号' }); 阅读全文
posted @ 2012-06-05 16:48 angus_csh 阅读(243) 评论(0) 推荐(0)
摘要: 代码如下 var gridArray = new Ext.grid.GridPanel({ title: '选择单据', cm: col, sm: sm, store: store, autoScroll: true, viewConfig: { forceFit: true, columnsText: '显示的列', scrollOffset: 20, sortAscText: '升序', so... 阅读全文
posted @ 2012-06-05 16:47 angus_csh 阅读(248) 评论(0) 推荐(0)
摘要: 记录复选框选中的索引 var sm = gridArray.getSelectionModel(); var rs = sm.getSelections(); var rowIndex=new Array(); rowIndex.clear(); Ext.each(rs, function(item) { rowIndex.push(store.indexOf(item)); }); 这里的索引并非store中的数据而是数据在st... 阅读全文
posted @ 2012-06-05 16:40 angus_csh 阅读(346) 评论(0) 推荐(0)
摘要: 批量对GridPanel添加数据 for(var p=0;p<rs.length;p++) { var record=new Ext.data.Record( { LINENO:rs[p].get("LINENO"), ITEMNO:rs[p].get("ITEMNO"), ITEMNAME:rs[p].get("ITEMNAME"), ... 阅读全文
posted @ 2012-06-05 16:34 angus_csh 阅读(624) 评论(0) 推荐(0)
摘要: 1.添加(设置)单元格样式 function SetMyColumns(value, cell, record, rowIndex, columnIndex, store) { if((columnIndex==9||columnIndex==10)&&gridArray.getStore().getAt(rowIndex).data.ITEMNAME !='总计:') { cell.css = 'x-grid-back-Myellow';//类样式 r... 阅读全文
posted @ 2012-06-05 16:26 angus_csh 阅读(3003) 评论(0) 推荐(0)
摘要: 1.定义表单元素的name属性如下 var HLV = new Ext.form.TextField({ fieldLabel: '汇率', name:'EXCHANGERATE', anchor: '30%' });2.定义数据源 var ExchangeRatestore= new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: 'WsECOTAX01.asmx/SelectExchangeRate', metho... 阅读全文
posted @ 2012-06-05 16:11 angus_csh 阅读(2809) 评论(0) 推荐(0)
摘要: EditorGridPanel编辑事件以及赋值 var gridArray = new Ext.grid.EditorGridPanel({ title:'', height: 350, id:'gridArray', name:'gridArray', sm:sm, colModel: col, clicksToEdit: 1, st... 阅读全文
posted @ 2012-06-05 15:49 angus_csh 阅读(10955) 评论(0) 推荐(0)
摘要: 1.前台js代码var formPanel = new Ext.form.FormPanel({ title: '标识', labelAlign: 'right', buttonAlign: 'center', labelWidth: 80, defaults: { autoWidth: true }, padding: 10, frame: false, border: false, autoScroll: true, fileUpload: true,... 阅读全文
posted @ 2012-06-05 15:31 angus_csh 阅读(4496) 评论(0) 推荐(0)
摘要: 代码如下var MygridArray = new Ext.grid.GridPanel({ store: Mystore, cm: Mycm, autoScroll: true, border: false, columnLines:true, viewConfig: { //forceFit:true, columnsText: '显示的列', scrollOffset: 20, sortAscText: '升序', sortDescText: '降序', getRowClass:function(record,row... 阅读全文
posted @ 2012-06-05 15:20 angus_csh 阅读(283) 评论(0) 推荐(0)
摘要: 1.定义全局变量var cmItems = [];var cmConfig = {};2.具体代码思想 从后台请求"列"数据以及store数组,代码如下 gridTemp.removeAll(); cmItems.clear(); var ItemArr = []; var item = {}; UploadstoreColumns.load({ params: {fileName: document.getElementById("txtFile").value} }); for (var a = 0; a < UploadstoreCol... 阅读全文
posted @ 2012-06-05 15:11 angus_csh 阅读(308) 评论(0) 推荐(0)
摘要: 根据选择"状态模块"数据决定"费用状态"中的数据 var dataStatus = [ ['关税增值税', '关税增值税'], ['进出口票状态', '进出口票状态'], ['进出口杂费', '进出口杂费'], ['进出口杂费结算', '进出口杂费结算'], ['进出口代理费', '进出口代理费'], ['进出口代理费结算', '进出口代理费结算'], [' 阅读全文
posted @ 2012-06-05 14:57 angus_csh 阅读(555) 评论(0) 推荐(0)
摘要: 将表单元素禁用txtOwnerPart.setDisabled(true);txtOwnerPart.removeClass('x-form-text');txtOwnerPart.addClass('form_field_readonly');将表单元素启用txtOwnerPart.setDisabled(false);txtOwnerPart.removeClass('form_field_readonly');txtOwnerPart.addClass('x-form-text'); 阅读全文
posted @ 2012-06-05 14:48 angus_csh 阅读(230) 评论(0) 推荐(0)
摘要: 显示txtOtherBuilding.enable();txtOtherBuilding.getEl().up('.x-form-item').setDisplayed(true);隐藏txtOtherBuilding.disable();txtOtherBuilding.getEl().up('.x-form-item').setDisplayed(false); 阅读全文
posted @ 2012-06-05 14:43 angus_csh 阅读(546) 评论(0) 推荐(0)
摘要: 1.代码块View Code var smCompetetor = new Ext.grid.CheckboxSelectionModel({ handleMouseDown: Ext.emptyFn }); var cmCompetetor = new Ext.grid.ColumnModel([ smCompetetor, { header: jsonDataDictionary.labJZDSMC, dataIndex: 'CompetetorName', sortable: true ... 阅读全文
posted @ 2012-06-05 14:39 angus_csh 阅读(2546) 评论(0) 推荐(0)
摘要: 代码实现 var sm = new Ext.grid.CheckboxSelectionModel({singleSelect : false,renderer:function(v, p, record) { if (record.get('ITEMNAME') == '总计:'){ return ''; ... 阅读全文
posted @ 2012-06-05 14:20 angus_csh 阅读(2307) 评论(0) 推荐(0)
摘要: 1.js代码View Code //grid导出exlfunction outputAddress(grid, strMethod) { try { var xls = new ActiveXObject("Excel.Application"); } catch (e) { alert("要打印该表,您必须安装Excel电子表格软件,同时浏览器须使用“ActiveX 控件”,您的浏览器须允许执行控件。 请点击【帮助】了解浏览器设置方法!"); return; } xls.visible = true; //设置excel... 阅读全文
posted @ 2012-06-05 14:12 angus_csh 阅读(9527) 评论(0) 推荐(2)
摘要: 除法函数,用来得到精确的除法结果说明:javascript的除法结果会有误差,在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。调用:accDiv(arg1,arg2)返回值:arg1除以arg2的精确结果function accDiv(arg1, arg2) { var t1 = 0, t2 = 0, r1, r2; try { t1 = arg1.toString().split(".")[1].length } catch (e) { } try { t2 = arg2.toString().split(".")[1].length 阅读全文
posted @ 2012-06-05 14:04 angus_csh 阅读(358) 评论(0) 推荐(0)
摘要: 下载文件View Code parent.location.href弹出全屏窗口View Code function openWin(formUrl) { var hWnd hWnd = window.open(formUrl, '', 'height=' + new String(screen.availHeight - 28) + ',top=0,left=0,width=' + new String(screen.availWidth - 10) + ',location=no,menubar=no,resizable=yes,to 阅读全文
posted @ 2012-06-05 13:59 angus_csh 阅读(212) 评论(0) 推荐(0)
摘要: 文章:http://www.cnblogs.com/over140/archive/2009/06/15/1503712.html环境:Microsoft Visual Studio 20081. 打开宏资源管理器:视图 ->其他窗口->宏资源管理器2. 创建一个新模块3. 编辑宏: 选中模块 -> 右键编辑View Code Option Strict OffOption Explicit OffImports SystemImports EnvDTEImports EnvDTE80Imports System.DiagnosticsImports System.Colle 阅读全文
posted @ 2012-06-05 13:39 angus_csh 阅读(11437) 评论(0) 推荐(0)
摘要: View Code <html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="X-UA-Compatible" content="IE=7" /><meta http-equiv="content-type" content="text/html; charset=gb2312" /><script type=&q 阅读全文
posted @ 2012-06-05 13:20 angus_csh 阅读(415) 评论(0) 推荐(0)
摘要: 1.Struts代码 <package name="portalInfoFlash" namespace="/pana/portal/IndexFlash" extends="struts-default"> <action name="Flash_*" class="iFlashAction" method="{1}"> <result name="view">/WEB-INF/pages/pana/portal/in 阅读全文
posted @ 2012-06-05 11:59 angus_csh 阅读(1881) 评论(0) 推荐(0)
摘要: 1.首先先从前台jsp页面代码开始分析View Code <%@ page language="java" pageEncoding="UTF-8"%><%@taglib prefix="s" uri="/struts-tags"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title></title> 阅读全文
posted @ 2012-06-05 10:46 angus_csh 阅读(506) 评论(0) 推荐(0)