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

@ -85,6 +85,33 @@ define(['modules/inspects/inspect', 'modules/inspects/editinspection'], function
}
});
func.append(iconResetPivots);
var iconprints = $('<span class="sbutton iconprint">' + GetTextByKey("P_IPT_XXXXXX", "Print") + '</span>').click(function () {
for (var i = 0; i < grid_dt.source.length; i++) {
var inspect = grid_dt.source[i].Values;
if (inspect.Selected) {
if (navigator.userAgent.indexOf('Firefox') >= 0 ||
navigator.userAgent.indexOf('Opera') >= 0) {
window.open("Inspection.aspx?rt=f&t=2&id=" + inspect.Id + "&team=" + (teamintelligence ? 1 : 0), '_blank');
}
else
openPrintFrame(inspect.Id);
}
}
});
func.append(iconprints);
var icondownloads = $('<span class="sbutton icondownload">' + GetTextByKey("P_IPT_XXXXXX", "Download") + '</span>').click(function () {
for (var i = 0; i < grid_dt.source.length; i++) {
var inspect = grid_dt.source[i].Values;
if (inspect.Selected) {
openDownloadFrame(inspect.Id);
}
}
});
func.append(icondownloads);
header.append(func)
return header;
@ -121,7 +148,18 @@ define(['modules/inspects/inspect', 'modules/inspects/editinspection'], function
{ name: 'Print', caption: "", css: { 'width': 30, 'text-align': 'center' } },
{ name: 'ViewChangeHistory', caption: "", css: { 'width': 30, 'text-align': 'center' } }
];
var columns = [];
var columns = [
{
// checkbox
name: 'check',
key: 'Selected',
width: 45,
align: 'center',
sortable: false,
allcheck: true,
type: 3
}
];
// head
for (var hd in list_columns) {
var col = {};
@ -246,7 +284,7 @@ define(['modules/inspects/inspect', 'modules/inspects/editinspection'], function
if (item.Id === "")
return htmldecode(item.WorkOrderNumber);
var div = $('<div class="dropdown" style="width: 200px;"></div>');
var div = $('<div class="dropdown" style="width: 185px;"></div>');
div.dropdown(item.WorkOrders || [{ Id: -1, WorkOrderNumber: "Not Assigned" }], {
search: false,
textKey: 'WorkOrderNumber',