Authored by 马力

搜索广告迁移

... ... @@ -116,5 +116,7 @@ module.exports=function(app) {
/*通过任务ID查看任务是否被执行完 批量上架 */
app.post("/product/queryBatchImportResultOfOnShelveSkn","basegoods_queryBatchImportResultOfOnShelveSkn");
app.post("/basegoods/queryProductColors","basegoods_queryProductColors");
}
\ No newline at end of file
... ...
... ... @@ -15,7 +15,7 @@ module.exports=function(app) {
app.post("/operations/search/updatePositionInfo","operationsSearch_updatePositionInfo");
app.post("/operations/search/selectPostionById","operationsSearch_selectPostionById");
app.post("/operations/search/insertPositionInfo","operationsSearch_insertPositionInfo");
app.post("/operations/search/queryPositionListForDown","operationsSearch_queryPositionListForDown");
app.get("/search/templetIndex","operations.search.templetIndex", function () {
this.$extend = {
... ... @@ -46,6 +46,7 @@ module.exports=function(app) {
app.post("/operations/search/selectTempletById","operationsSearch_selectTempletById");
app.post("/operations/search/updateTempletStatus","operationsSearch_updateTempletStatus");
app.post("/operations/search/insertTemplet","operationsSearch_insertTemplet");
app.post("/operations/search/queryTempletListForDown","operationsSearch_queryTempletListForDown");
app.get("/search/bannerIndex","operations.search.bannerIndex", function () {
... ... @@ -78,4 +79,5 @@ module.exports=function(app) {
app.post("/operations/search/selectBannerById","operationsSearch_selectBannerById");
app.post("/operations/search/updateBannerStatus","operationsSearch_updateBannerStatus");
app.post("/operations/search/insertBanner","operationsSearch_insertBanner");
app.post("/operations/search/queryAllStyle","operationsSearch_queryAllStyle");
}
\ No newline at end of file
... ...
... ... @@ -37,6 +37,13 @@ module.exports={
{name: 'title', type: 'string'}
]
},
queryPositionListForDown:{
title: "修改位置状态",
url: '/operations/search/queryPositionListForDown',
params: [
]
},
getTempletList:{
title: "广告模板列表",
... ... @@ -79,6 +86,12 @@ module.exports={
{name: 'templet', type: 'string'}
]
},
queryTempletListForDown:{
title: "新增模板",
url: '/operations/search/queryTempletListForDown',
params: [
]
},
getBannerList:{
... ... @@ -153,6 +166,12 @@ module.exports={
params: [
{name: 'id', type: 'number'}
]
},
queryAllStyle:{
title: "查询所有风格",
url: '/operations/search/queryAllStyle',
params: [
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -12,28 +12,62 @@
<div class="row">
<div class="form-group">
<label class="col-sm-1 control-label">名称</label>
<div class="col-sm-11">
<input type="text" id="caption" name="caption" style="width:100%" class="form-control" placeholder="名称" value="<%data.caption%>" maxlength="200"/>
<div class="col-sm-8">
<input type="text" id="caption" name="caption" class="form-control" placeholder="名称" value="<%data.caption%>" maxlength="200"/>
<input type="hidden" id="id" name="id" value="<%data.id%>"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">位置</label>
<div class="col-sm-4">
<select id="postionId" class="form-control" required placeholder="位置">
<option value="[[postionId||'-1']]"><%data.positionName%></option>
</select>
</div>
<label class="col-sm-1 control-label">样式</label>
<div class="col-sm-2">
<select id="templetId" class="form-control" required placeholder="样式">
<option value="[[templetId||'-1']]"><%data.templetName%></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">分类</label>
<div class="col-sm-4">
<div id="sortTree" style="width: 100%"></div>
</div>
<label class="col-sm-1 control-label">性别</label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="radio" name="gender" value="1"></label>
<label class="radio-inline">
<input type="radio" name="gender" value="2"></label>
<label class="radio-inline">
<input type="radio" name="gender" value="3">通用</label>
<input type="hidden" id="gender" name="gender" value="<%data.gender%>" for="radio" required />
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">标题</label>
<div class="col-sm-8">
<input type="text" id="caption" name="caption" class="form-control" placeholder="标题" value="" maxlength="200"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">副标题</label>
<div class="col-sm-8">
<input type="text" id="caption" name="caption" class="form-control" placeholder="副标题" value="" maxlength="200"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">内容</label>
<div class="col-sm-8">
<script id="banner" type="text/plain" style="width:100%;height:900px;"></script>
<script id="banner" type="text/plain" style="width:100%;height:300px;"></script>
<input type="hidden" id="searchBanner" name="banner" value="<%data.data%>">
</div>
</div>
</div>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="javascript:;" onclick="history.go(-1);" class="btn btn-default">取消</a>
<button id="save_banner" type="submit" data-loading-text="保存中..." class="btn delay-btn btn-success">保存</button>
</div>
</div>
</div>
</div>
... ... @@ -44,17 +78,25 @@
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-1 control-label">名称</label>
<div class="col-sm-11">
<input type="text" id="caption" name="caption" style="width:100%" class="form-control" placeholder="名称" value="<%data.caption%>" maxlength="200"/>
<input type="hidden" id="id" name="id" value="<%data.id%>"/>
<label class="col-sm-1 control-label">价格</label>
<div class="col-sm-4">
<input type="text" id="caption" name="caption" class="form-control" placeholder="价格" value="<%data.price%>" maxlength="10"/>
</div>
<label class="col-sm-1 control-label">尺码</label>
<div class="col-sm-4">
<select id="sizeId" class="form-control" required placeholder="尺码">
<option value="[[sizeId||'-1']]"><%data.colorName%></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">内容</label>
<div class="col-sm-8">
<script id="banner" type="text/plain" style="width:100%;height:900px;"></script>
<input type="hidden" id="searchBanner" name="banner" value="<%data.data%>">
<div class="form-group" id="styleDiv">
</div>
<div class="form-group" id="colorDiv">
</div>
<div class="form-group">
<label class="col-sm-1 control-label">品牌</label>
<div class="col-sm-11">
<input type="text" id="caption" name="caption" class="form-control" placeholder="价格" value="<%data.price%>" maxlength="200"/>
</div>
</div>
</div>
... ... @@ -73,4 +115,28 @@
</div>
</div>
<script type="text/template" id="templateStyle">
<label class="col-sm-1 control-label">风格</label>
<div class="col-sm-11">
[[each data as item index ]]
<label class="radio-inline">
<input type="checkbox" name="style" data-index=[[__index]] class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label>
[[/each]]
<input type="hidden" id="style" value="[[selectStyle||'']]" for="checkbox"/>
</div>
</script>
<script type="text/template" id="templateColor">
<label class="col-sm-1 control-label">颜色</label>
<div class="col-sm-11">
[[each list as item index ]]
<label class="radio-inline">
<input type="radio" name="color" data-index=[[__index]] class="attr_radio_class" value="[[item.id]]">[[item.colorName]]</label>
[[/each]]
<input type="hidden" id="color" value="[[selectColor||'']]" for="radio"/>
</div>
</script>
<%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
... ... @@ -12,10 +12,8 @@
<input type="text" id="caption" class="form-control" placeholder="名称" style="height: 39px;"/>
</div>
<div class="panel-col2">
<select name="positionId" id="positionId" tabindex="-1" title="" class="form-control">
<option value="" selected="">选择状态</option>
<option value="8">关闭</option>
<option value="14">开启</option>
<select id="postionId" class="form-control" placeholder="位置">
<option value="-1">请选择位置</option>
</select>
</div>
<div class="panel-col">
... ...
... ... @@ -60,7 +60,11 @@ var urlObj = {
'userProfileByRole':"/profile/queryUserProfileByRole",
'queryModelListForSelect':"/model/queryModelListForSelect",
'queryProdSizeListForSel':"/productSize/queryProdSizeListForSel"
'queryProdSizeListForSel':"/productSize/queryProdSizeListForSel",
// 搜索广告的相关的
'searchPostion' : "/operations/search/queryPositionListForDown",
'searchTemplet' : "/operations/search/queryTempletListForDown"
};
var minimumResultsForSearch = ["sortbybrand", "getjitSup", "querySupplier","sortsize3","queryStortType"];
... ...
... ... @@ -46,4 +46,78 @@ $(document).on('click','#save_banner',function () {
console.log(option.data);
});
return false;
});
\ No newline at end of file
});
// 初始化品类
/*品类初始化*/
var SORTDATA={
url:"/goods/query/querySortBySmallSort",
datas:[
{id:mainData.maxSortId, sortName:mainData.maxSortName},
{id:mainData.middleSortId, sortName:mainData.middleSortName},
{id:mainData.smallSortId, sortName:mainData.smallSortName},
{id:mainData.sortId, sortName:mainData.sortName}
],
otherParam:function(){
return {}
},
complete:function(data, bool){
if(!bool){
/*if(data.length>2){
Bll.productNameArr[2]=data[data.length-1].sortName;
Bll.setProductName();
}
if(data[0]&&data[0].text&&data[0].text.indexOf("潮童")>-1){
$("#ageLevel").val("2|3|4|5");
}else{
$("#ageLevel").val("1");
}
$(":checkbox[name=ageLevel]").prop("checked",false);
$(":checkbox[name=ageLevel]").each(function(){
var name=$("#ageLevel").val();
if(name.indexOf($(this).val())>-1){
$(this).prop("checked",true)
}
});*/
}
},
};
var tabTree=new common.tabTree("#sortTree",SORTDATA);
tabTree.isfeeze=true;
tabTree.init(SORTDATA.datas);
new common.dropDown({el:"#postionId", ajax:"searchPostion", params:function(){
return {postionId:$("#postionId").val()};
}});
new common.dropDown({el:"#templetId",ajax:"searchTemplet",params:function(){
return {templetId:$("#templetId").val()};
}});
new common.dropDown({el:"#sizeId",ajax:"sortsize",params:function(){
return {sizeId:$("#sizeId").val()};
}});
// 初始化风格的多选框
common.util.__ajax({
url: '/operations/search/queryAllStyle',
data: {
//categoryId: basicInfo.smallSortId
}
},function(res){
var data = res;
data.selectStyle = mainData.style;
$('#styleDiv').html(common.util.__template2($('#templateStyle').html(), data));
},true);
// 初始化颜色单选选项列表
common.util.__ajax({
url: '/basegoods/queryProductColors',
data: {
}
},function(res){
var colorList = res.data;
colorList.selectColor = mainData.color;
$('#colorDiv').html(common.util.__template2($('#templateColor').html(), colorList));
},true);
\ No newline at end of file
... ...
... ... @@ -9,7 +9,7 @@ var g = new common.grid({
size: 10,
parms: function() {
return {
positionId: common.util.__input('positionId'),
positionId: common.util.__input('postionId'),
caption : $("#caption").val()
};
},
... ... @@ -150,4 +150,8 @@ $('tbody').on('click', '.del-banner', function() {
common.util.__tip(res.message);
}
}, true);
});
\ No newline at end of file
});
new common.dropDown({el:"#postionId", ajax:"searchPostion", params:function(){
return {postionId:$("#postionId").val()};
}});
\ No newline at end of file
... ...