awaiting-disposition-header-attachment-id
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
const initialHeaderAttachmentId = "";
|
||||
const queryString = window.location.search;
|
||||
const urlParams = new URLSearchParams(queryString);
|
||||
const initialHeaderId = urlParams.get('headerid');
|
||||
const initialToolTypeID = urlParams.get('tooltypeid');
|
||||
const initialHeaderAttachmentId = urlParams.get('headerattachmentid');
|
||||
initRunInfo("https://oi-metrology-viewer-prod.mes.infineon.com:4433/api", "https://oi-metrology-viewer-prod.mes.infineon.com", initialToolTypeID, initialHeaderId, initialHeaderAttachmentId);
|
||||
|
||||
});
|
@ -9,14 +9,15 @@ var _initialHeaderId = null;
|
||||
var _toolTypeMetaData = null;
|
||||
var _initialHeaderAttachmentId = null;
|
||||
|
||||
function loadRunInfoAwaitingDisposition() {
|
||||
async function loadRunInfoAwaitingDisposition() {
|
||||
var row = $("#grid").igGrid("selectedRow");
|
||||
if (row == null)
|
||||
return;
|
||||
var data = $("#grid").igGrid("findRecordByKey", row.id);
|
||||
if (data == null)
|
||||
return;
|
||||
var targetURL = _StaticUrl + "/index.html?tooltypeid=" + data.ToolTypeID + "&headerid=" + data.ID;
|
||||
var getResult = await $.get(_apiUrl + "/awaitingdispo/" + data.ToolTypeID + "/header-attachment-id?headerid=" + data.ID).promise();
|
||||
var targetURL = _StaticUrl + "/index.html?tooltypeid=" + data.ToolTypeID + "&headerid=" + data.ID + "&headerattachmentid=" + getResult;
|
||||
window.location.href = targetURL;
|
||||
}
|
||||
|
||||
@ -125,7 +126,7 @@ function loadRunInfoRunHeaders() {
|
||||
var data = $("#HeaderGrid").igGrid("findRecordByKey", row.id);
|
||||
if (data == null)
|
||||
return;
|
||||
var targetURL = _StaticUrl + "/index.html?tooltypeid=" + data.ToolTypeID + "&headerid=" + data.ID;
|
||||
var targetURL = _StaticUrl + "/index.html?tooltypeid=" + data.ToolTypeID + "&headerid=" + data.ID + "&headerattachmentid=" + data.headerAttachmentId;
|
||||
window.location.href = targetURL;
|
||||
}
|
||||
|
||||
@ -1070,7 +1071,7 @@ function initRunInfo(apiUrl, staticUrl, initialToolTypeID, initialHeaderId, init
|
||||
_apiUrl = apiUrl;
|
||||
_StaticUrl = staticUrl;
|
||||
_initialHeaderId = initialHeaderId === null ? "" : initialHeaderId;
|
||||
_initialHeaderAttachmentId = initialHeaderAttachmentId === null ? "" : initialHeaderId;
|
||||
_initialHeaderAttachmentId = initialHeaderAttachmentId === null ? "" : initialHeaderAttachmentId;
|
||||
$.getJSON(_apiUrl + '/tooltypes', function (data) {
|
||||
for (var i = 0; i < data.Results.length; i++) {
|
||||
if (data.Results[i].ToolTypeName === "CDE") {
|
||||
@ -1177,7 +1178,7 @@ function postWorkMaterial() {
|
||||
_workMaterial['inCassetteNumber'] = data.InCassetteNumber;
|
||||
_workMaterial['outCassetteNumber'] = data.OutCassetteNumber;
|
||||
var mesage = "Data Saved for {" + _workMaterial['scan'] + "} RDS {" + data.RunDataSheet + "} slot {" + data.OutSlotNumber + "}";
|
||||
$.post(_apiUrl + "/api/Reactors/", _workMaterial, function (data) {
|
||||
$.post(_apiUrl + "/Reactors/", _workMaterial, function (data) {
|
||||
DisplayWSMessage("info", mesage + " use [" + data + "]", null);
|
||||
}).fail(function () {
|
||||
ShowErrorMessage("Error");
|
||||
@ -1213,7 +1214,7 @@ function layer(layerNumber) {
|
||||
else {
|
||||
_workMaterial['scan'] = scan;
|
||||
_workMaterial['username'] = username;
|
||||
$.getJSON(_apiUrl + "/api/WorkMaterial/" + scan + "/", function (data) {
|
||||
$.getJSON(_apiUrl + "/WorkMaterial/" + scan + "/", function (data) {
|
||||
if (data.Results.length === 0)
|
||||
ShowErrorMessage("No data found");
|
||||
else {
|
||||
|
Reference in New Issue
Block a user