日期:2014-05-16 浏览次数:20443 次
//修改操作 function uf_UpdateProjectHandler(){ var path = document.getElementById("path").value; var projectId = document.getElementById("projectId").value; if(Ext.getCmp('updateProjectForm').getForm().isValid()){ var projectName = Ext.getCmp('projectName').getValue(); var code = Ext.getCmp('code').getValue(); var state = Ext.getCmp('state').getValue(); var completePercent = Ext.getCmp('completePercent').getValue(); var completePhase = Ext.getCmp('completePhase').getValue(); var startDate = transdate(Ext.getCmp('start').getValue()); var endDate = transdate(Ext.getCmp('stop').getValue()); var cycle = Ext.getCmp('cycle').getValue(); var managers = Ext.getCmp('manager').value; var coders = Ext.getCmp('user').value; var userId = document.getElementById("userId").value; var users; if(managers == null || managers == ""){ users = coders; Ext.MessageBox.alert("提示信息","项目管理人不能为空!"); return false; }else if(coders == null || coders == ""){ users = managers; }else{ users = managers+","+coders; } Ext.Ajax.request({ url:path + '/project/projectAction_updateProject.action', params:{ 'project.projectId':projectId, 'project.name':projectName, 'project.code':code, 'project.state':state, 'project.completePercent':completePercent, 'project.completePhase':completePhase, 'project.startDate':startDate, 'project.endDate':endDate, 'project.cycle':cycle, 'project.manager':users, 'project.updateUserId':userId }, method:'post', success:function (response,options) { var result = response.responseText; if(result.length > 0 && result.length <102){ if(result == "success") { Ext.MessageBox.alert("提示信息","修改成功!"); uf_Reload_data(); Ext.getCmp('updateProjectWin').close(); }else{ Ext.MessageBox.alert("提示信息","出现异常"); } } } }); }else{ Ext.MessageBox.alert("提示信息", "项目信息填写错误,请按照提示修改"); } }