1912 lines
78 KiB
Plaintext
1912 lines
78 KiB
Plaintext
@model GODATA.Models.Ticket.TicketModel
|
|
|
|
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
|
|
<script>
|
|
function onAdditionalData() {
|
|
return {
|
|
chassisBySearch: $("#ChassisNo").val(),
|
|
ticketID:$('#hdnTicketID').val()
|
|
};
|
|
|
|
}
|
|
|
|
function onSelectChassis(e) {
|
|
var dataItem = this.dataItem(e.item.index());
|
|
dataItem.VehicleType != "" ? $("#VehicleType").val(dataItem.VehicleType) : $("#VehicleType").val("");
|
|
|
|
}
|
|
</script>
|
|
|
|
<div id="divTicketActivity">
|
|
|
|
@Html.Hidden("vRegistrationNo", (object)@ViewBag.VRegistrationNo)
|
|
|
|
<div class="OpenCloseTicketActivity">
|
|
@using (Ajax.BeginForm("TicketAdministration_UpdateTicketOpenClose", "Ticket", new AjaxOptions { HttpMethod = "POST", OnBegin = "activeRequestCheck", OnSuccess = "onSuccessUpdateTicket", OnFailure = "onErrorTicket" }))
|
|
{
|
|
@Html.ValidationSummary(true)
|
|
@Html.HiddenFor(model => model.TicketId)
|
|
|
|
|
|
@Html.Hidden("defaultSlaTime", (object)@ViewBag.ticketDefaultSla)
|
|
|
|
<div class="fleft size65 heighttable">
|
|
<table width="96%" cellspacing="0" cellpadding="0" border="0" class="TicketActivityFrom">
|
|
@foreach (var item in (List<GODATA.Models.Ticket.TicketOpenCloseModel>)ViewBag.TicketDetailsUpdate)
|
|
{
|
|
@Html.Hidden("breakdownLattitude", item.BreakdownLattitude)
|
|
@Html.Hidden("breakdownLongitude", item.BreakdownLongitude)
|
|
@Html.Hidden("breakdownState", item.DealerOrVanState)
|
|
@Html.Hidden("ticketid", item.TicketId)
|
|
@Html.Hidden("ticketStatusAlias", item.TicketStatusAlias)
|
|
@Html.Hidden("ticketPrevStatusAliasId", item.TicketStatus)
|
|
@Html.Hidden("AssignedTo", item.AssignedTo)
|
|
@Html.Hidden("VehicleRegisterNumber", item.VehicleRegisterNumber)
|
|
@Html.Hidden("CreationTimeMorethan24Hrs", item.CreationTimeMorethan24Hrs.ToString())
|
|
@Html.Hidden("TicketIdAlias", item.TicketIdAlias.ToString())
|
|
@Html.Hidden("CustomerType", item.AssignedTo)
|
|
@Html.Hidden("vehicle_fuel_type", item.TicketIdAlias.ToString())
|
|
|
|
|
|
|
|
string EstimatedTimeForJobCompletion = ((item.EstimatedTimeForJobCompletion.ToString() == "0") ? "" : item.EstimatedTimeForJobCompletion.ToString());
|
|
var assignedUser = item.DealerOrVanName;
|
|
|
|
<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 style="display:none;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<td id="textEstmtTime">
|
|
|
|
<input id="sliderEstimatedTime" />
|
|
|
|
|
|
@*<div style="margin-top: 8px !important;">
|
|
@Html.TextBoxFor(modelItem => EstimatedTimeForJobCompletion, new { @id = "spanEstimatedTime", @style = "width: 49px;height: 25px !important;", @onblur = "changeEstimatedTime(this);", @onkeypress = "return IsNumeric(event);" })<span> Mins</span>
|
|
</div>*@
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Estimated Time for Job Completion (In Min)
|
|
</td>
|
|
@if (HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "viewer" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce_admin" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "superadmin")
|
|
{
|
|
if (item.AssignedTo == "dealer")
|
|
{
|
|
|
|
<td><span>NA</span></td>
|
|
|
|
}
|
|
else
|
|
{
|
|
<td id="textEstmtTime">
|
|
<input id="sliderEstimatedTime" />
|
|
<div style="margin-top: 8px !important;">
|
|
@Html.TextBoxFor(modelItem => EstimatedTimeForJobCompletion, new { @id = "spanEstimatedTime", @style = "width: 49px;height: 25px !important;", @onblur = "changeEstimatedTime(this);", @onkeypress = "return IsNumeric(event);" })<span> Mins</span>
|
|
</div>
|
|
<span id="spanEstimatedTimeRequired" class="error" style="display: none; color: red">*</span>
|
|
<span id="spanError" class="error" style="display: none; color: red">Estimated time must be less than 24 Hrs (1440 mins)</span>
|
|
</td>
|
|
<td id="displayEstmtTime">@Html.DisplayFor(modelItem => EstimatedTimeForJobCompletion)</td>
|
|
|
|
@*<td id="textEstmtTime">
|
|
|
|
<input id="sliderEstimatedTime" />
|
|
|
|
|
|
<div style="margin-top: 8px !important;">
|
|
@Html.TextBoxFor(modelItem => EstimatedTimeForJobCompletion, new { @id = "spanEstimatedTime", @style = "width: 49px;height: 25px !important;", @onblur = "changeEstimatedTime(this);", @onkeypress = "return IsNumeric(event);" })<span> Mins</span>
|
|
</div>
|
|
<span id="spanEstimatedTimeRequired" class="error" style="display: none; color: red">*</span>
|
|
<span id="spanError" class="error" style="display: none; color: red">Estimated time must be less than 24 Hrs (1440 mins)</span>
|
|
</td>*@
|
|
|
|
|
|
|
|
<td id="displayEstmtTime">@Html.DisplayFor(modelItem => EstimatedTimeForJobCompletion)</td>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
<td> <span>@Html.DisplayFor(modelItem => item.EstimatedTimeForJobCompletion)</span></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 (HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "viewer" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce_admin" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "superadmin")
|
|
{
|
|
if (item.AssignedTo == "dealer")
|
|
{
|
|
|
|
<td><span>NA</span></td>
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
<td id="textRepairCost">
|
|
@*@Html.TextBoxFor(modelItem => item.RepairCost)*@
|
|
<select id="ddRepairCost" name="RepairCost" class="SelectDD">
|
|
<option value="">--Select--</option>
|
|
@foreach (var itemRepair in (List<GODATA.Models.DropDownData.EstimateCostModel>)ViewBag.EstimatedRepairCostList)
|
|
{
|
|
|
|
<option value="@itemRepair.CostRange">@itemRepair.CostRange</option>
|
|
}
|
|
</select>
|
|
<span id="spanRepairCost" class="error" style="display: none; color: red">*</span>
|
|
</td>
|
|
|
|
|
|
|
|
<td id="displayRepairCost">@Html.DisplayFor(modelItem => item.RepairCost)</td>
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
<td> <span>@Html.DisplayFor(modelItem => item.RepairCost)</span></td>
|
|
}
|
|
</tr>
|
|
|
|
}
|
|
<tr>
|
|
<td>
|
|
Ticket Status
|
|
</td>
|
|
<td>
|
|
@if (HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "viewer" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce_admin" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "superadmin")
|
|
{
|
|
<select id="ddTicketStatus" name="TicketStatus" class="SelectDD" onchange="onChangeTicketStatus(this.value)">
|
|
@foreach (var item11 in (List<GODATA.Models.Ticket.TicketStatus>)ViewBag.TicketStatusList)
|
|
{
|
|
|
|
<option value="@item11.Id">@item11.Alias</option>
|
|
}
|
|
</select>
|
|
}
|
|
else
|
|
{
|
|
|
|
<span id="spnTicketalias">@Html.DisplayFor(model => model.TicketStatusAlias)</span>
|
|
}
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="trpreclosurereason" style="display:none">
|
|
<td>
|
|
Pre Closure Reason
|
|
</td>
|
|
<td>
|
|
@if (HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "viewer" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce_admin" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "superadmin")
|
|
{
|
|
<select id="ddPreclosureReason" name="TicketStatus" class="SelectDD" onchange="onpreclosurereasonchange();">
|
|
</select>
|
|
}
|
|
else
|
|
{
|
|
|
|
<span id="spnTicketalias">@Html.DisplayFor(model => model.TicketStatusAlias)</span>
|
|
}
|
|
</td>
|
|
</tr>
|
|
<tr id="tr_delay_reason" style="display: none;">
|
|
<td>
|
|
Delay Reason
|
|
</td>
|
|
<td>
|
|
<input id="txtDelayReason" readonly="readonly" style="width: 250px;height: 25px !important;" type="text" value="" class="valid">
|
|
<span id="spanDelayReason" style="display: none;"></span>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="tr_reason_type" style="display: none;">
|
|
<td>
|
|
Reason Category
|
|
</td>
|
|
<td>
|
|
<select id="ddReasonTypeForOpportunityLost" name="OpportunityLostType" class="SelectDD" onchange="loadOpportunityLost()">
|
|
<option value="">--Select--</option>
|
|
<option value="Dealer">Dealer</option>
|
|
<option value="Customer">Customer</option>
|
|
<option value="Call Center">Call Center</option>
|
|
</select>
|
|
<span id="spanReasonTypeOpportunityLost" class="error" style="display: none; color: red">*</span>
|
|
</td>
|
|
</tr>
|
|
<tr id="tr_reason" style="display: none;">
|
|
<td>
|
|
Reason Type
|
|
</td>
|
|
<td>
|
|
<select id="ddReasonForOpportunityLost" name="OpportunityLost" class="SelectDD">
|
|
<option value="">--Select--</option>
|
|
|
|
</select>
|
|
<span id="spanReasonOpportunityLost" class="error" style="display: none; color: red">*</span>
|
|
</td>
|
|
</tr>
|
|
@*<tr id="tr_closeReason" style="display: none;">
|
|
<td>
|
|
Reason
|
|
</td>
|
|
<td>
|
|
<select id="ddReasonForcloseTicketmorethan24Hrs" name="_24HrsReason" class="SelectDD">
|
|
<option value="">--Select--</option>
|
|
@foreach (var item12 in (List<GODATA.Models.DropDownData.OpportunityLostReasonsModel>)ViewBag.ReasonForcloseTicketmorethan24Hrs)
|
|
{
|
|
|
|
<option value="@item12.ReasonName">@item12.ReasonName</option>
|
|
}
|
|
</select>
|
|
<span id="spanReasonForcloseTicketmorethan24Hrs" class="error" style="display: none; color: red">*</span>
|
|
</td>
|
|
</tr>*@
|
|
|
|
@*added on 24-11-2020 start*@
|
|
<tr id="tr_closeReason_new" style="display: none;">
|
|
<td>
|
|
Closed Reason
|
|
</td>
|
|
<td>
|
|
<select id="ddReasonForcloseTicket" name="TicketClosedReason" class="SelectDD">
|
|
<option value="">--Select--</option>
|
|
@foreach (var item13 in (List<GODATA.Models.DropDownData.TicketClosedReason>)ViewBag.ReasonForTicketClosed)
|
|
{
|
|
|
|
<option value="@item13.ReasonName">@item13.ReasonName</option>
|
|
}
|
|
</select>
|
|
<span id="spanReasonForcloseTicket" class="error" style="display: none; color: red">*</span>
|
|
</td>
|
|
</tr>
|
|
@*added on 24-11-2020 end*@
|
|
@if (HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "viewer" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce_admin" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "superadmin")
|
|
{
|
|
<tr>
|
|
<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>
|
|
}
|
|
<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", "Ticket")
|
|
.Data("onAdditionalData");
|
|
})
|
|
.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.TextBoxFor(model => model.OdometerReading, new { @style = "width: 170px;height: 25px !important;", @onkeypress = "return IsNumeric(event);", @onchange = "validateRange(event);" })
|
|
<span id="spanOdometerReading" class="error" style="display: none; color: red">Odometer Reading does not exceed 10 digit value and can not be 0</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
@if (HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "viewer" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "cce_admin" || HttpContext.Current.Session["UserRole"].ToString().ToLower().Trim() == "superadmin")
|
|
{
|
|
<div style="width: 100%">
|
|
<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; overflow: hidden; line-height: 10px;" />
|
|
</div>
|
|
|
|
@*if (ViewBag.TicketStatus == 6)*@
|
|
@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="reassignTicketDefault()" style="margin-top: 0; width: auto !important; margin-left: 10px; height: 26px; line-height: 10px;" />
|
|
</div>
|
|
|
|
}
|
|
</div>
|
|
}
|
|
<div class="clear"></div>
|
|
|
|
</div>
|
|
|
|
}
|
|
<div class="fright size35 withstatusbar" style="overflow-y: auto; position: absolute; right: 0; height: 93%; border-left: 1px dotted #dedede;">
|
|
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
@*open ticket activity*@
|
|
@if (ViewBag.OpenTicketActivity != null)
|
|
{
|
|
if (ViewBag.OpenTicketActivity.Count > 0)
|
|
{
|
|
int counter = 1;
|
|
foreach (var item11 in (List<GODATA.Models.Ticket.OpenTicketActivityDetails>)ViewBag.OpenTicketActivity)
|
|
{
|
|
string talias = "";
|
|
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";
|
|
talias = "aa";
|
|
}
|
|
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)
|
|
@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.Ticket.CloseTicketActivityDetails>)ViewBag.CloseTicketActivity)
|
|
{
|
|
|
|
string talias = "";
|
|
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";
|
|
}
|
|
|
|
string[] latt = item11.ActivityTicketsCloseCreatedBy.Split(',');//text is hey/hi
|
|
string createdby = latt[0];// if u want the 1st part like "hey"/hi this will give hey
|
|
string preclosereason = latt[1];//
|
|
<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'">@createdby</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)
|
|
@preclosereason
|
|
</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 LegendwithStatus">
|
|
<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>
|
|
<script>
|
|
$("#divTicketActivity").parent().addClass("RemoveScroll")
|
|
|
|
var vRegistrationNo = '@ViewBag.VRegistrationNo';
|
|
|
|
$("#ddTicketStatus").val('@ViewBag.TicketStatus');
|
|
console.log('@ViewBag.RemarkTicketNotClosed24Hours')
|
|
$("#ddReasonForcloseTicketmorethan24Hrs").val('@ViewBag.RemarkTicketNotClosed24Hours');
|
|
//--------added on 25-11-2020 (start) -------------------
|
|
$("#ddReasonForcloseTicket").val('@ViewBag.RemarkForTicketClosed');
|
|
//--------added on 25-11-2020 (end) -------------------
|
|
|
|
$("#ddRepairCost").val('@ViewBag.EstimatedRepairCost');
|
|
|
|
|
|
|
|
var opportunityLostReason = '@ViewBag.OpportunityLossReason';
|
|
// console.log(opportunityLostReason.split('-')[1]);
|
|
$("#ddReasonTypeForOpportunityLost").val(opportunityLostReason.split('-')[0]);
|
|
loadOpportunityLost(opportunityLostReason.split('-')[0], opportunityLostReason.split('-')[1]);
|
|
// getdelayreasonhtml();
|
|
$("#ChassisNo").val('@ViewBag.ChassisNo');
|
|
$("#OdometerReading").val('@ViewBag.OdometerReading');
|
|
$("#textBoxDescription").val(stringToDecode('@ViewBag.DescriptionMultiline', "hiddenDescription"));
|
|
//$("#textBoxDescription").val(stringToDecode('dealership not contactable \', "hiddenDescription"));
|
|
$("#textBoxDescription").prop('title', stringToDecode('@ViewBag.DescriptionMultiline', "hiddenDescription"));
|
|
|
|
/// ====================== Odometer case
|
|
$("#VehicleType").val('@ViewBag.VehicleType')
|
|
$("#PreviousOdometerReading").val('@ViewBag.PreviousOdometerReading')
|
|
|
|
|
|
//===========================
|
|
|
|
var autocomplete = $("#ChassisNo").data("kendoAutoComplete");
|
|
autocomplete.readonly(true);
|
|
$("#ChassisNo").addClass("disableText");
|
|
|
|
function changeEstimatedTime($this) {
|
|
if (checkIfEstimatedTimeInRange($this.value)) {
|
|
console.log($this);
|
|
var val = $this.value;
|
|
$("#sliderEstimatedTime").data("kendoSlider").value(val / 60);
|
|
$(".k-draghandle").attr('title', parseInt(val / 60, 10));
|
|
}
|
|
}
|
|
function editChassisNo() {
|
|
autocomplete.readonly(false);
|
|
$("#ChassisNo").removeClass("disableText");
|
|
//$("#ChassisNo").attr('readonly', false).css({ "background-color": "#fcfcfc" });
|
|
$("#imgChassisNo").attr("src", "../../Content/css/images/edit-disable.png");
|
|
|
|
}
|
|
function checkIfEstimatedTimeInRange(value) {
|
|
var ret = ((value > 0 && value <= 1440));
|
|
document.getElementById("spanError").style.display = ret ? "none" : "inline";
|
|
$("#spanEstimatedTime").val(ret ? value : "");
|
|
//$("#spanEstimatedTime").focus();
|
|
return ret;
|
|
}
|
|
|
|
/* Make editable Repair cost and Estmtd Time */
|
|
function editableCostAndTime(ticketStatus) {
|
|
var ticketStatusId = ticketStatus;
|
|
if (ticketStatusId == 3 && ('@ViewBag.AssignTo').toLowerCase() == "van") {
|
|
$("#textRepairCost, #textEstmtTime").show();
|
|
$("#displayRepairCost, #displayEstmtTime").hide();
|
|
$("#sliderEstimatedTime").data("kendoSlider").value('@ViewBag.EstimatedRepairTime' / 60);
|
|
$(".k-draghandle").attr('title', parseInt('@ViewBag.EstimatedRepairTime' / 60, 10));
|
|
} else {
|
|
$("#textRepairCost, #textEstmtTime").hide();
|
|
$("#displayRepairCost, #displayEstmtTime").show();
|
|
}
|
|
}
|
|
var isdelayreason='f';
|
|
function onpreclosurereasonchange() {
|
|
|
|
$("#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\"><div class=\"icon icon-gate\"><span class=\"icons icon-gate-pass-issues\"></span></div><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 = $('#CustomerType').val();
|
|
var tid= $('#TicketId').val();
|
|
//alert(tid);
|
|
var ddlval = $('#ddPreclosureReason').val();
|
|
var apiurl=url + "Api/DelayReason?&ticketId="+tid;
|
|
|
|
//alert(apiurl);
|
|
$('#AssignedTo').val('');
|
|
if (ddlval == 'Closure Request') {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: apiurl,
|
|
|
|
success: function (data) {
|
|
// alert(data);
|
|
if (data == 'true') {
|
|
|
|
isdelayreason='t';
|
|
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');
|
|
$('#AssignedTo').val(ass_to + ',' + $('#ddPreclosureReason').val());
|
|
}
|
|
}
|
|
});
|
|
}
|
|
else {
|
|
$('#AssignedTo').val(ass_to + ',' + $('#ddPreclosureReason').val());
|
|
}
|
|
}
|
|
var precloseval = "";
|
|
var preclosevalreason = "";
|
|
function SetKendoWindowTitle(divId, titleText) {
|
|
var dialog = $(divId).data("kendoWindow");
|
|
dialog.title(titleText);
|
|
}
|
|
//alert('if');
|
|
/* var dateString = $('#tdcreation_time').html();
|
|
var vtag=$("#VehicleTagging").val();
|
|
var now = new Date();
|
|
// Get the created date from the element (assume it's in ISO format)
|
|
var createdDate = new Date(dateString);
|
|
// Convert milliseconds to hours
|
|
var diffInMilliseconds = now - createdDate;
|
|
var diffInHours = diffInMilliseconds / (1000 * 60 * 60);
|
|
|
|
|
|
if(vtag == 'LMD' || vtag == 'BUS'){
|
|
// alert(diffInHours);
|
|
if (diffInHours < 10) {
|
|
$('#AssignedTo').val(ass_to + ',' + $('#ddPreclosureReason').val());
|
|
}
|
|
else{
|
|
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");
|
|
}
|
|
}
|
|
else{
|
|
if (diffInHours < 15) {
|
|
$('#AssignedTo').val(ass_to + ',' + $('#ddPreclosureReason').val());
|
|
}
|
|
else{
|
|
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");
|
|
}
|
|
}*/
|
|
|
|
|
|
/* function getdelayreasonhtml() {
|
|
var html = "";
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: url + "/Api/DelayReason?&getDelayReason=yes&dropdown=test&option=yes",
|
|
|
|
success: function (data) {
|
|
console.log(data);
|
|
if (data.length > 0) {
|
|
for (keyVar in data) {
|
|
if (data.hasOwnProperty(keyVar)) {
|
|
html += "<input type=\"radio\" name=\"rdodelayreason\" value='" + data[keyVar].Name +"' /> <label labelfor=\"rdodelayreason\">"+ data[keyVar].Name+"</label><br/>";
|
|
}
|
|
}
|
|
|
|
html += "<input type=\"button\" class=\"button_blue fleft\" style=\"width:auto;\" onclick=\"savedelayreason();\" value=\"Submit\" />";
|
|
|
|
|
|
}
|
|
}
|
|
});
|
|
setTimeout(function () {
|
|
$("#divCreateDealer").html(html);
|
|
}, 5000);
|
|
|
|
|
|
|
|
}*/
|
|
|
|
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($("#CustomerType").val());
|
|
// alert($('input[name="delay"]:checked').val());
|
|
var newvl = $("#CustomerType").val() + ',' + $('#ddPreclosureReason').val() + ',' + $('input[name="delay"]:checked').val();
|
|
// alert(newvl);
|
|
|
|
|
|
$('#tr_delay_reason').show();
|
|
//alert($('input[name="delay"]:checked').val());
|
|
// $('#spanDelayReason').show();
|
|
$('#txtDelayReason').val($('input[name="delay"]:checked').val());
|
|
$('#spanDelayReason').html($('input[name="delay"]:checked').val());
|
|
$('#AssignedTo').val(newvl);
|
|
closeWindow("#divCreateDealer")
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
function closeWindow(divId) {
|
|
|
|
$(divId).data("kendoWindow").close();
|
|
}
|
|
function addKendoWindowToDiv(divId, titleText, width, left) {
|
|
$(divId).kendoWindow({
|
|
width: width,
|
|
title: titleText,
|
|
modal: true,
|
|
resizable: false,
|
|
draggable: true,
|
|
position: {
|
|
top: 95,
|
|
left: left
|
|
}
|
|
});
|
|
}
|
|
/* Check opportunity lost or preclosure or in progress ticket status */
|
|
function getpreclosureval(){
|
|
|
|
$.ajax({
|
|
type: "Post",
|
|
url: url + "Api/Activity?preClose=yes&preClosereason=get",
|
|
data: { Token: securityToken, TicketId: $('#TicketIdAlias').val() },
|
|
success: function (data) {
|
|
console.log(data);
|
|
var val = data.split(",");
|
|
precloseval = val[0];
|
|
preclosevalreason = val[1];
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
function onChangeTicketStatus(ticketStatus) {
|
|
$('#trpreclosurereason').hide();
|
|
$('#tr_delay_reason').hide();
|
|
var ticketStatusId = ticketStatus;
|
|
$("#textRepairCost, #textEstmtTime, #tr_reason,#tr_reason_type, #tr_closeReason, #spanReasonForcloseTicketmorethan24Hrs, #tr_chassisNumber,#tr_OdometerReading,#tr_VehicleType,#tr_PrevOdometerReading").hide();
|
|
$("#displayRepairCost, #displayEstmtTime").show();
|
|
var ticketStatusId = ticketStatus;
|
|
var htmldrop = "<option>Select</option>";
|
|
getpreclosureval();
|
|
var prevsts=$('#ticketPrevStatusAliasId').val();
|
|
// alert(prevsts);
|
|
if (prevsts == 6) {
|
|
// alert('test123');
|
|
|
|
setTimeout(function () {
|
|
$('#button_submit').hide();
|
|
$("#ddTicketStatus").attr("disabled", true);
|
|
}, 500);
|
|
}
|
|
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();
|
|
setTimeout(function () {
|
|
// alert($('#ticketPrevStatusAliasId').val());
|
|
setTimeout(function () {
|
|
if ($('#ticketPrevStatusAliasId').val() == "4") {
|
|
$('#ddPreclosureReason').attr("disabled", "disabled");
|
|
$('#ddPreclosureReason').val(precloseval);
|
|
if (preclosevalreason == "") {
|
|
// alert('if');
|
|
}
|
|
else {
|
|
$('#tr_delay_reason').show();
|
|
// $('#spanDelayReason').show();
|
|
$('#spanDelayReason').html(preclosevalreason);
|
|
$('#txtDelayReason').val(preclosevalreason);
|
|
}
|
|
}
|
|
else {
|
|
|
|
}
|
|
}, 1500);
|
|
|
|
$('#ddPreclosureReason').append(precloseval);
|
|
}, 2500);
|
|
|
|
$('#ddPreclosureReason').html('');
|
|
$('#ddPreclosureReason').append(htmldrop);
|
|
|
|
|
|
$('#trpreclosurereason').show();
|
|
|
|
},
|
|
complete: function () {
|
|
|
|
},
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
}
|
|
});
|
|
$("#tr_closeReason_new").hide(); //added on 24-11-2020
|
|
$("#textBoxDescription").show(); //added on 24-11-2020
|
|
checkPreclousre(ticketStatusId);
|
|
setTimeout(function () {
|
|
//alert(drivercontactno);
|
|
// $("#driver_contact_no").val(drivercontactno);
|
|
|
|
$('#OdometerReading').val(odoReading);
|
|
$('#hdnOdoMeterReading').val(odoReading);
|
|
}, 2000);
|
|
}
|
|
iscaseclose = 'true';
|
|
isdec= 'true';
|
|
setTimeout(function () {
|
|
var prevsts1=$('#ticketPrevStatusAliasId').val();
|
|
alertTstatsus=prevsts1;
|
|
// alert(alertTstatsus);
|
|
// alert(ticketStatusId);
|
|
if(prevsts1 ==6){
|
|
//alert('aa');
|
|
}
|
|
|
|
else{
|
|
//// alert(ticketStatusId);
|
|
// alert(alertTstatsus);
|
|
|
|
if(ticketStatusId == alertTstatsus ){
|
|
}
|
|
else{
|
|
if(ticketStatusId ==6){
|
|
var msg = "Do you want to decline this ticket ?";
|
|
jConfirm(msg, "Message", function (result) {
|
|
//alert(result);
|
|
if (result =='true') {
|
|
|
|
}
|
|
else {
|
|
//alert(prevsts1);
|
|
|
|
}
|
|
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}, 500);
|
|
|
|
//if opprtunity lost
|
|
if (ticketStatusId == 7) {
|
|
checkIfOpportunityLost(ticketStatus);
|
|
}
|
|
else if (ticketStatusId == 5) {
|
|
var ticketPrevStatusAliasId = $("#ticketPrevStatusAliasId").val();
|
|
|
|
if (ticketPrevStatusAliasId == 4) {
|
|
checkIfCloseTicket(ticketStatusId)
|
|
}
|
|
else {
|
|
if(ticketPrevStatusAliasId == 5)
|
|
{
|
|
}
|
|
|
|
else{
|
|
if(ticketPrevStatusAliasId == 8)
|
|
{
|
|
checkIfCloseTicket("5")
|
|
}
|
|
else{
|
|
|
|
if (ticketPrevStatusAliasId == 8) {
|
|
|
|
checkIfCloseTicket('5');
|
|
$("#ddTicketStatus").val('5');
|
|
|
|
} else {
|
|
|
|
|
|
alert("Please update Pre - closure first to close the EOS Ticket");
|
|
//SS $("#jquery-ui-dialog").dialog();
|
|
// onChangeTicketStatus("4");
|
|
onChangeTicketStatus("4");
|
|
$("#ddTicketStatus").val('4');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
else if (ticketStatusId == 4) {
|
|
$("#tr_closeReason_new").hide(); // added on 24-11-2020
|
|
$("#textBoxDescription").show(); //added on 24-11-2020
|
|
checkPreclousre(ticketStatusId);
|
|
}
|
|
else {
|
|
$("#tr_closeReason_new").hide(); //added on 24-11-2020
|
|
$("#textBoxDescription").show(); //added on 24-11-2020
|
|
editableCostAndTime(ticketStatusId);
|
|
}
|
|
}
|
|
|
|
function aloerf(tstval){
|
|
|
|
var prevsts=$('#ticketPrevStatusAliasId').val();
|
|
// alert(prevsts);
|
|
$("#ddTicketStatus").val(prevsts);
|
|
//onChangeTicketStatus(prevsts);
|
|
}
|
|
|
|
/* Check opportunity lost ticket status */
|
|
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')
|
|
var chassisno=$("#ChassisNo").val();
|
|
var apiUrl = url + "Api/Activity?chassisno=" + chassisno;
|
|
$.ajax({
|
|
type: "GET",
|
|
url: apiUrl,
|
|
success: function (data) {
|
|
$("#OdometerReading").val(data.odometer);
|
|
},
|
|
complete: function () {
|
|
},
|
|
error: function (data) {
|
|
|
|
}
|
|
});
|
|
$("#tr_chassisNumber,#tr_OdometerReading,#tr_VehicleType,#tr_PrevOdometerReading,#tr_VehicleType,#tr_PrevOdometerReading").show();
|
|
}
|
|
else {
|
|
$("#tr_chassisNumber,#tr_OdometerReading,#tr_VehicleType,#tr_PrevOdometerReading,#tr_VehicleType,#tr_PrevOdometerReading").hide();
|
|
}
|
|
}
|
|
/* Check opportunity lost ticket status */
|
|
function checkIfCloseTicket(ticketStatus) {
|
|
var ticketStatusId = ticketStatus;
|
|
var CreationTimeMorethan24Hrs = $("#CreationTimeMorethan24Hrs").val();
|
|
|
|
if (ticketStatusId == 5 && CreationTimeMorethan24Hrs == "True") {
|
|
$("#tr_closeReason").show();
|
|
$("#tr_closeReason_new").show(); //added on 08-02-2021
|
|
}
|
|
else {
|
|
// $("#tr_closeReason").hide();
|
|
// added new condition on 24-11-2020 start
|
|
$("#tr_closeReason_new").show();
|
|
$("#textBoxDescription").show();
|
|
$("#tr_closeReason").hide();
|
|
// added new condition on 24-11-2020 end
|
|
}
|
|
}
|
|
|
|
/* Check opportunity lost ticket status */
|
|
function checkIfOpportunityLost(ticketStatus) {
|
|
var ticketStatusId = ticketStatus;
|
|
if (ticketStatusId == 7) {
|
|
$("#tr_reason,#tr_reason_type").show();
|
|
$("#tr_closeReason_new").hide(); //added on 24-11-2020
|
|
$("#textBoxDescription").show(); //added on 24-11-2020
|
|
}
|
|
else {
|
|
$("#tr_reason,#tr_reason_type").hide();
|
|
$("#tr_closeReason_new").hide(); //added on 24-11-2020
|
|
$("#textBoxDescription").show(); //added on 24-11-2020
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/* Function call on change of slider */
|
|
function sliderOnChange(e) {
|
|
var sliderId = e.sender.element[0].id;
|
|
$("#spanEstimatedTime").val(e.value * 60);
|
|
$(".k-draghandle").attr('title', e.value);
|
|
}
|
|
|
|
|
|
/* Function to add slider*/
|
|
function addSliderActivity(sliderId) {
|
|
var slider = $(sliderId).kendoSlider({
|
|
//increaseButtonTitle: "0",
|
|
//decreaseButtonTitle: "24",
|
|
change: sliderOnChange,
|
|
showButtons: false,
|
|
//slide: sliderOnSlide,
|
|
min: 0,
|
|
max: 24,
|
|
largeStep: 4,
|
|
});
|
|
//.data("kendoSlider");
|
|
|
|
var sliderItems = slider.siblings(".k-slider-items");
|
|
|
|
var item = sliderItems.find("li:eq(" + (0) + ")");
|
|
item.attr("title", "0 Hrs");
|
|
item.find("span").text("0 Hrs");
|
|
|
|
var item2 = sliderItems.find("li:eq(" + (24) + ")");
|
|
item2.attr("title", "24 Hrs");
|
|
item2.find("span").text("24 Hrs");
|
|
}
|
|
var odoReading = "";
|
|
$(document).ready(function () {
|
|
if (('@ViewBag.AssignTo').toLowerCase() == "van") {
|
|
addSliderActivity("#sliderEstimatedTime");
|
|
}
|
|
setTimeout(function () {
|
|
|
|
// alert('aa');
|
|
var myString=$('#hdnTicketID').val();
|
|
console.log(myString);
|
|
kaminfohide(myString);
|
|
if (myString.includes("P")) {
|
|
$('#tdchassis').html('Engine Number');
|
|
|
|
}
|
|
}, 4000);
|
|
onChangeTicketStatus('@ViewBag.TicketStatus');
|
|
odoReading = ('@ViewBag.OdometerReading').toLowerCase();
|
|
var autocomplete = $("#ChassisNo").data("kendoAutoComplete");
|
|
autocomplete.value('@ViewBag.ChassisNo');
|
|
setTimeout(function () {
|
|
|
|
// alert($("#ticketPrevStatusAliasId").val());
|
|
loadstatusList($("#ticketPrevStatusAliasId").val(), $("#UserRole").val());
|
|
}, 1000);
|
|
// $("#textBoxDescription").val(stringToDecode('@ViewBag.DescriptionMultiline', "hiddenDescription"));
|
|
});
|
|
|
|
var xhr_activeRequestCheck;
|
|
|
|
/**
|
|
* Function call to check if any active request
|
|
*/
|
|
function activeRequestCheck(e) {
|
|
//console.log("on begin")
|
|
//console.log(e)
|
|
'use strict';
|
|
|
|
$("#spanReasonOpportunityLost,#spanReasonTypeOpportunityLost").hide();
|
|
$("#spanEstimatedTimeRequired").hide();
|
|
$("#spanRepairCost").hide();
|
|
if ($("#ddTicketStatus").val() == "7") {
|
|
if ($("#ddReasonTypeForOpportunityLost").val() == "") {
|
|
$("#spanReasonTypeOpportunityLost").show();
|
|
return false;
|
|
}
|
|
if ($("#ddReasonForOpportunityLost").val() == "") {
|
|
$("#spanReasonOpportunityLost").show();
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
var CreationTimeMorethan24Hrs = $("#CreationTimeMorethan24Hrs").val();
|
|
|
|
if ($("#ddTicketStatus").val() == 5 && CreationTimeMorethan24Hrs == "True") {
|
|
|
|
if ($("#ddReasonForcloseTicketmorethan24Hrs").val() == "") {
|
|
$("#spanReasonForcloseTicketmorethan24Hrs").show();
|
|
return false;
|
|
}
|
|
}
|
|
|
|
//------------added on 25-11-2020 (start)---------------
|
|
if ($("#ddTicketStatus").val() == 5 && CreationTimeMorethan24Hrs == "False") {
|
|
|
|
if ($("#ddReasonForcloseTicket").val() == "") {
|
|
$("#spanReasonForcloseTicket").show();
|
|
return false;
|
|
}
|
|
}
|
|
//-------------added on 25-11-2020(end)---------------
|
|
|
|
if ($("#ddTicketStatus").val() == "3" && ('@ViewBag.AssignTo').toLowerCase() == "van") {
|
|
if (($("#spanEstimatedTime").val() == "") || ($("#spanEstimatedTime").val() == null) || (parseInt($("#spanEstimatedTime").val(), 10) == 0)) {
|
|
$("#spanEstimatedTimeRequired").show();
|
|
return false;
|
|
}
|
|
}
|
|
if ($("#ddTicketStatus").val() == "3" && ('@ViewBag.AssignTo').toLowerCase() == "van") {
|
|
if (($("#ddRepairCost").val() == "") || ($("#ddRepairCost").val() == null)) {
|
|
$("#spanRepairCost").show();
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if ($("#ddTicketStatus").val() == "4") {
|
|
if ($('#ticketStatusId').val() == "4") {
|
|
}
|
|
else{
|
|
if ($('#ddPreclosureReason').val().toLowerCase() == "select") {
|
|
jAlert("Please enter preclosure reason", 'Message');
|
|
return false;
|
|
}
|
|
else{
|
|
if ($('#ddPreclosureReason').val().toLowerCase() == 'closure request') {
|
|
var spnreason=$('#spanDelayReason').html();
|
|
//alert(spnreason);
|
|
if(spnreason ==""){
|
|
//alert(isdelayreason);
|
|
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 onErrorTicket(e) {
|
|
console.log(e)
|
|
}
|
|
/**
|
|
* Function call on success of update ticket
|
|
*/
|
|
function kaminfohide(ticketid){
|
|
//alert(tid);
|
|
var substr="";
|
|
if(ticketid.length >13)
|
|
{
|
|
//alert('if');
|
|
substr = ticketid.substring(ticketid.length - 7, ticketid.length);
|
|
}
|
|
else{
|
|
|
|
//alert('else');
|
|
substr = ticketid.substring(ticketid.length - 6, ticketid.length);
|
|
|
|
}
|
|
var tid = "TICKETID-" + substr;
|
|
|
|
var tstatus = $('#' + tid).attr('data-ticketstatus');
|
|
|
|
var apiUrl = "";
|
|
apiUrl = url + "Api/TicketDetails?ownerinfo=yes&ticketid=" + tid + "&Token=teramatrix&openclose=" + tstatus + "";
|
|
$.ajax({
|
|
type: "POST",
|
|
url: apiUrl,
|
|
success: function (data) {
|
|
|
|
var isdetails='f';
|
|
setTimeout(function () {
|
|
if(data.KamName == null && data.KamNo == null && data.FleetManagerName ==null && data.FleetManagerNo == null)
|
|
{
|
|
$("#divKamDetails").hide();
|
|
}
|
|
else{
|
|
$("#divKamDetails").show();
|
|
}
|
|
|
|
}, 2000);
|
|
/* if(data.KamName ==null){
|
|
data.KamName='-';
|
|
}
|
|
else{
|
|
isdetails='t';
|
|
}
|
|
if(data.KamNo ==null){
|
|
data.KamNo='-';
|
|
}
|
|
else{
|
|
isdetails='t';
|
|
}
|
|
if(data.FleetManagerName ==null){
|
|
data.FleetManagerName='-';
|
|
}
|
|
else{
|
|
isdetails='t';
|
|
}if(data.FleetManagerNo ==null){
|
|
data.FleetManagerNo='-';
|
|
}
|
|
else{
|
|
isdetails='t';
|
|
}
|
|
|
|
if(isdetails =="f"){
|
|
alert('isdetails');
|
|
//$("#tableKamDetails").hide();
|
|
// $("#divKamDetails").hide();
|
|
|
|
|
|
}*/
|
|
|
|
},
|
|
complete: function () {
|
|
|
|
|
|
|
|
},
|
|
error: function (data) {
|
|
alert(data);
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
function onSuccessUpdateTicket(data) {
|
|
var utid="";
|
|
|
|
if (data.success == true) {
|
|
var showMsg = "";
|
|
var complaintNo = data.ticketId;
|
|
var ticketStatus = data.ticketStatus;
|
|
$('#VComplaintNo').val(data.ticketId);
|
|
updatedticketid = data.ticketId;
|
|
ticketIdupdated= data.ticketId;
|
|
utid=data.ticketId;
|
|
var ticketStatusAlias;
|
|
if (ticketStatus == 5 || ticketStatus == 7) {
|
|
ticketStatusAlias = "close";
|
|
tstausupdated = ticketStatusAlias;
|
|
isupdate='true';
|
|
tstatus="close";
|
|
} else {
|
|
ticketStatusAlias = "open";
|
|
tstausupdated = ticketStatusAlias;
|
|
isupdate='true';
|
|
tstatus="open";
|
|
}
|
|
|
|
var mno = "";
|
|
mobileNo = ($("#MobileNo").val() == "" || typeof $("#MobileNo").val() == "undefined") ? "" : $("#MobileNo").val().trim();
|
|
|
|
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;
|
|
}
|
|
|
|
//jAlert('Ticket updated successfully', 'Message', function () {
|
|
jAlert(showMsg, 'Message', function () {
|
|
if (xhr_updateTicket && xhr_updateTicket.readystate != 4) {
|
|
xhr_updateTicket.abort();
|
|
}
|
|
if (ticketStatus == 5 || ticketStatus == 7) {
|
|
|
|
if(complaintNoSearch == "" ||complaintNoSearch == null){
|
|
$("#tableCloseTicketHistory").remove();
|
|
$("#RegistrationNo").val(VRegistrationNosearch);
|
|
// getCloseTicketDetailsbyId(complaintNo);
|
|
$('#divOpenCloseTickets').html('');
|
|
getOpenTicket();
|
|
var addnewticketdivhtml = "<div class=\"statusbar\"><button class=\"button_blue\" onclick=\"onBackButtonClick()\" style=\"margin: auto; margin-top: -2px; width: auto\">Back</button>";
|
|
addnewticketdivhtml += "<button id=\"buttonAddNewTicket\" class=\"button_blue\" onclick=\"addNewTicket()\" style=\"margin: auto; margin-top: -2px; width: auto;\">Add New Ticket</button> </div>";
|
|
$("#Tracker_from_BtnWrp_back").addClass("display_none");
|
|
$("#dvaddnewTicket").html(addnewticketdivhtml);
|
|
// getOpenTicket();
|
|
|
|
|
|
getCloseTicketDetailsId(utid);
|
|
}
|
|
else{
|
|
var tids = $("#TicketId").val();
|
|
|
|
$("#tableCloseTicketHistory").remove();
|
|
$("#ComplaintNo").val(complaintNoSearch);
|
|
var addnewticketdivhtml = "<div class=\"statusbar\"><button class=\"button_blue\" onclick=\"onBackButtonClick()\" style=\"margin: auto; margin-top: -2px; width: auto\">Back</button>";
|
|
addnewticketdivhtml += "<button id=\"buttonAddNewTicket\" class=\"button_blue\" onclick=\"addNewTicket()\" style=\"margin: auto; margin-top: -2px; width: auto;\">Add New Ticket</button> </div>";
|
|
$("#Tracker_from_BtnWrp_back").addClass("display_none");
|
|
$("#dvaddnewTicket").html(addnewticketdivhtml);
|
|
getOpenTicket();
|
|
|
|
getCloseTicketDetailsId(utid);
|
|
|
|
}
|
|
|
|
}
|
|
else{
|
|
|
|
|
|
if(complaintNoSearch == "" ||complaintNoSearch == null){
|
|
//alert('rld');
|
|
$("#ComplaintNo").val(tids);
|
|
|
|
$("#RegistrationNo").val(VRegistrationNosearch);
|
|
getOpenTicket();
|
|
getTicketDetailsopen(utid);
|
|
}
|
|
else{
|
|
|
|
$("#ComplaintNo").val(complaintNoSearch);
|
|
|
|
getOpenTicket();
|
|
|
|
getTicketDetailsopen(utid);
|
|
|
|
}
|
|
}
|
|
});
|
|
}
|
|
else {
|
|
jAlert(data.message, 'Message');
|
|
}
|
|
}
|
|
|
|
///******* Enhancement- Chassis OdoMeter *******************************************
|
|
function getOdoMeterReading() {
|
|
var chassisNumber = $("#ChassisNo").data("kendoAutoComplete").value();
|
|
// alert(chassisNumber);
|
|
if (chassisNumber != "") {
|
|
if (xhr_getOdometer && xhr_getOdometer.readystate != 4) {
|
|
xhr_getOdometer.abort();
|
|
}
|
|
xhr_getOdometer = $.ajax({
|
|
type: "POST",
|
|
url: "/Ticket/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 {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Function call to load OpportunityLost list
|
|
*/
|
|
function loadOpportunityLost(selectedReason, reasonValue) {
|
|
var selectedType = "";
|
|
if (selectedReason != "") {
|
|
selectedType = $("#ddReasonTypeForOpportunityLost").val();
|
|
}
|
|
else {
|
|
selectedType = selectedReason;
|
|
}
|
|
|
|
$('#ddReasonForOpportunityLost').html("");
|
|
$('#ddReasonForOpportunityLost').append("<option value=''>--Select--</option>")
|
|
if (selectedType == "Dealer") {
|
|
|
|
// var reasonType = ["Manpower Not Available","Service Van not available","Non Operating hours","Parts Not available","Resolved on call","Others (mention comments)"];
|
|
// var reasonType = ["Dealer denied-State border issue", "Dealer denied- Natural calamities/Govt. guidelines", "Delay in Technician Visit", "Manpower/Service VAN not Available", "Parts not Available", "Others ( Mentioned Comments)", "Issue resolved on call", "Dealership arranged Local Mechanic", "Major work in Vehicle"];
|
|
var reasonType = ["Dealer denied-State border issue", "Dealer denied- Natural calamities/Govt. guidelines", "Delay in Technician Visit", "Manpower/Service VAN not Available", "Parts not Available", "Others ( Mentioned Comments)", "Issue resolved on call", "Dealership arranged Local Mechanic", "Major work in Vehicle", "Email received from CSM/ASM/RSM", "Dealer Denied to attend vehicle during Night hours"];
|
|
for(var count=0;count < reasonType.length; count++){
|
|
$('#ddReasonForOpportunityLost').append("<option value='"+reasonType[count] +"'>"+reasonType[count]+"</option>")
|
|
}
|
|
}
|
|
else if (selectedType == "Customer") {
|
|
//var reasonType = ["High EOS charges","Moved from breakdown location","Repaired by local technician","Non contactable","Vehicle in moving condition","Shared incorrect location","Others (mention comments)","Warranty dispute","Customer delaying approval"];
|
|
|
|
|
|
var reasonType = ["Repaired by him self", "Repaired by local Technician", "Denied to pay visit charges", "High EOS Charges", "Moved from breakdown location", "Vehicle in moving condition", "Shared incorrect Location", "Warranty/AMC Dispute", "Customer Delaying Approval", "Others( Mentioned Comments)", "Denying for advance Payment", "Vehicle will visit to W/S", "Vehicle in dealership /in front of W / S", "Accidental Case", "Non-contactable", 'Customer Denial to attend in Night hours', 'Urgent load', 'Minor Issues in Vehicle', 'Auto resolved / Automatic Start', 'Customer was in hurry', 'Not Eicher Vehicle'];
|
|
|
|
//var reasonType = ["Repaired by him self", "Repaired by local Technician", "Denied to pay visit charges", "High EOS Charges", "Moved from breakdown location", "Vehicle in moving condition", "Shared incorrect Location", "Warranty/AMC Dispute", "Customer Delaying Approval", "Others( Mentioned Comments)", "Denying for advance Payment", "Vehicle will visit to W/S","Vehicle in dealership /in front of W / S","Accidental Case","Non-contactable"];
|
|
for (var count = 0; count < reasonType.length; count++){
|
|
$('#ddReasonForOpportunityLost').append("<option value='"+reasonType[count]+"'>"+reasonType[count]+"</option>")
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (selectedType == "Call Center") {
|
|
var reasonType = ["Incorrect Location captured", "Incorrect Vehicles details captured", "Incorrect VAN /Dealer assignment", "others", "Test- Ticket", "Draft Ticket"];
|
|
for(var count=0;count < reasonType.length; count++){
|
|
$('#ddReasonForOpportunityLost').append("<option value='"+reasonType[count]+"'>"+reasonType[count]+"</option>")
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if (reasonValue != "" && reasonValue != undefined) {
|
|
$("#ddReasonForOpportunityLost").val(reasonValue);
|
|
$("#ddReasonForOpportunityLost").prop('title', reasonValue);
|
|
}
|
|
}
|
|
</script>
|
|
<link href="@Url.Content("~/Content/Delaycss/style.css")" rel="stylesheet" type="text/css" />
|
|
<style type="text/css">
|
|
.TicketActivityFrom td:first-child {
|
|
width: 40%;
|
|
}
|
|
|
|
span#btnChassisNo {
|
|
background: #ebebe4;
|
|
padding: 5px 4px;
|
|
vertical-align: -webkit-baseline-middle;
|
|
border-radius: 1px;
|
|
cursor: pointer;
|
|
position: relative;
|
|
left: -5px;
|
|
bottom: 3px;
|
|
border: 1px solid #bebdbc;
|
|
border-radius: 0px 5px 5px 0px;
|
|
}
|
|
|
|
.TicketID td {
|
|
height: 32px;
|
|
}
|
|
|
|
.k-icon {
|
|
width: auto !important;
|
|
}
|
|
|
|
.SelectDD {
|
|
padding: 6px 0px;
|
|
}
|
|
|
|
.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 dotted #dedede;
|
|
padding: 10px;
|
|
margin: 10px;
|
|
margin-right: 0;
|
|
}
|
|
|
|
|
|
.TicketActivityFrom td {
|
|
/*line-height: 38px;*/
|
|
vertical-align: top;
|
|
/*text-indent: 10px;*/
|
|
padding: 6px 10px;
|
|
}
|
|
|
|
|
|
.TicketActivityFrom td input, .TicketActivityFrom td select, .TicketActivityFrom td textarea {
|
|
margin-top: 5px;
|
|
font-family: 'Hermes_FB';
|
|
font-size: 13px;
|
|
}
|
|
|
|
.RemoveScroll {
|
|
overflow-y: hidden;
|
|
}
|
|
|
|
.TicketActivityFrom tr:nth-child(odd) {
|
|
background-color: #f9f9f9;
|
|
}
|
|
|
|
#textBoxDescription {
|
|
width: 159px;
|
|
float: left;
|
|
margin-right: 5px;
|
|
}
|
|
|
|
/*.k-button-decrease, .k-button-increase {
|
|
display: none !important;
|
|
}*/
|
|
|
|
#textEstmtTime .k-slider-selection {
|
|
background-color: #ee2e22;
|
|
}
|
|
|
|
.k-slider-track {
|
|
width: 160px !important;
|
|
}
|
|
|
|
/*div.k-slider {
|
|
left: -32px;
|
|
}*/
|
|
|
|
#textEstmtTime .k-tick span {
|
|
top: 25px !important;
|
|
}
|
|
|
|
#textEstmtTime .k-slider-items .k-first span {
|
|
left: -14px !important;
|
|
}
|
|
|
|
#textEstmtTime .k-slider-items .k-last span {
|
|
left: 2px !important;
|
|
}
|
|
|
|
/*input#ChassisNo {
|
|
width: 80% !important;
|
|
}*/
|
|
|
|
span#btnChassisNo img {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.disableText {
|
|
color: #696565 !important;
|
|
}
|
|
|
|
.OpenCloseTicketActivity .heighttable {
|
|
max-height: 500px !important;
|
|
overflow: auto !important;
|
|
}
|
|
|
|
.OpenCloseTicketActivity {
|
|
padding-bottom: 120px !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;}
|
|
|
|
|
|
a.k-window-action.k-link:after {
|
|
content: 'x';
|
|
font-size: 20px;
|
|
position: absolute;
|
|
top: 1px;
|
|
left: 4px;
|
|
color: #000;
|
|
}
|
|
</style>
|