Authored by liuyue

Merge branch 'develop' of git.dev.yoho.cn:platform/yohobuy-portal-fe into develop

... ... @@ -15,7 +15,9 @@ if(param){
},true);
}
/*审核*/
// RESPONSEDATA.shenghe=true;
if($("#isShenHe").val()){
RESPONSEDATA.shenghe=true;
}
$("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA));
... ... @@ -57,13 +59,14 @@ var e=new common.edit("#basicInfo");
e.init();
//baseTable
var g=new common.grid({
el:"#basicTable",
columns:[
{display:"分类名称",render:function(item){
var html=[];
var txt=item.factoryGoodsName?item.factoryGoodsName:"";
html.push("<p>名称:<input type='text' class='w-goods-text' data-index="+item.__index+" value="+txt+" /><p>");
html.push("<p>名称:<input type='text' class='w-goods-text' data-index="+item.__index+" value='"+txt+"' placeholder='分类名称' required/><p>");
html.push("<p>色系:"+item.goodsName+"<p>");
html.push('<button type="button" data-index='+item.__index+' class="sortdelete btn btn-danger btn-xs">删除</button>');
... ... @@ -76,7 +79,7 @@ var g=new common.grid({
}
},
{
display:"<label class='red'>款型编码,xxx,xxx必填</label>",render:function(item){
display:"<label class='red'>分类名称,款型编码,选择尺码,默认销售价必填</label>",render:function(item){
var html=[];
html.push("<div class='form-group'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='factoryCode form-control' placeholder='款型编码' required/></div></div>");
html.push('<div class="rows" id="rows__'+item.__index+'">');
... ... @@ -88,6 +91,7 @@ var g=new common.grid({
}
],
complete:function(){
new common.dropDown({
el: ".btn-sort-chima",
ajax: "sortsize",
... ... @@ -95,13 +99,14 @@ var g=new common.grid({
"sortId" : tabTree.selected[0]?tabTree.selected[0].id:""
}
});
g.__e.init();
}
});
g.__rows=RESPONSEDATA.baseGoodList||[];
g.__e=new common.edit("#basicTable",{bucket:"goodsimg"});
g.init(g.__rows);
g.__e.init();
g.__e.on("callback", function(obj) {
console.log(obj);
... ... @@ -123,14 +128,14 @@ $(document).on("click",".sortadd",function(){
goodsSizeList: [$.extend({},ENUM.goodsSizeList)]
});
g.reload();
g.__e.init();
// g.__e.init();
}
});
$(document).on("click",".sortdelete",function(){
var index=$(this).data("index");
[].splice.call(g.__rows,index,1);
g.reload();
g.__e.init();
// g.__e.init();
});
$(document).on("change",".factoryCode",function(){
var item=g.__rows[$(this).data("index")];
... ... @@ -140,14 +145,14 @@ $(document).on("click",".btn-sort-add",function(){
var item=g.__rows[$(this).data("index")];
item.goodsSizeList.push($.extend({},ENUM.goodsSizeList));
g.reload();
g.__e.init();
// g.__e.init();
});
$(document).on("click",".btn-sort-remove",function(){
var item=g.__rows[$(this).data("index")];
var __index=$(this).data("eq");
[].splice.call(item.goodsSizeList,__index,1);
g.reload();
g.__e.init();
// g.__e.init();
});
$(document).on("change",".btn-sort-chima",function(){
var _index=$(this).data("index");
... ...
... ... @@ -221,8 +221,13 @@ var g = new common.grid({
{display:"操作",render:function(item){
var html=[];
if(item.isAuditing==200){
//审核
html.push('<a data-index="'+ item.__index+ '" class="btn btn-info btn-xs edit-class-btn" href="/base/goods/update2/'+item.productSkn+'">修改</a>');
}else{
html.push('<a data-index="'+ item.__index+ '" class="btn btn-info btn-xs edit-class-btn" href="/base/goods/update/'+item.productSkn+'">修改</a>');
}
if (item.isAuditing!=200) { // 200 审核通过
html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn apply-success">通过</a>');
}
... ...
... ... @@ -100,7 +100,7 @@ exports.res = [
{name:'isLimitbuy',type:'String'},
{name:'isLimited',type:'String'},
{name:'isPromotionalGifts',type:'String'},
{name:'productName',type:'Number'},
{name:'productName',type:'String'},
{name:'productTag',type:'Number'},
{name:'retailPriceStr',type:'String'},
{name:'salesPriceStr',type:'String'},
... ... @@ -131,6 +131,18 @@ exports.res = [
action:"/base/goods/ajax/update"
}
},
{//审核修改页面
route:'/base/goods/update2/:productSkn',
method:'GET',
view:'pages/basegoods/edit',
url:'/productColor/queryProductColors',
src:'/basegoods/edit',
data:{
pageTitle:"审核基础商品",
isShenHe:"true",
action:""
}
},
{//修改接口
route:'/base/goods/ajax/update',
method:'POST',
... ... @@ -147,7 +159,7 @@ exports.res = [
{name:'isLimitbuy',type:'String'},
{name:'isLimited',type:'String'},
{name:'isPromotionalGifts',type:'String'},
{name:'productName',type:'Number'},
{name:'productName',type:'String'},
{name:'productTag',type:'Number'},
{name:'retailPriceStr',type:'String'},
{name:'salesPriceStr',type:'String'},
... ...
... ... @@ -50,13 +50,12 @@
</div>
</div>
<input type="hidden" id="isShenHe" value="{{isShenHe}}" />
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="javascript:;" class="btn btn-default" onclick="javascript:history.go(-1);">取消</a>
{{# add}}
<button type="submit" class="btn btn-info" data-loading-text="暂存中..." id="btnTemporary">暂存</button>
{{/ add}}
<button type="submit" class="btn btn-success mr5" data-loading-text="提交审核中..." id="btnReview">提交审核</button>
</div>
</div>
... ... @@ -84,7 +83,7 @@
<input class="form-control btn-sort-tiaoma" value="[[item.barCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-2">
<select class="form-control btn-sort-kebu" value="[[item.isSuppled]]" data-index=[[index]] data-eq=[[__index]]>
<select class="form-control btn-sort-kebu" value="[[item.isSuppled||'N']]" data-index=[[index]] data-eq=[[__index]]>
<option value="N">不可补货</option>
<option value="Y">可补货</option>
</select>
... ... @@ -206,12 +205,12 @@
<label class="col-sm-2 control-label">适销季<span class="red">*</span></label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="checkbox" name="ooooo" value="1"></label>
<input type="checkbox" name="seasons" value="1"></label>
<label class="radio-inline">
<input type="checkbox" name="ooooo" value="2"></label>
<input type="checkbox" name="seasons" value="2"></label>
<label class="radio-inline">
<input type="checkbox" name="ooooo" value="3">四季</label>
<input type="hidden" id="ooooo" name="ooooo" value="[[ooooo||'1']]" for="checkbox" placeholder="年龄层" />
<input type="checkbox" name="seasons" value="3">四季</label>
<input type="hidden" id="seasons" name="seasons" value="[[seasons||'1']]" for="checkbox" placeholder="年龄层" />
</div>
[[else]]
<div class="col-sm-4"></div>
... ... @@ -259,10 +258,10 @@
<label class="col-sm-2 control-label">是否预购</label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="ooooo" value="Y"></label>
<input type="radio" name="isAdvance" value="Y"></label>
<label class="radio-inline">
<input type="radio" name="ooooo" value="N"></label>
<input type="hidden" id="ooooo" value="[[ooooo]]" for="radio" />
<input type="radio" name="isAdvance" value="N"></label>
<input type="hidden" id="isAdvance" value="[[isAdvance]]" for="radio" />
</div>
[[/if]]
</div>
... ... @@ -271,22 +270,15 @@
<label class="col-sm-2 control-label">是否奥莱</label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="oooo" value="1">品牌设置</label>
<input type="radio" name="outletsSetting " value="B">品牌设置</label>
<label class="radio-inline">
<input type="radio" name="oooo" value="Y"></label>
<input type="radio" name="outletsSetting " value="Y"></label>
<label class="radio-inline">
<input type="radio" name="oooo" value="N"></label>
<input type="hidden" id="oooo" value="[[oooo]]" for="radio" />
<input type="radio" name="outletsSetting " value="N"></label>
<input type="hidden" id="outletsSetting " value="[[outletsSetting ]]" for="radio" />
</div>
<label class="col-sm-2 control-label">是否预购</label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="ooooo" value="Y"></label>
<label class="radio-inline">
<input type="radio" name="ooooo" value="N"></label>
<input type="hidden" id="ooooo" value="[[ooooo]]" for="radio" />
</div>
</div>
[[/if]]
... ... @@ -295,17 +287,15 @@
<label class="col-sm-2 control-label">是否VIP</label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="oooo" value="1">品牌设置</label>
<label class="radio-inline">
<input type="radio" name="oooo" value="Y">开启</label>
<input type="radio" name="isVip" value="Y">开启</label>
<label class="radio-inline">
<input type="radio" name="oooo" value="N">关闭</label>
<input type="hidden" id="oooo" value="[[oooo]]" for="radio" />
<input type="radio" name="isVip" value="N">关闭</label>
<input type="hidden" id="isVip" value="[[isVip]]" for="radio" />
</div>
<label class="col-sm-2 control-label">预售库存</label>
<div class="col-sm-2">
<input type="number" id="oooo" class="form-control" value="[[oooo]]" />
<input type="number" id="stock" class="form-control" value="[[stock]]" />
</div>
</div>
[[/if]]
... ...