Authored by 马力

商品相关优化需求

... ... @@ -124,4 +124,6 @@ module.exports=function(app) {
app.post("/netSale/saveProductUrlList","netsale_saveProductUrlList");
/*立即比价商品链接*/
app.post("/ChannelProductController/synChannelProduct","netsale_synChannelProduct");
/*商品状态的操作日志请求 */
app.post("/goods/product/queryStatusOperateLog","netsale_queryStatusOperateLog");
}
\ No newline at end of file
... ...
... ... @@ -422,6 +422,13 @@ module.exports={
{name: 'url', type: 'string'},
{name: 'type', type: 'number'}
]
},
queryStatusOperateLog:{
title:'触发比价商品链接',
url: '/product/queryStatusOperateLog',
params: [
{name: 'param', type: 'number'}
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -282,4 +282,8 @@ htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:1
[[/each]]
</script>
<script type="text/template" id="status-log-template">
<div id="status-log-table" class="dataTables_wrapper no-footer"></div>
</script>
<%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
... ... @@ -415,13 +415,14 @@ var g = new common.grid({
}
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shelve-btn" data-index="' + item.__index + '">上/下架</a>');
HtmArr.push('<a target="_blank" href="/goods/netsale/info/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs info-btn">查看</a>');
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs chima-btn" data-index="' + item.__index + '">尺码</a>');
HtmArr.push('<br><a href="javascript:;" class="btn btn-success btn-xs chima-btn" data-index="' + item.__index + '">尺码</a>');
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs status-log-btn" data-value="' + item.productSkn + '">操作日志</a>');
if(typeof(item.productSearch) == "undefined"){
intValue = 0;
}else{
intValue=item.productSearch.intValue;
}
HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" id="brandSortId" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>');
HtmArr.push('<br><br><input type="text" style="width:50px" name="brandSort" id="brandSortId" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>');
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>');
if(typeof(item.shopsSearchSort) == "undefined"){
... ... @@ -429,7 +430,7 @@ var g = new common.grid({
}else{
intVal_shopsSearchSort = item.shopsSearchSort.intValue;
}
HtmArr.push('<br><br><input type="text" style="width:100px" name="shopsSort" id="shopsSortId" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>');
HtmArr.push('<br><br><input type="text" style="width:50px" name="shopsSort" id="shopsSortId" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>');
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shopsSort-btn" data-index="' + item.__index + '" >店铺排序</a>');
return HtmArr.join('');
}
... ... @@ -887,4 +888,59 @@ $(document).on("click", ".shopsSort-btn", function () {
});
//当点击“无需测量”,该列输入框不可编辑
common.sizeInfo.check();
\ No newline at end of file
common.sizeInfo.check();
//状态操作日志表格
var statusLogTable = new common.grid({
el: "#status-log-table",
secondIndex: 2,
columns: [{
display: 'SKN',
render: function (item) {
return item.productSkn;
}
}, {
display: '上架/下架',
render: function (item) {
return item.operateTypeStr;
}
}, {
display: '操作人',
render: function (item) {
return item.founderName;
}
}, {
display: '操作时间',
render: function (item) {
return item.createTimeStr;
}
}]
});
var statusLogList = {};
// 状态操作日志点击事件
$(document).on("click", ".status-log-btn", function () {
var skn = $(this).attr("data-value");
common.util.__ajax({
url: '/goods/product/queryStatusOperateLog',
data: {
param : skn
}
}, function (res) {
if (res.code == 200) {
//common.util.__template2($("#status-log-template").html(), res);
common.dialog.open({
title: '状态操作日志',
width: 600,
content: common.util.__template($('#status-log-template').html(), res),
// add by xueyin: 增加支持点击背影关闭对话框功能
backdrop: true
});
statusLogList = res.data;
statusLogTable.init(statusLogList);
}
}, true);
});
... ...