PM-2973: classic, despues de derivar no actualiza la data de la grilla

This commit is contained in:
Paula V. Quispe
2015-06-16 15:46:41 -04:00
parent 581c029a64
commit 310aaa3a3d
3 changed files with 31 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
var grdNumRows = 0; //
var grdRowLabel = []; //
var fieldGridGral = '';
var fieldGridGralVal = '';
@@ -409,9 +410,16 @@ Ext.onReady(function () {
var selectedRow = Ext.getCmp(gridId).getSelectionModel().getSelections();
var maxLenght = selectedRow.length;
for (var i in selectedRow) {
rowGrid = selectedRow[i].data
for (fieldGrid in rowGrid){
if(fieldGrid != 'APP_UID' && fieldGrid != 'APP_NUMBER' && fieldGrid != 'APP_TITLE' && fieldGrid != 'DEL_INDEX' ){
fieldGridGral = fieldGrid;
fieldGridGralVal = rowGrid[fieldGrid];
}
}
if (selectedRow[i].data) {
//alert (derivateRequestAjax(selectedRow[i].data["company"]));
ajaxDerivationRequest(selectedRow[i].data["APP_UID"], selectedRow[i].data["DEL_INDEX"], maxLenght, selectedRow[i].data["APP_NUMBER"]);
ajaxDerivationRequest(selectedRow[i].data["APP_UID"], selectedRow[i].data["DEL_INDEX"], maxLenght, selectedRow[i].data["APP_NUMBER"],fieldGridGral, fieldGridGralVal);
}
}
}
@@ -1298,14 +1306,14 @@ function generateGrid(proUid, tasUid, dynUid)
});
}
function ajaxDerivationRequest(appUid, delIndex, maxLenght, appNumber){
function ajaxDerivationRequest(appUid, delIndex, maxLenght, appNumber,fieldGridGral, fieldGridGralVal){
Ext.Ajax.request({
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + credentials.access_token
},
url: urlProxy + 'derivate/' + appUid + '/' + appNumber + '/' + delIndex,
url: urlProxy + 'derivate/' + appUid + '/' + appNumber + '/' + delIndex + '/' + fieldGridGral + '/' + fieldGridGralVal,
success: function(response) {
var dataResponse;
var fullResponseText = response.responseText;