Authored by weiqingting

提交

... ... @@ -22,7 +22,8 @@ module.exports=function(app) {
this.$extend={
action: 'INFOR',
moduleName: "网销信息",
pageName: "查看商品信息"
pageName: "查看商品信息",
shopsId:req.session.user.auth.shopId
};
return netsale;
});
... ... @@ -32,7 +33,8 @@ module.exports=function(app) {
action: 'UPDATE',
moduleName: "网销信息",
maintitle: "编辑商品信息",
type:"edit"
type:"edit",
shopsId:req.session.user.auth.shopId
};
return netsale;
});
... ...
... ... @@ -317,6 +317,21 @@ module.exports={
{name: 'productStandardRelationStr',type: 'string'},
{name: 'productMaterial',type: 'string'}
]
},
saveNetSaleRecommend:{
title:'小编推荐',
url: '/product/saveNetSaleRecommend',
params: [
{name: 'productSkn', type: 'Number'},
{name: 'recommend', type: 'String'}
]
},
saveSearchSort:{
title:'保存搜索顺序',
url: '/product/saveSearchSort',
params: [
{name: 'searchSortList', type: 'string'}
]
}
}
}
... ...
... ... @@ -40,7 +40,7 @@
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a class="btn btn-default" href="/product/base/index">取消</a>
<button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">提交审核</button>
<button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">保存</button>
</div>
</div>
</div>
... ...
... ... @@ -118,4 +118,6 @@
</div>
</script>
<input type="hidden" id="myshopsId" value="<%shopsId%>" />
<%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
... ... @@ -137,13 +137,11 @@
<label class="col-sm-1 control-label">展示店铺:</label>
<div class="col-sm-4">
[[each shopList as a index]]
[[if index==0]]
<input id="shopIds" value="[[shopIds||a.shopsId]]" type="hidden" for="checkbox">
[[/if]]
<label class="radio-inline"><input type="checkbox" name="shopIds" value="[[a.shopsId]]">[[a.shopName]]</label>
[[/each]]
</div>
</div>
</div>
<input id="shopIds" value="[[myshopsId||shopIds]]" type="hidden" for="checkbox">
[[/if]]
</script>
\ No newline at end of file
... ...
... ... @@ -430,8 +430,14 @@ e.on("validate",function(){
}
if(map3.length>0&&common.util.__input("supplierId")){
var len=map3.length;
map3=map3.filter(function(item){
return $.trim(item.factoryCode)?true:false;
});
var ispass=true;
common.util.__ajax2({
if(len==map3.length){
common.util.__ajax2({
url:'/product/checkSkuBarCodeExist',
async:false,
data:{barCode: JSON.stringify(map3)}
... ... @@ -440,6 +446,10 @@ e.on("validate",function(){
ispass="商品条码"+res.data.join(',')+"已经存在";
}
},true);
}else{
ispass="商品条码不可为空";
}
return ispass;
}
});
... ...
... ... @@ -9,7 +9,7 @@ var $ = require('jquery'),
/*获取基础商品数据*/
var data=ViewModel;
data.data.attribute={"1":"普通商品","2":"赠品","3":"虚拟商品"}[""+data.data.attribute];
data.data.ageLevel=data.data.ageLevel.replace("1","成人").replace("2","大童").replace("3","小童");
data.data.ageLevel=common.config.__ageLevel(data.data.ageLevel);
data.data.gender={"1":"男","2":"女","3":"通用"}[""+data.data.gender];
data.data.grade={"0":"否","1":"是"}[""+data.data.grade];
data.data.goodsSeason={"0":"四季","1":"春","2":"夏","3":"秋","4":"冬","5":"春夏","6":"秋冬"}[""+data.data.goodsSeason];
... ...
... ... @@ -140,22 +140,7 @@ $('.floatnav').on('mouseenter', function() {
if (location.hash) {
var hashPos = location.hash.substring(1);
setTimeout(function() {
$('.floatnav').find('li[name="' + hashPos + '"]').trigger('click');
$('.floatnav').find('li[data-pos="' + hashPos + '"]').trigger('click');
}, 500);
}
try {
$(".floatnav li").each(function() {
var name = $.trim($(this).data('pos')),
that = this;
if (name == location.hash.replace(/^#/, '')) {
setTimeout(function() {
$(that).click();
}, 500);
}
});
} catch (e) {
}
\ No newline at end of file
... ...
... ... @@ -149,9 +149,11 @@ common.util.__ajax({
});
}
//
productExtBo.myshopsId=$("#myshopsId").val();
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo));
e.init();
}, true);
productExtBo.myshopsId=$("#myshopsId").val();
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo));
//如果是info页,所有input btn置灰
... ...