Authored by 马力

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

... ... @@ -138,7 +138,7 @@
<td>说明:</td>
<td colspan="2">
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号、一级分类、二级分类、三级分类、四级分类(目前不用)、性别、货品年、货品季、吊牌价、销售价、色系、厂家颜色、款型(选填)、尺码、条码、能否补货、SKN计数、年龄层(多个用'|'分隔)、重点款型、UPM条码(选填) </span><br>
2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号(选填)、一级分类、二级分类、三级分类、四级分类(目前不用)、性别、货品年、货品季、吊牌价、销售价、色系、厂家颜色、款型编码、尺码、条码、能否补货、SKN计数、年龄层(多个用'|'分隔)、重点款型、UPM条码(选填) </span><br>
3、<a href="/ajax/link/baseproduct" style="margin: 0; text-decoration: underline">下载样例.xlsx</a>
</td>
</tr>
... ...
... ... @@ -127,9 +127,9 @@
<input type="hidden" id="appType" name="appType" value="[[appType||'0']]" for="checkbox" />
</div>
</span>
<label class="col-sm-1 control-label">厂家编号 <span class="red">*</span></label>
<label class="col-sm-1 control-label">厂家编号</label>
<div class="col-sm-2">
<input type="text" id="factoryCode" placeholder="厂家编号" value="[[factoryCode]]" class="form-control" required/>
<input type="text" id="factoryCode" placeholder="厂家编号" value="[[factoryCode]]" class="form-control"/>
</div>
</div>
<div class="form-group">
... ...
... ... @@ -184,6 +184,7 @@ module.exports = {
productSkc: {type: Number},
startTime: {type: Number},
shopId: {type: Number},
brandId: {type: Number},
endTime: {type: Number}
}
... ...
... ... @@ -34,6 +34,17 @@
<option value="-1">请选择店铺</option>
</select>
</div>
<div class="panel-col">
<select id="brandId" class="form-control">
<option value="-1">请选择品牌</option>
</select>
</div>
<!-- <div class="panel-col">
<select name="brandId" id="brand-filter" tabindex="-1" title="" class="form-control">
<option value="">选择品牌</option>
</select>
</div>-->
<div class="panel-col2">
<a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
<a id="filter-all" href="/shotManage/proPhoto/index" class="btn btn-info">全部</a>
... ...
... ... @@ -198,12 +198,12 @@ var g=new common.grid({
}
},
{
display:"<label class='red'>厂家颜色、尺码、条码、销售价 必填</label>",render:function(item){
display:"<label class='red'>厂家颜色、尺码、款型编码、条码、销售价 必填</label>",render:function(item){
if(!item.isAdd&&!g.__gsm.hasOwnProperty(item.__index)){
g.__gsm[item.__index]=item.goodsSizeList.length;
}
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='款型编码' /></div></div>");
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'>UPM条码</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)];
... ... @@ -294,10 +294,6 @@ $(document).on("click",".sortadd",function(){
common.util.__tip("吊牌价不合法,包含小数位不能大于10位","warning");
return;
}
if ($.trim($("#factoryCode").val())=="") {
common.util.__tip("请填写厂家编号","warning");
return;
}
if(g.__e.validate()){
var goodsSizeList=$.extend({},ENUM.goodsSizeList);
goodsSizeList.salePrice=$.trim($("#salesPriceStr").val());
... ...
... ... @@ -387,6 +387,9 @@ var g = new common.grid({
return html.join('');
}
}, {
display: 'SKC个数',
name: 'skcNum'
},{
display: '操作',
render: function (item) {
var HtmArr = [];
... ... @@ -407,7 +410,7 @@ var g = new common.grid({
}else{
intValue=item.productSearch.intValue;
}
HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>');
HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" id="brandSortId" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>');
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>');
if(typeof(item.shopsSearchSort) == "undefined"){
... ... @@ -415,7 +418,7 @@ var g = new common.grid({
}else{
intVal_shopsSearchSort = item.shopsSearchSort.intValue;
}
HtmArr.push('<br><br><input type="text" style="width:100px" name="shopsSort" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>');
HtmArr.push('<br><br><input type="text" style="width:100px" name="shopsSort" id="shopsSortId" class="brandSortText" data-index="' + item.__index + '" value='+ intVal_shopsSearchSort+'>');
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shopsSort-btn" data-index="' + item.__index + '" >店铺排序</a>');
return HtmArr.join('');
}
... ... @@ -643,7 +646,8 @@ var shelveTable = new common.grid({
render: function (item) {
return 'SKC:' + item.productSkc + '<br>' +
'颜色:' + item.goodsName;
'颜色:' + item.goodsName+ '<br>' +
'厂家颜色:' + item.factoryGoodsName;
}
}, {
display: 'SKC上架操作(状态)',
... ... @@ -799,6 +803,12 @@ $(document).on("click", ".chima-btn", function () {
/**
*品牌排序
*/
/*验证 hack*/
$(document).on('keyup', '#brandSortId', function() {
$(this).val($(this).val().replace(/\D/g, ''));
});
$(document).on("click", ".brandSort-btn", function () {
var item = g.rows[$(this).data("index")];
var num = $("input:text[name='brandSort']").eq($(this).data("index")).val();
... ... @@ -808,7 +818,7 @@ $(document).on("click", ".brandSort-btn", function () {
productSkn: item.productSkn,
modelId: i + 1,
projectId: 1,
intValue: num
intValue: $.trim(num)
};
}
common.util.__ajax({
... ... @@ -823,6 +833,11 @@ $(document).on("click", ".brandSort-btn", function () {
/**
*店铺商品排序
*/
/*验证 hack*/
$(document).on('keyup', '#shopsSortId', function() {
$(this).val($(this).val().replace(/\D/g, ''));
});
$(document).on("click", ".shopsSort-btn", function () {
var item = g.rows[$(this).data("index")];
var num = $("input:text[name='shopsSort']").eq($(this).data("index")).val();
... ... @@ -832,7 +847,7 @@ $(document).on("click", ".shopsSort-btn", function () {
productSkn: item.productSkn,
modelId: 1,
projectId: 5,
intValue: num
intValue: $.trim(num)
});
common.util.__ajax({
... ...
... ... @@ -29,12 +29,22 @@ var g = new common.grid({
productSku: common.util.__input('content-filter3'),
startTime: ((new Date($('#starttime').val())).getTime()) / 1000,
endTime: ((new Date($('#endtime').val())).getTime()) / 1000,
shopId: common.util.__input("shopId")
shopId: common.util.__input("shopId"),
brandId:common.util.__input("brandId")
};
},
//列表显示
columns: [
{display: "SKN", name: "productSkn"},
{display: "SKN", name: "productSkn",
render: function (item) {
var flag=item.roleFlag;
if(flag==1){
return '<a target="_blank" href="/goods/netsale/edit/' + item.productSkn + '">' + item.productSkn + '</a>'
}else {
return item.productSkn
}
}
},
{
display: "最后上传时间", name: "lastAddTime",
render: function (item) {
... ... @@ -194,6 +204,15 @@ new common.dropDown({
ajax: "queryShopPass",
hash: true
});
new common.dropDown({
el: "#brandId",
ajax: "brand",
hash: true,
params:function(){
return {userLimitFlag:true};
}
});
//编辑
$(document).on('click', '.update', function () {
... ...