|
|
@@ -317,14 +317,16 @@
|
|
|
$.get('DenKiln.ashx?m=Rate', function (data) {
|
|
|
var json = JSON.parse(data);
|
|
|
if (json["success"] == true) {
|
|
|
- $('#sumhgl').html("大件合格率:" + (Number(json["sumhgl"].toString().match(/^\d+(?:\.\d{0,2})?/)) + "%"));
|
|
|
- if (json["sumhgl"] >= 98.5) {
|
|
|
- document.getElementById("sumhgl").style.color = "white";
|
|
|
- } else if (json["sumhgl"] >= 98 && json["sumhgl"] < 98.5) {
|
|
|
- document.getElementById("sumhgl").style.color = "yellow";
|
|
|
- } else if (json["sumhgl"] < 98) {
|
|
|
- document.getElementById("sumhgl").style.color = "red";
|
|
|
- }
|
|
|
+ var color = "";
|
|
|
+ if (json["sumhgl"] >= 98.8) {
|
|
|
+ color = "white";// document.getElementById("sumhgl").style.color = "white";
|
|
|
+ //} else if (json["sumhgl"] >= 98 && json["sumhgl"] < 98.5) {
|
|
|
+ // document.getElementById("sumhgl").style.color = "yellow";
|
|
|
+ } else if (json["sumhgl"] < 98.8) {
|
|
|
+ color = "red"//document.getElementById("sumhgl").style.color = "red";
|
|
|
+ }
|
|
|
+ $('#sumhgl').html("大件合格率:<span style=color:" + color + ";>" + (Number(json["sumhgl"].toString().match(/^\d+(?:\.\d{0,2})?/)) + "%")+"</span>");
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
}
|