...
|
...
|
@@ -10,47 +10,15 @@ 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();
|
|
|
common.util.__ajax({
|
|
|
url: '/suggest/getAllAppVersions',
|
|
|
data: {}
|
|
|
},function(res) {
|
|
|
$("#version-search").html(common.util.__template2($("#version-template").html(), res));
|
|
|
new common.dropDown({el: "#appVersion-filter"});
|
|
|
},true);
|
|
|
|
|
|
var g = new common.grid({
|
|
|
el: "#basicTable",
|
...
|
...
|
@@ -62,17 +30,22 @@ var g = new common.grid({ |
|
|
startTime: common.util.__input('startTime'),
|
|
|
endTime: common.util.__input('endTime'),
|
|
|
isHot: common.util.__input('isHot-filter'),
|
|
|
appVersion: common.util.__input('appVersion-filter')
|
|
|
appVersion: common.util.__input('appVersion-filter'),
|
|
|
//status:t.active
|
|
|
};
|
|
|
},
|
|
|
columns: [
|
|
|
{display: " ", type:"checkbox"},
|
|
|
{display: "UID", name: "uid"},
|
|
|
{display: "来源", name: "clientType", width: "56px"},
|
|
|
{display: "版本号", name: "appVersion", width:"56px"},
|
|
|
{display: "来源", name: "clientType", width: "56px", render: function(item) {
|
|
|
if(item.clientType) return item.clientType;
|
|
|
return "未知";
|
|
|
}},
|
|
|
{display: "版本号", name: "appVersion", style:"min-width: 56px;"},
|
|
|
{display: "图片", name: "", render: function(item) {
|
|
|
var url = item.imageUrl ? item.imageUrl.substring(0, item.imageUrl.indexOf("?")) : "";
|
|
|
if(item.imageUrl) {
|
|
|
return '<img src="' + item.imageUrl + '" height="70px" width="100px" />';
|
|
|
return '<a href="'+ url +'" target="_blank"><img src="' + item.imageUrl + '" height="60px" width="60px" /></a>';
|
|
|
}
|
|
|
}},
|
|
|
{display: "反馈内容", name: "content", width:"20%"},
|
...
|
...
|
@@ -87,7 +60,7 @@ var g = new common.grid({ |
|
|
return "已发送";
|
|
|
}
|
|
|
}},
|
|
|
{display: "状态",name: "", width:"56px;",render: function(item) {
|
|
|
{display: "状态",name: "", width:"70px;",render: function(item) {
|
|
|
if (item.status == "0") {
|
|
|
return "未回复";
|
|
|
} else if (item.status == "1") {
|
...
|
...
|
@@ -118,7 +91,7 @@ var g = new common.grid({ |
|
|
});
|
|
|
|
|
|
g.init("/suggest/getSuggestList");
|
|
|
console.log(g);
|
|
|
//console.log(g);
|
|
|
|
|
|
var Bll = {
|
|
|
toast:function(url, item, hint) {
|
...
|
...
|
@@ -142,6 +115,30 @@ var Bll = { |
|
|
});
|
|
|
});
|
|
|
e.init();
|
|
|
},
|
|
|
batch:function(url, hint) {
|
|
|
var ids = [];
|
|
|
$.each(g.selected,function (i, value) {
|
|
|
ids.push(value.id);
|
|
|
});
|
|
|
if(ids.length) {
|
|
|
if(url.indexOf("Publish") != -1) {
|
|
|
common.dialog.confirm("发送确认", "是否确认发送?", function () {
|
|
|
common.util.__ajax({
|
|
|
url: url,
|
|
|
data: {
|
|
|
id: ids.join(",")
|
|
|
}
|
|
|
}, function () {
|
|
|
g.reload();
|
|
|
});
|
|
|
});
|
|
|
} else {
|
|
|
window.open("/ajax/down?queryConf=" + JSON.stringify({"id":ids.join(",")}) + "&type=suggestExport");
|
|
|
}
|
|
|
} else {
|
|
|
util.__tip(hint,"warning");
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
@@ -195,7 +192,14 @@ $(document).on('click', '.delBtn',function() { |
|
|
});
|
|
|
});
|
|
|
|
|
|
$(document).on('click', '#batchSend', function() {//批量发送
|
|
|
Bll.batch("/suggest/batchPublishSuggest", "请选择要发送的回复!");
|
|
|
});
|
|
|
|
|
|
$(document).on('click', '#batchExport', function() {//批量导出
|
|
|
Bll.batch("/suggest/batchExportSuggest", "请选择要导出的数据!");
|
|
|
});
|
|
|
|
|
|
$(document).on('click', '#filter-btn', function() {
|
|
|
g.reload(1);
|
|
|
loadTab();
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|