|
@@ -284,6 +284,32 @@ function on_secname_retn(obj, sta) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function getSectorId(spotId){
|
|
|
+ var secName = null;
|
|
|
+ Sectors.list.forEach(function(val, aid, arr){
|
|
|
+ if(val.sector.spotId === spotId){
|
|
|
+ secName = val.sector.sectorName;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(secName == null) {
|
|
|
+ get_data("fcSectorSpot/list?spotId=" + spotId, on_secid_retn);
|
|
|
+ return "[工位:"+sectorId+"]";
|
|
|
+ }else{
|
|
|
+ return secName;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function on_secid_retn(obj, sta) {
|
|
|
+ var secid = this.url.substring(this.url.indexOf("sectorId=") + 9);
|
|
|
+ let rsecid = parseInt(secid);
|
|
|
+ var out = first_parse(this, obj);
|
|
|
+ if(out.list.length > 0){
|
|
|
+ Sectors.list.push({
|
|
|
+ secid : rsecid, sector: out.list[0]
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* Calc b/a+b * 100(precision = 2), when b is zero, return zero
|
|
|
* @param a (pass)
|