Authored by 陶雨

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

... ... @@ -435,19 +435,11 @@ e.on("validate",function(){
}
});
e.on("validate",function(){
var __index=0;
if(ag.rows.length>0){
for(var i in ag.rows){
if(ag.rows[i].val){
__index++;
}
}
}
if(!__index){
return "请选择非销售属性";
}
});
// e.on("validate",function(){
// if(!ag.__edit.validate(true)){
// }
// });
//
$(document).on("click","#btnReview",function(){
... ...
... ... @@ -36,8 +36,9 @@ var ENUM = {
'all': 0
},
isVIP: {
'N': '否',
'Y': '是'
"Y": "是",
"N": "否",
"B": "品牌设置"
}
};
... ... @@ -162,7 +163,7 @@ var g = new common.grid({
}
}, {
display: '商品信息',
display: '商品信息',width:'30%',
render: function(item) {
var productName = item.productName ? item.productName : '',
brandName = item.brandName ? item.brandName : '',
... ... @@ -397,37 +398,16 @@ var shelveTable = new common.grid({
display: 'SKC上架操作(状态)',
render: function(item) {
if (item.status == 0) {
return '<a class="btn btn-success" data-type="1" data-skc="' + item.productSkc + '" href="javascript:;">点击上架</a>';
return '<a class="btn btn-success" data-type="1" data-index="'+item.__index+'" data-skc="' + item.productSkc + '" href="javascript:;">点击上架</a>';
} else {
return '<a class="btn btn-danger" data-type="0" data-skc="' + item.productSkc + '" href="javascript:;">点击下架</a>';
return '<a class="btn btn-danger" data-type="0" data-index="'+item.__index+'" data-skc="' + item.productSkc + '" href="javascript:;">点击下架</a>';
}
}
}, {
display: 'SKU',
name: 'productSku'
}, {
display: '尺码',
name: 'sizeName'
}, {
display: '库存',
name: 'stock'
}, {
display: 'SKU上架操作',
render: function(item) {
if (item.status == 0) {
return '下架';
} else {
return '上架';
}
}
}, {
display: 'SKU上架操作',
render: function(item) {
if (item.status == 0) {
return '<a class="btn btn-success" data-type="1" data-sku="' + item.productSku + '" href="javascript:;">上架</a>';
} else {
return '<a class="btn btn-danger" data-type="0" data-sku="' + item.productSku + '" href="javascript:;">下架</a>';
}
display: '<div class="subhhead"><span>SKU</span><span>尺码</span><span>库存</span><span>SKU上架操作</span><span>SKU上架操作</span></div>',
render: function(item){
console.log(item);
return "<div class='subhhead'><i>xxx</i><i>尺码</i><i>库存</i><i>SKU上架操作</i><i>SKU上架操作</i></div>";
}
}]
});
... ... @@ -456,9 +436,10 @@ $('#basicTable').on('click', '.shelve-btn', function() {
$(that).removeClass('disabled');
shelveTable.init(res.data.goodsList, 'goodsSizeList');
shelveTable.init(res.data.goodsList);
$('#shelve-table').on('click', '.btn', function() {
var item=res.data.goodsList[$(this).data("index")];
var param = {},
reqUrl = '';
if ($(this).data('skc')) {
... ... @@ -475,6 +456,9 @@ $('#basicTable').on('click', '.shelve-btn', function() {
data: param
}, function(res) {
if (res.code == 200) {
// console.log("res.data.goodsList",res.data.goodsList);
// console.log(res.data);
item.status=(item.status)?0:1;
shelveTable.reload();
//shelveLayer.close();
}
... ...
... ... @@ -236,3 +236,12 @@ input[type=date], input[type=time], input[type=datetime-local], input[type=month
.modal-dialog{
margin-top: 70px;
}
.subhhead{
span{
width: 80px;
display: inline-block;
height: 100%;
text-align: center;
}
}
\ No newline at end of file
... ...
... ... @@ -206,7 +206,9 @@ exports.res = [
// url: '/product/getNetSaleInfo',
src: '/goods/netsale-edit',
data: {
type: 'info'
type: 'info',
subtitle:"查看",
maintitle:"查看商品信息"
} //,
// params: [{
... ... @@ -222,7 +224,9 @@ exports.res = [
src: '/goods/netsale-edit',
data: {
type: 'edit'
type: 'edit',
subtitle:"编辑",
maintitle:"编辑商品信息"
} //,
// params: [{
... ...
... ... @@ -9,9 +9,9 @@
<li><a href="#">商品管理</a></li>
<li>编辑</li>
<li>{{subtitle}}</li>
</ul>
<h4>编辑商品信息</h4>
<h4>{{maintitle}}</h4>
</div>
</div>
</div>
... ...
... ... @@ -105,7 +105,7 @@
</div>
<div class="panel-col">
<select name="productStatus" id="productStatus" tabindex="-1" title="" class="form-control height40">
<option value="">状态</option>
<option value="">上架状态</option>
<option value="8">待上架</option>
<option value="2">待审核</option>
<option value="3">驳回</option>
... ... @@ -216,3 +216,15 @@
<div id="shelve-table" class="dataTables_wrapper no-footer"></div>
</script>
<script type="text/template" id="template2">
[[each goodsSizeList as item index]]
<div class="subhhead">
<span>[[item.SKU]]</span>
<span>[[item.sizeName]]</span>
<span>[[item.stock]]</span>
<span>SKU上架操作</span>
<span>SKU上架操作</span>
</div>
[[/each]]
</script>
\ No newline at end of file
... ...