2023-10-04 20:51:27 +00:00
|
|
|
title = "sewer/new"
|
|
|
|
|
url = "/sewer/new"
|
|
|
|
|
layout = "platform_main"
|
|
|
|
|
is_hidden = 0
|
|
|
|
|
|
|
|
|
|
[sewer]
|
|
|
|
|
==
|
|
|
|
|
<?php
|
|
|
|
|
function onStart(){
|
|
|
|
|
$this["employees"] = Romanah\Gokbakja\Models\Employee::where("status", 1)->where("is_sewer", 1)->get();
|
2023-10-20 21:54:07 +00:00
|
|
|
|
|
|
|
|
$pivotSewersWorking = Romanah\Gokbakja\Models\PivotSewer::select('id', 'status', 'machine_production_id')
|
|
|
|
|
->where('status', 'working')
|
|
|
|
|
->get()
|
|
|
|
|
->pluck('machine_production_id')
|
|
|
|
|
->toArray();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//dd($pivotSewersWorking);
|
|
|
|
|
|
|
|
|
|
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::with(['bag_type', 'bag_size', 'machine.building', 'employee', 'mechanic', 'color'])
|
|
|
|
|
->whereNotIn('id', $pivotSewersWorking)
|
|
|
|
|
->where('is_finished', '!=', 1)
|
|
|
|
|
->withCount([
|
|
|
|
|
'pivot_sewer AS leftSum' => function ($query) {
|
|
|
|
|
$query->select(DB::raw("(amount - SUM(spent_amount)) as leftSum"))->where('status', 'complated');
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
->orderBy('id', 'DESC')
|
|
|
|
|
->get();
|
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-10-20 21:54:07 +00:00
|
|
|
|
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-20 21:54:07 +00:00
|
|
|
<div class="col-3">
|
2023-10-04 20:51:27 +00:00
|
|
|
<label class="form-label">Tikinçi Saýlaň</label>
|
|
|
|
|
<select class="form-control select2" name="employee_id">
|
|
|
|
|
<option value="0">Saýla</option>
|
|
|
|
|
{% for employee in employees %}
|
|
|
|
|
<option value="{{employee.id}}">{{employee.name}}</option>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
2023-10-20 21:54:07 +00:00
|
|
|
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
<label class="form-label">Rulon Saýlaň</label>
|
|
|
|
|
<select class="form-control select2" name="machine_production_id">
|
|
|
|
|
<option value="0">Saýla</option>
|
|
|
|
|
{% for machineProduction in machineProductions %}
|
|
|
|
|
<option value="{{machineProduction.id}}">
|
|
|
|
|
#{{machineProduction.id}}-
|
|
|
|
|
{{machineProduction.bag_size.width}} x
|
|
|
|
|
{{machineProduction.bag_size.height}} m2,
|
|
|
|
|
{{machineProduction.bag_type.name}}, {{machineProduction.color.name}}
|
|
|
|
|
|
|
|
|
|
{% if machineProduction.leftSum != 0 %}
|
|
|
|
|
({{machineProduction.leftSum|number_format(2)}} kg galyndy)
|
|
|
|
|
{% else %}
|
|
|
|
|
({{machineProduction.produced_weight|number_format(2)}} kg)
|
|
|
|
|
{% endif %}
|
|
|
|
|
</option>
|
|
|
|
|
{% 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"
|
|
|
|
|
placeholder="Halta Ini">
|
|
|
|
|
</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"
|
|
|
|
|
placeholder="Halta Boýy">
|
2023-10-04 20:51:27 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div>
|
|
|
|
|
<label class="form-label">Tikilen Halta</label>
|
|
|
|
|
|
|
|
|
|
<input type="number" name="produced_bag_qty" class="form-control"
|
|
|
|
|
placeholder="tikilen halta sany">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-10-20 21:54:07 +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>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Tikinçiler boýunça</h3>
|
|
|
|
|
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6" style="text-align: right;">
|
|
|
|
|
<a class="btn btn-primary" data-bs-toggle="collapse" href="#multiCollapseExample1"
|
|
|
|
|
role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Täze
|
|
|
|
|
Maglumat</a>
|
|
|
|
|
</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>
|
|
|
|
|
<th style="width: 5%;">№</th>
|
2023-10-20 21:54:07 +00:00
|
|
|
<th>Önümçilik No</th>
|
|
|
|
|
<th>Halta Görnüş</th>
|
|
|
|
|
<th>Rulon Görnüş</th>
|
2023-10-04 20:51:27 +00:00
|
|
|
<th>Tikinçi</th>
|
|
|
|
|
<th>Senesi</th>
|
|
|
|
|
<th>Çig mal mukdary</th>
|
|
|
|
|
<th>Tikilen Halta</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
|
|
|
<!-- <th>Настройки</th> -->
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="sewer_datas">
|
|
|
|
|
|
|
|
|
|
{% component 'sewer' %}
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
<tfoot>
|
|
|
|
|
<tr>
|
|
|
|
|
<th style="width: 5%;">№</th>
|
2023-10-20 21:54:07 +00:00
|
|
|
<th>Önümçilik No</th>
|
|
|
|
|
<th>Halta Görnüş</th>
|
|
|
|
|
<th>Rulon Görnüş</th>
|
2023-10-04 20:51:27 +00:00
|
|
|
<th>Tikinçi</th>
|
|
|
|
|
<th>Senesi</th>
|
|
|
|
|
<th>Çig mal mukdary</th>
|
|
|
|
|
<th>Tikilen Halta</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 %}
|
|
|
|
|
<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' %}
|