SQL結果:
頁面展示結果:
JS:
data.rows.forEach(function(row,e){
var ppRow=row.fduty+row.fline+row.fprocess;
rowIndex = $.inArray(ppRow,rowNums);
if(rowIndex==-1){
rowNums.push(ppRow);
var newRow1={fduty:row.fduty,fline:row.fline,fprocess:row.fprocess,fproduct:row.fproduct,ftype:‘投入’};dataList.push(newRow1);newRow1[row.fday]=row.fqtyi;newRow1[‘Total’]=row.fqtyi;
var newRow2={fduty:row.fduty,fline:row.fline,fprocess:row.fprocess,fproduct:row.fproduct,ftype:‘目標’};dataList.push(newRow2);newRow2[row.fday]=row.fqty;newRow2[‘Total’]=row.fqty;
var newRow3={fduty:row.fduty,fline:row.fline,fprocess:row.fprocess,fproduct:row.fproduct,ftype:‘產