Primeiro commit fluig
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
var ABERTURA = 0;
|
||||
var INICIO = 4;
|
||||
var EMISSAO = 6;
|
||||
var COLETA = 31;
|
||||
var ENTREGA = 57;
|
||||
var RECEBIMENTO = 18;
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
function displayFields(form, customHTML) {
|
||||
var activity = getValue('WKNumState');
|
||||
var userId = getValue('WKUser');
|
||||
|
||||
form.setShowDisabledFields(true);
|
||||
form.setHidePrintLink(true);
|
||||
|
||||
form.setValue("WKNumProces", getValue('WKNumProces'));
|
||||
form.setValue("activity", activity);
|
||||
form.setValue("formMode", form.getFormMode());
|
||||
|
||||
var c1 = DatasetFactory.createConstraint("colleagueId", userId, userId, ConstraintType.MUST);
|
||||
var filter = new Array(c1);
|
||||
var fields = new Array("colleagueName");
|
||||
var retorno = DatasetFactory.getDataset("colleague", fields, filter, null);
|
||||
|
||||
//requester
|
||||
if (activity == 0) {
|
||||
form.setValue("requesterName", retorno.getValue(0, "colleagueName"));
|
||||
form.setValue("requesterMail", retorno.getValue(0, "mail"));
|
||||
form.setValue("requesterId", userId);
|
||||
} else {
|
||||
form.setValue("currentUserName", retorno.getValue(0, "colleagueName"));
|
||||
form.setValue("currentUsermail", retorno.getValue(0, "mail"));
|
||||
form.setValue("currentUserId", userId);
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
function validateForm(form) {
|
||||
var atividade = parseInt(getValue("WKNumState"));
|
||||
var nextAtividade = getValue("WKNextState");
|
||||
var completTask = getValue("WKCompletTask");
|
||||
|
||||
var hasErros = false;
|
||||
var message = "";
|
||||
|
||||
log.info("Atividade Inicial Para Transferência de Mercadoria");
|
||||
log.info("Abertura de solcitação: " + atividade);
|
||||
|
||||
if (completTask.equals("true")) {
|
||||
|
||||
switch (atividade) {
|
||||
case EMISSAO:
|
||||
|
||||
// log.info("Abertura de Chamado CAERN - Área do Solicitante: " + form.getValue("areaSolicitante"));
|
||||
// if (form.getValue("areaSolicitante") == "") {
|
||||
// message += getMessage("Área do Solicitante", 2, form);
|
||||
// hasErros = true;
|
||||
// }
|
||||
|
||||
log.info("Por favor, anexar a nota fiscal" + form.getValue("fnAnexo_Nfe"));
|
||||
if (form.getValue("fnAnexo_Nfe") == "") {
|
||||
message += getMessage("Nota Fiscal", 3, form);
|
||||
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;
|
||||
|
||||
case COLETA:
|
||||
log.info("Por favor, registre o momento da coleta" + form.getValue("fdAnexo_Coleta"));
|
||||
if (form.getValue("fdAnexo_Coleta") == "") {
|
||||
message += getMessage("Coleta", 3, form);
|
||||
hasErros = true;
|
||||
}
|
||||
|
||||
case ENTREGA:
|
||||
log.info("Por favor, registre o momento da entrega" + form.getValue("fdAnexo_Entrega"));
|
||||
if (form.getValue("fdAnexo_Entrega") == "") {
|
||||
message += getMessage("Entrega", 3, form);
|
||||
hasErros = true;
|
||||
}
|
||||
|
||||
case RECEBIMENTO:
|
||||
log.info("Por favor, registre o recebimento do material" + form.getValue("fdAnexo_recebimento"));
|
||||
if (form.getValue("fdAnexo_recebimento") == "") {
|
||||
message += getMessage("Recebimento", 3, form);
|
||||
hasErros = true;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (hasErros) {
|
||||
if (isMobile(form)) throw message;
|
||||
throw (
|
||||
"<ul style='list-style-type: disc; padding-left: 90px;' class='alert alert-danger'>" +
|
||||
message +
|
||||
"</ul>"
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function isMobile(form) {
|
||||
return form.getMobile() != null && form.getMobile();
|
||||
}
|
||||
|
||||
function getMessage(texto, tipo, form) {
|
||||
if (tipo == 1) {
|
||||
return 'Campo "' + texto + '" nao pode estar vazio.<br>';
|
||||
} else if (tipo == 2) {
|
||||
return 'Selecione uma das opcoes do Campo "' + texto + '".<br>';
|
||||
} else if (tipo == 3) {
|
||||
return 'Campo "' + texto + '" nao pode estar sem anexo.<br>';
|
||||
} else {
|
||||
return 'A quantidade existente de campos "' + texto + '" deve ser maior do que 0.'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
function carregarItensDoExcel(fileInputId) {
|
||||
const file = document.getElementById(fileInputId).files[0];
|
||||
if (!file) {
|
||||
FLUIGC.toast({ title: 'Erro', message: 'Nenhum arquivo selecionado.', type: 'danger' });
|
||||
return;
|
||||
}
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const data = new Uint8Array(e.target.result);
|
||||
const workbook = XLSX.read(data, { type: 'array' });
|
||||
const sheet = workbook.Sheets[workbook.SheetNames[0]];
|
||||
const linhas = XLSX.utils.sheet_to_json(sheet);
|
||||
|
||||
// Limpa a tabela (sem usar form)
|
||||
const indices = $("input[id^='codigoItem___']").map(function() {
|
||||
return $(this).attr("id").split("___")[1];
|
||||
}).get();
|
||||
indices.forEach(idx => fnWdkRemoveChild(idx));
|
||||
|
||||
// Adiciona os itens da planilha
|
||||
linhas.forEach(item => {
|
||||
const idx = wdkAddChild('tabelaItens');
|
||||
window[`descricao___${idx}`].setValue(item.codigoItem);
|
||||
|
||||
// $(`#codigoItem___${idx}`).val(item.codigoItem);
|
||||
$(`#quantidadeItem___${idx}`).val(item.quantidadeItem);
|
||||
$(`#codigoItem___${idx}`).val(item.descricao);
|
||||
});
|
||||
|
||||
FLUIGC.toast({ title: 'Sucesso', message: 'Itens carregados com sucesso!', type: 'success' });
|
||||
};
|
||||
|
||||
reader.readAsArrayBuffer(file);
|
||||
}
|
||||
@@ -0,0 +1,885 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
// Quando clicar em "Adicionar arquivo"
|
||||
$('#btnAdicionarExcel').on('click', function () {
|
||||
$('#excelUpload').click(); // aciona o input escondido
|
||||
});
|
||||
|
||||
// Quando um arquivo for selecionado
|
||||
$('#excelUpload').on('change', function () {
|
||||
const file = this.files[0];
|
||||
|
||||
if (file) {
|
||||
$('#nomeArquivoExcel').text('Arquivo selecionado: ' + file.name);
|
||||
$('#btnAdicionarExcel').hide();
|
||||
$('#btnRemoverExcel').show();
|
||||
|
||||
carregarItensDoExcel('excelUpload'); // chama sua função
|
||||
}
|
||||
});
|
||||
|
||||
// Quando clicar em "Remover arquivo"
|
||||
$('#btnRemoverExcel').on('click', function () {
|
||||
$('#excelUpload').val('');
|
||||
$('#nomeArquivoExcel').text('Nenhum arquivo selecionado');
|
||||
$('#btnAdicionarExcel').show();
|
||||
$('#btnRemoverExcel').hide();
|
||||
});
|
||||
|
||||
if ($("#formMode").val() == "VIEW") {
|
||||
showAndBlock(["all"]);
|
||||
} else {
|
||||
//show the right fields
|
||||
var activity = $("#activity").val();
|
||||
var requestDate = getCurrentDate();
|
||||
|
||||
$(".activity").hide();
|
||||
|
||||
$(".activity-" + activity).show();
|
||||
|
||||
if (activity == 0 || activity == 1) {
|
||||
//primeira atividade
|
||||
//$("#dataAbertura").val(requestDate[0] + " - " + requestDate[1]);
|
||||
$("#dataAbertura").val(requestDate[0]);
|
||||
// add_new_row("tabelaItens");
|
||||
} else if (activity == 4) {
|
||||
showAndBlock([0]);
|
||||
$("#userValidacaoGestor").val($("#currentUserName").val());
|
||||
$("#dataValidacaoGestor").val(
|
||||
requestDate[0] + " - " + requestDate[1]
|
||||
);
|
||||
updt_line();
|
||||
} else if (activity == 6) {
|
||||
showAndBlock([0, 4]);
|
||||
$("#userValidacaoCompras").val($("#currentUserName").val());
|
||||
$("#dataValidacaoCompras").val(
|
||||
requestDate[0] + " - " + requestDate[1]
|
||||
);
|
||||
|
||||
if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
$(".justificativa-activity-4").hide();
|
||||
}
|
||||
updt_line();
|
||||
|
||||
} else if (activity == 57) {
|
||||
$("#userCotacaoGestor").val($("#currentUserName").val());
|
||||
$("#dataAprovCompras").val(
|
||||
requestDate[0] + " - " + requestDate[1]
|
||||
);
|
||||
showAndBlock([0, 4, 6]);
|
||||
|
||||
if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
$(".justificativa-activity-4").hide();
|
||||
}
|
||||
if ($("#justificativaDecisaoCompras").val() == "") {
|
||||
$(".justificativa-activity-6").hide();
|
||||
}
|
||||
updt_line();
|
||||
|
||||
} else if (activity == 31) {
|
||||
$("#userRealizacaoCompras").val($("#currentUserName").val());
|
||||
$("#dataRealizacaoCompras").val(
|
||||
requestDate[0] + " - " + requestDate[1]
|
||||
);
|
||||
showAndBlock([0, 4, 6, 57]);
|
||||
|
||||
if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
$(".justificativa-activity-4").hide();
|
||||
}
|
||||
if ($("#justificativaDecisaoCompras").val() == "") {
|
||||
$(".justificativa-activity-6").hide();
|
||||
}
|
||||
updt_line();
|
||||
} else if (activity == 18) {
|
||||
if ($("justificativaValidaProblema") != "") {
|
||||
showAndBlock([0, 4, 6, 24, 57, 31]);
|
||||
} else {
|
||||
showAndBlock([0, 4, 6, 31]);
|
||||
}
|
||||
$("#userValidacaoItens").val($("#currentUserName").val());
|
||||
$("#dataValidacaoItens").val(requestDate[0] + " - " + requestDate[1]);
|
||||
|
||||
if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
$(".justificativa-activity-4").hide();
|
||||
}
|
||||
if ($("#justificativaDecisaoCompras").val() == "") {
|
||||
$(".justificativa-activity-6").hide();
|
||||
}
|
||||
if ($("#consideracoesCompras").val() == "") {
|
||||
$(".justificativa-activity-31").hide();
|
||||
}
|
||||
|
||||
$("input[name=validacaoItens]").on("change", function () {
|
||||
$(".justificativaDecisaoItens").hide();
|
||||
if (
|
||||
$("input[name=validacaoItens]:checked").val() == "incorreto" ||
|
||||
$("input[name=validacaoItens]:checked").val() == "naoEntregue"
|
||||
) {
|
||||
$(".justificativaDecisaoItens").show();
|
||||
}
|
||||
});
|
||||
$("input[name=validacaoItens]").trigger("change");
|
||||
|
||||
updt_line();
|
||||
} else if (activity == 24) {
|
||||
showAndBlock([0, 4, 6, 31, 18]);
|
||||
|
||||
if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
$(".justificativa-activity-4").hide();
|
||||
}
|
||||
if ($("#justificativaDecisaoCompras").val() == "") {
|
||||
$(".justificativa-activity-6").hide();
|
||||
}
|
||||
if ($("#consideracoesCompras").val() == "") {
|
||||
$(".justificativa-activity-31").hide();
|
||||
}
|
||||
updt_line();
|
||||
}
|
||||
}
|
||||
|
||||
formatarMoedasTabela("preco___");
|
||||
//formatarMoedasTabela("precoIndica___");
|
||||
formatarMoedasTabela("ValorTotal");
|
||||
|
||||
// gerarTabelaCotacaoIndica("tabelaCotacaoIndica", "tabelaItens");
|
||||
|
||||
|
||||
});
|
||||
|
||||
function formatarMoedasTabela(ids) {
|
||||
$(document).on('input', `[id^="${ids}"]`, function() {
|
||||
let valor = $(this).val();
|
||||
|
||||
// Remove tudo que não for número
|
||||
valor = valor.replace(/\D/g, '');
|
||||
|
||||
// Converte para número decimal
|
||||
let numero = parseFloat(valor) / 100;
|
||||
|
||||
// Formata para Real Brasileiro
|
||||
if (!isNaN(numero)) {
|
||||
valor = numero.toLocaleString('pt-BR', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
}
|
||||
|
||||
// Atualiza o campo com a formatação correta
|
||||
$(this).val(valor);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//show the activity and then block the fields
|
||||
function showAndBlock(activity) {
|
||||
for (var i = 0, l = activity.length; i < l; i++) {
|
||||
$(".activity-" + activity[i]).show();
|
||||
$(".hideButton").hide();
|
||||
$(".activity-" + activity[i] + " :input").each(function () {
|
||||
$(this).attr("readonly", "readonly");
|
||||
$(this)
|
||||
.css("background-color", "#eee")
|
||||
.children("option:not(:selected)")
|
||||
.prop("disabled", true);
|
||||
$(this).on("mousedown", function (e) {
|
||||
this.blur();
|
||||
window.focus();
|
||||
});
|
||||
if ($(this).is(":checkbox")) {
|
||||
$(this).attr("disabled", true);
|
||||
} else if ($(this).is(":radio")) {
|
||||
$(this).on("click", function () {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getCurrentDate() {
|
||||
var newDate = new Date();
|
||||
var h = newDate.getHours();
|
||||
if (h < 10) {
|
||||
h = "0" + h;
|
||||
}
|
||||
var m = newDate.getMinutes();
|
||||
if (m < 10) {
|
||||
m = "0" + m;
|
||||
}
|
||||
var hour = h + ":" + m; // + ":" + s;
|
||||
var day = newDate.getDate();
|
||||
if (day < 10) {
|
||||
day = "0" + day;
|
||||
}
|
||||
var month = newDate.getMonth() + 1;
|
||||
if (month < 10) {
|
||||
month = "0" + month;
|
||||
}
|
||||
newDate = day + "/" + month + "/" + newDate.getFullYear();
|
||||
var currentDate = [newDate, hour];
|
||||
return currentDate;
|
||||
}
|
||||
|
||||
var beforeSendValidate = function (numState, nextState) {
|
||||
$(".errorValidate").removeClass("errorValidate");
|
||||
if (numState == 0 || numState == 1) {
|
||||
if ($("#estabelecimento ").val() == "") {
|
||||
$("#estabelecimento ").parent("div").addClass("errorValidate");
|
||||
throw "'Estabelecimento/filial ' é obrigatório.";
|
||||
} else if ($("#enderecoSolicitante").val() == "") {
|
||||
$("#enderecoSolicitante").parent("div").addClass("errorValidate");
|
||||
throw "'Endereço do solicitante' é obrigatório.";
|
||||
} else if ($("#complemento").val() == "") {
|
||||
$("#complemento").parent("div").addClass("errorValidate");
|
||||
throw "'Complemento' é obrigatório.";
|
||||
} else if ($("#justificativa").val() == "") {
|
||||
$("#justificativa").parent("div").addClass("errorValidate");
|
||||
throw "'Qual o motivo da compra?' é obrigatório.";
|
||||
} else {
|
||||
$("input[id^='quantidadeItem___']").each(function (index, value) {
|
||||
var linha = $(value).attr("name").split("___")[1];
|
||||
|
||||
if (
|
||||
$("#descricao___" + linha).val() == "" &&
|
||||
$("#quantidadeItem___" + linha).val() == ""
|
||||
) {
|
||||
remove_row(value);
|
||||
}
|
||||
});
|
||||
|
||||
$("input[id^='quantidadeItem___']").each(function (index, value) {
|
||||
var linha = $(value).attr("name").split("___")[1];
|
||||
|
||||
if ($("#descricao___" + linha).val() == "") {
|
||||
$("#descricao___" + linha)
|
||||
.parent("div")
|
||||
.addClass("errorValidate");
|
||||
throw "Selecione o item " + (index + 1) + ".";
|
||||
} else if ($("#quantidadeItem___" + linha).val() == "") {
|
||||
$("#quantidadeItem___" + linha)
|
||||
.parent("div")
|
||||
.addClass("errorValidate");
|
||||
throw "Preencha a quantidade do item " + (index + 1) + ".";
|
||||
}
|
||||
});
|
||||
|
||||
if ($("input[name^='quantidadeItem___']").length == 0) {
|
||||
throw "Ao menos um item é necessário para iniciar a solicitação.";
|
||||
}
|
||||
}
|
||||
} else if (numState == 4) {
|
||||
//
|
||||
} else if (numState == 6) {
|
||||
//
|
||||
} else if (numState == 18) {
|
||||
if (
|
||||
$("input[name='validacaoItens']:checked").val() == "" ||
|
||||
$("input[name='validacaoItens']:checked").val() == undefined
|
||||
) {
|
||||
throw "'Consegue resolver?' é obrigatório.";
|
||||
} else if (
|
||||
$("input[name='validacaoItens']:checked").val() == "naoEntregue" ||
|
||||
$("input[name='validacaoItens']:checked").val() == "incorreto"
|
||||
) {
|
||||
if ($("#justificativaDecisaoItens").val() == "") {
|
||||
$("#justificativaDecisaoItens")
|
||||
.parent("div")
|
||||
.addClass("errorValidate");
|
||||
throw "'Justificativa' é obrigatório.";
|
||||
}
|
||||
}
|
||||
} else if (numState == 24) {
|
||||
$('#justificativaValidaProblema').parent().removeClass('has-error errorValidate');
|
||||
if ($('#justificativaValidaProblema').val() == "") {
|
||||
$('#justificativaValidaProblema').parent().addClass('has-error errorValidate');
|
||||
throw "Preencha os campos obrigatórios."
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function setSelectedZoomItem(selectedItem) {
|
||||
var name_item = selectedItem.inputId;
|
||||
var ehItem = name_item.indexOf("___") >= 0;
|
||||
var indice = "";
|
||||
if (ehItem){
|
||||
var valores = name_item.split("___");
|
||||
name_item = valores[0];
|
||||
indice = valores[1];
|
||||
}
|
||||
|
||||
// var dtsCentroCusto = DatasetFactory.getDataset(
|
||||
// "ds_LojasTransf",
|
||||
// null,
|
||||
// null,
|
||||
// null
|
||||
// ).values;
|
||||
|
||||
// var nomeGestorComercial = dtsCentroCusto[0].gestorCentroCusto;
|
||||
// var emailGestorComercial = dtsCentroCusto[0].emailGestor;
|
||||
// var idGestorComercial = dtsCentroCusto[0].idGestor;
|
||||
|
||||
// var nomeGestorOperacoes = dtsCentroCusto[2].gestorCentroCusto;
|
||||
// var emailGestorOperacoes = dtsCentroCusto[2].emailGestor;
|
||||
// var idGestorOperacoes = dtsCentroCusto[2].idGestor;
|
||||
|
||||
// if (name_item == "estabelecimento") {
|
||||
// let estabelecimento = selectedItem["estabelecimento"];
|
||||
|
||||
// if (estabelecimento.includes("ESCRITÓRIO")) {
|
||||
// } else if (estabelecimento.includes("CD")) {
|
||||
// window["centroCusto"].setValue("Operações");
|
||||
// $("#gestorNome").val(nomeGestorOperacoes);
|
||||
// $("#gestorEmail").val(emailGestorOperacoes);
|
||||
// $("#gestor_cc").val(idGestorOperacoes);
|
||||
// } else {
|
||||
// window["centroCusto"].setValue("Comercial");
|
||||
// $("#gestorNome").val(nomeGestorComercial);
|
||||
// $("#gestorEmail").val(emailGestorComercial);
|
||||
// $("#gestor_cc").val(idGestorComercial);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (name_item == "centroCusto") {
|
||||
$("#gestorNome").val(selectedItem["gestorCentroCusto"]);
|
||||
$("#gestorEmail").val(selectedItem["emailGestor"]);
|
||||
$("#gestor_cc").val(selectedItem["idGestor"]);
|
||||
}
|
||||
|
||||
if (name_item == "estabelecimento") {
|
||||
$("#gestorNomeE").val(selectedItem["gestorCentroCusto"]);
|
||||
$("#gestorEmailE").val(selectedItem["emailGestor"]);
|
||||
$("#gestor_cce").val(selectedItem["idGestor"]);
|
||||
}
|
||||
|
||||
if (name_item == "userSolicitante") {
|
||||
$("#emailSolicitante").val(selectedItem.mail);
|
||||
}
|
||||
|
||||
if (name_item == "descricao") {
|
||||
$("#codigoItem" + "___" + indice).val(selectedItem["descricao"]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function removedZoomItem(removedItem) {
|
||||
var name_item = removedItem.inputId;
|
||||
var ehItem = name_item.indexOf("___") >= 0;
|
||||
var indice = "";
|
||||
if (ehItem){
|
||||
var valores = name_item.split("___");
|
||||
name_item = valores[0];
|
||||
indice = valores[1];
|
||||
}
|
||||
|
||||
if (name_item == "userSolicitante") {
|
||||
$("#emailSolicitante").val("");
|
||||
} else if (name_item == "centroCusto") {
|
||||
$("#gestorNome").val("");
|
||||
$("#gestorEmail").val("");
|
||||
$("#gestor_cc").val("");
|
||||
} else if (~name_item.indexOf("___")) {
|
||||
var linha = name_item.split("___");
|
||||
|
||||
if (linha[0] == "descricao") {
|
||||
$("#codigoItem___" + linha[1]).val("");
|
||||
$("#quantidadeItem___" + linha[1]).val("");
|
||||
}
|
||||
}
|
||||
|
||||
if (name_item == "descricao") {
|
||||
$("#codigoItem" + "___" + indice).val("");
|
||||
}
|
||||
}
|
||||
|
||||
function add_new_row(table) {
|
||||
var row = wdkAddChild(table);
|
||||
updt_line();
|
||||
}
|
||||
|
||||
function updt_line() {
|
||||
$(".tabela_itens_id").each(function (index, item) {
|
||||
if (index == 0) return;
|
||||
$(item)[0].innerHTML = index;
|
||||
});
|
||||
}
|
||||
|
||||
function remove_row(element) {
|
||||
fnWdkRemoveChild(element);
|
||||
updt_line();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Andrey, nao esqueca de ver isso
|
||||
// function removedZoomItem(removedItem) {
|
||||
// // if (removedItem.inputId === "estabelecimento") {
|
||||
// // document.getElementById("setor-container").style.display = "none"; // Oculta ao remover
|
||||
// window["centroCusto"].setValue("")[0]
|
||||
// // }
|
||||
// }
|
||||
|
||||
$(document).ready(function() {
|
||||
// $('#gerarTabela').click(function() {
|
||||
// var numCotacoes = $('#numCotacoes').val();
|
||||
// var tbody = $("#tabelaCotacao tbody");
|
||||
// tbody.empty(); // Limpa a tabela antes de gerar novas linhas
|
||||
|
||||
// // Supondo que você já tenha uma tabela de origem com os produtos
|
||||
// $('table.table[tablename="tabelaItens"] tbody tr:visible').each(function(index, element) {
|
||||
// var nomeItem = $(element).find('input[name^="nomeItem"]').val();
|
||||
// var quantidadeItem = $(element).find('input[name^="quantidadeItem"]').val();
|
||||
|
||||
// for (var i = 0; i < numCotacoes; i++) {
|
||||
// var row = `<tr>
|
||||
// <td>${index + 1}.${i + 1}</td>
|
||||
// <td>${nomeItem}</td>
|
||||
// <td>${quantidadeItem}</td>
|
||||
// <td><input type="text" class="form-control" name="fornecedor_${index}_${i}" /></td>
|
||||
// <td><input type="number" class="form-control" name="preco_${index}_${i}" /></td>
|
||||
// <td><input type="date" class="form-control" name="dataEntrega_${index}_${i}" /></td>
|
||||
// <td><input type="email" class="form-control" name="email_${index}_${i}" /></td>
|
||||
// </tr>`;
|
||||
// tbody.append(row);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
$('#gerarTabela').click(function() {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Toda a lógica para o correto funcionamento desse componente foi feito em cima das classes abaixo:
|
||||
* .componentAnexo, .descAnexo, .inputAnexo, .btnUpFile, .btnViewerFile, .btnDownloadFile e o atributo data-acao
|
||||
* Sem elas o código não irá funcionar, então se por acaso você quiser alterar os nomes dessas classes
|
||||
* lembre-se de alterar nas funções desse arquivo e também no css
|
||||
*/
|
||||
|
||||
/**
|
||||
* Direciona para cada função correspondente ao valor que esta no atributo data-acao do botão
|
||||
* @param {object} event Parâmetro obrigatório, o própio elemento que sofreu o evento click
|
||||
* @return {void}
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function anexo(event){
|
||||
console.log("event")
|
||||
console.log(event)
|
||||
try{
|
||||
const acao = event.currentTarget.getAttribute("data-acao");
|
||||
const inputFile = $(event.currentTarget).parent().parent().find(".inputAnexo")[0]
|
||||
const fileDescription = $(event.currentTarget).parent().parent().find(".descAnexo").val()
|
||||
if(acao == "upload"){
|
||||
uploadFile(fileDescription, inputFile.id)
|
||||
}
|
||||
if(acao == "viewer"){
|
||||
viewerFile(fileDescription)
|
||||
}
|
||||
if(acao == "download"){
|
||||
downloadFile(fileDescription, inputFile.id)
|
||||
}
|
||||
if(acao == "delete"){
|
||||
removeFileConfirm(fileDescription, inputFile.id)
|
||||
}
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função anexo")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Envia arquivos para a aba Anexos do Fluig
|
||||
* Função adaptada por Sérgio Machado
|
||||
* @param {String} fileDescription Parâmetro obrigatório, Descrição do arquivo que ficará na aba anexos do Fluig
|
||||
* @param {String} idInput Parâmetro obrigatório, Id do campo em que o nome do arquivo fisico é gravado
|
||||
* @return {void}
|
||||
*/
|
||||
function uploadFile(fileDescription, idInput) {
|
||||
try{
|
||||
var tabAttachments = parent.document.getElementById("tab-attachments");
|
||||
if (tabAttachments) {
|
||||
//Verifica se o navegador é o Ie9 para realizar o devido tratamento
|
||||
if (parent.WCMAPI.isIe9()) {
|
||||
$(".ecm-navigation-silverlight", parent.document).show("fade").css("top", 0);
|
||||
$("#ecm-navigation-silverlight", parent.document).attr({
|
||||
"data-on-camera": "true", "data-file-name-camera": fileDescription, "data-inputNameFile": idInput
|
||||
});
|
||||
$(parent.document).on("keyup", this.actionKeyup)
|
||||
} else {
|
||||
var element = parent.document.getElementById("ecm-navigation-inputFile-clone");
|
||||
if (element && document.createEvent) {
|
||||
element.setAttribute("data-on-camera", "true");
|
||||
if (fileDescription && idInput) {
|
||||
element.setAttribute("data-file-name-camera", fileDescription)
|
||||
element.setAttribute("data-inputNameFile", idInput)
|
||||
}
|
||||
//Realiza o click no botão "Carregar arquivos" que tem na aba de anexos
|
||||
element.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função uploadFile")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Função executada após a escolha do arquivo a ser enviado para o Fluig.
|
||||
* Verifica se o anexo já existe, seta o valor do arquivo fisico no campo e altera o estado dos botões
|
||||
* @return {void}
|
||||
*/
|
||||
$(function(){
|
||||
try{
|
||||
window.parent.$("#ecm-navigation-inputFile-clone").on('change', function(e) {
|
||||
const inputNameFile = this.getAttribute("data-inputNameFile");
|
||||
const fileDescription = this.getAttribute("data-file-name-camera");
|
||||
const filePhisical = this.files[0].name;
|
||||
if(fileDescription && fileDescription){
|
||||
/**
|
||||
* O trecho de código abaixo percorre os anexos do Fluig e caso já exista um anexo com a mesma descrição, ele será removido.
|
||||
* Em seguida limpa o campo onde é armazenado o nome fisico do arquivo
|
||||
*/
|
||||
$.each(parent.ECM.attachmentTable.getData(), function(i, attachment) {
|
||||
var descricao = attachment.description;
|
||||
if (fileDescription == descricao) {
|
||||
parent.WKFViewAttachment.removeAttach([i]);
|
||||
setFilePhisicalName(inputNameFile, "");
|
||||
}
|
||||
});
|
||||
setFilePhisicalName(inputNameFile, filePhisical)
|
||||
if(getFormMode() == "ADD"){
|
||||
btnState(inputNameFile, 'delete', 'download');
|
||||
}
|
||||
if(getFormMode() == "MOD"){
|
||||
btnState(inputNameFile, 'delete', 'viewer');
|
||||
}
|
||||
if(getFormMode() == "VIEW"){
|
||||
btnState(inputNameFile, 'download', 'viewer');
|
||||
}
|
||||
}
|
||||
});
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado ao selecionar o arquivo")
|
||||
console.error(e)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Visualizar arquivos que esta na aba Anexos do Fluig
|
||||
* @param {String} fileDescription Parâmetro obrigatório, Descrição do anexo
|
||||
* @return {void}
|
||||
*/
|
||||
function viewerFile(fileDescription) {
|
||||
try{
|
||||
if(hasFileFluig(fileDescription)){
|
||||
const anexos = parent.ECM.attachmentTable.getData();
|
||||
for(let i = 0; i < anexos.length; i++){
|
||||
var descricao = anexos[i].description;
|
||||
if (fileDescription == descricao) {
|
||||
parent.WKFViewAttachment.openAttachmentView('adm', anexos[i].documentId);
|
||||
return
|
||||
}
|
||||
}
|
||||
}else{
|
||||
FLUIGC.toast({
|
||||
title: "Atenção",
|
||||
message: "Anexo não encontrado",
|
||||
type: "warning"
|
||||
});
|
||||
}
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função viewerFile")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Realiza o download do arquivo que esta na aba Anexos do Fluig
|
||||
* @param {String} idInput Parâmetro obrigatório, Id do campo em que o nome do arquivo fisico é gravado
|
||||
* @param {String} fileDescription Parâmetro obrigatório, Descrição do arquivo que esta na aba anexos do Fluig
|
||||
* @return {void}
|
||||
*/
|
||||
function downloadFile(fileDescription, idInput) {
|
||||
try{
|
||||
const filename = getFormMode() == "VIEW" ? $(`#${idInput}`).text() : $(`#${idInput}`).val()
|
||||
FLUIGC.message.confirm({
|
||||
message: `Deseja baixar o anexo <b>${filename}</b>?`,
|
||||
title: 'Confirmação',
|
||||
labelYes: 'Sim, quero baixar',
|
||||
labelNo: 'Não, quero cancelar',
|
||||
}, function(result) {
|
||||
if (result) {
|
||||
$.each(parent.ECM.attachmentTable.getData(), function(i, attachment) {
|
||||
var descricao = attachment.description;
|
||||
if (fileDescription == descricao) {
|
||||
parent.WKFViewAttachment.downloadAttach([i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função downloadFile")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Confirmação para Remove arquivo que esta na aba Anexos do Fluig
|
||||
* @param {String} idInput Parâmetro obrigatório, Id do campo em que o nome do arquivo fisico é gravado
|
||||
* @param {String} fileDescription Parâmetro obrigatório, Descrição do arquivo que esta na aba anexos do Fluig
|
||||
* @return {void}
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function removeFileConfirm(fileDescription, idInput) {
|
||||
try{
|
||||
const filename = $(`#${idInput}`).val()
|
||||
FLUIGC.message.confirm({
|
||||
message: `Deseja remover o anexo <b>${filename}</b>?`,
|
||||
title: 'Confirmação',
|
||||
labelYes: 'Sim, quero remover',
|
||||
labelNo: 'Não, quero cancelar',
|
||||
}, function(result) {
|
||||
if (result) {
|
||||
removeFile(fileDescription)
|
||||
setFilePhisicalName(idInput, "")
|
||||
btnState(idInput, "upload", "download")
|
||||
}
|
||||
});
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função removeFileConfirm")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove arquivo que esta na aba Anexos do Fluig
|
||||
* @param {String} fileDescription Parâmetro obrigatório, Descrição do arquivo que esta na aba anexos do Fluig
|
||||
* @return {void}
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function removeFile(fileDescription) {
|
||||
try{
|
||||
$.each(parent.ECM.attachmentTable.getData(), function(i, attachment) {
|
||||
if (attachment.description == fileDescription) {
|
||||
parent.WKFViewAttachment.removeAttach([i]);
|
||||
}
|
||||
});
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função removeFile")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Seta o nome do arquivo fisico no campo e realiza tratativa caso o campo esteja bloqueado pelo enableFields
|
||||
* @param {String} idInput Parâmetro obrigatório, Id do campo em que o nome do arquivo fisico é gravado
|
||||
* @param {String} filePhisical Parâmetro obrigatório, nome do arquivo fisico
|
||||
* @return {void}
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function setFilePhisicalName(idInput, filePhisical){
|
||||
try{
|
||||
if(idInput.indexOf("_") == 0){
|
||||
$("#" + idInput.substring(1)).val(filePhisical);
|
||||
}
|
||||
$("#" + idInput).val(filePhisical);
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função setFilePhisicalName")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Altera o estado e visibilidade dos botões de anexos
|
||||
* @param {String} idInput Parâmetro obrigatório, Id do campo em que o nome do arquivo fisico é gravado
|
||||
* @param {String} acao Parâmetro obrigatório, ação para ser executada no momento do click, se é delete ou upload
|
||||
* @param {String} btn Parâmetro obrigatório, botão secundário que deve sofrer ação de ficar visível ou não. Botão de Download ou Viewer
|
||||
* @return {void}
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function btnState(idInput, acao, btn){
|
||||
try{
|
||||
let btnUpFile = $(`#${idInput}`).parent().parent().find(".btnUpFile");
|
||||
let btnDownloadFile = $(`#${idInput}`).parent().parent().find(".btnDownloadFile");
|
||||
let btnViewerFile = $(`#${idInput}`).parent().parent().find(".btnViewerFile");
|
||||
if(acao == "delete"){
|
||||
btnUpFile.removeClass("btn-success").addClass("btn-danger");
|
||||
btnUpFile.attr({'data-acao': acao, 'title': 'Excluir'});
|
||||
btnUpFile.find("i").removeClass("fluigicon-file-upload").addClass("fluigicon-trash");
|
||||
if(btn == "download"){
|
||||
btnDownloadFile.prop("disabled", false);
|
||||
btnDownloadFile.show()
|
||||
}
|
||||
if(btn == "viewer"){
|
||||
btnViewerFile.prop("disabled", false);
|
||||
btnViewerFile.show()
|
||||
}
|
||||
}
|
||||
if(acao == "upload"){
|
||||
btnUpFile.removeClass("btn-danger").addClass("btn-success");
|
||||
btnUpFile.attr({'data-acao': acao, 'title': 'Selecionar'});
|
||||
btnUpFile.find("i").removeClass("fluigicon-trash").addClass("fluigicon-file-upload");
|
||||
btnDownloadFile.prop("disabled", true);
|
||||
btnDownloadFile.hide()
|
||||
btnViewerFile.prop("disabled", true);
|
||||
btnViewerFile.hide()
|
||||
}
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função btnState")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Faz tratativa nos botões do anexos percorrente cada class .componentAnexo
|
||||
* Em modo de visualização o botão de upload é removido, e caso tenha anexo, habilita o botão de visualização do anexo
|
||||
* Se em modo de edição e conter anexo o botão de upload é alterado para o botão de deletar anexos e habilita o botão de visualização
|
||||
* @return {void}
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function displayBtnFiles(){
|
||||
try{
|
||||
$('.componentAnexo').each(function(i, element) {
|
||||
let inputFile = $(element).find(".inputAnexo")
|
||||
let inputFileVew = $(element).find(".componentAnexo")
|
||||
let btnUpFile = $(element).find(".btnUpFile");
|
||||
let btnViewerFile = $(element).find(".btnViewerFile");
|
||||
let btnDownloadFile = $(element).find(".btnDownloadFile");
|
||||
|
||||
if(getFormMode() == "VIEW"){
|
||||
btnUpFile.remove();
|
||||
if(inputFileVew.val() != ""){
|
||||
btnViewerFile.prop("disabled", false);
|
||||
btnViewerFile.show()
|
||||
}
|
||||
}
|
||||
if(getFormMode() == "MOD" && inputFile.val() != ""){
|
||||
btnUpFile.remove();
|
||||
// btnState(inputFile[0].id, "delete", "viewer")
|
||||
btnViewerFile.prop("disabled", false);
|
||||
btnViewerFile.show()
|
||||
btnDownloadFile.prop("disabled", false);
|
||||
btnDownloadFile.show()
|
||||
}
|
||||
});
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função displayBtnFiles")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove o botão de upload/delete
|
||||
* @param {String} inputFile Parâmetro obrigatório, Id do campo
|
||||
* @return {void}
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function invisibleBtnUpload(inputFile){
|
||||
try{
|
||||
if(getFormMode() == "MOD" || getFormMode() == "VIEW"){
|
||||
if($(`#_${inputFile}`).length){
|
||||
let btnUpFile = $(`#_${inputFile}`).parent().parent().find(".btnUpFile");
|
||||
btnUpFile.remove();
|
||||
} else{
|
||||
let btnUpFile = $(`#${inputFile}`).parent().parent().find(".btnUpFile");
|
||||
btnUpFile.remove();
|
||||
}
|
||||
}
|
||||
if($(`#_${inputFile}`).length){
|
||||
if($(`#_${inputFile}`).val() == ""){
|
||||
$(`#_${inputFile}`).attr({placeholder:"Nenhum anexo selecionado"});
|
||||
}
|
||||
} else{
|
||||
if($(`#${inputFile}`).val() == ""){
|
||||
$(`#${inputFile}`).attr({placeholder:"Nenhum anexo selecionado"});
|
||||
}
|
||||
}
|
||||
}catch(e){
|
||||
console.error("Houve um erro inesperado na função invisibleBtnUpload")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Verifica se os campos do anexo de uma tabela pai e filho esta preenchido,
|
||||
* caso esteja, ele verifica se o anexo esta presente na aba de anexos do Fluig
|
||||
* @param {String} tablename Parâmetro obrigatório, tablename da tabela pai e filho.
|
||||
* @param {String} idInput Parâmetro obrigatório, Id do campo de anexo que deseja verificar
|
||||
* @return {String} - Retorna string de erros caso apresente erros
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function invalidFilesTable(tablename, idInput){
|
||||
try {
|
||||
let errors = "";
|
||||
const countRows = $(`[tablename='${tablename}']`).find('tbody tr').not(':first');
|
||||
for(let i = 0; i < countRows.length; i++){
|
||||
let indice = getIndice(countRows.eq(i).find("input")[0].id);
|
||||
let inputNameFile = $(`#_${idInput}___${indice}`).length ? $(`#_${idInput}___${indice}`) : $(`#${idInput}___${indice}`)
|
||||
let fileDescription = inputNameFile.parent().find(".descAnexo").val()
|
||||
if(inputNameFile.val() && !hasFileFluig(fileDescription)){
|
||||
errors += `<li style='margin-bottom: 5px;'>O anexo <b>${inputNameFile.val()}</b> da linha <b>${i+1}</b> não foi encontrado</li>`
|
||||
}
|
||||
}
|
||||
return errors
|
||||
} catch (e) {
|
||||
console.error('Houve um erro inesperado na função invalidFileTable')
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifica se o campo do anexo esta preenchido, caso esteja, ele verifica se o anexo esta válido
|
||||
* @param {String} idInput Parâmetro obrigatório, Id do campo em que o nome do arquivo fisico é gravado
|
||||
* @return {Boolean}
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function invalidFile(idInput){
|
||||
try {
|
||||
const inputNameFile = $(`#${idInput}`).val()
|
||||
if(inputNameFile){
|
||||
if($(`#_${idInput}`).length){
|
||||
let fileDescription = $(`#_${idInput}`).parent().find(".descAnexo").val()
|
||||
return !hasFileFluig(fileDescription)
|
||||
} else{
|
||||
let fileDescription = $(`#${idInput}`).parent().find(".descAnexo").val()
|
||||
return !hasFileFluig(fileDescription)
|
||||
}
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Houve um erro inesperado na função invalidFile')
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Verifica se o anexo existe na aba de anexos do Fluig
|
||||
* @param {String} fileDescription Parâmetro obrigatório, Descrição do arquivo
|
||||
* @return {Boolean} - Retorna verdadeiro caso o arquivo exista
|
||||
* @author Sérgio Machado
|
||||
*/
|
||||
function hasFileFluig(fileDescription){
|
||||
try {
|
||||
const anexos = parent.ECM.attachmentTable.getData();
|
||||
for(let i = 0; i < anexos.length; i++){
|
||||
var descricao = anexos[i].description;
|
||||
if (fileDescription == descricao) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
} catch (e) {
|
||||
console.error('Houve um erro inesperado na função hasFileFluig')
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
$("#userValidacaoGestor").val($("#currentUserName").val());
|
||||
+876
@@ -0,0 +1,876 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="/style-guide/css/fluig-style-guide.min.css" />
|
||||
|
||||
<script src="/resources/js/jquery/jquery.js"></script>
|
||||
<script src="/resources/js/jquery/jquery-ui.min.js"></script>
|
||||
<script src="/resources/js/mustache/mustache-min.js"></script>
|
||||
<script src="/style-guide/js/fluig-style-guide.min.js"></script>
|
||||
<script type="text/javascript" src="/webdesk/vcXMLRPC.js"></script>
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="excel.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
h6 {
|
||||
color: #afb0b3 !important;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #008ac4 !important;
|
||||
display: flex !important;
|
||||
flex-direction: row !important;
|
||||
}
|
||||
|
||||
h2:after {
|
||||
content: "" !important;
|
||||
flex: 1 1 !important;
|
||||
border-bottom: 2px solid #008ac4 !important;
|
||||
margin: auto !important;
|
||||
}
|
||||
|
||||
.flaticon {
|
||||
color: #008ac4 !important;
|
||||
}
|
||||
|
||||
#rcorners {
|
||||
height: 110px;
|
||||
line-height: 110px;
|
||||
color: white;
|
||||
border-radius: 0px 0px 50px 50px;
|
||||
background: rgb(0, 138, 192);
|
||||
background: linear-gradient(90deg,
|
||||
rgba(0, 138, 192, 1) 0%,
|
||||
rgba(2, 166, 189, 1) 50%,
|
||||
rgba(1, 192, 181, 1) 100%);
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.change-weight {
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
||||
.asteristicWarning {
|
||||
color: #000000 !important;
|
||||
margin-top: 50px !important;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.errorValidate .requiredInput,
|
||||
.errorValidate .select2 {
|
||||
border: 2px solid #cc3d3d !important;
|
||||
}
|
||||
|
||||
.text-error {
|
||||
font-size: 10px;
|
||||
margin: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.errorValidate .text-error {
|
||||
display: block;
|
||||
}
|
||||
|
||||
input.select2-search__field::placeholder {
|
||||
color: #afb0b3;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="fluig-style-guide" style="background-color: white">
|
||||
<form>
|
||||
<div style="display: none">
|
||||
<input type="text" id="WKNumProces" name="WKNumProces" />
|
||||
<input type="text" id="activity" name="activity" />
|
||||
<input type="text" id="formMode" name="formMode" />
|
||||
|
||||
<!-- requester -->
|
||||
<input type="text" id="requesterMail" name="requesterMail" />
|
||||
<input type="text" id="requesterId" name="requesterId" />
|
||||
|
||||
<!-- current user -->
|
||||
<input type="text" id="currentUserName" name="currentUserName" />
|
||||
<input type="text" id="currentUsermail" name="currentUsermail" />
|
||||
<input type="text" id="currentUserId" name="currentUserId" />
|
||||
|
||||
<input type="text" id="gestor_cc" name="gestor_cc" />
|
||||
<input type="text" id="gestor_cce" name="gestor_cce" />
|
||||
</div>
|
||||
|
||||
<h1 id="rcorners">Solicitação de Transferência</h1>
|
||||
|
||||
<div class="container activity-all">
|
||||
<div class="activity activity-0 activity-1">
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-account-box" aria-hidden="true"></i>
|
||||
Dados gerais
|
||||
</h2>
|
||||
<h6>
|
||||
Dados referentes aos responsáveis pela abertura e pela
|
||||
solicitação do atual processo.
|
||||
</h6>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label for="requesterName"> Usuário de abertura </label>
|
||||
<input type="text" name="requesterName" id="requesterName" class="form-control"
|
||||
data-protection="Usuário de abertura" data-protection-anonymizable data-protection-sensitive
|
||||
data-protection-name
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
<div class="form-group col-md-2 col-xs-6">
|
||||
<label for="dataAbertura"> Data </label>
|
||||
<input type="text" name="dataAbertura" id="dataAbertura" class="form-control" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-6 col-xs-12">
|
||||
<label for="userSolicitante"> Analista solicitante </label>
|
||||
<input placeholder="Inserir nome solicitante." type="text" class="form-control" name="userSolicitante"
|
||||
id="userSolicitante" data-protection="Usuário solicitante" data-protection-anonymizable
|
||||
data-protection-sensitive data-protection-name
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo" />
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-xs-12">
|
||||
<label for="emailSolicitante">
|
||||
E-mail do solicitante
|
||||
</label>
|
||||
<input placeholder="Inserir e-mail do solicitante. Ex.: Joaodasilva@email.com.br" type="text"
|
||||
name="emailSolicitante" id="emailSolicitante" class="form-control"
|
||||
data-protection="E-mail do solicitante" data-protection-anonymizable data-protection-sensitive
|
||||
data-protection-mail
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-6 col-xs-12">
|
||||
<label for="estabelecimento">
|
||||
Filial Emitente
|
||||
</label>
|
||||
<span class="required text-danger"><strong> * </strong></span>
|
||||
<input type="zoom" class="form-control requiredInput" name="estabelecimento" id="estabelecimento"
|
||||
data-zoom="{
|
||||
'displayKey':'centroCusto',
|
||||
'datasetId':'ds_LojasTransf',
|
||||
'placeholder': 'Pesquisar nome do estabelecimento ou filial.',
|
||||
'fields':[
|
||||
{
|
||||
'field':'codigoCentroCusto',
|
||||
'label':'Código',
|
||||
'standard':'true',
|
||||
'search':'true'
|
||||
},
|
||||
{
|
||||
'field':'centroCusto',
|
||||
'label':'Centro de custo',
|
||||
'search':'true'
|
||||
},
|
||||
{
|
||||
'field': 'gestorCentroCusto',
|
||||
'label': 'Gestor',
|
||||
'visible': 'false'
|
||||
},
|
||||
{
|
||||
'field': 'emailGestor',
|
||||
'label': 'Email do gestor',
|
||||
'visible': 'false'
|
||||
},
|
||||
{
|
||||
'field': 'idGestor',
|
||||
'label': 'Id do gestor',
|
||||
'visible': 'false'
|
||||
}
|
||||
]
|
||||
}" />
|
||||
<p class="text-danger text-error">
|
||||
Preenchimento obrigatório.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-xs-6">
|
||||
<label for="centroCusto"> Filial Destino </label>
|
||||
<input type="zoom" class="form-control" name="centroCusto" id="centroCusto" data-zoom="{
|
||||
'displayKey':'centroCusto',
|
||||
'datasetId':'ds_LojasTransf',
|
||||
'placeholder': 'Pesquisar número ou nome do centro de custo.',
|
||||
'fields':[
|
||||
{
|
||||
'field':'codigoCentroCusto',
|
||||
'label':'Código',
|
||||
'standard':'true',
|
||||
'search':'true'
|
||||
},
|
||||
{
|
||||
'field':'centroCusto',
|
||||
'label':'Centro de custo',
|
||||
'search':'true'
|
||||
},
|
||||
{
|
||||
'field': 'gestorCentroCusto',
|
||||
'label': 'Gestor',
|
||||
'visible': 'false'
|
||||
},
|
||||
{
|
||||
'field': 'emailGestor',
|
||||
'label': 'Email do gestor',
|
||||
'visible': 'false'
|
||||
},
|
||||
{
|
||||
'field': 'idGestor',
|
||||
'label': 'Id do gestor',
|
||||
'visible': 'false'
|
||||
}
|
||||
]
|
||||
}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-6 col-xs-12">
|
||||
<label for="gestorNomeE">
|
||||
Gestor aprovador da Filial Emitente
|
||||
</label>
|
||||
<input type="text" placeholder="Nome do gestor aprovador do centro de custo" class="form-control"
|
||||
name="gestorNomeE" id="gestorNomeE" data-protection="Gestor aprovador do centro de custo"
|
||||
data-protection-anonymizable data-protection-sensitive data-protection-name
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-xs-6">
|
||||
<label for="gestorEmail"> E-mail do gestor </label>
|
||||
<input type="text" placeholder="E-mail do gestor aprovador do centro de custo" name="gestorEmailE"
|
||||
id="gestorEmailE" class="form-control" data-protection="E-mail do gestor"
|
||||
data-protection-anonymizable data-protection-sensitive data-protection-mail
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-6 col-xs-12">
|
||||
<label for="gestorNome">
|
||||
Gestor aprovador da Filial Destino
|
||||
</label>
|
||||
<input type="text" placeholder="Nome do gestor aprovador do centro de custo" class="form-control"
|
||||
name="gestorNome" id="gestorNome" data-protection="Gestor aprovador do centro de custo"
|
||||
data-protection-anonymizable data-protection-sensitive data-protection-name
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-xs-6">
|
||||
<label for="gestorEmail"> E-mail do gestor </label>
|
||||
<input type="text" placeholder="E-mail do gestor aprovador do centro de custo" name="gestorEmail"
|
||||
id="gestorEmail" class="form-control" data-protection="E-mail do gestor"
|
||||
data-protection-anonymizable data-protection-sensitive data-protection-mail
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-product" aria-hidden="true"></i>
|
||||
Itens
|
||||
</h2>
|
||||
<h6>
|
||||
Dados referentes ao itens de Transferência necessários para o
|
||||
solicitante.
|
||||
</h6>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div id="blocoAnexoExcel" style="margin-bottom: 10px;">
|
||||
<label><b>Importar itens via Excel:</b></label><br>
|
||||
|
||||
<!-- input hidden, controlado pelos botões -->
|
||||
<input type="file" id="excelUpload" name="excelUpload" accept=".xlsx, .xls" style="display: none;" />
|
||||
|
||||
<!-- botão personalizado para escolher arquivo -->
|
||||
<button type="button" class="btn btn-primary btn-sm" id="btnAdicionarExcel">
|
||||
Adicionar arquivo
|
||||
</button>
|
||||
|
||||
<!-- botão de remover, só aparece se tiver arquivo -->
|
||||
<button type="button" class="btn btn-danger btn-sm" id="btnRemoverExcel" style="display: none; margin-left: 10px;">
|
||||
Remover arquivo
|
||||
</button>
|
||||
|
||||
<!-- nome do arquivo -->
|
||||
<div id="nomeArquivoExcel" style="margin-top: 5px; font-style: italic; color: #555;"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-12 col-xs-12">
|
||||
<table tablename="tabelaItens" class="table" id="tabelaItens" noaddbutton="true"
|
||||
nodeletebutton="true">
|
||||
<thead>
|
||||
<tr class="tableHeadRow">
|
||||
<th class="tableColumn">#</th>
|
||||
<th class="tableColumn">Código do Item</th>
|
||||
<th class="tableColumn">Quantidade</th>
|
||||
<th class="tableColumn">Descrição</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="tableBodyRow">
|
||||
<td style="width: 10%">
|
||||
<div class="form-input">
|
||||
<span><strong class="tabela_itens_id"> </strong></span>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 25%">
|
||||
<div class="form-input">
|
||||
<input type="zoom" class="form-control requiredInput" name="descricao" id="descricao"
|
||||
data-zoom="{
|
||||
'displayKey':'codigo',
|
||||
'datasetId':'revenda',
|
||||
'maximumSelectionLength':'1',
|
||||
'placeholder':'Buscar item',
|
||||
'resultlimit':'10',
|
||||
'fields':[
|
||||
{
|
||||
'field':'codigo',
|
||||
'label':' Código do Item',
|
||||
'standard':'true',
|
||||
'search': 'true'
|
||||
},
|
||||
{
|
||||
'field':'descricao',
|
||||
'label':'Nome do Item',
|
||||
'standard':'true',
|
||||
'search': 'true'
|
||||
}
|
||||
]
|
||||
}" />
|
||||
<p class="text-danger text-error">
|
||||
Preenchimento obrigatório.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 10%">
|
||||
<div class="form-input">
|
||||
<input type="number" placeholder="Inserir quantidade" class="form-control requiredInput"
|
||||
name="quantidadeItem" id="quantidadeItem" />
|
||||
<p class="text-danger text-error">
|
||||
Preenchimento obrigatório.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 40%">
|
||||
<div class="form-input">
|
||||
<input type="text" class="form-control" name="codigoItem" id="codigoItem" readonly />
|
||||
</div>
|
||||
</td>
|
||||
<td class="hideButton" style="width: 70px">
|
||||
<button onClick="remove_row(this)" class="fluigicon fluigicon-trash fluigicon-md btn"
|
||||
style="position: initial; background: white"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row hideButton">
|
||||
<div class="col-md-3 col-xs-3" style="cursor: pointer" onClick="add_new_row('tabelaItens')">
|
||||
<span class="fluigicon fluigicon-plus fluigicon-sm"></span>
|
||||
|
||||
<label style="cursor: pointer">
|
||||
Adicionar novo item
|
||||
</label>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-message-question" aria-hidden="true"></i>
|
||||
Justificativa
|
||||
</h2>
|
||||
<h6>
|
||||
Motivos para a transferência dos itens e as possíveis informações
|
||||
complementares.
|
||||
</h6>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-12 col-xs-12">
|
||||
<label for="justificativa">
|
||||
Qual o motivo da Transferência?
|
||||
</label>
|
||||
<span class="text-danger"><strong>*</strong></span>
|
||||
<textarea placeholder="Descreva o motivo para a solicitação de transferência"
|
||||
class="form-control requiredInput" rows="3" id="justificativa" name="justificativa"></textarea>
|
||||
<p class="text-danger text-error">
|
||||
Preenchimento obrigatório.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="activity activity-4">
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-check-circle" aria-hidden="true"></i>
|
||||
Validação dos Itens
|
||||
</h2>
|
||||
<h6>
|
||||
Informações complementares sobre a validação dos
|
||||
da solicitação.
|
||||
</h6>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label for="userValidacaoGestor">
|
||||
Gestor responsável pela validação
|
||||
</label>
|
||||
<input type="text" name="userValidacaoGestor" id="userValidacaoGestor" class="form-control"
|
||||
data-protection="Gestor aprovador do centro de custo" data-protection-anonymizable
|
||||
data-protection-sensitive data-protection-name
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
<div class="form-group col-md-2 col-xs-6">
|
||||
<label for="dataValidacaoGestor"> Data </label>
|
||||
<input type="text" name="dataValidacaoGestor" id="dataValidacaoGestor" class="form-control"
|
||||
readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justificativa-activity-4">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="justificativaDecisaoGestor">Justificativa</label>
|
||||
<textarea placeholder="Descreva a justificativa para a validação." class="form-control"
|
||||
name="justificativaDecisaoGestor" id="justificativaDecisaoGestor"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-5">
|
||||
<label class="control-label">Anexe uma foto embalando os Produtos</label>
|
||||
<div class="componentAnexo">
|
||||
<input type="hidden" id="fdAnexo_embalar" class="descAnexo" name="fdAnexo_embalar"
|
||||
value="Anexo Embalar" />
|
||||
<input type="text" id="fnAnexo_embalar" name="fnAnexo_embalar" class="form-control inputAnexo"
|
||||
placeholder="Selecione um arquivo" readonly />
|
||||
<div style="display: flex" class="icones">
|
||||
<button type="button" style="margin-left: 3px;" class="btnUpFile btn btn-success btn-sm excluir"
|
||||
data-acao="upload" onclick="anexo(event)" title="Selecionar">
|
||||
<i class="fluigicon fluigicon-file-upload icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button" class="btnViewerFile btn btn-info btn-sm"
|
||||
data-acao="viewer" onclick="anexo(event)" title="Visualizar" disabled>
|
||||
<i class="fluigicon fluigicon-eye-open icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button"
|
||||
class="btnDownloadFile btn btn-info btn-sm" data-acao="download" onclick="anexo(event)"
|
||||
title="Download" disabled>
|
||||
<i class="fluigicon fluigicon-download icon-sm"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activity activity-6">
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-tests-central" aria-hidden="true"></i>
|
||||
Emissão da NFE de transferência
|
||||
</h2>
|
||||
<h6>
|
||||
Informações complementares sobre a emissão da NFE.
|
||||
</h6>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label for="userValidacaoCompras">
|
||||
Usuário responsável pela Emissão
|
||||
</label>
|
||||
<input type="text" name="userValidacaoCompras" id="userValidacaoCompras" class="form-control"
|
||||
data-protection="Usuário responsável pela análise da solicitação" data-protection-anonymizable
|
||||
data-protection-sensitive data-protection-name
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
<div class="form-group col-md-2 col-xs-6">
|
||||
<label for="dataValidacaoCompras"> Data </label>
|
||||
<input type="text" name="dataValidacaoCompras" id="dataValidacaoCompras" class="form-control"
|
||||
readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row justificativa-activity-6">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="justificativaDecisaoCompras">Chave da Nota Fiscal</label>
|
||||
<textarea placeholder="Insira a chave da nota fiscal" class="form-control"
|
||||
rows="1" name="justificativaDecisaoCompras" id="justificativaDecisaoCompras"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-5">
|
||||
<label class="control-label">Anexe aqui a Nota Fiscal</label>
|
||||
<div class="componentAnexo">
|
||||
<input type="hidden" id="fdAnexo_Nfe" class="descAnexo" name="fdAnexo_Nfe" value="Anexo NFE" />
|
||||
<input type="text" id="fnAnexo_Nfe" name="fnAnexo_Nfe" class="form-control inputAnexo"
|
||||
placeholder="Selecione um arquivo" readonly />
|
||||
<div style="display: flex" class="icones">
|
||||
<button type="button" style="margin-left: 3px;" class="btnUpFile btn btn-success btn-sm excluir"
|
||||
data-acao="upload" onclick="anexo(event)" title="Selecionar">
|
||||
<i class="fluigicon fluigicon-file-upload icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button" class="btnViewerFile btn btn-info btn-sm"
|
||||
data-acao="viewer" onclick="anexo(event)" title="Visualizar" disabled>
|
||||
<i class="fluigicon fluigicon-eye-open icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button"
|
||||
class="btnDownloadFile btn btn-info btn-sm" data-acao="download" onclick="anexo(event)"
|
||||
title="Download" disabled>
|
||||
<i class="fluigicon fluigicon-download icon-sm"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activity activity-31">
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-edit-square" aria-hidden="true"></i>
|
||||
Motorista Responsável pela coleta
|
||||
</h2>
|
||||
<h6>
|
||||
Considerações sobre a coleta
|
||||
</h6>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label for="userRealizacaoCompras">
|
||||
Usuário responsável pela transferência
|
||||
</label>
|
||||
<input type="text" name="userRealizacaoCompras" id="userRealizacaoCompras" class="form-control"
|
||||
data-protection="Usuário responsável pela compra" data-protection-anonymizable
|
||||
data-protection-sensitive data-protection-name
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
<div class="form-group col-md-2 col-xs-6">
|
||||
<label for="dataRealizacaoCompras"> Data </label>
|
||||
<input type="text" name="dataRealizacaoCompras" id="dataRealizacaoCompras" class="form-control"
|
||||
readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justificativa-activity-31">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-12 col-xs-12">
|
||||
<label for="consideracoesCompras"> Considerações sobre os itens da solicitação, realizadas pelo
|
||||
motorista responsável pela transferência. </label>
|
||||
<textarea placeholder="Insira suas considerações sobre o pedido de compras" class="form-control"
|
||||
rows="3" id="consideracoesCompras" name="consideracoesCompras"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-5">
|
||||
<label class="control-label">Anexe uma foto coletando os Produtos</label>
|
||||
<div class="componentAnexo">
|
||||
<input type="hidden" id="fdAnexo_Coleta" class="descAnexo" name="fdAnexo_Coleta" value="Anexo Coleta" />
|
||||
<input type="text" id="fnAnexo_Coleta" name="fnAnexo_Coleta" class="form-control inputAnexo"
|
||||
placeholder="Selecione um arquivo" readonly />
|
||||
<div style="display: flex" class="icones">
|
||||
<button type="button" style="margin-left: 3px;" class="btnUpFile btn btn-success btn-sm excluir"
|
||||
data-acao="upload" onclick="anexo(event)" title="Selecionar">
|
||||
<i class="fluigicon fluigicon-file-upload icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button" class="btnViewerFile btn btn-info btn-sm"
|
||||
data-acao="viewer" onclick="anexo(event)" title="Visualizar" disabled>
|
||||
<i class="fluigicon fluigicon-eye-open icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button"
|
||||
class="btnDownloadFile btn btn-info btn-sm" data-acao="download" onclick="anexo(event)"
|
||||
title="Download" disabled>
|
||||
<i class="fluigicon fluigicon-download icon-sm"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activity activity-57">
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-edit-square" aria-hidden="true"></i>
|
||||
Motorista responsável pela entrega
|
||||
</h2>
|
||||
<h6>
|
||||
Considerações sobre a entrega.
|
||||
</h6>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label for="userCotacaoGestor">
|
||||
Considerações sobre a entrega
|
||||
</label>
|
||||
<input type="text" name="userCotacaoGestor" id="userCotacaoGestor" class="form-control"
|
||||
data-protection="Usuário responsável pela cotacao" data-protection-anonymizable
|
||||
data-protection-sensitive data-protection-name
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
<div class="form-group col-md-2 col-xs-6">
|
||||
<label for="dataAprovCompras"> Data </label>
|
||||
<input type="text" name="dataAprovCompras" id="dataAprovCompras" class="form-control" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justificativa-activity-57">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-12 col-xs-12">
|
||||
<label for="consideracoesCotacao"> Considerações sobre a coleta. </label>
|
||||
<textarea placeholder="Insira suas considerações sobre a transferência" class="form-control" rows="3"
|
||||
id="consideracoesCotacao" name="consideracoesCotacao"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-5">
|
||||
<label class="control-label">Anexe uma foto do canhoto da nota</label>
|
||||
<div class="componentAnexo">
|
||||
<input type="hidden" id="fdAnexo_Entrega" class="descAnexo" name="fdAnexo_Entrega"
|
||||
value="Anexo Entrega" />
|
||||
<input type="text" id="fnAnexo_Entrega" name="fnAnexo_Entrega" class="form-control inputAnexo"
|
||||
placeholder="Selecione um arquivo" readonly />
|
||||
<div style="display: flex" class="icones">
|
||||
<button type="button" style="margin-left: 3px;" class="btnUpFile btn btn-success btn-sm excluir"
|
||||
data-acao="upload" onclick="anexo(event)" title="Selecionar">
|
||||
<i class="fluigicon fluigicon-file-upload icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button" class="btnViewerFile btn btn-info btn-sm"
|
||||
data-acao="viewer" onclick="anexo(event)" title="Visualizar" disabled>
|
||||
<i class="fluigicon fluigicon-eye-open icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button"
|
||||
class="btnDownloadFile btn btn-info btn-sm" data-acao="download" onclick="anexo(event)"
|
||||
title="Download" disabled>
|
||||
<i class="fluigicon fluigicon-download icon-sm"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activity activity-18">
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-check-circle" aria-hidden="true"></i>
|
||||
Validação dos Itens entregues
|
||||
</h2>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label for="userValidacaoItens"> Responsável pelo recebimento </label>
|
||||
<input type="text" name="userValidacaoItens" id="userValidacaoItens" class="form-control"
|
||||
data-protection="Solicitante" data-protection-anonymizable data-protection-sensitive
|
||||
data-protection-name
|
||||
data-protection-class-legitimate-interests="Dado coletado para o funcionamento do processo"
|
||||
readonly />
|
||||
</div>
|
||||
<div class="form-group col-md-2 col-xs-6">
|
||||
<label for="dataValidacaoItens"> Data </label>
|
||||
<input type="text" name="dataValidacaoItens" id="dataValidacaoItens" class="form-control" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-12">
|
||||
<label>Houve algum problema com a transferência?</label>
|
||||
<span class="text-danger"><strong>*</strong></span><br />
|
||||
<div>
|
||||
<label>
|
||||
<input name="validacaoItens" id="validacaoItensEntregue" value="entregue" type="radio" />
|
||||
<span class="change-weight">Não houve problema</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
<input name="validacaoItens" id="validacaoItensNaoEntregue" value="naoEntregue" type="radio" />
|
||||
<span class="change-weight">Transferência não entregue</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
<input name="validacaoItens" id="validacaoItensIncorreto" value="incorreto" type="radio" />
|
||||
<span class="change-weight">Entregue com inconsistência (qualidade, quantidade,
|
||||
embalagem)</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justificativaDecisaoItens">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="justificativaDecisaoItens">Justificativa</label>
|
||||
<span class="text-danger"><strong>*</strong></span>
|
||||
<textarea class="form-control requiredInput"
|
||||
placeholder="Insira a justificativa sobre a validação dos itens" name="justificativaDecisaoItens"
|
||||
id="justificativaDecisaoItens"></textarea>
|
||||
<p class="text-danger text-error">
|
||||
Preenchimento obrigatório.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-5">
|
||||
<label class="control-label">Anexe uma foto da mercadoria no Practico Live</label>
|
||||
<div class="componentAnexo">
|
||||
<input type="hidden" id="fdAnexo_recebimento" class="descAnexo" name="fdAnexo_recebimento"
|
||||
value="Anexo Recebimento" />
|
||||
<input type="text" id="fnAnexo_recebimento" name="fnAnexo_recebimento" class="form-control inputAnexo"
|
||||
placeholder="Selecione um arquivo" readonly />
|
||||
<div style="display: flex" class="icones">
|
||||
<button type="button" style="margin-left: 3px;" class="btnUpFile btn btn-success btn-sm excluir"
|
||||
data-acao="upload" onclick="anexo(event)" title="Selecionar">
|
||||
<i class="fluigicon fluigicon-file-upload icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button" class="btnViewerFile btn btn-info btn-sm"
|
||||
data-acao="viewer" onclick="anexo(event)" title="Visualizar" disabled>
|
||||
<i class="fluigicon fluigicon-eye-open icon-sm"></i>
|
||||
</button>
|
||||
<button style="display: none; margin-left: 3px;" type="button"
|
||||
class="btnDownloadFile btn btn-info btn-sm" data-acao="download" onclick="anexo(event)"
|
||||
title="Download" disabled>
|
||||
<i class="fluigicon fluigicon-download icon-sm"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activity activity-24">
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-document-check" aria-hidden="true"></i>
|
||||
Validar problema de transferência
|
||||
</h2>
|
||||
<h6>Dados referentes às possíveis implicações desta transferência.</h6>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="justificativaValidaProblema">Quais as suas considerações?</label>
|
||||
<span class="text-danger"><strong>*</strong></span>
|
||||
<textarea placeholder="Insira as considerções desta transferência." class="form-control"
|
||||
name="justificativaValidaProblema" id="justificativaValidaProblema"></textarea>
|
||||
<p class="text-danger text-error">
|
||||
Preenchimento obrigatório.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h6 class="asteristicWarning">
|
||||
Todos os campos com * são de preenchimento obrigatório.
|
||||
</h6>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user