Authored by weiqingting

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

... ... @@ -72,6 +72,11 @@ toast.prototype.init = function(options) {
});
}
__self.dom.wrap.find('.modal-dialog').css({
width: _o.width,
height: _o.height
});
__self.dom.wrap.on('click', '[data-id]', function(event) {
var $this = $(this);
if (!$this.attr('disabled')) {
... ... @@ -227,6 +232,14 @@ toast._through = function() {
var api = new toast(arguments[0]);
return api;
};
toast.open = function(options, callback) {
return this._through({
title: options.title,
addClass: options.addClass,
width: options.width,
content: options.content
});
}
toast.alert = function(content, callback) {
var __self = this,
_o = __self.options;
... ...
... ... @@ -24,8 +24,9 @@ require('../util/jquery.simplePagination');
var grid = function(options) {
var defaults = {
hash: true,
size: 10,
//size: 10,
innerHtml: "<div class='grid'><table class='table table-striped table-bordered responsive dataTable no-footer' role='grid' aria-describedby='basicTable_info'>" + "<thead></thead><tbody></tbody></table></div>" + "<nav><ul class='pagination'></ul></nav>",
nav: true,
tabUrl: false
}
this.options = $.extend({}, defaults, options);
... ... @@ -105,6 +106,7 @@ grid.prototype = {
});
if (!p.page && !urlParam.page) p.page = 1;
if (!p.size && !urlParam.size) p.size = 10;
if (param.page !== p.page) {
param.page = p.page;
... ... @@ -112,7 +114,10 @@ grid.prototype = {
param.page = urlParam.page;
}
param.size = p.size;
if (param.size == p.size) {
param.size = urlParam.size;
}
var urlHash = '';
$.each(param, function(key, value) {
... ... @@ -123,6 +128,7 @@ grid.prototype = {
if (p.hash) {
location.hash = urlHash;
}
return param;
},
__pagination: function(pagination) {
... ... @@ -246,7 +252,7 @@ grid.prototype = {
$(p.columns).each(function(i, column) {
if (!column.hidden) {
//console.log(item, column);
_h += ('<td >');
_h += ('<td>');
_h += (g.__bodyCell(item, column));
_h += ('</td>');
}
... ...
var $=require('jquery'),
util=require('./util');
var $ = require('jquery'),
util = require('./util');
var tab=function(options) {
var defaults={
innerHtml:'<ul class="nav nav-pills"></ul>'
var tab = function(options) {
var defaults = {
innerHtml: '<ul class="nav nav-pills"></ul>'
};
this.options=$.extend({}, defaults, options);
this.options = $.extend({}, defaults, options);
$(options.el).html(this.options.innerHtml);
this.tab=$("ul",options.el);
this.active=undefined;//undefined==void(0)
this.tab = $("ul", options.el);
this.active = undefined; //undefined==void(0)
return this;
}
tab.prototype={
constructor:tab,
init:function(data){
var g = this, p = this.options;
tab.prototype = {
constructor: tab,
init: function(data) {
var g = this,
p = this.options;
$(this.tab).html("");
this.render(data);
this.bind(p.click);
return this;
},
bind:function(callback){
var g = this, p = this.options;
$(p.el).off("click","li");
$(p.el).on("click","li",function(){
bind: function(callback) {
var g = this,
p = this.options;
$(p.el).off("click", "li");
$(p.el).on("click", "li", function() {
$(this).addClass('active').siblings().removeClass('active');
g.active=$(this).find("a").attr("columnname");
g.active = $(this).find("a").attr("columnname");
g.key = $(this).find("a").attr("key");
g.value = $(this).find("a").attr("value");
callback&&callback();
callback && callback.call(this);
});
},
render:function(data){
var g = this, p = this.options;
render: function(data) {
var g = this,
p = this.options;
var lis=[];
$(p.columns).each(function (i, column) {
var lis = [];
$(p.columns).each(function(i, column) {
var li = $("<li></li>");
var a = $("<a href='javascript:void(0);'></a>");
if (column.name == 'all') {
li = $('<li class="active"></li>');
};
if (column.name) a.attr({ columnname: column.name });
if (column.key) a.attr({ key: column.key});
if (column.value) a.attr({ value: column.value});
if (column.name) a.attr({
columnname: column.name
});
if (column.key) a.attr({
key: column.key
});
if (column.value) a.attr({
value: column.value
});
var h_t = column.display || "";
a.html(h_t);
... ... @@ -54,14 +63,15 @@ tab.prototype={
g.tab.append(li);
});
g.tab.html(util.__template(g.tab.html(),data||{}));
g.tab.html(util.__template(g.tab.html(), data || {}));
},
load:function(data){
var g = this, p = this.options;
g.tab.html(util.__template(g.tab.html(),data||{}));
load: function(data) {
var g = this,
p = this.options;
g.tab.html(util.__template(g.tab.html(), data || {}));
}
}
module.exports=tab;
\ No newline at end of file
module.exports = tab;
\ No newline at end of file
... ...
'use strict';
var $ = require('jquery'),
common = require('../common/common');
$('input[type="file"]').after('<div class="file-name btn btn-default">请选择文件</div>');
function batchExport(el, type) {
var loadModal = null;
return {
params: {
type: type,
__type: "batch-import"
},
onStart: function() {
loadModal = common.dialog.load();
$(el).parents('td').find('.file-name').text($(el).val().replace("C:\\fakepath\\", ""));
},
onComplete: function(response) {
console.log(response);
if (loadModal) {
loadModal.close();
}
if (response.code == 200) {
common.util.__tip(response.message, 'success');
} else {
common.util.__tip(response.message, 'warning');
}
}
}
}
common.edit.ajaxfileupload('#sort-file', batchExport('#sort-file', 'searchSort'));
common.edit.ajaxfileupload('#brand-file', batchExport('#brand-file', 'brandProperty'));
\ No newline at end of file
... ...
... ... @@ -2,18 +2,79 @@
var $ = require('jquery'),
common = require('../common/common');
var ENUM = {
gender: {
1: '男',
2: '女',
3: '通用'
},
ageLevel: {
1: '成人',
2: '大童',
3: '小童'
},
status: {
'-1': '待上架',
'2': '待审核',
'3': '驳回',
'4': '通过',
'1': '已上架',
'0': '已下架',
'5': '再上架待审核',
'6': '再上架驳回',
'7': '再上架通过'
},
attribute: {
1: '普通',
2: '赠品'
},
tab: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'all': 0
}
}
};
var t = new common.tab({
el: "#basicTab",
click: function() {
g.options.columns[11].hidden = true;
g.options.columns[8].hidden = true;
if ($(this).find('a').attr('columnname') == 3) {
g.options.columns[11].hidden = false;
} else if ($(this).find('a').attr('columnname') == 2) {
g.options.columns[8].hidden = false;
};
g.init($("#gridurl").val());
},
columns: [{
name: "0",
value: '-1,3',
display: "上架前"
}, {
name: "1",
value: '4,1,0,5,6',
display: "上架后"
}, {
name: "2",
value: '1',
display: "搜索/标签"
}, {
name: "3",
value: '1',
display: "上架后信息缺失"
}, {
name: "all",
value: '',
display: "全部商品"
}]
}).init();
var g = new common.grid({
el: "#basicTable",
parms: function() {
return {
productSkn: common.util.__input("productSkn"),
productSkc: common.util.__input("productSkc"),
... ... @@ -31,7 +92,8 @@ var g = new common.grid({
smallSortId: common.util.__input("smallSortId"),
isOutLets: common.util.__input("isOutLets"),
productStatus: common.util.__input("productStatus"),
isScreen: common.util.__input("isScreen")
size: common.util.__input("size"),
productStatusStr: t.value
};
},
columns: [{
... ... @@ -68,39 +130,228 @@ var g = new common.grid({
display: '年龄层/性别',
name: 'vip_discount_type',
render: function(item) {
return ENUM.gender[item.gender];
return ENUM.ageLevel[item.ageLevel] + '/' + ENUM.gender[item.gender];
}
}, {
display: '商品类别',
name: 'vip_price'
name: 'attribute', //商品属性(1普通、2赠品等) 商品类别
render: function(item) {
return ENUM.attribute[item.attribute];
}
}, {
display: '搜索/标签',
hidden: true,
render: function(item) {
return '关键词:' + '<br>' +
'风格:' + item.style + '<br>' +
'纹理:' + item.style + '<br>' +
'工艺:' + item.style + '<br>';
}
}, {
display: '操作信息',
render: function(item) {
var html = '';
if (item.founder_name) {
html += '<p>' + item.founder_name + '</p>';
if (item.founderName) {
html += '<p>' + item.founderName + '</p>';
}
if (item.updateTime) {
html += '<p>' + item.updateTime + '</p>';
if (item.editTime) {
html += '<p>' + item.editTime + '</p>';
}
return html;
}
}, {
display: '上架状态',
name: 'vip2_price'
name: 'status', // -1待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过。
render: function(item) {
var html = '';
html += ENUM.status[item.status];
if (item.shelveTime) {
html += '<br>上架时间:' + item.shelveTime;
}
return html;
}
}, {
display: '缺失信息',
hidden: true,
render: function(item) {
return '缺失信息';
}
}, {
display: '操作',
render: function(item) {
return '<a href="/goods/netsale/edit/' + item.productSkn + '" class="btn btn-info btn-xs edit-btn">编辑</a>' +
'<a href="javascript:;" class="btn btn-info btn-xs edit-btn">上架</a>' +
'<a href="javascript:;" class="btn btn-info btn-xs info-btn">查看</a>';
var HtmArr = [];
if (item.status == 1) {
HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + '" class="btn btn-info btn-xs edit-btn">编辑</a>');
HtmArr.push('<a href="javascript:;" class="btn btn-danger btn-xs shelve-btn" data-skn="' + item.productSkn + '">下架</a>');
} else if (item.status != 2 && item.status != 5) {
HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + '" class="btn btn-info btn-xs edit-btn">编辑</a>');
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs shelve-btn" data-skn="' + item.productSkn + '">上架</a>');
}
HtmArr.push('<a href="javascript:;" class="btn btn-info btn-xs info-btn">查看</a>');
return HtmArr.join('');
}
}]
});
g.init($("#gridurl").val());
//筛选
$("#filter-btn").click(function() {
g.reload(1);
});
/*
* 上架下架弹框
* params: title(弹框标题), html(弹框内容html)
*/
function shelveModal(title, html) {
var selectedArr = g.selected,
len = selectedArr.length,
productSknList = [],
shelveModal = null;
if (len <= 0) {
common.util.__tip('请选择要' + title + '的商品', 'warning');
return;
}
$.each(selectedArr, function(i, value) {
productSknList.push(value['productSkn']);
});
shelveModal = common.dialog.open({
title: '上架',
content: html
});
var e = new common.edit('.shelve-form');
e.init();
$('.shelve-form').on('click', '.btn', function() {
var type = $(this).data('type');
$(this).closest('.form-group').find('input').attr('required', true)
.end().siblings('.form-group').find('input').attr('required', false);
e.submit('/goods/product/updateProductSknTimingInfo', function(option) {
option.data.productSknList = JSON.stringify(productSknList);
option.data.type = type;
option.success = function(res) {
if (res.data.code == 200) {
e.$tip(res.data.message, function() {
shelveModal.close();
}, 'growl-success');
} else {
e.$tip(res.data.message);
}
}
});
});
}
//批量skn上架
$('#onshelve').on('click', function() {
shelveModal('上架', $('#onshelve-template').html());
});
//批量skn下架
$('#offshelve').on('click', function() {
shelveModal('下架', $('#offshelve-template').html());
});
//导出
$('#export-btn').on('click', function() {
});
//单个sku,skc上下架
$('#basicTable').on('click', '.shelve-btn', function() {
var that = this,
skn = $(this).data('skn'),
shelveModalHtml = '',
shelveModal = null;
var shelveModalHtml = common.util.__template($('#template').html());
$(that).addClass('disabled');
common.util.__ajax({
url: '/goods/product/getNetSaleInfo',
data: {
param: skn
}
}, function(res) {
shelveModalHtml = common.util.__template($('#template').html(), res.data.baseProductInfo.baseProduct);
shelveModal = common.dialog.open({
title: '上/下架',
width: 900,
content: shelveModalHtml
});
$(that).removeClass('disabled');
var shelveTable = new common.grid({
el: "#shelve-table",
columns: [{
display: 'SKC(商品信息)',
render: function(item) {
return 'SKC:' + item.productSkc + '<br>' +
'颜色:' + item.goodsName;
}
}, {
display: 'SKC上架操作(状态)',
render: function(item) {
if (item.status == 0) {
return '<a class="btn btn-success" href="javascript:;">点击上架</a>';
} else {
return '<a class="btn btn-danger" href="javascript:;">点击下架</a>';
}
}
}, {
display: 'SKU',
render: function(item) {
//console.log(item.goodsSizeList);
var html = '';
$.each(item.goodsSizeList, function(i, value) {
html += value.productSku + '<br>';
});
return html;
}
}, {
display: '尺码',
render: function(item) {
var html = '';
$.each(item.goodsSizeList, function(i, value) {
html += value.sizeName + '<br>';
});
return html;
}
}, {
display: '库存',
render: function(item) {
var html = '';
$.each(item.goodsSizeList, function(i, value) {
html += value.stock + '<br>';
});
return html;
}
}, {
display: 'SKU上架操作',
render: function(item) {
var html = '';
/*$.each(item.goodsSizeList, function(i, value) {
html += value.sizeName + '<br>';
});*/
return html;
}
}, {
display: 'SKU上架状态',
name: 'vip_discount_type',
render: function(item) {
//return ENUM.ageLevel[item.ageLevel] + '/' + ENUM.gender[item.gender];
}
}]
});
shelveTable.init(res.data.goodsList);
}, true);
});
\ No newline at end of file
... ...
... ... @@ -443,6 +443,7 @@ $('#sure-change').on('click', function() {
$('#priceTable').hide();
$('.success-wrap').show();
path = res.data;
successList.length = 0;
});
});
... ...
... ... @@ -109,7 +109,7 @@ exports.res = [
type: 'number'
}, {
name: 'isOutLets',
type: 'number'
type: 'string'
}, {
name: 'productStatus',
type: 'number'
... ... @@ -119,7 +119,48 @@ exports.res = [
}, {
name: 'size',
type: 'number'
}, ]
}, {
name: 'productStatusStr',
type: 'string'
}]
}, {
//网销信息 -> 批量skn处理
route: '/goods/product/updateProductSknTimingInfo',
method: 'POST',
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'
}]
}, {
//网销信息 -> 批量页面渲染
route: '/goods/netsale/batch',
method: 'GET',
view: 'pages/goods/netsale-batch',
src: '/goods/netsale-batch',
data: {
secondTitle: '网销信息',
pageTitle: '批量设置',
domain: exports.domain,
}
}, {
//网销信息 -> 编辑页页面渲染
route: '/goods/netsale/edit/:param',
... ... @@ -135,6 +176,14 @@ exports.res = [
type: 'number'
}]
}, {
route: '/goods/product/getNetSaleInfo',
method: 'POST',
url: '/product/getNetSaleInfo',
params: [{
name: 'param',
type: 'number'
}]
}, {
//价格管理 -> 代销变价页面渲染
route: '/goods/pricechange/index',
method: 'GET',
... ...
<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}}{{.}}{{/ secondTitle}}
{{^ secondTitle}}{{pageTitle}}{{/ secondTitle}}
</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>{{pageTitle}}</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<table class="table table-bordered">
<tr>
<td rowspan="2">排序</td>
<td>上传EXCEL:</td>
<td style="position: relative;"><input id="sort-file" name="file" data-type="searchSort" type="file" style="cursor: pointer; height: 37px; top: 8px;"></td>
</tr>
<tr>
<td>说明:</td>
<td colspan="2">
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、Excel表头为:<span style="color: #67D267;">SKN、模块ID(品牌设置:1;奥莱设置:2;搜索设置:3)、排序值</span><br>
3、第一行为表头内容,第二行开始为正式内容<br>
4、每个文件控制在2500行以内<br>
5、<a href="{{domain}}/common/searchSort.xlsx">下载样例</a>
</td>
</tr>
<tr>
<td rowspan="2">品牌款型系列</td>
<td>上传EXCEL:</td>
<td style="position: relative;"><input id="brand-file" name="file" data-type="brandProperty" type="file" style="cursor: pointer; height: 37px; top: 8px;"></td>
</tr>
<tr>
<td>说明:</td>
<td colspan="2">
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、Excel表头为:<span style="color: #67D267;">SKN、品牌款型系列名称、类型</span><br>
3、第一行为表头内容,第二行开始为正式内容<br>
4、每个文件控制在500行以内<br>
5、<a href="{{domain}}/common/brandModelSeries.xlsx">下载样例</a>
</td>
</tr>
</table>
</div>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -27,43 +27,43 @@
<div class="panel-body">
<div class="row">
<div class="panel-col">
<input id="productSkn" class="form-control panel-input height40" type="text" placeholder="请输入SKN" onkeyup="this.value=this.value.replace(/\D/gi,'')">
<input id="productSkn" class="form-control panel-input" type="text" placeholder="请输入SKN" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</div>
<div class="panel-col">
<input id="skc" class="form-control panel-input height40" type="text" placeholder="请输入SKC" onkeyup="this.value=this.value.replace(/\D/gi,'')">
<input id="productSkc" class="form-control panel-input" type="text" placeholder="请输入SKC" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</div>
<div class="panel-col">
<input id="sku" class="form-control panel-input height40" type="text" placeholder="请输入SKU" onkeyup="this.value=this.value.replace(/\D/gi,'')">
<input id="productSku" class="form-control panel-input" type="text" placeholder="请输入SKU" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</div>
<div class="panel-col">
<input id="productName" class="form-control panel-input height40" type="text" placeholder="商品名称">
<div class="panel-col2">
<input id="productName" class="form-control panel-input" type="text" placeholder="商品名称">
</div>
<div class="panel-col2">
<select name="shop" id="shop" tabindex="-1" title="" class="form-control height40">
<select name="shopId" id="shopId" tabindex="-1" title="" class="form-control">
<option value="-1">请选择店铺</option>
</select>
</div>
<div class="panel-col">
<select name="brand" id="brand" tabindex="-1" title="" class="form-control height40">
<select name="brandId" id="brandId" tabindex="-1" title="" class="form-control">
<option value="-1">请选择品牌</option>
</select>
</div>
<div class="panel-col">
<select name="stock" id="stock" tabindex="-1" title="" class="form-control height40">
<select name="stock" id="stock" tabindex="-1" title="" class="form-control">
<option value="-1">库存情况</option>
<option value="1">有库存</option>
<option value="0">无库存</option>
</select>
</div>
<div class="panel-col">
<select name="shoot" id="shoot" tabindex="-1" title="" class="form-control height40">
<select name="isScreen" id="isScreen" tabindex="-1" title="" class="form-control height40">
<option value="-1">拍摄状态</option>
<option value="1">已拍摄</option>
<option value="0">未拍摄</option>
</select>
</div>
<div class="panel-col">
<select name="clstatus" id="clstatus" tabindex="-1" title="" class="form-control height40">
<select name="isMeasure" id="isMeasure" tabindex="-1" title="" class="form-control height40">
<option value="-1">测量状态</option>
<option value="1">已测量</option>
<option value="0">未测量</option>
... ... @@ -78,34 +78,34 @@
</select>
</div>
<div class="panel-col">
<select name="cate1" id="cate1" tabindex="-1" title="" class="form-control height40">
<select name="maxSortId" id="maxSortId" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择一级类目</option>
</select>
</div>
<div class="panel-col">
<select name="cate2" id="cate2" tabindex="-1" title="" class="form-control height40">
<select name="middleSortId" id="middleSortId" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择二级类目</option>
</select>
</div>
<div class="panel-col">
<select name="cate3" id="cate3" tabindex="-1" title="" class="form-control height40">
<select name="smallSortId" id="smallSortId" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择三级类目</option>
</select>
</div>
<div class="panel-col">
<!-- <div class="panel-col">
<select name="cate4" id="cate4" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择四级类目</option>
</select>
</div>
</div> -->
<div class="panel-col">
<select name="aolai" id="aolai" tabindex="-1" title="" class="form-control height40">
<select name="isOutLets" id="isOutLets" tabindex="-1" title="" class="form-control height40">
<option value="-1">是否奥莱</option>
<option value="1">奥莱</option>
<option value="0">菲奥莱</option>
<option value="Y">奥莱</option>
<option value="N">非奥莱</option>
</select>
</div>
<div class="panel-col">
<select name="status" id="status" tabindex="-1" title="" class="form-control height40">
<select name="productStatus" id="productStatus" tabindex="-1" title="" class="form-control height40">
<option value="-1">状态</option>
<option value="1">待上架</option>
<option value="0">待审核</option>
... ... @@ -120,14 +120,14 @@
</div>
<div class="panel-col">
<select name="jit" id="jit" tabindex="-1" title="" class="form-control height40">
<select name="isJit" id="isJit" tabindex="-1" title="" class="form-control">
<option value="-1">是否JIT商品</option>
<option value="Y"></option>
<option value="N"></option>
</select>
</div>
<div class="panel-col">
<select name="size" id="size" tabindex="-1" title="" class="form-control height40">
<select name="size" id="size" tabindex="-1" title="" class="form-control">
<option value="10">单页显示条数</option>
<option value="10">10条</option>
<option value="20">20条</option>
... ... @@ -136,23 +136,84 @@
<option value="100">100条</option>
</select>
</div>
<div class="panel-col height40">
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="javascript:;" class="btn btn-info">全部</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
</div>
</div>
<div class="row" style="margin: 0 0 0 -5px;">
<a id="" href="javascript:;" class="btn btn-default">上架</a>
<a id="" href="javascript:;" class="btn btn-default">下架</a>
<a id="" href="javascript:;" class="btn btn-default">导出</a>
<a id="import-btn" href="javascript:;" class="btn btn-info">批量(排序、款型系列)</a>
<a id="onshelve" href="javascript:;" class="btn btn-default">上架</a>
<a id="offshelve" href="javascript:;" class="btn btn-default">下架</a>
<a id="export-btn" href="javascript:;" class="btn btn-default">导出</a>
<a id="import-btn" href="/goods/netsale/batch" class="btn btn-info">批量(排序、款型系列)</a>
</div>
</div>
</div>
<div class="panel">
<div class="panel-body nopadding">
<div class="dataTab_wrapper" id="basicTab"></div>
<div class="dataTables_wrapper no-footer" id="basicTable"></div>
</div>
</div>
</div>
<input type="hidden" id="gridurl" value="{{gridurl}}">
<script type="text/template" id="onshelve-template">
<form class="shelve-form form-horizontal form-bordered">
<div class="panel panel-default">
<div class="panel-body nopadding">
<div class="form-group">
<a class="btn btn-info" data-type="2" href="javascript:;">上架上新</a>
<a class="btn btn-info" data-type="1" href="javascript:;">上架不上新</a>
</div>
<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></div>
<div class="col-sm-1"><a class="btn btn-info" data-type="3" href="javascript:;">确定</a></div>
</div>
<div class="form-group">
<div class="col-sm-3 height40">预计上架上新时间:</div>
<div class="col-sm-6"><input id="onNewTime" class="form-control" jsaction="time" type="text" placeholder="预计上架上新时间" readonly></div>
<div class="col-sm-1"><a class="btn btn-info" data-type="4" href="javascript:;">确定</a></div>
</div>
<div class="form-group">
<div class="col-sm-2 height40">预售时间:</div>
<div class="col-sm-4"><input id="advanceBeginTime" class="form-control" jsaction="time:end:advanceEndTime" type="text" placeholder="预售开始时间" readonly></div>
<div class="col-sm-4"><input id="advanceEndTime" class="form-control" jsaction="time:start:advanceBeginTime" type="text" placeholder="预售结束时间" readonly></div>
<div class="col-sm-1"><a class="btn btn-info" data-type="5" href="javascript:;">确定</a></div>
</div>
</div>
</div>
</form>
</script>
<script type="text/template" id="offshelve-template">
<form class="shelve-form form-horizontal form-bordered">
<div class="panel panel-default">
<div class="panel-body nopadding">
<div class="form-group">
<a class="btn btn-info" data-type="7" href="javascript:;">立即下架</a>
</div>
<div class="form-group">
<div class="col-sm-3 height40">预计下架时间:</div>
<div class="col-sm-4">售罄<input id="outSaleTime" class="form-control" type="text" style="display:inline-block;width:60px;" value="0">天下架</div>
<div class="col-sm-1"><a class="btn btn-info" data-type="6" href="javascript:;">确定</a></div>
</div>
</div>
</div>
</form>
</script>
<script type="text/template" id="template">
<p>SKN{productSkn} 品牌:{brandName}</p>
<p>商品名称:{productName}</p>
<div id="shelve-table" class="dataTables_wrapper no-footer"></div>
</script>
\ No newline at end of file
... ...