Authored by 王钱钧

添加 逛-【plus/star】、【品牌关注】模块代码

... ... @@ -34,6 +34,7 @@ var urlObj = {
'guangGetSortList':'/guang/article/getSortList', // 逛-获取作者
'guangGetTagCategoryByStatus':'/guang/tagSort/getTagItems',
'guangCommentGetFilterItems':'/guang/comment/getItems', // 逛-评论列表-获取筛选条件
'guangPlusSatrChannel':'/guang/plustarcategory/getCategoryNames', // 逛-plus star 频道
};
var minimumResultsForSearch=["sortbybrand","getjitSup","sortsize2"];
... ...
... ... @@ -79,7 +79,7 @@ $(document).on('click', '.info-del', function() {
function articleCategoryOP(prefix, url, item) {
var a =new common.edit(".confirm", {
"bucket" : "color"
"bucket" : "author"
});
common.dialog.confirm(prefix+'作者', common.util.__template2($("#template").html(), item), function () {
... ...
/**
* Created by wangqianjun on 16/3/30.
*/
var $ = require('jquery');
common = require('../common/common');
var imgArr = [];
var ENUM = {
HotEnum: {
'1': '是',
'0': '否',
},
StatusEnum: {
1:'可用',
2:'不可用',
},
GenderEnum: {
1:'男',
2:'女',
3:'通用',
},
}
//下拉框
new common.dropDown({
el: "#g-brandId",
ajax: 'brand',
params : {
status: 1
}
});
var g = new common.grid({
el: '#basicTable',
size: 10,
parms: function () {
return {
brandId: common.util.__input('g-brandId'),
};
},
columns: [
{
display: 'ID',
name: "id"
}, {
display: '品牌名称',
name: "brandName"
}, {
display: '新品',
render: function (item) {
var value = (item.brandType == 1) ? "是" : "否";
return "<p>" + value + "</p>";
}
},{
display: '折扣',
render: function (item) {
var value = (item.brandType == 2) ? "是" : "否";
return "<p>" + value + "</p>";
}
},{
display: '推荐',
render: function (item) {
var value = (item.brandType == 3) ? "是" : "否";
return "<p>" + value + "</p>";
}
},{
display: '活动',
render: function (item) {
var value = (item.brandType == 4) ? "是" : "否";
return "<p>" + value + "</p>";
}
},{
display: '折扣价',
name: "discount"
}, {
display: '时间',
render: function (item) {
var t = new Date(item.createTime * 1000);
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
return "<p>" + formatted + "</p>";
}
},
{
display: '操作',
//}
name: "status",
render: function (items) {
var HtmArr = [];
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-modify">编辑</a>');
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs info-del">删除</a>');
return HtmArr.join('');
}
}]
});
g.init('/guang/relationship/getList');
//==================== 按钮点击事件 =====================//
$("#filter-btn").click(function() {
g.reload(1);
});
//添加
$(document).on('click', '#add-btn', function() {
plusStarOP("新增", '/guang/relationship/addRel', {});
});
//编辑
$(document).on('click', '.info-modify', function() {
var item = g.rows[$(this).data("index")];
plusStarOP("编辑", '/guang/relationship/updateRel', item);
});
//删除
$(document).on('click', '.info-del', function() {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("温馨提示","确定要删除该品牌?" , function() {
common.util.__ajax({
url: '/guang/relationship/delRel',
data: {
id: item.id,
}
}, function(res) {
if (res.code == 200) {
g.reload();
}
});
});
});
// 根据选择的类型来动态展示页面
$(document).on('click', 'input[name="brandType"]', function () {
console.log();
var val = $(this).val();
$('#discount').css('display', 'none');
$('#activity').css('display', 'none');
$('#activity-name').css('display', 'none');
switch (val) {
// 折扣
case '2':
{
$('#discount').css('display', 'inline');
}
break;
// 活动
case '4':
{
$('#activity').css('display', 'block');
$('#activity-name').css('display', 'block');
}
break;
default :
break;
}
})
function plusStarOP(prefix, url, item) {
if(prefix == "编辑") {
imgArr = item.activityImg||[];
} else {
imgArr = [];
}
var a = new common.edit('#templete-top');
common.dialog.confirm(prefix+'品牌', common.util.__template2($("#template").html(), item), function () {
return a.submit(url,function(option){
//设置图片
if(imgArr.length) {
option.data.activityImg = imgArr.toString();
}
imgArr = [];
option.success=function(res){
res=res.data;
if(res.code=="200"){
a.$tip("提交成功", function() {
g.reload();
}, 'growl-success');
}else{
a.$tip(res.message);
}
return false;
},
option.error=function(res){
a.$tip(res.message);
}
});
});
a.init();
var val = $('#brandType').val();
$('#discount').css('display', 'none');
$('#activity').css('display', 'none');
$('#activity-name').css('display', 'none');
$('input[name="brandType"][value="' + val + '"]').trigger('click');
rendBoList(imgArr);
// 图片上传
uploadImage();
new common.dropDown({
el: "#brandId",
ajax: 'brand',
params : {
status: 1
}
});
}
function rendBoList (pictureBoList) {
$(".image-list").html('');
$("#addPic").append(common.util.__template2($("#imgeUpload").html(),
{
pictureBoList: pictureBoList
}
));
}
function uploadImage() {
common.edit.ajaxfileupload(".picfile", {
params: {
__type: "upload",
bucket: "relationship"
},
valid_extensions: ['png', 'jpg', 'jpeg'],
onComplete: function (response) {
if (response.status && response.code == 200) {
console.log("response", response);
if(response.data) {
imgArr.push(response.data);
rendBoList(imgArr);
}
}
else {
common.util.__tip(response.message, 'warning');
}
}
});
}
//删除单张图片
$(document).on('click', '.remove1', function () {
var index = $(this).data("index");
imgArr.splice(index, 1);
rendBoList(imgArr);
});
\ No newline at end of file
... ...
/**
* Created by wangqianjun on 16/3/30.
*/
var $ = require('jquery');
common = require('../common/common');
var ENUM = {
HotEnum: {
'1': '是',
'0': '否',
},
StatusEnum: {
1:'可用',
2:'不可用',
},
GenderEnum: {
1:'男',
2:'女',
3:'通用',
},
}
//下拉框
new common.dropDown({
el: "#g-brandId",
ajax: 'brand',
params : {
status: 1
}
});
var g = new common.grid({
el: '#basicTable',
size: 10,
parms: function () {
return {
brandType: common.util.__input('g-brandType'),
status: common.util.__input('g-status'),
brandId: common.util.__input('g-brandId'),
gender: common.util.__input('g-gender'),
};
},
columns: [
{
display: 'ID',
name: "id"
}, {
display: '品牌名称',
name: "brandName"
}, {
display: '品牌ID',
name: "brandId"
}, {
display: '频道名称',
name: "categoryName"
}, {
display: '性别',
render: function (item) {
return "<p>" + ENUM.GenderEnum[item.gender] + "</p>";
}
}, {
display: '是否可用',
render: function (item) {
return "<p>" + ENUM.StatusEnum[item.status] + "</p>";
}
},
{
display: '更新时间',
render: function (item) {
var t = new Date(item.updateTime * 1000);
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
return "<p>" + formatted + "</p>";
}
},
{
display: '操作',
//}
name: "status",
render: function (items) {
var HtmArr = [];
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-copy">复制链接</a>');
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-modify">查看/编辑</a>');
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs info-del">删除</a>');
return HtmArr.join('');
}
}]
});
g.init('/guang/plustar/getList');
//==================== 按钮点击事件 =====================//
$("#filter-btn").click(function() {
g.reload(1);
});
//添加
$(document).on('click', '#add-btn', function() {
plusStarOP("新增", '/guang/plustar/addPlustar', {});
});
//编辑
$(document).on('click', '.info-modify', function() {
var item = g.rows[$(this).data("index")];
plusStarOP("编辑", '/guang/plustar/updatePlustar', item);
});
//删除
$(document).on('click', '.info-del', function() {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("温馨提示","确定要删除该品牌?" , function() {
common.util.__ajax({
url: '/guang/plustar/delPlustar',
data: {
id: item.id,
}
}, function(res) {
if (res.code == 200) {
g.reload();
}
});
});
});
function plusStarOP(prefix, url, item) {
var a =new common.edit(".confirm");
common.dialog.confirm(prefix+'品牌', common.util.__template2($("#template").html(), item), function () {
//
return a.submit(url,function(option){
option.success=function(res){
res=res.data;
if(res.code=="200"){
a.$tip("提交成功", function() {
g.reload();
}, 'growl-success');
}else{
a.$tip(res.message);
}
return false;
},
option.error=function(res){
a.$tip(res.message);
}
});
});
a.init();
new common.dropDown({
el: "#brandType",
ajax: 'guangPlusSatrChannel',
params : {
status: 1
}
});
new common.dropDown({
el: "#brandId",
ajax: 'brand',
params : {
status: 1
}
});
}
\ No newline at end of file
... ...
/**
* Created by wangqianjun on 16/3/30.
*/
var $ = require('jquery');
common = require('../common/common');
var imgArr = [];
var ENUM = {
HotEnum: {
'1': '是',
'0': '否',
},
StatusEnum: {
1:'可用',
2:'不可用',
},
GenderEnum: {
1:'男',
2:'女',
3:'通用',
},
}
//下拉框
new common.dropDown({
el: "#g-status"
});
new common.dropDown({
el: "#g-gender"
});
new common.dropDown({
el: "#g-brandType",
ajax: 'guangPlusSatrChannel',
params : {
status: 1
}
});
new common.dropDown({
el: "#g-brandId",
ajax: 'brand',
params : {
status: 1
}
});
var g = new common.grid({
el: '#basicTable',
size: 10,
parms: function () {
return {
brandType: common.util.__input('g-brandType'),
status: common.util.__input('g-status'),
brandId: common.util.__input('g-brandId'),
gender: common.util.__input('g-gender'),
};
},
columns: [
{
display: 'ID',
name: "id"
},
{
display: '品牌ID',
name: "brandId"
}, {
display: '品牌名称',
name: "brandName"
},{
display: '频道名称',
name: "categoryName"
}, {
display: '性别',
render: function (item) {
return "<p>" + ENUM.GenderEnum[item.gender] + "</p>";
}
}, {
display: '是否可用',
render: function (item) {
return "<p>" + ENUM.StatusEnum[item.status] + "</p>";
}
},
{
display: '更新时间',
render: function (item) {
var t = new Date(item.updateTime * 1000);
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
return "<p>" + formatted + "</p>";
}
},
{
display: '操作',
//}
name: "status",
render: function (items) {
var HtmArr = [];
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-copy">复制链接</a>');
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-modify">查看/编辑</a>');
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs info-del">删除</a>');
return HtmArr.join('');
}
}]
});
g.init('/guang/plustar/getList');
//==================== 按钮点击事件 =====================//
$("#filter-btn").click(function() {
g.reload(1);
});
//添加
$(document).on('click', '#add-btn', function() {
plusStarOP("新增", '/guang/plustar/addPlustar', {});
});
//编辑
$(document).on('click', '.info-modify', function() {
var item = g.rows[$(this).data("index")];
common.util.__ajax(
{
url: '/guang/plustar/getDetail',
data: {
id: item.id,
}
}, function(res) {
//var item = res.data;
plusStarOP("编辑", '/guang/plustar/updatePlustar', res.data);
});
});
//删除
$(document).on('click', '.info-del', function() {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("温馨提示","确定要删除该品牌?" , function() {
common.util.__ajax({
url: '/guang/plustar/delPlustar',
data: {
id: item.id,
}
}, function(res) {
if (res.code == 200) {
g.reload();
}
});
});
});
function plusStarOP(prefix, url, item) {
if(prefix == "编辑") {
imgArr = item.bannerImg||[];
} else {
imgArr = [];
}
var a =new common.edit("#templete-top", {
"bucket" : "plustar"
});
common.dialog.confirm(prefix+'品牌', common.util.__template2($("#template").html(), item), function () {
//
return a.submit(url,function(option){
if(imgArr.length) {
option.data.bannerImg = imgArr.toString();
}
imgArr = [];
option.success=function(res){
res=res.data;
if(res.code=="200"){
a.$tip("提交成功", function() {
g.reload();
}, 'growl-success');
}else{
a.$tip(res.message);
}
return false;
},
option.error=function(res){
a.$tip(res.message);
}
});
});
a.init();
uploadImage();
rendBoList(imgArr);
new common.dropDown({
el: "#brandType",
ajax: 'guangPlusSatrChannel',
params : {
status: 1
}
});
new common.dropDown({
el: "#brandId",
ajax: 'brand',
params : {
status: 1
}
});
}
// 图片上传
function uploadImage() {
common.edit.ajaxfileupload(".picfile", {
params: {
__type: "upload",
bucket: "plustar"
},
valid_extensions: ['png', 'jpg', 'jpeg'],
onComplete: function (response) {
if (response.status && response.code == 200) {
console.log("response", response);
if(response.data) {
imgArr.push(response.data);
rendBoList(imgArr);
}
}
else {
common.util.__tip(response.message, 'warning');
}
}
});
}
function rendBoList (pictureBoList) {
$(".image-list").html('');
$("#addPic").append(common.util.__template2($("#imgeUpload").html(),
{
pictureBoList: pictureBoList
}
));
}
//删除单张图片
$(document).on('click', '.remove1', function () {
var index = $(this).data("index");
imgArr.splice(index, 1);
rendBoList(imgArr);
});
... ...
... ... @@ -47,7 +47,7 @@ var g = new common.grid({
name: "classifyName"
}, {
display: '所属标签数',
name: "classifyName"
name: "sortNum"
}, {
display: '状态',
render: function (item) {
... ...
... ... @@ -341,8 +341,151 @@ exports.res = [
]
},
//=================================【Plus/Star列表】
{//逛->Plus/Star列表 空白页
route: '/guang/plustar/index',
method: 'GET',
view: 'pages/guang/plusStarManager',
src: '/guang/plusStarManager',
data: {
iscreate: true
}
},{
// Plus/Star 列表数据
route: '/guang/plustar/getList',
method: 'POST',
url: '/guang/plustar/getList',
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'brandType', type: 'String'},
{name: 'status', type: 'String'},
{name: 'brandId', type: 'String'},
{name: 'gender', type: 'String'},
]
}, {
// Plus/Star列表-添加
route: '/guang/plustar/addPlustar',
method: 'POST',
url: '/guang/plustar/addPlustar',
params: [
{name: 'brandType', type: 'String'},
{name: 'status', type: 'String'},
{name: 'brandId', type: 'String'},
{name: 'gender', type: 'String'},
{name: 'coverImg', type: 'String'},
{name: 'bannerImg', type: 'String'},
{name: 'bannerTitle', type: 'String'},
{name: 'orderBy', type: 'String'},
]
}, {
// Plus/Star列表-编辑
route: '/guang/plustar/getDetail',
method: 'POST',
url: '/guang/plustar/getDetail',
params: [
{name: 'id', type: 'Number'},
{name: 'brandType', type: 'String'},
{name: 'status', type: 'String'},
{name: 'brandId', type: 'String'},
{name: 'gender', type: 'String'},
{name: 'coverImg', type: 'String'},
{name: 'bannerImg', type: 'String'},
{name: 'bannerTitle', type: 'String'},
{name: 'orderBy', type: 'String'},
]
},{
// Plus/Star列表-获取详情
route: '/guang/plustar/delPlustar',
method: 'POST',
url: '/guang/plustar/delPlustar',
params: [
{name: 'id', type: 'Number'}
]
},
{
// Plus/Star列表-删除
route: '/guang/plustar/delPlustar',
method: 'POST',
url: '/guang/plustar/delPlustar',
params: [
{name: 'id', type: 'Number'}
]
},
//=================================【Plus/Star分类】
{//逛->Plus/Star分类 空白页
route: '/guang/plustarcategory/index',
method: 'GET',
view: 'pages/guang/plusStarCategory',
src: '/guang/plusStarCategory',
data: {
iscreate: true
}
},
//=================================【品牌关注】
{//逛->品牌关注 空白页
route: '/guang/relationship/index',
method: 'GET',
view: 'pages/guang/brandConcern',
src: '/guang/brandConcern',
data: {
iscreate: true
}
},{
// 品牌关注 列表数据
route: '/guang/relationship/getList',
method: 'POST',
url: '/guang/relationship/getList',
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'brandType', type: 'String'},
{name: 'status', type: 'String'},
{name: 'brandId', type: 'String'},
{name: 'gender', type: 'String'},
]
}, {
// 品牌关注-添加
route: '/guang/relationship/addRel',
method: 'POST',
url: '/guang/relationship/addRel',
params: [
{name: 'brandType', type: 'Number'},
{name: 'activityName', type: 'String'},
{name: 'brandId', type: 'String'},
{name: 'discount', type: 'Number'},
{name: 'activityImg', type: 'String'},
]
}, {
// 品牌关注列表-编辑
route: '/guang/relationship/updateRel',
method: 'POST',
url: '/guang/relationship/updateRel',
params: [
{name: 'id', type: 'Number'},
{name: 'brandType', type: 'Number'},
{name: 'activityName', type: 'String'},
{name: 'brandId', type: 'String'},
{name: 'discount', type: 'Number'},
{name: 'activityImg', type: 'String'},
]
},
{
// 品牌关注列表-删除
route: '/guang/relationship/delRel',
method: 'POST',
url: '/guang/relationship/delRel',
params: [
{name: 'id', type: 'Number'}
]
},
//================================= [下拉框调用的接口]
{// 作者
route: '/guang/article/getAuthorList',
... ... @@ -370,6 +513,15 @@ exports.res = [
},
{// plus star 频道
route: '/guang/plustarcategory/getCategoryNames',
method: 'POST',
url: '/guang/plustarcategory/getCategoryNames',
params: [
{name: 'status', type: 'Number'},
]
},
];
... ...
<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="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<a id="add-btn" href="javascript:;" class="btn btn-info">添加</a>
</div>
<div class="panel-body">
<div class="row">
<div class="panel-col">
<select id="g-brandId" class="form-control">
<option value="-1">全部品牌</option>
</select>
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
</div>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div id="basicTable_wrapper" class="dataTables_wrapper no-footer">
<div class="dataTables_length" id="basicTable">
</div>
<nav>
<ul id="pagination" class="pagination pagination-lg"></ul>
</nav>
</div>
</div>
</div>
<script type="text/template" id="template">
<div id="templete-top">
<input type="hidden" name="" value="[[id]]" id="id" class="form-control" pattern="" title="">
<div class="form-group">
<label for="brandId" class="col-sm-2 control-label">品牌名称*:</label>
<div class="col-sm-10">
<select required="required" id="brandId" value="[[brandId]]" class="form-control">
<option value="[[brandId||-1]]">[[brandName||"请选择"]]</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">类型 <span class="asterisk">*</span></label>
<div class="col-sm-9">
<input for="radio" type="hidden" id="brandType" value="[[brandType]]"/>
<div class="rdio rdio-primary">
<input type="radio" id="int_new" value="1" name="brandType" required="">
<label for="int_new">新品</label>
</div><!-- rdio -->
<div class="rdio rdio-primary">
<input type="radio" value="2" id="int_sale" name="brandType">
<label for="int_sale">折扣</label>
<select name="discount" id="discount" value="[[discount]]" style="display:none;">
<option value="0">请选择</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</div><!-- rdio -->
<div class="rdio rdio-primary">
<input type="radio" value="3" id="int_recommend" name="brandType">
<label for="int_recommend">推荐</label>
</div><!-- rdio -->
<div class="rdio rdio-primary">
<input type="radio" value="4" id="int_activity" name="brandType">
<label for="int_activity">活动</label>
</div><!-- rdio -->
<label id="genderError" class="error"></label>
</div>
</div>
<div class="form-group" id="activity-name" style="">
<label class="col-sm-3 control-label">活动名称<span class="asterisk">*</span></label>
<div class="col-sm-9">
<input type="text" id="activityName" name="activityName" value="[[activityName]]" class="form-control" placeholder="请填写活动名称" value="">
</div>
</div>
</div>
<div id="activity">
<div class="form-group" style="" id="activity_url">
<label class="col-sm-3 control-label">活动图片<span class="asterisk">*</span></label>
<div class="col-sm-9">
<ul class="cover-image-list col-sm-10" id="addPic" style="padding: 0;margin: 0;">
<!-- 修改时不存在 -->
<li class="cover-image-item fileinput-button">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">+</a>
<input type="file" class="goods-img-upload picfile" id="picfile" name="picfile"></div>
</li>
</ul>
</div>
</div>
</div>
</script>
<script type="text/template" id="imgeUpload">
[[each pictureBoList as _item _index]]
<li class="cover-image-item image-list" data-index=[[_index]]>
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[_item]]">
</a>
<i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle" data-index="[[_index]]"></i>
</div>
</li>
[[/each]]
</script>
\ 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="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<a id="add-btn" href="javascript:;" class="btn btn-info">添加</a>
</div>
<div class="panel-body">
<div class="row">
<div class="panel-col">
<select id="g-brandId" class="form-control">
<option value="-1">全部品牌</option>
</select>
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
</div>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div id="basicTable_wrapper" class="dataTables_wrapper no-footer">
<div class="dataTables_length" id="basicTable">
</div>
<nav>
<ul id="pagination" class="pagination pagination-lg"></ul>
</nav>
</div>
</div>
</div>
<script type="text/template" id="template">
<div class="form-group">
<label for="brandType" class="col-sm-2 control-label">频道类别:</label>
<div class="col-sm-10">
<input type="hidden" name="" value="[[id]]" id="id" class="form-control" pattern="" title="">
<select id="brandType" value="[[brandType]]" class="form-control">
<option value="[[brandType||-1]]">[[categoryName||"请选择"]]</option>
</select>
</div>
</div>
<div class="form-group">
<label for="brandType" class="col-sm-2 control-label">品牌名称:</label>
<div class="col-sm-10">
<select id="brandId" value="[[brandId]]" class="form-control">
<option value="[[brandId||-1]]">[[brandName||"请选择"]]</option>
</select>
</div>
</div>
<div class="form-group">
<label for="brandType" class="col-sm-2 control-label">上传封面图:</label>
<div class="col-sm-10">
<p>只需上传1</p>
<ul class="upload-image-list" style="margin-left: -40px;">
<li class="fileinput-button" style="width: 300px;height:150px;">
<a class="fileinput-button-icon" id="coverImg" href="javascript:;">+</a></li>
</ul>
</div>
</div>
<div class="form-group">
<label for="brandType" class="col-sm-2 control-label">上传banner图:</label>
<div class="col-sm-10">
<p>最多上传2(只有明星潮品需上传2)</p>
<ul class="upload-image-list" id="bannerImgBox" style="margin-left: -40px;">
<li class="fileinput-button"><a class="fileinput-button-icon" id="bannerImg" href="javascript:;">+</a></li>
</ul>
</div>
</div>
<div class="form-group">
<label for="bannerTitle" class="col-sm-2 control-label">品牌banner标题:</label>
<div class="col-sm-10">
<input type="text" value="[[bannerTitle]]" name="content" id="bannerTitle" placeholder="品牌banner标题" required="required" class="form-control">
</div>
</div>
<div class="form-group">
<label for="orderBy" class="col-sm-2 control-label">排序:</label>
<div class="col-sm-10">
<input type="number" value="" name="content" id="orderBy" placeholder="排序" required="required" class="form-control">
</div>
</div>
<div class="form-group">
<label for="gender" class="col-sm-2 control-label">性别:</label>
<div class="radio">
<label><input type="radio" value="1" name="gender" kl_vkbd_parsed="true"></label>
<label><input type="radio" value="2" name="gender" kl_vkbd_parsed="true"></label>
<label><input type="radio" value="3" name="gender" kl_vkbd_parsed="true">通用</label>
</div>
<input id="gender" type="hidden" value="[[gender]]" for="radio" required="required" kl_vkbd_parsed="true">
</div>
<div class="form-group">
<label for="status" class="col-sm-2 control-label">是否可用:</label>
<div class="radio">
<label><input type="radio" value="1" name="status" kl_vkbd_parsed="true">可用</label>
<label><input type="radio" value="2" name="status" kl_vkbd_parsed="true">不可用</label>
</div>
<input id="status" type="hidden" value="[[status]]" for="radio" required="required" kl_vkbd_parsed="true">
</div>
</script>
... ...
<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="">Plus</a></li>
<li>Star</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>品牌列表管理</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<a id="add-btn" href="javascript:;" class="btn btn-info">添加</a>
</div>
<div class="panel-body">
<div class="row">
<div class="panel-col">
<select id="g-brandType" class="form-control">
<option value="-1">请选择频道</option>
</select>
</div>
<div class="panel-col">
<select id="g-status" class="form-control">
<option value="-1">选择品牌状态</option>
<option value="1">可用</option>
<option value="2">不可用</option>
</select>
</div>
<div class="panel-col">
<select id="g-brandId" class="form-control">
<option value="-1">全部品牌</option>
</select>
</div>
<div class="panel-col">
<select id="g-gender" class="form-control">
<option value="-1">性别</option>
<option value="1"></option>
<option value="2"></option>
<option value="3">通用</option>
</select>
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
</div>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div id="basicTable_wrapper" class="dataTables_wrapper no-footer">
<div class="dataTables_length" id="basicTable">
</div>
<nav>
<ul id="pagination" class="pagination pagination-lg"></ul>
</nav>
</div>
</div>
</div>
<script type="text/template" id="template">
<div id="templete-top">
<div class="form-group">
<label for="brandType" class="col-sm-2 control-label">频道类别:</label>
<div class="col-sm-10">
<input type="hidden" name="" value="[[id]]" id="id" class="form-control" pattern="" title="">
<select id="brandType" value="[[brandType]]" class="form-control">
<option value="[[brandType||-1]]">[[categoryName||"请选择"]]</option>
</select>
</div>
</div>
<div class="form-group">
<label for="brandId" class="col-sm-2 control-label">品牌名称:</label>
<div class="col-sm-10">
<select id="brandId" value="[[brandId]]" class="form-control">
<option value="[[brandId||-1]]">[[brandName||"请选择"]]</option>
</select>
</div>
</div>
<div class="form-group">
<label for="bannerTitle" class="col-sm-2 control-label">品牌banner标题:</label>
<div class="col-sm-10">
<input type="text" value="[[bannerTitle]]" name="content" id="bannerTitle" placeholder="品牌banner标题" required="required" class="form-control">
</div>
</div>
<div class="form-group">
<label for="orderBy" class="col-sm-2 control-label">排序:</label>
<div class="col-sm-10">
<input type="number" value="[[orderBy]]" name="content" id="orderBy" placeholder="排序" required="required" class="form-control">
</div>
</div>
<div class="form-group">
<label for="gender" class="col-sm-2 control-label">性别:</label>
<div class="radio">
<label><input type="radio" value="1" name="gender" kl_vkbd_parsed="true"></label>
<label><input type="radio" value="2" name="gender" kl_vkbd_parsed="true"></label>
<label><input type="radio" value="3" name="gender" kl_vkbd_parsed="true">通用</label>
</div>
<input id="gender" type="hidden" value="[[gender]]" for="radio" required="required" kl_vkbd_parsed="true">
</div>
<div class="form-group">
<label for="status" class="col-sm-2 control-label">是否可用:</label>
<div class="radio">
<label><input type="radio" value="1" name="status" kl_vkbd_parsed="true">可用</label>
<label><input type="radio" value="2" name="status" kl_vkbd_parsed="true">不可用</label>
</div>
<input id="status" type="hidden" value="[[status]]" for="radio" required="required" kl_vkbd_parsed="true">
</div>
<div class="form-group">
<label for="coverImg" class="col-sm-2 control-label">上传封面图:</label>
<div class="col-sm-8" id="colorUrlBox">
<input type="file" id="coverImg" name="coverImg" value="[[coverImg]]">
</div>
</div>
</div>
<div id="mutil-image">
<div class="form-group">
<label for="brandType" class="col-sm-2 control-label">上传banner图:</label>
<div class="col-sm-10">
<p>最多上传2(只有明星潮品需上传2)</p>
<ul class="cover-image-list col-sm-10" id="addPic" style="padding: 0;margin: 0;">
<!-- 修改时不存在 -->
<li class="cover-image-item fileinput-button">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">+</a>
<input type="file" class="goods-img-upload picfile" id="picfile" name="picfile"></div>
</li>
</ul>
</div>
</div>
</div>
</script>
<script type="text/template" id="imgeUpload">
[[each pictureBoList as _item _index]]
<li class="cover-image-item image-list" data-index=[[_index]]>
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[_item]]">
</a>
<i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle" data-index="[[_index]]"></i>
</div>
</li>
[[/each]]
</script>
... ...