Authored by weiqingting

4.5 迁移

... ... @@ -12,6 +12,9 @@ module.exports=function(app) {
//查询店铺下关联供应商
app.post("/MerchantShopsRest/queryMerchantSupplierByShopsId","select_queryMerchantSupplierByShopsId");
//根据品牌获取供应商
app.post("/ShopsRest/queryShopsByBrandId", "select_queryShopsByBrandId");
app.post("/product/queryMaxSortByName","select_queryMaxSortByName");
/*类目 已经集成到控件里面去了注意*/
app.post("/product/class/queryAllProductSortList","select_queryAllMaxSortList");
... ...
... ... @@ -59,6 +59,13 @@ module.exports={
params:[
{name:'idName',type:'String'}
]
},
queryShopsByBrandId:{
title:'根据品牌查询店铺',
url: '/ShopsRest/queryShopsByBrandId',
params: [
{name: 'brandId',type: 'number'}
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -58,7 +58,7 @@ module.exports=function(app) {
app.post("/product/queryMaterialList","basegoods_queryMaterialList");
app.post("/product/querySortBySmallSort","basegoods_queryMaterialList");
app.post("/product/querySortBySmallSort","basegoods_querySortBySmallSort");
app.post("/product/checkSkuBarCodeExist","basegoods_checkSkuBarCodeExist");
... ...
... ... @@ -7,7 +7,6 @@ module.exports=function(app) {
this.$extend={
moduleName:'商品管理',
pageName: '网销信息',
gridurl: '/product/queryNetSaleInforList',
shopId:req.session.user.auth.shopId
};
});
... ... @@ -15,94 +14,104 @@ module.exports=function(app) {
app.get("/goods/netsale/batch", "goods.netsale.Batch", function (req, res){
this.$extend={
moduleName: '网销信息',
pageName: '批量设置',
domain: exports.domain
pageName: '批量设置'
};
});
app.get("/goods/netsale/info/:param", "goods.netsale.Edit", function (req, res){
app.get("/goods/netsale/info/:param", "goods.netsale.Edit","netsale_getNetSaleInfo", function (netsale,req, res){
this.$extend={
type: 'info',
action: 'INFOR',
moduleName: "网销信息",
pageName: "查看商品信息"
};
return netsale;
});
app.get("/goods/netsale/edit/:param", "goods.netsale.Edit", function (req, res){
app.get("/goods/netsale/edit/:param", "goods.netsale.Edit","netsale_getNetSaleInfo", function (netsale,req, res){
this.$extend={
type: 'edit',
action: 'UPDATE',
moduleName: "网销信息",
maintitle: "编辑商品信息"
};
return netsale;
});
app.get("/goods/audit/info/:param", "goods.netsale.Edit", function (req, res){
this.$extend={
type: 'info',
action: 'audit'
};
});
/**************************网销列表页面****************************/
/*网销信息列表数据*/
app.post("/product/queryNetSaleInforList", "netsale_queryNetSaleInforList");
/*网销信息tab页*/
app.post("/product/queryTabProductNum", "netsale_queryTabProductNum");
/*批量上架下架*/
app.post("/product/updateProductSknTimingInfo", "netsale_updateProductSknTimingInfo");
/*skc上下架*/
app.post("/product/updateGoodsStatus", "netsale_updateGoodsStatus");
/*sku上下架*/
app.post("/product/updateProductSkuStatus", "netsale_updateProductSkuStatus");
app.post("/goods/netsale/getdata", "netsale_getNetSaleInfo");
/*查看网销详情*/
app.post("/product/getNetSaleInfo", "netsale_getNetSaleInfo");
/*********************************编辑**********************************/
/*保存完整数据*/
app.post("/product/saveNetSaleAllInfo", "netsale_saveNetSaleAllInfo");
/*保存基本信息*/
app.post("/product/saveNetSaleBaseInfo", "netsale_saveNetSaleBaseInfo");
app.post("/product/saveAfterSaleInfo", "netsale_saveAfterSaleInfo");
app.post("/product/queryAttributesByConf", "netsale_queryAttributesByConf");
/*保存商品描述*/
app.post("/product/saveProductDesc", "netsale_saveProductDesc");
app.post("/ShopsRest/queryShopsByBrandId", "netsale_queryShopsByBrandId");
/*小编推荐*/
app.post("/guang/article/queryArticlesBySKN", "netsale_queryArticlesBySKN");
app.post("/product/queryMakingProcess", "netsale_queryMakingProcess");
/*小编推荐*/
app.post("/product/saveNetSaleRecommend", "netsale_saveNetSaleRecommend");
app.post("/brandSeries/queryAll4Select", "netsale_queryAll4Select");
/*搭配模块*/
app.post("/collocation/selectCollocationListBySkn", "netsale_selectCollocationListBySkn");
app.post("/product/saveBrandRelation", "netsale_saveBrandRelation");
app.post("/collocation/selectCollocationById", "netsale_selectCollocationById");
app.post("/product/saveNetSaleVideo", "netsale_saveNetSaleVideo");
app.post("/collocation/insertCollocation", "netsale_insertCollocation");
app.post("/article/queryArticlesBySKN", "netsale_queryArticlesBySKN");
app.post("/collocation/updateCollocation", "netsale_updateCollocation");
app.post("/erpproduct/brands/queryBrandsByStatus", "netsale_queryBrandsByStatus");
app.post("/collocation/delCollocationById", "netsale_delCollocationById");
app.post("/product/queryAttributesByConfEx", "netsale_queryAttributesByConfEx");
/*封面*/
app.post("/productPhoto/queryProductPhotoList", "netsale_queryProductPhotoList");
app.post("/product/saveSearchSort", "netsale_saveSearchSort");
/*单独维护封面信息*/
app.post("/product/manageProductImg", "netsale_manageProductImg");
/*搜索关键词*/
app.post("/searchWords/queryHotSearchTerms", "netsale_queryHotSearchTerms");
/*保存关键词*/
app.post("/product/saveNetSaleSearchKeys", "netsale_saveNetSaleSearchKeys");
app.post("/product/saveProductParam", "netsale_saveProductParam");
app.post("/product/saveProductDesc", "netsale_saveProductDesc");
app.post("/productSize/queryProdSizeList","netsale_queryProdSizeList")
app.post("/product/saveNetSaleRecommend", "netsale_saveNetSaleRecommend");
app.post("/collocation/selectCollocationListBySkn", "netsale_selectCollocationListBySkn");
app.post("/productSize/saveProdSizeInfo","netsale_saveProdSizeInfo");
app.post("/collocation/selectCollocationById", "netsale_selectCollocationById");
app.post("/product/saveSearchSort", "netsale_saveSearchSort");
app.post("/collocation/insertCollocation", "netsale_insertCollocation");
/*保存上架后补全信息*/
app.post("/product/saveAfterSaleInfo","netsale_saveAfterSaleInfo")
/*查询补全信息*/
app.post("/product/queryAttributesByConf","netsale_queryAttributesByConf");
app.post("/collocation/updateCollocation", "netsale_updateCollocation");
app.post("/standard/queryAllBySortId4Html","netsale_queryAllBySortId4Html");
app.post("/collocation/delCollocationById", "netsale_delCollocationById");
/*商品参数*/
app.post("/product/queryAttributesByConfEx","netsale_queryAttributesByConfEx");
app.post("/product/manageProductImg", "netsale_manageProductImg");
app.post("/product/queryMaterialList","netsale_queryMaterialList");
app.post("/product/saveProductParam","netsale_saveProductParam");
}
\ No newline at end of file
... ...
... ... @@ -66,36 +66,30 @@ module.exports={
title: "批量skn处理",
url: "/product/updateProductSknTimingInfo",
params: [
{name: 'productSknList',type: 'string'},
{name: 'type',type: 'number'},
{name: 'outSaleTime',type: 'number'},
{name: 'shelveTime',type: 'string'},
{name: 'onNewTime',type: 'string'},
{name: 'advanceBeginTime',type: 'string'},
{name: 'advanceEndTime',type: 'string'}
{name: 'productSknList',type: 'string'},
{name: 'type',type: 'number'},
{name: 'outSaleTime',type: 'number'},
{name: 'shelveTime',type: 'string'},
{name: 'onNewTime',type: 'string'},
{name: 'advanceBeginTime',type: 'string'},
{name: 'advanceEndTime',type: 'string'}
]
},
updateGoodsStatus:{
title: "skc上下架",
url: "/product/updateGoodsStatus",
params: [{
name: 'productSkc',
type: 'number'
}, {
name: 'targetStatus',
type: 'number'
}]
params: [
{name: 'productSkc',type: 'number'},
{name: 'targetStatus',type: 'number'}
]
},
updateProductSkuStatus:{
title: "sku上下架",
url: "/product/updateProductSkuStatus",
params: [{
name: 'productSku',
type: 'number'
}, {
name: 'targetStatus',
type: 'number'
}]
params: [
{name: 'productSku',type: 'number'},
{name: 'targetStatus',type: 'number'}
]
},
getNetSaleInfo:{
title:'查询网销详情',
... ... @@ -103,6 +97,224 @@ module.exports={
params:[
{name:'param',type: 'number'}
]
},
saveNetSaleAllInfo:{
title:'保存完整网销信息',
url: '/product/saveNetSaleAllInfo',
params: [
{name: 'productSkn',type: 'number'},
{name: 'productName',type: 'string'},
{name: 'isNew',type: 'string'},
{name: 'sellChannels',type: 'string'},
{name: 'phrase',type: 'string'},
{name: 'outSaleTime',type: 'string'},
{name: 'shopIds',type: 'string'},
{name: 'productDesc',type: 'string'},
{name: 'vedioUrl',type: 'string'},
{name: 'recommend',type: 'string'},
{name: 'brandModel',type: 'string'},
{name: 'brandSeries',type: 'string'},
{name: 'makeCrafts',type: 'string'},
{name: 'pattern',type: 'string'},
{name: 'style',type: 'string'},
{name: 'salesPhrase',type: 'string'},
{name: 'isHostsell',type: 'string'},
{name: 'wearSense',type: 'string'},
{name: 'searchSortList',type: 'string'},
{name: 'searchKeys',type: 'string'},
{name: 'brandRelationList',type: 'string'},
{name: 'attributeProValuesOne',type: 'string'},
{name: 'attributeProValuesTwo',type: 'string'},
{name: 'goodsImagesReq',type: 'string'},
{name: 'productStandardRelationStr',type: 'string'},
{name: 'productMaterial',type: 'string'}
]
},
saveNetSaleBaseInfo:{
title:'保存基本信息接口',
url: '/product/saveNetSaleBaseInfo',
params: [
{name: 'productSkn',type: 'number'},
{name: 'productName',type: 'string'},
{name: 'isNew',type: 'string'},
{name: 'sellChannels',type: 'string'},
{name: 'phrase',type: 'string'},
{name: 'outSaleTime',type: 'number'},
{name: 'shopIds',type: 'string'}
]
},
saveAfterSaleInfo:{
title:'保存上架后补全信息',
url: '/product/saveAfterSaleInfo',
params: [
{name: 'productSkn',type: 'number'},
{name: 'brandModel',type: 'string'},
{name: 'brandSeries',type: 'string'},
{name: 'makeCrafts',type: 'string'},
{name: 'salesPhrase',type: 'string'},
{name: 'isHostsell',type: 'string'},
{name: 'wearSense',type: 'string'},
{name: 'attributeProValuesTwo',type: 'string'}
]
},
queryAttributesByConf:{
title:'查询补全信息',
url: '/product/queryAttributesByConf',
params: [
{name: 'categoryId',type: 'number'},
{name: 'displayPosition',type: 'number'},
{name: 'saleType',type: 'number'}
]
},
saveProductDesc:{
title:'商品描述',
url: '/product/saveProductDesc',
params: [
{name: 'productSkn',type: 'Number'},
{name: 'productDesc',type: 'String'}
]
},
queryArticlesBySKN:{
title:'小编推荐',
url: '/guang/article/queryArticlesBySKN',
params: [
{name: 'productSkn',type: 'string'}
]
},
selectCollocationListBySkn:{
title:'查询搭配列表',
url:'/collocation/selectCollocationListBySkn',
params: [
{name: 'productSkn',type: 'Number'},
{name: 'page',type: 'Number'},
{name: 'size',type: 'Number'}
]
},
selectCollocationById:{
title:'获取单个搭配',
url: '/collocation/selectCollocationById',
params: [
{name: 'param',type: 'Number'}
]
},
insertCollocation:{
title:'添加单个搭配',
url: '/collocation/insertCollocation',
params: [
{name: 'productSkn',type: 'Number'},
{name: 'imageUrl',type: 'String'},
{name: 'content',type: 'String'},
{name: 'infoStr',type: 'String'}
]
},
updateCollocation:{
title:'更新单个搭配',
url: '/collocation/updateCollocation',
params: [
{name: 'id',type: 'Number'},
{name: 'imageUrl',type: 'String'},
{name: 'content',type: 'String'},
{name: 'infoStr',type: 'String'}
]
},
delCollocationById:{
title:'删除单个搭配',
url: '/collocation/delCollocationById',
params: [
{name: 'param',type: 'Number'}
]
},
queryProductPhotoList:{
title:'调用图片',
url: '/productPhoto/queryProductPhotoList',
params: [
{name: 'productSkn',type: 'number'},
{name: 'productSkc',type: 'number'},
{name: 'productSku',type: 'number'},
{name: 'startTime',type: 'number'},
{name: 'endTime',type: 'number'}
]
},
manageProductImg:{
title:'单独维护封面信息',
url: '/product/manageProductImg',
params: [
{name: 'goodsImagesReq',type: 'string'}
]
},
queryHotSearchTerms:{
title:'查找热搜词',
url: '/searchWords/queryHotSearchTerms',
params: [
{name: 'page',type: 'number'},
{name: 'size',type: 'number'}
]
},
saveNetSaleSearchKeys:{
title:'保存搜索关键词',
url: '/product/saveNetSaleSearchKeys',
params: [
{name: 'productSkn',type: 'number'},
{name: 'searchKeys',type: 'string'}
]
},
queryProdSizeList:{
title:'拍摄复尺列表',
url: '/productSize/queryProdSizeList',
params: [
{name: "page",type: "number"},
{name: "productSkn",type: "number"},
{name: "brandId",type: "number"},
{name: "productSku",type: "number"},
{name: "maxSortId",type: "number"},
{name: "arriveStartTime",type: "number"},
{name: "arriveEndTime",type: "number"},
{name: "isMeasure",type: "string"}
]
},
saveProdSizeInfo:{
title:'保存拍摄复尺',
url: '/productSize/saveProdSizeInfo',
params: [
{name: "productSkn",type: "number"},
{name: "sizeInfoList",type: "string"},
{name: "productSizeReferList",type: "string"},
{name: "noMeasureIds",type: "string"}
]
},
queryAllBySortId4Html:{
title:'',
url: '/standard/queryAllBySortId4Html',
params: [
{name: 'param',type: 'Number'},
{name: 'displayPosition',type: 'Number'}
]
},
queryAttributesByConfEx:{
title:'商品参数',
url: '/product/queryAttributesByConfEx',
params: [
{name: 'categoryId',type: 'number'},
{name: 'displayPosition',type: 'number'},
{name: 'saleType',type: 'number'}
]
},
queryMaterialList:{
title:'',
url: '/product/queryMaterialList',
params: [
{name: 'categoryId',type: 'Number'}
]
},
saveProductParam:{
title:'保存商品参数',
url: '/product/saveProductParam',
params: [
{name: 'productSkn',type: 'number'},
{name: 'attributeProValuesOne',type: 'string'},
{name: 'productStandardRelationStr',type: 'string'},
{name: 'productMaterial',type: 'string'}
]
}
}
}
\ No newline at end of file
}
... ...
<%include '../../../common/views/__ui/header'%>
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">商品管理</a></li>
<li>
<%secondTitle%>
<%pageTitle%>
</li>
</ul>
</div>
</div>
</div>
<%include '../../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
... ...
<%include '../../../common/views/__ui/header'%>
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href="#"><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="#">商品管理</a></li>
<li><%maintitle%></li>
</ul>
</div>
</div>
</div>
<%include '../../../common/views/__partail/ListHeader'%>
<form id="netsaleAllInfo" class="form-horizontal form-bordered">
<div class="contentpanel" data-action="<%action%>" data-type="<%type%>">
<div class="contentpanel" data-action="<%action%>">
<input id="productSkn" type="hidden">
<div class="panel panel-primary">
... ... @@ -39,7 +24,7 @@
</div>
<%include 'partials/search_key'%>
<%include 'partials/search-key'%>
<div class="panel panel-primary">
<div class="panel-heading">
... ... @@ -64,8 +49,6 @@
<div class="footpanel" style="text-align: center;">
<a id="saveAllInfo" href="javascript:;" class="btn btn-primary btn-lg">保存</a>
<a id="passBtn" href="javascript:;" class="btn btn-primary btn-lg">通过</a>
<a id="rejectBtn" href="javascript:;" class="btn btn-primary btn-lg">驳回</a>
<a id="backBtn" href="javascript:;" onclick="history.go(-1)" class="btn btn-default btn-lg">返回</a>
</div>
... ... @@ -110,7 +93,7 @@
<div class="pull-left ml10">
<input class="form-control" id="imgVideoText" type="text" placeholder="{name}链接" value="{attachUrl}">
</div>
</div>
<div class="row">
<label class="pull-left control-label height40">{name}描述</label>
... ...
... ... @@ -18,7 +18,7 @@
<div class="panel-col2">
<input id="productName" class="form-control panel-input" type="text" placeholder="商品名称">
</div>
<div class="panel-col">
<select name="brandId" id="brandId" tabindex="-1" title="" class="form-control">
<option value="-1">请选择品牌</option>
... ... @@ -135,7 +135,6 @@
</div>
<input type="hidden" id="gridurl" value="<%gridurl%>">
<input type="hidden" id="shopId" value="<%shopId%>">
<script type="text/template" id="onshelve-template">
<form class="shelve-form form-horizontal ">
... ... @@ -145,7 +144,7 @@
<div class="form-group">
<div class="col-sm-3 height40">预上架时间:</div>
<div class="col-sm-6"><input id="shelveTime" class="form-control" jsaction="time" type="text" placeholder="预上架时间" readonly>
<span class="red">商家请填写时间</span>
<span class="red">上架请填写上架时间</span>
</div>
</div>
<div class="form-group">
... ...
... ... @@ -24,9 +24,6 @@
<script type="text/template" id="basicInfo">
<div class="form-group">
<blockquote>基本信息</blockquote>
</div>
<div class="form-group">
<div class="col-sm-3">店铺:[[shopName]]</div>
<div class="col-sm-3">品牌:[[brandName]]</div>
<div class="col-sm-3">供应商:[[supplierName]]</div>
... ... @@ -78,7 +75,9 @@
</div>
<div class="form-group">
<div class="col-sm-3">是否预售:[[isAdvance]]</div>
[[if isAdvance=='是']]
<div class="col-sm-3" style="color: #ccc;">预售库存:[[stock]]</div>
[[/if]]
<div class="col-sm-3">预计到货时间:[[expectArrivalTime]]</div>
</div>
<div class="form-group">
... ... @@ -98,9 +97,6 @@
<script type="text/template" id="productExtBoTemp">
<div class="form-group">
<blockquote>上架必填</blockquote>
</div>
<div class="form-group">
<div class="col-sm-12">
<label>商品短评<i class="red">*</i>:</label>
[[if renderType=='edit']]
... ...
<div class="panel panel-default">
<div class="panel-heading">
<a class="netsale-position" href="javascript:;" name="position11"></a>
<div class="panel-btns" style="display: none;">
<a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
</div>
<h2 class="panel-title">(商品)品牌关联</h2>
</div>
<div id="brandWrap" class="panel-body">
<div class="form-group selected-brand" style="min-height: 60px;"></div>
<div id="brand-list" class="form-group brand-list"></div>
</div>
<div class="panel-footer">
<a id="saveBrandRelation" href="javascript:;" class="btn btn-primary">保存</a>
</div>
</div>
<script type="text/template" id="brandTemp">
[[each map as item index]]
<div class="form-group">
<div class="col-sm-1" style="text-align:center;">[[index]]</div>
<div class="col-sm-10">
[[each item as a index]]
<div class="col-sm-2">
<label style="width:80%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;">
<input name="brandRelationList" type="checkbox" value="[[a.id]]" data-name="[[a.brandName]]">
[[a.brandName]]
</label>
</div>
[[/each]]
</div>
</div>
[[/each]]
</script>
<script type="text/template" id="brandShowTemp">
<input id="brandRelationList" type="hidden" value="[[brandRelation]]" for="checkbox">
[[each brandRelationList as a index]]
<div class="col-sm-2" data-id="[[a.brandId]]">[[a.brandName]]</div>
[[/each]]
</script>
\ No newline at end of file
... ... @@ -5,7 +5,7 @@
<div class="panel-btns" style="display: none;">
<a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
</div>
<h2 class="panel-title">小编推荐</h2>
<a id="recommender"><h2 class="panel-title">小编推荐</h2></a>
</div>
<div id="recommenderWrap" class="panel-body nopadding">
<script id="edit-recommender" type="text/plain" style="width:100%;height:500px;"></script>
... ... @@ -26,7 +26,7 @@
<script type="text/template" id="guangWrapTemp">
[[each data as a index]]
<div class="col-sm-6">
<div class="col-sm-4">
<h4>[[a.sortName]]</h4>
[[each a.articleList as b index]]
<p><a target="_blank" href="[[b.url]]">[[b.articleTitle]]</a></p>
... ...
... ... @@ -35,21 +35,25 @@
</div>
<div class="cover-color">
[[if _item.isDefault=="Y"]]
<a href="javascript:;" class="btn btn-default btn-metro info">默认</a>
<a href="javascript:;" class="btn btn-default btn-metro info" data-i="0">默认</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro">默认</a>
<a href="javascript:;" class="btn btn-default btn-metro" data-i="0">默认</a>
[[/if]]
[[if _item.genderCover==1]]
<a href="javascript:;" class="btn btn-default btn-metro info">男封</a>
[[if gender==1||gender==3]]
[[if _item.genderCover==1||_item.genderCover==3]]
<a href="javascript:;" class="btn btn-default btn-metro info" data-i="1">男封</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro">男封</a>
<a href="javascript:;" class="btn btn-default btn-metro" data-i="1">男封</a>
[[/if]]
[[/if]]
[[if _item.genderCover==2]]
<a href="javascript:;" class="btn btn-default btn-metro info">女封</a>
[[if gender==2||gender==3]]
[[if _item.genderCover==2||_item.genderCover==3]]
<a href="javascript:;" class="btn btn-default btn-metro info" data-i="2">女封</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro">女封</a>
<a href="javascript:;" class="btn btn-default btn-metro" data-i="2">女封</a>
[[/if]]
[[/if]]
</div>
</li>
... ... @@ -66,33 +70,12 @@
<div class="fm-side col-sm-2">商品封面:</div>
<div class="cover-goods col-sm-10">
[[if item.isDefault=="Y"]]
<a href="javascript:;" class="btn-goods-cover btn btn-default btn-metro info" data-index=[[index]]>设置默认</a>
<a href="javascript:;" class="btn-goods-cover btn btn-default info" data-index=[[index]]>设置默认</a>
[[else]]
<a href="javascript:;" class="btn-goods-cover btn btn-default btn-metro" data-index=[[index]]>设置默认</a>
<a href="javascript:;" class="btn-goods-cover btn btn-default" data-index=[[index]]>设置默认</a>
[[/if]]
<a href="javascript:;" class="btn-use-img btn btn-default btn-metro" data-productSkc="[[item.productSkc]]" data-index="[[index]]">调用图片</a>
<a href="javascript:;" class="btn-use-img btn btn-default" data-productSkc="[[item.productSkc]]" data-index="[[index]]">调用图片</a>
</div>
</div>
[[/each]]
</script>
<script type="text/template" id="fenmianImgTemp">
<li class="cover-image-item fileinput-button" data-index=[[__index]]>
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);"><img src="[[imageUrl]]"></a>
<i class="remove-item-btn glyphicon glyphicon-remove-circle"></i>
</div>
<div class="cover-color">
<a href="javascript:;" class="btn btn-default btn-metro">默认</a>
<a href="javascript:;" class="btn btn-default btn-metro">男封</a>
<a href="javascript:;" class="btn btn-default btn-metro">女封</a>
</div>
</li>
</script>
<!-- <script type="text/template" id="colorCoverTemp">
<div class="cover-color-box height40">
<a href="javascript:;" class="btn btn-default btn-metro">默认</a>
<a href="javascript:;" class="btn btn-default btn-metro">男封</a>
<a href="javascript:;" class="btn btn-default btn-metro">女封</a>
</div>
</script> -->
\ No newline at end of file
... ...
... ... @@ -20,52 +20,6 @@
</div>
</div>
<!-- <script type="text/template" id="material-params">
<label class="col-sm-2 control-label">材质</label>
<div class="col-sm-8 height40">
[[each data as item index]]
<label style="cursor: pointer;"><input type="checkbox" name="material" class="material" value=[[item.id]]>[[item.text]]</label>
[[/each]]
</div>
<input type="hidden" id="material" value="{material}" for="checkbox">
</script>
<script type="text/template" id="washTip-params">
<label class="col-sm-2 control-label">洗涤提示</label>
<div class="col-sm-8 height40">
[[each data as item index]]
<label style="cursor: pointer;"><input type="checkbox" name="washTips" class="washTips" value=[[item.id]]>[[item.text]]</label>
[[/each]]
</div>
<input type="hidden" id="washTips" value="{washTips}" for="checkbox">
</script> -->
<!-- <script type="text/template" id="goodsParamTemp">
[[each data as b index]]
[[if b.idNameList && b.idNameList.length>0]]
<div class="goods-param-group form-group">
<label>[[b.attributeName]]:</label>
[[if b.inputType=='select']]
<div style="display: inline-block;width: 280px;">
<select class="form-control" id="[[b.attributeId]]" value="[[b.selectedValues||'']]">
[[each b.idNameList as c index]]
<option value="[[c.id]]">[[c.text]]</option>
[[/each]]
</select>
</div>
[[else]]
<span>
[[each b.idNameList as c index]]
<label style="cursor: pointer;"><input name="[[b.attributeId]]" type="[[b.inputType]]" value="[[c.id]]">[[c.text]]</label>
[[/each]]
</span>
<input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues||'']]" placeholder="[[b.attributeName]]" required>
[[/if]]
</div>
[[/if]]
[[/each]]
</script> -->
<script type="text/template" id="template33">
<div class="form-group">
... ...
<div class="panel panel-primary">
<div class="panel-heading">
<div class="panel-heading">
<a class="netsale-position" href="javascript:;" name="position8"></a>
<div class="panel-btns" style="display: none;">
<a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
</div>
<h2 class="panel-title">搜索关键词</h2>
</div>
<div class="panel-btns" style="display: none;">
<a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
</div>
<h2 class="panel-title">搜索关键词</h2>
</div>
<div class="panel-body">
<div class="form-group">
<div class="panel-body">
<div class="form-group">
<label class="col-sm-1 control-label height40" for="searchKeys">商品关键词</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="searchKeys" required="required" />
... ... @@ -17,13 +17,13 @@
<div class="height40" style="color: red;">每个关键词请用英文“,”隔开</div>
</div>
<div class="form-group" id="search-key-list">
<label class="col-sm-1 control-label height40">搜索热词:</label>
<div class="col-sm-6" id="search-key">
</div>
<label class="col-sm-1 control-label height40">搜索热词:</label>
<div class="col-sm-6" id="search-key">
</div>
</div>
</div>
<div class="panel-footer">
<button class="btn btn-primary" id="save-searchKey">保存</button>
</div>
<div class="panel-footer">
<button class="btn btn-primary" id="save-searchKey">保存</button>
</div>
</div>
\ No newline at end of file
... ...
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-btns" style="display: none;">
<a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
</div>
<h2 class="panel-title">视频</h2>
</div>
<div class="panel-body">
<h4>请上传视频</h4>
<div class="video-file-wrap">
</div>
</div>
<div class="panel-footer">
<a id="saveVideo" href="javascript:;" class="btn btn-primary">保存</a>
</div>
</div>
\ No newline at end of file
'use strict';
var $ = require('jquery'),
common = require('../common/common');
require('../util/custom.js');
common=require('../../common/common');
/*
* 获取业务数据
*/
window.NETSALEDATA = null;
var param = location.href.match(/(edit|info)\/(\d+)/)[2];
common.util.__ajax({
url: '/goods/netsale/getdata',
async: false,
data: {
param: param
}
}, function(res) {
window.NETSALEDATA = res.data;
}, true);
var ViewModel=window.ViewModel;
window.NETSALEDATA=ViewModel.data||{};
window.GOLABDATA = {
... ... @@ -63,6 +53,7 @@ window.GOLABDATA = {
//获取skn
if (NETSALEDATA && NETSALEDATA.baseProductInfo && NETSALEDATA.baseProductInfo.baseProduct) {
$('#productSkn').val(NETSALEDATA.baseProductInfo.baseProduct.productSkn);
... ... @@ -90,26 +81,8 @@ if ($('.contentpanel').data('type') == 'info') {
$("#search-key-list").hide();
$(".brand-list").hide();
// 上架审核的查看页面
if ($('.contentpanel').data('action') != 'audit') {
$('#passBtn').hide();
$('#rejectBtn').hide();
} else {
var status = NETSALEDATA.baseProductInfo.baseProduct.status;
//待审核状态 或者 再上架待审核
if (status != 2 && status != 5) {
$('#passBtn').hide();
$('#rejectBtn').hide();
}
}
} else {
$('#backBtn').hide();
$('#passBtn').hide();
$('#rejectBtn').hide();
}
}
//保存完整网销信息
var e = new common.edit('#netsaleAllInfo');
... ... @@ -148,59 +121,6 @@ $(document).on("click", "#saveAllInfo", function() {
});
var Bll = {
toast: function(content, fn) {
common.dialog.confirm("温馨提示", content, function() {
common.util.__ajax({
url: '/supplier/baseproduct/auditReject',
data: fn()
}, function() {
//g.reload();
//loadTab();
history.go(-1);
});
});
}
}
// 单个驳回
$(document).on("click", "#rejectBtn", function() {
//auditOperation([],3,)
var data = function() {
var reason = $('#reason').val();
if (reason === '' || $.trim(reason) === '') {
return "请填写驳回原因";
}
return {
productSknList: JSON.stringify([NETSALEDATA.baseProductInfo.baseProduct.productSkn]),
targetStatus: 3, // 驳回
rejectReason: reason
};
}
Bll.toast($("#template").html(), data);
});
// 单个通过
$(document).on("click", "#passBtn", function() {
//auditOperation([],3,)
var data = function() {
return {
productSknList: JSON.stringify([NETSALEDATA.baseProductInfo.baseProduct.productSkn]),
targetStatus: 4, //通过
rejectReason: ""
};
}
Bll.toast("确定要通过该申请吗?", data);
});
//类似描点跳转,描点会影响history.go(-1)
$('.floatnav').on('click', 'li', function() {
... ...
... ... @@ -2,6 +2,7 @@
var $ = require('jquery'),
common = require('../../common/common');
var ENUM = {
gender: {
1: '男',
... ... @@ -12,7 +13,8 @@ var ENUM = {
1: '成人',
2: '大童',
3: '小童',
'2|3':"大童/小童"
'2|3': "大小童",
'3|2': "大小童"
},
status: {
'8': '待上架',
... ... @@ -41,6 +43,10 @@ var ENUM = {
"Y": "是",
"N": "否",
"B": "品牌设置"
},
Url:{
grid:"/product/queryNetSaleInforList",
tab:"/product/queryTabProductNum"
}
};
... ... @@ -75,7 +81,7 @@ var t = new common.tab2({
} else {
sortFlag = 1;
}
g.init("/product/queryNetSaleInforList");
g.init(ENUM.Url.grid);
},
columns: [{
name: "0",
... ... @@ -123,10 +129,10 @@ var g = new common.grid({
isOutLets: common.util.__input("isOutLets"),
productStatus: common.util.__input("productStatus"),
size: common.util.__input("size"),
productStatusStr: t.value,
productStatusStr: t.options.columns[t.options.active].value,
tab: $('#basicTab').find('.active').index(),
isInfoMiss: t.isInfoMiss,
sortFlag: t.sortFlag,
isInfoMiss: isInfoMiss,
sortFlag: sortFlag,
skcOnsaleStatus:common.util.__input("skcOnsaleStatus"),
isAdvance:common.util.__input("isAdvance")
};
... ... @@ -285,7 +291,7 @@ var g = new common.grid({
render: function(item) {
var HtmArr = [];
if (item.shopId == shopId) {
if (item.shopId == common.util.__input("shopId")) {
if (item.status == 4 || item.status == 1 || item.status == 5 || item.status == 6) {
HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs edit-btn">编辑</a>');
HtmArr.push('<a href="javascript:;" class="btn btn-danger btn-xs shelve-btn" data-index="' + item.__index + '">下架</a>');
... ... @@ -300,8 +306,8 @@ var g = new common.grid({
}
}]
});
g.init(ENUM.Url.grid);
g.init("/product/queryNetSaleInforList");
//tab
... ... @@ -309,7 +315,7 @@ var loadtab = function() {
t.active = undefined;
setTimeout(function() {
common.util.__ajax({
url: '/product/queryTabProductNum',
url: ENUM.Url.tab,
data: g.options.parms()
}, function(res) {
var __dt = $.extend({}, ENUM.tab, res.data);
... ... @@ -322,8 +328,6 @@ loadtab();
g.init($("#gridurl").val());
//筛选
$("#filter-btn").click(function() {
loadtab();
... ... @@ -354,11 +358,16 @@ function shelveModal(title, html) {
content: html
});
if (len === 1 && g.selected[0].isAdvance === 'N') {
$('#advanceBeginTime, #advanceEndTime').prop('disabled', true);
$('#advanceBeginTime').parents('.form-group').find('.btn').addClass('disabled');
}
g.selected.forEach(function(item){
if(item.isAdvance === 'N'){
$('#advanceBeginTime, #advanceEndTime').prop('disabled', true);
$('#advanceBeginTime').parents('.form-group').find('.btn').addClass('disabled');
}else{
$('#shelveTime').prop('disabled', true);
$('#shelveTime').parents('.form-group').next(".form-group").find('.btn').addClass('disabled');
}
});
var e = new common.edit('.shelve-form');
e.init();
... ... @@ -366,39 +375,41 @@ function shelveModal(title, html) {
var type = $(this).data('type');
$(this).closest('.form-group').find('input').attr('required', true)
.end().siblings('.form-group').find('input').attr('required', false);
var data={};
var data={},isValidate=false;
data.productSknList = JSON.stringify(productSknList);
if($("#shelveTime").val()){
if(type=="1"){
data.shelveTime=$("#shelveTime").val();
data.type=3;
}else{
data.onNewTime=$("#shelveTime").val();
data.type=4;
if(type=="5"){
data.advanceBeginTime=$("#advanceBeginTime").val();
data.advanceEndTime=$("#advanceEndTime").val();
if(!(data.advanceEndTime&&data.advanceEndTime)){
isValidate=true;
e.$tip("请填写预售时间");
return;
}
data.type=5;
}else{
data.type=type;
}
common.util.__ajax({
url:'/product/updateProductSknTimingInfo',
data:data
},function(res){
if (res.code == 200) {
e.$tip(res.message, function() {
shelveLayer.close();
loadtab();
g.reload();
}, 'growl-success');
} else {
//e.$tip(res.data.message);
var html = '';
$.each(res.data, function(key, value) {
html += key + ':' + value + '<br>';
});
e.$tip(html);
if($("#shelveTime").val()){
if(type=="1"){
data.shelveTime=$("#shelveTime").val();
data.type=3;
}else{
data.onNewTime=$("#shelveTime").val();
data.type=4;
}
}else{
data.type=type;
}
});
}
if(!isValidate){
common.util.__ajax({
url:'/product/updateProductSknTimingInfo',
data:data
},function(res){
shelveLayer.close();
loadtab();
g.reload();
});
}
});
}
//批量skn上架
... ... @@ -440,11 +451,19 @@ $('#export-btn').on('click', function() {
window.open("/ajax/down?queryConf=" + JSON.stringify(data) + "&type=netSale");
});
//sku skc上架表格
var shelveTable = new common.grid({
el: "#shelve-table",
secondIndex: 2,
columns: [{
display: '默认封面图',
render: function(item) {
if(item.initGoodsImageUrl){
return '<img src="'+item.initGoodsImageUrl+'" width=120 height=80>';
}
}
},{
display: 'SKC(商品信息)',
render: function(item) {
... ... @@ -483,7 +502,7 @@ $('#basicTable').on('click', '.shelve-btn', function() {
getdata(item.productSkn, function(res) {
shelveLayer = common.dialog.open({
title: '上/下架',
width: 900,
width: '80%',
content: common.util.__template($('#template').html(), res.data.baseProductInfo.baseProduct)
});
... ... @@ -496,7 +515,7 @@ $('#basicTable').on('click', '.shelve-btn', function() {
function getdata(Skn, callback) {
common.util.__ajax({
url: '/goods/netsale/getdata',
url: '/product/getNetSaleInfo',
data: {
param: Skn
}
... ... @@ -522,11 +541,12 @@ $(document).on("click", ".btnskc", function() {
goodsList = res.data.goodsList;
shelveTable.init(res.data.goodsList);
});
g.init($("#gridurl").val());
g.init(ENUM.Url.grid);
}
})
});
$(document).on("click", ".btnsku", function() {
var item = goodsList[$(this).data("index")]
var item1 = item.goodsSizeList[$(this).data("subindex")];
... ...
var $ = require('jquery'),
common = require('../../common/common');
common = require('../../../common/common');
var e = new common.edit('#addinfo-wrap'),
... ... @@ -14,7 +14,6 @@ $('#saveAddInfo').on('click', function() {
e.submit('/product/saveAfterSaleInfo', function(option) {
option.data = GOLABDATA.fire('LYaddInfo');
option.success = function(res) {
res = res.data;
if (res.code == '200') {
e.$tip(res.message, function() {}, 'growl-success');
} else {
... ... @@ -90,7 +89,7 @@ $.ajax({
},
dataType: 'json',
success: function(res) {
var data = res.data;
var data = res;
data.style = basicInfo.style;
data.pattern = basicInfo.pattern;
data.brandModel = productExtBo.brandModel;
... ... @@ -222,7 +221,7 @@ var ag = new common.grid({
ag.__edit = new common.edit("#attributeTable");
common.util.__ajax({
url: '/base/goods/queryAllProductAttr',
url: '/standard/queryAllBySortId4Html',
data: {
param: basicInfo.smallSortId,
displayPosition: 1
... ... @@ -308,7 +307,7 @@ var ag3 = new common.grid({
});
ag3.__edit = new common.edit("#goodsParamWrap2");
common.util.__ajax({
url: '/base/goods/queryMaterialList',
url: '/product/queryMaterialList',
data: {
categoryId: basicInfo.maxSortId
}
... ...
var $ = require('jquery'),
common = require('../../common/common');
common = require('../../../common/common');
var basicInfohtml = '',
ENUM = {
... ... @@ -12,7 +12,9 @@ var basicInfohtml = '',
ageLevel: {
'1': '成人',
'2': '大童',
'3': '小童'
'3': '小童',
'2|3': "大小童",
'3|2': "大小童"
},
gender: {
1: '男',
... ... @@ -88,8 +90,8 @@ function convert(basicInfo, obj) {
var basicInfoData = convert(basicInfo, convertObj);
basicInfoData.expectArrivalTime = common.util.__dateFormat(new Date(basicInfoData.expectArrivalTime * 1000), "yyyy-MM-dd hh:mm:ss");
basicInfoData.expectShelfTime = common.util.__dateFormat(new Date(basicInfoData.expectShelfTime * 1000), "yyyy-MM-dd hh:mm:ss");
basicInfoData.expectArrivalTime =basicInfoData.expectArrivalTime? common.util.__dateFormat(new Date(basicInfoData.expectArrivalTime * 1000), "yyyy-MM-dd hh:mm:ss"):"";
basicInfoData.expectShelfTime =basicInfoData.expectShelfTime? common.util.__dateFormat(new Date(basicInfoData.expectShelfTime * 1000), "yyyy-MM-dd hh:mm:ss"):"";
//基本信息
basicInfoData.renderType = $('.contentpanel').data('type');
... ... @@ -126,7 +128,7 @@ productExtBo.sellChannels = productExtBo.sellChannels ? productExtBo.sellChannel
//productExtBo.shopList =
common.util.__ajax({
url: '/goods/ShopsRest/queryShopsByBrandId',
url: '/ShopsRest/queryShopsByBrandId',
data: {
brandId: basicInfo.brandId
}
... ... @@ -162,7 +164,6 @@ $('#saveBasicInfo').on('click', function() {
e.submit('/product/saveNetSaleBaseInfo', function(option) {
option.data = GOLABDATA.fire("LYbasicInfo");;
option.success = function(res) {
res = res.data;
if (res.code == '200') {
e.$tip(res.message, function() {}, 'growl-success');
} else {
... ...
'use strict';
var $ = require('jquery'),
common = require('../../common/common');
common = require('../../../common/common');
require('../../common/umeditor.config');
require('../../common/umeditor');
require('../../common/zh-cn');
require('../../../common/umeditor.config');
require('../../../common/umeditor');
require('../../../common/zh-cn');
var productSkn, BUCKET = {
bucket: "goodsimg"
};
... ... @@ -40,7 +40,6 @@ $(document).on("click", "#btn-descriptioner", function () {
descriptionEdit.submit('/product/saveProductDesc', function (option) {
option.data = GOLABDATA.fire('LYproductDesc');
option.success = function (res) {
res = res.data;
if (res.code == '200') {
descriptionEdit.$tip(res.message, function () {
}, 'growl-success');
... ... @@ -67,6 +66,8 @@ common.util.__ajax({
recommender = res.data;
}
},true);
/**
* 点击小编推荐
*/
... ... @@ -103,7 +104,6 @@ $(document).on("click", "#btn-recommand", function () {
recommendEdit.submit('/product/saveNetSaleRecommend', function (option) {
option.data = GOLABDATA.fire('LYrecommend');
option.success = function (res) {
res = res.data;
if (res.code == '200') {
recommendEdit.$tip(res.message, function () {
}, 'growl-success');
... ... @@ -172,76 +172,75 @@ var g = new common.grid({
g.init('/collocation/selectCollocationListBySkn');
var Bll = {
posData: [],
toast: function(title, item, url) {
var e = new common.edit("#dapei-form", BUCKET);
if(item.info){
item.info.forEach(function(d){
Bll.posData.push(d);
});
}
var d = new common.dialog({
title: title,
width: '70%',
content: common.util.__template2($("#wqt-template1").html(), item),
button: [{
value: "提交",
callback: function() {
e.submit(url, function(option) {
option.data.id = item.id;
option.data.productSkn = productSkn;
option.data.infoStr = JSON.stringify(Bll.posData);
console.log(option.data);
option.success = function(res) {
res = res.data;
if (res.code == +"200") {
e.$tip("提交成功", function() {
d.close();
g.reload();
}, 'growl-success');
} else {
e.$tip(res.message);
}
}
});
return false;
},
css: "btn-primary"
}, {
value: "取消"
}]
});
e.init();
e.on("callback", function(obj) {
if (obj.key == "file_onComplete_imageUrl") {
// $("#editimg").attr("src",obj.data);
$(".poseditimg").html("<img src='" + obj.data + "'/>");
}
});
}
posData: [],
toast: function(title, item, url) {
var e = new common.edit("#dapei-form", BUCKET);
if(item.info){
item.info.forEach(function(d){
Bll.posData.push(d);
});
}
var d = new common.dialog({
title: title,
width: '70%',
content: common.util.__template2($("#wqt-template1").html(), item),
button: [{
value: "提交",
callback: function() {
e.submit(url, function(option) {
option.data.id = item.id;
option.data.productSkn = productSkn;
option.data.infoStr = JSON.stringify(Bll.posData);
console.log(option.data);
option.success = function(res) {
if (res.code == +"200") {
e.$tip("提交成功", function() {
d.close();
g.reload();
}, 'growl-success');
} else {
e.$tip(res.message);
}
}
});
return false;
},
css: "btn-primary"
}, {
value: "取消"
}]
});
e.init();
e.on("callback", function(obj) {
if (obj.key == "file_onComplete_imageUrl") {
// $("#editimg").attr("src",obj.data);
$(".poseditimg").html("<img src='" + obj.data + "'/>");
}
});
}
}
/*编辑*/
/*编辑*/
$(document).on("dblclick", ".poseditimg img", function(e) {
var pos = {
top: e.pageY - $(this).offset().top,
left: e.pageX - $(this).offset().left,
width: 150,
height: 150
}
Bll.posData.push(pos);
var _pos = $(common.util.__template2($("#kapian").html(), {
__index: Bll.posData.length - 1
}));
_pos.css({
top: pos.top + "px",
left: pos.left + "px"
});
$(".poseditimg").append(_pos);
var pos = {
top: e.pageY - $(this).offset().top,
left: e.pageX - $(this).offset().left,
width: 150,
height: 150
}
Bll.posData.push(pos);
var _pos = $(common.util.__template2($("#kapian").html(), {
__index: Bll.posData.length - 1
}));
_pos.css({
top: pos.top + "px",
left: pos.left + "px"
});
$(".poseditimg").append(_pos);
});
$(document).on("click", ".poseditimg .close", function (e) {
var index = $(this).data("index");
... ... @@ -295,6 +294,7 @@ $(document).on("click", "#dapeiTable .edit", function () {
});
/*封面设置*/
var goodsList = {};
if (window.NETSALEDATA && window.NETSALEDATA.goodsList) {
... ... @@ -374,37 +374,37 @@ function addFengmian(index, src) {
//封面调用图片
var uesImgDialog = null;
$(document).on('click', '.btn-use-img', function() {
var productSkc = $(this).data('productSkc'),
index = $(this).data("index");
common.util.__ajax({
url: '/goods/productPhoto/queryProductPhotoList',
data: {
productSkn: $('#productSkn').val(),
productSkc: productSkc
}
}, function(res) {
var data = res.data;
var imgHtml = '';
if (res.code == 200 && data.list instanceof Array && data.list[0].pictureBoList instanceof Array) {
$.each(data.list[0].pictureBoList, function(i, value) {
imgHtml += '<img class="use-img" src="' + value.fileName + '" alt="" width="100" height="140" data-index="' + index + '" style="cursor:pointer;margin: 0 0 10px 10px;" />';
});
uesImgDialog = common.dialog.open({
title: '调用图片',
content: imgHtml
});
} else {
common.util.__tip('没有可调用的图片', 'warning');
}
}, true);
var productSkc = $(this).data('productSkc'),
index = $(this).data("index");
common.util.__ajax({
url: '/productPhoto/queryProductPhotoList',
data: {
productSkn: $('#productSkn').val(),
productSkc: productSkc
}
}, function(res) {
var data = res.data;
var imgHtml = '';
if (res.code == 200 && data.list instanceof Array && data.list[0].pictureBoList instanceof Array) {
$.each(data.list[0].pictureBoList, function(i, value) {
imgHtml += '<img class="use-img" src="' + value.fileName + '" alt="" width="100" height="140" data-index="' + index + '" style="cursor:pointer;margin: 0 0 10px 10px;" />';
});
uesImgDialog = common.dialog.open({
title: '调用图片',
content: imgHtml
});
} else {
common.util.__tip('没有可调用的图片', 'warning');
}
}, true);
});
//点击调用的图片添加封面图
$(document).on('click', '.use-img', function() {
addFengmian($(this).data("index"), $(this).attr("src"));
renderGoodList();
uesImgDialog.close();
addFengmian($(this).data("index"), $(this).attr("src"));
renderGoodList();
uesImgDialog.close();
});
//设置颜色封面
... ... @@ -413,11 +413,12 @@ $('#fenmianWrap').on("click", ".btn-metro", function () {
var index1 = $(this).parents(".cover-image-item").index();
var list = goodsList[index].goodsImagesList;
var item = goodsList[index].goodsImagesList[index1];
var colorIndex = $(this).index();
var colorIndex = $(this).data("i");
if (colorIndex == 0) {
list.forEach(function (item, index) {
if (index == index1) {
item.isDefault = "Y";
item.genderCover = 0;
} else {
item.isDefault = "N";
}
... ... @@ -426,6 +427,7 @@ $('#fenmianWrap').on("click", ".btn-metro", function () {
list.forEach(function (item, index) {
if (index == index1) {
item.genderCover = colorIndex;
item.isDefault = "N";
} else {
item.genderCover = 0;
}
... ...
'use strict';
var $ = require('jquery'),
common = require('../../common/common');
common = require('../../../common/common');
var modelCardTable = new common.grid({
el: "#model-card",
... ...
var $ = require('jquery'),
common = require('../../common/common'),
util = require('../../common/util');
common = require('../../../common/common');
if (window.NETSALEDATA) {
{ //搜索关键词
... ... @@ -29,7 +27,7 @@ if (window.NETSALEDATA) {
}]
});
g.init('/netSale/queryHotSearchTerms');
g.init('/searchWords/queryHotSearchTerms');
$("#searchKeys").on('change', function () {
searchKeys = $("#searchKeys").val();
... ... @@ -68,12 +66,13 @@ if (window.NETSALEDATA) {
}
{ //尺寸信息
{
//尺寸信息
var productSkn = window.NETSALEDATA.baseProductInfo.baseProduct.productSkn;
var dataList;
if (productSkn) {
common.util.__ajax({
url: '/meterManage/productSize/queryProdSizeList',
url: '/productSize/queryProdSizeList',
data: {
productSkn: productSkn
}
... ... @@ -95,7 +94,9 @@ if (window.NETSALEDATA) {
var refName = item1.referenceName ? item1.referenceName : "";//非空判断
var a = refName.split(/[|/]/g);
var refName1 = a[0] || "", refName2 = a[1] || "";
return '<div class="form-group"><div class="col-sm-3"><input class=" form-control" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/></div>' + '<div class="col-sm-1">' + '/</div>' + '<div class="col-sm-3"><input class=" form-control" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/></div></div>';
//console.log("refName1",refName1);
//console.log("refName2",refName2);
return '<div class="form-group"><div class="col-sm-5"><input class=" form-control refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/></div>' + '<div class="col-sm-1">' + '/</div>' + '<div class="col-sm-5"><input class=" form-control refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/></div></div>';
}
});
for (var i = 0; i < dataList.sizeRelationsList[0].prdSizeAttributeBoList.length; i++) {//尺码列
... ... @@ -148,14 +149,16 @@ if (window.NETSALEDATA) {
referenceName: ref1.val() + '/' + ref2.val()
});
}
//console.log(productSizeReferList);
var data = {
productSkn: dataList.productSkn,
noMeasureIds: noMeasureIds,
sizeInfoList: JSON.stringify(sizeInfoList),
productSizeReferList: JSON.stringify(productSizeReferList)
};
common.util.__ajax({
url: "/meterManage/productSize/saveProdSizeInfo",
url: "/productSize/saveProdSizeInfo",
data: data
}, function () {
});
... ... @@ -203,7 +206,7 @@ if (window.NETSALEDATA) {
$('#sort-save').on('click', function () {
common.util.__ajax({
url: '/netSale/saveSearchSort',
url: '/product/saveSearchSort',
data: {
searchSortList: JSON.stringify(searchSortList)
}
... ...