Authored by 陶雨

商品池及网销部分页面

... ... @@ -3,6 +3,7 @@ var $ = require('jquery'),
common = require('../common/common');
require('../util/custom.js');
require('../goods/search-key.js');
var e = new common.edit('#basicForm');
e.init();
... ...
var $ = require('jquery'),
common = require('../common/common');
\ No newline at end of file
... ...
var $ = require('jquery'),
common = require('../common/common');
var g = new common.grid({
el: "#product-pool",
parms: function () {
return {
id: common.util.__input('search-id'),
poolName: common.util.__input('search-name')
};
},
columns: [
{display: "商品池编号", name: "id"},
{display: "商品池名称", name: "poolName"},
{display: "说明", name: "comment"},
{display: "SKN个数", name: "total"},
{
display: "操作", name: "", render: function (item) {
return '<a class="btn btn-info detail" data-index="' + item.__index + '">详情</a>';
}
}
]
});
g.init('/market/productPool/queryProductPoolPage');
var Bll = {
toast:function(url) {
var e = new common.edit("#baseform", {bucket: "productPool"});
common.dialog.confirm("添加商品池",
common.util.__template($("#template").html(), {}),
function() {
e.submit(url,function(option){
//option.data;
option.success=function(){
g.reload();
};
option.error=function(){
}
});
});
e.init();
new common.dropDown({el: "#producttype"});
},
detailtoast:function(index) {
common.dialog({
title:"商品池详情",
content:'<div id="faGrid" style="height: 600px;overflow:auto;"></div>',
button:[{value:"添加", callback:function() {
var e = new common.edit("#baseform", {bucket: "productPool"});
common.dialog.confirm("添加商品池",
common.util.__template($("#template1").html(), {}),
function() {
e.submit("/market/productPool/addProductPoolDetailBo",function(option){
//option.data;
option.success=function(){
g.reload();
};
option.error=function(){
}
});
});
e.init();
return false;
}}]
});
var grid = new common.grid({
el:"#faGrid",
parms: function() {
return {id: index};
},
columns:[
{display:"ID", name:"id"},
{display:"SKN",name:"productskn"},
{display:"名称", name:""},
{display:'品牌', name: "brandName"},
{display: '分类',name: "sortName"},
{display: '操作', name: "", render: function(item) {
return '<a class="btn btn-info delbtn" data-index="' + item.__index + '">删除</a>';
}}
]
});
grid.init('/market/productPool/queryProductPoolDetailPage');
$(document).on('click', '.delbtn', function() {
var item = grid.rows[$(this).data("index")];
common.util.__ajax({
url:'/market/productPool/deleteProductPoolDetailBo',
data:{id:item.id}
},function(res) {
grid.reload();
});
});
}
};
$("#add-pool").on('click', function() {
Bll.toast("/market/productPool/addProductPoolBo");
});
$(document).on("click", ".detail", function() {
var item=g.rows[$(this).data("index")];
Bll.detailtoast(item.id);
});
$(document).on("click","#filter-btn",function () {
g.reload(1);
});
\ No newline at end of file
... ...
... ... @@ -72,7 +72,7 @@ var $ = require('jquery'),
return date.getFullYear() + "-" + (mm < 10 ? "0" + mm : mm) + "-" + (dd < 10 ? "0" + dd : dd);
},
toast:function(url, item, hint) {
var e = new common.edit("#baseform");
var e = new common.edit("#baseform", {bucket:"activity"});
e.on("validate",function() {
var startTime=$("#startTime").val();
... ... @@ -140,12 +140,12 @@ var $ = require('jquery'),
if(hint == "专题编辑") {
common.util.__ajax({
url:'/runManage/subjectManage/queryBaseProductPoolListById',
data:{id:item.productPoolId}
},function(res) {
// console.log(res);
$("#select2-productPoolId-container").html(res.data[0].text);
});
url:'/runManage/subjectManage/queryBaseProductPoolListById',
data:{id:item.productPoolId}
},function(res) {
// console.log(res);
$("#select2-productPoolId-container").html(res.data[0].text);
});
} else {
$("#select2-productPoolId-container").html("选择商品池");
}
... ...
// exports.domain = require('../config/common.js').domain;
exports.domain = "http://192.168.102.201:8082/platform";
exports.res = [
{
//商品池管理 -> 页面渲染
route: '/market/productPool/index',
method: 'GET',
view: 'pages/market/productPool',
src: '/market/productPool'
}, {
//商品池管理 ->查询商品池分页
route: '/market/productPool/queryProductPoolPage',
method: 'POST',
url: '/pool/queryProductPoolPage',
params: [
{name: 'page', type: 'number'},
{name: 'size', type: 'number',def:10},
{name: 'id', type: 'number'},
{name: 'poolName', type: 'string'}
]
}, {
//添加商品池
route: '/market/productPool/addProductPoolBo',
method: 'POST',
url: '/pool/addProductPoolBo',
params: [
{name: 'activityid', type: 'number'},
{name: 'poolName', type: 'string'},
{name: 'comment', type: 'string'},
{name: 'producttype', type: 'string'},
{name: 'productSkn', type: 'string'}
]
}, {
//商品池详细列表分页
route: '/market/productPool/queryProductPoolDetailPage',
method: 'POST',
url: '/pool/queryProductPoolDetailPage',
params: [
{name: 'page', type: 'number'},
{name: 'size', type: 'number',def:10},
{name: 'id', type: 'number'}
]
}, {
//商品池详细列表删除
route: '/market/productPool/deleteProductPoolDetailBo',
method: 'POST',
url: '/pool/deleteProductPoolDetailBo',
params: [
{name: 'id', type: 'number'}
]
}, {
//商品池详细列表添加
route: '/market/productPool/addProductPoolDetailBo',
method: 'POST',
url: '/pool/addProductPoolDetailBo',
params: [
{name: 'activityid', type: 'number'},
{name: 'poolId', type: 'number'},
{name: 'productskn', type: 'number'},
{name: 'producttype', type: 'number'}
]
}];
\ No newline at end of file
... ...
<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>商品池管理</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>商品池管理</h4>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-heading">
<a class="btn btn-success " id="add-pool"><i class="fa fa-plus"></i> 添加商品池</a>
</div>
<div class="panel-body">
<div class="row">
<div class="panel-col">
<input type="text" class="form-control" id="search-id" placeholder="编号" />
</div>
<div class="panel-col">
<input type="text" class="form-control" id="search-name" placeholder="名称" />
</div>
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="filter-all" href="/market/productPool/index" class="btn btn-info">全部</a>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom: 10px">
<div id="product-pool"></div>
</div>
</div>
<script type="text/template" id="template">
<div class="rows" id="baseform">
<div class="form-group">
<label class="col-sm-2 control-label" for="poolName">商品池名称<font color="#f00">*</font></label>
<input type="hidden" value="{id}" id="id" />
<div class="col-sm-8">
<input type="text" class="form-control" id="poolName" name="{poolName}" required="required" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="comment">说明</label>
<div class="col-sm-8">
<input type="text" value="{comment}" class="form-control" id="comment" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="producttype">商品<font color="#f00">*</font></label>
<div class="col-sm-8">
<select id="producttype" style="width:120px;" value="{producttype}">
<option value="-1">请选择</option>
<option value="1">SKN</option>
<option value="2">SKU</option>
<option value="3">SKC</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">上传</label>
<div class="col-sm-10">
<input type="file" id="productSkn" name="productSkn" />
</div>
</div>
</div>
</script>
<script type="text/template" id="template1">
<div class="rows" id="base-form">
<div class="form-group">
<label class="col-sm-2 control-label" for="productskn">SKN</label>
<div class="col-sm-8">
<input type="hidden" id="poolId" value="{poolId}" />
<input type="hidden" id="producttype" value="{producttype}" />
<input type="text" class="form-control" id="productskn" value="{productskn}" required="required" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="name">名称</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="name" value="{name}" required="required" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="brandName">品牌</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="brandName" value="{brandName}" required="required" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="sortName">分类</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="sortName" value="{sortName}" required="required" />
</div>
</div>
</div>
</script>
\ No newline at end of file
... ...
... ... @@ -7,6 +7,36 @@
<h2 class="panel-title">商品参数</h2>
</div>
<div class="panel-body nopadding">
<div class="form-group">
<label class="col-sm-2 control-label">材质</label>
<div class="col-sm-8 height40">
<label style="cursor: pointer;"><input type="checkbox" name="material" value="1">反光</label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="2">雪纺</label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="3">太空棉</label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="4">PU</label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="5"></label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="6">毛呢</label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="7">羊毛/羊绒</label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="8">尼龙/棉纶</label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="9"></label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="10">涤纶/聚酯纤维</label>
<label style="cursor: pointer;"><input type="checkbox" name="material" value="11">丹宁</label>
</div>
<input type="hidden" id="material" value="{material}" for="checkbox">
</div>
<div class="form-group">
<label class="col-sm-2 control-label">洗涤提示</label>
<div class="col-sm-8 height40">
<label style="cursor: pointer;"><input type="checkbox" name="alert" value="1">不可熨烫</label>
<label style="cursor: pointer;"><input type="checkbox" name="alert" value="2">不可转笼翻转干燥</label>
<label style="cursor: pointer;"><input type="checkbox" name="alert" value="3">30度水温弱速洗</label>
<label style="cursor: pointer;"><input type="checkbox" name="alert" value="4">不可氯漂</label>
<label style="cursor: pointer;"><input type="checkbox" name="alert" value="5">不可干洗</label>
<label style="cursor: pointer;"><input type="checkbox" name="alert" value="6">不可拧干</label>
<label style="cursor: pointer;"><input type="checkbox" name="alert" value="7">分色洗涤</label>
</div>
<input type="hidden" id="alert" value="{alert}" for="checkbox">
</div>
</div>
<div class="panel-footer">
<button class="btn btn-primary">保存</button>
... ...
... ... @@ -7,6 +7,21 @@
<h2 class="panel-title">商品排序设置</h2>
</div>
<div class="panel-body nopadding">
<div class="form-group">
<label class="col-sm-1 control-label" for="name">品牌:</label>
<div class="col-sm-2">
<input type="text" class="form-control" id="name" value="{name}" required="required" />
</div>
<label class="col-sm-1 control-label" for="name">奥莱</label>
<div class="col-sm-2">
<input type="text" class="form-control" id="name" value="{name}" required="required" />
</div>
<label class="col-sm-1 control-label" for="name">搜索</label>
<div class="col-sm-2">
<input type="text" class="form-control" id="name" value="{name}" required="required" />
</div>
</div>
<div class="col-sm-12" style="color: red;"><div class="col-sm-1"></div>提示:商品在品牌商品列表中的排序,数字越大越靠前</div>
</div>
<div class="panel-footer">
<button class="btn btn-primary">保存</button>
... ...
... ... @@ -6,7 +6,26 @@
<h2 class="panel-title">搜索关键词</h2>
</div>
<div class="panel-body"></div>
<div class="panel-body">
<div class="form-group">
<label class="col-sm-1 control-label height40" for="name">商品关键词</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="name" value="{name}" required="required" />
</div>
<div class="height40" style="color: red;">每个关键词请用英文“,”隔开</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom: 10px">
<div class="form-group">
<label class="col-sm-1 control-label height40">搜索热词:</label>
<div class="col-sm-6">
</div>
</div>
</div>
</div>
</div>
<div class="panel-footer">
<button class="btn btn-primary">保存</button>
</div>
... ...
... ... @@ -7,9 +7,24 @@
<h2 class="panel-title">尺码信息</h2>
</div>
<div class="panel-body nopadding">
</div>
<div class="panel-footer">
<button class="btn btn-primary">保存</button>
<table class="table table-bordered">
<thead>
<tr>
<th>参考尺码</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>{sizeName}<input type="text" disabled="disabled" /></td>
<td><input type="text" disabled="disabled" /></td>
<td><input type="text" disabled="disabled" /></td>
<td><input type="text" disabled="disabled" /></td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
\ No newline at end of file
... ...