12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- examinationConfigAddEdit = function() {
- /**定义变量**/
- var _this = this;
- /**私有方法**/
- /***新增信息***/
- _this.save = function(addType){
- $("#608Class").val("608");
- $("#APPLICABLE_OBJECT_608").val($("#APPLICABLE_OBJECT_608").attr("relValue"));
-
- var classify_id = $("input[name='EXAMINE_CLASSIFY_ID_608']").val();
- var ids = classify_id.split(",");
- var str = "";
- for(var i=0;i<ids.length;i++){
- str += "|"+ids[i]+"|,";
- }
- str = str.substring(0, str.length-1);
-
- $("input[name='EXAMINE_CLASSIFY_ID_608']").val(str);//重新存储
-
- $form = $('#editForm');
- var valid = $form.validationEngine({returnIsValid: true});
- if(!valid){
- top.Dialog.alert(CHECKREDBOX);
- return;
- }
-
- $form = $('#editForm');
- if(valid){
- showProgressBar("正在提交中...");
- var url = $.pathname() + '/ws/crud/CRUDService/create/';
- if(fd_id!=undefined&&fd_id!=""){
- url = $.pathname() + "/ws/crud/CRUDService/update/";
- }
- var formValue = $form.serialize();
- //alert("formValue==="+JSON.stringify(formValue));
- $.request.add(url,formValue,function(data){
- top.Dialog.alert("保存成功!");
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/exercise/examineManagement/examinationConfig.jsp");
- });
- }
-
- };
- _this.formReset = function(){
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/exercise/examineManagement/examinationConfigAddEdit.jsp?fd_id="+fd_id);
- };
- return {
- init : function() {
- $('#save').bind('click',function(){
- _this.save();
- });
- $('#goback').bind('click',function(){
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/exercise/examineManagement/examinationConfig.jsp");
-
- });
-
- }
- };
- }();
- $(function() {
- examinationConfigAddEdit.init();
- });
|