Showing
9 changed files
with
67 additions
and
11 deletions
@@ -233,7 +233,7 @@ webpackJsonp([33],[ | @@ -233,7 +233,7 @@ webpackJsonp([33],[ | ||
233 | } | 233 | } |
234 | var html=[]; | 234 | var html=[]; |
235 | 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>"); | 235 | 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>"); |
236 | - 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'>UPC条码</div><div class='col-sm-2'>支付尾款时间</div></div></div>"); | 236 | + html.push("<div class='rows'><div class='form-group' style='padding-bottom: 0'><div class='col-sm-1'>尺码</div><div class='col-sm-1'>销售价</div><div class='col-sm-2'>条码</div><div class='col-sm-2'>品牌条码</div><div class='col-sm-1'>是否补货</div><div class='col-sm-2'>UPC条码</div><div class='col-sm-2'>支付尾款时间</div></div></div>"); |
237 | html.push('<div class="rows" id="rows__'+item.__index+'">'); | 237 | html.push('<div class="rows" id="rows__'+item.__index+'">'); |
238 | item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)]; | 238 | item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)]; |
239 | html.push(common.util.__template2($("#template").html(),{index:item.__index,goodsSizeList:item.goodsSizeList})); | 239 | html.push(common.util.__template2($("#template").html(),{index:item.__index,goodsSizeList:item.goodsSizeList})); |
@@ -479,6 +479,12 @@ webpackJsonp([33],[ | @@ -479,6 +479,12 @@ webpackJsonp([33],[ | ||
479 | item.colorId=$(this).val(); | 479 | item.colorId=$(this).val(); |
480 | item.goodsName=this.options[this.selectedIndex].text; | 480 | item.goodsName=this.options[this.selectedIndex].text; |
481 | }); | 481 | }); |
482 | + $(document).on("change",".btn-sort-nationalCode",function(){ | ||
483 | + var _index=$(this).data("index"); | ||
484 | + var _eq=$(this).data("eq"); | ||
485 | + var item=g.__rows[_index].goodsSizeList[_eq]; | ||
486 | + item.nationalCode=$(this).val(); | ||
487 | + }); | ||
482 | // $(document).on("change",":checkbox[name=ageLevel]",function(){ | 488 | // $(document).on("change",":checkbox[name=ageLevel]",function(){ |
483 | // var value=$(this).val(); | 489 | // var value=$(this).val(); |
484 | // var c=$(":checkbox[name=ageLevel]"); | 490 | // var c=$(":checkbox[name=ageLevel]"); |
@@ -552,7 +558,6 @@ webpackJsonp([33],[ | @@ -552,7 +558,6 @@ webpackJsonp([33],[ | ||
552 | map[gname+"_"+item1.sizeId]=""; | 558 | map[gname+"_"+item1.sizeId]=""; |
553 | 559 | ||
554 | map3.push({'productSku': item1.productSku, 'factoryCode':item1.factoryCode}); | 560 | map3.push({'productSku': item1.productSku, 'factoryCode':item1.factoryCode}); |
555 | - | ||
556 | }); | 561 | }); |
557 | }); | 562 | }); |
558 | } | 563 | } |
@@ -595,6 +600,38 @@ webpackJsonp([33],[ | @@ -595,6 +600,38 @@ webpackJsonp([33],[ | ||
595 | return ispass; | 600 | return ispass; |
596 | } | 601 | } |
597 | }); | 602 | }); |
603 | + | ||
604 | + e.on("validate", function(){ | ||
605 | + if(g.__rows.length==0){ | ||
606 | + return "请添加销售属性"; | ||
607 | + } | ||
608 | + var nationalCodeMap = []; | ||
609 | + if(g.__rows.length>0) { | ||
610 | + $.each(g.__rows,function(index,item){ | ||
611 | + $.each(item.goodsSizeList,function(index1,item1){ | ||
612 | + nationalCodeMap.push({'productSku' : item1.productSku, 'nationalCode' : item1.nationalCode}); | ||
613 | + }); | ||
614 | + }); | ||
615 | + } | ||
616 | + // 校验品牌条码唯一性 | ||
617 | + if(nationalCodeMap.length>0){ | ||
618 | + nationalCodeMap = nationalCodeMap.filter(function(item){ | ||
619 | + return $.trim(item.nationalCode)?true:false; | ||
620 | + }); | ||
621 | + var ispass=true; | ||
622 | + common.util.__ajax2({ | ||
623 | + url:'/product/checkNationalCodeExist', | ||
624 | + async:false, | ||
625 | + data:{nationalCode: JSON.stringify(nationalCodeMap)} | ||
626 | + },function(res){ | ||
627 | + if(res.data.length){ | ||
628 | + ispass = "品牌条码 "+res.data.join(',')+" 已存在"; | ||
629 | + } | ||
630 | + },true); | ||
631 | + return ispass; | ||
632 | + } | ||
633 | + }); | ||
634 | + | ||
598 | e.on("validate",function(){ | 635 | e.on("validate",function(){ |
599 | if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){ | 636 | if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){ |
600 | return "销售价应该限定小于等于吊牌价"; | 637 | return "销售价应该限定小于等于吊牌价"; |
@@ -235,7 +235,8 @@ webpackJsonp([34],{ | @@ -235,7 +235,8 @@ webpackJsonp([34],{ | ||
235 | skuFactoryCode: common.util.__input("skuFactoryCode"), | 235 | skuFactoryCode: common.util.__input("skuFactoryCode"), |
236 | appType: common.util.__input("appType"), | 236 | appType: common.util.__input("appType"), |
237 | goodsYears: common.util.__input("goodsYears"), | 237 | goodsYears: common.util.__input("goodsYears"), |
238 | - goodsSeason: common.util.__input("goodsSeason") | 238 | + goodsSeason: common.util.__input("goodsSeason"), |
239 | + nationalCode: common.util.__input("nationalCode") | ||
239 | }; | 240 | }; |
240 | }, | 241 | }, |
241 | columns: [{ | 242 | columns: [{ |
@@ -128,4 +128,6 @@ module.exports=function(app) { | @@ -128,4 +128,6 @@ module.exports=function(app) { | ||
128 | app.post("/product/queryProductInfoBySkns","basegoods_queryProductInfoBySkns"); | 128 | app.post("/product/queryProductInfoBySkns","basegoods_queryProductInfoBySkns"); |
129 | 129 | ||
130 | app.post("/product/searchProductDetail","basegoods_searchProductDetail"); | 130 | app.post("/product/searchProductDetail","basegoods_searchProductDetail"); |
131 | + | ||
132 | + app.post("/product/checkNationalCodeExist","basegoods_checkNationalCodeExist"); | ||
131 | } | 133 | } |
@@ -116,8 +116,8 @@ if(process.env.NODE_ENV!="coding"){ | @@ -116,8 +116,8 @@ if(process.env.NODE_ENV!="coding"){ | ||
116 | if(process.env.NODE_ENV==="test211"){ | 116 | if(process.env.NODE_ENV==="test211"){ |
117 | apiCofig.EnvConst.domain="http://192.168.102.202:8088/platform"; | 117 | apiCofig.EnvConst.domain="http://192.168.102.202:8088/platform"; |
118 | apiCofig.EnvConst.yohoSearch="http://192.168.102.216:8080/yohosearch"; | 118 | apiCofig.EnvConst.yohoSearch="http://192.168.102.216:8080/yohosearch"; |
119 | - Iaccount.loginEx = "http://qrest.yohobuy.com:9098/erp-gateway-web/account/profile/login"; | ||
120 | - Iaccount.queryAllAuth = "http://qrest.yohobuy.com:9098/erp-gateway-web/account/profileDataEntitlement/queryAllAuth"; | 119 | + Iaccount.loginEx = "http://gateway.erp.yohoops.org:9098/erp-gateway-web/account/profile/login"; |
120 | + Iaccount.queryAllAuth = "http://gateway.erp.yohoops.org:9098/erp-gateway-web/account/profileDataEntitlement/queryAllAuth"; | ||
121 | } | 121 | } |
122 | 122 | ||
123 | /*测试环境*/ | 123 | /*测试环境*/ |
@@ -29,7 +29,8 @@ module.exports={ | @@ -29,7 +29,8 @@ module.exports={ | ||
29 | {name:'skuFactoryCode',type:'String'}, | 29 | {name:'skuFactoryCode',type:'String'}, |
30 | {name:'appType',type:'Number'}, | 30 | {name:'appType',type:'Number'}, |
31 | {name: 'goodsYears', type: 'Number'}, | 31 | {name: 'goodsYears', type: 'Number'}, |
32 | - {name: 'goodsSeason', type: 'Number'} | 32 | + {name: 'goodsSeason', type: 'Number'}, |
33 | + {name: 'nationalCode', type: 'String'} | ||
33 | ] | 34 | ] |
34 | }, | 35 | }, |
35 | getBaseProductList:{ | 36 | getBaseProductList:{ |
@@ -60,7 +61,8 @@ module.exports={ | @@ -60,7 +61,8 @@ module.exports={ | ||
60 | {name:'skuFactoryCode',type:'String'}, | 61 | {name:'skuFactoryCode',type:'String'}, |
61 | {name: 'appType', type: 'Number'}, | 62 | {name: 'appType', type: 'Number'}, |
62 | {name: 'goodsYears', type: 'Number'}, | 63 | {name: 'goodsYears', type: 'Number'}, |
63 | - {name: 'goodsSeason', type: 'Number'} | 64 | + {name: 'goodsSeason', type: 'Number'}, |
65 | + {name: 'nationalCode', type: 'String'} | ||
64 | ] | 66 | ] |
65 | }, | 67 | }, |
66 | addBaseProduct:{ | 68 | addBaseProduct:{ |
@@ -248,6 +250,13 @@ module.exports={ | @@ -248,6 +250,13 @@ module.exports={ | ||
248 | {name: "order",type:"String"}, | 250 | {name: "order",type:"String"}, |
249 | {name: "shopId",type:"String"} | 251 | {name: "shopId",type:"String"} |
250 | ] | 252 | ] |
253 | + }, | ||
254 | + checkNationalCodeExist : { | ||
255 | + title: '校验品牌条码唯一性', | ||
256 | + url: '/product/checkNationalCodeExist', | ||
257 | + params:[ | ||
258 | + {name: "nationalCode",type:"String"} | ||
259 | + ] | ||
251 | } | 260 | } |
252 | } | 261 | } |
253 | } | 262 | } |
@@ -203,7 +203,7 @@ | @@ -203,7 +203,7 @@ | ||
203 | <td>说明:</td> | 203 | <td>说明:</td> |
204 | <td colspan="2"> | 204 | <td colspan="2"> |
205 | 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br> | 205 | 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br> |
206 | - 2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号(选填)、一级分类、二级分类、三级分类、四级分类(目前不用)、性别、货品年、货品季、品牌上市日期、预计上市日期、品牌经典款、吊牌价、销售价、色系、厂家颜色、款型编码、尺码、条码、能否补货、SKN计数、年龄层(多个用'|'分隔)、UPC条码(选填) </span><br> | 206 | + 2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号(选填)、一级分类、二级分类、三级分类、四级分类(目前不用)、性别、货品年、货品季、品牌上市日期、预计上市日期、品牌经典款、吊牌价、销售价、色系、厂家颜色、款型编码、尺码、条码、能否补货、SKN计数、年龄层(多个用'|'分隔)、UPC条码(选填)、品牌条码(选填) </span><br> |
207 | 3、<a href="/ajax/link/baseproduct" style="margin: 0; text-decoration: underline">下载样例.xlsx</a> | 207 | 3、<a href="/ajax/link/baseproduct" style="margin: 0; text-decoration: underline">下载样例.xlsx</a> |
208 | </td> | 208 | </td> |
209 | </tr> | 209 | </tr> |
@@ -52,17 +52,20 @@ | @@ -52,17 +52,20 @@ | ||
52 | [[each goodsSizeList as item __index]] | 52 | [[each goodsSizeList as item __index]] |
53 | <div class="form-group"> | 53 | <div class="form-group"> |
54 | <!-- <label class="col-sm-1 red">*</label> --> | 54 | <!-- <label class="col-sm-1 red">*</label> --> |
55 | - <div class="col-sm-2"> | 55 | + <div class="col-sm-1"> |
56 | <select id="sizeName" class="form-control btn-sort-chima" data-index=[[index]] data-eq=[[__index]] value='[[item.sizeId]]' required placeholder="尺码"> | 56 | <select id="sizeName" class="form-control btn-sort-chima" data-index=[[index]] data-eq=[[__index]] value='[[item.sizeId]]' required placeholder="尺码"> |
57 | <option value="[[item.sizeId||'-1']]">[[item.sizeName||'选择尺码']]</option> | 57 | <option value="[[item.sizeId||'-1']]">[[item.sizeName||'选择尺码']]</option> |
58 | </select> | 58 | </select> |
59 | </div> | 59 | </div> |
60 | - <div class="col-sm-2"> | 60 | + <div class="col-sm-1"> |
61 | <input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input> | 61 | <input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input> |
62 | </div> | 62 | </div> |
63 | <div class="col-sm-2"> | 63 | <div class="col-sm-2"> |
64 | <input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input> | 64 | <input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input> |
65 | </div> | 65 | </div> |
66 | + <div class="col-sm-2"> | ||
67 | + <input class="form-control btn-sort-nationalCode" value="[[item.nationalCode]]" placeholder="品牌条码" data-index=[[index]] data-eq=[[__index]]></input> | ||
68 | + </div> | ||
66 | <div class="col-sm-1"> | 69 | <div class="col-sm-1"> |
67 | <select class="form-control btn-sort-kebu" value="[[item.isSuppled||'Y']]" data-index=[[index]] data-eq=[[__index]]> | 70 | <select class="form-control btn-sort-kebu" value="[[item.isSuppled||'Y']]" data-index=[[index]] data-eq=[[__index]]> |
68 | <option value="N">不可补货</option> | 71 | <option value="N">不可补货</option> |
@@ -93,7 +93,9 @@ | @@ -93,7 +93,9 @@ | ||
93 | <option value="6">秋冬</option> | 93 | <option value="6">秋冬</option> |
94 | </select> | 94 | </select> |
95 | </div> | 95 | </div> |
96 | - | 96 | + <div class="panel-col"> |
97 | + <input type="text" id="nationalCode" class="form-control" placeholder="品牌条码" style="height: 39px;"/> | ||
98 | + </div> | ||
97 | <div class="panel-col"> | 99 | <div class="panel-col"> |
98 | <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> | 100 | <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> |
99 | <a id="all-btn" href="" class="btn btn-info">全部</a> | 101 | <a id="all-btn" href="" class="btn btn-info">全部</a> |
@@ -105,6 +105,7 @@ | @@ -105,6 +105,7 @@ | ||
105 | <th>销售价</th> | 105 | <th>销售价</th> |
106 | <th>款型编码</th> | 106 | <th>款型编码</th> |
107 | <th>条码</th> | 107 | <th>条码</th> |
108 | + <th>品牌条码</th> | ||
108 | <th>厂家颜色</th> | 109 | <th>厂家颜色</th> |
109 | <th>能否补货</th> | 110 | <th>能否补货</th> |
110 | <th>支付尾款时间</th> | 111 | <th>支付尾款时间</th> |
@@ -125,6 +126,7 @@ | @@ -125,6 +126,7 @@ | ||
125 | <th>[[_item.salePrice]]</th> | 126 | <th>[[_item.salePrice]]</th> |
126 | <th>[[item.factoryCode]]</th> | 127 | <th>[[item.factoryCode]]</th> |
127 | <th>[[_item.factoryCode]]</th> | 128 | <th>[[_item.factoryCode]]</th> |
129 | + <th>[[_item.nationalCode]]</th> | ||
128 | <th>[[item.factoryGoodsName]]</th> | 130 | <th>[[item.factoryGoodsName]]</th> |
129 | [[if _item.isSuppled=="Y"]] | 131 | [[if _item.isSuppled=="Y"]] |
130 | <th>是</th> | 132 | <th>是</th> |
-
Please register or login to post a comment