123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- $(function(){
- var $boxTop = $("#box_topcenter");
- if(!!$boxTop){
- $boxTop.remove();
- }
-
- //针对页面左侧加树的点击树节点事件
- /*$(".zbutton ").live("click",function(){
- checkAndSetHeight();//changeFormat.js
- });*/
- });
-
- //补丁
- function getQueryFormParams($dom){
- var $input = $dom.find("table").eq(0).find("input[type=text]");
- var params = {};
- for (var i = 0; i < $input.length; i++) {
- if($input.eq(i).val()!=""){
- var domName = $input.eq(i).attr("name");
- var value = $input.eq(i).val();
- params[domName] = value;
- }
- }
- return params;
- }
-
-
-
- function clearNoNum(obj){
- obj.value = obj.value.replace(/[^\d.]/g,"");//清除“数字”和“.”以外的字符
- obj.value = obj.value.replace(/^\./g,"");//验证第一个字符是数字而不是.
- obj.value = obj.value.replace(/\.{2,}/g,"");//只保留第一个“.”,清除多余的
- obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");//清除“数字”和“.”以外的字符
- obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3");//清除“数字”和“.”以外的字符
-
- }
- /**
- * 获取父单位id
- * @param corpId
- * @returns
- */
- function getCorpParentId(corpId){
- var parentId = corpId;
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/getParentCorpIdByCorpid/',
- type : 'post',
- timeout : 15000,
- data : {corpId:corpId},
- dataType : 'text',
- async:false,
- success : function(data) {
- parentId = data;
- },
- error : function(e) {
- $.messager.alert('访问服务失败!');
- }
- });
- return parentId;
- }
|