changes
This commit is contained in:
@@ -126,243 +126,24 @@ import { watch } from "vue";
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const emit = defineEmits(["changetab", "langChanged"]);
|
const emit = defineEmits(["changetab", "langChanged"]);
|
||||||
const { $find, $filter, $findIndex, $store } = useNuxtApp();
|
const { $find, $filter, $store } = useNuxtApp();
|
||||||
const lang = ref($store.lang);
|
const lang = ref($store.lang);
|
||||||
// var menu = $filter($store.common, { category: "topmenu" });
|
const 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,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
// if($store.rights.length>0) {
|
// if($store.rights.length>0) {
|
||||||
// menu = menu.filter(v=>$findIndex($store.rights, {setting: v.id})>=0)
|
// menu = menu.filter(v=>$findIndex($store.rights, {setting: v.id})>=0)
|
||||||
// }
|
// }
|
||||||
if (menu.length === 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.");
|
$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})
|
menu.forEach((topmenu) => {
|
||||||
// if($store.rights.length>0) {
|
let submenus = $filter($store.common, { category: "submenu", classify: topmenu.code });
|
||||||
// arr = arr.filter(x=>$findIndex($store.rights, {setting: x.id})>=0)
|
if ($store.rights.length > 0) {
|
||||||
// }
|
submenus = submenus.filter((x) => $findIndex($store.rights, { setting: x.id }) >= 0);
|
||||||
// v.submenu = arr.length>0? arr : null
|
}
|
||||||
// })
|
topmenu.submenu = submenus.length > 0 ? submenus : null;
|
||||||
|
});
|
||||||
|
|
||||||
var leftmenu = $filter(menu, { category: "topmenu", classify: "left" });
|
var leftmenu = $filter(menu, { category: "topmenu", classify: "left" });
|
||||||
var currentTab = ref(leftmenu.length > 0 ? leftmenu[0] : undefined);
|
var currentTab = ref(leftmenu.length > 0 ? leftmenu[0] : undefined);
|
||||||
var subTab = ref();
|
var subTab = ref();
|
||||||
@@ -401,7 +182,7 @@ function openProfile() {
|
|||||||
component: "user/Profile",
|
component: "user/Profile",
|
||||||
width: "1100px",
|
width: "1100px",
|
||||||
height: "360px",
|
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);
|
$store.commit("showmodal", modal);
|
||||||
}
|
}
|
||||||
@@ -433,6 +214,10 @@ watch(
|
|||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
a[class^="navbar"] {
|
||||||
|
padding: 0.4rem 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar-dropdown {
|
.navbar-dropdown {
|
||||||
padding-block: 0.375rem;
|
padding-block: 0.375rem;
|
||||||
overflow: hidden;
|
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]);
|
var current = ref(array[0]);
|
||||||
function changeTab(v) {
|
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>
|
||||||
@@ -10,12 +10,13 @@
|
|||||||
<div class="fs-17 font-semibold is-flex is-gap-1 is-align-items-center mb-1">
|
<div class="fs-17 font-semibold is-flex is-gap-1 is-align-items-center mb-1">
|
||||||
<div
|
<div
|
||||||
v-if="subtab"
|
v-if="subtab"
|
||||||
class="is-flex is-gap-0.5 is-align-items-center"
|
class="is-flex is-gap-1 is-align-items-center"
|
||||||
>
|
>
|
||||||
<span>{{ tab[$store.lang] }}</span>
|
<span>{{ tab[$store.lang] }}</span>
|
||||||
<Icon
|
<Icon
|
||||||
name="material-symbols:arrow-forward-ios-rounded"
|
name="material-symbols:arrow-forward-ios-rounded"
|
||||||
:size="16"
|
:size="16"
|
||||||
|
class="has-text-grey"
|
||||||
/>
|
/>
|
||||||
<span>{{ subtab[$store.lang] }}</span>
|
<span>{{ subtab[$store.lang] }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// nuxt 3 - plugins/my-plugin.ts
|
// nuxt 3 - plugins/my-plugin.ts
|
||||||
import { useStore } from "~/stores/index";
|
import { useStore } from "~/stores/index";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { io } from "socket.io-client";
|
|
||||||
|
|
||||||
export default defineNuxtPlugin(() => {
|
export default defineNuxtPlugin(() => {
|
||||||
const module = "application";
|
const module = "application";
|
||||||
@@ -338,8 +337,8 @@ export default defineNuxtPlugin(() => {
|
|||||||
{
|
{
|
||||||
name: "common",
|
name: "common",
|
||||||
commit: "common",
|
commit: "common",
|
||||||
url: "data/Biz_Setting/",
|
url: "data/Common/",
|
||||||
url_detail: "data-detail/Biz_Setting/",
|
url_detail: "data-detail/Common/",
|
||||||
params: { sort: "index" },
|
params: { sort: "index" },
|
||||||
},
|
},
|
||||||
{ name: "upload", url: "upload/", params: {} },
|
{ name: "upload", url: "upload/", params: {} },
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|||||||
"datatype",
|
"datatype",
|
||||||
"filterchoice",
|
"filterchoice",
|
||||||
"colorchoice",
|
"colorchoice",
|
||||||
|
"common",
|
||||||
"textalign",
|
"textalign",
|
||||||
"placement",
|
"placement",
|
||||||
"colorscheme",
|
"colorscheme",
|
||||||
|
|||||||
@@ -4,9 +4,14 @@ import Orders from "@/components/orders/Orders.vue";
|
|||||||
import Inventory from "@/components/inventory/Inventory.vue";
|
import Inventory from "@/components/inventory/Inventory.vue";
|
||||||
import Rights from "@/components/rights/Rights.vue";
|
import Rights from "@/components/rights/Rights.vue";
|
||||||
import POS from "@/components/pos/POS.vue";
|
import POS from "@/components/pos/POS.vue";
|
||||||
import Receipts from "@/components/receipts/Receipts.vue";
|
import CreateReceipts from "@/components/receipts/CreateReceipts.vue";
|
||||||
|
import Return from "@/components/receipts/Return.vue";
|
||||||
import Imports from "@/components/imports/Imports.vue";
|
import Imports from "@/components/imports/Imports.vue";
|
||||||
|
import Returns from "@/components/imports/Returns.vue";
|
||||||
import Exports from "@/components/exports/Exports.vue";
|
import Exports from "@/components/exports/Exports.vue";
|
||||||
|
import ExportsDamaged from "@/components/exports/ExportsDamaged.vue";
|
||||||
|
import ExportsInternal from "@/components/exports/ExportsInternal.vue";
|
||||||
|
import ExportsAssembled from "@/components/exports/ExportsAssembled.vue";
|
||||||
import InventoryTransfer from "@/components/inventory-transfer/InventoryTransfer.vue";
|
import InventoryTransfer from "@/components/inventory-transfer/InventoryTransfer.vue";
|
||||||
import InventoryCount from "@/components/inventory-count/InventoryCount.vue";
|
import InventoryCount from "@/components/inventory-count/InventoryCount.vue";
|
||||||
import CashBook from "@/components/cash-book/CashBook.vue";
|
import CashBook from "@/components/cash-book/CashBook.vue";
|
||||||
@@ -141,9 +146,14 @@ const components = {
|
|||||||
Inventory,
|
Inventory,
|
||||||
Rights,
|
Rights,
|
||||||
POS,
|
POS,
|
||||||
Receipts,
|
CreateReceipts,
|
||||||
|
Return,
|
||||||
Imports,
|
Imports,
|
||||||
|
Returns,
|
||||||
Exports,
|
Exports,
|
||||||
|
ExportsDamaged,
|
||||||
|
ExportsInternal,
|
||||||
|
ExportsAssembled,
|
||||||
InventoryTransfer,
|
InventoryTransfer,
|
||||||
InventoryCount,
|
InventoryCount,
|
||||||
CashBook,
|
CashBook,
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ export const useStore = defineStore("maindev", {
|
|||||||
productdocument: undefined,
|
productdocument: undefined,
|
||||||
applicationstatus: undefined,
|
applicationstatus: undefined,
|
||||||
applicationproduct: undefined,
|
applicationproduct: undefined,
|
||||||
lastlegendfiltertab: "Giỏ hàng",
|
|
||||||
layersetting: undefined,
|
|
||||||
country: undefined,
|
country: undefined,
|
||||||
lang: "vi",
|
lang: "vi",
|
||||||
branch: {},
|
branch: {},
|
||||||
@@ -24,6 +22,9 @@ export const useStore = defineStore("maindev", {
|
|||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
commit(name, data) {
|
commit(name, data) {
|
||||||
|
// if (name === "common") {
|
||||||
|
// console.trace("commit", name, data);
|
||||||
|
// }
|
||||||
this[name] = data;
|
this[name] = data;
|
||||||
},
|
},
|
||||||
removeSnackbar() {
|
removeSnackbar() {
|
||||||
|
|||||||
Reference in New Issue
Block a user