1425 lines
58 KiB
Plaintext
1425 lines
58 KiB
Plaintext
@model GODATA.Models.TicketAdministration_Dealer.TicketModel
|
|
|
|
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
|
<script>
|
|
function onAdditionalData1() {
|
|
return {
|
|
chassisBySearch: $("#ChassisNo").val() ,
|
|
ticketID: '@ViewBag.ticketId'
|
|
};
|
|
}
|
|
|
|
function onSelectChassis(e) {
|
|
var dataItem = this.dataItem(e.item.index());
|
|
dataItem.VehicleType != "" ? $("#VehicleType").val(dataItem.VehicleType) : $("#VehicleType").val("");
|
|
|
|
}
|
|
|
|
</script>
|
|
<div id="divTicketActivity">
|
|
@*Tickets Activity*@
|
|
|
|
<div class="OpenCloseTicketActivity">
|
|
@using (Ajax.BeginForm("TicketAdministration_UpdateTicketOpenClose", "TicketAdministration_Dealer", new AjaxOptions
|
|
{ HttpMethod = "POST", OnBegin = "activeRequestCheck", OnSuccess = "onSuccessUpdateTicket" }))
|
|
{
|
|
@Html.ValidationSummary(true)
|
|
@Html.HiddenFor(model => model.TicketId)
|
|
@Html.HiddenFor(model => model.VehicleRegistrationNumber)
|
|
@Html.Hidden("defaultSlaTime", (object)@ViewBag.ticketDefaultSla)
|
|
//added on 01/09/2020
|
|
@Html.Hidden("cc", (object)@ViewBag.TicketStatus)
|
|
|
|
|
|
|
|
<div class="fleft size65 heighttable">
|
|
|
|
<table width="96%" cellspacing="0" cellpadding="0" border="0" class="TicketActivityFrom">
|
|
@foreach (var item in (List<GODATA.Models.TicketAdministration_Dealer.TicketOpenCloseModel>)ViewBag.TicketDetailsUpdate)
|
|
{
|
|
|
|
@Html.Hidden("assignedTo", item.AssignedTo)
|
|
@Html.Hidden("ticketStatusId", item.TicketStatus)
|
|
@Html.Hidden("TicketIdAlias", item.TicketIdAlias.ToString())
|
|
@Html.Hidden("JobCompleteResponseTime", item.TicketStatus.ToString())
|
|
@Html.Hidden("TicketstatusAlias", item.TicketStatus.ToString())
|
|
string EstimatedTimeForJobCompletion = ((item.EstimatedTimeForJobCompletion.ToString() == "0") ? "" : item.EstimatedTimeForJobCompletion.ToString());
|
|
var assignedUser = item.DealerOrVanName;
|
|
<tr style="display:none;"> <td><input type="hidden" id="AssignedTo" name="AssignedTo" value="@item.AssignedTo" /></td></tr>
|
|
<tr>
|
|
<td>
|
|
Ticket Id
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.TicketIdAlias, new { @id = "textTicketId" })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Created By
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.UsersUserName)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Assigned To
|
|
</td>
|
|
<td>
|
|
|
|
<span>@assignedUser</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Problem Description
|
|
</td>
|
|
<td>@Html.DisplayFor(modelItem => item.Description)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Estimated Time for Job Completion (In Min)
|
|
</td>
|
|
@if (item.AssignedTo == "dealer")
|
|
{
|
|
<td><span>NA</span></td>
|
|
|
|
}
|
|
else
|
|
{
|
|
<td>
|
|
@Html.DisplayFor(modelItem => EstimatedTimeForJobCompletion)
|
|
</td>
|
|
}
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Estimated Cost (In <span><img src="~/Content/css/images/rupee.png" style="margin-right: 2px; width: 7px; height: auto; margin-top: 2px;" /></span>)
|
|
</td>
|
|
@if (item.AssignedTo == "dealer")
|
|
{
|
|
<td><span>NA</span></td>
|
|
|
|
}
|
|
else
|
|
{
|
|
<td>@Html.DisplayFor(modelItem => item.RepairCost)</td>
|
|
}
|
|
</tr>
|
|
|
|
}
|
|
|
|
|
|
<tr>
|
|
<td>
|
|
Ticket Status
|
|
</td>
|
|
<td>
|
|
|
|
<select id="ddTicketStatus" name="TicketStatus" class="SelectDD" onchange="onChangeTicketStatus(this.value)">
|
|
@foreach (var item11 in (List<GODATA.Models.TicketAdministration_Dealer.TicketStatus>)ViewBag.TicketStatusList)
|
|
{
|
|
|
|
<option value="@item11.Id">@item11.Alias</option>
|
|
|
|
}
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
@*<tr id="trDealerVan" style="display:none;">
|
|
<td>
|
|
Dealer Van
|
|
</td>
|
|
<td>
|
|
|
|
<select id="ddDealerVan" name="ddDealerVan" class="SelectDD" onchange="onChangegetDealerInfo(this.value)">
|
|
</select>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>*@
|
|
|
|
@* <tr id="trvanname" style="display:none;">
|
|
<td>
|
|
Van Name
|
|
</td>
|
|
<td>
|
|
<input type="text" id="txtvanname" name="AssignedTo" value="" />
|
|
|
|
|
|
<input type="hidden" id="hdnvanid" value="" />
|
|
<input type="hidden" id="hdndevicealias" value="" />
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
<tr id="trVanReg" style="display:none;">
|
|
<td>
|
|
Van Registration Number
|
|
</td>
|
|
<td>
|
|
<input type="text" id="txtVanReg" name="AssignedTo" value="" />
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
<tr id="trVanno" style="display:none;">
|
|
<td>
|
|
Dealer Van contact number
|
|
</td>
|
|
|
|
<td>
|
|
<input type="text" id="txtVanno" name="AssignedTo" value="" />
|
|
</td>
|
|
|
|
|
|
|
|
</tr>*@
|
|
|
|
@*}*@
|
|
@if (@ViewBag.TicketStatus == 7)
|
|
{
|
|
<tr id="tr_reason">
|
|
<td>
|
|
Reason
|
|
</td>
|
|
<td>
|
|
<select id="ddReasonForOpportunityLost" name="OpportunityLost" class="SelectDD">
|
|
@foreach (var item12 in (List<GODATA.Models.DropDownData.OpportunityLostReasonsModel>)ViewBag.OpportunityLostReasonList)
|
|
{
|
|
<option value="@item12.ReasonName">@item12.ReasonName</option>
|
|
}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
}
|
|
|
|
<tr id="trpreclosurereason" style="display:none">
|
|
<td>
|
|
Pre Closure Reason
|
|
</td>
|
|
<td>
|
|
|
|
<select id="ddPreclosureReason" name="TicketStatus" class="SelectDD" onchange="onpreclosurereasonchange();">
|
|
</select>
|
|
<span id="spanddPreclosureReason" class="error" style="display: none; color: red">*</span>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="tr_delay_reason" style="display: none;">
|
|
<td>
|
|
Delay Reason
|
|
</td>
|
|
<td colspan="1" style="padding-left: 10px;">
|
|
<input id="txtDelayReason" readonly="readonly" style="width: 250px;height: 25px !important;" type="text" value="" class="valid">
|
|
<span id="spanDelayReason" style="display: none;"/>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="tr_chassisNumber" style="display: none;">
|
|
<td>
|
|
<span id='tdchassis'>Chassis Number</span>
|
|
</td>
|
|
<td>
|
|
@(Html.Kendo().AutoComplete()
|
|
.Name("ChassisNo")
|
|
.DataTextField("ChassisNo")
|
|
.Filter("contains")
|
|
.MinLength(4)
|
|
.HtmlAttributes(new { style = "width:169px !important" })
|
|
.Events(e => { e.Select("onSelectChassis"); })
|
|
.DataSource(source =>
|
|
{
|
|
source.Read(read =>
|
|
{
|
|
read.Action("GetChassisNoByEOSApiSearch", "TicketAdministration_Dealer")
|
|
.Data("onAdditionalData1");
|
|
})
|
|
.ServerFiltering(true);
|
|
})
|
|
)
|
|
@* @Html.TextBoxFor(model => model.ChassisNo)*@
|
|
<span id="btnChassisNo" onclick="editChassisNo()">
|
|
<img id="imgChassisNo" src="~/Content/css/images/edit-enable.png" />
|
|
</span><!--edit-disable-->
|
|
<span id="spanChassisNo" class="error" style="display: none; color: red">*</span>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="tr_VehicleType" style="display: none;">
|
|
<td>
|
|
Vehicle Type
|
|
</td>
|
|
<td colspan="1" style="padding-left: 10px;">
|
|
@Html.TextBoxFor(model => model.VehicleType, new { @readonly = "readonly", @style = "width: 170px;height: 25px !important;" })
|
|
|
|
|
|
<div class="fleft" style="float: right;margin-right: 45px; margin-top: 10px;">
|
|
<input id="button_chassisSubmit" type="button" value="Submit" class="button_blue" onclick="getOdoMeterReading()" style="margin-top: 0; width: auto !important; margin-left: 10px; height: 26px; line-height: 10px;margin-bottom: 3px;" />
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr id="tr_PrevOdometerReading" style="display: none;">
|
|
<td>
|
|
@* <span id="prevOdometerTipper" style="display: none;">Tipper Engine Hrs</span>*@
|
|
<span id="">Tipper Engine Hrs/Haulage KM Reading</span>
|
|
</td>
|
|
<td colspan="1" style="padding-left: 10px;">
|
|
@Html.TextBoxFor(model => model.PreviousOdometerReading, new { @readonly = "readonly", @style = "width: 170px;height: 25px !important;", @onkeypress = "return IsNumeric(event);" })
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="tr_OdometerReading" style="display: none;">
|
|
<td>
|
|
Odometer Reading
|
|
</td>
|
|
<td colspan="1" style="padding-left: 10px;">
|
|
@Html.TextBoxFor(model => model.OdometerReading, new { @style = "width: 170px;height: 25px !important;", @onkeypress = "return IsNumeric(event);" })
|
|
@Html.ValidationMessageFor(model => model.OdometerReading)
|
|
<span id="spanOdometerReading" class="error" style="display: none; color: red">*</span>
|
|
</td>
|
|
</tr>
|
|
<tr id="trRemarks">
|
|
<td>
|
|
Remarks
|
|
</td>
|
|
<td colspan="1" style="padding-left: 10px;">
|
|
|
|
@Html.TextAreaFor(model => model.SuggestionComment, new { @id = "textBoxDescription", cols = 50, @rows = 5, style = "min-height : 65px" })
|
|
@Html.ValidationMessageFor(model => model.SuggestionComment)
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="fleft">
|
|
<input id="button_submit" type="submit" value="Update" class=" button_blue" style="margin-top: 0; width: auto !important; margin-left: 10px; height: 26px; line-height: 10px;" />
|
|
</div>
|
|
@*if (ViewBag.TicketStatus == 6) added on 26-03-2020 for dealer to reassign*@
|
|
@if (ViewBag.TicketStatus == Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["Declined"]))
|
|
{
|
|
|
|
<div class="fleft ">
|
|
<input id="button_reassign" type="button" value="Reassign" class="button_blue" onclick="reassignTicket()" style="margin-top: 0; width: auto !important; margin-left: 10px; height: 26px; line-height: 10px;" />
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
<div class="clear"></div>
|
|
@*</fieldset>*@
|
|
@*</form>*@
|
|
</div>
|
|
|
|
}
|
|
<div class="fright size35 withstatusbar" style="overflow-y: auto; position: absolute; right: 0; height: 93%; border-left: 1px solid #dedede;">
|
|
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
@*open ticket activity*@
|
|
@*if (item.TicketStatus != 5)
|
|
{*@
|
|
@if (ViewBag.OpenTicketActivity != null)
|
|
{
|
|
if (ViewBag.OpenTicketActivity.Count > 0)
|
|
{
|
|
int counter = 1;
|
|
foreach (var item11 in (List<GODATA.Models.TicketAdministration_Dealer.OpenTicketActivityDetails>)ViewBag.OpenTicketActivity)
|
|
{
|
|
|
|
string imgSource = "";
|
|
string addBackgroundClass = "";
|
|
if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["assignedAlias"])
|
|
{
|
|
imgSource = "imgAccept";
|
|
addBackgroundClass = "AssignedTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["InProgressAlias"])
|
|
{
|
|
imgSource = "imgReached";
|
|
addBackgroundClass = "InProgressTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["PreClousereAlias"])
|
|
{
|
|
imgSource = "imgResolved";
|
|
addBackgroundClass = "PreClouserTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["DeclinedAlias"])
|
|
{
|
|
imgSource = "imgDeclined";
|
|
addBackgroundClass = "DeclinedTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["NewAlias"])
|
|
{
|
|
imgSource = "imgNew";
|
|
addBackgroundClass = "NewTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["ClosedAlias"])
|
|
{
|
|
imgSource = "imgClose";
|
|
addBackgroundClass = "CloseTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["OpportunityLost"])
|
|
{
|
|
imgSource = "imgOpportunityLost";
|
|
addBackgroundClass = "OpportunityLostTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["TripEnd"])
|
|
{
|
|
imgSource = "imgTripEnd";
|
|
addBackgroundClass = "";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["TripStart"])
|
|
{
|
|
imgSource = "imgTripStart";
|
|
addBackgroundClass = "tripStartTicket";
|
|
}
|
|
<tr>
|
|
<td>
|
|
<div class="CommonTicket fleft @addBackgroundClass" id="divOpenTicketActivity'@counter'">
|
|
<div>
|
|
<label><span id="spanOpenDate'@counter'">@Html.DisplayFor(modelItem => item11.ActivityTicketsOpenCreationTime)</span></label>
|
|
</div>
|
|
<div>
|
|
<label><span id="spanOpenCreated'@counter'">@Html.DisplayFor(modelItem => item11.ActivityTicketsOpenCreatedBy)</span></label>
|
|
</div>
|
|
<div>
|
|
<label><span id="spanOpenDescription'@counter'">@Html.DisplayFor(modelItem => item11.Remarks)</span></label>
|
|
</div>
|
|
<div>
|
|
<img src="@System.Configuration.ConfigurationManager.AppSettings[imgSource]" style="vertical-align: middle; margin-right: 10px; margin-left: -2px;" />
|
|
<span>
|
|
<span id="spanOpenStatus'@counter'">@Html.DisplayFor(modelItem => item11.TicketStatusAlias)</span>
|
|
</span>
|
|
<span>
|
|
<span>@Html.DisplayFor(modelItem => item11.Id)</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
}
|
|
//close ticket activity
|
|
else
|
|
{
|
|
if (ViewBag.CloseTicketActivity.Count > 0)
|
|
{
|
|
int counter = 1;
|
|
foreach (var item11 in (List<GODATA.Models.TicketAdministration_Dealer.CloseTicketActivityDetails>)ViewBag.CloseTicketActivity)
|
|
{
|
|
|
|
string imgSource = "";
|
|
string addBackgroundClass = "";
|
|
if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["assignedAlias"])
|
|
{
|
|
imgSource = "imgAccept";
|
|
addBackgroundClass = "AssignedTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["InProgressAlias"])
|
|
{
|
|
imgSource = "imgReached";
|
|
addBackgroundClass = "InProgressTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["PreClousereAlias"])
|
|
{
|
|
imgSource = "imgResolved";
|
|
addBackgroundClass = "PreClouserTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["DeclinedAlias"])
|
|
{
|
|
imgSource = "imgDeclined";
|
|
addBackgroundClass = "DeclinedTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["NewAlias"])
|
|
{
|
|
imgSource = "imgNew";
|
|
addBackgroundClass = "NewTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["ClosedAlias"])
|
|
{
|
|
imgSource = "imgClose";
|
|
addBackgroundClass = "CloseTicket";
|
|
}
|
|
else if (item11.TicketStatusAlias == System.Configuration.ConfigurationManager.AppSettings["OpportunityLost"])
|
|
{
|
|
imgSource = "imgOpportunityLost";
|
|
addBackgroundClass = "OpportunityLostTicket";
|
|
}
|
|
|
|
<tr>
|
|
<td>
|
|
<div class="CommonTicket fleft @addBackgroundClass" id="divCloseTicketActivity'@counter'">
|
|
<div>
|
|
<label><span id="spanCloseDate'@counter'">@Html.DisplayFor(modelItem => item11.ActivityTicketsCloseCreationTime)</span></label>
|
|
</div>
|
|
<div>
|
|
<label><span id="spanCloseCreated'@counter'">@Html.DisplayFor(modelItem => item11.ActivityTicketsCloseCreatedBy)</span></label>
|
|
</div>
|
|
<div>
|
|
<label><span id="spanCloseDescription'@counter'">@Html.DisplayFor(modelItem => item11.Remarks)</span></label>
|
|
</div>
|
|
<div>
|
|
<img src="@System.Configuration.ConfigurationManager.AppSettings[imgSource]" style="vertical-align: middle; margin-right: 10px; margin-left: -2px;" />
|
|
<span>
|
|
<span id="spanCloseStatus'@counter'">@Html.DisplayFor(modelItem => item11.TicketStatusAlias)</span>
|
|
</span>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
}
|
|
</table>
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
<input type="hidden" id="hiddenDescription" />
|
|
</div>
|
|
<div class="statusbar" style="background: #F7F7F7;">
|
|
<table class="LegendTbl" width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
<div class="legendcolorbox Assignedbg"></div>
|
|
</td>
|
|
<td>@System.Configuration.ConfigurationManager.AppSettings["assignedAlias"]</td>
|
|
<td>
|
|
<div class="legendcolorbox NewTicketbg"></div>
|
|
</td>
|
|
<td>@System.Configuration.ConfigurationManager.AppSettings["NewAlias"]</td>
|
|
<td>
|
|
<div class="legendcolorbox CloseTicketbg"></div>
|
|
</td>
|
|
<td>@System.Configuration.ConfigurationManager.AppSettings["ClosedAlias"]</td>
|
|
<td>
|
|
<div class="legendcolorbox ProgressTicketbg"></div>
|
|
</td>
|
|
<td>@System.Configuration.ConfigurationManager.AppSettings["InProgressAlias"]</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div class="legendcolorbox PreclouserTicketbg"></div>
|
|
</td>
|
|
<td>@System.Configuration.ConfigurationManager.AppSettings["PreClousereAlias"]</td>
|
|
<td>
|
|
<div class="legendcolorbox DeclineTicketbg"></div>
|
|
</td>
|
|
<td>@System.Configuration.ConfigurationManager.AppSettings["DeclinedAlias"]</td>
|
|
<td>
|
|
<div class="legendcolorbox OpportunityLostbg"></div>
|
|
</td>
|
|
<td>@System.Configuration.ConfigurationManager.AppSettings["OpportunityLost"]</td>
|
|
@*<td><div class="legendcolorbox Notacceptedbg"></div></td>
|
|
<td>color8</td>*@
|
|
</tr>
|
|
</table>
|
|
<div id="divCreateDealer" style="display: block; /*min-height: 150px; height: auto; */">
|
|
</div>
|
|
<div id="divEditRegno" style="display: block; /*min-height: 150px; height: auto; */">
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$("#divTicketActivity").parent().addClass("RemoveScroll")
|
|
|
|
var vRegistrationNo = '@ViewBag.VRegistrationNo';
|
|
|
|
$("#ddTicketStatus").val('@ViewBag.TicketStatus');
|
|
|
|
|
|
|
|
|
|
if (document.getElementById('tr_reason')) {
|
|
$("#ddReasonForOpportunityLost").val('@ViewBag.OpportunityLossReason');
|
|
$("#ddReasonForOpportunityLost").prop('title', '@ViewBag.OpportunityLossReason');
|
|
}
|
|
|
|
$("#textBoxDescription").val(stringToDecode('@ViewBag.DescriptionMultiline', "hiddenDescription"));
|
|
|
|
$("#textBoxDescription").prop('title', stringToDecode('@ViewBag.DescriptionMultiline', "hiddenDescription"));
|
|
$("#ChassisNo").val('@ViewBag.ChassisNo');
|
|
$("#OdometerReading").val('@ViewBag.OdometerReading');
|
|
$("#VehicleRegistrationNumber").val('@ViewBag.VRegistrationNo');
|
|
|
|
/// ====================== Odometer case
|
|
$("#VehicleType").val('@ViewBag.VehicleType')
|
|
$("#PreviousOdometerReading").val('@ViewBag.PreviousOdometerReading')
|
|
|
|
var autocomplete = $("#ChassisNo").data("kendoAutoComplete");
|
|
autocomplete.readonly(true);
|
|
$("#ChassisNo").addClass("disableText");
|
|
|
|
function editChassisNo() {
|
|
// var autocomplete = $("#ChassisNo").data("kendoAutoComplete");
|
|
autocomplete.readonly(false);
|
|
$("#ChassisNo").removeClass("disableText");
|
|
//$("#ChassisNo").attr('readonly', false).css({ "background-color": "#fcfcfc" });
|
|
$("#imgChassisNo").attr("src", "../../Content/css/images/edit-disable.png");
|
|
|
|
}
|
|
function onpreclosurereasonchange() {
|
|
//alert('aa');
|
|
$("#divCreateDealer").html('');
|
|
|
|
var dvdelayreason="<div class=\"delay-list\"> <div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Customer Approval/Payment Delay\">";
|
|
dvdelayreason+="<div class=\"icon icon-customer\"><span class=\"icons icon-customer-approval\"></span></div>";
|
|
dvdelayreason+="<span class=\"code-letter\">C</span><span class=\"delay-text\">Customer Approval/Payment Delay</span></div>";
|
|
|
|
dvdelayreason+="<div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Parts Not Available\">";
|
|
dvdelayreason+="<div class=\"icon icon-parts\"><span class=\"icons icon-parts-not-available\"></span></div>";
|
|
dvdelayreason+="<span span class=\"code-letter\">P</span><span class=\"delay-text\">Parts Not Available</span></div>";
|
|
|
|
|
|
dvdelayreason+="<div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Resource Not available (Van/Tab/ Tools)\">";
|
|
dvdelayreason+="<div class=\"icon icon-resource\"><span class=\"icons icon-resources-not-available\"></span></div>";
|
|
dvdelayreason+="<span class=\"code-letter\">R</span><span class=\"delay-text\">Resource Not Available (Van/Tab/ Tools)</span></div>";
|
|
|
|
|
|
dvdelayreason+="<div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Technician Not Available\">";
|
|
dvdelayreason+="<div class=\"icon icon-technician\"><span class=\"icons icon-technician-not-available\"></span></div>";
|
|
dvdelayreason+="<span class=\"code-letter\">T</span><span class=\"delay-text\">Technician Not Available</span></div>";
|
|
|
|
|
|
dvdelayreason+="<div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Outside/Ancillary/Misc. Job\">";
|
|
dvdelayreason+="<div class=\"icon icon-outside\"><span class=\"icons icon-outside-ancillairy-miscjob\"></span></div>";
|
|
dvdelayreason+="<span class=\"code-letter\">O</span><span class=\"delay-text\">Outside/Ancillary/Misc. Job</span></div>";
|
|
|
|
|
|
dvdelayreason+="<div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Major Repairing Work\">";
|
|
dvdelayreason+=" <div class=\"icon icon-repair\"><span class=\"icons icon-major-reparing-work\"></span></div>";
|
|
dvdelayreason+=" <span class=\"code-letter\">M</span><span class=\"delay-text\">Major Repairing Work</span></div>";
|
|
|
|
|
|
dvdelayreason+="<div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Float Not Available\">";
|
|
dvdelayreason+="<div class=\"icon icon-float\"><span class=\"icons icon-float-not-available\"></span></div>";
|
|
dvdelayreason+="<span class=\"code-letter\">F</span><span class=\"delay-text\">Float Not Available</span></div>";
|
|
|
|
|
|
|
|
dvdelayreason+="<div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Diagnostics Delay\">";
|
|
dvdelayreason+="<div class=\"icon icon-diagnostic\"><span class=\"icons icon-diagonistics-delay\"></span></div>";
|
|
dvdelayreason+="<span class=\"code-letter\">D</span> <span class=\"delay-text\">Diagnostics Delay</span> </div>";
|
|
|
|
|
|
|
|
dvdelayreason+="<div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Law & Order Situation Caused Delay\">";
|
|
dvdelayreason+="<div class=\"icon icon-law\"><span class=\"icons icon-Law-order-situation-caused\"></span></div>";
|
|
dvdelayreason+="<span class=\"code-letter\">L</span><span class=\"delay-text\">Law & Order Situation Caused Delay</span></div>";
|
|
|
|
dvdelayreason+="<div class=\"delay-item\"><input type=\"radio\" class=\"radio-input\" name=\"delay\" value=\"Gate Pass Issues At Customer End\">";
|
|
dvdelayreason+="<div class=\"icon icon-gate\"><span class=\"icons icon-gate-pass-issues\"></span></div>";
|
|
dvdelayreason+="<span class=\"code-letter\">G</span><span class=\"delay-text\">Gate Pass Issues At Customer End</span></div>";
|
|
|
|
dvdelayreason+="<input type=\"button\" class=\"button_blue fleft\" style=\"width:auto;\" onclick=\"savedelayreason();\" value=\"Submit\" /></div>";
|
|
|
|
|
|
// var ass_to = $('#JobCompleteResponseTime').val();
|
|
var ass_to = $('#assignedTo').val();
|
|
var tid= $('#TicketId').val();
|
|
//alert(tid);
|
|
//alert(tid);
|
|
var ddlval = $('#ddPreclosureReason').val();
|
|
var apiurl=url + "Api/DelayReason?&ticketId="+tid;
|
|
|
|
//alert(apiurl);
|
|
$('#JobCompleteResponseTime').val('');
|
|
if (ddlval == 'Closure Request') {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: apiurl,
|
|
|
|
success: function (data) {
|
|
//alert(data);
|
|
if (data == 'true') {
|
|
|
|
isdelayreason='t';
|
|
// alert('aa1');
|
|
//$("#divCreateDealer").parent().html('');
|
|
if ($("#divCreateDealer").length) {
|
|
$("#divCreateDealer").closest("div").hide(); // Hides the nearest parent div
|
|
}
|
|
addKendoWindowToDiv("#divCreateDealer", "Delay Reason", "833px", 385);
|
|
//open form in new dialog box
|
|
$("#divCreateDealer").show();
|
|
$("#divCreateDealer").parent().addClass("responsive_popup"); //addClass for respond the menu
|
|
$("#divCreateDealer").parent().addClass("k-window2");
|
|
$("#divCreateDealer").html(dvdelayreason);
|
|
SetKendoWindowTitle("#divCreateDealer", "Delay Reason");
|
|
//open form in new dialog box
|
|
$("#divCreateDealer").data("kendoWindow").open();
|
|
openKendoWindowInCenter("#divCreateDealer");
|
|
$('#divCreateDealer').parent().width(500);
|
|
}
|
|
else {
|
|
// alert('if');
|
|
$('#JobCompleteResponseTime').val(ass_to + ',' + $('#ddPreclosureReason').val());
|
|
|
|
}
|
|
}
|
|
});
|
|
}
|
|
else {
|
|
$('#JobCompleteResponseTime').val(ass_to + ',' + $('#ddPreclosureReason').val());
|
|
}
|
|
}
|
|
var precloseval = "";
|
|
var preclosevalreason = "";
|
|
function savedelayreason() {
|
|
var spnreason=$('input[name="delay"]:checked').val();
|
|
//alert(spnreason);
|
|
if(spnreason ==""|| spnreason == undefined){
|
|
//alert('if');
|
|
jAlert("Please Enter Delay Reason", 'Message');
|
|
return false;
|
|
}
|
|
else{
|
|
$('#spanDelayReason').html('');
|
|
//alert($("#assignedTo").val());
|
|
// alert($('input[name="delay"]:checked').val());
|
|
var newvl = $("#assignedTo").val() + ',' + $('#ddPreclosureReason').val() + ',' + $('input[name="delay"]:checked').val();
|
|
// alert(newvl);
|
|
|
|
|
|
$('#tr_delay_reason').show();
|
|
$('#txtDelayReason').show();
|
|
$('#spanDelayReason').html($('input[name="delay"]:checked').val());
|
|
$('#txtDelayReason').val($('input[name="delay"]:checked').val());
|
|
$('#JobCompleteResponseTime').val(newvl);
|
|
closeWindow("#divCreateDealer")
|
|
}
|
|
|
|
}
|
|
function closeWindow(divId) {
|
|
|
|
$(divId).data("kendoWindow").close();
|
|
}
|
|
/* Check opportunity lost or preclosure or in progress ticket status */
|
|
function getpreclosureval(){
|
|
$("#divCreateDealer").html('');
|
|
$.ajax({
|
|
type: "Post",
|
|
url: url + "Api/Activity?preClose=yes&preClosereason=get",
|
|
data: { Token: securityToken, TicketId: $('#TicketIdAlias').val() },
|
|
success: function (data) {
|
|
|
|
var val = data.split(",");
|
|
precloseval = val[0];
|
|
preclosevalreason = val[1];
|
|
//alert(preclosevalreason);
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
/* Check opportunity lost or preclosure or in progress ticket status */
|
|
function onChangeTicketStatus(ticketStatus) {
|
|
$("#trRemarks").show();
|
|
|
|
|
|
$('#tr_delay_reason').hide();
|
|
$("#button_submit").show();
|
|
if (ticketStatus == 6) {
|
|
|
|
$("#button_reassign").hide();
|
|
|
|
}
|
|
if (ticketStatus == "11") {
|
|
|
|
$("#trRemarks").hide();
|
|
$("#button_submit").hide();
|
|
showvanreassign();
|
|
|
|
// alert('if');
|
|
// updateAllocatedStatus()
|
|
}
|
|
|
|
|
|
$('#trpreclosurereason').hide();
|
|
if($('#ticketStatusId').val() ==ticketStatus){
|
|
}else{
|
|
$('#textBoxDescription').val('');
|
|
}
|
|
var ticketStatusId = ticketStatus;
|
|
var htmldrop = "<option>Select</option>";
|
|
getpreclosureval();
|
|
if (ticketStatusId == 4) {
|
|
var apiUrl = url + "Api/Admin?getpreclosure=yes&dropdown=test&option=yes";
|
|
$.ajax({
|
|
url: apiUrl,
|
|
type: 'POST',
|
|
success: function (data) {
|
|
if (data) {
|
|
|
|
for (var counter = 0; counter < data.length; counter++) {
|
|
|
|
htmldrop += "<option>" + data[counter].Name + "</option>";
|
|
}
|
|
}
|
|
// alert(htmldrop);
|
|
var ass_to = $('#AssignedTo').val();
|
|
$('#ddPreclosureReason').html('');
|
|
|
|
$('#ddPreclosureReason').append(htmldrop);
|
|
// setTimeout(function () {
|
|
// alert($('#ticketStatusId').val());
|
|
setTimeout(function () {
|
|
if ($('#ticketStatusId').val() == "4") {
|
|
$('#ddPreclosureReason').attr("disabled", "disabled");
|
|
$('#ddPreclosureReason').val(precloseval);
|
|
//alert(preclosevalreason);
|
|
if (preclosevalreason == "") {
|
|
// alert('if');
|
|
}
|
|
else {
|
|
$('#tr_delay_reason').show();
|
|
$('#txtDelayReason').show();
|
|
$('#txtDelayReason').val(preclosevalreason);
|
|
$('#spanDelayReason').val(preclosevalreason);
|
|
}
|
|
}
|
|
else {
|
|
|
|
}
|
|
}, 1000);
|
|
|
|
// $('#ddPreclosureReason').append(precloseval);
|
|
//}, 500);
|
|
|
|
$('#trpreclosurereason').show();
|
|
|
|
},
|
|
complete: function () {
|
|
|
|
},
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
}
|
|
});
|
|
}
|
|
|
|
// $("#tr_chassisNumber,#tr_OdometerReading,#tr_VehicleType,#tr_PrevOdometerReading").hide();
|
|
$("#textRepairCost, #textEstmtTime, #tr_reason,#tr_reason_type, #tr_closeReason, #spanReasonForcloseTicketmorethan24Hrs, #tr_chassisNumber,#tr_OdometerReading,#tr_VehicleType,#tr_PrevOdometerReading").hide();
|
|
var ticketStatusId = ticketStatus;
|
|
|
|
|
|
if (ticketStatusId == 4) {
|
|
checkPreclousre(ticketStatusId);
|
|
}
|
|
//if opprtunity lost
|
|
|
|
}
|
|
var isdelayreason='f';
|
|
function checkPreclousre(ticketStatus) {
|
|
|
|
var ticketStatusId = ticketStatus;
|
|
if ($("#OdometerReading").val() == 0) {
|
|
$("#OdometerReading").val("")
|
|
}
|
|
if ($("#ChassisNo").val() != "") {
|
|
|
|
// $("#ChassisNo").attr('readonly', true).css({ "background-color": "#e0d8d8" });
|
|
$("#imgChassisNo").attr("src", "./../Content/css/images/edit-enable.png");
|
|
|
|
|
|
}
|
|
else {
|
|
// $("#ChassisNo").attr('readonly', false).css({ "background-color": "#fcfcfc" });
|
|
$("#imgChassisNo").attr("src", "../../Content/css/images/edit-disable.png");
|
|
}
|
|
if (ticketStatusId == 4) {
|
|
|
|
$("#PreviousOdometerReading").val('@ViewBag.PreviousOdometerReading')
|
|
|
|
$("#tr_chassisNumber,#tr_OdometerReading,#tr_VehicleType,#tr_PrevOdometerReading,#tr_VehicleType,#tr_PrevOdometerReading").show();
|
|
}
|
|
else {
|
|
$("#tr_chassisNumber,#tr_OdometerReading,#trVehicleType,#tr_PrevOdometerReading,#tr_VehicleType,#tr_PrevOdometerReading").hide();
|
|
}
|
|
}
|
|
$(document).ready(function () {
|
|
//document.getElementById('ddTicketStatus').disabled = true;
|
|
var IsEPS ='no';
|
|
setTimeout(function () {
|
|
|
|
|
|
var myString=$('#TicketIdAlias').val();
|
|
console.log(myString);
|
|
if (myString.includes("P")) {
|
|
$('#tdchassis').html('Engine Number');
|
|
|
|
|
|
}
|
|
}, 2000);
|
|
var myString = $('#TicketIdAlias').val();
|
|
if (myString.includes("P")) {
|
|
|
|
IsEPS = 'yes'
|
|
|
|
}
|
|
|
|
onChangeTicketStatus('@ViewBag.TicketStatus');
|
|
if (IsEPS == 'no') {
|
|
var autocomplete = $("#ChassisNo").data("kendoAutoComplete");
|
|
autocomplete.value('@ViewBag.ChassisNo');
|
|
}
|
|
else {
|
|
$("#ChassisNo").val('@ViewBag.ChassisNo');
|
|
$("#VehicleType").val('EPS')
|
|
}
|
|
});
|
|
|
|
|
|
//$(document).ready(function () {
|
|
// if ($("#ticketStatusId").val() == 4) {
|
|
// console.log("if 4");
|
|
// setTimeout(function () { $("#button_submit").hide(); }, 1000 * .5);
|
|
// }
|
|
//});
|
|
var xhr_activeRequestCheck;
|
|
|
|
var _assignedTo = $("#assignedTo").val();
|
|
|
|
/**
|
|
* Function call to check if any active request
|
|
*/
|
|
function activeRequestCheck(xhr) {
|
|
if ($("#ddTicketStatus").val() == "12") {
|
|
var tid = $('#TicketIdAlias').val();
|
|
// alert(tid);
|
|
updateAllocatedStatus(tid, $("#ddTicketStatus").val());
|
|
return false;
|
|
}
|
|
if ($("#ddTicketStatus").val() == "11") {
|
|
|
|
var tid = $('#TicketId').val();
|
|
// alert('11');
|
|
updateAssignVan(tid);
|
|
return false;
|
|
}
|
|
if($("#ticketStatusId").val() =="9"){
|
|
if ($("#ddTicketStatus").val() == "4"){
|
|
// alert('preclosure');
|
|
jAlert("Please update Van reached status from EOS app for updating comments in “Pre Closure” Status", 'Message');
|
|
return false;
|
|
}
|
|
}
|
|
if ($("#ddTicketStatus").val() == "4") {
|
|
|
|
if ($('#ddPreclosureReason').val().toLowerCase() == "select") {
|
|
jAlert("Please enter Pre Closure reason", 'Message');
|
|
return false;
|
|
$("#spanddPreclosureReason").show();
|
|
return false;
|
|
//return false;
|
|
|
|
}
|
|
|
|
else{
|
|
if ($('#ddPreclosureReason').val().toLowerCase() == 'closure request') {
|
|
var spnreason=$('#spanDelayReason').html();
|
|
//alert(spnreason);
|
|
if(spnreason ==""){
|
|
if(isdelayreason =='t'){
|
|
jAlert("Please Enter Delay Reason", 'Message');
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (($("#ChassisNo").val().length < 4)) {
|
|
$("#spanChassisNo").show();
|
|
return false;
|
|
}
|
|
else if (($("#OdometerReading").val() == "")) {
|
|
$("#spanOdometerReading").show();
|
|
return false;
|
|
}
|
|
|
|
|
|
// case handle here for vehicle type and prev odometer
|
|
if ($("#VehicleType").val() == "" || $("#VehicleType").val() == undefined || $("#VehicleType").val() == null) {
|
|
// sow msg -
|
|
jAlert("Please select chassis and press submit button to identify Vehicle Type", 'Message');
|
|
return false;
|
|
}
|
|
|
|
//$("#PreviousOdometerReading") $("#OdometerReading")
|
|
// now odo sholuld be greater than prv odometer
|
|
if (parseFloat($("#OdometerReading").val()) < parseFloat($("#PreviousOdometerReading").val())) {
|
|
// sow msg - Odometer Reading should be greater than Tipper/Haulage Reading.
|
|
jAlert("Odometer Reading should be greater than Tipper/Haulage Reading.", 'Message');
|
|
return false;
|
|
}
|
|
|
|
}
|
|
return true;
|
|
//}
|
|
}
|
|
|
|
var xhr_updateTicket, xhr_getOdometer;
|
|
|
|
/**
|
|
* Function call on success of update ticket
|
|
*/
|
|
function onSuccessUpdateTicket(data) {
|
|
// alert(data.success);
|
|
if (data.success == true) {
|
|
|
|
var showMsg = "";
|
|
isalertclose=true;
|
|
var complaintNo = data.ticketId;
|
|
var ticketStatus = data.ticketStatus;
|
|
setTimeout(function () {
|
|
$("#" + complaintNo).trigger("click");
|
|
}, 500);
|
|
//if (data.ticketStatus == 2 || data.ticketStatus == 3) {
|
|
// alert('aa');
|
|
//}
|
|
if (data.ticketStatus == 4) {
|
|
var assignedTo = $('#assignedTo').val();
|
|
jAlert("Ticket updated successfully", 'Message');
|
|
if(allocatedclick == 'yes'){
|
|
//alert('allocatedclick');
|
|
tstatus="allocated";
|
|
// alert(complaintNo);
|
|
// selectedTicket=storedid;
|
|
$("#tabMyAllocatedTickets").trigger('click');
|
|
|
|
// setTimeout(function() { $("#" + complaintNo).trigger("click");
|
|
//}, 500);
|
|
}
|
|
else{
|
|
var myString=$('#TicketIdAlias').val();
|
|
console.log(myString);
|
|
if (myString.includes("P")) {
|
|
tstatus="EPS";
|
|
console.log(tstatus);
|
|
// setTimeout(function() { $("#" + complaintNo).trigger("click");
|
|
//}, 500);
|
|
}
|
|
else if(assignedTo == 'dealer'){
|
|
|
|
// ("#tabMyTickets").trigger('click');
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/TicketAdministration_Dealer/TicketAdministrationDealer_GetTicketHistory/",
|
|
data: { assignedToType: assignedTo },
|
|
success: function (data) {
|
|
// console.log(data);
|
|
|
|
if (data) {
|
|
$("#divDealerOpenCloseTickets").html("");
|
|
$("#divDealerOpenCloseTickets").html(data);
|
|
$("#divMapDetail").removeClass("display_none");
|
|
}
|
|
}
|
|
});
|
|
setTimeout(function() { $("#" + complaintNo).trigger("click");
|
|
|
|
},3500);
|
|
}
|
|
else if(assignedTo == 'van'){
|
|
//("#tabMyVansTickets").trigger('click');
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/TicketAdministration_Dealer/TicketAdministrationDealer_GetTicketHistory/",
|
|
data: { assignedToType: assignedTo },
|
|
success: function (data) {
|
|
// console.log(data);
|
|
|
|
if (data) {
|
|
$("#divDealerOpenCloseTickets").html("");
|
|
$("#divDealerOpenCloseTickets").html(data);
|
|
$("#divMapDetail").removeClass("display_none");
|
|
}
|
|
}
|
|
});
|
|
setTimeout(function() { $("#" + complaintNo).trigger("click");
|
|
}, 3500);
|
|
}
|
|
|
|
}
|
|
}
|
|
else{
|
|
if (data.ticketStatus == 5) {
|
|
if (data.message != null && data.message != "")
|
|
showMsg = CREATE_TICKET_MESSAGES.updateTicketSuccess + " Job Card Status - " + data.message;
|
|
else
|
|
showMsg = CREATE_TICKET_MESSAGES.updateTicketSuccess;
|
|
}
|
|
else {
|
|
showMsg = CREATE_TICKET_MESSAGES.updateTicketSuccess;
|
|
}
|
|
|
|
if (data.ticketStatus == 3 || data.ticketStatus == 2) {
|
|
var myString = $('#TicketIdAlias').val();
|
|
console.log(complaintNo);
|
|
if (myString.includes("P")) {
|
|
tstatus = "EPS";
|
|
_assignedTo = tstatus;
|
|
console.log(tstatus);
|
|
|
|
$("#tabMyEPSTickets").trigger('click');
|
|
setTimeout(function () {
|
|
//alert(complaintNo);
|
|
$("#" + complaintNo).trigger("click");
|
|
}, 3500);
|
|
}
|
|
}
|
|
else {
|
|
//jAlert('Ticket updated successfully', 'Message', function () {
|
|
jAlert(showMsg, 'Message', function () {
|
|
if (xhr_updateTicket && xhr_updateTicket.readystate != 4) {
|
|
xhr_updateTicket.abort();
|
|
}
|
|
xhr_updateTicket = $.ajax({
|
|
type: "POST",
|
|
url: "/TicketAdministration_Dealer/TicketAdministrationDealer_GetTicketHistory/",
|
|
data: { assignedToType: _assignedTo },
|
|
success: function (data) {
|
|
// console.log(data);
|
|
|
|
if (data) {
|
|
$("#divDealerOpenCloseTickets").html("");
|
|
$("#divDealerOpenCloseTickets").html(data);
|
|
$("#divMapDetail").removeClass("display_none");
|
|
if (ticketStatus == 5 || ticketStatus == 7) {
|
|
//console.log(ticketStatus);
|
|
if (document.getElementById('tableCloseTicketHistory')) {
|
|
// console.log(complaintNo);
|
|
// $("#tableCloseTicketHistory > tbody > tr[id=" + complaintNo + "]").trigger("click");
|
|
|
|
$("#tableTicketHistory > tbody > tr.select > td").removeClass("SelectRow");
|
|
$("#tableTicketHistory > tbody > tr").removeClass("select");
|
|
$("#tableCloseTicketHistory > tbody > tr.select > td").removeClass("SelectRow");
|
|
$("#tableCloseTicketHistory > tbody > tr").removeClass("select");
|
|
$("#tableCloseTicketHistory > tbody > tr[id=" + complaintNo + "]").addClass('select');
|
|
$("#tableCloseTicketHistory > tbody > tr[id=" + complaintNo + "].select > td").addClass('SelectRow');
|
|
$("#labelActivity").trigger('click');
|
|
}
|
|
}
|
|
else {
|
|
|
|
$("#tableTicketHistory > tbody > tr[id=" + complaintNo + "]").trigger("click");
|
|
|
|
/* // $("#tableCloseTicketHistory > tbody > tr.select > td").removeClass("SelectRow");
|
|
$("#tableCloseTicketHistory > tbody > tr").removeClass("select");
|
|
|
|
$("#tableTicketHistory > tbody > tr.select > td").removeClass("SelectRow");
|
|
$("#tableTicketHistory > tbody > tr").removeClass("select");
|
|
$("#tableTicketHistory > tbody > tr[id=" + complaintNo + "]").addClass('select');
|
|
$("#tableTicketHistory > tbody > tr[id=" + complaintNo + "].select > td").addClass('SelectRow');
|
|
// $("#labelActivity").trigger('click');*/
|
|
}
|
|
}
|
|
},
|
|
error: function (data) {
|
|
console.log(data);
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
else if (data.success == false) {
|
|
jAlert(data.message, 'Message');
|
|
}
|
|
else {
|
|
|
|
jAlert(data.message, 'Message');
|
|
}
|
|
/* $("#popup_ok").click(function () {
|
|
location.reload();
|
|
|
|
});*/
|
|
|
|
}
|
|
|
|
|
|
function livetrackingdetails() {
|
|
|
|
var ticketId = $('#TicketIdAlias').val();
|
|
|
|
var apiUrl = url + "Api/LiveTabTracking?ticketId=yes&LiveTracking=yes";
|
|
$.ajax({
|
|
url: apiUrl,
|
|
type: 'POST',
|
|
data: { Token: "teramatrix", TicketId: ticketId },
|
|
success: function (data) {
|
|
|
|
var url = "https://eoslivetracking.eicher.in/LiveTracking.cshtml/?p=" + data;
|
|
|
|
window.open(url, '_blank'); // Open the link in a new tab
|
|
}
|
|
});
|
|
}
|
|
|
|
///******* Enhancement- Chassis OdoMeter *******************************************
|
|
function getOdoMeterReading() {
|
|
|
|
var chassisNumber = $("#ChassisNo").data("kendoAutoComplete").value();
|
|
if (chassisNumber != "") {
|
|
if (xhr_getOdometer && xhr_getOdometer.readystate != 4) {
|
|
xhr_getOdometer.abort();
|
|
}
|
|
xhr_getOdometer = $.ajax({
|
|
type: "POST",
|
|
url: "/TicketAdministration_Dealer/GetOdoMeterBYChassisNo/",
|
|
data: { chassisNumber: chassisNumber, ticketIDAlias: $("#TicketIdAlias").val() },
|
|
success: function (data) {
|
|
console.log(data)
|
|
if (data != "" && data.Status != "1") {
|
|
$("#PreviousOdometerReading").val(data.OdoMeterReading.trim())
|
|
}
|
|
else {
|
|
jAlert("Not able to get data from EOS API.", 'Message');
|
|
}
|
|
// add prev ododmeter
|
|
},
|
|
error: function (data) {
|
|
console.log(data);
|
|
}
|
|
});
|
|
}
|
|
else {
|
|
|
|
}
|
|
|
|
}
|
|
</script>
|
|
<link href="@Url.Content("~/Content/Delaycss/style.css")" rel="stylesheet" type="text/css" />
|
|
<style type="text/css">
|
|
.TicketID td {
|
|
height: 32px;
|
|
}
|
|
|
|
.k-icon {
|
|
width: auto !important;
|
|
}
|
|
|
|
.SelectDD {
|
|
padding: 0px 3px !important;
|
|
}
|
|
|
|
.SelectDD select {
|
|
width: 171px;
|
|
width: 166px;
|
|
font-family: 'HermesFB Regular';
|
|
font-family: Arial;
|
|
text-indent: 3px;
|
|
}
|
|
|
|
fieldset {
|
|
border: 1px solid #dedede;
|
|
border-radius: 4px;
|
|
box-shadow: 5px 5px 10px #ccc;
|
|
margin: 10px;
|
|
}
|
|
|
|
legend {
|
|
margin-left: -11px;
|
|
color: #666;
|
|
border-radius: 4px;
|
|
padding-bottom: 4px !important;
|
|
font-size: 11px !important;
|
|
text-shadow: 1px 1px 0 #fff;
|
|
background: url("/Content/css/images/bg-ip-mainmenu.jpg") repeat-x;
|
|
border: 1px solid #f9f9f9;
|
|
padding-top: 4px !important;
|
|
}
|
|
|
|
.CommonTicket {
|
|
/*background: #f9f9f9;*/
|
|
margin: 10px;
|
|
padding: 10px;
|
|
line-height: 28px;
|
|
border: 1px dotted #dedede;
|
|
border: 1px dotted #C3C3C3;
|
|
/*box-shadow: 0.5px 0.5px 25px #dedede inset;*/
|
|
float: left;
|
|
width: 83%;
|
|
}
|
|
|
|
.headline {
|
|
width: 500px;
|
|
height: 400px;
|
|
}
|
|
|
|
input {
|
|
width: 164px;
|
|
}
|
|
|
|
.TicketActivityFrom {
|
|
/*line-height: 38px;*/
|
|
border: 1px solid #dedede;
|
|
/*padding: 10px;*/
|
|
margin: 10px;
|
|
margin-right: 0;
|
|
}
|
|
|
|
|
|
.TicketActivityFrom td {
|
|
/*line-height: 38px;*/
|
|
vertical-align: top;
|
|
/*text-indent: 10px;*/
|
|
padding: 10px;
|
|
border-right: 1px solid #f5f5f5;
|
|
width: 11%;
|
|
}
|
|
|
|
#btnChassisNo {
|
|
height: 24px;
|
|
background: #ffffff;
|
|
width: 27px;
|
|
display: inline-flex;
|
|
position: relative;
|
|
bottom: -4px;
|
|
left: -5px;
|
|
border: 1px solid #bebdbc;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 2px 5px 5px 0px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
#btnChassisNo img#imgChassisNo {
|
|
vertical-align: middle;
|
|
}
|
|
/*input#ChassisNo {
|
|
width: 146px;
|
|
}*/
|
|
.TicketActivityFrom td:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
|
|
.TicketActivityFrom td input, .TicketActivityFrom td select, .TicketActivityFrom td textarea {
|
|
/*margin-top: 5px;*/
|
|
/*margin-bottom: 3px;*/
|
|
}
|
|
|
|
.RemoveScroll {
|
|
overflow-y: hidden;
|
|
}
|
|
|
|
.TicketActivityFrom tr:nth-child(odd) {
|
|
background-color: #f9f9f9;
|
|
}
|
|
|
|
#textBoxDescription {
|
|
width: 159px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.disableText {
|
|
color: #696565 !important;
|
|
}
|
|
.delay-list {
|
|
font-family: Arial, sans-serif;
|
|
max-width: 400px;
|
|
margin: 20px auto;
|
|
}
|
|
.delay-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
border: 1px solid #ddd;
|
|
padding: 8px;
|
|
border-radius: 4px;
|
|
background-color: white;
|
|
}
|
|
|
|
.radio-input {
|
|
width: 16px;
|
|
height: 16px;
|
|
margin: 0;
|
|
}
|
|
|
|
.code-letter {
|
|
font-weight: bold;
|
|
font-size: 16px;
|
|
min-width: 20px;
|
|
}
|
|
|
|
.delay-item .icon {
|
|
width: 24px !IMPORTANT;!I;!;!;!i;!;
|
|
height: 24px !IMPORTANT;!I;!;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.delay-text {
|
|
font-size: 14px;
|
|
color: #333;
|
|
}
|
|
|
|
/* Icons using unicode characters and styling */
|
|
.icon-customer::after {
|
|
content: '';
|
|
}
|
|
.icon-parts::after {
|
|
content: '';
|
|
}
|
|
.icon-resource::after {
|
|
content: '';
|
|
}
|
|
.icon-technician::after {
|
|
content: '';
|
|
}
|
|
.icon-outside::after {
|
|
content: '';
|
|
}
|
|
.icon-repair::after {
|
|
content: '';
|
|
}
|
|
.icon-float::after {
|
|
content: '';
|
|
}
|
|
.icon-diagnostic::after {
|
|
content: '';
|
|
}
|
|
.icon-law::after {
|
|
content: '';
|
|
}
|
|
.icon-gate::after {
|
|
content: '';
|
|
}
|
|
.icons{font-size: 26px;}
|
|
.icons:before{color: #000;}
|
|
.heighttable {
|
|
max-height: 500px;
|
|
overflow: auto;
|
|
}
|
|
|
|
a.k-window-action.k-link:after {
|
|
content: 'x';
|
|
font-size: 20px;
|
|
position: absolute;
|
|
top: 1px;
|
|
left: 4px;
|
|
color: #000;
|
|
}
|
|
</style>
|