res_resname = function (options) ;
this.opts = $.extend(defaults, options);
var _st = new date().getmilliseconds();
var instance = this;
this.$allresnameaarray = new array();
this.$resnameaarray = new array();
this.$rrguid = "";
var setting =
},callback:
};//獲取物品
this.initresname = function () );
}else
};//載入樹
this.loadcategorytree = function () );
}//載入窗體
this.loadwindow = function ()
var window_div = "";
window_div += " 選擇物品
關閉instance.loadresname();
jle.layer.show($("#window_div_resname"), $("#window_div_resname_move"), $("#window_div_resname_close"));
instance.confirmevent();
instance.cancelevent();
instance.queryevent();
instance.rrnameevent();
//資料載入到窗體中
this.loadresname = function () else
window_div += "
名稱單位
單價(元)
當前庫存
" + typename + "
";window_div += " ";
for (var i = 0; i < instance.$resnameaarray.length; i++)
window_div += " ";
window_div += " " + rrname + "";
window_div += " " + rrunit + "";
window_div += " " + rrunitprice + "";
window_div += " ";
if (parseint(rrsurplus) == 0)
else
window_div += "";
if (instance.opts.type == "1")
else
window_div += " ";
}window_div += " ";
window_div += " ";
$("#window_div_resname_middle").removedata();
$("#window_div_resname_middle").html(window_div);
instance.setvalue();
instance.radioevent();
};this.showimg = function (imagethumbnailurl)
//物品搜尋事件
this.rrnameevent = function ()
});$("#txtrrname").blur(function ()
});$('#txtselectname').click(function () else
switchrendercontent(false);
return false;
});};
//搜尋事件
this.queryevent = function () , function (json) );
}instance.loadresname();
});});
};this.radioevent = function () );
$("#resnametable a[name='imagethumbnail']").each(function () );
});};
function onsingleclick(e, treeid, treenode)
function switchrendercontent(isshow)
else
}this.setvalue = function () else
});//$("#window_div_resname :input[name='resname']").each(function ()
//});
//}};
//確定事件
this.confirmevent = function ()
//break;
//}}
jle.layer.close($("#window_div_resname"));
}if (isselect == false)
//$("[name='resname']").each(function ()
//});
//} else
});};
//取消事件
this.cancelevent = function () );
};this.initresname();
}
封裝的簡單例子
舉個例子 package com.u1.day0130 封裝的演示。author feng 2018年1月30日下午2 37 59 public class demo02 public demo02 string name,int age,string void demo03 那麼還有其他的方法嗎?...
自己寫的ajax封裝js類
js function ajax method,synchronous 設定非同步請求返回資料型別text xml this.setrestype function restype 設定回滾函式 this.setcallback function func 設定load函式 this.setload...
Java封裝的簡單例子
先來個例子看看 public class man public string getname public void setname string name public int getage public void setage int age public class woman public ...