1541 lines
76 KiB
Plaintext
1541 lines
76 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/MachineDeviceManagement/DeviceManagementBase.master" AutoEventWireup="true" CodeFile="ManageMachines.aspx.cs" Inherits="ManageMachines" %>
|
|
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
|
|
<style type="text/css">
|
|
::-ms-clear, ::-ms-reveal {
|
|
display: none;
|
|
}
|
|
|
|
.selectinput {
|
|
width: 150px;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.dialog-content table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
|
|
.dialog-content table td.label {
|
|
width: 184px;
|
|
text-align: right;
|
|
padding-right: 10px;
|
|
line-height: 24px;
|
|
height: 24px;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.dialog-content table td input,
|
|
.dialog-content table td textarea {
|
|
border: 1px solid #a9a9a9;
|
|
width: 200px;
|
|
height: 18px;
|
|
padding: 1px;
|
|
}
|
|
|
|
.dialog-content table td input[type="checkbox"] {
|
|
border: none;
|
|
width: 13px;
|
|
}
|
|
|
|
.dialog-content table td input[type="radio"] {
|
|
border: none;
|
|
width: unset;
|
|
}
|
|
|
|
.dialog-content table td textarea {
|
|
height: 100px;
|
|
}
|
|
|
|
#dialogdatatb td {
|
|
padding-top: 30px;
|
|
}
|
|
|
|
.a {
|
|
text-decoration: none;
|
|
color: #2140fb;
|
|
}
|
|
|
|
.categoryname {
|
|
cursor: default;
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
padding-top: 5px;
|
|
}
|
|
|
|
.plus:before {
|
|
font-size: 10px;
|
|
font-weight: normal;
|
|
font-family: 'CalciteWebCoreIcons', 'Fontawesome';
|
|
content: '\e620';
|
|
}
|
|
|
|
.minus:before {
|
|
font-size: 10px;
|
|
font-weight: normal;
|
|
font-family: 'CalciteWebCoreIcons', 'Fontawesome';
|
|
content: '\e621';
|
|
}
|
|
|
|
.dialogedit:before {
|
|
font-size: 14px;
|
|
font-weight: normal;
|
|
font-family: 'CalciteWebCoreIcons', 'Fontawesome';
|
|
content: '\e61b';
|
|
cursor: pointer;
|
|
background: rgb(249, 189, 117);
|
|
padding: 2px;
|
|
}
|
|
|
|
.dialogok:before {
|
|
font-size: 14px;
|
|
font-weight: normal;
|
|
font-family: 'CalciteWebCoreIcons', 'Fontawesome';
|
|
content: '\e605';
|
|
cursor: pointer;
|
|
background: rgb(249, 189, 117);
|
|
padding: 2px;
|
|
}
|
|
|
|
.dialogcancel:before {
|
|
font-size: 14px;
|
|
font-weight: normal;
|
|
font-family: 'CalciteWebCoreIcons', 'Fontawesome';
|
|
content: '\e600';
|
|
cursor: pointer;
|
|
background: rgb(249, 189, 117);
|
|
padding: 2px;
|
|
}
|
|
|
|
.dialogbtn {
|
|
height: 24px;
|
|
cursor: pointer;
|
|
background: rgb(249, 189, 117);
|
|
padding: 2px;
|
|
}
|
|
|
|
.machinetd {
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.popus-close {
|
|
float: right;
|
|
margin-right: 6px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.popus-close:before {
|
|
content: '\e600';
|
|
}
|
|
|
|
textarea {
|
|
resize: none;
|
|
}
|
|
|
|
#machinelist {
|
|
height: 490px;
|
|
width: 100%;
|
|
}
|
|
|
|
.dulpicatetd {
|
|
font-weight: 700;
|
|
width: 190px;
|
|
text-align: right;
|
|
padding-right: 20px;
|
|
}
|
|
</style>
|
|
<link href="<%=GetFileUrlWithVersion("../css/panel.css")%>" rel="stylesheet" />
|
|
<link href="<%=GetFileUrlWithVersion("../Security/css/controls.css")%>" rel="stylesheet" />
|
|
<link href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" rel="stylesheet" />
|
|
<link href="<%=GetFileUrlWithVersion("../css/tabcontrol.css")%>" rel="stylesheet" />
|
|
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../js/vue.min.js")%>"></script>
|
|
<script>Vue.config.productionTip = false; Vue.config.silent = true;</script>
|
|
<script type="text/javascript" src="<%=GetFileUrlWithVersion("../js/components/datagrid.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")%>" type="text/javascript"></script>
|
|
<script src="<%=GetFileUrlWithVersion("../js/controls.js")%>" type="text/javascript"></script>
|
|
<script src="<%=GetFileUrlWithVersion("../fic/js/utility.js")%>" type="text/javascript"></script>
|
|
<script src="<%=GetFileUrlWithVersion("../js/gridlayout.js")%>" type="text/javascript"></script>
|
|
<script src="<%=GetFileUrlWithVersion("js/mergeasset.js")%>"></script>
|
|
<script type="text/javascript">
|
|
var IsDealer = <%=IsDealer ?"true":"false"%>;
|
|
var IsAdmin =<%=IsAdmin ?"true":"false"%>;
|
|
var IsSupperAdmin =<%=IsSupperAdmin ?"true":"false"%>;
|
|
var CheckRight =<%=CheckRight ?"true":"false"%>;
|
|
var IsReadOnly = <%=IsReadOnly ?"true":"false"%>;
|
|
var gridLayoutID = "ManageAssets";
|
|
|
|
var machineID;
|
|
var indexInEdit = -1;
|
|
|
|
function devicerequest(method, param, callback, error) {
|
|
_network.request("MachineDeviceManagement/ManageMachines.aspx", -1, method, param, callback, error || function (e) {
|
|
showmaskbg(false, true);
|
|
showAlert(GetTextByKey('P_MA_PAGEERROR', 'An unknown error occurred. Please refresh page.'), GetTextByKey('P_MA_QUERY', 'Query'));
|
|
});
|
|
}
|
|
|
|
function worequest(method, param, callback, error) {
|
|
_network.request("Maintenance/AddWorkOrder.aspx", -1, method, param, callback, error || function (e) {
|
|
console.log(e);
|
|
showmaskbg(false, true);
|
|
showAlert(GetTextByKey('P_WO_PAGEERROR', 'An unknown error occurred. Please refresh page.'), GetTextByKey('P_WO_QUERY', 'Query'));
|
|
});
|
|
}
|
|
|
|
function assetrequest(method, param, callback, error) {
|
|
_network.request("MachineDeviceManagement/AddMachine.aspx", -1, method, param, callback, error || function (e) {
|
|
console.log(e);
|
|
showmaskbg(false, true);
|
|
showAlert(GetTextByKey('P_MA_PAGEERROR', 'An unknown error occurred. Please refresh page.'), GetTextByKey('P_MA_QUERY', 'Query'));
|
|
});
|
|
}
|
|
|
|
function CloseDialog(type) {
|
|
$('#dialog_machine1').hideDialog();
|
|
if (type == 1) {
|
|
OnRefresh();
|
|
}
|
|
else {
|
|
showmaskbg(false);
|
|
}
|
|
}
|
|
|
|
function ShowMachineDialog(type) {
|
|
showmaskbg(true);
|
|
$('#dialog_machine1')
|
|
.attr('act', type)
|
|
.showDialogRight();
|
|
}
|
|
|
|
function closePopupView(type) {
|
|
$('#dialog_assetview').hideDialog();
|
|
showmaskbg(false);
|
|
}
|
|
|
|
function ShowAssetViewDialog() {
|
|
showmaskbg(true);
|
|
$('#dialog_assetview').showDialogRight();
|
|
}
|
|
|
|
function OnAdd() {
|
|
var contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
|
|
|
ShowMachineDialog("add");
|
|
execIframeFunc("init", [contractorid], "iframemachine");
|
|
}
|
|
|
|
function OnEdit() {
|
|
indexInEdit = grid_dt.selectedIndex;
|
|
if (indexInEdit < 0) {
|
|
showAlert(GetTextByKey("P_MA_XXXXXX", "Please select an asset."), GetTextByKey("P_MA_EDITASSET", "Edit Asset"));
|
|
return;
|
|
}
|
|
var machine = grid_dt.source[indexInEdit].Values;
|
|
if (!machine) {
|
|
machineID = undefined;
|
|
return;
|
|
}
|
|
|
|
var contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
|
|
|
ShowMachineDialog("edit");
|
|
execIframeFunc("init", [contractorid, grid_dt.source, indexInEdit], "iframemachine");
|
|
return;
|
|
}
|
|
|
|
var lastContractorID = "-1";
|
|
function OnRefresh() {
|
|
var contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
|
if (IsDealer && !contractorid)
|
|
return;
|
|
|
|
var searchtxt = htmlencode($.trim($('#searchinputtxt').val()));
|
|
var showHidden = $('#chkShowHidden').prop("checked") ? 1 : 0;
|
|
var attachment = $('#chkAttachment').prop("checked") ? 1 : 0;
|
|
showloading(true);
|
|
assetrequest("GetMachinesByCompany", contractorid + String.fromCharCode(170) + showHidden + String.fromCharCode(170) + searchtxt + String.fromCharCode(170) + attachment, function (data) {
|
|
if (typeof (data) === "string") {
|
|
showAlert(data, GetTextByKey("P_MA_ERROR", 'Error'));
|
|
showloading(false);
|
|
return;
|
|
}
|
|
|
|
showMachines(data);
|
|
|
|
showloading(false);
|
|
}, function (err) {
|
|
showloading(false);
|
|
});
|
|
}
|
|
|
|
|
|
//admin用户 获取所有contractor
|
|
function getContractors() {
|
|
devicerequest('GetContractors', '', function (data) {
|
|
if (typeof (data) === "string") {
|
|
showAlert(data, GetTextByKey("P_MA_ERROR", 'Error'));
|
|
return;
|
|
}
|
|
if (data && data.length > 0) {
|
|
var sel_search = $('#sel_contractor').empty();
|
|
for (var i = 0; i < data.length; i++) {
|
|
var kv = data[i];
|
|
var op_search = $('<option></option>').val(kv.Key).text(kv.Value);
|
|
sel_search.append(op_search);
|
|
}
|
|
}
|
|
var contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
|
if (!contractorid || contractorid == "")
|
|
$("#btnAdd").hide();
|
|
$("#iframemachine").attr("src", "AddMachine.aspx?cid=" + contractorid);
|
|
OnRefresh();
|
|
|
|
});
|
|
}
|
|
|
|
//普通用户 获取可操作的contractor
|
|
function GetContractorsByUser() {
|
|
devicerequest('GetContractorsByUser', '', function (data) {
|
|
if (typeof (data) === "string") {
|
|
showAlert(data, GetTextByKey("P_MA_ERROR", 'Error'));
|
|
return;
|
|
}
|
|
if (data && data.length > 0) {
|
|
var sel_search = $('#sel_contractor').empty();
|
|
for (var i = 0; i < data.length; i++) {
|
|
var kv = data[i];
|
|
var op_search = $('<option></option>').val(kv.Key).text(kv.Value);
|
|
sel_search.append(op_search);
|
|
}
|
|
}
|
|
var contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
|
if (!contractorid || contractorid == "")
|
|
$("#btnAdd").hide();
|
|
$("#iframemachine").attr("src", "AddMachine.aspx?cid=" + contractorid);
|
|
OnRefresh();
|
|
});
|
|
}
|
|
|
|
function UpLoadMachineIcon(type, mid) {
|
|
var file = $('<input type="file" style="display: none;" accept="image/png,image/jpeg" />')
|
|
file.change(function () {
|
|
if (!/image\/\w+/.test(this.files[0].type)) {
|
|
showAlert(GetTextByKey("P_MA_UPLOADASSETICONTIPS", 'The file type for the asset icon is invalid. The file must be JPG or PNG.'), GetTextByKey("P_MA_SAVEASSET", 'Save Asset'));
|
|
return;
|
|
}
|
|
var iconfile = this.files[0];
|
|
if (type == 1) {
|
|
ChangeMachineIconFile(mid, iconfile, type);
|
|
}
|
|
else
|
|
ChangeMachineIconFile(machineID, iconfile, type);
|
|
}).click();
|
|
}
|
|
|
|
function ChangeMachineIconFile(mid, file, type) {
|
|
var ContractorID = $('#sel_contractor').val();
|
|
var item = {
|
|
'Key': ContractorID,
|
|
'Value': mid,
|
|
};
|
|
var machine = grid_dt.source[grid_dt.selectedIndex].Values;
|
|
|
|
var formData = new FormData();
|
|
formData.append("iconFile", file);
|
|
formData.append("MethodName", "ChangeMachineIconFile");
|
|
formData.append("ClientData", JSON.stringify(item));
|
|
$.ajax({
|
|
url: 'ManageMachines.aspx',
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
processData: false,
|
|
contentType: false,
|
|
data: formData,
|
|
async: true,
|
|
success: function (data) {
|
|
if (data !== 'OK') {
|
|
showAlert(data, GetTextByKey("P_MA_ICONFILE", 'Icon File'));
|
|
} else {
|
|
if (type == 1) {
|
|
if (file) {
|
|
machine.MachineIconFileName = file.name;
|
|
}
|
|
else {
|
|
machine.MachineIconFileName = "";
|
|
}
|
|
grid_dt.refresh();
|
|
}
|
|
else {
|
|
if (file)
|
|
$('#dialog_iconfilename').val(file.name);
|
|
else
|
|
$('#dialog_iconfilename').val('');
|
|
}
|
|
}
|
|
},
|
|
error: function (err) {
|
|
showAlert(err.statusText, GetTextByKey("P_MA_ICONFILE", 'Icon File'));
|
|
}
|
|
});
|
|
}
|
|
|
|
function RemoveMachineIcon1(mid) {
|
|
showConfirm(GetTextByKey("P_MA_DELETETHEICON", 'Do you want to delete this icon?'), GetTextByKey("P_MA_DELETEICON", 'Delete icon'), function () {
|
|
ChangeMachineIconFile(mid, undefined, 1);
|
|
});
|
|
}
|
|
|
|
function DeleteMachine(mid) {
|
|
var mids = [];
|
|
if (!mid) {
|
|
for (var i = 0; i < grid_dt.source.length; i++) {
|
|
var machine = grid_dt.source[i].Values;
|
|
if (machine.Selected && machine.ShareStatus !== 2)
|
|
mids.push(machine.ID);
|
|
}
|
|
}
|
|
else
|
|
mids.push(mid);
|
|
|
|
if (mids.length <= 0) {
|
|
showAlert(GetTextByKey("P_MA_XXXXXX", "Please select an asset."), GetTextByKey("P_MA_XXXXXX", "Delete Asset"));
|
|
return;
|
|
}
|
|
|
|
showConfirm(GetTextByKey("P_MA_XXXXXX", 'WARNING: This will delete the asset(s). Are you sure you want to proceed?'),
|
|
GetTextByKey("P_MA_XXXXX", 'Delete Asset'), function (e) {
|
|
doDeleteMachine(mids);
|
|
});
|
|
}
|
|
|
|
function doDeleteMachine(mids) {
|
|
var contractorid = $.trim($('#sel_contractor').val());
|
|
if (IsDealer && !contractorid)
|
|
return;
|
|
|
|
showmaskbg(true);
|
|
assetrequest("DeleteAssets", htmlencode(JSON.stringify([contractorid, JSON.stringify(mids), ""])), function (data) {
|
|
showmaskbg(false);
|
|
if (data != "") {
|
|
showAlert(data, GetTextByKey("P_MA_ERROR", 'Error'));
|
|
}
|
|
else {
|
|
//showAlert(GetTextByKey("P_MA_XXXXXX", 'Deleted Successfully.'), GetTextByKey("P_MA_ERROR", 'Error'));
|
|
OnRefresh();
|
|
}
|
|
}, function (err) {
|
|
showmaskbg(false);
|
|
});
|
|
}
|
|
|
|
function showMachines(data) {
|
|
var rows = [];
|
|
for (var i = 0; i < data.length; i++) {
|
|
var r = data[i];
|
|
for (var j in r) {
|
|
if (j === "EngineHoursDate")
|
|
r[j] = { DisplayValue: r["EngineHoursDateStr"], Value: r[j] };
|
|
if (j === "OdometerDate")
|
|
r[j] = { DisplayValue: r["OdometerDateStr"], Value: r[j] };
|
|
if (j === "AddedTime")
|
|
r[j] = { DisplayValue: r["AddedTimeStr"], Value: r[j] };
|
|
if (j === "CustomStatus") {
|
|
var text = "";
|
|
if (r["CustomStatus"] == 0)
|
|
text = GetTextByKey("P_MA_XXXXXX", "In Use");
|
|
else if (r["CustomStatus"] == 1)
|
|
text = GetTextByKey("P_MA_XXXXXX", "Available");
|
|
else if (r["CustomStatus"] == 2)
|
|
text = GetTextByKey("P_MA_XXXXXX", "Standby");
|
|
else if (r["CustomStatus"] == 10)
|
|
text = GetTextByKey("P_MA_XXXXXX", "Down");
|
|
|
|
r[j] = { DisplayValue: text, Value: r["CustomStatus"] };
|
|
}
|
|
else if (j === "MakeYear")
|
|
r[j] = r[j] === 0 ? "" : r[j];
|
|
else if (j === "EngineHours")
|
|
r[j] = { DisplayValue: r[j] === 0 ? "" : r[j].toLocaleString(), Value: r[j] };
|
|
else if (j === "Odometer")
|
|
r[j] = { DisplayValue: r[j] === 0 ? "" : (r[j].toLocaleString() + " " + r["OdometerUOM"]), Value: r[j] };
|
|
}
|
|
//r.CanEdit = !IsReadOnly && r.ShareStatus != 2
|
|
|
|
var fr = { Values: r };
|
|
rows.push(fr);
|
|
}
|
|
|
|
grid_dt.setData(rows);
|
|
}
|
|
|
|
var grid_dt;
|
|
function InitGridData() {
|
|
$('#btnEdit').attr("disabled", "disabled");
|
|
|
|
grid_dt = new GridView('#machinelist');
|
|
grid_dt.lang = {
|
|
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
|
ok: GetTextByKey("P_GRID_OK", "OK"),
|
|
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
|
};
|
|
//grid_dt.lang.all;
|
|
//grid_dt.lang.ok = "Apply";
|
|
//grid_dt.lang.reset;
|
|
var list_columns = [
|
|
{ name: 'Selected', caption: "", valueIndex: 'Selected', alwaysshow: true, css: { 'width': 40, 'text-align': 'center' }, type: 3 },
|
|
{ name: 'VIN', caption: GetTextByKey("P_MA_VINSN", "SN/VIN"), valueIndex: 'VIN', css: { 'width': 180, 'text-align': 'left' } },
|
|
{ name: 'Name', caption: GetTextByKey("P_MA_ASSETNAME", "Asset Name"), valueIndex: 'Name', css: { 'width': 180, 'text-align': 'left' } },
|
|
{ name: 'Name2', caption: GetTextByKey("P_MA_ASSETNAME2", "Asset Name(Custom)"), valueIndex: 'Name2', css: { 'width': 180, 'text-align': 'left' } },
|
|
{ name: 'Make', caption: GetTextByKey("P_MA_MAKE", "Make"), valueIndex: 'MakeName', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
|
{ name: 'Model', caption: GetTextByKey("P_MA_MODEL", "Model"), valueIndex: 'ModelName', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
|
{ name: 'MachineType', caption: GetTextByKey("P_MA_TYPE", "Asset Type"), valueIndex: 'TypeName', allowFilter: true, css: { 'width': 120, 'text-align': 'left' } },
|
|
{ name: 'MakeYear', caption: GetTextByKey("P_MA_YEAR", "Year"), valueIndex: 'MakeYear', allowFilter: true, css: { 'width': 80, 'text-align': 'left' } },
|
|
{ name: 'EngineHours', caption: GetTextByKey("P_MA_ENGINEHOURS", "Engine Hours"), valueIndex: 'EngineHours', css: { 'width': 120, 'text-align': 'left' } },
|
|
{ name: 'EngineHoursDate', caption: GetTextByKey("P_MA_ENGINEHOURSDATE", "Engine Hours Date"), valueIndex: 'EngineHoursDate', css: { 'width': 150, 'text-align': 'left' } },
|
|
{ name: 'Odometer', caption: GetTextByKey("P_MA_ODOMETER", "Odometer"), valueIndex: 'Odometer', css: { 'width': 120, 'text-align': 'left' } },
|
|
{ name: 'OdometerDate', caption: GetTextByKey("P_MA_ODOMETERDATE", "Odometer Date"), valueIndex: 'OdometerDate', css: { 'width': 150, 'text-align': 'left' } },
|
|
{ name: 'Description', caption: GetTextByKey("P_MA_DESCRIPTION", "Description"), valueIndex: 'Description', css: { 'width': 160, 'text-align': 'left' } },
|
|
{ name: 'Jobsite', caption: GetTextByKey("P_MA_XXXXXX", "Jobsite"), valueIndex: 'Jobsites', css: { 'width': 160, 'text-align': 'left' } },
|
|
{ name: 'GpsDeviceSN', caption: GetTextByKey("P_MA_PAIREDDEVICESN", "Paired Device SN"), valueIndex: 'CalampDeviceAirID', css: { 'width': 150, 'text-align': 'left' } },
|
|
{ name: 'AcquisitionType', caption: GetTextByKey("P_MA_XXXXXX", "AcquisitionType"), valueIndex: 'AcquisitionType', allowFilter: true, css: { 'width': 160, 'text-align': 'left' } },
|
|
{ name: 'AddedOn', caption: GetTextByKey("P_MA_ADDEDON", "Added On"), valueIndex: 'AddedTime', css: { 'width': 130, 'text-align': 'left' } },
|
|
{ name: 'CustomStatus', caption: GetTextByKey("P_MA_XXXXXX", "Availability"), valueIndex: 'CustomStatus', css: { 'width': 120, 'text-align': 'left' } },
|
|
{ name: 'PMPlan', caption: GetTextByKey("P_MA_XXXXXX", "PM Plan"), valueIndex: 'PMPlans', css: { 'width': 160, 'text-align': 'left' } },
|
|
{ name: 'AssetGroups', caption: GetTextByKey("P_JS_ASSETGROUP", "Asset Group"), valueIndex: 'AssetGroups', css: { 'width': 160, 'text-align': 'left' } },
|
|
|
|
{ name: 'OnRoad', caption: GetTextByKey("P_MA_ONROAD", "On-Road"), valueIndex: 'OnRoad', type: 3, allowFilter: true, css: { 'width': 90, 'text-align': 'center' } },
|
|
{ name: 'Attachment', caption: GetTextByKey("P_MA_ATTACHMENT", "Attachment"), valueIndex: 'Attachment', type: 3, allowFilter: true, css: { 'width': 96, 'text-align': 'center' } },
|
|
{ name: 'Hide', caption: GetTextByKey("P_MA_HIDE", "Hide"), valueIndex: 'Hide', type: 3, allowFilter: true, css: { 'width': 70, 'text-align': 'center' } },
|
|
{ name: 'TelematicsEnabled', caption: GetTextByKey("P_MA_TELEMATICSENABLED", "Telematics Enabled"), valueIndex: 'TelematicsEnabled', allowFilter: true, type: 3, css: { 'width': 140, 'text-align': 'center' } },
|
|
{ name: 'Preloaded', caption: GetTextByKey("P_MA_PRELOADED", "Preloaded"), valueIndex: 'Preloaded', type: 3, allowFilter: true, css: { 'width': 90, 'text-align': 'center' } },
|
|
|
|
{ name: 'UploadAssetIcon', caption: "", alwaysshow: true, css: { 'width': 30, 'text-align': 'center' } },
|
|
{ name: 'DeleteAssetIcon', caption: "", alwaysshow: true, css: { 'width': 30, 'text-align': 'center' } },
|
|
{ name: 'Detail', caption: "", alwaysshow: true, css: { 'width': 30, 'text-align': 'center' } },
|
|
{ name: 'DeleteAsset', caption: "", alwaysshow: true, css: { 'width': 30, 'text-align': 'center' } }
|
|
];
|
|
var columns = [];
|
|
// head
|
|
for (var hd in list_columns) {
|
|
var col = {};
|
|
col.name = list_columns[hd].name;
|
|
col.caption = list_columns[hd].caption;
|
|
col.visible = true;
|
|
col.sortable = true;
|
|
col.width = list_columns[hd].css.width;
|
|
col.align = list_columns[hd].css["text-align"]
|
|
col.key = list_columns[hd].valueIndex;
|
|
col.allowFilter = list_columns[hd].allowFilter;
|
|
|
|
col.alwaysshow = list_columns[hd].alwaysshow;
|
|
if (list_columns[hd].type) {
|
|
col.type = list_columns[hd].type;
|
|
}
|
|
if (!IsSupperAdmin && (col.name === "DeleteAsset" || col.name === "Selected" || col.name === "Preloaded"))
|
|
continue;
|
|
if (col.name === "Selected") {
|
|
col.allcheck = true;
|
|
col.sortable = false;
|
|
col.styleFilter = function (e) {
|
|
return {
|
|
display: e.ShareStatus === 2 ? 'none' : ''
|
|
};
|
|
};
|
|
col.attrs = { 'title': GetTextByKey("P_MA_XXXXXX", 'Select for deleteing asset') };
|
|
}
|
|
if (IsReadOnly && (col.name === "UploadAssetIcon" || col.name === "DeleteAssetIcon"))
|
|
continue;
|
|
if (col.name === "Hide" || col.name === "OnRoad" || col.name === "TelematicsEnabled" || col.name === "Attachment" || col.name === "Preloaded") {
|
|
col.onchanged = function (e) {
|
|
e.ValueChanged = true;
|
|
}
|
|
col.filterSource = [{ Value: true, DisplayValue: 'Yes' }, { Value: false, DisplayValue: 'No' }];
|
|
col.events = {
|
|
onchange: function () {
|
|
if (grid_dt.selectedColumnIndex >= 0) {
|
|
var name = grid_dt.columns[grid_dt.selectedColumnIndex].name;
|
|
ChangeAssetProperty(this, name);
|
|
}
|
|
}
|
|
};
|
|
//col.enabled = "CanEdit";
|
|
if (IsReadOnly) {
|
|
col.enabled = false;
|
|
}
|
|
}
|
|
else if (col.name === "UploadAssetIcon") {
|
|
col.sortable = false;
|
|
col.isurl = true;
|
|
col.text = "\uf093";
|
|
col.events = {
|
|
onclick: function () {
|
|
UpLoadMachineIcon(1, this.ID);
|
|
}
|
|
};
|
|
col.classFilter = function () {
|
|
return 'icon-col';
|
|
}
|
|
col.attrs = { 'title': GetTextByKey("P_MA_UPLOADASSETICON", 'Upload Asset Icon') };
|
|
}
|
|
else if (col.name === "DeleteAssetIcon") {
|
|
col.sortable = false;
|
|
col.isurl = true;
|
|
col.text = "\uf317";
|
|
//col.filter = function (e) {
|
|
// return e.MachineIconFileName === "" ? "" : "\uf00d";
|
|
//}
|
|
col.events = {
|
|
onclick: function () {
|
|
if (this.MachineIconFileName !== "")
|
|
RemoveMachineIcon1(this.ID);
|
|
}
|
|
};
|
|
col.classFilter = function (e) {
|
|
return "icon-col";
|
|
};
|
|
col.styleFilter = function (e) {
|
|
return {
|
|
display: e.MachineIconFileName === "" ? 'none' : ''
|
|
};
|
|
};
|
|
col.attrs = { 'title': GetTextByKey("P_MA_DELETEASSETICON", 'Delete Asset Icon') };
|
|
}
|
|
else if (col.name === "DeleteAsset") {
|
|
col.sortable = false;
|
|
col.isurl = true;
|
|
col.text = "\uf00d";
|
|
col.events = {
|
|
onclick: function () {
|
|
DeleteMachine(this.ID);
|
|
}
|
|
};
|
|
col.classFilter = function (e) {
|
|
return "icon-col";
|
|
};
|
|
col.styleFilter = function (e) {
|
|
return {
|
|
display: e.ShareStatus === 2 ? 'none' : ''
|
|
};
|
|
};
|
|
col.attrs = { 'title': GetTextByKey("P_MA_XXXXXX", 'Delete Asset') };
|
|
}
|
|
else if (col.name === "Detail") {
|
|
col.sortable = false;
|
|
col.isurl = true;
|
|
col.text = "\uf05a";
|
|
col.events = {
|
|
onclick: function () {
|
|
showMachineDetail(this.ID, this.VIN);
|
|
}
|
|
};
|
|
col.classFilter = function (e) {
|
|
return "icon-col";
|
|
};
|
|
col.attrs = { 'title': GetTextByKey("P_MA_SHOWASSETDETAIL", 'Show Asset Detail') };
|
|
}
|
|
columns.push(col);
|
|
}
|
|
grid_dt.canMultiSelect = false;
|
|
//grid_dt.columns = columns;
|
|
//grid_dt.init();
|
|
grid_dt.rowdblclick = OnEdit;
|
|
|
|
grid_dt.selectedrowchanged = function (rowindex) {
|
|
var rowdata = grid_dt.source[rowindex];
|
|
if (rowdata) {
|
|
machineID = rowdata.Values.ID;
|
|
$('#btnDelete').removeAttr("disabled");
|
|
$('#btnEdit').removeAttr("disabled");
|
|
}
|
|
}
|
|
grid_dt.allcolumns = columns;
|
|
getGridLayout(gridLayoutID, grid_dt, OnRefresh);
|
|
}
|
|
|
|
function changeGridSelectIndex(index) {
|
|
grid_dt.selectedIndexes = [index];
|
|
grid_dt.scrollToIndex(index);
|
|
}
|
|
|
|
function showMachineDetail(mid, vin) {
|
|
ShowAssetViewDialog();
|
|
var ctr = $("#sel_contractor").val();
|
|
if (!ctr) ctr = "";
|
|
|
|
execIframeFunc("loadAsset", [ctr, mid, vin, 1], "iframeassetview");
|
|
}
|
|
|
|
function setReadOnly() {
|
|
$('#btnAdd').hide();
|
|
}
|
|
|
|
var editableSelectFromAsset;
|
|
var editableSelectToAsset;
|
|
$(function () {
|
|
setPageTitle(GetTextByKey("P_MANAGEASSETS", "Manage Assets"), true);
|
|
$('.iconlayout').on('click', function (ev) {
|
|
CreateLayoutMenus(ev.target, gridLayoutID, grid_dt);
|
|
return false;
|
|
});
|
|
editableSelectFromAsset = new $editableselect($("#dialog_fromasset"));
|
|
editableSelectFromAsset.tabIndex(1);
|
|
editableSelectFromAsset.setEnable(false);
|
|
editableSelectFromAsset.change(function () {
|
|
var asset = editableSelectFromAsset.selecteditem();
|
|
if (!asset)
|
|
return;
|
|
showAssetDetail(asset.Id, 1);
|
|
});
|
|
|
|
editableSelectToAsset = new $editableselect($("#dialog_toasset"));
|
|
editableSelectToAsset.tabIndex(1);
|
|
editableSelectToAsset.setEnable(false);
|
|
editableSelectToAsset.change(function () {
|
|
var asset = editableSelectToAsset.selecteditem();
|
|
if (!asset)
|
|
return;
|
|
showAssetDetail(asset.Id, 2);
|
|
});
|
|
|
|
|
|
if (!CheckRight) {
|
|
$('#btnAdd').hide();
|
|
}
|
|
InitGridData();
|
|
|
|
if (IsReadOnly)
|
|
setReadOnly();
|
|
|
|
if (IsDealer == true) {
|
|
$('#span_contractor').css('display', '');
|
|
if (IsAdmin)
|
|
getContractors();
|
|
else {
|
|
GetContractorsByUser();
|
|
}
|
|
}
|
|
else {
|
|
$("#iframemachine").attr("src", "AddMachine.aspx");
|
|
//OnRefresh();
|
|
}
|
|
|
|
$("#sel_contractor").change(function () {
|
|
var contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
|
$("#iframemachine").attr("src", "AddMachine.aspx?cid=" + contractorid);
|
|
OnRefresh();
|
|
});
|
|
|
|
$('#searchinputtxt').keydown(searchEnter);
|
|
|
|
$('#dialog_mergeassets').dialog(function () {
|
|
showmaskbg(false);
|
|
})
|
|
|
|
$('#dialog_import').dialog(function () {
|
|
showmaskbg(false);
|
|
});
|
|
|
|
$('#dialog_import_result').dialog(function () {
|
|
showmaskbg(false);
|
|
});
|
|
|
|
$(window).resize(function () {
|
|
$("#machinelist").css("height", $(window).height() - $("#machinelist").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 ChangeAssetProperty(asset, name, value) {
|
|
var contractorid = "";
|
|
if (IsDealer)
|
|
contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
|
|
|
var ps = [];
|
|
ps.push(contractorid);
|
|
ps.push(asset.ID);
|
|
ps.push(name);
|
|
var value = asset.Hide;
|
|
if (name === "OnRoad")
|
|
value = asset.OnRoad;
|
|
else if (name === "TelematicsEnabled")
|
|
value = asset.TelematicsEnabled;
|
|
else if (name === "Attachment")
|
|
value = asset.Attachment;
|
|
else if (name === "Preloaded")
|
|
value = asset.Preloaded;
|
|
ps.push(value);
|
|
assetrequest('ChangeAssetProperty', JSON.stringify(ps), function (data) {
|
|
if (data) {
|
|
//showAlert('Saved successfully.', 'Save');
|
|
if ((name == "Hide" && value && !$('#chkShowHidden').prop("checked"))
|
|
|| (name == "Attachment" && value && !$('#chkAttachment').prop("checked")))
|
|
OnRefresh();
|
|
} else {
|
|
showAlert(data, GetTextByKey("P_MA_ERROR", 'Error'));
|
|
}
|
|
});
|
|
}
|
|
|
|
function OnExport() {
|
|
var contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
|
var searchtxt = htmlencode($.trim($('#searchinputtxt').val()));
|
|
var showHidden = $('#chkShowHidden').prop("checked") ? 1 : 0;
|
|
var attachment = $('#chkAttachment').prop("checked") ? 1 : 0;
|
|
|
|
var p = [contractorid, showHidden, searchtxt, attachment];
|
|
|
|
var layout = getLayoutOnGrid(grid_dt);
|
|
var ps = ["manageassets", JSON.stringify(p), JSON.stringify(layout)];
|
|
|
|
var data = new FormData();
|
|
data.append('type', 'set');
|
|
data.append('ClientData', JSON.stringify(ps));
|
|
$.ajax({
|
|
url: "../ExportToFile.aspx",
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
processData: false,
|
|
contentType: false,
|
|
data: data,
|
|
success: function (data) {
|
|
if (data && data != "")
|
|
window.open("../ExportToFile.aspx?type=exp&key=" + data);
|
|
},
|
|
error: function (err) {
|
|
}
|
|
});
|
|
}
|
|
|
|
function CreateImportColumns(excelcolumns) {
|
|
var tb = $('#tb_import');
|
|
tb.empty();
|
|
var columnsdata = getcolumnsdata();
|
|
for (var i = 0; i < columnsdata.length; i++) {
|
|
var col = columnsdata[i];
|
|
var tr = $('<tr></tr>');
|
|
tb.append(tr);
|
|
var td = $('<td class="label" style="width:150px;">' + col.Name + '</td>');
|
|
if (i < 1) {
|
|
var sp = $('<span style="color:red;">*</span>');
|
|
td.append(sp);
|
|
}
|
|
tr.append(td);
|
|
td = $('<td></td>');
|
|
tr.append(td);
|
|
var sel = CreateSelect(excelcolumns, col.Id);
|
|
td.append(sel);
|
|
}
|
|
}
|
|
|
|
function CreateSelect(excelcolumns, colid) {
|
|
var sel = $('<select style="width:180px;" name="sel_import"></select>').data('id', colid);
|
|
sel.append('<option></option>');
|
|
if (excelcolumns && excelcolumns.length > 0) {
|
|
for (var i = 0; i < excelcolumns.length; i++) {
|
|
var op = $('<option></option>').text(excelcolumns[i]).val(excelcolumns[i]);
|
|
sel.append(op);
|
|
}
|
|
sel.val(colid);
|
|
}
|
|
return sel;
|
|
}
|
|
|
|
function getcolumnsdata() {
|
|
var columnsdata = [
|
|
{ Id: "VIN/SN", Name: GetTextByKey("P_MA_VINSN", "VIN/SN"), Width: 120, Key: 'VIN' },
|
|
{ Id: "Asset Name", Name: GetTextByKey("P_MA_ASSETNAME", "Asset Name"), Width: 120, Key: 'Name' },
|
|
{ Id: "Asset Name(Custom)", Name: GetTextByKey("P_MA_ASSETNAME2", "Asset Name(Custom)"), Width: 120, Key: 'Name2' },
|
|
{ Id: "Year", Name: GetTextByKey("P_MA_YEAR", "Year"), Width: 120, Key: 'MakeYear' },
|
|
{ Id: "Asset Type", Name: GetTextByKey("P_MA_TYPE", "Asset Type"), Width: 120, Key: 'TypeName' },
|
|
{ Id: "Make", Name: GetTextByKey("P_MA_MAKE", "Make"), Width: 120, Key: 'MakeName' },
|
|
{ Id: "Model", Name: GetTextByKey("P_MA_MODEL", "Model"), Width: 120, Key: 'ModelName' },
|
|
{ Id: "Eq.Class", Name: GetTextByKey("P_MA_EQCLASS", "Eq.Class"), Width: 120, Key: 'EQClass' },
|
|
{ Id: "Description", Name: GetTextByKey("P_MA_DESCRIPTION", "Description"), Width: 120, Key: 'Description' },
|
|
{ Id: "Undercarriage Replacement Interval(Hours)", Name: GetTextByKey("P_MA_URINTERVAL", "Undercarriage Replacement Interval(Hours)"), Width: 120, Key: 'UnderCarriageHours' },
|
|
{ Id: "Acquisition Type", Name: GetTextByKey("P_MA_ACQUISITIONTYPE", "Acquisition Type"), Width: 120, Key: 'AquisitionType' },
|
|
{ Id: "Cost Center", Name: GetTextByKey("P_MA_COSTCENTER", "Cost Center"), Width: 120, Key: 'CostCenter' },
|
|
{ Id: "Hide/Hidden", Name: GetTextByKey("P_MA_HIDEHIDDEN", "Hide/Hidden"), Width: 120, Key: 'Hidden' },
|
|
{ Id: "On-Road", Name: GetTextByKey("P_MA_ONROAD", "On-Road"), Width: 120, Key: 'OnRoad' },
|
|
{ Id: "Telematics Enabled", Name: GetTextByKey("P_MA_TELEMATICSENABLED", "Telematics Enabled"), Width: 120, Key: 'TelematicsEnabled' },
|
|
{ Id: "Attachment", Name: GetTextByKey("P_MA_ATTACHMENT", "Attachment"), Width: 120, Key: 'Attachment' },
|
|
];
|
|
|
|
if (IsSupperAdmin) {
|
|
columnsdata.push({ Id: "Preloaded", Name: GetTextByKey("P_MA_PRELOADED", "Preloaded"), Width: 120, Key: 'Preloaded' });
|
|
}
|
|
return columnsdata;
|
|
}
|
|
|
|
var grid_import_result = null;
|
|
function CreateImportResultGrid(data, t) {
|
|
if (grid_import_result == null) {
|
|
grid_import_result = new GridView('#div_import_grid');
|
|
}
|
|
|
|
if (t == 0 && data.length == 0) {
|
|
$('#btnOk').hide();
|
|
}
|
|
var columnsdata = getcolumnsdata();
|
|
var columns = [];
|
|
if (t == 0) {
|
|
columns.push({
|
|
type: 3,
|
|
key: 'checked',
|
|
allcheck: true,
|
|
width: 30,
|
|
align: 'center'
|
|
});
|
|
}
|
|
var styleFilter = function (item) {
|
|
if ($.nullOrEmpty(item.VIN)) {
|
|
return { 'color': 'red' };
|
|
}
|
|
};
|
|
for (var i = 0; i < columnsdata.length; i++) {
|
|
var col = {};
|
|
col.name = columnsdata[i].Id;
|
|
col.caption = columnsdata[i].Name;
|
|
col.visible = true;
|
|
col.sortable = false;
|
|
col.width = columnsdata[i].Width;
|
|
col.key = columnsdata[i].Key;
|
|
col.allowFilter = false;
|
|
if (t == 0) {
|
|
col.styleFilter = styleFilter;
|
|
}
|
|
columns.push(col);
|
|
}
|
|
grid_import_result.canMultiSelect = false;
|
|
grid_import_result.columns = columns;
|
|
grid_import_result.init();
|
|
|
|
var rows = [];
|
|
for (var i = 0; i < data.length; i++) {
|
|
var r = data[i];
|
|
r.checked = true;
|
|
|
|
for (var j in r) {
|
|
if (j === "MakeYear")
|
|
r[j] = { DisplayValue: r["MakeYear"] === -1 ? "" : r["MakeYear"], Value: r[j] };
|
|
else if (j === "UnderCarriageHours")
|
|
r[j] = { DisplayValue: r["UnderCarriageHours"] >= 0 ? r["UnderCarriageHours"] : "", Value: r[j] };
|
|
else if (j == "Hidden") {
|
|
r[j] = { DisplayValue: r[j] == 1 ? "Yes" : "No", Value: r[j] };
|
|
} else if (j == "OnRoad") {
|
|
r[j] = { DisplayValue: r[j] == 1 ? "Yes" : "No", Value: r[j] };
|
|
} else if (j == "TelematicsEnabled") {
|
|
r[j] = { DisplayValue: r[j] == 1 ? "Yes" : "No", Value: r[j] };
|
|
} else if (j == "Attachment") {
|
|
r[j] = { DisplayValue: r[j] == 1 ? "Yes" : "No", Value: r[j] };
|
|
} else if (j == "Preloaded") {
|
|
r[j] = { DisplayValue: r[j] == 1 ? "Yes" : "No", Value: r[j] };
|
|
}
|
|
|
|
}
|
|
|
|
var fr = { Values: r };
|
|
rows.push(fr);
|
|
}
|
|
|
|
grid_import_result.setData(rows);
|
|
grid_import_result.resize();
|
|
|
|
}
|
|
var errordata;
|
|
function OnExportInImport() {
|
|
var d = JSON.stringify(errordata);
|
|
var data = new FormData();
|
|
data.append('type', 'set');
|
|
data.append('ClientData', d);
|
|
$.ajax({
|
|
url: "../ExportToFile.aspx",
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
processData: false,
|
|
contentType: false,
|
|
data: data,
|
|
success: function (data) {
|
|
if (data && data != "")
|
|
window.open("../ExportToFile.aspx?type=assetsexcel&key=" + data);
|
|
},
|
|
error: function (err) {
|
|
}
|
|
});
|
|
}
|
|
|
|
var importing = false;
|
|
var importCount = 0;
|
|
function OnImportMachines(t) {
|
|
if (!fildata)
|
|
return;
|
|
|
|
if (importing)
|
|
return;
|
|
|
|
importing = true;
|
|
|
|
var item = [];
|
|
var sels = $("select[name='sel_import']");
|
|
var tmp = '';
|
|
for (var i = 0; i < sels.length; i++) {
|
|
var sel = sels[i];
|
|
var id = $(sel).data('id');
|
|
var value = $(sel).val();
|
|
switch (id) {
|
|
case "VIN/SN":
|
|
if ($.nullOrEmpty(value)) {
|
|
tmp += GetTextByKey("P_MA_VINSN", "VIN/SN");
|
|
}
|
|
break;
|
|
}
|
|
var kv = { Key: id, Value: value };
|
|
item.push(kv);
|
|
}
|
|
if (tmp.length > 0) {
|
|
var s = GetTextByKey("P_MA_NOTBEEMPTY", "{0} cannot be empty.").replace('{0}', tmp);
|
|
showAlert(s, GetTextByKey("P_JS_IMPORT", 'Import'));
|
|
importing = false;
|
|
return;
|
|
}
|
|
var selected = [];
|
|
if (t == 1) {
|
|
for (var i in grid_import_result.source) {
|
|
selected.push(grid_import_result.source[i].Values.checked);
|
|
}
|
|
grid_import_result.setData([]);
|
|
}
|
|
$('#dialog_import_result').hideDialog();
|
|
var param = JSON.stringify(item);
|
|
param = htmlencode(param);
|
|
var contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
|
var formData = new FormData();
|
|
formData.append("iconFile", fildata);
|
|
formData.append("MethodName", "ImportMachines");
|
|
formData.append("ClientData", param);
|
|
formData.append("ContractorID", contractorid);
|
|
formData.append("Get", t == 1 ? false : true);
|
|
if (t == 1) {
|
|
formData.append("SelectedData", selected.join(','));
|
|
}
|
|
showloading(true);
|
|
$.ajax({
|
|
url: 'ManageMachines.aspx',
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
processData: false,
|
|
contentType: false,
|
|
data: formData,
|
|
async: true,
|
|
success: function (data) {
|
|
importing = false;
|
|
try {
|
|
var d = JSON.parse(data);
|
|
$('#dialog_import').hideDialog();
|
|
|
|
if (d.Count != -1) {
|
|
grid_import_result.setData([]);
|
|
$('#sp_import_result').show();
|
|
$('#sp_import_f').show();
|
|
$('#btnClose').show();
|
|
$('#btnOk').hide();
|
|
$('#btnCancel').hide();
|
|
var str = d.Count + GetTextByKey("P_MA_MACHINESIMPORTEDSUCCESSFULLY", ' Asset(s) imported successfully.');
|
|
if (d.Datas.length > 0 || (d.Count == 0 && d.Datas.length == 0)) {
|
|
importCount = d.Count;
|
|
if (d.Datas.length > 0) {
|
|
errordata = $.cloneObject(d.Datas);
|
|
$('#div_import_export').show();
|
|
}
|
|
else {
|
|
$('#div_import_export').hide();
|
|
}
|
|
$('#sp_import_result').text(str);
|
|
$('#sp_import_f').text(d.Datas.length + " Failed.");
|
|
$('#dialog_import_result')
|
|
.css({
|
|
'top': (document.documentElement.clientHeight - $('#dialog_import_result').height()) / 3,
|
|
'left': (document.documentElement.clientWidth - $('#dialog_import_result').width()) / 2
|
|
})
|
|
.showDialogfixed();
|
|
CreateImportResultGrid(d.Datas, t);
|
|
}
|
|
else {
|
|
showAlert(str, GetTextByKey("P_JS_IMPORT", 'Import'), null, function () {
|
|
if (d.Count > 0) {
|
|
window.location.reload();
|
|
}
|
|
});
|
|
showloading(false);
|
|
}
|
|
}
|
|
else {
|
|
$('#dialog_import_result')
|
|
.css({
|
|
'top': (document.documentElement.clientHeight - $('#dialog_import_result').height()) / 3,
|
|
'left': (document.documentElement.clientWidth - $('#dialog_import_result').width()) / 2
|
|
})
|
|
.showDialogfixed();
|
|
$('#sp_import_result').hide();
|
|
$('#div_import_export').hide();
|
|
$('#sp_import_f').show();
|
|
$('#btnClose').hide();
|
|
$('#btnOk').show();
|
|
$('#btnCancel').show();
|
|
CreateImportResultGrid(d.Datas, t);
|
|
$('#sp_import_f').text(GetTextByKey("P_WO_COUNT", 'Count') + ": " + d.Datas.length);
|
|
}
|
|
|
|
}
|
|
catch (e) {
|
|
showAlert(data, GetTextByKey("P_JS_IMPORT", 'Import'));
|
|
showloading(false);
|
|
}
|
|
},
|
|
error: function (err) {
|
|
importing = false;
|
|
showloading(false);
|
|
showAlert(err.statusText, GetTextByKey("P_JS_IMPORT", 'Import'));
|
|
}
|
|
});
|
|
|
|
}
|
|
var fildata;
|
|
function OnImport() {
|
|
var file = $('<input type="file" style="display: none;" accept=".xlsx" />');
|
|
file.change(function () {
|
|
fildata = this.files[0];
|
|
var formData = new FormData();
|
|
formData.append("iconFile", fildata);
|
|
formData.append("MethodName", "GetImportMachineColumns");
|
|
formData.append("ClientData", '');
|
|
showloading(true);
|
|
$.ajax({
|
|
url: 'ManageMachines.aspx',
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
processData: false,
|
|
contentType: false,
|
|
data: formData,
|
|
async: true,
|
|
success: function (data) {
|
|
if (typeof (data) === "string") {
|
|
showAlert(data, GetTextByKey("P_JS_IMPORT", 'Import'));
|
|
showloading(false);
|
|
} else {
|
|
CreateImportColumns(data);
|
|
$('#dialog_import')
|
|
.attr('act', 'add')
|
|
.css({
|
|
'top': (document.documentElement.clientHeight - $('#dialog_import').height()) / 3,
|
|
'left': (document.documentElement.clientWidth - $('#dialog_import').width()) / 2
|
|
})
|
|
.showDialogfixed();
|
|
}
|
|
},
|
|
error: function (err) {
|
|
showloading(false);
|
|
showAlert(err.statusText, GetTextByKey("P_JS_IMPORT", 'Import'));
|
|
}
|
|
});
|
|
}).click();
|
|
}
|
|
function EndImportMachines() {
|
|
$('#dialog_import_result').hideDialog();
|
|
if (importCount > 0) {
|
|
window.location.reload();
|
|
}
|
|
showloading(false);
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
|
<div id="recordcontent" style="padding: 0px; margin: 0px;">
|
|
<div class="page_title" data-lgid="P_MANAGEASSETS"></div>
|
|
<div class="search_bar">
|
|
<input type="password" autocomplete="new-password" style="display: none" />
|
|
<span id="span_contractor" style="display: none;">
|
|
<span data-lgid="P_MA_CONTRACTOR_COLON">Contractor:</span>
|
|
<select id="sel_contractor"></select></span>
|
|
<input id="searchinputtxt" type="text" autocomplete="off" />
|
|
<input class="search" type="button" onclick="OnRefresh();" value="Search" style="margin-left:5px;" data-lgid="P_MA_SEARCH" />
|
|
<input id="chkShowHidden" type="checkbox" onclick="OnRefresh();" style="margin-left: 20px;" /><label for="chkShowHidden" data-lgid="P_MA_SHOWHIDDEN">Show Hidden</label>
|
|
<input id="chkAttachment" type="checkbox" onclick="OnRefresh();" checked="checked" style="margin-left: 20px;" /><label for="chkAttachment" data-lgid="P_MA_SHOWATTACHMENTS">Show Attachments</label>
|
|
</div>
|
|
<div class="function_title">
|
|
<span class="sbutton iconadd" id="btnAdd" onclick="OnAdd();" data-lgid="P_MA_ADD">Add</span>
|
|
<span class="sbutton iconedit" id="btnEdit" onclick="OnEdit();" data-lgid="P_MA_EDIT">Edit</span>
|
|
<span class="sbutton iconrefresh" onclick="OnRefresh();" data-lgid="P_MA_REFRESH">Refresh</span>
|
|
<%if (IsSupperAdmin && !IsDealer)
|
|
{ %>
|
|
<span class="sbutton icondelete" onclick="DeleteMachine();" data-lgid="P_MA_XXXXX">Delete Asset(s)</span>
|
|
<%} %>
|
|
<span id="spExport" class="sbutton iconexport" onclick="OnExport();" data-lgid="P_UTILITY_EXPORTTOEXCEL">Export to Excel</span>
|
|
<span class="sbutton iconimport" onclick="OnImport();" data-lgid="P_JS_IMPORT">Import</span>
|
|
<span class="sbutton iconlayout iconmenu" data-lgid="P_MR_LAYOUT">Layout</span>
|
|
</div>
|
|
<div class="clear"></div>
|
|
<div id="machinelist">
|
|
</div>
|
|
</div>
|
|
|
|
<div id="mask_bg" style="display: none;"><div class="loading c-spin"></div></div>
|
|
<div class="dialog" id="dialog_machine1" style="display: none; height: 100%; border-bottom: 0; border-top: 0; z-index: 2;">
|
|
<%--<div class="dialog-title"><span class="title">Add Work Order</span></div>--%>
|
|
<iframe id="iframemachine" style="width: 100%; height: 100%; display: block; border: none;"></iframe>
|
|
<div class="maskbg" style="display: none;"></div>
|
|
</div>
|
|
|
|
<div class="dialog" id="dialog_assetview" style="display: none; height: 100%; border-bottom: 0; border-top: 0; z-index: 2;">
|
|
<%--<div class="dialog-title"><span class="title">Add Work Order</span></div>--%>
|
|
<iframe id="iframeassetview" src="../AssetView/SingleAssetView.aspx" style="width: 100%; height: 100%; display: block; border: none;"></iframe>
|
|
<div class="maskbg" style="display: none;"></div>
|
|
</div>
|
|
|
|
<div class="dialog" id="dialog_mergeassets" style="display: none; min-width: 620px; max-width: 900px;">
|
|
<div class="dialog-title"><span class="title" data-lgid="P_MA_MERGEASSET">Merge Assets</span><em class="dialog-close"></em></div>
|
|
<div class="clear"></div>
|
|
<div class="dialog-content" style="padding-left: 20px; padding-right: 20px; width: 800px; height: 520px;">
|
|
<table id="tab_assetinfo">
|
|
<tr>
|
|
<td>
|
|
<div style="float: left; position: relative;">
|
|
<table>
|
|
<tr>
|
|
<td colspan="2"><span style="font-weight: 700; font-size: 14px;" data-lgid="P_MA_ASSETFROM_COLON">Asset from:</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<div id="dialog_fromasset" style="width: 290px; height: 22px;"></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<div style="padding-top: 5px; padding-bottom: 5px;">
|
|
<input type="checkbox" id="dialog_newhide" disabled="disabled" class="chk" /><span data-lgid="P_MA_HIDEHIDDEN">Hide/Hidden</span>
|
|
<input type="checkbox" id="dialog_newonroad" disabled="disabled" class="chk" /><span data-lgid="P_MA_ONROAD">On-Road</span>
|
|
<input type="checkbox" id="dialog_newtelematics" disabled="disabled" class="chk" /><span data-lgid="P_MA_TELEMATICSENABLED">Telematics Enabled</span>
|
|
<input type="checkbox" id="dialog_newattachment" disabled="disabled" class="chk" /><span data-lgid="P_MA_ATTACHMENT">Attachment</span>
|
|
<input type="checkbox" id="dialog_newpreloaded" disabled="disabled" class="chk" /><span data-lgid="P_MA_PRELOADED">Preloaded</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_VINSN_COLON">VIN/SN:</td>
|
|
<td style="width: 200px;"><span id="dialog_newsn"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ASSETNAME_COLON">Asset Name:</td>
|
|
<td><span id="dialog_newname"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ASSETNAME2_COLON">Asset Name(Custom):</td>
|
|
<td><span id="dialog_newname2"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_DEVICESN_COLON">Paired Device SN:</td>
|
|
<td><span id="dialog_newdevicesn"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_YEAR_COLON">Year:</td>
|
|
<td><span id="dialog_newyear"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_MAKE_COLON">Make:</td>
|
|
<td><span id="dialog_newmake"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_MODEL_COLON">Model:</td>
|
|
<td><span id="dialog_newmodel"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_EQCLASS_COLON">Eq.Class:</td>
|
|
<td><span id="dialog_neweqclass"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_TYPE_COLON">Asset Type:</td>
|
|
<td><span id="dialog_newtype"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_DESCRIPTION_COLON">Description:</td>
|
|
<td>
|
|
<textarea id="dialog_newdescription" disabled="disabled" style="height: 60px; width: 200px;"></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ENGINEHOURS_COLON">Engine Hours:</td>
|
|
<td><span id="dialog_newenginehours"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ODOMETER_COLON">Odometer:</td>
|
|
<td><span id="dialog_newodometer"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ADDEDON_COLON">Added On:</td>
|
|
<td><span id="dialog_newaddedon"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ADDEDBY_COLON">Added By:</td>
|
|
<td><span id="dialog_newaddedby"></span></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
<td style="padding-left: 10px; padding-right: 10px;">
|
|
<div style="height: 500px; width: 1px; border-left: solid 1px #9A9A9A;"></div>
|
|
</td>
|
|
<td>
|
|
<div style="float: left; position: relative;">
|
|
<table>
|
|
<tr>
|
|
<td colspan="2"><span style="font-weight: 700; font-size: 14px;" data-lgid="P_MA_ASSETTO_COLON">Asset to:</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<div id="dialog_toasset" style="width: 290px; height: 22px;"></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<div style="padding-top: 5px; padding-bottom: 5px;">
|
|
<input type="checkbox" id="dialog_oldhide" disabled="disabled" class="chk" /><span data-lgid="P_MA_HIDEHIDDEN">Hide/Hidden</span>
|
|
<input type="checkbox" id="dialog_oldonroad" disabled="disabled" class="chk" /><span data-lgid="P_MA_ONROAD">On-Road</span>
|
|
<input type="checkbox" id="dialog_oldtelematics" disabled="disabled" class="chk" /><span data-lgid="P_MA_TELEMATICSENABLED">Telematics Enabled</span>
|
|
<input type="checkbox" id="dialog_oldattachment" disabled="disabled" class="chk" /><span data-lgid="P_MA_ATTACHMENT">Attachment</span>
|
|
<input type="checkbox" id="dialog_oldpreloaded" disabled="disabled" class="chk" /><span data-lgid="P_MA_PRELOADED">Preloaded</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_VINSN_COLON">VIN/SN:</td>
|
|
<td style="width: 200px;"><span id="dialog_oldsn"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ASSETNAME_COLON">Asset Name:</td>
|
|
<td><span id="dialog_oldname"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ASSETNAME2_COLON">Asset Name(Custom):</td>
|
|
<td><span id="dialog_oldname2"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_DEVICESN_COLON">Paired Device SN:</td>
|
|
<td><span id="dialog_olddevicesn"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_YEAR_COLON">Year:</td>
|
|
<td><span id="dialog_oldyear"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_MAKE_COLON">Make:</td>
|
|
<td><span id="dialog_oldmake"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_MODEL_COLON">Model:</td>
|
|
<td><span id="dialog_oldmodel"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_EQCLASS_COLON">Eq.Class:</td>
|
|
<td><span id="dialog_oldeqclass"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_TYPE_COLON">Asset Type:</td>
|
|
<td><span id="dialog_oldtype"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_DESCRIPTION_COLON">Description:</td>
|
|
<td>
|
|
<textarea id="dialog_olddescription" disabled="disabled" style="height: 60px; width: 200px;"></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ENGINEHOURS_COLON">Engine Hours:</td>
|
|
<td><span id="dialog_oldenginehours"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ODOMETER_COLON">Odometer:</td>
|
|
<td><span id="dialog_oldodometer"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ADDEDON_COLON">Added On:</td>
|
|
<td><span id="dialog_oldaddedon"></span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label label1" data-lgid="P_MA_ADDEDBY_COLON">Added By:</td>
|
|
<td><span id="dialog_oldaddedby"></span></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table id="tab_mergeassets" style="display: none; line-height: 35px;">
|
|
<tr>
|
|
<td colspan="4"><span id="span_mergetips" style="font-size: 16px; font-weight: 600;">Please select the data to be merged from machine a to machine B</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_ODOMETERDATA">Odometer Data</td>
|
|
<td style="width: 100px;">
|
|
<input type="radio" id="radio_odometer0" name="radio_odometer" class="radio_both" value="0" checked="checked" /><label for="radio_odometer0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_odometer1" name="radio_odometer" value="1" /><label for="radio_odometer1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_odometer2" name="radio_odometer" value="2" /><label for="radio_odometer2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_ENGINEHOURSDATA">Engine Hours Data</td>
|
|
<td>
|
|
<input type="radio" id="radio_enginehours0" name="radio_enginehours" class="radio_both" value="0" checked="checked" /><label for="radio_enginehours0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_enginehours1" name="radio_enginehours" value="1" /><label for="radio_enginehours1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_enginehours2" name="radio_enginehours" value="2" /><label for="radio_enginehours2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_LOCATIONDATA">Location Data</td>
|
|
<td>
|
|
<input type="radio" id="radio_location0" name="radio_location" class="radio_both" value="0" checked="checked" /><label for="radio_location0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_location1" name="radio_location" value="1" /><label for="radio_location1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_location2" name="radio_location" value="2" /><label for="radio_location2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_IDLEHOURSDATA">Idle Hours Data</td>
|
|
<td>
|
|
<input type="radio" id="radio_idlehours0" name="radio_idlehours" class="radio_both" value="0" checked="checked" /><label for="radio_idlehours0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_idlehours1" name="radio_idlehours" value="1" /><label for="radio_idlehours1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_idlehours2" name="radio_idlehours" value="2" /><label for="radio_idlehours2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_FUELUSEDDATA">Fuel Used Data</td>
|
|
<td>
|
|
<input type="radio" id="radio_fuelused0" name="radio_fuelused" class="radio_both" value="0" checked="checked" /><label for="radio_fuelused0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_fuelused1" name="radio_fuelused" value="1" /><label for="radio_fuelused1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_fuelused2" name="radio_fuelused" value="2" /><label for="radio_fuelused2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_FUELREMAINING">Fuel Remaining</td>
|
|
<td>
|
|
<input type="radio" id="radio_fuelremaining0" name="radio_fuelremaining" class="radio_both" value="0" checked="checked" /><label for="radio_fuelremaining0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_fuelremaining1" name="radio_fuelremaining" value="1" /><label for="radio_fuelremaining1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_fuelremaining2" name="radio_fuelremaining" value="2" /><label for="radio_fuelremaining2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_ATTRIBUTEDATA">Attribute Data</td>
|
|
<td>
|
|
<input type="radio" id="radio_attribute0" name="radio_attribute" class="radio_both" value="0" checked="checked" /><label for="radio_attribute0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_attribute1" name="radio_attribute" value="1" /><label for="radio_attribute1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_attribute2" name="radio_attribute" value="2" /><label for="radio_attribute2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_BATTERYDATA">Battery Data</td>
|
|
<td>
|
|
<input type="radio" id="radio_battery0" name="radio_battery" class="radio_both" value="0" checked="checked" /><label for="radio_battery0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_battery1" name="radio_battery" value="1" /><label for="radio_battery1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_battery2" name="radio_battery" value="2" /><label for="radio_battery2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_FPREVENTATIVEMAINTENANCEPLANS">Preventative Maintenance Plans</td>
|
|
<td>
|
|
<input type="radio" id="radio_pmplans0" name="radio_pmplans" class="radio_both" value="0" checked="checked" /><label for="radio_pmplans0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_pmplans1" name="radio_pmplans" value="1" /><label for="radio_pmplans1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_pmplans2" name="radio_pmplans" value="2" /><label for="radio_pmplans2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" data-lgid="P_MA_JOBSITEATA">Jobsite Data</td>
|
|
<td>
|
|
<input type="radio" id="radio_jobsite0" name="radio_jobsite" class="radio_both" value="0" checked="checked" /><label for="radio_jobsite0" data-lgid="P_MA_BOTH">Both</label></td>
|
|
<td>
|
|
<input type="radio" id="radio_jobsite1" name="radio_jobsite" value="1" /><label for="radio_jobsite1" class="span_asseta"></label></td>
|
|
<td>
|
|
<input type="radio" id="radio_jobsite2" name="radio_jobsite" value="2" /><label for="radio_jobsite2" class="span_assetb"></label></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dulpicatetd" style="vertical-align: top;" data-lgid="P_MA_NOTES">Notes</td>
|
|
<td colspan="3">
|
|
<textarea id="dialog_mergenotes" maxlength="2000" style="margin-top: 12px; width: 500px; height: 90px;"></textarea></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="dialog-func">
|
|
<input type="button" value="Cancel" data-lgid="P_MA_CANCEL" class="dialog-close" tabindex="500" />
|
|
<input type="button" value="OK" data-lgid="P_MA_OK" onclick="SaveMergeAsset();" tabindex="500" />
|
|
<input type="button" value="Next" data-lgid="P_MA_NEXT" id="btn_mergenext" onclick="OnNext();" tabindex="500" />
|
|
<input type="button" value="Previous" data-lgid="P_MA_PREVIOUS" id="btn_mergeprevious" style="display: none;" onclick="OnPrevious();" tabindex="500" />
|
|
<div class="clear"></div>
|
|
</div>
|
|
<div id="dialogmask" class="maskbg" style="display: none;">
|
|
<div class="loading_icon icon c-spin"></div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="dialog" id="dialog_import" style="display: none;">
|
|
<div class="dialog-title"><span class="title" data-lgid="P_MA_IMPORTMACHINESFIELDMAPPING"></span><em class="dialog-close"></em></div>
|
|
|
|
<div class="machine_filter" style="margin: 9px 6px 7px; display: none;">
|
|
<span class="sbutton iconimport" onclick="OnImport()" data-lgid="P_JS_IMPORT">Add</span>
|
|
</div>
|
|
<div class="dialog-content adjust-content" style="height: 450px; overflow: auto;">
|
|
<table id="tb_import" class="table_holder">
|
|
</table>
|
|
</div>
|
|
|
|
<div class="dialog-func">
|
|
<input type="button" value="Close" data-lgid="P_JS_CANCEL" class="dialog-close" tabindex="28" />
|
|
<input type="button" onclick="OnImportMachines(0);" value="OK" tabindex="27" />
|
|
<div class="clear"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="dialog" id="dialog_import_result" style="display: none;">
|
|
<div class="dialog-title"><span class="title" data-lgid="P_JS_IMPORT"></span></div>
|
|
|
|
<div id="div_import_export" class="machine_filter" style="margin: 9px 6px 7px; display: none;">
|
|
<span class="sbutton iconexport" onclick="OnExportInImport()" data-lgid="P_UTILITY_EXPORTTOEXCEL">Export to Excel</span>
|
|
</div>
|
|
<div style="margin: 9px 6px 7px; padding-left: 20px">
|
|
<div id="sp_import_result" style="font-weight: bold;"></div>
|
|
</div>
|
|
<div id="sp_import_f" style="margin: 9px 6px 7px; padding-left: 20px; font-weight: bold;">Failed</div>
|
|
<div id="div_import_grid" style="padding-left: 20px; padding-right: 20px; height: 400px; width: 700px">
|
|
</div>
|
|
<div class="dialog-func">
|
|
<input id="btnCancel" type="button" value="Close" data-lgid="P_JS_CANCEL" class="dialog-close" tabindex="28" />
|
|
<input id="btnOk" type="button" onclick="OnImportMachines(1);" data-lgid="P_JS_IMPORT" tabindex="27" />
|
|
<input id="btnClose" type="button" onclick="EndImportMachines();" data-lgid="P_FR_CLOSE" tabindex="27" />
|
|
<div class="clear"></div>
|
|
</div>
|
|
</div>
|
|
|
|
</asp:Content>
|