8 changed files with 912 additions and 4 deletions
@ -0,0 +1,113 @@ |
|||
@{ ViewData["Title"] = "REP012B"; |
|||
Layout = "~/Views/Shared/_AMESLayout.cshtml"; } |
|||
|
|||
<script src="~/Highcharts-7.1.2/highcharts.js"></script> |
|||
<script src="~/Highcharts-7.1.2/modules/exporting.js"></script> |
|||
<script src="~/Highcharts-7.1.2/modules/export-data.js"></script> |
|||
|
|||
<style> |
|||
.control-label { |
|||
justify-content: flex-end !important; |
|||
} |
|||
|
|||
.text-error { |
|||
color: #dc3545 !important; |
|||
} |
|||
|
|||
.my-read-only-class { |
|||
cursor: not-allowed; |
|||
} |
|||
</style> |
|||
|
|||
<div class="layui-card"> |
|||
<div class="col-sm-12"> |
|||
<form enctype="multipart/form-data" class="layui-form" method="post"> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<div id="divChart" style="width: 600px; height: 400px; margin: 0 auto"></div> |
|||
<input type="hidden" id="param_list" value="@ViewData["ParamList"]" /> |
|||
<table class="layui-hide" id="query" lay-filter="query"></table> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
@section Scripts { |
|||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|||
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
|||
|
|||
<script type="text/javascript"> |
|||
$(document).ready(function () { |
|||
//alert(param_list.value); |
|||
$.ajax({ |
|||
type: "Post", |
|||
url: '/REP/GetRMACode4REP012?id=' + param_list.value, |
|||
contentType: "application/json; charset=utf-8", |
|||
dataType: 'json', |
|||
success: function (response) { |
|||
var errorData = new Array(); |
|||
var idx = 0; |
|||
$.each(response, function (i, item) { |
|||
errorData[idx] = new Array(); |
|||
errorData[idx][0] = item["rmaCode"]; |
|||
errorData[idx][1] = item["rmaQty"]; |
|||
idx = idx + 1; |
|||
}); |
|||
|
|||
Highcharts.chart('divChart', { |
|||
chart: { |
|||
type: 'pie' |
|||
}, |
|||
title: { |
|||
text: '維修代碼統計' |
|||
}, |
|||
subtitle: { |
|||
text: '' |
|||
}, |
|||
plotOptions: { |
|||
pie: { |
|||
allowPointSelect: true, |
|||
cursor: 'pointer', |
|||
dataLabels: { |
|||
enabled: false |
|||
}, |
|||
showInLegend: true |
|||
} |
|||
}, |
|||
series: [{ |
|||
type: 'pie', |
|||
name: '數量', |
|||
data: errorData |
|||
}] |
|||
}); |
|||
}, |
|||
error: function () { |
|||
alert("查無維修代碼統計資料!"); |
|||
$("#divChart").empty(); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
var tableCols = [[ |
|||
{ |
|||
field: 'rmaCode', |
|||
title: '維修代碼', |
|||
sort: true |
|||
}, |
|||
{ |
|||
field: 'rmaQty', |
|||
width: 160, |
|||
title: '統計次數', |
|||
sort: true |
|||
}] |
|||
]; |
|||
|
|||
//基本数据表格 |
|||
var table = hg.table.datatable('query', '維修代碼統計', '/REP/GetRMACode4REP012List/' + param_list.value, {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
|||
</script> |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,113 @@ |
|||
@{ ViewData["Title"] = "REP012C"; |
|||
Layout = "~/Views/Shared/_AMESLayout.cshtml"; } |
|||
|
|||
<script src="~/Highcharts-7.1.2/highcharts.js"></script> |
|||
<script src="~/Highcharts-7.1.2/modules/exporting.js"></script> |
|||
<script src="~/Highcharts-7.1.2/modules/export-data.js"></script> |
|||
|
|||
<style> |
|||
.control-label { |
|||
justify-content: flex-end !important; |
|||
} |
|||
|
|||
.text-error { |
|||
color: #dc3545 !important; |
|||
} |
|||
|
|||
.my-read-only-class { |
|||
cursor: not-allowed; |
|||
} |
|||
</style> |
|||
|
|||
<div class="layui-card"> |
|||
<div class="col-sm-12"> |
|||
<form enctype="multipart/form-data" class="layui-form" method="post"> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<div id="divChart" style="width: 600px; height: 400px; margin: 0 auto"></div> |
|||
<input type="hidden" id="param_list" value="@ViewData["ParamList"]" /> |
|||
<table class="layui-hide" id="query" lay-filter="query"></table> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
@section Scripts { |
|||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|||
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
|||
|
|||
<script type="text/javascript"> |
|||
$(document).ready(function () { |
|||
//alert(param_list.value); |
|||
$.ajax({ |
|||
type: "Post", |
|||
url: '/REP/GetLocation4REP012?id=' + param_list.value, |
|||
contentType: "application/json; charset=utf-8", |
|||
dataType: 'json', |
|||
success: function (response) { |
|||
var errorData = new Array(); |
|||
var idx = 0; |
|||
$.each(response, function (i, item) { |
|||
errorData[idx] = new Array(); |
|||
errorData[idx][0] = item["locationNo"]; |
|||
errorData[idx][1] = item["locationQty"]; |
|||
idx = idx + 1; |
|||
}); |
|||
|
|||
Highcharts.chart('divChart', { |
|||
chart: { |
|||
type: 'pie' |
|||
}, |
|||
title: { |
|||
text: '維修位置統計' |
|||
}, |
|||
subtitle: { |
|||
text: '' |
|||
}, |
|||
plotOptions: { |
|||
pie: { |
|||
allowPointSelect: true, |
|||
cursor: 'pointer', |
|||
dataLabels: { |
|||
enabled: false |
|||
}, |
|||
showInLegend: true |
|||
} |
|||
}, |
|||
series: [{ |
|||
type: 'pie', |
|||
name: '數量', |
|||
data: errorData |
|||
}] |
|||
}); |
|||
}, |
|||
error: function () { |
|||
alert("查無維修位置統計資料!"); |
|||
$("#divChart").empty(); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
var tableCols = [[ |
|||
{ |
|||
field: 'locationNo', |
|||
title: '維修位置', |
|||
sort: true |
|||
}, |
|||
{ |
|||
field: 'locationQty', |
|||
width: 160, |
|||
title: '統計次數', |
|||
sort: true |
|||
}] |
|||
]; |
|||
|
|||
//基本数据表格 |
|||
var table = hg.table.datatable('query', '維修位置統計', '/REP/GetLocation4REP012List/' + param_list.value, {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
|||
</script> |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,113 @@ |
|||
@{ ViewData["Title"] = "REP012D"; |
|||
Layout = "~/Views/Shared/_AMESLayout.cshtml"; } |
|||
|
|||
<script src="~/Highcharts-7.1.2/highcharts.js"></script> |
|||
<script src="~/Highcharts-7.1.2/modules/exporting.js"></script> |
|||
<script src="~/Highcharts-7.1.2/modules/export-data.js"></script> |
|||
|
|||
<style> |
|||
.control-label { |
|||
justify-content: flex-end !important; |
|||
} |
|||
|
|||
.text-error { |
|||
color: #dc3545 !important; |
|||
} |
|||
|
|||
.my-read-only-class { |
|||
cursor: not-allowed; |
|||
} |
|||
</style> |
|||
|
|||
<div class="layui-card"> |
|||
<div class="col-sm-12"> |
|||
<form enctype="multipart/form-data" class="layui-form" method="post"> |
|||
<div class="layui-form-item"> |
|||
<div class="layui-inline"> |
|||
<div id="divChart" style="width: 600px; height: 400px; margin: 0 auto"></div> |
|||
<input type="hidden" id="param_list" value="@ViewData["ParamList"]" /> |
|||
<table class="layui-hide" id="query" lay-filter="query"></table> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
@section Scripts { |
|||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
|||
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
|||
|
|||
<script type="text/javascript"> |
|||
$(document).ready(function () { |
|||
//alert(param_list.value); |
|||
$.ajax({ |
|||
type: "Post", |
|||
url: '/REP/GetRepairResponsibleUnit4REP012?id=' + param_list.value, |
|||
contentType: "application/json; charset=utf-8", |
|||
dataType: 'json', |
|||
success: function (response) { |
|||
var errorData = new Array(); |
|||
var idx = 0; |
|||
$.each(response, function (i, item) { |
|||
errorData[idx] = new Array(); |
|||
errorData[idx][0] = item["rrDesc"]; |
|||
errorData[idx][1] = item["rrDescQty"]; |
|||
idx = idx + 1; |
|||
}); |
|||
|
|||
Highcharts.chart('divChart', { |
|||
chart: { |
|||
type: 'pie' |
|||
}, |
|||
title: { |
|||
text: '責任單位統計' |
|||
}, |
|||
subtitle: { |
|||
text: '' |
|||
}, |
|||
plotOptions: { |
|||
pie: { |
|||
allowPointSelect: true, |
|||
cursor: 'pointer', |
|||
dataLabels: { |
|||
enabled: false |
|||
}, |
|||
showInLegend: true |
|||
} |
|||
}, |
|||
series: [{ |
|||
type: 'pie', |
|||
name: '數量', |
|||
data: errorData |
|||
}] |
|||
}); |
|||
}, |
|||
error: function () { |
|||
alert("查無責任單位統計資料!"); |
|||
$("#divChart").empty(); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
var tableCols = [[ |
|||
{ |
|||
field: 'rrDesc', |
|||
title: '責任單位', |
|||
sort: true |
|||
}, |
|||
{ |
|||
field: 'rrDescQty', |
|||
width: 160, |
|||
title: '統計次數', |
|||
sort: true |
|||
}] |
|||
]; |
|||
|
|||
//基本数据表格 |
|||
var table = hg.table.datatable('query', '責任單位統計', '/REP/GetRepairResponsibleUnit4REP012List/' + param_list.value, {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
|||
</script> |
|||
|
|||
|
|||
} |
|||
|
Loading…
Reference in new issue