Authored by dongjunjie

店铺装修bug

... ... @@ -47,7 +47,7 @@ var g = new common.grid({
display: "包含品牌",
name: "brands",
render: function(item) {
//console.log(item);
console.log(item);
if (item.brands instanceof Array && item.brands.length > 0) {
var html = '';
$.each(item.brands, function(i, value) {
... ... @@ -94,12 +94,22 @@ var g = new common.grid({
render: function(item) {
var HtmArr = [];
if(item.checkStatus == 200){
if(+item.checkStatus == 200){
HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/view/'+item.id+'/" class="btn btn-info btn-xs">装修查看</a>');
}else {
HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/editor/'+item.id+'/" class="btn btn-success btn-xs">装修编辑</a>');
}
if (item.checkStatus == 900) {
if(+item.checkStatus == 300){
if(+item.shopStatus == 1){
// 1开启 0 关闭
HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="closeshops btn btn-danger btn-xs">关店</a>');
}else{
HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class=" openshops btn btn-success btn-xs">开店</a>');
}
}
if (+item.checkStatus == 900) {
HtmArr.push('<a href="javascript:void(0)" class="btn btn-warning btn-xs commentBtn" data-comment="'+item.comment+'">驳回理由</a>');
}
... ... @@ -125,3 +135,28 @@ $(document).on('click', ".commentBtn", function() {
function(){}
);
});
var Bll={
toast:function(content,url,id){
common.dialog.confirm("温馨提示",content,function(){
common.util.__ajax({
url:url,
data:{shopsId:id}
},function(){
g.reload();
});
});
}
}
//关闭店铺
$('#basicTable').on('click', '.closeshops', function() {
var item=g.rows[$(this).data("index")];
Bll.toast("确定要关闭此店铺吗?","/supplier/store/closeShops",item.shopsId);
});
//开启店铺
$('#basicTable').on('click', '.openshops', function() {
var item=g.rows[$(this).data("index")];
Bll.toast("确定要开启此店铺吗?","/supplier/store/openShops",item.shopsId);
});
\ No newline at end of file
... ...
... ... @@ -107,6 +107,7 @@ var t = new common.tab({
if(+item.checkStatus!=200){
HtmArr.push('<a href="/supplier/store/update/'+item.shopsId+'" href="javascript:void(0);" class="btn btn-success btn-xs">编辑</a>');
}
/* 开关店放到店铺装修列表里面
if(+item.checkStatus!=900){
if(+item.status){
// 1开启 0 关闭
... ... @@ -114,7 +115,7 @@ var t = new common.tab({
}else{
HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class=" openshops btn btn-success btn-xs">开店</a>');
}
}
}*/
}
return HtmArr.join('');
}}
... ...
... ... @@ -24,7 +24,7 @@ var ENUM = {
var resourcesNew = {
"shopTopBanner":{
"id":"",
"data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}]
"data": [{"shopSrc": "","shopSrc0":"", "detailSrc": "", "isShowShopName": "Y"}]
},
"navigationBar":{
"id":"",
... ... @@ -170,7 +170,7 @@ function findDecoration(){
}
},
function(rs) {
//console.log(rs.data);
console.log(rs.data);
if(rs.data){
jsonMain = rs.data;
}
... ... @@ -289,7 +289,11 @@ function gridInit(id){
el:"#"+id,
columns:[
{display:"店铺banner图片", render:function(item){
if(curTemplateType == "2"){
return "<input type=file name='shopBannerImage' id='shopBannerImage_"+item.__index+"' value='"+item.shopSrc+"' />";
}else{
return "<input type=file name='shopBannerImage' id='shopBannerImage_"+item.__index+"' value='"+item.shopSrc0+"' />";
}
}},
{display:"是否显示店铺名称", render:function(item){
if(item.isShowShopName == "Y"){
... ... @@ -986,7 +990,11 @@ function untilEditorEvent(id){
e.on("callback",function(obj){
if(/^file_onComplete_shopBannerImage_/.test(obj.key)){
var _index = obj.key.replace(/^file_onComplete_shopBannerImage_/,'');
if(curTemplateType == "2"){
g.__rows[_index].shopSrc = obj.data;
}else{
g.__rows[_index].shopSrc0 = obj.data;
}
}
if(/^file_onComplete_DetailbannerImage_/.test(obj.key)){
var _index = obj.key.replace(/^file_onComplete_DetailbannerImage_/,'');
... ...
... ... @@ -65,7 +65,7 @@
<div class="model-wrap contentpanel-pc">
<!--banner-->
<div class="model-banner model-editor" data-toggle="editor-banner" data-title="顶部图片编辑">
<img src="[[resources.shopTopBanner.data[0].shopSrc]]">
<img src="[[resources.shopTopBanner.data[0].shopSrc0]]">
[[if resources.shopTopBanner.data[0].isShowShopName == "Y"]]
<h1>[[shopName]]</h1>
[[/if]]
... ...