master plan 功能修改

11 篇文章 0 订阅

功能要求:在master plan系统中,copy一个新的masterplan时,添加一个有输入框的提示框,使项目名称可编辑 如图所示:




思路:在form中添加一个隐藏字段,然后将用户输入的项目名称设置到隐藏字段中,提交后台….

添加隐藏字段:

 this.fields.add("project_hidden",new Ext.form.Hidden ({xtype: "hidden",name:"project_hidden",id:"project_hidden",width:150,allowBlank:false,labelSeparator:":*" ,fieldLabel: "project_hidden",insert_allowed:true,update_allowed:true}));
提示框
 Ext.Msg.show({
					         title:'Copy',msg: '您將copy一個新的master plan,是否修改項目名('+project_id+')?',buttons: Ext.Msg.YESNO,modal:false,scope:this,icon: Ext.MessageBox.QUESTION
					        ,fn: function(btn,txt){
						    	if (btn=='yes') {
						    		if (this.fields.get('MP_ID_manipulate').getValue() != this.fields.get('MP_ID').getValue()){
						    			Ext.Msg.alert('操作不成功,請重試!');
						    		}else{
									    this.fields.get('project_hidden').setValue(txt); //将输入值设置到虚拟字段中
									    
									    console.log("the test value is :==="+this.fields.get('project_hidden').getValue()+"-----txt is -----"+txt);
									    
          			 					if (!MasterWriteAccess && !this.getCommitAllowVariable()) this.commitForm();
          			 				}
							    }
						    },prompt:true//显示输入框
						   
					   }); 



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值