Authored by 陶雨

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

... ... @@ -34,6 +34,10 @@ var ENUM = {
'3': 0,
'4': 0,
'all': 0
},
isVIP: {
'N': '否',
'Y': '是'
}
};
... ... @@ -176,7 +180,7 @@ var g = new common.grid({
}, {
display: '售价',
render: function(item) {
var vip = item.isVIP ? item.isVIP : '',
var vip = item.isVIP ? ENUM.isVIP[item.isVIP] : '',
retailPrice = item.retailPrice ? item.retailPrice : '',
salesPrice = item.salesPrice ? item.salesPrice : '';
return '<p><strong>吊牌价:</strong>' + retailPrice + '</p>' +
... ... @@ -261,7 +265,7 @@ var g = new common.grid({
display: '缺失信息',
hidden: true,
render: function(item) {
return item.missInfo;
return '<p style="color: red;">' + item.missInfo + '</p>'
}
}, {
display: '操作',
... ...
... ... @@ -73,8 +73,22 @@ $('#goods-table').html(common.util.__template2($('#goodsList').html(), {
//上架必填
productExtBo.renderType = $('.contentpanel').data('type');
productExtBo.sellChannels = productExtBo.sellChannels ? productExtBo.sellChannels.replace(/,/g, "|") : '';
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo));
productExtBo.shopIds = productExtBo.shopIdList ? productExtBo.shopIdList.join('|') : '';
//productExtBo.shopList =
common.util.__ajax({
url: '/goods/ShopsRest/queryShopsByBrandId',
data: {
brandId: basicInfo.brandId
}
}, function(res) {
productExtBo.shopList = res.data;
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo));
e.init();
}, true);
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo));
if ($('.contentpanel').data('type') == 'info') {
... ... @@ -105,6 +119,7 @@ GOLABDATA.on("LYbasicInfo", function() {
var list = option.data.sellChannels.split('|').join(',');
option.data.productSkn = $('#productSkn').val();
option.data.sellChannels = list;
option.data.shopIds = $('#shopIds').val() ? $('#shopIds').val().split('|').join(',') : '';
option.debug = true;
});
});
\ No newline at end of file
... ...
... ... @@ -217,7 +217,6 @@ var goodsList = {};
if (window.NETSALEDATA && window.NETSALEDATA.goodsList) {
goodsList = window.NETSALEDATA.goodsList;
}
console.log("封面设置", goodsList);
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
goodsList: goodsList
}));
... ... @@ -303,5 +302,3 @@ GOLABDATA.on("fenmian", function() {
"goodsImagesReq": JSON.stringify(map)
}
});
\ No newline at end of file
... ...
... ... @@ -426,6 +426,14 @@ exports.res = [
isJsonRaw: true
}
}
}, {
route: '/goods/ShopsRest/queryShopsByBrandId',
method: 'POST',
url: '/ShopsRest/queryShopsByBrandId',
params: [{
name: 'brandId',
type: 'number'
}]
},
/* {
//网销信息 -> 查询制作工艺列表
... ... @@ -571,7 +579,7 @@ exports.res = [
name: 'param',
type: 'Number'
}]
},{
}, {
//单个变价接口
route: '/goods/updatePrice',
method: 'POST',
... ...
... ... @@ -65,7 +65,7 @@
<div class="footpanel" style="text-align: center;">
<a id="saveAllInfo" href="javascript:;" class="btn btn-primary btn-lg">保存</a>
<a id="backBtn" href="history.go(-1)" class="btn btn-default btn-lg">返回</a>
<a id="backBtn" href="javascript:;" onclick="history.go(-1)" class="btn btn-default btn-lg">返回</a>
</div>
<div class="floatnav">
... ...
... ... @@ -154,4 +154,15 @@
[[/if]]
天下架</div>
</div>
[[if shopList]]
<div class="form-group">
<div class="col-sm-12">
<label>展示店铺:</label>
[[each shopList as a index]]
<label style="cursor: pointer;"><input type="checkbox" name="shopIds" value="[[a.shopsId]]">[[a.shopName]]</label>
[[/each]]
<input id="shopIds" value="[[shopIds]]" type="hidden" for="checkbox">
</div>
</div>
[[/if]]
</script>
\ No newline at end of file
... ...
... ... @@ -11,7 +11,7 @@
</div>
<div class="panel-footer">
<button class="btn btn-pass" id="fenMainSave">保存</button>
<button class="btn btn-primary" id="fenMainSave">保存</button>
</div>
</div>
<script type="text/template" id="fenmianTemp">
... ... @@ -84,6 +84,7 @@
</div>
</div>
[[/each]]
</script>
<script type="text/template" id="fenmianImgTemp">
<li class="cover-image-item fileinput-button" data-index=[[__index]]>
... ...