(function ($) {
var ComBox, defaults, pluginName;
pluginName = "ComBox";
defaults = {
ComBoxName: "ComBox",
saledeptid: "0",
salegroupid: "0",
inneruserid: "0",
roleCodes: "",
companyBusiness: "",
onSucced: function () { },
includeUser: true //是否包含组
};
ComBox = (function () {
function ComBox(element, options) {
this.element = element;
this.options = $.extend(true, {}, defaults, options);
this._defaults = defaults;
this._name = pluginName;
this.isFirst = true;
this.init();
}
return ComBox;
})();
ComBox.prototype.init = function () {
var _this, $element, combox_innerGroup, combox_user, urlParameter, queryType, roleCodes, companyBusiness;
_this = this;
$element = $(this.element);
roleCodes = _this.options.roleCodes;
companyBusiness = _this.options.companyBusiness;
if (roleCodes.indexOf("[GLY]") > -1 || roleCodes.indexOf("[ZJ]") > -1 || roleCodes.indexOf("[ZJZL]") > -1 || roleCodes.indexOf("[ZJZG]") > -1 || (companyBusiness.indexOf("[渤海]") > -1 && (roleCodes.indexOf("[XHJL]") > -1 || roleCodes.indexOf("[XHBBSJY]") > -1))) {
queryType = 0;
}
else if (roleCodes.indexOf("[BMZG]") > -1) {
queryType = 1;
}
else if (roleCodes.indexOf("[ZG]") > -1) {
queryType = 2;
}
else {
queryType = 3;
}
$.data(this, "queryType", queryType);
combox_innerGroup = $("", {
type: "text",
id: _this.options.ComBoxName + "Group"
}).css({
width: "160px"
});
combox_user = $("