Authored by weiqingting

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

... ... @@ -27,6 +27,8 @@ tab.prototype={
$(p.el).on("click","li",function(){
$(this).addClass('active').siblings().removeClass('active');
g.active=$(this).find("a").attr("columnname");
g.key = $(this).find("a").attr("key");
g.value = $(this).find("a").attr("value");
callback&&callback();
});
},
... ... @@ -36,9 +38,12 @@ tab.prototype={
var lis=[];
$(p.columns).each(function (i, column) {
var li = $("<li></li>");
var a=$("<a href='javascript:void(0);'></a>");
var a = $("<a href='javascript:void(0);'></a>");
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);
... ...
... ... @@ -26,7 +26,8 @@ var ENUM={
{name:"3",display:"过期({3})"},
{name:"4",display:"作废({4})"},
{name:"all",display:"全部({all})"}
]}).init(ENUM.tips);
]
}).init(ENUM.tips);
//grid
var g = new common.grid({
... ... @@ -204,10 +205,10 @@ var ENUM={
var item=g.rows[$(this).data("index")];
var data=function(){
return {
id:item.id,
status:1,
operations:reason
};
id:item.id,
status:1,
operations:reason
};
}
Bll.definetoast("您确定要通过该申请吗?",data,function(){
return {auditTime:item.limitDateFrom};
... ...
... ... @@ -12,9 +12,11 @@ require('../common/bootstrap-wysihtml5');
require('../util/datepicker');
require('../util/wangEditor');
var uploadImg = new edit('#coverImgBox');
//
uploadImg.init();
// var uploadImg = new edit('#coverImgBox');
// //
// uploadImg.init();
/*var editor = new wangEditor('editor-container');
editor.config.menus = [
... ...
... ... @@ -4,22 +4,48 @@
*/
var $ = require('jquery');
var $ = require('jquery'),
common=require('../common/common');
var edit = require('../common/edit');
var grid=require('../common/grid');
var baseNum = 1;
var ENUM={
status:{0:'待审核',1:'审核通过',2:'驳回',3:'过期',4:'作废'},//全部
tips:{"salenum":0,"notsalenum":0,"hotnum":0,"nothotnum":0,"all":0}
}
var t = new common.tab({
el:"#basicTab",
click:function(){
tableGird.reload();
},
columns:[
{name:"salenum", key: "saleFlag", value: "1", display:"已发售({salenum})"},
{name:"notsalenum", key: "saleFlag", value: "0", display:"未发售({notsalenum})"},
{name:"hotnum", key: "hotFlag", value: "1", display:"热门({hotnum})"},
{name:"nothotnum", key: "hotFlag", value: "0", display:"非热门({nothotnum})"},
{name:"all",display:"全部({all})"}
]
}).init(ENUM.tips);
var tableGird = new grid({
el:"#limit-table-box",
parms:function(){
//todo
return {
//id: window.categoryId * baseNum
};
var obj = {
productName:common.util.__input("product-name"),
productSkn:common.util.__input("skn"),
hotFlag: $('input[name="hotFlag"]:checked').val(),
saleFlag: $('input[name="saleFlag"]:checked').val(),
showFlag: $('input[name="showFlag"]:checked').val()
}
if (t.key) {
obj[t.key] = t.value;
}
return obj;
},
columns:[
{
... ... @@ -69,10 +95,10 @@ var tableGird = new grid({
name:"inventory"
}, {
display:"是否发售",
name:"isSale",
name:"saleFlag",
render:function(items){
if (items.isSale) {
if (items.saleFlag) {
return '是';
} else {
return '否';
... ... @@ -80,10 +106,10 @@ var tableGird = new grid({
}
}, {
display:"是否热门",
name:"isHot",
name:"hotFlag",
render:function(items){
if (items.isHot) {
if (items.hotFlag) {
return '是';
} else {
return '否';
... ... @@ -91,25 +117,133 @@ var tableGird = new grid({
}
}, {
display:"是否开启",
name:"isOpen",
name:"showFlag",
render:function(items){
if (items.isOpen) {
if (items.showFlag) {
return '是';
} else {
return '否';
}
}
}, {
display:"操作",
name:"skn",
render:function(items){
var HtmArr=[];
if (items.showFlag) {
HtmArr.push('<a href="javascript:;" data-id="' + items.id + '" class="btn btn-info btn-xs close-btn">关闭</a>');
} else {
HtmArr.push('<a href="javascript:;" data-id="' + items.id + '" class="btn btn-info btn-xs open-btn">开启</a>');
}
if (items.hotFlag) {
HtmArr.push('<a href="javascript:;" data-id="' + items.id + '" class="btn btn-warning btn-xs hot-cancel">取消热门</a>');
} else {
HtmArr.push('<a href="javascript:;" data-id="' + items.id + '" class="btn btn-warning btn-xs hot-btn">设为热门</a>');
}
HtmArr.push('<a href="/limit/edit/' + items.id + '" data-id="' + items.id + '" class="btn btn-info btn-xs">编辑</a>');
HtmArr.push('<a href="javascript:;" data-id="' + items.id + '" class="btn btn-danger btn-xs delete-btn">删除</a>');
return HtmArr.join('');
}
}
]
});
console.log('11');
tableGird.init('/limit/product/page');
var loadtab=function(){
t.active=undefined;
setTimeout(function(){
common.util.__ajax({
url:'/limit/ajax/getCodeCount',
data:tableGird.options.parms()
},function(res){
for(var key in res.data){
ENUM.tips[key]=res.data[key];
}
t.init(ENUM.tips);
},true);
},400);
}
loadtab();
$("#filter-btn").click(function(){
loadtab();
tableGird.reload();
});
//开启商品
$('#limit-table-box').on('click', '.open-btn', function() {
var param = {
id: $(this).data('id'),
showFlag: '1'
}
common.util.__ajax({
url:'/limit/audit',
data:param
},function(res){
tableGird.reload();
});
});
//关闭商品
$('#limit-table-box').on('click', '.close-btn', function() {
var param = {
id: $(this).data('id'),
showFlag: '0'
}
common.util.__ajax({
url:'/limit/audit',
data:param
},function(res){
tableGird.reload();
});
});
//设为热门
$('#limit-table-box').on('click', '.hot-btn', function() {
var param = {
id: $(this).data('id'),
hotFlag: 1
}
common.util.__ajax({
url:'/limit/audit',
data:param
},function(res){
tableGird.reload();
});
});
//取消热门
$('#limit-table-box').on('click', '.hot-cancel', function() {
var param = {
id: $(this).data('id'),
hotFlag: 0
}
common.util.__ajax({
url:'/limit/audit',
data:param
},function(res){
tableGird.reload();
});
});
//删除商品
$('#limit-table-box').on('click', '.delete-btn', function() {
var param = {
id: $(this).data('id')
}
common.util.__ajax({
url:'/limit/delete',
data:param
},function(res){
tableGird.reload();
});
});
tableGird.init('/limit/product/page');
\ No newline at end of file
... ...
ul{margin-top:0}.admin-icon-yellow{color:#ffbe40}.admin-header{font-size:1.4rem;margin-bottom:0}.admin-header-list a:hover :after{content:none}.admin-main{background:#f3f3f3}.admin-menu{position:fixed;z-index:10;bottom:30px;right:20px}.admin-sidebar{width:260px;min-height:100%;float:left;border-right:1px solid #cecece}.admin-sidebar-list{margin-bottom:0}.admin-sidebar-list li a{color:#5c5c5c;padding-left:24px}.admin-sidebar-list li:first-child{border-top:none}.admin-sidebar-sub{margin-top:0;margin-bottom:0;box-shadow:0 16px 8px -15px #e2e2e2 inset;background:#ececec;padding-left:24px}.admin-sidebar-sub li:first-child{border-top:1px solid #dedede}.admin-sidebar-panel{margin:10px}.admin-content{width:auto;overflow:hidden;height:100%;background:#fff}.admin-content-list{border:1px solid #e9ecf1;margin-top:0}.admin-content-list li{border:1px solid #e9ecf1;border-width:0 1px;margin-left:-1px}.admin-content-list li:first-child{border-left:none}.admin-content-list li:last-child{border-right:none}.admin-content-table a{color:#535353}.admin-content-file{margin-bottom:0;color:#666}.admin-content-file p{margin:0 0 5px 0;font-size:1.4rem}.admin-content-file li{padding:10px 0}.admin-content-file li:first-child{border-top:none}.admin-content-file li:last-child{border-bottom:none}.admin-content-file li .am-progress{margin-bottom:4px}.admin-content-file li .am-progress-bar{line-height:14px}.admin-content-task{margin-bottom:0}.admin-content-task li{padding:5px 0;border-color:#eee}.admin-content-task li:first-child{border-top:none}.admin-content-task li:last-child{border-bottom:none}.admin-task-meta{font-size:1.2rem;color:#999}.admin-task-bd{font-size:1.4rem;margin-bottom:5px}.admin-content-comment{margin-bottom:0}.admin-content-comment .am-comment-bd{font-size:1.4rem}.admin-content-pagination{margin-bottom:0}.admin-content-pagination li a{padding:4px 8px}@media only screen and (min-width: 641px){.admin-sidebar{display:block;position:static;background:none}.admin-offcanvas-bar{position:static;width:auto;background:none;-webkit-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.admin-offcanvas-bar:after{content:none}}@media only screen and (max-width: 640px){.admin-sidebar{width:inherit}.admin-offcanvas-bar{background:#f3f3f3}.admin-offcanvas-bar:after{background:#BABABA}.admin-sidebar-list a:hover,.admin-sidebar-list a:active{-webkit-transition:background-color 0.3s ease;transition:background-color 0.3s ease;background:#E4E4E4}.admin-content-list li{padding:10px;border-width:1px 0;margin-top:-1px}.admin-content-list li:first-child{border-top:none}.admin-content-list li:last-child{border-bottom:none}.admin-form-text{text-align:left !important}}.user-info{margin-bottom:15px}.user-info .am-progress{margin-bottom:4px}.user-info p{margin:5px}.user-info-order{font-size:1.4rem}.error-log .am-pre-scrollable{max-height:40rem}.table-main{font-size:1.4rem;padding:.5rem}.table-main button{background:#fff}.table-check{width:30px}.table-id{width:50px}@media only screen and (max-width: 640px){.table-select{margin-top:10px;margin-left:5px}}.gallery-list li{padding:10px}.gallery-list a{color:#666}.gallery-list a:hover{color:#3bb4f2}.gallery-title{margin-top:6px;font-size:1.4rem}.gallery-desc{font-size:1.2rem;margin-top:4px}.page-404{background:#fff;border:none;width:200px;margin:0 auto}.fixed-layout,.fixed-layout body{height:100%;overflow:hidden}.fixed-layout .admin-header{position:fixed;top:0;left:0;right:0;z-index:1500}.fixed-layout .admin-main{position:relative;height:100%;padding-top:51px}.fixed-layout .admin-content,.fixed-layout .admin-sidebar{height:100%;overflow-x:hidden;overflow-y:scroll}.fixed-layout .admin-sidebar.am-active{z-index:1600}input[type=file]{display:block;opacity:0;height:60px;width:100px;position:absolute;z-index:99}.form-horizontal .form-group{margin-left:0px;margin-right:0px}.datepicker{display:none;position:absolute;padding:4px;margin-top:1px;direction:ltr}.datepicker.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;list-style:none;background-color:#fff;border:1px solid rgba(0,0,0,0.2);border-radius:5px;box-shadow:0 5px 10px rgba(0,0,0,0.2);background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px;color:#333;font-size:13px;line-height:18px}.datepicker.dropdown-menu th{padding:4px 5px}.datepicker.dropdown-menu td{padding:4px 5px}.datepicker table{border:0;margin:0;width:auto}.datepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer}.datepicker td{text-align:center;width:20px;height:20px;border:0;font-size:12px;padding:4px 8px;background:#fff;cursor:pointer}.datepicker td.active.day,.datepicker td.active.year{background:#2ba6cb}.datepicker td.old,.datepicker td.new{color:#999}.datepicker td span.active{background:#2ba6cb}.datepicker td.day.disabled{color:#ccc}.datepicker th{text-align:center;width:20px;height:20px;border:0;font-size:12px;padding:4px 8px;background:#fff;cursor:pointer}.datepicker th.active.day,.datepicker th.active.year{background:#2ba6cb}.datepicker th.date-switch{width:145px}.datepicker th span.active{background:#2ba6cb}.datepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.datepicker.days div.datepicker-days{display:block}.datepicker.months div.datepicker-months{display:block}.datepicker.years div.datepicker-years{display:block}.datepicker thead tr:first-child th{cursor:pointer}.datepicker thead tr:first-child th.cw{cursor:default;background-color:transparent}.datepicker tfoot tr:first-child th{cursor:pointer}.datepicker-inline{width:220px}.datepicker-rtl{direction:rtl}.datepicker-rtl table tr td span{float:right}.datepicker-dropdown{top:0;left:0}.datepicker-dropdown:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:1px solid rgba(0,0,0,0.2);position:absolute;top:-7px;left:6px}.datepicker-dropdown:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.datepicker>div,.datepicker-dropdown::before,.datepicker-dropdown::after{display:none}.datepicker-close{position:absolute;top:-30px;right:0;width:15px;height:30px;padding:0;display:none}.table-striped .datepicker table tr td,.table-striped .datepicker table tr th{background-color:transparent}.panel-default .panel-heading{border-top:1px solid #e7e7e7}.red{color:red;font-family:bold}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:0 !important}.show-grid{padding:10px}.brandBtn-group{width:150px;float:left;margin-right:8px}.brandBtn-group-lg{width:280px}.contentpanel td a{margin:0 3px}.mainwrapper .toggle-table tr{cursor:pointer}.mainwrapper .toggle-table tr.level1 td:nth-of-type(1){text-indent:2px}.mainwrapper .toggle-table tr.level2 td:nth-of-type(1){text-indent:15px}.mainwrapper .toggle-table tr.level3 td:nth-of-type(1){text-indent:30px}.pattrscroll{background:#F7F7F7}.pattrscroll ul{padding-left:0}.pattrscroll li{cursor:pointer}.mainwrapper .list-group-item.level1{text-indent:2px}.mainwrapper .list-group-item.level2{text-indent:15px}.mainwrapper .list-group-item.level3{text-indent:30px}.attr-item-active{background:#428bca;color:#fff}.pannel-scroll{height:500px;overflow-y:scroll;overflow-x:hidden}.attr-select{display:block;height:40px;line-height:40px;border:1px solid #ccc;border-radius:3px}#limit-table-box table{vertical-align:middle}#limit-table-box table th,#limit-table-box table td{text-align:center;vertical-align:middle}#limit-table-box table div.checkbox label{height:13px}#limit-table-box table .cover-img{width:100px}#limit-table-box table .width50{width:50px;text-align:center}.height40{height:40px;line-height:40px}.edit-cover-img{width:100px;margin:0 15px;float:left}.quota-text,.quota-img,.quota-video{width:300px;margin-bottom:15px}.quota-text img,.quota-img img,.quota-video img{width:100%}#text-editor{width:100%;max-width:100%;min-width:100%;height:300px;max-height:300px;min-height:300px}.product-detail input[type="text"]{width:100px}.main-table{-display:none}.bulk-import{display:none}#upload-input{display:inline-block;position:static;opacity:1;width:auto;height:auto}.excel-model{display:inline-block;width:110px;height:48px;line-height:48px;padding:0 0 0 50px;margin:0 200px;background:url(../images/excel.png) no-repeat left center}.panel-input{display:inline-block;width:100%}.panel-col,.panel-col2{float:left;width:150px;margin:0 10px}.panel-col2{width:280px}
ul{margin-top:0}.admin-icon-yellow{color:#ffbe40}.admin-header{font-size:1.4rem;margin-bottom:0}.admin-header-list a:hover :after{content:none}.admin-main{background:#f3f3f3}.admin-menu{position:fixed;z-index:10;bottom:30px;right:20px}.admin-sidebar{width:260px;min-height:100%;float:left;border-right:1px solid #cecece}.admin-sidebar-list{margin-bottom:0}.admin-sidebar-list li a{color:#5c5c5c;padding-left:24px}.admin-sidebar-list li:first-child{border-top:none}.admin-sidebar-sub{margin-top:0;margin-bottom:0;box-shadow:0 16px 8px -15px #e2e2e2 inset;background:#ececec;padding-left:24px}.admin-sidebar-sub li:first-child{border-top:1px solid #dedede}.admin-sidebar-panel{margin:10px}.admin-content{width:auto;overflow:hidden;height:100%;background:#fff}.admin-content-list{border:1px solid #e9ecf1;margin-top:0}.admin-content-list li{border:1px solid #e9ecf1;border-width:0 1px;margin-left:-1px}.admin-content-list li:first-child{border-left:none}.admin-content-list li:last-child{border-right:none}.admin-content-table a{color:#535353}.admin-content-file{margin-bottom:0;color:#666}.admin-content-file p{margin:0 0 5px 0;font-size:1.4rem}.admin-content-file li{padding:10px 0}.admin-content-file li:first-child{border-top:none}.admin-content-file li:last-child{border-bottom:none}.admin-content-file li .am-progress{margin-bottom:4px}.admin-content-file li .am-progress-bar{line-height:14px}.admin-content-task{margin-bottom:0}.admin-content-task li{padding:5px 0;border-color:#eee}.admin-content-task li:first-child{border-top:none}.admin-content-task li:last-child{border-bottom:none}.admin-task-meta{font-size:1.2rem;color:#999}.admin-task-bd{font-size:1.4rem;margin-bottom:5px}.admin-content-comment{margin-bottom:0}.admin-content-comment .am-comment-bd{font-size:1.4rem}.admin-content-pagination{margin-bottom:0}.admin-content-pagination li a{padding:4px 8px}@media only screen and (min-width: 641px){.admin-sidebar{display:block;position:static;background:none}.admin-offcanvas-bar{position:static;width:auto;background:none;-webkit-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.admin-offcanvas-bar:after{content:none}}@media only screen and (max-width: 640px){.admin-sidebar{width:inherit}.admin-offcanvas-bar{background:#f3f3f3}.admin-offcanvas-bar:after{background:#BABABA}.admin-sidebar-list a:hover,.admin-sidebar-list a:active{-webkit-transition:background-color .3s ease;transition:background-color .3s ease;background:#E4E4E4}.admin-content-list li{padding:10px;border-width:1px 0;margin-top:-1px}.admin-content-list li:first-child{border-top:none}.admin-content-list li:last-child{border-bottom:none}.admin-form-text{text-align:left !important}}.user-info{margin-bottom:15px}.user-info .am-progress{margin-bottom:4px}.user-info p{margin:5px}.user-info-order{font-size:1.4rem}.error-log .am-pre-scrollable{max-height:40rem}.table-main{font-size:1.4rem;padding:.5rem}.table-main button{background:#fff}.table-check{width:30px}.table-id{width:50px}@media only screen and (max-width: 640px){.table-select{margin-top:10px;margin-left:5px}}.gallery-list li{padding:10px}.gallery-list a{color:#666}.gallery-list a:hover{color:#3bb4f2}.gallery-title{margin-top:6px;font-size:1.4rem}.gallery-desc{font-size:1.2rem;margin-top:4px}.page-404{background:#fff;border:none;width:200px;margin:0 auto}.fixed-layout,.fixed-layout body{height:100%;overflow:hidden}.fixed-layout .admin-header{position:fixed;top:0;left:0;right:0;z-index:1500}.fixed-layout .admin-main{position:relative;height:100%;padding-top:51px}.fixed-layout .admin-content,.fixed-layout .admin-sidebar{height:100%;overflow-x:hidden;overflow-y:scroll}.fixed-layout .admin-sidebar.am-active{z-index:1600}input[type=file]{display:block;opacity:0;height:60px;width:100px;position:absolute;z-index:99}.form-horizontal .form-group{margin-left:0px;margin-right:0px}.datepicker{display:none;position:absolute;padding:4px;margin-top:1px;direction:ltr}.datepicker.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;list-style:none;background-color:#fff;border:1px solid rgba(0,0,0,0.2);border-radius:5px;box-shadow:0 5px 10px rgba(0,0,0,0.2);background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px;color:#333;font-size:13px;line-height:18px}.datepicker.dropdown-menu th{padding:4px 5px}.datepicker.dropdown-menu td{padding:4px 5px}.datepicker table{border:0;margin:0;width:auto}.datepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer}.datepicker td{text-align:center;width:20px;height:20px;border:0;font-size:12px;padding:4px 8px;background:#fff;cursor:pointer}.datepicker td.active.day,.datepicker td.active.year{background:#2ba6cb}.datepicker td.old,.datepicker td.new{color:#999}.datepicker td span.active{background:#2ba6cb}.datepicker td.day.disabled{color:#ccc}.datepicker th{text-align:center;width:20px;height:20px;border:0;font-size:12px;padding:4px 8px;background:#fff;cursor:pointer}.datepicker th.active.day,.datepicker th.active.year{background:#2ba6cb}.datepicker th.date-switch{width:145px}.datepicker th span.active{background:#2ba6cb}.datepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.datepicker.days div.datepicker-days{display:block}.datepicker.months div.datepicker-months{display:block}.datepicker.years div.datepicker-years{display:block}.datepicker thead tr:first-child th{cursor:pointer}.datepicker thead tr:first-child th.cw{cursor:default;background-color:transparent}.datepicker tfoot tr:first-child th{cursor:pointer}.datepicker-inline{width:220px}.datepicker-rtl{direction:rtl}.datepicker-rtl table tr td span{float:right}.datepicker-dropdown{top:0;left:0}.datepicker-dropdown:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:1px solid rgba(0,0,0,0.2);position:absolute;top:-7px;left:6px}.datepicker-dropdown:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.datepicker>div,.datepicker-dropdown::before,.datepicker-dropdown::after{display:none}.datepicker-close{position:absolute;top:-30px;right:0;width:15px;height:30px;padding:0;display:none}.table-striped .datepicker table tr td,.table-striped .datepicker table tr th{background-color:transparent}.panel-default .panel-heading{border-top:1px solid #e7e7e7}.red{color:red;font-family:bold}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:0 !important}.show-grid{padding:10px}.brandBtn-group{width:150px;float:left;margin-right:8px}.brandBtn-group-lg{width:280px}.contentpanel td a{margin:0 3px}.mainwrapper .toggle-table tr{cursor:pointer}.mainwrapper .toggle-table tr.level1 td:nth-of-type(1){text-indent:2px}.mainwrapper .toggle-table tr.level2 td:nth-of-type(1){text-indent:15px}.mainwrapper .toggle-table tr.level3 td:nth-of-type(1){text-indent:30px}.pattrscroll{background:#F7F7F7}.pattrscroll ul{padding-left:0}.pattrscroll li{cursor:pointer}.mainwrapper .list-group-item.level1{text-indent:2px}.mainwrapper .list-group-item.level2{text-indent:15px}.mainwrapper .list-group-item.level3{text-indent:30px}.attr-item-active{background:#428bca;color:#fff}.pannel-scroll{height:500px;overflow-y:scroll;overflow-x:hidden}.attr-select{display:block;height:40px;line-height:40px;border:1px solid #ccc;border-radius:3px}#limit-table-box table{vertical-align:middle}#limit-table-box table th,#limit-table-box table td{text-align:center;vertical-align:middle}#limit-table-box table div.checkbox label{height:13px}#limit-table-box table .cover-img{width:100px}#limit-table-box table .width50{width:50px;text-align:center}.height40{height:40px;line-height:40px}.edit-cover-img{width:100px;margin:0 15px;float:left}.quota-text,.quota-img,.quota-video{width:300px;margin-bottom:15px}.quota-text img,.quota-img img,.quota-video img{width:100%}#text-editor{width:100%;max-width:100%;min-width:100%;height:300px;max-height:300px;min-height:300px}.product-detail input[type="text"]{width:100px}.main-table{-display:none}.bulk-import{display:none}#upload-input{display:inline-block;position:static;opacity:1;width:auto;height:auto}.excel-model{display:inline-block;width:110px;height:48px;line-height:48px;padding:0 0 0 50px;margin:0 200px;background:url(../images/excel.png) no-repeat left center}.panel-input{display:inline-block;width:100%}.panel-col,.panel-col2{float:left;width:150px;margin:0 10px}.panel-col2{width:280px}
... ...
... ... @@ -16,14 +16,42 @@ exports.res = [
route: '/limit/product/page',
method: 'POST',
url: '/limitProduct/getLimitProductList',
isJsonRaw:true
isJsonRaw:true,
params: [
{
name: 'hotFlag',
type: 'Number'
},{
name: 'saleFlag',
type: 'Number'
},{
name: 'showFlag',
type: 'Number'
},{
name: 'productName',
type: 'String'
},{
name: 'productSkn',
type: 'String'
},{
name: 'page',
type: 'Number'
},{
name: 'size',
type: 'Number'
}
]
},{
// 【限购商品】添加页面渲染
route: '/limit/product/add',
method: 'GET',
view: 'pages/limit/add',
src: '/product/limit-add',
isJsonRaw:true
noApi: true,
data: {
data: {}
}
},{
// 【限购商品】ajax添加
route: '/limit/product/new',
... ... @@ -52,5 +80,98 @@ exports.res = [
type: 'Number'
}
]
}
}, {
route: '/limit/edit/:id',
method: 'GET',
view: 'pages/limit/add',
url: '/limitProduct/getLimitProduct',
isJsonRaw:true,
data:{
action:"/limit/update",
type:"update"
},
src:'/product/limit-add',
params:[
{name:"id",type:"String"}
]
}, {
route: '/limit/update',
method: 'POST',
url: '/limitProduct/updateLimitProduct',
isJsonRaw: true,
params: [
{
name: 'attachmentContent',
type: 'String'
},
{
name: 'batchNo',
type: 'Number'
},{
name: 'saleTime',
type: 'String'
},{
name: 'hotFlag',
type: 'Number'
},{
name:'orderBy',
type: 'Number'
},{
name: 'notSaleOrderBy',
type: 'Number'
}
]
}, {
route: '/limit/ajax/getCodeCount',
method: 'POST',
url: '/limitProduct/getCountByStatus',
isJsonRaw: true,
params: [
{
name: 'hotFlag',
type: 'Number'
},{
name: 'saleFlag',
type: 'Number'
},{
name: 'showFlag',
type: 'Number'
},{
name: 'productName',
type: 'String'
},{
name: 'productSkn',
type: 'String'
}
]
}, {
route: '/limit/audit',
method: 'POST',
url: '/limitProduct/auditLimitProduct',
isJsonRaw: true,
params: [
{
name: 'id',
type: 'Number'
},
{
name: 'showFlag',
type: 'String'
},{
name: 'hotFlag',
type: 'Number'
}
]
}, {
route: '/limit/delete',
method: 'POST',
url: '/limitProduct/deleteLimitProduct',
isJsonRaw: true,
params: [
{
name: 'id',
type: 'Number'
}
]
}
];
... ...
... ... @@ -18,6 +18,7 @@
<div class="contentpanel">
<form id="limit-add-form" action="/limit/product/new">
{{# data}}
<div class="panel-group">
<div class="pannel">
<div class="panel-heading">
... ... @@ -28,19 +29,19 @@
<div class="row">
<div class="col-md-1 height40"><label>商品名称*:</label></div>
<div class="col-md-1">
<input id="productName" type="text" class="form-control" style="width:280px;" placeholder="商品名称" required>
<input id="productName" value="{{productName}}" type="text" class="form-control" style="width:280px;" placeholder="商品名称" required>
</div>
</div>
<div class="row">
<div class="col-md-1 height40"><label>限购码批次*:</label></div>
<div class="col-md-1">
<input id="batchNo" type="text" class="form-control" style="width:280px;" placeholder="限购码批次" required>
<input id="batchNo" value="{{batchNo}}" type="text" class="form-control" style="width:280px;" placeholder="限购码批次" required>
</div>
</div>
<div class="row mt20">
<div class="col-md-1 height40"><label>发售日期*:</label></div>
<div class="col-md-1">
<input id="saleTime" type="text" class="form-control" style="width:280px;" placeholder="发售日期" readonly required>
<input id="saleTime" value="{{saleTime}}" type="text" class="form-control" style="width:280px;" placeholder="发售日期" readonly required>
</div>
</div>
</div>
... ... @@ -61,12 +62,12 @@
</div>
<div class="col-md-3 height40">
<label>热门发售排序:</label>
<label><input id="orderBy" type="text" class="form-control" placeholder=""></label>
<label><input id="orderBy" value="{{orderBy}}" type="text" class="form-control" placeholder=""></label>
<p>(提示:数字越大越靠前)</p>
</div>
<div class="col-md-3 height40">
<label>未发售排序:</label>
<label><input id="notSaleOrderBy" type="text" class="form-control" placeholder=""></label>
<label><input id="notSaleOrderBy" value="{{notSaleOrderBy}}" type="text" class="form-control" placeholder=""></label>
</div>
</div>
</div>
... ... @@ -80,13 +81,15 @@
</div>
<div class="panel-collapse collapse in">
<div class="panel-body">
<div class="row mb20">
<h6><label>封面图*:</label></h6>
<div class="col-md-1" id="coverImgBox">
<input type="file" name="coverImg" id="coverImg" placeholder="封面图" required/>
<input type="file" name="coverImg" id="coverImg" placeholder="" required/>
</div>
</div>
<div class="row mb20">
<div class="col-md-12">
<div class="quota-text"></div>
... ... @@ -113,6 +116,7 @@
</div>
</div>
</div>
{{/ data}}
</form>
</div>
... ...
... ... @@ -22,22 +22,16 @@
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-3">
<label class="control-label pull-left">关键词:</label>
<div class="label-leading pull-left">
<input class="form-control" type="text" />
</div>
</div>
<div class="col-md-2">
<label class="control-label pull-left">名称:</label>
<div class="label-leading pull-left">
<input class="form-control" type="text"/>
<input id="product-name" class="form-control" type="text"/>
</div>
</div>
<div class="col-md-2">
<label class="control-label pull-left">SKN:</label>
<div class="label-leading pull-left">
<input class="form-control" type="text"/>
<input id="skn" class="form-control" type="text"/>
</div>
</div>
... ... @@ -46,41 +40,30 @@
<div class="col-md-2">
<label class="control-label pull-left">热门:</label>
<div class="label-leading pull-left">
<div class="radio pull-left" style="margin: 0 10px;">
<label><input type="radio" name="hot" value="" checked=""></label>
</div>
<div class="radio pull-left" style="margin: 0 10px;">
<label><input type="radio" name="hot" value=""></label>
</div>
<label class="radio-inline"><input type="radio" name="hotFlag" value="1"></label>
<label class="radio-inline"><input type="radio" name="hotFlag" value="0"></label>
<input type="hidden" id="hotFlag" value="">
</div>
</div>
<div class="col-md-2">
<label class="control-label pull-left">是否发售:</label>
<div class="label-leading pull-left">
<div class="radio pull-left" style="margin: 0 10px;">
<label><input type="radio" name="isSale" value="" checked=""></label>
</div>
<div class="radio pull-left" style="margin: 0 10px;">
<label><input type="radio" name="isSale" value=""></label>
</div>
<label class="radio-inline"><input type="radio" name="saleFlag" value="1"></label>
<label class="radio-inline"><input type="radio" name="saleFlag" value="0"></label>
</div>
</div>
<div class="col-md-2">
<label class="control-label pull-left">是否开启:</label>
<div class="label-leading pull-left">
<div class="radio pull-left" style="margin: 0 10px;">
<label><input type="radio" name="isOpen" value="" checked=""></label>
</div>
<div class="radio pull-left" style="margin: 0 10px;">
<label><input type="radio" name="isOpen" value=""></label>
</div>
<label class="radio-inline"><input type="radio" name="showFlag" value="1"></label>
<label class="radio-inline"><input type="radio" name="showFlag" value="0"></label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 mt20">
<button class="btn btn-primary pull-left mr20">筛选</button>
<button class="btn btn-primary pull-left mr20">全部</button>
<button id="filter-btn" class="btn btn-primary pull-left mr20">筛选</button>
<a class="btn btn-primary pull-left mr20" href="">全部</a>
</div>
</div>
</div>
... ... @@ -88,6 +71,7 @@
<div class="row">
<div class="col-md-12 mt20">
<div class="dataTab_wrapper" id="basicTab"></div>
<div id="limit-table-box" class="table-responsive"></div>
</div>
</div>
... ...