684 lines
29 KiB
Plaintext
684 lines
29 KiB
Plaintext
@model Fab2ApprovalSystem.Models.LotDisposition
|
|
|
|
|
|
@{
|
|
ViewBag.Title = "LotDisposition";
|
|
}
|
|
|
|
@{
|
|
Layout = "_LotDispositionLayout.cshtml";
|
|
}
|
|
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
|
|
|
@*<div class="row">
|
|
<div class="col-xs-12">
|
|
<label for="Remarks">Enter Remarks Here...</label>
|
|
@Html.TextAreaFor(model => model.IssueDescription, new { style = "width:90%;" })
|
|
</div>
|
|
</div>*@
|
|
|
|
|
|
@using (Html.BeginForm())
|
|
{
|
|
<input type="hidden" id="currentStep" value="@Model.CurrentStep"/>
|
|
<input type="hidden" id="environment" value="@GlobalVars.DBConnection" />
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
|
|
</div>
|
|
<div class="col-sm-3">
|
|
|
|
</div>
|
|
<div class="col-sm-6">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4 text-center">
|
|
<div class="row">
|
|
<div class="col-sm-12 center-block">
|
|
<font style="color: crimson; font-size:24px;font-weight: bolder">
|
|
Lot Disposition
|
|
</font>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4 text-right">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<font style="color:crimson">
|
|
@if (@Model.CloseDate == null)
|
|
{
|
|
if (Model.RecordLockByName == null)
|
|
{
|
|
<h5>
|
|
<font style="color:red">
|
|
Mode: [Readonly]
|
|
</font>
|
|
</h5>
|
|
}
|
|
else
|
|
{
|
|
<h5>
|
|
<font style="color:red">
|
|
Mode: [Readonly] - Locked for Editing by <font style="color: green; font-weight:bold; font-style:italic">@Model.RecordLockByName</font>
|
|
</font>
|
|
</h5>
|
|
|
|
}
|
|
}
|
|
</font>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel panel-default" style="font-size: 11px">
|
|
<div class="panel-body bg-warning">
|
|
<div class="form-horizontal col-sm-4">
|
|
<fieldset disabled>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Issue #</label>
|
|
<div class="col-sm-4 col-sm-4">
|
|
@Html.TextBoxFor(model => model.IssueID, new { id = "txtIssueID", @class = "k-textbox", @readonly = "readonly" })
|
|
</div>
|
|
|
|
</div>
|
|
</fieldset>
|
|
<div class="form-group">
|
|
<fieldset disabled>
|
|
<label class="control-label col-sm-4">Issue Date:</label>
|
|
<div class="col-sm-8 col-sm-6">
|
|
@Html.TextBoxFor(model => model.IssueDate, new { id = "txtIssueDate", @class = "k-textbox", @readonly = "readonly" })
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Affected Department:</label>
|
|
<div class="col-sm-8 col-sm-8">
|
|
|
|
|
|
@(Html.Kendo().MultiSelect()
|
|
.Name("DepartmentIDs")
|
|
.BindTo(new SelectList(ViewBag.deps, "DepartmentID", "DepartmentName"))
|
|
.Value(ViewBag.Nothing)
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
@*<div class="form-group">
|
|
<label class="control-label col-sm-4">MRB</label>
|
|
<div class="col-sm-4 col-sm-4">
|
|
@Html.EditorFor(model => model.MRBRequired, new { @readonly = "readonly" })
|
|
|
|
</div>
|
|
</div>*@
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-horizontal col-sm-4">
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Title:</label>
|
|
<div class="col-sm-4 col-sm-4">
|
|
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox", @readonly = "readonly" })
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Responsibility:</label>
|
|
<div class="col-sm-8 col-sm-6">
|
|
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("Responsibility")
|
|
.BindTo(new SelectList(ViewBag.ResponsibilityList, "ResponsibilityID", "ResponsibilityName"))
|
|
.Value(Model.ResponsibilityID.ToString())
|
|
.HtmlAttributes(new { @readonly = "readonly" })
|
|
|
|
)
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Issue:</label>
|
|
<div class="col-sm-8 col-sm-4">
|
|
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("Issue")
|
|
.BindTo(new SelectList(ViewBag.ResponsibilityIssueList, "ResponsibilityIssueID", "Issue"))
|
|
.Value(Model.ResponsibilityIssueID.ToString())
|
|
.CascadeFrom("ResponsibilityID")
|
|
.HtmlAttributes(new { @readonly = "readonly" })
|
|
)
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">CA#</label>
|
|
<div class="col-sm-4 col-sm-6">
|
|
@Html.TextBoxFor(model => model.CANo, new { @class = "k-textbox", @readonly = "readonly" })
|
|
<a href='http://SQDS.IRF.COM/CAPA8D.aspx?Operation=MODIFY&DocumentID=@Model.CANo' target='_blank'>View CA</a>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-horizontal col-sm-4">
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Originator:</label>
|
|
<div class="col-sm-8 col-sm-4">
|
|
|
|
@*@(Html.Kendo().DropDownList()
|
|
.Name("OriginatorID")
|
|
.BindTo(new SelectList(ViewBag.OriginatorList, "OriginatorID", "OriginatorName"))
|
|
)*@
|
|
|
|
@Html.TextBoxFor(model => model.OriginatorName, new { id = "OriginatorName", @class = "k-textbox", @readonly = "readonly" })
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">SPN Scrap Code:</label>
|
|
<div class="col-sm-8 col-sm-6">
|
|
@Html.TextBoxFor(model => model.SPNScrapCode, new { id = "txtSPNScrapCode", @class = "k-textbox", @readonly = "readonly" })
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">PE Required</label>
|
|
<div class="col-sm-4 col-sm-4">
|
|
@Html.EditorFor(model => model.PERequired)
|
|
@Html.ValidationMessageFor(model => model.PERequired)
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel panel-default" style="font-size: 11px">
|
|
<div class="panel-body bg-warning">
|
|
|
|
|
|
<div class=" col-sm-4">
|
|
<div class="form-group">
|
|
<label class="control-label">Issue Description:</label>
|
|
<div>
|
|
@Html.TextAreaFor(model => model.IssueDescription, 12, 30, new { id = "txtIssueDescription", @class = "form-control", style = "font-size: 11px" , @readonly = "readonly" })
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="form-group">
|
|
<label class="control-label">Reason For Disposition:</label>
|
|
<div>
|
|
@Html.TextAreaFor(model => model.ReasonForDisposition, 12, 30, new { id = "txtReasonForDisposition", @class = "form-control", style = "font-size: 11px", @readonly = "readonly" })
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
|
<div class="form-group">
|
|
<div>
|
|
|
|
@(Html.Kendo().Upload()
|
|
.Name("files")
|
|
.Async(a => a
|
|
.Save("AttachSave", "LotDisposition", new { issueID = Model.IssueID })
|
|
.AutoUpload(true)
|
|
)
|
|
.ShowFileList(false)
|
|
.Events(events => events
|
|
.Success("onFileUploadSuccess")
|
|
.Upload("checkFileType")
|
|
)
|
|
)
|
|
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Attachment>()
|
|
.Name("Attachments")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.AttachmentID).Visible(false);
|
|
columns.Bound(a => a.IssueID).Visible(false);
|
|
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>);
|
|
//.ClientTemplate("<a href='"+ GlobalVars.AttachmentUrl + "LotDisposition/#=FileName#' target='_blank'>#=FileName#</a>");
|
|
columns.Bound(a => a.FullName);
|
|
columns.Bound(a => a.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
|
//columns.Command(command => { command.Destroy(); });
|
|
columns.Command(command => command.Custom("View").Click("DownloadAttachment"));
|
|
|
|
|
|
})
|
|
//.Editable(editable => editable.Mode(GridEditMode.InLine))
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:150px; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
//.Batch(false)
|
|
.ServerOperation(false)
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.AttachmentID);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("Attachment_Read", "LotDisposition", new { issueID = Model.IssueID }))
|
|
)
|
|
)
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-heading" style="height: 60px">
|
|
@*<button class="btn btn-default btn-sm" data-toggle="modal" id="showLotSearchFormButton">
|
|
Search Lots
|
|
</button>*@
|
|
<table class="pull-right">
|
|
<tr>
|
|
<td>
|
|
<label style="color: #36940a; font-weight: bold; font-size: 12px" class="pull-right" id="ReleaseSummary">
|
|
Release Summary: [Cost:] [Wafers:][Die:]
|
|
</label>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label style="color: crimson; font-weight: bold; font-size: 12px" class="pull-right" id="ScrapSummary">
|
|
Scrap Summary: [Cost:][Wafers:][Die:]
|
|
</label>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
@*<label style="color: #1050e8; font-weight: bold; font-size: 11px" class="pull-right" id="LotSummary">
|
|
Release Summary: [Cost:] [Wafers:][Die:]
|
|
Scrap Summary: [Cost:][Wafers:][Die:]
|
|
</label>*@
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
<div class="col-sm-offset-0">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Lot>()
|
|
.Name("Lots")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(l => l.LotID).Visible(false);
|
|
columns.Bound(l => l.ReleaseCount).Visible(false);
|
|
columns.Bound(l => l.ScrapCount).Visible(false);
|
|
columns.Bound(l => l.LotStatusOptionID).Visible(false);
|
|
columns.Bound(l => l.LotNumber);
|
|
columns.Bound(l => l.DieLotNumber);
|
|
columns.Bound(p => p.MRBsLinkedToLot).ClientTemplate("#=buildLinks(MRBsLinkedToLot)#");
|
|
columns.Bound(l => l.WipPartNo);
|
|
columns.Bound(l => l.LotStatusOption).ClientTemplate("#=LotStatusOption.LotStatusOption#");
|
|
columns.Bound(l => l.WaferCount);
|
|
columns.Bound(l => l.DiePartNo);
|
|
columns.Bound(l => l.DieCount);
|
|
columns.Bound(l => l.NewPartNo);
|
|
columns.Bound(l => l.TotalCost);
|
|
columns.Bound(l => l.ProductFamily);
|
|
columns.Bound(l => l.Gen);
|
|
columns.Bound(l => l.Hexsize);
|
|
columns.Bound(l => l.Voltage);
|
|
columns.Bound(l => l.Location);
|
|
columns.Bound(l => l.QualityCode);
|
|
columns.Command(command => command.Custom("Select Wafers").Click("showReadOnlyScrapReleaseForm")).Width("110px");
|
|
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
|
.ClientTemplate("<a href='http://" + GlobalVars.WSR_URL + "/user/wsr2/wsr_lot.php?lot=#=LotNumber#' target='_blank'>View</a>").Title("History");
|
|
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
|
.ClientTemplate("<a href='http://" + GlobalVars.WSR_URL + "/user/probe/wafyld.php?lot=#=LotNumber#' target='_blank'>View</a>").Title("Probe Results");
|
|
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
|
.ClientTemplate("<a href='http://" + GlobalVars.WSR_URL + "/user/probe/allmaps.php?lot=#=LotNumber#' target='_blank'>View</a>").Title("Wafer Maps");
|
|
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
|
.ClientTemplate("<a href='http://" + GlobalVars.WSR_URL + "/user/yieldchart/form.php' target='_blank'>View</a>").Title("Yield/Param Trends");
|
|
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
|
.ClientTemplate("<a href='file://///10.72.6.201/Images/#=LotNumber#' + lot' target='_blank'>Show</a>").Title("AVI");
|
|
//columns.Bound(l => l.MRBsLinkedToLot).Width("100px");
|
|
|
|
|
|
})
|
|
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:250px; width:100%; font-size: 10px"})
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
//.Batch(false)
|
|
.ServerOperation(false)
|
|
.Events(events => events.RequestEnd("RefreshLotSummary"))
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.LotID);
|
|
model.Field(p => p.LotID).Editable(false);
|
|
model.Field(p => p.TotalCost).Editable(false);
|
|
})
|
|
.PageSize(20)
|
|
.Read(read => read.Action("EditingCustom_Read", "LotDisposition", new { issueID = Model.IssueID })))
|
|
.Resizable(resize => resize.Columns(true))
|
|
.Pageable(pageable => pageable
|
|
.Refresh(true)
|
|
.PageSizes(true)
|
|
.ButtonCount(5))
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
<div class="col-sm-offset-0">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
|
.Name("ApproversList")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ApprovalID).Visible(false);
|
|
columns.Bound(a => a.FullName);
|
|
columns.Bound(a => a.RoleName);
|
|
columns.Bound(a => a.SubRoleName);
|
|
columns.Bound(a => a.Status);
|
|
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ;
|
|
columns.Bound(a => a.CompletedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ;
|
|
columns.Bound(a => a.Comments);
|
|
|
|
})
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:200px; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
//.Batch(false)
|
|
.ServerOperation(false)
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ApprovalID);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetApproversList", "LotDisposition", new { issueID = Model.IssueID, step = Model.CurrentStep }))
|
|
)
|
|
.Resizable(resize => resize.Columns(true))
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
|
|
if(Model.CloseDate != null)
|
|
{
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-heading" style="height: 43px">
|
|
<button class="k-textbox" data-toggle="modal" id="AddComments">
|
|
Add Comments
|
|
</button>
|
|
@*<label style="color: #1050e8; font-weight: bold; font-size: 11px" class="pull-right" id="LotSummary">
|
|
Release Summary: [Cost:] [Wafers:][Die:]
|
|
Scrap Summary: [Cost:][Wafers:][Die:]
|
|
</label>*@
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
<div class="col-sm-offset-0">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Comments>()
|
|
.Name("Comments")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.IssueID).Visible(false);
|
|
columns.Bound(a => a.UserName).Width("200px");
|
|
columns.Bound(a => a.UserComments);
|
|
columns.Bound(a => a.TimeStamp).Format("{0:MM/dd/yy hh:mm:ss}").Width("200px");
|
|
})
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:200px; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
//.Batch(false)
|
|
.ServerOperation(false)
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ID);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetComments", "LotDisposition", new { issueID = Model.IssueID}))
|
|
)
|
|
.Resizable(resize => resize.Columns(true))
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
<div class="modal fade" id="LotStatusReadOnlyForm" data-url='@Url.Action("LotStatusDetail")' tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-body" id="lotReadOnlyScrapContainer">
|
|
@Html.Partial("_ScrapReleaseReadOnly", Model.Lot.ScrapLotWafer)
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
}
|
|
<!-- Button trigger modal -->
|
|
<!-- Modal -->
|
|
|
|
|
|
<div class="modal fade" id="CommentsWin" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Comments:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="5" id="UserComments"></textarea>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-primary" id="InsertComments">OK</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
var errorCodeDisplayed = false;
|
|
var isDirty = 'false';
|
|
var connection = $("#environment").val();
|
|
$(document).ready(function () {
|
|
|
|
|
|
});
|
|
|
|
$('#AddComments').on('click', function () {
|
|
$('#InsertComments').attr("disabled", false);
|
|
$("#Comments").val("");
|
|
$("#CommentsWin").modal('show');
|
|
return false;
|
|
})
|
|
|
|
|
|
$('#InsertComments').on('click', function () {
|
|
|
|
$('#InsertComments').attr("disabled", true);
|
|
$.ajax({
|
|
url: "/LotDisposition/InsertComments",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val(),
|
|
Comments: $("#UserComments").val()
|
|
|
|
},
|
|
success: function (data) {
|
|
|
|
var grid = $("#Comments").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val());
|
|
}
|
|
|
|
});
|
|
|
|
$("#CommentsWin").modal('hide');
|
|
|
|
})
|
|
|
|
|
|
//
|
|
function showReadOnlyScrapReleaseForm(e) {
|
|
e.preventDefault();
|
|
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
var issueID = $("#txtIssueID").val();
|
|
var lotNumber = dataItem.LotNumber;
|
|
var waferCount = dataItem.WaferCount;
|
|
var dieCount = dataItem.DieCount
|
|
|
|
if (dataItem.Location != 'QDB' && dataItem.Location != 'EDB') {
|
|
if (dieCount > 0) {
|
|
alert("You cannot set Status for each wafer if it is a Die lot.\n Please set the status from the dropdown menu available for each lot");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
var url = $('#LotStatusReadOnlyForm').data('url');
|
|
//url = url + '?issueID=' + issueID + '&lotNumber=' + lotNumber + '&waferCount=' + waferCount;
|
|
url = url + '?issueID=' + issueID + '&lotNumber=' + lotNumber + '&readonlyView=true';
|
|
|
|
|
|
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
success: function (data) {
|
|
$('#lotReadOnlyScrapContainer').html(data);
|
|
$("#LotStatusReadOnlyForm").modal('show');
|
|
|
|
|
|
|
|
}
|
|
});
|
|
|
|
|
|
//$.get(url, function (data) {
|
|
// //alert('inside');
|
|
// $('#lotScrapContainer').html(data);
|
|
// $("#LotStatusForm").modal('show');
|
|
// //return false;
|
|
|
|
//});
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
function RefreshLotSummary() {
|
|
|
|
$.ajax({
|
|
url: "/LotDisposition/GetLotDispositionLotSummary",
|
|
type: "POST",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val()
|
|
},
|
|
success: function (data) {
|
|
//alert(data.ScrapCost)
|
|
$('#ReleaseSummary').text('Release Summary: [Cost:' + data.ReleaseCost + '][Wafers:' + data.ReleaseWaferCount + '][Die:' + data.ReleaseDieCount + ']');
|
|
$('#ScrapSummary').text('Scrap Summary: [Cost:' + data.ScrapCost + '] [Wafers:' + data.ScrapWaferCount + '][Die:' + data.ScrapDieCount + ']');
|
|
//$('#ScrapSummary').text();
|
|
//$('#ScrapSummary').val('GOOD');
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
function DownloadAttachment(e) {
|
|
e.preventDefault();
|
|
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
var fileName = dataItem.FileName;
|
|
var attachmentID = dataItem.AttachmentID;
|
|
|
|
window.location = '/LotDisposition/DownloadFile?attachmentID=' + attachmentID;
|
|
|
|
}
|
|
|
|
function onFileUploadSuccess(e) {
|
|
var grid = $("#Attachments").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val());
|
|
}
|
|
|
|
|
|
function checkFileType(e) {
|
|
var files = e.files;
|
|
$.each(files, function () {
|
|
|
|
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt|.slddrw|.sldprt)$/)) {
|
|
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
|
e.preventDefault();
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
$(document).ajaxComplete(function (event, request, settings) {
|
|
//alert(request.status)
|
|
if (request.status == 401 && errorCodeDisplayed == false) {
|
|
errorCodeDisplayed = true;
|
|
alert("You session has timed out.\nChanges will not be saved")
|
|
var url = '@Url.Action("Login", "Account")';
|
|
window.location.href(url);
|
|
}
|
|
});
|
|
|
|
|
|
function buildLinks(MRBLinkedToLot) {
|
|
var template = "";
|
|
var mrb = "";
|
|
if (MRBLinkedToLot != null) {
|
|
var tempValue = MRBLinkedToLot.split(',');
|
|
for (var i = 0; i < tempValue.length; i++) {
|
|
mrb = "";
|
|
if (tempValue[i] != '') {
|
|
MRB_Dispo = tempValue[i].split('_');
|
|
mrb = MRB_Dispo[0];
|
|
}
|
|
template += "<a href='@GlobalVars.hostURL" + "/MRB/Edit?IssueID=" + mrb + "'>" + tempValue[i] + "</a>" + ", ";
|
|
}
|
|
|
|
}
|
|
return template;
|
|
}
|
|
|
|
|
|
|
|
</script>
|