185 lines
8.7 KiB
JavaScript
185 lines
8.7 KiB
JavaScript
function renderApprovedPOlbtn(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
|
|
if (row.poTypeId == 1) {
|
|
PONo = row.PONo;
|
|
POTypeId = row.poTypeId;
|
|
buttonsHtml += '<button onclick="viewApprovedPOFormSIPO(' + jsonData + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
} else if (row.poTypeId == 2) {
|
|
buttonsHtml += '<button onclick="viewApprovedLocalPO(' + jsonData + ',' + false + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
} else {
|
|
buttonsHtml += '<button onclick="viewApprovedPOFormImport(' + jsonData + ',' + false + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
}
|
|
}
|
|
function renderDelItem(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
buttonsHtml += '<button onclick="removeRowMain(' + jsonData + ')" class="btn btn-default btn-trash-sm">' +
|
|
'<i class="fa-regular fa-trash-can" style="color: #ff0000;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
}
|
|
function renderCreatedPO(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
IsPrint = true;
|
|
if (row.isManual == 1) {
|
|
if (row.poTypeId == 3) {
|
|
buttonsHtml += '<button onclick="viewManualImport(' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
} else {
|
|
buttonsHtml += '<button onclick="viewManualSIDRPO(' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
}
|
|
} else {
|
|
if (row.poTypeId == 1) {
|
|
PONo = row.PONo;
|
|
POTypeId = row.poTypeId;
|
|
buttonsHtml += '<button onclick="viewApprovedPOFormSIPO(' + jsonData + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
} else if (row.poTypeId == 2) {
|
|
buttonsHtml += '<button onclick="viewApprovedLocalPO(' + jsonData + ',' + false + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
} else {
|
|
buttonsHtml += '<button onclick="viewApprovedPOFormImport(' + jsonData + ',' + false + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
}
|
|
}
|
|
|
|
return buttonsHtml;
|
|
}
|
|
function renderPRItem(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
|
|
buttonsHtml += '<button onclick="viewPRItemDetail(' + jsonData + ',' + false + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
|
|
return buttonsHtml;
|
|
}
|
|
function renderMyCreatedPO(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
IsPrint = true;
|
|
buttonsHtml += '<button onclick="viewPONo(' + jsonData + ',' + false + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-pen-to-square fa-xl" style="color: #FFA500;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
|
|
if (row.isManual == 1) {
|
|
if (row.poTypeId == 3) {
|
|
buttonsHtml += '<button onclick="viewManualImport(' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
} else {
|
|
buttonsHtml += '<button onclick="viewManualSIDRPO(' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
}
|
|
} else {
|
|
if (row.poTypeId == 1) {
|
|
PONo = row.PONo;
|
|
POTypeId = row.poTypeId;
|
|
buttonsHtml += '<button onclick="viewApprovedPOFormSIPO(' + jsonData + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
} else if (row.poTypeId == 2) {
|
|
buttonsHtml += '<button onclick="viewApprovedLocalPO(' + jsonData + ',' + false + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
} else {
|
|
buttonsHtml += '<button onclick="viewApprovedPOFormImport(' + jsonData + ',' + false + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
}
|
|
}
|
|
|
|
return buttonsHtml;
|
|
}
|
|
function renderPOItemDetail(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
IsPrint = true;
|
|
jsonData.pONo = $('#c-old-poNo2').val();
|
|
buttonsHtml += '<button onclick="viewPOItemDetail(' + jsonData + ',' + false + ',' + true + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #FFA500;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
|
|
return buttonsHtml;
|
|
}
|
|
function renderDocReqbtn(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
buttonsHtml += '<button onclick="viewDocReqModal(1,' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-pen-to-square fa-xl" style="color: #FFA500;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
|
|
return buttonsHtml;
|
|
}
|
|
function renderSuppBidbtn(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
buttonsHtml += '<button onclick="viewSuppBidding(' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #D3D3D3;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
buttonsHtml += '<button onclick="viewIndexCard(' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-users-viewfinder fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
|
|
return buttonsHtml;
|
|
}
|
|
function renderForPOItembtn(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
// var statusNumber = parseInt(row.status, 10);
|
|
buttonsHtml += '<button onclick="viewBidForApproval(' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-eye fa-xl" style="color: #008080;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
|
|
return buttonsHtml;
|
|
}
|
|
function renderOtherChargebtn(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
buttonsHtml += '<button onclick="viewOtherChargesModal(1,' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-pen-to-square fa-xl" style="color: #FFA500;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
}
|
|
function renderIncotermsbtn(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
buttonsHtml += '<button onclick="viewIncotermsModal(1,' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-pen-to-square fa-xl" style="color: #FFA500;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
}
|
|
function renderDelIncShip(data, row) {
|
|
var jsonData = JSON.stringify(row).replace(/"/g, """);
|
|
var buttonsHtml = '';
|
|
buttonsHtml += '<button onclick="deleteIncShip(' + jsonData + ')" class="btn btn-default">' +
|
|
'<i class="fa-solid fa-trash-can fa-xl" style="color: #ff0000;" aria-hidden="true"></i>' +
|
|
'</button > ';
|
|
return buttonsHtml;
|
|
}
|