Authored by weiqingting

Merge branch 'develop' into release/1.6

... ... @@ -3,6 +3,7 @@ require('../util/jquery.gritter');
var grid=require('./grid'),
edit = require('./edit'),
edit2 = require('./edit2'),
dropDown = require('./dropDown'),
dialog=require('./dialog'),
tab=require('./tab'),
... ... @@ -17,6 +18,7 @@ var common={
tab:tab,
dropDown:dropDown,
edit:edit,
edit2:edit2,
util:util,
tabTree:tabTree,
drag:drag,
... ...
... ... @@ -40,10 +40,89 @@ components.prototype={
init: function() {
var __self = this;
this.__fileRender();
this.__dropDownRender();
this.__checkboxRadioRender();
return this;
},
validate:function(){
return true;
validate:function(isTip){
var that = this;
var err = [];
$("input:text", that.el)
.add("input[type=number]", that.el)
.add("input:hidden", that.el)
.add("textarea", that.el)
.each(function() {
var name = $(this).attr("prompt") || $(this).attr("placeholder");
var value = $.trim($(this).val());
if ($(this).attr("required")) {
new Validator.init($(this)[0], {
rules: {
required: true
}
}).validate(function(obj) {
err.push("<p>" + name + "不可为空</p>");
});
return false;
}
});
//文件上传
$("input[type=file]", that.el).each(function() {
var value = $.trim($(this).attr("value"));
if ($(this).attr("required") && !value) {
err.push("<p>请上传文件</p>");
}
});
//下拉选择
$("select", that.el).each(function() {
var value = $.trim($(this).val());
var name = $(this).children(":first").text().replace(/[请选择]/g, "");
if ($(this).attr("required") && (+value == -1 || +value == "")) {
err.push("<p>请选择 " + name + "</p>");
}
});
// var v = Validator.make(data, rules);
// v.mergeAttribute(attributes);
// var err=[];
// if (v.fails()) {
// for(var key in v.messages()){
// err.push("<p>"+v.messages()[key]+"</p>");
// }
// that.__err(err.join(''));
// return false;
// }
if (err.length > 0) {
if (!isTip) {
that.__err(err.join(''));
} else {
that.errMessage = err.join('');
}
return false;
}
var zierr = 0;
that.__listen("validate", '', function(data) {
if (data == false || typeof data == "string") {
zierr++;
typeof data == "string" ? err.push("<p>" + data + "</p>") : '';
}
});
if (zierr > 0) {
if (!isTip) {
that.__err(err.join(''));
} else {
that.errMessage = err.join('');
}
return false;
}
return true;
},
__fileRender:function(){
... ... @@ -85,9 +164,9 @@ components.prototype={
});
var parent=$(this).parent(".fileinput-button");
if(response.data){
parent.find(".fileinput-button-icon").html("<img src='"+response.data+"' width=100 height=100/>");
parent.find(".fileinput-button-icon").html("<img src='"+response.data+"' width=76 height=80/>");
}
$(this).attr("value", response.data);
} else {
that.$tip(response.message);
}
... ... @@ -97,6 +176,34 @@ components.prototype={
}
},
__dropDownRender:function() {
$("select").each(function() {
var _value = $(this).attr("value");
if (_value) {
$("option[value='" + _value + "']", $(this)).attr("selected", true);
}
});
},
__checkboxRadioRender:function() {
var that=this;
$("input:hidden", that.el).each(function() {
var $this = $(this);
var name = $this.attr("id"),
values = $this.val().split(/[|,]/g), //String.prototype.split.call($this.val(), '|'),
type = $this.attr("for");
if (type) {
$(":" + type + "[name=" + name + "]").each(function() {
var $that = $(this);
$.each(values, function(index, value) {
if ($that.val() === value) {
$that.prop("checked", true);
}
})
});
}
});
},
__listen: function(key, o, callback) {
var __self = this;
if (__self.registerEvent[key] && __self.registerEvent[key].length > 0) {
... ...
... ... @@ -36,18 +36,18 @@ $(document).on('click', '#searchSku', function () {
var refName = item1.referenceName ? item1.referenceName : "";//非空判断
var a = refName.split(/[|/]/g);
var refName1 = a[0] || "", refName2 = a[1] || "";
return '<input class="col-sm-2 refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/>' + '<div class="col-sm-1">' + '/</div>' + '<input class="col-sm-2 refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/>';
return '<input class="col-sm-5 refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/>' + '<div class="col-sm-1">' + '/</div>' + '<input class="col-sm-5 refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/>';
}
});
for (var i = 0; i < dataList.sizeRelationsList[0].prdSizeAttributeBoList.length; i++) {//尺码列
var sizeAttributes = dataList.sizeRelationsList[0].prdSizeAttributeBoList[i];//参考尺码数组里的数据
var chkbox = '<label style="cursor: pointer;"><input type="checkbox" name="noMeasureIds" value="' + sizeAttributes.sizeAttributeId + '"/>无需测量</label>';
var chkbox = '<label style="cursor: pointer;"><input type="checkbox" name="noMeasureIds" data-index="'+i+'" value="' + sizeAttributes.sizeAttributeId + '"/>无需测量</label>';
headList.push({
display: sizeAttributes.sizeAttributeName + "<br>" + chkbox,
name: "sizeValue",
render: function (item1) {
var prdList = item1.prdSizeAttributeBoList;
if (j == prdList.length) j = 0;//防止越界
if (j >= prdList.length) j = 0;//防止越界
var sizeVal = prdList[j].sizeValue ? prdList[j].sizeValue : "";
return '<input class="form-control sizeInfo ' + prdList[j++].sizeAttributeId
+ '" data-index="' + item1.__index + '"' + 'value="' + sizeVal + '"/>';
... ... @@ -149,4 +149,20 @@ $("#skuInput").keydown(function () {
if (event.keyCode == "13") {
$("#searchSku").click();
}
});
//当点击“无需测量”,该列输入框不可编辑
$(document).on("change", "input[name='noMeasureIds']", function () {
var _index = $(this).data("index");
var tbody = $(this).parents('table').children('tbody');
if ($(this).is(':checked')) {
tbody.children('tr').each(function () {
$(this).find('td').eq(_index + 2).children().attr("readonly", true);
});
}
else {
tbody.children('tr').each(function () {
$(this).find('td').eq(_index + 2).children().attr("readonly", false);
});
}
});
\ No newline at end of file
... ...
... ... @@ -58,10 +58,10 @@ var g = new common.grid({
display: "到货时间",
name: "",
render: function (item1) {
if(item1.expectArrivalTime){
if (item1.expectArrivalTime) {
return Bll.getLocalTime(item1.expectArrivalTime);
}
else{
else {
return ""
}
... ... @@ -79,7 +79,21 @@ var g = new common.grid({
});
g.init("/meterManage/productSize/queryProdSizeList");
//当点击“无需测量”,该列输入框不可编辑
$(document).on("change", "input[name='noMeasureIds']", function () {
var _index = $(this).data("index");
var tbody = $(this).parents('table').children('tbody');
if ($(this).is(':checked')) {
tbody.children('tr').each(function () {
$(this).find('td').eq(_index + 2).children().attr("readonly", true);
});
}
else {
tbody.children('tr').each(function () {
$(this).find('td').eq(_index + 2).children().attr("readonly", false);
});
}
});
var Bll = {
getLocalTime: function (nS) {
var date = new Date(parseInt(nS) * 1000);
... ... @@ -134,22 +148,21 @@ var Bll = {
}
//商品参考尺码
var productSizeReferList = [];
for (var i = 0; i < $(".refInfo").length/2; i++) {
for (var i = 0; i < $(".refInfo").length / 2; i++) {
var ref1 = $($(".refInfo1")[i]);
var ref2 = $($(".refInfo2")[i]);
productSizeReferList.push({
sizeId: grid.rows[ref1.data("index")].sizeId,
gender: item.gender,
referenceName: ref1.val()+'/'+ref2.val()
referenceName: ref1.val() + '/' + ref2.val()
});
}
var data={
var data = {
productSkn: item.productSkn,
noMeasureIds: noMeasureIds,
sizeInfoList: JSON.stringify(sizeInfoList),
productSizeReferList: JSON.stringify(productSizeReferList)
};
console.log("最终数据data",data);
common.util.__ajax({
url: url,
data: data
... ... @@ -178,20 +191,20 @@ var Bll = {
headList.push({
display: "参考尺码(" + item.genderName + ")", name: "referenceName", render: function (item1) {//参考尺码列
var refName = item1.referenceName ? item1.referenceName : "";//非空判断
var a =refName.split(/[,|/]/g);
var refName1=a[0]||"",refName2=a[1]||"";
return '<input class="col-sm-2 refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/>'+'<div class="col-sm-1">'+'/</div>'+'<input class="col-sm-2 refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/>';
var a = refName.split(/[,|/]/g);
var refName1 = a[0] || "", refName2 = a[1] || "";
return '<input class="col-sm-5 refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/>' + '<div class="col-sm-1">' + '/</div>' + '<input class="col-sm-5 refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/>';
}
});
for (var i = 0; i < item.sizeRelationsList[0].prdSizeAttributeBoList.length; i++) {//尺码列
var sizeAttributes = item.sizeRelationsList[0].prdSizeAttributeBoList[i];//参考尺码数组里的数据
var chkbox = '<label style="cursor: pointer;"><input type="checkbox" name="noMeasureIds" value="' + sizeAttributes.sizeAttributeId + '"/>无需测量</label>';
var chkbox = '<label style="cursor: pointer;"><input type="checkbox" data-index="' + i + '" name="noMeasureIds" value="' + sizeAttributes.sizeAttributeId + '"/>无需测量</label>';
headList.push({
display: sizeAttributes.sizeAttributeName + "<br>" + chkbox,
name: "sizeValue",
render: function (item1) {
var prdList = item1.prdSizeAttributeBoList;
if (j == prdList.length) j = 0;//防止越界
if (j >= prdList.length) j = 0;//防止越界
var sizeVal = prdList[j].sizeValue ? prdList[j].sizeValue : "";
//j++;//
return '<input class="form-control sizeInfo ' + prdList[j++].sizeAttributeId
... ... @@ -218,7 +231,7 @@ $(document).on('click', '#filter-btn', function () {
$(document).on('click', '.add2', function () {
var item = g.rows[$(this).data("index")];
//拼接分类字符串
var a=item.productType.replace(/<br>/g, "/");
item.productType= a.substring(0, a.length-1);
var a = item.productType.replace(/<br>/g, "/");
item.productType = a.substring(0, a.length - 1);
Bll.toast("/meterManage/productSize/saveProdSizeInfo", item, "修改尺码");
});
\ No newline at end of file
... ...
... ... @@ -20,10 +20,10 @@ var g = new common.grid({
function init(item){
if(top){
html += "<div class='level-wrap clearfix'>";
html += "<div id='category_id_"+ item.categoryId +"' class='level-wrap clearfix'>";
top = false;
}else{
html += "<div class='level-wrap clearfix' style='display: none'>"
html += "<div id='category_id_"+ item.categoryId +"' class='level-wrap clearfix' style='display: none'>"
}
html += common.util.__template2($('#tableTemp2').html(), item);
if(item.items){
... ... @@ -106,20 +106,56 @@ var e = null,
tabTreeArr = [],
editHtml = $('#editTemp').html();
function initDialog(){
common.dialog.confirm(
'销售类目编辑',
"<div class='saleCategoryEdit'>加载中...</div>",
function(){
if(checkForm()){
saveBrand()
}else{
return false;
}
}, function(){}
);
$(".modal-dialog").css("width","900px");
}
function initForm(data) {
common.dialog.open({
title: '销售类目编辑',
content: common.util.__template2(editHtml, data),
width: 900
});
e = new common.edit('#basicForm', {
bucket: 'taobaocms'
});
var parentName = "";
getParentsName(data.parentSC);
data.parentName = (parentName == ""?"(无根目录)":parentName);
$(".saleCategoryEdit").html(common.util.__template2(editHtml, data)),
e = new common.edit('#basicForm', {bucket: 'taobaocms'});
e.init();
//循环父类信息
function getParentsName(parentsData){
if(parentsData && parentsData.length > 0){
var parent = parentsData[0];
parentName += parent.categoryName;
if(parent.items) parentName += "<span style='color: #3071a9; font-weight: bold; padding: 0 5px'>&nbsp;>&nbsp;</span>";
getParentsName(parent.items, parentName);
}else{
return parentName;
}
}
}
//弹层表单校验
function checkForm(){
var categoryName = $("#categoryName").val();
if(!categoryName || categoryName == ""){
$("#categoryName").addClass("error");
common.util.__tip("销售类目名称不能为空!");
return false;
}
return true;
}
//添加根分类
$('#add-root-category').on('click', function() {
initDialog();
var data = {};
data.action = '/sale/salesCategory/addSC';
initForm(data);
... ... @@ -136,6 +172,7 @@ $('#add-root-category').on('click', function() {
//添加子分类
$(document).on('click', '.add-sub-category', function() {
initDialog();
var categoryId = $(this).parent().data('id');
common.util.__ajax({
url: '/sale/salesCategory/querySCById',
... ... @@ -163,6 +200,7 @@ $(document).on('click', '.add-sub-category', function() {
//编辑销售类目
$(document).on('click', '.edit-btn', function() {
initDialog();
var categoryId = $(this).parent().data('id');
common.util.__ajax({
url: '/sale/salesCategory/querySCById',
... ... @@ -173,36 +211,39 @@ $(document).on('click', '.edit-btn', function() {
res.data.action = '/sale/salesCategory/updateSC';
initForm(res.data);
//渲染物理类目
var selectedArr = [];
$.each(res.data.relationProductSort, function(i, item) {
var sort = [{id: item.id, sortName: item.sortName}];
addSelected(sort, item);
selectedArr.push(sort);
});
if (selectedArr.length > 0) {
$('.sort-wrap').empty();
tabTreeArr = [];
$.each(selectedArr, function(i, item) {
var $sortGroup = $($('#sortWrap').html());
$sortGroup.appendTo($('.sort-wrap'));
checkSortNum();
tabTree = new common.tabTree(".sortTree:last", {
status: 1,
sortLevel: 1
});
tabTreeArr.push(tabTree);
tabTree.init(item);
console.log(res.data);
if(res.data.relationProductSort && res.data.relationProductSort.length > 0){
//渲染物理类目
var selectedArr = [];
$.each(res.data.relationProductSort, function(i, item) {
var sort = [{id: item.id, sortName: item.sortName}];
addSelected(sort, item);
selectedArr.push(sort);
});
} else {
if (selectedArr.length > 0) {
$('.sort-wrap').empty();
tabTreeArr = [];
$.each(selectedArr, function(i, item) {
var $sortGroup = $($('#sortWrap').html());
$sortGroup.appendTo($('.sort-wrap'));
checkSortNum();
tabTree = new common.tabTree(".sortTree:last", {
status: 1,
sortLevel: 1
});
tabTreeArr.push(tabTree);
tabTree.init(item);
});
}
}else {
tabTreeArr = [];
tabTree = new common.tabTree(".sortTree", {
status: 1,
sortLevel: 1
});
tabTree.init();
tabTreeArr.push(tabTree);
checkSortNum();
}
}, true);
});
... ... @@ -245,7 +286,7 @@ $(document).on('click', '.del-sort-btn', function() {
});
//保存销售类目
$(document).on('click', '#save_brand', function() {
function saveBrand(){
e.submit($('#basicForm').attr('action'), function(option) {
var selected = [];
$.each(tabTreeArr, function(i, item){
... ... @@ -254,57 +295,106 @@ $(document).on('click', '#save_brand', function() {
}
});
option.data.relationParameter = selected.join(',');
console.log(option.data.relationParameter);
option.success = function(res) {
res = res.data;
if (res.code == '200') {
e.$tip(res.message, function() {
//location.reload();
}, 'growl-success');
console.log(res);
var categoryId = res.data.categoryId;
var parentId = res.data.parentId;
var thisCategory = $("#category_id_" + categoryId);
if(thisCategory.length > 0){ //编辑保存
if(res.data.categoryName) { $("#category_id_" + categoryId).find("span").eq(2).html(res.data.categoryName); }
if(res.data.icon) { $("#category_id_" + categoryId).find("span").eq(4).html("<img src='"+ res.data.icon +"' alt=''>"); }
e.$tip("编辑成功!", function() {}, 'growl-success');
}else if(parentId == "0"){ //添加根目录
initCategory(res.data);
e.$tip("添加根目录成功!", function() {}, 'growl-success');
}else{ //添加子目录
initCategory(res.data, parentId);
e.$tip("添加子目录成功!", function() {}, 'growl-success');
}
} else {
e.$tip(res.message);
}
return false;
}
});
});
}
//销售类目前端局部刷新
function initCategory(data,parentId){
if(parentId){
var html = "<div id='category_id_"+ data.categoryId +"' class='level-wrap clearfix' style='display: none'>";
html += common.util.__template2($('#tableTemp2').html(), data);
html += "</div>";
$("#category_id_" + parentId).append(html);
if($("#category_id_" + parentId).find(".folder").hasClass("open")){
$("#category_id_" + data.categoryId).show();
$("#category_id_" + data.categoryId + " .folder").css("background-position", (12 + 36 * (data.levelNumber - 1)) + "px");
}else{
$("#category_id_" + parentId).find(".folder").click();
}
}else{
var html = "<tr><td><div id='category_id_"+ data.categoryId +"' class='level-wrap clearfix'>";
html += common.util.__template2($('#tableTemp2').html(), data);
html += "</div></td></tr>";
$(".grid table tbody").append(html);
}
newCategorySee(data.categoryId);
}
//新增的销售类目高亮
function newCategorySee(categoryId){
$("#category_id_" + categoryId).addClass("newCategory");
setTimeout(function() {
$("#category_id_" + categoryId).removeClass("newCategory");
}, 3000);
$('html,body').animate({scrollTop:$("#category_id_" + categoryId).offset().top - window.screen.height/2}, 800)
}
//开启销售类目
$(document).on('click', '.open-category', function() {
var categoryId = $(this).parent().data('id'),
categoryName = $(this).parent().data('name');
common.dialog.confirm("温馨提示", "确定开启(" + categoryName + ")分类吗", function() {
common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#449d44'>开启&nbsp;&nbsp;</font>【" + categoryName + "】</b>&nbsp;&nbsp;分类吗?", function() {
common.util.__ajax({
url: '/sale/salesCategory/updateSC',
url: '/sale/salesCategory/updateSCStatus',
data: {
categoryId: categoryId,
state: 1
}
}, function(res){
if (res.code == 200) {
g.reload();
$("#category_id_" + categoryId).find(".status").html("<b style='color: #449d44'>开启</b>");
$("#category_id_" + categoryId).find(".openAndClose").html("<a class='btn btn-danger btn-xs close-category' href='javascript:;'>关闭</a>");
common.util.__tip("开启成功!","success");
} else{
common.util.__tip(res.data.message);
}
})
},true)
});
})
//关闭销售类目
$(document).on('click', '.close-category', function() {
var categoryId = $(this).parent().data('id'),
categoryName = $(this).parent().data('name');
common.dialog.confirm("温馨提示", "确定关闭(" + categoryName + ")分类吗", function() {
common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#ff0000'>关闭&nbsp;&nbsp;</font>【" + categoryName + "】</b>&nbsp;&nbsp;分类吗?", function() {
common.util.__ajax({
url: '/sale/salesCategory/updateSC',
url: '/sale/salesCategory/updateSCStatus',
data: {
categoryId: categoryId,
state: 0
}
}, function(res){
if (res.code == 200) {
g.reload();
$("#category_id_" + categoryId).find(".status").html("<b style='color: #d9534f'>关闭</b>");
$("#category_id_" + categoryId).find(".openAndClose").html("<a class='btn btn-warning btn-xs open-category' href='javascript:;'>开启</a>");
common.util.__tip("关闭成功!","success");
}else{
common.util.__tip(res.data.message);
}
})
},true)
});
})
... ... @@ -313,3 +403,5 @@ $('input[name="state"]').on('change', function() {
$(this).parent().addClass('current').siblings().removeClass('current');
g.reload();
});
$(document).on('change', '#categoryName', function(){$(this).removeClass("error")})
\ No newline at end of file
... ...
... ... @@ -37,9 +37,9 @@ var g = new common.grid({
name: '',
render: function(item) {
if (item.status == 1) {
return '<a class="btn btn-xs btn-danger close-btn" data-title="' + item.labelName + '" data-label="' + item.labelId + '" href="javascript:;">关闭</a>';
return '<a class="btn btn-xs btn-danger close-btn" data-title="' + item.labelName + '" _id="' + item.id + '" href="javascript:;">关闭</a>';
} else {
return '<a class="btn btn-xs btn-warning open-btn" data-title="' + item.labelName + '" data-label="' + item.labelId + '" href="javascript:;">开启</a>';
return '<a class="btn btn-xs btn-warning open-btn" data-title="' + item.labelName + '" _id="' + item.id + '" href="javascript:;">开启</a>';
}
}
}]
... ... @@ -96,14 +96,13 @@ $('input[name="state"]').on('change', function() {
g.reload();
});
$(document).on('click', '.close-btn', function() {
var labelId = $(this).data('label');
common.dialog.confirm("温馨提示", "确定关闭(" + $(this).data('title') + ")标签吗", function() {
var id = $(this).attr('_id');
common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#ff0000'>关闭&nbsp;&nbsp;</font>【" + $(this).data('title') + "】</b>&nbsp;&nbsp;标签吗?", function() {
common.util.__ajax({
url: '/sale/salesCategoryLabel/updateSCLabel',
data: {
labelId: labelId,
id: id,
status: 0
}
}, function(res){
... ... @@ -112,15 +111,14 @@ $(document).on('click', '.close-btn', function() {
}
})
});
console.log(g.rows);
});
$(document).on('click', '.open-btn', function() {
var labelId = $(this).data('label');
common.dialog.confirm("温馨提示", "确定开启(" + $(this).data('title') + ")标签吗", function() {
var id = $(this).attr('_id');
common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#449d44'>开启&nbsp;&nbsp;</font>【" + $(this).data('title') + "】</b>&nbsp;&nbsp;标签吗?", function() {
common.util.__ajax({
url: '/sale/salesCategoryLabel/updateSCLabel',
data: {
labelId: labelId,
id: id,
status: 1
}
}, function(res){
... ...
... ... @@ -142,14 +142,21 @@ var Bll = {
onComplete: function (response) {
if (response.status && response.code == 200) {
for (var i = 0; i < response.datas.length; i++) {
Bll.pictureBoList.push({
"fileName": response.datas[i],
"originalName": response.names[i]
});
Bll.clonePics.push({
"fileName": response.datas[i],
"originalName": response.names[i]
})
var name=response.names[i];
if((/[\u4e00-\u9fa5]/).test(name)){
common.util.__tip("图片应以sku命名","warning");
}
else{
Bll.pictureBoList.push({
"fileName": response.datas[i],
"originalName": response.names[i]
});
Bll.clonePics.push({
"fileName": response.datas[i],
"originalName": response.names[i]
})
}
}
Bll.rendBoList(Bll.clonePics);
}
... ...
/**
* Created by JiangMin on 2016/4/18.
*/
var common=require('../../common/common');
var Validate1 = {
"getCoupon": [
{
name: "couponID", fn: function (data) {
var a = "";
var b=false;
data.data.forEach(function (x) {
if (x.couponID) {
if (a == "") {
a = x.couponID;
}
else {
a = a + ',' + x.couponID;
}
}
});
common.util.__ajax({
url: "/coupon/batchCheckCoupons",
async:false,
data: {
params: a
}
}, function (res) {
if(res.code=='200'){
b=true;
}
});
return b;
}
}
]
};
module.exports=Validate1;
\ No newline at end of file
... ...
/**
* Created by ty on 2016/4/18.
*/
var addObj = {
multiLabelImage_image: {//多标签->图片
"src": "",
"url": {
"action": "",
"url": ""
}
},
multiLabelImage_label: {//多标签->标签
"src": "",
"url": {
"action": "",
"url": ""
}
},
imageGroup_list: {//图片广告->图片
"src": "",
"title": "",
"url": {
"action": "",
"url": ""
}
},
matchImage_list: {//搭配(2T-nF)->小图
"title": "",
"url": {
"action": "",
"url": ""
}
},
icon_data: {//图标
"url": {
"action": "",
"url": ""
}
},
nav_list: {//标题标签->标签
"name": "",
"url": {
"action": "",
"url": ""
}
},
coupon_data: {//领券楼层->资源位
"title": "标题内容",
"isShow": "YES",
"image": {
"src": "",
"url": {
"action": "",
"url": ""
}
},
"couponID": ""
},
paramsGroup_list: {//自定义参数->参数
"title": "",
"params": ""
},
newUserFloor_banner_image: {//新人专享->banner
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
},
debrisSlider_left: {//有序焦点->左边的图
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
},
debrisSlider_big_image: {//有序焦点->中间的图
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
},
debrisSlider_right: {//有序焦点->右边的图
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
},
hotCategory_blocks: {//热门品类->左边图
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
},
hotCategory_imgs: {//热门品类->右边图
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
},
imageList_list: {//图片列表->图片
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
},
textNav_data: {//文本导航->导航
"name": "",
"url": {
"action": "",
"url": ""
}
},
focus_data: {//焦点图->焦点
"src": "",
"alt": "",
"url": {},
"bgColor": "",
"imgId": "0"
},
carouselBanner_list: {//轮播banner->banner
"src": "",
"url": {}
},
editorTalk_list: {//编辑推荐->标签图片
"src": "",
"title": "",
"url": {
"action": "",
"url": ""
}
},
title_nav: {
"name": "",
"url": {
"action": "",
"url": ""
}
},
getCoupon_data: {
"title": "标题内容",
"isShow": "YES",
"image": {
"src": "",
"url": {
"action": "",
"url": ""
}
},
"couponID": ""
}
};
module.exports = addObj;
\ No newline at end of file
... ...
... ... @@ -2,6 +2,8 @@ var $ = require('jquery'),
common = require('../common/common');
var Button = require('./partials/Button1');
var resourceObj = require('./partials/resourceObj');
var Validate = require('./partials/Validate1');
var addObj = require('./partials/addObj');
/*获取数据*/
var ViewModel = {};
... ... @@ -16,31 +18,22 @@ common.util.__ajax({
}, true);
/*配置模块*/
var edit = new common.edit(".modal-body", {
var edit = new common.edit2(".modal-body", {
bucket: "yhb-img01"
});
/**
* 验证
*/
var Validate = {
"getCoupon": [
{
name: "couponID", fn: function () {
var couponID = $("couponID").val();
common.util.__ajax({
url: "/coupon/batchCheckCoupons",
data: {
params: couponID
}
}, function (res) {
console.log("res", res);
return "领券码不存在";
});
}
//输入领券码验证
$(document).on("change", "#couponID", function () {
var couponID = $(this).val();
common.util.__ajax({
url: "/coupon/batchCheckCoupons",
async:false,
data: {
params: couponID
}
]
};
}, function () {
});
});
var Bll = {
Brands: [],
Brands1: {},
... ... @@ -54,11 +47,6 @@ var Bll = {
var btn = Button.filter(function (item) {
return item.template_name == module.contentData.template_name;
});
if (Validate[module.contentData.template_name]) {
Validate[module.contentData.template_name].forEach(function (item) {
edit.on("validate", item.fn);
})
}
var d = new common.dialog({
title: (!!~index ? "修改" : "添加") + btn[0].button_name,
//content: common.util.__template2($("#" + module.contentData.dialog).html(), module),
... ... @@ -67,10 +55,14 @@ var Bll = {
button: [{
value: "保存",
callback: function () {
//if (Validate[module.contentData.template_name]) {
// Validate[module.contentData.template_name].forEach(function (item) {
// edit.on("validate", function(){item.fn(module.contentData)})
// })
//}
if (edit.validate()) {
//TODO
if (resourceObj[module.contentData.template_name]){
if (resourceObj[module.contentData.template_name]) {
resourceObj[module.contentData.template_name](module.contentData.data);
}
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
... ... @@ -117,7 +109,7 @@ var Bll = {
});
for (var i in Brand) {
Brand[i].sort(function (a, b) {
if(a.brand_name && b.brand_name) {
if (a.brand_name && b.brand_name) {
var aName = a.brand_name.toLowerCase(),
bName = b.brand_name.toLowerCase();
if (aName < bName) return -1;
... ... @@ -208,10 +200,7 @@ $(document).on("click", ".add_btn", function () {
Bll.module.contentData = $.extend(true, {}, item);
Bll.toast(-1, Bll.module);
});
//$(document).on("click", ".del", function() {
// Bll.contentDatas.splice($(this).data("index"), 1);
// Bll.__render("#add-content","template_content",{modules:Bll.contentDatas});
//});
$(document).on("click", ".del", function () {//删除
var index = $(this).data("index");
common.dialog.confirm("警告",
... ... @@ -251,111 +240,45 @@ $(document).on("change", ".observe", function () {
}
});
});
var clickBtns = {
multiLabelImage:{
}
};
$(document).on("click", '#multiLabelImage-addImage', function () {
Bll.module.contentData.data.image.push({
"src": "",
"url": {
"action": "",
"url": ""
}
});
Bll.renderDialog("multiLabelImage-template");
});
$(document).on("click", '#multiLabelImage-addOne', function () {
Bll.module.contentData.data.label.push({
"src": "",
"url": {
"action": "",
"url": ""
/*根据limit判断最多添加条数, 根据event判断添加的类型, data-event:template_name + "-template"*/
$(document).on("click", ".addBtn", function() {
var length = $(this).data("limit");
var arr = $(this).data("event").split(".");
if (arr[1] == "data") {
if (Bll.module.contentData.data.length >= length) {
common.util.__tip("最多"+ length +"条!","warning");
return;
}
});
Bll.renderDialog("multiLabelImage-template");
});
$(document).on("click", '#imageGroup-addOne', function () {
Bll.module.contentData.data.list.push({
"src": "",
"title": "",
"url": {
"action": "",
"url": ""
Bll.module.contentData.data.push(addObj[arr.join("_")]);
} else {
if (Bll.module.contentData.data[arr[1]].length >= length) {
common.util.__tip("最多"+ length +"条!","warning");
return;
}
});
Bll.renderDialog("imageGroup-template");
Bll.module.contentData.data[arr[1]].push(addObj[arr.join("_")]);
}
Bll.renderDialog(arr[0] + "-template");
});
$(document).on("click", '#matchImage-addOne', function () {
Bll.module.contentData.data.list.push({
"title": "",
"url": {
"action": "",
"url": ""
}
});
Bll.renderDialog("matchImage-template");
});
//添加一个图标
$(document).on("click", '#icon-addOne', function () {
Bll.module.contentData.data.push({
//"title": "",
"url": {
"action": "",
"url": ""
}
});
Bll.renderDialog("icon-template");
});
//删除一个图标
$(document).on("click", '#icon-delOne', function () {
/*删除行*/
$(document).on("click", ".delBtn", function () {
var arr = $(this).data("event").split(".");
var index = $(this).data("index");
Bll.module.contentData.data.splice(index, 1);
Bll.renderDialog("icon-template");
});
//添加一个标签
$(document).on("click", '#nav-addOne', function () {
Bll.module.contentData.data.nav.push({
"name": "",
"url": {
"action": "",
"url": ""
}
});
Bll.renderDialog("title-template");
});
//添加领券
$(document).on("click", '#coupon-addOne', function () {
var length = Bll.module.contentData.data.length;
if (length >= 4) {
common.util.__tip("最多添加四条!","warning");
if(arr[1] == "data") {
Bll.module.contentData.data.splice(index, 1);
} else {
Bll.module.contentData.data.push({
"title": "标题内容",
"isShow": "YES",
"image": {
"src": "",
"url": {
"action": "",
"url": ""
}
},
"couponID": ""
});
Bll.renderDialog("getCoupon-template");
Bll.module.contentData.data[arr[1]].splice(index, 1);
}
Bll.renderDialog(arr[0] + "-template");
});
$(document).on("change", ".chkbox", function() {
});
//获取品牌
Bll.getBrands();
/*渲染品牌*/
//Bll.Brdata=ViewModel.brandList||[];
//Bll.renderBrandPic(Bll.Brdata);
//打开品牌选择模态
$(document).on("click", "#addBrands", function () {
var e = new common.edit("#brandForm");
... ... @@ -387,224 +310,38 @@ $(document).on('click', '.brand-index', function () {
var brandIndex = $(this).text();
$('.brand-wrap').find('[name="' + brandIndex + '"]').show().siblings().hide();
});
//删除一个品牌
$(document).on("click", '#remove_brand', function () {
var index = $(this).data("index");
Bll.module.contentData.data.list.splice(index, 1);
Bll.renderDialog("brands-template");
});
/*自定义参数*/
$(document).on("click", '.paramsGroupDel', function () {
Bll.module.contentData.data.list.splice($(this).data("index"), 1);
Bll.renderDialog("paramsGroup-template");
});
$(document).on("click", '#paramsGroup-addOne', function () {
Bll.module.contentData.data.list.push(
{
"title": "",
"params": ""
}
);
Bll.renderDialog("paramsGroup-template");
});
/*新人专享*/
$(document).on("click", '#newUserFloor-addBanner', function () {
Bll.module.contentData.data.banner_image.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("newUserFloor-template");
});
/*有序焦点添加*/
$(document).on("click", '#debrisSlider-addLeft', function () {
Bll.module.contentData.data.left.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("debrisSlider-template");
});
$(document).on("click", '#debrisSlider-addCenter', function () {
Bll.module.contentData.data.big_image.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("debrisSlider-template");
});
$(document).on("click", '#debrisSlider-addRight', function () {
Bll.module.contentData.data.right.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("debrisSlider-template");
});
//*****************************************************************//
/*热门品类*/
$(document).on("click", '#hotCategory-addLeft', function () {
Bll.module.contentData.data.blocks.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("hotCategory-template");
});
$(document).on("click", '#hotCategory-addRight', function () {
Bll.module.contentData.data.imgs.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("hotCategory-template");
});
$(document).on("click", '.hotCategory-delLeft', function () {
Bll.module.contentData.data.blocks.splice($(this).data("index"), 1);
Bll.renderDialog("hotCategory-template");
});
$(document).on("click", '.hotCategory-delRight', function () {
Bll.module.contentData.data.imgs.splice($(this).data("index"), 1);
Bll.renderDialog("hotCategory-template");
});
//*****************************************************************//
/*图片列表*/
$(document).on("click", '#imageList-addOne', function () {
Bll.module.contentData.data.list.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("imageList-template");
});
$(document).on("click", '.imageList-del', function () {
Bll.module.contentData.data.list.splice($(this).data("index"), 1);
Bll.renderDialog("imageList-template");
});
$(document).on("click", '.is_show_name', function () {
Bll.module.contentData.data.title.is_show_name = $(this).val();
Bll.renderDialog("imageList-template");
});
//*****************************************************************//
/*文本导航*/
$(document).on("click", '#textNav-addOne', function () {
Bll.module.contentData.data.push(
{
"name": "",
"url": {
"action": "",
"url": ""
}
}
);
Bll.renderDialog("textNav-template");
});
$(document).on("click", '.textNav-delOne', function () {
Bll.module.contentData.data.splice($(this).data("index"), 1);
Bll.renderDialog("textNav-template");
});
//*****************************************************************//
/*推荐(标题 + 12张图)*/
$(document).on("change", '#recommendContentFive-is_show', function () {
var fn = new Function("console.log(111)");
fn();
Bll.module.contentData.data.title.is_show = 1 - Bll.module.contentData.data.title.is_show;
Bll.renderDialog("recommendContent-template");
});
//*****************************************************************//
/*焦点图*/
$(document).on("click", '#focus-addOne', function () {
Bll.module.contentData.data.push(
{
"src": "",
"alt": "",
"url": {},
"bgColor": "",
"imgId": "0"
}
);
Bll.renderDialog("focus-template");
});
$(document).on("click", '.focus-del', function () {
Bll.module.contentData.data.splice($(this).data("index"), 1);
Bll.renderDialog("focus-template");
});
$(document).on("change", '#focus-select', function () {
Bll.module.contentData.focus_type = $(this).val();
Bll.renderDialog("focus-template");
});
//*****************************************************************//
/*轮播banner*/
$(document).on("click", '#carouselBanner-addOne', function () {
Bll.module.contentData.data.list.push(
{
"src": "",
"url": {}
}
);
Bll.renderDialog("carouselBanner-template");
});
$(document).on("click", '.carouselBanner-del', function () {
Bll.module.contentData.data.list.splice($(this).data("index"), 1);
Bll.renderDialog("carouselBanner-template");
});
//*****************************************************************//
/*编辑推荐*/
$(document).on("click", '#editorTalk-addOne', function () {
Bll.module.contentData.data.list.push(
{
"src": "",
"title": "",
"url": {
"action": "",
"url": ""
}
}
);
Bll.renderDialog("editorTalk-template");
});
$(document).on("click", '.editorTalk-del', function () {
Bll.module.contentData.data.list.splice($(this).data("index"), 1);
Bll.renderDialog("editorTalk-template");
});
$(document).on("change", '#editorTalk-is_show', function () {
Bll.module.contentData.data.title.is_show = 1 - Bll.module.contentData.data.title.is_show;
Bll.renderDialog("editorTalk-template");
});
//推荐品牌 是否显示名称
$(document).on("click", '.is_show_name_brand', function () {
Bll.module.contentData.data.is_show_name = $(this).val();
Bll.renderDialog("brands-template");
});
$(document).on("click", "#sub_btn", function () {
var data = {
... ... @@ -650,7 +387,7 @@ var addSuffix = function (contentData) {
if (typeof contentData == "object") {
for (var i in contentData) {
if (i == "src" && contentData[i].indexOf("?") == -1) {
contentData[i] = contentData[i] + "?imageView/{mode}/w/{width}/h/{height}";
contentData[i] = contentData[i] + "?imageView2/{mode}/w/{width}/h/{height}";
} else {
addSuffix(contentData[i]);
}
... ... @@ -687,7 +424,7 @@ var goodsgird = new common.grid({
display: "产品图片",
render: function (item) {
if (item.images_url) {
item.images_url = common.util.__joinImg("yhb-img01", item.images_url);
item.images_url = common.util.__joinImg("goodsimg", item.images_url);
}
else {
item.images_url = "";
... ... @@ -788,30 +525,30 @@ $(document).on("click", ".removepic", function () {
}));
});
$(document).on("mouseover","#add-content .dragItem",function(){
var drag = new common.drag("#add-content", Bll.contentDatas, function(data){
$(document).on("mouseover", "#add-content .dragItem", function () {
var drag = new common.drag("#add-content", Bll.contentDatas, function (data) {
Bll.contentDatas = data;
Bll.__render("#add-content","template_content",{modules:Bll.contentDatas});
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
})
drag.Initialize();
});
$(document).on("mouseleave","#add-content .dragItem",function(){
$(document).on("mouseleave", "#add-content .dragItem", function () {
new common.drag("#add-content").destroy();
});
/*
$(document).on("mouseover","#sortable .dragItem",function(){
//console.log(Bll.module.contentData.data.list);
var drag = new common.drag("#sortable", Bll.module.contentData.data.list, function(data){
Bll.module.contentData.data.list = data;
console.log(Bll.module.contentData);
console.log(Bll.module);
Bll.renderDialog("paramsGroup-template");
//Bll.__render("#sortable","paramsGroup-template",{modules:Bll.module});
})
drag.Initialize();
});
$(document).on("mouseleave","#sortable .dragItem",function(){
new common.drag("#sortable").destroy();
});
*/
$(document).on("mouseover","#sortable .dragItem",function(){
//console.log(Bll.module.contentData.data.list);
var drag = new common.drag("#sortable", Bll.module.contentData.data.list, function(data){
Bll.module.contentData.data.list = data;
console.log(Bll.module.contentData);
console.log(Bll.module);
Bll.renderDialog("paramsGroup-template");
//Bll.__render("#sortable","paramsGroup-template",{modules:Bll.module});
})
drag.Initialize();
});
$(document).on("mouseleave","#sortable .dragItem",function(){
new common.drag("#sortable").destroy();
});
*/
... ...
... ... @@ -39,16 +39,19 @@
span {
display: inline-block;
width: 12.5%;
font-size: 13px;
font-size: 14px;
border-left: 1px solid #ddd;
height: 50px;
line-height: 50px;
height: 60px;
line-height: 60px;
vertical-align: middle;
text-align: center;
font-family:'Microsoft YaHei';
img {
max-height: 78px;
max-width: 78px;
max-height: 56px;
max-width: 80%;
display: block;
margin: 2px auto;
}
&.orderby {
... ... @@ -57,7 +60,6 @@
&.operate {
width: 20.5%;
line-height: 42px;
}
&.status {
... ... @@ -74,11 +76,11 @@
border-bottom: 1px solid #ddd;
span {
font-weight: bold;
height: 40px;
line-height: 40px;
height: 36px;
line-height: 36px;
&.operate {
line-height: 34px;
line-height: 36px;
}
}
}
... ... @@ -103,10 +105,22 @@
margin: 0 auto;
line-height: 40px;
}
.grid input.errorNumInput{
.grid input.errorNumInput, .saleCategoryEdit input.error{
border: 2px solid #ff0000;
}
.level-wrap input.saleCategoryNumInput{
margin: 5px auto;
margin: 10px auto;
}
.saleCategoryEdit ul{
padding: 0;
}
.newCategory{
background: #d9edf7;
}
#basicForm .citySelect{
width: 450px;
}
\ No newline at end of file
... ...
... ... @@ -20,6 +20,7 @@ var config = {
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//domain: 'http://172.16.6.146:8088/platform', //玛丽
//domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
// domain: 'http://192.168.102.216:8088/platform',
domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.6.120:8088/platform',//曹艳
//domain:'http://172.16.6.231:8080/platform',//王伟
... ...
... ... @@ -3,6 +3,7 @@
* 测量尺码管理
*/
exports.domain = require('../config/common.js').domain;
//exports.domain ="http://172.16.6.189:8088/platform";
exports.res = [
... ...
... ... @@ -71,14 +71,15 @@ exports.res = [
{name: 'avatar', type: 'string'},//头像
{name: 'modelCard', type: 'string'}//模特卡
]
},
//验证领券码
{
route: "/coupon/batchCheckCoupons",
method: "POST",
url: "/coupon/batchCheckCoupons",
params: [
{name: "params", type: "string"}
]
}
//,
////验证领券码
//{
// route: "/coupon/batchCheckCoupons",
// method: "POST",
// url: "/coupon/batchCheckCoupons",
// params: [
// {name: "params", type: "string"}
// ]
//}
];
\ No newline at end of file
... ...
... ... @@ -91,4 +91,14 @@ exports.res = [
{name: "id", type: "number"}
]
}
,
//验证领券码
{
route: "/coupon/batchCheckCoupons",
method: "POST",
url: "/coupon/batchCheckCoupons",
params: [
{name: "params", type: "string"}
]
}
];
\ No newline at end of file
... ...
//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.243:8088/platform';
//销售类目路由
exports.res = [{
... ... @@ -30,47 +29,7 @@ exports.res = [{
name: 'categoryId',
type: 'number'
}]
}/*, {
//新增根分类页面渲染
route: '/sale/category/add',
method: 'GET',
src: '/salecategory/edit',
view: 'pages/salecategory/edit',
data: {
action: '/sale/salesCategory/addSC',
data: {
addRootCategory: true
}
}
}, {
//新增子分类页面渲染
route: '/sale/category/add/:categoryId',
method: 'GET',
src: '/salecategory/edit',
url: '/salesCategory/querySCById',
view: 'pages/salecategory/edit',
data: {
action: '/sale/salesCategory/addSC'
},
params: [{
name: 'categoryId',
type: 'number'
}]
}, {
//编辑分类页面渲染
route: '/sale/category/edit/:categoryId',
method: 'GET',
src: '/salecategory/edit',
url: '/salesCategory/querySCById',
view: 'pages/salecategory/edit',
data: {
action: '/sale/salesCategory/updateSC'
},
params: [{
name: 'categoryId',
type: 'number'
}]
}*/, {
//标签管理页面渲染
route: '/sale/category/tag/:categoryId',
method: 'GET',
... ... @@ -173,6 +132,18 @@ exports.res = [{
type: 'string'
}]
}, {
//开关销售类目
route: '/sale/salesCategory/updateSCStatus',
method: 'POST',
url: '/salesCategory/updateSCStatus',
params: [{
name: 'categoryId',
type: 'string'
}, {
name: 'state',
type: 'string'
}]
},{
//批量添加标签接口
route: '/sale/salesCategoryLabel/addSCLabel',
method: 'POST',
... ...
... ... @@ -52,34 +52,25 @@
<div class="panel">
<div class="panel-body nopadding">
<form id="basicForm" role="form" action="[[action]]" class="form-horizontal form-bordered">
<div class="form-group">
<label class="col-sm-2 control-label">父分类</label>
<!-- <div class="col-sm-8 height40">{{# parentSC}}{{categoryName}}{{# items}}-{{categoryName}}{{/ items}}{{/ parentSC}}</div> -->
<div class="col-sm-8 height40">
[[each parentSC as a index]]
[[a.categoryName]]
[[each a.items as b index]]
-[[b.categoryName]]
[[/each]]
[[/each]]
[[if subCategoryName]]
[[if parentSC.length>0]]
-
[[/if]]
[[subCategoryName]]
[[/if]]
</div>
<div class="form-group" style="padding-top: 0">
<label class="col-sm-2 control-label">父分类:</label>
<div class="col-sm-8 height40">[[parentName]]</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">分类名称</label>
<div class="col-sm-8"><input type="text" id="categoryName" name="categoryName" class="form-control" placeholder="分类名称" value="[[categoryName]]"></div>
<label class="col-sm-2 control-label">分类名称:</label>
<div class="col-sm-8">
<div class="form-inline">
<input type="text" id="categoryName" name="categoryName" class="form-control" placeholder="分类名称" value="[[categoryName]]" style="width: 450px">
<label style="color: #ff0000; line-height: 40px; margin-left: 15px"> * 必填</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">分类图标</label>
<label class="col-sm-2 control-label">分类图标</label>
<div class="col-sm-8"><input type="file" id="icon" name="icon" value="[[icon]]" placeholder="分别图标"></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">物理类目关联</label>
<div class="form-group" style="margin-bottom: 40px">
<label class="col-sm-2 control-label">物理类目关联:</label>
<div class="col-sm-8 sort-wrap">
<div class="row">
<div class="col-sm-10">
... ... @@ -97,10 +88,6 @@
<input id="orderBy" type="hidden" value="[[orderBy]]">
</form>
</div>
<div class="panel-footer">
<a id="save_brand" data-loading-text="保存中..." class="btn btn-primary" href="javascript:;">保存</a>
<a href="javascript:;" onclick="history.go(-1);" class="btn btn-danger">取消</a>
</div>
</div>
</script>
... ... @@ -119,8 +106,8 @@
<script type="text/template" id="tableHdTemp">
<div class="level-hd clearfix">
<span class="folder"></span>
<span>ID</span>
<span>品类名称</span>
<span style="width: 5%">ID</span>
<span style="width: 20%">品类名称</span>
<span>所属分类</span>
<span>分类图标</span>
<span class="orderby">排序</span>
... ... @@ -231,17 +218,19 @@
<script type="text/template" id="tableTemp2">
<span class="folder"></span>
<span>[[categoryId]]</span>
<span>[[categoryName]]</span>
<span style="width: 5%">[[categoryId]]</span>
<span style="width: 20%">[[categoryName]]</span>
<span>[[levelNumber]]级分类</span>
<span><img src="[[icon]]" alt=""></span>
<span class="orderby"> <input type="text" class="form-control saleCategoryNumInput" value="[[orderBy]]" categoryId="[[categoryId]]" /></span>
<span class="status">[[if state=="1"]]<b style="color: #449d44">开启</b> [[/if]][[if state=="0"]]<b style="color: #d9534f">关闭</b>[[/if]]</span>
<span class="status">[[if state=="1"]]<b style="color: #449d44">开启</b>[[/if]][[if state=="0"]]<b style="color: #d9534f">关闭</b>[[/if]]</span>
<span class="operate" data-id="[[categoryId]]" data-name="[[categoryName]]">
<a class="btn btn-info btn-xs edit-btn" href="javascript:;">编辑</a>
<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[categoryId]]">标签管理</a>
<a class="btn btn-info btn-xs add-sub-category" href="javascript:;">添加子分类</a>
<a class="btn btn-primary btn-xs add-sub-category" href="javascript:;">添加子分类</a>
<b class="openAndClose" data-id="[[categoryId]]" data-name="[[categoryName]]">
[[if state=="1"]]<a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>[[/if]]
[[if state=="0"]]<a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>[[/if]]
</b>
</span>
</script>
... ...
... ... @@ -23,13 +23,14 @@
<div class="contentpanel">
<div class="panel panel-default" style="margin:10px 0;">
<div class="panel panel-default">
<div class="panel-body nopadding">
<div class="state-select">
<div class="state-select" style="position: relative">
<strong>状态:</strong>
<label><input type="radio" name="state" value="">全部</label>
<label class="current"><input type="radio" name="state" value="1">开启</label>
<label class="current"><input type="radio" name="state" value="">全部</label>
<label><input type="radio" name="state" value="1">开启</label>
<label><input type="radio" name="state" value="0">关闭</label>
<button type="button" class="btn btn-primary" onclick="location.href='/sale/category/index'" style="position: absolute; top: 2px; right: 20px"> 返回 </button>
</div>
</div>
</div>
... ... @@ -41,12 +42,9 @@
<input id="categoryId" type="hidden" value="{{categoryId}}">
{{/ data}}
</div>
<div class="panel-footer">
<button id="save_brand" type="submit" data-loading-text="保存中..." class="btn btn-primary">保存</button>
<a href="javascript:;" onclick="history.go(-1);" class="btn btn-danger">取消</a>
</div>
</div>
</div>
... ...
... ... @@ -16,44 +16,43 @@
<tr>
<td>
[[index+1]]
<!--<input type="hidden" value="[[index]]" data-field="[[index]].imgId">-->
</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="[[index]].src"/>
</td>
<td>
<div class="form-group col-sm-12">
<div class="form-group ">
<select name="goTo" class="form-control observe" value="[[item.url.action]]"
data-field="[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="form-group col-sm-12">
<div class="form-group ">
<input value="[[item.url.url]]" class="form-control observe" required="required"
data-field="[[index]].url.url" placeholder="图片链接"/>
<p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
</div>
<div class="form-group col-sm-12">
<div class="form-group ">
<input value="[[item.alt]]" class="form-control observe" required="required"
data-field="[[index]].alt" placeholder="图片描述"/>
</div>
[[if contentData.template_name=='addfloor']]
<div class="form-group col-sm-12">
<div class="form-group ">
<input value="[[item.altEn]]" class="form-control observe" required="required"
data-field="[[index]].altEn" placeholder="英文描述"/>
</div>
[[/if]]
</td>
<td>
<a class="btn btn-danger" id="icon-delOne" data_index="[[index]]">删除</a>
<a class="btn btn-danger delBtn" data-event="icon.data" data_index="[[index]]">删除</a>
</td>
</tr>
[[/each]]
</tbody>
</table>
</div>
<a href="JavaScript:;" id="icon-addOne" class="btn btn-primary btn-xs">添加一个</a>
<a href="JavaScript:;" data-event="icon.data" class="btn btn-primary btn-xs addBtn">添加一个</a>
</div>
</script>
<!-- 推荐品牌-->
... ... @@ -68,12 +67,13 @@
data-field="title.title" placeholder="推荐品牌">
</div>
<label class="col-sm-1 control-label">显示名称</label>
<div class="col-sm-4 is_show_name_brand ">
<label style="cursor: pointer;"><input type="radio" name="is_show_name" value="Y"></label>
<label style="cursor: pointer;"><input type="radio" name="is_show_name" value="N"></label>
<div class="col-sm-4">
<label style="cursor: pointer;">
<input type="radio" name="is_show_name_brand" class="is_show_name_brand" value="Y"></label>
<label style="cursor: pointer;">
<input type="radio" name="is_show_name_brand" class="is_show_name_brand" value="N"></label>
</div>
<input type="hidden" id="is_show_name" value="[[contentData.data.is_show_name]]" for="radio"/>
<input type="hidden" id="is_show_name_brand" value="[[contentData.data.is_show_name]]" for="radio"/>
</div>
[[/if]]
[[if contentData.template_name=='customBrands']]
... ... @@ -183,7 +183,7 @@
</div>
</td>
<td>
<a class="btn btn-danger" id="remove_brand" data_index="[[index]]">删除</a>
<a class="btn btn-danger delBtn" data-event="brands.list" data_index="[[index]]">删除</a>
</td>
</tr>
[[/each]]
... ... @@ -248,7 +248,7 @@
data-field="more_name">
</div>
</div>
<div class="form-group col-sm-12">
<div class="form-group ">
<label class="col-sm-1 control-label">跳转目的</label>
<div class="col-sm-4">
... ... @@ -310,7 +310,7 @@
</tbody>
</table>
</div>
<a href="JavaScript:;" id="nav-addOne" class="btn btn-primary btn-xs">添加一个</a>
<a href="JavaScript:;" data-event="title.nav" class="btn btn-primary btn-xs addBtn">添加一个</a>
</div>
</script>
<!-- 领券频道 -->
... ... @@ -330,7 +330,7 @@
<td>
<div class="form-group">
<input type="file" name="file" value="[[item.image.src]]" class="form-control observe"
data-field="[[index]].image.src"/>
data-field="[[index]].image.src" required placeholder="图片"/>
</div>
</td>
<td>
... ... @@ -348,7 +348,7 @@
</div>
<div class="form-group">
<input value="[[item.image.url.url]]" class="form-control observe" required="required"
data-field="[[index]].image.url.url" placeholder="图片链接"/>
data-field="[[index]].image.url.url" placeholder="图片链接" type="text"/>
<p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
</div>
... ... @@ -358,7 +358,7 @@
</tbody>
</table>
</div>
<a href="JavaScript:;" id="coupon-addOne" class="btn btn-primary btn-xs">添加一个</a>
<a href="JavaScript:;" id="coupon-addOne" data-event="getCoupon.data" data-limit="4" class="btn btn-primary btn-xs addBtn">添加一个</a>
</div>
</script>
... ...
<!--领券楼层-->
<!--<script type="text/template" id="getCoupon-template">-->
<!--<p>-->
<!--标题:<input type="text" class="observe" data-field="title.title" value="[[contentData.data.title]]" style="width:100px;">-->
<!--是否显示: <input type="radio" name="isShow" class="isShow" value="YES"> 是 <input type="radio" name="isShow" class="isShow" value="NO"> 否 &nbsp;&nbsp;&nbsp;&nbsp;-->
<!--<input type="hidden" id="isShow" for="radio" value="[[contentData.data.isShow]]" />-->
<!--</p>-->
<!--</script>-->
<!-- 标题图片 -->
<script type="text/template" id="titleImage-template">
<div class="panel-body" id="titleImage-baseFrom">
<div class="form-group">
<label class="col-sm-2 control-label">标题:</label>
<div class="col-sm-4">
<input type="text" class="form-control observe" data-field="title" value="[[contentData.data.title]]" required="required">
<input type="text" class="form-control observe" placeholder="标题" data-field="title" value="[[contentData.data.title]]" required="required">
</div>
<label class="col-sm-2 control-label">更多名称</label>
<div class="col-sm-4">
<input type="text" data-field="more_name" value="[[contentData.data.more_name]]" class="form-control observe">
<input type="text" data-field="more_name" placeholder="更多名称" value="[[contentData.data.more_name]]" class="form-control observe">
</div>
</div>
<div class="form-group">
... ... @@ -28,7 +20,7 @@
</div>
<label class="col-sm-2 control-label">跳转地址</label>
<div class="col-sm-4">
<input value="[[contentData.data.more_url.url]]" data-field="more_url.url" class="form-control observe" required="required" />
<input value="[[contentData.data.more_url.url]]" placeholder="url" data-field="more_url.url" class="form-control observe" required="required" />
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</div>
... ... @@ -44,7 +36,7 @@
<tbody>
<tr>
<td>1</td>
<td><input type="file" name="file" value="[[contentData.data.image.src]]" data-field="image.src" class="observe" required="required"/></td>
<td><input type="file" name="file" placeholder="图片" value="[[contentData.data.image.src]]" data-field="image.src" class="observe" required="required"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="form-control observe" data-field="image.url.action" value="[[contentData.data.image.url.action]]" >
... ... @@ -52,7 +44,7 @@
</select>
</div>
<div class="col-sm-12">
<input type="text" value="[[contentData.data.image.url.url]]" class="form-control observe" data-field="image.url.url" required="required" />
<input type="text" value="[[contentData.data.image.url.url]]" placeholder="url" class="form-control observe" data-field="image.url.url" required="required" />
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</td>
... ... @@ -68,16 +60,16 @@
<div class="form-group">
[[each contentData.data.label as item index]]
<label class="control-label">标签[[index+1]]:</label>
<input type="text" class="observe" value="[[item.title]]" data-field="label.[[index]].title" required="required" style="width: 100px">
<input type="text" class="observe" placeholder="名称" value="[[item.title]]" data-field="label.[[index]].title" required="required" style="width: 100px">
<label class="control-label">跳转目的</label>
<select name="goTo" class="observe" value="[[item.url.action]]" data-field="label.[[index]].url.action" style="width: 120px" >
[[layout action_template]]
</select>
<label>跳转地址</label>
<input type="text" class="observe" value="[[item.url.url]]" data-field="label.[[index]].url.url" required="required" style="width: 120px" /><br>
<input type="text" class="observe" placeholder="跳转地址" value="[[item.url.url]]" data-field="label.[[index]].url.url" required="required" style="width: 120px" /><br>
[[/each]]
</div>
<a href="JavaScript:;" id="multiLabelImage-addOne" class="btn btn-primary btn-xs">添加标签</a>
<a href="JavaScript:;" class="btn btn-primary btn-xs addBtn" data-event="multiLabelImage.label">添加标签</a>
<div>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
... ... @@ -99,7 +91,7 @@
</select>
</div>
<div class="col-sm-12">
<input type="text" value="[[item.url.url]]" class="form-control observe" data-field="image.[[index]].url.url" required="required" />
<input type="text" placeholder="url" value="[[item.url.url]]" class="form-control observe" data-field="image.[[index]].url.url" required="required" />
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</td>
... ... @@ -108,7 +100,7 @@
</tbody>
</table>
</div>
<a href="JavaScript:;" id="multiLabelImage-addImage" class="btn btn-primary btn-xs">添加图片</a>
<a href="JavaScript:;" class="btn btn-primary btn-xs addBtn" data-event="multiLabelImage.image">添加图片</a>
</div>
</script>
<!--搭配(2T-nF)-->
... ... @@ -117,11 +109,11 @@
<div class="form-group">
<label class="col-sm-2 control-label">标题:</label>
<div class="col-sm-4">
<input type="text" class="form-control observe" data-field="title.name" value="[[contentData.data.title.name]]" required="required" >
<input type="text" placeholder="标题" class="form-control observe" data-field="title.name" value="[[contentData.data.title.name]]" required="required" >
</div>
<label class="col-sm-2 control-label">更多名称</label>
<div class="col-sm-4">
<input type="text" value="[[contentData.data.title.more_name]]" data-field="title.more_name" class="form-control observe" >
<input type="text" placeholder="更多名称" value="[[contentData.data.title.more_name]]" data-field="title.more_name" class="form-control observe" >
</div>
</div>
<div class="form-group">
... ... @@ -133,7 +125,7 @@
</div>
<label class="col-sm-2 control-label">跳转地址</label>
<div class="col-sm-4">
<input value="[[contentData.data.title.more_url.url]]" class="form-control observe" required="required" data-field="title.more_url.url" />
<input value="[[contentData.data.title.more_url.url]]" placeholder="url" class="form-control observe" required="required" data-field="title.more_url.url" />
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</div>
... ... @@ -158,7 +150,7 @@
</select>
</div>
<div class="col-sm-12">
<input type="text" value="[[item.url.url]]" class="form-control observe" data-field="top_image.[[index]].url.url" required="required" />
<input type="text" placeholder="url" value="[[item.url.url]]" class="form-control observe" data-field="top_image.[[index]].url.url" required="required" />
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</td>
... ... @@ -175,7 +167,7 @@
</select>
</div>
<div class="col-sm-12">
<input type="text" value="[[item.url.url]]" class="form-control observe" data-field="list.[[index]].url.url" required="required" />
<input type="text" placeholder="url" value="[[item.url.url]]" class="form-control observe" data-field="list.[[index]].url.url" required="required" />
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</td>
... ... @@ -184,7 +176,7 @@
</tbody>
</table>
</div>
<a href="JavaScript:;" id="matchImage-addOne" class="btn btn-primary btn-xs">添加一个</a>
<a href="JavaScript:;" class="btn btn-primary btn-xs addBtn" data-event="matchImage.list">添加一个</a>
</div>
</script>
<!--推荐-->
... ... @@ -195,11 +187,11 @@
<div class="form-group">
<label class="col-sm-2 control-label">标题:</label>
<div class="col-sm-4">
<input type="text" class="form-control observe" value="[[contentData.data.title.name]]" required="required" data-field="title.name">
<input type="text" placeholder="标题" class="form-control observe" value="[[contentData.data.title.name]]" required="required" data-field="title.name">
</div>
<label class="col-sm-2 control-label">更多名称</label>
<div class="col-sm-4">
<input type="text" value="[[contentData.data.title.more_name]]" class="form-control observe" data-field="title.more_name">
<input type="text" placeholder="更多名称" value="[[contentData.data.title.more_name]]" class="form-control observe" data-field="title.more_name">
</div>
</div>
<div class="form-group">
... ... @@ -211,7 +203,7 @@
</div>
<label class="col-sm-2 control-label">跳转地址</label>
<div class="col-sm-4">
<input type="text" value="[[contentData.data.title.more_url.url]]" class="form-control observe" required="required" data-field="title.more_url.url"/>
<input type="text" placeholder="url" value="[[contentData.data.title.more_url.url]]" class="form-control observe" required="required" data-field="title.more_url.url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</div>
... ... @@ -220,11 +212,10 @@
<div class="form-group">
<label class="col-sm-2 control-label">标题:</label>
<div class="col-sm-4">
<input type="text" class="form-control observe" value="[[contentData.data.title.title]]" required="required" data-field="title.title">
<input type="text" placeholder="标题" class="form-control observe" value="[[contentData.data.title.title]]" required="required" data-field="title.title">
</div>
<label class="col-sm-4 control-label">是否显示
<input type="checkbox" name="is_show" value="1" id="recommendContentFive-is_show">
<input type="hidden" id="is_show" for="checkbox" value="[[contentData.data.title.is_show]]" />
<input type="checkbox" name="is_show" value="1" id="recommendContentFive-is_show" [[contentData.data.title.is_show==1?'checked':'']]>
</label>
</div>
[[/if]]
... ... @@ -250,7 +241,7 @@
</select>
</div>
<div class="col-sm-12">
<input value="[[item.url.url]]" class="form-control observe" required="required" data-field="big_image.[[index]].url.url"/>
<input value="[[item.url.url]]" placeholder="url" class="form-control observe" required="required" data-field="big_image.[[index]].url.url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</td>
... ... @@ -272,7 +263,7 @@
</select>
</div>
<div class="col-sm-12">
<input value="[[item.url.url]]" class="form-control observe" required="required" data-field="list.[[index]].url.url"/>
<input value="[[item.url.url]]" placeholder="url" class="form-control observe" required="required" data-field="list.[[index]].url.url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</td>
... ... @@ -287,7 +278,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">左边图片标题:</label>
<div class="col-sm-4">
<input type="text" class="observe form-control" data-field="left.title" value="[[contentData.data.left.title]]" required="required">
<input type="text" placeholder="左边图片标题" class="observe form-control" data-field="left.title" value="[[contentData.data.left.title]]" required="required">
</div>
</div>
<table class="table table-hover table-bordered responsive dataTable no-footer">
... ... @@ -324,7 +315,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">右边图片标题:</label>
<div class="col-sm-4">
<input type="text" class="observe form-control" data-field="right.title" value="[[contentData.data.right.title]]" required="required">
<input type="text" class="observe form-control" placeholder="右边图片标题" data-field="right.title" value="[[contentData.data.right.title]]" required="required">
</div>
</div>
<table class="table table-hover table-bordered responsive dataTable no-footer">
... ... @@ -362,9 +353,9 @@
<!--图片广告-->
<script type="text/template" id="imageGroup-template">
<div class="panel-body" id="imageGroup-baseFrom">
<p>标题设置:<input name="title" type="text" class="observe" value="[[contentData.data.title]]" data-field="title" required>更多设置:<input type="text" class="observe" style="width:120px;" value="[[contentData.data.more]]" data-field="more"></p>
<p>标题设置:<input name="title" type="text" class="observe" placeholder="标题" value="[[contentData.data.title]]" data-field="title" required>更多设置:<input type="text" placeholder="更多" class="observe" style="width:120px;" value="[[contentData.data.more]]" data-field="more"></p>
<p>
更多链接 : <input type="text" value="[[contentData.data.more_url]]" class="observe" required="required" data-field="more_url" />
更多链接 : <input type="text" placeholder="更多链接" value="[[contentData.data.more_url]]" class="observe" required="required" data-field="more_url" />
</p>
<p>样式设置:
<select name="image_style" value="[[contentData.data.image_style]]" data-field="image_style" class="observe">
... ... @@ -402,7 +393,7 @@
</select>
</div>
<div class="col-sm-12">
<input value="[[item.url.url]]" class="form-control observe" required="required" data-field="list.[[index]].url.url"/>
<input value="[[item.url.url]]" placeholder="url" class="form-control observe" required="required" data-field="list.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.url.title]]" data-field="list.[[index]].url.title" class="form-control observe" required="required" />
... ... @@ -413,7 +404,7 @@
</tbody>
</table>
</div>
<a href="JavaScript:;" id="imageGroup-addOne" class="btn btn-primary btn-xs">添加图片</a>
<a href="JavaScript:;" class="btn btn-primary btn-xs addBtn" data-event="imageGroup.list">添加图片</a>
</div>
</script>
<!--自定义参数-->
... ... @@ -422,17 +413,17 @@
<div class="form-group">
<label class="col-sm-2 control-label">标题设置:</label>
<div class="col-sm-4">
<input type="text" class="form-control observe" value="[[contentData.data.title]]" required="required" data-field="title">
<input type="text" placeholder="标题" class="form-control observe" value="[[contentData.data.title]]" required="required" data-field="title">
</div>
<label class="col-sm-2 control-label">更多设置:</label>
<div class="col-sm-4">
<input type="text" value="[[contentData.data.more]]" class="form-control observe" data-field="more">
<input type="text" placeholder="更多" value="[[contentData.data.more]]" class="form-control observe" data-field="more">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">跳转地址</label>
<div class="col-sm-4">
<input value="[[contentData.data.more_url.url]]" class="form-control observe" required="required" data-field="more_url.url"/>
<input type="text" placeholder="url" value="[[contentData.data.more_url.url]]" class="form-control observe" required="required" data-field="more_url.url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</div>
... ... @@ -443,9 +434,9 @@
<table style="width:100%;z-index:-1;">
<tbody>
<tr>
<td width="100px">标题:<input type="text" required style="width: 60px;" class="observe" value="[[item.title]]" data-field="list.[[index]].title"></td>
<td>参数:<input type="text" style="width:300px;" class="observe" value="[[item.params]]" data-field="list.[[index]].params"></td>
<td><button class="btn btn-danger btn-sm paramsGroupDel" type="button" data-index="[[index]]">删除</button></td>
<td width="100px">标题:<input type="text" placeholder="标题" required style="width: 60px;" class="observe" value="[[item.title]]" data-field="list.[[index]].title"></td>
<td>参数:<input type="text" placeholder="参数" style="width:300px;" class="observe" value="[[item.params]]" data-field="list.[[index]].params"></td>
<td><button class="btn btn-danger btn-sm delBtn" data-event="paramsGroup.list" type="button" data-index="[[index]]">删除</button></td>
</tr>
</tbody>
</table>
... ... @@ -453,7 +444,7 @@
</li>
[[/each]]
</ul>
<button type="button" class="btn btn-sm" id="paramsGroup-addOne">添加一个</button>
<button type="button" class="btn btn-sm addBtn" data-event="paramsGroup.list">添加一个</button>
</div>
</div>
</script>
... ... @@ -461,15 +452,15 @@
<script type="text/template" id="newUserFloor-template">
<div class="panel-body" id="newUserFloor-baseFrom">
<div class="new_user_floor">
<p>标题 : <input type="text" value="[[contentData.data.title.name]]" class="observe" data-field="title.name"> 更多名称 : <input type="text" value="[[contentData.data.title.more_name]]" style="width:50px;" class="observe" data-field="title.more_name"> </p>
<p>标题 : <input type="text" placeholder="标题" value="[[contentData.data.title.name]]" class="observe" data-field="title.name"> 更多名称 : <input type="text" placeholder="更多名称" value="[[contentData.data.title.more_name]]" style="width:50px;" class="observe" data-field="title.more_name"> </p>
<p>
更多链接 : <select name="goTo" class="observe" value="[[contentData.data.title.more_url.action]]" data-field="title.more_url.action">
[[layout action_template]]
</select>
<input value="[[contentData.data.title.more_url.url]]" class="observe" required="required" data-field="title.more_url.url"/>
<input type="text" placeholder="更多链接" value="[[contentData.data.title.more_url.url]]" class="observe" required="required" data-field="title.more_url.url"/>
</p>
<p>活动 ID <input type="text" class="observe" value="[[contentData.data.title.active_id]]" data-field="title.active_id"></p>
<p><input type="button" class="btn btn-info btn-xs" value="添加banner" style="margin:10px;" id="newUserFloor-addBanner"></p>
<p>活动 ID <input type="text" placeholder="活动id" class="observe" value="[[contentData.data.title.active_id]]" data-field="title.active_id"></p>
<p><input type="button" class="btn btn-info btn-xs addBtn" value="添加banner" style="margin:10px;" data-event="newUserFloor.banner_image"></p>
</div>
<div id="newUserFloor-bottom">
<table class="table table-hover table-bordered responsive dataTable no-footer">
... ... @@ -492,10 +483,10 @@
</select>
</div>
<div class="col-sm-12">
<input value="[[item.url.url]]" class="form-control observe" required="required" data-field="banner_image.[[index]].url.url"/>
<input type="text" placeholder="url" value="[[item.url.url]]" class="form-control observe" required="required" data-field="banner_image.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="form-control observe" required="required" data-field="banner_image.[[index]].title"/>
<input type="text" placeholder="图片描述" value="[[item.title]]" class="form-control observe" required="required" data-field="banner_image.[[index]].title"/>
</div>
</td>
</tr>
... ... @@ -509,7 +500,7 @@
<script type="text/template" id="debrisSlider-template">
<div class="panel-body" id="debrisSlider-baseFrom">
<div class="debris_slider">
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加左图" style="margin:10px;" id="debrisSlider-addLeft"></p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs addBtn" value="添加左图" style="margin:10px;" data-event="debrisSlider.left"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
... ... @@ -540,7 +531,7 @@
[[/each]]
</tbody>
</table>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加中间图" style="margin:10px;" id="debrisSlider-addCenter"></p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs addBtn" value="添加中间图" style="margin:10px;" data-event="debrisSlider.big_image"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
... ... @@ -571,7 +562,7 @@
[[/each]]
</tbody>
</table>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加右图" style="margin:10px;" id="debrisSlider-addRight"></p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs addBtn" value="添加右图" style="margin:10px;" data-event="debrisSlider.right"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
... ... @@ -592,10 +583,10 @@
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="right.[[index]].url.url"/>
<input type="text" placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="right.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="right.[[index]].title"/>
<input type="text" placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="right.[[index]].title"/>
</div>
</td>
</tr>
... ... @@ -610,14 +601,14 @@
<div class="form-group">
<label class="col-sm-2 control-label">标题:</label>
<div class="col-sm-4">
<input type="text" class="form-control observe" value="[[contentData.data.title.title]]" required="required" data-field="title.title">
<input type="text" placeholder="标题" class="form-control observe" value="[[contentData.data.title.title]]" required="required" data-field="title.title">
</div>
<label class="col-sm-4 control-label">是否显示
<input type="checkbox" name="editorTalkIs_show" value="1" id="editorTalk-is_show">
<input type="checkbox" name="editorTalkIs_show" value="1" id="editorTalk-is_show" [[contentData.data.title.is_show==1?'checked':'']]>
<input type="hidden" id="editorTalkIs_show" for="checkbox" value="[[contentData.data.title.is_show]]" />
</label>
</div>
<p><input type="button" class="btn btn-info btn-xs" value="添加标签" style="margin:10px;" id="editorTalk-addOne"></p>
<p><input type="button" class="btn btn-info btn-xs addBtn" value="添加标签" style="margin:10px;" data-event="editorTalk.list"></p>
[[if contentData.data.list.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
... ... @@ -635,7 +626,7 @@
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<input placeholder="标签名称" value="[[item.title]]" class="observe form-control" required="required" data-field="list.[[index]].title"/>
<input type="text" placeholder="标签名称" value="[[item.title]]" class="observe form-control" required="required" data-field="list.[[index]].title"/>
</div>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="list.[[index]].url.action">
... ... @@ -643,10 +634,10 @@
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="list.[[index]].url.url"/>
<input type="text" placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="list.[[index]].url.url"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm editorTalk-del" type="button" data-index="[[index]]">删除</button></td>
<td><button class="btn btn-danger btn-sm delBtn" data-event="editorTalk.list" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
... ... @@ -657,13 +648,13 @@
<script type="text/template" id="hotCategory-template">
<div class="hotCategory">
<p>
标题 : <input type="text" class="observe" data-field="title.name" value="[[contentData.data.title.name]]" required> 更多名称 : <input type="text" class="observe" data-field="title.more_name" value="[[contentData.data.title.more_name]]" style="width:50px;"><br>
标题 : <input type="text" placeholder="标题" class="observe" data-field="title.name" value="[[contentData.data.title.name]]" required> 更多名称 : <input type="text" placeholder="更多名称" class="observe" data-field="title.more_name" value="[[contentData.data.title.more_name]]" style="width:50px;"><br>
跳转目的 : <select name="goTo" class="observe" value="[[contentData.data.title.more_url.action]]" data-field="title.more_url.action">
[[layout action_template]]
</select>
跳转url : <input value="[[contentData.data.title.more_url.url]]" class="observe" required="required" data-field="title.more_url.url"/>
跳转url : <input type="text" value="[[contentData.data.title.more_url.url]]" class="observe" required="required" data-field="title.more_url.url"/>
</p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加左上图片" style="margin:10px;" id="hotCategory-addLeft"></p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs addBtn" value="添加左上图片" style="margin:10px;" data-event="hotCategory.blocks"></p>
[[if contentData.data.blocks.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
... ... @@ -686,13 +677,13 @@
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="blocks.[[index]].url.url"/>
<input type="text" placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="blocks.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="blocks.[[index]].title"/>
<input type="text" placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="blocks.[[index]].title"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm hotCategory-delLeft" type="button" data-index="[[index]]">删除</button></td>
<td><button class="btn btn-danger btn-sm delBtn" data-event="hotCategory.blocks" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
... ... @@ -701,15 +692,15 @@
<p>添加左下导航:</p>
[[each contentData.data.list as item index]]
<p>
导航名称:<input type="text" class="observe" value="[[item.name]]" data-field="list.[[index]].name">
导航名称:<input type="text" placeholder="导航名称" class="observe" value="[[item.name]]" data-field="list.[[index]].name">
<select name="goTo" class="observe" value="[[item.url.action]]" data-field="list.[[index]].url.action">
[[layout action_template]]
</select>
<input value="[[item.url.url]]" class="observe" required="required" data-field="list.[[index]].url.url"/>
<input type="text" placeholder="url" value="[[item.url.url]]" class="observe" required="required" data-field="list.[[index]].url.url"/>
</p>
[[/each]]
<p>
<input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加右侧图片" style="margin:10px;" id="hotCategory-addRight">
<input type="button" name="select-pic" class="btn btn-info btn-xs addBtn" value="添加右侧图片" style="margin:10px;" data-event="hotCategory.imgs">
</p>
[[if contentData.data.imgs.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
... ... @@ -733,13 +724,13 @@
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="imgs.[[index]].url.url"/>
<input type="text" placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="imgs.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="imgs.[[index]].title"/>
<input type="text" placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="imgs.[[index]].title"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm hotCategory-delRight" type="button" data-index="[[index]]">删除</button></td>
<td><button class="btn btn-danger btn-sm delBtn" data-event="hotCategory.imgs" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
... ... @@ -750,12 +741,13 @@
<!--图片列表-->
<script type="text/template" id="imageList-template">
<p>
标题:<input type="text" class="observe" data-field="title.title" value="[[contentData.data.title.title]]" style="width:100px;">
显示名称: <input type="radio" name="is_show_name" class="is_show_name" value="Y"> <input type="radio" name="is_show_name" class="is_show_name" value="N"> &nbsp;&nbsp;&nbsp;&nbsp;
标题:<input type="text" placeholder="标题" class="observe" data-field="title.title" value="[[contentData.data.title.title]]" style="width:100px;">
显示名称: <input type="radio" name="is_show_name" class="is_show_name" value="Y" [[contentData.data.title.is_show_name=="Y"?"checked":""]]>
<input type="radio" name="is_show_name" class="is_show_name" value="N" [[contentData.data.title.is_show_name=="N"?"checked":""]]> &nbsp;&nbsp;&nbsp;&nbsp;
<input type="hidden" id="is_show_name" for="radio" value="[[contentData.data.title.is_show_name]]" />
每行显示:<input style="width:60px;" type="number" data-field="title.column_num" class="observe" value="[[contentData.data.title.column_num]]"> 张图片
</p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加图片" style="margin:10px;" id="imageList-addOne"></p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs addBtn" value="添加图片" style="margin:10px;" data-event="imageList.list"></p>
[[if contentData.data.list.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
... ... @@ -778,13 +770,13 @@
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="list.[[index]].url.url"/>
<input type="text" placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="list.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" data-field="list.[[index]].title"/>
<input type="text" placeholder="图片描述" value="[[item.title]]" class="observe form-control" data-field="list.[[index]].title"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm imageList-del" type="button" data-index="[[index]]">删除</button></td>
<td><button class="btn btn-danger btn-sm delBtn" data-event="imageList.list" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
... ... @@ -794,23 +786,23 @@
<!--文本导航-->
<script type="text/template" id="textNav-template">
<div class="textNav-baseForm">
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加一个" style="margin:10px;" id="textNav-addOne"></p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs addBtn" value="添加一个" style="margin:10px;" data-event="textNav.data"></p>
[[each contentData.data as item index]]
<p>
导航名称:<input type="text" value="[[item.name]]" class="observe" data-field="[[index]].name" required>
导航名称:<input type="text" placeholder="导航名称" value="[[item.name]]" class="observe" data-field="[[index]].name" required="required">
<select name="goTo" class="observe" value="[[item.url.action]]" data-field="[[index]].url.action">
[[layout action_template]]
</select>
<input value="[[item.url.url]]" data-field="[[index]].url.url" class="observe" required="required"/>
<a type="button" class="btn btn-danger btn-xs textNav-delOne" data-index="[[index]]">删除</a>
<input type="text" placeholder="url" value="[[item.url.url]]" data-field="[[index]].url.url" class="observe" required="required"/>
<a type="button" class="btn btn-danger btn-xs delBtn" data-event="textNav.data" data-index="[[index]]">删除</a>
</p>
[[/each]]
</div>
</script>
<!--轮播banner-->
<script type="text/template" id="carouselBanner-template">
<input type="button" name="select-pic" value="添加图片" class="btn btn-info btn-xs" style="margin:10px;" id="carouselBanner-addOne">
  轮播速度:<input type="text" class="observe" data-field="speed" value="[[contentData.data.speed]]"><br>
<input type="button" name="select-pic" value="添加图片" class="btn btn-info btn-xs addBtn" style="margin:10px;" data-event="carouselBanner.list">
  轮播速度:<input type="text" placeholder="轮播速度" class="observe" data-field="speed" value="[[contentData.data.speed]]"><br>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
... ... @@ -824,7 +816,7 @@
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/></td>
<td><button class="btn btn-danger btn-sm carouselBanner-del" type="button" data-index="[[index]]">删除</button></td>
<td><button class="btn btn-danger btn-sm delBtn" type="button" data-event="carouselBanner.list" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
... ... @@ -832,11 +824,11 @@
</script>
<!--添加促销-->
<script type="text/template" id="promotion-template">
<p> 添加促销id<input type="text" class="observe" value="[[contentData.data.promotionId]]" data-field="promotionId"></p>
<p> 添加促销id<input type="text" placeholder="促销id" class="observe" value="[[contentData.data.promotionId]]" data-field="promotionId"></p>
</script>
<!--标题广告-->
<script type="text/template" id="singleNameImage-template">
<p style="margin:10px;">添加标题: <input type="text" class="observe" value="[[contentData.data.title]]" data-field="title"></p>
<p style="margin:10px;">添加标题: <input type="text" placeholder="标题" class="observe" value="[[contentData.data.title]]" data-field="title"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
... ... @@ -856,10 +848,10 @@
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[contentData.data.url.url]]" class="observe form-control" required="required" data-field="url.url"/>
<input type="text" placeholder="url" value="[[contentData.data.url.url]]" class="observe form-control" required="required" data-field="url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[contentData.data.alt]]" class="observe form-control" data-field="alt"/>
<input type="text" placeholder="图片描述" value="[[contentData.data.alt]]" class="observe form-control" data-field="alt"/>
</div>
</td>
</tr>
... ... @@ -868,7 +860,7 @@
</script>
<!--焦点图-->
<script type="text/template" id="focus-template">
<input type="button" class="btn btn-info btn-xs" id="focus-addOne" value="添加图片" style="margin:10px;"><br>
<input type="button" class="btn btn-info btn-xs addBtn" data-event="focus.data" value="添加图片" style="margin:10px;"><br>
焦点图类型:&nbsp;&nbsp;
<select id="focus-select" value="[[contentData.focus_type]]">
<option value="1">通栏</option>
... ... @@ -896,16 +888,16 @@
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="[[index]].url.url"/>
<input type="text" placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.alt]]" class="observe form-control" data-field="[[index]].alt"/>
<input type="text" placeholder="图片描述" value="[[item.alt]]" class="observe form-control" data-field="[[index]].alt"/>
</div>
<div class="col-sm-12">
<input placeholder="通栏背景色" value="[[item.bgColor]]" class="observe form-control" data-field="[[index]].bgColor"/>
<input type="text" placeholder="通栏背景色" value="[[item.bgColor]]" class="observe form-control" data-field="[[index]].bgColor"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm focus-del" type="button" data-index="[[index]]">删除</button></td>
<td><button class="btn btn-danger btn-sm delBtn" data-event="focus.data" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
... ... @@ -966,10 +958,10 @@
</select>
</div>
<div class="col-sm-12">
<input value="[[url.url]]" class="recommendContent-observe" required="required" data-rows="[[__index]]" data-index="[[index]]" data-observe="list-url" />
<input type="text" placeholder="url" value="[[url.url]]" class="recommendContent-observe" required="required" data-rows="[[__index]]" data-index="[[index]]" data-observe="list-url" />
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[url.title]]" class="recommendContent-observe" required="required" data-rows="[[__index]]" data-index="[[index]]" data-observe="list-url" />
<input type="text" placeholder="图片描述" value="[[url.title]]" class="recommendContent-observe" required="required" data-rows="[[__index]]" data-index="[[index]]" data-observe="list-url" />
</div>
</td>
<td><input type="button" value="更换图片" class="btn btn-info btn-xs change-big-pic" data-id=""> <input class="btn btn-danger btn-xs del-pic" type="button" value="删除" data-id=""></td>
... ...