This commit is contained in:
2023-05-30 17:34:56 +08:00
parent e728c66786
commit 9da1c4cf30
194 changed files with 10680 additions and 9060 deletions

View File

@ -580,10 +580,13 @@
if (!sel || sel == "")
exists = true;
showloading(true);
var selector = $('#dialog_region');
var selCurrent = selector.val();
selector.empty();
_network.jobsitequery('GetRegions', '', function (data) {
showloading(false);
if (typeof (data) === "string") {
showAlert(data, GetTextByKey("P_AM_ERROR", 'Error'));
return;
@ -606,6 +609,8 @@
selector.val(sel);
else if (selCurrent)
selector.val(selCurrent);
}, function () {
showloading(false);
});
}
@ -1730,6 +1735,7 @@
var dialogAssets = new $assetselector('dialog_machines');
dialogAssets.jobsiteId = jobsiteid;
dialogAssets.allowotherfilter = false;
dialogAssets.onDialogClosed = function () {
$('#dialogmask').hide();
$('#dialog_machines').remove();
@ -1761,7 +1767,7 @@
function OnMachineDeleteSingle(item) {
$("#dialogmask").show();
var alerttitle = GetTextByKey("P_JS_ASSETASSIGNMENT", "Asset Assignment");
showConfirm(GetTextByKey("P_JS_DELETEASSIGNEDASSET", 'Are you sure you want to delete the assigned asset:{0}?').replace('{0}', item.Name), alerttitle, function () {
showConfirm1(GetTextByKey("P_JS_DELETEASSIGNEDASSET", 'Are you sure you want to delete the assigned asset:{0}?').replace('{0}', item.Name), alerttitle, function () {
var params = [
'', jobsiteid,
JSON.stringify([item.AssetId])
@ -1794,7 +1800,9 @@
function OnSiteChanging(item, input) {
var input_chk = $(input).closest('td').find('input');
var checked = $(input_chk).prop('checked');
var checked = !$(input_chk).prop('checked');
if (navigator.userAgent.toUpperCase().indexOf("FIREFOX") >= 0)
checked = !checked;
var text = GetTextByKey("P_JS_ONSITETIPS", "You have manually assigned a jobsite. This action will disable geofence alerts and jobsite auto-assignment. Do you want to proceed? ");
if (!checked)
text = GetTextByKey("P_JS_ONSITETIPS1", "Are you sure you want to change the on-site of the asset:{0}?").replace('{0}', item.Name);
@ -1830,7 +1838,7 @@
return;
}
$('#mask_bg').show();
showmaskbg(true);
$('#machine-name').text(jobsiteitem.Name);
_selectedMachines = jobsiteitem.Machines == null ? [] : jobsiteitem.Machines;
_showSelectedMachines = jobsiteitem.Machines == null ? [] : jobsiteitem.Machines;
@ -1843,7 +1851,7 @@
.css({
'top': (document.documentElement.clientHeight - $('#dialog_managemahchine').height()) / 3,
'left': (document.documentElement.clientWidth - $('#dialog_managemahchine').width()) / 2
}).showDialog();
}).showDialogfixed();
grid_dtsm.setData([]);
$('#selectedmachinelist input[type="checkbox"]').prop('checked', false);

View File

@ -327,24 +327,24 @@
};
function showRequirementConfirm(msg, title, fprint, femai, fsave, fclose) {
$("#mask_bg").show();
showmaskbg(true);
_dialog.showRequirementConfirm(msg, title, function (e) {
$("#mask_bg").hide();
showmaskbg(false);
if (typeof fprint === 'function') {
fprint(e);
}
}, function (e) {
$("#mask_bg").hide();
showmaskbg(false);
if (typeof femai === 'function') {
femai(e);
}
}, function (e) {
$("#mask_bg").hide();
showmaskbg(false);
if (typeof fsave === 'function') {
fsave(e);
}
}, function (e) {
$("#mask_bg").hide();
showmaskbg(false);
if (typeof fclose === 'function') {
fclose(e);
}
@ -686,12 +686,12 @@
})
$('#dialog_sendmail').dialog(function () {
$('#mask_bg').hide();
showmaskbg(false);
OnExit();
});
$('#dialog_assignment').dialog(function () {
$('#mask_bg').hide();
showmaskbg(false);
});
$('#sendmail_othertextaddress').focus(function (e) {

View File

@ -249,7 +249,7 @@
var alljobsites;
var addrequirement = true;
var _sendType = 0;
var currentdate = "<%=CurrentDate %>";
var currentdate = "<%=CurrentDate %>";
jobsitequery = function (method, param, callback, error, nolog) {
@ -269,19 +269,19 @@
};
function showAssetConfirm(msg, title, fcancel, fedit, fclose) {
$("#mask_bg").show();
showmaskbg(true);
_dialog.showAssetConfirm(msg, title, function (e) {
$("#mask_bg").hide();
showmaskbg(false);
if (typeof fedit === 'function') {
fedit(e);
}
}, function (e) {
$("#mask_bg").hide();
showmaskbg(false);
if (typeof fcancel === 'function') {
fcancel(e);
}
}, function (e) {
$("#mask_bg").hide();
showmaskbg(false);
if (typeof fclose === 'function') {
fclose(e);
}
@ -568,7 +568,7 @@
</td>
</tr>
<tr>
<td class="label" data-lgid="P_JS_POINTOFCONTACT">Point Of Contact</td>
<td class="label" data-lgid="P_JS_POINTOFCONTACT_COLON">Point Of Contact</td>
<td>
<input type="text" id="dialog_pointofcontact" maxlength="100" tabindex="1" autocomplete="off" />
</td>

View File

@ -272,7 +272,7 @@
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
var list_columns = [
//{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 30, 'text-align': 'center' } },
//{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 45, 'text-align': 'center' } },
{ name: 'BeginDate', caption: GetTextByKey("P_JS_MOVEDATE", "Move Date"), valueIndex: 'BeginDate', css: { 'width': 100, 'text-align': 'left' } },
//{ name: 'BeginDate', caption: GetTextByKey("P_JS_BEGINDATE", "Begin Date"), valueIndex: 'BeginDate', css: { 'width': 100, 'text-align': 'left' } },
//{ name: 'EndDate', caption: GetTextByKey("P_JS_ENDDATE", "End Date"), valueIndex: 'EndDate', css: { 'width': 100, 'text-align': 'left' } },
@ -294,7 +294,7 @@
// checkbox
name: 'check',
key: 'Selected',
width: 30,
width: 45,
align: 'center',
sortable: false,
allcheck: true,

View File

@ -453,6 +453,7 @@
var dialogAssets = new $assetselector('dialog_machines');
dialogAssets.jobsiteId = jobsiteid;
dialogAssets.allowotherfilter = false;
dialogAssets.onDialogClosed = function () {
$("#dialogmask").hide();
$('#dialog_machines').remove();
@ -531,7 +532,9 @@
function OnSiteChanging(item, input) {
var input_chk = $(input).closest('td').find('input');
var checked = $(input_chk).prop('checked');
var checked = !$(input_chk).prop('checked');
if (navigator.userAgent.toUpperCase().indexOf("FIREFOX") >= 0)
checked = !checked;
var text = GetTextByKey("P_JS_ONSITETIPS", "You have manually assigned a jobsite. This action will disable geofence alerts and jobsite auto-assignment. Do you want to proceed? ");
if (!checked)
text = GetTextByKey("P_JS_ONSITETIPS1", "Are you sure you want to change the on-site of the asset:{0}?").replace('{0}', item.Name);

View File

@ -86,7 +86,6 @@
function resizeContent() {
if ($('.content_main').length > 0)
$('.content_main').css('min-height', $(window).height() - $('.content_main').offset().top - 4);
$('#mask_bg').height($(document).outerHeight(false)).width($(document).outerWidth(false));
}
$(window).resize(function () {

View File

@ -86,7 +86,7 @@
}
grid_dtassets.setData(grid_dtassets.innerSource.concat(items));
doSave(0, itemids);
$('#mask_bg').hide();
showmaskbg(false);
};
$('#dialog_assettype').prop('iframe', true).dialog(function () {
@ -148,7 +148,7 @@
// checkbox
name: 'check',
key: 'selected',
width: 30,
width: 45,
align: 'center',
sortable: false,
allcheck: true,
@ -225,7 +225,6 @@
return s.Values.AssetId;
});
dialogAUAssets.showSelector();
$('#mask_bg').css('height', '100%');
}
function OnMachineDelete() {
@ -270,7 +269,7 @@
// checkbox
name: 'check',
key: 'selected',
width: 30,
width: 45,
align: 'center',
sortable: false,
allcheck: true,
@ -322,7 +321,7 @@
// checkbox
name: 'check',
key: 'selected',
width: 30,
width: 45,
align: 'center',
sortable: false,
allcheck: true,
@ -420,7 +419,7 @@
function OnAssetTypeAdd() {
$('#txt_assettype_key').val('');
$('#dialog_assettype .dialog-title span.title').text(GetTextByKey("P_JS_SELECTASSETTYPES", 'Select Asset Types'));
$('#mask_bg').show();
showmaskbg(true);
$('#dialog_assettype')
.attr('act', 'edit')
.css({
@ -446,7 +445,6 @@
doSave(1, itemids);
$('#dialog_assettype').hideDialog();
//$('#mask_bg').hide();
}
function OnAssetTypeDelete() {

View File

@ -73,18 +73,6 @@
padding: 0;
}
#dialog_machinegroup {
z-index: 500;
width: 870px;
top: 60px;
left: 150px;
}
.inputbox {
width: 500px;
padding: 1px;
}
.group_table .main_table {
table-layout: fixed;
}
@ -244,7 +232,7 @@
}
function ShowDialog(type) {
$('#mask_bg').show();
showmaskbg(true);
$('#dialog_jobsitelimit')
.attr('act', type)
.showDialogRight1(450);
@ -488,7 +476,7 @@
});
$('#dialog_subscribecontacts').dialog(function () {
$('#mask_bg').hide();
showmaskbg(false);
});
$('#btnsubscribefilter').click(getMatchAvailableContacts);
$('#chk_showallassignedcontacts').click(getMatchSelectedContacts);
@ -523,12 +511,12 @@
var title = GetTextByKey("P_M3_SUBSCRIBECONTACTS", "Subscribe Contacts");
$('#dialog_subscribecontacts .dialog-title span.title').html(title);
$('#mask_bg').show();
showmaskbg(true);
$('#dialog_subscribecontacts')
.css({
'top': (document.documentElement.clientHeight - $('#dialog_subscribecontacts').height()) / 5,
'left': (document.documentElement.clientWidth - $('#dialog_subscribecontacts').width()) / 2
}).showDialog();
}).showDialogfixed();
GetSelectedContacts();
}
@ -841,9 +829,6 @@
</div>
<div class="dialog" id="dialog_subscribecontacts" style="display: none;">
<div id="subscribedialogmask" class="maskbg" style="display: none; z-index: 1;">
<div class="loading_icon icon c-spin"></div>
</div>
<div class="dialog-title"><span class="title" data-lgid="P_M3_SUBSCRIBECONTACTS">Subscribe Contacts</span><em class="dialog-close"></em></div>
<div class="machine_filter">
@ -886,6 +871,9 @@
<input type="button" onclick="OnSaveSubscribeContacts();" value="OK" data-lgid="P_M3_OK" tabindex="46" />
<div class="clear"></div>
</div>
<div id="subscribedialogmask" class="maskbg" style="display: none; ">
<div class="loading_icon icon c-spin"></div>
</div>
</div>
</div>
</asp:Content>

View File

@ -41,7 +41,6 @@ function openAssignDispatch(seltype,) {
editableSelectAssignAsset.val('');
showmaskbg(true);
$('#dialog_assignment .dialog-title span.title').text(GetTextByKey('P_JS_DISPATCHASSIGNMENT', 'Dispatch Assignment'));
//$('#mask_bg').show();
$('#dialog_assignment')
.attr('act', 'edit')
.css({

View File

@ -34,7 +34,7 @@ function InitEmailGridData() {
{ name: 'DisplayName', caption: GetTextByKey("P_MV_CONTACTNAME", "Contact Name"), valueIndex: 'DisplayName', css: { 'width': 148, 'text-align': 'left' } },
{ name: 'ContactTypeName', caption: GetTextByKey("P_MV_CONTACTTYPE", "Contact Type"), valueIndex: 'ContactTypeName', css: { 'width': 148, 'text-align': 'left' } },
//{ name: 'Text', caption: GetTextByKey("P_MV_TEXT", "Text"), valueIndex: 'Text', type: 3, css: { 'width': 45, 'text-align': 'center' } },
{ name: 'Email', caption: GetTextByKey("P_MV_EMAIL", "Email"), valueIndex: 'Email', type: 3, css: { 'width': 45, 'text-align': 'center' } }
{ name: 'Email', caption: GetTextByKey("P_MV_EMAIL", "Email"), valueIndex: 'Email', type: 3, css: { 'width': 60, 'text-align': 'center' } }
];
var columns = [];
// head
@ -189,7 +189,7 @@ function onSendEmails() {
if (emailaddress.length == 0 && textaddress.length == 0) {
$('#dialog_sendmail').hideDialog();
$('#mask_bg').hide();
showmaskbg(false);
return;
}
var item = {
@ -204,7 +204,7 @@ function onSendEmails() {
jobsitequery('SendEmails', htmlencode(JSON.stringify(item)), function (data) {
if (_sendType == 0) {
$('#dialog_sendmail').hideDialog();
$('#mask_bg').hide();
showmaskbg(false);
OnExit(data);
}
else {
@ -214,7 +214,7 @@ function onSendEmails() {
showAlert(GetTextByKey("P_WO_MESSAGESENT", 'Message sent'), alerttitle);
$('#dialog_sendmail').hideDialog();
$('#mask_bg').hide();
showmaskbg(false);
}
if (aftersend)

View File

@ -416,7 +416,7 @@ function InitAssetGridData() {
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
var list_columns = [
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, allcheck: true, css: { 'width': 30, 'text-align': 'center' } },
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, allcheck: true, css: { 'width': 45, 'text-align': 'center' } },
{ name: 'MakeName', caption: GetTextByKey("P_PM_MAKE", "Make"), valueIndex: 'MakeName', css: { 'width': 100, 'text-align': 'left' } },
{ name: 'ModelName', caption: GetTextByKey("P_PM_MODEL", "Model"), valueIndex: 'ModelName', css: { 'width': 100, 'text-align': 'left' } },
{ name: 'AssetName', caption: GetTextByKey("P_JS_ASSETNAME", "Asset Name"), valueIndex: 'AssetName', css: { 'width': 150, 'text-align': 'left' } },
@ -598,7 +598,7 @@ function InitAllAssetGridData() {
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
var list_columns = [
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 30, 'text-align': 'center' } },
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 45, 'text-align': 'center' } },
{ name: 'MakeName', caption: GetTextByKey("P_PM_MAKE", "Make"), valueIndex: 'MakeName', css: { 'width': 100, 'text-align': 'left' } },
{ name: 'ModelName', caption: GetTextByKey("P_PM_MODEL", "Model"), valueIndex: 'ModelName', css: { 'width': 100, 'text-align': 'left' } },
{ name: 'AssetName', caption: GetTextByKey("P_JS_ASSETNAME", "Asset Name"), valueIndex: 'AssetName', css: { 'width': 150, 'text-align': 'left' } },
@ -874,7 +874,7 @@ function OnSetMachine() {
currentRequirement.Assets = assets;
currentRequirement.ScheduledQuantity = assets.length;
$('#dialog_managemahchine').hide();
$("#mask_bg").hide();
showmaskbg(false);
}
function checkQuantity() {

View File

@ -490,7 +490,7 @@ function checkSchedulerItems(alerttitle) {
function onUpdateScheduler() {
if (jobsiteschedulerCtrl.vue.source.length == 0) {
$('#dialog_managescheduler').hide();
$('#mask_bg').hide();
showmaskbg(false);
OnRefresh();
return;
}