1562 lines
68 KiB
Plaintext
1562 lines
68 KiB
Plaintext
@model Fab2ApprovalSystem.Models.LTWorkRequest
|
|
@{
|
|
ViewBag.Title = "Work Request - ReadOnly";
|
|
}
|
|
@{
|
|
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="DefaultEPISiliconPartNumber" value="@Model.DefaultEPISiliconPartNumber" />
|
|
<input type="hidden" id="currentStep" value="@Model.CurrentStep" />
|
|
@Html.AntiForgeryToken()
|
|
<div data-spy="affix">
|
|
@if (@Model.CurrentStep > 0)
|
|
{
|
|
if (ViewBag.IsApprover == "true")
|
|
{
|
|
<div data-spy="affix" data-offset-top="0">
|
|
<input type="button" value="Approve" class="btn btn-success btn-xs" id="ApproveDocument" />
|
|
<input type="button" value="Reject" class="btn btn-warning btn-xs" id="RejectDocument" />
|
|
</div>
|
|
}
|
|
}
|
|
</div>
|
|
<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">
|
|
|
|
</div>
|
|
<div class="col-sm-3">
|
|
|
|
</div>
|
|
<div class="col-sm-6">
|
|
|
|
</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" />
|
|
|
|
<input type="button" value="Approval Log History" class="btn btn-warning btn-xs" id="ApprovalLogHistoryData" />
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-info">
|
|
<h5>
|
|
<font style="color:crimson">
|
|
Section1: Work Request <font style="color: green; font-weight:bold; font-style:italic; font-size:small">(This Section must be completed before submitting for approval)</font>
|
|
</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" })
|
|
@if (Session[GlobalVars.IS_ADMIN] != null)
|
|
{
|
|
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
|
}
|
|
</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"
|
|
}
|
|
}
|
|
)
|
|
|
|
)
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">ITAR:</label>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
@Html.EditorFor(model => model.IsITAR)
|
|
</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">
|
|
@(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 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", style = "font-size: 11px; width: 100%", Readonly = "Readonly" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<!-- NEW PANEL ===============================================================-->
|
|
<div class="panel-body bg-info">
|
|
<h5>
|
|
<font style="color:crimson">
|
|
Section1-A: Engineering Wafer Lot Start
|
|
</font>
|
|
</h5>
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-2">
|
|
<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)
|
|
.HtmlAttributes(new { Readonly = "Readonly" })
|
|
.Name("txtPlannedLotStartDate"))
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<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)
|
|
.HtmlAttributes(new { Readonly = "Readonly" })
|
|
.Name("txtPlannedScheduledCloseDate"))
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<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", Readonly = "Readonly" })
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="col-sm-5">
|
|
<label class="control-label pull-right">Allocation to use:</label>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
@Html.TextBoxFor(model => model.AllocationToUse, new { id = "txtAllocationToUse", @class = "k-textbox", Readonly = "Readonly" })
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<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", Readonly = "Readonly" })
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<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>
|
|
<div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.LTMaterialViewModel>()
|
|
.Name("MaterialList")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.LTWorkRequestID).Visible(false);
|
|
columns.Bound(a => a.WIPPartNumber).Width("50px");
|
|
columns.Bound(a => a.EPISiliconPartNumber).Width("50px");
|
|
columns.Bound(a => a.Quantity).Width("50px");
|
|
columns.Bound(a => a.Supplier).Width("50px");
|
|
columns.Bound(a => a.Source).Width("50px");
|
|
})
|
|
.Resizable(e => e.Columns(true))
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:200px; width:100%; font-size: 8px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.ServerOperation(false)
|
|
.Events(e => e.Change("RefreshStartQtyData").RequestStart("CheckWIPPartNumber"))
|
|
.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))
|
|
)
|
|
</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.CheckBoxFor(model => model.SiliconOnHand, new { @disabled = "disabled" })
|
|
</td>
|
|
<td>
|
|
Reticle Set
|
|
@Html.CheckBoxFor(model => model.ReticleOnHand, new { @disabled = "disabled" })
|
|
</td>
|
|
<td>
|
|
SPN transfer
|
|
@Html.CheckBoxFor(model => model.SPNTransferOnHand, new { @disabled = "disabled" })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="background-color: lightgray; font-weight: bold; font-size: 10px"></td>
|
|
<td>
|
|
Probe Card
|
|
@Html.CheckBoxFor(model => model.ProbeCardOnHand, new { @disabled = "disabled" })
|
|
</td>
|
|
<td>
|
|
Probe Recipe
|
|
@Html.CheckBoxFor(model => model.ProbeRecipeOnHand, new { @disabled = "disabled" })
|
|
</td>
|
|
<td>
|
|
Process Change Details
|
|
@Html.CheckBoxFor(model => model.ProcessChangeDetailsOnHand, new { @disabled = "disabled" })
|
|
</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%", Readonly = "Readonly" })
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
<td valign="top">
|
|
<table border="1" width="100%" height="100%" style="border-color:lightgrey; font-size:9px">
|
|
<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%", Readonly = "Readonly" })
|
|
</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")
|
|
.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.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%", Readonly = "Readonly" })
|
|
</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">
|
|
<!-- NEW PANEL ===============================================================-->
|
|
<div class="panel-body bg-info">
|
|
<h5>
|
|
<font style="color:crimson">
|
|
Section2: OLHOLD and Engineering Deviation Specified by Originator
|
|
</font>
|
|
</h5>
|
|
|
|
</div>
|
|
<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.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("EditProcessFlow")).Width("50px");
|
|
//columns.Command(c => c.Destroy()).Width("50px");
|
|
})
|
|
.Resizable(e => e.Columns(true))
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:350px; width:100%; font-size: 8px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.ServerOperation(false)
|
|
//.Events(e => e.RequestEnd("RefreshData"))
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ID);
|
|
//model.Field(f => f.BaseFlow).Editable(false);
|
|
//model.Field(f => f.Location).Editable(false);
|
|
//model.Field(f => f.Operation).Editable(false);
|
|
//model.Field(f => f.Location).Editable(false);
|
|
})
|
|
.PageSize(40)
|
|
.Read(read => read.Action("GetHoldSteps", "LotTraveler", new { workRequestID = Model.ID }))
|
|
//.Destroy(u => u.Action("DeleteHoldStep", "LotTraveler"))
|
|
//.Create(create => create.Action("InsertMaterialDetail", "LotTraveler"))
|
|
)
|
|
.Resizable(resize => resize.Columns(true))
|
|
//.Events(e => e.Edit("onEdit"))
|
|
)
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-info">
|
|
<h5>
|
|
<font style="color:crimson">
|
|
Section3: Document Attachment
|
|
</font>
|
|
</h5>
|
|
|
|
</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.Edit()).Width("100px");
|
|
columns.Command(c => c.Destroy()).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 }))
|
|
.Destroy(destroy => destroy.Action("DeleteWorkRequestAttachment", "LotTraveler"))
|
|
//.Update(update => update.Action("UpdateWorkRequestAttachment", "LotTraveler"))
|
|
)
|
|
)
|
|
</div>
|
|
|
|
</div>
|
|
<div class="panel-heading">
|
|
@if (((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated)))
|
|
{
|
|
<button class="btn btn-warning btn-xs" data-toggle="modal" id="additionalApprovers" style="font-size:x-small">
|
|
Additional Approvers
|
|
</button>
|
|
}
|
|
else if ((ViewBag.IsApprover == "true"))
|
|
{
|
|
<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 (Session[GlobalVars.IS_ADMIN] != null)
|
|
{
|
|
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
|
{
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
|
.Name("ApproversList")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.UserID).Visible(false);
|
|
columns.Bound(a => a.ApprovalID).Visible(false);
|
|
columns.Bound(a => a.FullName);
|
|
columns.Bound(a => a.RoleName);
|
|
columns.Bound(a => a.SubRoleName);
|
|
columns.Bound(a => a.Status);
|
|
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ;
|
|
columns.Bound(a => a.CompletedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ;
|
|
columns.Bound(a => a.Comments);
|
|
//columns.Bound(p => p.Status).ClientTemplate("#=buildButtons(Status)#");
|
|
columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
|
|
|
})
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:200px; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
//.Batch(false)
|
|
.ServerOperation(false)
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ApprovalID);
|
|
})
|
|
.PageSize(20)
|
|
.Read(read => read.Action("GetApproversList", "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>
|
|
|
|
}
|
|
<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="ApprovalComments" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Enter Approval Comments:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="3" id="approvalComments"></textarea>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="submitApprovalComments">Confirm Approval</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="RejectComments" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Enter Reject Comments:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="3" id="rejectComments"></textarea>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="submitRejectComments">Confirm Reject</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="ReAssignApproval" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
|
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
|
<div id='lstReAssignApproval'>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="AdditionalApproval" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Add New Approvers:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<div id='lstAdditionalApproval'>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="additionalApproval">Confirm Additional Approver</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" id="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>
|
|
</body>
|
|
|
|
@Html.Partial("_LTReassignOriginator")
|
|
|
|
<script type="text/javascript">
|
|
var holdStepFunction = ""
|
|
var holdStepID;
|
|
var docType = 6;
|
|
var partNumberDropDownCreated = 0;
|
|
|
|
$(document).ready(function () {
|
|
})
|
|
|
|
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);
|
|
}
|
|
|
|
|
|
function CheckWIPPartNumber(e) {
|
|
//if ($("#txtWIPPartNumber").val().length == 0) {
|
|
// alert("Please enter the WIP PartNumber before adding a hold step");
|
|
// return false;
|
|
//}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
}
|
|
|
|
|
|
|
|
$('#ApproveDocument').on('click', function (e) {
|
|
e.preventDefault();
|
|
var errorMsg = "";
|
|
if (('@Model.CurrentStep') == '3') {
|
|
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("Edit", "LotTraveler", new { issueID = "__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(),
|
|
docType: docType
|
|
},
|
|
success: function (data) {
|
|
$("#RejectComments").modal('hide');
|
|
var url = '@Url.Action("Edit", "LotTraveler", new { issueID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', "@Model.ID");
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
function RefreshWorkReqAttachmentsGrid() {
|
|
var grid = $("#WorkRequestAttachments").data("kendoGrid");
|
|
grid.dataSource.read($("@Model.ID").val());
|
|
|
|
//RefreshHoldStepGrid();
|
|
}
|
|
|
|
|
|
$('#reAssignApprovers').on('click', function (e) {
|
|
e.preventDefault();
|
|
// reset this variable to indicate that the current Approver of the document is the person Re-Assigning it to someone else.
|
|
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) {
|
|
// get selected items.
|
|
e.preventDefault();
|
|
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("Edit", "LotTraveler", new { issueID = "__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("Edit", "LotTraveler", new { issueID = "__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 (e) {
|
|
e.preventDefault();
|
|
// 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);
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$("#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("Edit", "LotTraveler", new { issueID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', id);
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
})
|
|
|
|
|
|
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);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
function RefreshHoldStepGrid() {
|
|
var grid = $("#HoldSteps").data("kendoGrid");
|
|
grid.dataSource.read($("#workRequestID").val());
|
|
}
|
|
|
|
|
|
$("#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;
|
|
})
|
|
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
$(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 IdleTimeout() {
|
|
//window.location = logoutUrl;
|
|
var url = '@Url.Action("SpecialWorkRequest", "Home")';
|
|
window.location.href = url;
|
|
|
|
}*@
|
|
|
|
</script>
|