2522 lines
104 KiB
Plaintext
2522 lines
104 KiB
Plaintext
|
|
|
|
@model Fab2ApprovalSystem.Models.LotDisposition
|
|
|
|
|
|
@{
|
|
ViewBag.Title = "LotDisposition";
|
|
}
|
|
|
|
@{
|
|
Layout = "_LotDispositionLayout.cshtml";
|
|
}
|
|
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
|
<link rel="stylesheet" href="~/Content/kendogridcustom.css" />
|
|
@*<script src="~/Scripts/common.js"> </script>*@
|
|
|
|
@*<link rel="stylesheet" href="~/Scripts/jqwidgets/styles/jqx.base.css" type="text/css" />
|
|
<link rel="stylesheet" href="~/Scripts/jqwidgets/styles/jqx.energyblue.css" type="text/css" />
|
|
<link rel="stylesheet" href="~/Scripts/jqwidgets/styles/jqx.arctic.css" type="text/css" />
|
|
|
|
|
|
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxcore.js"></script>
|
|
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxdata.js"></script>
|
|
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxbuttons.js"></script>
|
|
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxscrollbar.js"></script>
|
|
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxlistbox.js"></script>
|
|
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxpanel.js"></script>
|
|
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxtree.js"></script>*@
|
|
|
|
<style>
|
|
.k-grid .k-grid-header .k-header .k-link {
|
|
height: auto;
|
|
}
|
|
.k-grid .k-grid-header .k-header {
|
|
white-space: normal;
|
|
}
|
|
</style>
|
|
@*<nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="font-size: 11px">
|
|
|
|
<div class="container-fluid">
|
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
|
|
|
<ul class="nav navbar-nav" id="myTab">
|
|
<li><a href=@Url.Action("Index", "Home", new {tabName = "MyTasks"})>My Tasks</a></li>
|
|
<li><a href=@Url.Action("Index", "Home", new { tabName = "AllTasks" })>All Documents</a></li>
|
|
</ul>
|
|
</div><!-- /.container-fluid -->
|
|
|
|
</nav>*@
|
|
<body onload="StartTimers();" onmousemove="ResetTimers();" onkeydown="ResetTimers();">
|
|
@using (Html.BeginForm())
|
|
{
|
|
<input type="hidden" id="currentStep" value="@Model.CurrentStep" />
|
|
<input type="hidden" id="environment" value="@GlobalVars.DBConnection" />
|
|
|
|
|
|
|
|
|
|
if (@Model.CurrentStep == 0)
|
|
{
|
|
<div data-spy="affix">
|
|
<input type="submit" value="Save" class="btn btn-primary btn-xs" />
|
|
<input type="button" value="Submit" class="btn btn-primary btn-xs" id="SubmitDocument" />
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
|
|
if (ViewBag.IsApprover == "true")
|
|
{
|
|
<div data-spy="affix" data-offset-top="0">
|
|
<input type="submit" value="Save" class="btn btn-primary btn-xs" />
|
|
<input type="button" value="Approve" class="btn btn-success btn-xs" id="ApproveDocument" />
|
|
<input type="button" value="Reject" class="btn btn-warning btn-xs" id="RejectDocument" />
|
|
</div>
|
|
}
|
|
}
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12 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>
|
|
</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">
|
|
@Html.TextBoxFor(model => model.IssueID, new { id = "txtIssueID", @class = "k-textbox", disabled = "disabled" })
|
|
</div>
|
|
|
|
</div>
|
|
</fieldset>
|
|
<div class="form-group">
|
|
<fieldset disabled>
|
|
<label class="control-label col-sm-4">Issue Date:</label>
|
|
<div class="col-sm-8">
|
|
@Html.TextBoxFor(model => model.IssueDate, new { id = "txtIssueDate", @class = "k-textbox", disabled = "disabled" })
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Affected Department:</label>
|
|
<div class="col-sm-8">
|
|
@(Html.Kendo().MultiSelectFor(m => m.DepartmentIDs)
|
|
.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">
|
|
@Html.EditorFor(model => model.MRBRequired)
|
|
|
|
</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">
|
|
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox" })
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Responsibility:</label>
|
|
<div class="col-sm-8">
|
|
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("Responsibility")
|
|
.BindTo(new SelectList(ViewBag.ResponsibilityList, "ResponsibilityID", "ResponsibilityName"))
|
|
.Value(Model.ResponsibilityID.ToString())
|
|
|
|
)
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Issue:</label>
|
|
<div class="col-sm-8">
|
|
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("Issue")
|
|
.BindTo(new SelectList(ViewBag.ResponsibilityIssueList, "ResponsibilityIssueID", "Issue"))
|
|
.Value(Model.ResponsibilityIssueID.ToString())
|
|
.CascadeFrom("ResponsibilityID")
|
|
|
|
)
|
|
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">CA#</label>
|
|
<div class="col-sm-8">
|
|
@Html.TextBoxFor(model => model.CANo, new { @class = "k-textbox" })
|
|
<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">
|
|
|
|
@*@(Html.Kendo().DropDownList()
|
|
.Name("OriginatorID")
|
|
.BindTo(new SelectList(ViewBag.OriginatorList, "OriginatorID", "OriginatorName"))
|
|
)*@
|
|
|
|
@Html.TextBoxFor(model => model.OriginatorName, new { id = "OriginatorName", @class = "k-textbox", disabled = "disabled" })
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">SPN Scrap Code:</label>
|
|
<div class="col-sm-8">
|
|
@Html.TextBoxFor(model => model.SPNScrapCode, new { id = "txtSPNScrapCode", @class = "k-textbox" })
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Product Engineer Approval Required</label>
|
|
<div class="col-sm-4">
|
|
@Html.EditorFor(model => model.PERequired)
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-4">Disposition By OCAP</label>
|
|
<div class="col-sm-4">
|
|
@Html.EditorFor(model => model.DispositionByOCAP)
|
|
</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, 14, 30, new { id = "txtIssueDescription", @class = "form-control", style = "font-size: 11px" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="form-group">
|
|
<label class="control-label">Reason For Disposition:</label>
|
|
@if (Model.CurrentStep == 0)
|
|
{ <div>
|
|
@Html.TextAreaFor(model => model.ReasonForDisposition, 14, 100, new { id = "txtReasonForDisposition", @class = "form-control", style = "font-size: 11px; width: 100%" })
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
|
|
<button type="button" class="btn btn-xs btn-primary" id="UpdateReasonForDisposition">Click here to Update Reason</button>
|
|
<div>
|
|
@Html.TextAreaFor(model => model.ReasonForDisposition, 14, 100, new { id = "txtReasonForDisposition", @class = "form-control", style = "font-size: 11px; width: 100%", @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);
|
|
//.ClientTemplate((@Html.ActionLink("#=FileName#", "DownloadFile", "LotDisposition", new { attachmentID = "AAA"}, null).ToHtmlString().Replace("AAA", "#=AttachmentID#")));
|
|
//.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.Custom("View").Click("DownloadAttachment"));
|
|
columns.Command(command => command.Custom("Delete").Click("deleteAttachment"));
|
|
|
|
|
|
})
|
|
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:157px; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
//.Batch(false)
|
|
.ServerOperation(false)
|
|
.Events(events => events.Error("error_handler"))
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.AttachmentID);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("Attachment_Read", "LotDisposition", new { issueID = Model.IssueID }))
|
|
.Destroy(destroy => destroy.Action("Attachment_Destroy", "LotDisposition"))
|
|
)
|
|
)
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-heading">
|
|
<table cellspacing="50" cellpadding="50" border="0" width="100%">
|
|
<tr>
|
|
<td width="10%">
|
|
<ul>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="font-size: 12px">Lot Options<b class="caret"></b></a>
|
|
<ul class="dropdown-menu" style="font-size: 11px">
|
|
<li><a href="#" id="showLotSearchFormButton">Search Lots</a></li>
|
|
<li><a href="#" id="lotAddFormButton">Add Lot</a></li>
|
|
<li><a href="#" id="lotReleaseAllButton">Release All Wafers</a></li>
|
|
<li><a href="#" id="lotScrapAllButton">Scrap All Wafers</a></li>
|
|
<li><a href="#" id="lotDeleteAllButton">Delete All Lots</a></li>
|
|
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
|
|
<td class="pull-left">
|
|
|
|
@(Html.Kendo().Upload()
|
|
.Name("Lotfile")
|
|
.Messages(m => m.Select("Import Lots using an Excel file"))
|
|
.Async(a => a.Save("ExcelLotOpen", "LotDisposition", new { issueID = Model.IssueID }).AutoUpload(true))
|
|
.ShowFileList(false)
|
|
.Events(events => events.Success("onLotFileUploadSuccess").Error("onLotUploadError").Upload("onLotUpload"))
|
|
)
|
|
</td>
|
|
|
|
<td class="pull-right">
|
|
<table>
|
|
<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>
|
|
</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.MRBDispoType).Visible(false);
|
|
columns.Bound(l => l.IssueIDWithoutMRB).Visible(false);
|
|
columns.Bound(l => l.GoodToSubmit).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#").Width("120px");
|
|
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).Width("50px");
|
|
columns.Bound(l => l.Gen).Width("50px");
|
|
columns.Bound(l => l.Hexsize).Width("50px");
|
|
columns.Bound(l => l.Voltage).Width("50px");
|
|
columns.Bound(l => l.Location).Width("50px");
|
|
columns.Bound(l => l.QualityCode).Width("50px");
|
|
columns.Command(command => command.Custom("Pick Wafers").Click("showScrapReleaseForm")).Width("100px");
|
|
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").Width("50px");
|
|
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").Width("50px");
|
|
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").Width("50px");
|
|
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").Width("75px");
|
|
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").Width("50px");
|
|
//columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
|
//.ClientTemplate("<a href='file:////" + GlobalVars.NDriveURL + "/Userdata/FAB Engineering/CommonRW/FabLotDispositionLotInfo/#=ParentLotNumber#' + ' target='_blank'>Show</a>").Title("Lot Data").Width("50px");
|
|
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
|
.ClientTemplate("<a href='file:////" + GlobalVars.NDriveURL + "/FAB_Engineering/01_Other/FabLotDispositionLotInfo/#=ParentLotNumber#' + ' target='_blank'>Show</a>").Title("Lot Data").Width("50px");
|
|
|
|
|
|
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"
|
|
<a href='javascript: void(0)' class='abutton edit' onclick='editRow(this)' title='button edit'>button edit</a>
|
|
<a href='javascript: void(0)' class='abutton delete' onclick='deleteRow(this)' title='button delete'>button delete</a>");
|
|
})
|
|
|
|
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:250px; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
//.Batch(false)
|
|
.ServerOperation(false)
|
|
.Events(e => e.Error("error_handler").RequestEnd("RefreshLotSummary"))
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.LotID);
|
|
model.Field(p => p.LotID).Editable(false);
|
|
//model.Field(p => p.TotalCost).Editable(false);
|
|
})
|
|
|
|
.PageSize(25)
|
|
.Read(read => read.Action("EditingCustom_Read", "LotDisposition", new { issueID = Model.IssueID }))
|
|
.Update(update => update.Action("EditingCustom_Update", "LotDisposition"))
|
|
.Destroy(destroy => destroy.Action("EditingCustom_Destroy", "LotDisposition")))
|
|
.Resizable(resize => resize.Columns(true))
|
|
.Pageable(pageable => pageable
|
|
.Refresh(true)
|
|
.PageSizes(true)
|
|
.ButtonCount(5))
|
|
|
|
.Events(e => e.Edit("onEdit"))
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
@if (@Model.CurrentStep == 1)
|
|
{
|
|
<div class="panel-heading">
|
|
@if (ViewBag.IsApprover == "true")
|
|
{
|
|
<button class="k-textbox" data-toggle="modal" id="reAssignApprovers">
|
|
Re-Assign Approvers
|
|
</button>
|
|
}
|
|
|
|
<button class="k-textbox" data-toggle="modal" id="additionalApprovers">
|
|
Additional Approvers
|
|
</button>
|
|
</div>
|
|
}
|
|
|
|
|
|
<div class="panel-body bg-warning">
|
|
<div class="col-sm-offset-0">
|
|
@if (Session[GlobalVars.IS_ADMIN] != null)
|
|
{
|
|
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
|
{
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
|
.Name("ApproversList")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.UserID).Visible(false);
|
|
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);
|
|
//columns.Bound(p => p.Status).ClientTemplate("#=buildButtons(Status)#");
|
|
columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
|
|
|
})
|
|
.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(20)
|
|
.Read(read => read.Action("GetApproversList", "LotDisposition", new { issueID = Model.IssueID, step = Model.CurrentStep }))
|
|
)
|
|
.Resizable(resize => resize.Columns(true))
|
|
|
|
)
|
|
}
|
|
else
|
|
{
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
|
.Name("ApproversList")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.UserID).Visible(false);
|
|
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(20)
|
|
.Read(read => read.Action("GetApproversList", "LotDisposition", new { issueID = Model.IssueID, step = Model.CurrentStep }))
|
|
)
|
|
.Resizable(resize => resize.Columns(true))
|
|
|
|
)
|
|
}
|
|
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
</body>
|
|
<!-- Button trigger modal -->
|
|
<!-- Modal -->
|
|
|
|
<div class="modal fade" id="LotSearchForm" tabindex="0" 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">Lot Search</h4>
|
|
</div>
|
|
|
|
<div class="modal-body ">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="controls">
|
|
<label for="Category">Search By:</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<div id="example" class="k-content">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("LotCriteria")
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
//.Events(e => e.Change("change"))
|
|
.BindTo(new List<SelectListItem>() {
|
|
new SelectListItem() {
|
|
Text = "Lot/DieLotNumber",
|
|
Value = "LotNo"
|
|
},
|
|
new SelectListItem() {
|
|
Text = "Location",
|
|
Value = "Location"
|
|
}
|
|
//,new SelectListItem() {
|
|
// Text = "Gen",
|
|
// Value = "Gen"
|
|
//}
|
|
})
|
|
.Value("1")
|
|
)
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
@Html.TextBox("txtSearch", null, new { @class = "k-textbox" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<input style="margin-top: 5px;" type="button" id='jqxButtonSearchLots' value="Search Lots" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br />
|
|
<div class="row">
|
|
<div class="col-sm-5">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<select multiple id="jiraVersion" style="height: 250px; width: 200px; font-family: Tahoma; border-color: lightgrey" class="jqx-combobox-multi-item">
|
|
|
|
</select>
|
|
@*<div id='lstSearchedLots'>
|
|
</div>*@
|
|
<div>
|
|
<input style="margin-top: 20px;" type="button" id='jqxButtonAddLots' value="Add Lots" />
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<div id='lstSelectedLots' style="height:250px; width:200px; font-family:Tahoma; border-color:lightgrey">
|
|
|
|
</div>
|
|
<div>
|
|
<input style="margin-top: 20px;" type="button" id='jqxButtonRemoveLots' value="Remove Lots" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="submitSelectLot">Save changes</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="LotAddForm" 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">Enter Lot Information:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="LotNumber">Wafer Lot#:</label>
|
|
<div class="controls">
|
|
<input type="text" class="form-control" id="LotNumber" placeholder="LotNumber">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="LotDescription">Lot Description:</label>
|
|
<div class="controls">
|
|
<input type="text" class="form-control" id="LotDescription" placeholder="LotDescription">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="NewPartNo">New Part#:</label>
|
|
<div class="controls">
|
|
<input type="text" class="form-control" id="NewPartNo" placeholder="NewPartNo">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row">
|
|
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="WipPartNo">WIP Part No:</label>
|
|
<div class="controls">
|
|
<input type="text" class="form-control" id="WipPartNo" placeholder="WipPartNo">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="DiePartNo">DiePart#:</label>
|
|
<div class="controls">
|
|
<input type="text" class="form-control" id="DiePartNo" placeholder="DiePartNo">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="ProductFamily">Product Family:</label>
|
|
<div class="controls">
|
|
<input type="text" class="form-control" id="ProductFamily" placeholder="ProductFamily">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="Gen">Gen:</label>
|
|
<div class="controls">
|
|
<input type="number" class="form-control" id="Gen" placeholder="Gen">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="Channel">Channel:</label>
|
|
<div class="controls">
|
|
<input type="text" class="form-control" id="Channel" placeholder="Channel">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="Hexsize">Hexsize:</label>
|
|
<div class="controls">
|
|
<input type="number" class="form-control" id="Hexsize" placeholder="Hexsize">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<br />
|
|
<div class="row">
|
|
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="Location">Location:</label>
|
|
<div class="controls">
|
|
<input type="text" class="form-control" id="Location" placeholder="Location">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="WaferCount">Wafer Count:</label>
|
|
<div class="controls">
|
|
<input type="number" class="form-control" id="WaferCount" placeholder="WaferCount">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="DieCount">Die Count:</label>
|
|
<div class="controls">
|
|
<input type="number" class="form-control" id="DieCount" placeholder="DieCount">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br />
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="Voltage">Voltage:</label>
|
|
<div class="controls">
|
|
<input type="number" class="form-control" id="Voltage" placeholder="Voltage">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="TotalCost">Total Cost:</label>
|
|
<div class="controls">
|
|
<input type="number" class="form-control" id="TotalCost" placeholder="TotalCost">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="DieLotNumber">Die Lot#:</label>
|
|
<div class="controls">
|
|
<input type="number" class="form-control" id="DieLotNumber" placeholder="DieLotNumber">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<label>Lot Staus Options:</label>
|
|
<br />
|
|
<label class="radio-inline">
|
|
<input type="radio" class="radioBtnClass" name="LotStatusOptionID" id="LotStatusOptionID" value="1~Release" checked>
|
|
Release
|
|
</label>
|
|
<label class="radio-inline">
|
|
<input type="radio" class="radioBtnClass" name="LotStatusOptionID" id="LotStatusOptionID" value="2~Scrap">
|
|
Scrap
|
|
</label>
|
|
<label class="radio-inline">
|
|
<input type="radio" class="radioBtnClass" name="LotStatusOptionID" id="LotStatusOptionID" value="3~NotAvailable">
|
|
Not Available
|
|
</label>
|
|
<label class="radio-inline">
|
|
<input type="radio" class="radioBtnClass" name="LotStatusOptionID" id="LotStatusOptionID" value="4~M_Suffix">
|
|
M_Suffix
|
|
</label>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="submitLotAdd">Save changes</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="LotStatusForm" 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="lotScrapContainer">
|
|
@Html.Partial("_ScrapRelease", Model.Lot.ScrapLotWafer)
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="modal fade" id="ApprovalComments" 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">Enter Approval Comments:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="3" id="approvalComments"></textarea>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="submitApprovalComments">Confirm Approval</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="RejectComments" 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">Enter Reject Comments:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="3" id="rejectComments"></textarea>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="submitRejectComments">Confirm Reject</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
|
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
|
<div id='lstReAssignApproval'>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="AdditionalApproval" 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">Add New Approvers:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<div id='lstAdditionalApproval'>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="additionalApproval">Confirm Additional Approver</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" id="UpdateReasonForDispositionWin" 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">Update Reason For Disposition:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="5" id="ReasonForDisposition"></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="ConfirmUpdateReasonForDisposition">OK</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" id="timeout" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog modal-lg" style="width:500px;">
|
|
<div class="modal-content">
|
|
<div class="modal-header" style="background-color: #fce0a3;">
|
|
<h3 class="modal-title">Page About To Timeout</h3>
|
|
</div>
|
|
<div class="modal-body" style="background-color: crimson; font-size: 20px; color:white">
|
|
You will automatically be redirected to your Home Page in 1 minute.<br />
|
|
To remain on this page please close this window or press the ESC key.
|
|
</div>
|
|
<div class="modal-footer" style="background-color: #fce0a3; ">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
var waferStatusOption = {
|
|
Release: 1,
|
|
Scrap: 2,
|
|
NotAvailable: 3,
|
|
M_Suffix: 4,
|
|
Select_Wafers: 5,
|
|
CloseToQDB: 6,
|
|
SplitOffHold: 7
|
|
}
|
|
var connection = $("#environment").val();
|
|
var isDirty = 'false';
|
|
var errorCodeDisplayed = false;
|
|
var reAssignUserid;
|
|
|
|
$(document).ready(function () {
|
|
$('#DepartmentIDs').on('change', function () { isDirty = 'true'; });
|
|
//$('#MRBRequired').on('click', function () { isDirty = 'true'; });
|
|
$('#txtTitle').on('change', function () { isDirty = 'true'; });
|
|
$('#Responsibility').on('change', function () { isDirty = 'true'; });
|
|
$('#Issue').on('change', function () { isDirty = 'true' });
|
|
$('#CANo').on('change', function () { isDirty = 'true'; });
|
|
$('#txtSPNScrapCode').on('change', function () { isDirty = 'true'; });
|
|
$('#PERequired').on('click', function () {
|
|
if ($('#PERequired').is(':checked')) {
|
|
if (confirm('Are you sure you want to require Product Engineer approval?') == false) {
|
|
$("#PERequired").prop('checked', false);
|
|
return;
|
|
}
|
|
};
|
|
isDirty = 'true';
|
|
});
|
|
$('#txtIssueDescription').on('change', function () { isDirty = 'true'; });
|
|
$('#txtReasonForDisposition').on('change', function () { isDirty = 'true'; });
|
|
|
|
$('form').submit(function (e) {
|
|
e.preventDefault();
|
|
SaveData();
|
|
return false;
|
|
});
|
|
|
|
|
|
var SaveData = function () {
|
|
|
|
isDirty = 'false';
|
|
var originatorID = $("#OriginatorName").val();
|
|
var issueNumber = $("#txtIssueID").val();
|
|
var peRequired;
|
|
if ($('#PERequired').is(':checked'))
|
|
peRequired = 1;
|
|
else
|
|
peRequired = 0;
|
|
|
|
var mrbRequired = 0;
|
|
//if ($('#MRBRequired').is(':checked'))
|
|
// mrbRequired = 1;
|
|
//else
|
|
// mrbRequired = 0;
|
|
|
|
var dispoByOCAP;
|
|
if ($('#DispositionByOCAP').is(':checked'))
|
|
dispoByOCAP = 1;
|
|
else
|
|
dispoByOCAP = 0;
|
|
|
|
var title = $("#txtTitle").val();
|
|
var departmentids = $("#DepartmentIDs").data("kendoMultiSelect").value();
|
|
var responsibility = $("#Responsibility").data("kendoDropDownList").value();
|
|
var responsibilityIssue = $("#Issue").data("kendoDropDownList").value();
|
|
var spnScrapCode = $("#txtSPNScrapCode").val();
|
|
var issueDescription = $("#txtIssueDescription").val();
|
|
var reasonForDisposition = $("#txtReasonForDisposition").val();
|
|
var CANo = $("#CANo").val();
|
|
|
|
$.ajax({
|
|
url: '/LotDisposition/Edit',
|
|
type: "POST",
|
|
//dataType: "text",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(
|
|
{
|
|
Title: title,
|
|
IssueID: issueNumber,
|
|
PERequired: peRequired,
|
|
MRBRequired: mrbRequired,
|
|
DispositionByOCAP: dispoByOCAP,
|
|
CANo: CANo,
|
|
DepartmentIds: departmentids,
|
|
ResponsibilityID: responsibility,
|
|
ResponsibilityIssueID: responsibilityIssue,
|
|
SPNScrapCode: spnScrapCode,
|
|
IssueDescription: issueDescription,
|
|
ReasonForDisposition: reasonForDisposition
|
|
|
|
}),
|
|
success: function (result) {
|
|
|
|
//alert("success " + result.UserName);
|
|
},
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
if (jqXHR.status = 401) {
|
|
|
|
}
|
|
|
|
else {
|
|
alert("Failed " + jqXHR.responseText);
|
|
}
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
$("#showLotSearchFormButton").on('click', function () {
|
|
|
|
//$("#lstSearchedLots").jqxListBox('clear');
|
|
clearSourceLotsListBox();
|
|
$("#lstSelectedLots").jqxListBox('clear');
|
|
$('#txtSearch').val('');
|
|
$("#LotSearchForm").modal('show');
|
|
return false;
|
|
})
|
|
|
|
|
|
$("#lotAddFormButton").on('click', function () {
|
|
$("#LotAddForm").modal('show');
|
|
return false;
|
|
})
|
|
|
|
|
|
|
|
$("#submitLotAdd").on('click', function () {
|
|
var lotStatusOptionData = $('input:radio[name=LotStatusOptionID]:checked').val().split('~');
|
|
var lotStatusOptionID = lotStatusOptionData[0];
|
|
var lotStatusOptionName = lotStatusOptionData[1];
|
|
|
|
$.ajax({
|
|
url: '/LotDisposition/AddLot',
|
|
type: "Post",
|
|
dataType: "json",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(
|
|
{
|
|
IssueID: $("#txtIssueID").val(),
|
|
LotNumber: $("#LotNumber").val(),
|
|
DieLotNumber: $("#LotNumber").val(),
|
|
IssueID: $("#IssueID").val(),
|
|
Description: $("#Description").val(),
|
|
NewPartNo: $("#NewPartNo").val(),
|
|
WipPartNo: $("#WipPartNo").val(),
|
|
DiePartNo: $("#DiePartNo").val(),
|
|
ProductFamily: $("#ProductFamily").val(),
|
|
Gen: $("#Gen").val(),
|
|
Channel: $("#Channel").val(),
|
|
Hexsize: $("#Hexsize").val(),
|
|
Voltage: $("#Voltage").val(),
|
|
WaferCount: $("#WaferCount").val(),
|
|
DieCount: $("#DieCount").val(),
|
|
Location: $("#Location").val(),
|
|
TotalCost: $("#TotalCost").val(),
|
|
LotStatusOptionID: lotStatusOptionID,
|
|
LotStatusOptionName: lotStatusOptionName
|
|
|
|
}),
|
|
success: function (result) {
|
|
if (result.OpenIssueWithExistingLots != 0) {
|
|
alert('The following Lot Number ' + data.LotNumber + ' cannot be added because it belongs to the following Open Lot Dispo ' + result.OpenIssueWithExistingLots);
|
|
}
|
|
|
|
var grid = $("#Lots").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val());
|
|
$("#LotAddForm").modal('hide');
|
|
// referesh Lot Summary
|
|
RefreshLotSummary();
|
|
},
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
alert("Failed " + errorThrown);
|
|
|
|
}
|
|
});
|
|
return false;
|
|
})
|
|
});
|
|
|
|
//
|
|
displayEmptySelectedLotsList();
|
|
//
|
|
//displayEmptySearchedLotsList();
|
|
|
|
function error_handler(e) {
|
|
if (e.errors) {
|
|
var message = "Errors:\n";
|
|
$.each(e.errors, function (key, value) {
|
|
if ('errors' in value) {
|
|
$.each(value.errors, function () {
|
|
message += this + "\n";
|
|
});
|
|
}
|
|
});
|
|
alert(message);
|
|
}
|
|
}
|
|
|
|
$("#jqxButtonSearchLots").jqxButton({
|
|
theme: 'energyblue'
|
|
});
|
|
|
|
$("#jqxButtonAddLots").jqxButton({
|
|
theme: 'energyblue'
|
|
});
|
|
|
|
$("#jqxButtonRemoveLots").jqxButton({
|
|
theme: 'energyblue'
|
|
});
|
|
|
|
// REGION SERACH LOTS MODAL DIALOG
|
|
|
|
$("#jqxButtonSearchLots").on('click', function displayLots() {
|
|
var searchText = ($("#txtSearch").val());
|
|
var searchBy = $("#LotCriteria").data("kendoDropDownList").value();
|
|
var url = "/LotDisposition/SearchLots";
|
|
|
|
//var url = "/LotDisposition/SearchLots?searchText=" + searchText + "&searchBy=" + searchBy;
|
|
//var source =
|
|
//{
|
|
// datatype: "json",
|
|
// virtualmode: true,
|
|
// datafields: [
|
|
// { name: 'LotNumber' }
|
|
// ],
|
|
// id: 'id',
|
|
// url: url,
|
|
//};
|
|
//var dataAdapter = new $.jqx.dataAdapter(source);
|
|
//// Create a jqxListBox
|
|
//$("#lstSearchedLots").jqxListBox({
|
|
// multipleextended: true, theme: "arctic", source: dataAdapter, displayMember: "LotNumber", valueMember: "LotNumber", width: 200, height: 250
|
|
//});
|
|
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
searchText: searchText,
|
|
searchBy: searchBy
|
|
},
|
|
success: function (data) {
|
|
|
|
|
|
clearSourceLotsListBox();
|
|
$.each(data, function (index, value) {
|
|
$('#jiraVersion').append($('<option>').text(value).val(index));
|
|
});
|
|
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
//$("#lstSearchedLots").on('select', function (event) {
|
|
// if (event.args) {
|
|
// var item = event.args.item;
|
|
// if (item) {
|
|
// var valueelement = $("<div></div>");
|
|
// valueelement.text("Value: " + item.value);
|
|
// var labelelement = $("<div></div>");
|
|
// labelelement.text("Label: " + item.label);
|
|
|
|
// }
|
|
// }
|
|
//});
|
|
|
|
});
|
|
|
|
var clearSourceLotsListBox = function () {
|
|
$('#jiraVersion').each(function () {
|
|
this.options.length = 0;
|
|
$(this)[0].options.length = 0;
|
|
});
|
|
}
|
|
|
|
$('#jqxButtonAddLots').on('click', function () {
|
|
// get selected items.
|
|
var bfound = false;
|
|
var lots;
|
|
var selected = $('#jiraVersion option:selected');
|
|
var selectedIndices = []; // create an empty array
|
|
$.each($('#jiraVersion option:selected'), function (index, value) { // loop over each option
|
|
//selectedIndices.push(index); // add the index to the array
|
|
//alert(value.text);
|
|
var tempvalue = value.text;
|
|
var templabel = value.text;
|
|
|
|
var itemsAdded = $("#lstSelectedLots").jqxListBox('getItems');
|
|
if (itemsAdded != undefined) {
|
|
for (var x = 0; x < itemsAdded.length; x++) {
|
|
if (itemsAdded[x].label == templabel) {
|
|
bfound = true;
|
|
break;
|
|
};
|
|
};
|
|
|
|
if (!bfound) {
|
|
$("#lstSelectedLots").jqxListBox('addItem', { label: tempvalue, value: tempvalue });
|
|
if (lots == null)
|
|
lots = tempvalue;
|
|
else
|
|
lots += "~" + tempvalue;
|
|
}
|
|
|
|
bfound = false;
|
|
}
|
|
else {
|
|
|
|
$("#lstSelectedLots").jqxListBox('addItem', { label: tempvalue, value: tempvalue });
|
|
}
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
/*
|
|
$('#jqxButtonAddLots').on('click', function () {
|
|
// get selected items.
|
|
var bfound = false;
|
|
var lots;
|
|
var itemsToAdd = $('#lstSearchedLots').jqxListBox('getSelectedItems');
|
|
if (itemsToAdd.length > 0) {
|
|
|
|
for (var i = 0; i < itemsToAdd.length; i++) {
|
|
|
|
if (itemsToAdd[i].label != undefined) {
|
|
|
|
var tempvalue = itemsToAdd[i].value;
|
|
var templabel = itemsToAdd[i].label;
|
|
|
|
//if (i < itemsToAdd.length - 1)
|
|
//{
|
|
// check if the item exists in the seleced lots list
|
|
var itemsAdded = $("#lstSelectedLots").jqxListBox('getItems');
|
|
if (itemsAdded != undefined) {
|
|
for (var x = 0; x < itemsAdded.length; x++) {
|
|
if (itemsAdded[x].label == templabel) {
|
|
bfound = true;
|
|
break;
|
|
};
|
|
};
|
|
|
|
if (!bfound) {
|
|
$("#lstSelectedLots").jqxListBox('addItem', { label: templabel, value: tempvalue });
|
|
if (lots == null)
|
|
lots = tempvalue;
|
|
else
|
|
lots += "~" + tempvalue;
|
|
}
|
|
|
|
bfound = false;
|
|
}
|
|
else {
|
|
|
|
$("#lstSelectedLots").jqxListBox('addItem', { label: templabel, value: tempvalue });
|
|
}
|
|
|
|
}
|
|
};
|
|
|
|
|
|
}
|
|
|
|
// unselect all the selected items
|
|
$("#lstSearchedLots").jqxListBox({ selectedIndex: -1 });
|
|
|
|
});
|
|
|
|
*/
|
|
|
|
$('#jqxButtonRemoveLots').on('click', function () {
|
|
// get items.
|
|
var userids;
|
|
var items = $("#lstSelectedLots").jqxListBox('getSelectedItems');
|
|
if (items != undefined) {
|
|
for (var i = items.length - 1; i >= 0; i--) {
|
|
$("#lstSelectedLots").jqxListBox('removeItem', items[i].value);
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$("#submitSelectLot").on('click', function () {
|
|
|
|
var lots;
|
|
var items = $("#lstSelectedLots").jqxListBox('getItems');
|
|
if (items != undefined) {
|
|
for (var x = 0; x < items.length; x++) {
|
|
if (lots == undefined)
|
|
lots = items[x].value;
|
|
else
|
|
lots += "~" + items[x].value;
|
|
};
|
|
|
|
$.ajax({
|
|
url: "/LotDisposition/AddLots",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $('#txtIssueID').val(),
|
|
lotNumbers: lots
|
|
},
|
|
success: function (data) {
|
|
if (data.IssuesList != null) {
|
|
alert('The following Lot Numbers ' + data.LotList + ' cannot be added because they belong to one of the following Open Lot Dispos ' + data.IssuesList);
|
|
}
|
|
|
|
var grid = $("#Lots").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val());
|
|
|
|
$("#LotSearchForm").modal('hide');
|
|
// referesh Lot Summary
|
|
RefreshLotSummary();
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
}
|
|
return false;
|
|
});
|
|
|
|
|
|
function displayEmptySelectedLotsList() {
|
|
//var url = "/LotDisposition/SearchLots?searchText=" + searchText + "&searchBy=LotNo";
|
|
var source =
|
|
{
|
|
datatype: "json",
|
|
datafields: [
|
|
{ name: 'LotNo' }
|
|
],
|
|
id: 'id'
|
|
//url: url
|
|
};
|
|
var dataAdapter = new $.jqx.dataAdapter(source);
|
|
// Create a jqxListBox
|
|
$("#lstSelectedLots").jqxListBox({
|
|
multipleextended: true, theme: "arctic", source: dataAdapter, displayMember: "LotNo", valueMember: "LotNo", width: 200, height: 250
|
|
});
|
|
}
|
|
|
|
//function displayEmptySearchedLotsList() {
|
|
// var source =
|
|
// {
|
|
// datatype: "json",
|
|
// datafields: [
|
|
// { name: 'LotNo' }
|
|
// ],
|
|
// id: 'id'
|
|
// //url: url
|
|
// };
|
|
// var dataAdapter = new $.jqx.dataAdapter(source,
|
|
// {
|
|
// formatData: function (data) {
|
|
// $.extend(data, {
|
|
// featureClass: "P",
|
|
// style: "full",
|
|
// maxRows: 5000
|
|
// });
|
|
// return data;
|
|
// }
|
|
// });
|
|
// // Create a jqxListBox
|
|
// $("#lstSearchedLots").jqxListBox({
|
|
// multipleextended: true, theme: "arctic", source: dataAdapter, displayMember: "LotNo", valueMember: "LotNo", width: 200, height: 250
|
|
// });
|
|
//}
|
|
|
|
function deleteAttachment(e) {
|
|
e.preventDefault();
|
|
if (confirm("Are you sure you want to delete this request?")) {
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
var fileName = dataItem.FileName;
|
|
var attachmentID = dataItem.AttachmentID;
|
|
|
|
$.ajax({
|
|
url: "/LotDisposition/DeleteAttachment",
|
|
type: "POST",
|
|
datatype: "json",
|
|
data: {
|
|
attachmentID: attachmentID,
|
|
fileName: fileName
|
|
},
|
|
success: function (data) {
|
|
var grid = $("#Attachments").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val());
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
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 ;
|
|
//window.open('/LotDisposition/DownloadFile?attachmentID=' + attachmentID, '_blank');
|
|
|
|
}
|
|
|
|
|
|
|
|
function showDetails(e) {
|
|
e.preventDefault();
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
var url = "http://temirwap019.irworld.irf.com/user/wsr2/wsr_lot.php?lot=" + dataItem.LotNumber;
|
|
var ecnWin = window.open(url, "ECV");
|
|
}
|
|
|
|
function showScrapReleaseForm(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;
|
|
var lotStatusOption = dataItem.LotStatusOptionID;
|
|
//var bInvalidCLoseToQDBLocation = false;
|
|
|
|
//if (dataItem.Location == 'QDB' || dataItem.Location == 'EDB')
|
|
//{
|
|
// alert("You cannot set Status for each wafer if the lot is in QDB or EDB location");
|
|
// return false;
|
|
//}
|
|
|
|
if ((dataItem.Location == 'QDB' || dataItem.Location == 'EDB') && lotStatusOption == waferStatusOption.CloseToQDB) {
|
|
alert("You cannot set Status for each wafer if the Staus of the lot is set to CloseToQDB and if the Lot is not in the Fab or the Probe location");
|
|
return false;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
|
|
if (lotStatusOption == waferStatusOption.M_Suffix) {
|
|
alert("You cannot set Status for each wafer if the status of the Lot is M_Suffix ");
|
|
return false;
|
|
}
|
|
|
|
var url = $('#LotStatusForm').data('url');
|
|
//url = url + '?issueID=' + issueID + '&lotNumber=' + lotNumber + '&waferCount=' + waferCount;
|
|
url = url + '?issueID=' + issueID + '&lotNumber=' + lotNumber + '&readonlyView=false&lotLocation=' + dataItem.Location;
|
|
|
|
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
success: function (data) {
|
|
$('#lotScrapContainer').html(data);
|
|
$("#LotStatusForm").modal('show');
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
return false;
|
|
}
|
|
|
|
|
|
|
|
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)$/)) {
|
|
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
|
e.preventDefault();
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
$('#lotReleaseAllButton').on('click', function UpdateAllLotsToReleaseStatus() {
|
|
|
|
if (confirm("Are you sure you want to set all the lots to a 'Release STATUS'?")) {
|
|
|
|
$.ajax({
|
|
url: "/LotDisposition/ReleaseAll",
|
|
type: "POST",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val()
|
|
},
|
|
success: function (data) {
|
|
var grid = $("#Lots").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val());
|
|
// referesh Lot Summary
|
|
RefreshLotSummary();
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
}
|
|
|
|
return false;
|
|
});
|
|
|
|
|
|
|
|
$('#lotScrapAllButton').on('click', function UpdateAllLotsToScrapStatus() {
|
|
|
|
if (confirm("Are you sure you want to set all the lots to a 'SCRAP STATUS'?")) {
|
|
|
|
$.ajax({
|
|
url: "/LotDisposition/ScrapAll",
|
|
type: "POST",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val()
|
|
},
|
|
success: function (data) {
|
|
var grid = $("#Lots").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val());
|
|
// referesh Lot Summary
|
|
RefreshLotSummary();
|
|
}
|
|
,
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
}
|
|
|
|
return false;
|
|
|
|
})
|
|
|
|
//$('#lotScrapAllButton').on('click', function UpdateAllLotsToScrapStatus() {
|
|
// $('<div>').dialog({
|
|
// modal: true,
|
|
// open: function () {
|
|
// $(this).load('yahoo.com');
|
|
// },
|
|
// height: 400,
|
|
// width: 400,
|
|
// title: 'Dynamically Loaded Page'
|
|
// });
|
|
|
|
//})
|
|
|
|
|
|
$('#lotDeleteAllButton').on('click', function DeleteAllLots() {
|
|
|
|
if (confirm("Are you sure you want to DELETE ALL the Lots?")) {
|
|
|
|
$.ajax({
|
|
url: "/LotDisposition/DeleteAllLots",
|
|
type: "POST",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val()
|
|
},
|
|
success: function (data) {
|
|
var grid = $("#Lots").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val());
|
|
// referesh Lot Summary
|
|
RefreshLotSummary();
|
|
}
|
|
,
|
|
error: function (result) {
|
|
alert("Operation Failed " + result);
|
|
}
|
|
});
|
|
}
|
|
|
|
return false;
|
|
|
|
})
|
|
|
|
function RefreshLotSummary() {
|
|
|
|
$.ajax({
|
|
url: "/LotDisposition/GetLotDispositionLotSummary",
|
|
type: "POST",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val()
|
|
},
|
|
success: function (data) {
|
|
$('#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 + ']');
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
}
|
|
|
|
// Get the Responsibilty issue
|
|
$("#Responsibility").change(function () {
|
|
$.ajax({
|
|
url: '@Url.Action("GetResponsibilityIssue", "LotDisposition")',
|
|
type: "Post",
|
|
data: { responsibilityID: $("#Responsibility").val() },
|
|
success: function (listItems) {
|
|
var ddl = $('#Issue').data("kendoDropDownList");
|
|
ddl.setDataSource(listItems);
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
$('#SubmitDocument').on('click', function () {
|
|
var waferCount;
|
|
var dieCount;
|
|
var scrapCount;
|
|
var releaseCount;
|
|
var splitOfHoldCount;
|
|
var closeToQDBCount;
|
|
var lotNo = "";
|
|
var bLocationEmpty;
|
|
var bHexSizeEmpty;
|
|
var bGenEmpty;
|
|
var bProductFamilyEmpty;
|
|
var bWaferDieCount;
|
|
var message = '';
|
|
|
|
var title = $("#txtTitle").val();
|
|
var departmentids = $("#DepartmentIDs").data("kendoMultiSelect").value();
|
|
var responsibility = $("#Responsibility").data("kendoDropDownList").value();
|
|
var responsibilityIssue = $("#Issue").data("kendoDropDownList").value();
|
|
$('#SubmitDocument').attr("disabled", true);
|
|
// -------------FORM VALIDATION
|
|
if (title.length <= 0)
|
|
message = "Title, ";
|
|
|
|
//if (departmentids.length <= 0)
|
|
// message = message + " Department, ";
|
|
|
|
if (responsibility.responsibility <= 0)
|
|
message = message + " Responsibility, ";
|
|
|
|
if (responsibilityIssue.length <= 0)
|
|
message = message + " Responsibility Issue, ";
|
|
|
|
if (message != '') {
|
|
alert(message + 'needs to be entered before submitting the document ');
|
|
$('#SubmitDocument').attr("disabled", false);
|
|
return false;
|
|
}
|
|
|
|
// -------------------GRID VALIDATION
|
|
var vgrid = $("#Lots").data("kendoGrid");
|
|
//Getting grid items
|
|
var items = vgrid.dataSource.data();
|
|
if (items.length == 0) {
|
|
alert('There are no lots to be dispositioned, Please enter at least one lot before Submission');
|
|
$('#SubmitDocument').attr("disabled", false);
|
|
return false;
|
|
}
|
|
|
|
var totalWafers = 0;
|
|
var totalScrap = 0;
|
|
var incorrectDispoLotList = '';
|
|
var noDispolotList = '';
|
|
for (i = 0; i < items.length; i++) {
|
|
var item = items[i];
|
|
|
|
// 07/02/2018 - CODE Commented due to not being ready for Implementation by business ===============================================================
|
|
//if (item.GoodToSubmit == false)
|
|
//{
|
|
// if (incorrectDispoLotList == '') {
|
|
// incorrectDispoLotList = item.LotNumber;
|
|
// }
|
|
// else{
|
|
// incorrectDispoLotList = incorrectDispoLotList + ', ' + item.LotNumber;
|
|
// }
|
|
//}
|
|
|
|
|
|
|
|
//if (item.MRBDispoType == null && item.IssueIDWithoutMRB != null)
|
|
//{
|
|
|
|
// if (noDispolotList == '') {
|
|
// noDispolotList = item.LotNumber;
|
|
// }
|
|
// else {
|
|
// noDispolotList = incorrectDispoLotList + ', ' + item.LotNumber;
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
if (item.GoodToSubmit == false) {
|
|
message += item.LotNumber + '-' + item.SubmitErrorMessage + '\n'
|
|
}
|
|
|
|
|
|
|
|
//if (noDispolotList != '') {
|
|
// alert("Submit not possible, MRB disposition missing for following lot/s" + noDispolotList);
|
|
// $('#SubmitDocument').attr("disabled", false);
|
|
// return false;
|
|
//}
|
|
|
|
//if (incorrectDispoLotList != '') {
|
|
// alert("Submit not possible, MRB disposition different for following lot/s from Lot Disposition\n" + incorrectDispoLotList);
|
|
// $('#SubmitDocument').attr("disabled", false);
|
|
// return false;
|
|
//}
|
|
|
|
// END OF COmmneted Code======================================================================================================================
|
|
|
|
|
|
if (item.LotStatusOptionID != waferStatusOption.M_Suffix
|
|
&& item.LotStatusOptionID != waferStatusOption.SplitOffHold)
|
|
{
|
|
waferCount = item.WaferCount;
|
|
scrapCount = item.ScrapCount;
|
|
releaseCount = item.ReleaseCount;
|
|
splitOfHoldCount = item.SplitOfHoldCount;
|
|
//closeToQDBCount = item.CloseToQDBCount; it is counted as release
|
|
|
|
totalWafers += (waferCount || 0);
|
|
totalScrap += (scrapCount || 0);
|
|
|
|
dieCount = item.DieCount;
|
|
if ((waferCount > (scrapCount + releaseCount + splitOfHoldCount + closeToQDBCount)) || (dieCount > (scrapCount + releaseCount + splitOfHoldCount + closeToQDBCount))) {
|
|
lotNo = lotNo + "/" + item.LotNumber;
|
|
}
|
|
if (item.Location == null || item.Location == '') { bLocationEmpty = true; }
|
|
if (item.ProductFamily == null || item.ProductFamily == '') { bProductFamilyEmpty = true; }
|
|
if (item.Gen == null || item.Gen == '') { bGenEmpty = true; }
|
|
if ((waferCount == null || waferCount == 0) && (dieCount == null || dieCount == 0)) { bWaferDieCount = true };
|
|
}
|
|
}
|
|
|
|
if (message != '') {
|
|
alert(message);
|
|
$('#SubmitDocument').attr("disabled", false);
|
|
return false;
|
|
}
|
|
|
|
var dispoByOCAP;
|
|
if ($('#DispositionByOCAP').is(':checked')) {
|
|
dispoByOCAP = 1;
|
|
if (totalScrap >= totalWafers)
|
|
message = 'Cannot select Disposition by OCAP if all wafers are set to scrap\n';
|
|
} else {
|
|
dispoByOCAP = 0;
|
|
}
|
|
|
|
if (lotNo != "") { message = "The total number of Scrapped+Released+SplitOfHoldCount+CLoseToQDBCount for Wafers/Dies does not match the total Wafer/Die Count for LotNo/s " + lotNo + "\n"; }
|
|
if (bLocationEmpty) { message = message + "Please select a valid location for each lot.\n"; }
|
|
if (bProductFamilyEmpty) { message = message + "Please enter a valid Product Family for each lot.\n"; }
|
|
if (bGenEmpty) { message = message + "Please enter a valid Gen for each lot.\n"; }
|
|
if (bWaferDieCount) { message = message + "Please make sure the Wafer Count or the Die Count is > 0 for each lot.\n"; }
|
|
if (message != '') {
|
|
alert(message);
|
|
$('#SubmitDocument').attr("disabled", false);
|
|
return false;
|
|
}
|
|
else { // save the form if anything was changed
|
|
if (isDirty == 'true') {
|
|
//isDirty = 'false';
|
|
//$("form:first").trigger("submit");
|
|
|
|
|
|
|
|
isDirty = 'false';
|
|
var originatorID = $("#OriginatorName").val();
|
|
var issueNumber = $("#txtIssueID").val();
|
|
var peRequired;
|
|
if ($('#PERequired').is(':checked'))
|
|
peRequired = 1;
|
|
else
|
|
peRequired = 0;
|
|
|
|
|
|
var mrbRequired = 0;
|
|
//if ($('#MRBRequired').is(':checked'))
|
|
// mrbRequired = 1;
|
|
//else
|
|
// mrbRequired = 0;
|
|
|
|
|
|
|
|
var title = $("#txtTitle").val();
|
|
var departmentids = $("#DepartmentIDs").data("kendoMultiSelect").value();
|
|
var responsibility = $("#Responsibility").data("kendoDropDownList").value();
|
|
var responsibilityIssue = $("#Issue").data("kendoDropDownList").value();
|
|
var spnScrapCode = $("#txtSPNScrapCode").val();
|
|
var issueDescription = $("#txtIssueDescription").val();
|
|
var reasonForDisposition = $("#txtReasonForDisposition").val();
|
|
var CANo = $("#CANo").val();
|
|
|
|
|
|
$.ajax({
|
|
url: '/LotDisposition/Edit',
|
|
type: "POST",
|
|
//dataType: "text",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(
|
|
{
|
|
Title: title,
|
|
IssueID: issueNumber,
|
|
PERequired: peRequired,
|
|
MRBRequired: mrbRequired,
|
|
DispositionByOCAP: dispoByOCAP,
|
|
CANo: CANo,
|
|
DepartmentIds: departmentids,
|
|
ResponsibilityID: responsibility,
|
|
ResponsibilityIssueID: responsibilityIssue,
|
|
SPNScrapCode: spnScrapCode,
|
|
IssueDescription: issueDescription,
|
|
ReasonForDisposition: reasonForDisposition
|
|
|
|
}),
|
|
success: function (result) {
|
|
|
|
submitForApproval();
|
|
},
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
|
|
alert("Failed " + jqXHR.responseText);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
else {
|
|
submitForApproval();
|
|
}
|
|
|
|
return false;
|
|
}
|
|
});
|
|
|
|
|
|
var submitForApproval = function () {
|
|
var peRequired;
|
|
if ($('#PERequired').is(':checked'))
|
|
peRequired = true;
|
|
else
|
|
peRequired = false;
|
|
|
|
var mrbRequired = false;
|
|
if ($('#MRBRequired').is(':checked'))
|
|
mrbRequired = true;
|
|
else
|
|
mrbRequired = false;
|
|
|
|
|
|
$.ajax({
|
|
url: "/LotDisposition/SubmitDocument",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val(),
|
|
peRequired: peRequired,
|
|
mrbRequired: mrbRequired
|
|
},
|
|
success: function (data) {
|
|
|
|
if (data == 'Redirect') {
|
|
var url = '@Url.Action("Edit", "LotDisposition", new { issueID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', $("#txtIssueID").val());
|
|
|
|
}
|
|
else {
|
|
// TODO alert an error message
|
|
}
|
|
},
|
|
error: function (xhr, ajaxOptions, thrownError) {
|
|
$('#SubmitDocument').attr("disabled", false);
|
|
DisplayAPIError("Submit. Please submit the document again.", xhr);
|
|
}
|
|
});
|
|
}
|
|
|
|
$('#ApproveDocument').on('click', function () {
|
|
$('#submitApprovalComments').attr("disabled", false);
|
|
// Save the document first if it was changed
|
|
if (isDirty == 'true') {
|
|
isDirty = 'false';
|
|
$("form:first").trigger("submit");
|
|
}
|
|
|
|
$("#ApprovalComments").modal('show');
|
|
return false;
|
|
});
|
|
|
|
|
|
$('#submitApprovalComments').on('click', function () {
|
|
$('#submitApprovalComments').attr("disabled", true);
|
|
$.ajax({
|
|
url: "/LotDisposition/Approve",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val(),
|
|
currentStep: $("#currentStep").val(),
|
|
comments: $("#approvalComments").val()
|
|
},
|
|
success: function (data) {
|
|
$("#ApprovalComments").modal('hide');
|
|
|
|
var url = '@Url.Action("ReadOnly", "LotDisposition", new { issueID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', $("#txtIssueID").val());
|
|
|
|
},
|
|
error: function (result) {
|
|
@*$("#ApprovalComments").modal('hide');
|
|
|
|
var url = '@Url.Action("ReadOnly", "LotDisposition", new { issueID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', $("#txtIssueID").val());*@
|
|
|
|
$('#submitApprovalComments').attr("disabled", false);
|
|
alert("Server error, Please Approve the document again");
|
|
}
|
|
});
|
|
});
|
|
|
|
$('#RejectDocument').on('click', function () {
|
|
// Save the document first if it was changed
|
|
$('#RejectDocument').attr("disabled", false);
|
|
if (isDirty == 'true') {
|
|
isDirty = 'false';
|
|
$("form:first").trigger("submit");
|
|
}
|
|
$("#RejectComments").modal('show');
|
|
return false;
|
|
});
|
|
|
|
$('#submitRejectComments').on('click', function () {
|
|
$('#RejectDocument').attr("disabled", true);
|
|
$.ajax({
|
|
url: "/LotDisposition/Reject",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val(),
|
|
currentStep: $("#currentStep").val(),
|
|
comments: $("#rejectComments").val()
|
|
},
|
|
success: function (data) {
|
|
$("#RejectComments").modal('hide');
|
|
var url = '@Url.Action("ReadOnly", "LotDisposition", new { issueID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', $("#txtIssueID").val());
|
|
},
|
|
error: function (result) {
|
|
$('#RejectDocument').attr("disabled", false);
|
|
alert("Server error, Please Reject the document again");
|
|
}
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
// REGION Re-Assign Approvers ===========================================================================================================
|
|
|
|
|
|
|
|
$('#reAssignApprovers').on('click', function () {
|
|
// reset this variable to indicate that the current Approver of the document is the person Re-Assigning it to someone else.
|
|
reAssignFromUserid = "";
|
|
|
|
var url = "/LotDisposition/GetAllUsersList";
|
|
var source =
|
|
{
|
|
datatype: "json",
|
|
datafields: [
|
|
{ name: 'UserID' },
|
|
{ name: 'FullName' }
|
|
],
|
|
id: 'id',
|
|
url: url,
|
|
};
|
|
var dataAdapter = new $.jqx.dataAdapter(source);
|
|
// Create a jqxListBox
|
|
$("#lstReAssignApproval").jqxListBox({
|
|
multipleextended: false, theme: "arctic", source: dataAdapter, displayMember: "FullName", valueMember: "UserID", width: 200, height: 250
|
|
});
|
|
|
|
$("#ReAssignApproval").modal('show');
|
|
return false;
|
|
})
|
|
|
|
$('#ConfirmReAssignment').on('click', function () {
|
|
// get selected items.
|
|
var bfound = false;
|
|
var userids;
|
|
var itemsToAdd = $('#lstReAssignApproval').jqxListBox('getSelectedItems');
|
|
|
|
if (itemsToAdd.length > 0) {
|
|
for (var i = 0; i < itemsToAdd.length; i++) {
|
|
if (itemsToAdd[i].label != undefined) {
|
|
var tempvalue = itemsToAdd[i].value;
|
|
var templabel = itemsToAdd[i].label;
|
|
if (userids == null)
|
|
userids = tempvalue;
|
|
else
|
|
userids += "~" + tempvalue;
|
|
}
|
|
};
|
|
//
|
|
if (userids != null) {
|
|
if (reAssignFromUserid != '') {
|
|
ReAssignApprovalByAdmin(userids);
|
|
}
|
|
else {
|
|
ReAssignApproval(userids);
|
|
}
|
|
}
|
|
$("#ReAssignApproval").modal('hide');
|
|
|
|
return false;
|
|
}
|
|
|
|
});
|
|
|
|
var ReAssignApproval = function (userids) {
|
|
var urlString = '/LotDisposition/ReAssignApproval';
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
data: {
|
|
userIDs: userids,
|
|
issueID: $("#txtIssueID").val(),
|
|
step: $("#currentStep").val()
|
|
},
|
|
success: function (result) {
|
|
//var grid = $("#ApproversList").data("kendoGrid");
|
|
//grid.dataSource.read($('#txtIssueID').val(), $("#currentStep").val());
|
|
var url = '@Url.Action("Edit", "LotDisposition", new { issueID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', $("#txtIssueID").val());
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
});
|
|
};
|
|
|
|
|
|
// REGION Additional Approver ======================================================================================================================
|
|
|
|
|
|
$('#additionalApprovers').on('click', function () {
|
|
|
|
var searchText = ($("#txtSearch").val());
|
|
var url = "/LotDisposition/GetUserListForAdditionalAppprrovers";
|
|
var source =
|
|
{
|
|
datatype: "json",
|
|
datafields: [
|
|
{ name: 'UserID' },
|
|
{ name: 'FullName' }
|
|
],
|
|
id: 'id',
|
|
url: url,
|
|
};
|
|
var dataAdapter = new $.jqx.dataAdapter(source);
|
|
// Create a jqxListBox
|
|
$("#lstAdditionalApproval").jqxListBox({
|
|
multipleextended: true, theme: "arctic", source: dataAdapter, displayMember: "FullName", valueMember: "UserID", width: 200, height: 250
|
|
});
|
|
|
|
$("#AdditionalApproval").modal('show');
|
|
return false;
|
|
})
|
|
|
|
|
|
$('#additionalApproval').on('click', function () {
|
|
// get selected items.
|
|
var bfound = false;
|
|
var userids;
|
|
var itemsToAdd = $('#lstAdditionalApproval').jqxListBox('getSelectedItems');
|
|
if (itemsToAdd.length > 0) {
|
|
for (var i = 0; i < itemsToAdd.length; i++) {
|
|
if (itemsToAdd[i].label != undefined) {
|
|
var tempvalue = itemsToAdd[i].value;
|
|
var templabel = itemsToAdd[i].label;
|
|
if (userids == null)
|
|
userids = tempvalue;
|
|
else
|
|
userids += "~" + tempvalue;
|
|
}
|
|
};
|
|
if (userids != null) {
|
|
AssignAdditionalApproval(userids);
|
|
}
|
|
$("#AdditionalApproval").modal('hide');
|
|
return false;
|
|
}
|
|
});
|
|
|
|
var AssignAdditionalApproval = function (userids) {
|
|
var urlString = '/LotDisposition/AddAdditionalApproval';
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
data: {
|
|
userIDs: userids,
|
|
issueID: $("#txtIssueID").val(),
|
|
step: $("#currentStep").val()
|
|
},
|
|
success: function (result) {
|
|
var grid = $("#ApproversList").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val(), $("#currentStep").val());
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
function onEdit(e) {
|
|
//on row edit replace the Delete and Edit buttons with Update and Cancel
|
|
$(e.container).find("td:last").html("<a href='javascript: void(0)' class='abutton update' onclick='updateRow()' title='button update'>button update</a> " +
|
|
"<a href='javascript: void(0)' class='abutton cancel' onclick='cancelRow()' title='button cancel'>button cancel</a>");
|
|
}
|
|
|
|
function cancelRow() {
|
|
grid = $("#Lots").data("kendoGrid");
|
|
grid.cancelRow();
|
|
}
|
|
|
|
function editRow(element) {
|
|
grid = $("#Lots").data("kendoGrid");
|
|
grid.editRow($(element).closest("tr"));
|
|
|
|
|
|
}
|
|
|
|
function updateRow() {
|
|
grid = $("#Lots").data("kendoGrid");
|
|
grid.saveRow();
|
|
|
|
var url = '@Url.Action("Edit", "LotDisposition", new { issueID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', $("#txtIssueID").val());
|
|
}
|
|
|
|
function deleteRow(element) {
|
|
grid = $("#Lots").data("kendoGrid");
|
|
grid.removeRow($(element).closest("tr"));
|
|
}
|
|
|
|
function createRow() {
|
|
grid = $("#Lots").data("kendoGrid");
|
|
grid.addRow();
|
|
}
|
|
|
|
|
|
|
|
|
|
function showReAssignRole(e) {
|
|
|
|
e.preventDefault();
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
|
|
$('#ReAssignApproverFromLabel').text(dataItem.FullName);
|
|
var issueID = $("#txtIssueID").val();
|
|
reAssignFromUserid = dataItem.UserID;
|
|
|
|
//if (dataItem.Status != 'Pending')
|
|
if (dataItem.Status.indexOf("Pending") < 0)
|
|
alert("Cannot ReAssign, because it is not in a Pending state");
|
|
else {
|
|
|
|
|
|
|
|
var searchText = ($("#txtSearch").val());
|
|
var url = "/LotDisposition/GetAllUsersList";
|
|
var source =
|
|
{
|
|
datatype: "json",
|
|
datafields: [
|
|
{ name: 'UserID' },
|
|
{ name: 'FullName' }
|
|
],
|
|
id: 'id',
|
|
url: url,
|
|
};
|
|
var dataAdapter = new $.jqx.dataAdapter(source);
|
|
// Create a jqxListBox
|
|
$("#lstReAssignApproval").jqxListBox({
|
|
multipleextended: false, theme: "arctic", source: dataAdapter, displayMember: "FullName", valueMember: "UserID", width: 200, height: 250
|
|
});
|
|
|
|
$("#ReAssignApproval").modal('show');
|
|
return false;
|
|
|
|
//alert(dataItem.FullName);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var ReAssignApprovalByAdmin = function (userids) {
|
|
var urlString = '/LotDisposition/ReAssignApproverByAdmin';
|
|
//if (arrayOfValues.length == 0)
|
|
// return false;
|
|
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
data: {
|
|
issueID: $("#txtIssueID").val(),
|
|
reAssignApproverFrom: reAssignFromUserid,
|
|
reAssignApproverTo: userids,
|
|
step: $("#currentStep").val()
|
|
},
|
|
success: function (result) {
|
|
|
|
//var grid = $("#ApproversList").data("kendoGrid");
|
|
//grid.dataSource.read($('#txtIssueID').val(), $("#currentStep").val());
|
|
var url = '@Url.Action("Edit", "LotDisposition", new { issueID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', $("#txtIssueID").val());
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
function buildLinks(MRBLinkedToLot) {
|
|
var template = "";
|
|
var mrb = "";
|
|
var MRB_Dispo = ""
|
|
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='/MRB/Edit?IssueID=" + tempValue[i] + "'>" + tempValue[i] + "</a>" + ", ";
|
|
template += "<a href='/MRB/Edit?IssueID=" + mrb + "'>" + tempValue[i] + "</a>" + ", ";
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return template;
|
|
}
|
|
|
|
function buildButtons(status) {
|
|
//alert(approvalid + ' ');
|
|
var template = "";
|
|
if (status == 'Pending') {
|
|
template += '<input type="button" value="Re-Assign" class="btn btn-primary btn-xs" id="ReAssign" onclick="ReAssign1(status)"/>';
|
|
}
|
|
|
|
return template;
|
|
}
|
|
|
|
$('#UpdateReasonForDisposition').on('click', function () {
|
|
$('#ConfirmUpdateReasonForDisposition').attr("disabled", false);
|
|
$("#ReasonForDisposition").val("");
|
|
$("#UpdateReasonForDispositionWin").modal('show');
|
|
return false;
|
|
})
|
|
|
|
|
|
$('#ConfirmUpdateReasonForDisposition').on('click', function () {
|
|
|
|
$('#ConfirmUpdateReasonForDisposition').attr("disabled", true);
|
|
$.ajax({
|
|
url: "/LotDisposition/UpdateReasonForDisposition",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: $("#txtIssueID").val(),
|
|
reasonForDisposition: $("#ReasonForDisposition").val()
|
|
|
|
},
|
|
success: function (data) {
|
|
|
|
var existingData = $("#txtReasonForDisposition").val();
|
|
$("#txtReasonForDisposition").val(existingData + "\n" + $("#ReasonForDisposition").val());
|
|
}
|
|
|
|
});
|
|
|
|
$("#UpdateReasonForDispositionWin").modal('hide');
|
|
|
|
})
|
|
|
|
|
|
function onLotFileUploadSuccess(e) {
|
|
var grid = $("#Lots").data("kendoGrid");
|
|
grid.dataSource.read($('#txtIssueID').val());
|
|
|
|
}
|
|
|
|
|
|
|
|
function onLotUploadError(e) {
|
|
alert("Please make sure the 'Name of the Sheet' in the excel file which you are trying to use, is called 'Sheet1'");
|
|
}
|
|
|
|
function onLotUpload(e) {
|
|
var files = e.files;
|
|
$.each(files, function () {
|
|
if (this.extension.toLowerCase() != ".xls" && this.extension.toLowerCase() != ".xlsx") {
|
|
alert("Only an excel file can be used to import Lots!")
|
|
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 IdleTimeout() {
|
|
//window.location = logoutUrl;
|
|
var url = '@Url.Action("MyTasks", "Home")';
|
|
window.location.href = url;
|
|
|
|
}*@
|
|
|
|
|
|
$(window).bind("beforeunload", function () {
|
|
//return confirm("Do you really want to close?");
|
|
$.ajax({
|
|
url: "/LotDisposition/ReleaseLockOnDocument",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
issueID: ("@Model.IssueID")
|
|
},
|
|
success: function () {
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
|
|
})
|
|
|
|
//=============================================================================================================
|
|
// the code is already in "~/Scripts/common.js", but for some reason IE 10 does not recognizes the path, hence the duplication below==========================
|
|
//var timoutWarning = 840000; // Display warning in 14 mins.
|
|
//var timoutNow = 900000; // Timeout in 15 mins 1000 * 60 * 15 = 15 mins
|
|
//var logoutUrl = '/Account/LogOff'; // URL to logout page.
|
|
|
|
//var warningTimer;
|
|
//var timeoutTimer;
|
|
|
|
//// Start timers.
|
|
//function StartTimers() {
|
|
// warningTimer = setTimeout("IdleWarning()", timoutWarning);
|
|
// timeoutTimer = setTimeout("IdleTimeout()", timoutNow);
|
|
//}
|
|
|
|
//// Reset timers.
|
|
//function ResetTimers() {
|
|
// clearTimeout(warningTimer);
|
|
// clearTimeout(timeoutTimer);
|
|
// StartTimers();
|
|
|
|
//}
|
|
|
|
//// Show idle timeout warning dialog.
|
|
//function IdleWarning() {
|
|
|
|
|
|
// $("#timeout").modal('show');
|
|
//}
|
|
//------================================================= End of duplication
|
|
</script>
|