322 lines
14 KiB
Plaintext
322 lines
14 KiB
Plaintext
@{
|
|
ViewBag.Title = System.Configuration.ConfigurationManager.AppSettings["Title"] + " | Open Ticket";
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
}
|
|
|
|
<div class="sizefull">
|
|
<div class="window">
|
|
<div class="titlebar">
|
|
<div class="title">
|
|
Report - Open Ticket
|
|
</div>
|
|
</div>
|
|
<div class="right">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="innerWindow">
|
|
<div id="divDateTimeArea">
|
|
<div class="fleft activeService" id="selectedService"></div>
|
|
<div class="fright">
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
|
|
|
<tr>
|
|
<td class="tableCelllabel">
|
|
<span class="darktxt">Product Type</span>
|
|
</td>
|
|
<td class="tableCellinfo darktxt SelectDD">
|
|
<select id="ddFilterType" name="filterType" style="width: 150px;">
|
|
<option value="Open">All</option>
|
|
<option value="EPS">EPS</option>
|
|
<option value="SCV">SCV</option>
|
|
<option value="LCV">LCV</option>
|
|
<option value="Electric">Electric</option>
|
|
</select>
|
|
</td>
|
|
|
|
|
|
<td>
|
|
<input type="button" value="Get Report" class="button_blue" onclick="filtereport()" style="width: auto; margin: 0 0 0 7px; line-height: 9px; overflow: hidden; height: 26px;">
|
|
<div class="excelIcon fright" title="Download As Excel" onclick="exportReport();" style="display: block;"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
<div id="divGrid">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="divCaseDetails" style="display:none;margin-left:48px;">
|
|
<input type="text" id="txtcaseid" placeholder="Please Enter Case ID" style=" width: auto !important; margin-left: 10px; height: 25px; margin-top: -12px;" />
|
|
<input type="button" value="Submit" onclick="insertCaseDetail();" class=" button_blue" style="margin-top: 0; width: auto !important; margin-left: 10px; height: 15px; overflow: hidden; line-height: 10px;" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@*Popup dialog box div *@
|
|
<div id="divTicketDetails" style="display: none;"></div>
|
|
|
|
<script>
|
|
var userId = '@ViewBag.Userid';
|
|
var _userRole = '@ViewBag.UserRole';
|
|
var UtcMinutes = '@ViewBag.UtcMinutes';
|
|
var securityToken = '@ViewBag.SecurityToken';
|
|
|
|
|
|
/* $(document).ready(function () {
|
|
var params = new URL(document.location.toString()).searchParams;
|
|
var name = params.get("modeltickets");
|
|
var result = "[";
|
|
if (name == "yes") {
|
|
var datahtml = "[";
|
|
var apiUrl = url + "Api/Admin?getopen=yes&tickets=test&modelwise=test&option=yes";
|
|
//alert(apiUrl);
|
|
$.ajax({
|
|
url: apiUrl,
|
|
type: 'POST',
|
|
data: { Token: securityToken, UserId: userId, FromDate: "10 Mar 2000 06:30:37", ToDate: "10 Mar 2000 06:30:37" },
|
|
|
|
success: function (data) {
|
|
if (data) {
|
|
$('#dvtitle').html('Report - HD Buses Ticket');
|
|
$('#dvExcel').hide();
|
|
|
|
|
|
modelwisereport(data);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});*/
|
|
|
|
function filtereport(){
|
|
|
|
var strtype = "Open";
|
|
|
|
var ddlval=$('#ddFilterType').val();
|
|
if(ddlval == "Open"){
|
|
}
|
|
else{
|
|
strtype = "Open,"+ddlval;
|
|
}
|
|
console.log(strtype);
|
|
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/Report/Ticket_Open_Grid/",
|
|
data: {userId: "", startDate: "", endDate: "", ticketStatus: strtype },
|
|
success: function (data) {
|
|
$('#divGrid').show();
|
|
$("#divGrid").html(data);
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
var ditem = "";
|
|
function modelwisereport(dataval) {
|
|
|
|
// Create Kendo Grid
|
|
setTimeout(function () {
|
|
$('#loding-img').hide();
|
|
$('#divGrid').html('');
|
|
$("#divGrid").kendoGrid({
|
|
dataSource: {
|
|
data: dataval,
|
|
pageSize: 10
|
|
},
|
|
height: 400,
|
|
scrollable: true,
|
|
sortable: true,
|
|
pageable: true,
|
|
columns: [
|
|
{ field: "ticketid_alias", title: "Ticket Id", width: "120px" },
|
|
{ field: "ServiceEngineerAlias", title: "Created_By", width: "120px" },
|
|
{ field: "CreationTime", title: "Ticket Creation Time", width: "120px" },
|
|
{ field: "Description", title: "Nature of problem", width: "120px" },
|
|
{ field: "ChassisNo", title: "Chassis Number", width: "120px" },
|
|
{ field: "dealer1scode", title: "dealer 1scode", width: "120px" },
|
|
{ field: "VehicleRegistrationNo", title: "EOS Team Member/Van Reg No.", width: "120px" },
|
|
{ field: "ServiceEngineerContactNumber", title: "EOS Team Contact No.", width: "120px" },
|
|
{ field: "VanVanModel", title: "Model Number", width: "120px" },
|
|
{ field: "WM_Contact_No", title: "WM Number", width: "120px" },
|
|
{ field: "WM_Name", title: "Wm Name", width: "120px" },
|
|
{ field: "plant_code", title: "Plant Code", width: "120px" },
|
|
|
|
//Workshop Manager Name
|
|
|
|
//Workshop Manager Number
|
|
|
|
|
|
/* columns: [
|
|
{ field: "ticketid_alias", title: "Ticket Id", width: "120px" },
|
|
{ field: "ServiceEngineerAlias", title: "Created_By", width: "120px" },
|
|
{ field: "TicketStatusAlias", title: "Ticket Status", width: "120px" },
|
|
{ field: "CreationTime", title: "Ticket Creation Time", width: "120px" },
|
|
{ field: "caller_language", title: "Language", width: "120px" },
|
|
{ field: "Description", title: "Nature of problem", width: "120px" },
|
|
{ field: "VehicleRegistrationNo", title: "Vehicle Registration No.", width: "120px" },
|
|
{ field: "ChassisNo", title: "Chassis Number", width: "120px" },
|
|
{ field: "VehicleTagging", title: "Vehicle Type", width: "120px" },
|
|
{ field: "ServiceEngineerPinPassword", title: "Emission Norms", width: "120px" },
|
|
{ field: "VehicleType", title: "Device Status", width: "120px" },
|
|
{ field: "OdometerReading", title: "Odometer Reading", width: "120px" },
|
|
{ field: "CustomerName", title: "Customer Name", width: "120px" },
|
|
{ field: "CustomeContact_no", title: "Customer Contact No.", width: "120px" },
|
|
{ field: "ServiceEngineerApplicationLicenseKey", title: "Region", width: "120px" },
|
|
{ field: "dealer_code", title: "dealer 1scode", width: "120px" },
|
|
{ field: "Designation", title: "Dealer Name", width: "120px" },
|
|
{ field: "DealerDealerName", title: " Dealer Contact No.", width: "120px" },
|
|
{ field: "ServiceEngineerContactNumber", title: "EOS Team Member / Van Reg No.", width: "120px" },
|
|
{ field: "ServiceEngineerName", title: "CSM Name", width: "120px" },
|
|
{ field: "BreakDownLocation", title: "Csm Contact No.", width: "120px" },
|
|
{ field: "AssignedToUserLatitude", title: " ASM Name", width: "120px" },
|
|
{ field: "BreakdownLocationLandmark", title: "Asm Contact No.", width: "120px" },
|
|
{ field: "BreackDownLatitude", title: "RSM Name", width: "120px" },
|
|
{ field: "AssignedToUserLongitude", title: "RSM Contact No", width: "120px" },
|
|
{ field: "Remarks", title: "Remarks", width: "120px" },
|
|
{ field: "DefaultSlaTime", title: "Default SLA Time(in min)", width: "120px" },
|
|
{ field: "TotalTicketLifeCycleTimeSlab", title: "Response(In min)", width: "120px" },
|
|
{ field: "PreClosureTime", title: "Pre Closure Time", width: "120px" },
|
|
{ field: "VanReachedPunchTime", title: "Van Reach By Call Center", width: "120px" },
|
|
{ field: "VanVanModel", title: "Model Number", width: "120px" },
|
|
{ field: "Van_Status", title: "Van Status", width: "120px" },*/
|
|
|
|
{
|
|
command: {
|
|
text: "Edit",
|
|
click: function (e) {
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
console.log("Showing details for ticket ID: " + dataItem.ticketid_alias);
|
|
e.preventDefault(); // Prevent default action
|
|
addCaseDetail(dataItem.ticketid_alias);
|
|
ditem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
},
|
|
},
|
|
//columns.Command(command => {
|
|
// command.Custom("TicketDetails").Text("Details").Click("showOpenTicketDetails").HtmlAttributes(new { title = "Show Details" });
|
|
// command.Custom("EditTicketActivity").Text("Edit").Click("editActivity").HtmlAttributes(new { title = "Edit Ticket Activity" });
|
|
//}).Title("User Actions");
|
|
title: "Submit Case Id",
|
|
width: "100px"
|
|
}
|
|
]
|
|
|
|
});
|
|
}, 500);
|
|
}
|
|
var activeRequest;
|
|
var tcktid = "";
|
|
function addCaseDetail(tid) {
|
|
tcktid = tid;
|
|
// addKendoWindowToDiv("#divCaseDetails", "Add Van Detail", "400px", 385);
|
|
addKendoWindowToDiv("#divCaseDetails", "Close Case Id", "400px", 385);
|
|
$("#divCaseDetails").parent().addClass("responsive_popup"); //addClass for respond the menu
|
|
$("#divCaseDetails").parent().addClass("k-window2");
|
|
SetKendoWindowTitle("#divCaseDetails", "Close Case Id");
|
|
//open form in new dialog box
|
|
$("#divCaseDetails").data("kendoWindow").open();
|
|
$('#divCaseDetails').show();
|
|
openKendoWindowInCenter("#divCaseDetails");
|
|
|
|
|
|
}
|
|
function insertCaseDetail() {
|
|
// alert(tcktid);
|
|
if ($('#txtcaseid').val() == "") { //check if warrenty is selected or not
|
|
jAlert(" Please Enter Case ID", 'Message');
|
|
return false;
|
|
}
|
|
iscaseclose = 'true';
|
|
jConfirm("Are you sure that you want to close case pertaining to ticket ID: '" + tcktid + "'?", 'Alert', function (result) {
|
|
if (result) {
|
|
var apiUrl = url + "Api/Admin?change=yes&modelcase=test&tickets=tes&modelwise=tesmode&option=yes";
|
|
$.ajax({
|
|
url: apiUrl,
|
|
type: 'POST',
|
|
data: { Token: securityToken, UserId: userId, dealerId: tcktid, fuelValue: $('#txtcaseid').val() },
|
|
success: function (data) {
|
|
$("#divCaseDetails").data("kendoWindow").close();
|
|
$('#divCaseDetails').hide();
|
|
$('#txtcaseid').val('');
|
|
|
|
jAlert("Case closed sucessfully", "MESSAGE");
|
|
var grid = $("#divGrid").data("kendoGrid");
|
|
grid.dataSource.remove(ditem);
|
|
grid.dataSource.sync();
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
$('#popup_cancel').click(function(){
|
|
//alert('aaa');
|
|
});
|
|
|
|
function addKendoWindowToDiv(divId, titleText, width, left) {
|
|
$(divId).kendoWindow({
|
|
width: width,
|
|
title: titleText,
|
|
modal: true,
|
|
resizable: false,
|
|
draggable: true,
|
|
position: {
|
|
top: 180,
|
|
left: left
|
|
}
|
|
});
|
|
}
|
|
function SetKendoWindowTitle(divId, titleText) {
|
|
var dialog = $(divId).data("kendoWindow");
|
|
dialog.title(titleText);
|
|
}
|
|
|
|
</script>
|
|
@*<script type='text/javascript' src='https://maps.google.com/maps/api/js?sensor=false&client=gme-teramatrixtechnologies&v=3.20'></script>*@
|
|
@*<script type='text/javascript' src='https://maps.google.com/maps/api/js?sensor=false&type=restaurant,establishment,fire_station&v=3.20&client=gme-teramatrix'></script>*@
|
|
@Scripts.Render("~/closeticket/jsTicketOpenReport")
|
|
@*<script src="~/Scripts/Report/reportTicketOpen.js"></script>*@
|
|
|
|
<style>
|
|
.TicketReportDetails_Window {
|
|
width: 90% !important;
|
|
height: 85%;
|
|
/*top: 3% !important;
|
|
left: 5% !important;*/
|
|
}
|
|
|
|
.k-grid-resolutionSla img {
|
|
position: relative;
|
|
left: 34%;
|
|
}
|
|
|
|
a.k-button.k-button-icontext.k-grid-TicketDetails {
|
|
background-color: #1b3f94 !important;
|
|
color: #fff !important;
|
|
position: relative;
|
|
left: 29%;
|
|
}
|
|
|
|
a.k-button.k-button-icontext.k-grid-TicketDetails:hover {
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.OpenTicket_Tbl table tbody {
|
|
text-align: center;
|
|
}
|
|
|
|
.k-link:link {
|
|
text-align: center !important;
|
|
}
|
|
</style>
|