Added HttpException class for missing HttpException for net8 Wrapped HttpContext.Session, GetJsonResult, IsAjaxRequest and GetUserIdentityName in controllers for net8 Added AuthenticationService to test Fab2ApprovalMKLink code for net8 Compile conditionally flags to debug in dotnet core
3315 lines
141 KiB
Plaintext
3315 lines
141 KiB
Plaintext
@model Fab2ApprovalSystem.Models.LTWorkRequest
|
|
@{
|
|
ViewBag.Title = "Work Request";
|
|
}
|
|
@{
|
|
Layout = "_LotTravelerLayout.cshtml";
|
|
}
|
|
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
|
|
|
<style>
|
|
table {
|
|
border-spacing: 2px;
|
|
padding: 3px;
|
|
border-color: white;
|
|
}
|
|
|
|
td {
|
|
border-color: white;
|
|
padding: 4px;
|
|
}
|
|
.k-grid tbody tr td {
|
|
vertical-align: top;
|
|
}
|
|
</style>
|
|
<body onload="StartTimers();" onmousemove="ResetTimers();" onkeydown="ResetTimers();">
|
|
|
|
|
|
@using (Html.BeginForm())
|
|
{
|
|
<input type="hidden" id="LTWorkRequestID" value="@Model.ID" />
|
|
<input type="hidden" id="OriginalWIPPartNumber" value="@Model.WIPPartNumber" />
|
|
<input type="hidden" id="DefaultEPISiliconPartNumber" value="@Model.DefaultEPISiliconPartNumber" />
|
|
<input type="hidden" id="currentStep" value="@Model.CurrentStep" />
|
|
<input type="hidden" id="txtWIPPartNumber" value="@Model.WIPPartNumber" />
|
|
<input type="hidden" id="txtPartDescription" value="@Model.PartDescription" />
|
|
<input type="hidden" id="txtProcessFlow" value="@Model.ProcessFlow" />
|
|
<input type="hidden" id="txtStartQty" value="@Model.StartQty" />
|
|
<input type="hidden" id="isITAR" value="@Model.IsITAR" />
|
|
|
|
|
|
@Html.AntiForgeryToken()
|
|
<div data-spy="affix">
|
|
@if (@Model.IsCurrentRevision)
|
|
{
|
|
if (ViewBag.IsApprover == "true")
|
|
{
|
|
<div data-spy="affix" data-offset-top="0">
|
|
<input type="button" value="Save" class="btn btn-primary btn-xs" id="SaveNewRevision" />
|
|
<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>
|
|
}
|
|
else
|
|
{
|
|
<div data-spy="affix" data-offset-top="0">
|
|
<input type="button" value="Save" class="btn btn-primary btn-xs" id="SaveNewRevision" />
|
|
</div>
|
|
|
|
}
|
|
}
|
|
|
|
|
|
</div>
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<font style="color:crimson">
|
|
<h4>
|
|
Fab2 Special Work Request <font style="color: green; font-weight:bold; font-style:italic">Rev @Model.Revision</font>
|
|
</h4>
|
|
</font>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
@*<label class="control-label pull-right">Revisions:</label>*@
|
|
</div>
|
|
<div class="col-sm-3">
|
|
@*@(Html.Kendo().DropDownList()
|
|
.Name("Revisions")
|
|
.BindTo(new SelectList(ViewBag.WorkReqRevisionList, "ID", "RevisionNumber"))
|
|
.OptionLabel("Select")
|
|
)*@
|
|
</div>
|
|
<div class="col-sm-6">
|
|
@*<input type="button" value="Display" class="btn btn-primary btn-xs" id="GetRevision" />*@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<input type="button" value="Print PDF" class="btn btn-warning btn-xs" id="PrintWorkRequestPDF" style="font-size: 10px" />
|
|
|
|
<label class="control-label">Revisions:</label>
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("Revisions")
|
|
.BindTo(new SelectList(ViewBag.WorkReqRevisionList, "ID", "RevisionNumber"))
|
|
.OptionLabel("Select")
|
|
)
|
|
<input type="button" value="Display" class="btn btn-warning btn-xs" id="GetRevision" style="font-size: 10px" />
|
|
|
|
<input type="button" value="Approval Log History" class="btn btn-warning btn-xs" id="ApprovalLogHistoryData" style="font-size: 10px" />
|
|
|
|
<input type="button" value="Revision History" class="btn btn-warning btn-xs" id="RevisionHistoryData" style="font-size: 10px" />
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-info">
|
|
<h5>
|
|
<font style="color:crimson; font-weight:bold">
|
|
Section1: Work Request
|
|
</font>
|
|
</h5>
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">SWR #:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.SWRNumber, new { id = "txtSWRNumber", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Title:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox", Readonly = "Readonly", style = "width:100%" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Submit Date:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.SubmitedDate, new { id = "txtSubmitDate", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<!--NEW ROW=========================================================================================================================================================-->
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Originator:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Affected Departments:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@(Html.Kendo().MultiSelectFor(m => m.DepartmentIDs)
|
|
.HtmlAttributes(new { Readonly = "Readonly" })
|
|
.Name("DepartmentIDs")
|
|
.BindTo(new SelectList(ViewBag.Departments, "DepartmentID", "DepartmentName"))
|
|
.Value(ViewBag.Nothing)
|
|
)
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Affected Modules:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@(Html.Kendo().MultiSelect()
|
|
.HtmlAttributes(new { Readonly = "Readonly" })
|
|
.Name("ModuleIDs")
|
|
.BindTo(new SelectList(ViewBag.AffectedModules, "ModuleID", "ModuleName"))
|
|
.Value(ViewBag.Nothing)
|
|
)
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<!--NEW ROW=========================================================================================================================================================-->
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Status:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.ApprovalStatus, new { id = "txtStatus", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Lot Type:</label>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("LotType")
|
|
.HtmlAttributes(new { Readonly = "Readonly" })
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
.BindTo(new List<SelectListItem>()
|
|
{
|
|
new SelectListItem()
|
|
{
|
|
Text = "Select",
|
|
Value = "Select"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "E",
|
|
Value = "E"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "P" ,
|
|
Value = "P"
|
|
}
|
|
}
|
|
)
|
|
.Value(Model.LotType.ToString())
|
|
)
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">ITAR:</label>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
@Html.CheckBoxFor(model => model.IsITAR, new { @disabled = "disabled" })
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">PCRB#:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.PCRBNumber, new { id = "txtPCRBNumber", @class = "k-textbox", Readonly = "Readonly" })
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<!--NEW ROW=========================================================================================================================================================-->
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Eng Lot Start Req:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
<div class="col-sm-3">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("EngLotStartRequired")
|
|
.HtmlAttributes(new { Readonly = "Readonly" })
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
.BindTo(new List<SelectListItem>()
|
|
{
|
|
new SelectListItem()
|
|
{
|
|
Text = "Select",
|
|
Value = "-1"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "Yes",
|
|
Value = "1"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "No",
|
|
Value = "0"
|
|
}
|
|
}
|
|
)
|
|
.Value(Model.EngLotStartRequired.ToString())
|
|
)
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Lot Type Conversion:</label>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("LotTypeConversion")
|
|
.HtmlAttributes(new { Readonly = "Readonly" })
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
.BindTo(new List<SelectListItem>()
|
|
{
|
|
new SelectListItem()
|
|
{
|
|
Text = "Select",
|
|
Value = "-1"
|
|
},
|
|
|
|
new SelectListItem()
|
|
{
|
|
Text = "Yes",
|
|
Value = "1"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "No",
|
|
Value = "0"
|
|
}
|
|
}
|
|
)
|
|
.Value(Model.LotTypeConversion.ToString())
|
|
)
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Qual Lot:</label>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("QualLot")
|
|
.HtmlAttributes(new { Readonly = "Readonly" })
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
.BindTo(new List<SelectListItem>()
|
|
{
|
|
new SelectListItem()
|
|
{
|
|
Text = "Select",
|
|
Value = "-1"
|
|
},
|
|
|
|
new SelectListItem()
|
|
{
|
|
Text = "Yes",
|
|
Value = "1"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "No",
|
|
Value = "0"
|
|
}
|
|
}
|
|
)
|
|
.Value(Model.QualLot.ToString())
|
|
)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-1">
|
|
<label class="control-label pull-right">Purpose Of Lot/Change Description:</label>
|
|
</div>
|
|
<div class="col-sm-11">
|
|
@Html.TextAreaFor(model => model.PurposeOfRequest, 15, 100, new { id = "txtPurposeOfRequest", @class = "k-textbox", Readonly = "Readonly", style = "font-size: 11px; width: 100%" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<!-- NEW PANEL ===============================================================-->
|
|
<div class="panel-body bg-info">
|
|
<h5>
|
|
<font style="color: crimson; font-weight: bold">
|
|
Section1-A: Engineering Wafer Lot Start
|
|
</font>
|
|
</h5>
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<div class="col-sm-5">
|
|
<label class="control-label pull-right">Lot#:</label>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
@Html.TextBoxFor(model => model.LotNumber, new { id = "txtLotNumber", @class = "k-textbox" })
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="col-sm-5">
|
|
<label class="control-label pull-right">Start Date:</label>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
@(Html.Kendo().DateTimePickerFor(model => model.PlannedLotStartDate)
|
|
.Name("txtPlannedLotStartDate"))
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="col-sm-5">
|
|
<label class="control-label pull-right">Sch. Close Date:</label>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
@(Html.Kendo().DateTimePickerFor(model => model.PlannedScheduledCloseDate)
|
|
.Name("txtPlannedScheduledCloseDate"))
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="col-sm-5">
|
|
<label class="control-label pull-right">Total Qty:</label>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
@Html.TextBoxFor(model => model.TotalQty, new { id = "txtTotalQty", @class = "k-textbox", Readonly = "Readonly" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<div class="col-sm-5">
|
|
<label class="control-label pull-right">Lot Start Charge Dept:</label>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
@Html.TextBoxFor(model => model.ChargeDepartment, new { id = "txtChargeDepartment", @class = "k-textbox" })
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="col-sm-5">
|
|
<label class="control-label pull-right">Allocation to use:</label>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("AllocationToUse")
|
|
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
.BindTo(new List<SelectListItem>()
|
|
{
|
|
new SelectListItem()
|
|
{
|
|
Text = "Select",
|
|
Value = "Select"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "ATV",
|
|
Value = "ATV"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "HiRel",
|
|
Value = "HiRel"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "IPC",
|
|
Value = "IPC"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "PMD",
|
|
Value = "PMD"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "Fab",
|
|
Value = "Fab"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "Silicon",
|
|
Value = "Silicon"
|
|
}
|
|
}
|
|
)
|
|
.Value((Model.AllocationToUse == null ? "Select" : Model.AllocationToUse.ToString()))
|
|
)
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="col-sm-5">
|
|
<label class="control-label pull-right">Predicted Cycle Time:</label>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
@Html.TextBoxFor(model => model.PredictedCyleTime, new { id = "txtPredictedCyleTime", @class = "k-textbox" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<table width="100%">
|
|
<tr>
|
|
<td>
|
|
<button class="btn btn-warning btn-xs" data-toggle="modal" id="addEPI" style="font-size:x-small">
|
|
Add EPI
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTMaterial>()
|
|
.Name("MaterialList")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.PreviousMaterialID).Visible(false);
|
|
columns.Bound(a => a.LTWorkRequestID).Visible(false);
|
|
columns.Bound(a => a.WIPPartNumber).Width("10%x");
|
|
columns.Bound(a => a.EPISiliconPartNumber).Width("10%");
|
|
columns.Bound(a => a.Quantity).Width("10%");
|
|
columns.Bound(a => a.Supplier).Width("30%");
|
|
columns.Bound(a => a.Source).Width("30%");
|
|
columns.Command(command => { command.Custom("Edits").Text("Edit").Click("UpdateMaterialRevision"); }).Width("5%");
|
|
columns.Command(command => { command.Custom("Deletes").Text("Delete").Click("DeleteMaterialRevision"); }).Width("5%");
|
|
})
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:250px; width:100%; font-size: 8px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.ServerOperation(false)
|
|
.Events(e => e.Change("RefreshStartQtyData"))
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ID);
|
|
model.Field(f => f.WIPPartNumber).DefaultValue(Model.WIPPartNumber).Editable(false);
|
|
model.Field(f => f.EPISiliconPartNumber).DefaultValue(Model.DefaultEPISiliconPartNumber);
|
|
model.Field(f => f.LTWorkRequestID).DefaultValue(Model.ID);
|
|
})
|
|
.PageSize(40)
|
|
.Read(read => read.Action("GetMaterialDetails", "LotTraveler", new { workRequestID = Model.ID }))
|
|
)
|
|
.Resizable(resize => resize.Columns(true))
|
|
)
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<table class="table-condensed" style="width:100%">
|
|
<tbody>
|
|
<tr>
|
|
|
|
<td valign="top">
|
|
<table border="1" width="100%" height="100%" style="border-color:lightgrey; font-size:9px">
|
|
<thead>
|
|
<tr style="background-color: lightgray; font-weight:bold; font-size:11px">
|
|
<td width="10%" colspan="7">
|
|
Lot Start Check List
|
|
</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td style="background-color: lightgray; font-weight: bold; font-size: 10px">
|
|
OnHand/Existing
|
|
</td>
|
|
<td>
|
|
Silicon
|
|
@Html.EditorFor(model => model.SiliconOnHand, new { Readonly = "Readonly" })
|
|
</td>
|
|
<td>
|
|
Reticle Set
|
|
@Html.EditorFor(model => model.ReticleOnHand)
|
|
</td>
|
|
<td>
|
|
SPN transfer
|
|
@Html.EditorFor(model => model.SPNTransferOnHand)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="background-color: lightgray; font-weight: bold; font-size: 10px"></td>
|
|
<td>
|
|
Probe Card
|
|
@Html.EditorFor(model => model.ProbeCardOnHand)
|
|
</td>
|
|
<td>
|
|
Probe Recipe
|
|
@Html.EditorFor(model => model.ProbeRecipeOnHand)
|
|
</td>
|
|
<td>
|
|
Process Change Details
|
|
@Html.EditorFor(model => model.ProcessChangeDetailsOnHand)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label class="control-label pull-right">Comments</label>
|
|
</td>
|
|
<td colspan="6">
|
|
@Html.TextAreaFor(model => model.LotStartCheckListComments, 14, 100, new { id = "txtLotStartCheckListComments", @class = "k-textbox", style = "font-size: 11px; width: 100%" })
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
<td valign="top">
|
|
<table border="1" bgcolor="#e5e0e0" width="100%" height="100%">
|
|
<tr style="background-color: lightgray; font-weight:bold; font-size:11px">
|
|
<td colspan="4" bgcolor="e5e0e0">
|
|
Lot Start in SPN
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#e5e0e0" width="15%">
|
|
SIGNON
|
|
</td>
|
|
<td width="30%">
|
|
SURP
|
|
</td>
|
|
<td bgcolor="#e5e0e0" width="15%">
|
|
WIP AREA
|
|
</td>
|
|
<td width="30%">
|
|
@Model.WIPArea
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#e5e0e0">
|
|
VERB
|
|
</td>
|
|
<td>
|
|
START
|
|
</td>
|
|
<td bgcolor="#e5e0e0">
|
|
Start Date
|
|
</td>
|
|
<td>
|
|
@Model.PlannedLotStartDate
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#e5e0e0">
|
|
WIP Lot#
|
|
</td>
|
|
<td>
|
|
@Model.LotNumber
|
|
</td>
|
|
<td bgcolor="#e5e0e0">
|
|
WIP PN#
|
|
</td>
|
|
<td>
|
|
@Model.WIPPartNumber - @Model.PartDescription
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#e5e0e0">
|
|
Type
|
|
</td>
|
|
<td>
|
|
@Model.LotType
|
|
</td>
|
|
<td bgcolor="#e5e0e0">
|
|
Process Flow
|
|
</td>
|
|
<td>
|
|
@Model.ProcessFlow
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#e5e0e0">
|
|
Start Qty
|
|
</td>
|
|
<td>
|
|
@Model.StartQty
|
|
</td>
|
|
<td bgcolor="#e5e0e0">
|
|
Qual Lot
|
|
</td>
|
|
<td>
|
|
@(Model.QualLot == 1 ? "Y" : "")
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#e5e0e0">
|
|
VERB
|
|
</td>
|
|
<td bgcolor="#e5e0e0">
|
|
COMMENT
|
|
</td>
|
|
<td colspan="2">
|
|
@Html.TextAreaFor(model => model.VerbComment, 3, 100, new { id = "txtVerbComment", @class = "k-textbox", style = "font-size: 11px; width: 100%" })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="e5e0e0" colspan="3">
|
|
Record Silicon Lot #s in SPN and tape tags to Traveler
|
|
</td>
|
|
<td>
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("RecordSiliconLotInSPNTapeTagTotrav")
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
.BindTo(new List<SelectListItem>()
|
|
{
|
|
new SelectListItem()
|
|
{
|
|
Text = "Select",
|
|
Value = "-1"
|
|
},
|
|
|
|
new SelectListItem()
|
|
{
|
|
Text = "Yes",
|
|
Value = "1"
|
|
},
|
|
new SelectListItem()
|
|
{
|
|
Text = "No",
|
|
Value = "0"
|
|
}
|
|
}
|
|
)
|
|
.Value(Model.RecordSiliconLotInSPNTapeTagTotrav.ToString())
|
|
)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" bgcolor="e5e0e0">
|
|
Silicon Lot#s: Cassette 1
|
|
</td>
|
|
<td colspan="2">
|
|
@Html.TextAreaFor(model => model.SiliconLotNoCassette1, 3, 100, new { id = "txtSiliconLotNoCassette1", @class = "k-textbox", style = "font-size: 11px; width: 100%" })
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel-body bg-warning">
|
|
|
|
</div>
|
|
</div>
|
|
/**/
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-info">
|
|
<div class="pull-left">
|
|
<h5>
|
|
<font style="color:crimson">
|
|
Section2: OLHOLD and Engineering Deviation Specified by Originator
|
|
</font>
|
|
</h5>
|
|
|
|
</div>
|
|
<div class="pull-right">
|
|
<button class="btn btn-warning btn-xs" data-toggle="modal" id="addHoldStep" style="font-size:x-small">
|
|
Add Hold
|
|
</button>
|
|
|
|
</div>
|
|
</div>
|
|
<!-- NEW PANEL ===============================================================-->
|
|
<div class="panel-body bg-warning">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTHoldStep>()
|
|
.Name("HoldSteps")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.LTWorkRequestID).Visible(false);
|
|
columns.Bound(a => a.BaseFlow).Width("50px");
|
|
columns.Bound(a => a.Location).Width("50px");
|
|
columns.Bound(a => a.OperSequence).Width("25px");
|
|
columns.Bound(a => a.Operation).Width("50px");
|
|
columns.Bound(a => a.OperationDescription).Width("100px");
|
|
columns.Bound(a => a.ChangeInstructions).ClientTemplate("#=changeNewLine(ChangeInstructions)#").Width("250px");
|
|
columns.Bound(a => a.FileNames).ClientTemplate("#=buildLinks(FileNames, SWRNumber, Revision)#").Width("100px");
|
|
columns.Command(c => c.Custom("Upload File").Click("UploadHoldStepAttachment")).Width("50px");
|
|
columns.Command(c => c.Custom("Edit").Click("EditHoldStep")).Width("50px");
|
|
columns.Command(c => c.Custom("Delete").Click("DeleteHoldStep")).Width("50px");
|
|
})
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:350px; width:100%; font-size: 8px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.ServerOperation(false)
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ID);
|
|
})
|
|
.PageSize(40)
|
|
.Read(read => read.Action("GetHoldSteps", "LotTraveler", new { workRequestID = Model.ID }))
|
|
)
|
|
.Resizable(resize => resize.Columns(true))
|
|
)
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-info">
|
|
<div class="pull-left">
|
|
<h5>
|
|
<font style="color:crimson">
|
|
Section3: Document Attachment
|
|
</font>
|
|
</h5>
|
|
|
|
</div>
|
|
<div class="pull-right">
|
|
|
|
<button class="btn btn-warning btn-xs" data-toggle="modal" id="UploadWRAttchmentRev" style="font-size:x-small">
|
|
Upload Files
|
|
</button>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTWorkRequestAttachment>()
|
|
.Name("WorkRequestAttachments")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.FileGUID).Visible(false);
|
|
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>).Width("100px");
|
|
//.ClientTemplate("<a href='" + GlobalVars.AttachmentUrl + "LotTraveler/#=SWRNumber#/#=FileGUID#.#=FileExtension#' target='_blank'>#=FileName#</a>");
|
|
columns.Bound(a => a.DocType).Width("50px");
|
|
columns.Bound(a => a.Comments).Width("300px");
|
|
columns.Bound(a => a.UploadedByName).Width("50px");
|
|
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}").Width("50px");
|
|
columns.Command(c => c.Custom("AttachEdit").Text("Edit").Click("EditWrkReqAttach")).Width("100px");
|
|
columns.Command(c => c.Custom("AttachDelete").Text("Delete").Click("DeleteWrkReqAttach")).Width("100px");
|
|
columns.Command(c => c.Custom("View").Click("DownloadAttachment")).Width("100px");
|
|
|
|
})
|
|
.Resizable(e => e.Columns(true))
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
//.Batch(false)
|
|
.ServerOperation(false)
|
|
.Events(events => events.RequestEnd("RefreshHoldStepGrid"))
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ID);
|
|
model.Field(a => a.UploadDateTime).Editable(false);
|
|
model.Field(a => a.UploadedByName).Editable(false);
|
|
model.Field(a => a.FileName).Editable(false);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetWorkRequestAttachments", "LotTraveler", new { workRequestID = Model.ID }))
|
|
//.Update(update => update.Action("UpdateWorkRequestAttachment", "LotTraveler"))
|
|
)
|
|
)
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="panel-heading">
|
|
@if (ViewBag.IsApprover == "true" && Model.CurrentStep == 3)
|
|
{
|
|
<button class="btn btn-warning btn-xs" data-toggle="modal" id="reAssignApprovers" style="font-size:x-small">
|
|
Re-Assign Approvers
|
|
</button>
|
|
<button class="btn btn-warning btn-xs" data-toggle="modal" id="additionalApprovers" style="font-size:x-small">
|
|
Additional Approvers
|
|
</button>
|
|
}
|
|
</div>
|
|
|
|
|
|
<div class="panel-body bg-warning">
|
|
<div class="col-sm-offset-0">
|
|
@if (GlobalVars.IsAdminValueNotNull(Session))
|
|
{
|
|
if (GlobalVars.IsAdmin(Session) && (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", "LotTraveler", new { workRequestID = Model.ID, 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", "LotTraveler", new { workRequestID = Model.ID, step = Model.CurrentStep }))
|
|
)
|
|
.Resizable(resize => resize.Columns(true))
|
|
|
|
)
|
|
}
|
|
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
<!-- =============================================================MODAL WINDOWS==================================================================================-->
|
|
<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 be automatically be redirected to Special Request List 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>
|
|
<div class="modal fade" id="WIPPartForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" style="width: 800px">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">WIP Part Attributes:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<div class="control-group">
|
|
<label for="Location">Part Number:</label>
|
|
<div class="controls">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("ModPartNumberList")
|
|
.DataTextField("PartNumber")
|
|
.DataValueField("SiliconAndDesc")
|
|
.HtmlAttributes(new { style = "width:100px;font-size: 10px" })
|
|
.Events(e => e.Select("PartNumberOnSelect")
|
|
)
|
|
.OptionLabel("Select PartNumber")
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="control-group">
|
|
<label for="BaseFlow">EPI Silicon Part:</label>
|
|
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtModEPiSiliconPartNumber">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="control-group">
|
|
<label for="Description">Part Description:</label>
|
|
<div class="controls k-textbox" style="width:365px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtModPartDesc" style="font-size: 10px" disabled="disabled">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</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="SavePart">Confirm Part Selection</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal fade" id="AddHoldStepForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" style="width: 800px">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Hold Step Attributes:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-sm-2">
|
|
<div class="control-group">
|
|
<label for="BaseFlow">Base Flow:</label>
|
|
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtBaseFlow" disabled="disabled">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="control-group">
|
|
<label for="Location">Location:</label>
|
|
<div class="controls">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("BaseFlowLocations")
|
|
.DataTextField("Location")
|
|
.DataValueField("Location")
|
|
.HtmlAttributes(new { style = "width:100px;font-size: 10px" })
|
|
.Events(e => e.Select("LocationsOnSelect")
|
|
)
|
|
.OptionLabel("Select Location")
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="control-group">
|
|
<label for="Operation">Operation:</label>
|
|
<div class="controls">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("BaseFlowOperations")
|
|
.DataTextField("Operation")
|
|
.DataValueField("OperationDesc")
|
|
.HtmlAttributes(new { style = "width:100px;font-size: 10px" })
|
|
.Events(e => e.Select("OperationsOnSelect"))
|
|
.OptionLabel("Select Operation")
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="control-group">
|
|
<label for="Description">Description:</label>
|
|
<div class="controls k-textbox" style="width:365px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtOperationDesc" style="font-size: 10px" disabled="disabled">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="control-group">
|
|
<div class="col-sm-12">
|
|
<label for="Instructions">Instructions:</label>
|
|
<textarea class="form-control" rows="15" id="ChangeInstructions" style="font-size: 10px"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</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="SaveAddHold">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="modal fade" id="AddHoldStepAttachmentFormRevision" data-url='@Url.Action("GetHoldStepRevision")' tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog modal-lg">
|
|
<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">Upload Attachments for the Hold Step:</h4>
|
|
</div>
|
|
<div class="modal-body" id="HoldStepAttachmentContainer">
|
|
@Html.Partial("_HoldStepAttachmentsRevision", Model.LTHoldStep)
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</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="WinRevisionComments" 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 Revision Comments:</h4>
|
|
<h5> <font style="color:red">You have trigerred a Revision of this document, Please enter the revision comments</font> </h5>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="3" id="revisionComments"></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="submitRevisionComments">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="modal fade" id="WinEPIRevisionComments" 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 Revision Comments:</h4>
|
|
<h5> <font style="color:red">You have trigerred a Revision of this document, Please enter the revision comments</font> </h5>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="3" id="revisionEPIComments"></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="submitEPIRevisionComments">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="WinHoldStepRevisionComments" 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 Revision Comments:</h4>
|
|
<h5> <font style="color:red">You have trigerred a Revision of this document, Please enter the revision comments</font> </h5>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="3" id="revisionHoldStepComments"></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="submitHoldStepRevisionComments">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="EPIForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" style="width: 700px">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">EPI Attributes:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<div class="control-group">
|
|
<label for="EPISiliconPartNumber">SiliconPart#:</label>
|
|
<div class="controls">
|
|
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtEPiSiliconPartNumber">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="control-group">
|
|
<label for="Quanityt">Quantity:</label>
|
|
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtEPiQuantity">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="control-group">
|
|
<label for="Supplier">Supplier:</label>
|
|
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtEPISupplier" style="font-size: 10px">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="control-group">
|
|
<label for="Source">Source:</label>
|
|
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtEPISource" style="font-size: 10px">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</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="SaveEPI">Save</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="WinHoldStepAttRevComments" 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 Revision Comments:</h4>
|
|
<h5> <font style="color:red">You have trigerred a Revision of this document, Please enter the revision comments</font> </h5>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="3" id="revisionHoldStepAttComments"></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="submitHoldStepAttRevComments">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" id="WinWorkReqAttRevComments" 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 Revision Comments:</h4>
|
|
<h5> <font style="color:red">You have trigerred a Revision of this document, Please enter the revision comments</font> </h5>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div>
|
|
<label for="attachRevComments">Comments:</label>
|
|
<textarea class="form-control" rows="3" id="revisionWRAttachComments"></textarea>
|
|
</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="submitWorkReqAttRevComments">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" id="WinWorkRequestAttRev" 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">Select File:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="DocumentType">Document Type:</label>
|
|
<div class="controls" style="width:200px; font-size: 10px">
|
|
<div id="ex" class="k-content">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("WRAttachDocType")
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
.BindTo(new List<SelectListItem>() {
|
|
new SelectListItem() {
|
|
Text = "Select",
|
|
Value = "Select"
|
|
},
|
|
new SelectListItem() {
|
|
Text = "Instructions",
|
|
Value = "Instructions"
|
|
},
|
|
new SelectListItem() {
|
|
Text = "Traveler",
|
|
Value = "Traveler"
|
|
},
|
|
new SelectListItem() {
|
|
Text = "Other",
|
|
Value = "Other"
|
|
}
|
|
|
|
})
|
|
.Value("1")
|
|
.HtmlAttributes(new { style = "width:100px;" })
|
|
)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-8">
|
|
@(Html.Kendo().Upload()
|
|
.Name("files")
|
|
.Async(a => a
|
|
.Save("AttachSaveWorkRequestRevision", "LotTraveler", new { workRequestID = Model.ID, currentRevision = Model.Revision, swrNo = Model.SWRNumber })
|
|
.AutoUpload(true)
|
|
)
|
|
.Events(events => events.Success("on_WorkReqAttachmentsGridSuccess").Upload("UploadAdditionalData"))
|
|
.ShowFileList(false)
|
|
|
|
|
|
)
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<label for="WRAttachmentComments">Comments:</label>
|
|
<textarea class="form-control" rows="3" id="WRAttachmentComments"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="WinWorkRequestAttDetailRev" 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">Edit Attachment Attributes:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="control-group">
|
|
<label for="DocumentType">Document Type#:</label>
|
|
<div class="controls">
|
|
<div class="controls" style="width:250px; font-size: 10px">
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("wrDocType")
|
|
.DataTextField("Text")
|
|
.DataValueField("Value")
|
|
.BindTo(new List<SelectListItem>() {
|
|
new SelectListItem() {
|
|
Text = "Instructions",
|
|
Value = "Instructions"
|
|
},
|
|
new SelectListItem() {
|
|
Text = "Traveler",
|
|
Value = "Traveler"
|
|
},
|
|
new SelectListItem() {
|
|
Text = "Other",
|
|
Value = "Other"
|
|
}
|
|
|
|
})
|
|
.Value("1")
|
|
.HtmlAttributes(new { style = "width:100px;" })
|
|
)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<label for="FileName">File Name:</label>
|
|
<div class="control" style="width:250px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtFileName">
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<label for="FileName">Comments Name:</label>
|
|
<textarea class="form-control" rows="3" id="wrAttachComments"></textarea>
|
|
</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="submitWorkRequestAttDetailRev">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="modal fade" id="ApprovalLogHistoryWin" 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">
|
|
<h4 class="modal-title" id="myModalLabel">Approval Log History</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.ApprovalLogHistory>()
|
|
.Name("ApprovalLogHistory")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ApprovalLogID).Visible(false);
|
|
columns.Bound(a => a.FullName);
|
|
columns.Bound(a => a.SubRole);
|
|
columns.Bound(a => a.Operation);
|
|
columns.Bound(a => a.OperationTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
|
|
|
})
|
|
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 12px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.ServerOperation(false)
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ApprovalLogID);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("ApprovalLogHistory_Read", "LotTraveler", new { swrNUmber = Model.SWRNumber }))
|
|
)
|
|
)
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" id="RevisionHistoryWin" 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">
|
|
<h4 class="modal-title" id="myModalLabel">Revision History</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.RevisionHistory>()
|
|
.Name("RevisionHistory")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.RevisionedBy);
|
|
columns.Bound(a => a.Comments);
|
|
columns.Bound(a => a.RevisionCreateDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
|
|
|
})
|
|
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 12px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.ServerOperation(false)
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ID);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetWorkRequestRevisionHistory", "LotTraveler", new { swrNUmber = Model.SWRNumber }))
|
|
)
|
|
)
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
<script type="text/javascript">
|
|
var holdStepOperation = ""
|
|
var wrAttachmentOperation = ""
|
|
var currentHoldStepID;
|
|
|
|
var docType = 6;
|
|
var partNumberDropDownCreated = 0;
|
|
var varCurrentStep = $("#currentStep").val();
|
|
var revisionSaved = false;
|
|
var objectFormData;
|
|
var currentMaterialRecordID;
|
|
var previousMaterialID;
|
|
var previousHoldStepID;
|
|
var EPIOperation;
|
|
var currentWrkReqAttachID;
|
|
var isMaterialGridDirty = false;
|
|
|
|
|
|
$(document).ready(function () {
|
|
$("#files").on('click', function (e) {
|
|
|
|
if ($("#WRAttachDocType").data("kendoDropDownList").value() == "Select" ||
|
|
$("#WRAttachmentComments").val() == '') {
|
|
|
|
alert('Document Type and Comments both needs to filled in before uploading a a file')
|
|
e.preventDefault();
|
|
}
|
|
});
|
|
|
|
|
|
var grid = $("#MaterialList").data("kendoGrid");
|
|
grid.bind("edit", grid_edit);
|
|
grid.bind("save", grid_update);
|
|
grid.bind("cancel", grid_cancel);
|
|
grid.bind("remove", grid_remove);
|
|
})
|
|
|
|
|
|
function grid_edit(e) {
|
|
|
|
isMaterialGridDirty = true;
|
|
}
|
|
|
|
function grid_update(e) {
|
|
isMaterialGridDirty = false;
|
|
}
|
|
|
|
function grid_cancel(e) {
|
|
isMaterialGridDirty = false;
|
|
|
|
}
|
|
|
|
function grid_remove(e) {
|
|
isMaterialGridDirty = false;
|
|
}
|
|
|
|
function RefreshStartQtyData() {
|
|
var vgrid = $("#MaterialList").data("kendoGrid");
|
|
//Getting grid items
|
|
var totalQty = 0;
|
|
var items = vgrid.dataSource.data();
|
|
|
|
for (i = 0; i < items.length; i++) {
|
|
var item = items[i];
|
|
|
|
totalQty = totalQty + item.Quantity;
|
|
}
|
|
$("#txtStartQty").val(totalQty);
|
|
}
|
|
|
|
|
|
$("#UploadWRAttchmentRev").on('click', function (e) {
|
|
e.preventDefault();
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
wrAttachmentOperation = "Add";
|
|
if (model == "true") {
|
|
$("#WinWorkReqAttRevComments").modal('show');
|
|
}
|
|
else {
|
|
$("#WinWorkRequestAttRev").modal('show');
|
|
}
|
|
|
|
})
|
|
|
|
// Submit WorkRequest Attachment Comments
|
|
$("#submitWorkReqAttRevComments").on('click', function () {
|
|
$("#WinWorkReqAttRevComments").modal('hide');
|
|
if (wrAttachmentOperation == "Add") {
|
|
$("#WinWorkRequestAttRev").modal('show');
|
|
}
|
|
else if (wrAttachmentOperation == "Update") {
|
|
|
|
displayWRAttchmentForm();
|
|
}
|
|
else if (wrAttachmentOperation == "Delete") {
|
|
|
|
var wrAttchmentDetail = {
|
|
ID: currentWrkReqAttachID,
|
|
DocType: $("#wrDocType").data("kendoDropDownList").value(),
|
|
FileName: $("#txtFileName").val(),
|
|
Comments: $("#wrAttachComments").val(),
|
|
LTWorkRequestID: "@Model.ID"
|
|
}
|
|
|
|
var data = ReturnModelObject();
|
|
data.WorkRequestAttachment = wrAttchmentDetail;
|
|
data.RevisionComments = $("#revisionWRAttachComments").val();
|
|
|
|
var urlString = '/LotTraveler/DeleteWorkRequestAttachmentRevision';
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
$("#WinWorkRequestAttDetailRev").modal('hide');
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', parseInt(data));
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
});
|
|
}
|
|
})
|
|
|
|
|
|
|
|
|
|
$("#submitWorkRequestAttDetailRev").on('click', function (e) {
|
|
|
|
// create revision
|
|
e.preventDefault();
|
|
var wrAttchmentDetail = {
|
|
ID: currentWrkReqAttachID,
|
|
DocType: $("#wrDocType").data("kendoDropDownList").value(),
|
|
FileName: $("#txtFileName").val(),
|
|
Comments: $("#wrAttachComments").val(),
|
|
LTWorkRequestID: "@Model.ID"
|
|
}
|
|
|
|
var data = ReturnModelObject();
|
|
data.WorkRequestAttachment = wrAttchmentDetail;
|
|
data.RevisionComments = $("#revisionWRAttachComments").val();
|
|
|
|
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
if (model == "true") {
|
|
var urlString = '/LotTraveler/UpdateWorkRequestAttachmentRevision';
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
$("#WinWorkRequestAttDetailRev").modal('hide');
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', parseInt(data));
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
});
|
|
}
|
|
else {
|
|
var urlString = '/LotTraveler/UpdateWorkRequestAttachmentRevision';
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
$("#WinWorkRequestAttDetailRev").modal('hide');
|
|
var grid = $("#WorkRequestAttachments").data("kendoGrid");
|
|
grid.dataSource.read($("@Model.ID").val());
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
|
|
})
|
|
|
|
function UploadAdditionalData(e) {
|
|
fileData = e;
|
|
var files = e.files;
|
|
$.each(files, function () {
|
|
|
|
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.xlsm|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt)$/)) {
|
|
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
|
e.preventDefault();
|
|
}
|
|
|
|
});
|
|
|
|
e.data = {
|
|
revComments: $("#revisionWRAttachComments").val(),
|
|
attachComments: $("#WRAttachmentComments").val(),
|
|
docType: $("#WRAttachDocType").data("kendoDropDownList").value()
|
|
};
|
|
}
|
|
|
|
|
|
function on_WorkReqAttachmentsGridSuccess() {
|
|
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
|
|
if (model == "true") {
|
|
$.ajax({
|
|
url: '/LotTraveler/GetRevisedWrkReqIDFromPreviousWrkReqID',
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: { prevWorkRequestID: parseInt("@Model.ID") },
|
|
|
|
success: function (data) {
|
|
$("#AddHoldStepAttachmentFormRevision").modal('hide');
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', parseInt(data));
|
|
|
|
}
|
|
})
|
|
}
|
|
else {
|
|
|
|
var grid = $("#WorkRequestAttachments").data("kendoGrid");
|
|
grid.dataSource.read($("@Model.ID").val());
|
|
|
|
RefreshHoldStepGrid();
|
|
}
|
|
}
|
|
|
|
|
|
function EditWrkReqAttach(e) {
|
|
e.preventDefault();
|
|
wrAttachmentOperation = "Update";
|
|
|
|
//grid = $("#WorkRequestAttachments").data("kendoGrid");
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
currentWrkReqAttachID = dataItem.ID;
|
|
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
|
|
if (model == "true") {
|
|
$("#WinWorkReqAttRevComments").modal('show');
|
|
}
|
|
else {
|
|
|
|
displayWRAttchmentForm();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function DeleteWrkReqAttach(e) {
|
|
e.preventDefault();
|
|
wrAttachmentOperation = "Delete";
|
|
|
|
//grid = $("#WorkRequestAttachments").data("kendoGrid");
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
currentWrkReqAttachID = dataItem.ID;
|
|
|
|
if (confirm("Do you really wish to delete the attachment record")) {
|
|
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
if (model == "true") {
|
|
$("#WinWorkReqAttRevComments").modal('show');
|
|
}
|
|
else {
|
|
|
|
var wrAttchmentDetail = {
|
|
ID: currentWrkReqAttachID,
|
|
DocType: $("#wrDocType").data("kendoDropDownList").value(),
|
|
FileName: $("#txtFileName").val(),
|
|
Comments: $("#wrAttachComments").val(),
|
|
LTWorkRequestID: "@Model.ID"
|
|
}
|
|
$.ajax({
|
|
url: "/LotTraveler/DeleteWorkRequestAttachment",
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(wrAttchmentDetail),
|
|
success: function (data) {
|
|
|
|
$("#WinEPIRevisionComments").modal('hide');
|
|
var grid = $("#WorkRequestAttachments").data("kendoGrid");
|
|
grid.dataSource.read();
|
|
|
|
}
|
|
})
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function displayWRAttchmentForm() {
|
|
var url = "/LotTraveler/GetWorkRequestAttachDetail";
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
wrAttachmentID: currentWrkReqAttachID
|
|
},
|
|
success: function (data) {
|
|
|
|
var wrDocumentType = $("#wrDocType").data("kendoDropDownList");
|
|
wrDocumentType.text(data.DocType);
|
|
|
|
$("#txtFileName").val(data.FileName);
|
|
$("#wrAttachComments").val(data.Comments);
|
|
$("#WinWorkRequestAttDetailRev").modal('show');
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
}
|
|
|
|
//=========================Region Submit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// REGION - AddHoldSteps ==================================================================================================================================
|
|
|
|
|
|
|
|
$("#addHoldStep").on('click', function (e) {
|
|
e.preventDefault();
|
|
currentHoldStepID = -1;
|
|
|
|
if ($("#txtProcessFlow").val().length == 0) {
|
|
alert("Please enter the Process Flow, before adding a Hold Step")
|
|
return false;
|
|
}
|
|
|
|
holdStepOperation = "Add";
|
|
displayAddHoldStepForm();
|
|
return false;
|
|
})
|
|
|
|
function DeleteHoldStep(e) {
|
|
e.preventDefault();
|
|
holdStepOperation = "Delete";
|
|
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
currentHoldStepID = dataItem.ID;
|
|
|
|
var newbaseFlowLocation = $("#BaseFlowLocations").data("kendoDropDownList").value();
|
|
var newbaseFlowOperation = $("#BaseFlowOperations").data("kendoDropDownList").text();
|
|
var newbaseFlowOperDesc = $("#txtOperationDesc").val();
|
|
var newchangeInstructions = $("#ChangeInstructions").val();
|
|
|
|
if (confirm("Do you really wish to delete the record?")) {
|
|
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
if (model == "true") {
|
|
$("#WinHoldStepRevisionComments").modal("show");
|
|
}
|
|
else {
|
|
var holdStepItem = {
|
|
ID: currentHoldStepID,
|
|
BaseFlow: $("#txtBaseFlow").val(),
|
|
Location: newbaseFlowLocation,
|
|
Operation: newbaseFlowOperation,
|
|
OperationDescription: newbaseFlowOperDesc,
|
|
ChangeInstructions: newchangeInstructions,
|
|
PreviousHoldStepID: previousMaterialID,
|
|
LTWorkRequestID: "@Model.ID"
|
|
}
|
|
|
|
var data = ReturnModelObject();
|
|
data.LTHoldStep = holdStepItem;
|
|
data.RevisionComments = $("#revisionHoldStepComments").val();
|
|
|
|
var urlString = '/LotTraveler/DeleteHoldStepRevision';
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
$("#AddHoldStepForm").modal('hide');
|
|
var grid = $("#HoldSteps").data("kendoGrid");
|
|
grid.dataSource.read();
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
function EditHoldStep(e) {
|
|
e.preventDefault();
|
|
holdStepOperation = "Update";
|
|
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
currentHoldStepID = dataItem.ID;
|
|
|
|
var location = dataItem.Location;
|
|
var operation = dataItem.Operation + '-' + dataItem.OperSequence;
|
|
var operationDescription = dataItem.OperationDescription;
|
|
var changeInstructions = dataItem.ChangeInstructions;
|
|
|
|
//alert(currentHoldStepID);
|
|
displayAddHoldStepForm();
|
|
//set the selected location
|
|
var locationList = $("#BaseFlowLocations").data("kendoDropDownList");
|
|
locationList.value(location);
|
|
|
|
// set the selected operation
|
|
var url = "/LotTraveler/GetBaseFlowOperations";
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
baseFlow: $("#txtProcessFlow").val(),
|
|
location: location
|
|
},
|
|
success: function (data) {
|
|
$("#BaseFlowOperations").data("kendoDropDownList").dataSource.data(data);
|
|
var operationList = $("#BaseFlowOperations").data("kendoDropDownList");
|
|
operationList.text(operation);
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
// set the oper desc
|
|
$("#txtOperationDesc").val(operationDescription);
|
|
$("#ChangeInstructions").val(changeInstructions);
|
|
|
|
|
|
|
|
}
|
|
|
|
var displayAddHoldStepForm = function () {
|
|
|
|
var url = "/LotTraveler/GetBaseFlowLocations";
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
baseFlow: $("#txtProcessFlow").val()
|
|
},
|
|
success: function (data) {
|
|
$("#BaseFlowLocations").data("kendoDropDownList").dataSource.data(data);
|
|
$("#txtBaseFlow").val($("#txtProcessFlow").val());
|
|
$("#AddHoldStepForm").modal('show');
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
$("#SaveAddHold").on("click", function () {
|
|
|
|
var baseFlow = $("#txtBaseFlow").val();
|
|
var newbaseFlowLocation = $("#BaseFlowLocations").data("kendoDropDownList").value();
|
|
var newbaseFlowOperation = $("#BaseFlowOperations").data("kendoDropDownList").dataItem().OperCode;
|
|
var newbaseFlowOperationSeq = $("#BaseFlowOperations").data("kendoDropDownList").dataItem().SeqCode;
|
|
var newbaseFlowOperDesc = $("#txtOperationDesc").val();
|
|
var newchangeInstructions = $("#ChangeInstructions").val();
|
|
|
|
|
|
var vgrid = $("#HoldSteps").data("kendoGrid");
|
|
//Getting grid items
|
|
var items = vgrid.dataSource.data();
|
|
|
|
for (i = 0; i < items.length; i++) {
|
|
var item = items[i];
|
|
|
|
var existinglocationOperation = $.trim(item.Location) + $.trim(item.Operation);
|
|
var existingOperation = $.trim(item.Operation);
|
|
var existingSeq = $.trim(item.OperSequence);
|
|
|
|
|
|
if ((existinglocationOperation == $.trim(newbaseFlowLocation) + $.trim(newbaseFlowOperation))
|
|
&& (currentHoldStepID != item.ID)){
|
|
alert("The Location and Operation Combination has already been entered");
|
|
return
|
|
}
|
|
|
|
|
|
//if (newbaseFlowLocation == $.trim(item.Location) && (currentHoldStepID != item.ID)) {
|
|
// if (parseInt(newbaseFlowOperationSeq) <= existingSeq) {
|
|
// alert("The Operation has already been passed in the Mfg process");
|
|
// return;
|
|
// }
|
|
|
|
|
|
//}
|
|
}
|
|
|
|
|
|
|
|
|
|
var errorMsg = "";
|
|
|
|
if (newbaseFlowLocation == "Select Location")
|
|
errorMsg = "Location, ";
|
|
|
|
if (newbaseFlowOperation == "Select Operation" || newbaseFlowOperation == '')
|
|
errorMsg = errorMsg + "Operation, ";
|
|
|
|
if (newchangeInstructions.length <= 0)
|
|
errorMsg = errorMsg + "Instructions, ";
|
|
|
|
if (errorMsg != '') {
|
|
alert(errorMsg + 'needs to be entered before saving ');
|
|
return;
|
|
}
|
|
else {
|
|
// save
|
|
$("#AddHoldStepForm").modal('hide');
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
if (model == "true") {
|
|
$("#WinHoldStepRevisionComments").modal("show");
|
|
}
|
|
else {
|
|
//var newbaseFlowLocation = $("#BaseFlowLocations").data("kendoDropDownList").value();
|
|
//var newbaseFlowOperation = $("#BaseFlowOperations").data("kendoDropDownList").text();
|
|
//var newbaseFlowOperDesc = $("#txtOperationDesc").val();
|
|
//var newchangeInstructions = $("#ChangeInstructions").val();
|
|
|
|
var holdStepItem = {
|
|
ID: currentHoldStepID,
|
|
BaseFlow: $("#txtBaseFlow").val(),
|
|
Location: newbaseFlowLocation,
|
|
OperSequence: newbaseFlowOperationSeq,
|
|
Operation: newbaseFlowOperation,
|
|
OperationDescription: newbaseFlowOperDesc,
|
|
ChangeInstructions: newchangeInstructions,
|
|
//PreviousHoldStepID: previousMaterialID,
|
|
LTWorkRequestID: "@Model.ID"
|
|
|
|
}
|
|
|
|
var data = ReturnModelObject();
|
|
data.LTHoldStep = holdStepItem;
|
|
data.RevisionComments = $("#revisionHoldStepComments").val();
|
|
|
|
var urlString;
|
|
if (holdStepOperation == "Update")
|
|
urlString = '/LotTraveler/UpdateHoldStepRevision';
|
|
else if (holdStepOperation == "Add")
|
|
urlString = '/LotTraveler/InsertHoldStepRevision';
|
|
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
$("#AddHoldStepForm").modal('hide');
|
|
var grid = $("#HoldSteps").data("kendoGrid");
|
|
grid.dataSource.read();
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
|
|
|
|
}
|
|
})
|
|
|
|
|
|
|
|
$('#submitHoldStepRevisionComments').on('click', function (e) {
|
|
e.preventDefault();
|
|
$('#submitHoldStepRevisionComments').attr("disabled", true);
|
|
|
|
var newbaseFlowLocation = $("#BaseFlowLocations").data("kendoDropDownList").value();
|
|
var newbaseFlowOperation = $("#BaseFlowOperations").data("kendoDropDownList").dataItem().OperCode;
|
|
var newbaseFlowOperationSeq = $("#BaseFlowOperations").data("kendoDropDownList").dataItem().SeqCode;
|
|
var newbaseFlowOperDesc = $("#txtOperationDesc").val();
|
|
var newchangeInstructions = $("#ChangeInstructions").val();
|
|
|
|
var holdStepItem = {
|
|
ID: currentHoldStepID,
|
|
BaseFlow: $("#txtBaseFlow").val(),
|
|
Location: newbaseFlowLocation,
|
|
OperSequence: newbaseFlowOperationSeq,
|
|
Operation: newbaseFlowOperation,
|
|
OperationDescription: newbaseFlowOperDesc,
|
|
ChangeInstructions: newchangeInstructions,
|
|
//PreviousHoldStepID: previousMaterialID,
|
|
LTWorkRequestID: "@Model.ID"
|
|
|
|
}
|
|
|
|
var data = ReturnModelObject();
|
|
data.LTHoldStep = holdStepItem;
|
|
data.RevisionComments = $("#revisionHoldStepComments").val();
|
|
|
|
var urlString;
|
|
if (holdStepOperation == "Update")
|
|
urlString = '/LotTraveler/UpdateHoldStepRevision';
|
|
else if (holdStepOperation == "Add")
|
|
urlString = '/LotTraveler/InsertHoldStepRevision';
|
|
else if (holdStepOperation == "Delete")
|
|
urlString = '/LotTraveler/DeleteHoldStepRevision';
|
|
|
|
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
$("#WinEPIRevisionComments").modal('hide');
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', parseInt(data));
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$("#btnSelectpart").on("click", function () {
|
|
if (partNumberDropDownCreated != 1)
|
|
displayWIPPartAdd();
|
|
else {
|
|
$("#WIPPartForm").modal('show');
|
|
}
|
|
})
|
|
|
|
var displayWIPPartAdd = function () {
|
|
partNumberDropDownCreated = 1;
|
|
var url = "/LotTraveler/GetPartNumbers";
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
|
|
},
|
|
success: function (data) {
|
|
$("#ModPartNumberList").data("kendoDropDownList").dataSource.data(data);
|
|
$("#WIPPartForm").modal('show');
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function PartNumberOnSelect(e) {
|
|
var dataItem = this.dataItem(e.item.index());
|
|
var dataItems = dataItem.SiliconAndDesc.split('~');
|
|
var desc = dataItems[0];
|
|
var silicon = dataItems[1];
|
|
$("#txtModEPiSiliconPartNumber").val(silicon);
|
|
$("#txtModPartDesc").val(desc);
|
|
|
|
}
|
|
|
|
$("#SavePart").on('click', function (e) {
|
|
e.preventDefault();
|
|
|
|
if ($("#ModPartNumberList").data("kendoDropDownList").value() == "Select PartNumber") {
|
|
alert('Please select a Part');
|
|
return;
|
|
}
|
|
|
|
var part = $("#ModPartNumberList").data("kendoDropDownList").text();
|
|
|
|
if (part != $("#OriginalWIPPartNumber").val()) {
|
|
if (!confirm('Warning, changing the part number will remove all lot material rows, are you sure you want to continue?')) {
|
|
return;
|
|
}
|
|
}
|
|
|
|
$("#DefaultEPISiliconPartNumber").val($("#txtModEPiSiliconPartNumber").val());
|
|
$("#txtWIPPartNumber").val($("#ModPartNumberList").data("kendoDropDownList").text());
|
|
$("#txtPartDescription").val($("#txtModPartDesc").val());
|
|
$("#WIPPartForm").modal('hide');
|
|
|
|
|
|
var data = ReturnModelObject();
|
|
|
|
$.ajax({
|
|
url: '/LotTraveler/WorkRequestRevision',
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', "@Model.ID");
|
|
|
|
}
|
|
})
|
|
|
|
})
|
|
|
|
function LocationsOnSelect(e) {
|
|
//alert(e.item);
|
|
var dataItem = this.dataItem(e.item.index());
|
|
var url = "/LotTraveler/GetBaseFlowOperations";
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
baseFlow: $("#txtProcessFlow").val(),
|
|
location: dataItem.Location
|
|
},
|
|
success: function (data) {
|
|
$("#BaseFlowOperations").data("kendoDropDownList").dataSource.data(data);
|
|
$("#txtOperationDesc").val('');
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
function OperationsOnSelect(e) {
|
|
var dataItem = this.dataItem(e.item.index());
|
|
$("#txtOperationDesc").val(dataItem.Operation + ' ' + dataItem.OperationDesc);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function buildLinks(fileNames, swrNumber, revision) {
|
|
var template = "";
|
|
|
|
//var fileName = 4;
|
|
|
|
//alert(workRequestID);
|
|
|
|
if (fileNames != null) {
|
|
var tempValue = fileNames.split(',');
|
|
for (var i = 0; i < tempValue.length; i++) {
|
|
var tempValue2 = tempValue[i].split('~');
|
|
|
|
var fileName = tempValue2[0];
|
|
var fileGuid = tempValue2[1];
|
|
|
|
var tempFile = fileName.split('.');
|
|
var fileExtension = tempFile[tempFile.length - 1];
|
|
|
|
//template += "<a href='@GlobalVars.AttachmentUrl" + "LotTraveler/" + swrNumber + "/" + fileGuid + "." + fileExtension + "'>" + fileName + "</a><BR>" + " ";
|
|
template += "<a href='/LotTraveler/DownloadFile?fileGuid=" + fileGuid + "&swrNumber=" + @Model.SWRNumber + "&typeOfDoc=1" + "'>" + fileName + "</a><BR>" + " ";
|
|
|
|
}
|
|
|
|
}
|
|
return template;
|
|
}
|
|
|
|
|
|
//==================================================================================================================================
|
|
|
|
// Atachments
|
|
function UploadHoldStepAttachment(e) {
|
|
e.preventDefault();
|
|
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
currentHoldStepID = dataItem.ID;
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
|
|
if (model == "true") {
|
|
$("#WinHoldStepAttRevComments").modal('show');
|
|
}
|
|
else {
|
|
var url = $('#AddHoldStepAttachmentFormRevision').data('url');
|
|
url = url + '?holdStepID=' + currentHoldStepID;
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
success: function (data) {
|
|
|
|
$('#HoldStepAttachmentContainer').html(data);
|
|
$("#AddHoldStepAttachmentFormRevision").modal('show')
|
|
|
|
var grid = $("#HoldStepAttachments").data("kendoGrid");
|
|
grid.dataSource.read();
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
}
|
|
}
|
|
|
|
|
|
$("#submitHoldStepAttRevComments").on('click', function () {
|
|
|
|
$("#WinHoldStepAttRevComments").modal('hide');
|
|
var url = $('#AddHoldStepAttachmentFormRevision').data('url');
|
|
url = url + '?holdStepID=' + currentHoldStepID;
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
success: function (data) {
|
|
|
|
$('#HoldStepAttachmentContainer').html(data);
|
|
$("#AddHoldStepAttachmentFormRevision").modal('show')
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
})
|
|
|
|
function AttachmentMessage() {
|
|
alert("The documents can only be viewed from Documetum");
|
|
return false;
|
|
}
|
|
|
|
function onFileUploadSuccess(e) {
|
|
var grid = $("#HoldStepAttachments").data("kendoGrid");
|
|
grid.dataSource.read($('#txtECNNumber').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();
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
|
|
function ReturnModelObject() {
|
|
var departments = $("#DepartmentIDs").data("kendoMultiSelect").value();
|
|
var moduleIDs = $("#ModuleIDs").data("kendoMultiSelect").value();
|
|
|
|
var objectData = {
|
|
ID: '@Model.ID',
|
|
Title: $("#txtTitle").val(),
|
|
CurrentStep: $("#currentStep").val(),
|
|
DepartmentIDs: departments,
|
|
ModuleIDs: moduleIDs,
|
|
LotType: $("#LotType").data("kendoDropDownList").value(),
|
|
PCRBNumber: $("#txtPCRBNumber").val(),
|
|
EngLotStartRequired: $("#EngLotStartRequired").data("kendoDropDownList").value(),
|
|
LotTypeConversion: $("#LotTypeConversion").data("kendoDropDownList").value(),
|
|
QualLot: $("#QualLot").data("kendoDropDownList").value(),
|
|
PurposeOfRequest: $("#txtPurposeOfRequest").val(),
|
|
PlannedLotStartDate: $("#txtPlannedLotStartDate").val(),
|
|
PlannedScheduledCloseDate: $("#txtPlannedScheduledCloseDate").val(),
|
|
ChargeDepartment: $("#txtChargeDepartment").val(),
|
|
AllocationToUse: $("#AllocationToUse").data("kendoDropDownList").value(),
|
|
PredictedCyleTime: $("#txtPredictedCyleTime").val(),
|
|
IsITAR: $("#IsITAR").val(),
|
|
//WIPArea: $("#txtWIPArea").val(),
|
|
// EmployeeID: $("#txtEmployeeID").val(),
|
|
EstimatedBinCLoseDate: $("#txtEstimatedBinCLoseDate").val(),
|
|
TotalQty: $("#txtTotalQty").val(),
|
|
LotNumber: $("#txtLotNumber").val(),
|
|
WIPPartNumber: $("#txtWIPPartNumber").val(),
|
|
DefaultEPISiliconPartNumber: $("#DefaultEPISiliconPartNumber").val(),
|
|
ProcessFlow: $("#txtProcessFlow").val(),
|
|
StartQty: $("#txtStartQty").val(),
|
|
PartDescription: $("#txtPartDescription").val(),
|
|
VerbComment: $("#txtVerbComment").val(),
|
|
SiliconOnHand: ($('#SiliconOnHand').is(':checked') ? 1 : 0),
|
|
//SiliconExpectedDueDate: $("#txtSiliconExpectedDueDate").val(),
|
|
//SiliconComments: $("#txtSiliconComments").val(),
|
|
ReticleOnHand: ($('#ReticleOnHand').is(':checked') ? 1 : 0),
|
|
//ReticleExpectedDueDate: $("#txtReticleExpectedDueDate").val(),
|
|
//ReticleComments: $("#txtReticleComments").val(),
|
|
SPNTransferOnHand: ($('#SPNTransferOnHand').is(':checked') ? 1 : 0),
|
|
//SPNTransferExpectedDueDate: $("#txtSPNTransferExpectedDueDate").val(),
|
|
//SPNTransferComments: $("#txtSPNTransferComments").val(),
|
|
ProbeCardOnHand: ($('#ProbeCardOnHand').is(':checked') ? 1 : 0),
|
|
//ProbeCardExpectedDueDate: $("#txtProbeCardExpectedDueDate").val(),
|
|
//ProbeCardComments: $("#txtProbeCardComments").val(),
|
|
ProbeRecipeOnHand: ($('#ProbeRecipeOnHand').is(':checked') ? 1 : 0),
|
|
//ProbeRecipeExpectedDueDate: $("#txtProbeRecipeExpectedDueDate").val(),
|
|
//ProbeRecipeComments: $("#txtProbeRecipeComments").val(),
|
|
ProcessChangeDetailsOnHand: ($('#ProcessChangeDetailsOnHand').is(':checked') ? 1 : 0),
|
|
//ProcessChangeDetailsDueDate: $("#txtProcessChangeDetailsDueDate").val(),
|
|
//RevisionComments: $("#revisionComments").val()
|
|
LotStartCheckListComments: $("#txtLotStartCheckListComments").val(),
|
|
RecordSiliconLotInSPNTapeTagTotrav: $("#RecordSiliconLotInSPNTapeTagTotrav").data("kendoDropDownList").value(),
|
|
SiliconLotNoCassette1: $("#txtSiliconLotNoCassette1").val(),
|
|
}
|
|
|
|
return objectData;
|
|
}
|
|
|
|
|
|
|
|
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 = "/LotTraveler/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);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$('#ApproveDocument').on('click', function (e) {
|
|
e.preventDefault();
|
|
|
|
var errorMsg = "";
|
|
if (('@Model.CurrentStep') == '3') {
|
|
if ($("#txtPlannedLotStartDate").val() == '')
|
|
errorMsg = "Start Date ";
|
|
|
|
if ($("#txtPlannedScheduledCloseDate").val() == '')
|
|
errorMsg = "ScheduledCloseDate, ";
|
|
|
|
if ($("#txtLotNumber").val() == '')
|
|
errorMsg = "Lot Number, ";
|
|
|
|
if ($("#txtPredictedCyleTime").val() == '')
|
|
errorMsg = "Cyle Time, ";
|
|
|
|
if (errorMsg.length != 0) {
|
|
alert(errorMsg + " fields need to be filled in before Approving the Work Request")
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
$('#submitApprovalComments').attr("disabled", false);
|
|
|
|
$("#ApprovalComments").modal('show');
|
|
return false;
|
|
});
|
|
|
|
|
|
$('#submitApprovalComments').on('click', function (e) {
|
|
e.preventDefault();
|
|
$('#submitApprovalComments').attr("disabled", true);
|
|
|
|
$.ajax({
|
|
url: "/LotTraveler/Approve",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
workRequestID: "@Model.ID",
|
|
currentStep: $("#currentStep").val(),
|
|
comments: $("#rejectComments").val(),
|
|
documentType: docType
|
|
},
|
|
success: function (data) {
|
|
$("#ApprovalComments").modal('hide');
|
|
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', "@Model.ID");
|
|
|
|
}
|
|
});
|
|
});
|
|
|
|
$('#RejectDocument').on('click', function (e) {
|
|
e.preventDefault();
|
|
// Save the document first if it was changed
|
|
$('#RejectDocument').attr("disabled", false);
|
|
$("#RejectComments").modal('show');
|
|
return false;
|
|
});
|
|
|
|
|
|
@*$('#submitRejectComments').on('click', function (e) {
|
|
e.preventDefault();
|
|
$('#RejectDocument').attr("disabled", true);
|
|
|
|
|
|
$.ajax({
|
|
url: "/LotTraveler/Reject",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
workRequestID: "@Model.ID",
|
|
currentStep: $("#currentStep").val(),
|
|
comments: $("#rejectComments").val(),
|
|
documentType: docType
|
|
},
|
|
success: function (data) {
|
|
$("#RejectComments").modal('hide');
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
window.location.href = url.replace('__id__', "@Model.ID");
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
|
|
});
|
|
});*@
|
|
|
|
|
|
// REGION REVISIONS
|
|
|
|
$('#SaveNewRevision').on('click', function (e) {
|
|
e.preventDefault();
|
|
|
|
if (isMaterialGridDirty) {
|
|
alert("The Material List Grid section is in [Edit] mode.\nPlease click on Update/Cancel in the Material List Grid section before saving other parts of the form data");
|
|
return;
|
|
}
|
|
|
|
|
|
//var url = "/LotTraveler/IsWorkRequestDocLockedByUser";
|
|
|
|
var vgrid = $("#MaterialList").data("kendoGrid");
|
|
var totalStartQty = 0;
|
|
var items = vgrid.dataSource.data();
|
|
|
|
for (i = 0; i < items.length; i++) {
|
|
var item = items[i];
|
|
totalStartQty += item.Quantity;
|
|
}
|
|
|
|
if (totalStartQty > $("#txtTotalQty").val()) {
|
|
alert("Total Quantity has to be equal to or greater than the Total of Start quantity");
|
|
return;
|
|
}
|
|
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
|
|
$('#submitRevisionComments').attr("disabled", false);
|
|
|
|
//alert(model);
|
|
if (model == "true")
|
|
$("#WinRevisionComments").modal('show');
|
|
else {
|
|
var data = ReturnModelObject();
|
|
|
|
$.ajax({
|
|
url: '/LotTraveler/SaveRevision',
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
alert("Saved Successfully!!");
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
})
|
|
}
|
|
|
|
return false;
|
|
});
|
|
|
|
|
|
$('#submitRevisionComments').on('click', function (e) {
|
|
e.preventDefault();
|
|
$('#submitRevisionComments').attr("disabled", true);
|
|
revisionSaved = true;
|
|
|
|
var data = ReturnModelObject();
|
|
data.RevisionComments = $("#revisionComments").val();
|
|
|
|
$.ajax({
|
|
url: '/LotTraveler/SaveRevision',
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
$("#WinRevisionComments").modal('hide');
|
|
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', parseInt(data));
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
})
|
|
|
|
|
|
});
|
|
|
|
|
|
$("#GetRevision").on('click', function (e) {
|
|
|
|
e.preventDefault();
|
|
var id = $("#Revisions").data("kendoDropDownList").value();
|
|
$.ajax({
|
|
url: "/LotTraveler/GetWorkRequestRevision",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
workRequestID: id
|
|
},
|
|
success: function (data) {
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', id);
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
})
|
|
|
|
|
|
function UpdateMaterialRevision(e) {
|
|
|
|
EPIOperation = "Update";
|
|
grid = $("#MaterialList").data("kendoGrid");
|
|
var dataItem = grid.dataItem($(e.currentTarget).closest("tr"));
|
|
currentMaterialRecordID = dataItem.ID;
|
|
previousMaterialID = dataItem.PreviousMaterialID;
|
|
|
|
var url = "/LotTraveler/GetMaterialRecord";
|
|
$.ajax({
|
|
url: url,
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
materialID: currentMaterialRecordID
|
|
},
|
|
success: function (data) {
|
|
|
|
$("#txtEPiSiliconPartNumber").val(data.EPISiliconPartNumber);
|
|
$("#txtEPiQuantity").val(data.Quantity);
|
|
$("#txtEPISupplier").val(data.Supplier);
|
|
$("#txtEPISource").val(data.Source);
|
|
|
|
$("#EPIForm").modal('show');
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
$("#addEPI").on('click', function (e) {
|
|
e.preventDefault();
|
|
EPIOperation = "Add";
|
|
|
|
$("#EPIForm").modal('show');
|
|
|
|
})
|
|
|
|
function DeleteMaterialRevision(e) {
|
|
|
|
EPIOperation = "Delete";
|
|
grid = $("#MaterialList").data("kendoGrid");
|
|
var dataItem = grid.dataItem($(e.currentTarget).closest("tr"));
|
|
currentMaterialRecordID = dataItem.ID;
|
|
previousMaterialID = dataItem.PreviousMaterialID;
|
|
|
|
var epiItem = {
|
|
ID: currentMaterialRecordID,
|
|
WIPPartNumber: $("#txtWIPPartNumber").val(),
|
|
EPISiliconPartNumber: $("#txtEPiSiliconPartNumber").val(),
|
|
Quantity: $("#txtEPiQuantity").val(),
|
|
Supplier: $("#txtEPISupplier").val(),
|
|
Source: $("#txtEPISource").val(),
|
|
PreviousMaterialID: previousMaterialID,
|
|
LTWorkRequestID: "@Model.ID"
|
|
|
|
|
|
}
|
|
var data = ReturnModelObject();
|
|
data.LTMaterial = epiItem;
|
|
data.RevisionComments = $("#revisionEPIComments").val();
|
|
|
|
if (confirm("Do you really wish to delete?")) {
|
|
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
if (model == "true")
|
|
$("#WinEPIRevisionComments").modal('show');
|
|
else {
|
|
$.ajax({
|
|
url: "/LotTraveler/DeleteMaterialDetailRevision",
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
|
|
$("#WinEPIRevisionComments").modal('hide');
|
|
var grid = $("#MaterialList").data("kendoGrid");
|
|
grid.dataSource.read();
|
|
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
$("#SaveEPI").on('click', function (e) {
|
|
e.preventDefault();
|
|
|
|
|
|
var vgrid = $("#MaterialList").data("kendoGrid");
|
|
//Getting grid items
|
|
var totalStartQty = 0;
|
|
var items = vgrid.dataSource.data();
|
|
|
|
for (i = 0; i < items.length; i++) {
|
|
var item = items[i];
|
|
totalStartQty += item.Quantity;
|
|
}
|
|
|
|
if (totalStartQty > $("#txtTotalQty").val())
|
|
{
|
|
alert("Total of Start quantity cannot be more than the Total Quantity");
|
|
return;
|
|
}
|
|
|
|
|
|
var Quantity = $("#txtEPiQuantity").val();
|
|
|
|
$("#EPIForm").modal('hide');
|
|
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
|
|
|
if (model == "true")
|
|
$("#WinEPIRevisionComments").modal('show');
|
|
else {
|
|
var epiItem = {
|
|
ID: currentMaterialRecordID,
|
|
WIPPartNumber: $("#txtWIPPartNumber").val(),
|
|
EPISiliconPartNumber: $("#txtEPiSiliconPartNumber").val(),
|
|
Quantity: $("#txtEPiQuantity").val(),
|
|
Supplier: $("#txtEPISupplier").val(),
|
|
Source: $("#txtEPISource").val(),
|
|
PreviousMaterialID: previousMaterialID,
|
|
LTWorkRequestID: "@Model.ID"
|
|
|
|
}
|
|
|
|
var data = ReturnModelObject();
|
|
data.LTMaterial = epiItem;
|
|
data.RevisionComments = $("#revisionEPIComments").val();
|
|
|
|
var urlString;
|
|
if (EPIOperation == "Update")
|
|
urlString = "/LotTraveler/UpdateMaterialDetailRevision"
|
|
else if (EPIOperation == "Add")
|
|
urlString = "/LotTraveler/AddMaterialDetailRevision"
|
|
else if (EPIOperation == "Delete")
|
|
urlString = "/LotTraveler/DeleteMaterialDetailRevision"
|
|
|
|
$.ajax({
|
|
url: urlString,
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
$("#EPIForm").modal('hide');
|
|
var grid = $("#MaterialList").data("kendoGrid");
|
|
grid.dataSource.read();
|
|
}
|
|
})
|
|
}
|
|
|
|
})
|
|
|
|
|
|
$('#submitEPIRevisionComments').on('click', function (e) {
|
|
e.preventDefault();
|
|
$('#submitEPIRevisionComments').attr("disabled", true);
|
|
|
|
var epiItem = {
|
|
ID: currentMaterialRecordID,
|
|
WIPPartNumber: $("#txtWIPPartNumber").val(),
|
|
EPISiliconPartNumber: $("#txtEPiSiliconPartNumber").val(),
|
|
Quantity: $("#txtEPiQuantity").val(),
|
|
Supplier: $("#txtEPISupplier").val(),
|
|
Source: $("#txtEPISource").val(),
|
|
PreviousMaterialID: previousMaterialID,
|
|
LTWorkRequestID: "@Model.ID"
|
|
|
|
}
|
|
|
|
var data = ReturnModelObject();
|
|
data.LTMaterial = epiItem;
|
|
data.RevisionComments = $("#revisionEPIComments").val();
|
|
|
|
|
|
var urlString;
|
|
if (EPIOperation == "Update")
|
|
urlString = "/LotTraveler/UpdateMaterialDetailRevision"
|
|
else if (EPIOperation == "Add")
|
|
urlString = "/LotTraveler/AddMaterialDetailRevision"
|
|
else if (EPIOperation == "Delete")
|
|
urlString = "/LotTraveler/DeleteMaterialDetailRevision"
|
|
|
|
$.ajax({
|
|
url: urlString,
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (data) {
|
|
$("#WinEPIRevisionComments").modal('hide');
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', parseInt(data));
|
|
}
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#reAssignApprovers').on('click', function (e) {
|
|
// reset this variable to indicate that the current Approver of the document is the person Re-Assigning it to someone else.
|
|
e.preventDefault();
|
|
reAssignFromUserid = "";
|
|
|
|
var url = "/LotTraveler/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 (e) {
|
|
e.preventDefault();
|
|
// 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 ReAssignApprovalByAdmin = function (userids) {
|
|
var urlString = '/LotTraveler/ReAssignApproverByAdmin';
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
data: {
|
|
workRequestID: "@Model.ID",
|
|
reAssignApproverFrom: reAssignFromUserid,
|
|
reAssignApproverTo: userids,
|
|
step: $("#currentStep").val(),
|
|
docType: docType
|
|
},
|
|
success: function (result) {
|
|
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', "@Model.ID");
|
|
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
var ReAssignApproval = function (userids) {
|
|
|
|
var ecnTypeString = '';
|
|
var urlString = '/LotTraveler/ReAssignApproval';
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
data: {
|
|
userIDs: userids,
|
|
workRequestID: "@Model.ID",
|
|
step: $("#currentStep").val(),
|
|
docType: docType
|
|
},
|
|
success: function (result) {
|
|
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', "@Model.ID");
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
$('#additionalApprovers').on('click', function (e) {
|
|
|
|
e.preventDefault();
|
|
//var searchText = ($("#txtSearch").val());
|
|
var url = "/LotTraveler/GetAllUsersList";
|
|
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 ecnTypeString = '';
|
|
|
|
|
|
var urlString = '/LotTraveler/AddAdditionalApproval';
|
|
$.ajax({
|
|
type: "Post",
|
|
url: urlString,
|
|
data: {
|
|
userIDs: userids,
|
|
workRequestID: "@Model.ID",
|
|
step: $("#currentStep").val(),
|
|
docType: docType
|
|
},
|
|
success: function (result) {
|
|
var grid = $("#ApproversList").data("kendoGrid");
|
|
grid.dataSource.read('@Model.ID', $("#currentStep").val());
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
$("#PrintWorkRequestPDF").on('click', function (e) {
|
|
e.preventDefault();
|
|
var url = '@Url.Action("DisplayWorkRequestPDF", "LotTraveler", new { workRequestID = "__id__" })';
|
|
window.open(url.replace('__id__', '@Model.ID', '_blank'));
|
|
})
|
|
|
|
$('#ApprovalLogHistoryData').on('click', function () {
|
|
$("#ApprovalLogHistoryWin").modal('show');
|
|
return false;
|
|
})
|
|
|
|
$('#RevisionHistoryData').on('click', function () {
|
|
$("#RevisionHistoryWin").modal('show');
|
|
return false;
|
|
})
|
|
|
|
$(window).bind("beforeunload", function () {
|
|
//return confirm("Do you really want to close?");
|
|
$.ajax({
|
|
url: "/LotTraveler/ReleaseLockOnDocument",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
workRequestID: ("@Model.ID")
|
|
},
|
|
success: function () {
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
|
|
})
|
|
|
|
function changeNewLine(text) {
|
|
if (text != null) {
|
|
var regexp = new RegExp('\n', 'g');
|
|
return text.replace(regexp, '<br>');
|
|
}
|
|
else
|
|
return '';
|
|
}
|
|
|
|
|
|
function DownloadAttachment(e) {
|
|
e.preventDefault();
|
|
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
var fileGUID = dataItem.FileGUID;
|
|
var attachmentID = dataItem.AttachmentID;
|
|
|
|
window.location = '/LotTraveler/DownloadFile?fileGuid=' + fileGUID + '&swrNumber=' + "@Model.SWRNumber" + "&typeOfDoc=1";
|
|
|
|
}
|
|
|
|
@*function IdleTimeout() {
|
|
//window.location = logoutUrl;
|
|
var url = '@Url.Action("SpecialWorkRequest", "Home")';
|
|
window.location.href = url;
|
|
|
|
}*@
|
|
|
|
</script>
|