a251bf6d3621f42f1f2bacc2235c5be08e3f6974.svn-base 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. examinationConfigAddEdit = function() {
  2. /**定义变量**/
  3. var _this = this;
  4. /**私有方法**/
  5. /***新增信息***/
  6. _this.save = function(addType){
  7. $("#608Class").val("608");
  8. $("#APPLICABLE_OBJECT_608").val($("#APPLICABLE_OBJECT_608").attr("relValue"));
  9. var classify_id = $("input[name='EXAMINE_CLASSIFY_ID_608']").val();
  10. var ids = classify_id.split(",");
  11. var str = "";
  12. for(var i=0;i<ids.length;i++){
  13. str += "|"+ids[i]+"|,";
  14. }
  15. str = str.substring(0, str.length-1);
  16. $("input[name='EXAMINE_CLASSIFY_ID_608']").val(str);//重新存储
  17. $form = $('#editForm');
  18. var valid = $form.validationEngine({returnIsValid: true});
  19. if(!valid){
  20. top.Dialog.alert(CHECKREDBOX);
  21. return;
  22. }
  23. $form = $('#editForm');
  24. if(valid){
  25. showProgressBar("正在提交中...");
  26. var url = $.pathname() + '/ws/crud/CRUDService/create/';
  27. if(fd_id!=undefined&&fd_id!=""){
  28. url = $.pathname() + "/ws/crud/CRUDService/update/";
  29. }
  30. var formValue = $form.serialize();
  31. //alert("formValue==="+JSON.stringify(formValue));
  32. $.request.add(url,formValue,function(data){
  33. top.Dialog.alert("保存成功!");
  34. $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/exercise/examineManagement/examinationConfig.jsp");
  35. });
  36. }
  37. };
  38. _this.formReset = function(){
  39. $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/exercise/examineManagement/examinationConfigAddEdit.jsp?fd_id="+fd_id);
  40. };
  41. return {
  42. init : function() {
  43. $('#save').bind('click',function(){
  44. _this.save();
  45. });
  46. $('#goback').bind('click',function(){
  47. $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/exercise/examineManagement/examinationConfig.jsp");
  48. });
  49. }
  50. };
  51. }();
  52. $(function() {
  53. examinationConfigAddEdit.init();
  54. });