diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..f158eb0 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +**/*.min.js +my-bulma-project.css +my-bulma-project.css.map \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..aad7b5f --- /dev/null +++ b/.prettierrc @@ -0,0 +1,24 @@ +{ + "arrowParens": "always", + "bracketSameLine": false, + "objectWrap": "preserve", + "bracketSpacing": true, + "semi": true, + "experimentalOperatorPosition": "end", + "experimentalTernaries": false, + "singleQuote": false, + "jsxSingleQuote": false, + "quoteProps": "as-needed", + "trailingComma": "all", + "singleAttributePerLine": true, + "htmlWhitespaceSensitivity": "css", + "vueIndentScriptAndStyle": false, + "proseWrap": "preserve", + "endOfLine": "lf", + "insertPragma": false, + "printWidth": 120, + "requirePragma": false, + "tabWidth": 2, + "useTabs": false, + "embeddedLanguageFormatting": "auto" +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..774dabf --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[vue]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "editor.formatOnSave": true +} diff --git a/app/assets/styles/main.scss b/app/assets/styles/main.scss index 1e959d0..318126b 100644 --- a/app/assets/styles/main.scss +++ b/app/assets/styles/main.scss @@ -14,9 +14,14 @@ .blockdiv { max-width: 1900px !important; padding: 1rem 2rem 2rem; - @include mobile { padding: 1rem; } - + @include mobile { + padding: 1rem; + } + .columns .column { - @include mobile { padding-left: 0; padding-right: 0; } + @include mobile { + padding-left: 0; + padding-right: 0; + } } } diff --git a/app/assets/styles/overrides-components.scss b/app/assets/styles/overrides-components.scss index 3928e53..c4dae83 100644 --- a/app/assets/styles/overrides-components.scss +++ b/app/assets/styles/overrides-components.scss @@ -13,4 +13,4 @@ // might break lots of stuff // .skeleton-block:not(:last-child), .media:not(:last-child), .level:not(:last-child), .fixed-grid:not(:last-child), .grid:not(:last-child), .tabs:not(:last-child), .pagination:not(:last-child), .message:not(:last-child), .card:not(:last-child), .breadcrumb:not(:last-child), .field:not(:last-child), .file:not(:last-child), .title:not(:last-child), .subtitle:not(:last-child), .tags:not(:last-child), .table:not(:last-child), .table-container:not(:last-child), .progress:not(:last-child), .notification:not(:last-child), .content:not(:last-child), .buttons:not(:last-child), .box:not(:last-child), .block:not(:last-child) { // margin-bottom: inherit; -// } \ No newline at end of file +// } diff --git a/app/assets/styles/utils.scss b/app/assets/styles/utils.scss index a33e13c..184deb6 100644 --- a/app/assets/styles/utils.scss +++ b/app/assets/styles/utils.scss @@ -2,61 +2,66 @@ // Font size loops @for $i from 10 through 50 { - .fs-#{$i} { font-size: $i + px; } - .fsb-#{$i} { font-size: $i + px; font-weight: bold; } + .fs-#{$i} { + font-size: $i + px; + } + .fsb-#{$i} { + font-size: $i + px; + font-weight: bold; + } } -.font-thin { +.font-thin { font-weight: 100; } -.font-extralight { +.font-extralight { font-weight: 200; } -.font-light { +.font-light { font-weight: 300; } -.font-normal { +.font-normal { font-weight: 400; } -.font-medium { +.font-medium { font-weight: 500; } -.font-semibold { +.font-semibold { font-weight: 600; } -.font-bold { +.font-bold { font-weight: 700; } -.font-extrabold { +.font-extrabold { font-weight: 800; } -.font-black { +.font-black { font-weight: 900; } .rounded-xs { - border-radius: 0.125rem; + border-radius: 0.125rem; } .rounded-sm { - border-radius: 0.25rem; + border-radius: 0.25rem; } .rounded-md { - border-radius: 0.375rem; + border-radius: 0.375rem; } .rounded-lg { - border-radius: 0.5rem; + border-radius: 0.5rem; } .rounded-xl { - border-radius: 0.75rem; + border-radius: 0.75rem; } .rounded-2xl { - border-radius: 1rem; + border-radius: 1rem; } .rounded-3xl { - border-radius: 1.5rem; + border-radius: 1.5rem; } .rounded-4xl { - border-radius: 2rem; + border-radius: 2rem; } .rounded-none { border-radius: 0; @@ -83,20 +88,20 @@ // ─── CSS custom properties ───────────────────────────────────────────────── :root { - --spacing: 0.25rem; - --container-3xs: 16rem; - --container-2xs: 18rem; - --container-xs: 20rem; - --container-sm: 24rem; - --container-md: 28rem; - --container-lg: 32rem; - --container-xl: 36rem; - --container-2xl: 42rem; - --container-3xl: 48rem; - --container-4xl: 56rem; - --container-5xl: 64rem; - --container-6xl: 72rem; - --container-7xl: 80rem; + --spacing: 0.25rem; + --container-3xs: 16rem; + --container-2xs: 18rem; + --container-xs: 20rem; + --container-sm: 24rem; + --container-md: 28rem; + --container-lg: 32rem; + --container-xl: 36rem; + --container-2xl: 42rem; + --container-3xl: 48rem; + --container-4xl: 56rem; + --container-5xl: 64rem; + --container-6xl: 72rem; + --container-7xl: 80rem; } // ─── Shared mixin ────────────────────────────────────────────────────────── @@ -108,9 +113,16 @@ // ─── Class types ─────────────────────────────────────────────────────────── $class-types: ( - "w": (width), - "h": (height), - "size": (width, height), + "w": ( + width, + ), + "h": ( + height, + ), + "size": ( + width, + height, + ), ); // ─── Numeric: w-0 → w-48, h-0 → h-48, size-0 → size-48 ─────────────────── @@ -124,32 +136,110 @@ $class-types: ( // ─── Fractions ───────────────────────────────────────────────────────────── $fractions: ( - "1\\/2": (1, 2), - "1\\/3": (1, 3), - "2\\/3": (2, 3), - "1\\/4": (1, 4), - "2\\/4": (2, 4), - "3\\/4": (3, 4), - "1\\/5": (1, 5), - "2\\/5": (2, 5), - "3\\/5": (3, 5), - "4\\/5": (4, 5), - "1\\/6": (1, 6), - "2\\/6": (2, 6), - "3\\/6": (3, 6), - "4\\/6": (4, 6), - "5\\/6": (5, 6), - "1\\/12": (1, 12), - "2\\/12": (2, 12), - "3\\/12": (3, 12), - "4\\/12": (4, 12), - "5\\/12": (5, 12), - "6\\/12": (6, 12), - "7\\/12": (7, 12), - "8\\/12": (8, 12), - "9\\/12": (9, 12), - "10\\/12": (10, 12), - "11\\/12": (11, 12), + "1\\/2": ( + 1, + 2, + ), + "1\\/3": ( + 1, + 3, + ), + "2\\/3": ( + 2, + 3, + ), + "1\\/4": ( + 1, + 4, + ), + "2\\/4": ( + 2, + 4, + ), + "3\\/4": ( + 3, + 4, + ), + "1\\/5": ( + 1, + 5, + ), + "2\\/5": ( + 2, + 5, + ), + "3\\/5": ( + 3, + 5, + ), + "4\\/5": ( + 4, + 5, + ), + "1\\/6": ( + 1, + 6, + ), + "2\\/6": ( + 2, + 6, + ), + "3\\/6": ( + 3, + 6, + ), + "4\\/6": ( + 4, + 6, + ), + "5\\/6": ( + 5, + 6, + ), + "1\\/12": ( + 1, + 12, + ), + "2\\/12": ( + 2, + 12, + ), + "3\\/12": ( + 3, + 12, + ), + "4\\/12": ( + 4, + 12, + ), + "5\\/12": ( + 5, + 12, + ), + "6\\/12": ( + 6, + 12, + ), + "7\\/12": ( + 7, + 12, + ), + "8\\/12": ( + 8, + 12, + ), + "9\\/12": ( + 9, + 12, + ), + "10\\/12": ( + 10, + 12, + ), + "11\\/12": ( + 11, + 12, + ), ); @each $prefix, $props in $class-types { @@ -163,13 +253,12 @@ $fractions: ( } // ─── Container sizes (w- only) ───────────────────────────────────────────── -$containers: ( - "3xs", "2xs", "xs", "sm", "md", "lg", "xl", - "2xl", "3xl", "4xl", "5xl", "6xl", "7xl" -); +$containers: ("3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl"); @each $name in $containers { - .w-#{$name} { width: var(--container-#{$name}); } + .w-#{$name} { + width: var(--container-#{$name}); + } } // ─── Shared keywords (auto, px, full, min, max, fit) ─────────────────────── @@ -178,9 +267,9 @@ $shared-keywords: ( "auto": auto, "px": 1px, "full": 100%, - "min": min-content, - "max": max-content, - "fit": fit-content, + "min": min-content, + "max": max-content, + "fit": fit-content, ); @each $prefix, $props in $class-types { @@ -210,5 +299,9 @@ $viewport-keywords: ( } } -.w-screen { width: 100vw; } -.h-screen { height: 100vh; } \ No newline at end of file +.w-screen { + width: 100vw; +} +.h-screen { + height: 100vh; +} diff --git a/app/components/Caption.vue b/app/components/Caption.vue index 87d82ba..6a82524 100644 --- a/app/components/Caption.vue +++ b/app/components/Caption.vue @@ -1,14 +1,21 @@ \ No newline at end of file +var props = defineProps({ + type: String, + size: Number, + title: String, +}); + diff --git a/app/components/Modal.vue b/app/components/Modal.vue index 54c0440..0bc3460 100644 --- a/app/components/Modal.vue +++ b/app/components/Modal.vue @@ -1,6 +1,9 @@ \ No newline at end of file + diff --git a/app/components/accounting/InternalAccount.vue b/app/components/accounting/InternalAccount.vue index affe438..4b8f8b8 100644 --- a/app/components/accounting/InternalAccount.vue +++ b/app/components/accounting/InternalAccount.vue @@ -1,31 +1,51 @@ \ No newline at end of file + this.$approvalcode(); + }, + }, +}; + diff --git a/app/components/accounting/InternalDeposit.vue b/app/components/accounting/InternalDeposit.vue index d840cbb..c20140b 100644 --- a/app/components/accounting/InternalDeposit.vue +++ b/app/components/accounting/InternalDeposit.vue @@ -1,176 +1,288 @@ \ No newline at end of file + this.$emit("modalevent", { name: "entry", data: rs1 }); + this.$dialog( + `Hạch toán ${this.record._type.name} số tiền ${this.$numtoString(this.record.amount)} vào tài khoản ${this.record._account.code} thành công.`, + "Thành công", + "Success", + 10, + ); + }, + }, +}; + diff --git a/app/components/accounting/InternalEntry.vue b/app/components/accounting/InternalEntry.vue index b8f324b..8f80747 100644 --- a/app/components/accounting/InternalEntry.vue +++ b/app/components/accounting/InternalEntry.vue @@ -1,247 +1,326 @@ \ No newline at end of file + diff --git a/app/components/accounting/InternalTransfer.vue b/app/components/accounting/InternalTransfer.vue index 720c594..da32b8e 100644 --- a/app/components/accounting/InternalTransfer.vue +++ b/app/components/accounting/InternalTransfer.vue @@ -1,104 +1,191 @@ \ No newline at end of file + let content = `${this.record.content} (${this.record._source.code} -> ${this.record._target.code})`; + let obj1 = { + code: this.record._source.code, + amount: this.record.amount, + content: content, + type: "DR", + category: 2, + user: this.$store.login.id, + }; + let rs1 = await this.$insertapi("accountentry", obj1, undefined, false); + if (rs1 === "error") return; + let obj2 = { + code: this.record._target.code, + amount: this.record.amount, + content: content, + type: "CR", + category: 2, + user: this.$store.login.id, + }; + let rs2 = await this.$insertapi("accountentry", obj2, undefined, false); + if (rs2 === "error") return; + let data = await this.$getdata("internalaccount", { + code__in: [this.record._source.code, this.record._target.code], + }); + this.$updatepage(this.pagename, data); + this.$dialog( + `Điều chuyển vốn ${this.$numtoString(this.record.amount)} từ ${this.record._source.code} tới ${this.record._target.code} thành công.`, + "Thành công", + "Success", + 10, + ); + this.$emit("close"); + }, + }, +}; + diff --git a/app/components/accounting/TransactionInvoice.vue b/app/components/accounting/TransactionInvoice.vue index aae462d..7bee486 100644 --- a/app/components/accounting/TransactionInvoice.vue +++ b/app/components/accounting/TransactionInvoice.vue @@ -16,7 +16,10 @@
-
+
-

Link phải bắt đầu bằng https

+

+ Link phải bắt đầu bằng https +

-

Mã tra cứu không được bỏ trống

+

+ Mã tra cứu không được bỏ trống +

-

Số tiền không được bỏ trống

+

+ Số tiền không được bỏ trống +

-

Loại tiền không được bỏ trống

+

+ Loại tiền không được bỏ trống +

- -
- - + +
@@ -157,7 +207,11 @@ if (resInvoice.length) { errorAmount: false, errorType: false, }; - const formatData = resInvoice.map((invoice) => ({ ...invoice, amount: $formatNumber(invoice.amount), ...error })); + const formatData = resInvoice.map((invoice) => ({ + ...invoice, + amount: $formatNumber(invoice.amount), + ...error, + })); invoices.value = formatData; } diff --git a/app/components/application/ApplicationImage.vue b/app/components/application/ApplicationImage.vue index 5a597ea..801548c 100644 --- a/app/components/application/ApplicationImage.vue +++ b/app/components/application/ApplicationImage.vue @@ -17,5 +17,4 @@ const props = defineProps({ }); const emit = defineEmits(["remove"]); - diff --git a/app/components/application/CalculationView.vue b/app/components/application/CalculationView.vue index f61a51e..c4e0214 100644 --- a/app/components/application/CalculationView.vue +++ b/app/components/application/CalculationView.vue @@ -1,53 +1,90 @@ @@ -961,4 +1114,4 @@ li a:hover { display: none !important; } } - \ No newline at end of file + diff --git a/app/components/application/CommPayment.vue b/app/components/application/CommPayment.vue index 2ff4dac..8cc17d6 100644 --- a/app/components/application/CommPayment.vue +++ b/app/components/application/CommPayment.vue @@ -1,13 +1,22 @@ diff --git a/app/components/dashboard/RevenueChart.vue b/app/components/dashboard/RevenueChart.vue index facf742..50d816d 100644 --- a/app/components/dashboard/RevenueChart.vue +++ b/app/components/dashboard/RevenueChart.vue @@ -2,7 +2,7 @@ const { $shortenCurrency } = useNuxtApp(); const revenueChartOptions = { chart: { - type: 'spline' + type: "spline", }, credits: { enabled: false, @@ -11,38 +11,38 @@ const revenueChartOptions = { text: null, }, xAxis: { - categories: [ - '10/4', '11/4', '12/4', '13/4', '14/4', '15/4', '16/4', '17/4', '18/4' - ], + categories: ["10/4", "11/4", "12/4", "13/4", "14/4", "15/4", "16/4", "17/4", "18/4"], accessibility: { - description: 'Dates' - } + description: "Dates", + }, }, yAxis: { title: { - text: 'Doanh thu' + text: "Doanh thu", }, labels: { - format: '{value}' - } + format: "{value}", + }, }, tooltip: { crosshairs: true, shared: true, - valueSuffix: ' VNĐ', + valueSuffix: " VNĐ", }, plotOptions: { spline: { marker: { - enabled: false - } - } + enabled: false, + }, + }, }, - series: [{ - name: 'Doanh thu', - data: [45000000, 52000000, 48000000, 51000000, 58000000, 61000000, 67500000, 72000000, 69000000], - showInLegend: false, - }] + series: [ + { + name: "Doanh thu", + data: [45000000, 52000000, 48000000, 51000000, 58000000, 61000000, 67500000, 72000000, 69000000], + showInLegend: false, + }, + ], }; \ No newline at end of file + diff --git a/app/components/dashboard/TopCustomer.vue b/app/components/dashboard/TopCustomer.vue index d636151..c546bb5 100644 --- a/app/components/dashboard/TopCustomer.vue +++ b/app/components/dashboard/TopCustomer.vue @@ -1,11 +1,11 @@ @@ -20,4 +20,4 @@ const { $shortenCurrency } = useNuxtApp();

{{ $shortenCurrency(paid) }}

- \ No newline at end of file + diff --git a/app/components/dashboard/TopCustomers.vue b/app/components/dashboard/TopCustomers.vue index 2e379d7..8eb1419 100644 --- a/app/components/dashboard/TopCustomers.vue +++ b/app/components/dashboard/TopCustomers.vue @@ -1,35 +1,33 @@ \ No newline at end of file + diff --git a/app/components/dashboard/TopProduct.vue b/app/components/dashboard/TopProduct.vue index 6d5ddce..90cf59f 100644 --- a/app/components/dashboard/TopProduct.vue +++ b/app/components/dashboard/TopProduct.vue @@ -17,7 +17,11 @@ const { $shortenCurrency } = useNuxtApp();

{{ $shortenCurrency(revenue) }}

- + 15% @@ -26,4 +30,4 @@ const { $shortenCurrency } = useNuxtApp(); .progress { --bulma-size-small: 0.5rem; } - \ No newline at end of file + diff --git a/app/components/dashboard/TopProducts.vue b/app/components/dashboard/TopProducts.vue index 6c9dfd4..71d3007 100644 --- a/app/components/dashboard/TopProducts.vue +++ b/app/components/dashboard/TopProducts.vue @@ -1,33 +1,33 @@ \ No newline at end of file + diff --git a/app/components/dashboard/Warning.vue b/app/components/dashboard/Warning.vue index bce3b24..3738538 100644 --- a/app/components/dashboard/Warning.vue +++ b/app/components/dashboard/Warning.vue @@ -3,17 +3,16 @@ const props = defineProps({ name: String, details: String, level: Number, - type: String -}) + type: String, +}); const color = computed(() => { - if (props.level === 1) return 'yellow'; - if (props.level === 2) return 'orange'; - if (props.level === 3) return 'red'; -}) + if (props.level === 1) return "yellow"; + if (props.level === 2) return "orange"; + if (props.level === 3) return "red"; +}); - \ No newline at end of file + diff --git a/app/components/dashboard/Warnings.vue b/app/components/dashboard/Warnings.vue index c1373e1..dec0738 100644 --- a/app/components/dashboard/Warnings.vue +++ b/app/components/dashboard/Warnings.vue @@ -1,26 +1,26 @@ \ No newline at end of file + diff --git a/app/components/datatable/ContextMenu.vue b/app/components/datatable/ContextMenu.vue index 20d2fda..afba02c 100644 --- a/app/components/datatable/ContextMenu.vue +++ b/app/components/datatable/ContextMenu.vue @@ -5,7 +5,11 @@ @click="checkFilter() ? false : $emit('modalevent', { name: 'dosort', data: 'az' })" >
- + - + - + - + - + - + @@ -109,7 +131,10 @@ > - + - + - + - + y === x.code) + : !['filter', 'formula'].find((y) => y === x.code), )" :key="i" :class="selectTab.code === v.code ? 'is-active' : 'has-text-primary'" @@ -193,35 +227,44 @@ />
-
-

+

{{ errors.find((v) => v.name === "label").msg }}

- +
- - - + + + {{ v.name }}
-
+
- +
-

+

{{ errors.find((v) => v.name === "unit").msg }}

@@ -261,7 +307,10 @@ class="mr-4" v-for="(v, i) in colorchoice.filter((v) => v.code !== 'condition')" > - + -

@@ -308,14 +361,7 @@ import { useStore } from "@/stores/index"; import ScrollBox from "~/components/datatable/ScrollBox"; const store = useStore(); -const { - $copy, - $stripHtml, - $clone, - $arrayMove, - $snackbar, - $copyToClipboard, -} = useNuxtApp(); +const { $copy, $stripHtml, $clone, $arrayMove, $snackbar, $copyToClipboard } = useNuxtApp(); var props = defineProps({ pagename: String, field: Object, @@ -337,9 +383,7 @@ const getMenu = function () { let field = currentField; field.disable = "display,tooltip"; let arr = field.disable ? field.disable.split(",") : undefined; - let array = arr - ? store.menuchoice.filter((v) => arr.findIndex((x) => x === v.code) < 0) - : store.menuchoice; + let array = arr ? store.menuchoice.filter((v) => arr.findIndex((x) => x === v.code) < 0) : store.menuchoice; //if (store.login ? !(store.login.is_admin === false) : true) array = [array[0]]; return array; }; @@ -350,10 +394,7 @@ var value1 = undefined; var value2 = undefined; var moneyunit = store.moneyunit; var radioType = store.datatype.find((v) => v.code === currentField.format); -var selectUnit = - currentField.format === "number" - ? moneyunit.find((v) => v.detail === currentField.unit) - : undefined; +var selectUnit = currentField.format === "number" ? moneyunit.find((v) => v.detail === currentField.unit) : undefined; var bgcolor = undefined; var radioBGcolor = colorchoice.find((v) => v.code === "none"); var color = undefined; @@ -366,16 +407,12 @@ var radioMaxWidth = colorchoice.find((v) => v.code === "none"); var maxwidth = undefined; var selectAlign = undefined; var radioAlign = colorchoice.find((v) => v.code === "none"); -var radioTemplate = ref( - colorchoice.find((v) => v.code === (currentField.template ? "option" : "none"))["code"] -); +var radioTemplate = ref(colorchoice.find((v) => v.code === (currentField.template ? "option" : "none"))["code"]); var selectPlacement = store.placement.find((v) => v.code === "is-right"); var selectScheme = store.colorscheme.find((v) => v.code === "is-primary"); var radioTooltip = store.colorchoice.find((v) => v.code === "none"); var selectField = undefined; -var tags = currentField.tags - ? currentField.tags.map((v) => fields.find((x) => x.name === v)) - : []; +var tags = currentField.tags ? currentField.tags.map((v) => fields.find((x) => x.name === v)) : []; var formula = currentField.formula ? currentField.formula : undefined; var decimal = currentField.decimal; let shortmenu = store.menuchoice.filter((x) => @@ -383,7 +420,7 @@ let shortmenu = store.menuchoice.filter((x) => ? currentField.formula ? true : x.code !== "formula" - : !["filter", "formula"].find((y) => y === x.code) + : !["filter", "formula"].find((y) => y === x.code), ); var selectTab = shortmenu.find((v) => selectTab.code === v.code) ? selectTab @@ -448,9 +485,7 @@ function tableOption() { } const getFields = function () { fields = pagedata ? $copy(pagedata.fields) : []; - fields.map( - (v) => (v.caption = (v.label ? v.label.indexOf("<") >= 0 : false) ? v.name : v.label) - ); + fields.map((v) => (v.caption = (v.label ? v.label.indexOf("<") >= 0 : false) ? v.name : v.label)); }; const doSelect = function (evt) { emit("modalevent", { name: "selected", data: evt[props.field.name] }); @@ -510,15 +545,16 @@ const saveSetting = function () { const showSidebar = function () { let event = { name: "template", field: currentField }; let title = "Danh sách cột"; - if (event.name === "bgcolor") - title = `Đổi màu nền: ${event.field.name} / ${$stripHtml(event.field.label, 30)}`; - else if (event.name === "color") - title = `Đổi màu chữ: ${event.field.name} / ${$stripHtml(event.field.label, 30)}`; - else if (event.name === "template") - title = `Định dạng nâng cao: ${$stripHtml(event.field.label, 30)}`; + if (event.name === "bgcolor") title = `Đổi màu nền: ${event.field.name} / ${$stripHtml(event.field.label, 30)}`; + else if (event.name === "color") title = `Đổi màu chữ: ${event.field.name} / ${$stripHtml(event.field.label, 30)}`; + else if (event.name === "template") title = `Định dạng nâng cao: ${$stripHtml(event.field.label, 30)}`; showmodal.value = { component: "datatable/FormatOption", - vbind: { event: event, currentField: currentField, pagename: props.pagename }, + vbind: { + event: event, + currentField: currentField, + pagename: props.pagename, + }, width: "850px", height: "700px", title: title, diff --git a/app/components/datatable/CreateTemplate.vue b/app/components/datatable/CreateTemplate.vue index 4530665..75b1988 100644 --- a/app/components/datatable/CreateTemplate.vue +++ b/app/components/datatable/CreateTemplate.vue @@ -1,180 +1,312 @@ \ No newline at end of file + } catch (err) { + errors.push({ name: "expression", message: "Biểu thức không hợp lệ" }); + } + returnerrors.length > 0 ? false : true; +}; +const changeType = function (v) {}; +const doSelect = function (v) { + tags.push({ id: $id(), name: v.name, class: getClass(v) }); + tab = tabs.find((v) => v.code === "selected"); + selected = tags[tags.length - 1]; +}; +const doSelectSpan = function (v) { + tags.push({ id: $id(), name: v.name, class: getSpanClass(v) }); + tab = tabs.find((v) => v.code === "selected"); + selected = tags[tags.length - 1]; +}; +const remove = function (i) { + $remove(tags, i); +}; +const getClass = function (v) { + let value = type.code + " " + v.code + " " + size.code + (shape.code === "default" ? "" : " " + shape.code); + value += outline.code === "default" ? "" : " " + outline.code; + return value; +}; +const getSpanClass = function (v) { + let value = "has-text-" + v.name.toLowerCase() + " " + size.value; + return value; +}; +initData(); +var docid = $id(); + diff --git a/app/components/datatable/DataModel.vue b/app/components/datatable/DataModel.vue index 65f3ccc..55df497 100644 --- a/app/components/datatable/DataModel.vue +++ b/app/components/datatable/DataModel.vue @@ -1,193 +1,314 @@ \ No newline at end of file + diff --git a/app/components/datatable/DataTable.vue b/app/components/datatable/DataTable.vue index 4c1731f..cd406d1 100644 --- a/app/components/datatable/DataTable.vue +++ b/app/components/datatable/DataTable.vue @@ -1,57 +1,104 @@ \ No newline at end of file + tablesetting = copy; + pagedata.tablesetting = tablesetting; + store.commit(props.pagename, pagedata); +} + diff --git a/app/components/datatable/TimeOption.vue b/app/components/datatable/TimeOption.vue index 44d3607..ba23ef0 100644 --- a/app/components/datatable/TimeOption.vue +++ b/app/components/datatable/TimeOption.vue @@ -1,92 +1,157 @@ \ No newline at end of file +}; + diff --git a/app/components/datatable/format/ColorText.vue b/app/components/datatable/format/ColorText.vue index fbc20ee..4093c18 100644 --- a/app/components/datatable/format/ColorText.vue +++ b/app/components/datatable/format/ColorText.vue @@ -5,6 +5,6 @@ diff --git a/app/components/datatable/format/FormatDate.vue b/app/components/datatable/format/FormatDate.vue index fb34710..53822ef 100644 --- a/app/components/datatable/format/FormatDate.vue +++ b/app/components/datatable/format/FormatDate.vue @@ -1,10 +1,10 @@ \ No newline at end of file + color: String, +}); + diff --git a/app/components/datatable/format/FormatNumber.vue b/app/components/datatable/format/FormatNumber.vue index ae67495..3c8d5b7 100644 --- a/app/components/datatable/format/FormatNumber.vue +++ b/app/components/datatable/format/FormatNumber.vue @@ -1,10 +1,10 @@ \ No newline at end of file + color: String, +}); + diff --git a/app/components/datatable/format/FormatTime.vue b/app/components/datatable/format/FormatTime.vue index c4ceb3f..b65d202 100644 --- a/app/components/datatable/format/FormatTime.vue +++ b/app/components/datatable/format/FormatTime.vue @@ -1,10 +1,10 @@ \ No newline at end of file + color: String, +}); + diff --git a/app/components/datepicker/Datepicker.vue b/app/components/datepicker/Datepicker.vue index d2d33f6..5450013 100644 --- a/app/components/datepicker/Datepicker.vue +++ b/app/components/datepicker/Datepicker.vue @@ -1,28 +1,54 @@ diff --git a/app/components/datepicker/EventDetail.vue b/app/components/datepicker/EventDetail.vue index cad25d2..38d3967 100644 --- a/app/components/datepicker/EventDetail.vue +++ b/app/components/datepicker/EventDetail.vue @@ -1,185 +1,270 @@ \ No newline at end of file + }); + return arr; + }, + }, +}; + diff --git a/app/components/datepicker/EventMultiMonth.vue b/app/components/datepicker/EventMultiMonth.vue index 0c995a2..850d881 100644 --- a/app/components/datepicker/EventMultiMonth.vue +++ b/app/components/datepicker/EventMultiMonth.vue @@ -1,19 +1,29 @@ \ No newline at end of file + props: ["events", "months"], +}; + diff --git a/app/components/datepicker/EventOneMonth.vue b/app/components/datepicker/EventOneMonth.vue index 5c44e47..0ff6d6c 100644 --- a/app/components/datepicker/EventOneMonth.vue +++ b/app/components/datepicker/EventOneMonth.vue @@ -1,52 +1,63 @@ \ No newline at end of file + this.$emit("refresh"); + }, + }, +}; + diff --git a/app/components/datepicker/EventSummary.vue b/app/components/datepicker/EventSummary.vue index 1cd149d..996b8ca 100644 --- a/app/components/datepicker/EventSummary.vue +++ b/app/components/datepicker/EventSummary.vue @@ -1,189 +1,261 @@ \ No newline at end of file + }); + return arr; + }, + }, +}; + diff --git a/app/components/datepicker/PickDay.vue b/app/components/datepicker/PickDay.vue index 45ff94b..403bcda 100644 --- a/app/components/datepicker/PickDay.vue +++ b/app/components/datepicker/PickDay.vue @@ -1,53 +1,91 @@ \ No newline at end of file + diff --git a/app/components/datepicker/PickMonth.vue b/app/components/datepicker/PickMonth.vue index 6faad86..5ff4711 100644 --- a/app/components/datepicker/PickMonth.vue +++ b/app/components/datepicker/PickMonth.vue @@ -1,14 +1,19 @@ \ No newline at end of file + months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], + }; + }, +}; + diff --git a/app/components/datepicker/PickYear.vue b/app/components/datepicker/PickYear.vue index a6947b3..e9d4a74 100644 --- a/app/components/datepicker/PickYear.vue +++ b/app/components/datepicker/PickYear.vue @@ -1,57 +1,65 @@ diff --git a/app/components/debt/Due.vue b/app/components/debt/Due.vue index bd07070..fbc652a 100644 --- a/app/components/debt/Due.vue +++ b/app/components/debt/Due.vue @@ -1,9 +1,9 @@ \ No newline at end of file + diff --git a/app/components/debt/Overdue.vue b/app/components/debt/Overdue.vue index 174333e..76a52e1 100644 --- a/app/components/debt/Overdue.vue +++ b/app/components/debt/Overdue.vue @@ -1,9 +1,9 @@ \ No newline at end of file + diff --git a/app/components/dialog/ApprovalCode.vue b/app/components/dialog/ApprovalCode.vue index 0bea79a..4b4f4cb 100644 --- a/app/components/dialog/ApprovalCode.vue +++ b/app/components/dialog/ApprovalCode.vue @@ -1,10 +1,20 @@ \ No newline at end of file + this.$emit("modalevent", { name: "confirm" }); + this.cancel(); + }, + }, +}; + diff --git a/app/components/dialog/CountDown.vue b/app/components/dialog/CountDown.vue index 6556138..2c52bb3 100644 --- a/app/components/dialog/CountDown.vue +++ b/app/components/dialog/CountDown.vue @@ -1,38 +1,45 @@ \ No newline at end of file + diff --git a/app/components/dialog/Delete.vue b/app/components/dialog/Delete.vue index 899939a..6961b0b 100644 --- a/app/components/dialog/Delete.vue +++ b/app/components/dialog/Delete.vue @@ -4,44 +4,64 @@

- - + +
-
- +
+
\ No newline at end of file + let pagename = this.vbind.pagename; + let pagedata = this.$store.state[pagename]; + let name = pagedata.origin_api.name || this.vbind.api; + let id = this.vbind.row.id; + let result; + if (this.setdeleted) { + let record = await this.$getdata(name, { id: id }, undefined, true); + record.deleted = 1; + result = await this.$updateapi(name, record); + } else result = await this.$deleteapi(name, id); + if (result === "error") return this.$dialog("Đã xảy ra lỗi, xóa dữ liệu thất bại", "Lỗi", "Error"); + this.$snackbar("Dữ liệu đã được xoá khỏi hệ thống", undefined, "Success"); + let arr = Array.isArray(id) ? id : [{ id: id }]; + let copy = this.$copy(this.$store.state[pagename].data); + arr.map((x) => { + let index = copy.findIndex((v) => v.id === x.id); + index >= 0 ? this.$delete(copy, index) : false; + }); + this.$store.commit("updateState", { + name: pagename, + key: "update", + data: { data: copy }, + }); + this.cancel(); + }, + }, +}; + diff --git a/app/components/dialog/Error.vue b/app/components/dialog/Error.vue index fc132ea..3b81d05 100644 --- a/app/components/dialog/Error.vue +++ b/app/components/dialog/Error.vue @@ -1,31 +1,44 @@ \ No newline at end of file +import { useStore } from "@/stores/index"; +const store = useStore(); +var props = defineProps({ + content: String, + duration: Number, +}); +function cancel() { + this.$emit("close"); +} + diff --git a/app/components/dialog/Info.vue b/app/components/dialog/Info.vue index eb2337b..55f32fe 100644 --- a/app/components/dialog/Info.vue +++ b/app/components/dialog/Info.vue @@ -4,21 +4,32 @@

- +
-
- +
+
\ No newline at end of file + this.$emit("close"); + }, + }, +}; + diff --git a/app/components/dialog/NoteInput.vue b/app/components/dialog/NoteInput.vue index b5da161..e257bf4 100644 --- a/app/components/dialog/NoteInput.vue +++ b/app/components/dialog/NoteInput.vue @@ -1,10 +1,17 @@ @@ -33,78 +60,81 @@ export default { props: { title: { type: String, - default: 'Nhập nội dung' + default: "Nhập nội dung", }, label: { type: String, - default: 'Ghi chú' + default: "Ghi chú", }, placeholder: { type: String, - default: 'Nhập nội dung...' + default: "Nhập nội dung...", }, type: { type: String, - default: 'primary', // primary, warning, danger + default: "primary", // primary, warning, danger }, confirmText: { type: String, - default: 'Xác nhận' + default: "Xác nhận", }, cancelText: { type: String, - default: 'Hủy' - } + default: "Hủy", + }, }, - emits: ['close', 'modalevent'], + emits: ["close", "modalevent"], setup() { const store = useStore(); return { store }; }, data() { return { - note: '', - error: '' + note: "", + error: "", }; }, computed: { isVietnamese() { - return this.store.lang === 'vi'; + return this.store.lang === "vi"; }, headerClass() { const colorMap = { - primary: 'has-background-primary', - warning: 'has-background-warning', - danger: 'has-background-danger', + primary: "has-background-primary", + warning: "has-background-warning", + danger: "has-background-danger", }; - return colorMap[this.type] || 'has-background-primary'; + return colorMap[this.type] || "has-background-primary"; }, buttonClass() { const colorMap = { - primary: 'is-primary', - warning: 'is-warning', - danger: 'is-danger', + primary: "is-primary", + warning: "is-warning", + danger: "is-danger", }; - return colorMap[this.type] || 'is-primary'; + return colorMap[this.type] || "is-primary"; }, iconName() { const iconMap = { - primary: 'edit.svg', - warning: 'warning.svg', - danger: 'alert.svg', + primary: "edit.svg", + warning: "warning.svg", + danger: "alert.svg", }; - return iconMap[this.type] || 'edit.svg'; - } + return iconMap[this.type] || "edit.svg"; + }, }, methods: { confirm() { if (!this.note.trim()) { - this.error = this.isVietnamese ? 'Nội dung không được để trống.' : 'Content cannot be empty.'; + this.error = this.isVietnamese ? "Nội dung không được để trống." : "Content cannot be empty."; return; } - this.$emit('modalevent', { name: 'noteConfirm', data: { note: this.note } }); - this.$emit('close'); - } - } + this.$emit("modalevent", { + name: "noteConfirm", + data: { note: this.note }, + }); + this.$emit("close"); + }, + }, }; - \ No newline at end of file + diff --git a/app/components/dialog/Success.vue b/app/components/dialog/Success.vue index 26b2115..14962de 100644 --- a/app/components/dialog/Success.vue +++ b/app/components/dialog/Success.vue @@ -1,29 +1,43 @@ \ No newline at end of file + this.$emit("close"); + }, + }, +}; + diff --git a/app/components/exports/Exports.vue b/app/components/exports/Exports.vue index ff1c964..221e219 100644 --- a/app/components/exports/Exports.vue +++ b/app/components/exports/Exports.vue @@ -1,7 +1,3 @@ - - - - + diff --git a/app/components/imports/Imports.vue b/app/components/imports/Imports.vue index dfbad2d..f03ccea 100644 --- a/app/components/imports/Imports.vue +++ b/app/components/imports/Imports.vue @@ -1,7 +1,3 @@ - - - - + diff --git a/app/components/inventory-count/InventoryCount.vue b/app/components/inventory-count/InventoryCount.vue index a3503da..233db70 100644 --- a/app/components/inventory-count/InventoryCount.vue +++ b/app/components/inventory-count/InventoryCount.vue @@ -1,7 +1,3 @@ - - - - + diff --git a/app/components/inventory-transfer/InventoryTransfer.vue b/app/components/inventory-transfer/InventoryTransfer.vue index 3707246..2a9a9fd 100644 --- a/app/components/inventory-transfer/InventoryTransfer.vue +++ b/app/components/inventory-transfer/InventoryTransfer.vue @@ -1,7 +1,3 @@ - - - - + diff --git a/app/components/inventory/Inventory.vue b/app/components/inventory/Inventory.vue index 66683de..0b05829 100644 --- a/app/components/inventory/Inventory.vue +++ b/app/components/inventory/Inventory.vue @@ -1,34 +1,34 @@ @@ -42,25 +42,37 @@ const inventoryHighlights = [
@@ -77,4 +89,4 @@ const inventoryHighlights = [
- \ No newline at end of file + diff --git a/app/components/inventory/InventoryHighlightCard.vue b/app/components/inventory/InventoryHighlightCard.vue index b3b4304..ce22ac2 100644 --- a/app/components/inventory/InventoryHighlightCard.vue +++ b/app/components/inventory/InventoryHighlightCard.vue @@ -4,8 +4,8 @@ const props = defineProps({ value: String, unit: String, icon: String, - color: String -}) + color: String, +}); \ No newline at end of file + diff --git a/app/components/inventory/InventoryTable.vue b/app/components/inventory/InventoryTable.vue index 591c61d..6248dd1 100644 --- a/app/components/inventory/InventoryTable.vue +++ b/app/components/inventory/InventoryTable.vue @@ -1,434 +1,420 @@ @@ -470,9 +456,17 @@ const selectedInvItem = ref(null);

- + - +

@@ -484,7 +478,7 @@ const selectedInvItem = ref(null); :key="storage" :value="storage" > - {{ storage }} + {{ storage }}
@@ -496,7 +490,7 @@ const selectedInvItem = ref(null); :key="category" :value="category" > - {{ category }} + {{ category }}
@@ -508,7 +502,7 @@ const selectedInvItem = ref(null); :key="status" :value="status" > - {{ status }} + {{ status }} @@ -517,13 +511,14 @@ const selectedInvItem = ref(null);
-
+

- + Danh sách tồn kho ({{ filteredInvItems.length }})

@@ -547,11 +542,13 @@ const selectedInvItem = ref(null); :key="invItem.id" :invItem="invItem" :selected="invItem.id === selectedInvItem?.id" - @selectInvItem="(id) => { - selectedInvItem = filteredInvItems.find(item => item.id === id); - }" + @selectInvItem=" + (id) => { + selectedInvItem = filteredInvItems.find((item) => item.id === id); + } + " @unselect="selectedInvItem = null" - /> + />
@@ -560,7 +557,7 @@ const selectedInvItem = ref(null); + />
diff --git a/app/components/inventory/SelectedInvItem.vue b/app/components/inventory/SelectedInvItem.vue index 464b047..78d7db0 100644 --- a/app/components/inventory/SelectedInvItem.vue +++ b/app/components/inventory/SelectedInvItem.vue @@ -1,39 +1,47 @@ \ No newline at end of file + diff --git a/app/components/maintab/Configuration.vue b/app/components/maintab/Configuration.vue index 89e9859..4709251 100644 --- a/app/components/maintab/Configuration.vue +++ b/app/components/maintab/Configuration.vue @@ -2,7 +2,10 @@
- diff --git a/app/components/marketing/email/Email.utils.js b/app/components/marketing/email/Email.utils.js index 445f878..47428fe 100644 --- a/app/components/marketing/email/Email.utils.js +++ b/app/components/marketing/email/Email.utils.js @@ -2,4 +2,4 @@ export const apiUrl = "https://api.utopia.com.vn/data"; export const putApiUrl = "https://api.utopia.com.vn/data-detail"; export const sendEmailUrl = "https://api.utopia.com.vn/send-email"; export const logoUrl = "https://bigdatatech.vn/logo.png"; -export const imageUrl = "https://api.bigdatatech.vn/static/files/20251113051227-1.png"; \ No newline at end of file +export const imageUrl = "https://api.bigdatatech.vn/static/files/20251113051227-1.png"; diff --git a/app/components/marketing/email/Email.vue b/app/components/marketing/email/Email.vue index 9c68a1d..4235acb 100644 --- a/app/components/marketing/email/Email.vue +++ b/app/components/marketing/email/Email.vue @@ -1,12 +1,18 @@ diff --git a/app/components/marketing/email/dataGmail/EmailSent.vue b/app/components/marketing/email/dataGmail/EmailSent.vue index 56f7a0f..cab724b 100644 --- a/app/components/marketing/email/dataGmail/EmailSent.vue +++ b/app/components/marketing/email/dataGmail/EmailSent.vue @@ -42,7 +42,10 @@ diff --git a/app/components/orders/OrderRow.vue b/app/components/orders/OrderRow.vue index 8e04447..152436e 100644 --- a/app/components/orders/OrderRow.vue +++ b/app/components/orders/OrderRow.vue @@ -1,14 +1,14 @@ @@ -80,4 +95,4 @@ td { vertical-align: middle; --bulma-table-cell-padding: 0.75em; } - \ No newline at end of file + diff --git a/app/components/orders/Orders.vue b/app/components/orders/Orders.vue index b781d7b..5b83b14 100644 --- a/app/components/orders/Orders.vue +++ b/app/components/orders/Orders.vue @@ -1,48 +1,48 @@ \ No newline at end of file + let copy = this.$copy(this.pagedata1); + copy.update = { data: arr }; + this.pagedata1 = copy; + }, + }, +}; + diff --git a/app/components/parameter/NewCart.vue b/app/components/parameter/NewCart.vue index 3fe3d8b..2130477 100644 --- a/app/components/parameter/NewCart.vue +++ b/app/components/parameter/NewCart.vue @@ -4,9 +4,7 @@
- +
- +
-
- +
+
@@ -72,8 +69,11 @@
-
@@ -81,95 +81,88 @@ \ No newline at end of file + await loadCart(); + await nextTick(); + document.getElementById("code")?.focus(); +}); + diff --git a/app/components/parameter/OverduePayables.vue b/app/components/parameter/OverduePayables.vue index 3e9429c..923d23d 100644 --- a/app/components/parameter/OverduePayables.vue +++ b/app/components/parameter/OverduePayables.vue @@ -3,15 +3,23 @@

- +

-
diff --git a/app/components/parameter/SalePolicy.vue b/app/components/parameter/SalePolicy.vue index e3a0fa3..28f4558 100644 --- a/app/components/parameter/SalePolicy.vue +++ b/app/components/parameter/SalePolicy.vue @@ -10,7 +10,12 @@
- +
@@ -19,9 +24,20 @@
- +
-

{{ errors.code }}

+

+ {{ errors.code }} +

@@ -29,9 +45,19 @@
- +
-

{{ errors.name }}

+

+ {{ errors.name }} +

@@ -39,13 +65,21 @@
- +
-

{{ errors.deposit }}

+

+ {{ errors.deposit }} +

@@ -53,23 +87,38 @@
- +
-

{{ errors.method }}

+

+ {{ errors.method }} +

-
+
- +
@@ -81,16 +130,24 @@ *
-
- +
+ Cho phép
-

+

{{ errors.enable }}

@@ -102,19 +159,36 @@
-
- +
+ Xóa -
+
- +
@@ -124,8 +198,14 @@
- +
@@ -135,13 +215,16 @@
- +
@@ -151,7 +234,13 @@
- +
@@ -161,7 +250,12 @@
- +
@@ -171,7 +265,12 @@
- +
@@ -179,23 +278,39 @@
-
- -
@@ -262,7 +377,7 @@ async function update() { isSubmitting.value = true; let policyData = $resetNull(record.value); - if (policyData.method && typeof policyData.method === 'object') { + if (policyData.method && typeof policyData.method === "object") { policyData.method = policyData.method.id; } @@ -274,7 +389,7 @@ async function update() { throw new Error("Failed to save policy"); } - const plans = paymentPlans.value.filter(v => { + const plans = paymentPlans.value.filter((v) => { return !$empty(v.value) && !$empty(v.type); }); @@ -288,7 +403,9 @@ async function update() { if (plans.length > 0) { if (props.row?.id) { - const oldPlans = await $getdata("paymentplan", { policy: policyResult.id }); + const oldPlans = await $getdata("paymentplan", { + policy: policyResult.id, + }); if (oldPlans && oldPlans.length > 0) { for (const oldPlan of oldPlans) { @@ -304,7 +421,6 @@ async function update() { emit("modalevent", { name: "dataevent", data: policyResult }); emit("close"); - } catch (error) { $snackbar("Lưu dữ liệu thất bại"); } finally { @@ -321,14 +437,14 @@ function selected(attr, obj) { } function planSelected(attr, obj, plan) { - if (attr === 'type') { - if (obj && typeof obj === 'object') { + if (attr === "type") { + if (obj && typeof obj === "object") { plan.type = obj.id; plan._type = obj; } else { plan.type = obj; } - } else if (attr === 'value') { + } else if (attr === "value") { plan.value = Number(obj); } else { plan[attr] = obj; diff --git a/app/components/parameter/TransactionPhase.vue b/app/components/parameter/TransactionPhase.vue index e135bab..63b3d71 100644 --- a/app/components/parameter/TransactionPhase.vue +++ b/app/components/parameter/TransactionPhase.vue @@ -1,87 +1,120 @@ \ No newline at end of file +import { onMounted } from "vue"; +const { $getdata, $copy, $resetNull, $insertrow, $updaterow, $snackbar, $remove, $deleteapi } = useNuxtApp(); +var props = defineProps({ + api: String, + pagename: String, + row: Object, + prefix: String, +}); +const emit = defineEmits(["close", "modalevent"]); +var array = ref([{}]); +var record = $copy(props.row || {}); +if (props.row) { + let arr = await $getdata("phasedoctype", { phase: props.row.id }); + if (arr.length > 0) array.value = arr; +} +async function update() { + let data = $resetNull(record); + let rs = data.id + ? await $updaterow(props.api, data, undefined, props.pagename) + : await $insertrow(props.api, data, undefined, props.pagename); + if (rs === "error") return $snackbar(rs); + let arr = array.value.filter((v) => v.doctype); + arr.map((v) => (v.phase = rs.id)); + await $insertrow("phasedoctype", arr); + emit("modalevent", { name: "dataevent", data: rs }); + emit("close"); +} +function documentSelected(attr, obj, v) { + v[attr] = obj; + if (obj) v.doctype = obj.id; +} +function add() { + array.value.push({}); +} +async function remove(v, i) { + if (v.id) await $deleteapi("phasedoctype", v.id); + $remove(array.value, i); + if (array.value.length === 0) array.value = [{}]; +} +onMounted(() => { + document.getElementById("code").focus(); +}); + diff --git a/app/components/people/People.vue b/app/components/people/People.vue index ef4f52b..a16f109 100644 --- a/app/components/people/People.vue +++ b/app/components/people/People.vue @@ -14,8 +14,16 @@ {{ v.name }}
-
-
+
+
{{ v.name }}
@@ -31,17 +39,25 @@ - +
\ No newline at end of file +initData(); + diff --git a/app/components/people/PeopleView.vue b/app/components/people/PeopleView.vue index 0b60f74..abf9052 100644 --- a/app/components/people/PeopleView.vue +++ b/app/components/people/PeopleView.vue @@ -1,5 +1,8 @@ \ No newline at end of file + loadCarts(); +}); + diff --git a/app/components/product/Product.vue b/app/components/product/Product.vue index 0bb4e7b..97af258 100644 --- a/app/components/product/Product.vue +++ b/app/components/product/Product.vue @@ -18,15 +18,18 @@ @option="selected('product', $event)" />
-

error

+

+ error +

- +
-

+

{{ errors.phase }}

@@ -48,9 +54,7 @@
- +
-

+

{{ errors.customer }}

@@ -73,9 +80,7 @@
- +
-

+

{{ errors.amount }}

@@ -94,16 +102,17 @@
- +
-

+

{{ errors.due_date }}

@@ -111,9 +120,7 @@
- +
-

{{ errors.note }}

+

+ {{ errors.note }} +

- +
@@ -1162,22 +1178,28 @@ function printContent() {
+ :projectId="record.project" + :productId="imageSubTab === 'product' ? record.id : undefined" + />
- +
@@ -1185,8 +1207,21 @@ function printContent() {
-
- +
+
@@ -1199,7 +1234,10 @@ function printContent() { - diff --git a/app/components/transaction/TransactionConfirmModal.vue b/app/components/transaction/TransactionConfirmModal.vue index dd14846..4df4dbf 100644 --- a/app/components/transaction/TransactionConfirmModal.vue +++ b/app/components/transaction/TransactionConfirmModal.vue @@ -6,78 +6,159 @@

Thông tin Giao dịch

-

Loại giao dịch: {{ phaseInfo.name || '-' }}

-

Chính sách tài chính: {{ selectedPolicy.name || '-' }}

+

Loại giao dịch: {{ phaseInfo.name || "-" }}

+

+ Chính sách tài chính: + {{ selectedPolicy.name || "-" }} +

Giá gốc: {{ $numtoString(originPrice) }}

-

Số tiền đặt cọc: {{ - $numtoString(depositAmount) }}

-

Ngày ký hợp đồng: {{ - formatDate(initialContractDate) }}

-

Ngày hết hạn GD: {{ - formatDate(editableDueDate) }}

+

+ Số tiền đặt cọc: + {{ $numtoString(depositAmount) }} +

+

+ Ngày ký hợp đồng: + {{ formatDate(initialContractDate) }} +

+

+ Ngày hết hạn GD: + {{ formatDate(editableDueDate) }} +

-
+

Thông tin Khách hàng

-

{{ isIndividual ? 'Khách hàng' : 'Tổ chức' }}

-

Mã KH: {{ selectedCustomer.code || '-' }}

-

{{ isIndividual ? 'Họ và tên:' : 'Tên tổ chức:' }} {{ selectedCustomer.fullname || - '-' }}

-

Số điện thoại: {{ selectedCustomer.phone || '-' }}

-

{{ isIndividual ? 'CCCD:' : 'GPKD/Mã số thuế:' }} {{ selectedCustomer.legal_code || - '-' }}

+

+ {{ isIndividual ? "Khách hàng" : "Tổ chức" }} +

+

Mã KH: {{ selectedCustomer.code || "-" }}

+

+ {{ isIndividual ? "Họ và tên:" : "Tên tổ chức:" }} + {{ selectedCustomer.fullname || "-" }} +

+

+ Số điện thoại: + {{ selectedCustomer.phone || "-" }} +

+

+ {{ isIndividual ? "CCCD:" : "GPKD/Mã số thuế:" }} + {{ selectedCustomer.legal_code || "-" }} +

-
+

Đồng sở hữu - +

-

Mã: {{ coOwner.people__code || '-' }}

-

Họ và tên: {{ coOwner.people__fullname || '-' }}

-

Số điện thoại: {{ coOwner.people__phone || '-' }}

-

CCCD: {{ coOwner.people__legal_code || '-' }}

+

Mã: {{ coOwner.people__code || "-" }}

+

+ Họ và tên: + {{ coOwner.people__fullname || "-" }} +

+

+ Số điện thoại: + {{ coOwner.people__phone || "-" }} +

+

CCCD: {{ coOwner.people__legal_code || "-" }}

-
+
- +
-
+

Không có người liên quan nào được thêm

-
+

Thông tin Sản phẩm

-
Mã thương mại: {{ productData.trade_code || '-' }}
-
Số tờ thửa: {{ productData.land_lot_code || '-' }}
-
Mã quy hoạch: {{ productData.zone_code || '-' }}
-
Phân khu: {{ productData.zone_type__name || '-' }}
-
Loại sản phẩm: {{ productData.type__name || '-' }}
-
Hướng cửa: {{ productData.direction__name || '-' }}
-
Kích thước lô: {{ productData.land_lot_size || '-' }}
-
Diện tích đất: {{ productData.lot_area ? $numtoString(productData.lot_area) - + ' m²' : '-' }}
-
DT xây dựng: {{ productData.building_area ? - $numtoString(productData.building_area) + ' m²' : '-' }}
-
DT sàn: {{ productData.total_built_area ? - $numtoString(productData.total_built_area) + ' m²' : '-' }}
-
Tầng cao: {{ productData.number_of_floors || '-' }}
-
Trạng thái: {{ productData.status__name || '-' }}
-
Dự án: {{ productData.project__name || '-' }}
+
+ Mã thương mại: + {{ productData.trade_code || "-" }} +
+
+ Số tờ thửa: + {{ productData.land_lot_code || "-" }} +
+
+ Mã quy hoạch: + {{ productData.zone_code || "-" }} +
+
+ Phân khu: + {{ productData.zone_type__name || "-" }} +
+
+ Loại sản phẩm: + {{ productData.type__name || "-" }} +
+
+ Hướng cửa: + {{ productData.direction__name || "-" }} +
+
+ Kích thước lô: + {{ productData.land_lot_size || "-" }} +
+
+ Diện tích đất: + {{ productData.lot_area ? $numtoString(productData.lot_area) + " m²" : "-" }} +
+
+ DT xây dựng: + {{ productData.building_area ? $numtoString(productData.building_area) + " m²" : "-" }} +
+
+ DT sàn: + {{ productData.total_built_area ? $numtoString(productData.total_built_area) + " m²" : "-" }} +
+
+ Tầng cao: + {{ productData.number_of_floors || "-" }} +
+
+ Trạng thái: + {{ productData.status__name || "-" }} +
+
Dự án: {{ productData.project__name || "-" }}
@@ -89,24 +170,41 @@
- +
-

{{ paymentAmountError }}

+

+ {{ paymentAmountError }} +

-

{{ formatDate(initialContractDate) }}

+

+ {{ formatDate(initialContractDate) }} +

- +
@@ -116,18 +214,35 @@
- +
-
@@ -140,22 +255,30 @@
- - +
\ No newline at end of file + diff --git a/app/components/transaction/TransactionDetail.vue b/app/components/transaction/TransactionDetail.vue index 0d6a4f9..d234966 100644 --- a/app/components/transaction/TransactionDetail.vue +++ b/app/components/transaction/TransactionDetail.vue @@ -1,5 +1,5 @@ \ No newline at end of file + diff --git a/app/components/transaction/TransactionFiles.vue b/app/components/transaction/TransactionFiles.vue index 147b19a..cbccdb3 100644 --- a/app/components/transaction/TransactionFiles.vue +++ b/app/components/transaction/TransactionFiles.vue @@ -4,11 +4,14 @@
- + - + -
FileTải xuốngTải xuống
@@ -20,7 +23,10 @@ }" > -
+

{{ txnfile.file__name }}

@@ -51,25 +57,30 @@
-

- Chưa có tài liệu nào được đính kèm. -

+
+

Chưa có tài liệu nào được đính kèm.

- +
diff --git a/app/components/transaction/TransactionList.vue b/app/components/transaction/TransactionList.vue index 2335bac..5693023 100644 --- a/app/components/transaction/TransactionList.vue +++ b/app/components/transaction/TransactionList.vue @@ -1,43 +1,44 @@ \ No newline at end of file + diff --git a/app/components/transaction/TransactionTypeView.vue b/app/components/transaction/TransactionTypeView.vue index 23efd4f..0e9ac08 100644 --- a/app/components/transaction/TransactionTypeView.vue +++ b/app/components/transaction/TransactionTypeView.vue @@ -1,12 +1,19 @@