Commit 1217eccf by guanzhenshan

修改销售平台流水 json格式显示为字符串

parent 1ccd3043
...@@ -230,7 +230,13 @@ ...@@ -230,7 +230,13 @@
var _r = '<tr><td>' + result.rows[i].datatime+'</td>'; var _r = '<tr><td>' + result.rows[i].datatime+'</td>';
for (var r in _obj) { for (var r in _obj) {
_r += '<td style="width:160px;">' + '<div class="mules" title="' + _obj[r] + '">' + _obj[r] + '</div>' +'</td>';
var _v = _obj[r];
if (isJson(_obj[r])) {
_v = JSON.stringify(_obj[r]).replace(/"/g, "'");
}
_r += '<td style="width:160px;">' + '<div class="mules" title="' + _v + '">' + _v + '</div>' +'</td>';
} }
_r += '</tr>'; _r += '</tr>';
...@@ -291,6 +297,11 @@ ...@@ -291,6 +297,11 @@
} }
function isJson (obj) {
var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length;
return isjson;
}
function ExportCSV() { function ExportCSV() {
//var website = $('#website').val(); //var website = $('#website').val();
//var month = $('#month').val(); //var month = $('#month').val();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment