This commit is contained in:
Cunha 2026-03-17 17:58:40 -03:00
parent b8a84962ce
commit e8445fcf2f
18 changed files with 6689 additions and 2010 deletions

View File

@ -2,13 +2,13 @@
"version": "1.0.0", "version": "1.0.0",
"configurations": [ "configurations": [
{ {
"id": "edmoa4q9botmmtlvdz4bafosc5mqmr", "id": "mkjw3cu0krommujt2hvyinvbjsfeaj",
"name": "teste", "name": "Teste",
"host": "comerciode188007.fluig.cloudtotvs.com.br", "host": "comerciode188007.fluig.cloudtotvs.com.br",
"ssl": true, "ssl": true,
"port": 443, "port": 443,
"username": "andrey.cunha", "username": "andrey.cunha",
"password": "eyJpdiI6ImRjNGY4YzFkZmNiM2FhNDJiMGE3NDlmYjI5YjFkZjBhIiwic2FsdCI6IjU2MzUzZTcxOGZjZGRjZmUwZDI4MWYxZTllOWFlMDM3IiwidGV4dCI6IjU1NWQxZTE3YzUwYTQwYjNjMzAwYTc3M2VmNWQwODU1In0=", "password": "eyJpdiI6ImNlN2IyOTIzNjljNDZmZDQwMTM5Njg2MTEyNjNlM2IyIiwic2FsdCI6ImM1ZDFjYzhiMTFiZGNjNDBhOTQzMGUwZGU0OWY5NmZmIiwidGV4dCI6ImY4M2FmZTUzNTkzYTBjNDc2OTQ3NDQ4NDc0ZGVlNmRiIn0=",
"userCode": "andrey.cunha", "userCode": "andrey.cunha",
"confirmExporting": false, "confirmExporting": false,
"hasBrowser": false, "hasBrowser": false,

View File

@ -0,0 +1,428 @@
function defineStructure() {
addColumn("success");
addColumn("message");
addColumn("key");
addColumn("invoiceNumber");
addColumn("serie");
addColumn("emissionDate");
addColumn("operationDate");
addColumn("supplierName");
addColumn("documentValue");
addColumn("totalItemsValue");
addColumn("situation");
addColumn("fiscalOperationDescription");
addColumn("itemCount");
addColumn("itensJson");
addColumn("storeId");
addColumn("invoiceId");
addColumn("emitterEmployeeId");
addColumn("updatedAt");
}
function onSync(lastSyncDate) {}
function createDataset(fields, constraints, sortFields) {
var dataset = DatasetBuilder.newDataset();
addDefaultColumns(dataset);
try {
var key = normalizeDigits(getConstraintValue(constraints, "key"));
if (!key) {
addErrorRow(dataset, "Informe a chave da NFe.");
return dataset;
}
if (!/^\d{44}$/.test(key)) {
addErrorRow(dataset, "A chave da NFe deve conter 44 digitos.");
return dataset;
}
var auth = resolveAuth(constraints);
var diagnostics = [];
var endpoints = [
"/fiscal-invoices?key=" + key,
"fiscal-invoices?key=" + key,
"/fiscal/invoices?key=" + key,
"/fiscal/invoice?key=" + key,
"/invoice?key=" + key
];
var apiObj = null;
var hitInfo = "";
var lastApiMessage = "";
try {
var clientService = fluigAPI.getAuthorizeClientService();
for (var i = 0; i < endpoints.length; i++) {
var endpoint = endpoints[i];
var resp = invokeAuthorizedGet(clientService, endpoint, auth);
diagnostics.push(endpoint + " => HTTP " + trim(resp.status));
var parsed = parseApiPayload(resp.body);
if (parsed && trim(parsed.message)) {
lastApiMessage = trim(parsed.message);
}
if (String(resp.status) === "200" && isApiSuccess(parsed)) {
apiObj = parsed;
hitInfo = endpoint;
break;
}
}
} catch (eService) {
diagnostics.push("authorizeClientService exception: " + eService);
}
if (!apiObj) {
var directUrls = [
"https://api.grupoginseng.com.br/fiscal-invoices?key=" + key,
"https://api.grupoginseng.com.br/fiscal/invoice?key=" + key
];
for (var d = 0; d < directUrls.length; d++) {
var url = directUrls[d];
var directResp = fetchDirect(url, 30000, auth);
diagnostics.push(url + " => HTTP " + trim(directResp.status));
var parsedDirect = parseApiPayload(directResp.body);
if (parsedDirect && trim(parsedDirect.message)) {
lastApiMessage = trim(parsedDirect.message);
}
if (String(directResp.status) === "200" && isApiSuccess(parsedDirect)) {
apiObj = parsedDirect;
hitInfo = url;
break;
}
}
}
if (!apiObj) {
var msg = "Falha ao consultar API da NFe. Tentativas: " + diagnostics.join(" | ");
if (lastApiMessage) {
msg += " | Ultima mensagem da API: " + lastApiMessage;
}
addErrorRow(dataset, msg);
return dataset;
}
if (!apiObj.success || !apiObj.data) {
addErrorRow(dataset, trim(apiObj.message) || "NFe nao encontrada. Fonte: " + hitInfo);
return dataset;
}
var dataNfe = apiObj.data || {};
var itens = dataNfe.itens || [];
var itensJson = JSON.stringify(buildNfeItems(itens));
dataset.addRow([
"true",
"OK (" + hitInfo + ")",
trim(dataNfe.key),
trim(dataNfe.invoiceNumber),
trim(dataNfe.serie),
formatIsoDate(dataNfe.emissionDate),
formatIsoDate(dataNfe.operationDate),
trim(dataNfe.supplierName),
trim(dataNfe.documentValue),
trim(dataNfe.totalItemsValue),
trim(dataNfe.situation),
trim(dataNfe.fiscalOperationDescription),
String(itens.length),
itensJson,
trim(dataNfe.storeId),
trim(dataNfe.invoiceId),
trim(dataNfe.emitterEmployeeId),
formatIsoDateTime(dataNfe.updatedAt)
]);
} catch (e) {
addErrorRow(dataset, "Erro ao consultar a NFe: " + e);
}
return dataset;
}
function onMobileSync(user) {}
function addDefaultColumns(dataset) {
dataset.addColumn("success");
dataset.addColumn("message");
dataset.addColumn("key");
dataset.addColumn("invoiceNumber");
dataset.addColumn("serie");
dataset.addColumn("emissionDate");
dataset.addColumn("operationDate");
dataset.addColumn("supplierName");
dataset.addColumn("documentValue");
dataset.addColumn("totalItemsValue");
dataset.addColumn("situation");
dataset.addColumn("fiscalOperationDescription");
dataset.addColumn("itemCount");
dataset.addColumn("itensJson");
dataset.addColumn("storeId");
dataset.addColumn("invoiceId");
dataset.addColumn("emitterEmployeeId");
dataset.addColumn("updatedAt");
}
function addErrorRow(dataset, message) {
dataset.addRow([
"false",
String(message || "Erro ao consultar NFe."),
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"0",
"[]",
"",
"",
"",
""
]);
}
function getConstraintValue(constraints, fieldName) {
if (!constraints || !fieldName) return "";
for (var i = 0; i < constraints.length; i++) {
var c = constraints[i];
if (!c || !c.fieldName) continue;
if (String(c.fieldName) === String(fieldName)) {
return c.initialValue;
}
}
return "";
}
function resolveAuth(constraints) {
var token = trim(getConstraintValue(constraints, "token"));
if (!token) {
try {
token = trim(java.lang.System.getenv("GINSENG_FISCAL_TOKEN"));
} catch (e1) {}
}
if (!token) {
// fallback informado durante homologacao
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhcGlnaW5zZW5nIiwiZXhwIjoxNzg3NDQ4MDY3fQ.GJqcIJBkMIfp_q_KRzgGuAHWWo93j3FWo3TObKqlAwA";
}
var basicUser = trim(getConstraintValue(constraints, "basicUser"));
var basicPass = trim(getConstraintValue(constraints, "basicPass"));
// Fallback operacional para homologacao, conforme credenciais validadas em teste manual.
if (!basicUser) basicUser = "fluig";
if (!basicPass) basicPass = "Ginseng@";
return {
token: token,
basicUser: basicUser,
basicPass: basicPass
};
}
function invokeAuthorizedGet(clientService, endpoint, auth) {
var authHeader = resolveAuthHeader(auth);
var headers = { "Accept": "application/json" };
if (authHeader) {
headers.Authorization = authHeader;
if (auth && auth.token) {
headers["x-access-token"] = auth.token;
}
}
var data = {
companyId: String(getValue("WKCompany") || "1"),
serviceCode: "GINSENG APITESTE",
endpoint: endpoint,
method: "get",
timeoutService: "30000",
params: {},
headers: headers
};
var vo = clientService.invoke(JSON.stringify(data));
return {
status: vo ? String(vo.getHttpStatusResult() || "") : "",
body: vo ? String(vo.getResult() || "") : ""
};
}
function parseApiPayload(bodyText) {
var raw = trim(bodyText);
if (!raw) return null;
var obj = parseJsonSafe(raw);
if (!obj) return null;
if (typeof obj.success !== "undefined" || typeof obj.data !== "undefined") {
return obj;
}
if (obj.content) {
if (typeof obj.content === "string") {
var c = parseJsonSafe(obj.content);
if (c) return c;
} else {
return obj.content;
}
}
if (obj.result) {
if (typeof obj.result === "string") {
var r = parseJsonSafe(obj.result);
if (r) return r;
} else {
return obj.result;
}
}
return obj;
}
function isApiSuccess(obj) {
if (!obj || !obj.data) return false;
if (obj.success === true) return true;
if (String(obj.success).toLowerCase() === "true") return true;
return false;
}
function fetchDirect(url, timeoutMs, auth) {
var conn = null;
var reader = null;
try {
var URL = java.net.URL;
var InputStreamReader = java.io.InputStreamReader;
var BufferedReader = java.io.BufferedReader;
var StringBuilder = java.lang.StringBuilder;
conn = new URL(url).openConnection();
conn.setRequestMethod("GET");
conn.setConnectTimeout(timeoutMs || 30000);
conn.setReadTimeout(timeoutMs || 30000);
conn.setRequestProperty("Accept", "application/json");
var authHeader = resolveAuthHeader(auth);
if (authHeader) {
conn.setRequestProperty("Authorization", authHeader);
if (auth.token) conn.setRequestProperty("x-access-token", auth.token);
}
var status = conn.getResponseCode();
var stream = (status >= 200 && status < 300) ? conn.getInputStream() : conn.getErrorStream();
if (stream == null) return { status: status, body: "" };
reader = new BufferedReader(new InputStreamReader(stream, "UTF-8"));
var sb = new StringBuilder();
var line = null;
while ((line = reader.readLine()) != null) {
sb.append(line);
}
return { status: String(status), body: String(sb.toString()) };
} catch (e) {
return { status: "", body: "" };
} finally {
try { if (reader) reader.close(); } catch (e1) {}
try { if (conn) conn.disconnect(); } catch (e2) {}
}
}
function resolveAuthHeader(auth) {
auth = auth || {};
if (auth.basicUser && auth.basicPass) {
var raw = String(auth.basicUser) + ":" + String(auth.basicPass);
var bytes = new java.lang.String(raw).getBytes("UTF-8");
var encoded = java.util.Base64.getEncoder().encodeToString(bytes);
return "Basic " + String(encoded);
}
if (auth.token) {
return "Bearer " + String(auth.token);
}
return "";
}
function buildNfeItems(items) {
var out = [];
if (!items || !(items instanceof Array)) return out;
for (var i = 0; i < items.length; i++) {
var item = items[i] || {};
out.push({
productId: trim(item.productId),
quantity: toNumber(item.quantity || item.completeQuantity),
code: trim(item.code || item.sku || item.productCode || item.codigo)
});
}
return out;
}
function toNumber(value) {
var text = trim(value).replace(",", ".");
var n = parseFloat(text);
return isNaN(n) ? 0 : n;
}
function normalizeDigits(value) {
return String(value == null ? "" : value).replace(/\D/g, "");
}
function parseJsonSafe(text) {
try {
return JSON.parse(text);
} catch (e) {
return null;
}
}
function trim(value) {
return String(value == null ? "" : value).trim();
}
function formatIsoDate(value) {
var text = trim(value);
if (!text) return "";
try {
var datePart = text.split("T")[0].split("-");
if (datePart.length !== 3) {
return text;
}
return datePart[2] + "/" + datePart[1] + "/" + datePart[0];
} catch (e) {
return text;
}
}
function formatIsoDateTime(value) {
var text = trim(value);
if (!text) return "";
try {
var dt = text.split("T");
if (dt.length < 1) return text;
var datePart = dt[0].split("-");
if (datePart.length !== 3) return text;
var timePart = "";
if (dt.length > 1) {
timePart = dt[1].replace("Z", "");
var dotIndex = timePart.indexOf(".");
if (dotIndex >= 0) {
timePart = timePart.substring(0, dotIndex);
}
}
var dateStr = datePart[2] + "/" + datePart[1] + "/" + datePart[0];
if (!timePart) return dateStr;
return dateStr + " " + timePart;
} catch (e) {
return text;
}
}

View File

@ -0,0 +1,301 @@
function defineStructure() {
addColumn("LOGIN");
addColumn("NOME");
addColumn("EMAIL");
addColumn("COLLEAGUE_ID");
addColumn("GROUP_ID");
}
function onSync(lastSyncDate) {}
function onMobileSync(user) {}
function createDataset(fields, constraints, sortFields) {
var dataset = DatasetBuilder.newDataset();
dataset.addColumn("LOGIN");
dataset.addColumn("NOME");
dataset.addColumn("EMAIL");
dataset.addColumn("COLLEAGUE_ID");
dataset.addColumn("GROUP_ID");
try {
var cfg = parseConstraints(constraints);
var members = getMembersFromGroup(cfg.groupId);
var termo = normalize(cfg.termoLivre);
var added = 0;
for (var i = 0; i < members.length; i++) {
var memberId = trim(members[i]);
if (!memberId) continue;
var col = getColleagueById(memberId);
if (!col) continue;
if (termo) {
var blob = normalize([
col.LOGIN,
col.NOME,
col.EMAIL,
col.COLLEAGUE_ID
].join(" "));
if (blob.indexOf(termo) === -1) {
continue;
}
}
dataset.addRow([
col.LOGIN,
col.NOME,
col.EMAIL,
col.COLLEAGUE_ID,
cfg.groupId
]);
added++;
}
if (added === 0) {
// Mantem dataset vazio para o zoom nao exibir usuarios fora do grupo.
}
} catch (e) {
safeLogError("[ds_motoristas_grupo] Erro no createDataset: " + e);
dataset = DatasetBuilder.newDataset();
dataset.addColumn("LOGIN");
dataset.addColumn("NOME");
dataset.addColumn("EMAIL");
dataset.addColumn("COLLEAGUE_ID");
dataset.addColumn("GROUP_ID");
}
return dataset;
}
function parseConstraints(constraints) {
var out = {
groupId: "Motoristas",
termoLivre: ""
};
if (!constraints) return out;
for (var i = 0; i < constraints.length; i++) {
var c = constraints[i];
if (!c) continue;
var field = getConstraintFieldName(c);
var value = getConstraintInitialValue(c);
if (!field) continue;
if (!value) continue;
if (
field === "GROUP_ID" ||
field === "groupId" ||
field === "group_id" ||
field === "colleagueGroupPK.groupId"
) {
out.groupId = value;
continue;
}
if (
field !== "metadata#id" &&
field !== "metadata#active" &&
field !== "sqlLimit"
) {
var cleaned = cleanSearchValue(value);
if (cleaned && (!out.termoLivre || cleaned.length > out.termoLivre.length)) {
out.termoLivre = cleaned;
}
}
}
return out;
}
function getMembersFromGroup(groupId) {
var members = {};
var out = [];
var gId = trim(groupId);
if (!gId) return out;
var fieldOptions = [
"colleagueGroupPK.groupId",
"groupId",
"group"
];
var groupCandidates = [gId];
var upper = gId.toUpperCase();
var lower = gId.toLowerCase();
if (groupCandidates.indexOf(upper) < 0) groupCandidates.push(upper);
if (groupCandidates.indexOf(lower) < 0) groupCandidates.push(lower);
var ds = null;
for (var g = 0; g < groupCandidates.length; g++) {
for (var i = 0; i < fieldOptions.length; i++) {
try {
var cGroup = DatasetFactory.createConstraint(fieldOptions[i], groupCandidates[g], groupCandidates[g], ConstraintType.MUST);
ds = DatasetFactory.getDataset("colleagueGroup", null, [cGroup], null);
if (ds && ds.rowsCount > 0) {
break;
}
} catch (e) {
safeLogError("[ds_motoristas_grupo] Erro consultando colleagueGroup (" + fieldOptions[i] + "=" + groupCandidates[g] + "): " + e);
ds = null;
}
}
if (ds && ds.rowsCount > 0) {
break;
}
}
if (!ds || ds.rowsCount === 0) {
// Fallback: alguns ambientes permitem filtrar direto no dataset colleague por groupId.
try {
var cGroupCol = DatasetFactory.createConstraint("groupId", gId, gId, ConstraintType.MUST);
ds = DatasetFactory.getDataset("colleague", null, [cGroupCol], null);
if (ds && ds.rowsCount > 0) {
for (var x = 0; x < ds.rowsCount; x++) {
var fallbackId = trim(
ds.getValue(x, "colleaguePK.colleagueId") ||
ds.getValue(x, "colleagueId") ||
ds.getValue(x, "login")
);
if (!fallbackId) continue;
if (members[fallbackId]) continue;
members[fallbackId] = true;
out.push(fallbackId);
}
}
} catch (eFallback) {
safeLogError("[ds_motoristas_grupo] Erro no fallback por groupId no colleague: " + eFallback);
}
return out;
}
for (var r = 0; r < ds.rowsCount; r++) {
var colleagueId = trim(
ds.getValue(r, "colleagueGroupPK.colleagueId") ||
ds.getValue(r, "colleagueId") ||
ds.getValue(r, "login")
);
if (!colleagueId) continue;
if (members[colleagueId]) continue;
members[colleagueId] = true;
out.push(colleagueId);
}
return out;
}
function getColleagueById(colleagueId) {
var id = trim(colleagueId);
if (!id) return null;
var fieldsToTry = ["colleaguePK.colleagueId", "colleagueId", "login"];
var ds = null;
// 1) Tenta buscando somente ativos com diferentes campos.
for (var i = 0; i < fieldsToTry.length; i++) {
ds = getColleagueDataset(id, fieldsToTry[i], true);
if (ds && ds.rowsCount > 0) {
break;
}
}
// 2) Fallback sem constraint de ativo (alguns ambientes tratam "active" de forma diferente).
if (!ds || ds.rowsCount === 0) {
for (var j = 0; j < fieldsToTry.length; j++) {
ds = getColleagueDataset(id, fieldsToTry[j], false);
if (ds && ds.rowsCount > 0) {
break;
}
}
}
if (!ds || ds.rowsCount === 0) return null;
var row = pickActiveRow(ds);
if (row < 0) row = 0;
var colleaguePkId = trim(
ds.getValue(row, "colleaguePK.colleagueId") ||
ds.getValue(row, "colleagueId") ||
ds.getValue(row, "login")
);
if (!colleaguePkId) return null;
return {
LOGIN: trim(ds.getValue(row, "login")),
NOME: trim(ds.getValue(row, "colleagueName")),
EMAIL: trim(ds.getValue(row, "mail")),
COLLEAGUE_ID: colleaguePkId
};
}
function getColleagueDataset(id, fieldName, onlyActive) {
try {
var constraints = [
DatasetFactory.createConstraint(fieldName, id, id, ConstraintType.MUST)
];
if (onlyActive) {
constraints.push(DatasetFactory.createConstraint("active", "true", "true", ConstraintType.MUST));
}
return DatasetFactory.getDataset("colleague", null, constraints, null);
} catch (e) {
safeLogError("[ds_motoristas_grupo] Erro consultando colleague (" + fieldName + "=" + id + ", active=" + onlyActive + "): " + e);
return null;
}
}
function pickActiveRow(ds) {
if (!ds || ds.rowsCount <= 0) return -1;
for (var i = 0; i < ds.rowsCount; i++) {
var activeValue = trim(ds.getValue(i, "active") || ds.getValue(i, "colleaguePK.active"));
if (!activeValue) return i;
var n = normalize(activeValue);
if (n === "true" || n === "1" || n === "yes" || n === "sim" || n === "y" || n === "s" || n === "t") {
return i;
}
}
return -1;
}
function getConstraintFieldName(constraint) {
try {
if (constraint.fieldName) return String(constraint.fieldName);
if (constraint._field) return String(constraint._field);
if (typeof constraint.getFieldName === "function") return String(constraint.getFieldName());
} catch (e) {}
return "";
}
function getConstraintInitialValue(constraint) {
try {
if (constraint.initialValue != null) return trim(constraint.initialValue);
if (constraint._initialValue != null) return trim(constraint._initialValue);
if (typeof constraint.getInitialValue === "function") return trim(constraint.getInitialValue());
} catch (e) {}
return "";
}
function trim(v) {
return String(v == null ? "" : v).trim();
}
function normalize(v) {
return trim(v).toLowerCase();
}
function cleanSearchValue(v) {
return trim(v).replace(/[%*_]/g, "");
}
function safeLogError(message) {
try {
log.error(String(message));
} catch (e) {}
}

View File

@ -13,61 +13,91 @@ function validateForm(form) {
switch (atividade) { switch (atividade) {
case EMISSAO: case EMISSAO:
log.info("Validando rastreabilidade da emissao da NFe");
// log.info("Abertura de Chamado CAERN - Área do Solicitante: " + form.getValue("areaSolicitante")); var chaveNfe = String(form.getValue("chaveNfe") || "").replace(/\D/g, "");
// if (form.getValue("areaSolicitante") == "") { if (chaveNfe == "") {
// message += getMessage("Área do Solicitante", 2, form); message += getMessage("Chave de acesso da NFe", 1, form);
// hasErros = true; hasErros = true;
// } }
if (chaveNfe != "" && chaveNfe.length != 44) {
log.info("Por favor, anexar a nota fiscal" + form.getValue("fnAnexo_Nfe")); message += "Campo \"Chave de acesso da NFe\" deve conter 44 digitos.<br>";
if (form.getValue("fnAnexo_Nfe") == "") { hasErros = true;
message += getMessage("Nota Fiscal", 3, form); }
if (form.getValue("invoiceIdNfeConsulta") == "") {
message += "Consulte a chave da NFe antes de enviar esta etapa.<br>";
hasErros = true;
}
var qtdDivergenciasNfe = parseInt(String(form.getValue("qtdDivergenciasNfe") || "0"), 10);
if (!isNaN(qtdDivergenciasNfe) && qtdDivergenciasNfe > 0) {
message += "Existem " + qtdDivergenciasNfe + " divergencia(s) entre a solicitacao e a NFe.<br>";
hasErros = true;
}
if (form.getValue("usuarioEmissorNfe") == "") {
message += getMessage("Usuário emissor da NFe", 1, form);
hasErros = true;
}
if (form.getValue("dataEmissaoNfe") == "") {
message += getMessage("Data da emissão", 1, form);
hasErros = true; hasErros = true;
} }
// var tabelaAnexos = form.getChildrenIndexes("tabelaAnexoOcorrencia")
// if (tabelaAnexos.length > 0) {
// for (var i = 0; i < tabelaAnexos.length; i++) {
// if (form.getValue("fnAnexoOcorrencia" + "" + tabelaAnexos[i]) == null || form.getValue("fnAnexoOcorrencia" + "" + tabelaAnexos[i]) == "") {
// message += getMessage("Anexo " + tabelaAnexos[i], 1, form)
// hasErros = true;
// }
// }
// } else {
// message += getMessage("A tabela de Anexos esta vazia", 0, form)
// hasErros = true;
// }
break; break;
case COLETA: case COLETA:
log.info("Por favor, registre o momento da coleta" + form.getValue("fdAnexo_Coleta")); log.info("Validando dados da coleta");
if (form.getValue("fdAnexo_Coleta") == "") { if (form.getValue("motoristaColetaNome") == "") {
message += getMessage("Coleta", 3, form); message += getMessage("Motorista responsável pela coleta", 1, form);
hasErros = true; hasErros = true;
} }
if (form.getValue("dataColeta") == "") {
message += getMessage("Data da coleta", 1, form);
hasErros = true;
}
var tipoMotoristaEntregaColeta = String(form.getValue("tipoMotoristaEntrega") || "");
if (tipoMotoristaEntregaColeta == "") {
message += getMessage("Quem vai fazer a entrega", 2, form);
hasErros = true;
}
if (tipoMotoristaEntregaColeta == "outro" && form.getValue("motoristaEntregaLogin") == "") {
message += getMessage("Selecionar outro motorista", 1, form);
hasErros = true;
}
if (tipoMotoristaEntregaColeta == "mesmo" && form.getValue("motoristaColetaLogin") == "") {
message += getMessage("Login do motorista da coleta", 1, form);
hasErros = true;
}
break;
case ENTREGA: case ENTREGA:
log.info("Por favor, registre o momento da entrega" + form.getValue("fdAnexo_Entrega")); log.info("Validando dados da entrega");
if (form.getValue("fdAnexo_Entrega") == "") { if (form.getValue("motoristaEntregaLogin") == "") {
message += getMessage("Entrega", 3, form); message += getMessage("Motorista da entrega definido na coleta", 1, form);
hasErros = true; hasErros = true;
} }
if (form.getValue("motoristaEntregaNome") == "") {
message += getMessage("Motorista responsável pela entrega", 1, form);
hasErros = true;
}
if (form.getValue("dataEntrega") == "") {
message += getMessage("Data da entrega", 1, form);
hasErros = true;
}
break;
case RECEBIMENTO: case RECEBIMENTO:
log.info("Por favor, registre o recebimento do material" + form.getValue("fdAnexo_recebimento")); log.info("Validando recebimento e conferencia dos itens");
if (form.getValue("fdAnexo_recebimento") == "") { var validacaoItens = String(form.getValue("validacaoItens") || "");
message += getMessage("Recebimento", 3, form); if (validacaoItens == "") {
message += getMessage("Validação do recebimento", 2, form);
hasErros = true; hasErros = true;
} }
if (
(validacaoItens == "divergencia" || validacaoItens == "naoEntregue" || validacaoItens == "incorreto") &&
form.getValue("justificativaDecisaoItens") == ""
) {
message += getMessage("Descreva a divergência encontrada", 1, form);
hasErros = true;
}
break;
default: default:
break; break;
} }
@ -100,3 +130,4 @@ function getMessage(texto, tipo, form) {
return 'A quantidade existente de campos "' + texto + '" deve ser maior do que 0.' return 'A quantidade existente de campos "' + texto + '" deve ser maior do que 0.'
} }
} }

View File

@ -1,41 +1,102 @@
var xlsxLoader = {
loading: false,
callbacks: []
};
function carregarItensDoExcel(fileInputId) { function carregarItensDoExcel(fileInputId) {
const fileInput = document.getElementById(fileInputId); var fileInput = document.getElementById(fileInputId);
const file = fileInput ? fileInput.files[0] : null; var file = fileInput ? fileInput.files[0] : null;
if (!file) { if (!file) {
FLUIGC.toast({ title: 'Erro', message: 'Nenhum arquivo selecionado.', type: 'danger' }); FLUIGC.toast({ title: 'Erro', message: 'Nenhum arquivo selecionado.', type: 'danger' });
return; return;
} }
if (typeof XLSX === "undefined") {
FLUIGC.toast({ title: 'Erro', message: 'Biblioteca XLSX nao carregada.', type: 'danger' }); showExcelLoading();
ensureXlsxLibrary(function (err) {
if (err) {
hideExcelLoading();
FLUIGC.toast({ title: 'Erro', message: 'Biblioteca XLSX indisponivel.', type: 'danger' });
console.error("Erro ao carregar XLSX:", err);
return; return;
} }
showExcelLoading(); processarArquivoExcel(file);
});
}
const reader = new FileReader(); function ensureXlsxLibrary(callback) {
if (typeof XLSX !== "undefined") {
callback();
return;
}
xlsxLoader.callbacks.push(callback);
if (xlsxLoader.loading) {
return;
}
xlsxLoader.loading = true;
loadXlsxScript(0);
}
function loadXlsxScript(index) {
var urls = [
"/portal/resources/js/xlsx.full.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"
];
if (index >= urls.length) {
flushXlsxCallbacks(new Error("Biblioteca XLSX nao encontrada."));
return;
}
$.getScript(urls[index])
.done(function () {
if (typeof XLSX === "undefined") {
loadXlsxScript(index + 1);
return;
}
flushXlsxCallbacks();
})
.fail(function () {
loadXlsxScript(index + 1);
});
}
function flushXlsxCallbacks(err) {
var callbacks = xlsxLoader.callbacks.splice(0, xlsxLoader.callbacks.length);
xlsxLoader.loading = false;
for (var i = 0; i < callbacks.length; i++) {
callbacks[i](err);
}
}
function processarArquivoExcel(file) {
var reader = new FileReader();
reader.onload = function (e) { reader.onload = function (e) {
// Permite o navegador renderizar o overlay antes de processar. // Permite o navegador renderizar o overlay antes de processar.
setTimeout(function () { setTimeout(function () {
try { try {
const data = new Uint8Array(e.target.result); var data = new Uint8Array(e.target.result);
const workbook = XLSX.read(data, { type: 'array' }); var workbook = XLSX.read(data, { type: 'array' });
const sheetName = workbook.SheetNames[0]; var sheetName = workbook.SheetNames[0];
const sheet = workbook.Sheets[sheetName]; var sheet = workbook.Sheets[sheetName];
const linhas = XLSX.utils.sheet_to_json(sheet, { defval: "" }); var linhas = XLSX.utils.sheet_to_json(sheet, { defval: "" });
// Limpa a tabela (sem usar form) // Limpa a tabela (sem usar form)
const indices = $("input[id^='codigoItem___']").map(function () { var indices = $("input[id^='codigoItem___']").map(function () {
return $(this).attr("id").split("___")[1]; return $(this).attr("id").split("___")[1];
}).get(); }).get();
$.each(indices, function (_, idx) { $.each(indices, function (_, idx) {
fnWdkRemoveChild(idx); fnWdkRemoveChild(idx);
}); });
const linhasValidas = []; var linhasValidas = [];
$.each(linhas, function (_, item) { $.each(linhas, function (_, item) {
const codigo = getCellByAliases(item, ["codigoItem", "codigo", "codItem", "sku", "code", "item"]); var codigo = getCellByAliases(item, ["codigoItem", "codigo", "codItem", "sku", "code", "item"]);
const quantidade = getCellByAliases(item, ["quantidadeItem", "quantidade", "qtd", "qtde"]); var quantidade = getCellByAliases(item, ["quantidadeItem", "quantidade", "qtd", "qtde"]);
const descricao = getCellByAliases(item, ["descricao", "description", "desc"]); var descricao = getCellByAliases(item, ["descricao", "description", "desc"]);
if (!codigo || !quantidade) { if (!codigo || !quantidade) {
return; return;
@ -59,23 +120,33 @@ function carregarItensDoExcel(fileInputId) {
// Adiciona os itens da planilha // Adiciona os itens da planilha
$.each(linhasValidas, function (_, item) { $.each(linhasValidas, function (_, item) {
const idx = wdkAddChild('tabelaItens'); var idx = wdkAddChild('tabelaItens');
const zoomObj = window[`descricao___${idx}`]; var zoomObj = window["descricao___" + idx];
if (zoomObj && typeof zoomObj.setValue === "function") { if (zoomObj && typeof zoomObj.setValue === "function") {
zoomObj.setValue(item.codigo); zoomObj.setValue(item.codigo);
} else { } else {
// Fallback visual caso o objeto zoom ainda nao esteja pronto no momento. // Fallback visual caso o objeto zoom ainda nao esteja pronto no momento.
$(`#descricao___${idx}`).val(item.codigo); $("#descricao___" + idx).val(item.codigo);
} }
$(`#quantidadeItem___${idx}`).val(item.quantidade); $("#quantidadeItem___" + idx).val(item.quantidade);
$("#codigoProdutoItem___" + idx).val(item.codigo);
var descricaoFinal = item.descricao || buscarDescricaoProduto(item.codigo); var produtoInfo = buscarProdutoPorCodigo(item.codigo);
if (produtoInfo.id) {
$("#productIdItem___" + idx).val(produtoInfo.id);
}
var descricaoFinal = item.descricao || produtoInfo.descricao;
if (descricaoFinal) { if (descricaoFinal) {
$(`#codigoItem___${idx}`).val(descricaoFinal); $("#codigoItem___" + idx).val(descricaoFinal);
} }
}); });
if (typeof processarConferenciaNfe === "function") {
processarConferenciaNfe();
}
FLUIGC.toast({ title: 'Sucesso', message: linhasValidas.length + ' itens carregados com sucesso!', type: 'success' }); FLUIGC.toast({ title: 'Sucesso', message: linhasValidas.length + ' itens carregados com sucesso!', type: 'success' });
} catch (err) { } catch (err) {
FLUIGC.toast({ title: 'Erro', message: 'Falha ao processar Excel: ' + err.message, type: 'danger' }); FLUIGC.toast({ title: 'Erro', message: 'Falha ao processar Excel: ' + err.message, type: 'danger' });
@ -118,36 +189,46 @@ function normalizeHeader(text) {
.toLowerCase(); .toLowerCase();
} }
function buscarDescricaoProduto(codigo) { function buscarProdutoPorCodigo(codigo) {
try { try {
if (typeof DatasetFactory === "undefined" || typeof ConstraintType === "undefined") { if (typeof DatasetFactory === "undefined" || typeof ConstraintType === "undefined") {
return ""; return { descricao: "", id: "" };
} }
var codigoTxt = String(codigo || "").trim(); var codigoTxt = String(codigo || "").trim();
if (!codigoTxt) return ""; if (!codigoTxt) return { descricao: "", id: "" };
var cCodigo = DatasetFactory.createConstraint("Code", codigoTxt, codigoTxt, ConstraintType.MUST); var cCodigo = DatasetFactory.createConstraint("Code", codigoTxt, codigoTxt, ConstraintType.MUST);
var ds = DatasetFactory.getDataset("ds_rgb_products", null, [cCodigo], null); var ds = DatasetFactory.getDataset("ds_rgb_products", null, [cCodigo], null);
if (!ds || !ds.values || !ds.values.length) { if (!ds || !ds.values || !ds.values.length) {
return ""; return { descricao: "", id: "" };
} }
for (var i = 0; i < ds.values.length; i++) { for (var i = 0; i < ds.values.length; i++) {
var row = ds.values[i] || {}; var row = ds.values[i] || {};
if (String(row.Code || "").trim() === codigoTxt) { if (String(row.Code || "").trim() === codigoTxt) {
return String(row.descricao || row.Description || "").trim(); return {
descricao: String(row.descricao || row.Description || "").trim(),
id: String(row.id || "").trim()
};
} }
} }
var first = ds.values[0] || {}; var first = ds.values[0] || {};
return String(first.descricao || first.Description || "").trim(); return {
descricao: String(first.descricao || first.Description || "").trim(),
id: String(first.id || "").trim()
};
} catch (e) { } catch (e) {
console.error("Erro ao buscar descricao por codigo:", e); console.error("Erro ao buscar descricao por codigo:", e);
return ""; return { descricao: "", id: "" };
} }
} }
function buscarDescricaoProduto(codigo) {
return buscarProdutoPorCodigo(codigo).descricao;
}
function showExcelLoading() { function showExcelLoading() {
var overlay = document.getElementById("excelLoadingOverlay"); var overlay = document.getElementById("excelLoadingOverlay");
if (overlay) { if (overlay) {

View File

@ -26,13 +26,41 @@ $(document).ready(function () {
$('#btnRemoverExcel').hide(); $('#btnRemoverExcel').hide();
}); });
$('#chaveNfe').on('input', function () {
var key = normalizeNfeKey($(this).val());
$(this).val(key);
clearNfeConsultaFields();
setNfeFeedback("", "hidden");
});
$('#btnConsultarChaveNfe').on('click', function () {
consultarChaveNfe();
});
$(document).on("change", "input[name='tipoMotoristaEntrega']", function () {
applyMotoristaEntregaMode($(this).val(), false);
});
$(document).on("change", "#motoristaEntregaSelecionado", function () {
applySelectedMotoristaEntregaOption();
});
$(document).on("input", "input[name^='quantidadeItem___']", function () {
processarConferenciaNfe();
});
if ($("#formMode").val() == "VIEW") { if ($("#formMode").val() == "VIEW") {
showAndBlock(["all"]); showAndBlock(["all"]);
$("#btnConsultarChaveNfe").prop("disabled", true).hide();
} else { } else {
//show the right fields //show the right fields
var activity = $("#activity").val(); var activity = $("#activity").val();
var requestDate = getCurrentDate(); var requestDate = getCurrentDate();
if (String(activity) !== "6") {
$("#btnConsultarChaveNfe").prop("disabled", true).hide();
}
$(".activity").hide(); $(".activity").hide();
$(".activity-" + activity).show(); $(".activity-" + activity).show();
@ -51,10 +79,14 @@ $(document).ready(function () {
updt_line(); updt_line();
} else if (activity == 6) { } else if (activity == 6) {
showAndBlock([0, 4]); showAndBlock([0, 4]);
$("#userValidacaoCompras").val($("#currentUserName").val()); if ($("#usuarioEmissorNfe").val() == "") {
$("#dataValidacaoCompras").val( $("#usuarioEmissorNfe").val($("#currentUserName").val());
}
if ($("#dataEmissaoNfe").val() == "") {
$("#dataEmissaoNfe").val(
requestDate[0] + " - " + requestDate[1] requestDate[0] + " - " + requestDate[1]
); );
}
if ($("#justificativaDecisaoGestor").val() == "") { if ($("#justificativaDecisaoGestor").val() == "") {
$(".justificativa-activity-4").hide(); $(".justificativa-activity-4").hide();
@ -66,6 +98,9 @@ $(document).ready(function () {
$("#dataAprovCompras").val( $("#dataAprovCompras").val(
requestDate[0] + " - " + requestDate[1] requestDate[0] + " - " + requestDate[1]
); );
$("#blocoTipoMotoristaEntrega, #blocoOutroMotoristaEntrega").hide();
$("input[name='tipoMotoristaEntrega']").prop("disabled", true);
$("#motoristaEntregaSelecionado").prop("disabled", true);
showAndBlock([0, 4, 6]); showAndBlock([0, 4, 6]);
if ($("#justificativaDecisaoGestor").val() == "") { if ($("#justificativaDecisaoGestor").val() == "") {
@ -81,7 +116,21 @@ $(document).ready(function () {
$("#dataRealizacaoCompras").val( $("#dataRealizacaoCompras").val(
requestDate[0] + " - " + requestDate[1] requestDate[0] + " - " + requestDate[1]
); );
showAndBlock([0, 4, 6, 57]); if ($("#motoristaColetaNome").val() == "") {
$("#motoristaColetaNome").val($("#currentUserName").val());
}
if ($("#motoristaColetaLogin").val() == "") {
$("#motoristaColetaLogin").val($("#currentUserId").val());
}
if ($("#dataColeta").val() == "") {
$("#dataColeta").val(requestDate[0] + " " + requestDate[1]);
}
initMotoristaEntregaEscolha();
$("#blocoTipoMotoristaEntrega").show();
$("input[name='tipoMotoristaEntrega']").prop("disabled", false);
$("#motoristaEntregaSelecionado").prop("disabled", false);
// Mantem apenas etapas anteriores bloqueadas; card de coleta e entrega estao separados.
showAndBlock([0, 4, 6]);
if ($("#justificativaDecisaoGestor").val() == "") { if ($("#justificativaDecisaoGestor").val() == "") {
$(".justificativa-activity-4").hide(); $(".justificativa-activity-4").hide();
@ -111,9 +160,11 @@ $(document).ready(function () {
$("input[name=validacaoItens]").on("change", function () { $("input[name=validacaoItens]").on("change", function () {
$(".justificativaDecisaoItens").hide(); $(".justificativaDecisaoItens").hide();
var validacaoItensSelecionada = $("input[name=validacaoItens]:checked").val();
if ( if (
$("input[name=validacaoItens]:checked").val() == "incorreto" || validacaoItensSelecionada == "divergencia" ||
$("input[name=validacaoItens]:checked").val() == "naoEntregue" validacaoItensSelecionada == "incorreto" ||
validacaoItensSelecionada == "naoEntregue"
) { ) {
$(".justificativaDecisaoItens").show(); $(".justificativaDecisaoItens").show();
} }
@ -146,6 +197,7 @@ $(document).ready(function () {
invisibleBtnUpload("fdAnexo_Coleta"); invisibleBtnUpload("fdAnexo_Coleta");
invisibleBtnUpload("fdAnexo_Entrega"); invisibleBtnUpload("fdAnexo_Entrega");
invisibleBtnUpload("fdAnexo_recebimento"); invisibleBtnUpload("fdAnexo_recebimento");
processarConferenciaNfe();
// gerarTabelaCotacaoIndica("tabelaCotacaoIndica", "tabelaItens"); // gerarTabelaCotacaoIndica("tabelaCotacaoIndica", "tabelaItens");
@ -238,6 +290,589 @@ function getCurrentDate() {
return currentDate; return currentDate;
} }
function initMotoristaEntregaEscolha() {
var escolha = String($("input[name='tipoMotoristaEntrega']:checked").val() || "");
if (!escolha) {
var coletaLogin = String($("#motoristaColetaLogin").val() || "").trim();
var entregaLogin = String($("#motoristaEntregaLogin").val() || "").trim();
if (entregaLogin && coletaLogin && entregaLogin !== coletaLogin) {
escolha = "outro";
} else {
escolha = $("#motoristaColetaNome").val() ? "mesmo" : "outro";
}
$("input[name='tipoMotoristaEntrega'][value='" + escolha + "']").prop("checked", true);
}
applyMotoristaEntregaMode(escolha, true);
}
function applyMotoristaEntregaMode(mode, keepValues) {
var escolha = String(mode || "");
var blocoOutro = $("#blocoOutroMotoristaEntrega");
if (!blocoOutro.length) return;
if (escolha === "outro") {
blocoOutro.show();
loadMotoristasEntregaSelect(false);
if (!keepValues) {
$("#motoristaEntregaNome").val("");
$("#motoristaEntregaLogin").val("");
clearZoomField("motoristaEntregaSelecionado");
} else {
syncMotoristaEntregaSelectFromHidden();
}
return;
}
blocoOutro.hide();
if (escolha === "mesmo") {
var coletaNome = String($("#motoristaColetaNome").val() || "").trim();
var coletaLogin = String($("#motoristaColetaLogin").val() || "").trim();
if (coletaNome) $("#motoristaEntregaNome").val(coletaNome);
if (coletaLogin) $("#motoristaEntregaLogin").val(coletaLogin);
}
}
function clearZoomField(fieldId) {
try {
if (window[fieldId] && typeof window[fieldId].clear === "function") {
window[fieldId].clear();
}
} catch (e) {}
try {
if (window[fieldId] && typeof window[fieldId].setValue === "function") {
window[fieldId].setValue("");
}
} catch (e2) {}
$("#" + fieldId).val("");
}
var MOTORISTAS_GROUP_ID = "Motoristas";
var motoristasEntregaCache = null;
var motoristasEntregaLoading = false;
function loadMotoristasEntregaSelect(forceReload) {
var select = $("#motoristaEntregaSelecionado");
if (!select.length) return;
if (!forceReload && motoristasEntregaCache && motoristasEntregaCache.length) {
renderMotoristasEntregaOptions(motoristasEntregaCache);
return;
}
if (motoristasEntregaLoading) return;
motoristasEntregaLoading = true;
var requestPayload = {
name: "ds_motoristas_grupo",
fields: null,
constraints: [{
_field: "GROUP_ID",
_initialValue: MOTORISTAS_GROUP_ID,
_finalValue: MOTORISTAS_GROUP_ID,
_type: 1
}],
order: null
};
$.ajax({
type: "POST",
url: "/api/public/ecm/dataset/datasets/",
contentType: "application/json",
dataType: "json",
data: JSON.stringify(requestPayload)
}).done(function (response) {
var values = ((((response || {}).content || {}).values) || []);
motoristasEntregaCache = normalizeMotoristasEntregaRows(values);
renderMotoristasEntregaOptions(motoristasEntregaCache);
}).fail(function (xhr) {
console.error("Falha ao carregar motoristas do dataset:", xhr);
motoristasEntregaCache = [];
renderMotoristasEntregaOptions([]);
}).always(function () {
motoristasEntregaLoading = false;
});
}
function normalizeMotoristasEntregaRows(values) {
var out = [];
var map = {};
for (var i = 0; i < values.length; i++) {
var row = values[i] || {};
var colleagueId = String(row.COLLEAGUE_ID || row.colleagueId || row.colleagueid || "").trim();
if (!colleagueId) continue;
if (map[colleagueId]) continue;
map[colleagueId] = true;
out.push({
COLLEAGUE_ID: colleagueId,
NOME: String(row.NOME || row.colleagueName || row.nome || "").trim(),
LOGIN: String(row.LOGIN || row.login || "").trim(),
EMAIL: String(row.EMAIL || row.mail || row.email || "").trim()
});
}
out.sort(function (a, b) {
var aNome = (a.NOME || a.LOGIN || a.COLLEAGUE_ID).toLowerCase();
var bNome = (b.NOME || b.LOGIN || b.COLLEAGUE_ID).toLowerCase();
return aNome < bNome ? -1 : (aNome > bNome ? 1 : 0);
});
return out;
}
function renderMotoristasEntregaOptions(rows) {
var select = $("#motoristaEntregaSelecionado");
if (!select.length) return;
var selectedValue = String($("#motoristaEntregaLogin").val() || select.val() || "").trim();
select.empty();
select.append($("<option></option>").val("").text("Selecione o motorista"));
for (var i = 0; i < rows.length; i++) {
var row = rows[i];
var nome = String(row.NOME || row.LOGIN || row.COLLEAGUE_ID);
var label = row.LOGIN ? (nome + " (" + row.LOGIN + ")") : nome;
var option = $("<option></option>")
.val(row.COLLEAGUE_ID)
.text(label)
.attr("data-nome", nome)
.attr("data-login", String(row.LOGIN || ""));
select.append(option);
}
if (selectedValue) {
select.val(selectedValue);
}
if (!select.val()) {
// Limpa selecao visual quando o valor salvo nao existe mais no dataset.
select.val("");
}
applySelectedMotoristaEntregaOption();
}
function syncMotoristaEntregaSelectFromHidden() {
var select = $("#motoristaEntregaSelecionado");
if (!select.length) return;
var storedId = String($("#motoristaEntregaLogin").val() || "").trim();
if (!storedId) {
select.val("");
return;
}
select.val(storedId);
if (select.val()) {
applySelectedMotoristaEntregaOption();
}
}
function applySelectedMotoristaEntregaOption() {
var select = $("#motoristaEntregaSelecionado");
if (!select.length) return;
var selectedId = String(select.val() || "").trim();
if (!selectedId) {
if (String($("input[name='tipoMotoristaEntrega']:checked").val() || "") === "outro") {
$("#motoristaEntregaNome").val("");
$("#motoristaEntregaLogin").val("");
}
return;
}
var option = select.find("option:selected");
var nome = String(option.attr("data-nome") || option.text() || "").trim();
$("#motoristaEntregaLogin").val(selectedId);
$("#motoristaEntregaNome").val(nome);
$("#tipoMotoristaEntregaOutro").prop("checked", true);
}
function normalizeNfeKey(value) {
return String(value == null ? "" : value).replace(/\D/g, "").substring(0, 44);
}
function clearNfeConsultaFields() {
$("#numeroNfeConsulta").val("");
$("#serieNfeConsulta").val("");
$("#dataEmissaoApiNfe").val("");
$("#situacaoNfeConsulta").val("");
$("#fornecedorNfeConsulta").val("");
$("#valorNfeConsulta").val("");
$("#dataEntradaNfeConsulta").val("");
$("#itensNfeConsulta").val("");
$("#operacaoNfeConsulta").val("");
$("#lojaNfeConsulta").val("");
$("#invoiceIdNfeConsulta").val("");
$("#storeIdNfeConsulta").val("");
$("#itensNfeJson").val("[]");
$("#qtdDivergenciasNfe").val("0");
renderTabelaConferencia([], 0, 0, "Consulte a chave da NFe para gerar o confronto dos itens.", "info");
}
function setNfeFeedback(message, type) {
var feedback = $("#consultaNfeFeedback");
if (!feedback.length) {
return;
}
feedback.removeClass("alert-success alert-danger alert-info alert-warning");
if (!message || type === "hidden") {
feedback.hide().text("");
return;
}
if (type === "success") {
feedback.addClass("alert-success");
} else if (type === "warning") {
feedback.addClass("alert-warning");
} else if (type === "info") {
feedback.addClass("alert-info");
} else {
feedback.addClass("alert-danger");
}
feedback.text(message).show();
}
function formatNfeCurrency(value) {
var textValue = String(value == null ? "" : value).trim();
if (textValue === "") {
return "";
}
var numberValue = parseFloat(textValue.replace(",", "."));
if (isNaN(numberValue)) {
return textValue;
}
try {
return numberValue.toLocaleString("pt-BR", { style: "currency", currency: "BRL" });
} catch (e) {
return textValue;
}
}
function fillNfeConsultaFields(row) {
var emissionDate = String(row.emissionDate || "");
$("#numeroNfeConsulta").val(String(row.invoiceNumber || ""));
$("#serieNfeConsulta").val(String(row.serie || ""));
$("#dataEmissaoApiNfe").val(emissionDate);
$("#situacaoNfeConsulta").val(String(row.situation || ""));
$("#fornecedorNfeConsulta").val(String(row.supplierName || ""));
$("#valorNfeConsulta").val(formatNfeCurrency(row.documentValue));
$("#dataEntradaNfeConsulta").val(String(row.updatedAt || ""));
$("#itensNfeConsulta").val(String(row.itemCount || ""));
$("#operacaoNfeConsulta").val(String(row.fiscalOperationDescription || ""));
$("#lojaNfeConsulta").val(String(row.storeId || ""));
$("#invoiceIdNfeConsulta").val(String(row.invoiceId || ""));
$("#storeIdNfeConsulta").val(String(row.storeId || ""));
$("#itensNfeJson").val(String(row.itensJson || "[]"));
if (emissionDate) {
$("#dataEmissaoNfe").val(emissionDate);
}
processarConferenciaNfe();
}
function processarConferenciaNfe() {
var nfeItems = parseItensNfeJson();
if (nfeItems.length === 0) {
$("#qtdDivergenciasNfe").val("0");
renderTabelaConferencia([], 0, 0, "Consulte a chave da NFe para gerar o confronto dos itens.", "info");
return;
}
var solicitacaoMap = buildSolicitacaoMap();
var nfeMap = buildNfeMap(nfeItems);
var allKeys = mergeKeys(solicitacaoMap, nfeMap);
var rows = [];
var divergencias = 0;
for (var i = 0; i < allKeys.length; i++) {
var key = allKeys[i];
var req = solicitacaoMap[key] || { qty: 0, label: key };
var nfe = nfeMap[key] || { qty: 0, label: key };
var status = "OK";
if (req.qty === 0 && nfe.qty > 0) {
status = "Somente NFe";
} else if (nfe.qty === 0 && req.qty > 0) {
status = "Somente solicitacao";
} else if (Math.abs(req.qty - nfe.qty) > 0.00001) {
status = "Quantidade divergente";
}
if (status !== "OK") {
divergencias++;
}
rows.push({
key: req.label || nfe.label || key,
requestedQty: req.qty,
nfeQty: nfe.qty,
status: status
});
}
$("#qtdDivergenciasNfe").val(String(divergencias));
var resumo = "Conferencia finalizada: " + rows.length + " item(ns), " + divergencias + " divergencia(s).";
var resumoType = divergencias > 0 ? "warning" : "success";
renderTabelaConferencia(rows, rows.length, divergencias, resumo, resumoType);
}
function parseItensNfeJson() {
var raw = String($("#itensNfeJson").val() || "[]");
try {
var parsed = JSON.parse(raw);
return parsed instanceof Array ? parsed : [];
} catch (e) {
return [];
}
}
function buildSolicitacaoMap() {
var out = {};
$("input[name^='quantidadeItem___']").each(function () {
var name = $(this).attr("name") || "";
var indice = name.split("___")[1];
if (!indice) return;
var qty = toFloatSafe($(this).val());
if (qty <= 0) return;
var productId = String($("#productIdItem___" + indice).val() || "").trim();
var code = resolveSolicitacaoItemCode(indice, $(this));
var descricao = String($("#codigoItem___" + indice).val() || "").trim();
var key = resolveConferenciaKey(productId, code, "ROW:" + indice);
var label = productId ? ("PID " + productId) : (code || descricao || ("Linha " + indice));
if (!out[key]) {
out[key] = { qty: 0, label: label };
}
out[key].qty += qty;
});
return out;
}
function resolveSolicitacaoItemCode(indice, qtyInput) {
var code = String($("#codigoProdutoItem___" + indice).val() || "").trim();
if (code) return normalizeCodigoComparacao(code);
code = String($("#descricao___" + indice).val() || "").trim();
if (code) return normalizeCodigoComparacao(code);
var row = qtyInput && qtyInput.length ? qtyInput.closest("tr") : $();
if (row.length) {
var byName = findFirstFilledValue(row.find("input[name='descricao___" + indice + "']"));
if (byName) return normalizeCodigoComparacao(byName);
var anyDescricao = findFirstFilledValue(row.find("input[name^='descricao']"));
if (anyDescricao) return normalizeCodigoComparacao(anyDescricao);
var byIdLike = findFirstFilledValue(row.find("input[id*='descricao']"));
if (byIdLike) return normalizeCodigoComparacao(byIdLike);
var codigoCellInputs = row.find("td").eq(1).find("input,select,textarea");
var fromCodigoCell = findFirstFilledValue(codigoCellInputs);
if (fromCodigoCell) return normalizeCodigoComparacao(fromCodigoCell);
// Em modo bloqueado/view, o Zoom pode renderizar apenas texto em span/div.
var codigoCell = row.find("td").eq(1);
var zoomRendered = findFirstFilledText(codigoCell.find(
".select2-selection__rendered, .select2-chosen, .zoom-value, .zoom-span, span, div"
));
if (zoomRendered) return normalizeCodigoComparacao(zoomRendered);
// Fallback final: texto bruto da célula.
var rawCellText = String(codigoCell.text() || "").trim();
if (rawCellText) return normalizeCodigoComparacao(rawCellText);
}
return "";
}
function findFirstFilledValue(elements) {
if (!elements || !elements.length) return "";
for (var i = 0; i < elements.length; i++) {
var $el = $(elements[i]);
var val = String($el.val() || "").trim();
if (!val) {
val = String($el.attr("value") || "").trim();
}
if (!val) {
val = String($el.attr("data-value") || "").trim();
}
if (val) return val;
}
return "";
}
function findFirstFilledText(elements) {
if (!elements || !elements.length) return "";
for (var i = 0; i < elements.length; i++) {
var txt = String($(elements[i]).text() || "").trim();
if (txt) return txt;
}
return "";
}
function normalizeCodigoComparacao(value) {
var raw = String(value || "").trim();
if (!raw) return "";
// Zoom pode trazer "75655 - DESCRICAO"; para conferencia usamos o primeiro token.
var firstToken = raw.split(" - ")[0].split(" | ")[0].trim();
return firstToken || raw;
}
function buildNfeMap(items) {
var out = {};
for (var i = 0; i < items.length; i++) {
var item = items[i] || {};
var qty = toFloatSafe(item.quantity);
if (qty <= 0) continue;
var productId = String(item.productId || "").trim();
var code = String(item.code || "").trim();
var key = resolveConferenciaKey(productId, code, "NFE:" + i);
var label = productId ? ("PID " + productId) : (code || ("Item NFe " + (i + 1)));
if (!out[key]) {
out[key] = { qty: 0, label: label };
}
out[key].qty += qty;
}
return out;
}
function resolveConferenciaKey(productId, code, fallback) {
var pid = String(productId || "").trim();
if (pid) {
return "ITEM:" + pid;
}
var cod = String(code || "").trim();
if (cod) {
return "ITEM:" + cod;
}
return String(fallback || "");
}
function mergeKeys(a, b) {
var obj = {};
for (var ka in a) obj[ka] = true;
for (var kb in b) obj[kb] = true;
return Object.keys(obj);
}
function renderTabelaConferencia(rows, totalItens, divergencias, mensagem, tipo) {
var tbody = $("#tabelaConferenciaNfeBody");
var resumo = $("#resumoConferenciaNfe");
if (!tbody.length || !resumo.length) return;
var html = "";
if (!rows || rows.length === 0) {
html = "<tr><td colspan='4'>Sem conferencia.</td></tr>";
} else {
for (var i = 0; i < rows.length; i++) {
var row = rows[i];
var rowClass = row.status === "OK" ? "" : " class='danger'";
html += "<tr" + rowClass + ">" +
"<td>" + escapeHtml(row.key) + "</td>" +
"<td>" + formatConferenciaNumero(row.requestedQty) + "</td>" +
"<td>" + formatConferenciaNumero(row.nfeQty) + "</td>" +
"<td>" + escapeHtml(row.status) + "</td>" +
"</tr>";
}
}
tbody.html(html);
var typeClass = "alert-info";
if (tipo === "success") typeClass = "alert-success";
if (tipo === "warning") typeClass = "alert-warning";
if (tipo === "danger" || tipo === "error") typeClass = "alert-danger";
resumo.removeClass("alert-info alert-success alert-warning alert-danger");
resumo.addClass(typeClass);
resumo.text(mensagem || ("Conferencia: " + totalItens + " item(ns), " + divergencias + " divergencia(s)."));
}
function toFloatSafe(value) {
var text = String(value == null ? "" : value).replace(",", ".").trim();
var n = parseFloat(text);
return isNaN(n) ? 0 : n;
}
function formatConferenciaNumero(value) {
var n = toFloatSafe(value);
return String(n).indexOf(".") >= 0 ? n.toFixed(2) : String(n);
}
function escapeHtml(value) {
return String(value == null ? "" : value)
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/\"/g, "&quot;")
.replace(/'/g, "&#39;");
}
function consultarChaveNfe() {
var key = normalizeNfeKey($("#chaveNfe").val());
$("#chaveNfe").val(key);
clearNfeConsultaFields();
if (key.length !== 44) {
setNfeFeedback("Informe uma chave com 44 digitos para consultar.", "warning");
return;
}
setNfeFeedback("Consultando chave da NFe...", "info");
try {
var constraint = DatasetFactory.createConstraint("key", key, key, ConstraintType.MUST);
var dataset = DatasetFactory.getDataset("ds_fiscal_invoice_by_keys", null, [constraint], null);
if (!dataset || !dataset.values || dataset.values.length === 0) {
setNfeFeedback("Nao foi possivel consultar a NFe no momento.", "error");
return;
}
var row = dataset.values[0] || {};
var success = String(row.success || "").toLowerCase() === "true";
if (!success) {
setNfeFeedback(String(row.message || "NFe nao encontrada para a chave informada."), "error");
return;
}
fillNfeConsultaFields(row);
if ($("#invoiceIdNfeConsulta").val() === "") {
setNfeFeedback("A consulta retornou sem identificador tecnico da NFe.", "error");
return;
}
setNfeFeedback("NFe localizada e vinculada a solicitacao.", "success");
} catch (e) {
setNfeFeedback("Erro ao consultar chave da NFe: " + e, "error");
}
}
var beforeSendValidate = function (numState, nextState) { var beforeSendValidate = function (numState, nextState) {
$(".errorValidate").removeClass("errorValidate"); $(".errorValidate").removeClass("errorValidate");
if (numState == 0 || numState == 1) { if (numState == 0 || numState == 1) {
@ -288,16 +923,71 @@ var beforeSendValidate = function (numState, nextState) {
} else if (numState == 4) { } else if (numState == 4) {
// //
} else if (numState == 6) { } else if (numState == 6) {
// var chaveNfe = normalizeNfeKey($("#chaveNfe").val());
$("#chaveNfe").val(chaveNfe);
if (chaveNfe == "") {
$("#chaveNfe").parent("div").addClass("errorValidate");
throw "'Chave de acesso da NFe' e obrigatoria.";
}
if (chaveNfe.length !== 44) {
$("#chaveNfe").parent("div").addClass("errorValidate");
throw "'Chave de acesso da NFe' deve conter 44 digitos.";
}
if ($("#invoiceIdNfeConsulta").val() == "") {
$("#chaveNfe").parent("div").addClass("errorValidate");
throw "Consulte a chave da NFe antes de enviar a etapa.";
}
var qtdDivergencias = parseInt($("#qtdDivergenciasNfe").val() || "0", 10);
if (!isNaN(qtdDivergencias) && qtdDivergencias > 0) {
throw "Existem " + qtdDivergencias + " divergencia(s) entre itens solicitados e itens da NFe.";
}
} else if (numState == 31) {
if ($("#motoristaColetaNome").val() == "") {
throw "'Motorista responsável pela coleta' é obrigatório.";
}
if ($("#dataColeta").val() == "") {
throw "'Data da coleta' é obrigatória.";
}
var tipoMotoristaEntrega31 = $("input[name='tipoMotoristaEntrega']:checked").val();
if (!tipoMotoristaEntrega31) {
throw "Informe quem vai fazer a entrega (mesmo motorista da coleta ou outro).";
}
if (tipoMotoristaEntrega31 === "mesmo") {
if ($("#motoristaColetaLogin").val() == "") {
throw "Nao foi encontrado login do motorista da coleta para enviar a etapa de entrega.";
}
$("#motoristaEntregaNome").val($("#motoristaColetaNome").val());
$("#motoristaEntregaLogin").val($("#motoristaColetaLogin").val());
} else if ($("#motoristaEntregaLogin").val() == "") {
throw "Selecione o outro motorista responsavel pela entrega.";
}
} else if (numState == 57) {
if ($("#motoristaEntregaLogin").val() == "") {
throw "Motorista da entrega nao definido. Configure na etapa de coleta.";
}
if ($("#motoristaEntregaNome").val() == "") {
throw "'Motorista responsável pela entrega' é obrigatório.";
}
if ($("#dataEntrega").val() == "") {
var entregaNow = getCurrentDate();
$("#dataEntrega").val(entregaNow[0] + " " + entregaNow[1]);
}
if ($("#dataEntrega").val() == "") {
throw "'Data da entrega' é obrigatória.";
}
} else if (numState == 18) { } else if (numState == 18) {
if ( var validacaoItens = $("input[name='validacaoItens']:checked").val();
$("input[name='validacaoItens']:checked").val() == "" || if (validacaoItens == "" || validacaoItens == undefined) {
$("input[name='validacaoItens']:checked").val() == undefined throw "'Validação do recebimento' é obrigatória.";
) {
throw "'Consegue resolver?' é obrigatório.";
} else if ( } else if (
$("input[name='validacaoItens']:checked").val() == "naoEntregue" || validacaoItens == "divergencia" ||
$("input[name='validacaoItens']:checked").val() == "incorreto" validacaoItens == "naoEntregue" ||
validacaoItens == "incorreto"
) { ) {
if ($("#justificativaDecisaoItens").val() == "") { if ($("#justificativaDecisaoItens").val() == "") {
$("#justificativaDecisaoItens") $("#justificativaDecisaoItens")
@ -358,24 +1048,38 @@ function setSelectedZoomItem(selectedItem) {
// } // }
if (name_item == "centroCusto") { if (name_item == "centroCusto") {
$("#gestorNome").val(selectedItem["gestorCentroCusto"]); $("#gestorNome").val(selectedItem["RESPONSAVEL_LOJA"] || "");
$("#gestorEmail").val(selectedItem["emailGestor"]); $("#gestorEmail").val(selectedItem["emailGestor"] || "");
$("#gestor_cc").val(selectedItem["idGestor"]); $("#gestor_cc").val(selectedItem["COLLEAGUE_ID"] || "");
} }
if (name_item == "estabelecimento") { if (name_item == "estabelecimento") {
$("#gestorNomeE").val(selectedItem["gestorCentroCusto"]); $("#gestorNomeE").val(selectedItem["RESPONSAVEL_LOJA"] || "");
$("#gestorEmailE").val(selectedItem["emailGestor"]); $("#gestorEmailE").val(selectedItem["emailGestor"] || "");
$("#gestor_cce").val(selectedItem["idGestor"]); $("#gestor_cce").val(selectedItem["COLLEAGUE_ID"] || "");
} }
if (name_item == "userSolicitante") { if (name_item == "userSolicitante") {
$("#emailSolicitante").val(selectedItem.mail); $("#emailSolicitante").val(selectedItem.mail);
} }
if (name_item == "motoristaEntregaSelecionado") {
var motoristaNome = selectedItem["NOME"] || selectedItem["colleagueName"] || selectedItem["LOGIN"] || selectedItem["login"] || "";
var motoristaColleagueId = selectedItem["COLLEAGUE_ID"] || selectedItem["colleaguePK.colleagueId"] || "";
$("#motoristaEntregaNome").val(String(motoristaNome || ""));
$("#motoristaEntregaLogin").val(String(motoristaColleagueId || ""));
$("#tipoMotoristaEntregaOutro").prop("checked", true);
applyMotoristaEntregaMode("outro", true);
}
if (name_item == "descricao") { if (name_item == "descricao") {
var itemDescricao = selectedItem["descricao"] || selectedItem["Description"] || ""; var itemDescricao = selectedItem["descricao"] || selectedItem["Description"] || "";
var itemCode = selectedItem["Code"] || selectedItem["sku"] || "";
var itemProductId = selectedItem["id"] || selectedItem["productId"] || "";
$("#codigoItem" + "___" + indice).val(itemDescricao); $("#codigoItem" + "___" + indice).val(itemDescricao);
$("#codigoProdutoItem" + "___" + indice).val(itemCode);
$("#productIdItem" + "___" + indice).val(itemProductId);
processarConferenciaNfe();
} }
} }
@ -396,17 +1100,32 @@ function removedZoomItem(removedItem) {
$("#gestorNome").val(""); $("#gestorNome").val("");
$("#gestorEmail").val(""); $("#gestorEmail").val("");
$("#gestor_cc").val(""); $("#gestor_cc").val("");
} else if (name_item == "estabelecimento") {
$("#gestorNomeE").val("");
$("#gestorEmailE").val("");
$("#gestor_cce").val("");
} else if (name_item == "motoristaEntregaSelecionado") {
if ($("input[name='tipoMotoristaEntrega']:checked").val() === "outro") {
$("#motoristaEntregaNome").val("");
$("#motoristaEntregaLogin").val("");
}
} else if (~name_item.indexOf("___")) { } else if (~name_item.indexOf("___")) {
var linha = name_item.split("___"); var linha = name_item.split("___");
if (linha[0] == "descricao") { if (linha[0] == "descricao") {
$("#codigoItem___" + linha[1]).val(""); $("#codigoItem___" + linha[1]).val("");
$("#codigoProdutoItem___" + linha[1]).val("");
$("#productIdItem___" + linha[1]).val("");
$("#quantidadeItem___" + linha[1]).val(""); $("#quantidadeItem___" + linha[1]).val("");
processarConferenciaNfe();
} }
} }
if (name_item == "descricao") { if (name_item == "descricao") {
$("#codigoItem" + "___" + indice).val(""); $("#codigoItem" + "___" + indice).val("");
$("#codigoProdutoItem" + "___" + indice).val("");
$("#productIdItem" + "___" + indice).val("");
processarConferenciaNfe();
} }
} }
@ -425,6 +1144,7 @@ function updt_line() {
function remove_row(element) { function remove_row(element) {
fnWdkRemoveChild(element); fnWdkRemoveChild(element);
updt_line(); updt_line();
processarConferenciaNfe();
} }
@ -767,27 +1487,41 @@ function btnState(idInput, acao, btn){
*/ */
function displayBtnFiles(){ function displayBtnFiles(){
try{ try{
var mode = getFormMode();
var allowedInputs = getAllowedAttachmentInputs();
$('.componentAnexo').each(function(i, element) { $('.componentAnexo').each(function(i, element) {
let inputFile = $(element).find(".inputAnexo") let inputFile = $(element).find(".inputAnexo")
let inputId = inputFile.attr("id") || "";
let normalizedInputId = inputId.indexOf("_") === 0 ? inputId.substring(1) : inputId;
let btnUpFile = $(element).find(".btnUpFile"); let btnUpFile = $(element).find(".btnUpFile");
let btnViewerFile = $(element).find(".btnViewerFile"); let btnViewerFile = $(element).find(".btnViewerFile");
let btnDownloadFile = $(element).find(".btnDownloadFile"); let btnDownloadFile = $(element).find(".btnDownloadFile");
let canUploadHere = allowedInputs.indexOf(normalizedInputId) >= 0;
if(getFormMode() == "VIEW"){ if(mode == "VIEW"){
btnUpFile.remove(); btnUpFile.remove();
if(inputFile.val() != ""){ if(inputFile.val() != ""){
btnViewerFile.prop("disabled", false); btnViewerFile.prop("disabled", false);
btnViewerFile.show() btnViewerFile.show()
btnDownloadFile.prop("disabled", false);
btnDownloadFile.show()
} }
} }
if(getFormMode() == "MOD" && inputFile.val() != ""){ if(mode == "MOD"){
if(inputFile.val() != ""){
if(canUploadHere){
btnState(inputId, "delete", "viewer");
} else {
btnUpFile.remove(); btnUpFile.remove();
// btnState(inputFile[0].id, "delete", "viewer")
btnViewerFile.prop("disabled", false); btnViewerFile.prop("disabled", false);
btnViewerFile.show() btnViewerFile.show()
btnDownloadFile.prop("disabled", false); btnDownloadFile.prop("disabled", false);
btnDownloadFile.show() btnDownloadFile.show()
} }
} else if(!canUploadHere){
btnUpFile.remove();
}
}
}); });
}catch(e){ }catch(e){
console.error("Houve um erro inesperado na função displayBtnFiles") console.error("Houve um erro inesperado na função displayBtnFiles")
@ -795,6 +1529,34 @@ function displayBtnFiles(){
} }
} }
function getAllowedAttachmentInputs() {
var mode = getFormMode();
var activity = String($("#activity").val() || "");
if (mode === "VIEW") {
return [];
}
if (mode !== "MOD" && mode !== "ADD") {
return [];
}
if (activity === "6") {
return ["fnAnexo_Nfe"];
}
if (activity === "31") {
return ["fdAnexo_Coleta"];
}
if (activity === "57") {
return ["fdAnexo_Entrega"];
}
if (activity === "18") {
return ["fdAnexo_recebimento"];
}
return [];
}
/** /**
* Remove o botão de upload/delete * Remove o botão de upload/delete
@ -804,7 +1566,11 @@ function displayBtnFiles(){
*/ */
function invisibleBtnUpload(inputFile){ function invisibleBtnUpload(inputFile){
try{ try{
if(getFormMode() == "MOD" || getFormMode() == "VIEW"){ var mode = getFormMode();
var allowedInputs = getAllowedAttachmentInputs();
var canUploadHere = allowedInputs.indexOf(inputFile) >= 0;
if(mode == "VIEW" || ((mode == "MOD" || mode == "ADD") && !canUploadHere)){
if($(`#_${inputFile}`).length){ if($(`#_${inputFile}`).length){
let btnUpFile = $(`#_${inputFile}`).parent().parent().find(".btnUpFile"); let btnUpFile = $(`#_${inputFile}`).parent().parent().find(".btnUpFile");
btnUpFile.remove(); btnUpFile.remove();
@ -925,3 +1691,4 @@ window.parent.$("#ecm-navigation-inputFile-clone").on('change', function () {
carregarItensDoExcel("excelUpload"); carregarItensDoExcel("excelUpload");
} }
}); });

View File

@ -251,7 +251,9 @@
'placeholder':'Selecione a filial de origem', 'placeholder':'Selecione a filial de origem',
'fields':[ 'fields':[
{'field':'PDV','label':'Loja'}, {'field':'PDV','label':'Loja'},
{'field':'RESPONSAVEL_LOJA','label':'Gestor'} {'field':'RESPONSAVEL_LOJA','label':'Gestor'},
{'field':'LOGIN_LOJA','label':'Login','visible':'false'},
{'field':'COLLEAGUE_ID','label':'Colleague','visible':'false'}
] ]
}" /> }" />
</div> </div>
@ -264,7 +266,9 @@
'placeholder':'Selecione a filial de destino', 'placeholder':'Selecione a filial de destino',
'fields':[ 'fields':[
{'field':'PDV','label':'Loja'}, {'field':'PDV','label':'Loja'},
{'field':'RESPONSAVEL_LOJA','label':'Gestor'} {'field':'RESPONSAVEL_LOJA','label':'Gestor'},
{'field':'LOGIN_LOJA','label':'Login','visible':'false'},
{'field':'COLLEAGUE_ID','label':'Colleague','visible':'false'}
] ]
}" /> }" />
</div> </div>
@ -308,7 +312,8 @@
'fields':[ 'fields':[
{'field':'Code','label':'Codigo'}, {'field':'Code','label':'Codigo'},
{'field':'Description','label':'Descricao'}, {'field':'Description','label':'Descricao'},
{'field':'descricao','label':'Descricao item'} {'field':'descricao','label':'Descricao item'},
{'field':'id','label':'ID','visible':'false'}
] ]
}" /> }" />
</td> </td>
@ -317,6 +322,8 @@
</td> </td>
<td> <td>
<input type="text" class="form-control transfer-input" name="codigoItem" readonly /> <input type="text" class="form-control transfer-input" name="codigoItem" readonly />
<input type="hidden" name="productIdItem" />
<input type="hidden" name="codigoProdutoItem" />
</td> </td>
<td> <td>
<button type="button" class="btn btn-default hideButton" onclick="remove_row(this)"> <button type="button" class="btn btn-default hideButton" onclick="remove_row(this)">
@ -337,39 +344,181 @@
</section> </section>
<section class="transfer-card activity activity-6 activity-18 activity-31 activity-57"> <section class="transfer-card activity activity-6 activity-18 activity-31 activity-57">
<h2 class="card-title">Anexos por Etapa</h2> <h2 class="card-title">Emissão da NFe</h2>
<div class="row">
<div class="col-md-6 col-sm-12">
<label class="transfer-label" for="usuarioEmissorNfe">Usuário emissor da NFe</label>
<input type="text" class="form-control transfer-input" name="usuarioEmissorNfe" id="usuarioEmissorNfe" readonly />
</div>
<div class="col-md-6 col-sm-12">
<label class="transfer-label" for="dataEmissaoNfe">Data da emissão</label>
<input type="text" class="form-control transfer-input" name="dataEmissaoNfe" id="dataEmissaoNfe" readonly />
</div>
</div>
<div class="row" style="margin-top:10px;">
<div class="col-md-9 col-sm-12">
<label class="transfer-label" for="chaveNfe">Chave de acesso para consulta</label>
<input type="text" class="form-control transfer-input" name="chaveNfe" id="chaveNfe" maxlength="44" placeholder="Informe a chave de acesso da NFe" />
<small>Campo rastreável para consulta posterior da nota fiscal.</small>
</div>
<div class="col-md-3 col-sm-12">
<label class="transfer-label">&nbsp;</label>
<button type="button" class="btn btn-primary btn-block" id="btnConsultarChaveNfe">Consultar chave</button>
</div>
</div>
<div class="row" style="margin-top:10px;">
<div class="col-md-12">
<div id="consultaNfeFeedback" class="alert" style="display:none;margin-bottom:0;"></div>
</div>
</div>
<div class="row" style="margin-top:10px;">
<div class="col-md-3 col-sm-6">
<label class="transfer-label" for="numeroNfeConsulta">Numero da NFe</label>
<input type="text" class="form-control transfer-input" name="numeroNfeConsulta" id="numeroNfeConsulta" readonly />
</div>
<div class="col-md-3 col-sm-6">
<label class="transfer-label" for="serieNfeConsulta">Serie</label>
<input type="text" class="form-control transfer-input" name="serieNfeConsulta" id="serieNfeConsulta" readonly />
</div>
<div class="col-md-3 col-sm-6">
<label class="transfer-label" for="dataEmissaoApiNfe">Data da nota</label>
<input type="text" class="form-control transfer-input" name="dataEmissaoApiNfe" id="dataEmissaoApiNfe" readonly />
</div>
<div class="col-md-3 col-sm-6">
<label class="transfer-label" for="situacaoNfeConsulta">Situacao</label>
<input type="text" class="form-control transfer-input" name="situacaoNfeConsulta" id="situacaoNfeConsulta" readonly />
</div>
</div>
<div class="row" style="margin-top:10px;">
<div class="col-md-6 col-sm-12">
<label class="transfer-label" for="fornecedorNfeConsulta">Fornecedor/Emitente</label>
<input type="text" class="form-control transfer-input" name="fornecedorNfeConsulta" id="fornecedorNfeConsulta" readonly />
</div>
<div class="col-md-2 col-sm-6">
<label class="transfer-label" for="valorNfeConsulta">Valor do documento</label>
<input type="text" class="form-control transfer-input" name="valorNfeConsulta" id="valorNfeConsulta" readonly />
</div>
<div class="col-md-2 col-sm-6">
<label class="transfer-label" for="dataEntradaNfeConsulta">Data de entrada</label>
<input type="text" class="form-control transfer-input" name="dataEntradaNfeConsulta" id="dataEntradaNfeConsulta" readonly />
</div>
<div class="col-md-2 col-sm-6">
<label class="transfer-label" for="itensNfeConsulta">Qtd. de itens</label>
<input type="text" class="form-control transfer-input" name="itensNfeConsulta" id="itensNfeConsulta" readonly />
</div>
</div>
<div class="row" style="margin-top:10px;">
<div class="col-md-9 col-sm-12">
<label class="transfer-label" for="operacaoNfeConsulta">Operacao fiscal</label>
<input type="text" class="form-control transfer-input" name="operacaoNfeConsulta" id="operacaoNfeConsulta" readonly />
</div>
<div class="col-md-3 col-sm-12">
<label class="transfer-label" for="lojaNfeConsulta">Loja da NFe</label>
<input type="text" class="form-control transfer-input" name="lojaNfeConsulta" id="lojaNfeConsulta" readonly />
</div>
</div>
<div class="row" style="margin-top:16px;">
<div class="col-md-12">
<h3 class="transfer-label" style="margin:0 0 8px 0;">Conferência da NFe x Solicitação</h3>
<div id="resumoConferenciaNfe" class="alert alert-info" style="margin-bottom:10px;">
Consulte a chave da NFe para gerar o confronto dos itens.
</div>
<div class="table-responsive">
<table class="table table-striped table-modern">
<thead>
<tr>
<th>Chave de comparação</th>
<th>Qtd. solicitada</th>
<th>Qtd. NFe</th>
<th>Status</th>
</tr>
</thead>
<tbody id="tabelaConferenciaNfeBody">
<tr>
<td colspan="4">Sem conferência.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<div class="componentAnexo attachment-line" style="margin-bottom:10px;"> <section class="transfer-card activity activity-18">
<input type="text" class="form-control descAnexo transfer-input" name="descAnexo_Nfe" value="Nota Fiscal" readonly /> <h2 class="card-title">Validação do Recebimento</h2>
<input type="text" class="form-control inputAnexo transfer-input" id="fnAnexo_Nfe" name="fnAnexo_Nfe" readonly placeholder="Nenhum anexo selecionado" /> <div class="row">
<button type="button" class="btn btn-success btnUpFile" data-acao="upload" onclick="anexo(event)"><i class="fluigicon fluigicon-file-upload"></i></button> <div class="col-md-12">
<button type="button" class="btn btn-default btnViewerFile" data-acao="viewer" onclick="anexo(event)" style="display:none;"><i class="fluigicon fluigicon-eye-open"></i></button> <label class="transfer-label">Todos os produtos chegaram na loja conforme a solicitação?</label>
<button type="button" class="btn btn-default btnDownloadFile" data-acao="download" onclick="anexo(event)" style="display:none;"><i class="fluigicon fluigicon-download"></i></button> <div>
<label class="radio-inline" style="margin-right:15px;">
<input type="radio" name="validacaoItens" value="entregue" />
Sim, conferido e recebido
</label>
<label class="radio-inline">
<input type="radio" name="validacaoItens" value="divergencia" />
Não, existe divergência
</label>
</div>
</div>
</div>
<div class="row justificativaDecisaoItens" style="display:none;margin-top:10px;">
<div class="col-md-12">
<label class="transfer-label" for="justificativaDecisaoItens">Descreva a divergência encontrada</label>
<textarea class="form-control transfer-input" rows="3" name="justificativaDecisaoItens" id="justificativaDecisaoItens" placeholder="Informe quais itens/quantidades divergiram"></textarea>
</div>
</div>
</section>
<section class="transfer-card activity activity-31 activity-57">
<h2 class="card-title">Rastreabilidade de Motorista - Coleta</h2>
<div class="row" style="margin-bottom:10px;">
<div class="col-md-6 col-sm-12">
<label class="transfer-label" for="motoristaColetaNome">Motorista responsável pela coleta</label>
<input type="text" class="form-control transfer-input" name="motoristaColetaNome" id="motoristaColetaNome" readonly />
</div>
<div class="col-md-6 col-sm-12">
<label class="transfer-label" for="dataColeta">Data da coleta</label>
<input type="text" class="form-control transfer-input" name="dataColeta" id="dataColeta" readonly />
</div>
</div>
<div class="row" id="blocoTipoMotoristaEntrega" style="margin-bottom:10px;">
<div class="col-md-12 col-sm-12">
<label class="transfer-label">Quem vai fazer a entrega?</label>
<div>
<label class="radio-inline" style="margin-right:15px;">
<input type="radio" name="tipoMotoristaEntrega" id="tipoMotoristaEntregaMesmo" value="mesmo" />
Eu
</label>
<label class="radio-inline">
<input type="radio" name="tipoMotoristaEntrega" id="tipoMotoristaEntregaOutro" value="outro" />
Outro motorista
</label>
</div>
</div>
</div>
<div class="row" id="blocoOutroMotoristaEntrega" style="margin-bottom:10px; display:none;">
<div class="col-md-6 col-sm-12">
<label class="transfer-label" for="motoristaEntregaSelecionado">Selecionar outro motorista</label>
<select class="form-control transfer-input" name="motoristaEntregaSelecionado" id="motoristaEntregaSelecionado">
<option value="">Selecione o motorista</option>
</select>
</div>
</div>
</section>
<section class="transfer-card activity activity-57">
<h2 class="card-title">Rastreabilidade de Motorista - Entrega</h2>
<div class="row" style="margin-bottom:18px;">
<div class="col-md-6 col-sm-12">
<label class="transfer-label" for="motoristaEntregaNome">Motorista responsável pela entrega</label>
<input type="text" class="form-control transfer-input" name="motoristaEntregaNome" id="motoristaEntregaNome" readonly />
</div>
<div class="col-md-6 col-sm-12">
<label class="transfer-label" for="dataEntrega">Data da entrega</label>
<input type="text" class="form-control transfer-input" name="dataEntrega" id="dataEntrega" readonly />
</div>
</div> </div>
<div class="componentAnexo attachment-line" style="margin-bottom:10px;">
<input type="text" class="form-control descAnexo transfer-input" name="descAnexo_Coleta" value="Comprovante de Coleta" readonly />
<input type="text" class="form-control inputAnexo transfer-input" id="fdAnexo_Coleta" name="fdAnexo_Coleta" readonly placeholder="Nenhum anexo selecionado" />
<button type="button" class="btn btn-success btnUpFile" data-acao="upload" onclick="anexo(event)"><i class="fluigicon fluigicon-file-upload"></i></button>
<button type="button" class="btn btn-default btnViewerFile" data-acao="viewer" onclick="anexo(event)" style="display:none;"><i class="fluigicon fluigicon-eye-open"></i></button>
<button type="button" class="btn btn-default btnDownloadFile" data-acao="download" onclick="anexo(event)" style="display:none;"><i class="fluigicon fluigicon-download"></i></button>
</div>
<div class="componentAnexo attachment-line" style="margin-bottom:10px;">
<input type="text" class="form-control descAnexo transfer-input" name="descAnexo_Entrega" value="Comprovante de Entrega" readonly />
<input type="text" class="form-control inputAnexo transfer-input" id="fdAnexo_Entrega" name="fdAnexo_Entrega" readonly placeholder="Nenhum anexo selecionado" />
<button type="button" class="btn btn-success btnUpFile" data-acao="upload" onclick="anexo(event)"><i class="fluigicon fluigicon-file-upload"></i></button>
<button type="button" class="btn btn-default btnViewerFile" data-acao="viewer" onclick="anexo(event)" style="display:none;"><i class="fluigicon fluigicon-eye-open"></i></button>
<button type="button" class="btn btn-default btnDownloadFile" data-acao="download" onclick="anexo(event)" style="display:none;"><i class="fluigicon fluigicon-download"></i></button>
</div>
<div class="componentAnexo attachment-line">
<input type="text" class="form-control descAnexo transfer-input" name="descAnexo_Recebimento" value="Comprovante de Recebimento" readonly />
<input type="text" class="form-control inputAnexo transfer-input" id="fdAnexo_recebimento" name="fdAnexo_recebimento" readonly placeholder="Nenhum anexo selecionado" />
<button type="button" class="btn btn-success btnUpFile" data-acao="upload" onclick="anexo(event)"><i class="fluigicon fluigicon-file-upload"></i></button>
<button type="button" class="btn btn-default btnViewerFile" data-acao="viewer" onclick="anexo(event)" style="display:none;"><i class="fluigicon fluigicon-eye-open"></i></button>
<button type="button" class="btn btn-default btnDownloadFile" data-acao="download" onclick="anexo(event)" style="display:none;"><i class="fluigicon fluigicon-download"></i></button>
</div>
</section> </section>
<input type="hidden" name="WKNumProces" id="WKNumProces" value="" /> <input type="hidden" name="WKNumProces" id="WKNumProces" value="" />
@ -386,17 +535,18 @@
<input type="hidden" name="gestorNomeE" id="gestorNomeE" value="" /> <input type="hidden" name="gestorNomeE" id="gestorNomeE" value="" />
<input type="hidden" name="gestorEmailE" id="gestorEmailE" value="" /> <input type="hidden" name="gestorEmailE" id="gestorEmailE" value="" />
<input type="hidden" name="gestor_cce" id="gestor_cce" value="" /> <input type="hidden" name="gestor_cce" id="gestor_cce" value="" />
<input type="hidden" name="invoiceIdNfeConsulta" id="invoiceIdNfeConsulta" value="" />
<input type="hidden" name="storeIdNfeConsulta" id="storeIdNfeConsulta" value="" />
<input type="hidden" name="itensNfeJson" id="itensNfeJson" value="" />
<input type="hidden" name="qtdDivergenciasNfe" id="qtdDivergenciasNfe" value="0" />
<input type="hidden" name="motoristaColetaLogin" id="motoristaColetaLogin" value="" />
<input type="hidden" name="motoristaEntregaLogin" id="motoristaEntregaLogin" value="" />
</div> </div>
</form> </form>
</div> </div>
<script type="text/javascript" src="/portal/resources/js/xlsx.full.min.js"></script>
<script type="text/javascript">
if (typeof XLSX === "undefined") {
document.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"><\/script>');
}
</script>
<script type="text/javascript" src="./excel.js"></script> <script type="text/javascript" src="./excel.js"></script>
<script type="text/javascript" src="./script.js"></script> <script type="text/javascript" src="./script.js"></script>
</body> </body>
</html> </html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 40 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,792 @@
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.8.0_481" class="java.beans.XMLDecoder">
<object class="java.util.HashMap">
<void method="put">
<string>volume</string>
<array class="java.lang.String" length="1">
<void index="0">
<string>Default</string>
</void>
</array>
</void>
<void method="put">
<string>mecanismoGrupo</string>
<object class="java.util.ArrayList">
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Tecnologia e Comunicação</string>
</void>
<void property="groupId">
<string>TIC</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Compras Indiretos</string>
</void>
<void property="groupId">
<string>ComprasIndiretos</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Obras e manutenção</string>
</void>
<void property="groupId">
<string>Manutencao</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Aprovadores Compras Nvl 3</string>
</void>
<void property="groupId">
<string>AprovadoresComprasNvl3</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Motoristas</string>
</void>
<void property="groupId">
<string>Motoristas</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Requisitantes de Vaga</string>
</void>
<void property="groupId">
<string>Requisitantesdevaga</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Recrutamento</string>
</void>
<void property="groupId">
<string>Recrutamento</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>TODOS-TODOS-DIADMISSAO</string>
</void>
<void property="groupId">
<string>TODOS-TODOS-DIADMISSAO</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ResponsavelDesligamento</string>
</void>
<void property="groupId">
<string>ResponsavelDesligamento</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>GENTE &amp; CULTURA</string>
</void>
<void property="groupId">
<string>GENTE_CULTURA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>LOJA AL</string>
</void>
<void property="groupId">
<string>LOJA_AL</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>CD</string>
</void>
<void property="groupId">
<string>CD</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESPAÇO DO REVENDEDOR AL</string>
</void>
<void property="groupId">
<string>ESPACO_DO_REVENDEDOR_AL</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>FINANCEIRO</string>
</void>
<void property="groupId">
<string>FINANCEIRO</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>OPERAÇÕES</string>
</void>
<void property="groupId">
<string>OPERACOES</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>AMG AL</string>
</void>
<void property="groupId">
<string>AMG_AL</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>REGIONAL ALAGOAS</string>
</void>
<void property="groupId">
<string>REGIONAL_ALAGOAS</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>PREVENÇÃO DE PERDA</string>
</void>
<void property="groupId">
<string>PREVENCAO_DE_PERDA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>MARKETING, TREINAMENTO</string>
</void>
<void property="groupId">
<string>MARKETING_TREINAMENTO</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>SECRETARIA EXECUTIVA</string>
</void>
<void property="groupId">
<string>SECRETARIA_EXECUTIVA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>DIRETORIA EXECUTIVA</string>
</void>
<void property="groupId">
<string>DIRETORIA_EXECUTIVA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>INFRAESTRUTURA</string>
</void>
<void property="groupId">
<string>INFRAESTRUTURA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESPAÇO DO REVENDEDOR BA</string>
</void>
<void property="groupId">
<string>ESPACO_DO_REVENDEDOR_BA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>BUSINESS INTELLIGENCE</string>
</void>
<void property="groupId">
<string>BUSINESS_INTELLIGENCE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>DEPARTAMENTO PESSOAL</string>
</void>
<void property="groupId">
<string>DEPARTAMENTO_PESSOAL</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>LOJA BA</string>
</void>
<void property="groupId">
<string>LOJA_BA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>TREINAMENTO</string>
</void>
<void property="groupId">
<string>TREINAMENTO</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>AMG BA</string>
</void>
<void property="groupId">
<string>AMG_BA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>MARKETING</string>
</void>
<void property="groupId">
<string>MARKETING</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>COMPRAS</string>
</void>
<void property="groupId">
<string>COMPRAS</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>AMG SE</string>
</void>
<void property="groupId">
<string>AMG_SE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>LOJA SE</string>
</void>
<void property="groupId">
<string>LOJA_SE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESPAÇO DO REVENDEDOR SE</string>
</void>
<void property="groupId">
<string>ESPACO_DO_REVENDEDOR_SE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>VENDAS IN COMPANY</string>
</void>
<void property="groupId">
<string>VENDAS_IN_COMPANY</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>REGIONAL BAHIA</string>
</void>
<void property="groupId">
<string>REGIONAL_BAHIA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>CANAL LOJA 01</string>
</void>
<void property="groupId">
<string>CANAL_LOJA_01</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>AUDITORIA</string>
</void>
<void property="groupId">
<string>AUDITORIA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>CANAL LOJA 02</string>
</void>
<void property="groupId">
<string>CANAL_LOJA_02</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>PLANEJAMENTO DE DEMANDAS</string>
</void>
<void property="groupId">
<string>PLANEJAMENTO_DE_DEMANDAS</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>PROJETOS</string>
</void>
<void property="groupId">
<string>PROJETOS</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>COMPLIANCE</string>
</void>
<void property="groupId">
<string>COMPLIANCE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESCRITÓRIO - MATRIZ</string>
</void>
<void property="groupId">
<string>ESCRITORIO_MATRIZ</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESCRITÓRIO - CONQUISTA</string>
</void>
<void property="groupId">
<string>ESCRITORIO_CONQUISTA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>REGIONAL SERGIPE</string>
</void>
<void property="groupId">
<string>REGIONAL_SERGIPE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Transferencia</string>
</void>
<void property="groupId">
<string>Transferencia</string>
</void>
</object>
</void>
</object>
</void>
<void method="put">
<string>expediente</string>
<array class="java.lang.String" length="4">
<void index="0">
<string>Default</string>
</void>
<void index="1">
<string>Expediente BackOffice, Logística e Motorista</string>
</void>
<void index="2">
<string>Expediente Escritório Matriz</string>
</void>
<void index="3">
<string>Expediente Lojas</string>
</void>
</array>
</void>
<void method="put">
<string>camposFormulario, documentoId = 590</string>
<array class="java.lang.String" length="59">
<void index="0">
<string>activity</string>
</void>
<void index="1">
<string>centroCusto</string>
</void>
<void index="2">
<string>chaveNfe</string>
</void>
<void index="3">
<string>codigoItem</string>
</void>
<void index="4">
<string>codigoProdutoItem</string>
</void>
<void index="5">
<string>currentUserId</string>
</void>
<void index="6">
<string>currentUsermail</string>
</void>
<void index="7">
<string>currentUserName</string>
</void>
<void index="8">
<string>dataAbertura</string>
</void>
<void index="9">
<string>dataColeta</string>
</void>
<void index="10">
<string>dataEmissaoApiNfe</string>
</void>
<void index="11">
<string>dataEmissaoNfe</string>
</void>
<void index="12">
<string>dataEntradaNfeConsulta</string>
</void>
<void index="13">
<string>dataEntrega</string>
</void>
<void index="14">
<string>descAnexo_Coleta</string>
</void>
<void index="15">
<string>descAnexo_Entrega</string>
</void>
<void index="16">
<string>descAnexo_Nfe</string>
</void>
<void index="17">
<string>descAnexo_Recebimento</string>
</void>
<void index="18">
<string>descricao</string>
</void>
<void index="19">
<string>emailSolicitante</string>
</void>
<void index="20">
<string>estabelecimento</string>
</void>
<void index="21">
<string>excelUpload</string>
</void>
<void index="22">
<string>fdAnexo_Coleta</string>
</void>
<void index="23">
<string>fdAnexo_Entrega</string>
</void>
<void index="24">
<string>fdAnexo_recebimento</string>
</void>
<void index="25">
<string>fnAnexo_Nfe</string>
</void>
<void index="26">
<string>formMode</string>
</void>
<void index="27">
<string>fornecedorNfeConsulta</string>
</void>
<void index="28">
<string>gestorEmail</string>
</void>
<void index="29">
<string>gestorEmailE</string>
</void>
<void index="30">
<string>gestorNome</string>
</void>
<void index="31">
<string>gestorNomeE</string>
</void>
<void index="32">
<string>gestor_cc</string>
</void>
<void index="33">
<string>gestor_cce</string>
</void>
<void index="34">
<string>invoiceIdNfeConsulta</string>
</void>
<void index="35">
<string>itensNfeConsulta</string>
</void>
<void index="36">
<string>itensNfeJson</string>
</void>
<void index="37">
<string>justificativa</string>
</void>
<void index="38">
<string>lojaNfeConsulta</string>
</void>
<void index="39">
<string>motoristaColetaLogin</string>
</void>
<void index="40">
<string>motoristaColetaNome</string>
</void>
<void index="41">
<string>motoristaEntregaLogin</string>
</void>
<void index="42">
<string>motoristaEntregaNome</string>
</void>
<void index="43">
<string>motoristaEntregaSelecionado</string>
</void>
<void index="44">
<string>numeroNfeConsulta</string>
</void>
<void index="45">
<string>operacaoNfeConsulta</string>
</void>
<void index="46">
<string>productIdItem</string>
</void>
<void index="47">
<string>qtdDivergenciasNfe</string>
</void>
<void index="48">
<string>quantidadeItem</string>
</void>
<void index="49">
<string>requesterId</string>
</void>
<void index="50">
<string>requesterMail</string>
</void>
<void index="51">
<string>requesterName</string>
</void>
<void index="52">
<string>serieNfeConsulta</string>
</void>
<void index="53">
<string>situacaoNfeConsulta</string>
</void>
<void index="54">
<string>storeIdNfeConsulta</string>
</void>
<void index="55">
<string>tipoMotoristaEntrega</string>
</void>
<void index="56">
<string>usuarioEmissorNfe</string>
</void>
<void index="57">
<string>valorNfeConsulta</string>
</void>
<void index="58">
<string>WKNumProces</string>
</void>
</array>
</void>
<void method="put">
<string>mecanismo</string>
<array class="[Ljava.lang.Object;" length="12">
<void index="0">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Associação</string>
</void>
<void index="1">
<string>Associado</string>
</void>
</array>
</void>
<void index="1">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Campo de Formulário</string>
</void>
<void index="1">
<string>Campo Formulário</string>
</void>
</array>
</void>
<void index="2">
<array class="java.lang.Object" length="2">
<void index="0">
<string>dpf_di_emp_filial_filtro</string>
</void>
<void index="1">
<string>dpf_di_emp_filial_filtro</string>
</void>
</array>
</void>
<void index="3">
<array class="java.lang.Object" length="2">
<void index="0">
<string>dpf_di_inicio_diadmissao</string>
</void>
<void index="1">
<string>dpf_di_inicio_diadmissao</string>
</void>
</array>
</void>
<void index="4">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Executor de Atividade</string>
</void>
<void index="1">
<string>Executor Atividade</string>
</void>
</array>
</void>
<void index="5">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Grupo</string>
</void>
<void index="1">
<string>Grupo</string>
</void>
</array>
</void>
<void index="6">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Grupos do Colaborador</string>
</void>
<void index="1">
<string>Grupos Colaborador</string>
</void>
</array>
</void>
<void index="7">
<array class="java.lang.Object" length="2">
<void index="0">
<string>mecCustomAprov</string>
</void>
<void index="1">
<string>mecCustomAprov</string>
</void>
</array>
</void>
<void index="8">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Papel</string>
</void>
<void index="1">
<string>Papel</string>
</void>
</array>
</void>
<void index="9">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição para um Grupo</string>
</void>
<void index="1">
<string>Pool Grupo</string>
</void>
</array>
</void>
<void index="10">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição para um Papel</string>
</void>
<void index="1">
<string>Pool Papel</string>
</void>
</array>
</void>
<void index="11">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Usuário</string>
</void>
<void index="1">
<string>Usuário</string>
</void>
</array>
</void>
</array>
</void>
</object>
</java>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>diagrams</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -0,0 +1,711 @@
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.8.0_481" class="java.beans.XMLDecoder">
<object class="java.util.HashMap">
<void method="put">
<string>volume</string>
<array class="java.lang.String" length="1">
<void index="0">
<string>Default</string>
</void>
</array>
</void>
<void method="put">
<string>mecanismoGrupo</string>
<object class="java.util.ArrayList">
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Tecnologia e Comunicação</string>
</void>
<void property="groupId">
<string>TIC</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Compras Indiretos</string>
</void>
<void property="groupId">
<string>ComprasIndiretos</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Obras e manutenção</string>
</void>
<void property="groupId">
<string>Manutencao</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Aprovadores Compras Nvl 3</string>
</void>
<void property="groupId">
<string>AprovadoresComprasNvl3</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Motoristas</string>
</void>
<void property="groupId">
<string>Motoristas</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Requisitantes de Vaga</string>
</void>
<void property="groupId">
<string>Requisitantesdevaga</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Recrutamento</string>
</void>
<void property="groupId">
<string>Recrutamento</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>TODOS-TODOS-DIADMISSAO</string>
</void>
<void property="groupId">
<string>TODOS-TODOS-DIADMISSAO</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ResponsavelDesligamento</string>
</void>
<void property="groupId">
<string>ResponsavelDesligamento</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>GENTE &amp; CULTURA</string>
</void>
<void property="groupId">
<string>GENTE_CULTURA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>LOJA AL</string>
</void>
<void property="groupId">
<string>LOJA_AL</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>CD</string>
</void>
<void property="groupId">
<string>CD</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESPAÇO DO REVENDEDOR AL</string>
</void>
<void property="groupId">
<string>ESPACO_DO_REVENDEDOR_AL</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>FINANCEIRO</string>
</void>
<void property="groupId">
<string>FINANCEIRO</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>OPERAÇÕES</string>
</void>
<void property="groupId">
<string>OPERACOES</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>AMG AL</string>
</void>
<void property="groupId">
<string>AMG_AL</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>REGIONAL ALAGOAS</string>
</void>
<void property="groupId">
<string>REGIONAL_ALAGOAS</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>PREVENÇÃO DE PERDA</string>
</void>
<void property="groupId">
<string>PREVENCAO_DE_PERDA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>MARKETING, TREINAMENTO</string>
</void>
<void property="groupId">
<string>MARKETING_TREINAMENTO</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>SECRETARIA EXECUTIVA</string>
</void>
<void property="groupId">
<string>SECRETARIA_EXECUTIVA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>DIRETORIA EXECUTIVA</string>
</void>
<void property="groupId">
<string>DIRETORIA_EXECUTIVA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>INFRAESTRUTURA</string>
</void>
<void property="groupId">
<string>INFRAESTRUTURA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESPAÇO DO REVENDEDOR BA</string>
</void>
<void property="groupId">
<string>ESPACO_DO_REVENDEDOR_BA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>BUSINESS INTELLIGENCE</string>
</void>
<void property="groupId">
<string>BUSINESS_INTELLIGENCE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>DEPARTAMENTO PESSOAL</string>
</void>
<void property="groupId">
<string>DEPARTAMENTO_PESSOAL</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>LOJA BA</string>
</void>
<void property="groupId">
<string>LOJA_BA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>TREINAMENTO</string>
</void>
<void property="groupId">
<string>TREINAMENTO</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>AMG BA</string>
</void>
<void property="groupId">
<string>AMG_BA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>MARKETING</string>
</void>
<void property="groupId">
<string>MARKETING</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>COMPRAS</string>
</void>
<void property="groupId">
<string>COMPRAS</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>AMG SE</string>
</void>
<void property="groupId">
<string>AMG_SE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>LOJA SE</string>
</void>
<void property="groupId">
<string>LOJA_SE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESPAÇO DO REVENDEDOR SE</string>
</void>
<void property="groupId">
<string>ESPACO_DO_REVENDEDOR_SE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>VENDAS IN COMPANY</string>
</void>
<void property="groupId">
<string>VENDAS_IN_COMPANY</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>REGIONAL BAHIA</string>
</void>
<void property="groupId">
<string>REGIONAL_BAHIA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>CANAL LOJA 01</string>
</void>
<void property="groupId">
<string>CANAL_LOJA_01</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>AUDITORIA</string>
</void>
<void property="groupId">
<string>AUDITORIA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>CANAL LOJA 02</string>
</void>
<void property="groupId">
<string>CANAL_LOJA_02</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>PLANEJAMENTO DE DEMANDAS</string>
</void>
<void property="groupId">
<string>PLANEJAMENTO_DE_DEMANDAS</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>PROJETOS</string>
</void>
<void property="groupId">
<string>PROJETOS</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>COMPLIANCE</string>
</void>
<void property="groupId">
<string>COMPLIANCE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESCRITÓRIO - MATRIZ</string>
</void>
<void property="groupId">
<string>ESCRITORIO_MATRIZ</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>ESCRITÓRIO - CONQUISTA</string>
</void>
<void property="groupId">
<string>ESCRITORIO_CONQUISTA</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>REGIONAL SERGIPE</string>
</void>
<void property="groupId">
<string>REGIONAL_SERGIPE</string>
</void>
</object>
</void>
<void method="add">
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
<void property="groupDescription">
<string>Transferencia</string>
</void>
<void property="groupId">
<string>Transferencia</string>
</void>
</object>
</void>
</object>
</void>
<void method="put">
<string>expediente</string>
<array class="java.lang.String" length="4">
<void index="0">
<string>Default</string>
</void>
<void index="1">
<string>Expediente BackOffice, Logística e Motorista</string>
</void>
<void index="2">
<string>Expediente Escritório Matriz</string>
</void>
<void index="3">
<string>Expediente Lojas</string>
</void>
</array>
</void>
<void method="put">
<string>camposFormulario, documentoId = 590</string>
<array class="java.lang.String" length="32">
<void index="0">
<string>activity</string>
</void>
<void index="1">
<string>centroCusto</string>
</void>
<void index="2">
<string>codigoItem</string>
</void>
<void index="3">
<string>currentUserId</string>
</void>
<void index="4">
<string>currentUsermail</string>
</void>
<void index="5">
<string>currentUserName</string>
</void>
<void index="6">
<string>dataAbertura</string>
</void>
<void index="7">
<string>descAnexo_Coleta</string>
</void>
<void index="8">
<string>descAnexo_Entrega</string>
</void>
<void index="9">
<string>descAnexo_Nfe</string>
</void>
<void index="10">
<string>descAnexo_Recebimento</string>
</void>
<void index="11">
<string>descricao</string>
</void>
<void index="12">
<string>emailSolicitante</string>
</void>
<void index="13">
<string>estabelecimento</string>
</void>
<void index="14">
<string>excelUpload</string>
</void>
<void index="15">
<string>fdAnexo_Coleta</string>
</void>
<void index="16">
<string>fdAnexo_Entrega</string>
</void>
<void index="17">
<string>fdAnexo_recebimento</string>
</void>
<void index="18">
<string>fnAnexo_Nfe</string>
</void>
<void index="19">
<string>formMode</string>
</void>
<void index="20">
<string>gestorEmail</string>
</void>
<void index="21">
<string>gestorEmailE</string>
</void>
<void index="22">
<string>gestorNome</string>
</void>
<void index="23">
<string>gestorNomeE</string>
</void>
<void index="24">
<string>gestor_cc</string>
</void>
<void index="25">
<string>gestor_cce</string>
</void>
<void index="26">
<string>justificativa</string>
</void>
<void index="27">
<string>quantidadeItem</string>
</void>
<void index="28">
<string>requesterId</string>
</void>
<void index="29">
<string>requesterMail</string>
</void>
<void index="30">
<string>requesterName</string>
</void>
<void index="31">
<string>WKNumProces</string>
</void>
</array>
</void>
<void method="put">
<string>mecanismo</string>
<array class="[Ljava.lang.Object;" length="12">
<void index="0">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Associação</string>
</void>
<void index="1">
<string>Associado</string>
</void>
</array>
</void>
<void index="1">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Campo de Formulário</string>
</void>
<void index="1">
<string>Campo Formulário</string>
</void>
</array>
</void>
<void index="2">
<array class="java.lang.Object" length="2">
<void index="0">
<string>dpf_di_emp_filial_filtro</string>
</void>
<void index="1">
<string>dpf_di_emp_filial_filtro</string>
</void>
</array>
</void>
<void index="3">
<array class="java.lang.Object" length="2">
<void index="0">
<string>dpf_di_inicio_diadmissao</string>
</void>
<void index="1">
<string>dpf_di_inicio_diadmissao</string>
</void>
</array>
</void>
<void index="4">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Executor de Atividade</string>
</void>
<void index="1">
<string>Executor Atividade</string>
</void>
</array>
</void>
<void index="5">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Grupo</string>
</void>
<void index="1">
<string>Grupo</string>
</void>
</array>
</void>
<void index="6">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Grupos do Colaborador</string>
</void>
<void index="1">
<string>Grupos Colaborador</string>
</void>
</array>
</void>
<void index="7">
<array class="java.lang.Object" length="2">
<void index="0">
<string>mecCustomAprov</string>
</void>
<void index="1">
<string>mecCustomAprov</string>
</void>
</array>
</void>
<void index="8">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Papel</string>
</void>
<void index="1">
<string>Papel</string>
</void>
</array>
</void>
<void index="9">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição para um Grupo</string>
</void>
<void index="1">
<string>Pool Grupo</string>
</void>
</array>
</void>
<void index="10">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição para um Papel</string>
</void>
<void index="1">
<string>Pool Papel</string>
</void>
</array>
</void>
<void index="11">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Usuário</string>
</void>
<void index="1">
<string>Usuário</string>
</void>
</array>
</void>
</array>
</void>
</object>
</java>

View File

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.8.0_481" class="java.beans.XMLDecoder">
<object class="java.util.HashMap">
<void method="put">
<string>volume</string>
<array class="java.lang.String" length="1">
<void index="0">
<string>Default</string>
</void>
</array>
</void>
<void method="put">
<string>expediente</string>
<array class="java.lang.String" length="4">
<void index="0">
<string>Default</string>
</void>
<void index="1">
<string>Expediente BackOffice, Logística e Motorista</string>
</void>
<void index="2">
<string>Expediente Escritório Matriz</string>
</void>
<void index="3">
<string>Expediente Lojas</string>
</void>
</array>
</void>
<void method="put">
<string>mecanismo</string>
<array class="[Ljava.lang.Object;" length="12">
<void index="0">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Associação</string>
</void>
<void index="1">
<string>Associado</string>
</void>
</array>
</void>
<void index="1">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Campo de Formulário</string>
</void>
<void index="1">
<string>Campo Formulário</string>
</void>
</array>
</void>
<void index="2">
<array class="java.lang.Object" length="2">
<void index="0">
<string>dpf_di_emp_filial_filtro</string>
</void>
<void index="1">
<string>dpf_di_emp_filial_filtro</string>
</void>
</array>
</void>
<void index="3">
<array class="java.lang.Object" length="2">
<void index="0">
<string>dpf_di_inicio_diadmissao</string>
</void>
<void index="1">
<string>dpf_di_inicio_diadmissao</string>
</void>
</array>
</void>
<void index="4">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Executor de Atividade</string>
</void>
<void index="1">
<string>Executor Atividade</string>
</void>
</array>
</void>
<void index="5">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Grupo</string>
</void>
<void index="1">
<string>Grupo</string>
</void>
</array>
</void>
<void index="6">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Grupos do Colaborador</string>
</void>
<void index="1">
<string>Grupos Colaborador</string>
</void>
</array>
</void>
<void index="7">
<array class="java.lang.Object" length="2">
<void index="0">
<string>mecCustomAprov</string>
</void>
<void index="1">
<string>mecCustomAprov</string>
</void>
</array>
</void>
<void index="8">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Papel</string>
</void>
<void index="1">
<string>Papel</string>
</void>
</array>
</void>
<void index="9">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição para um Grupo</string>
</void>
<void index="1">
<string>Pool Grupo</string>
</void>
</array>
</void>
<void index="10">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição para um Papel</string>
</void>
<void index="1">
<string>Pool Papel</string>
</void>
</array>
</void>
<void index="11">
<array class="java.lang.Object" length="2">
<void index="0">
<string>Atribuição por Usuário</string>
</void>
<void index="1">
<string>Usuário</string>
</void>
</array>
</void>
</array>
</void>
</object>
</java>