Authored by dongjunjie

index.js

... ... @@ -13,7 +13,28 @@ var t = new common.tab({
click:function(){
if(+t.active){
g.options.url="/supplier/store/ajax/shenhezx";
g.options.columns[1].name="shopsName";
g.options.columns[2]={display:"包含品牌",name:"brands",render:function(item){
var str='';
if(item.brands){
$.each(item.brands,function (index,a) {
str+='<p>'+a.brandName+'</p>';
});
}
return str;
}};
}else{
g.options.columns[1].name="shopName";
g.options.columns[2]={display:"包含品牌",name:"shopRelationList",render:function(item){
var str='';
if(item.shopRelationList){
$.each(item.shopRelationList,function (index,a) {
str+='<p>'+a.brandName+'</p>';
});
}
return str;
}};
g.options.url=$('#url').val();
}
g.reload(1);
... ... @@ -67,11 +88,14 @@ var t = new common.tab({
}},
{display:"操作",name:"",render:function(item){
var HtmArr=[];
console.log(t);
if(t.active == "1"){
console.log(item);
HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.id+'/'+item.templateId+'/'+item.shopsType+'/check/" class="btn btn-info btn-xs">装修查看</a>');
}else{
HtmArr.push('<a href="/supplier/store/'+authority.info+'/'+item.shopsId+'" href="javascript:void(0);" class="btn btn-info btn-xs">查看</a>');
}
console.log(item);
HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.id+'/'+item.templateId+'/'+item.shopsType+'/check/" class="btn btn-info btn-xs">装修查看</a>');
HtmArr.push('<a href="/supplier/store/'+authority.info+'/'+item.shopsId+'" href="javascript:void(0);" class="btn btn-info btn-xs">查看</a>');
//创建
if(authority.create){
if(+item.checkStatus==100||+item.checkStatus==900){
... ...