Authored by weiqingting

提交

... ... @@ -84,24 +84,27 @@ var SORTDATA={
otherParam:function(){
return {brandId:$("#brandId").val(),supplierId:common.util.__input("supplierId")}
},
complete:function(data){
complete:function(data,bool){
if(data.length>2){
Bll.productNameArr[2]=data[data.length-1].sortName;
Bll.setProductName();
}
if(data[0].text&&data[0].text.indexOf("潮童")>-1){
$("#ageLevel").val("2|3");
if(!bool){
if(data[0]&&data[0].text&&data[0].text.indexOf("2")>-1){
$("#ageLevel").val("2|3");
}else{
$("#ageLevel").val("1");
}
$(":checkbox[name=ageLevel]").prop("checked",false);
$(":checkbox[name=ageLevel]").each(function(){
var name=$("#ageLevel").val();
if(name.indexOf($(this).val())>-1){
$(this).prop("checked",true)
}else{
$("#ageLevel").val("1");
}
});
$(":checkbox[name=ageLevel]").prop("checked",false);
$(":checkbox[name=ageLevel]").each(function(){
var name=$("#ageLevel").val();
if(name.indexOf($(this).val())>-1){
$(this).prop("checked",true)
}
});
}
// console.log(data);
}
};
var tabTree=new common.tabTree("#tree",SORTDATA);
... ...
... ... @@ -145,11 +145,11 @@ tabTree.prototype= {
g.getData(g._getParam(_next))
} else {
g.active_count = 0;
g.setHeadVal();
g.setHeadVal(true);
g.reset()
}
} else {
g.setHeadVal();
g.setHeadVal(true);
g.reset()
}
},
... ... @@ -186,8 +186,9 @@ tabTree.prototype= {
}
}
url=p.url||url;
param.status = p.status;
param.sortLevel = p.sortLevel;
var ajaxOptions = {
... ... @@ -209,7 +210,7 @@ tabTree.prototype= {
g.rows.length = 0;
if (items.data.length == 0) {
g.active_count = 0;
g.setHeadVal();
g.setHeadVal(true);
g.reset();
}else{
$.each(items.data, function(count, item) {
... ... @@ -224,16 +225,13 @@ tabTree.prototype= {
g.records.push(count);
g.rows.push(item)
});
if ($("iframe", g.dom["citybox"]).length > 0) {
$("iframe", g.dom["citybox"]).height(g.element[0].offsetHeight)
}
}
},
error: function(e1, e2) {}
};
$.ajax(ajaxOptions)
},
setHeadVal: function() {
setHeadVal: function(bool) {
var g = this,
p = this.options;
var arr=[];
... ... @@ -246,7 +244,7 @@ tabTree.prototype= {
p.datas.push(item)
});
if (p.complete != null) {
p.complete(p.datas, false)
p.complete(p.datas, bool)
}
},
renderHeader: function() {
... ...