Добавлен расширенный отчет по реализации
Добавлен монитор активности
This commit is contained in:
miroman-afk
2023-08-03 11:05:15 +03:00
parent 19ad7d1c8a
commit c4dc6e02a0
93 changed files with 13328 additions and 1122 deletions

View File

@@ -0,0 +1,102 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" ng-click="backModal('order', 'orders')">
<i class="material-icons md-24">arrow_back</i>
</button>
<p style="margin-bottom: -0.1rem;">Номер заказа: <strong>#{{order.order_id}}</strong><br></p>
<p style="margin-bottom: -0.1rem;">Заказ размещен в зале "<strong>{{order.place}}</strong>" на столе №<strong>{{order.table}}</strong><br></p>
<p style="margin-bottom: -0.1rem;">Время открытия: <strong>{{order.opened}}</strong><br></p>
<p style="margin-bottom: -0.1rem;" ng-if="order.closed">Время закрытия: <strong>{{order.closed}}</strong><br></p>
<p style="margin-bottom: -0.1rem;">Заказ открыт пользователем: <strong>{{order.who_open}}</strong><br></p>
<p style="margin-bottom: -0.1rem;" ng-if="order.who_close">Заказ закрыт пользователем: <strong>{{order.who_close}}</strong><br></p>
<p style="margin-bottom: -0.1rem;">Статус заказа: <span class="label success">{{order.order_status}}</span><br></p>
</div>
<div class="modal-body p-lg">
<div class="table-responsive">
<table class="table table-striped white b-a">
<thead>
<tr>
<th>ID</th>
<th>Блюдо</th>
<th style="width: 80px">Кол-во</th>
<th style="width: 80px" ng-if="order.returned_count > 0">Кол-во возвр.</th>
<th style="width: 80px" ng-if="order.deleted_count > 0">Кол-во удал.</th>
<th style="width: 140px">Стоимость</th>
<th style="width: 180px">Итог</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in order.items">
<td>{{item.id}}</td>
<td>{{item.name}}</td>
<td>{{item.count * item.cof}}</td>
<td ng-if="order.returned_count > 0">{{item.returned_count * item.cof}}</td>
<td ng-if="order.deleted_count > 0">{{item.deleted_count * item.cof}}</td>
<td>{{item.price | curr}} BYN</td>
<td>{{item.amount | curr}} BYN <p ng-if="item.discount > 0">
<span>(Скидка: {{item.discount}}%)</span></p></td>
</tr>
<tr>
<td colspan="{{cols - 1}}" class="text-right">
<strong ng-if="order.returned_count > 0">Сумма</strong>
<strong ng-if="order.returned_count == 0">Итого</strong>
</td>
<td>{{order.amount | curr}} BYN</td>
</tr>
<tr>
<td colspan="{{cols - 1}}" class="text-right no-border" ng-if="order.full_price - order.amount > 0">
<strong>Сумма скидки</strong></td>
<td ng-if="order.full_price - order.amount > 0">{{order.full_price - order.amount | curr}} BYN
</td>
</tr>
<tr ng-if="order.cash > 0 || order.credit > 0 || order.clearing > 0 || order.presale > 0 || order.self > 0 || order.online > 0">
<td colspan="{{cols - 1}}" class="text-right no-border"><strong>Оплачено:</strong></td>
</tr>
<tr ng-if="order.cash > 0">
<td colspan="{{cols}}" class="text-right no-border">Наличные: <strong>{{order.cash
| curr}} BYN</strong></td>
</tr>
<tr ng-if="order.credit > 0">
<td colspan="{{cols}}" class="text-right no-border">Кред. карта: <strong>{{order.credit | curr}}
BYN</strong></td>
</tr>
<tr ng-if="order.clearing > 0">
<td colspan="{{cols}}" class="text-right no-border">Питание штата: <strong>{{order.clearing | curr}}
BYN</strong>
</tr>
<tr ng-if="order.presale > 0">
<td colspan="{{cols}}" class="text-right no-border">Зачтен аванс: <strong>{{order.presale | curr}}
BYN</strong></td>
</tr>
<tr ng-if="order.self > 0">
<td colspan="{{cols}}" class="text-right no-border">Безнал: <strong>{{order.self | curr}} BYN</strong>
</td>
</tr>
<tr ng-if="order.online > 0">
<td colspan="{{cols}}" class="text-right no-border">Онлайн: <strong>{{order.online | curr}} BYN</strong>
</td>
</tr>
<tr ng-if="order.returned_count > 0">
<td colspan="{{cols - 1}}" class="text-right"><strong>Возвращено:</strong></td>
</tr>
<tr ng-if="order.returned_method.cash > 0">
<td colspan="{{cols}}" class="text-right no-border">Наличные: <strong>{{order.returned_method.cash
| curr}} BYN</strong></td>
</tr>
<tr ng-if="order.returned_method.credit > 0">
<td colspan="{{cols}}" class="text-right no-border">Кред. карта: <strong>{{order.returned_method.credit | curr}}
BYN</strong></td>
</tr>
<tr ng-if="order.returned_count > 0">
<td colspan="{{cols - 1}}" class="text-right"><strong>Итого</strong></td>
<td>{{order.amount - order.returned_sum | curr}} BYN</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,232 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button ng-if="orders_modal" type="button" class="close" ng-click="backModal('order', 'orders')">
<i class="material-icons md-24">arrow_back</i>
</button>
<button ng-if="clients_modal" type="button" class="close" data-dismiss="modal">&times;</button>
<p style="margin-bottom: -0.1rem;">Номер заказа: <strong>#{{order.order_id}}</strong><br></p>
<p style="margin-bottom: -0.1rem;">Заказ размещен в зале "<strong>{{order.place}}</strong>" на столе
<strong>{{order.table}}</strong><br></p>
<p style="margin-bottom: -0.1rem;">Время открытия: <strong>{{order.opened}}</strong><br></p>
<p style="margin-bottom: -0.1rem;" ng-if="order.closed">Время закрытия:
<strong>{{order.closed}}</strong><br></p>
<p style="margin-bottom: -0.1rem;">Заказ открыт пользователем: <strong>{{order.who_open}}</strong><br></p>
<p style="margin-bottom: -0.1rem;" ng-if="order.who_close">Заказ закрыт пользователем: <strong>{{order.who_close}}</strong><br>
</p>
<p style="margin-bottom: -0.1rem;">Статус заказа: <span
class="label success">{{order.order_status}}</span><br></p>
</div>
<div class="modal-body p-lg">
<div>
<div class="b-b nav-active-bg">
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" href="" data-toggle="tab" data-target="#tab1"
aria-expanded="true">Заказ</a>
</li>
<li class="nav-item">
<a class="nav-link" href="" data-toggle="tab" data-target="#tab2" aria-expanded="false">Журнал
заказа</a>
</li>
<li class="nav-item" ng-if="actions.slice_trigger == 1">
<a class="nav-link" href="" data-toggle="tab" data-target="#tab3" aria-expanded="false">История
разбиения</a>
</li>
<li class="nav-item" ng-if="actions.merge_trigger == 1">
<a class="nav-link" href="" data-toggle="tab" data-target="#tab4" aria-expanded="false">История
объединения</a>
</li>
<li class="nav-item" ng-if="actions.move_trigger == 1">
<a class="nav-link" href="" data-toggle="tab" data-target="#tab5" aria-expanded="false">История
переноса</a>
</li>
</ul>
</div>
<div class="tab-content p-a m-b-md">
<div class="tab-pane animated fadeIn text-muted active" id="tab1" aria-expanded="true">
<!-- Заказ -->
<div class="table-responsive">
<table class="table table-striped white b-a">
<thead>
<tr>
<th>ID</th>
<th>Блюдо</th>
<th style="width: 80px">Кол-во</th>
<th style="width: 80px" ng-if="order.returned_count > 0">Кол-во возвр.</th>
<th style="width: 80px" ng-if="order.deleted_count > 0">Кол-во удал.</th>
<th style="width: 140px">Стоимость</th>
<th style="width: 180px">Итог</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in order.items">
<td>{{item.id}}</td>
<td>{{item.name}}</td>
<td>{{item.count * item.cof}}</td>
<td ng-if="order.returned_count > 0">{{item.returned_count * item.cof}}</td>
<td ng-if="order.deleted_count > 0">{{item.deleted_count * item.cof}}</td>
<td>{{item.price | curr}} BYN</td>
<td>{{item.amount | curr}} BYN <p ng-if="item.discount > 0">
<span>(Скидка: {{item.discount}}%)</span></p></td>
</tr>
<tr>
<td colspan="{{cols - 1}}" class="text-right">
<strong ng-if="order.returned_count > 0">Сумма</strong>
<strong ng-if="order.returned_count == 0">Итого</strong>
</td>
<td>{{order.amount | curr}} BYN</td>
</tr>
<tr>
<td colspan="{{cols - 1}}" class="text-right no-border"
ng-if="order.full_price - order.amount > 0">
<strong>Сумма скидки</strong></td>
<td ng-if="order.full_price - order.amount > 0">{{order.full_price - order.amount |
curr}} BYN
</td>
</tr>
<tr ng-if="order.cash > 0 || order.credit > 0 || order.clearing > 0 || order.presale > 0 || order.self > 0 || order.online > 0">
<td colspan="{{cols - 1}}" class="text-right no-border"><strong>Оплачено:</strong>
</td>
</tr>
<tr ng-if="order.cash > 0">
<td colspan="{{cols}}" class="text-right no-border">Наличные: <strong>{{order.cash
| curr}} BYN</strong></td>
</tr>
<tr ng-if="order.credit > 0">
<td colspan="{{cols}}" class="text-right no-border">Кред. карта: <strong>{{order.credit
| curr}}
BYN</strong></td>
</tr>
<tr ng-if="order.clearing > 0">
<td colspan="{{cols}}" class="text-right no-border">Питание штата: <strong>{{order.clearing
| curr}}
BYN</strong>
</tr>
<tr ng-if="order.presale > 0">
<td colspan="{{cols}}" class="text-right no-border">Зачтен аванс: <strong>{{order.presale
| curr}}
BYN</strong></td>
</tr>
<tr ng-if="order.self > 0">
<td colspan="{{cols}}" class="text-right no-border">Безнал: <strong>{{order.self |
curr}} BYN</strong>
</td>
</tr>
<tr ng-if="order.online > 0">
<td colspan="{{cols}}" class="text-right no-border">Онлайн: <strong>{{order.online |
curr}} BYN</strong>
</td>
</tr>
<tr ng-if="order.returned_count > 0">
<td colspan="{{cols - 1}}" class="text-right"><strong>Возвращено:</strong></td>
</tr>
<tr ng-if="order.returned_method.cash > 0">
<td colspan="{{cols}}" class="text-right no-border">Наличные: <strong>{{order.returned_method.cash
| curr}} BYN</strong></td>
</tr>
<tr ng-if="order.returned_method.credit > 0">
<td colspan="{{cols}}" class="text-right no-border">Кред. карта: <strong>{{order.returned_method.credit
| curr}}
BYN</strong></td>
</tr>
<tr ng-if="order.returned_count > 0">
<td colspan="{{cols - 1}}" class="text-right"><strong>Итого</strong></td>
<td>{{order.amount - order.returned_sum | curr}} BYN</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Журнал заказа -->
<div class="tab-pane animated fadeIn text-muted" id="tab2" aria-expanded="false">
<div class="table-responsive">
<table class="table m-a-0">
<thead>
<tr>
<th>Действие</th>
<th>Персонал</th>
<th>Время</th>
<th>Группа</th>
<th>Место</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="action in actions.actions">
<td>{{ action.action }}</td>
<td>{{ action.who }}</td>
<td>{{ action.time }}</td>
<td>{{ action.workgroup }}</td>
<td>{{ action.workcode }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<!--Разбиение заказа-->
<div ng-if="actions.slice_trigger == 1" class="tab-pane animated fadeIn text-muted" id="tab3" aria-expanded="false">
<div ng-repeat="sliced_order_item in actions.sliced_order_items">
<p class="text-muted m-b-0">Время разбиения: <span class="m-b-0">{{ sliced_order_item.time }}</span></p>
<p class="text-muted m-b-0">Пользователь: <span class="m-b-0">{{ sliced_order_item.staff }}</span></p>
<p class="text-muted m-b-0">Товары перенесенные в заказ №<span class="m-b-0">{{ sliced_order_item.order }}</span></p>
<div class="table-responsive">
<table class="table m-a-0">
<thead>
<tr>
<th>Наименование</th>
<th>Количество</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in sliced_order_item.items">
<td>{{ item.name }}</td>
<td>{{ item.count }}</td>
</tr>
</tbody>
</table>
</div>
<hr>
</div>
</div>
<!--Объединение заказа-->
<div ng-if="actions.merge_trigger == 1" class="tab-pane animated fadeIn text-muted" id="tab4" aria-expanded="false">
<div ng-repeat="merged_order_item in actions.merged_order_items">
<p class="text-muted m-b-0">Время объединения: <span class="m-b-0">{{ merged_order_item.time }}</span></p>
<p class="text-muted m-b-0">Пользователь: <span class="m-b-0">{{ merged_order_item.staff }}</span></p>
<p class="text-muted m-b-0">Товары перенесенные из заказа №<span class="m-b-0">{{ merged_order_item.order }}</span></p>
<div class="table-responsive">
<table class="table m-a-0">
<thead>
<tr>
<th>Наименование</th>
<th>Количество</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in merged_order_item.items">
<td>{{ item.name }}</td>
<td>{{ item.count }}</td>
</tr>
</tbody>
</table>
</div>
<hr>
</div>
</div>
<!--Перенос заказа-->
<div ng-if="actions.move_trigger == 1" class="tab-pane animated fadeIn text-muted" id="tab5" aria-expanded="false">
<div ng-repeat="moved_order in actions.moved_order_data">
<p class="m-b-0">Время переноса: <span class="m-b-0">{{ moved_order.time }}</span></p>
<p class="m-b-0">Пользователь: <span class="m-b-0">{{ moved_order.staff_name }}</span></p>
<p class="m-b-0">{{ moved_order.data }}</span></p>
<hr>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,77 @@
<div class="modal-dialog modal-lg">
<div class="modal-content" id="ordersInfo">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" ng-click="closeModal('ordersInfo')">&times;
</button>
<h6 class="modal-title" ng-if="place_id">{{place_name}} стол №{{place_id}}</h6>
<h6 class="modal-title" ng-if="deleted_info">Подробнее об удаленных</h6>
<h6 class="modal-title" ng-if="discount_info">Подробнее о заказах со скидками</h6>
<h6 class="modal-title" ng-if="!place_id && !guests_info && !deleted_info && !discount_info">Подробнее о выручке <span ng-if="staff_name"> {{staff_name}}</span>
</h6>
<h6 class="modal-title" ng-if="!place_id && !deleted_info && !discount_info && guests_info">Подробнее о заказах гостей</h6>
<p class="modal-title">Отложено заказов: {{waited_count}} на сумму {{waited_sum | curr}} BYN</p>
<p class="modal-title">Закрыто заказов: {{closed_count}} на сумму {{closed_sum | curr}} BYN</p>
<p class="modal-title">Аннулировано заказов: {{cancellations_count}} на сумму {{cancellations_sum |
curr}}BYN</p>
<p class="modal-title">Удалено товаров: {{deleted_count}} на сумму {{deleted_sum | curr}} BYN</p>
<p class="modal-title">Возвращено товаров: {{returned_count}} на сумму {{returned_sum | curr}} BYN</p>
</div>
<div class="modal-body p-lg"
ng-if="(waited_count + closed_count + deleted_count + returned_count + cancellations_count) > 0">
<table id="{{ 'tableOrders_' + type }}" class="table table-bordered table-striped table-hover datatable"
ui-jq="dataTable" ui-options="dataTablesOpt" ng-style="{'width': 'inherit'}">
<thead>
<tr>
<th ng-style="{'width':'70px', 'text-align':'right'}">#</th>
<th ng-style="{ 'display' : (guests_info) ? 'revert' : 'none', 'width':'118px', 'text-align':'right'}">
Гость
</th>
<th ng-style="{'width':'198px', 'text-align':'right'}">Статус</th>
<th ng-style="{'width':'210px', 'text-align':'right'}">Открыт</th>
<th ng-style="{'width':'210px', 'text-align':'right'}">Закрыт</th>
<th ng-style="{'display' : (discount_info) ? 'revert' : 'none', 'width':'140px', 'text-align':'right'}">Сумма, BYN</th>
<th ng-style="{'display' : (discount_info) ? 'revert' : 'none', 'width':'140px', 'text-align':'right'}">Скидка, BYN</th>
<th ng-style="{'display' : (!deleted_info) ? 'revert' : 'none', 'width':'140px', 'text-align':'right'}">Итого, BYN</th>
<th ng-style="{'display' : (deleted_info) ? 'revert' : 'none', 'width':'140px', 'text-align':'right'}">Сумма удалений, BYN</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="order in orders" sglclick="getOrderInfo(order.id, order.opened, order.closed)">
<td>{{ order.id }}</td>
<td style="text-align: right" ng-style="{ 'display' : (guests_info) ? 'revert' : 'none' }">{{
order.client_name }}
</td>
<td style="text-align: right">
<p style="margin-bottom: 0;">{{ order.status }}
<button
type="button"
class="btn btn-outline-danger btn-sm"
data-toggle="popover"
data-placement="right"
data-html="true"
data-content={{order.title}}
ng-if="order.is_printed_before_edit || order.hasMove || order.hasMerge || order.hasSlice || order.hasDelete"
onmouseenter="$(this).popover('show')"
onmouseleave="$(this).popover('hide')">
‼️
</button>
<br>
<small>Предчеков: {{order.preCheck_count}}</small>
</p>
</td>
<td style="text-align: right">{{ order.opened }} {{ order.who_open }}</td>
<td style="text-align: right" ng-if="order.closed">{{ order.closed }} {{ order.who_close }}</td>
<td style="text-align: right" ng-if="!order.closed">-</td>
<td style="text-align: right" ng-style="{ 'display' : (discount_info) ? 'revert' : 'none' }">{{ order.full_sum | curr}}</td>
<td style="text-align: right" ng-style="{ 'display' : (discount_info) ? 'revert' : 'none' }">{{ order.sale_sum | curr}}</td>
<td style="text-align: right" ng-style="{ 'display' : (!deleted_info) ? 'revert' : 'none' }">{{ order.sum | curr}}</td>
<td style="text-align: right" ng-style="{ 'display' : (deleted_info) ? 'revert' : 'none' }">{{ order.deleted_items_sum | curr}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>