7ddcf8fc562d76e0d5a2f16b88852f536eda61ee.svn-base 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * 功能:应急处置后评估 评估项目管理
  3. *
  4. *
  5. * @author HXB
  6. * @date 2015/10/27
  7. */
  8. TargetManageAddEdit = function() {
  9. /**定义变量**/
  10. var _this = this;
  11. /**私有方法**/
  12. /***新增信息***/
  13. _this.save = function(){
  14. var node = $("#PARENT_ID_374").data("selectedNode");
  15. $("#LEVEL_374").val(node.level);
  16. $form = $('#editForm');
  17. var valid = $form.validationEngine({returnIsValid: true});
  18. if(valid){
  19. $("body").eq(0).showLoading();
  20. showProgressBar("正在提交中...");
  21. var url = $.pathname() + '/ws/crud/CRUDService/create/';
  22. if(fd_id!=undefined&&fd_id!=""){
  23. $("#FD_OBJECTID374").val(fd_id);
  24. url = $.pathname() +"/ws/crud/CRUDService/update/";
  25. }
  26. var formValue = $form.serialize();
  27. $.request.add(url,formValue,function(data){
  28. $("body").eq(0).hideLoading();
  29. top.Dialog.alert(data.Msg.info);
  30. $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/evaluate/targetManage/TargetManage.jsp");
  31. });
  32. }
  33. };
  34. return {
  35. init : function() {
  36. $('#save').bind('click',function(){
  37. _this.save();
  38. });
  39. $('#back').bind('click',function(){
  40. $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/evaluate/targetManage/TargetManage.jsp");
  41. });
  42. }
  43. };
  44. }();
  45. $(function() {
  46. TargetManageAddEdit.init();
  47. });