762 lines
34 KiB
Plaintext
762 lines
34 KiB
Plaintext
@model Fab2ApprovalSystem.Models.LTLotTravelerHeaderViewModel
|
|
@{
|
|
ViewBag.Title = "LotTraveler - Execute";
|
|
}
|
|
@{
|
|
Layout = "_LotTravelerLayout.cshtml";
|
|
}
|
|
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
|
<style>
|
|
.k-header .k-link {
|
|
text-align: center;
|
|
}
|
|
.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.LTWorkRequestID" />
|
|
<input type="hidden" id="ReturnURL" value="@Url.Action("LotTravelerExecute", "LotTraveler", new { ltLotID = Model.ID })" />
|
|
|
|
@Html.AntiForgeryToken()
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-12 text-center">
|
|
<label id="RevNumber" style="font-size: large; font-weight: bold; color: blue; font-family: 'Times New Roman';">
|
|
Fab2 Electronic Lot Traveler - Lot# @Model.LotNumber Rev @Model.LotTravCurrentRevision [Mode : Execution]
|
|
</label>
|
|
</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="PrintTravelerPDF" style="font-size: 10px" />
|
|
<input type="button" value="Back to Work Request" class="btn btn-warning btn-xs" id="BackToRequestID" style="font-size: 10px" />
|
|
|
|
<label class="control-label">Lot Numbers:</label>
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("LotList")
|
|
.BindTo(new SelectList(ViewBag.LotList, "LotID", "LotNumber"))
|
|
.OptionLabel("Select")
|
|
)
|
|
<input type="button" value="Display Traveler" class="btn btn-warning btn-xs" id="GetTraveler" style="font-size: 10px" />
|
|
|
|
<label class="control-label">Revisions:</label>
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("Revisions")
|
|
.BindTo(new SelectList(ViewBag.LotTravRevisionList, "ID", "RevisionNumber"))
|
|
.OptionLabel("Select")
|
|
)
|
|
<input type="button" value="Display Revision" class="btn btn-warning btn-xs" id="GetRevision" 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-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 { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Last Update:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.LastUpdate, new { id = "txtLastUpdate", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-2">
|
|
<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 { @class = "k-textbox", Readonly = "Readonly" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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.Status, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
|
|
|
|
</div>
|
|
<div class="col-sm-2">
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="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.Originator, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
@if (GlobalVars.IsAdminValueNotNull(Session))
|
|
{
|
|
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Updated By:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.LastUpdatedBy, new { id = "txtUpdatedBy", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">WIP PN#:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.WIPPartNumber, new { @class = "k-textbox", Readonly = "Readonly" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Part Desc:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.PartDescription, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue;width:100%" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Base Flow:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.BaseFlow, new { id = "txtProcessFlow", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">ITAR:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.IsITAR, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<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, 5, 100, new { @class = "k-textbox", Readonly = "Readonly", style = "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">
|
|
OLHold Steps - Completed
|
|
</font>
|
|
<a class="btn btn-xs pull-right alert-danger" id="aSection2" role="button" data-toggle="collapse" href="#collapseSection2" aria-expanded="true" aria-controls="collapseExample">
|
|
Expand/Collpase
|
|
</a>
|
|
|
|
</h5>
|
|
</div>
|
|
<div class="collapse" id="collapseSection2">
|
|
|
|
<div class="panel-body bg-warning">
|
|
<div class="col-sm-offset-0">
|
|
|
|
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTLotTravelerHoldSteps>()
|
|
.Name("CompletedTasks")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.LotTravelerRevisionID).Visible(false);
|
|
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)#").Width("100px");
|
|
columns.Bound(a => a.ExecutionTaskComments).ClientTemplate("#=changeNewLine(ExecutionTaskComments)#").Width("250px");
|
|
columns.Bound(a => a.SignedOffByName).Width("50px");
|
|
columns.Bound(a => a.SignOffTime).Format("{0:MM/dd/yy hh:mm:ss}").Width("50px");
|
|
columns.Bound(a => a.Completed).ClientTemplate("<input type='checkbox' disabled #= Completed ? checked='checked':'' # class='chkbx' />").Width("50px");
|
|
})
|
|
.Resizable(e => e.Columns(true))
|
|
.Events(e => e.DataBound("onHoldStepsDataBound"))
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:250; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.ServerOperation(false)
|
|
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ID);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetLotTravHoldStepsCompleted", "LotTraveler", new { LotID = Model.ID }))
|
|
)
|
|
|
|
)
|
|
</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">
|
|
OLHold Steps - Pending
|
|
</font>
|
|
<a class="btn btn-xs pull-right alert-danger" id="aSection3" role="button" data-toggle="collapse" href="#collapseSection3" aria-expanded="true" aria-controls="collapseExample">
|
|
Expand/Collpase
|
|
</a>
|
|
|
|
</h5>
|
|
</div>
|
|
<div class="collapse" id="collapseSection3">
|
|
<div class="panel-body bg-info">
|
|
<div class="pull-left">
|
|
<button class="btn btn-warning btn-xs" data-toggle="modal" id="UploadWRAttachment" style="font-size:x-small">
|
|
Upload Files
|
|
</button>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTLotTravelerHoldSteps>()
|
|
.Name("PendingTasks")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.LotTravelerRevisionID).Visible(false);
|
|
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)#").Width("100px");
|
|
columns.Bound(a => a.ExecutionTaskComments).ClientTemplate("#=changeNewLine(ExecutionTaskComments)#").Width("250px");
|
|
columns.Bound(a => a.SignedOffByName).Width("50px");
|
|
columns.Bound(a => a.SignOffTime).Format("{0:MM/dd/yy hh:mm:ss}").Width("50px");
|
|
columns.Bound(a => a.Completed).ClientTemplate("<input type='checkbox' disabled #= Completed ? checked='checked':'' # class='chkbx' />").Width("50px");
|
|
columns.Command(c => c.Custom("Edit").Click("ExecuteHoldStep")).Width("50px");
|
|
})
|
|
.Resizable(e => e.Columns(true))
|
|
.Events(e => e.DataBound("onHoldStepsDataBound"))
|
|
.Sortable()
|
|
.Scrollable()
|
|
.HtmlAttributes(new { style = "height:250; width:100%; font-size: 10px" })
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.ServerOperation(false)
|
|
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.ID);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetLotTravHoldStepsPending", "LotTraveler", new { LotID = Model.ID }))
|
|
)
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
<div class="modal fade" id="timeout" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog modal-lg" style="width:500px;">
|
|
<div class="modal-content">
|
|
<div class="modal-header" style="background-color: #fce0a3;">
|
|
<h3 class="modal-title">Page About To Timeout</h3>
|
|
</div>
|
|
<div class="modal-body" style="background-color: crimson; font-size: 20px; color:white">
|
|
You will 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="AddTaskCommentsForm" 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" style="background-color: #fce0a3;">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Execute Tasks/Comments:</h4>
|
|
</div>
|
|
<div class="modal-body" style="background-color: #a5c9eb; font-size: 12px">
|
|
<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" readonly="Readonly">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="control-group">
|
|
<label for="Location">Location:</label>
|
|
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtLocation" readonly="Readonly">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="control-group">
|
|
<label for="Operation">Operation:</label>
|
|
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
|
<input type="text" class="form-control" id="txtOperation" disabled="disabled">
|
|
</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" readonly="Readonly">
|
|
</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="txtChangeInstructions" style="font-size: 10px" readonly="Readonly"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="control-group">
|
|
<div class="col-sm-12">
|
|
<label for="txtTaskComments">Tasks/Comments:</label>
|
|
<textarea class="form-control" rows="5" id="txtTaskComments" style="font-size: 10px"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row">
|
|
<div class="control-group">
|
|
<div class="col-sm-12">
|
|
<label for="Instructions">Completed:</label>
|
|
<input type="checkbox" id="taskCompletedFlag" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="modal-footer" style="background-color: #fce0a3; ">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-primary" id="SaveTaskCommentsHoldStep">Save</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("GetLotTravelerRevisionHistory", "LotTraveler", new { lotID = Model.ID }))
|
|
)
|
|
)
|
|
</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="WinAttachDocuments" 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-12">
|
|
<label for="WRAttachmentComments">Comments:</label>
|
|
<textarea class="form-control" rows="3" id="WRAttachmentComments"></textarea>
|
|
</div>
|
|
</div>
|
|
<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("AttachSaveWorkRequest", "LotTraveler", new { workRequestID = Model.LTWorkRequestID, currentRevision = Model.WorkReqRevision, swrNo = Model.SWRNumber })
|
|
.AutoUpload(true)
|
|
)
|
|
.Events(events => events.Upload("UploadAdditionalData"))
|
|
.ShowFileList(false)
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
|
|
</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 holdStepOperation;
|
|
var currentHoldStepID;
|
|
var currentLotTravRevisionID;
|
|
var newSession = true;
|
|
$(document).ready(function () {
|
|
$('#collapseSection3').collapse({
|
|
toggle: true
|
|
})
|
|
|
|
$("#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();
|
|
}
|
|
});
|
|
|
|
})
|
|
|
|
function onHoldStepsDataBound(arg) {
|
|
var myElem = document.getElementById('trParentHeader');
|
|
if (myElem == null) {
|
|
$("#HoldSteps").find("th.k-header").parent().before("<tr id='trParentHeader'> <th align='center' colspan='3' class='k-header' style='color:red'></th> <th align='center' colspan='2' class='k-header' style='font-size:12px;color:red'><strong>Change Instructions/File </strong></th> </th> <th align='center' colspan='4' class='k-header' style='font-size:12px;color:red'><strong>Execution </strong></th></tr>");
|
|
}
|
|
}
|
|
|
|
function buildLinks(fileNames, swrNumber) {
|
|
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=2" + "'>" + fileName + "</a><BR>" + " ";
|
|
}
|
|
|
|
}
|
|
return template;
|
|
}
|
|
|
|
|
|
$("#GetRevision").on('click', function (e) {
|
|
|
|
e.preventDefault();
|
|
var revid = $("#Revisions").data("kendoDropDownList").text();
|
|
|
|
var url = '@Url.Action("LotTravelerReadonly", "LotTraveler", new { ltLotID = "__id__", revisionNumber = "__revID__" })';
|
|
url = url.replace('__revID__', revid);
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', '@Model.ID');
|
|
|
|
|
|
})
|
|
|
|
|
|
$("#GetTraveler").on('click', function (e) {
|
|
e.preventDefault();
|
|
var lotid = $("#LotList").data("kendoDropDownList").value();
|
|
|
|
var url = '@Url.Action("LotTravelerUpdate", "LotTraveler", new { ltLotID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', lotid);
|
|
|
|
|
|
})
|
|
|
|
|
|
function ExecuteHoldStep(e) {
|
|
e.preventDefault();
|
|
holdStepOperation = "Update";
|
|
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
currentHoldStepID = dataItem.ID;
|
|
currentLotTravRevisionID = dataItem.LotTravelerRevisionID
|
|
|
|
$("#txtBaseFlow").val($("#txtProcessFlow").val());
|
|
$("#txtLocation").val(dataItem.Location);
|
|
$("#txtOperation").val(dataItem.Operation);
|
|
$("#txtOperationDesc").val(dataItem.OperationDescription);
|
|
$("#txtChangeInstructions").val(dataItem.ChangeInstructions);
|
|
$("#taskCompletedFlag").attr('checked', false);
|
|
$("#txtTaskComments").val('');
|
|
|
|
$("#AddTaskCommentsForm").modal('show');
|
|
|
|
}
|
|
|
|
|
|
$("#SaveTaskCommentsHoldStep").on('click', function (e) {
|
|
e.preventDefault();
|
|
var completedFlag;
|
|
if ($("#taskCompletedFlag").is(":checked"))
|
|
completedFlag = true;
|
|
else
|
|
completedFlag = false;
|
|
|
|
var urlString = "/LotTraveler/UpdateLotTravlerExecution"
|
|
$.ajax({
|
|
url: urlString,
|
|
type: "POST",
|
|
data: {
|
|
currentHoldStepID: currentHoldStepID,
|
|
taskComments: $("#txtTaskComments").val(),
|
|
taskcompleted: completedFlag
|
|
|
|
},
|
|
success: function (data) {
|
|
$("#AddTaskCommentsForm").modal('hide');
|
|
|
|
var grid = $("#PendingTasks").data("kendoGrid");
|
|
grid.dataSource.read('@Model.ID');
|
|
|
|
var grid = $("#CompletedTasks").data("kendoGrid");
|
|
grid.dataSource.read('@Model.ID');
|
|
|
|
|
|
},
|
|
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 checkBoxTemplate(dataVal) {
|
|
'<input type="checkbox" #= dataVal ? \'checked="checked"\' : "" # class="chkbx" />'
|
|
}
|
|
|
|
|
|
$("#PrintTravelerPDF").on('click', function (e) {
|
|
e.preventDefault();
|
|
var url = '@Url.Action("DisplayLotTravlerPdf", "LotTraveler", new { ltLotID = "__id__", revisionNumber = "__revid__" })';
|
|
url = url.replace("__revid__", '@Model.LotTravCurrentRevision')
|
|
url = url.replace('amp;', '');
|
|
window.open(url.replace('__id__', '@Model.ID', '_blank'));
|
|
})
|
|
|
|
|
|
$("#BackToRequestID").on('click', function (e) {
|
|
|
|
e.preventDefault();
|
|
var url = '@Url.Action("Edit", "LotTraveler", new { IssueID = "__id__"})';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', $("#LTWorkRequestID").val());
|
|
})
|
|
|
|
$('#RevisionHistoryData').on('click', function () {
|
|
$("#RevisionHistoryWin").modal('show');
|
|
return false;
|
|
})
|
|
|
|
$(window).bind("beforeunload", function (e) {
|
|
//return confirm("Do you really want to close?");
|
|
var url;
|
|
$.ajax({
|
|
url: "/LotTraveler/ReleaseLockOnLotTravelerUpdateDoc",
|
|
type: "GET",
|
|
datatype: "json",
|
|
data: {
|
|
lotID: ("@Model.ID")
|
|
},
|
|
success: function () {
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
|
|
})
|
|
|
|
|
|
$("#UploadWRAttachment").on('click', function (e) {
|
|
e.preventDefault();
|
|
$("#WinAttachDocuments").modal('show');
|
|
})
|
|
|
|
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 = {
|
|
comments: $("#WRAttachmentComments").val(),
|
|
docType : $("#WRAttachDocType").data("kendoDropDownList").value()
|
|
|
|
};
|
|
}
|
|
|
|
@*function IdleTimeout() {
|
|
//window.location = logoutUrl;
|
|
var url = '@Url.Action("SpecialWorkRequest", "Home")';
|
|
window.location.href = url;
|
|
|
|
}*@
|
|
|
|
</script>
|