@feedmepos/mf-inventory-portal 0.0.25-dev.19 → 0.0.25-dev.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Hgn8IBaK.js → App-oGRS_PEV.js} +2 -2
- package/dist/{ApprovalView-BSk9kEGm.js → ApprovalView-BnTD6HJE.js} +2 -2
- package/dist/{BindingsDialog-SxUwbW5x.js → BindingsDialog-DLLq9cDi.js} +2 -2
- package/dist/{BindingsPicker-_zOGJ17i.js → BindingsPicker-NXJruTzV.js} +1 -1
- package/dist/{BindingsTable-I8MLwuIR.js → BindingsTable-Bs211Phb.js} +1 -1
- package/dist/{ClosingDraftView-D80vDRO7.js → ClosingDraftView-B4_2-44Y.js} +2 -2
- package/dist/{ClosingTemplateView-BCE-SHm9.js → ClosingTemplateView-Db6Fn2kD.js} +2 -2
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BmLxDo6V.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-YNtFlw4B.js} +25 -25
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D21lpws0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-jnn4TF71.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-WTlNX0f8.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-nP9OAqMD.js} +1 -1
- package/dist/{IngredientGroupView-DDD_-og5.js → IngredientGroupView-Bc2_n2PG.js} +1 -1
- package/dist/{IngredientsView-CJ4F7BwZ.js → IngredientsView-BePK8LAK.js} +4 -4
- package/dist/{IntegrationView-B0TjX4yz.js → IntegrationView-CfpQDaZj.js} +1 -1
- package/dist/{InventoryBindingForm-DGXN2PXz.js → InventoryBindingForm-BiwiGKsQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-gQNCKIfa.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DgOJi8Lz.js} +3 -3
- package/dist/{InventoryBindingSummary-CDAivJA8.js → InventoryBindingSummary-CIMPOjDM.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CfaZ1GtI.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B-XKuP8P.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DmhP_O3l.js → PremiumBadge.vue_vue_type_script_setup_true_lang-45qs9f6I.js} +1 -1
- package/dist/{PublishView-DvriUy_9.js → PublishView-DgtRnkwT.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-Dr-I6VKI.js → PurchaseOrderPrintPreview-Cp_Ye4dK.js} +1 -1
- package/dist/{ReceiveRequestView-FcC0nStC.js → ReceiveRequestView-oe1V_bVC.js} +161 -160
- package/dist/{RecipeView-BMYzOsb2.js → RecipeView-Dy6W78uU.js} +3 -3
- package/dist/{StockView-gTmg4gih.js → StockView-D2kDteQe.js} +7 -7
- package/dist/{SupplierView-CrixDjq3.js → SupplierView-rNltG4Fy.js} +4 -4
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CX9l0sM4.js +1769 -0
- package/dist/{TransferTemplateView-DhgyCwnD.js → TransferTemplateView-PcJvtsk4.js} +7 -7
- package/dist/{UnitView-Bll1VTnD.js → UnitView-BSWzk_pn.js} +3 -3
- package/dist/{WarehouseView-KstzwWxq.js → WarehouseView-Dh-Q19A6.js} +1 -1
- package/dist/api/purchase-order.d.ts +1 -1
- package/dist/{app-qyqp2u_f.js → app-Dyd8pohX.js} +10 -10
- package/dist/app.js +1 -1
- package/dist/{decimal-BQ6Hkwom.js → decimal-aSw2Jae-.js} +1 -1
- package/dist/{feature-C6Z6N_iv.js → feature-BdLkjjxs.js} +215 -211
- package/dist/{format-unit-display-T-fT7FAg.js → format-unit-display-Ca92KbGT.js} +2 -2
- package/dist/{index-B6HIaHJq.js → index-Cvl2NcJ7.js} +2 -2
- package/dist/{stock-Cd6rXnhv.js → stock-CvQLThK4.js} +1 -1
- package/dist/stores/feature.d.ts +4 -3
- package/dist/{supplier-b6qWYeQu.js → supplier-C5hvXTbC.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-C8sylcwR.js → use-ingredient-select-dialog-BP_mP7e_.js} +1 -1
- package/dist/{use-inventory-binding-dialog-D7wI4_lU.js → use-inventory-binding-dialog-C_bBts1K.js} +1 -1
- package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +1 -1
- package/dist/views/receive-request/helper/print-po.d.ts +9 -2
- package/dist/{vue-i18n-BmWUvN1e.js → vue-i18n-Clx6r-KT.js} +209 -209
- package/package.json +3 -3
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-15cqyqCC.js +0 -1567
|
@@ -1,62 +1,20 @@
|
|
|
1
1
|
import { defineComponent as le, onMounted as Be, onUnmounted as Vt, renderSlot as Rt, h as q, reactive as vt, computed as O, openBlock as C, createElementBlock as V, Fragment as be, renderList as Te, createElementVNode as i, toDisplayString as E, unref as t, resolveComponent as P, createVNode as v, withCtx as T, createCommentVNode as j, ref as Q, createBlock as Y, watch as _e, normalizeClass as ee, createTextVNode as Me, normalizeStyle as bt, nextTick as qt, mergeProps as Ye, isRef as we, Teleport as At } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { u as Ct, a as Jt, P as Qe, b as Wt, _ as Xt, g as es } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { _ as xt, u as ts, i as ss, e as os } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { H as Ke, J as Et, Y as Ot, Z as $e, b as Je, l as mt, i as ae, O as Ne, a0 as We, K as gt, as as Mt, A as Ue, M as Ut, m as _t, ab as Xe, E as de, at as Bt, a as kt, au as Nt, av as zt, aw as Lt, G as ht, u as ze, ax as Ht, $ as jt, T as Qt, ay as Yt, B as St, d as De, az as Oe, a5 as ct, y as Kt, _ as Zt, z as Gt, N as pt } from "./app-Dyd8pohX.js";
|
|
3
|
+
import { u as Ct, a as Jt, P as Qe, b as Wt, _ as Xt, g as es } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CX9l0sM4.js";
|
|
4
|
+
import { _ as xt, u as ts, i as ss, e as os } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-45qs9f6I.js";
|
|
5
5
|
import { u as ns } from "./useTabStorage-BkIVScW_.js";
|
|
6
6
|
import { useDialog as wt, useBreakpoints as et, components as ue, FmButtonVariant as as, useSnackbar as Le, useProxiedModel as ls } from "@feedmepos/ui-library";
|
|
7
|
-
import { P as X, u as It } from "./format-unit-display-
|
|
8
|
-
import { _ as Ft, F as Dt, a as Ze, b as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { u as tt } from "./feature-
|
|
10
|
-
import {
|
|
7
|
+
import { P as X, u as It } from "./format-unit-display-Ca92KbGT.js";
|
|
8
|
+
import { _ as Ft, F as Dt, a as Ze, b as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-jnn4TF71.js";
|
|
9
|
+
import { u as tt } from "./feature-BdLkjjxs.js";
|
|
10
|
+
import { c as ve, u as rs, _ as is, l as us } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-YNtFlw4B.js";
|
|
11
11
|
import { useI18n as ke } from "@feedmepos/mf-common";
|
|
12
12
|
import { defineStore as ds } from "pinia";
|
|
13
|
-
import { u as st } from "./supplier-
|
|
13
|
+
import { u as st } from "./supplier-C5hvXTbC.js";
|
|
14
14
|
import { _ as ms } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
15
|
-
import { u as cs } from "./vue-i18n-
|
|
15
|
+
import { u as cs } from "./vue-i18n-Clx6r-KT.js";
|
|
16
16
|
import "./array-hChJVZLE.js";
|
|
17
|
-
|
|
18
|
-
b ?? (b = `Return to ${m.supplier.name}`);
|
|
19
|
-
const r = Ne().currentLocation, h = rs(r), s = {};
|
|
20
|
-
for (const c of m.items) {
|
|
21
|
-
const u = c.sku._id;
|
|
22
|
-
s[u] = $e.reset();
|
|
23
|
-
}
|
|
24
|
-
const p = m.deliveryOrder.flatMap((c) => c.received);
|
|
25
|
-
for (const c of p) {
|
|
26
|
-
const u = c.sku._id;
|
|
27
|
-
if (!s[u]) continue;
|
|
28
|
-
const _ = c.measurement ? $e.multiply([c.measurement.conversion, c.amount]) : c.amount;
|
|
29
|
-
s[u] = $e.add([s[u], _]);
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
_id: m._id,
|
|
33
|
-
name: b,
|
|
34
|
-
purchaseOrder: {
|
|
35
|
-
supplier: h,
|
|
36
|
-
ref: m.ref,
|
|
37
|
-
remark: m.remark,
|
|
38
|
-
items: m.items.map((c) => {
|
|
39
|
-
if (c.subItems) {
|
|
40
|
-
const { subItems: u, ..._ } = c;
|
|
41
|
-
c = _;
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
...c,
|
|
45
|
-
quantityStep: {
|
|
46
|
-
amount: 1,
|
|
47
|
-
precision: ze(c.sku.unit, c.measurement)
|
|
48
|
-
},
|
|
49
|
-
quantity: s[c.sku._id],
|
|
50
|
-
maximumQuantity: s[c.sku._id]
|
|
51
|
-
};
|
|
52
|
-
}).filter((c) => {
|
|
53
|
-
var u;
|
|
54
|
-
return (u = c.maximumQuantity) == null ? void 0 : u.amount;
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const fs = /* @__PURE__ */ le({
|
|
17
|
+
const ps = /* @__PURE__ */ le({
|
|
60
18
|
__name: "MountListener",
|
|
61
19
|
emits: ["mounted", "unmounted"],
|
|
62
20
|
setup(m, { emit: b }) {
|
|
@@ -124,7 +82,7 @@ const fs = /* @__PURE__ */ le({
|
|
|
124
82
|
title: s,
|
|
125
83
|
message: typeof p == "string" ? p : void 0,
|
|
126
84
|
contentComponent: q(
|
|
127
|
-
|
|
85
|
+
ps,
|
|
128
86
|
{
|
|
129
87
|
onUnmounted: () => {
|
|
130
88
|
e(null);
|
|
@@ -161,7 +119,7 @@ function Ge(m) {
|
|
|
161
119
|
}, $e.reset());
|
|
162
120
|
}
|
|
163
121
|
var H = /* @__PURE__ */ ((m) => (m.Code = "Code", m.Name = "Name", m.TemplateName = "TemplateName", m.Amount = "Amount", m.Cost = "Cost", m.Delete = "Delete", m))(H || {});
|
|
164
|
-
const
|
|
122
|
+
const fs = () => (ke(), q(
|
|
165
123
|
xt,
|
|
166
124
|
{
|
|
167
125
|
zIndex: 50,
|
|
@@ -169,7 +127,7 @@ const ys = () => (ke(), q(
|
|
|
169
127
|
},
|
|
170
128
|
`Total (${_t()})`
|
|
171
129
|
));
|
|
172
|
-
function
|
|
130
|
+
function ys(m) {
|
|
173
131
|
const { t: b } = ke(), l = vt({}), { breakpoints: r } = et(), h = tt(), s = Je(), p = Tt();
|
|
174
132
|
Be(() => {
|
|
175
133
|
for (const n of m.items) {
|
|
@@ -362,7 +320,7 @@ function vs(m) {
|
|
|
362
320
|
+ae(
|
|
363
321
|
(a != null && a.minimumQuantity && (a == null ? void 0 : a.minimumQuantity.amount) > 0 ? a == null ? void 0 : a.minimumQuantity : void 0) ?? {
|
|
364
322
|
amount: 1,
|
|
365
|
-
precision:
|
|
323
|
+
precision: Ne(e.sku.unit, e.measurement)
|
|
366
324
|
}
|
|
367
325
|
)
|
|
368
326
|
),
|
|
@@ -378,7 +336,7 @@ function vs(m) {
|
|
|
378
336
|
},
|
|
379
337
|
{
|
|
380
338
|
id: "Cost",
|
|
381
|
-
header:
|
|
339
|
+
header: fs,
|
|
382
340
|
size: 180,
|
|
383
341
|
cell(n) {
|
|
384
342
|
const e = n.row.original, a = c(e.sku), k = r.value.xs || r.value.sm;
|
|
@@ -552,7 +510,7 @@ function vs(m) {
|
|
|
552
510
|
))
|
|
553
511
|
};
|
|
554
512
|
}
|
|
555
|
-
const
|
|
513
|
+
const vs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, bs = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, gs = { class: "w-[450px] xs:w-full flex" }, _s = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, ks = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Pt = /* @__PURE__ */ le({
|
|
556
514
|
__name: "SupplierPriceHistory",
|
|
557
515
|
props: {
|
|
558
516
|
prices: {}
|
|
@@ -562,28 +520,28 @@ const bs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
562
520
|
function l(r) {
|
|
563
521
|
return b.suppliers.find((h) => h._id === r);
|
|
564
522
|
}
|
|
565
|
-
return (r, h) => (C(), V("div",
|
|
523
|
+
return (r, h) => (C(), V("div", vs, [
|
|
566
524
|
(C(!0), V(be, null, Te(Object.keys(r.prices), (s) => {
|
|
567
525
|
var p;
|
|
568
526
|
return C(), V("div", {
|
|
569
527
|
key: s,
|
|
570
528
|
class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
|
|
571
529
|
}, [
|
|
572
|
-
i("div",
|
|
573
|
-
i("div",
|
|
530
|
+
i("div", bs, E((p = l(s)) == null ? void 0 : p.name), 1),
|
|
531
|
+
i("div", gs, [
|
|
574
532
|
(C(!0), V(be, null, Te(r.prices[s].slice(0, 3), (c) => {
|
|
575
533
|
var u;
|
|
576
534
|
return C(), V("div", {
|
|
577
535
|
key: c.date,
|
|
578
536
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
579
537
|
}, [
|
|
580
|
-
i("div",
|
|
538
|
+
i("div", _s, [
|
|
581
539
|
i("span", null, E(c.totalCost ? t(We)(c.totalCost) : "No data"), 1),
|
|
582
540
|
h[0] || (h[0] = i("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
583
541
|
i("span", null, E(t(ae)(c.totalUnit, !1)), 1),
|
|
584
542
|
i("span", null, E(((u = c.measurement) == null ? void 0 : u.abbrev) ?? c.unit.abbrev), 1)
|
|
585
543
|
]),
|
|
586
|
-
i("div",
|
|
544
|
+
i("div", ks, [
|
|
587
545
|
i("span", null, "(#" + E(c.seqNumber) + ")", 1),
|
|
588
546
|
h[1] || (h[1] = i("span", null, E(" "), -1)),
|
|
589
547
|
i("span", null, E(t(Xe)(new Date(c.date))), 1)
|
|
@@ -595,10 +553,10 @@ const bs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
595
553
|
}), 128))
|
|
596
554
|
]));
|
|
597
555
|
}
|
|
598
|
-
}),
|
|
556
|
+
}), hs = { class: "flex flex-col gap-8 py-16" }, Ss = { class: "flex items-center" }, Cs = { class: "flex-1 flex gap-1 items-center" }, xs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ws = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Is = { class: "flex gap-8 w-full" }, Fs = { class: "flex-1 flex flex-col gap-4" }, Ds = { class: "flex-1 flex flex-col gap-4" }, $s = { class: "flex gap-8 w-full" }, Ts = { class: "flex-1 flex flex-col gap-4" }, Ps = {
|
|
599
557
|
key: 0,
|
|
600
558
|
class: "flex-1 flex flex-col gap-4"
|
|
601
|
-
},
|
|
559
|
+
}, Vs = /* @__PURE__ */ le({
|
|
602
560
|
__name: "TransferItem",
|
|
603
561
|
props: {
|
|
604
562
|
cellByColId: {},
|
|
@@ -611,11 +569,11 @@ const bs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
611
569
|
return (l, r) => {
|
|
612
570
|
var p, c, u, _, n, e, a, k, S, g, x, w, $, M, te, F, D, L, U, A, N, G, J, y, d, R, K;
|
|
613
571
|
const h = P("FmLabel"), s = P("FmSpacer");
|
|
614
|
-
return C(), V("div",
|
|
615
|
-
i("div",
|
|
616
|
-
i("div",
|
|
617
|
-
i("span",
|
|
618
|
-
i("span",
|
|
572
|
+
return C(), V("div", hs, [
|
|
573
|
+
i("div", Ss, [
|
|
574
|
+
i("div", Cs, [
|
|
575
|
+
i("span", xs, " (" + E(l.row.original.sku.code) + ") ", 1),
|
|
576
|
+
i("span", ws, E(l.row.original.sku.name), 1)
|
|
619
577
|
]),
|
|
620
578
|
i("div", null, [
|
|
621
579
|
v(t(de), {
|
|
@@ -624,8 +582,8 @@ const bs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
624
582
|
}, null, 8, ["render", "props"])
|
|
625
583
|
])
|
|
626
584
|
]),
|
|
627
|
-
i("div",
|
|
628
|
-
i("div",
|
|
585
|
+
i("div", Is, [
|
|
586
|
+
i("div", Fs, [
|
|
629
587
|
v(h, {
|
|
630
588
|
label: t(b)(`inventory.transfer.form.items.table.${t(H).Code}`)
|
|
631
589
|
}, null, 8, ["label"]),
|
|
@@ -635,7 +593,7 @@ const bs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
635
593
|
}, null, 8, ["render", "props"]),
|
|
636
594
|
r[0] || (r[0] = i("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
637
595
|
]),
|
|
638
|
-
i("div",
|
|
596
|
+
i("div", Ds, [
|
|
639
597
|
v(h, {
|
|
640
598
|
label: t(b)(`inventory.transfer.form.items.table.${t(H).Name}`)
|
|
641
599
|
}, null, 8, ["label"]),
|
|
@@ -646,8 +604,8 @@ const bs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
646
604
|
r[1] || (r[1] = i("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
647
605
|
])
|
|
648
606
|
]),
|
|
649
|
-
i("div",
|
|
650
|
-
i("div",
|
|
607
|
+
i("div", $s, [
|
|
608
|
+
i("div", Ts, [
|
|
651
609
|
v(h, {
|
|
652
610
|
label: t(b)(`inventory.transfer.form.items.table.${t(H).Amount}`)
|
|
653
611
|
}, null, 8, ["label"]),
|
|
@@ -657,7 +615,7 @@ const bs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
657
615
|
}, null, 8, ["render", "props"]),
|
|
658
616
|
r[2] || (r[2] = i("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
659
617
|
]),
|
|
660
|
-
l.cellByColId[t(H).Cost] ? (C(), V("div",
|
|
618
|
+
l.cellByColId[t(H).Cost] ? (C(), V("div", Ps, [
|
|
661
619
|
v(xt, { "z-index": 50 }, {
|
|
662
620
|
default: T(() => [
|
|
663
621
|
v(h, {
|
|
@@ -683,7 +641,7 @@ const bs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
683
641
|
};
|
|
684
642
|
}
|
|
685
643
|
});
|
|
686
|
-
function
|
|
644
|
+
function Rs(m) {
|
|
687
645
|
const b = O({
|
|
688
646
|
get() {
|
|
689
647
|
const s = m.getEffectiveAt();
|
|
@@ -721,13 +679,13 @@ function qs(m) {
|
|
|
721
679
|
backdateTimeModel: h
|
|
722
680
|
};
|
|
723
681
|
}
|
|
724
|
-
const
|
|
682
|
+
const qs = {
|
|
725
683
|
width: "24",
|
|
726
684
|
height: "24",
|
|
727
685
|
viewBox: "0 0 24 24",
|
|
728
686
|
fill: "none",
|
|
729
687
|
xmlns: "http://www.w3.org/2000/svg"
|
|
730
|
-
},
|
|
688
|
+
}, As = ["fill"], Es = ["fill"], Os = ["stroke"], Ms = ["stroke"], Us = /* @__PURE__ */ le({
|
|
731
689
|
__name: "SparkIcon",
|
|
732
690
|
props: {
|
|
733
691
|
size: {
|
|
@@ -740,32 +698,32 @@ const As = {
|
|
|
740
698
|
}
|
|
741
699
|
},
|
|
742
700
|
setup(m) {
|
|
743
|
-
return (b, l) => (C(), V("svg",
|
|
701
|
+
return (b, l) => (C(), V("svg", qs, [
|
|
744
702
|
i("path", {
|
|
745
703
|
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
746
704
|
fill: m.color
|
|
747
|
-
}, null, 8,
|
|
705
|
+
}, null, 8, As),
|
|
748
706
|
i("path", {
|
|
749
707
|
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
750
708
|
fill: m.color
|
|
751
|
-
}, null, 8,
|
|
709
|
+
}, null, 8, Es),
|
|
752
710
|
i("path", {
|
|
753
711
|
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
754
712
|
stroke: m.color,
|
|
755
713
|
"stroke-width": "1.5",
|
|
756
714
|
"stroke-linecap": "round",
|
|
757
715
|
"stroke-linejoin": "round"
|
|
758
|
-
}, null, 8,
|
|
716
|
+
}, null, 8, Os),
|
|
759
717
|
i("path", {
|
|
760
718
|
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
761
719
|
stroke: m.color,
|
|
762
720
|
"stroke-width": "1.5",
|
|
763
721
|
"stroke-linecap": "round",
|
|
764
722
|
"stroke-linejoin": "round"
|
|
765
|
-
}, null, 8,
|
|
723
|
+
}, null, 8, Ms)
|
|
766
724
|
]));
|
|
767
725
|
}
|
|
768
|
-
}),
|
|
726
|
+
}), Bs = { class: "flex gap-8 items-center" }, Ns = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, zs = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, Ls = { class: "flex items-center w-full" }, Hs = { class: "flex-1" }, js = { class: "fm-typo-en-title-sm-800" }, Qs = { class: "flex items-start gap-8" }, Ys = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ks = { class: "flex gap-1" }, ft = /* @__PURE__ */ le({
|
|
769
727
|
__name: "ForecastStock",
|
|
770
728
|
props: {
|
|
771
729
|
disabled: { type: Boolean }
|
|
@@ -820,24 +778,24 @@ const As = {
|
|
|
820
778
|
disabled: n.disabled
|
|
821
779
|
}, {
|
|
822
780
|
default: T(() => [
|
|
823
|
-
i("div",
|
|
824
|
-
v(
|
|
781
|
+
i("div", Bs, [
|
|
782
|
+
v(Us, {
|
|
825
783
|
size: 24,
|
|
826
784
|
color: n.disabled ? "#c7c7cc" : "#ff7823"
|
|
827
785
|
}, null, 8, ["color"]),
|
|
828
|
-
i("div",
|
|
786
|
+
i("div", Ns, E(t(u)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
829
787
|
])
|
|
830
788
|
]),
|
|
831
789
|
_: 1
|
|
832
790
|
}, 8, ["text-color", "border-color", "disabled"])
|
|
833
791
|
]),
|
|
834
792
|
default: T(() => [
|
|
835
|
-
i("div",
|
|
836
|
-
i("div",
|
|
837
|
-
i("div",
|
|
793
|
+
i("div", zs, [
|
|
794
|
+
i("div", Ls, [
|
|
795
|
+
i("div", Hs, [
|
|
838
796
|
v(ms, { "z-index": 99 }, {
|
|
839
797
|
default: T(() => [
|
|
840
|
-
i("p",
|
|
798
|
+
i("p", js, E(t(u)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
841
799
|
]),
|
|
842
800
|
_: 1
|
|
843
801
|
})
|
|
@@ -856,18 +814,18 @@ const As = {
|
|
|
856
814
|
rules: [t(Ue)(1)]
|
|
857
815
|
}, {
|
|
858
816
|
"helper-text": T(() => [
|
|
859
|
-
i("div",
|
|
817
|
+
i("div", Qs, [
|
|
860
818
|
v(k, {
|
|
861
819
|
name: "warning",
|
|
862
820
|
size: "sm",
|
|
863
821
|
class: "text-fm-color-system-warning-300"
|
|
864
822
|
}),
|
|
865
|
-
i("div",
|
|
823
|
+
i("div", Ys, E(t(u)("inventory.transfer.form.items.forecastStock.replace")), 1)
|
|
866
824
|
])
|
|
867
825
|
]),
|
|
868
826
|
_: 1
|
|
869
827
|
}, 8, ["modelValue", "label", "rules"]),
|
|
870
|
-
i("div",
|
|
828
|
+
i("div", Ks, [
|
|
871
829
|
e[4] || (e[4] = i("div", { class: "grow" }, null, -1)),
|
|
872
830
|
v(a, {
|
|
873
831
|
label: t(u)("common.cancel"),
|
|
@@ -886,7 +844,7 @@ const As = {
|
|
|
886
844
|
};
|
|
887
845
|
}
|
|
888
846
|
});
|
|
889
|
-
function
|
|
847
|
+
function Zs() {
|
|
890
848
|
const m = Le(), b = Ct(), l = Q(!1);
|
|
891
849
|
_e(l, (p) => {
|
|
892
850
|
p && (h.value = !0, r().finally(() => {
|
|
@@ -931,16 +889,16 @@ function Gs() {
|
|
|
931
889
|
comparePriceBySku: s
|
|
932
890
|
};
|
|
933
891
|
}
|
|
934
|
-
const
|
|
892
|
+
const Gs = { class: "hover:bg-fm-color-opacity-sm" }, Js = { class: "flex items-center" }, Ws = {
|
|
935
893
|
key: 0,
|
|
936
894
|
class: "flex h-full w-24"
|
|
937
|
-
},
|
|
895
|
+
}, Xs = { class: "flex flex-col flex-1 line-clamp-1" }, eo = { class: "text-fm-color-typo-primary fm-typo-en-body-md-400" }, to = { class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400" }, so = {
|
|
938
896
|
key: 2,
|
|
939
897
|
class: "flex-1"
|
|
940
|
-
},
|
|
898
|
+
}, oo = {
|
|
941
899
|
key: 3,
|
|
942
900
|
class: "flex w-full justify-end"
|
|
943
|
-
},
|
|
901
|
+
}, no = /* @__PURE__ */ le({
|
|
944
902
|
__name: "TransferSubItemTable",
|
|
945
903
|
props: {
|
|
946
904
|
templateSubItem: {},
|
|
@@ -958,13 +916,13 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
958
916
|
Number.isNaN(p) || (l.quantity = gt(p));
|
|
959
917
|
}), (s, p) => {
|
|
960
918
|
const c = P("FmIcon"), u = P("FmTooltip"), _ = P("FmButton");
|
|
961
|
-
return C(), V("tr",
|
|
919
|
+
return C(), V("tr", Gs, [
|
|
962
920
|
(C(!0), V(be, null, Te(s.row.getVisibleCells(), (n, e) => (C(), V("td", {
|
|
963
921
|
key: n.id,
|
|
964
922
|
class: ee([e === 0 ? "px-16" : n.column.id === t(H).Delete ? "" : "px-16"])
|
|
965
923
|
}, [
|
|
966
|
-
i("div",
|
|
967
|
-
e === 0 ? (C(), V("div",
|
|
924
|
+
i("div", Js, [
|
|
925
|
+
e === 0 ? (C(), V("div", Ws, [
|
|
968
926
|
s.subItemIndex === 0 ? (C(), Y(c, {
|
|
969
927
|
key: 0,
|
|
970
928
|
name: "subdirectory_arrow_right",
|
|
@@ -979,13 +937,13 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
979
937
|
Me(E(t(l).name), 1)
|
|
980
938
|
]),
|
|
981
939
|
default: T(() => [
|
|
982
|
-
i("div",
|
|
983
|
-
i("div",
|
|
984
|
-
i("div",
|
|
940
|
+
i("div", Xs, [
|
|
941
|
+
i("div", eo, E(t(l).name), 1),
|
|
942
|
+
i("div", to, E(t(l).code), 1)
|
|
985
943
|
])
|
|
986
944
|
]),
|
|
987
945
|
_: 1
|
|
988
|
-
})) : n.column.id === t(H).Amount ? (C(), V("div",
|
|
946
|
+
})) : n.column.id === t(H).Amount ? (C(), V("div", so, [
|
|
989
947
|
v(Ft, {
|
|
990
948
|
"model-value": {
|
|
991
949
|
amount: t(l).quantity,
|
|
@@ -998,7 +956,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
998
956
|
+t(ae)(
|
|
999
957
|
s.templateSubItem.minimumQuantity ?? {
|
|
1000
958
|
amount: 1,
|
|
1001
|
-
precision: t(
|
|
959
|
+
precision: t(Ne)(s.row.original.sku.unit, t(l).measurement)
|
|
1002
960
|
}
|
|
1003
961
|
)
|
|
1004
962
|
),
|
|
@@ -1011,7 +969,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1011
969
|
disabled: s.disabled,
|
|
1012
970
|
"disable-unit": ""
|
|
1013
971
|
}, null, 8, ["model-value", "unit", "rules", "stepper", "disabled"])
|
|
1014
|
-
])) : n.column.id === t(H).Delete ? (C(), V("div",
|
|
972
|
+
])) : n.column.id === t(H).Delete ? (C(), V("div", oo, [
|
|
1015
973
|
v(_, {
|
|
1016
974
|
key: "row.sku._id",
|
|
1017
975
|
type: "button",
|
|
@@ -1027,7 +985,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1027
985
|
]);
|
|
1028
986
|
};
|
|
1029
987
|
}
|
|
1030
|
-
}),
|
|
988
|
+
}), ao = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, lo = { key: 1 }, ro = ["colspan"], io = /* @__PURE__ */ le({
|
|
1031
989
|
__name: "TransferItemTable",
|
|
1032
990
|
props: {
|
|
1033
991
|
templateItem: {},
|
|
@@ -1051,7 +1009,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1051
1009
|
quantity: u.quantity,
|
|
1052
1010
|
quantityStep: {
|
|
1053
1011
|
amount: 1,
|
|
1054
|
-
precision:
|
|
1012
|
+
precision: Ne(l.row.original.sku.unit, u.measurement)
|
|
1055
1013
|
}
|
|
1056
1014
|
};
|
|
1057
1015
|
}
|
|
@@ -1088,7 +1046,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1088
1046
|
textAlign: ((M = h(g)) == null ? void 0 : M.textAlign) ?? "left"
|
|
1089
1047
|
})
|
|
1090
1048
|
}, [
|
|
1091
|
-
i("span",
|
|
1049
|
+
i("span", ao, [
|
|
1092
1050
|
v(t(de), {
|
|
1093
1051
|
render: g.column.columnDef.cell,
|
|
1094
1052
|
props: g.getContext()
|
|
@@ -1097,7 +1055,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1097
1055
|
], 6);
|
|
1098
1056
|
}), 128))
|
|
1099
1057
|
], 2),
|
|
1100
|
-
(e = (n = u.row.original) == null ? void 0 : n.subItems) != null && e.length ? (C(!0), V(be, { key: 0 }, Te((a = u.row.original) == null ? void 0 : a.subItems, (g, x) => (C(), Y(
|
|
1058
|
+
(e = (n = u.row.original) == null ? void 0 : n.subItems) != null && e.length ? (C(!0), V(be, { key: 0 }, Te((a = u.row.original) == null ? void 0 : a.subItems, (g, x) => (C(), Y(no, {
|
|
1101
1059
|
key: g.id,
|
|
1102
1060
|
row: u.row,
|
|
1103
1061
|
"model-value": g,
|
|
@@ -1107,25 +1065,25 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1107
1065
|
"sub-item-index": x,
|
|
1108
1066
|
disabled: u.disabled
|
|
1109
1067
|
}, null, 8, ["row", "model-value", "template-sub-item", "sub-item-index", "disabled"]))), 128)) : j("", !0),
|
|
1110
|
-
u.showComparePrice && Object.keys(u.comparePriceBySku[(k = u.row.original.sku) == null ? void 0 : k._id] ?? {}).length > 0 ? (C(), V("tr",
|
|
1068
|
+
u.showComparePrice && Object.keys(u.comparePriceBySku[(k = u.row.original.sku) == null ? void 0 : k._id] ?? {}).length > 0 ? (C(), V("tr", lo, [
|
|
1111
1069
|
i("td", {
|
|
1112
1070
|
colspan: u.row.getVisibleCells().length
|
|
1113
1071
|
}, [
|
|
1114
1072
|
v(Pt, {
|
|
1115
1073
|
prices: u.comparePriceBySku[(S = u.row.original.sku) == null ? void 0 : S._id]
|
|
1116
1074
|
}, null, 8, ["prices"])
|
|
1117
|
-
], 8,
|
|
1075
|
+
], 8, ro)
|
|
1118
1076
|
])) : j("", !0)
|
|
1119
1077
|
], 64);
|
|
1120
1078
|
};
|
|
1121
1079
|
}
|
|
1122
|
-
}),
|
|
1080
|
+
}), uo = {
|
|
1123
1081
|
key: 0,
|
|
1124
1082
|
class: "flex flex-col gap-8"
|
|
1125
|
-
},
|
|
1083
|
+
}, mo = { class: "flex flex-col gap-4" }, co = { class: "flex items-center gap-4" }, po = {
|
|
1126
1084
|
key: 0,
|
|
1127
1085
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
1128
|
-
},
|
|
1086
|
+
}, fo = /* @__PURE__ */ le({
|
|
1129
1087
|
__name: "NetSuiteField",
|
|
1130
1088
|
props: {
|
|
1131
1089
|
required: { type: Boolean },
|
|
@@ -1195,11 +1153,11 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1195
1153
|
});
|
|
1196
1154
|
return (n, e) => {
|
|
1197
1155
|
const a = P("FmLabel"), k = P("FmIcon"), S = P("FmField"), g = P("FmTooltip");
|
|
1198
|
-
return t(l).isEnabled && r.required ? (C(), V("div",
|
|
1156
|
+
return t(l).isEnabled && r.required ? (C(), V("div", uo, [
|
|
1199
1157
|
v(a, {
|
|
1200
1158
|
label: `NetSuite ${t(s)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
1201
1159
|
}, null, 8, ["label"]),
|
|
1202
|
-
i("div",
|
|
1160
|
+
i("div", mo, [
|
|
1203
1161
|
v(g, {
|
|
1204
1162
|
"z-index": 51,
|
|
1205
1163
|
placement: "left",
|
|
@@ -1213,7 +1171,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1213
1171
|
default: T(() => {
|
|
1214
1172
|
var x;
|
|
1215
1173
|
return [
|
|
1216
|
-
i("div",
|
|
1174
|
+
i("div", co, [
|
|
1217
1175
|
v(k, {
|
|
1218
1176
|
name: "lock_outline",
|
|
1219
1177
|
size: "sm",
|
|
@@ -1230,21 +1188,21 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1230
1188
|
]),
|
|
1231
1189
|
_: 1
|
|
1232
1190
|
}, 8, ["disabled"]),
|
|
1233
|
-
p.value ? (C(), V("div",
|
|
1191
|
+
p.value ? (C(), V("div", po, E(_.value), 1)) : j("", !0)
|
|
1234
1192
|
])
|
|
1235
1193
|
])) : j("", !0);
|
|
1236
1194
|
};
|
|
1237
1195
|
}
|
|
1238
|
-
}),
|
|
1196
|
+
}), yo = { class: "flex flex-col gap-4" }, vo = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, bo = { class: "flex flex-col gap-16" }, go = { class: "flex flex-col gap-24" }, _o = { class: "flex flex-col gap-8" }, ko = { class: "flex flex-col gap-4" }, ho = { class: "flex items-center gap-4" }, So = { class: "flex flex-col gap-8" }, Co = { class: "flex flex-col gap-4" }, xo = { class: "flex items-center gap-4" }, wo = {
|
|
1239
1197
|
key: 3,
|
|
1240
1198
|
class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
|
|
1241
|
-
},
|
|
1199
|
+
}, Io = {
|
|
1242
1200
|
key: 0,
|
|
1243
1201
|
class: "flex-1 flex gap-8 h-48 xs:flex-col xs:pt-16 sm:flex-col sm:pt-16"
|
|
1244
|
-
},
|
|
1202
|
+
}, Fo = { class: "flex-1" }, Do = { class: "flex-1" }, $o = {
|
|
1245
1203
|
key: 1,
|
|
1246
1204
|
class: "flex items-center gap-4"
|
|
1247
|
-
},
|
|
1205
|
+
}, To = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, Po = { class: "flex flex-col gap-16" }, Vo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, Ro = { class: "flex gap-8" }, qo = { key: 0 }, Ao = /* @__PURE__ */ le({
|
|
1248
1206
|
__name: "TransferForm2",
|
|
1249
1207
|
props: {
|
|
1250
1208
|
modelValue: {},
|
|
@@ -1255,7 +1213,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1255
1213
|
},
|
|
1256
1214
|
emits: ["validation-success", "form:ready"],
|
|
1257
1215
|
setup(m, { expose: b, emit: l }) {
|
|
1258
|
-
const r = m, h = l, s = ht(), { t: p } = ke(), c =
|
|
1216
|
+
const r = m, h = l, s = ht(), { t: p } = ke(), c = ze(), u = kt(), _ = Je(), n = st(), e = tt(), a = It(), { breakpoints: k } = et(), S = O(() => k.value.xs || k.value.sm), g = vt({
|
|
1259
1217
|
value: !1
|
|
1260
1218
|
}), x = Q(!1), w = O(
|
|
1261
1219
|
() => {
|
|
@@ -1288,7 +1246,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1288
1246
|
c.watchLocation(async () => {
|
|
1289
1247
|
location && (s.supplier || (s.supplier = n.suppliers.find((o) => o) ?? s.supplier));
|
|
1290
1248
|
});
|
|
1291
|
-
const te = wt(), F =
|
|
1249
|
+
const te = wt(), F = rs(
|
|
1292
1250
|
() => s,
|
|
1293
1251
|
(o) => {
|
|
1294
1252
|
Object.assign(s, o);
|
|
@@ -1341,14 +1299,14 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1341
1299
|
set(o) {
|
|
1342
1300
|
s.remark = o;
|
|
1343
1301
|
}
|
|
1344
|
-
}), { backdatePo: N, backdateSwitch: G, backdateModel: J, backdateTimeModel: y } =
|
|
1302
|
+
}), { backdatePo: N, backdateSwitch: G, backdateModel: J, backdateTimeModel: y } = Rs({
|
|
1345
1303
|
getEffectiveAt() {
|
|
1346
1304
|
return s.effectiveAt;
|
|
1347
1305
|
},
|
|
1348
1306
|
setEffectiveAt(o) {
|
|
1349
1307
|
s.effectiveAt = o;
|
|
1350
1308
|
}
|
|
1351
|
-
}), { comparePricesToggle: d, comparePriceFetching: R, comparePriceBySku: K } =
|
|
1309
|
+
}), { comparePricesToggle: d, comparePriceFetching: R, comparePriceBySku: K } = Zs(), se = Q();
|
|
1352
1310
|
b({
|
|
1353
1311
|
validateInputs: () => {
|
|
1354
1312
|
var o, f;
|
|
@@ -1370,7 +1328,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1370
1328
|
deleteItem: (o) => {
|
|
1371
1329
|
s.items = s.items.filter((f) => f.sku._id !== o.sku._id);
|
|
1372
1330
|
}
|
|
1373
|
-
})), xe =
|
|
1331
|
+
})), xe = ys({
|
|
1374
1332
|
updateItem: (o) => Ce.value.updateItem(o),
|
|
1375
1333
|
deleteItem: (o) => Ce.value.deleteItem(o),
|
|
1376
1334
|
get supplier() {
|
|
@@ -1478,8 +1436,8 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1478
1436
|
return (o, f) => {
|
|
1479
1437
|
var ye, Fe;
|
|
1480
1438
|
const z = P("FmChip"), W = P("FmLabel"), me = P("FmIcon"), ce = P("FmField"), pe = P("FmTooltip"), he = P("FmSelect"), qe = P("FmTextField"), Ae = P("FmTextarea"), Ie = P("FmSwitch"), B = P("FmDatePicker"), oe = P("FmTimePicker"), re = P("FmFormGroup"), ne = P("FmButton"), fe = P("FmTable"), ie = P("FmForm");
|
|
1481
|
-
return C(), V("div",
|
|
1482
|
-
i("div",
|
|
1439
|
+
return C(), V("div", yo, [
|
|
1440
|
+
i("div", vo, [
|
|
1483
1441
|
(ye = r.modelValue) != null && ye.template ? (C(), Y(z, {
|
|
1484
1442
|
key: 0,
|
|
1485
1443
|
variant: o.disabled ? "warning" : void 0,
|
|
@@ -1511,14 +1469,14 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1511
1469
|
default: T(() => {
|
|
1512
1470
|
var Se, ot, nt, at, lt, rt, it, ut;
|
|
1513
1471
|
return [
|
|
1514
|
-
i("div",
|
|
1515
|
-
i("div",
|
|
1472
|
+
i("div", bo, [
|
|
1473
|
+
i("div", go, [
|
|
1516
1474
|
(Se = r.modelValue) != null && Se.template ? (C(), V(be, { key: 0 }, [
|
|
1517
|
-
i("div",
|
|
1475
|
+
i("div", _o, [
|
|
1518
1476
|
v(W, {
|
|
1519
1477
|
label: t(p)("inventory.transfer.form.type.title")
|
|
1520
1478
|
}, null, 8, ["label"]),
|
|
1521
|
-
i("div",
|
|
1479
|
+
i("div", ko, [
|
|
1522
1480
|
v(pe, {
|
|
1523
1481
|
"z-index": 51,
|
|
1524
1482
|
placement: "left",
|
|
@@ -1530,7 +1488,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1530
1488
|
default: T(() => [
|
|
1531
1489
|
v(ce, null, {
|
|
1532
1490
|
default: T(() => [
|
|
1533
|
-
i("div",
|
|
1491
|
+
i("div", ho, [
|
|
1534
1492
|
v(me, {
|
|
1535
1493
|
name: "lock_outline",
|
|
1536
1494
|
size: "sm",
|
|
@@ -1554,11 +1512,11 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1554
1512
|
}, null, 2)
|
|
1555
1513
|
])
|
|
1556
1514
|
]),
|
|
1557
|
-
i("div",
|
|
1515
|
+
i("div", So, [
|
|
1558
1516
|
v(W, {
|
|
1559
1517
|
label: o.returnFrom ? "Return to" : D.value === t(X).PURCHASE ? t(p)("inventory.transfer.form.purchaseFrom") : t(p)("inventory.transfer.form.transferFrom")
|
|
1560
1518
|
}, null, 8, ["label"]),
|
|
1561
|
-
i("div",
|
|
1519
|
+
i("div", Co, [
|
|
1562
1520
|
v(pe, {
|
|
1563
1521
|
"z-index": 51,
|
|
1564
1522
|
placement: "left",
|
|
@@ -1572,7 +1530,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1572
1530
|
default: T(() => {
|
|
1573
1531
|
var I, Z, ge;
|
|
1574
1532
|
return [
|
|
1575
|
-
i("div",
|
|
1533
|
+
i("div", xo, [
|
|
1576
1534
|
v(me, {
|
|
1577
1535
|
name: "lock_outline",
|
|
1578
1536
|
size: "sm",
|
|
@@ -1620,7 +1578,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1620
1578
|
"menu-wrapper": T((I) => {
|
|
1621
1579
|
var Z, ge;
|
|
1622
1580
|
return [
|
|
1623
|
-
v(
|
|
1581
|
+
v(is, Ye(I, {
|
|
1624
1582
|
items: L.value,
|
|
1625
1583
|
"model-value": (ge = (Z = o.modelValue) == null ? void 0 : Z.supplier) == null ? void 0 : ge._id
|
|
1626
1584
|
}), null, 16, ["items", "model-value"])
|
|
@@ -1654,7 +1612,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1654
1612
|
"onUpdate:modelValue": f[3] || (f[3] = (I) => A.value = I),
|
|
1655
1613
|
class: ee([o.disabled ? "text-fm-color-typo-disabled " : ""])
|
|
1656
1614
|
}, null, 8, ["label", "modelValue", "class"]),
|
|
1657
|
-
x.value ? (C(), Y(
|
|
1615
|
+
x.value ? (C(), Y(fo, {
|
|
1658
1616
|
key: 2,
|
|
1659
1617
|
required: t(s).templateDoc != null,
|
|
1660
1618
|
disabled: o.disabled,
|
|
@@ -1668,7 +1626,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1668
1626
|
g.value = !0;
|
|
1669
1627
|
})
|
|
1670
1628
|
}, null, 8, ["required", "disabled", "supplier", "setting", "items", "onChange"])) : j("", !0),
|
|
1671
|
-
t(e).enableBackdatePo ? (C(), V("div",
|
|
1629
|
+
t(e).enableBackdatePo ? (C(), V("div", wo, [
|
|
1672
1630
|
i("div", {
|
|
1673
1631
|
class: ee([
|
|
1674
1632
|
"flex",
|
|
@@ -1688,14 +1646,14 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1688
1646
|
i("div", {
|
|
1689
1647
|
class: ee({ hidden: S.value, "w-16": !S.value })
|
|
1690
1648
|
}, null, 2),
|
|
1691
|
-
t(G) ? (C(), V("div",
|
|
1692
|
-
i("div",
|
|
1649
|
+
t(G) ? (C(), V("div", Io, [
|
|
1650
|
+
i("div", Fo, [
|
|
1693
1651
|
v(B, {
|
|
1694
1652
|
modelValue: t(J),
|
|
1695
1653
|
"onUpdate:modelValue": f[6] || (f[6] = (I) => we(J) ? J.value = I : null)
|
|
1696
1654
|
}, null, 8, ["modelValue"])
|
|
1697
1655
|
]),
|
|
1698
|
-
i("div",
|
|
1656
|
+
i("div", Do, [
|
|
1699
1657
|
v(oe, {
|
|
1700
1658
|
modelValue: t(y),
|
|
1701
1659
|
"onUpdate:modelValue": f[7] || (f[7] = (I) => we(y) ? y.value = I : null)
|
|
@@ -1709,18 +1667,18 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1709
1667
|
"onUpdate:modelValue": f[8] || (f[8] = (I) => we(N) ? N.value = I : null),
|
|
1710
1668
|
rules: [t(Yt)(new Date(o.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1711
1669
|
}, null, 8, ["modelValue", "rules"])) : j("", !0),
|
|
1712
|
-
M.value && !o.lastClosingDate ? (C(), V("div",
|
|
1670
|
+
M.value && !o.lastClosingDate ? (C(), V("div", $o, [
|
|
1713
1671
|
v(me, {
|
|
1714
1672
|
name: "error",
|
|
1715
1673
|
size: "sm",
|
|
1716
1674
|
class: "text-fm-color-typo-warning"
|
|
1717
1675
|
}),
|
|
1718
|
-
i("span",
|
|
1676
|
+
i("span", To, E(t(p)("inventory.transfer.form.backdate.error")), 1)
|
|
1719
1677
|
])) : j("", !0)
|
|
1720
1678
|
])) : j("", !0)
|
|
1721
1679
|
])
|
|
1722
1680
|
]),
|
|
1723
|
-
i("div",
|
|
1681
|
+
i("div", Po, [
|
|
1724
1682
|
v(re, {
|
|
1725
1683
|
"model-value": t(s).items,
|
|
1726
1684
|
rules: [t(Ue)(1)]
|
|
@@ -1734,8 +1692,8 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1734
1692
|
}
|
|
1735
1693
|
])
|
|
1736
1694
|
}, [
|
|
1737
|
-
i("div",
|
|
1738
|
-
i("div",
|
|
1695
|
+
i("div", Vo, E(t(p)("inventory.transfer.form.items.title")), 1),
|
|
1696
|
+
i("div", Ro, [
|
|
1739
1697
|
v(ne, {
|
|
1740
1698
|
disabled: o.disabled,
|
|
1741
1699
|
label: t(p)("inventory.transfer.form.items.addItem"),
|
|
@@ -1768,7 +1726,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1768
1726
|
}, null, 8, ["disabled"]))
|
|
1769
1727
|
])
|
|
1770
1728
|
], 2),
|
|
1771
|
-
D.value === t(X).PURCHASE && $.value && t(e).enableTotalCost && ((ot = o.modelValue) != null && ot.items.length) ? (C(), V("div",
|
|
1729
|
+
D.value === t(X).PURCHASE && $.value && t(e).enableTotalCost && ((ot = o.modelValue) != null && ot.items.length) ? (C(), V("div", qo, [
|
|
1772
1730
|
v(Ie, {
|
|
1773
1731
|
label: t(R) ? t(p)("inventory.transfer.form.items.fetchingData") : t(p)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1774
1732
|
"prepend-icon": "compare_arrows",
|
|
@@ -1793,7 +1751,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1793
1751
|
"table-row": T((I) => {
|
|
1794
1752
|
var Z, ge, Ee, dt;
|
|
1795
1753
|
return [
|
|
1796
|
-
v(
|
|
1754
|
+
v(io, {
|
|
1797
1755
|
"compare-price-by-sku": t(K),
|
|
1798
1756
|
"show-compare-price": D.value === t(X).PURCHASE && t(d),
|
|
1799
1757
|
row: I,
|
|
@@ -1811,7 +1769,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1811
1769
|
key: t(s).items.map((Z) => Z.sku._id).join(".")
|
|
1812
1770
|
}, {
|
|
1813
1771
|
default: T((Z) => [
|
|
1814
|
-
v(
|
|
1772
|
+
v(Vs, {
|
|
1815
1773
|
"compare-price-by-sku": t(K),
|
|
1816
1774
|
"show-compare-price": D.value === t(X).PURCHASE && t(d),
|
|
1817
1775
|
row: I,
|
|
@@ -1831,7 +1789,50 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1831
1789
|
]);
|
|
1832
1790
|
};
|
|
1833
1791
|
}
|
|
1834
|
-
})
|
|
1792
|
+
});
|
|
1793
|
+
function Eo(m, b) {
|
|
1794
|
+
b ?? (b = `Return to ${m.supplier.name}`);
|
|
1795
|
+
const r = ze().currentLocation, h = us(r), s = {};
|
|
1796
|
+
for (const c of m.items) {
|
|
1797
|
+
const u = c.sku._id;
|
|
1798
|
+
s[u] = $e.reset();
|
|
1799
|
+
}
|
|
1800
|
+
const p = m.deliveryOrder.flatMap((c) => c.received);
|
|
1801
|
+
for (const c of p) {
|
|
1802
|
+
const u = c.sku._id;
|
|
1803
|
+
if (!s[u]) continue;
|
|
1804
|
+
const _ = c.measurement ? $e.multiply([c.measurement.conversion, c.amount]) : c.amount;
|
|
1805
|
+
s[u] = $e.add([s[u], _]);
|
|
1806
|
+
}
|
|
1807
|
+
return {
|
|
1808
|
+
_id: m._id,
|
|
1809
|
+
name: b,
|
|
1810
|
+
purchaseOrder: {
|
|
1811
|
+
supplier: h,
|
|
1812
|
+
ref: m.ref,
|
|
1813
|
+
remark: m.remark,
|
|
1814
|
+
items: m.items.map((c) => {
|
|
1815
|
+
if (c.subItems) {
|
|
1816
|
+
const { subItems: u, ..._ } = c;
|
|
1817
|
+
c = _;
|
|
1818
|
+
}
|
|
1819
|
+
return {
|
|
1820
|
+
...c,
|
|
1821
|
+
quantityStep: {
|
|
1822
|
+
amount: 1,
|
|
1823
|
+
precision: Ne(c.sku.unit, c.measurement)
|
|
1824
|
+
},
|
|
1825
|
+
quantity: s[c.sku._id],
|
|
1826
|
+
maximumQuantity: s[c.sku._id]
|
|
1827
|
+
};
|
|
1828
|
+
}).filter((c) => {
|
|
1829
|
+
var u;
|
|
1830
|
+
return (u = c.maximumQuantity) == null ? void 0 : u.amount;
|
|
1831
|
+
})
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
}
|
|
1835
|
+
const Oo = { class: "flex items-center" }, Mo = { class: "fm-typo-en-title-md-800" }, Uo = { class: "flex gap-4" }, Bo = /* @__PURE__ */ le({
|
|
1835
1836
|
__name: "TransferDialog",
|
|
1836
1837
|
props: {
|
|
1837
1838
|
mode: {},
|
|
@@ -1845,7 +1846,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1845
1846
|
emits: ["update:show", "submitted"],
|
|
1846
1847
|
setup(m, { expose: b, emit: l }) {
|
|
1847
1848
|
var J;
|
|
1848
|
-
const r = m, h = l, s = Ct(), p = It(), c = Le(), u = st(), _ =
|
|
1849
|
+
const r = m, h = l, s = Ct(), p = It(), c = Le(), u = st(), _ = ze(), { t: n } = ke(), e = Q(!1), a = Q(!1), k = Q(!1), S = Tt();
|
|
1849
1850
|
async function g(y) {
|
|
1850
1851
|
if (y) {
|
|
1851
1852
|
a.value = !1;
|
|
@@ -1895,7 +1896,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
1895
1896
|
templateDoc: p.templates.find((d) => d._id === r.templateId)
|
|
1896
1897
|
};
|
|
1897
1898
|
if (r.returnFrom) {
|
|
1898
|
-
const d =
|
|
1899
|
+
const d = Eo(r.returnFrom);
|
|
1899
1900
|
y.templateDoc = d, y.template = d._id, y.supplier = d.purchaseOrder.supplier ?? y.supplier, y.items = d.purchaseOrder.items ?? [], y.isReturnPo = !0;
|
|
1900
1901
|
}
|
|
1901
1902
|
return y;
|
|
@@ -2048,7 +2049,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
2048
2049
|
])
|
|
2049
2050
|
]),
|
|
2050
2051
|
default: T(() => [
|
|
2051
|
-
(C(), Y(
|
|
2052
|
+
(C(), Y(Ao, {
|
|
2052
2053
|
class: "w-full",
|
|
2053
2054
|
ref_key: "formRef",
|
|
2054
2055
|
ref: D,
|
|
@@ -2119,7 +2120,7 @@ const Js = { class: "hover:bg-fm-color-opacity-sm" }, Ws = { class: "flex items-
|
|
|
2119
2120
|
), { columnDefs: n } = Wt(
|
|
2120
2121
|
Qe.RECEIVE_REQUEST,
|
|
2121
2122
|
_
|
|
2122
|
-
), e =
|
|
2123
|
+
), e = ze();
|
|
2123
2124
|
async function a() {
|
|
2124
2125
|
const F = `inventory-record_${pt(u.value.startDate).format("DD-MM-YYYY_HH-mm")}-${pt(u.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, D = _.purchaseOrders.value.flatMap(
|
|
2125
2126
|
(U) => U.items.map((A) => {
|