-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIngreso.php
379 lines (366 loc) · 14.8 KB
/
Ingreso.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<?php
include 'php/comprobacion_login.php';
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ingreso de Materiales</title>
<link rel="website icon" type="png" href="assets/icons/icon.barra.png">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/material.min.css">
<link rel="stylesheet" href="css/material-design-iconic-font.min.css">
<link rel="stylesheet" href="css/jquery.mCustomScrollbar.css">
<link rel="stylesheet" href="css/main.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/jquery-1.11.2.min.js"><\/script>')
</script>
<script src="js/material.min.js"></script>
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="js/main.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="js/nuevoIngresoMaterialScript.js"></script>
</head>
<body>
<!-- navBar -->
<div class="full-width navBar">
<div class="full-width navBar-options">
<i class="zmdi zmdi-long-arrow-left btn-menu rotate-icon" id="btn-menu" style="margin: 1%; font-size: 24px;"></i>
<div class="mdl-tooltip" for="btn-menu">Menu</div>
<nav class="navBar-options-list">
<ul class="list-unstyle">
<li class="btn-exit" id="btn-exit">
<i class="zmdi zmdi-power"></i>
<div class="mdl-tooltip" for="btn-exit">Cerrar Sesion</div>
</li>
<?php echo htmlspecialchars($nombreCompleto); ?>
<li class="noLink">
<figure>
<img src="assets/img/avatar-male.png" alt="Avatar" class="img-responsive">
</figure>
</li>
</ul>
</nav>
</div>
</div>
<!-- navLateral -->
<section class="full-width navLateral">
<div class="full-width navLateral-bg btn-menu"></div>
<div class="full-width navLateral-body">
<div class="full-width navLateral-body-logo text-center tittles">
<i class="zmdi zmdi-close btn-menu"></i> MuebleTech
</div>
<!-- Sección del nombre y rol del usuario -->
<figure class="full-width" style="height: 77px;">
<div class="navLateral-body-cl">
<img src="assets/img/avatar-male.png" alt="Avatar" class="img-responsive">
</div>
<figcaption class="navLateral-body-cr hide-on-tablet">
<span>
<?php echo htmlspecialchars($nombreCompleto); ?>
<br>
<small><?php echo htmlspecialchars($rol); ?></small>
</span>
</figcaption>
</figure>
<div class="full-width tittles navLateral-body-tittle-menu">
<i class="zmdi zmdi-desktop-mac"></i><span class="hide-on-tablet"> Tablero</span>
</div>
<nav class="full-width">
<ul class="full-width list-unstyle menu-principal">
<li class="full-width">
<a href="home.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-view-dashboard mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
HOME
</div>
</a>
</li>
<li class="full-width divider-menu-h"></li>
<li class="full-width">
<a href="#!" class="full-width btn-subMenu">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-washing-machine mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
ORDENES DE TRABAJO
</div>
<span class="zmdi zmdi-chevron-left"></span>
</a>
<ul class="full-width menu-principal sub-menu-options">
<li class="full-width">
<a href="crear_ot.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-accounts mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
CREACION DE OT
</div>
</a>
</li>
<li class="full-width">
<a href="editar.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi material-symbols-outlined mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
EDITAR OT
</div>
</a>
</li>
<li class="full-width">
<a href="asignacion_material.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-store mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
ASIGNACION DE MATERIAL
</div>
</a>
</li>
</ul>
</li>
<li class="full-width divider-menu-h"></li>
<li class="full-width">
<a href="#!" class="full-width btn-subMenu">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-store mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
INVENTARIO
</div>
<span class="zmdi zmdi-chevron-left"></span>
</a>
<ul class="full-width menu-principal sub-menu-options">
<li class="full-width">
<a href="Salida.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-truck mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
SALIDA DE MATERIAL
</div>
</a>
</li>
<li class="full-width">
<a href="Ingreso.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-truck reverso mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
INGRESO DE MATERIAL
</div>
</a>
</li>
<li class="full-width">
<a href="stock.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-widgets"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
STOCK
</div>
</a>
</li>
<li class="full-width">
<a href="crear.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-label mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
CREAR MATERIAL - FAMILIA
</div>
</a>
</li>
</ul>
</li>
<li class="full-width divider-menu-h"></li>
<li class="full-width">
<a href="cotizacion.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-shopping-cart mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
COTIZACION
</div>
</a>
</li>
<li class="full-width divider-menu-h"></li>
<li class="full-width">
<a href="Solicitud_compra.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-balance mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
SOLICITUD DE COMPRA
</div>
</a>
</li>
<li class="full-width divider-menu-h"></li>
<li class="full-width">
<a href="#!" class="full-width btn-subMenu">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-face mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
ADMINISTRADOR
</div>
<span class="zmdi zmdi-chevron-left"></span>
</a>
<ul class="full-width menu-principal sub-menu-options">
<li class="full-width">
<a href="admin.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-account mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
NUEVO USUARIO
</div>
</a>
</li>
<li class="full-width">
<a href="reportes.php" class="full-width">
<div class="navLateral-body-cl">
<i class="zmdi zmdi-label mover"></i>
</div>
<div class="navLateral-body-cr hide-on-tablet">
REPORTES
</div>
</a>
</li>
</ul>
</li>
</ul>
</nav>
</div>
</section>
<!-- pageContent -->
<section class="full-width pageContent">
<section class="full-width header-well">
<div class="full-width header-well-icon">
<i class="zmdi zmdi-truck reverso"></i>
</div>
<div class="full-width header-well-text">
<p class="text-condensedLight" style="width: 90%;">
Aquí se realizarán las asignaciones y salidas de materiales para cada orden de trabajo
correspondiente.
</p>
</div>
</section>
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
<div class="mdl-tabs__tab-bar">
<a href="#tabNewIngreso" class="mdl-tabs__tab is-active">NUEVO</a>
<!-- <a href="#tabListIngreso" class="mdl-tabs__tab">HISTORICO</a> -->
</div>
<div class="mdl-tabs__panel is-active" id="tabNewIngreso">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col-phone mdl-cell--8-col-tablet mdl-cell--8-col-desktop mdl-cell--2-offset-desktop">
<div class="full-width panel mdl-shadow--2dp">
<div class="full-width panel-tittle bg-primary text-center tittles">
Nuevo Ingreso de Material
</div>
<div class="full-width panel-content">
<form id="formulario-movimiento-material">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col-phone mdl-cell--8-col-tablet mdl-cell--6-col-desktop">
<!-- Campos para la búsqueda de Codigo de Material -->
<div style="display: flex; align-items: flex-start;">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="id_material" name="id_material">
<label class="mdl-textfield__label" for="id_material">Codigo de Material</label>
</div>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored bg-primary" id="buscar-material-btn" style="margin: 3%;">Buscar Material</button>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="nombre_material" name="nombre_material">
<label class="mdl-textfield__label" for="nombre_material">Nombre del Material</label>
</div>
<div id="listaResultados" style="position: absolute; z-index: 1000; background: white; width: 300px;">
<!-- Los resultados de búsqueda se mostrarán aquí -->
</div>
</div>
<div class="mdl-cell mdl-cell--4-col-phone mdl-cell--8-col-tablet mdl-cell--6-col-desktop">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="numero_factura" name="numero_factura">
<label class="mdl-textfield__label" for="numero_factura">Número de Factura</label>
<span class="mdl-textfield__error">Por favor, ingrese un dato valido</span>
</div>
</div>
</div>
<!-- Campos para visualizar informacion -->
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col-phone mdl-cell--8-col-tablet mdl-cell--6-col-desktop">
<p>Nombre: <strong><span id="nombreMaterial" contenteditable="true"></strong></span> </p>
</div>
<div class="mdl-cell mdl-cell--4-col-phone mdl-cell--8-col-tablet mdl-cell--6-col-desktop">
<p>Valor: <strong><span id="valorMaterial" contenteditable="true"></strong></span></p>
</div>
<div class="mdl-cell mdl-cell--4-col-phone mdl-cell--8-col-tablet mdl-cell--6-col-desktop">
<p>Unidad de Medida: <strong><span id="unidadMedida" contenteditable="true"></strong></span></p>
</div>
</div>
<!-- Otros campos del formulario -->
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col-phone mdl-cell--8-col-tablet mdl-cell--6-col-desktop">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="number" step="1" id="cantidad" name="cantidad">
<label class="mdl-textfield__label" for="cantidad">Cantidad</label>
<span class="mdl-textfield__error">Por favor, ingrese un número entero.</span>
</div>
</div>
<div class="mdl-cell mdl-cell--4-col-phone mdl-cell--8-col-tablet mdl-cell--6-col-desktop">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="descripcion" name="descripcion">
<label class="mdl-textfield__label" for="descripcion">Descripción</label>
</div>
</div>
</div>
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col-phone mdl-cell--8-col-tablet mdl-cell--6-col-desktop">
<!-- Botón para agregar más materiales -->
<button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored bg-primary" id="agregar-material-btn">
Agregar Material
</button>
</div>
</div>
<!-- Tabla para mostrar los materiales agregados -->
<h4 style="text-align: center;">Materiales Agregados</h4>
<div style="text-align: center; overflow-x: auto;">
<table border="1" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp" id="materiales-table" style="margin: 0 auto; width: 60%;">
<thead>
<tr>
<th style="text-align: center;">Código de Material</th>
<th style="text-align: center;">Nombre</th>
<th style="text-align: center;">Cantidad</th>
<th style="text-align: center;">Acciones</th>
</tr>
</thead>
<tbody>
<!-- Aquí se llenarán los materiales agregados dinámicamente -->
</tbody>
</table>
</div>
<br>
<!-- Botón para guardar el movimiento -->
<div style="text-align: center;">
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored bg-primary" id="guardar-movimiento-btn">
Guardar Movimiento
</button>
</div>
<!-- Información Enviada al PHP -->
<div id="mensaje"></div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</body>
</html>