Authored by 马力

商品相关优化需求

@@ -124,4 +124,6 @@ module.exports=function(app) { @@ -124,4 +124,6 @@ module.exports=function(app) {
124 app.post("/netSale/saveProductUrlList","netsale_saveProductUrlList"); 124 app.post("/netSale/saveProductUrlList","netsale_saveProductUrlList");
125 /*立即比价商品链接*/ 125 /*立即比价商品链接*/
126 app.post("/ChannelProductController/synChannelProduct","netsale_synChannelProduct"); 126 app.post("/ChannelProductController/synChannelProduct","netsale_synChannelProduct");
  127 + /*商品状态的操作日志请求 */
  128 + app.post("/goods/product/queryStatusOperateLog","netsale_queryStatusOperateLog");
127 } 129 }
@@ -422,6 +422,13 @@ module.exports={ @@ -422,6 +422,13 @@ module.exports={
422 {name: 'url', type: 'string'}, 422 {name: 'url', type: 'string'},
423 {name: 'type', type: 'number'} 423 {name: 'type', type: 'number'}
424 ] 424 ]
  425 + },
  426 + queryStatusOperateLog:{
  427 + title:'触发比价商品链接',
  428 + url: '/product/queryStatusOperateLog',
  429 + params: [
  430 + {name: 'param', type: 'number'}
  431 + ]
425 } 432 }
426 } 433 }
427 } 434 }
@@ -282,4 +282,8 @@ htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:1 @@ -282,4 +282,8 @@ htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:1
282 [[/each]] 282 [[/each]]
283 </script> 283 </script>
284 284
  285 +<script type="text/template" id="status-log-template">
  286 + <div id="status-log-table" class="dataTables_wrapper no-footer"></div>
  287 +</script>
  288 +
285 <%include '../../../common/views/__ui/footer'%> 289 <%include '../../../common/views/__ui/footer'%>
@@ -415,13 +415,14 @@ var g = new common.grid({ @@ -415,13 +415,14 @@ var g = new common.grid({
415 } 415 }
416 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shelve-btn" data-index="' + item.__index + '">上/下架</a>'); 416 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shelve-btn" data-index="' + item.__index + '">上/下架</a>');
417 HtmArr.push('<a target="_blank" href="/goods/netsale/info/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs info-btn">查看</a>'); 417 HtmArr.push('<a target="_blank" href="/goods/netsale/info/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs info-btn">查看</a>');
418 - HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs chima-btn" data-index="' + item.__index + '">尺码</a>'); 418 + HtmArr.push('<br><a href="javascript:;" class="btn btn-success btn-xs chima-btn" data-index="' + item.__index + '">尺码</a>');
  419 + HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs status-log-btn" data-value="' + item.productSkn + '">操作日志</a>');
419 if(typeof(item.productSearch) == "undefined"){ 420 if(typeof(item.productSearch) == "undefined"){
420 intValue = 0; 421 intValue = 0;
421 }else{ 422 }else{
422 intValue=item.productSearch.intValue; 423 intValue=item.productSearch.intValue;
423 } 424 }
424 - HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" id="brandSortId" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>'); 425 + HtmArr.push('<br><br><input type="text" style="width:50px" name="brandSort" id="brandSortId" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>');
425 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>'); 426 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>');
426 427
427 if(typeof(item.shopsSearchSort) == "undefined"){ 428 if(typeof(item.shopsSearchSort) == "undefined"){
@@ -429,7 +430,7 @@ var g = new common.grid({ @@ -429,7 +430,7 @@ var g = new common.grid({
429 }else{ 430 }else{
430 intVal_shopsSearchSort = item.shopsSearchSort.intValue; 431 intVal_shopsSearchSort = item.shopsSearchSort.intValue;
431 } 432 }
432 - HtmArr.push('<br><br><input type="text" style="width:100px" name="shopsSort" id="shopsSortId" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>'); 433 + HtmArr.push('<br><br><input type="text" style="width:50px" name="shopsSort" id="shopsSortId" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>');
433 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shopsSort-btn" data-index="' + item.__index + '" >店铺排序</a>'); 434 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shopsSort-btn" data-index="' + item.__index + '" >店铺排序</a>');
434 return HtmArr.join(''); 435 return HtmArr.join('');
435 } 436 }
@@ -888,3 +889,58 @@ $(document).on("click", ".shopsSort-btn", function () { @@ -888,3 +889,58 @@ $(document).on("click", ".shopsSort-btn", function () {
888 889
889 //当点击“无需测量”,该列输入框不可编辑 890 //当点击“无需测量”,该列输入框不可编辑
890 common.sizeInfo.check(); 891 common.sizeInfo.check();
  892 +
  893 +
  894 +
  895 +//状态操作日志表格
  896 +var statusLogTable = new common.grid({
  897 + el: "#status-log-table",
  898 + secondIndex: 2,
  899 + columns: [{
  900 + display: 'SKN',
  901 + render: function (item) {
  902 + return item.productSkn;
  903 + }
  904 + }, {
  905 + display: '上架/下架',
  906 + render: function (item) {
  907 + return item.operateTypeStr;
  908 + }
  909 + }, {
  910 + display: '操作人',
  911 + render: function (item) {
  912 + return item.founderName;
  913 + }
  914 + }, {
  915 + display: '操作时间',
  916 + render: function (item) {
  917 + return item.createTimeStr;
  918 + }
  919 + }]
  920 +});
  921 +
  922 +var statusLogList = {};
  923 +
  924 +// 状态操作日志点击事件
  925 +$(document).on("click", ".status-log-btn", function () {
  926 + var skn = $(this).attr("data-value");
  927 + common.util.__ajax({
  928 + url: '/goods/product/queryStatusOperateLog',
  929 + data: {
  930 + param : skn
  931 + }
  932 + }, function (res) {
  933 + if (res.code == 200) {
  934 + //common.util.__template2($("#status-log-template").html(), res);
  935 + common.dialog.open({
  936 + title: '状态操作日志',
  937 + width: 600,
  938 + content: common.util.__template($('#status-log-template').html(), res),
  939 + // add by xueyin: 增加支持点击背影关闭对话框功能
  940 + backdrop: true
  941 + });
  942 + statusLogList = res.data;
  943 + statusLogTable.init(statusLogList);
  944 + }
  945 + }, true);
  946 +});