changes
This commit is contained in:
@@ -126,243 +126,24 @@ import { watch } from "vue";
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const emit = defineEmits(["changetab", "langChanged"]);
|
||||
const { $find, $filter, $findIndex, $store } = useNuxtApp();
|
||||
const { $find, $filter, $store } = useNuxtApp();
|
||||
const lang = ref($store.lang);
|
||||
// var menu = $filter($store.common, { category: "topmenu" });
|
||||
const menu = [
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "dashboard",
|
||||
vi: "Dashboard",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Dashboard",
|
||||
component: "DashboardMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "orders",
|
||||
vi: "Đơn hàng",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Orders",
|
||||
component: "OrdersMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "inventory",
|
||||
vi: "Tồn kho",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Inventory",
|
||||
component: "InventoryMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "rights",
|
||||
vi: "Phân quyền",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Rights",
|
||||
component: "RightsMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "POS",
|
||||
vi: "POS",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "POS",
|
||||
component: "POSMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "receipts",
|
||||
vi: "Hoá đơn",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Receipts",
|
||||
component: "ReceiptsMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "imports",
|
||||
vi: "Nhập hàng",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Imports",
|
||||
component: "ImportsMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "exports",
|
||||
vi: "Xuất hàng",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Exports",
|
||||
component: "ExportsMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "inventory-transfer",
|
||||
vi: "Chuyển kho",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "InventoryTransfer",
|
||||
component: "InventoryTransferMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "inventory-count",
|
||||
vi: "Kiểm kho",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "InventoryCount",
|
||||
component: "InventoryCountMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "cash-book",
|
||||
vi: "Sổ quỹ",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "CashBook",
|
||||
component: "CashBookMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "topmenu",
|
||||
classify: "left",
|
||||
code: "report",
|
||||
vi: "Báo cáo",
|
||||
link: null,
|
||||
submenu: [
|
||||
{
|
||||
id: 1,
|
||||
category: "submenu",
|
||||
classify: "report",
|
||||
code: "ncc",
|
||||
vi: "NCC",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "NCC",
|
||||
component: "NCCMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "submenu",
|
||||
classify: "report",
|
||||
code: "customers",
|
||||
vi: "Khách hàng",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Customers",
|
||||
component: "CustomersMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "submenu",
|
||||
classify: "report",
|
||||
code: "goods",
|
||||
vi: "Hàng hoá",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Goods",
|
||||
component: "GoodsMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "submenu",
|
||||
classify: "report",
|
||||
code: "report-cash-book",
|
||||
vi: "Sổ quỹ",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "ReportCashBook",
|
||||
component: "ReportCashBookMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
category: "submenu",
|
||||
classify: "report",
|
||||
code: "finance",
|
||||
vi: "Tài chính",
|
||||
link: null,
|
||||
detail: {
|
||||
base: "Finance",
|
||||
component: "FinanceMaster",
|
||||
},
|
||||
index: 0,
|
||||
},
|
||||
],
|
||||
index: 0,
|
||||
},
|
||||
];
|
||||
const menu = $filter($store.common, { category: "topmenu" });
|
||||
// if($store.rights.length>0) {
|
||||
// menu = menu.filter(v=>$findIndex($store.rights, {setting: v.id})>=0)
|
||||
// }
|
||||
if (menu.length === 0) {
|
||||
$snackbar($store.lang === "vi" ? "Bạn không có quyền truy cập" : "You do not have permission to access.");
|
||||
}
|
||||
// menu.map(v=>{
|
||||
// let arr = $filter($store.common, {category: 'submenu', classify: v.code})
|
||||
// if($store.rights.length>0) {
|
||||
// arr = arr.filter(x=>$findIndex($store.rights, {setting: x.id})>=0)
|
||||
// }
|
||||
// v.submenu = arr.length>0? arr : null
|
||||
// })
|
||||
|
||||
menu.forEach((topmenu) => {
|
||||
let submenus = $filter($store.common, { category: "submenu", classify: topmenu.code });
|
||||
if ($store.rights.length > 0) {
|
||||
submenus = submenus.filter((x) => $findIndex($store.rights, { setting: x.id }) >= 0);
|
||||
}
|
||||
topmenu.submenu = submenus.length > 0 ? submenus : null;
|
||||
});
|
||||
|
||||
var leftmenu = $filter(menu, { category: "topmenu", classify: "left" });
|
||||
var currentTab = ref(leftmenu.length > 0 ? leftmenu[0] : undefined);
|
||||
var subTab = ref();
|
||||
@@ -401,7 +182,7 @@ function openProfile() {
|
||||
component: "user/Profile",
|
||||
width: "1100px",
|
||||
height: "360px",
|
||||
title: $store.lang === "vi" ? "Thông tin cá nhân" : '"User profile"',
|
||||
title: $store.lang === "vi" ? "Thông tin cá nhân" : "User profile",
|
||||
};
|
||||
$store.commit("showmodal", modal);
|
||||
}
|
||||
@@ -433,6 +214,10 @@ watch(
|
||||
);
|
||||
</script>
|
||||
<style scoped>
|
||||
a[class^="navbar"] {
|
||||
padding: 0.4rem 0.6rem;
|
||||
}
|
||||
|
||||
.navbar-dropdown {
|
||||
padding-block: 0.375rem;
|
||||
overflow: hidden;
|
||||
|
||||
3
app/components/exports/ExportsAssembled.vue
Normal file
3
app/components/exports/ExportsAssembled.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>ExportsAssembled</template>
|
||||
3
app/components/exports/ExportsDamaged.vue
Normal file
3
app/components/exports/ExportsDamaged.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>ExportsDamaged</template>
|
||||
3
app/components/exports/ExportsInternal.vue
Normal file
3
app/components/exports/ExportsInternal.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>ExportsInternal</template>
|
||||
3
app/components/imports/Returns.vue
Normal file
3
app/components/imports/Returns.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>Returns</template>
|
||||
@@ -166,24 +166,6 @@ var array = [
|
||||
},
|
||||
},
|
||||
},
|
||||
// {
|
||||
// code: "allocationRules",
|
||||
// name: "Quy tắc phân bổ",
|
||||
// typeView: "component",
|
||||
// component: defineAsyncComponent(() => import("@/components/parameter/AllocationRules.vue")),
|
||||
// vbind: {
|
||||
// api: "common",
|
||||
// setting: "parameter-gift",
|
||||
// pagename: "tableDiscountType",
|
||||
// timeopt: 36000,
|
||||
// modal: {
|
||||
// component: "parameter/AllocationRules",
|
||||
// title: "Thông tin quà tặng",
|
||||
// height: "400px",
|
||||
// vbind: { api: "gift" },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
];
|
||||
var current = ref(array[0]);
|
||||
function changeTab(v) {
|
||||
|
||||
3
app/components/receipts/CreateReceipts.vue
Normal file
3
app/components/receipts/CreateReceipts.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>CreateReceipts</template>
|
||||
3
app/components/receipts/Return.vue
Normal file
3
app/components/receipts/Return.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>Return</template>
|
||||
Reference in New Issue
Block a user