Update 2022-03-07
This commit is contained in:
@ -257,14 +257,33 @@ function changeProyecto() {
|
||||
});
|
||||
$('#unidades').show();
|
||||
});
|
||||
$.post('{!!url('', ['p' => 'ajax', 'a' => 'operadores', 'ajax' => true])!!}', {"proyecto": proyecto}, function(data) {
|
||||
var operadores = $("select[name='operador']");
|
||||
operadores.html('').append($('<option></option>').attr('value', 0).html('---'));
|
||||
var info = $.parseJSON(data);
|
||||
$.each(info, function(i, e) {
|
||||
operadores.append($('<option></option>').attr('value', e.id).html(e.abreviacion));
|
||||
});
|
||||
$.ajax({
|
||||
url: 'https://provm.cl:8001/proyecto/' + proyecto + '/operadores',
|
||||
method: 'get',
|
||||
dataType: 'json'
|
||||
}).then(function(data) {
|
||||
var operadoress = $("select[name='operador']");
|
||||
operadores.html('').append($('<option></option>').attr('value', 0).html('---'));
|
||||
$.each(data.operadores, function(i, e) {
|
||||
operadores.append($('<option></option>').attr('value', e.id).html(e.operador.abreviacion));
|
||||
});
|
||||
|
||||
});
|
||||
/*$.getJSON('http://provm.cl:8001/proyecto/' + proyecto + '/operadores', function(data) {
|
||||
var operadores = $("select[name='operador']");
|
||||
operadores.html('').append($('<option></option>').attr('value', 0).html('---'));
|
||||
$.each(data.operadores, function(i, e) {
|
||||
operadores.append($('<option></option>').attr('value', e.id).html(e.operador.abreviacion));
|
||||
});
|
||||
});
|
||||
$.post('{!!url('', ['p' => 'ajax', 'a' => 'operadores', 'ajax' => true])!!}', {"proyecto": proyecto}, function(data) {
|
||||
var operadores = $("select[name='operador']");
|
||||
operadores.html('').append($('<option></option>').attr('value', 0).html('---'));
|
||||
var info = $.parseJSON(data);
|
||||
$.each(info, function(i, e) {
|
||||
operadores.append($('<option></option>').attr('value', e.id).html(e.abreviacion));
|
||||
});
|
||||
});*/
|
||||
}
|
||||
function agregarUnidad(tipo, name) {
|
||||
var proyecto = $("select[name='proyecto']").val();
|
||||
|
Reference in New Issue
Block a user