|
|
|
@ -66,15 +66,23 @@
|
|
|
|
|
success: function (json) {
|
|
|
|
|
console.log(json);
|
|
|
|
|
var columnsArray1 = [];
|
|
|
|
|
|
|
|
|
|
columnsArray1.push({field : "序号",title : "序号",colspan: 1,rowspan: 1});
|
|
|
|
|
columnsArray1.push({field : "产品码",title : "产品码",colspan: 1,rowspan: 1});
|
|
|
|
|
columnsArray1.push({field : "状态",title : "状态",colspan: 1,rowspan: 1});
|
|
|
|
|
columnsArray1.push({field : "记录时间",title : "记录时间",colspan: 1,rowspan: 1});
|
|
|
|
|
if(json.total>0) {
|
|
|
|
|
for (var i = 0; i < (Object.keys(json.rows[0])).length; i++) {//Object.keys(obj) 获取key名称
|
|
|
|
|
var property = (Object.keys(json.rows[0]))[i];
|
|
|
|
|
if(property!='产品码'&&property!='记录时间'&&property!='序号'&&property!='状态') {
|
|
|
|
|
columnsArray1.push({
|
|
|
|
|
"title": property,
|
|
|
|
|
"field": property,
|
|
|
|
|
switchable: true
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// console.log(json);
|
|
|
|
|
// var arrlength=[];
|
|
|
|
|
// json.rows.forEach(function (value) {
|
|
|
|
|