This commit is contained in:
2024-05-07 15:42:55 +07:00
parent 6415cca99f
commit fe7ddf826e
8 changed files with 327 additions and 165 deletions

View File

@@ -5,35 +5,71 @@
// Sự kiện click để hiển thị menu
$('#js-show-menu').click(function () {
capNhatTrangThaiMenu(false);
AdminFunction.capNhatTrangThaiMenu(false);
});
// Sự kiện click để ẩn menu
$('#js-hide-menu').click(function () {
capNhatTrangThaiMenu(true);
AdminFunction.capNhatTrangThaiMenu(true);
});
// Kiểm tra localStorage và thiết lập trạng thái ban đầu của menu
const hideMenuBig = localStorage.getItem('menu_big') === 'hidden';
capNhatTrangThaiMenu(hideMenuBig);
AdminFunction.capNhatTrangThaiMenu(hideMenuBig);
AdminFunction.run_search('#js-input-search')
AdminFunction.searchSelect('#js-assign-admin');
AdminFunction.searchSelect('#js-order-status-select');
})
// Hàm để cập nhật trạng thái hiển thị menu và localStorage
function capNhatTrangThaiMenu(hideMenuBig) {
if (hideMenuBig === false) {
$('#js-admin-content-container').addClass('show-large-menu')
} else {
$('#js-admin-content-container').removeClass('show-large-menu')
}
function debounce(func, wait, immediate) {
var timeout;
return function () {
var context = this, args = arguments;
var later = function () {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
};
$('#js-menu-big').toggleClass('hidden', hideMenuBig);
$('#js-menu-small').toggleClass('hidden', !hideMenuBig);
$('#js-form-search').toggleClass('menu-hide', hideMenuBig);
localStorage.setItem(hideMenuBig ? 'menu_big' : 'menu_small', 'hidden');
localStorage.removeItem(hideMenuBig ? 'menu_small' : 'menu_big');
function getTextAreaSelection(textarea) {
var start = textarea.selectionStart, end = textarea.selectionEnd;
return {
start: start,
end: end,
length: end - start,
text: textarea.value.slice(start, end)
};
}
function detectPaste(textarea, callback) {
textarea.onpaste = function () {
var sel = getTextAreaSelection(textarea);
var initialLength = textarea.value.length;
window.setTimeout(function () {
var val = textarea.value;
var pastedTextLength = val.length - (initialLength - sel.length);
var end = sel.start + pastedTextLength;
callback({
start: sel.start,
end: end,
length: pastedTextLength,
text: val.slice(sel.start, end)
});
}, 1);
};
}
// end search
function formatCurrency(a) {
var b = parseFloat(a).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1.").toString();

View File

@@ -4,14 +4,25 @@
</div>
<div class="order-detail-page leading-[20px] max-w-[1141px] m-auto">
<div class="text-right">
<a href="" title="In đơn hàng" class="fas fa-print hover:bg-[#0041E8] hover:text-[#fff] inline-block text-center text-[15px] text-[#9E9E9E] rounded-[4px] ml-[10px] w-[30px] h-[30px] leading-[30px] border border-[#ececec] bg-[#F9F9F9]"></a>
<a href="" title="" class="far fa-envelope hover:bg-[#0041E8] hover:text-[#fff] inline-block text-center text-[15px] text-[#9E9E9E] rounded-[4px] ml-[10px] w-[30px] h-[30px] leading-[30px] border border-[#ececec] bg-[#F9F9F9]"></a>
</div>
<div class="shadow-[0px_1px_1px_0px_rgba(0,0,0,0.10)] rounded-[10px] bg-white text-center p-[17px] m-[12px_0]">
<p class="text-[18px] font-[700] mb-[3px] leading-[23px]">Đơn hàng #000-368</p>
<p>Thời gian: 16-11-2023, 9:59 am</p>
<div class="shadow-[0px_1px_1px_0px_rgba(0,0,0,0.10)] rounded-[10px] bg-white p-[15px] m-[12px_0]">
<div class="flex items-center justify-between">
<b class="text-[18px] font-[700] mb-[3px] leading-[23px]">Đơn hàng #000-368</b>
<div class="text-right">
<a href="" title="In đơn hàng"
class="hover:bg-[#0041E8] hover:text-[#fff] inline-block text-center text-[15px] text-[#9E9E9E] rounded-[4px] ml-[10px] p-[8px] border border-[#ececec] bg-[#F9F9F9]">
<i class="fas fa-print"></i>
<span>In đơn hàng</span>
</a>
<a href="" title=""
class="hover:bg-[#0041E8] hover:text-[#fff] inline-block text-center text-[15px] text-[#9E9E9E] rounded-[4px] ml-[10px] p-[8px] border border-[#ececec] bg-[#F9F9F9]">
<i class="far fa-envelope"></i>
<span>Gửi email</span>
</a>
</div>
</div>
<p class="mt-[5px]">Thời gian: 16-11-2023, 9:59 am</p>
</div>
<div class="flex flex-wrap justify-between">
@@ -40,7 +51,8 @@
<td> Địa chỉ nhận hàng </td>
<td>
<span> Kiến Hưng, Quận Hà Đông, Hà Nội </span>
<a href="#js-update-shipping-address" data-fancybox title="Cập nhật địa chỉ nhận hàng" class="icons icon-edit inline-block" style="background-position: -111px -86px;"></a>
<a href="#js-update-shipping-address" data-fancybox title="Cập nhật địa chỉ nhận hàng"
class="icons icon-edit inline-block" style="background-position: -111px -86px;"></a>
</td>
</tr>
@@ -48,7 +60,8 @@
<td> Địa chỉ thanh toán </td>
<td>
<span> Kiến Hưng, Quận Hà Đông, Hà Nội </span>
<a href="#js-update-payment" data-fancybox title="Cập nhật địa chỉ thanh toán" class="icons icon-edit inline-block" style="background-position: -111px -86px;"></a>
<a href="#js-update-payment" data-fancybox title="Cập nhật địa chỉ thanh toán"
class="icons icon-edit inline-block" style="background-position: -111px -86px;"></a>
</td>
</tr>
</table>
@@ -77,8 +90,9 @@
<tr>
<td> 1 </td>
<td class="text-[#0041E8]"> HH0003 </td>
<td class="text-left">
<a href="" target="_blank" class="text-[#0041E8]"> HHWS - CORE i9 9900X | 32G | NVIDIA RTX 2060 6GB </a>
<td class="text-left">
<a href="" target="_blank" class="text-[#0041E8]"> HHWS - CORE i9 9900X | 32G |
NVIDIA RTX 2060 6GB </a>
</td>
<td> 34.800.000 VND (chiếc) </td>
<td> 2 </td>
@@ -105,17 +119,21 @@
<tr>
<td> Phí vận chuyển & giao hàng </td>
<td>
<td>
<span> 0 VND </span>
<a href="#js-update-order-shipping" data-fancybox="" title="Cập nhật phí ship cho đơn hàng" class="icons icon-edit inline-block" style="background-position: -111px -86px;vertical-align:sub;"></a>
<a href="#js-update-order-shipping" data-fancybox=""
title="Cập nhật phí ship cho đơn hàng" class="icons icon-edit inline-block"
style="background-position: -111px -86px;vertical-align:sub;"></a>
</td>
</tr>
<tr>
<td> Phí thu hộ </td>
<td>
<td>
<span> 0 VND </span>
<a href="#js-update-order-shipping" data-fancybox="" title="Cập nhật phí ship cho đơn hàng" class="icons icon-edit inline-block" style="background-position: -111px -86px;vertical-align:sub;"></a>
<a href="#js-update-order-shipping" data-fancybox=""
title="Cập nhật phí ship cho đơn hàng" class="icons icon-edit inline-block"
style="background-position: -111px -86px;vertical-align:sub;"></a>
</td>
</tr>
@@ -151,7 +169,7 @@
<td> test </td>
<td> Đức lúc 22-05-2023, 4:49 pm </td>
</tr>
<tr>
<td colspan="5" align="left"> Hiện tại chưa có trạng thái nào được cập nhật </td>
</tr>
@@ -163,15 +181,21 @@
<div class="rounded-[10px] w-[273px] leading-[18px]">
<div class="rounded-[15px] bg-white p-[18px_16px] shadow-[0px_1px_1px_0px_rgba(0,0,0,0.10)] mb-[16px]">
<div
class="rounded-[15px] w-[100%] bg-white p-[18px_16px] shadow-[0px_1px_1px_0px_rgba(0,0,0,0.10)] mb-[16px]">
<p class="mb-[7px] font-[700]">Nhân sự xử lý đơn hàng</p>
<p>
<span class="inline-block">Uyên Hura</span>
<a href="javascript:$('#js-assign-holder').toggle()" title="Chỉnh sửa" class="icons icon-edit inline-block w-[18px] h-[18px]" style="background-position: -111px -86px;vertical-align: sub;"></a>
<a href="javascript:$('#js-assign-holder').toggle()" title="Chỉnh sửa"
class="icons icon-edit inline-block w-[18px] h-[18px]"
style="background-position: -111px -86px;vertical-align: sub;"></a>
</p>
<div id="js-assign-holder" style="display: none">
<select onchange="OrderManagement.assignAdmin('130', this.value, this.options[this.selectedIndex].text)" class="mt-[10px] block w-[100%] h-[30px] border border-[#D8D8D8] rounded-[4px]">
<select
onchange="OrderManagement.assignAdmin('130', this.value, this.options[this.selectedIndex].text)"
class="mt-[10px] block w-[100%] h-[30px] border border-[#D8D8D8] rounded-[4px]"
id="js-assign-admin">
<option value="">--Người thực hiện --</option>
<option value="24">Uyên Hura</option>
<option value="23">HuraSoft</option>
@@ -185,27 +209,31 @@
<p class="mb-[7px] font-[700]"> Trạng thái thanh toán </p>
<p class="flex items-center m-[8px_0]">
<span style="background: #E00000" class="leading-[30px] mr-[5px] p-[0_9px] rounded-[15px] text-[#fff]">
<span style="background: #E00000"
class="leading-[30px] mr-[5px] p-[0_9px] rounded-[15px] text-[#fff]">
Chưa thanh toán
</span>
<a href="javascript:$('#js-payment-status-holder').show()" title="Chỉnh sửa" class="icons icon-edit inline-block w-[18px] h-[18px]" style="background-position: -111px -86px;vertical-align: sub;"></a>
<a href="javascript:$('#js-payment-status-holder').show()" title="Chỉnh sửa"
class="icons icon-edit inline-block w-[18px] h-[18px]"
style="background-position: -111px -86px;vertical-align: sub;"></a>
</p>
<div id="js-payment-status-holder" style="display: none;">
<div>
<textarea placeholder="Ghi chú (v.d. Chuyển khoản ngân hàng VCB, số tham chiếu 1234)" id="js-payment-comment" class="m-[10px_0] block w-[100%] min-h-[76px] max-h-[120px] border border-[#D8D8D8] rounded-[4px] p-[8px]"></textarea>
<textarea placeholder="Ghi chú (v.d. Chuyển khoản ngân hàng VCB, số tham chiếu 1234)"
id="js-payment-comment"
class="m-[10px_0] block w-[100%] min-h-[76px] max-h-[120px] border border-[#D8D8D8] rounded-[4px] p-[8px]"></textarea>
</div>
<div style="margin: 5px 0 10px;">
<input type="button" onclick="OrderManagement.update_payment_status()" title="Click để xác nhận đơn đã được thanh toán đủ" value="Đã nhận đủ"
class="bg-[#0041E8] cursor-pointer font-[500] h-[32px] p-[0_15px] rounded-[4px] text-[#fff]"
>
<input type="button" onclick="OrderManagement.update_payment_status()"
title="Click để xác nhận đơn đã được thanh toán đủ" value="Đã nhận đủ"
class="bg-[#0041E8] cursor-pointer font-[500] h-[32px] p-[0_15px] rounded-[4px] text-[#fff]">
<input type="button" value="Quay lại"
class="bg-[#ECECEC] cursor-pointer font-[500] h-[32px] p-[0_12px] rounded-[4px] text-[#9E9E9E]"
onclick="$('#js-payment-status-holder').hide()"
>
onclick="$('#js-payment-status-holder').hide()">
</div>
</div>
@@ -216,46 +244,54 @@
<p class="mb-[7px] font-[700]"> Trạng thái vận chuyển </p>
<p class="flex items-center m-[8px_0]">
<span style="background: #E00000" class="leading-[30px] mr-[5px] p-[0_9px] rounded-[15px] text-[#fff]">
<span style="background: #E00000"
class="leading-[30px] mr-[5px] p-[0_9px] rounded-[15px] text-[#fff]">
Chưa chuyển
</span>
<a href="javascript:$('#js-fulfillment-status-holder').show()" title="Chỉnh sửa" class="icons icon-edit inline-block w-[18px] h-[18px]" style="background-position: -111px -86px;vertical-align: sub;"></a>
<a href="javascript:$('#js-fulfillment-status-holder').show()" title="Chỉnh sửa"
class="icons icon-edit inline-block w-[18px] h-[18px]"
style="background-position: -111px -86px;vertical-align: sub;"></a>
</p>
<div id="js-fulfillment-status-holder" style="display: none;">
<div>
<textarea placeholder="Ghi chú (v.d. Chuyển phát ViettelPost, mã phiếu gửi 1234)" id="js-fulfillment-comment" class="m-[10px_0] block w-[100%] min-h-[76px] max-h-[120px] border border-[#D8D8D8] rounded-[4px] p-[8px]"></textarea>
<textarea placeholder="Ghi chú (v.d. Chuyển phát ViettelPost, mã phiếu gửi 1234)"
id="js-fulfillment-comment"
class="m-[10px_0] block w-[100%] min-h-[76px] max-h-[120px] border border-[#D8D8D8] rounded-[4px] p-[8px]"></textarea>
</div>
<div style="margin: 5px 0 10px;">
<input type="button" onclick="OrderManagement.update_fulfillment_status()" title="Click để xác nhận đơn đã được vận chuyển thành công" value="Đã vận chuyển"
class="bg-[#0041E8] cursor-pointer font-[500] h-[32px] p-[0_15px] rounded-[4px] text-[#fff]"
>
<input type="button" onclick="OrderManagement.update_fulfillment_status()"
title="Click để xác nhận đơn đã được vận chuyển thành công" value="Đã vận chuyển"
class="bg-[#0041E8] cursor-pointer font-[500] h-[32px] p-[0_15px] rounded-[4px] text-[#fff]">
<input type="button" value="Quay lại"
class="bg-[#ECECEC] cursor-pointer font-[500] h-[32px] p-[0_12px] rounded-[4px] text-[#9E9E9E]"
onclick="$('#js-fulfillment-status-holder').hide()"
>
onclick="$('#js-fulfillment-status-holder').hide()">
</div>
</div>
<p>Khách chọn: Giao hàng tiêu chuẩn</p>
</div>
<div class="rounded-[15px] bg-white p-[18px_16px] shadow-[0px_1px_1px_0px_rgba(0,0,0,0.10)] mb-[16px]">
<p class="mb-[7px] font-[700]">
Trạng thái đơn hàng
<a href="javascript:$('#js-order-status-holder').show()" title="Chỉnh sửa" class="icons icon-edit inline-block w-[18px] h-[18px]" style="background-position: -111px -86px;vertical-align: sub;"></a>
<p class="mb-[7px] font-[700]">
Trạng thái đơn hàng
<a href="javascript:$('#js-order-status-holder').show()" title="Chỉnh sửa"
class="icons icon-edit inline-block w-[18px] h-[18px]"
style="background-position: -111px -86px;vertical-align: sub;"></a>
</p>
<div id="js-order-status-holder" style="display: none;">
<div>
<textarea placeholder="Ghi chú" id="js-order-comment" class="m-[10px_0] block w-[100%] min-h-[76px] max-h-[120px] border border-[#D8D8D8] rounded-[4px] p-[8px]"></textarea>
<textarea placeholder="Ghi chú" id="js-order-comment"
class="m-[10px_0] block w-[100%] min-h-[76px] max-h-[120px] border border-[#D8D8D8] rounded-[4px] p-[8px]"></textarea>
</div>
<div style="margin-top: 5px;">
<select id="js-order-status-select" class="m-[10px_0] block w-[100%] h-[30px] border border-[#D8D8D8] rounded-[4px]">
<div style="margin-top: 5px;">
<select id="js-order-status-select"
class="m-[10px_0] block w-[100%] h-[30px] border border-[#D8D8D8] rounded-[4px]">
<option value="">--Chọn trạng thái--</option>
<option value="new">Mới</option>
<option value="processing">Đang xử lý</option>
@@ -263,29 +299,28 @@
<option value="closed">Đóng lại</option>
<option value="canceled">Hủy</option>
</select>
<input type="button" onclick="OrderManagement.update_order_status()" title="Click để xác nhận" value="Lưu lại"
class="bg-[#0041E8] cursor-pointer font-[500] h-[32px] p-[0_15px] rounded-[4px] text-[#fff]"
>
<input type="button" onclick="OrderManagement.update_order_status()" title="Click để xác nhận"
value="Lưu lại"
class="bg-[#0041E8] cursor-pointer font-[500] h-[32px] p-[0_15px] rounded-[4px] text-[#fff] mt-[15px]">
<input type="button" value="Quay lại"
class="bg-[#ECECEC] cursor-pointer font-[500] h-[32px] p-[0_12px] rounded-[4px] text-[#9E9E9E]"
onclick="$('#js-order-status-holder').hide()"
>
class="bg-[#ECECEC] cursor-pointer font-[500] h-[32px] p-[0_12px] rounded-[4px] text-[#9E9E9E] mt-[15px]"
onclick="$('#js-order-status-holder').hide()">
</div>
</div>
</div>
<div class="rounded-[15px] bg-white p-[18px_16px] shadow-[0px_1px_1px_0px_rgba(0,0,0,0.10)] mb-[16px]">
<p class="mb-[7px] font-[700]"> Ghi chú </p>
<textarea placeholder="Ghi chú" id="js-comment" class="m-[10px_0] block w-[100%] min-h-[76px] max-h-[120px] border border-[#D8D8D8] rounded-[4px] p-[8px]"></textarea>
<textarea placeholder="Ghi chú" id="js-comment"
class="m-[10px_0] block w-[100%] min-h-[76px] max-h-[120px] border border-[#D8D8D8] rounded-[4px] p-[8px]"></textarea>
<div>
<span id="js-comment-status-holder"></span>
<input type="button" onclick="OrderManagement.update_admin_comment()" value="Lưu lại"
class="bg-[#0041E8] cursor-pointer font-[500] h-[32px] p-[0_15px] rounded-[4px] text-[#fff]"
>
class="bg-[#0041E8] cursor-pointer font-[500] h-[32px] p-[0_15px] rounded-[4px] text-[#fff]">
</div>
</div>
@@ -301,57 +336,65 @@
<tr>
<td width="100">Họ tên</td>
<td>
<input type="text" id="js-shipping-address-person_name" value="Nguyen Duc Quan" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-shipping-address-person_name" value="Nguyen Duc Quan"
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
</tr>
<tr>
<td>Mobile</td>
<td>
<input type="text" id="js-shipping-address-mobile" value="0832256395" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-shipping-address-mobile" value="0832256395"
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td>Tỉnh/thành</td>
<td>
<input type="text" id="js-shipping-address-province_name" value="TP HCM" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-shipping-address-province_name" value="TP HCM"
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td>Quận huyện</td>
<td>
<input type="text" id="js-shipping-address-district_name" value="Quận Gò Vấp" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-shipping-address-district_name" value="Quận Gò Vấp"
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td>Phường/xã</td>
<td>
<input type="text" id="js-shipping-address-ward_name" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-shipping-address-ward_name" value=""
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td>Địa chỉ</td>
<td>
<input type="text" id="js-shipping-address-address" size="50" value="Kiến Hưng - Hà Đông - Hà Nội" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-shipping-address-address" size="50" value="Kiến Hưng - Hà Đông - Hà Nội"
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<!--<tr><td>Phân loại</td><td><input type=text id="js-shipping-address-type" size=30 value="" /></td></tr>-->
<tr>
<td>Ghi chú</td>
<td>
<input type="text" id="js-shipping-address-note" value="test" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-shipping-address-note" value="test"
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td></td>
<td>
<input type="button" value="Cập nhật" onclick="OrderManagement.updateShippingAddress()" class="text-[#fff] bg-[#0041E8] rounded-[4px] h-[32px] p-[0_8px] cursor-pointer">
<td>
<input type="button" value="Cập nhật" onclick="OrderManagement.updateShippingAddress()"
class="text-[#fff] bg-[#0041E8] rounded-[4px] h-[32px] p-[0_8px] cursor-pointer">
</td>
</tr>
</table>
@@ -361,74 +404,83 @@
<!-- // Cập nhật địa chỉ thanh toán -->
<div id="js-update-payment" class="p-[20px_16px] rounded-[15px] w-[100%] max-w-[600px]" style="display: none;">
<p class="leading-[20px] text-[16px] font-bold mb-[15px]"> Cập nhật địa chỉ thanh toán </p>
<label class="inline-flex cursor-pointer">
<input type="checkbox" value="1" id="js-payment-address-check-same-as-shipping" checked="" onchange="$('#js-payment-address-holder').toggle()" class="scale-[1.4] mr-[10px]">
<input type="checkbox" value="1" id="js-payment-address-check-same-as-shipping" checked=""
onchange="$('#js-payment-address-holder').toggle()" class="scale-[1.4] mr-[10px]">
<span> Giống như địa chỉ nhận hàng </span>
</label>
<div id="js-payment-address-holder" style="display: none;margin-top: 20px">
<p class="leading-[20px] text-[16px] font-bold mb-[15px]"> Nhập địa chỉ: </p>
<table class="w-[100%]">
<tr>
<td width="100">Họ tên</td>
<td>
<input type="text" id="js-payment-address-person_name" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-payment-address-person_name" value=""
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
</tr>
<tr>
<td>Mobile</td>
<td>
<input type="text" id="js-payment-address-mobile" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-payment-address-mobile" value=""
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td>Tỉnh/thành</td>
<td>
<input type="text" id="js-payment-address-province_name" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-payment-address-province_name" value=""
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td>Quận huyện</td>
<td>
<input type="text" id="js-payment-address-district_name" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-payment-address-district_name" value=""
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td>Phường/xã</td>
<td>
<input type="text" id="js-payment-address-ward_name" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-payment-address-ward_name" value=""
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td>Địa chỉ</td>
<td>
<input type="text" id="js-payment-address-address" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-payment-address-address" value=""
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<!-- <tr><td>Phân loại</td><td><input type=text id="js-payment-address-type" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block"/></td></tr> -->
<tr>
<td>Ghi chú</td>
<td>
<input type="text" id="js-payment-address-note" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="js-payment-address-note" value=""
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
</td>
</tr>
<tr>
<td></td>
<td>
<input type="button" value="Cập nhật" onclick="OrderManagement.updatePaymentAddress()" class="text-[#fff] bg-[#0041E8] rounded-[4px] h-[32px] p-[0_8px] cursor-pointer">
<td>
<input type="button" value="Cập nhật" onclick="OrderManagement.updatePaymentAddress()"
class="text-[#fff] bg-[#0041E8] rounded-[4px] h-[32px] p-[0_8px] cursor-pointer">
</td>
</tr>
</table>
</table>
</div>
</div>
@@ -441,23 +493,26 @@
<tr>
<td>Phí ship</td>
<td>
<input type="text" id="shippingFee" onkeyup="this.value = writeStringToPrice(this.value)" value="0" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] h-[32px] m-[0_10px_10px_0] border border-[#D8D8D8] rounded-[4px] inline-block">
<input type="text" id="shippingFee" onkeyup="this.value = writeStringToPrice(this.value)" value="0"
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] h-[32px] m-[0_10px_10px_0] border border-[#D8D8D8] rounded-[4px] inline-block">
<span>VND</span>
</td>
</tr>
<tr>
<td>Chi chú</td>
<td>
<input type="text"id="shippingNote" value="" class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<input type="text" id="shippingNote" value=""
class="shadow-[0px_2px_4px_0px_rgba(0,0,0,0.12)] p-[0_10px] w-[100%] h-[32px] mb-[10px] border border-[#D8D8D8] rounded-[4px] block">
<i>v.d. Gửi xe khách, Máy bay, EMS</i>
</td>
</tr>
<tr>
<td></td>
<td>
<input type="button" value="Cập nhật" onclick="update_order_shipping(369)" class="text-[#fff] bg-[#0041E8] rounded-[4px] h-[32px] p-[0_8px] cursor-pointer mt-[15px]">
<input type="button" value="Cập nhật" onclick="update_order_shipping(369)"
class="text-[#fff] bg-[#0041E8] rounded-[4px] h-[32px] p-[0_8px] cursor-pointer mt-[15px]">
</td>
</tr>
</table>

View File

@@ -83,11 +83,11 @@
<thead>
<tr>
<td> STT </td>
<td> Mã số </td>
<td> Thời gian </td>
<td class="w-[85px]"> Mã số </td>
<td class="w-[165px]"> Thời gian </td>
<td> Khách hàng </td>
<td> Tỉnh/TP </td>
<td> Giá trị </td>
<td class="w-[150px]"> Giá trị </td>
<td width="150">
<select onchange="setHiddenValue('js-payment', this.value); runFilter()">
<option value="">Thanh toán</option>

View File

@@ -117,31 +117,37 @@
<b class="ml-[3px]">{{item.quantity}}</b>
</div>
</td>
<td>
<td class="align-text-top">
<label class="style-checkbox mb-[7px]">Mới Hot (Hỏi nhiều)
<input type="checkbox" name="new" {% if item.hot_type=="new" %}checked{% endif %}>
<input type="checkbox" name="new" {% if item.hot_type=="new" %}checked{% endif %}
onclick="AdminFunction.update_product_hot({{item.id}})">
<span class="checkmark"></span>
</label>
<label class="style-checkbox mb-[7px]">HOT (hỏi
nhiều)
<input type="checkbox" name="hot" {% if item.hot_type=="hot" %}checked{% endif %}>
<input type="checkbox" name="hot" {% if item.hot_type=="hot" %}checked{% endif %}
onclick="AdminFunction.update_product_hot({{item.id}})">
<span class="checkmark"></span>
</label>
<label class="style-checkbox mb-[7px]">Bán
chạy
<input type="checkbox" name="bestsale" {% if item.hot_type=="bestsale" %}checked{% endif %}>
<input type="checkbox" name="bestsale" {% if item.hot_type=="bestsale" %}checked{% endif %}
onclick="AdminFunction.update_product_hot({{item.id}})">
<span class="checkmark"></span>
</label>
<label class="style-checkbox mb-[7px]">Xả
hàng (sale-off)
<input type="checkbox" name="saleoff" {% if item.hot_type=="saleoff" %}checked{% endif %}>
<input type="checkbox" name="saleoff" {% if item.hot_type=="saleoff" %}checked{% endif %}
onclick="AdminFunction.update_product_hot({{item.id}})">
<span class="checkmark"></span>
</label>
<label class="style-checkbox mb-[7px]">Chỉ bán online
<input type="checkbox" name="online-only" {% if item.hot_type=="online-only" %}checked{%
endif %}>
endif %} onclick="AdminFunction.update_product_hot({{item.id}})">
<span class="checkmark"></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]">

View File

@@ -235,9 +235,18 @@
placeholder="Tìm kiếm">
</div>
<div class="autocomplete-suggestions absolute bg-white p-[5px] w-[100%] shadow-[0_2px_7px_0_rgb(177_177_177)] hidden"
<div class="autocomplete-suggestions absolute bg-white w-[100%] shadow-[0_2px_7px_0_rgb(177_177_177)] hidden rounded-[4px]"
id="js-show-search">
<a href="" class="item line-clamp-1">Máy in mã vạch MH241</a>
<a href="" class="item line-clamp-1">Chăn hè đũi xơ đậu nành mã 32 Gấu xanh</a>
<a href="" class="item line-clamp-1">Máy đo độ bóng Horiba IG-320 (gloss meter)</a>
<a href="" class="item line-clamp-1">iPhone 11 Chính Hãng</a>
<a href="" class="item line-clamp-1">cpu core i3 1</a>
<a href="" class="item line-clamp-1">Máy in mã vạch MH241</a>
<a href="" class="item line-clamp-1">Chăn hè đũi xơ đậu nành mã 32 Gấu xanh</a>
<a href="" class="item line-clamp-1">Máy đo độ bóng Horiba IG-320 (gloss meter)</a>
<a href="" class="item line-clamp-1">iPhone 11 Chính Hãng</a>
<a href="" class="item line-clamp-1">cpu core i3 1</a>
</div>
</form>
@@ -290,12 +299,14 @@
</div>
</div>
{% include javascript/index %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/datepicker.min.js"></script>
<script src="{{ 'main.js' | asset_url }}"></script>
{% include javascript/index %}
</body>
</html>