537 lines
		
	
	
		
			22 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			537 lines
		
	
	
		
			22 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
<%@ Page Title="" Language="C#" MasterPageFile="~/Maintenance/MaintenanceBase.master" AutoEventWireup="true" CodeFile="WorkOrderHistory.aspx.cs" Inherits="WorkOrderHistory" %>
 | 
						|
 | 
						|
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
 | 
						|
    <style type="text/css">
 | 
						|
        .no_wrap th {
 | 
						|
            white-space: nowrap;
 | 
						|
            overflow: hidden;
 | 
						|
            text-overflow: ellipsis;
 | 
						|
        }
 | 
						|
 | 
						|
        .max160 {
 | 
						|
            max-width: 160px;
 | 
						|
            overflow: hidden;
 | 
						|
            text-overflow: ellipsis;
 | 
						|
            white-space: nowrap;
 | 
						|
        }
 | 
						|
 | 
						|
 | 
						|
        #dialog_machines .dialog-content table td input {
 | 
						|
            width: auto;
 | 
						|
        }
 | 
						|
 | 
						|
        .dialog-content table td textarea {
 | 
						|
            margin-top: 6px;
 | 
						|
        }
 | 
						|
 | 
						|
        .dialog-content table td select {
 | 
						|
            width: 254px;
 | 
						|
            height: 24px;
 | 
						|
        }
 | 
						|
 | 
						|
        .dialog-content table td input[type="checkbox"] {
 | 
						|
            border: none;
 | 
						|
        }
 | 
						|
 | 
						|
        .dialog-content table td textarea {
 | 
						|
            height: 150px;
 | 
						|
            width: 420px;
 | 
						|
            max-width: 500px;
 | 
						|
        }
 | 
						|
 | 
						|
        .ctl_button {
 | 
						|
            font-family: 'CalciteWebCoreIcons';
 | 
						|
            display: block;
 | 
						|
            margin: 6px auto;
 | 
						|
            width: 60px;
 | 
						|
            height: 22px;
 | 
						|
            line-height: 21px;
 | 
						|
            padding: 0;
 | 
						|
        }
 | 
						|
 | 
						|
        .group_table .main_table {
 | 
						|
            table-layout: fixed;
 | 
						|
        }
 | 
						|
 | 
						|
            .group_table .main_table thead tr {
 | 
						|
                display: block;
 | 
						|
            }
 | 
						|
 | 
						|
            .group_table .main_table tbody {
 | 
						|
                height: 280px;
 | 
						|
                display: block;
 | 
						|
                overflow-y: auto;
 | 
						|
            }
 | 
						|
 | 
						|
            .group_table .main_table th {
 | 
						|
                width: 165px;
 | 
						|
            }
 | 
						|
 | 
						|
            .group_table .main_table td {
 | 
						|
                width: 165px;
 | 
						|
                white-space: nowrap;
 | 
						|
                word-break: keep-all;
 | 
						|
            }
 | 
						|
 | 
						|
                .group_table .main_table td div {
 | 
						|
                    width: 165px;
 | 
						|
                    overflow: hidden;
 | 
						|
                    white-space: nowrap;
 | 
						|
                    word-break: keep-all;
 | 
						|
                    text-overflow: ellipsis;
 | 
						|
                }
 | 
						|
 | 
						|
        .td_controller {
 | 
						|
            vertical-align: middle;
 | 
						|
            padding: 40px 8px;
 | 
						|
            /*border-left: 1px solid #b0b0b0;
 | 
						|
                border-right: 1px solid #b0b0b0;*/
 | 
						|
        }
 | 
						|
 | 
						|
        .ctl_button {
 | 
						|
            font-family: 'CalciteWebCoreIcons';
 | 
						|
            display: block;
 | 
						|
            margin: 6px auto;
 | 
						|
            width: 60px;
 | 
						|
            height: 22px;
 | 
						|
            line-height: 21px;
 | 
						|
            padding: 0;
 | 
						|
        }
 | 
						|
 | 
						|
        #tbwoh {
 | 
						|
            width: 100%;
 | 
						|
            line-height: 30px;
 | 
						|
            border-collapse: collapse;
 | 
						|
            border-spacing: 0;
 | 
						|
        }
 | 
						|
 | 
						|
            #tbwoh th {
 | 
						|
                border: 1px solid #bababa;
 | 
						|
                background-color: #d8dce1;
 | 
						|
                text-align: left;
 | 
						|
                border-right: 1px solid #bababa;
 | 
						|
                font-weight: bold;
 | 
						|
                position: relative;
 | 
						|
                padding-left: 5px;
 | 
						|
            }
 | 
						|
 | 
						|
            #tbwoh tr {
 | 
						|
                border-bottom: 1px solid #cacaca;
 | 
						|
            }
 | 
						|
 | 
						|
            #tbwoh td {
 | 
						|
                border-right: 1px solid #cacaca;
 | 
						|
                padding-left: 5px;
 | 
						|
            }
 | 
						|
    </style>
 | 
						|
    <script src="<%=GetFileUrlWithVersion("js/controls.js")%>" type="text/javascript"></script>
 | 
						|
    <script type="text/javascript">
 | 
						|
        woquery = function (method, param, callback, error) {
 | 
						|
            _network.request("Maintenance/WorkOrderHistory.aspx", -1, method, param, callback, error);
 | 
						|
        }
 | 
						|
 | 
						|
        function CloseDialog(type) {
 | 
						|
            $('#dialog_user').hideDialog();
 | 
						|
            OnRefresh();
 | 
						|
        }
 | 
						|
 | 
						|
        function OnRefresh() {
 | 
						|
            var woid = $('#div_wonumber').dropdownVal();
 | 
						|
            if (!woid) {
 | 
						|
                return;
 | 
						|
            }
 | 
						|
 | 
						|
            var begindate = $('#startdatetxt').val();
 | 
						|
            var enddate = $('#enddatetxt').val();
 | 
						|
            if (begindate && !$('#startdatetxt').is(':valid')) {
 | 
						|
                showAlert(GetTextByKey('P_COMMON_BEGINDATEISINVALID', "The begin date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
 | 
						|
                return;
 | 
						|
            }
 | 
						|
            if (enddate && !$('#enddatetxt').is(':valid')) {
 | 
						|
                showAlert(GetTextByKey('P_COMMON_ENDDATEISINVALID', "The end date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
 | 
						|
                return;
 | 
						|
            }
 | 
						|
            if (begindate && enddate && begindate > enddate) {
 | 
						|
                showAlert(GetTextByKey("P_JS_ENDDATEMUSTBELATERTHANBEGINDATE", "End Date must be later than Begin Date."), GetTextByKey("P_FR_ERROR", 'Error'));
 | 
						|
                return;
 | 
						|
            }
 | 
						|
 | 
						|
            showloading(true);
 | 
						|
 | 
						|
            var searchtxt = "";
 | 
						|
            searchtxt = htmlencode($.trim($('#searchinputtxt').val()));
 | 
						|
            woquery('GetWorkOrderHistorys', JSON.stringify([woid, begindate, enddate, searchtxt]), function (data) {
 | 
						|
                showloading(false);
 | 
						|
                if (typeof (data) === "string") {
 | 
						|
                    showAlert(data, GetTextByKey('P_WORKORDER', "Work Order"));
 | 
						|
                    return;
 | 
						|
                }
 | 
						|
                showWorkOrderList(data);
 | 
						|
            }, function (err) {
 | 
						|
                showloading(false);
 | 
						|
            });
 | 
						|
        }
 | 
						|
 | 
						|
        function showWorkOrderList(data) {
 | 
						|
            var wohlist = $("#wohlist").empty();
 | 
						|
            //var logid = -1;
 | 
						|
            var datetime = "";
 | 
						|
            var ftr = null;
 | 
						|
            var count = 0;
 | 
						|
            for (var i = 0; i < data.length; i++) {
 | 
						|
                var r = data[i];
 | 
						|
 | 
						|
                var type = "";
 | 
						|
                var status = "";
 | 
						|
                var category = "";
 | 
						|
                if (r.UpdateType == 0)
 | 
						|
                    type = GetTextByKey('P_WO_HIS_MANUALLY', 'Manually');
 | 
						|
                else if (r.UpdateType == 1)
 | 
						|
                    type = GetTextByKey('P_WO_HIS_AUTOMATICALLY', 'Automatically');
 | 
						|
                else if (r.UpdateType == 2)
 | 
						|
                    type = GetTextByKey('P_WO_HIS_SYSTEM', 'System');
 | 
						|
 | 
						|
                if (r.UpdateStatus == 0)
 | 
						|
                    status = GetTextByKey('P_WO_HIS_CREATED', 'Created');
 | 
						|
                else if (r.UpdateStatus == 1 || r.UpdateStatus == 4 || r.UpdateStatus == 9999)
 | 
						|
                    status = GetTextByKey('P_WO_HIS_MODIFIED', 'Modified');
 | 
						|
                else if (r.UpdateStatus == 2)
 | 
						|
                    status = GetTextByKey('P_WO_HIS_CLOSED', 'Closed');
 | 
						|
                else if (r.UpdateStatus == 3)
 | 
						|
                    status = GetTextByKey('P_WO_HIS_REOPENED', 'Re_Opened');
 | 
						|
                //else if (r.UpdateStatus == 4)
 | 
						|
                //    status = GetTextByKey('P_WO_HIS_RESTORED', 'Restored');
 | 
						|
                //else if (r.UpdateStatus == 9999)
 | 
						|
                //    status = GetTextByKey('P_WO_HIS_DELETED', 'Deleted');
 | 
						|
 | 
						|
                switch (r.Category) {
 | 
						|
                    case 0:
 | 
						|
                        category = GetTextByKey('P_WO_WORKORDERSTATUS', 'Work Order Status');
 | 
						|
                        break;
 | 
						|
                    case 1:
 | 
						|
                        category = GetTextByKey('P_WO_ASSIGNEDTO', 'Assigned To');
 | 
						|
                        break;
 | 
						|
                    case 2:
 | 
						|
                        category = GetTextByKey('P_WO_ADVISOR', 'Advisor');
 | 
						|
                        break;
 | 
						|
                    case 3:
 | 
						|
                        category = GetTextByKey('P_WO_WORKORDERTYPE', 'Work Order Type');
 | 
						|
                        break;
 | 
						|
                    case 4:
 | 
						|
                        category = GetTextByKey('P_WO_LOCATION', 'Location');
 | 
						|
                        break;
 | 
						|
                    case 5:
 | 
						|
                        category = GetTextByKey('P_WO_DEPARTMENT', 'Department');
 | 
						|
                        break;
 | 
						|
                    case 6:
 | 
						|
                        category = GetTextByKey('P_WO_ALTERNATESTATUS', 'Alternate Status');
 | 
						|
                        break;
 | 
						|
                    case 7:
 | 
						|
                        category = GetTextByKey('P_WO_DESCRIPTION', 'Description');
 | 
						|
                        break;
 | 
						|
                    case 8:
 | 
						|
                        category = GetTextByKey('P_WO_INVOICENUMBER', 'Invoice Number');
 | 
						|
                        break;
 | 
						|
                    case 9:
 | 
						|
                        category = GetTextByKey('P_WO_INTERNALID', 'Internal ID');
 | 
						|
                        break;
 | 
						|
                    case 10:
 | 
						|
                        category = GetTextByKey('P_WO_COMPLETEDATE', 'Complete Date');
 | 
						|
                        break;
 | 
						|
                    case 11:
 | 
						|
                        category = GetTextByKey('P_WO_NEXTFOLLOWUPDATE', 'Next Follow Up Date');
 | 
						|
                        break;
 | 
						|
                    case 12:
 | 
						|
                        category = GetTextByKey('P_WO_DUEDATE', 'Due Date');
 | 
						|
                        break;
 | 
						|
                    case 13:
 | 
						|
                        category = GetTextByKey('P_WO_PARTSEXPECTEDDATE', 'Parts Expected Date');
 | 
						|
                        break;
 | 
						|
                    case 14:
 | 
						|
                        category = GetTextByKey('P_WO_LASTLABORDATE', 'Last Labor Date');
 | 
						|
                        break;
 | 
						|
                    case 15:
 | 
						|
                        category = GetTextByKey('P_WO_TOTALCOST', 'Total Cost');
 | 
						|
                        break;
 | 
						|
                    case 16:
 | 
						|
                        category = GetTextByKey('P_WO_EXPECTEDCOST', 'Expected Cost');
 | 
						|
                        break;
 | 
						|
                    case 17:
 | 
						|
                        category = GetTextByKey('P_WO_PARTSCOST1', 'Parts Cost');
 | 
						|
                        break;
 | 
						|
                    case 18:
 | 
						|
                        category = GetTextByKey('P_WO_TRAVELTIMECOST1', 'Travel Time Cost');
 | 
						|
                        break;
 | 
						|
                    case 19:
 | 
						|
                        category = GetTextByKey('P_WO_LABORCOST1', 'Labor Cost');
 | 
						|
                        break;
 | 
						|
                    case 20:
 | 
						|
                        category = GetTextByKey('P_WO_OTHERCOST1', 'Other Cost');
 | 
						|
                        break;
 | 
						|
                    case 21:
 | 
						|
                        category = GetTextByKey('P_WO_ESTIMATE', 'Estimate');
 | 
						|
                        break;
 | 
						|
                    case 22:
 | 
						|
                        category = GetTextByKey('P_WO_INSPECTION', 'Inspection');
 | 
						|
                        break;
 | 
						|
                    case 23:
 | 
						|
                        category = GetTextByKey('P_WO_INVOICE', 'Invoice');
 | 
						|
                        break;
 | 
						|
                    case 24:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTUSER', 'Segment User');
 | 
						|
                        break;
 | 
						|
                    case 25:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTHOURS', 'Segment Hours');
 | 
						|
                        break;
 | 
						|
                    case 26:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTJOBSITE', 'Segment Jobsite');
 | 
						|
                        break;
 | 
						|
                    case 27:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTCOST', 'Segment Cost');
 | 
						|
                        break;
 | 
						|
                    case 28:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTCOMPONENT', 'Segment Component');
 | 
						|
                        break;
 | 
						|
                    case 29:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTCOMPLETED', 'Segment Completed');
 | 
						|
                        break;
 | 
						|
                    case 30:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTCOMPLETEDDATE', 'Segment Completed Date');
 | 
						|
                        break;
 | 
						|
                    case 31:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTDESCRIPTION', 'Segment Description');
 | 
						|
                        break;
 | 
						|
                    case 32:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTNOTES', 'Segment Notes');
 | 
						|
                        break;
 | 
						|
                    case 33:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENT', 'Segment');
 | 
						|
                        break;
 | 
						|
                    case 34:
 | 
						|
                        category = GetTextByKey('P_WO_ALERTS', 'Alerts');
 | 
						|
                        break;
 | 
						|
                    case 35:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTTYPE', 'Segment Type');
 | 
						|
                        break;
 | 
						|
                    case 36:
 | 
						|
                        category = GetTextByKey('P_WO_SEGMENTBILLABLE', 'Segment Billable');
 | 
						|
                        break;
 | 
						|
                    case 37:
 | 
						|
                        category = GetTextByKey('P_WO_COMPONENT', 'Component');
 | 
						|
                        break;
 | 
						|
                    case 38:
 | 
						|
                        category = GetTextByKey('P_WO_BILLABLE', 'Billable');
 | 
						|
                        break;
 | 
						|
                    case 39:
 | 
						|
                        category = GetTextByKey('P_WO_BILLTOJOB', 'Bill to job');
 | 
						|
                        break;
 | 
						|
                    case 40:
 | 
						|
                        category = GetTextByKey('P_WO_WORKORDERATTACHMENT', 'Work Order Attachment');
 | 
						|
                        break;
 | 
						|
                    case 41:
 | 
						|
                        category = GetTextByKey('P_WO_ESTIMATEATTACHMENT', 'Estimate Attachment');
 | 
						|
                        break;
 | 
						|
                    case 42:
 | 
						|
                        category = GetTextByKey('P_WO_INVOICEATTACHMENT', 'Invoice Attachment');
 | 
						|
                        break;
 | 
						|
                    case 43:
 | 
						|
                        category = GetTextByKey('P_WO_COMPANYNAME', 'Company Name');
 | 
						|
                        break;
 | 
						|
                    case 44:
 | 
						|
                        category = GetTextByKey('P_WO_ASSET', 'Asset');
 | 
						|
                        break;
 | 
						|
                    case 45:
 | 
						|
                        category = GetTextByKey('P_WO_PARTSORDERNUMBER', 'Parts Order Number');
 | 
						|
                        break;
 | 
						|
                    case 46:
 | 
						|
                        category = GetTextByKey('P_WO_PARTSSTATUS', 'Parts Status');
 | 
						|
                        break;
 | 
						|
                    case 47:
 | 
						|
                        category = GetTextByKey('P_WO_SALESPERSON', 'Salesperson');
 | 
						|
                        break;
 | 
						|
                    case 48:
 | 
						|
                        category = GetTextByKey('P_WO_INSPECTIONTEMPLATE', 'Inspection Template');
 | 
						|
                        break;
 | 
						|
                    case 49:
 | 
						|
                        category = GetTextByKey('P_WO_MESSAGESTATUS', 'Message Status');
 | 
						|
                        break;
 | 
						|
                    case 50:
 | 
						|
                        category = GetTextByKey('P_WO_PONUMBER', 'PO Number');
 | 
						|
                        break;
 | 
						|
                    case 97:
 | 
						|
                        category = GetTextByKey('P_WO_HIS_DELETED', 'Deleted');
 | 
						|
                        break;
 | 
						|
                    case 98:
 | 
						|
                        category = GetTextByKey('P_WO_HIS_RESTORED', 'Restored');
 | 
						|
                        break;
 | 
						|
                    case 99:
 | 
						|
                        category = GetTextByKey('P_WO_HIS_WOLIFECYCLE', 'WO Life Cycle');
 | 
						|
                        break;
 | 
						|
                    default:
 | 
						|
                        category = GetTextByKey('P_WO_HIS_OTHER', 'Other');
 | 
						|
                        break;
 | 
						|
                }
 | 
						|
 | 
						|
                var tr = $("<tr></tr>");
 | 
						|
                //if (logid != r.Id) {
 | 
						|
                if (datetime !== r.DateTimeStr) {
 | 
						|
                    if (ftr && count > 1)
 | 
						|
                        ftr.children().eq(0).attr("rowspan", count);
 | 
						|
                    count = 0;
 | 
						|
                    ftr = tr;
 | 
						|
                    tr.append($("<td></td>").text(r.DateTimeStr));
 | 
						|
                }
 | 
						|
                tr.append($("<td></td>").text(status));
 | 
						|
                tr.append($("<td></td>").text(type));
 | 
						|
                tr.append($("<td></td>").text(r.UpdateBy));
 | 
						|
                tr.append($("<td></td>").text(category));
 | 
						|
                tr.append($("<td></td>").text(r.Detail));
 | 
						|
                var td_del = $("<td></td>");
 | 
						|
                tr.append(td_del);
 | 
						|
                if (r.UpdateStatus == 9999 && r.CanDeleteAndRestore) {
 | 
						|
                    var span_del = $('<a href="#" data-lgid="P_WO_HIS_RESTORED">Restore</a>').data('wo', r).click(ManageDeleteAndRestore);
 | 
						|
                    td_del.append(span_del);
 | 
						|
                }
 | 
						|
                if (i % 2 == 1)
 | 
						|
                    tr.css("background-color", "#f1f4f8");
 | 
						|
 | 
						|
                wohlist.append(tr);
 | 
						|
                //logid = r.Id;
 | 
						|
                datetime = r.DateTimeStr;
 | 
						|
                count++;
 | 
						|
            }
 | 
						|
            if (ftr && count > 1)
 | 
						|
                ftr.children().eq(0).attr("rowspan", count);
 | 
						|
        }
 | 
						|
 | 
						|
        function ManageDeleteAndRestore() {
 | 
						|
            var wo = $(this).data('wo');
 | 
						|
            if (!wo)
 | 
						|
                return;
 | 
						|
 | 
						|
            var alerttitle = GetTextByKey('P_WORKORDER', "Work Order");
 | 
						|
            showConfirm(GetTextByKey("P_WO_HIS_AREYOUSUREYOUWANTTORESTORETHISWORKORDER", 'Are you sure you want to restore this work order?'), alerttitle, function () {
 | 
						|
                woquery("RestoreDeleteWorkOrder", wo.WorkOrderId, function (data) {
 | 
						|
                    if (data == "OK")
 | 
						|
                        OnRefresh();
 | 
						|
                }, function (err) {
 | 
						|
                    showAlert(GetTextByKey("P_WO_HIS_FAILEDTORESTORETHISWORKORDER", 'Failed to restore this work order.'), alerttitle);
 | 
						|
                });
 | 
						|
            });
 | 
						|
        }
 | 
						|
 | 
						|
 | 
						|
        function GetWorkOrderNumbers() {
 | 
						|
            woquery('GetWorkOrderNumbers', '', function (data) {
 | 
						|
                if (typeof (data) === "string") {
 | 
						|
                    showAlert(data, GetTextByKey("P_AM_ERROR", 'Error'));
 | 
						|
                    return;
 | 
						|
                }
 | 
						|
                $('#div_wonumber').dropdownSource(data);
 | 
						|
            });
 | 
						|
        }
 | 
						|
 | 
						|
        $(function () {
 | 
						|
            setPageTitle(GetTextByKey("P_WORKORDERHISTORY", "Work Order History"), true);
 | 
						|
            $('#div_wonumber').dropdown([], {
 | 
						|
                search: true,
 | 
						|
                valueKey: 'Key',
 | 
						|
                textKey: 'Value'
 | 
						|
            });
 | 
						|
 | 
						|
            GetWorkOrderNumbers();
 | 
						|
            OnRefresh();
 | 
						|
            $('#searchinputtxt').keydown(searchEnter);
 | 
						|
            $(window).resize(function () {
 | 
						|
                $("#divwoh").css("height", $(window).height() - $("#divwoh").offset().top - 4);
 | 
						|
                //grid_dt && grid_dt.resize();
 | 
						|
            }).resize();
 | 
						|
 | 
						|
            if (!canExport) {
 | 
						|
                $('#spExport').hide();
 | 
						|
            }
 | 
						|
 | 
						|
        });
 | 
						|
 | 
						|
        function searchEnter(e) {
 | 
						|
            if (e.keyCode == 13 || e.keyCode == 9) {
 | 
						|
                OnRefresh();
 | 
						|
            }
 | 
						|
        }
 | 
						|
 | 
						|
        function OnExport() {
 | 
						|
            var woid = $('#div_wonumber').dropdownVal();
 | 
						|
            if (!woid) {
 | 
						|
                return;
 | 
						|
            }
 | 
						|
 | 
						|
            var begindate = $('#startdatetxt').val();
 | 
						|
            var enddate = $('#enddatetxt').val();
 | 
						|
            if (begindate && !$('#startdatetxt').is(':valid')) {
 | 
						|
                showAlert(GetTextByKey('P_COMMON_BEGINDATEISINVALID', "The begin date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
 | 
						|
                return;
 | 
						|
            }
 | 
						|
            if (enddate && !$('#enddatetxt').is(':valid')) {
 | 
						|
                showAlert(GetTextByKey('P_COMMON_ENDDATEISINVALID', "The end date is invalid."), GetTextByKey("P_FR_ERROR", 'Error'));
 | 
						|
                return;
 | 
						|
            }
 | 
						|
            if (begindate && enddate && begindate > enddate) {
 | 
						|
                showAlert(GetTextByKey("P_JS_ENDDATEMUSTBELATERTHANBEGINDATE", "End Date must be later than Begin Date."), GetTextByKey("P_FR_ERROR", 'Error'));
 | 
						|
                return;
 | 
						|
            }
 | 
						|
 | 
						|
            var searchtxt = "";
 | 
						|
            window.open("../ExportToFile.aspx?type=wohis&t=" + searchtxt + "&from=" + begindate + "&to=" + enddate + "&woid=" + woid);
 | 
						|
        }
 | 
						|
    </script>
 | 
						|
</asp:Content>
 | 
						|
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
 | 
						|
    <div style="min-width: 400px;">
 | 
						|
        <div class="page_title" data-lgid="P_WO_HIS_WORKORDERHISTORY">Work Order History</div>
 | 
						|
        <div class="search_bar">
 | 
						|
            <input type="password" autocomplete="new-password" style="display: none" />
 | 
						|
            <span data-lgid="P_WO_WORKORDERNUMBER_COLON">Work Order Number:</span>
 | 
						|
            <div class="dropdown" id="div_wonumber" style="width: 200px"></div>
 | 
						|
            <span style="margin-left: 5px;" data-lgid="P_FR_BEGINDATE_COLON">Begin Date: </span>
 | 
						|
            <div>
 | 
						|
                <input id="startdatetxt" type="date" class="type-date" required min="1900-01-01" style="width: 90px; margin-left: 5px;" value="<%=BeginDate %>" autocomplete="off" />
 | 
						|
            </div>
 | 
						|
            <span style="margin-left: 5px;" data-lgid="P_FR_ENDDATE_COLON">End Date: </span>
 | 
						|
            <div>
 | 
						|
                <input id="enddatetxt" type="date" class="type-date" required min="1900-01-01" style="width: 90px; margin-left: 5px;" value="<%=EndDate %>" autocomplete="off" />
 | 
						|
            </div>
 | 
						|
            <div style="display: none;">
 | 
						|
                <input id="searchinputtxt" autocomplete="off" style="width: 100px; margin-left: 5px;" />
 | 
						|
            </div>
 | 
						|
            <input class="search" type="button" onclick="OnRefresh();" style="margin-left: 10px;" value="Search" data-lgid="P_FR_SEARCH" />
 | 
						|
        </div>
 | 
						|
        <div class="function_title">
 | 
						|
            <span class="sbutton iconrefresh" onclick="OnRefresh();" data-lgid="P_UM_REFRESH">Refresh</span>
 | 
						|
            <span id="spExport" class="sbutton iconexport" onclick="OnExport();" data-lgid="P_MR_EXPORTTOEXCEL">Export to Excel</span>
 | 
						|
        </div>
 | 
						|
        <div class="clear"></div>
 | 
						|
        <div id="divwoh" style="overflow: auto;">
 | 
						|
            <table id="tbwoh" style="min-width: 1250px; table-layout: fixed;">
 | 
						|
                <thead>
 | 
						|
                    <tr>
 | 
						|
                        <th style="width: 150px;" data-lgid="P_WO_HIS_DATETIMESTAMP">Date/Time Stamp</th>
 | 
						|
                        <th style="width: 80px;" data-lgid="P_WO_HIS_UPDATE">Update</th>
 | 
						|
                        <th style="width: 120px;" data-lgid="P_WO_HIS_UPDATETYPE">Update Type</th>
 | 
						|
                        <th style="width: 200px;" data-lgid="P_WO_HIS_BY">By</th>
 | 
						|
                        <th style="width: 200px;" data-lgid="P_WO_HIS_CATEGORY">Category</th>
 | 
						|
                        <th style="width: 400px;" data-lgid="P_WO_HIS_DETAIL">Detail</th>
 | 
						|
                        <th></th>
 | 
						|
                    </tr>
 | 
						|
                </thead>
 | 
						|
                <tbody id="wohlist" style="border: 1px solid #cacaca; overflow: hidden; text-overflow: ellipsis;">
 | 
						|
                </tbody>
 | 
						|
            </table>
 | 
						|
        </div>
 | 
						|
 | 
						|
        <div id="mask_bg" style="display: none;">
 | 
						|
            <div class="loading c-spin"></div>
 | 
						|
        </div>
 | 
						|
    </div>
 | 
						|
</asp:Content>
 | 
						|
 |