This commit is contained in:
Viet An
2026-06-19 08:56:42 +07:00
parent da4c779bbe
commit f491f82f43
13 changed files with 58 additions and 94 deletions

View File

@@ -7,7 +7,7 @@ const props = defineProps({
viewMode: String,
});
const { $getdata, $dayjs } = useNuxtApp();
const { $findapi, $getapi, $dayjs } = useNuxtApp();
const { invoices } = inject("orders");
const statuses = [
@@ -33,28 +33,15 @@ const statuses = [
},
];
const paymentStatuses = [
{
id: 1,
name: "Chưa thanh toán",
color: "red",
},
{
id: 2,
name: "Một phần",
color: "yellow",
},
{
id: 3,
name: "Đã thanh toán",
color: "green",
},
];
const paymentStatuses = ref([]);
const employees = ref([]);
onMounted(async () => {
employees.value = await $getdata("Staff");
const apis = $findapi(["Payment_Status", "Staff"]);
const [paymentStatusRes, staffRes] = await $getapi(apis);
paymentStatuses.value = paymentStatusRes.data.rows || [];
employees.value = staffRes.data.rows || [];
});
const input = ref();