-1
I am trying to change the (li) of this system that I called PRONTUARIOS, just by dragging from one (ul) current to another that I called BOX, I am trying to recover the value of the readiness id (li) and the current box that the user left the ready in case it changed to a new box (ul). if anyone can help me, I need to recover the value of these ids and updates in the database!
<script type="text/javascript">
$(document).ready(function() {
$("ul").sortable({
delay: 150,
connectWith: ".parent",
cursor: 'move',
stop: function() {
var caixaAtual = new Array();
var prontuario = '';
$('li .prontuario').each(function() {
//caixaAtual = $("data-id").html();
//prontuario = $("data-id").val(this);
});
console.log(prontuario);
//updateOrder(prontuario,caixaAtual);
}
});
function updateOrder(id,caixa) {
$.ajax({
url:"<?php //DIRPAGE.LINK; ?>documentos/alterar_segundo_volume",
type:'post',
data:{id:id,caixa:caixa},
success:function(data){
toastr.success('Alterado com sucesso.');
}
})
}
});
<div class="container mx-auto mt-3 mb-5 text-center">
<h4 class="col-12 text-center mx-auto">LISTAGEM SEGUNDO VOLUME</h4>
CAIXA N° 01 <ul id="c_01" class="col-12 parent mt-0 mb-2 ui-sortable">
<li id="239" data-id="239" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ADRIANO ALVES DE ALMEIDA</td>
<td class="col-2 align-middle mx-auto p-0 text-center">617.598-8</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1257101/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/239" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="247" data-id="247" class="col-12 mx-auto prontuario ui-sortable-handle" style="position: relative; left: 0px; top: 0px;">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">5</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ALEX JORGE MELO DA SILVA</td>
<td class="col-2 align-middle mx-auto p-0 text-center">664.041-1</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1251911/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/247" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li><li id="241" data-id="241" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">2</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ALEF DA SILVA OLIVEIRA</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1.199.560-2</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center"></td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/241" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="240" data-id="240" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">3</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ALEX ALVES CERQUEIRA</td>
<td class="col-2 align-middle mx-auto p-0 text-center">340.704-6</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1809667/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/240" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="248" data-id="248" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">6</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ALEX XAVIER PIAUI</td>
<td class="col-2 align-middle mx-auto p-0 text-center">771.513-9</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1243357/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/248" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="249" data-id="249" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">7</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ALEXANDRE DE OLIVEIRA MEDEIROS</td>
<td class="col-2 align-middle mx-auto p-0 text-center">893.604-9</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1415815/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/249" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li><li id="246" data-id="246" class="col-12 mx-auto prontuario ui-sortable-handle" style="position: relative; left: 0px; top: 0px;">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">4</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ALEX EDUARDO DE JESUS LOURENCO</td>
<td class="col-2 align-middle mx-auto p-0 text-center">236.643-3</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1392042/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/246" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="250" data-id="250" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">8</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ALEXANDRE PEREIRA DA COSTA</td>
<td class="col-2 align-middle mx-auto p-0 text-center">932.592-9</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1532754/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/250" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
</ul>
CAIXA N° 02 <ul id="c_02" class="col-12 parent mt-0 mb-2 ui-sortable">
<li id="242" data-id="242" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ALEXSANDRO HENRIQUE FRANCA CAMARGO DE MOURA</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1.224.350-7</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">2092453/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/242" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="251" data-id="251" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">2</td>
<td class="col-5 align-middle mx-auto p-0 text-left">AMAURI FERREIRA DA SILVA</td>
<td class="col-2 align-middle mx-auto p-0 text-center">613.004-1</td>
<td class="col-1 align-middle mx-auto p-0 text-center">3</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1243426/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/251" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="prontuario" data-id="243" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 bg-warning">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">3</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ANDERSON LIMA RIBEIRO GONCALVES - <span class="text-danger">(LIBERDADE)</span></td>
<td class="col-2 align-middle mx-auto p-0 text-center">1.164.179-2</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center"></td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/243" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="252" data-id="252" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">4</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ANDERSON SOUZA VELOSO</td>
<td class="col-2 align-middle mx-auto p-0 text-center">277.426-3</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center"></td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/252" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="244" data-id="244" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">5</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ANDRE ALMEIDA</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1.096.394-0</td>
<td class="col-1 align-middle mx-auto p-0 text-center">2</td>
<td class="col-2 align-middle mx-auto p-0 text-center"></td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/244" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="245" data-id="245" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">6</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ANDRE LUIZ RODRIGUES</td>
<td class="col-2 align-middle mx-auto p-0 text-center">465.133-7</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">2213488/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/245" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
</ul>
CAIXA N° 03 <ul id="c_03" class="col-12 parent mt-0 mb-2 ui-sortable">
<li id="253" data-id="253" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-5 align-middle mx-auto p-0 text-left">ANDREO LEONE FERREIRA LOBATO</td>
<td class="col-2 align-middle mx-auto p-0 text-center">719.305-5</td>
<td class="col-1 align-middle mx-auto p-0 text-center">2</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1359268/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/253" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
<li id="254" data-id="254" class="col-12 mx-auto prontuario ui-sortable-handle">
<table class="table table-hover table-sm mb-0 ">
<tbody><tr class="row col-12 mx-auto text-center">
<td class="col-1 align-middle mx-auto p-0 text-center">2</td>
<td class="col-5 align-middle mx-auto p-0 text-left">AUGUSTO PEREIRA DA SILVA</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1.094.345-4</td>
<td class="col-1 align-middle mx-auto p-0 text-center">1</td>
<td class="col-2 align-middle mx-auto p-0 text-center">1183605/2020</td>
<td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/254" title="APAGAR"><i class="fa fa-trash"></i></a></td>
</tr>
</tbody></table>
</li>
</ul>
</div>