Authored by dongjunjie

店铺装修校验

... ... @@ -47,7 +47,7 @@ var g = new common.grid({
display: "包含品牌",
name: "brands",
render: function(item) {
console.log(item);
//console.log(item);
if (item.brands instanceof Array && item.brands.length > 0) {
var html = '';
$.each(item.brands, function(i, value) {
... ... @@ -98,6 +98,10 @@ var g = new common.grid({
}else{
HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.id+'/'+item.templateId+'/'+item.shopsType+'/editor/" class="btn btn-success btn-xs">装修编辑</a>');
}
if (item.checkStatus == 900) {
HtmArr.push('<a href="javascript:void(0)" class="btn btn-warning btn-xs commentBtn" data-comment="'+item.comment+'">驳回理由</a>');
}
return HtmArr.join('');
}
}]
... ... @@ -108,4 +112,15 @@ g.init($("#gridurl").val());
// 筛选
$(document).on('click', "#filter-btn", function() {
g.reload();
});
//查看驳回理由
$(document).on('click', ".commentBtn", function() {
var comment = $(this).attr("data-comment");
common.dialog.confirm(
"查看驳回理由",
comment,
function(){},
function(){}
);
});
\ No newline at end of file
... ...
... ... @@ -106,13 +106,13 @@ function getParams(){
shopOperate = paramList[4];
}
if(shopOperate == 'editor'){
$(".moduleTypeSelect").show();
$(".moduleTypeSelect").show().find("#templateSelect").removeAttr("disabled");
$(".moduleSubmite").show().siblings().hide();
}else if(shopOperate == 'view'){
$(".moduleTypeSelect").hide();
$(".moduleView").show().siblings().hide();
}else if(shopOperate == 'check'){
$(".moduleTypeSelect").hide();
$(".moduleTypeSelect").show().find("#templateSelect").attr("disabled","disabled");
$(".moduleCheck").show().siblings().hide();
}
}
... ... @@ -142,11 +142,14 @@ function editorIconEvent(title,id){
title,
"<div class='editorTitle'></div><div class='editor-dialog' id='"+ id +"'></div><div class='editorTip'></div> ",
function(){
if(!(curDialogId == "editor-largePic-app" || curDialogId == "editor-recommend-app" || curDialogId == "editor-brand-app")){
freshJson(id, g.__rows, 1);
if(editorCheck(id)){
if(!(curDialogId == "editor-largePic-app" || curDialogId == "editor-recommend-app" || curDialogId == "editor-brand-app")){
freshJson(id, g.__rows, 1);
}
showMain();
}else{
return false;
}
showMain();
//return false;
},
function(){
if(!(curDialogId == "editor-largePic-app" || curDialogId == "editor-recommend-app" || curDialogId == "editor-brand-app")){
... ... @@ -154,7 +157,6 @@ function editorIconEvent(title,id){
}
}
);
gridInit(id);
untilEditorEvent(id);
editorTipInit(id);
... ... @@ -202,7 +204,6 @@ function findTopNewProducts(){
"size": 20
}
},function(rs){
console.log(rs.data);
topNewProducts = rs.data;
},true);
}
... ... @@ -239,125 +240,26 @@ function saveDecoration(submitStatus){
});
}
//Ajax审核
function checkDecoration(checkStatus){
common.util.__ajax({
url:'/store/shop-decoration-check',
data: {
"id": _id,
"checkStatus": checkStatus
}
},function(rs){});
}
/********************事件绑定*********************/
//pc跟app的tab选项事件
$(document).on("click",".tabheader .nav-tabs li",function(){
$(this).addClass('active').siblings('li').removeClass('active');
curPlatform = $(this).attr("data-toggle");
if(curPlatform == "shopWeb-app"){
$(".moduleTypeView").hide();
}else{
$(".moduleTypeView").show();
}
showMain();
})
//基础模板,经典模板切换
$(document).on("click","input[name=brandLevel]",function(){
curTemplateType = $("input[name=brandLevel]:checked").val();
showMain();
})
//选择使用模板
$(document).on("change","#templateSelect",function(){
jsonMain.templateName = $(this).val();
})
//暂存模板
$(document).on("click","#saveModule",function(){
if(jsonMain.templateName == "0"){
alert("请选择展示使用模板!");
return;
}
saveDecoration(100);
})
//提交审核
$(document).on("click","#submitModule",function(){
if(jsonMain.templateName == "0"){
alert("请选择展示使用模板!");
return;
}
saveDecoration(200);
})
//审核通过
$(document).on("click","#checkOk",function(){
checkDecoration(300);
})
//驳回
$(document).on("click","#checkNo",function(){
checkDecoration(900);
})
//删除
$(document).on("click",".deleteBtn",function(){
var _index = $(this).data("index")+"";
var indexList = _index.split("_");
if(indexList.length > 1){
[].splice.call(g.__rows[indexList[0]].data,indexList[1],1);
}else{
[].splice.call(g.__rows,indexList[0],1);
}
g.init(g.__rows);
untilEditorEvent(curDialogId);
if(curDialogId == "editor-newProduct" || curDialogId == "editor-hotProduct"){
productTopDataLink(g.__rows);
}
});
//添加一条
$(document).on("click",".addBtn",function(){
var _index = $(this).data("index")+"";
var indexList = _index.split("_");
if(indexList.length > 1){
g.__rows[indexList[0]].data.push($.extend({},ENUM[curDialogId]));
}else{
g.__rows.push($.extend({},ENUM[curDialogId]));
}
g.init(g.__rows);
untilEditorEvent(curDialogId);
});
//input change同时更新json
$(document).on("change",".inputChange",function(){
var _index = $(this).attr("data-index");
var indexList = _index.split("_");
var _name = $(this).attr("name");
if(indexList.length > 1){
(g.__rows[indexList[0]].data)[indexList[1]][_name] = $(this).val();
}else{
g.__rows[indexList[0]][_name] = $(this).val();
}
});
//选择Top20
$(document).on("click",".topAdd",function(){
if(g.__rows.length < 8){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
var item = $.extend({},ENUM[curDialogId]);
item.src = $(this).find('img').attr("src");
item.productId = $(this).attr("data-productId");
item.productName = $(this).attr("data-productName");
item.productPrice = $(this).attr("data-productPrice");
g.__rows.push(item);
g.init(g.__rows);
untilEditorEvent(curDialogId);
$(".topTip span").text("已经勾选"+ g.__rows.length +"件,最多勾选8件商品!");
}
function checkDecoration(checkStatus,comment){
if(comment){
common.util.__ajax({
url:'/store/shop-decoration-check',
data: {
"id": _id,
"checkStatus": checkStatus,
"comment": comment
}
},function(rs){});
}else{
$(".topTip span").text("商品数量已满8个,无法继续添加商品!");
common.util.__ajax({
url:'/store/shop-decoration-check',
data: {
"id": _id,
"checkStatus": checkStatus
}
},function(rs){});
}
});
}
/********************工具类*********************/
... ... @@ -458,6 +360,7 @@ function gridInit(id){
el:"#"+id,
columns:[
{display:"排序", render:function(item){
item.position=item.position || (item.__index+1);
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
}},
{display:"名称", render:function(item){
... ... @@ -467,11 +370,18 @@ function gridInit(id){
return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />";
}},
{display:"操作", render:function(item){
var html = "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
if(item.__index == g.__rows.length-1){
html += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
var htmlPic = "",i=item.__index;
if(i == (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
}
return html;
if(i < (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
}
if(i == (g.__rows.length-1) && g.__rows.length == 1){
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";
}
return htmlPic;
}}
]
});
... ... @@ -486,6 +396,7 @@ function gridInit(id){
el:"#"+id,
columns:[
{display:"排序", render:function(item){
item.position=item.position || (item.__index+1);
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
}},
{display:"名称", render:function(item){
... ... @@ -500,17 +411,24 @@ function gridInit(id){
}},
{display:"APP展示", render:function(item){
if(item.isShowInApp == "Y"){
return "<input class='form-control' type=checkBox name='isShowInApp' value='"+item.isShowInApp+"' checked />";
return "<input class='form-control checkBoxChange' type=checkBox name='isShowInApp' data-index='"+item.__index+"' checked />";
}else{
return "<input class='form-control' type=checkBox name='isShowInApp' value='"+item.isShowInApp+"' />";
return "<input class='form-control checkBoxChange' type=checkBox name='isShowInApp' data-index='"+item.__index+"' />";
}
}},
{display:"操作", render:function(item){
var html = "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
if(item.__index == g.__rows.length-1){
html += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
var htmlPic = "",i=item.__index;
if(i == (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
}
return html;
if(i < (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
}
if(i == (g.__rows.length-1) && g.__rows.length == 1){
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";
}
return htmlPic;
}}
]
});
... ... @@ -525,6 +443,7 @@ function gridInit(id){
el:"#"+id,
columns:[
{display:"排序", render:function(item){
item.position=item.position || (item.__index+1);
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
}},
{display:"图片", render:function(item){
... ... @@ -534,11 +453,18 @@ function gridInit(id){
return "<input class='form-control inputChange' type=text name='url' value='"+item.url+"' data-index='"+item.__index+"' />";
}},
{display:"操作", render:function(item){
var html = "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
if(item.__index == g.__rows.length-1){
html += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
var htmlPic = "",i=item.__index;
if(i == (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
}
return html;
if(i < (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
}
if(i == (g.__rows.length-1) && g.__rows.length == 1){
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";
}
return htmlPic;
}}
]
});
... ... @@ -552,6 +478,7 @@ function gridInit(id){
el:"#"+id,
columns:[
{display:"排序", render:function(item){
item.position=item.position || (item.__index+1);
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
}},
{display:"图片", render:function(item){
... ... @@ -570,11 +497,18 @@ function gridInit(id){
return "<span style='white-space: nowrap'>" + (item.publishStatus==0?"未发布":"已发布") + "</span>";
}},
{display:"操作", render:function(item){
var html = "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
if(item.__index == g.__rows.length-1){
html += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
var htmlPic = "",i=item.__index;
if(i == (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
}
return html;
if(i < (g.__rows.length-1) && g.__rows.length > 1){
htmlPic += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' />";
}
if(i == (g.__rows.length-1) && g.__rows.length == 1){
htmlPic += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";
}
return htmlPic;
}}
]
});
... ... @@ -591,6 +525,7 @@ function gridInit(id){
if(item.__index == 0){
return item.position;
}else{
item.position=item.position || (item.__index);
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
}
}},
... ... @@ -611,11 +546,11 @@ function gridInit(id){
{display:"操作", render:function(item){
var html = "";
if(item.__index == 0 && g.__rows.length == 1){
html += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
html += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";
}else{
if(g.__rows.length > 1 && item.__index > 0){
html += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
if(g.__rows.length > 1 && item.__index == g.__rows.length - 1){
if(g.__rows.length > 1 && g.__rows.length < 5 && item.__index == g.__rows.length - 1){
html += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
}
}
... ... @@ -637,6 +572,7 @@ function gridInit(id){
if(item.__index == 0){
return item.position;
}else{
item.position=item.position || (item.__index);
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
}
}},
... ... @@ -657,11 +593,11 @@ function gridInit(id){
{display:"操作", render:function(item){
var html = "";
if(item.__index == 0 && g.__rows.length == 1){
html += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
html += "<input type=button class='btn btn-info btn-xs addBtn' value='添加一条' data-index='"+item.__index+"' />";
}else{
if(g.__rows.length > 1 && item.__index > 0){
html += "<input type=button class='btn btn-danger btn-xs deleteBtn' value='删除' data-index='"+item.__index+"' /><br>";
if(g.__rows.length > 1 && item.__index == g.__rows.length - 1){
if(g.__rows.length > 1 && g.__rows.length < 5 && item.__index == g.__rows.length - 1){
html += "<input type=button class='btn btn-info btn-xs addBtn' style='margin-top: 10px' value='添加一条' data-index='"+item.__index+"' />";
}
}
... ... @@ -683,6 +619,7 @@ function gridInit(id){
el:"#editor-newProduct-grid",
columns:[
{display:"排序", render:function(item){
item.position=item.position || (item.__index+1);
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
}},
{display:"图片", render:function(item){
... ... @@ -708,6 +645,7 @@ function gridInit(id){
el:"#editor-hotProduct-grid",
columns:[
{display:"排序", render:function(item){
item.position=item.position || (item.__index+1);
return "<input class='form-control numInput inputChange' type=text name='position' value='"+item.position+"' data-index='"+item.__index+"' />";
}},
{display:"图片", render:function(item){
... ... @@ -877,10 +815,10 @@ function editorTipInit(id){
tipHtml = "<span>提示:请上传像素160*240的图片。</span>";
break;
case "editor-newGoodTab":
tipHtml = "<span>提示:标题名称最多5个汉字。</span>";
tipHtml = "<span>提示:最多编辑5个标签,标题名称最多5个汉字。</span>";
break;
case "editor-hotGoodTab":
tipHtml = "<span>提示:标题名称最多5个汉字。</span>";
tipHtml = "<span>提示:最多编辑5个标签,标题名称最多5个汉字。</span>";
break;
default :
break;
... ... @@ -890,66 +828,104 @@ function editorTipInit(id){
//弹出框编辑校验
function editorCheck(id){
switch (id){
case "editor-banner":
return true;
break;
case "editor-nav":
return true;
break;
case "editor-largePic":
return true;
return (checkNumInput() && checkEndTime());
break;
case "editor-smallPic":
return true;
return (checkNumInput() && checkEndTime());
break;
case "editor-brand":
return true;
return checkNumInput();
break;
case "editor-recommend":
return true;
var title = $(".editorTitle input[name='title']");
if(title.val()){
if(checkNumInput()){
var nameList = $(".grid input[name='name']");
for(var i=0; i<nameList.length; i++){
if(!nameList.eq(i).val()){
nameList.eq(i).focus().addClass("error");
common.util.__tip("中文名不能为空!");
return false;
}
}
return true;
}
}else{
title.focus().addClass("error");
common.util.__tip("模块标题不能为空!");
return false;
}
break;
case "editor-hotRecommend":
return true;
return checkNumInput();
break;
case "editor-signboard":
var endTimeList = $(".grid input[name='endTime']");
for(var i=0; i<endTimeList.length; i++){
if(!endTimeList.eq(i).val()){
alert("结束时间为空!");
endTimeList.eq(i).focus();
return false;
}
}
return true;
return (checkNumInput() && checkEndTime());
break;
case "editor-newGoodTab":
return true;
return checkNumInput();
break;
case "editor-hotGoodTab":
return true;
return checkNumInput();
break;
case "editor-newProduct":
return true;
return checkNumInput();
break;
case "editor-hotProduct":
return true;
return checkNumInput();
break;
default :
return true;
break;
}
}
//排序序号校验
function checkNumInput(){
var positionList = $(".grid input[name='position']");
for(var i=0; i<positionList.length; i++){
if(positionList.eq(i).val()){
if(!isNaN(positionList.eq(i).val())){
if(positionList.eq(i).val() <= 0){
positionList.eq(i).focus().select().addClass("error");
common.util.__tip("排序数字请大于0!");
return false;
}
}else{
positionList.eq(i).focus().select().addClass("error");
common.util.__tip("排序必须为数字!");
return false;
}
}else{
positionList.eq(i).focus().addClass("error");
common.util.__tip("排序不能为空!");
return false;
}
}
return true;
}
//结束时间校验
function checkEndTime(){
var endTimeList = $(".grid input[name='endTime']");
for(var i=0; i<endTimeList.length; i++){
if(!endTimeList.eq(i).val()){
endTimeList.eq(i).focus().addClass("error");
common.util.__tip("结束时间不能为空!");
return false;
}
}
return true;
}
//编辑动画事件
function showEditorIconEvent(){
if(shopOperate == 'editor'){
... ... @@ -1080,4 +1056,147 @@ function cloneArr(arr1,arr2){
arr2.push($.extend(true,{},arr1[i]));
}
return arr2;
}
\ No newline at end of file
}
/********************事件绑定*********************/
//pc跟app的tab选项事件
$(document).on("click",".tabheader .nav-tabs li",function(){
$(this).addClass('active').siblings('li').removeClass('active');
curPlatform = $(this).attr("data-toggle");
if(curPlatform == "shopWeb-app"){
$(".moduleTypeView").hide();
}else{
$(".moduleTypeView").show();
}
showMain();
})
//基础模板,经典模板切换
$(document).on("click","input[name=brandLevel]",function(){
curTemplateType = $("input[name=brandLevel]:checked").val();
showMain();
})
//选择使用模板
$(document).on("change","#templateSelect",function(){
jsonMain.templateName = $(this).val();
})
//暂存模板
$(document).on("click","#saveModule",function(){
if(jsonMain.templateName == "0"){
common.util.__tip("请选择展示使用模板!");
return;
}
saveDecoration(100);
})
//提交审核
$(document).on("click","#submitModule",function(){
if(jsonMain.templateName == "0"){
common.util.__tip("请选择展示使用模板!");
return;
}
saveDecoration(200);
})
//审核通过
$(document).on("click","#checkOk",function(){
common.dialog.confirm(
"审核确认",
"你确认<strong style='color:#5cb85c'>审核通过</strong>么?",
function(){
checkDecoration(300);
},
function(){}
);
})
//驳回
$(document).on("click","#checkNo",function(){
common.dialog.confirm(
"审核驳回",
"你确认<strong style='color:#d9534f'>审核驳回</strong>么?如果确认,<strong style='color: #f0ad4e'>请填写驳回理由!</strong>" +
"<textarea id='checkComment' class='form-control' rows='3' style='margin: 10px 0'></textarea>" +
"<div class='editorTip' style='display: none'><span>提示:请填写驳回理由!</span></div>",
function(){
var comment = $("#checkComment").val();
if(comment){
checkDecoration(900,comment);
}else{
$(".editorTip").show();
return false;
}
},
function(){}
);
})
//删除
$(document).on("click",".deleteBtn",function(){
var _index = $(this).data("index")+"";
var indexList = _index.split("_");
if(indexList.length > 1){
[].splice.call(g.__rows[indexList[0]].data,indexList[1],1);
}else{
[].splice.call(g.__rows,indexList[0],1);
}
g.init(g.__rows);
untilEditorEvent(curDialogId);
if(curDialogId == "editor-newProduct" || curDialogId == "editor-hotProduct"){
productTopDataLink(g.__rows);
}
});
//添加一条
$(document).on("click",".addBtn",function(){
var _index = $(this).data("index")+"";
var indexList = _index.split("_");
if(indexList.length > 1){
g.__rows[indexList[0]].data.push($.extend({},ENUM[curDialogId]));
}else{
g.__rows.push($.extend({},ENUM[curDialogId]));
}
g.init(g.__rows);
untilEditorEvent(curDialogId);
});
//input change同时更新json
$(document).on("change",".inputChange",function(){
var _index = $(this).attr("data-index");
var indexList = _index.split("_");
var _name = $(this).attr("name");
if(indexList.length > 1){
(g.__rows[indexList[0]].data)[indexList[1]][_name] = $(this).val();
}else{
g.__rows[indexList[0]][_name] = $(this).val();
}
$(this).removeClass("error");
});
//checkBox change同时更新json
$(document).on("change",".checkBoxChange",function(){
var _index = $(this).attr("data-index");
var _name = $(this).attr("name");
if($(this).is(':checked')){
g.__rows[_index][_name] = "Y";
}else{
g.__rows[_index][_name] = "N";
}
});
//选择Top20
$(document).on("click",".topAdd",function(){
if(g.__rows.length < 8){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
var item = $.extend({},ENUM[curDialogId]);
item.src = $(this).find('img').attr("src");
item.productId = $(this).attr("data-productId");
item.productName = $(this).attr("data-productName");
item.productPrice = $(this).attr("data-productPrice");
g.__rows.push(item);
g.init(g.__rows);
untilEditorEvent(curDialogId);
$(".topTip span").text("已经勾选"+ g.__rows.length +"件,最多勾选8件商品!");
}
}else{
$(".topTip span").text("商品数量已满8个,无法继续添加商品!");
}
});
\ No newline at end of file
... ...
/*
pc端店铺模板css
*/
.grid ul.upload-image-list{padding: 0 10px}
.grid input.numInput{ width: 50px}
.editor-dialog ul.upload-image-list{padding: 0 10px}
.editor-dialog input.numInput{ width: 50px}
.editorTitle input.error,.editor-dialog input.error{ border: 2px solid #ff0000}
.editorTip{ color: #ff0000}
.contentpanel-pc {color: #585858; font-size: 12px; font-family:'Microsoft YaHei'}
... ...
exports.domain = require('../config/common.js').domain;
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://localhost:30012';
//exports.domain = 'http://172.16.6.115:8080/platform';
exports.domain = 'http://172.16.6.115:8080/platform';
exports.res = [
{
route: '/supplier/store/decorationDetail/:id/:shopId/:shopType/:shopName',
route: '/supplier/store/decorationDetail/:id/:templateId/:shopType/:shopName',
method: 'GET',
view: 'pages/store/shop2',
src:'/store/shop'
... ... @@ -36,7 +36,8 @@ exports.res = [
url:"/ShopsDecoratorRest/auditShopsDecorator",
params:[
{name: 'id', type: 'Number'},
{name: 'checkStatus', type: 'Number'}
{name: 'checkStatus', type: 'Number'},
{name: 'comment', type: 'String'}
]
},
{//最新上架的商品
... ...
... ... @@ -22,13 +22,13 @@
<h4>选择模板</h4>
</div>
<div class="col-sm-3">
<div class="moduleTypeView" style="margin-top: 10px">
<div class="moduleTypeView">
<label class="radio-inline"><input type="radio" name="brandLevel" value="1">基础模板</label>
<label class="radio-inline"><input type="radio" name="brandLevel" value="2">经典模板</label>
</div>
</div>
<div class="col-sm-3">
<div class="moduleTypeSelect" style="display: none">
<div class="moduleTypeSelect" style="display: none; margin-top: -10px">
<label>PC端使用模板:</label>
<select id="templateSelect" style="width: 120px; display: inline-block" class="form-control">
<option value="0" selected="selected">--选择模板--</option>
... ... @@ -38,15 +38,15 @@
</div>
</div>
<div class="col-sm-3">
<div class="moduleView" style="display: none; text-align: right">
<div class="moduleView" style="display: none; text-align: right; margin-top: -10px">
<input type="button" class="btn btn-default " value="返回" onclick="history.go(-1)">
</div>
<div class="moduleSubmite" style="display: none; text-align: right">
<div class="moduleSubmite" style="display: none; text-align: right; margin-top: -10px">
<input id="saveModule" type="button" class="btn btn-success" value="暂存">
<input id="submitModule" type="button" class="btn btn-primary" value="提交审核">
<input type="button" class="btn btn-default " value="返回" onclick="history.go(-1)">
</div>
<div class="moduleCheck" style="display: none; text-align: right">
<div class="moduleCheck" style="display: none; text-align: right; margin-top: -10px">
<input id="checkOk" type="button" class="btn btn-primary" value="审核通过">
<input id="checkNo" type="button" class="btn btn-danger" value="驳回">
<input type="button" class="btn btn-default " value="返回" onclick="history.go(-1)">
... ... @@ -159,7 +159,9 @@
</div>
<!--热销推荐-->
<div class="model-recommend model-hotRecommend model-editor" data-toggle="editor-hotRecommend" data-title="[[resources.hotRecommend.title]]编辑">
[[if resources.hotRecommend.title]]
<div class="recommendTitle">[[resources.hotRecommend.title]]</div>
[[/if]]
<div class="recommendDetail hotRecommendDetail">
<ul>
[[each resources.hotRecommend.data as item _index]]
... ... @@ -192,7 +194,11 @@
<ul>
[[each resources.goodsTabBar.data.new as item _index]]
[[if item.name]]
<li><a href="[[item.url]]">[[item.name]]</a></li>
[[if _index == 0]]
<li style="border-right: 0"><a href="[[item.url]]">[[item.name]]</a></li>
[[else]]
<li><a href="[[item.url]]">[[item.name]]</a></li>
[[/if]]
[[/if]]
[[/each]]
</ul>
... ... @@ -217,7 +223,11 @@
<ul>
[[each resources.goodsTabBar.data.hot as item _index]]
[[if item.name]]
<li><a href="[[item.url]]">[[item.name]]</a></li>
[[if _index == 0]]
<li style="border-right: 0"><a href="[[item.url]]">[[item.name]]</a></li>
[[else]]
<li><a href="[[item.url]]">[[item.name]]</a></li>
[[/if]]
[[/if]]
[[/each]]
</ul>
... ... @@ -286,7 +296,9 @@
<div class="sortListDetail model-editor" data-toggle="editor-recommend-app" data-title="热门品类编辑">
<ul>
[[each resources.recommend.data as item _index]]
<li><img src="[[item.src]]"><a href="[[item.url]]">[[item.name]]</a></li>
[[if item.isShowInApp == "Y"]]
<li><img src="[[item.src]]"><a href="[[item.url]]">[[item.name]]</a></li>
[[/if]]
[[/each]]
</ul>
<div class="clear"></div>
... ... @@ -319,7 +331,7 @@
<ul>
[[each product_list as item _index]]
<li class="topAdd" data-productId="[[item.product_id]]" data-productName="[[item.product_name]]" data-productPrice="[[item.sales_price]]">
<a href="javascript:"><img src="[[item.default_images]]"><b></b><span>top[[_index]]</span><i></i></a>
<a href="javascript:"><img src="[[item.default_images]]"><b></b><span>top[[_index+1]]</span><i></i></a>
</li>
[[/each]]
</ul>
... ...