/* currCode : new Ext.form.TextField({
fieldLabel:'资本币制<font color="red">*</font>',
width:100,
name:'currCode',
readOnly : true,
cls:'x-form-field-readonly',
anchor:'100%'
}),*/
//真正存入数据库的的currcode字段设置为隐藏字段
currCodeAlias : new Ext.ux.BaseDataComboBox({
fieldLabel : "资本币制<font color=red>*</font>",
name : "currCodeAlias",
storeParams:{className:'TCurrCode',author:'',orderBy:' order by {currCode}'},
fields : ['currCode','currName'],
title : "(<font color=black>币制代码</font>)<font color=blue>币制名称</font>",
tpl:'<tpl for="."><div class="x-combo-list-item">({currCode})<font color=blue>{currName}</font></div></tpl>',
disabled : this.readOnly,
allowBlank : false,
upperText : true,
editable : false,
emptyText : '请选择',
selectOnFocus:true,
//valueField:'currName',
directFn: BaseCodeDirectAction.getJsonArrayResultPagesByValues,
listeners : {
change : function(field, newValue, oldValue) {
this.editStatus = "系统正在校验<" + field.fieldLabel + ">,请稍后尝试保存!";
BaseCodeDirectAction.getJsonObjectForBaseData('TCurrCode','currCode',newValue, function(result, e){
this.editStatus = null;
if (!Ext.isEmpty(result)) {
if (result.success) {
field.setValue("");
if (!Ext.isEmpty(result.data) && result.data.length>0) {
var c = '('+result.data[0].currCode+')'+result.data[0].currName;
field.setValue(c);
}
}
}
}.createDelegate(this));
}.createDelegate(this)
}
}),
{xtype:'hidden',name:'currCode'},
// 修改 值 对象文件 添加别名字段 currCodeAlias
private String currCodeAlias ;
//有XML配置需要的 修改对应的XML 添加属性 currCodeAlias 其值由SQL获取 根据的是
currCode的值 如下所示:
<property name="currCodeAlias"
formula="(select '(' || cc.CURR_CODE || ')' || cc.CURR_NAME from EPLATFORM.T_CURR_CODE cc where cc.CURR_CODE = CURR_CODE )"
type="string">
</property>
//保存的时候
onSave : function(){
//企业信息 资本币制
var currCodeAlias = this.mainForm.getForm().findField("currCodeAlias").getValue();
var currCode = currCodeAlias.substring(1,4);
this.mainForm.getForm().findField('currCode').setValue(currCode);
}
//后台代码--- 通过资本币制序号 查找 设显示名给资本币制别人 以显示到列表框
if(list.size()>0){
for(ModifyContent modifyContent :list){
if(modifyContent.getModifyOject().equals("EnterpriseInfo")){
String setName="set"+modifyContent.getItemCode().substring(0, 1).toUpperCase()+modifyContent.getItemCode().substring(1);
doMethod( setName,enterpriseInfo,modifyContent);
}else if(modifyContent.getModifyOject().equals("ManagInfo")){
if(modifyContent.getManagerType().equals("A")){
String setMethodName="set"+modifyContent.getItemCode().substring(0, 1).toUpperCase()+modifyContent.getItemCode().substring(1);
doMethod( setMethodName,managInfo1,modifyContent);
}else if(modifyContent.getManagerType().equals("B")){
String setMethodName="set"+modifyContent.getItemCode().substring(0, 1).toUpperCase()+modifyContent.getItemCode().substring(1);
doMethod( setMethodName,managInfo2,modifyContent);
}else if(modifyContent.getManagerType().equals("C")){
String setMethodName="set"+modifyContent.getItemCode().substring(0, 1).toUpperCase()+modifyContent.getItemCode().substring(1);
doMethod( setMethodName,managInfo3,modifyContent);
}
}
}
if(null!= enterpriseInfo.getCurrCode()){
TCurrCode ccode = (TCurrCode) this.getObject(TCurrCode.class, enterpriseInfo.getCurrCode());
enterpriseInfo.setCurrCodeAlias("("+ccode.getCurrCode()+")"+ccode.getCurrName());
}
分享到:
相关推荐
extjs多选下拉框,Ext.ux.form.LovCombo,extjs 以修复多选下拉框火狐下取不到值的问题,火狐下div不显示背景色的问题
Extjs4.1多个扩展 1、Ext.ux.aceeditor.Panel 2、Ext.ux.grid.feature.Tileview 3、Ext.ux.upload.Button 4、Ext.ux.toggleslide.ToggleSlide 5、Ext.ux.container.ButtonSegment 6、Ext.ux.grid.plugin.RowEditing ...
EXTjs的上传组件
Most configuration options are inherited from Ext.Window (see ExtJs docs). The added ones are: url - the url where to post uploaded files. base_params - additional post params (default to {}). ...
Extjs4 comboboxTree下拉树型菜单,完美支持多选、单选,绝对好用。来源于网络,稍作修改。
ExtJs选中var editor = new Ext.ux.grid.RowEditor详解.txt
Ext.ux.GoogleChart extjs插件Ext.ux.GoogleChart extjs插件
Extjs4实现的Ext.ux.form.TinyMCETextArea html580 inyMCETextArea
NULL 博文链接:https://lingf.iteye.com/blog/1188654
ExtJs4.2没有直接提供下拉树这个组件,但是有例子可以用,文件位置:ext-4.2.1.883\examples\ux\TreePicker.js 但是它有点小毛病吧:默认显示了根节点;达到最小高度时再展开节点,高度不能自动调整。 所以我做了一...
extjs 可编辑的表格树,每个单元格自定义编辑组件,可以自适应列宽,只有源码与例子,运行实例要修改路径,不然图片不能显示,注意etree.jsp的js引入路径 支持Ext2.x以上版本 如运行不了EmailTo : codeme9@gmail....
ExtJS开发插件及Ext包.一个是Spket一个是Ext包
extjs-ux, EXT JS 4的一些插件和扩展 插件和 EXT JS 4扩展 Ext.ux. aceeditor.Panel 演示( 简单): 链接演示( 流 语法): 链接演示:链接论坛:链接 Ext.ux. grid.feature.Tileview 演示:链接
Ext.ux.window.DetailMessageBox 带有可以折叠详细信息的对话框,该扩展组件是基于ExtJS5.1.1版本仿照MessageBox单例窗口编写。会有很多不完善的地方,将在以后的项目中或业余时间中进行修改。 部署扩展 将 ...
Extjs4下拉树菜单 ComboBoxTree 支持单选和多选并且支持展开选中指定节点的通用控件 在项目中已经成熟运用 值得收藏和运用
当树节点较多的时候很好用,具体的可以下载下来试试
Extjs 4.x的插件和扩展Ext.ux.form.field.CodeMirror 可与ExtJS 4.0.7、4.1.x和4.2.x以及CodeMirror 3.20一起使用。 执照:麻省理工学院演示:论坛:Ext.ux.form.field.UploadFileField 执照:麻省理工学院演示:...
Ext.ux.UploadDialog extjs上传文件的组件,免费下载
导出Extjs中的store的数据为excel,前段js导出。 Export store to Excel Well, here's an exporter that can export a grid, tree or simply a store to excel. It's a fork from another project, I adapted it ...
NULL 博文链接:https://atian25.iteye.com/blog/1019910