update
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* Created by Glee on 03-Nov-2020.
|
* Created by Glee on 03-Nov-2020.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Checkbox = function (deleteItemCb){
|
const Checkbox = function (deleteItemCb) {
|
||||||
|
|
||||||
const INPUT_CHECKBOX_CLASS = '.js-checkbox-id';
|
const INPUT_CHECKBOX_CLASS = '.js-checkbox-id';
|
||||||
let _deleteItemCb = deleteItemCb;
|
let _deleteItemCb = deleteItemCb;
|
||||||
@@ -16,24 +16,24 @@ const Checkbox = function (deleteItemCb){
|
|||||||
function setAllChecked() {
|
function setAllChecked() {
|
||||||
var all_checkboxes = $(INPUT_CHECKBOX_CLASS);
|
var all_checkboxes = $(INPUT_CHECKBOX_CLASS);
|
||||||
|
|
||||||
if($(this).is(':checked')) {
|
if ($(this).is(':checked')) {
|
||||||
all_checkboxes.each(function (index, item) {
|
all_checkboxes.each(function (index, item) {
|
||||||
$(item).prop( "checked", true);
|
$(item).prop("checked", true);
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
all_checkboxes.each(function (index, item) {
|
all_checkboxes.each(function (index, item) {
|
||||||
$(item).prop( "checked", false);
|
$(item).prop("checked", false);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteSelected() {
|
function deleteSelected() {
|
||||||
if(!confirm('Bạn chắc chắn muốn xóa ?')) {
|
if (!confirm('Bạn chắc chắn muốn xóa ?')) {
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(INPUT_CHECKBOX_CLASS).each(function (index, item) {
|
$(INPUT_CHECKBOX_CLASS).each(function (index, item) {
|
||||||
if($(item).is(':checked')) {
|
if ($(item).is(':checked')) {
|
||||||
//delete_deal(item.value, false);
|
//delete_deal(item.value, false);
|
||||||
_deleteItemCb(item.value)
|
_deleteItemCb(item.value)
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ const Checkbox = function (deleteItemCb){
|
|||||||
function getCheckedIds() {
|
function getCheckedIds() {
|
||||||
let list_ids = [];
|
let list_ids = [];
|
||||||
$(INPUT_CHECKBOX_CLASS).each(function (index, item) {
|
$(INPUT_CHECKBOX_CLASS).each(function (index, item) {
|
||||||
if($(item).is(':checked')) list_ids.push(item.value);
|
if ($(item).is(':checked')) list_ids.push(item.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
return list_ids;
|
return list_ids;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -16582,45 +16582,3 @@ html:not([data-theme="material"], [data-theme="material-dark"]) #layout-topbar {
|
|||||||
background-position: 0;
|
background-position: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.bg-menu {
|
|
||||||
background: #004e99;
|
|
||||||
}
|
|
||||||
.line-clamp-1 {
|
|
||||||
-webkit-line-clamp: 1;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
display: -webkit-box;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.line-clamp-2 {
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
display: -webkit-box;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.line-clamp-3 {
|
|
||||||
-webkit-line-clamp: 3;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
display: -webkit-box;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.line-clamp-4 {
|
|
||||||
-webkit-line-clamp: 4;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
display: -webkit-box;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-dash {
|
|
||||||
border-style: dashed;
|
|
||||||
border-color: gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-dash:hover {
|
|
||||||
border-color: var(--color-primary);
|
|
||||||
color: #fff;
|
|
||||||
background: var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.todo-list td {
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|||||||
81
assets/script/style_hura.css
Normal file
81
assets/script/style_hura.css
Normal file
File diff suppressed because one or more lines are too long
@@ -28,8 +28,8 @@ function get_category_list($parentId=0, $currentCat="",$level=1, $prefix="", $ca
|
|||||||
$stt ++;
|
$stt ++;
|
||||||
$imgUrl = (strlen($cat_info["thumbnail"]) > 2) ? " <img src=\"".$cat_info["thumbnail"]."\" style=\"max-width:30px; max-height:30px;\" />" : "";
|
$imgUrl = (strlen($cat_info["thumbnail"]) > 2) ? " <img src=\"".$cat_info["thumbnail"]."\" style=\"max-width:30px; max-height:30px;\" />" : "";
|
||||||
|
|
||||||
if($cat_info["status"]) $status = "<a href=\"javascript:update_status(".$cat_id.",'off')\" class='w-[30px] h-[30px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i class='fa-regular fa-eye-slash text-[#9E9E9E]'></i></a>";
|
if($cat_info["status"]) $status = "<a href=\"javascript:update_status(".$cat_id.",'off')\" class='btn btn-soft btn-xs btn-outline btn-square'><i class='iconify lucide--eye-off'></i></a>";
|
||||||
else $status = "<a href=\"javascript:update_status(".$cat_id.",'on')\" class='w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i class='fa-regular fa-eye text-[#0041E8]'></i></a>";
|
else $status = "<a href=\"javascript:update_status(".$cat_id.",'on')\" class='btn btn-soft btn-xs btn-outline btn-square'><i class='iconify lucide--eye'></i></a>";
|
||||||
|
|
||||||
$edit_link ="/admin/product/category-form?id=".$cat_id;
|
$edit_link ="/admin/product/category-form?id=".$cat_id;
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ function get_category_list($parentId=0, $currentCat="",$level=1, $prefix="", $ca
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($cat_info['is_parent']) {
|
if($cat_info['is_parent']) {
|
||||||
$show_category_name = "<a href=\"javascript:;\" onclick=\"RowExpand.open_child('parent_".$cat_id."')\">".$show_category_name."</a>";
|
$show_category_name = "<a href=\"javascript:;\" class='link-primary' onclick=\"RowExpand.open_child('parent_".$cat_id."')\">".$show_category_name."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$categoryTree .= "
|
$categoryTree .= "
|
||||||
@@ -50,19 +50,19 @@ function get_category_list($parentId=0, $currentCat="",$level=1, $prefix="", $ca
|
|||||||
onmouseover=\"this.className='row-hover parent_".$parentId."'\" onmouseout=\"this.className='parent_".$parentId."'\">
|
onmouseover=\"this.className='row-hover parent_".$parentId."'\" onmouseout=\"this.className='parent_".$parentId."'\">
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a name='cat_".$cat_id."'></a>
|
<a class='link-primary' name='cat_".$cat_id."'></a>
|
||||||
". $extra_space . $prefix . $stt.". ". $show_category_name . $imgUrl."
|
". $extra_space . $prefix . $stt.". ". $show_category_name . $imgUrl."
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href='".$cat_info['request_path']."' title='Mở tại website' target='_blank'>Xem trang</a>
|
<a href='".$cat_info['request_path']."' class='link-primary' title='Mở tại website' target='_blank'>Xem trang</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>".$cat_id."</td>
|
<td>".$cat_id."</td>
|
||||||
<td class='whitespace-nowrap'>413787</td>
|
<td class='whitespace-nowrap'>413787</td>
|
||||||
<td><a href='/admin/product?category=".$cat_id."'>1292</a></td>
|
<td><a class='link-primary' href='/admin/product?category=".$cat_id."'>1292</a></td>
|
||||||
<td>
|
<td>
|
||||||
<input type=text id=order_".$cat_id." value='".$cat_info["ordering"]."' size=2 onchange=\"update_order(".$cat_id.",this.value)\" />
|
<input class='input' type=text id=order_".$cat_id." value='".$cat_info["ordering"]."' size=2 onchange=\"update_order(".$cat_id.",this.value)\" />
|
||||||
<span class='status-ordering-".$cat_id."'></span>
|
<span class='status-ordering-".$cat_id."'></span>
|
||||||
</td>
|
</td>
|
||||||
<td class='whitespace-nowrap'>
|
<td class='whitespace-nowrap'>
|
||||||
@@ -77,11 +77,11 @@ function get_category_list($parentId=0, $currentCat="",$level=1, $prefix="", $ca
|
|||||||
<a href='/admin/product/category-attribute?id=".$cat_id."&popup=1' class='pop-up'>Tổng</a> (".$cat_info['attribute_count'].")
|
<a href='/admin/product/category-attribute?id=".$cat_id."&popup=1' class='pop-up'>Tổng</a> (".$cat_info['attribute_count'].")
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class='list-btn flex items-center'>
|
<div class='list-btn flex items-center gap-3'>
|
||||||
<a href=\"".$edit_link."\" class='w-[32px] h-[32px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i class='icons icon-edit'></i></a>
|
<a href=\"".$edit_link."\" class='btn btn-soft btn-xs btn-square btn-outline btn-view'><i class='iconify lucide--pencil'></i></a>
|
||||||
<a class='w-[32px] h-[32px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]' href='javascript:set_category_feature(.$cat_id.,'off')'><i class='icons icon-feature'></i></a>
|
<a class='btn btn-soft btn-xs btn-square btn-outline btn-view' href='javascript:set_category_feature(.$cat_id.,'off')'><i class='iconify lucide--crown'></i></a>
|
||||||
<span id=status-".$cat_id.">".$status."</span>
|
<span id=status-".$cat_id.">".$status."</span>
|
||||||
<span class='status-delete-".$cat_id."'><a href=\"javascript:deleteThis(".$cat_id.")\" class='w-[32px] h-[32px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i class='icons icon-delete'></i></a></span>
|
<span class='status-delete-".$cat_id."'><a href=\"javascript:deleteThis(".$cat_id.")\" class='btn btn-soft btn-xs btn-square btn-error btn-outline '><i class='iconify lucide--trash-2'></i></a></span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
";
|
";
|
||||||
@@ -89,7 +89,7 @@ function get_category_list($parentId=0, $currentCat="",$level=1, $prefix="", $ca
|
|||||||
}else{
|
}else{
|
||||||
$categoryTree .= "
|
$categoryTree .= "
|
||||||
<td>
|
<td>
|
||||||
<a href=\"".$edit_link."\"><i class='icons icon-edit'></i></a>
|
<a href=\"".$edit_link."\"><i class='iconify lucide--pencil'></i></a>
|
||||||
</td>
|
</td>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/simplebar/6.2.7/simplebar.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/simplebar/6.2.7/simplebar.css" />
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
<script src="{{'jquery.js' | asset_url }}"></script>
|
||||||
|
<script src="{{'global.js' | asset_url }}"></script>
|
||||||
|
|
||||||
|
|
||||||
{% if global.module == 'home' %}
|
{% if global.module == 'home' %}
|
||||||
|
|
||||||
|
|||||||
@@ -1,110 +1,107 @@
|
|||||||
<div class="w-[100%]">
|
<div class="bg-white shadow p-3 rounded-sm">
|
||||||
<div
|
<h1 class="text-2xl font-bold mb-3">Danh sách thương hiệu</h1>
|
||||||
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">
|
|
||||||
<h1 class="text-[24px] font-[700] mb-3">Danh sách thương hiệu</h1>
|
|
||||||
|
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<b>Tìm theo chữ cái</b>:
|
<b>Tìm theo chữ cái</b>:
|
||||||
<a href="?opt=brand&letter=A">A</a> (13) |
|
<a href="?opt=brand&letter=A">A</a> (13) |
|
||||||
<a href="?opt=brand&letter=B">B</a> (2) |
|
<a href="?opt=brand&letter=B">B</a> (2) |
|
||||||
<a href="?opt=brand&letter=C">C</a> (5) |
|
<a href="?opt=brand&letter=C">C</a> (5) |
|
||||||
<a href="?opt=brand&letter=D">D</a> (3) |
|
<a href="?opt=brand&letter=D">D</a> (3) |
|
||||||
<a href="?opt=brand&letter=E">E</a> (3) |
|
<a href="?opt=brand&letter=E">E</a> (3) |
|
||||||
<a href="?opt=brand&letter=F">F</a> (1) |
|
<a href="?opt=brand&letter=F">F</a> (1) |
|
||||||
<a href="?opt=brand&letter=G">G</a> (4) |
|
<a href="?opt=brand&letter=G">G</a> (4) |
|
||||||
<a href="?opt=brand&letter=H">H</a> (4) |
|
<a href="?opt=brand&letter=H">H</a> (4) |
|
||||||
<a href="?opt=brand&letter=I">I</a> (5) |
|
<a href="?opt=brand&letter=I">I</a> (5) |
|
||||||
<a href="?opt=brand&letter=J">J</a> (2) |
|
<a href="?opt=brand&letter=J">J</a> (2) |
|
||||||
<a href="?opt=brand&letter=K">K</a> (2) |
|
<a href="?opt=brand&letter=K">K</a> (2) |
|
||||||
<a href="?opt=brand&letter=L">L</a> (4) |
|
<a href="?opt=brand&letter=L">L</a> (4) |
|
||||||
<a href="?opt=brand&letter=M">M</a> (3) |
|
<a href="?opt=brand&letter=M">M</a> (3) |
|
||||||
<a href="?opt=brand&letter=N">N</a> (4) |
|
<a href="?opt=brand&letter=N">N</a> (4) |
|
||||||
<a href="?opt=brand&letter=O">O</a> (1) |
|
<a href="?opt=brand&letter=O">O</a> (1) |
|
||||||
<a href="?opt=brand&letter=P">P</a> (5) |
|
<a href="?opt=brand&letter=P">P</a> (5) |
|
||||||
<a href="?opt=brand&letter=Q">Q</a> (1) |
|
<a href="?opt=brand&letter=Q">Q</a> (1) |
|
||||||
<a href="?opt=brand&letter=S">S</a> (8) |
|
<a href="?opt=brand&letter=S">S</a> (8) |
|
||||||
<a href="?opt=brand&letter=T">T</a> (5) |
|
<a href="?opt=brand&letter=T">T</a> (5) |
|
||||||
<a href="?opt=brand&letter=V">V</a> (2) |
|
<a href="?opt=brand&letter=V">V</a> (2) |
|
||||||
<a href="?opt=brand&letter=W">W</a> (2) |
|
<a href="?opt=brand&letter=W">W</a> (2) |
|
||||||
<a href="?opt=brand&letter=X">X</a> (1) |
|
<a href="?opt=brand&letter=X">X</a> (1) |
|
||||||
<a href="?opt=brand&letter=Z">Z</a> (2) |
|
<a href="?opt=brand&letter=Z">Z</a> (2) |
|
||||||
</div>
|
|
||||||
<a href="/admin/product/brand_add"
|
|
||||||
class="flex items-center px-[10px] py-[8px] border-[#0041E8] border-[1px] rounded-[4px] text-[#0041E8] hover:bg-[#0041E8] hover:text-white ml-[25px] font-[500]">
|
|
||||||
<span
|
|
||||||
class="border-[1px] border-[#0041E8] h-[14px] w-[14px] leading-[12px] text-center rounded-[50%] mr-1">+</span>
|
|
||||||
<span class="whitespace-nowrap ">Thêm thương hiệu mới</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<a href="/admin/product/brand_add"
|
||||||
|
class="flex items-center px-[10px] py-[8px] border-[#0041E8] border-[1px] rounded-[4px] text-[#0041E8] hover:bg-[#0041E8] hover:text-white ml-[25px] font-[500]">
|
||||||
|
<span
|
||||||
|
class="border-[1px] border-[#0041E8] h-[14px] w-[14px] leading-[12px] text-center rounded-[50%] mr-1">+</span>
|
||||||
|
<span class="whitespace-nowrap ">Thêm thương hiệu mới</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="overflow-x-auto">
|
<div class="overflow-x-auto">
|
||||||
<table class="table mt-[15px]">
|
<table class="table mt-[15px]">
|
||||||
<thead class="bg-[#f6f6f6] text-[#000] text-[14px]">
|
<thead class="bg-[#f6f6f6] text-[#000] text-[14px]">
|
||||||
<tr>
|
<tr>
|
||||||
<th>STT</th>
|
<th>STT</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Thương hiệu</th>
|
<th>Thương hiệu</th>
|
||||||
<th>Lượt xem</th>
|
<th>Lượt xem</th>
|
||||||
<th>Logo</th>
|
<th>Logo</th>
|
||||||
<th>Số Sản phẩm</th>
|
<th>Số Sản phẩm</th>
|
||||||
<th>Cài đặt</th>
|
<th>Cài đặt</th>
|
||||||
<th>Cập nhật</th>
|
<th>Cập nhật</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>1</td>
|
<td>1</td>
|
||||||
<td>750</td>
|
<td>750</td>
|
||||||
<td>
|
<td>
|
||||||
<b>10MOONS</b>
|
<b>10MOONS</b>
|
||||||
<p class="flex items-center text-[#0041E8]">
|
<p class="flex items-center text-[#0041E8]">
|
||||||
<span>Link:</span>
|
<span>Link:</span>
|
||||||
<a href="">/brand/10moons</a>
|
<a href="">/brand/10moons</a>
|
||||||
</p>
|
</p>
|
||||||
<p>Cập nhật cuối: 0000-00-00 00:00:00</p>
|
<p>Cập nhật cuối: 0000-00-00 00:00:00</p>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
0
|
0
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="">
|
<a href="">
|
||||||
<img src="{{'brand-1.png'| asset_url }}" alt="">
|
<img src="{{'brand-1.png'| asset_url }}" alt="">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<p>1</p>
|
<p>1</p>
|
||||||
<a href=""
|
<a href=""
|
||||||
class="btn h-[30px] w-[100px] min-h-[30px] px-[7px] py-[4px] bg-[#0041E8] text-white ml-[10px] rounded-[4px]">Xem
|
class="btn h-[30px] w-[100px] min-h-[30px] px-[7px] py-[4px] bg-[#0041E8] text-white ml-[10px] rounded-[4px]">Xem
|
||||||
SP</a>
|
SP</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="whitespace-nowrap">STT</span>
|
<span class="whitespace-nowrap">STT</span>
|
||||||
<input type="text" value="0"
|
<input type="text" value="0"
|
||||||
class="w-[80px] h-[30px] p-[10px] border-[1px] border-[#D8D8D8] ml-[7px] rounded-[4px] shadow-[0_2px_4px_0_#0000001F]">
|
class="w-[80px] h-[30px] p-[10px] border-[1px] border-[#D8D8D8] ml-[7px] rounded-[4px] shadow-[0_2px_4px_0_#0000001F]">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class='list-btn flex items-center'>
|
<div class='list-btn flex items-center'>
|
||||||
<a href=""
|
<a href=""
|
||||||
class='w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i
|
class='w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i
|
||||||
class='icons icon-edit'></i></a>
|
class='icons icon-edit'></i></a>
|
||||||
<a class='w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'
|
<a class='w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'
|
||||||
href=''><i class='icons icon-feature'></i></a>
|
href=''><i class='icons icon-feature'></i></a>
|
||||||
<a href=""
|
<a href=""
|
||||||
class='w-[30px] h-[30px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i
|
class='w-[30px] h-[30px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i
|
||||||
class="fa-regular fa-eye-slash text-[#9E9E9E]"></i></a>
|
class="fa-regular fa-eye-slash text-[#9E9E9E]"></i></a>
|
||||||
<a href=""
|
<a href=""
|
||||||
class='w-[30px] h-[30px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i
|
class='w-[30px] h-[30px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i
|
||||||
class='icons icon-remove'></i></a>
|
class='icons icon-remove'></i></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,51 +1,46 @@
|
|||||||
<div class="w-[100%]">
|
<div class="bg-white shadow p-3 rounded-sm">
|
||||||
<div
|
<h1 class="text-2xl font-bold mb-3">Danh sách sản phẩm</h1>
|
||||||
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">
|
|
||||||
<h1 class="text-[24px] font-[700] mb-3">Danh sách sản phẩm</h1>
|
|
||||||
|
|
||||||
<div id="action-links" class="mb-[15px]">
|
<div id="action-links" class="mt-3">
|
||||||
<div class="flex item-center justify-between">
|
<div class="flex item-center justify-between">
|
||||||
<div
|
<div class="btn btn-outline btn-view">
|
||||||
class="p-[5px_10px] border-[1px] border-[#79B0E2] rounded-[4px] text-[14px] text-[#79B0E2] hover:bg-[#79B0E2] hover:text-[#fff]">
|
<a href='javascript:;' onclick="RowExpand.open_all();"><span id='js-row-expand-all'></span> Xem hết
|
||||||
<a href='javascript:;' onclick="RowExpand.open_all();"><span id='js-row-expand-all'></span> Xem hết
|
danh mục</a>
|
||||||
danh mục</a>
|
|
||||||
</div>
|
|
||||||
<a href="/admin/product/category-form" id="add-prod"
|
|
||||||
class="p-[5px_10px] border-[1px] border-[#0041E8] rounded-[4px] text-[14px] text-[#0041E8] flex items-center hover:bg-[#0041E8] hover:text-white"><span
|
|
||||||
class="border-[1px] border-[#0041E8] h-[14px] w-[14px] leading-[12px] text-center rounded-[50%] mr-1">+</span>
|
|
||||||
<span class="font-[500]">Thêm
|
|
||||||
danh mục mới</span></a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<a href="/admin/product/category-form" id="add-prod" class="btn btn-outline btn-view">
|
||||||
|
<i class="iconify lucide--plus"></i>
|
||||||
|
<span class="font-[500]">Thêm
|
||||||
|
danh mục mới</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="overflow-x-auto border border-base-200 rounded-sm mt-5 w-full mt-3">
|
||||||
<table id='tb_padding' cellpadding=2 cellspacing=0 width='100%' border=1 bordercolor='#CCCCCC' class="table">
|
<table id='tb_padding' cellpadding=2 cellspacing=0 width='100%' border=1 bordercolor='#CCCCCC' class="table">
|
||||||
<tr style="background-color:#EEE; font-weight:bold;">
|
<tr class="bg-base-200 font-bold">
|
||||||
<td>Danh mục</td>
|
<td>Danh mục</td>
|
||||||
<td width=100px>Link web</td>
|
<td>Link web</td>
|
||||||
<td width=60px class="whitespace-nowrap">ID</td>
|
<td class=" whitespace-nowrap">ID</td>
|
||||||
<td>Xem</td>
|
<td>Xem</td>
|
||||||
<td width=100px>SP</td>
|
<td>SP</td>
|
||||||
<td width=100px>STT</td>
|
<td>STT</td>
|
||||||
<td>Hiển thị nội dung</td>
|
<td>Hiển thị nội dung</td>
|
||||||
<td width=100px>Thuộc tính</td>
|
<td>Thuộc tính</td>
|
||||||
<td width=200px>Cập nhật</td>
|
<td>Cập nhật</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{{page.category_list}}
|
{{page.category_list}}
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-top: 10px">
|
|
||||||
<strong style="color: red">Lưu ý</strong>: Tổng sản phẩm ở danh mục mẹ được tính là tổng sản phẩm sản phẩm
|
|
||||||
của các danh mục con và danh mục mẹ. Bộ đếm không loại trừ sản phẩm trùng nhau (v.d. trường hợp 1 sản phẩm
|
|
||||||
thuộc cả 2 danh mục con thì sẽ được đếm 2 lần)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" id="save_open_row" value="," />
|
|
||||||
<input type="hidden" id="track_open_row" value="0" />
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p style="margin-top: 10px">
|
||||||
|
<strong style="color: red">Lưu ý</strong>: Tổng sản phẩm ở danh mục mẹ được tính là tổng sản phẩm sản phẩm
|
||||||
|
của các danh mục con và danh mục mẹ. Bộ đếm không loại trừ sản phẩm trùng nhau (v.d. trường hợp 1 sản phẩm
|
||||||
|
thuộc cả 2 danh mục con thì sẽ được đếm 2 lần)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<input type="hidden" id="save_open_row" value="," />
|
||||||
|
<input type="hidden" id="track_open_row" value="0" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,284 +1,274 @@
|
|||||||
<div class="w-[100%]">
|
<div class="bg-white shadow p-3 rounded-sm">
|
||||||
<div class="m-[15px] px-[15px] py-[20px] rounded-[15px] bg-white shadow-[0_1px_1px_0_rgba(0,0,0,0.1)]">
|
<h1 class="text-2xl font-bold mb-3">Danh sách sản phẩm ({{ page.total | format_number }})</h1>
|
||||||
<h1 class="text-2xl font-[700] mb-3">Danh sách sản phẩm ({{ page.total | format_number }})</h1>
|
<div class="flex flex-wrap justify-between items-center">
|
||||||
<div class="flex flex-wrap justify-between items-center mt-[20px]">
|
<div class="btn-left flex items-center mb-3 gap-3">
|
||||||
<div class="btn-left flex items-center mb-[15px]">
|
<a href="javascript:void(0)" onclick="js_list_category.showModal()" class="btn btn-outline btn-view">
|
||||||
<a href="javascript:void(0)" onclick="js_list_category.showModal()"
|
Chọn danh mục để xem
|
||||||
class="px-[10px] py-[8px] border-[#79B0E2] border-[1px] rounded-[4px] text-[#79B0E2] hover:bg-[#0061ff] hover:text-white mr-[15px]">
|
</a>
|
||||||
Chọn danh mục để xem
|
<a href="javascript:void(0)" onclick="js_list_brand.showModal()" class="btn btn-outline btn-view">
|
||||||
</a>
|
Chọn thương hiệu để xem
|
||||||
<a href="javascript:void(0)" onclick="js_list_brand.showModal()"
|
|
||||||
class="px-[10px] py-[8px] border-[#79B0E2] border-[1px] rounded-[4px] text-[#79B0E2] hover:bg-[#0061ff] hover:text-white mr-[15px]">
|
|
||||||
Chọn thương hiệu để xem
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="btn-right flex items-center mb-[15px]">
|
|
||||||
<a href="/admin/product/form"
|
|
||||||
class="flex items-center px-[10px] py-[8px] border-[#0041E8] border-[1px] rounded-[4px] text-[#0041E8] hover:bg-[#0041E8] hover:text-white font-[500]">
|
|
||||||
<span
|
|
||||||
class="border-[1px] border-[#0041E8] h-[15px] w-[15px] leading-[11px] text-center rounded-[50%] mr-1">+</span>
|
|
||||||
<span>Thêm sản phẩm mới</span>
|
|
||||||
</a>
|
|
||||||
<a href=""
|
|
||||||
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]">
|
|
||||||
<i class="fa-regular fa-file-pdf"></i>
|
|
||||||
<span class="ml-1">Danh sách cập nhật</span>
|
|
||||||
</a>
|
|
||||||
<a href=""
|
|
||||||
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]">
|
|
||||||
<i class="fa-regular fa-file-excel"></i>
|
|
||||||
<span class="ml-1">Cập nhật Excel</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="overflow-x-auto">
|
|
||||||
<table class="w-[100%] mt-[20px] table">
|
|
||||||
<thead class="bg-[#f6f6f6] text-[#000] text-[14px]">
|
|
||||||
<tr>
|
|
||||||
<th class="whitespace-nowrap">STT</th>
|
|
||||||
<th>Ảnh</th>
|
|
||||||
<th class="text-left">Sản phẩm (Tổng số: {{page.total}})</th>
|
|
||||||
<th class="whitespace-nowrap text-left w-[350px]">Thông tin bán hàng</th>
|
|
||||||
<th class="w-[200px]">
|
|
||||||
<select id=""
|
|
||||||
class="block w-[230px] h-[32px] px-[5px] bg-white border-[1px] border-[#D8D8D8] font-[400] h-[30px] mt-[5px] rounded-[4px] shadow-[0_2px_4px_0_#0000001F]"
|
|
||||||
onchange="location.href=this.value">
|
|
||||||
<option value="/admin/product?">Lọc sản phẩm</option>
|
|
||||||
<option value="/admin/product?hotType=new">Mới</option>
|
|
||||||
<option value="/admin/product?hotType=hot">HOT (hỏi nhiều)</option>
|
|
||||||
<option value="/admin/product?hotType=bestsale">Bán chạy</option>
|
|
||||||
<option value="/admin/product?hotType=saleoff">Xả hàng (sale-off)</option>
|
|
||||||
<option value="/admin/product?hotType=online-only">Chỉ bán online</option>
|
|
||||||
</select>
|
|
||||||
</th>
|
|
||||||
<th class="text-left ">Công cụ</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% assign counter = 0 %}
|
|
||||||
{% for item in page.item_list %}
|
|
||||||
{% increment counter %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ counter }}</td>
|
|
||||||
<td>
|
|
||||||
<img class="block mx-auto my-0 w-[70px] h-[50px]" src="{{item.image.thumb}}" alt="">
|
|
||||||
<span class="text-center block">{{item.image_count}} ảnh</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="/admin/product/form?id={{item.id}}">[#{{item.id}}]
|
|
||||||
<span class="text-[#0041E8]">-
|
|
||||||
{{item.title}}</span>
|
|
||||||
</a>
|
|
||||||
{% if item.config_count > 0 %}<p class="text-[#FFC700] text-[12px]">[Có cấu hình]</p>{%
|
|
||||||
endif %}
|
|
||||||
<div class="flex items-center my-[5px]">
|
|
||||||
<span>Danh mục:</span>
|
|
||||||
<b class="mx-[10px]">Màn hình Máy tính</b>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center my-[5px]">
|
|
||||||
<span>Mã kho</span>
|
|
||||||
<b class="px-[5px]">{{item.sku}}</b>
|
|
||||||
<span class="text-[#000] font-[500]">|</span>
|
|
||||||
<span class="px-[5px]">Hãng</span>
|
|
||||||
<p class="text-[#0041E8]">{{item.model}}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% assign date_now = "now" | date: format %}
|
|
||||||
{% assign date_last = item.last_update %}
|
|
||||||
{% assign time_conlai = date_now | minus: date_last %}
|
|
||||||
|
|
||||||
<p class="mb-[7px]">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>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="flex flex-wrap items-center mb-[1px]">
|
|
||||||
<span class="">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>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center mb-[1px]">
|
|
||||||
<span class="whitespace-nowrap">Giá thị trường:</span>
|
|
||||||
<b class="text-[#E00000] ml-[3px] whitespace-nowrap">
|
|
||||||
{% if item.market_price > 0 %} {{item.market_price | format_price }} vnd {% else %}
|
|
||||||
0 vnd {% endif %}
|
|
||||||
</b>
|
|
||||||
</div>
|
|
||||||
<p>Bảo hành: {{item.warranty}}</p>
|
|
||||||
<p>Khuyến mại: {{item.special_offer}}</p>
|
|
||||||
<div class="flex items-center">
|
|
||||||
<span>SL tổng:</span>
|
|
||||||
<b class="ml-[3px]">{{item.quantity}}</b>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="align-text-top">
|
|
||||||
|
|
||||||
<label class="cursor-pointer flex items-center mb-[7px]"
|
|
||||||
onclick="AdminFunction.update_product_hot({{item.id}})">
|
|
||||||
<input type="checkbox" name="new" {% if item.hot_type=="new" %}checked="checked" {%
|
|
||||||
endif %} class="checkbox checkbox-success" />
|
|
||||||
<span class="label-text ml-[5px] whitespace-nowrap">Mới Hot (Hỏi nhiều)</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
|
|
||||||
<label class="cursor-pointer flex items-center mb-[7px]"
|
|
||||||
onclick="AdminFunction.update_product_hot({{item.id}})">
|
|
||||||
<input type="checkbox" name="hot" {% if item.hot_type=="hot" %}checked="checked" {%
|
|
||||||
endif %} class="checkbox checkbox-success" />
|
|
||||||
<span class="label-text ml-[5px] whitespace-nowrap">Hot (Hỏi nhiều)</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label class="cursor-pointer flex items-center mb-[7px]"
|
|
||||||
onclick="AdminFunction.update_product_hot({{item.id}})">
|
|
||||||
<input type="checkbox" name="bestsale" {% if item.hot_type=="bestsale"
|
|
||||||
%}checked="checked" {% endif %} class="checkbox checkbox-success" />
|
|
||||||
<span class="label-text ml-[5px] whitespace-nowrap">Bán
|
|
||||||
chạy</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label class="cursor-pointer flex items-center mb-[7px]"
|
|
||||||
onclick="AdminFunction.update_product_hot({{item.id}})">
|
|
||||||
<input type="checkbox" name="saleoff" {% if item.hot_type=="saleoff" %}checked="checked"
|
|
||||||
{% endif %} class="checkbox checkbox-success" />
|
|
||||||
<span class="label-text ml-[5px] whitespace-nowrap">Xả
|
|
||||||
hàng (sale-off)</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label class="cursor-pointer flex items-center mb-[7px]"
|
|
||||||
onclick="AdminFunction.update_product_hot({{item.id}})">
|
|
||||||
<input type="checkbox" name="online-only" {% if item.hot_type=="online-only"
|
|
||||||
%}checked="checked" {% endif %} class="checkbox checkbox-success" />
|
|
||||||
<span class="label-text ml-[5px] whitespace-nowrap">Chỉ bán online</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<div id="js-status-hottype-{{item.id}}" class="flex items-center mt-[5px]"></div>
|
|
||||||
</td>
|
|
||||||
<td class="align-text-top">
|
|
||||||
<div class="list-btn flex items-center w-[150px]">
|
|
||||||
<a href="/admin/product/form?id={{item.id}}" title="Form sản phẩm"
|
|
||||||
class="w-[32px] h-[32px] border-[1px] border-[#0041e8] rounded-[4px] text-center leading-[32px] flex items-center justify-center mr-[5px]">
|
|
||||||
<i class="icons icon-edit"></i>
|
|
||||||
</a>
|
|
||||||
<a href="{{item.request_path}}" title="Xem tại web" target="_blank"
|
|
||||||
class="w-[32px] h-[32px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
|
||||||
<i class="icons icon-view"></i>
|
|
||||||
</a>
|
|
||||||
{% if item.status == 0 %}
|
|
||||||
<a href=""
|
|
||||||
class="w-[32px] h-[32px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
|
||||||
<i class="fa-regular fa-eye-slash text-[#9E9E9E]"></i>
|
|
||||||
</a>
|
|
||||||
{% else %}
|
|
||||||
<a href=""
|
|
||||||
class="w-[32px] h-[32px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px] bg-white">
|
|
||||||
<i class="fa-regular fa-eye text-[#0041E8]"></i>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
<a href=""
|
|
||||||
class="w-[32px] h-[32px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
|
||||||
<i class="icons icon-delete"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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>
|
</a>
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="btn-right flex items-center mb-3 gap-3">
|
||||||
|
<a href="/admin/product/form" class="btn btn-outline btn-view">
|
||||||
|
<i class="iconify lucide--plus"></i>
|
||||||
|
<span>Thêm sản phẩm mới</span>
|
||||||
|
</a>
|
||||||
|
<a href="" class="btn btn-outline btn-view">
|
||||||
|
<i class="iconify lucide--file-pdf"></i>
|
||||||
|
<span class="ml-1">Danh sách cập nhật</span>
|
||||||
|
</a>
|
||||||
|
<a href="" class="btn btn-outline btn-view">
|
||||||
|
<i class="iconify lucide--file-x"></i>
|
||||||
|
<span class="ml-1">Cập nhật Excel</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="overflow-x-auto mt-5 border border-base-200 rounded-sm">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg-base-200 text-black">
|
||||||
|
<th>STT</th>
|
||||||
|
<th>Ảnh</th>
|
||||||
|
<th>Sản phẩm (Tổng số: {{page.total}})</th>
|
||||||
|
<th>Thông tin bán hàng</th>
|
||||||
|
<th>
|
||||||
|
<select id="" class="select" onchange="location.href=this.value">
|
||||||
|
<option value="/admin/product?">Lọc sản phẩm</option>
|
||||||
|
<option value="/admin/product?hotType=new">Mới</option>
|
||||||
|
<option value="/admin/product?hotType=hot">HOT (hỏi nhiều)</option>
|
||||||
|
<option value="/admin/product?hotType=bestsale">Bán chạy</option>
|
||||||
|
<option value="/admin/product?hotType=saleoff">Xả hàng (sale-off)</option>
|
||||||
|
<option value="/admin/product?hotType=online-only">Chỉ bán online</option>
|
||||||
|
</select>
|
||||||
|
</th>
|
||||||
|
<th>Công cụ</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% assign counter = 0 %}
|
||||||
|
{% for item in page.item_list %}
|
||||||
|
{% increment counter %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ counter }}</td>
|
||||||
|
<td>
|
||||||
|
<img class="block mx-auto my-0 w-[70px] h-[50px]" src="{{item.image.thumb}}" alt="">
|
||||||
|
<span class="text-center block whitespace-nowrap">{{item.image_count}} ảnh</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="/admin/product/form?id={{item.id}}">[#{{item.id}}]
|
||||||
|
<span class="link-primary">-
|
||||||
|
{{item.title}}</span>
|
||||||
|
</a>
|
||||||
|
{% if item.config_count > 0 %}<p class="text-sm text-orange">[Có cấu hình]</p>{% endif %}
|
||||||
|
<div class="flex items-center my-1 gap-2">
|
||||||
|
<span>Danh mục:</span>
|
||||||
|
<b class="">Màn hình Máy tính</b>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center my-1 gap-2">
|
||||||
|
<span>Mã kho</span>
|
||||||
|
<b class="px-2">{{item.sku}}</b>
|
||||||
|
<span class="text-black font-[500]">|</span>
|
||||||
|
<span class="px-2">Hãng</span>
|
||||||
|
<p class="link-primary">{{item.model}}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% assign date_now = "now" | date: format %}
|
||||||
|
{% assign date_last = item.last_update %}
|
||||||
|
{% assign time_conlai = date_now | minus: date_last %}
|
||||||
|
|
||||||
|
<p class="mb-2">Cập nhật: {{item.last_update | date: "Y-m-d h:i" }} <span class="text-red">(
|
||||||
|
{{ time_conlai | divided_by: 86400 | round}}
|
||||||
|
ngày)</span></p>
|
||||||
|
<p>Người cập nhật : {{item.last_update_by}}</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="flex flex-wrap items-center mb-1">
|
||||||
|
<span class="">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>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center mb-1">
|
||||||
|
<span class="whitespace-nowrap">Giá thị trường:</span>
|
||||||
|
<b class="text-[#E00000] ml-2 whitespace-nowrap">
|
||||||
|
{% if item.market_price > 0 %} {{item.market_price | format_price }} vnd {% else %}
|
||||||
|
0 vnd {% endif %}
|
||||||
|
</b>
|
||||||
|
</div>
|
||||||
|
<p>Bảo hành: {{item.warranty}}</p>
|
||||||
|
<p>Khuyến mại: {{item.special_offer}}</p>
|
||||||
|
<div class="flex items-center mb-1 gap-2">
|
||||||
|
<span>SL tổng:</span>
|
||||||
|
<b class="ml-2">{{item.quantity}}</b>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="align-text-top">
|
||||||
|
|
||||||
|
<label class="cursor-pointer flex items-center mb-2 gap-2"
|
||||||
|
onclick="AdminFunction.update_product_hot('{{item.id}}')">
|
||||||
|
<input type="checkbox" name="new" {% if item.hot_type=="new" %}checked="checked" {% endif %}
|
||||||
|
class="checkbox checkbox-success" />
|
||||||
|
<span class="label-text whitespace-nowrap">Mới Hot (Hỏi nhiều)</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
<label class="cursor-pointer flex items-center mb-2 gap-2"
|
||||||
|
onclick="AdminFunction.update_product_hot('{{item.id}}')">
|
||||||
|
<input type="checkbox" name="hot" {% if item.hot_type=="hot" %}checked="checked" {% endif %}
|
||||||
|
class="checkbox checkbox-success" />
|
||||||
|
<span class="label-text whitespace-nowrap">Hot (Hỏi nhiều)</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="cursor-pointer flex items-center mb-2 gap-2"
|
||||||
|
onclick="AdminFunction.update_product_hot('{{item.id}}')">
|
||||||
|
<input type="checkbox" name="bestsale" {% if item.hot_type=="bestsale" %}checked="checked"
|
||||||
|
{% endif %} class="checkbox checkbox-success" />
|
||||||
|
<span class="label-text whitespace-nowrap">Bán
|
||||||
|
chạy</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="cursor-pointer flex items-center mb-2 gap-2"
|
||||||
|
onclick="AdminFunction.update_product_hot('{{item.id}}')">
|
||||||
|
<input type="checkbox" name="saleoff" {% if item.hot_type=="saleoff" %}checked="checked" {%
|
||||||
|
endif %} class="checkbox checkbox-success" />
|
||||||
|
<span class="label-text whitespace-nowrap">Xả
|
||||||
|
hàng (sale-off)</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="cursor-pointer flex items-center mb-2 gap-2"
|
||||||
|
onclick="AdminFunction.update_product_hot('{{item.id}}')">
|
||||||
|
<input type="checkbox" name="online-only" {% if item.hot_type=="online-only"
|
||||||
|
%}checked="checked" {% endif %} class="checkbox checkbox-success" />
|
||||||
|
<span class="label-text whitespace-nowrap">Chỉ bán online</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div id="js-status-hottype-{{item.id}}" class="flex items-center mt-2"></div>
|
||||||
|
</td>
|
||||||
|
<td class="align-text-top">
|
||||||
|
<div class="list-btn flex items-center gap-3">
|
||||||
|
<a href="/admin/product/form?id={{item.id}}" title="Form sản phẩm"
|
||||||
|
class="btn btn-soft btn-xs btn-square btn-outline btn-view">
|
||||||
|
<i class="iconify lucide--pencil"></i>
|
||||||
|
</a>
|
||||||
|
<a href="{{item.request_path}}" title="Xem tại web" target="_blank"
|
||||||
|
class="btn btn-soft btn-xs btn-square btn-outline btn-view">
|
||||||
|
<i class="iconify lucide--globe"></i>
|
||||||
|
</a>
|
||||||
|
{% if item.status == 0 %}
|
||||||
|
<a href="" class="btn btn-soft btn-xs btn-square btn-outline btn-view">
|
||||||
|
<i class="iconify lucide--eye-off"></i>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="" class="btn btn-soft btn-xs btn-square btn-outline btn-view">
|
||||||
|
<i class="iconify lucide--eye"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
<a href="" class="btn btn-soft btn-xs btn-error btn-square">
|
||||||
|
<i class="iconify lucide--trash"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="join mt-5 justify-center flex items-center">
|
||||||
|
{% for paging in page.pagination.collection %}
|
||||||
|
{% if paging.name == 'next' %}
|
||||||
|
<a href="{{paging.url}}" class="btn btn-square btn-sm btn-outline border-base-300 join-item"
|
||||||
|
aria-label="Pagination controls">
|
||||||
|
<span class="iconify lucide--arrow-right"></span>
|
||||||
|
</a>
|
||||||
|
{% elsif paging.name == 'prev' %}
|
||||||
|
<a href="{{paging.url}}" class="btn btn-square btn-sm btn-outline border-base-300 join-item"
|
||||||
|
aria-label="Pagination controls">
|
||||||
|
<span class="iconify lucide--arrow-left"></span>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{paging.url}}"
|
||||||
|
class="btn btn-square btn-sm btn-outline border-base-300 join-item {% if paging.is_active == 1 %}btn-active{% endif %}">{{paging.name}}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<dialog id="js_list_category" class="modal">
|
</div>
|
||||||
<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>
|
<dialog id="js_list_category" class="modal">
|
||||||
</form>
|
<div class="modal-box w-11/12 max-w-5xl">
|
||||||
<div class="flex items-center">
|
<form method="dialog">
|
||||||
<b class="text-[16px]">Tổng sản phẩm:</b>
|
<button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button>
|
||||||
<p class="ml-[5px]">{{page.total}} sản phẩm</p>
|
</form>
|
||||||
</div>
|
<div class="flex items-center gap-2">
|
||||||
<div class="list-category mt-[5px] max-h-[400px] max-h-[400px] overflow-x-auto">
|
<b class="text-lg">Tổng sản phẩm:</b>
|
||||||
{% for cate in page.list_category %}
|
<p class="ml-2">{{page.total}} sản phẩm</p>
|
||||||
<a href="{{cate.url}}" class="item block mb-[5px] text-[#0041E8]">
|
</div>
|
||||||
{% if cate.children.size > 0 %}
|
<div class="list-category mt-1 max-h-400 max-h-400p overflow-x-auto">
|
||||||
<b class="text-[#0041E8]">+ (#{{cate.id}}){{cate.title}}</b>
|
{% for cate in page.list_category %}
|
||||||
|
<a href="{{cate.url}}" class="item block mb-2 text-primary">
|
||||||
|
{% if cate.children.size > 0 %}
|
||||||
|
<b class="text-primary">+ (#{{cate.id}}){{cate.title}}</b>
|
||||||
|
{% else %}
|
||||||
|
+ (#{{cate.id}}){{cate.title}}
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
{% if cate.children.size > 0 %}
|
||||||
|
<div class="ml-2">
|
||||||
|
{% for cate2 in cate.children %}
|
||||||
|
<a href="{{cate2.url}}" class="item block mb-2 text-primary">
|
||||||
|
{% if cate2.children.size > 0 %}
|
||||||
|
<b class="text-primary">+ (#{{cate2.id}}){{cate2.title}}</b>
|
||||||
{% else %}
|
{% else %}
|
||||||
+ (#{{cate.id}}){{cate.title}}
|
+ (#{{cate2.id}}){{cate2.title}} ({{cate2.totalProduct}})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% if cate.children.size > 0 %}
|
{% if cate2.children.size > 0 %}
|
||||||
<div class="ml-[15px]">
|
<div class="ml-2">
|
||||||
{% for cate2 in cate.children %}
|
{% for cate3 in cate2.children %}
|
||||||
<a href="{{cate2.url}}" class="item block mb-[5px] text-[#0041E8]">
|
<a href="{{cate3.url}}" class="item block mb-2 text-primary">+
|
||||||
{% if cate2.children.size > 0 %}
|
(#{{cate3.id}}){{cate3.title}}
|
||||||
<b class="text-[#0041E8]">+ (#{{cate2.id}}){{cate2.title}}</b>
|
({{cate3.totalProduct}})</a>
|
||||||
{% 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 %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<form method="dialog" class="modal-backdrop">
|
</div>
|
||||||
<button>close</button>
|
<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>
|
</form>
|
||||||
</dialog>
|
<div class="flex flex-wrap items-center">
|
||||||
|
<b class="inline-block w-34">Tìm theo chữ cái</b>
|
||||||
|
<div class="list-key inline-block ml-2 max-w-3xl">
|
||||||
<dialog id="js_list_brand" class="modal">
|
{% for key in page.brand_letters %}
|
||||||
<div class="modal-box w-11/12 max-w-3xl">
|
<a href="{{key.url}}">
|
||||||
<form method="dialog">
|
<span class="text-primary underline">{{key.key}}</span> <span>({{key.total}})</span>
|
||||||
<button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button>
|
</a>
|
||||||
</form>
|
{% endfor %}
|
||||||
<div class="flex flex-wrap items-center">
|
</div>
|
||||||
<b class="inline-block w-[120px]">Tìm theo chữ cái</b>
|
<div class="overflow-x-auto border border-base-200 rounded-sm mt-5 w-full mt-3">
|
||||||
<div class="list-key inline-block ml-[10px] w-[calc(100%-140px)]">
|
<table class="w-full table table-sm table-brand">
|
||||||
{% 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>
|
<thead>
|
||||||
<tr>
|
<tr class="bg-base-200">
|
||||||
<th>STT</th>
|
<th>STT</th>
|
||||||
<th>Thương hiệu</th>
|
<th>Thương hiệu</th>
|
||||||
<th class="whitespace-nowrap">Số lượng sản phẩm</th>
|
<th class="whitespace-nowrap">Số lượng sản phẩm</th>
|
||||||
@@ -290,11 +280,11 @@
|
|||||||
{% for item2 in item.1 %}
|
{% for item2 in item.1 %}
|
||||||
{% increment stt %}
|
{% increment stt %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="w-[10%]">{{stt}}</td>
|
<td>{{stt}}</td>
|
||||||
<td>{{item2.name}}</td>
|
<td>{{item2.name}}</td>
|
||||||
<td class="w-[18%]">
|
<td>
|
||||||
<span>{{item2.product}}</span>
|
<span>{{item2.product}}</span>
|
||||||
<a href="{{item2.url}}" class="text-[#0041E8]">(Xem sp)</a>
|
<a href="{{item2.url}}" class="text-primary">(Xem sp)</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@@ -303,9 +293,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form method="dialog" class="modal-backdrop">
|
</div>
|
||||||
<button>close</button>
|
<form method="dialog" class="modal-backdrop">
|
||||||
</form>
|
<button>close</button>
|
||||||
</dialog>
|
</form>
|
||||||
|
</dialog>
|
||||||
</div>
|
|
||||||
@@ -20,8 +20,9 @@
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" href="{{'style.css' | asset_url}}?{{ 'now' | date : '%Y-%m-%d.%H.%M.%S' }}">
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{'style.css' | asset_url}}">
|
||||||
|
<link rel="stylesheet" href="{{'style_hura.css' | asset_url}}?{{ 'now' | date : '%Y-%m-%d.%H.%M.%S' }}">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -45,13 +46,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% include javascript/index %}
|
{% include javascript/index %}
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user