1163 lines
50 KiB
Plaintext
1163 lines
50 KiB
Plaintext
@model Fab2ApprovalSystem.Models.LotDisposition
|
|
@{
|
|
ViewBag.Title = "LotDisposition";
|
|
}
|
|
@{
|
|
Layout = "_LotDispositionLayout.cshtml";
|
|
}
|
|
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.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>
|
|
|
|
|
|
<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 (ViewBag.IsApprover == "true")
|
|
{
|
|
<div data-spy="affix" data-offset-top="0" data-offset-bottom="500">
|
|
<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 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-8 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 class="form-group">
|
|
<label class="control-label col-sm-4">Disposition By OCAP</label>
|
|
<div class="col-sm-4 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, 12, 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>
|
|
<button type="button" class="btn btn-xs btn-primary" id="UpdateReasonForDisposition">Click here to Update Reason</button>
|
|
<div>
|
|
@Html.TextAreaFor(model => model.ReasonForDisposition, 12, 30, new { id = "txtReasonForDisposition", @class = "form-control", style = "font-size: 11px" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
|
<div class="form-group">
|
|
<div>
|
|
@if (ViewBag.IsApprover == "true")
|
|
{
|
|
@(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.Custom("View").Click("DownloadAttachment"));
|
|
|
|
})
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:150px; 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 }))
|
|
)
|
|
)
|
|
|
|
}
|
|
else
|
|
{
|
|
@(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">
|
|
<label style="color: crimson; font-family: 'Times New Roman'; font-weight: bold; font-size: 24px" class="pull-left" id="LotDataLabel">
|
|
Lot Data
|
|
</label>
|
|
<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: red; 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").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.MRBsLinkedToLot).Width("100px");
|
|
|
|
|
|
})
|
|
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:250px; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.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(25)
|
|
.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 panel-default" style="font-size: 10px">
|
|
<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 (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
|
{
|
|
@(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);
|
|
|
|
columns.Command(command => command.Custom("ReAssign").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.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>
|
|
|
|
<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>
|
|
|
|
}
|
|
</body>
|
|
<!-- Button trigger modal -->
|
|
<!-- Modal -->
|
|
|
|
<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 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 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 errorCodeDisplayed = false;
|
|
var connection = $("#environment").val();
|
|
var reAssignFromUserid = "";;
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
|
});
|
|
|
|
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();
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
$('#reAssignApprovers').on('click', function () {
|
|
|
|
$("#ReAssignApproval").modal('show');
|
|
return false;
|
|
})
|
|
|
|
//
|
|
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');
|
|
}
|
|
});
|
|
|
|
|
|
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 + ']');
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
$('#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');
|
|
|
|
})
|
|
|
|
|
|
$('#ApproveDocument').on('click', function () {
|
|
$('#submitApprovalComments').attr("disabled", false);
|
|
$("#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 (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());
|
|
}
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#RejectDocument').on('click', function () {
|
|
$('#submitRejectComments').attr("disabled", false);
|
|
$("#RejectComments").modal('show');
|
|
return false;
|
|
});
|
|
|
|
|
|
$('#submitRejectComments').on('click', function () {
|
|
$('#submitRejectComments').attr("disabled", false);
|
|
$.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) {
|
|
$('#submitRejectComments').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) {
|
|
//alert(reAssignFromUserid);
|
|
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());
|
|
}
|
|
});
|
|
};
|
|
|
|
|
|
// REGION Additional Approver ======================================================================================================================
|
|
$('#additionalApprovers').on('click', function () {
|
|
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());
|
|
}
|
|
});
|
|
};
|
|
|
|
|
|
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 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());
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
$(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 = "";
|
|
if (MRBLinkedToLot != null) {
|
|
var tempValue = MRBLinkedToLot.split(',');
|
|
for (var i = 0; i < tempValue.length; i++) {
|
|
//if (connection == 'PROD') {
|
|
// template += "<a href='http://temapprovalsystem.irf.com/MRB/Edit?IssueID=" + tempValue[i] + "'>" + tempValue[i] + "</a>" + ", ";
|
|
//}
|
|
//else {
|
|
// template += "<a href='http://TEMIRWWS003.IRWORLD.IRF.COM:8022/MRB/Edit?IssueID=" + tempValue[i] + "'>" + tempValue[i] + "</a>" + ", ";
|
|
//}
|
|
|
|
template += "<a href='@GlobalVars.hostURL" + "/MRB/Edit?IssueID=" + tempValue[i] + "'>" + tempValue[i] + "</a>" + ", ";
|
|
}
|
|
|
|
}
|
|
return template;
|
|
}
|
|
|
|
|
|
|
|
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');
|
|
|
|
}
|
|
|
|
$(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');
|
|
}
|
|
|
|
function IdleTimeout() {
|
|
//window.location = logoutUrl;
|
|
var url = '@Url.Action("MyTasks", "Home")';
|
|
window.location.href = url;
|
|
|
|
}*@
|
|
//------================================================= End of duplication
|
|
</script>
|