Authored by 马力

Merge branch 'dev_2.5_基础网销' into grey

@@ -138,7 +138,7 @@ @@ -138,7 +138,7 @@
138 <td>说明:</td> 138 <td>说明:</td>
139 <td colspan="2"> 139 <td colspan="2">
140 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br> 140 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
141 - 2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号、一级分类、二级分类、三级分类、四级分类(目前不用)、性别、货品年、货品季、吊牌价、销售价、色系、厂家颜色、款型(选填)、尺码、条码、能否补货、SKN计数、年龄层(多个用'|'分隔)、重点款型、UPM条码(选填) </span><br> 141 + 2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号(选填)、一级分类、二级分类、三级分类、四级分类(目前不用)、性别、货品年、货品季、吊牌价、销售价、色系、厂家颜色、款型编码、尺码、条码、能否补货、SKN计数、年龄层(多个用'|'分隔)、重点款型、UPM条码(选填) </span><br>
142 3、<a href="/ajax/link/baseproduct" style="margin: 0; text-decoration: underline">下载样例.xlsx</a> 142 3、<a href="/ajax/link/baseproduct" style="margin: 0; text-decoration: underline">下载样例.xlsx</a>
143 </td> 143 </td>
144 </tr> 144 </tr>
@@ -127,9 +127,9 @@ @@ -127,9 +127,9 @@
127 <input type="hidden" id="appType" name="appType" value="[[appType||'0']]" for="checkbox" /> 127 <input type="hidden" id="appType" name="appType" value="[[appType||'0']]" for="checkbox" />
128 </div> 128 </div>
129 </span> 129 </span>
130 - <label class="col-sm-1 control-label">厂家编号 <span class="red">*</span></label> 130 + <label class="col-sm-1 control-label">厂家编号</label>
131 <div class="col-sm-2"> 131 <div class="col-sm-2">
132 - <input type="text" id="factoryCode" placeholder="厂家编号" value="[[factoryCode]]" class="form-control" required/> 132 + <input type="text" id="factoryCode" placeholder="厂家编号" value="[[factoryCode]]" class="form-control"/>
133 </div> 133 </div>
134 </div> 134 </div>
135 <div class="form-group"> 135 <div class="form-group">
@@ -184,6 +184,7 @@ module.exports = { @@ -184,6 +184,7 @@ module.exports = {
184 productSkc: {type: Number}, 184 productSkc: {type: Number},
185 startTime: {type: Number}, 185 startTime: {type: Number},
186 shopId: {type: Number}, 186 shopId: {type: Number},
  187 + brandId: {type: Number},
187 endTime: {type: Number} 188 endTime: {type: Number}
188 189
189 } 190 }
@@ -34,6 +34,17 @@ @@ -34,6 +34,17 @@
34 <option value="-1">请选择店铺</option> 34 <option value="-1">请选择店铺</option>
35 </select> 35 </select>
36 </div> 36 </div>
  37 + <div class="panel-col">
  38 + <select id="brandId" class="form-control">
  39 + <option value="-1">请选择品牌</option>
  40 + </select>
  41 + </div>
  42 +
  43 + <!-- <div class="panel-col">
  44 + <select name="brandId" id="brand-filter" tabindex="-1" title="" class="form-control">
  45 + <option value="">选择品牌</option>
  46 + </select>
  47 + </div>-->
