g_sto/themes/gokbakja/pages/stock/production.htm

170 lines
8.8 KiB
HTML

title = "stock/production"
url = "/stock/production"
layout = "platform_main"
is_hidden = 0
==
<?php
function onStart(){
$this["stocksq"] = Romanah\Gokbakja\Models\Stock::orderBy("id", "desc")->where("type", "!=", "raw")->get();
}
?>
==
{% 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" />
{% endput %}
<div class="container-fluid">
<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;">Skladlar</h3>
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
</div>
<!-- <div class="col-md-6" style="text-align: right;">
<button type="button" class="btn btn-primary waves-effect waves-light"
data-bs-toggle="offcanvas" data-bs-target="#offcanvasBottom"
aria-controls="offcanvasBottom">
<i class="ri-add-line align-middle ms-2" style="font-size: 17px;"></i> Добавить
</button>
</div> -->
</div>
<table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th style="width: 5%;"></th>
<th>Ady</th>
<th>Bellik</th>
<!-- <th>Настройки</th> -->
</tr>
</thead>
<tbody>
{% for key, record in stocksq %}
<tr>
<td style="font-weight: bold;">{{key + 1}}</td>
<td>
{% if record.type == 'rulon' %}
<a href="/produced/rulon/stock/{{record.id}}" style="font-weight: bold;">{{record.name}}</a>
{% else %}
<a href="/produced/bag/stock/{{record.id}}" style="font-weight: bold;">{{record.name}}</a>
{% endif %}
</td>
<td>{{record.note}}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th style="width: 5%;"></th>
<th>Ady</th>
<th>Bellik</th>
<!-- <th>Настройки</th> -->
</tr>
</tfoot>
</table>
</div>
<!-- <div class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasBottom"
aria-labelledby="offcanvasBottomLabel">
<div class="offcanvas-header">
<h5 id="offcanvasBottomLabel">Обновить Склады</h5>
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"
aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<form class="needs-validation" novalidate action="/stocks/update" method="POST">
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label for="validationCustom01" class="form-label">Имя Склад</label>
<input type="text" class="form-control" id="validationCustom01"
placeholder="Имя Склад" name="name" value=""
required>
<div class="valid-feedback">
Правильно
</div>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="validationCustom02" class="form-label">Описание</label>
<input type="text" class="form-control" name="desc"
id="validationCustom02" placeholder="Описание"
value="" required>
<div class="valid-feedback">
Правильно
</div>
</div>
</div>
<input type="hidden" value="" name="id">
</div>
<div>
<button class="btn btn-primary" type="submit">Обновить</button>
</div>
</form>
</div>
</div> -->
<div class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasBottom"
aria-labelledby="offcanvasBottomLabel">
<div class="offcanvas-header">
<h5 id="offcanvasBottomLabel">Добавить Склад</h5>
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"
aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<form class="needs-validation" novalidate action="/stocks/create" method="POST">
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label for="validationCustom01" class="form-label">Имя Склад</label>
<input type="text" class="form-control" id="validationCustom01"
placeholder="Имя Склад" name="name" required>
<div class="valid-feedback">
Правильно
</div>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label for="validationCustom02" class="form-label">Описание</label>
<input type="text" class="form-control" name="desc" id="validationCustom02"
placeholder="Описание" required>
<div class="valid-feedback">
Правильно
</div>
</div>
</div>
</div>
<div>
<button class="btn btn-primary" type="submit">Добавить</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{% partial 'dataTableJs' %}