2024-01-30 15:53:37 +07:00
|
|
|
<div class="w-[100%]">
|
|
|
|
|
<div
|
|
|
|
|
class="m-[15px] px-[15px] py-[20px] rounded-[15px] bg-white shadow-[0_1px_1px_0_rgba(0,0,0,0.1)] overflow-x-auto">
|
2024-01-29 21:22:26 +07:00
|
|
|
<h1 class="text-2xl font-[700] mb-3">Danh sách sản phẩm ({{ page.total | format_number }})</h1>
|
2024-01-18 23:13:02 +07:00
|
|
|
<div class="flex justify-between items-center mt-[20px]">
|
|
|
|
|
<div class="btn-left flex items-center">
|
2024-01-30 15:53:37 +07:00
|
|
|
<a href="javascript:void(0)" onclick="js_list_category.showModal()"
|
2024-01-23 11:48:06 +07:00
|
|
|
class="px-[10px] py-[8px] border-[#79B0E2] border-[1px] rounded-[4px] text-[#79B0E2] hover:bg-[#0061ff] hover:text-white mr-[15px]">
|
2024-01-18 23:13:02 +07:00
|
|
|
Chọn danh mục để xem
|
|
|
|
|
</a>
|
2024-01-30 15:53:37 +07:00
|
|
|
<a href="javascript:void(0)" onclick="js_list_brand.showModal()"
|
2024-01-23 11:48:06 +07:00
|
|
|
class="px-[10px] py-[8px] border-[#79B0E2] border-[1px] rounded-[4px] text-[#79B0E2] hover:bg-[#0061ff] hover:text-white mr-[15px]">
|
2024-01-18 23:13:02 +07:00
|
|
|
Chọn thương hiệu để xem
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn-right flex items-center">
|
2024-01-23 11:48:06 +07:00
|
|
|
<a href="/?module=product&view=form"
|
|
|
|
|
class="flex items-center px-[10px] py-[8px] border-[#0041E8] border-[1px] rounded-[4px] text-[#0041E8] hover:bg-[#0041E8] hover:text-white ml-[15px] font-[500]">
|
|
|
|
|
<span
|
|
|
|
|
class="border-[1px] border-[#0041E8] h-[15px] w-[15px] leading-[12px] text-center rounded-[50%] mr-1">+</span>
|
2024-01-18 23:13:02 +07:00
|
|
|
<span>Thêm sản phẩm mới</span>
|
|
|
|
|
</a>
|
|
|
|
|
<a href=""
|
2024-01-23 11:48:06 +07:00
|
|
|
class="flex items-center px-[10px] py-[8px] border-[#0041E8] border-[1px] rounded-[4px] text-[#0041E8] hover:bg-[#0041E8] hover:text-white ml-[15px] hover:stroke-white font-[500]">
|
2024-01-30 15:53:37 +07:00
|
|
|
<i class="fa-regular fa-file-pdf"></i>
|
2024-01-18 23:13:02 +07:00
|
|
|
<span class="ml-1">Danh sách cập nhật</span>
|
|
|
|
|
</a>
|
|
|
|
|
<a href=""
|
2024-01-23 11:48:06 +07:00
|
|
|
class="flex items-center px-[10px] py-[8px] border-[#0041E8] border-[1px] rounded-[4px] text-[#0041E8] hover:bg-[#0041E8] hover:text-white ml-[15px] hover:stroke-white font-[500]">
|
2024-01-30 15:53:37 +07:00
|
|
|
<i class="fa-regular fa-file-excel"></i>
|
2024-01-18 23:13:02 +07:00
|
|
|
<span class="ml-1">Cập nhật Excel</span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<table class="w-[100%] mt-[20px] product-list">
|
|
|
|
|
<thead>
|
2024-01-23 11:48:06 +07:00
|
|
|
<tr>
|
2024-01-30 09:22:28 +07:00
|
|
|
<th class="whitespace-nowrap">STT</th>
|
2024-01-23 11:48:06 +07:00
|
|
|
<th>ID</th>
|
|
|
|
|
<th>Ảnh</th>
|
2024-01-29 21:22:26 +07:00
|
|
|
<th>Sản phẩm</th>
|
2024-01-29 15:22:13 +07:00
|
|
|
<th class="whitespace-nowrap">Người dùng</th>
|
2024-01-23 11:48:06 +07:00
|
|
|
<th>Thông tin bán hàng</th>
|
|
|
|
|
<th>Thông tin khác</th>
|
|
|
|
|
<th>
|
|
|
|
|
<span>Đặc điểm</span>
|
|
|
|
|
<select name="" id=""
|
2024-01-18 23:13:02 +07:00
|
|
|
class="block w-[160px] bg-white border-[1px] border-[#D8D8D8] font-[400] h-[30px] mt-[5px] rounded-[4px]">
|
2024-01-23 11:48:06 +07:00
|
|
|
<option value="">Lọc sản phẩm</option>
|
|
|
|
|
</select>
|
|
|
|
|
</th>
|
|
|
|
|
<th>Công cụ</th>
|
|
|
|
|
</tr>
|
2024-01-18 23:13:02 +07:00
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2024-01-29 15:22:13 +07:00
|
|
|
{% assign counter = 0 %}
|
|
|
|
|
{% for item in page.item_list %}
|
|
|
|
|
{% increment counter %}
|
2024-01-23 11:48:06 +07:00
|
|
|
<tr>
|
2024-01-29 15:22:13 +07:00
|
|
|
<td>{{ counter }}</td>
|
2024-01-30 09:22:28 +07:00
|
|
|
<td class="whitespace-nowrap">#{{item.id}}</td>
|
2024-01-23 11:48:06 +07:00
|
|
|
<td>
|
2024-01-30 09:22:28 +07:00
|
|
|
<img class="block mx-auto my-0 w-[70px] h-[50px]" src="{{item.image.thumb}}" alt="">
|
2024-01-29 15:22:13 +07:00
|
|
|
<span class="text-center block">{{item.image_count}} ảnh</span>
|
2024-02-27 13:31:27 +07:00
|
|
|
<i class="icons icon-edit text-center m-auto"></i>
|
2024-01-23 11:48:06 +07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
2024-01-30 09:35:11 +07:00
|
|
|
<a href="/admin/product/form?id={{item.id}}"
|
2024-02-27 13:31:27 +07:00
|
|
|
class="text-[#0041E8] inline-block">{{item.title}}</a>
|
2024-01-29 15:22:13 +07:00
|
|
|
{% if item.config_count > 0 %}<p class="text-[#FFC700]">[Có cấu hình]</p>{% endif %}
|
2024-01-23 11:48:06 +07:00
|
|
|
<div class="flex items-center">
|
|
|
|
|
<span>Danh mục:</span>
|
|
|
|
|
<b class="mx-[10px]">Màn hình Máy tính</b>
|
2024-01-29 15:22:13 +07:00
|
|
|
<a href=""><i class="icons icon-edit"></i></a>
|
2024-01-23 11:48:06 +07:00
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center">
|
|
|
|
|
<span>Mã kho</span>
|
2024-01-29 15:22:13 +07:00
|
|
|
<b class="px-[5px]">{{item.sku}}</b>
|
2024-01-23 11:48:06 +07:00
|
|
|
<span class="text-[#000] font-[500]">|</span>
|
|
|
|
|
<span class="px-[5px]">Hãng</span>
|
2024-01-29 15:22:13 +07:00
|
|
|
<p class="text-[#0041E8]">{{item.model}}</p>
|
2024-01-23 11:48:06 +07:00
|
|
|
</div>
|
2024-01-29 15:22:13 +07:00
|
|
|
|
|
|
|
|
{% assign date_now = "now" | date: format %}
|
|
|
|
|
{% assign date_last = item.last_update %}
|
|
|
|
|
{% assign time_conlai = date_now | minus: date_last %}
|
|
|
|
|
|
|
|
|
|
<p>Cập nhật: {{item.last_update | date: "Y-m-d h:i" }} <span class="text-[#E00000]">(
|
|
|
|
|
{{ time_conlai | divided_by: 86400 | round}}
|
|
|
|
|
ngày)</span></p>
|
|
|
|
|
<p>Người cập nhật : {{item.last_update_by}}</p>
|
2024-01-23 11:48:06 +07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
2024-01-29 15:22:13 +07:00
|
|
|
<p>- Xem : {{item.visit}}</p>
|
|
|
|
|
<p>- Thích : {{item.like_count}}</p>
|
|
|
|
|
<p>- Mua : {{item.buy_count}}</p>
|
2024-01-23 11:48:06 +07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
2024-02-27 13:31:27 +07:00
|
|
|
<div class="flex flex-wrap items-center mb-[1px]">
|
2024-01-30 15:53:37 +07:00
|
|
|
<span class="">- Giá bán:</span>
|
2024-01-29 15:22:13 +07:00
|
|
|
<b class="text-[#E00000] ml-[3px] whitespace-nowrap">
|
|
|
|
|
{% if item.price > 0 %}
|
|
|
|
|
{{item.price | format_price }} vnd
|
|
|
|
|
{% else %}
|
|
|
|
|
{{item.price }} vnd
|
|
|
|
|
{% endif %}
|
|
|
|
|
</b>
|
2024-01-23 11:48:06 +07:00
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center">
|
|
|
|
|
<span>- Sl tổng:</span>
|
2024-01-29 15:22:13 +07:00
|
|
|
<b class="ml-[3px]">{{item.quantity}}</b>
|
2024-01-23 11:48:06 +07:00
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<div class="flex items-center mb-[1px]">
|
2024-01-29 15:22:13 +07:00
|
|
|
<span class="whitespace-nowrap">- Giá bán:</span>
|
|
|
|
|
<b class="text-[#E00000] ml-[3px] whitespace-nowrap">{% if item.price > 0 %}
|
|
|
|
|
{{item.price | format_price }} vnd
|
|
|
|
|
{% else %}
|
|
|
|
|
{{item.price }} vnd
|
|
|
|
|
{% endif %}</b>
|
2024-01-23 11:48:06 +07:00
|
|
|
</div>
|
2024-01-29 15:22:13 +07:00
|
|
|
<p>- Bảo hành: {{item.warranty}}</p>
|
|
|
|
|
<p>- Khuyến mại: {{item.special_offer}}</p>
|
2024-01-23 11:48:06 +07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<div>
|
2024-01-29 21:22:26 +07:00
|
|
|
<input type="checkbox" name="">
|
2024-01-23 11:48:06 +07:00
|
|
|
<label for="">Mới Hot (Hỏi nhiều)</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2024-01-30 09:35:11 +07:00
|
|
|
<input type="checkbox" name="">
|
2024-01-23 11:48:06 +07:00
|
|
|
<label for="">Bán chạy</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2024-01-30 09:35:11 +07:00
|
|
|
<input type="checkbox" name="">
|
2024-01-23 11:48:06 +07:00
|
|
|
<label for="">Xả hàng (sale-off)</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="checkbox" name="" id="">
|
|
|
|
|
<label for="">Chỉ bán online</label>
|
|
|
|
|
</div>
|
2024-01-18 23:13:02 +07:00
|
|
|
<a href=""
|
2024-01-23 11:48:06 +07:00
|
|
|
class="bg-[#0041E8] rounded-[4px] text-white px-[10px] py-[6px] mt-[3px] inline-block">Cập
|
|
|
|
|
nhật</a>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="">
|
|
|
|
|
<div class="list-btn flex items-center w-[150px]">
|
2024-01-29 21:22:26 +07:00
|
|
|
<a href="/admin/product/form?id={{item.id}}" title="Form sản phẩm"
|
2024-01-23 11:48:06 +07:00
|
|
|
class="w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
2024-01-30 09:35:11 +07:00
|
|
|
<i class="icons icon-edit"></i>
|
2024-01-23 11:48:06 +07:00
|
|
|
</a>
|
2024-01-29 21:22:26 +07:00
|
|
|
<a href="{{item.request_path}}" title="Xem tại web" target="_blank"
|
2024-01-23 11:48:06 +07:00
|
|
|
class="w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
2024-01-30 09:35:11 +07:00
|
|
|
<i class="icons icon-view"></i>
|
2024-01-23 11:48:06 +07:00
|
|
|
</a>
|
|
|
|
|
<a href=""
|
|
|
|
|
class="w-[30px] h-[30px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
2024-01-30 09:35:11 +07:00
|
|
|
<i class="icons icon-remove"></i>
|
2024-01-23 11:48:06 +07:00
|
|
|
</a>
|
|
|
|
|
<a href=""
|
|
|
|
|
class="w-[30px] h-[30px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
2024-01-30 09:35:11 +07:00
|
|
|
<i class="icons icon-hide"></i>
|
2024-01-23 11:48:06 +07:00
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center w-[150px] mt-[10px]">
|
|
|
|
|
<span>STT</span>
|
|
|
|
|
<input type="text" value="1"
|
|
|
|
|
class="w-[55px] border-[1px] border-[#D8D8D8] shadow-[0_2px_4px_0_rgba(0,0,0,0.12)] px-[5px] py-[3px] rounded-[4px] ml-[5px]">
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2024-01-29 15:22:13 +07:00
|
|
|
{% endfor %}
|
|
|
|
|
|
2024-01-18 23:13:02 +07:00
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2024-01-29 15:22:13 +07:00
|
|
|
|
|
|
|
|
<div class="paging">
|
|
|
|
|
{% for paging in page.pagination.collection %}
|
|
|
|
|
<a href="{{paging.url}}" class="{% if paging.is_active == 1 %} current {% endif %}">
|
|
|
|
|
{% if paging.name == 'next' %}
|
|
|
|
|
<i class="fas fa-chevron-right"></i>
|
|
|
|
|
{% elsif paging.name == 'prev' %}
|
|
|
|
|
<i class="fas fa-chevron-left"></i>
|
|
|
|
|
{% else %}
|
|
|
|
|
{{paging.name}}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-01-18 23:13:02 +07:00
|
|
|
</div>
|
|
|
|
|
|
2024-01-30 15:53:37 +07:00
|
|
|
|
|
|
|
|
<dialog id="js_list_category" class="modal">
|
|
|
|
|
<div class="modal-box w-11/12 max-w-5xl">
|
|
|
|
|
<form method="dialog">
|
|
|
|
|
<button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button>
|
|
|
|
|
</form>
|
|
|
|
|
<div class="flex items-center">
|
|
|
|
|
<b class="text-[16px]">Tổng sản phẩm:</b>
|
|
|
|
|
<p class="ml-[5px]">{{page.total}} sản phẩm</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="list-category mt-[5px] max-h-[400px] max-h-[400px] overflow-x-auto">
|
|
|
|
|
{% for cate in page.list_category %}
|
|
|
|
|
<a href="{{cate.url}}" class="item block mb-[5px] text-[#0041E8]">
|
|
|
|
|
{% if cate.children.size > 0 %}
|
|
|
|
|
<b class="text-[#0041E8]">+ (#{{cate.id}}){{cate.title}}</b>
|
|
|
|
|
{% else %}
|
|
|
|
|
+ (#{{cate.id}}){{cate.title}}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</a>
|
|
|
|
|
{% if cate.children.size > 0 %}
|
|
|
|
|
<div class="ml-[15px]">
|
|
|
|
|
{% for cate2 in cate.children %}
|
|
|
|
|
<a href="{{cate2.url}}" class="item block mb-[5px] text-[#0041E8]">
|
|
|
|
|
{% if cate2.children.size > 0 %}
|
|
|
|
|
<b class="text-[#0041E8]">+ (#{{cate2.id}}){{cate2.title}}</b>
|
|
|
|
|
{% else %}
|
|
|
|
|
+ (#{{cate2.id}}){{cate2.title}} ({{cate2.totalProduct}})
|
|
|
|
|
{% endif %}
|
|
|
|
|
</a>
|
|
|
|
|
{% if cate2.children.size > 0 %}
|
|
|
|
|
<div class="ml-[15px]">
|
|
|
|
|
{% for cate3 in cate2.children %}
|
|
|
|
|
<a href="{{cate3.url}}" class="item block mb-[5px] text-[#0041E8]">+
|
|
|
|
|
(#{{cate3.id}}){{cate3.title}}
|
|
|
|
|
({{cate3.totalProduct}})</a>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<form method="dialog" class="modal-backdrop">
|
|
|
|
|
<button>close</button>
|
|
|
|
|
</form>
|
|
|
|
|
</dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dialog id="js_list_brand" class="modal">
|
|
|
|
|
<div class="modal-box w-11/12 max-w-3xl">
|
|
|
|
|
<form method="dialog">
|
|
|
|
|
<button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button>
|
|
|
|
|
</form>
|
|
|
|
|
<div class="flex flex-wrap items-center">
|
|
|
|
|
<b class="inline-block w-[120px]">Tìm theo chữ cái</b>
|
|
|
|
|
<div class="list-key inline-block ml-[10px] w-[calc(100%-140px)]">
|
|
|
|
|
{% for key in page.brand_letters %}
|
|
|
|
|
<a href="{{key.url}}">
|
|
|
|
|
<span class="text-[#0041E8] underline">{{key.key}}</span> <span>({{key.total}})</span>
|
|
|
|
|
</a>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<table class="mt-[15px] w-[100%] table-brand">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>STT</th>
|
|
|
|
|
<th>Thương hiệu</th>
|
|
|
|
|
<th class="whitespace-nowrap">Số lượng sản phẩm</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{% assign stt = 0 %}
|
|
|
|
|
{% for item in page.list_brands %}
|
|
|
|
|
{% for item2 in item.1 %}
|
|
|
|
|
{% increment stt %}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="w-[10%]">{{stt}}</td>
|
|
|
|
|
<td>{{item2.name}}</td>
|
|
|
|
|
<td class="w-[18%]">
|
|
|
|
|
<span>{{item2.product}}</span>
|
|
|
|
|
<a href="{{item2.url}}" class="text-[#0041E8]">(Xem sp)</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<form method="dialog" class="modal-backdrop">
|
|
|
|
|
<button>close</button>
|
|
|
|
|
</form>
|
|
|
|
|
</dialog>
|
|
|
|
|
|
2024-01-30 09:35:11 +07:00
|
|
|
</div>
|