Merge branch 'hotfix_预上架时间修复' into grey
Showing
1 changed file
with
61 additions
and
61 deletions
@@ -6,7 +6,7 @@ var $ = require('jquery'), | @@ -6,7 +6,7 @@ var $ = require('jquery'), | ||
6 | window.batchOperateShelve = []; | 6 | window.batchOperateShelve = []; |
7 | 7 | ||
8 | // 存储批量上下架中,选中的商品详情 | 8 | // 存储批量上下架中,选中的商品详情 |
9 | -window.batchShelveProduct = []; | 9 | +window.batchShelveProduct = []; |
10 | 10 | ||
11 | var ENUM = { | 11 | var ENUM = { |
12 | gender: { | 12 | gender: { |
@@ -72,14 +72,14 @@ var t = new common.tab2({ | @@ -72,14 +72,14 @@ var t = new common.tab2({ | ||
72 | active: 4, | 72 | active: 4, |
73 | click: function () { | 73 | click: function () { |
74 | var columnname = t.options.columns[t.options.active].name; | 74 | var columnname = t.options.columns[t.options.active].name; |
75 | - g.options.columns[11].hidden = true; | ||
76 | - g.options.columns[8].hidden = true; | 75 | + g.options.columns[12].hidden = true; |
76 | + g.options.columns[9].hidden = true; | ||
77 | if (columnname == 3) { | 77 | if (columnname == 3) { |
78 | isInfoMiss = 'Y'; | 78 | isInfoMiss = 'Y'; |
79 | - g.options.columns[11].hidden = false; | 79 | + g.options.columns[12].hidden = false; |
80 | } else { | 80 | } else { |
81 | isInfoMiss = ''; | 81 | isInfoMiss = ''; |
82 | - g.options.columns[8].hidden = false; | 82 | + g.options.columns[9].hidden = false; |
83 | } | 83 | } |
84 | 84 | ||
85 | if (columnname == 1 || columnname == 2 || columnname == 3) { | 85 | if (columnname == 1 || columnname == 2 || columnname == 3) { |
@@ -151,22 +151,22 @@ var g = new common.grid({ | @@ -151,22 +151,22 @@ var g = new common.grid({ | ||
151 | }; | 151 | }; |
152 | }, | 152 | }, |
153 | columns: [{ | 153 | columns: [{ |
154 | - display: '', | 154 | + display: '', |
155 | type: 'checkbox', | 155 | type: 'checkbox', |
156 | render: function (item) { | 156 | render: function (item) { |
157 | - var htmlContent = ""; | 157 | + var htmlContent = ""; |
158 | if(batchOperateShelve.length == 0 ){ | 158 | if(batchOperateShelve.length == 0 ){ |
159 | - htmlContent = "<input type='checkbox' class='wqt_checkbox' data-index='"+item.__index+"'>"; | ||
160 | - }else{ | 159 | + htmlContent = "<input type='checkbox' class='wqt_checkbox' data-index='"+item.__index+"'>"; |
160 | + }else{ | ||
161 | $.each(batchOperateShelve,function(n,value) { | 161 | $.each(batchOperateShelve,function(n,value) { |
162 | if(item.productSkn == value){ | 162 | if(item.productSkn == value){ |
163 | htmlContent = "<input type='checkbox' checked='checked' class='wqt_checkbox' data-index='"+item.__index+"'>"; | 163 | htmlContent = "<input type='checkbox' checked='checked' class='wqt_checkbox' data-index='"+item.__index+"'>"; |
164 | return false | 164 | return false |
165 | }else{ | 165 | }else{ |
166 | - htmlContent = "<input type='checkbox' class='wqt_checkbox'data-index='"+item.__index+"'>"; | 166 | + htmlContent = "<input type='checkbox' class='wqt_checkbox'data-index='"+item.__index+"'>"; |
167 | } | 167 | } |
168 | }) | 168 | }) |
169 | - } | 169 | + } |
170 | return htmlContent; | 170 | return htmlContent; |
171 | } | 171 | } |
172 | }, { | 172 | }, { |
@@ -322,22 +322,22 @@ var g = new common.grid({ | @@ -322,22 +322,22 @@ var g = new common.grid({ | ||
322 | if (item.status == 3 || item.status == 6 ||item.status == 9) { | 322 | if (item.status == 3 || item.status == 6 ||item.status == 9) { |
323 | html += '<p style="color:red;">(' + item.rejectReason + ')</p>' | 323 | html += '<p style="color:red;">(' + item.rejectReason + ')</p>' |
324 | } | 324 | } |
325 | - if (item.isAdvance == "Y") { | ||
326 | - if (item.advanceBeginTime) { | ||
327 | - html += '<br>预售开始时间' + item.advanceBeginTime; | ||
328 | - } | ||
329 | - if (item.advanceEndTime) { | ||
330 | - html += '<br>预售结束时间' + item.advanceEndTime; | ||
331 | - } | ||
332 | - } else { | ||
333 | - if (item.shelveTime&&item.status==1) { | ||
334 | - html += '<br>上架时间' + item.shelveTime; | ||
335 | - } else if(item.preShelveTime&&(item.status==4||item.status==7)){ | ||
336 | - html += '<br>预上架时间' + item.preShelveTime; | ||
337 | - } | 325 | + if (item.isAdvance == "Y") { |
326 | + if (item.advanceBeginTime) { | ||
327 | + html += '<br>预售开始时间' + item.advanceBeginTime; | ||
338 | } | 328 | } |
339 | - //商品为预售商品,上架状态为通过,在【上架状态】列表栏,显示上架时间(为设置的【预售开始时间】)、下架时间(为设置的【预售结束时间】) | ||
340 | - //2) 商品为预上架商品,上架状态为通过,在【上架状态】列表栏,显示上架时间(为设置的【预上架时间】) | 329 | + if (item.advanceEndTime) { |
330 | + html += '<br>预售结束时间' + item.advanceEndTime; | ||
331 | + } | ||
332 | + } else { | ||
333 | + if (item.shelveTime&&item.status==1) { | ||
334 | + html += '<br>上架时间' + item.shelveTime; | ||
335 | + } else if(item.preShelveTime&&(item.status==4||item.status==7)){ | ||
336 | + html += '<br>预上架时间' + item.preShelveTime; | ||
337 | + } | ||
338 | + } | ||
339 | + //商品为预售商品,上架状态为通过,在【上架状态】列表栏,显示上架时间(为设置的【预售开始时间】)、下架时间(为设置的【预售结束时间】) | ||
340 | + //2) 商品为预上架商品,上架状态为通过,在【上架状态】列表栏,显示上架时间(为设置的【预上架时间】) | ||
341 | return html; | 341 | return html; |
342 | } | 342 | } |
343 | }, { | 343 | }, { |
@@ -379,7 +379,7 @@ var g = new common.grid({ | @@ -379,7 +379,7 @@ var g = new common.grid({ | ||
379 | } | 379 | } |
380 | HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>'); | 380 | HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>'); |
381 | HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>'); | 381 | HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>'); |
382 | - | 382 | + |
383 | if(typeof(item.shopsSearchSort) == "undefined"){ | 383 | if(typeof(item.shopsSearchSort) == "undefined"){ |
384 | intVal_shopsSearchSort = 0; | 384 | intVal_shopsSearchSort = 0; |
385 | }else{ | 385 | }else{ |
@@ -390,7 +390,7 @@ var g = new common.grid({ | @@ -390,7 +390,7 @@ var g = new common.grid({ | ||
390 | return HtmArr.join(''); | 390 | return HtmArr.join(''); |
391 | } | 391 | } |
392 | }], | 392 | }], |
393 | - complete:function(){ | 393 | + complete:function(){ |
394 | //渲染表头是否勾选 | 394 | //渲染表头是否勾选 |
395 | $.each(pageSkn, function (i, pageItem) { | 395 | $.each(pageSkn, function (i, pageItem) { |
396 | if($.inArray(pageItem, batchOperateShelve) == -1 ) { | 396 | if($.inArray(pageItem, batchOperateShelve) == -1 ) { |
@@ -399,7 +399,7 @@ var g = new common.grid({ | @@ -399,7 +399,7 @@ var g = new common.grid({ | ||
399 | 399 | ||
400 | return false; | 400 | return false; |
401 | } | 401 | } |
402 | - $(".wqt_all").prop("checked", true); | 402 | + $(".wqt_all").prop("checked", true); |
403 | }); | 403 | }); |
404 | 404 | ||
405 | pageSkn = []; | 405 | pageSkn = []; |
@@ -440,9 +440,9 @@ function shelveModal(title, html) { | @@ -440,9 +440,9 @@ function shelveModal(title, html) { | ||
440 | var selectedArr = g.selected, | 440 | var selectedArr = g.selected, |
441 | len = selectedArr.length, | 441 | len = selectedArr.length, |
442 | productSknList = [], | 442 | productSknList = [], |
443 | - shelveLayer = null; | 443 | + shelveLayer = null; |
444 | 444 | ||
445 | - // $.each(selectedArr, function (i, value) { | 445 | + // $.each(selectedArr, function (i, value) { |
446 | // // productSknList.push(value['productSkn']); | 446 | // // productSknList.push(value['productSkn']); |
447 | // }); | 447 | // }); |
448 | 448 | ||
@@ -516,11 +516,11 @@ function shelveModal(title, html) { | @@ -516,11 +516,11 @@ function shelveModal(title, html) { | ||
516 | url: '/goods/product/updateProductSknTimingInfo', | 516 | url: '/goods/product/updateProductSknTimingInfo', |
517 | data: data | 517 | data: data |
518 | }, function (res) { | 518 | }, function (res) { |
519 | - batchOperateShelve = [] ; | ||
520 | - batchShelveProduct = []; | ||
521 | - shelveLayer.close(); | ||
522 | - loadtab(); | ||
523 | - g.reload(); | 519 | + batchOperateShelve = [] ; |
520 | + batchShelveProduct = []; | ||
521 | + shelveLayer.close(); | ||
522 | + loadtab(); | ||
523 | + g.reload(); | ||
524 | }); | 524 | }); |
525 | } | 525 | } |
526 | }); | 526 | }); |
@@ -531,7 +531,7 @@ function shelveModal(title, html) { | @@ -531,7 +531,7 @@ function shelveModal(title, html) { | ||
531 | $('#onshelve').on('click', function () { | 531 | $('#onshelve').on('click', function () { |
532 | var htmlContent = "", | 532 | var htmlContent = "", |
533 | sknWarnLayer = null, | 533 | sknWarnLayer = null, |
534 | - skns = ""; | 534 | + skns = ""; |
535 | if(batchOperateShelve.length == 0 ){ | 535 | if(batchOperateShelve.length == 0 ){ |
536 | htmlContent = "<div class=\"alert alert-danger\">未选中任何SKN, Please check !</div>" | 536 | htmlContent = "<div class=\"alert alert-danger\">未选中任何SKN, Please check !</div>" |
537 | }else{ | 537 | }else{ |
@@ -545,19 +545,19 @@ $('#onshelve').on('click', function () { | @@ -545,19 +545,19 @@ $('#onshelve').on('click', function () { | ||
545 | htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:100% \">"+skns.substr(0,skns.length-1)+"</div>" | 545 | htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:100% \">"+skns.substr(0,skns.length-1)+"</div>" |
546 | } | 546 | } |
547 | htmlContent +="<div class=\"form-group\" style=\"float:right \">"+ | 547 | htmlContent +="<div class=\"form-group\" style=\"float:right \">"+ |
548 | - "<div style=\"margin-right:10% \" class=\"col-sm-1\"><a id = \"confirmSkn\" class=\"btn btn-info\" href=\"javascript:;\">确定</a></div>" | ||
549 | - "</div>" | 548 | + "<div style=\"margin-right:10% \" class=\"col-sm-1\"><a id = \"confirmSkn\" class=\"btn btn-info\" href=\"javascript:;\">确定</a></div>" |
549 | + "</div>" | ||
550 | 550 | ||
551 | sknWarnLayer = common.dialog.open({ | 551 | sknWarnLayer = common.dialog.open({ |
552 | title: "待上架SKN", | 552 | title: "待上架SKN", |
553 | content: htmlContent | 553 | content: htmlContent |
554 | }); | 554 | }); |
555 | 555 | ||
556 | - $('#confirmSkn').on('click', function () { | 556 | + $('#confirmSkn').on('click', function () { |
557 | sknWarnLayer.close(); | 557 | sknWarnLayer.close(); |
558 | shelveModal('上架', $('#onshelve-template').html()) | 558 | shelveModal('上架', $('#onshelve-template').html()) |
559 | }); | 559 | }); |
560 | - | 560 | + |
561 | }); | 561 | }); |
562 | 562 | ||
563 | 563 | ||
@@ -766,11 +766,11 @@ $(document).on("click", ".chima-btn", function () { | @@ -766,11 +766,11 @@ $(document).on("click", ".chima-btn", function () { | ||
766 | }, true); | 766 | }, true); |
767 | }); | 767 | }); |
768 | /** | 768 | /** |
769 | -*品牌排序 | ||
770 | -*/ | 769 | + *品牌排序 |
770 | + */ | ||
771 | $(document).on("click", ".brandSort-btn", function () { | 771 | $(document).on("click", ".brandSort-btn", function () { |
772 | var item = g.rows[$(this).data("index")]; | 772 | var item = g.rows[$(this).data("index")]; |
773 | - var num = $("input:text[name='brandSort']").eq($(this).data("index")).val(); | 773 | + var num = $("input:text[name='brandSort']").eq($(this).data("index")).val(); |
774 | var searchSortList = []; | 774 | var searchSortList = []; |
775 | for (var i = 0; i < 1; i++) { | 775 | for (var i = 0; i < 1; i++) { |
776 | searchSortList[i] = { | 776 | searchSortList[i] = { |
@@ -781,37 +781,37 @@ $(document).on("click", ".brandSort-btn", function () { | @@ -781,37 +781,37 @@ $(document).on("click", ".brandSort-btn", function () { | ||
781 | }; | 781 | }; |
782 | } | 782 | } |
783 | common.util.__ajax({ | 783 | common.util.__ajax({ |
784 | - url: '/netSale/saveSearchSort', | ||
785 | - data: { | ||
786 | - searchSortList: JSON.stringify(searchSortList) | ||
787 | - } | 784 | + url: '/netSale/saveSearchSort', |
785 | + data: { | ||
786 | + searchSortList: JSON.stringify(searchSortList) | ||
787 | + } | ||
788 | } | 788 | } |
789 | - ); | ||
790 | - }); | 789 | + ); |
790 | +}); | ||
791 | 791 | ||
792 | /** | 792 | /** |
793 | -*店铺商品排序 | ||
794 | -*/ | 793 | + *店铺商品排序 |
794 | + */ | ||
795 | $(document).on("click", ".shopsSort-btn", function () { | 795 | $(document).on("click", ".shopsSort-btn", function () { |
796 | var item = g.rows[$(this).data("index")]; | 796 | var item = g.rows[$(this).data("index")]; |
797 | - var num = $("input:text[name='shopsSort']").eq($(this).data("index")).val(); | 797 | + var num = $("input:text[name='shopsSort']").eq($(this).data("index")).val(); |
798 | var searchSortList = []; | 798 | var searchSortList = []; |
799 | - | 799 | + |
800 | searchSortList.push({ | 800 | searchSortList.push({ |
801 | productSkn: item.productSkn, | 801 | productSkn: item.productSkn, |
802 | modelId: 1, | 802 | modelId: 1, |
803 | projectId: 5, | 803 | projectId: 5, |
804 | intValue: num | 804 | intValue: num |
805 | }); | 805 | }); |
806 | - | 806 | + |
807 | common.util.__ajax({ | 807 | common.util.__ajax({ |
808 | - url: '/netSale/saveShopsSearchSort', | ||
809 | - data: { | ||
810 | - searchSortList: JSON.stringify(searchSortList) | ||
811 | - } | 808 | + url: '/netSale/saveShopsSearchSort', |
809 | + data: { | ||
810 | + searchSortList: JSON.stringify(searchSortList) | ||
811 | + } | ||
812 | } | 812 | } |
813 | - ); | ||
814 | - }); | 813 | + ); |
814 | +}); | ||
815 | 815 | ||
816 | //当点击“无需测量”,该列输入框不可编辑 | 816 | //当点击“无需测量”,该列输入框不可编辑 |
817 | common.sizeInfo.check(); | 817 | common.sizeInfo.check(); |
-
Please register or login to post a comment