g_sto/themes/gokbakja/pages/sewer/new.htm

259 lines
12 KiB
HTML
Raw Normal View History

2023-10-04 20:51:27 +00:00
title = "sewer/new"
url = "/sewer/new"
layout = "platform_main"
is_hidden = 0
[sewer]
==
<?php
function onStart(){
2023-11-23 13:47:30 +00:00
$this["shifts"] = Romanah\Gokbakja\Models\Shift::get();
$this["sewerMachines"] = Romanah\Gokbakja\Models\SewerMachine::get();
2023-10-20 21:54:07 +00:00
//dd($pivotSewersWorking);
2023-11-06 21:06:48 +00:00
$stock = Romanah\Gokbakja\Models\Stock::where("type", 'rulon')->first();
$stockId = $stock->id;
$this["rulonsInStock"] = Romanah\Gokbakja\Models\RulonAction::select('romanah_gokbakja_rulon_action.*')
->with(['product' => function($q){
2023-11-23 13:47:30 +00:00
$q->with(['bag_type', 'bag_size', 'color', 'machine']);
2023-11-06 21:06:48 +00:00
}])
->where("stock_id", $stockId)
->addSelect(DB::raw("SUM(amount) as quantity"))
->groupBy('romanah_gokbakja_rulon_action.product_id')
2023-11-07 19:42:21 +00:00
->orderBy('id', 'DESC')
2023-11-06 21:06:48 +00:00
->get();
2023-10-20 21:54:07 +00:00
2023-10-04 20:51:27 +00:00
}
?>
==
{% put styles %}
<link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet"
type="text/css" />
<link href="{{'assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css'|theme}}" rel="stylesheet"
type="text/css" />
<link href="{{'assets/libs/datatables.net-select-bs4/css/select.bootstrap4.min.css'|theme}}" rel="stylesheet"
type="text/css" />
<link href="{{'assets/libs/select2/css/select2.min.css'|theme}}" rel="stylesheet" type="text/css">
{% endput %}
<div class="container-fluid">
<div class="row">
2023-11-19 21:37:53 +00:00
{% if crudSewerProduction %}
2023-10-04 20:51:27 +00:00
<div class="col-md-12">
<div class="collapse multi-collapse" id="multiCollapseExample1">
<form data-request="onCreateSewerProduction" data-request-flash>
<div class="card">
<div class="card-body">
<div class="row">
2023-10-22 23:05:55 +00:00
<div class="col">
2023-11-23 13:47:30 +00:00
<label class="form-label">Smen Saýlaň</label>
<select class="form-control select2" name="shift_id">
2023-10-04 20:51:27 +00:00
<option value="0">Saýla</option>
2023-11-23 13:47:30 +00:00
{% for shift in shifts %}
<option value="{{shift.id}}">{{shift.desc}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<label class="form-label">Stanok Saýlaň</label>
<select class="form-control select2" name="sewer_machine_id">
<option value="0">Saýla</option>
{% for sewerMachine in sewerMachines %}
<option value="{{sewerMachine.id}}">{{sewerMachine.name}}</option>
2023-10-04 20:51:27 +00:00
{% endfor %}
</select>
</div>
2023-10-20 21:54:07 +00:00
2023-10-22 23:05:55 +00:00
<div class="col">
<label class="form-label">Sene</label>
<div class="input-group" id="datepicker2">
<input type="text" class="form-control" name="date" placeholder="Sene"
data-date-format="d.m.yyyy" data-date-container='#datepicker2' data-provide="datepicker"
2023-11-23 13:47:30 +00:00
data-date-autoclose="true" required>
2023-10-22 23:05:55 +00:00
<span class="input-group-text"><i class="mdi mdi-calendar"></i></span>
</div>
</div>
2023-10-20 21:54:07 +00:00
<div class="col-3">
<label class="form-label">Rulon Saýlaň</label>
2023-11-06 21:06:48 +00:00
<select class="form-control select2" name="rulon_action_id">
2023-10-20 21:54:07 +00:00
<option value="0">Saýla</option>
2023-11-06 21:06:48 +00:00
{% for machineProduction in rulonsInStock %}
{% if machineProduction.quantity > 0 %}
2023-10-20 21:54:07 +00:00
<option value="{{machineProduction.id}}">
2023-11-06 21:06:48 +00:00
#Rulon{{machineProduction.product_id}}-
2023-11-23 13:47:30 +00:00
{{machineProduction.product.machine.name}} /
{{machineProduction.product.width}} x
{{machineProduction.product.gram}} m2,
{{machineProduction.product.bag_type.name}},
{{machineProduction.product.color.name}}
2023-10-20 21:54:07 +00:00
2023-11-06 21:06:48 +00:00
--({{machineProduction.quantity}} kg)
2023-10-20 21:54:07 +00:00
</option>
2023-11-06 21:06:48 +00:00
{% endif %}
2023-10-20 21:54:07 +00:00
{% endfor %}
</select>
</div>
<div class="col">
<div>
<label class="form-label">Halta Ini</label>
<input type="number" name="width" step="0.01" class="form-control"
2023-11-23 13:47:30 +00:00
placeholder="Halta Ini" required>
2023-10-20 21:54:07 +00:00
</div>
</div>
2023-10-04 20:51:27 +00:00
<div class="col">
<div>
2023-10-20 21:54:07 +00:00
<label class="form-label">Halta Boýy</label>
2023-10-04 20:51:27 +00:00
2023-10-20 21:54:07 +00:00
<input type="number" name="height" step="0.01" class="form-control"
2023-11-23 13:47:30 +00:00
placeholder="Halta Boýy" required>
2023-10-04 20:51:27 +00:00
</div>
</div>
<div class="col">
<div>
2023-11-01 21:07:33 +00:00
<label class="form-label">Halta agramy (gr)</label>
2023-10-04 20:51:27 +00:00
2023-11-01 21:07:33 +00:00
<input type="number" step="0.01" name="bag_gram" class="form-control"
2023-11-23 13:47:30 +00:00
placeholder="Halta gramy" required>
2023-10-04 20:51:27 +00:00
</div>
</div>
2023-10-20 21:54:07 +00:00
2023-11-23 13:47:30 +00:00
2023-10-04 20:51:27 +00:00
<div class="col">
<div>
<label class="form-label">Bellik</label>
2023-10-20 21:54:07 +00:00
<input type="text" name="note" class="form-control" placeholder="Bellik">
2023-10-04 20:51:27 +00:00
</div>
</div>
<div class="col">
<button type="submit" class="btn btn-primary waves-effect waves-light"
style="margin-top: 30px;width: 100%;">Goş</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
2023-11-19 21:37:53 +00:00
{% endif %}
2023-10-04 20:51:27 +00:00
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-6">
2023-11-23 13:47:30 +00:00
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Halta Tikýän Staboklar</h3>
<p class="card-title-desc" style="color: #6c6ff5;">Hasabaty</p>
2023-10-04 20:51:27 +00:00
</div>
<div class="col-md-6" style="text-align: right;">
2023-11-19 21:37:53 +00:00
{% if crudSewerProduction %}
2023-10-04 20:51:27 +00:00
<a class="btn btn-primary" data-bs-toggle="collapse" href="#multiCollapseExample1"
role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Täze
Maglumat</a>
2023-11-19 21:37:53 +00:00
{% endif %}
2023-10-04 20:51:27 +00:00
</div>
</div>
2023-10-20 21:54:07 +00:00
<!-- <h1>{{machineProductions}}</h1> -->
2023-10-04 20:51:27 +00:00
<table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
style="border-collapse: collapse; border-spacing: 0; width: 100%;" data-page-length='13'>
<thead>
<tr>
2023-11-23 13:47:30 +00:00
<td rowspan="2">No</td>
<th rowspan="2">Senesi</th>
<th rowspan="2">Önümçilik No</th>
<th colspan="2">Berilen Rulon</th>
<th colspan="3">Halta Maglumaty</th>
<th colspan="3">Tikilen Halta</th>
<th colspan="2" >Ulanylan Rulon</th>
<th rowspan="2">Status</th>
<th rowspan="2">Bellik</th>
<th rowspan="2">Sazlamalar</th>
</tr>
<tr>
2023-10-20 21:54:07 +00:00
<th>Rulon Görnüş</th>
2023-10-04 20:51:27 +00:00
<th>Çig mal mukdary</th>
2023-11-23 13:47:30 +00:00
<th>Halta Görnüş</th>
<th>Stanok</th>
<th>Gram</th>
<th>Halta (arassa)</th>
2023-11-21 19:52:16 +00:00
<th>BRAK Halta</th>
2023-11-23 13:47:30 +00:00
<th>Sürülmedik</th>
2023-10-20 21:54:07 +00:00
<th>Ulanylan</th>
<th>Galyndy</th>
2023-11-23 13:47:30 +00:00
2023-10-04 20:51:27 +00:00
<!-- <th>Настройки</th> -->
</tr>
</thead>
<tbody id="sewer_datas">
{% component 'sewer' %}
</tbody>
<tfoot>
<tr>
<th style="width: 5%;"></th>
2023-11-23 13:47:30 +00:00
<th>Senesi</th>
2023-10-20 21:54:07 +00:00
<th>Önümçilik No</th>
<th>Rulon Görnüş</th>
2023-10-04 20:51:27 +00:00
<th>Çig mal mukdary</th>
2023-11-23 13:47:30 +00:00
<th>Halta Görnüş</th>
<th>Stanok</th>
<th>Gram</th>
<th>Halta (arassa)</th>
2023-11-21 19:52:16 +00:00
<th>BRAK Halta</th>
2023-11-23 13:47:30 +00:00
<th>Sürülmedik</th>
2023-10-20 21:54:07 +00:00
<th>Ulanylan</th>
<th>Galyndy</th>
<th>Status</th>
2023-10-04 20:51:27 +00:00
<th>Bellik</th>
2023-10-20 21:54:07 +00:00
<th>Sazlamalar</th>
2023-10-04 20:51:27 +00:00
</tr>
</tfoot>
</table>
</div>
2023-10-20 21:54:07 +00:00
<div class="modal fade bs-example-modal-sm-1" tabindex="-1" role="dialog"
aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content" id="modal-form">
2023-10-04 20:51:27 +00:00
2023-10-20 21:54:07 +00:00
</div>
</div>
</div>
2023-10-04 20:51:27 +00:00
</div>
</div>
</div>
</div>
{% put scripts %}
2023-10-22 23:05:55 +00:00
<script src="{{'assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js'|theme}}"></script>
2023-10-04 20:51:27 +00:00
<script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script>
<script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script>
{% endput %}
{% partial 'dataTableJs' %}