This commit is contained in:
2024-03-26 15:56:31 +08:00
parent 634e8b71ab
commit 0855ae42cd
547 changed files with 94818 additions and 60463 deletions

View File

@ -2,6 +2,7 @@
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link href="<%=GetFileUrlWithVersion("css/maintenance.css")%>" rel="stylesheet" />
<style type="text/css">
body {
min-height: 640px;
@ -19,20 +20,26 @@
line-height: 22px;
}
.dropdown {
width: 240px;
}
#mask_bg, #dialogattmask, .mask_dialog, .dialog {
z-index: 3;
}
</style>
<link href="<%=GetFileUrlWithVersion("../css/tabcontrol.css")%>" rel="stylesheet" />
<link href="<%=GetFileUrlWithVersion("../css/panel.css")%>" rel="stylesheet" />
<link href="<%=GetFileUrlWithVersion("css/maintenance.css")%>" rel="stylesheet" />
<link href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" rel="stylesheet" />
<script src="<%=GetFileUrlWithVersion("../js/lib/amrnb.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../Maintenance/js/inputdatactr.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/editableselect.js")%>"></script>
<script src="<%=GetFileUrlWithVersion("../js/controls.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("js/workordersendemail.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("js/wocommunication.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("../js/assetselector.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("js/workordertabitems.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("js/workordertabitems.min.js")%>" type="text/javascript"></script>
<script src="<%=GetFileUrlWithVersion("js/addworkorder.js")%>" type="text/javascript"></script>
<script type="text/javascript">
var contacts;
@ -137,6 +144,7 @@
$('#dialog_salesperson').dropdownDisabled(di);
$('#dialog_isptemplate').dropdownDisabled(di);
$('#dialog_internalid').attr('disabled', di);
$('#dialog_ponumber').attr('disabled', di);
$('#dialog_notes').attr('disabled', di);
$('#dialog_metertype').dropdownDisabled(di);
$('#dialog_hourmeter').attr('disabled', di);
@ -195,11 +203,11 @@
$("#tdExportReport").show();
}
showloading(true);
showLoading(true);
getWorkOrderContacts(workorderid);
getWorkOrderFollowers(workorderid);
worequest("GetWorkOrderInfo", workorderid, function (data) {
showloading(false);
showLoading(false);
loading = false;
if (typeof (data) === "string") {
showAlert(data, GetTextByKey("P_WO_ERROR", 'Error'));
@ -267,6 +275,10 @@
else
$('#dialog_nextfollowupdate').css("color", "unset");
$('#dialog_duedate').val(wo.DueDateStr);
if (new Date(wo.DueDateStr) < new Date(currentdate))
$('#dialog_duedate').css("color", "red");
else
$('#dialog_duedate').css("color", "unset");
$('#dialog_completeddate').val(wo.CompleteDateStr);
$('#dialog_workordercosts').val(wo.WorkOrderTotalCost == 0 ? "" : wo.WorkOrderTotalCost);
$('#dialog_timetocomplete').val(wo.HoursToComplete == 0 ? "" : wo.HoursToComplete);
@ -274,6 +286,7 @@
$('#dialog_department').dropdownVal(wo.DepartmentId);
$('#dialog_advisor').dropdownVal(wo.AdvisorId);
$('#dialog_internalid').val(wo.InternalID);
$('#dialog_ponumber').val(wo.PONumber);
$('#dialog_notes').val(wo.Notes);
$('#dialog_hourmeter').val(wo.HourMeter < 0 ? "" : wo.HourMeter);
$('#dialog_odometer').val(wo.Odometer < 0 ? "" : wo.Odometer);
@ -321,6 +334,10 @@
customer.autoUpdates = wo.AutoText;
}
$('#dialog_partsexpecteddate').val(wo.PartsExpectedDateStr);
if (new Date(wo.PartsExpectedDateStr) < new Date(currentdate))
$('#dialog_partsexpecteddate').css("color", "red");
else
$('#dialog_partsexpecteddate').css("color", "unset");
$('#dialog_lastlabordate').val(wo.LastLaborDateStr);
$('#dialog_inspectionrequired').prop('checked', wo.InspectionRequired);
$('#dialog_inspectioncount').text(wo.InspectionCount).css('color', 'unset');
@ -363,7 +380,7 @@
}, function (err) {
loading = false;
showloading(false);
showLoading(false);
});
}
@ -794,7 +811,9 @@
}
function getTotalCost() {
if (segmentdata && segmentdata.length > 0)
//if (segmentdata && segmentdata.length > 0)
// return;
if (wosegmentobj && wosegmentobj.hasSegment())
return;
var othercost = $('#dialog_othercost').val();
var partscost = $('#dialog_partscost').val();
@ -829,6 +848,7 @@
'DepartmentId': $.trim($('#dialog_department').dropdownVal()),
'AdvisorId': $.trim($('#dialog_advisor').dropdownVal()),
'InternalID': $.trim($('#dialog_internalid').val()),
'PONumber': $.trim($('#dialog_ponumber').val()),
'Notes': $.trim($('#dialog_notes').val()),
'MeterType': $('#dialog_metertype').dropdownVal(),
'HourMeter': $('#dialog_hourmeter').val(),
@ -853,11 +873,13 @@
'InspectionTemplateId': $('#dialog_isptemplate').dropdownVal()
};
var s = $('#dialog_status').data('dropdown').selected;
item.Status = s.Id;
item.StatusType = s.StatusType;
item.StatusName = s.Name;
item.StatusAutoText = s.AutoText;
item.StatusMessage = s.Message;
if (s) {
item.Status = s.Id;
item.StatusType = s.StatusType;
item.StatusName = s.Name;
item.StatusAutoText = s.AutoText;
item.StatusMessage = s.Message;
}
item.Contacts = customercontacts;
item.ContactsClient = customercontacts;
item.Followers = followers;
@ -1075,7 +1097,7 @@
}
if (rst) {
showConfirm(GetTextByKey("P_WO_XXX", "This work order was completed on {1} but is using the current {0} is this correct? ").replace('{0}', msg).replace('{1}', item.CompleteDate), alerttitle, function () {
showConfirm(GetTextByKey("P_WO_THISWORKORDERWASCOMPLETEDTIPS", "This work order was completed on {1} but is using the current {0} is this correct? ").replace('{0}', msg).replace('{1}', item.CompleteDate), alerttitle, function () {
checkStatusChange(item, function (phoneemail) {
saveWorkOrder(item, alerttitle, exit, callback, phoneemail);
});
@ -1094,6 +1116,7 @@
}
function checkStatusChange(item, next) {
onRemoveSelectedAttachment();
if (AllowCommunicate && !COMMReadOnly && (!workorderdata || item.Status != workorderdata.Status)) {
showmaskbg(true);
$('#dialog_statuschange .dialog-title span.title').text(GetTextByKey("P_WO_STATUSCHANGE", 'Status Change') + " - " + item.StatusName);
@ -1103,6 +1126,10 @@
'left': (document.documentElement.clientWidth - $('#dialog_statuschange').width()) / 2
}).showDialogfixed();
if (!workorderid || workorderid == "")
$("#trselectatta").hide();
else
$("#trselectatta").show();
$('#dialog_chksendtextmsg').prop('checked', item.StatusAutoText && !COMMReadOnly).prop('disabled', COMMReadOnly).change();
if (!COMMReadOnly)
@ -1149,6 +1176,7 @@
if (isadd) {
woalertobj && woalertobj.changewo(workorderid, machineid);
wosegmentobj && wosegmentobj.changewo(workorderid, machineid);
//GetInvoiceNumber();
}
@ -1241,15 +1269,40 @@
}
var includeStatusLink = $('#dialog_chkIncludeStatusLink').prop("checked");
var param = JSON.stringify([wo.Id.Value || wo.Id, JSON.stringify(pmemails), comm, (includeStatusLink ? "1" : "0")]);
param = htmlencode(param);
worequest("AddWorkOrderCommunication", param, function (data) {
if (data !== "") {
showAlert(data, GetTextByKey("P_WO_ERROR", 'Error'));
return;
var url = 'AddWorkOrder.aspx';
var method = 'AddWorkOrderCommunication';
var data = new FormData();
data.append('MethodName', method);
data.append('WorkorderId', wo.Id.Value || wo.Id);
data.append('PMEmails', JSON.stringify(pmemails));
data.append('Comment', encodeURIComponent(comm));
data.append('IncludeStatusLink', includeStatusLink ? "1" : "0");
if (_selectedattachment) {
data.append('AttaData', encodeURIComponent(JSON.stringify(_selectedattachment)));
}
$.ajax({
url: url,
type: 'POST',
dataType: 'json',
processData: false,
contentType: false,
cache: false,
data: data,
success: function (data) {
//$('#mask_over_bg').hide();
if (data !== "") {
showAlert(data, GetTextByKey("P_WO_ERROR", 'Error'));
return;
}
//getCommunications();
},
error: function (request, textStatus, errorThrown) {
if (request?.readyState == 0) {
console.log(request);
} else {
writelog_ironintel("onAddMessage", url + ".-1." + method + "." + JSON.stringify(param), JSON.stringify(request), textStatus + errorThrown);
}
}
}, function (err) {
//showmaskbg(false);
});
}
@ -1303,6 +1356,7 @@
$('#dialog_nextfollowupdate').val('');
$('#dialog_nextfollowupdate').css("color", "unset");
$('#dialog_duedate').val('');
$('#dialog_duedate').css("color", "unset");
$('#dialog_description').val('');
$('#dialog_workordercosts').val('');
$('#dialog_timetocomplete').val('');
@ -1311,6 +1365,7 @@
$('#dialog_department').dropdownVal('-1');
$('#dialog_advisor').dropdownVal('-1');
$('#dialog_internalid').val('');
$('#dialog_ponumber').val('');
$('#dialog_notes').val('');
$('#dialog_hourmeter').val('');
$('#dialog_expectedcost').val('');
@ -1337,6 +1392,7 @@
customer.autoUpdates = false;
}
$('#dialog_partsexpecteddate').val('');
$('#dialog_partsexpecteddate').css("color", "unset");
$('#dialog_lastlabordate').val('');
$('#dialog_inspectionrequired').prop('checked', false);
$('#dialog_inspectioncount').text('0').css('color', 'unset');
@ -1360,12 +1416,14 @@
if (!keepinfo)
clearWorkOrderInfo();
if (workorderid && workorderid !== '') {
$("#li_workorder").click();
$("#li_segments").data("dataload", false);
$("#li_attachments").data("dataload", false);
$("#li_inspections").data("dataload", false);
$("#li_estimates").data("dataload", false);
$("#li_invoices").data("dataload", false);
if (!keepinfo) {
$("#li_workorder").click();
$("#li_segments").data("dataload", false);
$("#li_attachments").data("dataload", false);
$("#li_inspections").data("dataload", false);
$("#li_estimates").data("dataload", false);
$("#li_invoices").data("dataload", false);
}
$('#spanopenworkorders').hide();
$(".comm").show();
@ -1768,6 +1826,27 @@
saveWorkOrderCollapsed();
}
function getMessageStatusHistoryText(p) {
var getStatusText = function (s) {
switch (s) {
case 0: return GetTextByKey('P_CU_PENDING', 'Pending');
case 1: return GetTextByKey('P_WO_SENT', 'Sent');
case 5: return GetTextByKey('P_CU_DELIVERYCONFIRMED', 'Delivery Confirmed');
case 6: return GetTextByKey('P_CU_RESENT', 'Resent');
case 9:
case 10:
case 412: return GetTextByKey('P_MA_FAILED', 'Failed');
default: return GetTextByKey('P_CU_UNKNOWN', 'Unknown');
}
};
var msg = GetTextByKey('P_CU_UPDATESTATUSDESC', 'Status changed from {0} to {1}\nBy {2} on {3}')
.replace('{0}', getStatusText(p.History.StatusFrom))
.replace('{1}', getStatusText(p.History.StatusTo))
.replace('{2}', p.History.UpdatedBy)
.replace('{3}', p.UpdatedOnStr);
return msg;
}
var dialogAssets;
var woalertobj = null;
var woattachmentobj = null;
@ -1776,14 +1855,15 @@
var woinvoiceobj = null;
var woinspectionobj = null;
$(function () {
woalertobj = new $woalert({ parent: $('#tab_alerts'), showloading: function (flag) { showloading(flag) }, workorderid: workorderid, machineid: machineid, alertids: alertids });
woattachmentobj = new $woattachment({ parent: $('#tab_attachments'), showloading: function (flag) { showloading(flag) }, canExport: canExport, workorderid: workorderid, machineid: machineid });
wosegmentobj = new $wosegment({ parent: $('#tab_segments'), showloading: function (flag) { showloading(flag) }, workorderid: workorderid });
woestimateobj = new $woestimate({ parent: $('#tab_estimates'), showloading: function (flag) { showloading(flag) }, workorderid: workorderid });
woinvoiceobj = new $woinvoice({ parent: $('#tab_invoices'), showloading: function (flag) { showloading(flag) }, workorderid: workorderid });
woinspectionobj = new $woinspection({ parent: $('#tab_inspections'), showloading: function (flag) { showloading(flag) }, workorderid: workorderid, machineid: machineid });
woalertobj = new $woalert({ parent: $('#tab_alerts'), showloading: function (flag) { showLoading(flag) }, workorderid: workorderid, machineid: machineid, alertids: alertids });
woattachmentobj = new $woattachment({ parent: $('#tab_attachments'), showloading: function (flag) { showLoading(flag) }, canExport: canExport, workorderid: workorderid, machineid: machineid });
wosegmentobj = new $wosegment({ parent: $('#tab_segments'), showloading: function (flag) { showLoading(flag) }, workorderid: workorderid });
woestimateobj = new $woestimate({ parent: $('#tab_estimates'), showloading: function (flag) { showLoading(flag) }, workorderid: workorderid });
woinvoiceobj = new $woinvoice({ parent: $('#tab_invoices'), showloading: function (flag) { showLoading(flag) }, workorderid: workorderid });
woinspectionobj = new $woinspection({ parent: $('#tab_inspections'), showloading: function (flag) { showLoading(flag) }, workorderid: workorderid, machineid: machineid });
InitGridCustomers();
InitGridSelectedAttachments();
if (WOReadOnly) {
$(".iconadd").hide();
@ -1799,7 +1879,7 @@
meterType = "";
var selectedAsset = null;
if (selectedIndex >= 0)
selectedAsset = source[selectedIndex].Values;
selectedAsset = source[selectedIndex];
setMachineInfo(selectedAsset);
if (selectedAsset) {
machineid = selectedAsset.Id;
@ -1818,6 +1898,7 @@
woalertobj && woalertobj.getAssetAlerts(machineid);
getAssetDetailInfo(machineid);
GetAssetContacts();
$("#li_attachments").data("dataload", false);
}
showmaskbg(false);
};
@ -1835,13 +1916,53 @@
const app = window['lib-app'];
if (AllowCommunicate) {
customer = new app.CustomerCommunication({
getText: GetTextByKey,
autoUpdates: false,
statusLink: window.parent.wowidgetobj?.widgets?.CustomerCommunication?.customer?.statusLink ?? false,
readonly: WOReadOnly || COMMReadOnly,
recordReadonly: !AllowCustomer || WOReadOnly || CRReadOnly,
contactCollapserVisible: false,
onStatusLinkChanged: function (checked) {
var widgetobj = window.parent.wowidgetobj;
var customer = widgetobj?.widgets?.CustomerCommunication?.customer;
if (customer != null && !customer.freeze) {
customer.statusLink = checked;
var checklink = widgetobj.popups?.CustomerCommunication?.container?.querySelector('.check-status-link>input');
if (checklink != null) {
checklink.checked = checked;
ui.setTooltip(widgetobj.popups?.CustomerCommunication?.container?.querySelector('.check-status-link'), checked ?
GetTextByKey('P_WO_STATUSLINKINCLUDED', 'Status Link Included') :
GetTextByKey('P_WO_STATUSLINKEXCLUDED', 'Status Link Excluded'));
}
}
},
onAddMessage: addWorkOrderCommunication,
onUpdateMessageStatus: function (msgs) {
if (msgs?.length > 0) {
worequest('UpdateMessageStatus', JSON.stringify(msgs), function (data) {
if (data !== 'OK') {
ui.showAlert(GetTextByKey('P_WO_ERROR', 'Error'), data, 'error');
return;
}
getCommunications();
});
}
},
onMessageStatusClicked: function (p) {
worequest('GetMessageStatusHistory', String(p.Id), function (data) {
if (typeof data === 'string') {
ui.showAlert(GetTextByKey('P_WO_ERROR', 'Error'), data, 'error');
return;
}
if (data.length > 0) {
var msg = data.map(function (p) { return getMessageStatusHistoryText(p) }).join('\n\n');
ui.showAlert(data[0].CustomerNumberFormatted, msg);
}
});
},
onSave: function (item, add) {
if (!add) {
contact = customercontacts.filter(function (f) { return f.Id < 0 ? f.Name === item.Name && f.MobilePhone === item.MobilePhone : f.Id === item.Id })[0];
contact = customercontacts.filter(function (f) { return f.Id < 0 ? f.Name === item.OldName && f.MobilePhone === item.OldMobilePhone : f.Id === item.Id })[0];
}
var array = [];
for (let c of customercontacts) {
@ -1877,7 +1998,7 @@
return new Promise(function (resolve, reject) {
SaveWorkorderContact(array, function (data) {
if (typeof data === 'string') {
ui.showAlert(GetTextByKey("P_WO_ERROR", 'Error'), data, 'error')
ui.showAlert(GetTextByKey('P_WO_ERROR', 'Error'), data, 'error')
reject();
} else {
for (let d of data) {
@ -2026,9 +2147,34 @@
document.querySelector('#communication_holder').append(customer.create());
}
internal = new app.InternalComment({
getText: GetTextByKey,
readonly: WOReadOnly,
onAddMessage: openSendICEmail,
onAddComment: addWorkOrderComment
onAddComment: addWorkOrderComment,
onUpdateMessageStatus: function (msgs) {
if (msgs?.length > 0) {
worequest('UpdateMessageStatus', JSON.stringify(msgs), function (data) {
if (data !== 'OK') {
ui.showAlert(GetTextByKey('P_WO_ERROR', 'Error'), data, 'error');
return;
}
getComments();
});
}
},
onMessageStatusClicked: function (p) {
worequest('GetMessageStatusHistory', String(p.Id), function (data) {
if (typeof data === 'string') {
ui.showAlert(GetTextByKey('P_WO_ERROR', 'Error'), data, 'error');
return;
}
if (data.length > 0) {
var msg = data.map(function (p) { return getMessageStatusHistoryText(p) }).join('\n\n');
ui.showAlert(data[0].CustomerNumberFormatted, msg);
}
});
}
});
document.querySelector('#communication_holder').append(internal.create());
@ -2059,6 +2205,10 @@
onSelectDate: function (v, inp) {
var date = new DateFormatter().formatDate(v, 'm/d/Y 00:00:00');
inp.parent().data('val', [date]);
if (new Date(date) < new Date(currentdate))
$('#dialog_duedate').css("color", "red");
else
$('#dialog_duedate').css("color", "unset");
}
});
$('#dialog_partsexpecteddate').datetimepicker({
@ -2069,6 +2219,10 @@
onSelectDate: function (v, inp) {
var date = new DateFormatter().formatDate(v, 'm/d/Y 00:00:00');
inp.parent().data('val', [date]);
if (new Date(date) < new Date(currentdate))
$('#dialog_partsexpecteddate').css("color", "red");
else
$('#dialog_partsexpecteddate').css("color", "unset");
}
});
$('#dialog_lastlabordate').datetimepicker({
@ -2126,8 +2280,7 @@
$("#txt_customer_key").keypress(onCustomerKeyPress);
function resizeContent() {
$('#divcontent').css('height', $(window).height() - $('#divcontent').offset().top - 4);
//$('#div_atts').css('height', $(window).height() - $('#divcontent').offset().top - 4);
$('.tabcontent').css('height', $(window).height() - $('#divcontent').offset().top - 4);
$('.content_main').css('min-height', 0);
}
@ -2187,6 +2340,10 @@
showmaskbg(false);
});
$('#dialog_selecteattachments').dialog(function () {
$('#statuschange_maskbg').hide();
});
if (!canExport) {
$('#btnExportReport').hide();
$('#btnPrint').hide();
@ -2200,6 +2357,7 @@
$('#dialog_variables').prop('disabled', !checked);
$('#dialog_insertfield').prop('disabled', !checked);
});
$('input[placeholder=Search]').attr("placeholder", GetTextByKey("P_AM_SEARCH", "Search"));
window.onresize = resizeContent;
resizeContent();
@ -2217,7 +2375,7 @@
return;
if (data && data.Code == "501")
loadworkorder(workorderid);
loadworkorder(workorderid, true);
else if (data && data.Code == "502")
OnExit(0);
else if (data && (data.Code == "503" || data.Code == "504"))
@ -2232,12 +2390,59 @@
if (workorderid)
getWorkOrderFollowers(workorderid);
}
else if (data.Code == "508") {
woalertobj && woalertobj.changewo(workorderid, machineid);
}
else if (data.Code == "509") {
if ($('#tab_segments').is(':visible'))
wosegmentobj && wosegmentobj.changewo(workorderid);
else
$("#li_segments").data("dataload", false);
}
else if (data.Code == "510") {
if ($('#tab_attachments').is(':visible'))
woattachmentobj && woattachmentobj.changewo(workorderid, machineid);
else
$("#li_attachments").data("dataload", false);
}
else if (data.Code == "511") {
if ($('#tab_inspections').is(':visible'))
woinspectionobj && woinspectionobj.changewo(workorderid);
else
$("#li_inspections").data("dataload", false);
woalertobj.changewo(workorderid, machineid);
if ($('#tab_attachments').is(':visible'))
woattachmentobj && woattachmentobj.changewo(workorderid, machineid);
else
$("#li_attachments").data("dataload", false);
}
else if (data.Code == "512") {
if ($('#tab_estimates').is(':visible'))
woestimateobj && woestimateobj.changewo(workorderid);
else
$("#li_estimates").data("dataload", false);
}
else if (data.Code == "513") {
if ($('#tab_invoices').is(':visible'))
woinvoiceobj && woinvoiceobj.changewo(workorderid);
else
$("#li_invoices").data("dataload", false);
}
}
var loadingCount = 0;
function showLoading() {
loadingCount++;
$("#dialogattmask").show();
function showLoading(flag) {
if (flag) {
loadingCount++;
$("#dialogattmask").show();
}
else {
loadingCount--;
if (loadingCount === 0)
$("#dialogattmask").hide();
}
}
function hideLoading() {
@ -2282,8 +2487,8 @@
<%} %>
</ul>
<div id="tab_workorder" data-page="tab_workorder">
<div id="divcontent" style="overflow: auto; min-width: 1610px;">
<div id="tab_workorder" data-page="tab_workorder" class="tabcontent" style="overflow: auto; min-width: 1610px;">
<div id="divcontent">
<div class="edit-content">
<div style="width: 920px;">
<div class="subtitle">
@ -2302,7 +2507,7 @@
<span id="spanopenworkorderstext"></span>
</div>
</td>
<td style="width: 100px;">
<td style="width: 120px;">
<button id="input_emaildetails" onclick="openSendEmail();" style="width: unset;" data-lgid="P_WO_EMAILDETAILS">Email Details</button>
</td>
<td style="width: 60px;">
@ -2431,7 +2636,7 @@
<tr>
<td class="label" data-lgid="P_WO_METERTYPE_COLON">Meter Type:</td>
<td>
<div id="dialog_metertype" tabindex="3" class="dropdown"></div>
<div id="dialog_metertype" tabindex="2" class="dropdown"></div>
</td>
<td class="label" data-lgid="P_WO_WORKORDERTYPE_COLON">Work Order Type:</td>
<td>
@ -2442,8 +2647,8 @@
<td class="label">
<span data-lgid="P_WO_HOURMETER_COLON">Hour Meter:</span><span class="span_required redasterisk" style="display: none;">*</span></td>
<td>
<input type="text" id="dialog_hourmeter" maxlength="12" tabindex="3" autocomplete="off" /></td>
<td class="label" data-lgid="P_WO_XXXXXX_COLON">Parts Order Number:</td>
<input type="text" id="dialog_hourmeter" maxlength="12" tabindex="2" autocomplete="off" /></td>
<td class="label" data-lgid="P_WO_PARTSORDERNUMBER_COLON">Parts Order Number:</td>
<td>
<input type="text" id="dialog_partsordernumber" tabindex="2" maxlength="50" autocomplete="off" />
</td>
@ -2452,12 +2657,12 @@
<td class="label">
<span data-lgid="P_WO_ODOMETER_COLON">Odometer:</span><span class="span_required redasterisk" style="display: none;">*</span></td>
<td>
<input type="text" id="dialog_odometer" disabled="disabled" maxlength="12" tabindex="3" style="width: 147px;" autocomplete="off" />
<div id="dig_odometeruom" style="width: 90px; display: inline-block" tabindex="3" class="dropdown"></div>
<input type="text" id="dialog_odometer" disabled="disabled" maxlength="12" tabindex="2" style="width: 147px;" autocomplete="off" />
<div id="dig_odometeruom" style="width: 90px; display: inline-block" tabindex="2" class="dropdown"></div>
</td>
<td class="label" data-lgid="P_WO_XXXXXX_COLON">Parts Status:</td>
<td class="label" data-lgid="P_WO_PARTSSTATUS_COLON">Parts Status:</td>
<td>
<div id="dialog_partsstatus" tabindex="3" class="dropdown"></div>
<div id="dialog_partsstatus" tabindex="2" class="dropdown"></div>
</td>
</tr>
<tr>
@ -2490,7 +2695,7 @@
<input type="text" id="dialog_nextfollowupdate" tabindex="2" maxlength="200" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_WO_XXX">Salesperson:</td>
<td class="label" data-lgid="P_WO_SALESPERSON_COLON">Salesperson:</td>
<td colspan="3">
<div id="dialog_salesperson" tabindex="2" class="dropdown"></div>
</td>
@ -2544,7 +2749,7 @@
<td class="label" data-lgid="P_WO_HOURLYRATE_COLON">Hourly Rate:</td>
<td>
<input type="text" id="dialog_hourlyrate" maxlength="12" tabindex="3" disabled="disabled" autocomplete="off" /></td>
<td class="label" data-lgid="P_WO_TIMETOCOMPLATEHOURS_COLON">Time To Complete(Hrs):</td>
<td class="label" data-lgid="P_WO_TIMETOCOMPLATEHOURS_COLON">Labor Hours:</td>
<td>
<input type="text" id="dialog_timetocomplete" maxlength="12" tabindex="3" onblur="getLaborCost(false,true);" autocomplete="off" /></td>
</tr>
@ -2557,20 +2762,25 @@
<%if (AllowCustomer)
{ %>
<td class="label" data-lgid="P_WO_ESTIMATESTATUS_COLON">Estimate Status:</td>
<td>
<td rowspan="3" style="vertical-align: top">
<span id="dialog_estimatestatus"></span></td>
<%} %>
</tr>
<tr>
<td class="label" data-lgid="P_WO_INTERNALID_COLON">Internal ID:</td>
<td>
<input type="text" id="dialog_internalid" maxlength="50" tabindex="2" autocomplete="off" /></td>
<input type="text" id="dialog_internalid" maxlength="50" tabindex="3" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_WO_XXXXXX_COLON">Billable:</td>
<td class="label" data-lgid="P_WO_PONUMBER_COLON">PO Number:</td>
<td>
<input type="text" id="dialog_ponumber" maxlength="50" tabindex="3" autocomplete="off" /></td>
</tr>
<tr>
<td class="label" data-lgid="P_WO_BILLABLE_COLON">Billable:</td>
<td>
<input type="checkbox" id="dialog_billable" tabindex="3" autocomplete="off" /></td>
<td class="label" data-lgid="P_WO_XXXXXX_COLON">Bill to job:</td>
<td class="label" data-lgid="P_WO_BILLTOJOB_COLON">Bill to job:</td>
<td>
<div id="dialog_billtojob" tabindex="3" class="dropdown"></div>
</td>
@ -2585,22 +2795,22 @@
</div>
</div>
<div id="tab_alerts" data-page="tab_alerts">
<div id="tab_alerts" data-page="tab_alerts" class="tabcontent" style="overflow: auto;">
</div>
<div id="tab_segments" data-page="tab_segments">
<div id="tab_segments" data-page="tab_segments" class="tabcontent" style="overflow: auto;">
</div>
<div id="tab_attachments" data-page="tab_attachments">
<div id="tab_attachments" data-page="tab_attachments" class="tabcontent" style="overflow: auto;">
</div>
<div id="tab_inspections" data-page="tab_inspections">
<div id="tab_inspections" data-page="tab_inspections" class="tabcontent" style="overflow: auto;">
</div>
<div id="tab_estimates" class="edit-content" data-page="tab_estimates">
<div id="tab_estimates" class="edit-content tabcontent" data-page="tab_estimates" style="overflow: auto;">
</div>
<div id="tab_invoices" class="edit-content" data-page="tab_invoices">
<div id="tab_invoices" class="edit-content tabcontent" data-page="tab_invoices" style="overflow: auto;">
</div>
</div>
@ -2608,28 +2818,29 @@
<div class="loading c-spin"></div>
</div>
<div class="dialog" id="sendemailpopupdialog" style="display: none; width: 480px;">
<div class="dialog" id="sendemailpopupdialog" style="display: none; width: 510px;">
<div class="dialog-title"><span class="title" data-lgid="P_WO_SENDWORKORDER">Send Work Order</span><em class="dialog-close"></em></div>
<div class="dialog-content" style="height: 430px;">
<table>
<div class="dialog-content">
<table style="line-height: 24px;">
<tr>
<td data-lgid="P_WO_SENDTHISTO">Who do you want to send this to? Select from existing relationships or manual entry.</td>
<td colspan="2" data-lgid="P_WO_SENDTHISTO">Who do you want to send this to? Select from existing relationships or manual entry.</td>
</tr>
<tr>
<td colspan="2">
<input type="text" id="sendworkorder_search" style="width: 445px; margin-left: 10px;" placeholder="Search" /></td>
</tr>
<tr>
<td>
<div id="contactlist" style="height: 240px; width: 420px; margin-left: 10px; margin-right: 10px;"></div>
<td colspan="2">
<div id="contactlist" style="height: 240px; width: 450px; margin-left: 10px; margin-right: 10px;"></div>
</td>
</tr>
<tr>
<td data-lgid="P_WO_EMAILADDRESSESTIPS">Separate multiple manually entered email addresses with a semi-colon (;).</td>
<td colspan="2" data-lgid="P_WO_EMAILADDRESSESTIPS">Separate multiple manually entered email addresses with a semi-colon (;).</td>
</tr>
<tr>
<td><span data-lgid="P_WO_OTHEREMAILADDRESS">Other Email Address</span>
<input type="text" id="sendworkorder_otheremailaddress" style="width: 312px;" autocomplete="off" /></td>
<td style="text-align:right;padding-right:5px;"><span data-lgid="P_WO_OTHEREMAILADDRESS">Other Email Address</span></td>
<td>
<input type="text" id="sendworkorder_otheremailaddress" style="width: 350px;" autocomplete="off" /></td>
</tr>
<%-- <tr>
<td><span>Other Text Address</span>
@ -2637,11 +2848,9 @@
</td>
</tr>--%>
<tr>
<td data-lgid="P_WO_DESCRIPTION_COLON">Description:</td>
</tr>
<tr>
<td style="text-align:right;padding-right:5px;"><span data-lgid="P_WO_DESCRIPTION">Description</span></td>
<td>
<textarea id="sendworkorder_desc" style="width: 410px; height: 80px; resize: none; margin-left: 12px;" tabindex="151"></textarea></td>
<textarea id="sendworkorder_desc" style="width: 350px; height: 80px; resize: none;" tabindex="151"></textarea></td>
</tr>
</table>
</div>
@ -2652,32 +2861,38 @@
</div>
</div>
<div class="dialog" id="sendicemailpopupdialog" style="display: none; width: 485px;">
<div class="dialog" id="sendicemailpopupdialog" style="display: none; width: 510px;">
<div class="dialog-title"><span class="title" data-lgid="P_WO_SENDINTERNALCOMMENTS">Send Internal Comments</span><em class="dialog-close"></em></div>
<div class="dialog-content">
<table style="line-height: 25px;">
<table style="line-height: 24px;">
<tr>
<td data-lgid="P_WO_SENDTHISTO">Who do you want to send this to? Select from existing relationships or manual entry.</td>
<td colspan="2" data-lgid="P_WO_SENDTHISTO">Who do you want to send this to? Select from existing relationships or manual entry.</td>
</tr>
<tr>
<td colspan="2">
<input type="text" id="sendinternalcomments_search" style="width: 445px; margin-left: 10px;" placeholder="Search" /></td>
</tr>
<tr>
<td>
<td colspan="2">
<div id="iccontactlist" style="height: 240px; width: 440px; margin-left: 10px; margin-right: 10px;"></div>
</td>
</tr>
<tr>
<td data-lgid="P_WO_EMAILADDRESSESTIPS">Separate multiple manually entered email addresses with a semi-colon (;).</td>
<td colspan="2" data-lgid="P_WO_EMAILADDRESSESTIPS">Separate multiple manually entered email addresses with a semi-colon (;).</td>
</tr>
<tr>
<td><span data-lgid="P_WO_OTHEREMAILADDRESS">Other Email Address</span>
<input type="text" id="sendic_otheremailaddress" style="width: 332px;" autocomplete="off" /></td>
<td style="text-align:right;padding-right:5px;">
<span data-lgid="P_WO_OTHEREMAILADDRESS">Other Email Address</span>
</td>
<td>
<input type="text" id="sendic_otheremailaddress" style="width: 350px;" autocomplete="off" /></td>
</tr>
<tr>
<td><span data-lgid="P_WO_PHONENUMBER">Phone Number</span>
<input type="text" id="sendic_phonenumber" style="width: 353px; margin-left: 7px;" autocomplete="off" />
<td style="text-align:right;padding-right:5px;">
<span data-lgid="P_WO_PHONENUMBER">Phone Number</span>
</td>
<td>
<input type="text" id="sendic_phonenumber" style="width: 350px;" autocomplete="off" />
</td>
</tr>
</table>
@ -2714,7 +2929,7 @@
</div>
<div class="dialog" id="dialog_addcustomer" style="display: none; height: 100%; border-bottom: 0; border-top: 0;">
<iframe id="iframeuser" src="AddCustomerRecord.aspx" style="width: 100%; height: 100%; display: block; border: none;"></iframe>
<iframe id="iframecr" src="AddCustomerRecord.aspx" style="width: 100%; height: 100%; display: block; border: none;"></iframe>
<div class="maskbg" style="display: none;"></div>
</div>
@ -2747,7 +2962,7 @@
<div class="dialog-content">
<table style="line-height: 30px; margin-left: 10px; margin-right: 10px;">
<tr>
<td style="text-align: right; width:120px;">
<td style="text-align: right; width: 120px;">
<input id="dialog_chksendtextmsg" type="checkbox" style="width: unset;" /></td>
<td style="text-align: left;">
<label for="dialog_chksendtextmsg" data-lgid="P_WO_SENDUPDATETOCUSTOMER" style="user-select: none;">Send Update To Customer</label></td>
@ -2767,12 +2982,12 @@
<label for="dialog_chkIncludeStatusLink" data-lgid="P_WO_INCLUDESTATUSLINK" style="user-select: none;">Include Status Link</label></td>
</tr>
<tr>
<td class="label" style="width:120px;"><span data-lgid="P_WO_MESSAGE_COLON">Message:</span></td>
<td class="label" style="width: 120px;"><span data-lgid="P_WO_MESSAGE_COLON">Message:</span></td>
<td>
<select id="dialog_variables" style="width: 156px;">
<option value="0">[Site_Name]</option>
<option value="1">[Location]</option>
<option value="13">[Asset]</option>
<option value="14">[Asset]</option>
<option value="4">[VIN]</option>
<option value="2">[Make]</option>
<option value="3">[Model]</option>
@ -2786,18 +3001,40 @@
<option value="12">[Work_Order_Number]</option>
<option value="13">[Parts_Order_Number]</option>
</select>
<input type="button" id="dialog_insertfield" onclick="insertfield();" data-lgid="P_WO_ADD" style="width: 35px; height: auto; margin-left: 5px;" tabindex="1" />
<input type="button" id="dialog_insertfield" onclick="insertfield();" data-lgid="P_WO_ADD" style="width: auto; height: auto; margin-left: 5px;" tabindex="1" />
<br />
<textarea id="dialog_textmsg" tabindex="1" style="width: 320px; height: 120px; margin-top: 6px;" maxlength="2000"></textarea></td>
</tr>
<tr id="trselectatta">
<td>
<div style="font-size: 20px; margin-right: 5px; float: right;" onclick="openSelectAttachment()"><em class="spanbtn iconlink" style="font-weight: 900; font-size: 14px; cursor: pointer; padding-left: 0; padding-right: 3px; padding-top: 0;" data-title-lgid="P_WO_SELECTATTACHMENT"></em></div>
</td>
<td>
<span id="span_attachmentname" style="float: left; width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: pre;"></span>
<span id="span_attachmentdelete" onclick="onRemoveSelectedAttachment()" style="display: none;">
<em class="spanbtn icondelete" style="font-weight: 900; font-size: 14px; cursor: default; padding-left: 5px; padding-right: 3px; padding-top: 0;"></em></span>
</td>
</tr>
</table>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_WO_CANCEL" class="dialog-close" tabindex="1" />
<input type="button" id="btn_savestatuschange" value="Save Work Order and Send" data-lgid="P_WO_XXXXXX" style="width: unset;" tabindex="1" />
<input type="button" id="btn_savestatuschange" value="Save Work Order and Send" data-lgid="P_WO_SAVEWORKORDERANDSEND" style="width: unset;" tabindex="1" />
<div class="clear"></div>
</div>
<div class="maskbg" style="display: none;"></div>
<div id="statuschange_maskbg" class="maskbg" style="display: none;"></div>
</div>
<div class="dialog" id="dialog_selecteattachments" style="display: none;">
<div class="dialog-title"><span class="title" data-lgid="P_WO_SELECTATTACHMENT">Select Attachment</span><em class="dialog-close"></em></div>
<div class="dialog-content">
<div id="div_selectattachmentlist" style="height: 320px; width: 400px;"></div>
</div>
<div class="dialog-func">
<input type="button" value="Cancel" data-lgid="P_UM_CANCEL" class="dialog-close" tabindex="1" />
<input type="button" onclick="onSetSelectAttachment();" value="Attach" data-lgid="P_WO_ATTACH" tabindex="1" />
<div style="clear: both;"></div>
</div>
</div>
<div id="dialogattmask" class="maskbg" style="display: none;">
@ -2805,4 +3042,5 @@
<div class="loading c-spin"></div>
<lable class="lable_attuploadname"></lable>
</div>
<iframe id="ifdiv" style="height: 1px; width: 1px; display: none;"></iframe>
</asp:Content>