@RequestMapping(params = "action=getContractTypes") public @ResponseBody String getContractTypes(HttpServletRequest request,HttpServletResponse response,DraftForm form) { List<ConfigObject> res = UniflowConfigUtil.getObjectsByName(UniConfigEnum.CONTRACT_TYPE.getName()); return res.toString(); // ConfigObject result = null; // for(ConfigObject cof : res){ // if(cof.getString("name").equals(request.getParameter("contractTypeName"))){ // result = cof;break; // } // // } // return result==null?"":result.toString(); }
var url = "main/approve/Draft.do?action=getContractTypes"; var subTypeKey = $("#subTypeKey").val() //alert(url);alert(subTypeKey);alert(dataStr); $.ajax({ type: "POST", url: url, data: dataStr, success: function(msg){ var types=eval(msg); $.each(types,function(index1,a){ if(a){ $.each(a.sub,function(index2,b){ if(b.key==subTypeKey){ if(b.products!=undefined){ $table.data("products",b.products); $tr = $("#"+protoId+"ValueTdTmpl").tmpl(data,{valueId:"",contracts:getContracts(),showDelete:true,rowNum:rowNum,products:b.products}); $table.append($tr); }else{ hasProducts = false; } } }); } }); if(!hasProducts){ $table.append("<tr><td colspan='5' style='color:red;text-align:center'>你所选择的业务类型: <b>["+typeName+"]</b> 无需添加标的名称</td></tr>"); } }
}); (编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|