程序开发遇到问题总结

时间:2024.9.10

1. 打印

function(){

var records = grid.getSelectedRecords();

var len = records.length;

if (typeof(records) != 'undefined') {

if(len > 0){

var reportFile= 'guiji/gz_tqyw/wbzc.raq';

var param =

'a001='+records[0].get('a001')+';do16='+records[0].get('d016'); atwasoft.common.lib.DirectShowPreview(reportFile,param); }else{

Ext.Msg.show({

title : '提示!',

msg : '请选择一条记录!',

width : 320,

buttons : Ext.MessageBox.OK,

icon : Ext.MessageBox.INFO

});

}

}

}

2. 视图/确定按钮

function(){

var panelform=advanceForm.getForm();

var dwbm=panelform.findField('dwbm').getValue();

var hdrq=panelform.findField('hdrq').getRawValue();

var tqzck=panelform.findField('tqzck').getValue();

var dlrxm=panelform.findField('dlrxm').getValue();

var dlrsfz=panelform.findField('dlrsfz').getValue();

var hrdwkhyh=panelform.findField('hrdwkhyh').getValue();

var hrdwyhzh=panelform.findField('hrdwyhzh').getValue();

var YHBM=panelform.findField('YHBM').getValue();

var zphm=panelform.findField('zphm').getValue();

var fjzs=panelform.findField('fjzs').getValue();

var v_zcje=panelform.findField('v_zcje').getValue();

if(dwbm==null||dwbm.trim()==""){

Ext.Msg.show({

title: '提示!',

msg: "单位账号不能为空",

width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

return;

}

if(tqzck==null||String(tqzck).trim()==""){

Ext.Msg.show({

title: '提示!',

msg: "提取暂存款金额不能为空!", width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

return;

}

if(tqzck<=0||tqzck>v_zcje){

Ext.Msg.show({

title: '提示!',

msg: "提取暂存款金额不在允许范围内!", width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

return;

}

if(hdrq==null||String(hdrq).trim()==""){

Ext.Msg.show({

title: '提示!',

msg: "提取日期不能为空",

width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

return;

}

// alert(YHBM);

if(YHBM==null||YHBM.trim()==""){

Ext.Msg.show({

title: '提示!',

msg: "提取银行不能为空",

width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

return;

}

Gz_Tqyw_ZckthAppDirect.gz_Gr_Bfzqqc_Add

(dwbm,String(hdrq),parseFloat(tqzck),dlrxm,String(dlrsfz),hrdwkhyh,String(hrdwyhzh),YHBM,String(zphm),String(fjzs),function(result,e){

if(result.success){

Ext.MessageBox.show({title:'提示',msg:result.msg,modal:true,buttons:Ext.Msg.OK, icon:Ext.Msg.INFO,width:250,closable:false});

btnQd.disable();

panelform.findField('dwbm').setDisabled(true);

panelform.findField('hdrq').setDisabled(true);

panelform.findField('tqzck').setDisabled(true);

panelform.findField('hrdwkhyh').setDisabled(true);

panelform.findField('dlrxm').setDisabled(true);

panelform.findField('YHBM').setDisabled(true);

panelform.findField('fjzs').setDisabled(true);

panelform.findField('zphm').setDisabled(true);

panelform.findField('dlrsfz').setDisabled(true);

panelform.findField('hrdwyhzh').setDisabled(true);

btnDypt.setDisabled(false);

}else{

Ext.MessageBox.show({title:'提示',msg:result.msg,modal:true,buttons:Ext.Msg.OK, icon:Ext.Msg.INFO,width:250,closable:false});

}

});

}

3. 获得视图字段值

function(){

var records = grid.getSelectedRecords();

var xmmc = panel.document.params.xmmc;

xmbm=panel.document.params.xmbm;

if(records.length > 0){

var id = records[0].get('id');

MixkyApp.desktop.openDocument('waGdxmgl.docJsydghxkzDel',id,{'XMBM':xmbm,'XMMC':xmmc});

}else{

Ext.MessageBox.show({titel:'提示',msg:"请选择一条记录!",

modal:true,buttons:Ext.Msg.OK,icon:Ext.Msg.INFO,width:250,closable:false});

}

}

4. 报表传空格问题

bm_a003.setCbwdbm((map.get("cbwdcx") == null || "".equals(map.get("cbwdcx"))) ? " ": map.get("cbwdcx").toString());

5. 打印按钮下拉设置。

打印

配置{

disabled : false,

xtype : "menu",

}

操作函数[btnGz_prt_djb, btnGz_prt_qc]

打印清册

配置{

hideInToolbar : true,

hideInContextMenu : true,

}

打印开户表

配置{

hideInToolbar : true,

hideInContextMenu : true,

}

6.

/*新增视图配置属性queryresetscript:属性用来编写视图查询重置条件脚本。*///如果想点击重置后日期拦里继续保持日期就用此属性 目前仅限视图!

var gjdbm=advanceForm.getForm().findField('gjdbmcx');

gjdbm.store.load();//让归集点下的方法从新加载一边

7. 视图金额控制

{

align : "right",

renderer : "function(v, params, record){\n return Ext.util.Format.number(record.data.p010,'0,000.00');\n}",

}

8. var cobGjd = form.getForm().findField('GJDBM') ;

var cobBM = form.getForm().findField('BM') ;

cobGjd.store.on('load',function(){

cobGjd.setValue(cobGjd.store.getAt(0).get('value')) ;

cobBM.setValue(cobGjd.getValue());

}) ;

cobGjd.on('select',function(){

cobBM.setValue(cobGjd.getValue());

}) ;

9. 文档控制

function(){

var doc=this.document;

var documentid=this.document.documentid;

var btn = this;

var panelform=this.document.get(0).get(0).getForm();

var BM =panelform.findField('BM').getValue();

var MC =panelform.findField('MC').getValue();

var YHBM =panelform.findField('YHBM').getValue();

var GJDBM =panelform.findField('GJDBM').getValue();

var WDQC =panelform.findField('WDQC').getValue();

var WDDZ =panelform.findField('WDDZ').getValue();

var LXDH =panelform.findField('LXDH').getValue();

var CZDH =panelform.findField('CZDH').getValue();

var YHZH_GJ =panelform.findField('YHZH_GJ').getValue();

var YHZH_TQ =panelform.findField('YHZH_TQ').getValue();

var YHZH_DKFF =panelform.findField('YHZH_DKFF').getValue();

var YHZH_DKHS =panelform.findField('YHZH_DKHS').getValue();

var YZBM =panelform.findField('YZBM').getValue();

var FDDBR =panelform.findField('FDDBR').getValue();

if (BM==null||BM.length!=6){

Ext.MessageBox.show({titel:'提示',msg:"编码输入有误,请检查!",

modal:true,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING,width:250,closable:false}); return;

}else{

if (WDQC.length==0){

Ext.MessageBox.show({titel:'提示',msg:"请输入银行全称!",

modal:true,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING,width:250,closable:false}); return;

}else{

if (YHBM.length==0){

Ext.MessageBox.show({titel:'提示',msg:"请输入所属银行!",

modal:true,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING,width:250,closable:false}); return;

}else{

if (MC.length==0){

Ext.MessageBox.show({titel:'提示',msg:"请输入名称!",

modal:true,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING,width:250,closable:false}); return;

}

}

}

}

if(true){

Ext.MessageBox.confirm('操作提示', '您确定要存盘吗?', function(btn1){ if(btn1 == 'yes'){

Gz_Xtxxsz_CbwdszAppDirect.gz_Cbwdbm_Chg(BM.toString(),MC.toString(),YHBM.toString(),

GJDBM.toString(),WDQC.toString(),WDDZ.toString(),LXDH.toString(),CZDH.toString(),

YHZH_GJ.toString(),YHZH_TQ.toString(),YHZH_DKFF.toString(),YHZH_DKHS.toString

(),YZBM.toString(),

FDDBR.toString(),function(result,e){

Ext.Msg.show({

title: '提示!',

msg: result.msg,

width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

doc.afterDocumentUpdate();

MixkyApp.desktop.closeAppDocument('guiji','gz_xtxxsz.docT1',documentid); });

}else{

return false;

}

});

}

}

10. 视图,批量录入

function(){

var records = grid.getSelectedRecords();

len = records.length;

if(len<=0){

Ext.Msg.show({

title: '提示!',

msg: "请选择要存盘的记录!",

width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

return;

}

var v_b001 = "";

var v_b006 = "";

var v_b007 = "1";

var gjdbm=advanceForm.getForm().findField('gjdbm');

//归集点加载

if(Ext.isDefined(gjdbm)){

gjdbm.setEditable(false);

gjdbm.store.on('load',function(){

if(gjdbm.store.getCount() > 0){

var record = gjdbm.store.getAt(0); //获取下拉框数据的第一条 gjdbm.setValue(record.get('value'));

var bm1=gjdbm.getValue();

panel.wdload(bm1,' ');

panel.rqload(bm1);

}

});

}

CommonAppDirect.getGz_ywrq(gjdbm.getValue(),function(result,e){ v_b006 = result.ywrq;

for(var i = 0; i < records.length; i++){

v_b001 += records[i].get("b001")+",";

}

v_b001 = v_b001.substring(0,v_b001.length-1);

var mparams = {v_b001:v_b001,v_b006:v_b006,v_b007:v_b007};

Gz_JCBGAppDirect.gz_Dw_Jcbg_Sp(mparams,function(result,e){ if(result.success){

Ext.Msg.show({

title: '提示!',

msg:result.msg,

width: 320,

buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO });

// MixkyApp.desktop.closeAppDocument('guiji',

'gz_jcbg.docBgsp',documentid);

panel.refresh(panel.initParams);

}else{

Ext.Msg.show({

title: '提示!',

msg:result.msg,

width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

}

});

});

}

11. 附加JS脚本或JSP调后台代码

Gz_Grzhgl_GrxxbgAppDirect.getGzgrcx(dwzh,zgzh,function(result,e){

if(result.success){

form.getForm().findField('GRDJH').setValue(result.grdjh);

}

});

12. 文档,附加JS。较复杂,包括连动,及缴存比例分割,以及截取下拉框项,条用后台方

法。

var dwbm = form.getForm().findField('v_a003') ;

var dwmc = form.getForm().findField('v_a004') ;

var jcblbm=form.getForm().findField('v_a097');

var grjcl=form.getForm().findField('v_a063');//个人缴存率%

var dwjcl=form.getForm().findField('v_a064');//单位缴存率%

var czbtl=form.getForm().findField('v_a105');//财政缴存率%

var bcjcl=form.getForm().findField('v_a101');//补充缴存率%

var jzny=form.getForm().findField('v_b008');//变更开始年月

var bglb= form.getForm().findField('v_b012');

var bghjcl= form.getForm().findField('v_b097');//变更后缴存比例

var bghjsny= form.getForm().findField('v_b009');//变更结束年月

//var zgrs= form.getForm().findField('v_b107');//变更人数

// var ycje= form.getForm().findField('v_b108');//变更金额

var jcjesx= form.getForm().findField('v_b109');//缴存金额上限

var bghgrjcl= form.getForm().findField('v_b063');//变更后个人缴存率%

var bghdwjcl= form.getForm().findField('v_b064');//变更后单位缴存率%

var bghczjcl= form.getForm().findField('v_b105');//变更后财政缴存率%

var bghbcjcl= form.getForm().findField('v_b101');//变更后补充缴存率%

var bgsqcl=form.getForm().findField('v_b014');//变更申请材料

var s_b002 =form.getForm().findField('v_b002');//申请日期

var s_b015=form.getForm().findField('v_b015');//变更申请原因

var s_b016=form.getForm().findField('v_b016');//变更申请事项

var s_b021=form.getForm().findField('v_b021');//初审意见

var mqjcsx=form.getForm().findField('mqjcsx');//目前缴存上限

var mqjcxx=form.getForm().findField('mqjcxx');//目前缴存下限

var bghjcblTemp=form.getForm().findField('bghjcblTemp');//接收变更后缴存比例临时变量

bghgrjcl.setReadOnly(true);

bghdwjcl.setReadOnly(true);

bghczjcl.setReadOnly(true);

bghbcjcl.setReadOnly(true);

bghjcl.setReadOnly(true);

jzny.setReadOnly(true);

bghjsny.setReadOnly(true);

// zgrs.setReadOnly(true);

//ycje.setReadOnly(true);

jcjesx.setReadOnly(true);

var gjdbm='';//归集点编码值

var jcblbmTemp='';//目前缴存比例临时变量

var doc = panel.document;

var items = doc.getBottomToolbar().items;

var button;

for (var i = 0; i < items.getCount(); i++) {

if (items.get(i).key == 'gz_jcbg.docAddBgsq.btnSave') {

button = items.get(i);

}

}

button.setDisabled(true);

bghjcl.store.on('load',function(){

var i=0;

if('03'==bglb.getValue()){

for(i=0;i<bghjcl.store.getCount();i++){

var record1 = bghjcl.store.getAt(i);

bghjcl.setValue(record1.get('value'));

//bghjcl.store.removeAt(i);

var arrrecord = bghjcl.getRawValue().split("|");

//alert(arrrecord);

bghdwjcl.setValue(formatenum(arrrecord[1], 6)*100);

bghgrjcl.setValue(formatenum(arrrecord[2], 6)*100);

bghczjcl.setValue(formatenum(arrrecord[3], 6)*100);

bghbcjcl.setValue(formatenum(arrrecord[4], 6)*100);

s_a063=grjcl.getValue();//个人缴存率%

s_a064=dwjcl.getValue();//单位缴存率%

s_a105=czbtl.getValue();//财政缴存率%

s_a101=bcjcl.getValue();//补充缴存率%

if((parseFloat(bghdwjcl.getValue())>parseFloat(s_a064)) (parseFloat(bghgrjcl.getValue())>parseFloat(s_a063))

|| (parseFloat(bghczjcl.getValue())>parseFloat(s_a105)) (parseFloat(bghbcjcl.getValue())>parseFloat(s_a101))){

bghjcl.store.removeAt(i--);

}

}

}

if('04'==bglb.getValue()){

for(i=0;i<bghjcl.store.getCount();i++){

var record1 = bghjcl.store.getAt(i);

bghjcl.setValue(record1.get('value'));

var arrrecord = bghjcl.getRawValue().split("|");

bghdwjcl.setValue(formatenum(arrrecord[1], 6)*100);

bghgrjcl.setValue(formatenum(arrrecord[2], 6)*100);

bghczjcl.setValue(formatenum(arrrecord[3], 6)*100);

bghbcjcl.setValue(formatenum(arrrecord[4], 6)*100);

s_a063=grjcl.getValue();//个人缴存率%

s_a064=dwjcl.getValue();//单位缴存率%

s_a105=czbtl.getValue();//财政缴存率%

s_a101=bcjcl.getValue();//补充缴存率%

if((parseFloat(bghdwjcl.getValue())<parseFloat(s_a064)) (parseFloat(bghgrjcl.getValue())<parseFloat(s_a063))

|| (parseFloat(bghczjcl.getValue())<parseFloat(s_a105)) (parseFloat(bghbcjcl.getValue())<parseFloat(s_a101))){ || || || ||

bghjcl.store.removeAt(i--);

}

}

}

if(bghjcl.store.getCount() > 0){

var record = bghjcl.store.getAt(0);

bghjcl.setValue(record.get('value'));

panel.jcblbSelect();

}

});

dwbm.on("change",function(t,n,o){

if(n.trim()==""){

dwbm.setValue("");

dwmc.setValue("");

return;

}

panel.getDwxx();

});

panel.getMqJcblmc=function(){

Gz_JCBGAppDirect.gz_Dw_Jcbg_MqJcblmc(gjdbm,jcblbmTemp,function(result1,e){ if(result1.success){

bghjcblTemp.setValue(result1.jcbl);

var arrrecord = bghjcblTemp.getRawValue().split("|");

jcblbm.setValue(result1.jcbl);

dwjcl.setValue(formatenum(arrrecord[1], 6)*100);

grjcl.setValue(formatenum(arrrecord[2], 6)*100);

czbtl.setValue(formatenum(arrrecord[3], 6)*100);

bcjcl.setValue(formatenum(arrrecord[4], 6)*100);

}

});

}

panel.getDwxx=function(){

CommonAppDirect.getDwxx(dwbm.getValue(),function(result,e){

if(result.success){

dwbm.setValue(result.bm);

dwmc.setValue(result.mc);

jzny.setValue(result.jzny);

bglb.setValue("");

//zgrs.setValue(result.zgrs);

//ycje.setValue(result.yjcze); jcjesx.setValue(0); gjdbm=result.gjdbm; jcblbmTemp=result.jcblbm; bghjsny.setValue(""); bghjcl.setValue(""); bghgrjcl.setValue(""); bghdwjcl.setValue(""); bghczjcl.setValue(""); bghbcjcl.setValue(""); s_b015.setValue(""); s_b016.setValue(""); s_b021.setValue(""); //zgrs.setReadOnly(true); //ycje.setReadOnly(true); jcjesx.setReadOnly(true); bghjsny.setReadOnly(true); bghjcl.setReadOnly(true); CommonAppDirect.getGz_ywrq(gjdbm,function(result,e){ if(result.success){ s_b002.setValue(result.ywrq); }else{ panel.msgshow("申请日期查询失败!"); } }); CommonAppDirect.getXtcs("19",gjdbm,function(result2,e){ if(result2=="0"){ s_b002.setReadOnly(false); }else{ s_b002.setReadOnly(true); } }); panel.getMqJcblmc(); }else{ Ext.Msg.show({ title: '提示!', msg: "单位账号不存在!", width: 320, buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO });

dwbm.setValue("");

dwmc.setValue("");

jcblbm.setValue("");

grjcl.setValue("");

dwjcl.setValue("");

czbtl.setValue("");

bcjcl.setValue("");

jzny.setValue("");

bglb.setValue("");

bghjcl.setValue("");

bghgrjcl.setValue("");

bghdwjcl.setValue("");

bghczjcl.setValue("");

bghbcjcl.setValue("");

//zgrs.setValue("");

//ycje.setValue("");

jcjesx.setValue("");

bghjsny.setValue("");

s_b002.setValue("");

s_b015.setValue("");

s_b016.setValue("");

s_b021.setValue("");

//zgrs.setReadOnly(true);

//ycje.setReadOnly(true);

jcjesx.setReadOnly(true);

bghjsny.setReadOnly(true);

bghjcl.setReadOnly(true); }

});

}

bglb.on("select",function(combo,record,index){ if(bglb.getValue().trim()!=""){

if('03'==bglb.getValue() || '04'==bglb.getValue()){ bghjcl.setReadOnly(false);

if(''!=gjdbm){

var p_gjdbm = {gjdbm : gjdbm};

Ext.apply(bghjcl.store.baseParams,p_gjdbm); bghjcl.store.load();

}else{

Ext.Msg.show({

title: '提示!',

msg: "请选择单位账号!",

width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

if('03'!=bglb.getValue()){

bglb.setValue("");

}

}

}else{

bghjcl.setReadOnly(true);//不可用

bghjcl.setValue("");

bghgrjcl.setValue("");

bghdwjcl.setValue("");

bghczjcl.setValue("");

bghbcjcl.setValue("");

}

if('02'==bglb.getValue() || '03'==bglb.getValue()){

bghjsny.setReadOnly(false);//可用

}else{

bghjsny.setReadOnly(true);//不可用

}

if('05'==bglb.getValue()&&''!=gjdbm){

// zgrs.setReadOnly(false);

//ycje.setReadOnly(false);

Gz_JCBGAppDirect.gz_sxx(dwbm.getValue(),function(result,e){//g if(result.success){

mqjcsx.setValue(result.ycjesx);

mqjcxx.setValue(result.ycjexx);

}

});

jcjesx.setReadOnly(false);

}else{

// zgrs.setReadOnly(true);

//ycje.setReadOnly(true);

jcjesx.setReadOnly(true);

}

if('10'==bglb.getValue()){

Gz_JCBGAppDirect.gz_sxx(dwbm.getValue(),function(result,e){//g if(result.success){

mqjcsx.setValue(result.ycjesx);

mqjcxx.setValue(result.ycjexx);

}

});

jcjesx.setReadOnly(false);

}

}

});

bghjcl.on('select', function(c, r, i) {

panel.jcblbSelect();

});

panel.jcblbSelect=function(){

if (bghjcl.getValue() == "9999") {

bghdwjcl.setReadOnly(false);

bghgrjcl.setReadOnly(false);

bghczjcl.setReadOnly(false);

bghbcjcl.setReadOnly(false);

} else {

var arrrecord = bghjcl.getRawValue().split("|");

bghdwjcl.setValue(formatenum(arrrecord[1], 6)*100);

bghgrjcl.setValue(formatenum(arrrecord[2], 6)*100);

bghczjcl.setValue(formatenum(arrrecord[3], 6)*100);

bghbcjcl.setValue(formatenum(arrrecord[4], 6)*100);

s_a063=grjcl.getValue();//个人缴存率%

s_a064=dwjcl.getValue();//单位缴存率%

s_a105=czbtl.getValue();//财政缴存率%

s_a101=bcjcl.getValue();//补充缴存率%

if('03'==bglb.getValue()){

if((parseFloat(bghdwjcl.getValue())>parseFloat(s_a064)) (parseFloat(bghgrjcl.getValue())>parseFloat(s_a063)) ||

|| (parseFloat(bghczjcl.getValue())>parseFloat(s_a105)) || (parseFloat(bghbcjcl.getValue())>parseFloat(s_a101))){

Ext.Msg.show({

title: '提示!',

msg: '您当前的变更类别为“降低比例”,请选择低于当前缴存比例的标准!',

width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

}

}else if('04'==bglb.getValue()){

if((parseFloat(bghdwjcl.getValue())<parseFloat(s_a064)) || (parseFloat(bghgrjcl.getValue())<parseFloat(s_a063))

|| (parseFloat(bghczjcl.getValue())<parseFloat(s_a105)) || (parseFloat(bghbcjcl.getValue())<parseFloat(s_a101))){

Ext.Msg.show({

title: '提示!',

msg: '您当前的变更类别为“提高比例”,请选择高于当前缴存比例的标准!',

width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO

});

}

}

bghdwjcl.setReadOnly(true);

bghgrjcl.setReadOnly(true);

bghczjcl.setReadOnly(true);

bghbcjcl.setReadOnly(true);

}

}

// 格式化数字 后补0

function formatenum(Source, Length) {

var tmpstr = "";

if (Source != "0") {

for (var i = 0; i < Length - Source.length; i++) {

tmpstr = tmpstr + "0";

}

} else {

Source = "0.";

for (var i = 0; i < Length - Source.length; i++) {

tmpstr = tmpstr + "0";

}

}

return Source + tmpstr;

}

form.getForm().on('actioncomplete', function(f, a){

button.setDisabled(false);

});

//验证

s_b015.on('change', function(f, n, o) {

if((''!= s_b015.getValue())&&(''==(s_b015.getValue().replace(/[\d]/g,'')))){ Ext.Msg.show({

title: '提示!',

msg: '请输入不大于100个字符长度的汉字或英文!', width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO,

fn:function(){

s_b015.focus (false,100);

}

});

return ;

}

if(100<s_b015.getValue().length){

Ext.Msg.show({

title: '提示!',

msg: '请输入不大于100个字符长度的汉字或英文!', width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO,

fn:function(){

s_b015.focus (false,100);

}

});

return ;

}

});

s_b016.on('change', function(f, n, o) {

if((''!= s_b016.getValue())&&(''==(s_b016.getValue().replace(/[\d]/g,'')))){ Ext.Msg.show({

title: '提示!',

msg: '请输入不大于10个字符长度的汉字或英文!', width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO,

fn:function(){

s_b016.focus (false,100);

}

});

return ;

}

if(10<s_b016.getValue().length){

Ext.Msg.show({

title: '提示!',

msg: '请输入不大于10个字符长度的汉字或英文!', width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO,

fn:function(){

s_b016.focus (false,100);

}

});

return ;

}

});

s_b021.on('change', function(f, n, o) {

if((''!= s_b021.getValue())&&(''==(s_b021.getValue().replace(/[\d]/g,'')))){ Ext.Msg.show({

title: '提示!',

msg: '请输入不大于30个字符长度的汉字或英文!', width: 320,

buttons: Ext.MessageBox.OK,

icon: Ext.MessageBox.INFO,

fn:function(){

s_b021.focus (false,100);

}

});

return ;

}

if(30<s_b021.getValue().length){

Ext.Msg.show({

title: '提示!',

msg: '请输入不大于30个字符长度的汉字或英文!', width: 320,

buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO,

fn:function(){

s_b021.focus (false,100);

}

});

return ;

}

});

bghjsny.on('change', function(f, n, o) {

if (!atwa.date.IsyyyyMM(n)) {

Ext.Msg.show({

title : '提示!',

msg : "月度格式错误",

width : 250,

buttons : Ext.MessageBox.OK,

icon : Ext.MessageBox.INFO

});

bghjsny.setValue(o);

}else{

panel.ydbj();

}

});

panel.ydbj = function(){

if(bghjsny.getValue()<jzny.getValue()){

Ext.Msg.show({

title : '提示!',

msg : "变更开始年月应该在变更结束年月之前!", width : 250,

buttons : Ext.MessageBox.OK,

icon : Ext.MessageBox.INFO

});

bghjsny.setValue("");

return false;

}

}

panel.msgshow = function(msg) {

Ext.Msg.show({

title : '提示!',

msg : msg,

width : 320,

buttons : Ext.MessageBox.OK,

icon : Ext.MessageBox.INFO

});

return false;

}

13. 选择视图某列,从视图列中取值,以及向文档传值 function(){

var records = grid.getSelectedRecords();

if(records.length != 1){

Ext.MessageBox.show({

title:'提示',

msg:"请选择需要修改的提取申请记录!", modal:true,

buttons:Ext.Msg.OK,

icon:Ext.Msg.INFO,

width:250,

closable:false

});

return;

}

var v_pzid = records[0].get('d019');

var v_tqid = records[0].get('id');

if(v_pzid.trim()=="合计"){

Ext.MessageBox.show({

title:'提示',

msg:"请选择需要修改的提取申请记录!", modal:true,

buttons:Ext.Msg.OK,

icon:Ext.Msg.INFO,

width:250,

closable:false

});

return;

}

var v_d006 = records[0].get('tqyybm');

var v_a075 = records[0].get('a075');

var v_tqlx = v_d006.substring(0,2);

if(v_d006=="0101"){

MixkyApp.desktop.openDocument('gz_tqyw.docTqspXx0101',-1,{pzid:v_pzid,d006:v_d006,a075:v_a075,tqid:v_tqid});

}else if(v_d006=="0102"){

MixkyApp.desktop.openDocument('gz_tqyw.docTqspXx0102',-1,{pzid:v_pzid,d006:v_d006,a075:v_a075,tqid:v_tqid});

}else if(v_d006=="0103"){

MixkyApp.desktop.openDocument('gz_tqyw.docTqspXx0103',-1,{pzid:v_pzid,d006:v_d006,a075:v_a075,tqid:v_tqid});

}else if(v_d006=="0107"){

MixkyApp.desktop.openDocument('gz_tqyw.docTqspXx0107',-1,{pzid:v_pzid,d006:v_d006,a075:v_a075,tqid:v_tqid});

}else if(v_tqlx=="02"){

MixkyApp.desktop.openDocument('gz_tqyw.docTqspXxxhtq',-1,{pzid:v_pzid,d006:v_d006,a075:v_a075,tqid:v_tqid});

}else{

MixkyApp.desktop.openDocument('gz_tqyw.docTqspXx',-1,{pzid:v_pzid,d006:v_d006,a075:v_a075,tqid:v_tqid});

}

}

14. 获得视图向文档传过来的值,以及关闭文档,及mparams方式向后台传参数。 function(){

var doc=this.document;

var btnSave = this;

var form=this.document.get(0).get(0);

var panel=this.document.get(0);

var documentid=this.document.documentid;

var v_tqid = form.getForm().findField('tqid');

var v_sprq = form.getForm().findField('sprq');

var v_spyj = form.getForm().findField('spyj');

if(v_spyj.getValue().trim()==""){

panel.msgshow("审批意见不能为空!");

v_spyj.focus(true);

return false;

}

btnSave.disable();

//var params = form.getForm().getFieldValues();

//var mparams = {};

//for(i in params){

// if(params[i] != ''){

// mparams[i] = params[i];

// }

//}

var mparams = {tqid : v_tqid.getValue(),sprq : v_sprq.getRawValue(),spyj : v_spyj.getValue()};

Gz_Tqyw_TqspAppDirect.Gz_Gr_Tqqc_Sp_DG(mparams,function(result,e){

if(result.success){

panel.msgshow(result.msg);

btnSave.enable();

Ext.getCmp(doc.openerId).refresh();

MixkyApp.desktop.closeAppDocument('guiji', 'gz_tqyw.docTqspXx',documentid); Ext.MessageBox.confirm('操作提示', '存盘成功,是否打印?', function(btn){ if(btn == 'yes'){

var reportFile= 'guiji/gz_tqyw/plspWbzcpz.raq';

var param = 'id='+result.tqid;

atwasoft.common.lib.DirectShowPreview(reportFile,param);

}

});

}else{

panel.msgshow(result.msg);

btnSave.enable();

}

});

}

15. 后台,临时表的形式从后台取数

/**

int i = Integer.parseInt(pmt.getUserid()) ; spx.add(new StringValue(pmt.getGjdbm())); // p1归集点 spx.add(new StringValue(pmt.getCbwdbm())); // p2承办网点编码 * 账号变更查询 2011-05-11 hrx * * @param Zhbgcx * @return */ public List<Row> openGZ_DW_BGHZ_CX(Object obj) throws Zhbgcx pmt = (Zhbgcx) obj; SqlParameterExt spx = null; short ret; List list = null; try { spx = new SqlParameterExt(); CallDbException {

spx.add(new StringValue(pmt.getDwbm())); // p3单位账号 //spx.add(new

DateValue(DateUtil.Str2Date(pmt.getBgny().substring(0, 6)))); // p4变更年月

} catch (Exception e) { String bgny=pmt.getBgny().substring(0, spx.add(new StringValue(bgny)); // p4变更年月 4)+pmt.getBgny().substring(5,7); spx.add(new IntValue(i)); // p5用户ID } catch (Exception e) { } String s = "P_GZ_DW_BGHZ_CX(?p1,?p2,?p3,?p4,?p5)"; try { String table_name = "tmp_gz_dw_bghz_cx"; bo.setSqlParameterExt(spx); list = bo.queryProcedureToList(s, table_name); throw new CallDbException(e.getMessage());

throw new CallDbException("执行方法[openGZ_DW_BGHZ_CX]出错" +e.getMessage());

}

Gzdw gzdw = DataFactory.createService().getDocumentService("", "gzdw");

int ret = gzdw.gzDwDeptcodeChg(bma093).getRet();

0-成功,2-部门名称已存在 99-失败

程序开发遇到问题总结

// } return list; 16. 调后台,得到一个返回值调后台,得到一个返回值。 17. 视图中放置视图的方法

18.

比较全的一个视图Jsp页面

程序开发遇到问题总结

<!-- 封存办理批量录入清册-->

<%@ page contentType="text/html; charset=utf-8"%>

<%@ page import="java.util.List"%>

<%@ page import="com.google.gson.JsonObject"%>

<%@ page import="com.anization.dao.User"%>

<%@ page

import="com.mixky.engine.certification.MixkyUserCertification"%> <%@ page import="com.mixky.engine.design.view.ViewDataService"%> <%@ page import="com.mixky.engine.design.view.View"%>

<%@ page import="com.mixky.engine.design.view.Column"%>

<%@ page import="com.mixky.engine.authority.AuthorityDataService"%> <%@ page import="com.mixky.engine.design.DesignObjectLoader"%>

<%@ page import="com.mixky.engine.design.document.DocumentManager"%> <%@ page import="com.mixky.engine.design.document.Document"%> <%@ page import="com.mixky.app.ApplicationParameters"%>

<%

%>

<script language='javascript'>

Ext.onReady(function(){ String panelid = request.getParameter("panelid"); //String appkey = request.getParameter("appkey"); String appkey = Document document = (Document)request.getAttribute("document"); String documentid = request.getParameter("documentid"); User user = (User)request.getAttribute("user"); String dwbm=request.getParameter("dwbm")==null?" ApplicationParameters.instance().getApplicationCode(); ":request.getParameter("dwbm").trim();

var panel = Ext.getCmp('<%=panelid%>'); var app = Mixky.wasoft.cache.Applications['<%=appkey%>']; var win = panel.findParentByType('window'); panel.getFieldValue = function(name){ var field = advanceForm.getForm().findField(name); if(field){ } var advanceForm = new Ext.form.FormPanel({ return field.getValue(); } region : 'north',

split : true,

collapseMode:'mini',

height : 150,

maxSize : 500,

minSize : 100,

border : false, padding : 5, autoScroll : false, items : { xtype:'fieldset', buttonAlign : 'center', buttons : [{ text : '搜索', iconCls : 'icon-sys-confirm', handler : function(){ } panel.doAdvanceQuery(); },{ text : '存盘', iconCls : 'icon-sys-confirm', handler : function(){ //var records = grid.getSelectedRecords(); var records = panel.getRecord(); var a001_arr = ""; var a070_arr = ""; var a002_arr = ""; var v_dwbm = dwzh.getValue(); if (typeof(records) != 'undefined') { var len = records.length; if(records.length == 0){

Ext.Msg.show({

title : '提示!', msg : "请选择职工!", width : 320,

buttons : Ext.MessageBox.OK, icon : Ext.MessageBox.INFO

});

return false; }

for(var i = 0; i < len; i++){

a001_arr += records[i].get("a001")+",";

a070_arr += records[i].get("a070")+" ,";

a002_arr += records[i].get("a002")+",";

}

var param =

{'a003':v_dwbm,'a001_arr':a001_arr,'a070_arr':a070_arr,'a002_arr':a002_arr,'qclx':'封存'};

Gz_GrzhglGrztglAppDirect.gz_Gr_ZhglFcblPllr(param,function(result,e){

if(result.success){

icon:

Ext.Msg.show({

title: '提示!', msg: result.msg, width: 320, buttons:

Ext.MessageBox.OK, Ext.MessageBox.INFO

});

panel.document.afterDocumentUpdate();

MixkyApp.desktop.closeAppDocument('<%=appkey%>',

'<%=document.getKey()%>', '<%=documentid%>');

//MixkyApp.desktop.closeAppDocument('unitapp','gz_grzhgl.docGrztg

} else{

Ext.Msg.show({

title: '提示!', msg: result.msg, width: 320, buttons:

lFcblPllr',panel.document.documentid);

Ext.MessageBox.OK,

Ext.MessageBox.INFO } icon: }); }); } } }], items :[ { layout:'column', border:false, items:[ { columnWidth:.50, layout:'form', border:false, labelWidth:55, style:'padding-left:5px;', items:{ name:'bmbm', xtype:'combo', anchor:'100%', fieldLabel:'部门名称', triggerAction:'all', mode:'remote', valueField:'value', displayField:'display',

store:Mixky.wasoft.lib.getDictionaryDirectStore(CommonAppDirect.getBmcx,{paramOrder:['dwzh']},panel),

listeners:{ 'render':function(cb){ cb.getStore().load(); } }, emptyText:'-----请选择部门-----', applicationkey:'<%=appkey%>' }}, { columnWidth:.50, layout:'form',

border:false, labelWidth:55, items:{ name:'zgxm', xtype:'textfield', anchor:'100%', fieldLabel:'职工姓名', }}] }, { layout:'column', border:false, items:[ { columnWidth:.50, layout:'form', border:false, labelWidth:55, style:'padding-left:5px;', items:{ name:'zjlx', xtype:'combo', anchor:'100%', fieldLabel:'证件类型', triggerAction:'all', mode:'remote', valueField:'value', displayField:'display',

"store":Mixky.wasoft.lib.getDictionaryDirectStore(CommonAppDirect.getBm_zjlx,{},panel),

"listeners":{ "render":function(cb){ cb.getStore().load(); } }, applicationkey:'<%=appkey%>' }}, { columnWidth:.50, layout:'form', border:false, labelWidth:55, items:{

name:'zjhm', xtype:'numberfield', anchor:'100%', fieldLabel:'证件号码', allowNegative:false, allowDecimals:false, style:'ime-mode:disabled' }}] }, { layout:'column', border:false, items:[{ columnWidth:.50, layout:'form', border:false, labelWidth:55, style:'padding-left:5px;', items:{ name:'zgzh', xtype:'numberfield', anchor:'100%', fieldLabel:'职工账号', allowNegative:false, allowDecimals:false, style:'ime-mode:disabled' }}, { columnWidth:.50, layout:'form', border:false, labelWidth:55, items:{ name:'zgzt', xtype:'combo', anchor:'100%', fieldLabel:'职工状态', triggerAction:'all', mode:'local', valueField:'value', displayField:'display', value:'01', store:Mixky.wasoft.lib.cache.getDictionary('<%=appkey%>','zgzt'),

applicationkey:'<%=appkey%>' }}] }, { layout:'column', border:false, items:[ { columnWidth:.50, layout:'form', border:false, labelWidth:55, items:{ name:'dwzh', xtype:'hidden', value:panel.document.params.dwbm }}] }] // 数据访问 var store = new Ext.data.DirectStore({ // 显示列 directFn : CommonAppDirect.gz_gr_zgcx_comm, paramOrder : ['limit','start','sort','dir','params'], baseParams : {limit:100, start:0, sort:'',dir:'',params:{}}, remoteSort : true, root : 'results', totalProperty : 'totals', } }); fields : ["a001","a002","a008","a003","a004","a000","a070"] });

var sm = new Ext.grid.CheckboxSelectionModel();

var columns = [sm,

{"id":"a001","dataIndex":"a001","header":"职工账号","sortable":false,width:100},

{"id":"a002","dataIndex":"a002","header":"职工姓名","sortable":false,width:60},

{"id":"a008","dataIndex":"a008","header":"证件号码","sortable":false,width:120},

{"id":"a003","dataIndex":"a003","header":"单位编码","sortable":false,width:100},

{"id":"a004","dataIndex":"a004","header":"单位名称","sortable":false,width:100},

{"id":"a000","dataIndex":"a000","header":"登记号","sortable":false,width:100,hidden:true},

{"id":"a070","dataIndex":"a070","header":"封存原因","sortable":false,width:160,

editor : new Ext.form.ComboBox({ triggerAction: 'all', lazyRender:true, mode: 'remote', store:

Mixky.wasoft.lib.getDictionaryDirectStore(GuijiAppDirect.getFcyy, {"paramOrder":["a075"],"baseParams":{"a075":panel.document.params.a075}}, panel),

{

//var sm = new Ext.grid.RowSelectionModel({singleSelect : true}); var grid = new Ext.grid.EditorGridPanel({ region: 'center', border : false, } //editor : new Ext.form.TextField ({ //allowNegative : true // }) }]; } return v; var record = a070store.getAt(i); if (record.get('value') == value) { } v = record.get('display'); break; valueField: 'value', displayField: 'display' }), renderer : function(value) { var a070store = grid.getColumnModel() var v = value; .getColumnById("a070").getEditor().store; for (var i = 0; i < a070store.getCount(); i++)

stripeRows: true, enableHdMenu : false, enableColumnMove:false, lineBreak : false, cellSelect : true,

loadMask: {msg:'正在装载...'},

autoExpandColumn : 'a070',

sm : sm, columns : columns, store : store, ddGroup : 'grid2tree', bbar: new Ext.PagingToolbar({

firstText : '首页',

lastText : '尾页',

nextText : '下一页',

prevText : '上一页',

beforePageText : '第',

afterPageText : '页,共 {0} 页',

pageSize: 100,

store: store,

items : [

'-',

'每页显示:',

new Ext.form.ComboBox({

editable : false,

triggerAction: 'all',

width : 50,

c.getValue();

],

plugins: new Ext.ux.ProgressBarPager({defaultText:'正在装载数据...'}),

listeners : {

'beforechange':function(a,b){

store.baseParams.limit = b.limit; store.baseParams.start = b.start; }) } grid.getBottomToolbar().changePage(1); store : [10,20,30,50,100,200], value : 100, listeners : { 'select' : function(c,record,index){ grid.getBottomToolbar().pageSize = }

}

}

}),

listeners : {

//win.winRecordHandler(record); }, getSelectedRecords : function(){ return this.getSelectionModel().getSelected(); } 'rowdblclick' : function(g,rowIndex,e){ var record = store.getAt(rowIndex); // 此处调用窗口处理记录的回调接口 }, getSelectionsRecords : function(){ return this.getSelectionModel().getSelections(); } }); panel.getRecord = function(){ } panel.doAdvanceQuery = function(){ store.baseParams.querytype = <%=ViewDataService.QT_ADVANCE%>; var dwzh = advanceForm.getForm().findField('dwzh'); if(dwzh.getValue().trim()==""){ //return grid.getSelectedRecords(); return grid.getSelectionsRecords();

Ext.MessageBox.show({titel:'提示',msg:"必须选择单位账号!",modal:true,buttons:Ext.Msg.OK,

icon:Ext.Msg.WARNING,width:300,closable:false}); return false; } var params = advanceForm.getForm().getFieldValues(); var mparams = {}; for(i in params){ } panel.queryParams = mparams; if(params[i] != ''){ } mparams[i] = params[i];

} panel.refresh(); // 视图刷新 panel.refresh = function(params){ if(Ext.isDefined(params)){ } // 初始化参数 panel.params = params; } store.baseParams.params = {}; Ext.apply(store.baseParams.params, panel.params); Ext.apply(store.baseParams.params, panel.queryParams); store.reload(); if(<%=!dwbm.trim().equals("")%>){

advanceForm.getForm().findField('dwzh').setValue('<%=dwbm.trim()%>'); advanceForm.getForm().findField('dwzh').setReadOnly(true);

} var dwzh = advanceForm.getForm().findField('dwzh');

if(Ext.isDefined(dwzh)){

dwzh.on('blur', function(f){

var params=dwzh.getValue(); if(params.trim()!=''){ dwzh.setValue(String.leftPad(params.trim(),12,'0')); var params=dwzh.getValue(); CommonAppDirect.queryDw(params,function(result,E){ if (result&&result.success){ advanceForm.getForm().findField('bmbm').reset(); }

else{

advanceForm.getForm().findField('dwzh').setValue(' ');

Ext.MessageBox.alert('提示','未查询到符合条件的记录!'); }

});

} var bmbm = advanceForm.getForm().findField('bmbm'); bmbm.getStore().reload();

})

}

// 输出附加脚本 end panel.add(ui); panel.doLayout(); //panel.refresh(panel.initParams); var ui = new Ext.Panel({ }) layout : 'border', border : false, items : [advanceForm, grid]

});

</script>

19. 、视图上的值向文档上传递的方法

g1.视图将值传递给文档

function(){

var records = grid.getSelectedRecords();

if(records.length <= 0){

Ext.MessageBox.show({

title:'提示',

msg:"请选择一条记录!",

modal:true,

buttons:Ext.Msg.OK,

icon:Ext.Msg.INFO,

width:250,

closable:false

});

return;

}

var v_a001 = records[0].get('a001');

var v_a002 = records[0].get('a002');

var lsnd = advanceForm.getForm().findField('lsnd').getValue();

MixkyApp.desktop.openDocument('gz_grzhcx.docMx',-1,{'a002':v_a002,'a001':v_a001,'lsnd':lsnd});

}

g2.文档接收传过来的值

function(){

var records = grid.getSelectedRecords(); //获取表格所选的

if(records.length == 0){

Ext.Msg.show({

title : '提示!',

msg : "请选择数据!",

width : 320,

buttons : Ext.MessageBox.OK,

icon : Ext.MessageBox.INFO

});

return false;

}

var v_a001 = zgzh.getValue();//gsp页面上的对象

var v_lsnd = lsnd.getValue();

var records = grid.getSelectedRecords(); //获取表格所选的对象

if (typeof(records) != 'undefined') {

var reportFile= 'unitapp/gz_grzhcx/grzhcxMx.raq';

var param = 'a001='+v_a001+';lsnd='+v_lsnd+';';

atwasoft.common.lib.DirectShowPreview(reportFile,param);

}

} 20. Ext弹出框是否判断

Ext.Msg.show({

title : '提示!', msg : "您确定要存盘吗?", width : 320, buttons : { yes : '是', no : '否' }, icon : Ext.MessageBox.QUESTION, fn : function(buttonId) { if (buttonId == 'yes') { doc.confirmDocument();//文档中直接掉标签中js代码

}

} });

21. submitDirect,提交方式,视图、文档、标签,配置。

视图:按钮操作函数,

function () {

MixkyApp.desktop.openDocument('gz_dwzhgl.docUnit_bm_add', -1, {dwbm:dwbm.getValue()});

}

文档:按钮操作函数,

function () {

var doc = this.document;

Ext.Msg.show({

title : '提示!',

msg : "您确定要存盘吗?",

width : 320,

buttons : {

yes : '是',

no : '否'

},

icon : Ext.MessageBox.QUESTION,

fn : function(buttonId) {

if (buttonId == 'yes') {

doc.confirmDocument();

}

}

});

}

标签:配置

{

submitDirect : Gz_Dw_DeptcodeAppDirect.gz_Dw_Deptcode_Add

submitbeforescript : var bmvalue=form.getForm().findField('bm').getValue();

if(bmvalue.trim()==''){

Ext.MessageBox.show({title:'提示',msg:"部门编码不能为空!",modal:true,buttons:Ext.Msg.OK,

icon:Ext.Msg.INFO,width:300,closable:false,fn:function(){form.getForm().findField('bm').focus(false,10);}});

return false;

}

var mcvalue=form.getForm().findField('mc').getValue();

if(mcvalue.trim()==''){

Ext.MessageBox.show({title:'提示',msg:"部门名称不能为空!",modal:true,buttons:Ext.Msg.OK,

icon:Ext.Msg.INFO,width:300,closable:false,fn:function(){form.getForm().findField('mc').focus(false,10);}});

return false;

}

22. 手写视图,分页时下一页,序号连着上一页连续增加显示,实现方法

var columns = new Ext.grid.ColumnModel({ columns : [new Ext.grid.RowNumberer(), { id : "a001", dataIndex : "a001", header : "职工账号", width : 80, sortable : false }, {

23. 数据字典配置方法,(类型必须为dictionar)

{

dictionaryname : "sfdy",

remoterender : true,

defaultValue : "0",

}

24. 后台获取归集点

String gjdbm = params.has("gjdbm") ?

params.get("gjdbm").getAsString() : "";

if(gjdbm.equals("")) { UserScope scope = UserScopeDataService.instance().getUserScope(user.getId());

gjdbm=scope.getF_gjd_codes()==null?"0101":scope.getF_gjd_codes(); //用户归集点

}

25. 试图搜索按钮重置按钮配置中配置。

配置:queryresetscript

对应代码: var gjdbm=advanceForm.getForm().findField('gjdbm');

var record = gjdbm.store.getAt(0); //获取下拉框数据的第一条

gjdbm.setValue(record.get('value'));

var wtyh=advanceForm.getForm().findField('yhbm');

var record = wtyh.store.getAt(0); //获取下拉框数据的第一条

wtyh.setValue(record.get('value'));

var cbwd=advanceForm.getForm().findField('cbwdbm');

var record = cbwd.store.getAt(0); //获取下拉框数据的第一条

cbwd.setValue(record.get('value'));

var zfmj_begin=advanceForm.getForm().findField('zfmj_begin');

var zfmj_end=advanceForm.getForm().findField('zfmj_end');

zfmj_begin.setValue(0);

zfmj_end.setValue(150);

26. 系统存放数据字典的两张表

t_mk_sys_dictionary

t_mk_sys_dictionary_data

27. 数据库表中添加列

alter table gd_dk_fzz add E005 varchar(30) default ' ' not null ;

28. 数据库中插入值

insert into bm_csdq (BM, MC)

values ('05', '巴彦淖尔市乌拉特前旗');

29. 数据库中导入表及数据方法:

imp wasys3_zjsx/wasoft2010@orcl-localhost file='D:\222.dmp' full=y

30. 试图。隐藏查询条件:

配置:

advanceFormscript:

a003.getEl().up('.x-form-item').setDisplayed(false);

a004.getEl().up('.x-form-item').setDisplayed(false);

31. 滚动条实现:

panel.tp = function(p005arr, p009Arr) {

Ext.MessageBox.confirm('提示', '您确定要将当前业务流水的退票处理吗?', function(btn) {

var ywlsharr = new Array();

var dzrqarr = new Array();

ywlsharr = p005arr.split(",");

dzrqarr = p009Arr.split(",");

if (btn == "yes") {

Ext.MessageBox.wait("取消到账中......");

panel.pltp(ywlsharr, dzrqarr, 0, '', '', '');

}

});

}

32. 联想效果实现:

33.var G073 = {"applicationkey":"daikuan","name":"G073","xtype":"leno

votextfield","anchor":"100%","fieldLabel":"项目选择

","allowBlank":false,"customtype":"lenovotext","directFn":CommonAppDirect.getDkxm,"params":{panel:panel,cs:'A075:A075'}};

杜彦磊 19:58:11

var array = new Array();

xmxz.on('select', function(c,r,i){

array = 组件名称.getRawValue().toString().split(" "); xmxz.setValue(array[0]);

xmbm.setValue(array[1]);

34. 打开试图,自动加载按钮文档:

试图 对象属性 配置:openDoc

配置内容:MixkyApp.desktop.openDocument('gz_tqyw.docTqcllr',-1,{});

35. 视图按钮打开视图操作

function(){

var module = MixkyApp.desktop.openModule('guiji', 'gz_hbjyw');

if(module){

module.openView('gz_hbjyw.qGz_Hbj_Hjbl.vGz_Hjbl');

}

}

36. 组件框中虚显示文字

配置:emptyText : '-----请选择部门-----',

37. 手写页面金额千分位实现

{

id : "a011", dataIndex : "a011", header : "月均工资", sortable : false, width : 80, editor : new Ext.form.NumberField({ allowBlank : false, allowDecimals : true, allowNegative : false }), align : "right", renderer : function(v, params, record) { } } return Ext.util.Format.number(record.data.a011,'0,000.00');

38. 搜索条件单个日期框实现

查询类型:custom

配置:{

customtype : "singledate",

labelStyle : "color:red",

}

39. 文档,附件js中控制 文档加载完后执行方法

form.getForm().on('actioncomplete', function(f, a){//数据加载完毕后执行

form.getForm().findField('zcdw').store.loadData(panel.document.params.dwzharray); });

40. 设置行背景颜色,方法控制。

//设置行背景颜色

var zgzt_tmp = advanceForm.getForm().findField('a070').getValue();

if(true){

for(var i=0;i<records.length;i++){

var record=records[i];

if(record.get("a070").trim() != '正常'){

grid.getView().getRow(i).style.backgroundColor='#FF0000'; //行背景色

}//else if(record.get("e043").trim() == '未发放'){

//

grid.getView().getRow(i).style.backgroundColor='#0000FF'; //行背景色

//}else if(record.get("e043").trim() == '逾期还款'){

//

grid.getView().getRow(i).style.backgroundColor='#00FF00'; //行背景色

//}

}

}

41. 视图配置 改变颜色修改

配置:renderer

function(v, params, record){

if(record.get('dwzh')!='本页小计'){

if(record.get('a070') != '正常'){

return "<font color='red' >"+record.get('a070')+"</font>";

}

return record.get('a070');

}

}

42. 增加滚动提醒条。返回下一个提示框时,会直接关闭该提示框。

Ext.MessageBox.show({title:'提示',wait:true,msg:"正在进行存盘,请稍候...",modal:true,icon:Ext.Msg.WARNING,width:300,closable:false});

43.

更多相关推荐:
程序开发总结报告

项目开发总结报告1引言11编写目的说明编写这份项目开发总结报告的目的指出预期的阅读范围12背景说明a本项目的名称和所开发出来的软件系统的名称b此软件的来源或任务提出者开发者用户及安装此软件的计算中心13定义列出...

软件开发心得总结

有感于网盘开发过程有感于网盘开发过程.......................................................................................…

简单应用程序系统开发的心得与体会

班级物管1101班姓名润物惠无声学号11020xx028第一次课程设计心得体会及总结有关于数据库实验的心得体会总的来说受益匪浅在这些天中我们学到了很多东西包括建表导入数据查询插入最重要的是我们有机会用电脑自己进...

系统开发总结

宿舍管理信息系统系统管理指导老师(李政忙老师)开发团队成员:姓名:杨正明姓名:胡友文姓名:赵坤姓名:卓仁慧姓名:肖远林姓名:李茂良姓名:宋洁总结书写人:宋学号:学号:20xx4042073学号:20xx4086…

软件开发总结报告

软件开发总结报告目录一引言21编写目的22项目背景23参考资料31二开发结果3开发结果1产品32主要功能间价价42534产四3三品所质用量时评评总价41技术方案评结5一引言1编写目的本项目开发总结报告主要是总结...

项目开发总结报告

项目开发总结报告旅游自助系统项目开发总结报告项目负责人小菁小组成员小虹小军小骁小雷项目开发总结报告文档变更记录过程数据小结项目开发总结报告目录1引言错误未定义书签11编写目的错误未定义书签12背景错误未定义书签...

项目开发总结报告

山东师范大学梦想团队第七届齐鲁软件设计大赛网上淘宝网络资源检索项目开发总结报告参赛单位山东师范大学信息科学与工程学院作品名称网上淘宝团队名称梦想团队1山东师范大学梦想团队1引言311编写目的312背景313定义...

程序员个人年度工作总结

20xx个人年度工作总结工作回顾在我进入公司的这八个月里我陆续接触了公司的软件开发平台一些已经完成的项目美科斯OA系统中邮物流管理系统富阳供销社等还有目前在进行2个物流公路港系统对公路港的运营模式有了较深入的了...

Java开发程序员的一点心得

Java开发程序员的一点心得作为一个java开发程序猿呢要做到眼高手低如何眼高手低呢1眼高要时刻关心最新的技术最新的框架最新的开发方式2手低把基础弄扎实了尤其是数据结构方面的知识下面推荐一下我个人的Java学习...

程序开发目前主流开发技术的分析和总结

程序开发目前主流开发技术的分析和总结主流的程序设计语言CDelphiObjectPascalJavaC桌面应用程序框架MFCVCLQTJavaAWTSWINGNet企业应用程序框架WindowsDNAASPCO...

20xx年程序员年终工作总结两篇

20xx年程序员年终工作总结两篇范文一光阴如梭半年的工作转瞬即将成为历史伴随着新年钟声的临近我们依依惜别硕果累累的20xx年满怀热情的迎来即将到来的20xx年在这年终之际现对来公司5个月的时间里所作的工作汇报如...

一个程序员的找工作总结

一个屌丝程序员的找工作总结原来打算毕业离校前把这篇文章发到睿思上可惜没有整理好写这篇文章的出发点是想根据自己的经历来谈一下找工作这个事情先介绍一下自己我六年半的时间都是在西电计算机学院度过的本科是07级研究生是...

程序开发总结(36篇)