Authored by 王钱钧

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

... ... @@ -159,11 +159,19 @@ if (window.NETSALEDATA) {
{ //尺寸信息
var sizeInfo = {};
if (window.NETSALEDATA.sizeInfo) {
sizeInfo = window.NETSALEDATA.sizeInfo;
var productSkn = window.NETSALEDATA.baseProductInfo.baseProduct.productSkn;
if(productSkn) {
common.util.__ajax({
url: '/meterManage/productSize/queryProdSizeList',
data: {
productSkn: productSkn
}
}, function (res) {
if (res.data.list && res.data.list.length > 0) {
$("#body").html(common.util.__template2($("#sizeinfo-template").html(), res.data.list[0]));
}
}, true);
}
$("#body").html(common.util.__template2($("#sizeifo-template").html(), sizeInfo));
}
... ...
... ... @@ -9,6 +9,11 @@ var param = location.href.match(/(info)\/(\d+)/);
//尺码列表
var modelLists = [];
common.util.__ajax({url: '/meterManage/tryInfo/info1', data: {productSkn: param[2]}}, function (data) {
var feelIds = {
1: "合适",
2: "偏大",
3: "偏小"
};
var infoLists = data.data || {};
modelLists = infoLists.tryModelList || [];
//如果存在试穿信息
... ... @@ -17,13 +22,12 @@ common.util.__ajax({url: '/meterManage/tryInfo/info1', data: {productSkn: param[
for (var i = 0; i < modelLists.length; i++) {
if (tryInfo[modelLists[i].id]) {
modelLists[i].tryInfo = {};
tryInfo[modelLists[i].id].feel_id = [tryInfo[modelLists[i].id].feel_id];
modelLists[i].tryInfo = tryInfo[modelLists[i].id];
modelLists[i].tryInfo.fell_name = feelIds[tryInfo[modelLists[i].id].feel_id];
}
else {
modelLists[i].tryInfo = {};
modelLists[i].tryInfo.fit_size = "";
modelLists[i].tryInfo.feel_id = "";
modelLists[i].tryInfo.fit_remark = "";
}
}
... ... @@ -48,22 +52,22 @@ $(document).on("change", ".tryInfo1", function () {
var name = $(this).data('name');
item[name] = $(this).val();
});
//保存试穿信息
$(document).on("click", "#addInfo", function () {
var newList = [];
for (var i = 0; i < modelLists.length; i++) {
newList[i]={};
newList[i] = {};
newList[i].model_id = modelLists[i].id;
if(modelLists[i].tryInfo){
if (modelLists[i].tryInfo) {
newList[i].feel_id = modelLists[i].tryInfo.feel_id;
newList[i].fit_size = modelLists[i].tryInfo.fit_size;
newList[i].fit_remark = modelLists[i].tryInfo.fit_remark;
}
else{
newList[i].feel_id ="";
else {
newList[i].feel_id = "";
newList[i].fit_size = "";
newList[i].fit_remark ="";
newList[i].fit_remark = "";
}
}
common.util.__ajax({
url: '/meterManage/tryInfo/add',
... ... @@ -71,10 +75,20 @@ $(document).on("click", "#addInfo", function () {
productSkn: param[2],
productModelTry: JSON.stringify(newList)
}
}, function () {
console.log("成功")
}, function (res) {
if (res.code == '200') {
window.location.href = "/meterManage/tryInfo/index"
}
else {
}
});
});
//返回
$(document).on("click", ".back", function () {
window.location.href = "/meterManage/tryInfo/index"
});
... ...
/**
* Created by ty on 2016/3/28.
* APP意见反馈管理
*/
var $ = require('jquery'),
common = require('../common/common'),
util = require('../common/util');
new common.edit("#filter").init();
new common.dropDown({el: "#isHot-filter"});
new common.dropDown({el: "#status-filter"});
new common.dropDown({el: "#source-filter"});
new common.dropDown({el: "#version-filter"});
new common.dropDown({el: "#clientType-filter"});
new common.dropDown({el: "#clientType-filter"});
var ENUM = {
status: {all: '全部', noReply: '未回复', replied: '已回复'},//全部
tips: {"all": 0, "noReply": 0, "replied": 0},
statusStr: {
0: '未回复',
1: '已回复'
}
}
var t = new common.tab({
el: "#basicTab",
click: function () {
g.init('/suggest/getSuggestList');
},
columns: [
{name: "all", display: "全部({all})"},
{name: "noReply", display: "未回复({noReply})"},
{name: "replied", display: "已回复({replied})"}
]
}).init(ENUM.tips);
// tab初始化
var loadTab = function () {
t.active = undefined;
setTimeout(function () {
common.util.__ajax({
url: "/base/goods/ajax/auditCount",
data: g.options.parms()
}, function (res) {
var __dt = $.extend({}, ENUM.tips, res.data);
t.init(__dt);
}, true);
}, 400);
}
loadTab();
var g = new common.grid({
el: "#basicTable",
parms: function () {
return {
uid: common.util.__input('uid-filter'),
status: common.util.__input('status-filter'),
clientType: common.util.__input('clientType-filter'),
startTime: common.util.__input('startTime'),
endTime: common.util.__input('endTime'),
isHot: common.util.__input('isHot-filter'),
appVersion: common.util.__input('appVersion-filter')
};
},
columns: [
{display: " ", type:"checkbox"},
{display: "UID", name: "uid"},
{display: "来源", name: "clientType", width: "56px"},
{display: "版本号", name: "appVersion", width:"56px"},
{display: "图片", name: "", render: function(item) {
if(item.imageUrl) {
return '<img src="' + item.imageUrl + '" height="70px" width="100px" />';
}
}},
{display: "反馈内容", name: "content", width:"20%"},
{display: "回复内容", name: "replyContent", width:"20%"},
{display: "时间", name: "createTime", width:"88px;"},
{display: "发送状态", name: "", width:"70px;",render: function(item) {
if (item.status == "0") {
return "未发送";
} else if (item.status == "1") {
return "未发送";
} else if (item.status == "2") {
return "已发送";
}
}},
{display: "状态",name: "", width:"56px;",render: function(item) {
if (item.status == "0") {
return "未回复";
} else if (item.status == "1") {
return "已回复";
} else if (item.status == "2") {
return "已回复";
}
}},
{
display: "操作",name: "", width:"156px;", render: function (item) {
var replyDisabled = item.status < 2 ? "" : "disabled";
var sendDisabled = item.status == 1 ? "" : "disabled";
var isHotDisabled = item.isHot == 0 ? "" : "disabled";
var arr = [];
arr.push('<button '+ replyDisabled + ' class="btn btn-primary btn-xs replyBtn" data-index="'+ item.__index +'">回</button>');
arr.push('<button '+ sendDisabled + ' class="btn btn-success btn-xs sendBtn" data-index="'+ item.__index +'">发</button>');
if(isHotDisabled) {
arr.push('<button ' + isHotDisabled + ' class="btn btn-warning btn-xs hotBtn" data-index="' + item.__index + '">热</button>');
} else {
arr.push('<button ' + isHotDisabled + ' class="btn btn-danger btn-xs hotBtn" data-index="' + item.__index + '">热</button>');
}
arr.push('<button class="btn btn-inverse btn-xs delBtn" data-index="'+ item.__index +'">删</button>');
return arr.join("");
}
}
]
});
g.init("/suggest/getSuggestList");
console.log(g);
var Bll = {
toast:function(url, item, hint) {
var e = new common.edit("#base-form");
common.dialog.confirm(hint,
common.util.__template2($("#reply-template").html(), item),
function() {
e.submit(url, function (option) {
option.success=function(res) {
if(res.data.code == 200) {
util.__tip(res.data.message, "success");
} else {
util.__tip(res.data.message);
}
g.reload();
};
option.error=function(res){
util.__tip(res.data.message);
};
});
});
e.init();
}
};
//设置回复
$(document).on('click', '.replyBtn', function() {
var item = g.rows[$(this).data("index")];
Bll.toast("/suggest/replySuggest", item, "回答反馈内容");
});
//设置热门
$(document).on('click', '.hotBtn', function() {
var item = g.rows[$(this).data("index")];
common.util.__ajax({
url: '/suggest/setHotSuggest',
data: {
id: item.id,
isHot: 1//只能设置热门
}
},function() {
g.reload();
},true);
});
//发送回复
$(document).on('click', '.sendBtn',function() {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("发送确认","是否确认发送?",function() {
common.util.__ajax({
url: '/suggest/publishSuggest',
data: {
id: item.id
}
},function() {
g.reload();
});
});
});
//删除一条记录
$(document).on('click', '.delBtn',function() {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("删除确认","是否确认删除?",function() {
common.util.__ajax({
url: '/suggest/deleteSuggest',
data: {
id: item.id
}
},function() {
g.reload();
});
});
});
$(document).on('click', '#filter-btn', function() {
g.reload(1);
loadTab();
});
\ No newline at end of file
... ...
... ... @@ -65,7 +65,7 @@ var Bll = {
}
g.reload();
};
option.error=function(){
option.error=function(res){
util.__tip(res.data.message);
};
});
... ...
... ... @@ -17,7 +17,7 @@ var g = new common.grid({
modelName: common.util.__input('content-filter1'),
englishName: common.util.__input('content-filter2'),
status: common.util.__input('status-filter'),
modelType: $("#aa").val()
modelType: parseInt($("#aa").val())
};
},
... ...
... ... @@ -61,27 +61,50 @@ var g = new common.grid({
]
});
g.init("/shotManage/proPhoto/index2");
var pictureBoList = [];
var Bll = {
toast: function (url, item, hint) {
var a = common.dialog.confirm(hint,
common.util.__template2($("#template1").html(), item),
function () {
common.util.__ajax({
url: url,
data: {
productSku: parseInt($("#Sku").val()),
productPhotoAddStrList: JSON.stringify(pictureBoList)
}
}, function (res) {
if (res.code == '200') {
g.reload();
a.close();
pictureBoList = [];
}
});
return false;
});
pictureBoList: [],
selectedBoId: [],
//重新渲染图片列表
rendBoList: function (pictureBoList) {
$(".image-list").html('');
$("#addPic").append(common.util.__template2($("#template2").html(),
{
pictureBoList: pictureBoList
}
));
},
toast: function (url, item, datacall) {
Bll.pictureBoList = item.pictureBoList || [];
Bll.selectedBoId = [];
var a = new common.dialog({
title: "图片",
width: '80%',
content: common.util.__template2($("#template1").html(), item),
button: [
{
value: "提交", callback: function () {
var data = datacall && datacall(Bll.pictureBoList, Bll.selectedBoId);
common.util.__ajax({
url: url,
data: data
}, function (res) {
if (res.code == '200') {
g.reload();
a.close();
}
});
return false;
}, css: "btn-primary"
},
{
"value":"取消",
css: "btn-info"
}
]
});
Bll.rendBoList(Bll.pictureBoList);
common.edit.ajaxfileupload(".picfile", {
params: {
__type: "upload",
... ... @@ -90,17 +113,13 @@ var Bll = {
valid_extensions: ['png', 'jpg', 'jpeg'],
onComplete: function (response) {
if (response.status && response.code == 200) {
//console.log("response",response);
console.log("response", response);
var data = {
"fileName": response.data,
"originalName": "1035027.jpg"
};
pictureBoList.push(data);
$("#addPic").html(common.util.__template2($("#template2").html(),
{
pictureBoList: pictureBoList
}
));
Bll.pictureBoList.push(data);
Bll.rendBoList(Bll.pictureBoList);
}
else {
common.util.__tip(response.message, 'warning');
... ... @@ -112,55 +131,39 @@ var Bll = {
};
//上传图片--点击事件
$('#upload-btn').on('click', function () {
var item = {};
Bll.toast('/shotManage/proPhoto/add', item, "上传图片");
var item = {
__state: "add"
};
Bll.toast('/shotManage/proPhoto/add', item, function (pictureBoList, selectedBoId) {
return {
productSku: parseInt($("#Sku").val()),
productPhotoAddStrList: JSON.stringify(pictureBoList)
}
});
});
//上传图片时 删除单张图片
//删除单张图片
$(document).on('click', '.remove1', function () {
var index = $(this).parents(".cover-image-item").index();
//界面删除
$(this).parents('.cover-image-item').remove();
//数组中删除
pictureBoList.splice(index, 1);
//console.log("pictureBoList", pictureBoList);
var index = $(this).data("index");
Bll.selectedBoId.push(Bll.pictureBoList[index].id);
Bll.pictureBoList.splice(index, 1);
Bll.rendBoList(Bll.pictureBoList);
});
//查询按钮--点击事件
$(document).on('click', '#filter-btn', function () {
g.reload(1);
});
var ids = [];
//编辑
$(document).on('click', '.update', function () {
var item = g.rows[$(this).data("index")];
var pics = item.pictureBoList || [];
console.log("pics",pics);
$(document).on('click', '.remove2', function () {
var index = $(this).parents(".cover-image-item").index();
//界面删除
$(this).parents('.cover-image-item').remove();
console.log(pics[index]);
console.log("pics[index].id",pics[index].id);
ids.push(pics[index].id);
pics.splice(index, 1);
item.__state = "update";
Bll.toast('/shotManage/proPhoto/update', item, function (pictureBoList, selectedBoId) {
return {
productSkn: item.productSkn,
ids: JSON.stringify(selectedBoId)
}
});
var b = common.dialog.confirm("编辑", common.util.__template2($("#template3").html(), item),
function () {
common.util.__ajax({
url: "/shotManage/proPhoto/update",
data: {
productSkn: item.productSkn,
ids: JSON.stringify(ids)
}
}, function (res) {
//console.log("res",res);
if (res.code == '200') {
g.reload();
ids = [];
}
});
})
});
//查询按钮--点击事件
$(document).on('click', '#filter-btn', function () {
g.reload(1);
});
... ...
... ... @@ -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
... ...
... ... @@ -21,71 +21,66 @@ var ENUM = {
"editor-newProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""},
"editor-hotProduct":{"productId":"", "position":"", "productName":"", "productPrice":"", "src":"", "url":""}
}; //添加一条不同弹层使用的初始化模板
var jsonNew = {
"shopsId":0,
"platform": "PC",
"templateName": "2",
"resources":{
"shopTopBanner":{
"id":"",
var resourcesNew = {
"shopTopBanner":{
"id":"",
"data": [{"shopSrc": "", "detailSrc": "", "isShowShopName": "Y"}]
},
"navigationBar":{
"id":"",
},
"navigationBar":{
"id":"",
"data": [{"name":"",url:""}, {"name":"",url:""}, {"name":"",url:""}]
},
"largeSlideImg":{
"id":"",
},
"largeSlideImg":{
"id":"",
"data": [
{"position": 5, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 4, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 3, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]}
]
},
"oneRowTwoColImages":{
"id":"",
{"position": 5, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 4, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 3, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]}
]
},
"oneRowTwoColImages":{
"id":"",
"data": [
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
]
},
"brandBrowse":{
"id":"",
{"position": 2, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
{"position": 1, "data":[{"src": "", "url": "", "startTime": "", "endTime": "", "publishStatus": 0}]},
]
},
"brandBrowse":{
"id":"",
"data": [{"position":1, "name":"", "src":"", "url":""}]
},
"recommend":{
"id":"",
},
"recommend":{
"id":"",
"title":"经典推荐",
"data": [{"position":1, "name":"", "enName":"", "src":"", "url":"","isShowInApp":"Y"},]
},
"hotRecommend":{
"id":"",
},
"hotRecommend":{
"id":"",
"title":"热销推荐",
"data": [{"position":1, "src":"", "url":""},]
},
"signboard":{
"id":"",
},
"signboard":{
"id":"",
"data": [{"position":1, "src":"", "url":"", "startTime": "", "endTime": "", "publishStatus": 0}]
},
"goodsTabBar":{
"id":"",
},
"goodsTabBar":{
"id":"",
"data": {
"new":[{"position":0, "name":"MORE", "url":""},],
"new":[{"position":0, "name":"MORE", "url":""},],
"hot":[{"position":0, "name":"MORE", "url":""},]
}
},
"newProducts":{
"id":"",
}
},
"newProducts":{
"id":"",
"data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},]
},
"hotProducts":{
"id":"",
},
"hotProducts":{
"id":"",
"data": [{"productId":"default", "position":1, "productName":"默认商品", "productPrice":"默认价格", "src":"", "url":""},]
}
}
}; //初始化json
} //初始化装修信息json
var _id, templateId, jsonMain, jsonClone, topNewProducts, topHotProducts;
getParams();
... ... @@ -106,13 +101,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 +137,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 +152,6 @@ function editorIconEvent(title,id){
}
}
);
gridInit(id);
untilEditorEvent(id);
editorTipInit(id);
... ... @@ -180,7 +177,7 @@ function findDecoration(){
}
if($.isEmptyObject(jsonMain.resources)){
jsonMain.resources = $.extend(true,{},jsonNew.resources);
jsonMain.resources = $.extend(true,{},resourcesNew);
}
jsonClone = $.extend(true,{},jsonMain);
... ... @@ -202,7 +199,6 @@ function findTopNewProducts(){
"size": 20
}
},function(rs){
console.log(rs.data);
topNewProducts = rs.data;
},true);
}
... ... @@ -239,125 +235,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,21 +355,12 @@ 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){
return "<input class='form-control inputChange' type=text name='name' value='"+item.name+"' data-index='"+item.__index+"' />";
return item.name;
}},
{display:"链接", render:function(item){
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+"' />";
}
return html;
}}
]
});
g.__rows=""||jsonClone.resources.brandBrowse.data;
... ... @@ -486,6 +374,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 +389,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 +421,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 +431,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 +456,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 +475,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 +503,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 +524,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 +550,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 +571,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 +597,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 +623,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 +793,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 +806,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 +1034,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'}
... ...
... ... @@ -8,7 +8,7 @@ exports.domain = "http://172.16.6.127:8088/platform";
exports.res = [
{//入口信息管理界面
route:'/operations/entrance/index1232131',
route:'/operations/entrance/index1',
method: 'GET',
view: 'pages/product/entrance',
src: '/product/entrance'
... ...
... ... @@ -2,8 +2,8 @@
* Created by JiangMin on 2016/3/22.
* 测量尺码管理
*/
//exports.domain = require('../config/common.js').domain;
exports.domain = 'http://172.16.6.162:8088/platform'; //李建
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
//exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
exports.res = [
... ...
... ... @@ -3,8 +3,8 @@
* 模特管理
*/
//exports.domain = require('../config/common.js').domain;
exports.domain = 'http://172.16.6.162:8088/platform'; //李建
//exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
exports.res = [
//主界面
... ...
... ... @@ -8,9 +8,63 @@ exports.domain = "http://172.16.6.127:8088/platform";
exports.res = [
{
route:'/suggest/suggest/index123214',
route:'/suggest/suggest/index1',
method: 'GET',
view: 'pages/operations/normalAppSuggest',
src: '/operations/versionManage'
src: '/operations/normalAppSuggest'
},
{
route:'/suggest/getSuggestList',
method:'POST',
url:'/suggest/suggest/getSuggestList',
params:[
{name: 'page', type: 'number'},
{name: 'uid', type: 'string'},
{name: 'startTime', type: 'string'},
{name: 'endTime', type: 'string'},
{name: 'isHot', type: 'string'},
{name: 'status', type: 'string'},
{name: 'clientType', type: 'string'},
{name: 'appVersion', type: 'string'}
]
},
{
route:'/suggest/replySuggest',
method:'POST',
url:'/suggest/suggest/replySuggest',
params:[
{name: 'id', type: 'string'},
{name: 'replyContent', type: 'string'}
]
},
{
route:'/suggest/setHotSuggest',
method:'POST',
url:'/suggest/suggest/setHotSuggest',
params:[
{name: 'id', type: 'string'},
{name: 'isHot', type: 'number'}
]
},
{
route:'/suggest/publishSuggest',
method:'POST',
url:'/suggest/suggest/publishSuggest',
params:[
{name: 'id', type: 'string'}
]
},
{
route:'/suggest/deleteSuggest',
method:'POST',
url:'/suggest/suggest/deleteSuggest',
params:[
{name: 'id', type: 'string'}
]
},
{
route:'/suggest/getAllAppVersions',
method:'POST',
url:'/suggest/suggest/getAllAppVersions'
}
];
... ...
... ... @@ -4,7 +4,7 @@ exports.domain = require('../config/common.js').domain;
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'}
]
},
{//最新上架的商品
... ...
... ... @@ -34,8 +34,8 @@ exports.res = [
view: 'pages/meterManage/info',
src: '/meterManage/info'
},
// 获取商品详情数据
{
// 获取商品详情数据
route: '/meterManage/tryInfo/info1',
method: 'POST',
url: '/productExtraInfo/queryProdExtraInfo',
... ...
... ... @@ -3,7 +3,7 @@
* 试穿模特管理
*/
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.162:8080/platform'; //李建
//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
exports.res = [
... ...
... ... @@ -8,7 +8,7 @@ exports.domain = "http://172.16.6.127:8088/platform";
exports.res = [
{
route:'/operations/version/index123213',
route:'/operations/version/index1',
method: 'GET',
view: 'pages/operations/versionManage',
src: '/operations/versionManage'
... ...
... ... @@ -20,7 +20,7 @@
</div>
<div class="col-sm-4">
<a class="btn btn-info addInfo" id="addInfo">保存</a>
<!--<a class="btn btn-primary back" >返回</a>-->
<a class="btn btn-primary back" >返回</a>
</div>
</div>
... ... @@ -41,13 +41,18 @@
</select>
</th>
<th>
<select name="status" value="[[item.tryInfo.feel_id]]" data-name="feel_id" data-index="[[index]]" title="" class="form-controller tryInfo1">
[[if item.tryInfo.feel_id]]
<select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
<option value="[[item.tryInfo.feel_id]]">[[item.tryInfo.fell_name]]</option>
</select>
[[else]]
<select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
<option value="-1">[['请选择试穿描述']]</option>
<option value="1">[['合适']]</option>
<option value="2">[['偏大']]</option>
<option value="3">[['偏小']]</option>
</select>
[[/if]]
</th>
<th>
<input type="text" data-name="fit_remark" data-index="[[index]]" value="[[item.tryInfo.fit_remark]]" name="fit_remark" id="fit_remark" class="tryInfo1 "
... ...
... ... @@ -70,6 +70,7 @@
<thead>
<tr>
<td>尺码</td>
<td>参考尺码([[genderName]])</td>
[[each sizeRelationsList[0].prdSizeAttributeBoList as item index]]
<td>[[item.sizeAttributeName]]</td>
[[/each]]
... ... @@ -80,6 +81,7 @@
[[each sizeRelationsList as item index]]
<tr>
<td>[[item.sizeName]]</td>
<td>[[item.referenceName?item.referenceName:""]]</td>
[[each item.prdSizeAttributeBoList as item1 index1]]
<td>[[item1.sizeValue]]</td>
[[/each]]
... ...
... ... @@ -17,4 +17,73 @@
</div>
</div>
</div>
</div>
\ No newline at end of file
</div>
<div class="contentpanel">
<div class="panel panel-default" style="...">
<div class="panel-body">
<div class="row" id="filter">
<div class="panel-col">
<input type="text" value="" name="userId" id="uid-filter" placeholder="UID" class="form-control">
</div>
<div class="panel-col">
<input type="text" id="startTime" jsaction="time:end:endTime" class="form-control panel-input hasDatepicker " name="start_time" placeholder="开始时间"/>
</div>
<div class="panel-col">
<input type="text" id="endTime" jsaction="time:start:startTime" class="form-control panel-input hasDatepicker" name="end_time" placeholder="结束时间"/>
</div>
<div class="panel-col">
<select name="isHot" id="isHot-filter" tabindex="-1" title="" class="form-control">
<option value="">是否热门</option>
<option value="0">不热门</option>
<option value="1">热门</option>
</select>
</div>
<div class="panel-col">
<select name="status" id="status-filter" tabindex="-1" title="" class="form-control">
<option value="">选择状态</option>
<option value="0">未回复</option>
<option value="1">已回复</option>
<option value="2">已发送</option>
</select>
</div>
<div class="panel-col">
<select name="clientType" id="clientType-filter" tabindex="-1" title="" class="form-control">
<option value="">选择来源</option>
<option value="iPhone">iPhone</option>
<option value="Android">Android</option>
</select>
</div>
<div class="panel-col">
<select name="appVersion" id="appVersion-filter" tabindex="-1" title="" class="form-control">
<option value="">选择版本号</option>
<option value="N">未测量</option>
<option value="Y">已测量</option>
</select>
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="filter-all" href="/suggest/suggest/index1" class="btn btn-info">全部</a>
</div>
</div>
</div>
</div>
<div class="panel-body nopadding">
<div class="dataTab_wrapper" id="basicTab"></div>
<div class="dataTables_wrapper no-footer" id="basicTable"></div>
</div>
</div>
<script type="text/template" id="reply-template">
<div class="row" id="base-form">
<div class="form-group">
<label class="col-sm-2 control-label">回复内容</label>
<div class="col-sm-10">
<input type="hidden" id="id" value="[[id]]" />
<textarea id="replyContent" class="form-control" rows="6" style="height: 90px;">[[replyContent]]</textarea>
</div>
</div><!-- form-group -->
</div>
</script>
\ No newline at end of file
... ...
... ... @@ -42,7 +42,6 @@
<option value="1">启用</option>
</select>
</div>
<input id="route" type="hidden" value="/operation/terms/searchWordsList">
<a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
</div>
</div>
... ... @@ -58,7 +57,7 @@
<input type="hidden" value="[[id]]" id="id"/>
<div class="col-sm-6">
<input type="file" value="[[avatar]]" class="form-control avatar" id="avatar" name="avatar" />
<input type="file" value="[[avatar]]" class="form-control avatar" id="avatar" name="avatar" required="required"/>
</div>
</div>
<div class="form-group">
... ... @@ -130,7 +129,7 @@
<label class="col-sm-2 control-label" for="modelCard">模特卡</label>
<div class="col-sm-10">
<input type="file" value="[[modelCard]]" class="form-control modelCard" id="modelCard" name="modelCard"/>
<input type="file" value="[[modelCard]]" class="form-control modelCard" id="modelCard" name="modelCard" required="required"/>
</div>
</div>
</div>
... ...
... ... @@ -23,14 +23,14 @@
<div class="panel panel-default" style="...">
<div class="panel-body">
<div class="row">
<div class="panel-col2">
<input type="text" id="starttime" class="form-control panel-input hasDatepicker" name="start_time"
placeholder="开始时间" value="">
</div>
<div class="panel-col2">
<input type="text" id="endtime" class="form-control panel-input hasDatepicker" name="end_time"
placeholder="结束时间" value="">
</div>
<!--<div class="panel-col2">-->
<!--<input type="text" id="starttime" class="form-control panel-input hasDatepicker" name="start_time"-->
<!--placeholder="开始时间" value="">-->
<!--</div>-->
<!--<div class="panel-col2">-->
<!--<input type="text" id="endtime" class="form-control panel-input hasDatepicker" name="end_time"-->
<!--placeholder="结束时间" value="">-->
<!--</div>-->
<div class="panel-col">
<input type="text" value="" name="productSkn" id="content-filter1" placeholder="skn"
class="form-control">
... ... @@ -47,7 +47,6 @@
<a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
<a id="upload-btn" href="javascript:;" class="btn btn-info">上传图片</a>
</div>
</div>
</div>
</div>
... ... @@ -57,6 +56,7 @@
<!--上传图片-->
<script type="text/template" id="template1">
<div class="rows" style="height: 400px;overflow: auto">
[[if __state=='add']]
<div class="form-group">
<label class="col-sm-2 control-label" for="Sku">SKU</label>
... ... @@ -64,68 +64,44 @@
<input type="text" value="[[productSku]]" class="form-control" id="Sku"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">图片</label>
<div class="cover-image-list col-sm-10" id="addPic">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<ul class="cover-image-list col-sm-10" style="padding: 0;margin: 0;">
<li class="cover-image-item fileinput-button">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">+</a>
<input type="file" class="goods-img-upload picfile" name="picfile">
</div>
</li>
</ul>
</div>
</div>
</script>
<script type="text/template" id="template2">
<ul class="cover-image-list col-sm-10" style="padding: 0;margin: 0;">
[[each pictureBoList as _item _index]]
<li class="cover-image-item" data-index=[[_index]]>
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[_item.fileName]]">
</a>
<i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle"></i>
</div>
</li>
[[/each]]
</ul>
</script>
<script type="text/template" id="template3">
<div class="row" style="height: 400px;overflow: auto">
[[else]]
<div class="form-group">
<label class="col-sm-2">SKN</label>
<div class="col-sm-6">
<input type="text" value=[[productSkn]] disabled="disabled">
<input type="text" value=[[productSkn]] class="form-control" disabled="disabled">
</div>
</div>
[[/if]]
<div class="form-group">
<label class="col-sm-2">图片</label>
<div class="col-sm-10">
<ul class="cover-image-list col-sm-10" style="padding: 0;margin: 0;">
[[each pictureBoList as _item _index]]
<li class="cover-image-item" data-index=[[_index]]>
<label class="col-sm-2 control-label">图片</label>
<div class="cover-image-list col-sm-10">
<!-- 用于修改 -->
<ul class="cover-image-list col-sm-10" id="addPic" style="padding: 0;margin: 0;">
<!-- 修改时不存在 -->
[[if __state=='add']]
<li class="cover-image-item fileinput-button">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[_item.fileName]]">
</a>
<i class="remove-item-btn remove2 glyphicon glyphicon-remove-circle"></i>
<a class="fileinput-button-icon" href="javascript:void(0);">+</a>
<input type="file" class="goods-img-upload picfile" name="picfile">
</div>
</li>
[[/each]]
[[/if]]
</ul>
</div>
</div>
</div>
</script>
<!--图片列表-->
<script type="text/template" id="template2">
[[each pictureBoList as _item _index]]
<li class="cover-image-item image-list" data-index=[[_index]]>
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[_item.fileName]]">
</a>
<i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle" data-index="[[_index]]"></i>
</div>
</li>
[[/each]]
</script>
... ...
... ... @@ -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>
... ...
... ... @@ -10,32 +10,30 @@
</div>
</div>
<script type="text/template" id="sizeifo-template">
<table style="table-layout:fixed " class="table table-striped table-bordered responsive dataTable no-footer">
<thead>
<tr>
<td>参考尺码</td>
[[each sizeAttributeBos as item index]]
<td>[[item.attributeName]]</td>
[[/each]]
</tr>
</thead>
<script type="text/template" id="sizeinfo-template">
[[if sizeRelationsList && sizeRelationsList.length > 0]]
<table class="table table-striped table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<td>尺码</td>
<td>参考尺码([[genderName]])</td>
[[each sizeRelationsList[0].prdSizeAttributeBoList as item index]]
<td>[[item.sizeAttributeName]]</td>
[[/each]]
</tr>
</thead>
<tbody>
<tbody>
[[each sizeRelationsList as item index]]
<tr>
<td>
[[each sizeBoList as item index]]
<def>[[item.sizeName]]</def>
[[each item.sortAttributes as item1 index1]]
<def>[[item1.sizeValue]]</def>/
[[/each]]
<br>
[[/each]]
</td>
[[each sizeAttributeBos as item index]]
<td>[[item.id]]</td>
<td>[[item.sizeName]]</td>
<td>[[item.referenceName?item.referenceName:""]]</td>
[[each item.prdSizeAttributeBoList as item1 index1]]
<td>[[item1.sizeValue]]</td>
[[/each]]
</tr>
</tbody>
</table>
[[/each]]
</tbody>
</table>
[[/if]]
</script>
\ No newline at end of file
... ...