Authored by dongjunjie

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));
}
... ...
/**
* 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);
};
});
... ...
... ... @@ -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 = [
... ...
... ... @@ -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'
}
];
... ...
... ... @@ -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'
... ...
... ... @@ -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
... ...
... ... @@ -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
... ...