att
This commit is contained in:
parent
2bbc71eee2
commit
20ae0d1f2f
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
@ -0,0 +1,706 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<java version="1.8.0_202" class="java.beans.XMLDecoder">
|
||||
<object class="java.util.HashMap">
|
||||
<void method="put">
|
||||
<string>volume</string>
|
||||
<array class="java.lang.String" length="1">
|
||||
<void index="0">
|
||||
<string>Default</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void method="put">
|
||||
<string>expediente</string>
|
||||
<array class="java.lang.String" length="4">
|
||||
<void index="0">
|
||||
<string>Default</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Expediente BackOffice, Logística e Motorista</string>
|
||||
</void>
|
||||
<void index="2">
|
||||
<string>Expediente Escritório Matriz</string>
|
||||
</void>
|
||||
<void index="3">
|
||||
<string>Expediente Lojas</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void method="put">
|
||||
<string>mecanismo</string>
|
||||
<array class="[Ljava.lang.Object;" length="12">
|
||||
<void index="0">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>Atribuição por Associação</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Associado</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="1">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>Atribuição por Campo de Formulário</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Campo Formulário</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="2">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>dpf_di_emp_filial_filtro</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>dpf_di_emp_filial_filtro</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="3">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>dpf_di_inicio_diadmissao</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>dpf_di_inicio_diadmissao</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="4">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>Atribuição por Executor de Atividade</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Executor Atividade</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="5">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>Atribuição por Grupo</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Grupo</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="6">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>Atribuição por Grupos do Colaborador</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Grupos Colaborador</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="7">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>mecCustomAprov</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>mecCustomAprov</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="8">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>Atribuição por Papel</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Papel</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="9">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>Atribuição para um Grupo</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Pool Grupo</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="10">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>Atribuição para um Papel</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Pool Papel</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void index="11">
|
||||
<array class="java.lang.Object" length="2">
|
||||
<void index="0">
|
||||
<string>Atribuição por Usuário</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Usuário</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void method="put">
|
||||
<string>forms</string>
|
||||
<object class="java.util.LinkedList">
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>FLUIGADHOC</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>FLUIGADHOC</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>3</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>FLUIGADHOCPROCESS</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>FLUIGADHOCPROCESS</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>4</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>totvsflow_dataset_tipo_ocorrencia</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>totvsflow_dataset_tipo_ocorrencia</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>14</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>totvsflow_abertura_chamado</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>totvsflow_abertura_chamado</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>15</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>DSFormulariodeAberturadechamado</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Formulário de Abertura de chamado</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>20</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>Abertura_de_chamados</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Solicitação de abertura de chamados</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>21</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>DSvistoriadeServico</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>vistoriadeServico</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>24</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>DSFormulariodeReservadesala</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Formulário de Reserva de sala</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>34</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>totvsflow_dataset_centrocusto</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>totvsflow_dataset_centrocusto</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>103</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>totvsflow_dataset_cadastro_item</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>totvsflow_dataset_cadastro_item</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>104</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>totvsflow_dataset_estabelecimento</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>totvsflow_dataset_estabelecimento</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>105</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>totvsflow_solicitacao_compras</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>totvsflow_solicitacao_compras</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>165</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>aberturadechamado_manutencao</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>aberturadechamado_manutencao</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>400</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>Solicitacao_transferencia</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Solicitacao_transferencia</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>590</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>recrutamento</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>recrutamento</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>823</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>kit_aniversariantes</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Aniversariantes</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>7690</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>kit_cardapio</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Cardápio do Dia</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>7695</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>kit_convenios</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Convênios</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>7703</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>kit_news</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Notícias</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>7709</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>compras_digital</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>compras_digital</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9305</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_di_formulario_processo_admissao</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Formulario_Processo_Admissao_Protheus</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9626</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_cadastro_status</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Status</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9627</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_configuracoes</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Configuracoes</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9628</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_cadastro_jornada</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Jornada</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9629</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_tipo_documento</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Tipo_Documento</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9630</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_dataset</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Dataset</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9631</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_di_configuracao</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Configuracoes</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9632</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_di_beneficio</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Beneficios</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9633</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_di_compl_contrato</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Comp_Contrato</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9634</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_di_funcao_jornada</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Funcao_Jornada</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9635</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_dataset_estrutura</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Dataset_Estrutura</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9636</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_grupo_tipo_contrato</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Grupo_Tipo_Contrato</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9637</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_tipo_contrato</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Tipo_Contrato</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9638</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_di_traducao_campo_valor</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Traducao_Campo_Valor</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9639</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_di_restricoes_cpf</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Formulario_Restricao_CPF</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9640</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_di_compl_vt</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Compl_VT</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9641</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>dpf_di_traducao_campo</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>Digte_Public_Form_Di_Traducao_Campo</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>9995</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>desligamento</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>desligamento</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>12959</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>checklist</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>checklist</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>40213</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>totvsflow_lancamento_documento</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>totvsflow_lancamento_documento</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>41254</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>transferenciav2</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>transferência</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>43582</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.technology.ecmrestclient.cardindexpublisher.FormVO">
|
||||
<void property="datasetName">
|
||||
<string>desligamentov2</string>
|
||||
</void>
|
||||
<void property="documentDescription">
|
||||
<string>desligamentov2</string>
|
||||
</void>
|
||||
<void property="documentId">
|
||||
<int>46963</int>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
</object>
|
||||
</java>
|
||||
@ -0,0 +1,729 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<java version="1.8.0_202" class="java.beans.XMLDecoder">
|
||||
<object class="java.util.HashMap">
|
||||
<void method="put">
|
||||
<string>mecanismoGrupo</string>
|
||||
<object class="java.util.ArrayList">
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>Tecnologia e Comunicação</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>TIC</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>Compras Indiretos</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>ComprasIndiretos</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>Obras e manutenção</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>Manutencao</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>Aprovadores Compras Nvl 3</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>AprovadoresComprasNvl3</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>Motoristas</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>Motoristas</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>Requisitantes de Vaga</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>Requisitantesdevaga</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>Recrutamento</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>Recrutamento</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>TODOS-TODOS-DIADMISSAO</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>TODOS-TODOS-DIADMISSAO</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>ResponsavelDesligamento</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>ResponsavelDesligamento</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>GENTE & CULTURA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>GENTE_CULTURA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>LOJA AL</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>LOJA_AL</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>CD</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>CD</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>ESPAÇO DO REVENDEDOR AL</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>ESPACO_DO_REVENDEDOR_AL</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>FINANCEIRO</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>FINANCEIRO</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>OPERAÇÕES</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>OPERACOES</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>AMG AL</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>AMG_AL</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>REGIONAL ALAGOAS</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>REGIONAL_ALAGOAS</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>PREVENÇÃO DE PERDA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>PREVENCAO_DE_PERDA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>MARKETING, TREINAMENTO</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>MARKETING_TREINAMENTO</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>SECRETARIA EXECUTIVA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>SECRETARIA_EXECUTIVA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>DIRETORIA EXECUTIVA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>DIRETORIA_EXECUTIVA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>INFRAESTRUTURA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>INFRAESTRUTURA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>ESPAÇO DO REVENDEDOR BA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>ESPACO_DO_REVENDEDOR_BA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>BUSINESS INTELLIGENCE</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>BUSINESS_INTELLIGENCE</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>DEPARTAMENTO PESSOAL</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>DEPARTAMENTO_PESSOAL</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>LOJA BA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>LOJA_BA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>TREINAMENTO</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>TREINAMENTO</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>AMG BA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>AMG_BA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>MARKETING</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>MARKETING</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>COMPRAS</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>COMPRAS</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>AMG SE</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>AMG_SE</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>LOJA SE</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>LOJA_SE</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>ESPAÇO DO REVENDEDOR SE</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>ESPACO_DO_REVENDEDOR_SE</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>VENDAS IN COMPANY</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>VENDAS_IN_COMPANY</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>REGIONAL BAHIA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>REGIONAL_BAHIA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>CANAL LOJA 01</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>CANAL_LOJA_01</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>AUDITORIA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>AUDITORIA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>CANAL LOJA 02</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>CANAL_LOJA_02</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>PLANEJAMENTO DE DEMANDAS</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>PLANEJAMENTO_DE_DEMANDAS</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>PROJETOS</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>PROJETOS</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>COMPLIANCE</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>COMPLIANCE</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>ESCRITÓRIO - MATRIZ</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>ESCRITORIO_MATRIZ</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>ESCRITÓRIO - CONQUISTA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>ESCRITORIO_CONQUISTA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>REGIONAL SERGIPE</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>REGIONAL_SERGIPE</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>Transferencia</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>Transferencia</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>Fiscal</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>Fiscal</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>motoristaAL</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>motoristaAL</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>motoristaBA</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>motoristaBA</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="add">
|
||||
<object class="com.totvs.tds.ecm.foundation.ws.GroupDto">
|
||||
<void property="groupDescription">
|
||||
<string>motoristaSE</string>
|
||||
</void>
|
||||
<void property="groupId">
|
||||
<string>motoristaSE</string>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
</object>
|
||||
</void>
|
||||
<void method="put">
|
||||
<string>expediente</string>
|
||||
<array class="java.lang.String" length="4">
|
||||
<void index="0">
|
||||
<string>Default</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>Expediente BackOffice, Logística e Motorista</string>
|
||||
</void>
|
||||
<void index="2">
|
||||
<string>Expediente Escritório Matriz</string>
|
||||
</void>
|
||||
<void index="3">
|
||||
<string>Expediente Lojas</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
<void method="put">
|
||||
<string>camposFormulario, documentoId = 43582</string>
|
||||
<array class="java.lang.String" length="69">
|
||||
<void index="0">
|
||||
<string>activity</string>
|
||||
</void>
|
||||
<void index="1">
|
||||
<string>analistasup</string>
|
||||
</void>
|
||||
<void index="2">
|
||||
<string>categoriaItem</string>
|
||||
</void>
|
||||
<void index="3">
|
||||
<string>centroCusto</string>
|
||||
</void>
|
||||
<void index="4">
|
||||
<string>chaveNfe</string>
|
||||
</void>
|
||||
<void index="5">
|
||||
<string>codigoItem</string>
|
||||
</void>
|
||||
<void index="6">
|
||||
<string>codigoProdutoItem</string>
|
||||
</void>
|
||||
<void index="7">
|
||||
<string>currentUserId</string>
|
||||
</void>
|
||||
<void index="8">
|
||||
<string>currentUsermail</string>
|
||||
</void>
|
||||
<void index="9">
|
||||
<string>currentUserName</string>
|
||||
</void>
|
||||
<void index="10">
|
||||
<string>dataAbertura</string>
|
||||
</void>
|
||||
<void index="11">
|
||||
<string>dataColeta</string>
|
||||
</void>
|
||||
<void index="12">
|
||||
<string>dataEmissaoApiNfe</string>
|
||||
</void>
|
||||
<void index="13">
|
||||
<string>dataEmissaoNfe</string>
|
||||
</void>
|
||||
<void index="14">
|
||||
<string>dataEntradaNfeConsulta</string>
|
||||
</void>
|
||||
<void index="15">
|
||||
<string>dataEntrega</string>
|
||||
</void>
|
||||
<void index="16">
|
||||
<string>dataValidacaoGestor</string>
|
||||
</void>
|
||||
<void index="17">
|
||||
<string>descAnexo_PlanilhaItens</string>
|
||||
</void>
|
||||
<void index="18">
|
||||
<string>descricao</string>
|
||||
</void>
|
||||
<void index="19">
|
||||
<string>emailSolicitante</string>
|
||||
</void>
|
||||
<void index="20">
|
||||
<string>estabelecimento</string>
|
||||
</void>
|
||||
<void index="21">
|
||||
<string>excelUpload</string>
|
||||
</void>
|
||||
<void index="22">
|
||||
<string>fdAnexo_Coleta</string>
|
||||
</void>
|
||||
<void index="23">
|
||||
<string>fdAnexo_Entrega</string>
|
||||
</void>
|
||||
<void index="24">
|
||||
<string>fdAnexo_recebimento</string>
|
||||
</void>
|
||||
<void index="25">
|
||||
<string>fnAnexo_Nfe</string>
|
||||
</void>
|
||||
<void index="26">
|
||||
<string>fnAnexo_PlanilhaItens</string>
|
||||
</void>
|
||||
<void index="27">
|
||||
<string>formMode</string>
|
||||
</void>
|
||||
<void index="28">
|
||||
<string>fornecedorNfeConsulta</string>
|
||||
</void>
|
||||
<void index="29">
|
||||
<string>gestorEmail</string>
|
||||
</void>
|
||||
<void index="30">
|
||||
<string>gestorEmailE</string>
|
||||
</void>
|
||||
<void index="31">
|
||||
<string>gestorNome</string>
|
||||
</void>
|
||||
<void index="32">
|
||||
<string>gestorNomeE</string>
|
||||
</void>
|
||||
<void index="33">
|
||||
<string>gestor_cc</string>
|
||||
</void>
|
||||
<void index="34">
|
||||
<string>gestor_cce</string>
|
||||
</void>
|
||||
<void index="35">
|
||||
<string>invoiceIdNfeConsulta</string>
|
||||
</void>
|
||||
<void index="36">
|
||||
<string>itensNfeConsulta</string>
|
||||
</void>
|
||||
<void index="37">
|
||||
<string>itensNfeJson</string>
|
||||
</void>
|
||||
<void index="38">
|
||||
<string>justificativa</string>
|
||||
</void>
|
||||
<void index="39">
|
||||
<string>justificativaDecisaoGestor</string>
|
||||
</void>
|
||||
<void index="40">
|
||||
<string>justificativaDecisaoItens</string>
|
||||
</void>
|
||||
<void index="41">
|
||||
<string>lojaNfeConsulta</string>
|
||||
</void>
|
||||
<void index="42">
|
||||
<string>motoristaColetaLogin</string>
|
||||
</void>
|
||||
<void index="43">
|
||||
<string>motoristaColetaNome</string>
|
||||
</void>
|
||||
<void index="44">
|
||||
<string>motoristaEntregaLogin</string>
|
||||
</void>
|
||||
<void index="45">
|
||||
<string>motoristaEntregaNome</string>
|
||||
</void>
|
||||
<void index="46">
|
||||
<string>motoristaEntregaSelecionado</string>
|
||||
</void>
|
||||
<void index="47">
|
||||
<string>nomerecebedor</string>
|
||||
</void>
|
||||
<void index="48">
|
||||
<string>numeroNfeConsulta</string>
|
||||
</void>
|
||||
<void index="49">
|
||||
<string>operacaoNfeConsulta</string>
|
||||
</void>
|
||||
<void index="50">
|
||||
<string>productIdItem</string>
|
||||
</void>
|
||||
<void index="51">
|
||||
<string>qtdDivergenciasGestor</string>
|
||||
</void>
|
||||
<void index="52">
|
||||
<string>qtdDivergenciasNfe</string>
|
||||
</void>
|
||||
<void index="53">
|
||||
<string>quantidadeAprovadaGestor</string>
|
||||
</void>
|
||||
<void index="54">
|
||||
<string>quantidadeItem</string>
|
||||
</void>
|
||||
<void index="55">
|
||||
<string>requesterId</string>
|
||||
</void>
|
||||
<void index="56">
|
||||
<string>requesterMail</string>
|
||||
</void>
|
||||
<void index="57">
|
||||
<string>requesterName</string>
|
||||
</void>
|
||||
<void index="58">
|
||||
<string>serieNfeConsulta</string>
|
||||
</void>
|
||||
<void index="59">
|
||||
<string>situacaoNfeConsulta</string>
|
||||
</void>
|
||||
<void index="60">
|
||||
<string>storeIdNfeConsulta</string>
|
||||
</void>
|
||||
<void index="61">
|
||||
<string>tipoMotoristaEntrega</string>
|
||||
</void>
|
||||
<void index="62">
|
||||
<string>ufDestino</string>
|
||||
</void>
|
||||
<void index="63">
|
||||
<string>ufOrigem</string>
|
||||
</void>
|
||||
<void index="64">
|
||||
<string>userValidacaoGestor</string>
|
||||
</void>
|
||||
<void index="65">
|
||||
<string>usuarioEmissorNfe</string>
|
||||
</void>
|
||||
<void index="66">
|
||||
<string>validacaoItens</string>
|
||||
</void>
|
||||
<void index="67">
|
||||
<string>valorNfeConsulta</string>
|
||||
</void>
|
||||
<void index="68">
|
||||
<string>WKNumProces</string>
|
||||
</void>
|
||||
</array>
|
||||
</void>
|
||||
</object>
|
||||
</java>
|
||||
4
compras_digital/.vscode/servers.json
vendored
4
compras_digital/.vscode/servers.json
vendored
@ -2,13 +2,13 @@
|
||||
"version": "1.0.0",
|
||||
"configurations": [
|
||||
{
|
||||
"id": "uyzzp0mq8qomoutcaz19tssb58lcc7",
|
||||
"id": "o9cixezp329movgapv2risawf8wvym",
|
||||
"name": "Ginseng Produção",
|
||||
"host": "comerciode188006.fluig.cloudtotvs.com.br",
|
||||
"ssl": true,
|
||||
"port": 443,
|
||||
"username": "andrey.cunha",
|
||||
"password": "eyJpdiI6IjAyMjdkMjdmZDI1NTczYzFkZmUwMGU4ZWExMWRjZTBmIiwic2FsdCI6ImExMjJlYjdiZDA0MmM3ZGUzYjU3Y2I4YWU4NTUwYzE5IiwidGV4dCI6ImQ2Y2Q4ZjFhNjk0MmQ0MGFhMjQ0NzhjMzExODhiZGQ2In0=",
|
||||
"password": "eyJpdiI6IjM5MGNhMzMwMWIyNWI2ZDMyYmVmM2FiNDg5NzQ3NzZhIiwic2FsdCI6ImU1ZWE3MDZhOWE0NGMyMjExNmE3NjIyYmRmZTdmMjNhIiwidGV4dCI6ImZkMTY4MTAwNjM0ZmQ3NmI5M2MwZjQ1YmE4NDJmMjRhIn0=",
|
||||
"userCode": "andrey.cunha",
|
||||
"confirmExporting": false,
|
||||
"hasBrowser": false,
|
||||
|
||||
@ -11,6 +11,7 @@ function createDataset(fields, constraints, sortFields) {
|
||||
dataset.addColumn("C8_TOTAL");
|
||||
dataset.addColumn("C8_FORNECE");
|
||||
dataset.addColumn("C8_LOJA");
|
||||
dataset.addColumn("C8_FORNOME");
|
||||
dataset.addColumn("C8_COND");
|
||||
dataset.addColumn("C8_NUMSC");
|
||||
dataset.addColumn("C8_ITEMSC");
|
||||
@ -32,7 +33,7 @@ function createDataset(fields, constraints, sortFields) {
|
||||
return [
|
||||
"", "", "", "", "", "", "", "", "", "", "",
|
||||
"", "", "", "", "", "", "", "", "", "", "",
|
||||
"", "", sucesso ? "true" : "false", erro || ""
|
||||
"", "", "", sucesso ? "true" : "false", erro || ""
|
||||
];
|
||||
}
|
||||
|
||||
@ -144,6 +145,7 @@ function createDataset(fields, constraints, sortFields) {
|
||||
item.C8_TOTAL || "",
|
||||
item.C8_FORNECE || "",
|
||||
item.C8_LOJA || "",
|
||||
item.C8_FORNOME || "",
|
||||
item.C8_COND || "",
|
||||
item.C8_NUMSC || "",
|
||||
item.C8_ITEMSC || "",
|
||||
|
||||
@ -24,9 +24,20 @@ function createDataset(fields, constraints, sortFields) {
|
||||
dataset.addColumn("sucesso");
|
||||
dataset.addColumn("COTACOES_JSON");
|
||||
dataset.addColumn("COTACAO_ERRO");
|
||||
dataset.addColumn("PEDIDO_JSON");
|
||||
dataset.addColumn("PEDIDO_ERRO");
|
||||
|
||||
function emptyRow() {
|
||||
return ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "false", "", ""];
|
||||
return ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "false", "", "", "", ""];
|
||||
}
|
||||
|
||||
function documentoValido(valor) {
|
||||
var v = String(valor || "").trim().toUpperCase();
|
||||
if (!v) return false;
|
||||
if (/^0+$/.test(v)) return false;
|
||||
if (/^X+$/.test(v)) return false;
|
||||
if (v == "XXXX" || v == "XXXXXX") return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function consultarCotacao(clientService, cotacao) {
|
||||
@ -80,6 +91,57 @@ function createDataset(fields, constraints, sortFields) {
|
||||
};
|
||||
}
|
||||
|
||||
function consultarPedido(clientService, pedido) {
|
||||
var endpoints = [
|
||||
"/UF_MATA120/" + pedido,
|
||||
"/rest/UF_MATA120/" + pedido,
|
||||
"/rest/uf_mata120/" + pedido
|
||||
];
|
||||
|
||||
var ultimoErro = "";
|
||||
for (var i = 0; i < endpoints.length; i++) {
|
||||
try {
|
||||
var dataPed = {
|
||||
companyId: "1",
|
||||
serviceCode: "Postprod",
|
||||
endpoint: endpoints[i],
|
||||
method: "get",
|
||||
timeoutService: "60000",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
};
|
||||
|
||||
var responsePed = clientService.invoke(JSON.stringify(dataPed));
|
||||
if (!responsePed || !responsePed.getResult()) {
|
||||
ultimoErro = "Sem resposta ao consultar pedido";
|
||||
continue;
|
||||
}
|
||||
|
||||
var resultPed = JSON.parse(responsePed.getResult());
|
||||
if (resultPed && resultPed.sucesso && resultPed.pedidos && resultPed.pedidos.length > 0) {
|
||||
return {
|
||||
sucesso: true,
|
||||
pedidos: resultPed.pedidos
|
||||
};
|
||||
}
|
||||
|
||||
if (resultPed && resultPed.message) {
|
||||
ultimoErro = String(resultPed.message);
|
||||
} else {
|
||||
ultimoErro = "Pedido sem itens retornados";
|
||||
}
|
||||
} catch (ePed) {
|
||||
ultimoErro = String(ePed);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
sucesso: false,
|
||||
erro: ultimoErro || "Falha ao consultar pedido"
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
var numeroSC = null;
|
||||
if (constraints != null) {
|
||||
@ -130,6 +192,18 @@ function createDataset(fields, constraints, sortFields) {
|
||||
}
|
||||
}
|
||||
|
||||
var pedido = String(sc.C1_PEDIDO || "").trim();
|
||||
var pedidoJson = "";
|
||||
var pedidoErro = "";
|
||||
if (documentoValido(pedido)) {
|
||||
var consultaPed = consultarPedido(clientService, pedido);
|
||||
if (consultaPed.sucesso) {
|
||||
pedidoJson = JSON.stringify(consultaPed.pedidos || []);
|
||||
} else {
|
||||
pedidoErro = consultaPed.erro || "";
|
||||
}
|
||||
}
|
||||
|
||||
dataset.addRow([
|
||||
sc.C1_FILIAL || "",
|
||||
sc.C1_NUM || "",
|
||||
@ -153,7 +227,9 @@ function createDataset(fields, constraints, sortFields) {
|
||||
result.hora_consulta || "",
|
||||
"true",
|
||||
cotacoesJson,
|
||||
cotacaoErro
|
||||
cotacaoErro,
|
||||
pedidoJson,
|
||||
pedidoErro
|
||||
]);
|
||||
} else {
|
||||
dataset.addRow(emptyRow());
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
|
||||
.sc-status-panel {
|
||||
margin-top: 15px;
|
||||
padding: 18px;
|
||||
padding: 10px;
|
||||
border: 1px solid #d8e1e8;
|
||||
border-radius: 12px;
|
||||
background: #f7fafc;
|
||||
@ -71,27 +71,27 @@
|
||||
.sc-primary-grid,
|
||||
.sc-secondary-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(220px, 1fr));
|
||||
gap: 12px;
|
||||
grid-template-columns: repeat(3, minmax(150px, 1fr));
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sc-primary-grid {
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.sc-secondary-grid {
|
||||
gap: 8px 12px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sc-info {
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 12px 14px;
|
||||
min-height: 72px;
|
||||
border-radius: 8px;
|
||||
padding: 8px 10px;
|
||||
min-height: 52px;
|
||||
}
|
||||
|
||||
.sc-info--primary {
|
||||
border-left: 4px solid #04506b;
|
||||
border-left: 3px solid #04506b;
|
||||
box-shadow: inset 0 0 0 1px #d9e4ec;
|
||||
}
|
||||
|
||||
@ -111,32 +111,39 @@
|
||||
}
|
||||
|
||||
.sc-label {
|
||||
font-size: 11px;
|
||||
font-size: 10px;
|
||||
color: #4d6073;
|
||||
letter-spacing: .04em;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.sc-value {
|
||||
font-size: 15px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #24313f;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.sc-info--primary .sc-value {
|
||||
font-size: 30px;
|
||||
line-height: 1.1;
|
||||
font-size: 13px;
|
||||
line-height: 1.25;
|
||||
color: #102a43;
|
||||
font-weight: 700;
|
||||
letter-spacing: .01em;
|
||||
}
|
||||
|
||||
.sc-info--secondary .sc-value {
|
||||
font-size: 13px;
|
||||
line-height: 1.25;
|
||||
color: #173750;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sc-hint {
|
||||
display: block;
|
||||
margin-top: 6px;
|
||||
font-size: 11px;
|
||||
margin-top: 4px;
|
||||
font-size: 10px;
|
||||
color: #5f7386;
|
||||
letter-spacing: .02em;
|
||||
}
|
||||
@ -144,14 +151,29 @@
|
||||
.sc-value.badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 30px;
|
||||
padding: 6px 12px;
|
||||
min-height: 24px;
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Exibe apenas texto (sem fundo) nos status resumidos */
|
||||
#statusSCProtheus_label,
|
||||
#statusSC_label,
|
||||
#cotacaoResultado_label {
|
||||
background: transparent !important;
|
||||
border-radius: 0 !important;
|
||||
min-height: 0 !important;
|
||||
padding: 0 !important;
|
||||
display: inline !important;
|
||||
font-size: 13px !important;
|
||||
font-weight: 700 !important;
|
||||
line-height: 1.25 !important;
|
||||
color: #1f3f56 !important;
|
||||
}
|
||||
|
||||
.sc-timeline-wrap {
|
||||
margin-top: 16px;
|
||||
padding-top: 0;
|
||||
@ -166,11 +188,25 @@
|
||||
.sc-timeline-wrap.is-open {
|
||||
padding-top: 14px;
|
||||
border-top-color: #d7e2eb;
|
||||
max-height: 640px;
|
||||
max-height: 3400px;
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.sc-timeline-layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.sc-timeline-panel {
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-shadow: inset 0 0 0 1px #dfe8f0;
|
||||
}
|
||||
|
||||
.sc-timeline-wrap.is-focus {
|
||||
background: #f2f9ff;
|
||||
border-radius: 8px;
|
||||
@ -179,7 +215,7 @@
|
||||
.sc-timeline-title {
|
||||
margin: 0 0 10px;
|
||||
color: #12344d;
|
||||
font-size: 14px;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
letter-spacing: .01em;
|
||||
}
|
||||
@ -242,7 +278,7 @@
|
||||
|
||||
.sc-timeline-event {
|
||||
color: #18354f;
|
||||
font-size: 14px;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@ -280,84 +316,218 @@
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.sc-cotacao-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
padding: 8px 0;
|
||||
border-top: 1px solid #edf2f7;
|
||||
.sc-cotacao-kpis {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(120px, 1fr));
|
||||
gap: 8px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.sc-cotacao-item:first-child {
|
||||
border-top: 0;
|
||||
padding-top: 0;
|
||||
.sc-cotacao-kpi {
|
||||
background: #f6f9fc;
|
||||
border: 1px solid #e2eaf2;
|
||||
border-radius: 8px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.sc-cotacao-item:last-child {
|
||||
padding-bottom: 0;
|
||||
.sc-cotacao-kpi-label {
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
color: #65798c;
|
||||
letter-spacing: .04em;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.sc-cotacao-item-info {
|
||||
color: #324a5f;
|
||||
.sc-cotacao-kpi-value {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: #102a43;
|
||||
}
|
||||
|
||||
.sc-cotacao-item-info strong {
|
||||
.sc-cotacao-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.sc-cotacao-card {
|
||||
border: 1px solid #dfe8f0;
|
||||
border-left: 4px solid #8ea5b8;
|
||||
border-radius: 10px;
|
||||
padding: 10px 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.sc-cotacao-card--winner {
|
||||
border-left-color: #18aa46;
|
||||
box-shadow: 0 0 0 1px rgba(24, 170, 70, .15);
|
||||
}
|
||||
|
||||
.sc-cotacao-card--homologado {
|
||||
border-left-color: #20a7d8;
|
||||
}
|
||||
|
||||
.sc-cotacao-card--novo {
|
||||
border-left-color: #2e86ff;
|
||||
}
|
||||
|
||||
.sc-cotacao-card--perdedor {
|
||||
border-left-color: #e3a225;
|
||||
}
|
||||
|
||||
.sc-cotacao-top {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sc-cotacao-top > div {
|
||||
min-width: 0;
|
||||
flex: 1 1 auto;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.sc-cotacao-supplier {
|
||||
color: #20384d;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
line-height: 1.25;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
#tbCotacao {
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
margin-bottom: 0;
|
||||
.sc-cotacao-code {
|
||||
color: #62768a;
|
||||
font-size: 12px;
|
||||
margin-top: 2px;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
#tbCotacao thead th {
|
||||
background: #eef3f8;
|
||||
color: #3b4d5f;
|
||||
.sc-cotacao-top .badge {
|
||||
align-self: start;
|
||||
flex: 0 0 auto;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 6px;
|
||||
}
|
||||
|
||||
.sc-cotacao-meta {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.sc-cotacao-meta-box {
|
||||
background: #f8fbfd;
|
||||
border: 1px solid #e6edf3;
|
||||
border-radius: 8px;
|
||||
padding: 7px 8px;
|
||||
}
|
||||
|
||||
.sc-cotacao-meta-label {
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
color: #6b7f92;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .04em;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.sc-cotacao-meta-value {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: #1f384d;
|
||||
}
|
||||
|
||||
#tbCotacao tbody tr:nth-child(odd) {
|
||||
.sc-cotacao-footer {
|
||||
margin-top: 8px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
color: #4d6479;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.sc-cotacao-empty {
|
||||
border: 1px dashed #c6d5e2;
|
||||
border-radius: 8px;
|
||||
padding: 10px;
|
||||
font-size: 13px;
|
||||
color: #4f657a;
|
||||
background: #f9fbfd;
|
||||
}
|
||||
|
||||
#tbCotacao tbody td,
|
||||
#tbCotacao thead th,
|
||||
#tbCotacao tfoot td {
|
||||
vertical-align: middle;
|
||||
.sc-pedido-track {
|
||||
margin-top: 12px;
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-shadow: inset 0 0 0 1px #dfe8f0;
|
||||
}
|
||||
|
||||
#tbCotacao th:nth-child(3),
|
||||
#tbCotacao th:nth-child(4),
|
||||
#tbCotacao th:nth-child(5),
|
||||
#tbCotacao td:nth-child(3),
|
||||
#tbCotacao td:nth-child(4),
|
||||
#tbCotacao td:nth-child(5) {
|
||||
text-align: right;
|
||||
.sc-timeline-layout .sc-pedido-track {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#tbCotacao td:nth-child(3) input,
|
||||
#tbCotacao td:nth-child(4) input,
|
||||
#tbCotacao td:nth-child(5) input {
|
||||
text-align: right;
|
||||
.sc-pedido-resumo {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
color: #26455d;
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
#tbCotacao tfoot .sc-total-label {
|
||||
text-align: right;
|
||||
.sc-pedido-assinaturas {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sc-pedido-ass-card {
|
||||
border: 1px solid #e3ebf2;
|
||||
border-left: 4px solid #90a8bd;
|
||||
border-radius: 8px;
|
||||
padding: 8px 10px;
|
||||
background: #fbfdff;
|
||||
}
|
||||
|
||||
.sc-pedido-ass-card.aprovado {
|
||||
border-left-color: #1aad4f;
|
||||
}
|
||||
|
||||
.sc-pedido-ass-card.pendente {
|
||||
border-left-color: #e2a223;
|
||||
}
|
||||
|
||||
.sc-pedido-ass-card.bloqueado {
|
||||
border-left-color: #d64f4f;
|
||||
}
|
||||
|
||||
.sc-pedido-ass-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.sc-pedido-ass-title {
|
||||
color: #1f3f56;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
background: #edf3f8;
|
||||
color: #324a60;
|
||||
}
|
||||
|
||||
#tbCotacao tfoot .sc-total-value {
|
||||
background: #edf3f8;
|
||||
color: #12344d;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
text-align: right;
|
||||
.sc-pedido-ass-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
color: #4b6176;
|
||||
font-size: 12px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
@ -365,6 +535,10 @@
|
||||
.sc-secondary-grid {
|
||||
grid-template-columns: repeat(2, minmax(180px, 1fr));
|
||||
}
|
||||
|
||||
.sc-timeline-layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
@ -374,7 +548,19 @@
|
||||
}
|
||||
|
||||
.sc-info--primary .sc-value {
|
||||
font-size: 24px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.sc-info--secondary .sc-value {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.sc-cotacao-top {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.sc-cotacao-top .badge {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -410,6 +596,7 @@
|
||||
<input type="hidden" name="cotacaoSCProtheus" id="cotacaoSCProtheus">
|
||||
<input type="hidden" name="pedidoSCProtheus" id="pedidoSCProtheus">
|
||||
<input type="hidden" name="statusAtendimento" id="statusAtendimento">
|
||||
<input type="hidden" name="valorTotalCotacao" id="valorTotalCotacao" value="0">
|
||||
|
||||
|
||||
|
||||
@ -667,285 +854,76 @@
|
||||
<span class="sc-hint" id="cardNumeroSCHint">Clique para ver a linha do tempo</span>
|
||||
</div>
|
||||
<div class="sc-info sc-info--primary">
|
||||
<div class="sc-label">Status Cadastro</div>
|
||||
<span class="sc-value badge bg-secondary" id="statusSCProtheus_label">-</span>
|
||||
</div>
|
||||
<div class="sc-info sc-info--primary">
|
||||
<div class="sc-label">Andamento</div>
|
||||
<span class="sc-value badge bg-secondary" id="statusSC_label">-</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sc-secondary-grid">
|
||||
<div class="sc-info sc-info--secondary">
|
||||
<div class="sc-label">Solicitante</div>
|
||||
<div class="sc-value" id="solicitanteSCProtheus_label">-</div>
|
||||
</div>
|
||||
<div class="sc-info sc-info--secondary">
|
||||
<div class="sc-label">Emissão</div>
|
||||
<div class="sc-value" id="emissaoSCProtheus_label">-</div>
|
||||
</div>
|
||||
<div class="sc-info sc-info--secondary">
|
||||
<div class="sc-label">Qtd. Itens</div>
|
||||
<div class="sc-value" id="qtdItensSCProtheus_label">-</div>
|
||||
</div>
|
||||
<div class="sc-info sc-info--secondary">
|
||||
<div class="sc-label">Data do Cadastro</div>
|
||||
<div class="sc-value"><span id="dataCadastroSCProtheus_label">-</span> às <span id="horaCadastroSCProtheus_label">-</span></div>
|
||||
</div>
|
||||
<div class="sc-info sc-info--secondary">
|
||||
<div class="sc-label">Cotação</div>
|
||||
<div class="sc-value" id="cotacaoSC_label">-</div>
|
||||
</div>
|
||||
<div class="sc-info sc-info--secondary">
|
||||
<div class="sc-info sc-info--primary">
|
||||
<div class="sc-label">Pedido</div>
|
||||
<div class="sc-value" id="pedidoSC_label">-</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sc-secondary-grid">
|
||||
<div class="sc-info sc-info--secondary">
|
||||
<div class="sc-label">Status Cadastro</div>
|
||||
<span class="sc-value badge bg-secondary" id="statusSCProtheus_label">-</span>
|
||||
</div>
|
||||
<div class="sc-info sc-info--secondary">
|
||||
<div class="sc-label">Andamento</div>
|
||||
<span class="sc-value badge bg-secondary" id="statusSC_label">-</span>
|
||||
</div>
|
||||
<div class="sc-info sc-info--secondary">
|
||||
<div class="sc-label">Emissão</div>
|
||||
<div class="sc-value" id="emissaoSCProtheus_label">-</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sc-timeline-wrap" id="scTimelineSection">
|
||||
<div class="sc-timeline-layout">
|
||||
<div class="sc-timeline-panel">
|
||||
<h4 class="sc-timeline-title">Linha do tempo da SC</h4>
|
||||
<ul class="sc-timeline" id="scTimeline"></ul>
|
||||
</div>
|
||||
|
||||
<div class="sc-pedido-track">
|
||||
<div class="sc-cotacao-head">
|
||||
<h4 class="sc-timeline-title" style="margin:0;">Aprovação do pedido</h4>
|
||||
<span class="sc-value badge bg-secondary" id="pedidoRastreio_label">Sem pedido</span>
|
||||
</div>
|
||||
<div class="sc-pedido-resumo" id="pedidoRastreioResumo">Sem pedido vinculado.</div>
|
||||
<div class="sc-pedido-assinaturas" id="pedidoRastreioAssinaturas">
|
||||
<div class="sc-cotacao-empty">Sem assinaturas para exibir.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sc-cotacao-track">
|
||||
<div class="sc-cotacao-head">
|
||||
<h4 class="sc-timeline-title" style="margin:0;">Acompanhamento da cotação</h4>
|
||||
<span class="sc-value badge bg-secondary" id="cotacaoResultado_label">Sem cotação</span>
|
||||
</div>
|
||||
<ul class="sc-cotacao-list" id="cotacaoResultadoLista">
|
||||
<li class="sc-cotacao-item">
|
||||
<span class="sc-cotacao-item-info">Aguardando vínculo da cotação na SC.</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="sc-cotacao-kpis" id="cotacaoResultadoResumo">
|
||||
<div class="sc-cotacao-kpi">
|
||||
<span class="sc-cotacao-kpi-label">Cotações</span>
|
||||
<span class="sc-cotacao-kpi-value">0</span>
|
||||
</div>
|
||||
<div class="sc-cotacao-kpi">
|
||||
<span class="sc-cotacao-kpi-label">Com pedido</span>
|
||||
<span class="sc-cotacao-kpi-value">0</span>
|
||||
</div>
|
||||
<div class="sc-cotacao-kpi">
|
||||
<span class="sc-cotacao-kpi-label">Menor total</span>
|
||||
<span class="sc-cotacao-kpi-value">-</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- CONSULTA COTAÇÃO -->
|
||||
<div class="activity activity-105">
|
||||
<div class="row">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><strong>Consulta Cotação</strong></div>
|
||||
|
||||
<!-- Campo hidden para guardar o total -->
|
||||
<input type="hidden" name="valorTotalCotacao" id="valorTotalCotacao" value="0"/>
|
||||
|
||||
<!-- Tabela Pai-Filho -->
|
||||
<table tablename="tbCotacao" id="tbCotacao" class="table table-bordered" noaddbutton="true" nodeletebutton="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Item</th>
|
||||
<th>Produto</th>
|
||||
<th>Qtd</th>
|
||||
<th>Preço</th>
|
||||
<th>Total</th>
|
||||
<th>Selecionar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- O Fluig precisa de uma linha “modelo” -->
|
||||
<tr>
|
||||
<td><input type="text" name="item" id="item" readonly></td>
|
||||
<td><input type="text" name="produto" id="produto" readonly></td>
|
||||
<td><input type="text" name="qtdc" id="qtdc" readonly></td>
|
||||
<td><input type="text" name="preco" id="preco" readonly></td>
|
||||
<td><input type="text" name="total" id="total" readonly></td>
|
||||
<td><input type="checkbox" name="selecionado" id="selecionado" value="S"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" class="sc-total-label">Total selecionado</td>
|
||||
<td class="sc-total-value" id="valorTotalCotacaoLabel">R$ 0,00</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ACTIVITY 137- Aprovar cotação Compras -->
|
||||
<div class="activity activity-137">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2><i class="flaticon flaticon-check-circle" aria-hidden="true"></i>Aprovar cotação</h2>
|
||||
<h6>Análise da cotação</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-6 col-xs-12">
|
||||
<label>Usuário responsável da Cotação</label>
|
||||
<input type="text" name="user_validacao_aprova" id="user_validacao_aprova" class="form-control" readonly
|
||||
data-protection="Responsável por aprovar de documentos" 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-3 col-xs-12">
|
||||
<label>Data</label>
|
||||
<input type="text" name="data_validacao_aprova" id="data_validacao_aprova" 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 divJustiDecisaoGestor alertaCampo">
|
||||
<label for="justi_decisao_aprova">Justificativa</label>
|
||||
<textarea class="form-control" name="justi_decisao_aprova" id="justi_decisao_aprova"></textarea>
|
||||
<p class="help-block" id="justiDecisaoGestor" style="display:none;">Preenchimento obrigatório</p>
|
||||
<div class="sc-cotacao-grid" id="cotacaoResultadoLista">
|
||||
<div class="sc-cotacao-empty">Aguardando vínculo da cotação na SC.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ACTIVITY 133- Aprovar cotação Compras -->
|
||||
<div class="activity activity-133">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2><i class="flaticon flaticon-check-circle" aria-hidden="true"></i>Aprovação do Gestor do C.Custo</h2>
|
||||
<h6>Aprovação da cotação</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-6 col-xs-12">
|
||||
<label>Gestor responsável da Cotação</label>
|
||||
<input type="text" name="gestor_validacao_aprova" id="gestor_validacao_aprova" class="form-control" readonly
|
||||
data-protection="Responsável por aprovar de documentos" 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-3 col-xs-12">
|
||||
<label>Data</label>
|
||||
<input type="text" name="data_validacao_aprova_gestor" id="data_validacao_aprova_gestor" 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 divJustiDecisaoGestor alertaCampo">
|
||||
<label for="justi_decisao_aprova_gestor">Justificativa</label>
|
||||
<textarea class="form-control" name="justi_decisao_aprova_gestor" id="justi_decisao_aprova_gestor"></textarea>
|
||||
<p class="help-block" id="justi_decisao_aprova_gestor" style="display:none;">Preenchimento obrigatório</p>
|
||||
</div>
|
||||
<div class="form-group col-md-8 col-xs-12">
|
||||
<label>Jusiticativa do solicitante <span class="required text-danger"><strong>*</strong></span></label>
|
||||
<textarea class="form-control" rows="3" id="observacoesdosolicitante" name="observacoesdosolicitante" readonly
|
||||
placeholder="Descreva aqui alguma informação adicional que julgar importante."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /activity-131 -->
|
||||
<!-- ACTIVITY 147- Aprovar cotação Compras -->
|
||||
<div class="activity activity-147">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2><i class="flaticon flaticon-check-circle" aria-hidden="true"></i>Aprovação do Gerente Financeiro</h2>
|
||||
<h6>Aprovação do Gerente Financeiro</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-6 col-xs-12">
|
||||
<label>Ger. Financeiro responsável pela Aprovação</label>
|
||||
<input type="text" name="gerf_validacao_aprova" id="gerf_validacao_aprova" class="form-control" readonly
|
||||
data-protection="Responsável por aprovar de documentos" 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-3 col-xs-12">
|
||||
<label>Data</label>
|
||||
<input type="text" name="data_validacao_aprova_gerf" id="data_validacao_aprova_gerf" 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 divJustiDecisaoGestor alertaCampo">
|
||||
<label for="justi_decisao_aprova_gerente">Justificativa</label>
|
||||
<textarea class="form-control" name="justi_decisao_aprova_gerente" id="justi_decisao_aprova_gerente" readonly></textarea>
|
||||
<p class="help-block" id="justi_decisao_aprova_gerente" style="display:none;">Preenchimento obrigatório</p>
|
||||
</div>
|
||||
<div class="form-group col-md-12 divJustiDecisaoGestor alertaCampo">
|
||||
<label for="justi_decisao_gc">Justificativa do Gestor do Centro de Custo</label>
|
||||
<textarea class="form-control" name="justi_decisao_gc" id="justi_decisao_gc"readonly></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-12 divJustiDecisaoGestor alertaCampo">
|
||||
<label for="justi_decisao__soli">Justificativa do Solicitante</label>
|
||||
<textarea class="form-control" name="justi_decisao__soli" id="justi_decisao__soli" readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /activity-131 -->
|
||||
<!-- ACTIVITY 137- Aprovar cotação Compras -->
|
||||
<div class="activity activity-158">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2><i class="flaticon flaticon-check-circle" aria-hidden="true"></i>Aprovação CEO</h2>
|
||||
<h6> Aprovação do CEO</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
<div class="form-group col-md-6 col-xs-12">
|
||||
<label>Usuário responsável</label>
|
||||
<input type="text" name="ceo_validacao_aprova" id="ceo_validacao_aprova" class="form-control" readonly
|
||||
data-protection="Responsável por aprovar de documentos" 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-3 col-xs-12">
|
||||
<label>Data</label>
|
||||
<input type="text" name="data_validacao_aprova_ceo" id="data_validacao_aprova_ceo" 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 divJustiDecisaoGestor alertaCampo">
|
||||
<label for="justi_decisao_aprova_ceo">Justificativa</label>
|
||||
<textarea class="form-control" name="justi_decisao_aprova_ceo" id="justi_decisao_aprova_ceo" readonly></textarea>
|
||||
<p class="help-block" id="justi_decisao_aprova_ceo" style="display:none;">Preenchimento obrigatório</p>
|
||||
</div>
|
||||
<div class="form-group col-md-12 divJustiDecisaoGestor alertaCampo">
|
||||
<label for="justi_decisao_aprova_ceo">Justificativa do Gerente Financeiro</label>
|
||||
<textarea class="form-control" name="justi_decisao_gerf" id="justi_decisao_gerf" readonly></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-12 divJustiDecisaoGestor alertaCampo">
|
||||
<label for="justi_decisaogc">Justificativa do Gestor do Centro de custo</label>
|
||||
<textarea class="form-control" name="justi_decisaogc" id="justi_decisaogc" readonly></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-12 divJustiDecisaoGestor alertaCampo">
|
||||
<label for="justi_decisao_solic">Justificativa do Solicitante</label>
|
||||
<textarea class="form-control" name="justi_decisao_solic" id="justi_decisao_solic" readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /activity-131 -->
|
||||
<!-- Blocos de Consulta Cotacao e aprovacoes de cotacao (ate CEO) removidos da interface -->
|
||||
<div class="activity activity-18">
|
||||
<div>
|
||||
<br />
|
||||
@ -955,14 +933,6 @@
|
||||
</h2>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- Botão para consultar agora -->
|
||||
<div id="espelhoPedido" style="margin-top:15px;">
|
||||
⏳ Aguardando geração do pedido...
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="form-field">
|
||||
<div class="form-input">
|
||||
|
||||
@ -410,17 +410,29 @@ function badgeClassByStatus(status) {
|
||||
var s = String(status || "").toLowerCase();
|
||||
if (!s) return "badge bg-secondary";
|
||||
if (s.indexOf("erro") >= 0 || s.indexOf("reprov") >= 0 || s.indexOf("cancel") >= 0) return "badge bg-danger";
|
||||
if (s.indexOf("sucesso") >= 0 || s.indexOf("aprov") >= 0 || s.indexOf("gerad") >= 0 || s.indexOf("liberad") >= 0) return "badge bg-success";
|
||||
if (s.indexOf("aguard") >= 0 || s.indexOf("pend") >= 0) return "badge bg-warning";
|
||||
if (s.indexOf("sucesso") >= 0 || s.indexOf("aprov") >= 0 || s.indexOf("gerad") >= 0 || s.indexOf("liberad") >= 0) return "badge bg-success";
|
||||
if (s.indexOf("bloque") >= 0 || s.indexOf("rejeit") >= 0) return "badge bg-danger";
|
||||
return "badge bg-info";
|
||||
}
|
||||
|
||||
function setBadge(selector, valor) {
|
||||
var texto = String(valor || "").trim() || "-";
|
||||
var classe = badgeClassByStatus(texto);
|
||||
var textoLower = texto.toLowerCase();
|
||||
|
||||
// Mantem os badges de resumo da SC sem destaque verde para sucesso/geracao.
|
||||
if (
|
||||
(selector === "#statusSCProtheus_label" && textoLower.indexOf("sc cadastrada com sucesso") >= 0) ||
|
||||
(selector === "#statusSC_label" && textoLower.indexOf("pedido gerado") >= 0)
|
||||
) {
|
||||
classe = "badge bg-info";
|
||||
}
|
||||
|
||||
$(selector)
|
||||
.text(texto)
|
||||
.removeClass("bg-secondary bg-success bg-danger bg-warning bg-info")
|
||||
.addClass(badgeClassByStatus(texto));
|
||||
.addClass(classe);
|
||||
}
|
||||
|
||||
function normalizarStatusCadastro(statusCadastro, numeroSC) {
|
||||
@ -487,11 +499,35 @@ function possuiFornecedorCotacao(row) {
|
||||
return !!(fornece && loja);
|
||||
}
|
||||
|
||||
function textoUtilFornecedor(valor) {
|
||||
var txt = String(valor || "").trim();
|
||||
if (!txt) return "";
|
||||
if (txt === "-" || txt === "--") return "";
|
||||
if (txt.toUpperCase() === "NULL") return "";
|
||||
return txt;
|
||||
}
|
||||
|
||||
function obterNomeFornecedorCompleto(row) {
|
||||
var candidatos = [
|
||||
textoUtilFornecedor(row.C8_FORNOME),
|
||||
textoUtilFornecedor(row.A2_NOME),
|
||||
textoUtilFornecedor(row.A2_NREDUZ)
|
||||
].filter(function (v) { return !!v; });
|
||||
|
||||
if (!candidatos.length) return "";
|
||||
|
||||
candidatos.sort(function (a, b) {
|
||||
if (b.length !== a.length) return b.length - a.length;
|
||||
return a.localeCompare(b);
|
||||
});
|
||||
return candidatos[0];
|
||||
}
|
||||
|
||||
function classificarLinhaCotacao(row) {
|
||||
var status = String(row.STATUS || "").trim().toUpperCase();
|
||||
|
||||
if (linhaCotacaoVencedora(row)) {
|
||||
return { tipo: "PEDIDO_GERADO", label: "VENCEDOR", badge: "badge bg-success", tipoFornecedor: "Fornecedor homologado" };
|
||||
return { tipo: "PEDIDO_GERADO", label: "GANHOU", badge: "badge bg-success", tipoFornecedor: "Fornecedor homologado" };
|
||||
}
|
||||
|
||||
if (possuiFornecedorCotacao(row)) {
|
||||
@ -499,7 +535,7 @@ function classificarLinhaCotacao(row) {
|
||||
}
|
||||
|
||||
if (status.indexOf("PEDIDO_GERADO") >= 0) {
|
||||
return { tipo: "PERDEDOR", label: "PERDEDOR", badge: "badge bg-warning", tipoFornecedor: "-" };
|
||||
return { tipo: "PERDEDOR", label: "", badge: "badge bg-warning", tipoFornecedor: "-" };
|
||||
}
|
||||
|
||||
if (!possuiFornecedorCotacao(row)) {
|
||||
@ -515,6 +551,41 @@ function formatarValorCotacao(valor) {
|
||||
return floatToBRL(parseNumeroCotacao(txt));
|
||||
}
|
||||
|
||||
function formatarDocumentoVisual(valor) {
|
||||
var txt = String(valor || "").trim();
|
||||
if (!txt || documentoEhPlaceholder(txt)) return "-";
|
||||
return txt;
|
||||
}
|
||||
|
||||
function classeCardCotacao(tipo) {
|
||||
if (tipo === "PEDIDO_GERADO") return "sc-cotacao-card sc-cotacao-card--winner";
|
||||
if (tipo === "FORNECEDOR_HOMOLOGADO") return "sc-cotacao-card sc-cotacao-card--homologado";
|
||||
if (tipo === "NOVO_FORNECEDOR") return "sc-cotacao-card sc-cotacao-card--novo";
|
||||
if (tipo === "PERDEDOR") return "sc-cotacao-card sc-cotacao-card--perdedor";
|
||||
return "sc-cotacao-card";
|
||||
}
|
||||
|
||||
function renderizarResumoCotacao(totalCotacoes, totalComPedido, menorTotal) {
|
||||
var alvo = $("#cotacaoResultadoResumo");
|
||||
if (!alvo.length) return;
|
||||
|
||||
var menorTxt = (menorTotal !== null) ? floatToBRL(menorTotal) : "-";
|
||||
alvo.html([
|
||||
'<div class="sc-cotacao-kpi">',
|
||||
' <span class="sc-cotacao-kpi-label">Quantidade</span>',
|
||||
' <span class="sc-cotacao-kpi-value">' + escapeHTML(String(totalCotacoes || 0)) + "</span>",
|
||||
"</div>",
|
||||
'<div class="sc-cotacao-kpi">',
|
||||
' <span class="sc-cotacao-kpi-label">Pedidos Gerados</span>',
|
||||
' <span class="sc-cotacao-kpi-value">' + escapeHTML(String(totalComPedido || 0)) + "</span>",
|
||||
"</div>",
|
||||
'<div class="sc-cotacao-kpi">',
|
||||
' <span class="sc-cotacao-kpi-label">Menor Valor</span>',
|
||||
' <span class="sc-cotacao-kpi-value">' + escapeHTML(menorTxt) + "</span>",
|
||||
"</div>"
|
||||
].join(""));
|
||||
}
|
||||
|
||||
function comporDataHora(data, hora) {
|
||||
var d = String(data || "").trim();
|
||||
var h = String(hora || "").trim();
|
||||
@ -614,13 +685,14 @@ function renderizarResultadoCotacao(resumo) {
|
||||
|
||||
if (!resumo || !resumo.detalhes || !resumo.detalhes.length) {
|
||||
setBadge("#cotacaoResultado_label", "Sem cotacao");
|
||||
lista.html('<li class="sc-cotacao-item"><span class="sc-cotacao-item-info">Aguardando vinculo da cotacao na SC.</span></li>');
|
||||
renderizarResumoCotacao(0, 0, null);
|
||||
lista.html('<div class="sc-cotacao-empty">Aguardando vinculo da cotacao na SC.</div>');
|
||||
return;
|
||||
}
|
||||
|
||||
var statusResumo = "Sem fornecedor definido";
|
||||
if ((resumo.qtdPedidoGerado || 0) > 0) {
|
||||
statusResumo = "Pedido gerado em " + resumo.qtdPedidoGerado + " item(ns)";
|
||||
statusResumo = "Cotacao concluida";
|
||||
} else if ((resumo.qtdFornecedorHomologado || 0) > 0) {
|
||||
statusResumo = "Fornecedor homologado em " + resumo.qtdFornecedorHomologado + " item(ns)";
|
||||
} else if ((resumo.qtdNovoFornecedor || 0) > 0) {
|
||||
@ -629,24 +701,69 @@ function renderizarResultadoCotacao(resumo) {
|
||||
|
||||
setBadge("#cotacaoResultado_label", statusResumo);
|
||||
|
||||
var html = resumo.detalhes.map(function (linha) {
|
||||
var detalhesOrdenados = resumo.detalhes.slice().sort(function (a, b) {
|
||||
var pesoA = (a.tipo === "PEDIDO_GERADO") ? 0 : 1;
|
||||
var pesoB = (b.tipo === "PEDIDO_GERADO") ? 0 : 1;
|
||||
if (pesoA !== pesoB) return pesoA - pesoB;
|
||||
|
||||
var totalA = parseNumeroCotacao(a.total);
|
||||
var totalB = parseNumeroCotacao(b.total);
|
||||
if (totalA === totalB) return 0;
|
||||
return totalA - totalB;
|
||||
});
|
||||
|
||||
var menorTotal = null;
|
||||
var totalComPedido = 0;
|
||||
for (var i = 0; i < detalhesOrdenados.length; i++) {
|
||||
var t = parseNumeroCotacao(detalhesOrdenados[i].total);
|
||||
if (t > 0 && (menorTotal === null || t < menorTotal)) menorTotal = t;
|
||||
if (!documentoEhPlaceholder(detalhesOrdenados[i].pedido)) totalComPedido++;
|
||||
}
|
||||
renderizarResumoCotacao(detalhesOrdenados.length, totalComPedido, menorTotal);
|
||||
|
||||
var html = detalhesOrdenados.map(function (linha) {
|
||||
var numeroTxt = escapeHTML(linha.numero || "-");
|
||||
var itemTxt = escapeHTML(linha.item || "-");
|
||||
var produtoTxt = escapeHTML(linha.produto || "-");
|
||||
var fornecedorNomeTxt = escapeHTML(linha.fornecedorNome || linha.fornecedor || "Fornecedor nao informado");
|
||||
var fornecedorTxt = escapeHTML(linha.fornecedor || "-");
|
||||
var tipoFornecedorTxt = escapeHTML(linha.tipoFornecedor || "-");
|
||||
var precoTxt = escapeHTML(formatarValorCotacao(linha.preco));
|
||||
var totalTxt = escapeHTML(formatarValorCotacao(linha.total));
|
||||
var pedidoTxt = escapeHTML(linha.pedido || "-");
|
||||
var pedidoTxt = escapeHTML(formatarDocumentoVisual(linha.pedido));
|
||||
var statusApiTxt = escapeHTML(linha.statusApi || "-");
|
||||
var statusTxt = escapeHTML(linha.label || "EM COTACAO");
|
||||
var statusRaw = String(linha.label || "").trim();
|
||||
var statusTxt = escapeHTML(statusRaw);
|
||||
var badgeStatus = linha.badge || "badge bg-secondary";
|
||||
var classeCard = classeCardCotacao(linha.tipo);
|
||||
var qtdTxt = escapeHTML(String(linha.quantidade || "-"));
|
||||
var entregaTxt = escapeHTML(normalizarDataProtheus(linha.dataPrevista || ""));
|
||||
var condicaoTxt = escapeHTML(linha.condicao || "-");
|
||||
|
||||
return [
|
||||
'<li class="sc-cotacao-item">',
|
||||
' <span class="sc-cotacao-item-info"><strong>Cotacao ' + numeroTxt + '</strong> | Item ' + itemTxt + " | Produto: " + produtoTxt + " | Fornecedor: " + fornecedorTxt + " | Tipo: " + tipoFornecedorTxt + " | Preco: " + precoTxt + " | Total: " + totalTxt + " | Pedido: " + pedidoTxt + " | Status: " + statusApiTxt + "</span>",
|
||||
' <span class="' + badgeStatus + '">' + statusTxt + "</span>",
|
||||
"</li>"
|
||||
'<article class="' + classeCard + '">',
|
||||
' <div class="sc-cotacao-top">',
|
||||
" <div>",
|
||||
' <div class="sc-cotacao-supplier">' + fornecedorNomeTxt + "</div>",
|
||||
' <div class="sc-cotacao-code">Fornecedor: ' + fornecedorTxt + " | Tipo: " + tipoFornecedorTxt + "</div>",
|
||||
" </div>",
|
||||
statusRaw ? (' <span class="' + badgeStatus + '">' + statusTxt + "</span>") : "",
|
||||
" </div>",
|
||||
' <div class="sc-cotacao-meta">',
|
||||
' <div class="sc-cotacao-meta-box"><span class="sc-cotacao-meta-label">Preco unitario</span><span class="sc-cotacao-meta-value">' + precoTxt + "</span></div>",
|
||||
' <div class="sc-cotacao-meta-box"><span class="sc-cotacao-meta-label">Total</span><span class="sc-cotacao-meta-value">' + totalTxt + "</span></div>",
|
||||
" </div>",
|
||||
' <div class="sc-cotacao-footer">',
|
||||
' <span><strong>Cotacao:</strong> ' + numeroTxt + "</span>",
|
||||
' <span><strong>Item:</strong> ' + itemTxt + "</span>",
|
||||
' <span><strong>Qtd:</strong> ' + qtdTxt + "</span>",
|
||||
' <span><strong>Produto:</strong> ' + produtoTxt + "</span>",
|
||||
' <span><strong>Cond.:</strong> ' + condicaoTxt + "</span>",
|
||||
' <span><strong>Data entrega:</strong> ' + (entregaTxt || "-") + "</span>",
|
||||
' <span><strong>Pedido:</strong> ' + pedidoTxt + "</span>",
|
||||
' <span><strong>Status API:</strong> ' + statusApiTxt + "</span>",
|
||||
" </div>",
|
||||
"</article>"
|
||||
].join("");
|
||||
}).join("");
|
||||
|
||||
@ -658,13 +775,166 @@ function renderizarErroCotacao(mensagem) {
|
||||
if (!lista.length) return;
|
||||
|
||||
setBadge("#cotacaoResultado_label", "Erro consulta cotacao");
|
||||
renderizarResumoCotacao(0, 0, null);
|
||||
lista.html(
|
||||
'<li class="sc-cotacao-item"><span class="sc-cotacao-item-info">' +
|
||||
'<div class="sc-cotacao-empty">' +
|
||||
escapeHTML(mensagem || "Nao foi possivel carregar a cotacao no momento.") +
|
||||
"</span></li>"
|
||||
"</div>"
|
||||
);
|
||||
}
|
||||
|
||||
function mapearStatusAlcada(codigo) {
|
||||
var status = String(codigo || "").trim();
|
||||
if (status === "01") return { label: "Pendente em niveis anteriores", badge: "badge bg-warning", classe: "pendente" };
|
||||
if (status === "02") return { label: "Pendente", badge: "badge bg-warning", classe: "pendente" };
|
||||
if (status === "03") return { label: "Aprovado", badge: "badge bg-success", classe: "aprovado" };
|
||||
if (status === "04") return { label: "Bloqueado", badge: "badge bg-danger", classe: "bloqueado" };
|
||||
if (status === "05") return { label: "Aprovado/rejeitado pelo nivel", badge: "badge bg-info", classe: "pendente" };
|
||||
if (status === "06") return { label: "Rejeitado", badge: "badge bg-danger", classe: "bloqueado" };
|
||||
if (status === "07") return { label: "Documento rejeitado ou bloqueado por outro usuario", badge: "badge bg-danger", classe: "bloqueado" };
|
||||
return { label: status ? ("Status " + status) : "Sem status", badge: "badge bg-secondary", classe: "" };
|
||||
}
|
||||
|
||||
function primeiroTextoPreenchido() {
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var txt = String(arguments[i] || "").trim();
|
||||
if (txt) return txt;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function montarResumoRastreioPedido(pedidos, numeroPedido) {
|
||||
if (!pedidos || !pedidos.length) return null;
|
||||
|
||||
var pedidoFiltro = normalizarCodigoComparacao(numeroPedido);
|
||||
var pedidoBase = null;
|
||||
for (var i = 0; i < pedidos.length; i++) {
|
||||
var num = normalizarCodigoComparacao(String((pedidos[i] || {}).C7_NUM || ""));
|
||||
if (!pedidoFiltro || num === pedidoFiltro) {
|
||||
pedidoBase = pedidos[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!pedidoBase) pedidoBase = pedidos[0];
|
||||
|
||||
var assinaturas = [];
|
||||
var vistos = {};
|
||||
|
||||
for (var j = 0; j < pedidos.length; j++) {
|
||||
var ped = pedidos[j] || {};
|
||||
var alcadas = ped.ALCADAS || [];
|
||||
for (var k = 0; k < alcadas.length; k++) {
|
||||
var a = alcadas[k] || {};
|
||||
var chave = [
|
||||
String(a.CR_TIPO || "").trim(),
|
||||
String(a.CR_USER || "").trim(),
|
||||
String(a.CR_USERLIB || "").trim(),
|
||||
String(a.CR_STATUS || "").trim(),
|
||||
String(a.CR_PRAZO || "").trim(),
|
||||
String(a.CR_DATALIB || "").trim()
|
||||
].join("|");
|
||||
if (vistos[chave]) continue;
|
||||
vistos[chave] = true;
|
||||
|
||||
var statusInfo = mapearStatusAlcada(a.CR_STATUS);
|
||||
assinaturas.push({
|
||||
statusCodigo: String(a.CR_STATUS || "").trim(),
|
||||
statusLabel: statusInfo.label,
|
||||
badge: statusInfo.badge,
|
||||
classe: statusInfo.classe,
|
||||
tipo: String(a.CR_TIPO || "").trim(),
|
||||
prazo: normalizarDataProtheus(a.CR_PRAZO),
|
||||
dataLiberacao: normalizarDataProtheus(a.CR_DATALIB),
|
||||
usuario: primeiroTextoPreenchido(a.CR_USER_NOME, a.AK_NOME, a.CR_USER),
|
||||
usuarioLiberacao: primeiroTextoPreenchido(a.CR_USERLIB_NOME, a.AK_NOME_USERLIB, a.CR_USERLIB)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var resumo = {
|
||||
numero: String(pedidoBase.C7_NUM || "").trim(),
|
||||
statusPedido: String(pedidoBase.STATUS || "").trim(),
|
||||
fornecedor: primeiroTextoPreenchido(pedidoBase.A2_NOME, pedidoBase.A2_NREDUZ, pedidoBase.C7_FORNECE),
|
||||
emissao: normalizarDataProtheus(pedidoBase.C7_EMISSAO),
|
||||
entrega: normalizarDataProtheus(pedidoBase.C7_DATPRF),
|
||||
assinaturas: assinaturas
|
||||
};
|
||||
|
||||
return resumo;
|
||||
}
|
||||
|
||||
function renderizarErroRastreioPedido(mensagem) {
|
||||
setBadge("#pedidoRastreio_label", "Erro no rastreio");
|
||||
$("#pedidoRastreioResumo").text("Nao foi possivel consultar o rastreio do pedido.");
|
||||
$("#pedidoRastreioAssinaturas").html(
|
||||
'<div class="sc-cotacao-empty">' + escapeHTML(mensagem || "Erro ao consultar rastreio.") + "</div>"
|
||||
);
|
||||
}
|
||||
|
||||
function renderizarRastreioPedido(resumo) {
|
||||
var badge = $("#pedidoRastreio_label");
|
||||
var resumoEl = $("#pedidoRastreioResumo");
|
||||
var lista = $("#pedidoRastreioAssinaturas");
|
||||
if (!badge.length || !resumoEl.length || !lista.length) return;
|
||||
|
||||
if (!resumo || !resumo.numero) {
|
||||
setBadge("#pedidoRastreio_label", "Sem pedido");
|
||||
resumoEl.text("Sem pedido vinculado.");
|
||||
lista.html('<div class="sc-cotacao-empty">Sem assinaturas para exibir.</div>');
|
||||
return;
|
||||
}
|
||||
|
||||
var possuiBloqueio = resumo.assinaturas.some(function (a) { return a.classe === "bloqueado"; });
|
||||
var possuiPendente = resumo.assinaturas.some(function (a) { return a.classe === "pendente"; });
|
||||
var todosAprovados = resumo.assinaturas.length > 0 && resumo.assinaturas.every(function (a) { return a.statusCodigo === "03"; });
|
||||
|
||||
var statusTopo = "Pedido pendente";
|
||||
if (possuiBloqueio) statusTopo = "Pedido bloqueado";
|
||||
else if (todosAprovados) statusTopo = "Pedido aprovado";
|
||||
else if (!possuiPendente && resumo.statusPedido) statusTopo = resumo.statusPedido;
|
||||
setBadge("#pedidoRastreio_label", statusTopo);
|
||||
|
||||
var resumoTxt = "Pedido " + (resumo.numero || "-");
|
||||
if (resumo.fornecedor) resumoTxt += " | Fornecedor: " + resumo.fornecedor;
|
||||
if (resumo.emissao) resumoTxt += " | Emissao: " + resumo.emissao;
|
||||
if (resumo.entrega) resumoTxt += " | Entrega: " + resumo.entrega;
|
||||
resumoEl.text(resumoTxt);
|
||||
|
||||
if (!resumo.assinaturas.length) {
|
||||
lista.html('<div class="sc-cotacao-empty">Pedido encontrado, mas sem alcadas retornadas pela API.</div>');
|
||||
return;
|
||||
}
|
||||
|
||||
var html = resumo.assinaturas.map(function (a, idx) {
|
||||
var classeCard = "sc-pedido-ass-card" + (a.classe ? (" " + a.classe) : "");
|
||||
var nivel = "Nivel " + (idx + 1);
|
||||
var usuario = escapeHTML(a.usuario || "-");
|
||||
var usuarioLib = escapeHTML(a.usuarioLiberacao || "-");
|
||||
var prazo = escapeHTML(a.prazo || "-");
|
||||
var dataLib = escapeHTML(a.dataLiberacao || "-");
|
||||
var tipo = escapeHTML(a.tipo || "-");
|
||||
var statusLabel = escapeHTML(a.statusLabel || "-");
|
||||
var badgeStatus = a.badge || "badge bg-secondary";
|
||||
|
||||
return [
|
||||
'<article class="' + classeCard + '">',
|
||||
' <div class="sc-pedido-ass-header">',
|
||||
' <div class="sc-pedido-ass-title">' + nivel + " - " + usuario + "</div>",
|
||||
' <span class="' + badgeStatus + '">' + statusLabel + "</span>",
|
||||
" </div>",
|
||||
' <div class="sc-pedido-ass-meta">',
|
||||
' <span><strong>Tipo:</strong> ' + tipo + "</span>",
|
||||
' <span><strong>Prazo:</strong> ' + prazo + "</span>",
|
||||
' <span><strong>Data liberacao:</strong> ' + dataLib + "</span>",
|
||||
' <span><strong>Liberado por:</strong> ' + usuarioLib + "</span>",
|
||||
" </div>",
|
||||
"</article>"
|
||||
].join("");
|
||||
}).join("");
|
||||
|
||||
lista.html(html);
|
||||
}
|
||||
|
||||
function montarResumoCotacaoPorLinhas(rows, cotacao) {
|
||||
if (!rows || !rows.length) return null;
|
||||
|
||||
@ -699,10 +969,14 @@ function montarResumoCotacaoPorLinhas(rows, cotacao) {
|
||||
detalhes.push({
|
||||
numero: String(row.C8_NUM || "").trim(),
|
||||
item: item,
|
||||
produto: String(row.C8_PRODUTO || "").trim(),
|
||||
produto: String(row.B1_DESC || row.C8_DESCRI || row.C8_PRODUTO || "").trim(),
|
||||
quantidade: String(row.C8_QUANT || "").trim(),
|
||||
condicao: String(row.C8_COND || "").trim(),
|
||||
dataPrevista: String(row.C8_DATPRF || "").trim(),
|
||||
fornecedor: possuiFornecedorCotacao(row)
|
||||
? (String(row.C8_FORNECE || "").trim() + "/" + String(row.C8_LOJA || "").trim())
|
||||
: "",
|
||||
fornecedorNome: obterNomeFornecedorCompleto(row),
|
||||
preco: row.C8_PRECO,
|
||||
total: row.C8_TOTAL,
|
||||
pedido: String(row.C8_NUMPED || "").trim(),
|
||||
@ -881,7 +1155,7 @@ function montarStatusAndamento(scRow, cotacao, pedido) {
|
||||
return "";
|
||||
}
|
||||
|
||||
function preencherResumoSC(resumoCotacao, erroCotacao) {
|
||||
function preencherResumoSC(resumoCotacao, erroCotacao, resumoPedido, erroPedido) {
|
||||
var numero = valorCampo("numeroSCProtheus");
|
||||
var statusCadastro = valorCampo("statusSCProtheus");
|
||||
var solicitante = valorCampo("solicitanteSCProtheus");
|
||||
@ -934,6 +1208,14 @@ function preencherResumoSC(resumoCotacao, erroCotacao) {
|
||||
} else {
|
||||
renderizarResultadoCotacao(null);
|
||||
}
|
||||
|
||||
if (erroPedido) {
|
||||
renderizarErroRastreioPedido(erroPedido);
|
||||
} else if (resumoPedido && resumoPedido.numero) {
|
||||
renderizarRastreioPedido(resumoPedido);
|
||||
} else {
|
||||
renderizarRastreioPedido(null);
|
||||
}
|
||||
}
|
||||
|
||||
function consultarAndamentoSC() {
|
||||
@ -974,7 +1256,19 @@ function consultarAndamentoSC() {
|
||||
}
|
||||
}
|
||||
|
||||
preencherResumoSC(resumoCotacao, erroCotacao);
|
||||
var resumoPedido = null;
|
||||
var erroPedido = String(row.PEDIDO_ERRO || "").trim();
|
||||
var jsonPedido = String(row.PEDIDO_JSON || "").trim();
|
||||
if (jsonPedido) {
|
||||
try {
|
||||
var pedidos = JSON.parse(jsonPedido);
|
||||
resumoPedido = montarResumoRastreioPedido(pedidos, pedido);
|
||||
} catch (ePed) {
|
||||
if (!erroPedido) erroPedido = "Falha ao ler rastreio do pedido retornado pelo ds_consultaSC";
|
||||
}
|
||||
}
|
||||
|
||||
preencherResumoSC(resumoCotacao, erroCotacao, resumoPedido, erroPedido);
|
||||
} catch (e) {
|
||||
console.warn("Nao foi possivel consultar andamento da SC no ds_consultaSC:", e);
|
||||
}
|
||||
@ -1001,47 +1295,11 @@ function parseNumeroCotacao(valor) {
|
||||
return parseFloat(texto) || 0;
|
||||
}
|
||||
|
||||
function recalcularTotalCotacao() {
|
||||
var soma = 0;
|
||||
|
||||
$("input[name^='selecionado___']").each(function() {
|
||||
var idCampo = String($(this).attr("id") || "");
|
||||
if (idCampo.indexOf("___") < 0) return;
|
||||
var idx = idCampo.split("___")[1];
|
||||
|
||||
// pega qtd e preço da linha
|
||||
var qtd = parseNumeroCotacao($("#qtdc___" + idx).val() || "0");
|
||||
var preco = parseNumeroCotacao($("#preco___" + idx).val() || "0");
|
||||
|
||||
// calcula total da linha
|
||||
var total = qtd * preco;
|
||||
|
||||
// atualiza campo total da linha
|
||||
$("#total___" + idx).val(total.toFixed(2));
|
||||
|
||||
// se marcado, acumula na soma
|
||||
if ($(this).is(":checked")) {
|
||||
soma += total;
|
||||
}
|
||||
});
|
||||
|
||||
// Atualiza o hidden e dispara change pro Fluig gravar
|
||||
$("#valorTotalCotacao").val(soma.toFixed(2)).trigger("change");
|
||||
$("#valorTotalCotacaoLabel").text(floatToBRL(soma));
|
||||
}
|
||||
// dispara sempre que marcar/desmarcar
|
||||
$(document).on("change", "input[name^='selecionado___']", function() {
|
||||
recalcularTotalCotacao();
|
||||
});
|
||||
|
||||
// recalcula ao abrir a atividade
|
||||
$(document).ready(function() {
|
||||
recalcularTotalCotacao();
|
||||
});
|
||||
|
||||
// garante que o total seja salvo antes de enviar a atividade
|
||||
function beforeSendValidate(numState, nextState) {
|
||||
console.log("Executando beforeSendValidate, recalculando total...");
|
||||
recalcularTotalCotacao();
|
||||
return true; // precisa retornar true senão bloqueia o envio
|
||||
var campoTotal = $("#valorTotalCotacao");
|
||||
if (campoTotal.length && !String(campoTotal.val() || "").trim()) {
|
||||
campoTotal.val("0").trigger("change");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -52,4 +52,12 @@ function displayFields(form, customHTML) {
|
||||
}
|
||||
form.setValue("data_validacao_gestor", hoje);
|
||||
}
|
||||
|
||||
// Receber produto/servico
|
||||
if (activity === 18) {
|
||||
if (nomeUsuario) {
|
||||
form.setValue("userValidacaoItens", nomeUsuario);
|
||||
}
|
||||
form.setValue("dataValidacaoItens", hoje);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 41 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 19 KiB |
File diff suppressed because it is too large
Load Diff
@ -1,20 +1,155 @@
|
||||
function documentoValido(valor) {
|
||||
var v = String(valor || "").trim().toUpperCase();
|
||||
if (!v) return false;
|
||||
if (v === "000000" || v === "000001") return false;
|
||||
if (/^0+$/.test(v)) return false;
|
||||
if (/^X+$/.test(v)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function consultarComFallback(clientService, endpoints, contexto) {
|
||||
var ultimoErro = "";
|
||||
|
||||
for (var i = 0; i < endpoints.length; i++) {
|
||||
try {
|
||||
var req = {
|
||||
companyId: "1",
|
||||
serviceCode: "Postprod",
|
||||
endpoint: endpoints[i],
|
||||
method: "get",
|
||||
timeoutService: "60000",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
};
|
||||
|
||||
log.info("[ST114] Consulta " + contexto + " => " + endpoints[i]);
|
||||
var response = clientService.invoke(JSON.stringify(req));
|
||||
if (!response || !response.getResult()) {
|
||||
ultimoErro = "Sem resposta";
|
||||
continue;
|
||||
}
|
||||
|
||||
var body = JSON.parse(response.getResult());
|
||||
if (body && body.sucesso) {
|
||||
return { sucesso: true, body: body };
|
||||
}
|
||||
|
||||
ultimoErro = (body && (body.erro || body.message)) ? String(body.erro || body.message) : "Resposta sem sucesso";
|
||||
} catch (e) {
|
||||
ultimoErro = String(e);
|
||||
}
|
||||
}
|
||||
|
||||
return { sucesso: false, erro: ultimoErro || ("Falha na consulta de " + contexto) };
|
||||
}
|
||||
|
||||
function apurarAssinaturas(pedidos) {
|
||||
var resumo = {
|
||||
total: 0,
|
||||
aprovadas: 0,
|
||||
pendentes: 0,
|
||||
bloqueadas: 0,
|
||||
rejeitadas: 0,
|
||||
outros: 0
|
||||
};
|
||||
|
||||
for (var i = 0; i < pedidos.length; i++) {
|
||||
var alcadas = (pedidos[i] && pedidos[i].ALCADAS) ? pedidos[i].ALCADAS : [];
|
||||
for (var j = 0; j < alcadas.length; j++) {
|
||||
var status = String((alcadas[j] && alcadas[j].CR_STATUS) || "").trim();
|
||||
if (!status) continue;
|
||||
|
||||
resumo.total++;
|
||||
if (status === "03") {
|
||||
resumo.aprovadas++;
|
||||
} else if (status === "01" || status === "02") {
|
||||
resumo.pendentes++;
|
||||
} else if (status === "04") {
|
||||
resumo.bloqueadas++;
|
||||
} else if (status === "06" || status === "07") {
|
||||
resumo.rejeitadas++;
|
||||
} else {
|
||||
resumo.outros++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return resumo;
|
||||
}
|
||||
|
||||
function servicetask114(attempt, message) {
|
||||
log.info("🚀 ST92 — Verifica se já existe código de cotação no formulário");
|
||||
log.info("[ST114] Inicio - valida cotacao, pedido e assinaturas");
|
||||
|
||||
var numSC = hAPI.getCardValue("numeroSCProtheus");
|
||||
var numCot = hAPI.getCardValue("cotacaoSCProtheus");
|
||||
|
||||
log.info("📌 SC: " + numSC + " | Cotação: " + numCot);
|
||||
var numSC = String(hAPI.getCardValue("numeroSCProtheus") || "").trim();
|
||||
var numCotForm = String(hAPI.getCardValue("cotacaoSCProtheus") || "").trim();
|
||||
var numPedForm = String(hAPI.getCardValue("pedidoSCProtheus") || "").trim();
|
||||
|
||||
if (!numSC) {
|
||||
throw "❌ Número da SC não informado no formulário.";
|
||||
throw "Numero da SC nao informado no formulario.";
|
||||
}
|
||||
|
||||
// se não tiver cotação ainda, força o loop da atividade
|
||||
if (!numCot || numCot === "000000" || numCot === "000001") {
|
||||
throw "⏳ Cotação ainda não disponível para a SC " + numSC;
|
||||
var clientService = fluigAPI.getAuthorizeClientService();
|
||||
|
||||
var consultaSC = consultarComFallback(clientService, [
|
||||
"/UF_MATA110/" + numSC,
|
||||
"/rest/UF_MATA110/" + numSC,
|
||||
"/rest/uf_mata110/" + numSC
|
||||
], "SC " + numSC);
|
||||
|
||||
if (!consultaSC.sucesso) {
|
||||
throw "Nao foi possivel consultar a SC " + numSC + ": " + consultaSC.erro;
|
||||
}
|
||||
|
||||
// se já tiver código, só registra log e deixa o processo seguir
|
||||
log.info("✅ Cotação " + numCot + " encontrada no formulário. Processo segue.");
|
||||
var solicitacoes = (consultaSC.body && consultaSC.body.solicitacoes) ? consultaSC.body.solicitacoes : [];
|
||||
if (!solicitacoes.length) {
|
||||
throw "SC " + numSC + " sem retorno de dados no Protheus.";
|
||||
}
|
||||
|
||||
var sc = solicitacoes[0] || {};
|
||||
var numCot = documentoValido(sc.C1_COTACAO) ? String(sc.C1_COTACAO).trim() : numCotForm;
|
||||
var numPed = documentoValido(sc.C1_PEDIDO) ? String(sc.C1_PEDIDO).trim() : numPedForm;
|
||||
|
||||
if (!documentoValido(numCot)) {
|
||||
hAPI.setCardValue("statusAtendimento", "Aguardando cotacao");
|
||||
throw "Cotacao ainda nao disponivel para a SC " + numSC + ".";
|
||||
}
|
||||
hAPI.setCardValue("cotacaoSCProtheus", numCot);
|
||||
|
||||
if (!documentoValido(numPed)) {
|
||||
hAPI.setCardValue("statusAtendimento", "Aguardando pedido");
|
||||
throw "Pedido ainda nao gerado para a SC " + numSC + ".";
|
||||
}
|
||||
hAPI.setCardValue("pedidoSCProtheus", numPed);
|
||||
|
||||
var consultaPedido = consultarComFallback(clientService, [
|
||||
"/UF_MATA120/" + numPed,
|
||||
"/rest/UF_MATA120/" + numPed,
|
||||
"/rest/uf_mata120/" + numPed
|
||||
], "Pedido " + numPed);
|
||||
|
||||
if (!consultaPedido.sucesso) {
|
||||
throw "Nao foi possivel consultar o pedido " + numPed + ": " + consultaPedido.erro;
|
||||
}
|
||||
|
||||
var pedidos = (consultaPedido.body && consultaPedido.body.pedidos) ? consultaPedido.body.pedidos : [];
|
||||
var assinatura = apurarAssinaturas(pedidos);
|
||||
|
||||
if (assinatura.total === 0) {
|
||||
hAPI.setCardValue("statusAtendimento", "Pedido sem alcadas");
|
||||
throw "Pedido " + numPed + " sem alcadas de assinatura retornadas.";
|
||||
}
|
||||
|
||||
if (assinatura.bloqueadas > 0 || assinatura.rejeitadas > 0) {
|
||||
hAPI.setCardValue("statusAtendimento", "Pedido bloqueado/rejeitado");
|
||||
throw "Pedido " + numPed + " bloqueado/rejeitado. Nao pode seguir para recebimento.";
|
||||
}
|
||||
|
||||
if (assinatura.aprovadas < assinatura.total) {
|
||||
hAPI.setCardValue("statusAtendimento", "Pedido pendente de assinatura");
|
||||
throw "Pedido " + numPed + " ainda nao esta 100% assinado (" + assinatura.aprovadas + "/" + assinatura.total + ").";
|
||||
}
|
||||
|
||||
hAPI.setCardValue("statusAtendimento", "Pedido 100% assinado");
|
||||
log.info("[ST114] Pedido " + numPed + " 100% assinado. Fluxo liberado para receber produto/servico.");
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user