Authored by xuhongyun

build

... ... @@ -233,7 +233,7 @@ webpackJsonp([33],[
}
var html=[];
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>");
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>");
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>");
html.push('<div class="rows" id="rows__'+item.__index+'">');
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
html.push(common.util.__template2($("#template").html(),{index:item.__index,goodsSizeList:item.goodsSizeList}));
... ... @@ -479,6 +479,12 @@ webpackJsonp([33],[
item.colorId=$(this).val();
item.goodsName=this.options[this.selectedIndex].text;
});
$(document).on("change",".btn-sort-nationalCode",function(){
var _index=$(this).data("index");
var _eq=$(this).data("eq");
var item=g.__rows[_index].goodsSizeList[_eq];
item.nationalCode=$(this).val();
});
// $(document).on("change",":checkbox[name=ageLevel]",function(){
// var value=$(this).val();
// var c=$(":checkbox[name=ageLevel]");
... ... @@ -552,7 +558,6 @@ webpackJsonp([33],[
map[gname+"_"+item1.sizeId]="";
map3.push({'productSku': item1.productSku, 'factoryCode':item1.factoryCode});
});
});
}
... ... @@ -595,6 +600,38 @@ webpackJsonp([33],[
return ispass;
}
});
e.on("validate", function(){
if(g.__rows.length==0){
return "请添加销售属性";
}
var nationalCodeMap = [];
if(g.__rows.length>0) {
$.each(g.__rows,function(index,item){
$.each(item.goodsSizeList,function(index1,item1){
nationalCodeMap.push({'productSku' : item1.productSku, 'nationalCode' : item1.nationalCode});
});
});
}
// 校验品牌条码唯一性
if(nationalCodeMap.length>0){
nationalCodeMap = nationalCodeMap.filter(function(item){
return $.trim(item.nationalCode)?true:false;
});
var ispass=true;
common.util.__ajax2({
url:'/product/checkNationalCodeExist',
async:false,
data:{nationalCode: JSON.stringify(nationalCodeMap)}
},function(res){
if(res.data.length){
ispass = "品牌条码 "+res.data.join(',')+" 已存在";
}
},true);
return ispass;
}
});
e.on("validate",function(){
if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){
return "销售价应该限定小于等于吊牌价";
... ...
... ... @@ -235,7 +235,8 @@ webpackJsonp([34],{
skuFactoryCode: common.util.__input("skuFactoryCode"),
appType: common.util.__input("appType"),
goodsYears: common.util.__input("goodsYears"),
goodsSeason: common.util.__input("goodsSeason")
goodsSeason: common.util.__input("goodsSeason"),
nationalCode: common.util.__input("nationalCode")
};
},
columns: [{
... ...
... ... @@ -128,4 +128,6 @@ module.exports=function(app) {
app.post("/product/queryProductInfoBySkns","basegoods_queryProductInfoBySkns");
app.post("/product/searchProductDetail","basegoods_searchProductDetail");
app.post("/product/checkNationalCodeExist","basegoods_checkNationalCodeExist");
}
\ No newline at end of file
... ...
... ... @@ -116,8 +116,8 @@ if(process.env.NODE_ENV!="coding"){
if(process.env.NODE_ENV==="test211"){
apiCofig.EnvConst.domain="http://192.168.102.202:8088/platform";
apiCofig.EnvConst.yohoSearch="http://192.168.102.216:8080/yohosearch";
Iaccount.loginEx = "http://qrest.yohobuy.com:9098/erp-gateway-web/account/profile/login";
Iaccount.queryAllAuth = "http://qrest.yohobuy.com:9098/erp-gateway-web/account/profileDataEntitlement/queryAllAuth";
Iaccount.loginEx = "http://gateway.erp.yohoops.org:9098/erp-gateway-web/account/profile/login";
Iaccount.queryAllAuth = "http://gateway.erp.yohoops.org:9098/erp-gateway-web/account/profileDataEntitlement/queryAllAuth";
}
/*测试环境*/
... ...
... ... @@ -29,7 +29,8 @@ module.exports={
{name:'skuFactoryCode',type:'String'},
{name:'appType',type:'Number'},
{name: 'goodsYears', type: 'Number'},
{name: 'goodsSeason', type: 'Number'}
{name: 'goodsSeason', type: 'Number'},
{name: 'nationalCode', type: 'String'}
]
},
getBaseProductList:{
... ... @@ -60,7 +61,8 @@ module.exports={
{name:'skuFactoryCode',type:'String'},
{name: 'appType', type: 'Number'},
{name: 'goodsYears', type: 'Number'},
{name: 'goodsSeason', type: 'Number'}
{name: 'goodsSeason', type: 'Number'},
{name: 'nationalCode', type: 'String'}
]
},
addBaseProduct:{
... ... @@ -248,6 +250,13 @@ module.exports={
{name: "order",type:"String"},
{name: "shopId",type:"String"}
]
},
checkNationalCodeExist : {
title: '校验品牌条码唯一性',
url: '/product/checkNationalCodeExist',
params:[
{name: "nationalCode",type:"String"}
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -203,7 +203,7 @@
<td>说明:</td>
<td colspan="2">
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号(选填)、一级分类、二级分类、三级分类、四级分类(目前不用)、性别、货品年、货品季、品牌上市日期、预计上市日期、品牌经典款、吊牌价、销售价、色系、厂家颜色、款型编码、尺码、条码、能否补货、SKN计数、年龄层(多个用'|'分隔)、UPC条码(选填) </span><br>
2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号(选填)、一级分类、二级分类、三级分类、四级分类(目前不用)、性别、货品年、货品季、品牌上市日期、预计上市日期、品牌经典款、吊牌价、销售价、色系、厂家颜色、款型编码、尺码、条码、能否补货、SKN计数、年龄层(多个用'|'分隔)、UPC条码(选填)、品牌条码(选填) </span><br>
3、<a href="/ajax/link/baseproduct" style="margin: 0; text-decoration: underline">下载样例.xlsx</a>
</td>
</tr>
... ...
... ... @@ -52,17 +52,20 @@
[[each goodsSizeList as item __index]]
<div class="form-group">
<!-- <label class="col-sm-1 red">*</label> -->
<div class="col-sm-2">
<div class="col-sm-1">
<select id="sizeName" class="form-control btn-sort-chima" data-index=[[index]] data-eq=[[__index]] value='[[item.sizeId]]' required placeholder="尺码">
<option value="[[item.sizeId||'-1']]">[[item.sizeName||'选择尺码']]</option>
</select>
</div>
<div class="col-sm-2">
<div class="col-sm-1">
<input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input>
</div>
<div class="col-sm-2">
<input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-2">
<input class="form-control btn-sort-nationalCode" value="[[item.nationalCode]]" placeholder="品牌条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-1">
<select class="form-control btn-sort-kebu" value="[[item.isSuppled||'Y']]" data-index=[[index]] data-eq=[[__index]]>
<option value="N">不可补货</option>
... ...
... ... @@ -93,7 +93,9 @@
<option value="6">秋冬</option>
</select>
</div>
<div class="panel-col">
<input type="text" id="nationalCode" class="form-control" placeholder="品牌条码" style="height: 39px;"/>
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
... ...
... ... @@ -105,6 +105,7 @@
<th>销售价</th>
<th>款型编码</th>
<th>条码</th>
<th>品牌条码</th>
<th>厂家颜色</th>
<th>能否补货</th>
<th>支付尾款时间</th>
... ... @@ -125,6 +126,7 @@
<th>[[_item.salePrice]]</th>
<th>[[item.factoryCode]]</th>
<th>[[_item.factoryCode]]</th>
<th>[[_item.nationalCode]]</th>
<th>[[item.factoryGoodsName]]</th>
[[if _item.isSuppled=="Y"]]
<th></th>
... ...