Novo git da alteração
This commit is contained in:
@@ -16,12 +16,22 @@ function displayFields(form, customHTML) {
|
||||
|
||||
//requester
|
||||
if (activity == 0) {
|
||||
form.setValue("requesterName", retorno.getValue(0, "colleagueName"));
|
||||
form.setValue("requesterMail", retorno.getValue(0, "mail"));
|
||||
form.setValue("requesterId", userId);
|
||||
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);
|
||||
form.setValue("currentUserName", retorno.getValue(0, "colleagueName"));
|
||||
form.setValue("currentUsermail", retorno.getValue(0, "mail"));
|
||||
form.setValue("currentUserId", userId);
|
||||
}
|
||||
|
||||
form.setShowDisabledFields(true);
|
||||
form.setHidePrintLink(true);
|
||||
|
||||
// ✅ Quando for atividade de aprovação do gestor
|
||||
if (activity == 31) {
|
||||
var hoje = new java.text.SimpleDateFormat("dd/MM/yyyy").format(new java.util.Date());
|
||||
form.setValue("userRealizacaoCompras", retorno.getValue(0, "colleagueName"));
|
||||
form.setValue("dataRealizacaoCompras", hoje);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
function validateForm(form) {
|
||||
var msg = "";
|
||||
|
||||
// Pega o valor do grupo de rádio
|
||||
var motivo = form.getValue("validarMotivo");
|
||||
|
||||
if (!motivo) {
|
||||
msg += "Campo Motivo não foi preenchido\n";
|
||||
}
|
||||
|
||||
if (msg != "") {
|
||||
throw msg;
|
||||
}
|
||||
}
|
||||
@@ -244,12 +244,12 @@
|
||||
</label>
|
||||
<span class="required text-danger"><strong> * </strong></span>
|
||||
<input type="zoom" class="form-control requiredInput" name="funcao" id="funcao" data-zoom="{
|
||||
'displayKey':'descricao',
|
||||
'displayKey':'DESCRICAO',
|
||||
'datasetId':'ds_cargos',
|
||||
'placeholder': 'Pesquisar nome do estabelecimento ou filial.',
|
||||
'placeholder': 'Pesquisar função.',
|
||||
'fields':[
|
||||
{
|
||||
'field':'descricao',
|
||||
'field':'DESCRICAO',
|
||||
'label':'Descrição',
|
||||
'standard':'true',
|
||||
'search':'true'
|
||||
@@ -316,7 +316,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
<input name="validarMotivo" id="validacaoMotivoSubstituicao" value="substituição" type="radio" />
|
||||
<input name="validarMotivo" id="validacaoMotivoSubstituicao" value="substituicao" type="radio" />
|
||||
<span class="change-weight">Substituição</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -351,7 +351,7 @@
|
||||
Justicativa do motivo da Solicitação?
|
||||
</label>
|
||||
<span class="text-danger"><strong>*</strong></span>
|
||||
<textarea placeholder="Descreva o motivo para a solicitação da vaga"
|
||||
<textarea placeholder="Descreva o motivo para a solicita��o da vaga"
|
||||
class="form-control requiredInput" rows="3" id="justificativa" name="justificativa"></textarea>
|
||||
<p class="text-danger text-error">
|
||||
Preenchimento obrigatório.
|
||||
@@ -484,7 +484,6 @@
|
||||
<th style="width: 20%;">Nome do candidato</th>
|
||||
<th style="width: 20%;">Telefone</th>
|
||||
<th style="width: 25%;">Email</th>
|
||||
<th style="width: 5%;">Aprovado</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -498,9 +497,6 @@
|
||||
<td class="fs-v-align-top fs-text-center">
|
||||
<input type="email" class="form-control" name="email" style="width: 150px;">
|
||||
</td>
|
||||
<td class="fs-v-align-top fs-text-center">
|
||||
<input type="checkbox" name="aprovado">
|
||||
</td>
|
||||
<td class="fs-v-align-top fs-text-center">
|
||||
<button type="button" class="btn btn-danger btn-sm remover-linha"
|
||||
onclick="removeLinhaComAnexo(this)">Remover</button>
|
||||
@@ -509,6 +505,62 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<br />
|
||||
<h6>
|
||||
Checklist de Início.
|
||||
</h6>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-2 col-xs-6">
|
||||
<label for="datainiciotrabalho"> Data de início</label>
|
||||
<input type="date" name="datainiciotrabalho" id="datainiciotrabalho" class="form-control">
|
||||
</div>
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label>Qual o Kit vai ser utilizado?</label>
|
||||
<span class="text-danger"><strong>*</strong></span><br>
|
||||
<div>
|
||||
<label>
|
||||
<input name="itensinicio" id="itensback" value="backoffice" type="radio">
|
||||
<span class="change-weight">Kit Backoffice (Notebook, mouse, teclado e headset).</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
<input name="itensinicio" id="itensamg" value="amg" type="radio">
|
||||
<span class="change-weight">Kit AMG (Notebook, Kit mouse e teclado, headset e telefone
|
||||
coporativo).</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
<input name="itensinicio" id="itenscomercial" value="comercial" type="radio">
|
||||
<span class="change-weight">Kit Comercial (Mobshop e Mobpin).</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label>Fardamento pronto para ser entregue?</label>
|
||||
<span class="text-danger"><strong>*</strong></span><br>
|
||||
<div>
|
||||
<label>
|
||||
<input name="fardamentoPronto" id="fardamentoprontosim" value="pronto" type="radio">
|
||||
<span class="change-weight">Sim</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
<input name="fardamentoPronto" id="fardamentoprontonao" value="faltando" type="radio">
|
||||
<span class="change-weight">Não</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justificativa-activity-6">
|
||||
<div class="form-field">
|
||||
@@ -525,96 +577,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activity activity-31">
|
||||
<div>
|
||||
<br />
|
||||
<h2>
|
||||
<i class="flaticon flaticon-edit-square" aria-hidden="true"></i>
|
||||
Cheklist de Início das atividades
|
||||
</h2>
|
||||
<h6>
|
||||
Checklist de Início.
|
||||
</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 comunicação
|
||||
</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="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="readonly">
|
||||
</div>
|
||||
<div class="form-group col-md-2 col-xs-6">
|
||||
<label for="datainiciotrabalho"> Data de início</label>
|
||||
<input type="date" name="datainiciotrabalho" id="datainiciotrabalho" class="form-control">
|
||||
</div>
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label>Qual o Kit vai ser utilizado?</label>
|
||||
<span class="text-danger"><strong>*</strong></span><br>
|
||||
<div>
|
||||
<label>
|
||||
<input name="itensinicio" id="itensback" value="backoffice" type="radio">
|
||||
<span class="change-weight">Kit Backoffice (Notebook, mouse, teclado e headset).</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
<input name="itensinicio" id="itensamg" value="amg" type="radio">
|
||||
<span class="change-weight">Kit AMG (Notebook, Kit mouse e teclado, headset e telefone
|
||||
coporativo).</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
<input name="itensinicio" id="itenscomercial" value="comercial" type="radio">
|
||||
<span class="change-weight">Kit Comercial (Mobshop e Mobpin).</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-10 col-xs-6">
|
||||
<label>Fardamento pronto para ser entregue?</label>
|
||||
<span class="text-danger"><strong>*</strong></span><br>
|
||||
<div>
|
||||
<label>
|
||||
<input name="fardamentoPronto" id="fardamentoprontosim" value="pronto" type="radio">
|
||||
<span class="change-weight">Sim</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label>
|
||||
<input name="fardamentoPronto" id="fardamentoprontonao" value="faltando" type="radio">
|
||||
<span class="change-weight">Não</span>
|
||||
</label>
|
||||
</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 </label>
|
||||
<textarea placeholder="Insira suas considerações" class="form-control" rows="3"
|
||||
id="consideracoesCompras" name="consideracoesCompras" value=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activity activity-24">
|
||||
<div>
|
||||
<br />
|
||||
|
||||
@@ -1,235 +1,235 @@
|
||||
$(document).ready(function () {
|
||||
if ($("#formMode").val() == "VIEW") {
|
||||
showAndBlock(["all"]);
|
||||
$(".ratingAction").hide();
|
||||
if ($("input[name=situacaoResolvida]:checked").val() == "sim") {
|
||||
$(".ratingAction").show();
|
||||
}
|
||||
let ratingValue;
|
||||
if ($("#ratingValue").val() == "" || $("#ratingValue").val() == 0) {
|
||||
ratingValue = 0;
|
||||
} else {
|
||||
ratingValue = $("#ratingValue").val();
|
||||
}
|
||||
let html = "";
|
||||
for (let i = 0; i < 5; i++) {
|
||||
if (i < ratingValue) {
|
||||
html +=
|
||||
'<i class="flaticon flaticon-star-active icon-md" aria-hidden="true"></i>';
|
||||
} else {
|
||||
html +=
|
||||
'<i class="flaticon flaticon-star icon-md" aria-hidden="true"></i>';
|
||||
}
|
||||
}
|
||||
console.log(html);
|
||||
$(".minha-avaliacao").html(html);
|
||||
} else {
|
||||
//show the right fields
|
||||
var activity = $("#activity").val();
|
||||
var requestDate = getCurrentDate();
|
||||
var ratingStars;
|
||||
var servicoNaoValidado =
|
||||
$("input[name=situacaoResolvida]:checked").val() == "nao";
|
||||
// $(document).ready(function () {
|
||||
// if ($("#formMode").val() == "VIEW") {
|
||||
// showAndBlock(["all"]);
|
||||
// $(".ratingAction").hide();
|
||||
// if ($("input[name=situacaoResolvida]:checked").val() == "sim") {
|
||||
// $(".ratingAction").show();
|
||||
// }
|
||||
// let ratingValue;
|
||||
// if ($("#ratingValue").val() == "" || $("#ratingValue").val() == 0) {
|
||||
// ratingValue = 0;
|
||||
// } else {
|
||||
// ratingValue = $("#ratingValue").val();
|
||||
// }
|
||||
// let html = "";
|
||||
// for (let i = 0; i < 5; i++) {
|
||||
// if (i < ratingValue) {
|
||||
// html +=
|
||||
// '<i class="flaticon flaticon-star-active icon-md" aria-hidden="true"></i>';
|
||||
// } else {
|
||||
// html +=
|
||||
// '<i class="flaticon flaticon-star icon-md" aria-hidden="true"></i>';
|
||||
// }
|
||||
// }
|
||||
// console.log(html);
|
||||
// $(".minha-avaliacao").html(html);
|
||||
// } else {
|
||||
// //show the right fields
|
||||
// var activity = $("#activity").val();
|
||||
// var requestDate = getCurrentDate();
|
||||
// var ratingStars;
|
||||
// var servicoNaoValidado =
|
||||
// $("input[name=situacaoResolvida]:checked").val() == "nao";
|
||||
|
||||
$(".activity").hide();
|
||||
// $(".activity").hide();
|
||||
|
||||
$(".activity-" + activity).show();
|
||||
// $(".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 (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();
|
||||
// if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
// $(".justificativa-activity-4").hide();
|
||||
// }
|
||||
// updt_line();
|
||||
|
||||
} else if (activity == 57) {
|
||||
$("#userValidacao").val($("#currentUserName").val());
|
||||
$("#dataUserValidacao").val(
|
||||
requestDate[0] + " - " + requestDate[1]
|
||||
);
|
||||
if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
$(".justificativa-activity-4").hide();
|
||||
}
|
||||
if ($("#justificativaDecisaoCompras").val() == "") {
|
||||
$(".justificativa-activity-6").hide();
|
||||
}
|
||||
showAndBlock([0, 4, 6, 31, 24, 18]);
|
||||
// } else if (activity == 57) {
|
||||
// $("#userValidacao").val($("#currentUserName").val());
|
||||
// $("#dataUserValidacao").val(
|
||||
// requestDate[0] + " - " + requestDate[1]
|
||||
// );
|
||||
// if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
// $(".justificativa-activity-4").hide();
|
||||
// }
|
||||
// if ($("#justificativaDecisaoCompras").val() == "") {
|
||||
// $(".justificativa-activity-6").hide();
|
||||
// }
|
||||
// showAndBlock([0, 4, 6, 31, 24, 18]);
|
||||
|
||||
let ratingValue;
|
||||
if ($("#ratingValue").val() == "" || $("#ratingValue").val() == 0) {
|
||||
ratingValue = 0;
|
||||
} else {
|
||||
ratingValue = $("#ratingValue").val();
|
||||
}
|
||||
ratingStars = FLUIGC.stars(".minha-avaliacao", {
|
||||
stars: 5,
|
||||
value: ratingValue,
|
||||
sizeClass: "icon-md",
|
||||
});
|
||||
ratingStars.on("click", (obj) => {
|
||||
let countCurrentRating = 0;
|
||||
$(".fluigicon-star").each(() => {
|
||||
countCurrentRating++;
|
||||
});
|
||||
$("#ratingValue").val(countCurrentRating);
|
||||
});
|
||||
$("input[name=consegueResolver]").on("change", function () {
|
||||
$(".consegueResolverMotivo").hide();
|
||||
if ($(`input[name=${$(this).attr("name")}]:checked`).val() == "nao")
|
||||
$(".consegueResolverMotivo").show();
|
||||
});
|
||||
$("input[name=consegueResolver]").trigger("change");
|
||||
// let ratingValue;
|
||||
// if ($("#ratingValue").val() == "" || $("#ratingValue").val() == 0) {
|
||||
// ratingValue = 0;
|
||||
// } else {
|
||||
// ratingValue = $("#ratingValue").val();
|
||||
// }
|
||||
// ratingStars = FLUIGC.stars(".minha-avaliacao", {
|
||||
// stars: 5,
|
||||
// value: ratingValue,
|
||||
// sizeClass: "icon-md",
|
||||
// });
|
||||
// ratingStars.on("click", (obj) => {
|
||||
// let countCurrentRating = 0;
|
||||
// $(".fluigicon-star").each(() => {
|
||||
// countCurrentRating++;
|
||||
// });
|
||||
// $("#ratingValue").val(countCurrentRating);
|
||||
// });
|
||||
// $("input[name=consegueResolver]").on("change", function () {
|
||||
// $(".consegueResolverMotivo").hide();
|
||||
// if ($(`input[name=${$(this).attr("name")}]:checked`).val() == "nao")
|
||||
// $(".consegueResolverMotivo").show();
|
||||
// });
|
||||
// $("input[name=consegueResolver]").trigger("change");
|
||||
|
||||
$("input[name=situacaoResolvida]").on("change", function () {
|
||||
$(".explainAction, .ratingAction").hide();
|
||||
if ($("input[name=situacaoResolvida]:checked").val() == "nao") {
|
||||
$(".explainAction").show();
|
||||
} else if (
|
||||
$("input[name=situacaoResolvida]:checked").val() == "sim"
|
||||
) {
|
||||
$(".ratingAction").show();
|
||||
}
|
||||
});
|
||||
$("input[name=situacaoResolvida]").trigger("change");
|
||||
// $("input[name=situacaoResolvida]").on("change", function () {
|
||||
// $(".explainAction, .ratingAction").hide();
|
||||
// if ($("input[name=situacaoResolvida]:checked").val() == "nao") {
|
||||
// $(".explainAction").show();
|
||||
// } else if (
|
||||
// $("input[name=situacaoResolvida]:checked").val() == "sim"
|
||||
// ) {
|
||||
// $(".ratingAction").show();
|
||||
// }
|
||||
// });
|
||||
// $("input[name=situacaoResolvida]").trigger("change");
|
||||
|
||||
updt_line();
|
||||
// updt_line();
|
||||
|
||||
} else if (activity == 31) {
|
||||
$("#userRealizacaoCompras").val($("#currentUserName").val());
|
||||
$("#dataRealizacaoCompras").val(
|
||||
requestDate[0] + " - " + requestDate[1]
|
||||
);
|
||||
showAndBlock([0, 4, 6]);
|
||||
// } else if (activity == 31) {
|
||||
// $("#userRealizacaoCompras").val($("#currentUserName").val());
|
||||
// $("#dataRealizacaoCompras").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 == 18) {
|
||||
if ($("justificativaValidaProblema") != "") {
|
||||
showAndBlock([0, 4, 6, 24, 31]);
|
||||
} else {
|
||||
showAndBlock([0, 4, 6, 31]);
|
||||
}
|
||||
$("#userValidacaofunc").val($("#currentUserName").val());
|
||||
$("#dataValidacaofunc").val(requestDate[0] + " - " + requestDate[1]);
|
||||
// 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, 31]);
|
||||
// } else {
|
||||
// showAndBlock([0, 4, 6, 31]);
|
||||
// }
|
||||
// $("#userValidacaofunc").val($("#currentUserName").val());
|
||||
// $("#dataValidacaofunc").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();
|
||||
}
|
||||
// if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
// $(".justificativa-activity-4").hide();
|
||||
// }
|
||||
// if ($("#justificativaDecisaoCompras").val() == "") {
|
||||
// $(".justificativa-activity-6").hide();
|
||||
// }
|
||||
// if ($("#consideracoesCompras").val() == "") {
|
||||
// $(".justificativa-activity-31").hide();
|
||||
// }
|
||||
|
||||
$("input[name=validacaoFunc]").on("change", function () {
|
||||
$(".justificativaDecisaoFunc").hide();
|
||||
if (
|
||||
$("input[name=validacaoFunc]:checked").val() == "incorreto" ||
|
||||
$("input[name=validacaoFunc]:checked").val() == "naoEntregue"
|
||||
) {
|
||||
$(".justificativaDecisaoFunc").show();
|
||||
}
|
||||
});
|
||||
$("input[name=validacaoFunc]").trigger("change");
|
||||
// $("input[name=validacaoFunc]").on("change", function () {
|
||||
// $(".justificativaDecisaoFunc").hide();
|
||||
// if (
|
||||
// $("input[name=validacaoFunc]:checked").val() == "incorreto" ||
|
||||
// $("input[name=validacaoFunc]:checked").val() == "naoEntregue"
|
||||
// ) {
|
||||
// $(".justificativaDecisaoFunc").show();
|
||||
// }
|
||||
// });
|
||||
// $("input[name=validacaoFunc]").trigger("change");
|
||||
|
||||
updt_line();
|
||||
} else if (activity == 24) {
|
||||
showAndBlock([0, 4, 6, 31]);
|
||||
$("#userValidacaoItens").val($("#currentUserName").val());
|
||||
$("#dataValidacaoItens").val(requestDate[0] + " - " + requestDate[1]);
|
||||
// updt_line();
|
||||
// } else if (activity == 24) {
|
||||
// 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();
|
||||
}
|
||||
updt_line();
|
||||
} else if (activity == 114) {
|
||||
showAndBlock([0, 4, 6, 31, 24, 57, 18]);
|
||||
$("#userValidacaoCorre").val($("#currentUserName").val());
|
||||
$("#dataValidacaoCorre").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();
|
||||
// }
|
||||
// updt_line();
|
||||
// } else if (activity == 114) {
|
||||
// showAndBlock([0, 4, 6, 31, 24, 57, 18]);
|
||||
// $("#userValidacaoCorre").val($("#currentUserName").val());
|
||||
// $("#dataValidacaoCorre").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();
|
||||
}
|
||||
// if ($("#justificativaDecisaoGestor").val() == "") {
|
||||
// $(".justificativa-activity-4").hide();
|
||||
// }
|
||||
// if ($("#justificativaDecisaoCompras").val() == "") {
|
||||
// $(".justificativa-activity-6").hide();
|
||||
// }
|
||||
// if ($("#consideracoesCompras").val() == "") {
|
||||
// $(".justificativa-activity-31").hide();
|
||||
// }
|
||||
|
||||
$("input[name=validacaoCorre]").on("change", function () {
|
||||
$(".justificativaDecisaoCorre").hide();
|
||||
if (
|
||||
$("input[name=validacaoCorre]:checked").val() == "entregue" ||
|
||||
$("input[name=validacaoCorre]:checked").val() == "naoEntregue"
|
||||
) {
|
||||
$(".justificativaDecisaoCorre").show();
|
||||
}
|
||||
});
|
||||
$("input[name=validacaoCorre]").trigger("change");
|
||||
// $("input[name=validacaoCorre]").on("change", function () {
|
||||
// $(".justificativaDecisaoCorre").hide();
|
||||
// if (
|
||||
// $("input[name=validacaoCorre]:checked").val() == "entregue" ||
|
||||
// $("input[name=validacaoCorre]:checked").val() == "naoEntregue"
|
||||
// ) {
|
||||
// $(".justificativaDecisaoCorre").show();
|
||||
// }
|
||||
// });
|
||||
// $("input[name=validacaoCorre]").trigger("change");
|
||||
|
||||
updt_line();
|
||||
}
|
||||
}
|
||||
// updt_line();
|
||||
// }
|
||||
// }
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
|
||||
|
||||
//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;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// //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();
|
||||
@@ -348,17 +348,17 @@ function setSelectedZoomItem(selectedItem) {
|
||||
null
|
||||
).values;
|
||||
|
||||
var nomeGestorComercialBA = dtsCentroCusto[1].gestorCentroCusto;
|
||||
var emailGestorComercialBA = dtsCentroCusto[1].emailGestor;
|
||||
var idGestorComercialBA = dtsCentroCusto[1].idGestor;
|
||||
var nomeGestorComercialBA = dtsCentroCusto[0].gestorCentroCusto;
|
||||
var emailGestorComercialBA = dtsCentroCusto[0].emailGestor;
|
||||
var idGestorComercialBA = dtsCentroCusto[0].idGestor;
|
||||
|
||||
var nomeGestorComercialSE = dtsCentroCusto[2].gestorCentroCusto;
|
||||
var emailGestorComercialSE = dtsCentroCusto[2].emailGestor;
|
||||
var idGestorComercialSE = dtsCentroCusto[2].idGestor;
|
||||
var nomeGestorComercialSE = dtsCentroCusto[1].gestorCentroCusto;
|
||||
var emailGestorComercialSE = dtsCentroCusto[1].emailGestor;
|
||||
var idGestorComercialSE = dtsCentroCusto[1].idGestor;
|
||||
|
||||
var nomeGestorComercialAL = dtsCentroCusto[3].gestorCentroCusto;
|
||||
var emailGestorComercialAL = dtsCentroCusto[3].emailGestor;
|
||||
var idGestorComercialAL = dtsCentroCusto[3].idGestor;
|
||||
var nomeGestorComercialAL = dtsCentroCusto[2].gestorCentroCusto;
|
||||
var emailGestorComercialAL = dtsCentroCusto[2].emailGestor;
|
||||
var idGestorComercialAL = dtsCentroCusto[2].idGestor;
|
||||
|
||||
|
||||
if (name_item == "estabelecimento") {
|
||||
|
||||
Reference in New Issue
Block a user