...
|
...
|
@@ -53,16 +53,23 @@ new common.dropDown({ |
|
|
});
|
|
|
|
|
|
|
|
|
var editPostion = '';
|
|
|
|
|
|
var t = new common.tab({
|
|
|
el: "#basicTab",
|
|
|
click: function() {
|
|
|
g.options.columns[11].hidden = true;
|
|
|
g.options.columns[8].hidden = true;
|
|
|
if ($(this).find('a').attr('columnname') == 3) {
|
|
|
var columnname = $(this).find('a').attr('columnname');
|
|
|
if (columnname == 3) {
|
|
|
g.options.columns[11].hidden = false;
|
|
|
} else if ($(this).find('a').attr('columnname') == 2) {
|
|
|
} else if (columnname == 2) {
|
|
|
g.options.columns[8].hidden = false;
|
|
|
};
|
|
|
|
|
|
if (columnname == 1 || columnname == 2) {
|
|
|
editPostion = '#position9';
|
|
|
}
|
|
|
g.init($("#gridurl").val());
|
|
|
},
|
|
|
columns: [{
|
...
|
...
|
@@ -133,7 +140,10 @@ var g = new common.grid({ |
|
|
type: 'checkbox'
|
|
|
}, {
|
|
|
display: 'skn',
|
|
|
name: 'productSkn'
|
|
|
name: 'productSkn',
|
|
|
render: function(item) {
|
|
|
return '<a href="/goods/netsale/info/' + item.productSkn + editPostion + '">' + item.productSkn + '</a>'
|
|
|
}
|
|
|
}, {
|
|
|
display: '图片',
|
|
|
name: 'picImgUrl',
|
...
|
...
|
@@ -202,7 +212,7 @@ var g = new common.grid({ |
|
|
if (item.shelveTime) {
|
|
|
html += '<br>上架时间:' + item.shelveTime;
|
|
|
}
|
|
|
if (item.status == 3) {
|
|
|
if (item.status == 3 || item.status == 6) {
|
|
|
html += '<p style="color:red;">(' + item.rejectReason + ')</p>'
|
|
|
}
|
|
|
return html;
|
...
|
...
|
@@ -219,13 +229,13 @@ var g = new common.grid({ |
|
|
var HtmArr = [];
|
|
|
|
|
|
if (item.status == 1) {
|
|
|
HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + '" class="btn btn-info btn-xs edit-btn">编辑</a>');
|
|
|
HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs edit-btn">编辑</a>');
|
|
|
HtmArr.push('<a href="javascript:;" class="btn btn-danger btn-xs shelve-btn" data-skn="' + item.productSkn + '">下架</a>');
|
|
|
} else if (item.status != 2 && item.status != 5) {
|
|
|
HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + '" class="btn btn-info btn-xs edit-btn">编辑</a>');
|
|
|
HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs edit-btn">编辑</a>');
|
|
|
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shelve-btn" data-skn="' + item.productSkn + '">上架</a>');
|
|
|
}
|
|
|
HtmArr.push('<a href="/goods/netsale/info/' + item.productSkn + '" class="btn btn-info btn-xs info-btn">查看</a>');
|
|
|
HtmArr.push('<a href="/goods/netsale/info/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs info-btn">查看</a>');
|
|
|
return HtmArr.join('');
|
|
|
}
|
|
|
}]
|
...
|
...
|
@@ -277,6 +287,8 @@ function shelveModal(title, html) { |
|
|
if (res.data.code == 200) {
|
|
|
e.$tip(res.data.message, function() {
|
|
|
shelveLayer.close();
|
|
|
loadtab();
|
|
|
g.reload();
|
|
|
}, 'growl-success');
|
|
|
} else {
|
|
|
e.$tip(res.data.message);
|
...
|
...
|
|