g_sto/themes/gokbakja/pages/machine/machine.htm

219 lines
8.7 KiB
HTML
Raw Normal View History

2023-09-19 19:52:14 +00:00
title = "machine"
url = "/machine"
layout = "platform_main"
is_hidden = 0
2023-09-22 14:20:57 +00:00
2023-09-23 20:10:26 +00:00
[builderList]
modelClass = "Romanah\Gokbakja\Models\Building"
scope = "-"
scopeValue = "{{ :scope }}"
displayColumn = "id"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
[builderList builderList2]
modelClass = "Romanah\Gokbakja\Models\Machine"
scope = "-"
scopeValue = "{{ :scope }}"
displayColumn = "id"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
[builderList builderList3]
modelClass = "Romanah\Gokbakja\Models\BagSize"
scope = "-"
scopeValue = "{{ :scope }}"
displayColumn = "id"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
[builderList builderList4]
modelClass = "Romanah\Gokbakja\Models\BagType"
scope = "-"
scopeValue = "{{ :scope }}"
displayColumn = "id"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
[production]
2023-09-22 14:20:57 +00:00
==
<?php
2023-09-23 20:10:26 +00:00
function onStart(){
2023-09-22 14:20:57 +00:00
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
$currentDateFormat = Carbon\Carbon::now()->format('Y-m-d');
$this["currentDate"] = $currentDate;
$this["currentMonth"] = $currentDate->format('m');
$this["currentYear"] = $currentDate->format('Y');
2023-09-23 20:10:26 +00:00
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::with(['bag_type', 'bag_size', 'machine.building', 'employee', 'mechanic'])->whereDate('created_at', date($currentDateFormat))->get();
2023-09-22 14:20:57 +00:00
}
?>
==
{% set records = builderList.records %}
{% set displayColumn = builderList.displayColumn %}
{% set noRecordsMessage = builderList.noRecordsMessage %}
{% set detailsPage = builderList.detailsPage %}
{% set detailsKeyColumn = builderList.detailsKeyColumn %}
{% set detailsUrlParameter = builderList.detailsUrlParameter %}
2023-09-23 20:10:26 +00:00
{% set machines = builderList2.records %}
{% set types = builderList3.records %}
{% set sizes = builderList4.records %}
2023-09-22 14:20:57 +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" />
2023-09-23 20:10:26 +00:00
<link href="{{'assets/libs/select2/css/select2.min.css'|theme}}" rel="stylesheet" type="text/css">
2023-09-22 14:20:57 +00:00
{% endput %}
<div class="container-fluid">
<div class="row">
2023-10-04 20:51:27 +00:00
<div class="col-md-12">
<div class="collapse multi-collapse" id="multiCollapseExample1">
<div class="card card-body">
<form data-request="onCreateMachineProduction">
<div class="row">
<div class="col">
<select class="form-control select2" name="machine_id">
<option>Enjam Saýla</option>
{% for machine in machines %}
<option value="{{machine.id}}">{{machine.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<select class="form-control select2" name="size_id">
<option>Ölçeg Saýla</option>
{% for size in sizes %}
<option value="{{size.id}}">{{size.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<select class="form-control select2" name="type_id">
<option>Görnüş Saýla</option>
{% for type in types %}
<option value="{{type.id}}">{{type.name}}</option>
{% endfor %}
</select>
</div>
<div class="col">
<input type="number" name="produced_weight" class="form-control"
placeholder="Mukdar (kg)">
</div>
<div class="col">
<input type="text" name="note" class="form-control" placeholder="Bellik">
</div>
<div class="col">
<button type="submit" class="btn btn-primary waves-effect waves-light" style="width: 100%;">Goş</button>
</div>
</div>
</form>
</div>
</div>
</div>
2023-09-22 14:20:57 +00:00
<div class="col-md-12">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-6">
2023-09-23 20:10:26 +00:00
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Enjamlar boýunça
({{currentDate|date('d.m.Y | H:i')}})</h3>
2023-09-22 14:20:57 +00:00
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
</div>
2023-10-04 20:51:27 +00:00
<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>
2023-09-22 14:20:57 +00:00
</div>
2023-09-23 20:10:26 +00:00
<!-- <h1>{{machineProductions}}</h1> -->
2023-10-04 20:51:27 +00:00
2023-09-23 20:10:26 +00:00
2023-09-22 14:20:57 +00:00
<table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
style="border-collapse: collapse; border-spacing: 0; width: 100%;">
2023-09-23 20:10:26 +00:00
2023-09-22 14:20:57 +00:00
<thead>
<tr>
<th style="width: 5%;"></th>
<th>Bina No</th>
<th>Enjam No</th>
2023-09-23 20:10:26 +00:00
<th>Ölçegi</th>
<th>Görnüşi</th>
2023-09-22 14:20:57 +00:00
<th>Önen Önüm (kg)</th>
<th>Ady Familiýasy</th>
<th>Mehanik</th>
<th>Bellik</th>
<!-- <th>Настройки</th> -->
</tr>
</thead>
<tbody>
{% for key, machine in machineProductions %}
<tr>
<td style="font-weight: bold;">{{key + 1}}</td>
2023-09-23 20:10:26 +00:00
<td><a href="#" style="font-weight: bold;">{{machine.building_name}}</a></td>
<td>{{machine.machine.name}}</td>
<td>{{machine.bag_size.name}}</td>
<td>{{machine.bag_type.name}}</td>
<td><span class="badge badge-soft-success"
2023-10-04 20:51:27 +00:00
style="font-size: 14px;">{{machine.produced_weight|number_format}} kg</span>
</td>
2023-09-23 20:10:26 +00:00
<td>{{machine.employee_name}}</td>
<td>{{machine.mechanic_name}}</td>
<td>{{machine.note}}</td>
2023-09-22 14:20:57 +00:00
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th style="width: 5%;"></th>
<th>Bina No</th>
<th>Enjam No</th>
2023-09-23 20:10:26 +00:00
<th>Ölçegi</th>
<th>Görnüşi</th>
2023-09-22 14:20:57 +00:00
<th>Önen Önüm (kg)</th>
<th>Ady Familiýasy</th>
<th>Mehanik</th>
<th>Bellik</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
2023-09-23 20:10:26 +00:00
{% 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 %}
2023-09-22 14:20:57 +00:00
{% partial 'dataTableJs' %}