37 <div class="panel-col2"> 48 <div class="panel-col2">
38 <a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a> 49 <a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
39 <a id="filter-all" href="/shotManage/proPhoto/index" class="btn btn-info">全部</a> 50 <a id="filter-all" href="/shotManage/proPhoto/index" class="btn btn-info">全部</a>
@@ -198,12 +198,12 @@ var g=new common.grid({ @@ -198,12 +198,12 @@ var g=new common.grid({
198 } 198 }
199 }, 199 },
200 { 200 {
201 - display:"<label class='red'>厂家颜色、尺码、条码、销售价 必填</label>",render:function(item){ 201 + display:"<label class='red'>厂家颜色、尺码、款型编码、条码、销售价 必填</label>",render:function(item){
202 if(!item.isAdd&&!g.__gsm.hasOwnProperty(item.__index)){ 202 if(!item.isAdd&&!g.__gsm.hasOwnProperty(item.__index)){
203 g.__gsm[item.__index]=item.goodsSizeList.length; 203 g.__gsm[item.__index]=item.goodsSizeList.length;
204 } 204 }
205 var html=[]; 205 var html=[];
206 - html.push("<div class='form-group' style='padding-bottom: 0'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' /></div></div>"); 206 + html.push("<div class='form-group' style='padding-bottom: 0'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' required/></div></div>");
207 html.push("<div class='rows'><div class='form-group' style='padding-bottom: 0'><div class='col-sm-2'>尺码</div><div class='col-sm-2'>销售价</div><div class='col-sm-2'>条码</div><div class='col-sm-1'>是否补货</div><div class='col-sm-2'>UPM条码</div><div class='col-sm-2'>支付尾款时间</div></div></div>"); 207 html.push("<div class='rows'><div class='form-group' style='padding-bottom: 0'><div class='col-sm-2'>尺码</div><div class='col-sm-2'>销售价</div><div class='col-sm-2'>条码</div><div class='col-sm-1'>是否补货</div><div class='col-sm-2'>UPM条码</div><div class='col-sm-2'>支付尾款时间</div></div></div>");
208 html.push('<div class="rows" id="rows__'+item.__index+'">'); 208 html.push('<div class="rows" id="rows__'+item.__index+'">');
209 item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)]; 209 item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
@@ -294,10 +294,6 @@ $(document).on("click",".sortadd",function(){ @@ -294,10 +294,6 @@ $(document).on("click",".sortadd",function(){
294 common.util.__tip("吊牌价不合法,包含小数位不能大于10位","warning"); 294 common.util.__tip("吊牌价不合法,包含小数位不能大于10位","warning");
295 return; 295 return;
296 } 296 }
297 - if ($.trim($("#factoryCode").val())=="") {  
298 - common.util.__tip("请填写厂家编号","warning");  
299 - return;  
300 - }  
301 if(g.__e.validate()){ 297 if(g.__e.validate()){
302 var goodsSizeList=$.extend({},ENUM.goodsSizeList); 298 var goodsSizeList=$.extend({},ENUM.goodsSizeList);
303 goodsSizeList.salePrice=$.trim($("#salesPriceStr").val()); 299 goodsSizeList.salePrice=$.trim($("#salesPriceStr").val());
@@ -313,7 +313,7 @@ var g = new common.grid({ @@ -313,7 +313,7 @@ var g = new common.grid({
313 313
314 return html.join(''); 314 return html.join('');
315 } 315 }
316 - }, { 316 + }, {
317 display: '搜索/标签', 317 display: '搜索/标签',
318 hidden: true, 318 hidden: true,
319 render: function (item) { 319 render: function (item) {
@@ -387,6 +387,9 @@ var g = new common.grid({ @@ -387,6 +387,9 @@ var g = new common.grid({
387 return html.join(''); 387 return html.join('');
388 } 388 }
389 }, { 389 }, {
  390 + display: 'SKC个数',
  391 + name: 'skcNum'
  392 + },{
390 display: '操作', 393 display: '操作',
391 render: function (item) { 394 render: function (item) {
392 var HtmArr = []; 395 var HtmArr = [];
@@ -407,7 +410,7 @@ var g = new common.grid({ @@ -407,7 +410,7 @@ var g = new common.grid({
407 }else{ 410 }else{
408 intValue=item.productSearch.intValue; 411 intValue=item.productSearch.intValue;
409 } 412 }
410 - HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>'); 413 + HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" id="brandSortId" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>');
411 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>'); 414 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>');
412 415
413 if(typeof(item.shopsSearchSort) == "undefined"){ 416 if(typeof(item.shopsSearchSort) == "undefined"){
@@ -415,7 +418,7 @@ var g = new common.grid({ @@ -415,7 +418,7 @@ var g = new common.grid({
415 }else{ 418 }else{
416 intVal_shopsSearchSort = item.shopsSearchSort.intValue; 419 intVal_shopsSearchSort = item.shopsSearchSort.intValue;
417 } 420 }
418 - HtmArr.push('<br><br><input type="text" style="width:100px" name="shopsSort" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>'); 421 + HtmArr.push('<br><br><input type="text" style="width:100px" name="shopsSort" id="shopsSortId" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>');
419 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shopsSort-btn" data-index="' + item.__index + '" >店铺排序</a>'); 422 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shopsSort-btn" data-index="' + item.__index + '" >店铺排序</a>');
420 return HtmArr.join(''); 423 return HtmArr.join('');
421 } 424 }
@@ -643,7 +646,8 @@ var shelveTable = new common.grid({ @@ -643,7 +646,8 @@ var shelveTable = new common.grid({
643 render: function (item) { 646 render: function (item) {
644 647
645 return 'SKC:' + item.productSkc + '<br>' + 648 return 'SKC:' + item.productSkc + '<br>' +
646 - '颜色:' + item.goodsName; 649 + '颜色:' + item.goodsName+ '<br>' +
  650 + '厂家颜色:' + item.factoryGoodsName;
647 } 651 }
648 }, { 652 }, {
649 display: 'SKC上架操作(状态)', 653 display: 'SKC上架操作(状态)',
@@ -799,6 +803,12 @@ $(document).on("click", ".chima-btn", function () { @@ -799,6 +803,12 @@ $(document).on("click", ".chima-btn", function () {
799 /** 803 /**
800 *品牌排序 804 *品牌排序
801 */ 805 */
  806 +
  807 +/*验证 hack*/
  808 +$(document).on('keyup', '#brandSortId', function() {
  809 + $(this).val($(this).val().replace(/\D/g, ''));
  810 +});
  811 +
802 $(document).on("click", ".brandSort-btn", function () { 812 $(document).on("click", ".brandSort-btn", function () {
803 var item = g.rows[$(this).data("index")]; 813 var item = g.rows[$(this).data("index")];
804 var num = $("input:text[name='brandSort']").eq($(this).data("index")).val(); 814 var num = $("input:text[name='brandSort']").eq($(this).data("index")).val();
@@ -808,7 +818,7 @@ $(document).on("click", ".brandSort-btn", function () { @@ -808,7 +818,7 @@ $(document).on("click", ".brandSort-btn", function () {
808 productSkn: item.productSkn, 818 productSkn: item.productSkn,
809 modelId: i + 1, 819 modelId: i + 1,
810 projectId: 1, 820 projectId: 1,
811 - intValue: num 821 + intValue: $.trim(num)
812 }; 822 };
813 } 823 }
814 common.util.__ajax({ 824 common.util.__ajax({
@@ -823,6 +833,11 @@ $(document).on("click", ".brandSort-btn", function () { @@ -823,6 +833,11 @@ $(document).on("click", ".brandSort-btn", function () {
823 /** 833 /**
824 *店铺商品排序 834 *店铺商品排序
825 */ 835 */
  836 +/*验证 hack*/
  837 +$(document).on('keyup', '#shopsSortId', function() {
  838 + $(this).val($(this).val().replace(/\D/g, ''));
  839 +});
  840 +
826 $(document).on("click", ".shopsSort-btn", function () { 841 $(document).on("click", ".shopsSort-btn", function () {
827 var item = g.rows[$(this).data("index")]; 842 var item = g.rows[$(this).data("index")];
828 var num = $("input:text[name='shopsSort']").eq($(this).data("index")).val(); 843 var num = $("input:text[name='shopsSort']").eq($(this).data("index")).val();
@@ -832,7 +847,7 @@ $(document).on("click", ".shopsSort-btn", function () { @@ -832,7 +847,7 @@ $(document).on("click", ".shopsSort-btn", function () {
832 productSkn: item.productSkn, 847 productSkn: item.productSkn,
833 modelId: 1, 848 modelId: 1,
834 projectId: 5, 849 projectId: 5,
835 - intValue: num 850 + intValue: $.trim(num)
836 }); 851 });
837 852
838 common.util.__ajax({ 853 common.util.__ajax({
@@ -29,12 +29,22 @@ var g = new common.grid({ @@ -29,12 +29,22 @@ var g = new common.grid({
29 productSku: common.util.__input('content-filter3'), 29 productSku: common.util.__input('content-filter3'),
30 startTime: ((new Date($('#starttime').val())).getTime()) / 1000, 30 startTime: ((new Date($('#starttime').val())).getTime()) / 1000,
31 endTime: ((new Date($('#endtime').val())).getTime()) / 1000, 31 endTime: ((new Date($('#endtime').val())).getTime()) / 1000,
32 - shopId: common.util.__input("shopId") 32 + shopId: common.util.__input("shopId"),
  33 + brandId:common.util.__input("brandId")
33 }; 34 };
34 }, 35 },
35 //列表显示 36 //列表显示
36 columns: [ 37 columns: [
37 - {display: "SKN", name: "productSkn"}, 38 + {display: "SKN", name: "productSkn",
  39 + render: function (item) {
  40 + var flag=item.roleFlag;
  41 + if(flag==1){
  42 + return '<a target="_blank" href="/goods/netsale/edit/' + item.productSkn + '">' + item.productSkn + '</a>'
  43 + }else {
  44 + return item.productSkn
  45 + }
  46 + }
  47 + },
38 { 48 {
39 display: "最后上传时间", name: "lastAddTime", 49 display: "最后上传时间", name: "lastAddTime",
40 render: function (item) { 50 render: function (item) {
@@ -194,6 +204,15 @@ new common.dropDown({ @@ -194,6 +204,15 @@ new common.dropDown({
194 ajax: "queryShopPass", 204 ajax: "queryShopPass",
195 hash: true 205 hash: true
196 }); 206 });
  207 +new common.dropDown({
  208 + el: "#brandId",
  209 + ajax: "brand",
  210 + hash: true,
  211 + params:function(){
  212 + return {userLimitFlag:true};
  213 + }
  214 +});
  215 +
197 216
198 //编辑 217 //编辑
199 $(document).on('click', '.update', function () { 218 $(document).on('click', '.update', function () {