@feedmepos/mf-inventory-portal 0.0.25-dev.1 → 0.0.25-dev.12
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-TRzHN9-F.js → App-PehI6qSK.js} +35 -34
- package/dist/ApprovalView-a6tbFyO2.js +140 -0
- package/dist/{BindingsDialog-B8WqnjnP.js → BindingsDialog-BNco1Vhd.js} +6 -6
- package/dist/{BindingsPicker-jlcu-d6r.js → BindingsPicker-Dns2kFS-.js} +3 -3
- package/dist/{BindingsTable-B00mXBU7.js → BindingsTable-DTrXzYzr.js} +6 -6
- package/dist/{ClosingDraftView-CTzudiDa.js → ClosingDraftView-BXBkI6WL.js} +47 -47
- package/dist/ClosingTemplateView-BiAGOmVg.js +1859 -0
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js +34 -0
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-IlN0Uj04.js +211 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C8UXVANj.js → FmUnitInput.vue_vue_type_script_setup_true_lang-JDL6LVAb.js} +52 -52
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-DR5ewA1c.js +51 -0
- package/dist/{IngredientGroupView-C5XpFU4A.js → IngredientGroupView-Bci0qysG.js} +1 -1
- package/dist/{IngredientsView-jP9q6wm1.js → IngredientsView-Dpc_GncE.js} +394 -382
- package/dist/{IntegrationView-DmX1Q9KM.js → IntegrationView-DCWg-DR4.js} +660 -623
- package/dist/{InventoryBindingForm-Doz0ISM5.js → InventoryBindingForm-BwwF-2NM.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CXntbRos.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-1BVSUfuT.js} +55 -55
- package/dist/{InventoryBindingSummary-DDjzipz8.js → InventoryBindingSummary-DgoHed7T.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B8cFyxTY.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bu4Dw_6P.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DUDKXBlh.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CW7-Eu69.js} +15 -15
- package/dist/{PublishView-BX7n6k7c.js → PublishView-DVYBAYBI.js} +7 -7
- package/dist/{PurchaseOrderPrintPreview-BjSoZs6d.js → PurchaseOrderPrintPreview-Dp2v_J3o.js} +1 -1
- package/dist/{ReceiveRequestView-B7EWBCnW.js → ReceiveRequestView-DVq8tkzd.js} +503 -494
- package/dist/{RecipeView-DZo_HxRD.js → RecipeView-Cv5EH2Ah.js} +32 -31
- package/dist/{index-qnLd0zOS.js → StockView-B7x9Pywp.js} +3577 -1764
- package/dist/{SupplierView-CSB0MJPt.js → SupplierView-BgyqCgOQ.js} +12 -11
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-ByAN3s-h.js +1494 -0
- package/dist/TransferTemplateView-C30bwI6y.js +1371 -0
- package/dist/{UnitView-DavK_R4W.js → UnitView-IUEnJvH0.js} +14 -14
- package/dist/{WarehouseView-DKH-C4Xd.js → WarehouseView-Bcwta2ui.js} +332 -314
- package/dist/api/inventory.d.ts +7 -6
- package/dist/api/purchase-order.d.ts +1 -0
- package/dist/{app-U7r2BqkX.js → app-BKrf9Qul.js} +27996 -28075
- package/dist/app.js +1 -1
- package/dist/components/FmAutocompleteTextField.vue.d.ts +31 -0
- package/dist/components/FmCustomAttribute.vue.d.ts +3 -8
- package/dist/components/FmLockableField.vue.d.ts +3 -0
- package/dist/components/FmMultiselectDialog.vue.d.ts +20 -3
- package/dist/components/FmMultiselectDialogProps.d.ts +2 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -1
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -1
- package/dist/{decimal-8Rw9enBX.js → decimal-pm1D555G.js} +1 -1
- package/dist/feature-IIGwFZ6m.js +1005 -0
- package/dist/{format-unit-display-BOmYRTQF.js → format-unit-display-DAzCcqoK.js} +335 -328
- package/dist/helper/fuzzy.d.ts +10 -0
- package/dist/index-phCfzXTb.js +35546 -0
- package/dist/{stock-B0CPrhsD.js → stock-B9Im7AGF.js} +3 -3
- package/dist/stores/integration/netsuite.d.ts +5 -0
- package/dist/stores/inventory.d.ts +8 -8
- package/dist/stores/location.d.ts +100 -0
- package/dist/stores/warehouse.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-B9AwIixA.js → supplier-D5z7EqEg.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/use-ingredient-select-dialog-QJXtuwbP.js +51 -0
- package/dist/{use-inventory-binding-dialog-yq2U1BWY.js → use-inventory-binding-dialog-DbK__hMV.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +24 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +24 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -4
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +48 -24
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +36 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -12
- package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +2 -0
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +3 -3
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
- package/dist/views/ingredients/composables/use-ingredient-select-dialog.d.ts +16 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +25 -17
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +42 -26
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +38 -26
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +8 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +1 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -2
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +36 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +36 -12
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -0
- package/dist/{vue-i18n-Bl7GJEHh.js → vue-i18n-sbiTSWWp.js} +79 -79
- package/package.json +5 -5
- package/dist/ApprovalView-XuMTVxgh.js +0 -138
- package/dist/ClosingTemplateView-CH7km5d2.js +0 -1819
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-7BeCefaL.js +0 -142
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dcc6Iujf.js +0 -286
- package/dist/StockView-CJy2REMR.js +0 -1817
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DA3f4VAd.js +0 -1327
- package/dist/TransferTemplateView-CRZXRX63.js +0 -1284
- package/dist/index-C2OSKtid.js +0 -29202
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { b as
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as
|
|
6
|
-
import { useBreakpoints as
|
|
7
|
-
import { P as j, u as
|
|
8
|
-
import { _ as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { reactive as ot, onMounted as Ne, h as L, computed as E, defineComponent as pe, openBlock as S, createElementBlock as q, Fragment as ke, renderList as Me, createElementVNode as l, toDisplayString as U, unref as e, resolveComponent as P, createVNode as d, withCtx as F, createCommentVNode as G, ref as N, createBlock as W, watch as ge, normalizeClass as J, normalizeStyle as lt, createTextVNode as Oe, nextTick as mt, mergeProps as Be, isRef as Se, Teleport as pt } from "vue";
|
|
2
|
+
import { b as ze, Z as ft, l as We, i as ye, O as vt, a0 as Le, K as yt, as as bt, A as Ve, M as _t, m as nt, ab as He, E as ie, at as gt, a as je, au as kt, av as Ct, aw as ht, G as xt, u as Ye, ax as St, $ as wt, T as Dt, ay as Ft, B as rt, H as $t, d as Fe, az as Re, a5 as Je, y as Tt, _ as Pt, z as It, N as Xe } from "./app-BKrf9Qul.js";
|
|
3
|
+
import { u as it, a as Rt, P as Ue, b as Vt, _ as At, g as Et } from "./TransferDetails.vue_vue_type_script_setup_true_lang-ByAN3s-h.js";
|
|
4
|
+
import { _ as ut, u as qt, i as Ut, e as Mt } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-CW7-Eu69.js";
|
|
5
|
+
import { u as Ot } from "./useTabStorage-BkIVScW_.js";
|
|
6
|
+
import { useBreakpoints as Qe, components as ve, FmButtonVariant as Bt, useSnackbar as Ae, useDialog as Nt, useProxiedModel as zt } from "@feedmepos/ui-library";
|
|
7
|
+
import { P as j, u as dt } from "./format-unit-display-DAzCcqoK.js";
|
|
8
|
+
import { _ as Lt, F as Ht, a as et, b as jt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-JDL6LVAb.js";
|
|
9
|
+
import { u as Ee } from "./feature-IIGwFZ6m.js";
|
|
10
|
+
import { c as re, u as Yt, _ as Qt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-IlN0Uj04.js";
|
|
11
|
+
import { useI18n as Ce } from "@feedmepos/mf-common";
|
|
12
|
+
import { u as Ke } from "./supplier-D5z7EqEg.js";
|
|
12
13
|
import { _ as Kt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
13
|
-
import { u as
|
|
14
|
+
import { u as Zt } from "./vue-i18n-sbiTSWWp.js";
|
|
14
15
|
import "./array-hChJVZLE.js";
|
|
15
16
|
var Y = /* @__PURE__ */ ((m) => (m.Code = "Code", m.Name = "Name", m.Amount = "Amount", m.Cost = "Cost", m.TotalCost = "TotalCost", m.Delete = "Delete", m))(Y || {});
|
|
16
|
-
const
|
|
17
|
-
const { t: m } =
|
|
17
|
+
const tt = () => {
|
|
18
|
+
const { t: m } = Ce();
|
|
18
19
|
return L(
|
|
19
|
-
|
|
20
|
+
ut,
|
|
20
21
|
{
|
|
21
22
|
zIndex: 50,
|
|
22
23
|
class: "whitespace-nowrap"
|
|
23
24
|
},
|
|
24
|
-
m("inventory.transfer.form.items.table.Cost", [
|
|
25
|
+
m("inventory.transfer.form.items.table.Cost", [nt()])
|
|
25
26
|
);
|
|
26
27
|
};
|
|
27
|
-
function
|
|
28
|
-
const { t: y } =
|
|
29
|
-
|
|
28
|
+
function Gt(m) {
|
|
29
|
+
const { t: y } = Ce(), n = ot({}), { breakpoints: i } = Qe(), b = Ee(), t = ze();
|
|
30
|
+
Ne(() => {
|
|
30
31
|
for (const u of m.items) {
|
|
31
32
|
if (!u.totalCost)
|
|
32
33
|
continue;
|
|
33
34
|
const a = re(u.sku, u.quantity, u.measurement, {
|
|
34
35
|
supplier: m.supplier
|
|
35
|
-
}),
|
|
36
|
-
a ? n[u.sku._id] = a.amount !==
|
|
36
|
+
}), o = u.totalCost ?? ft.reset();
|
|
37
|
+
a ? n[u.sku._id] = a.amount !== o.amount || a.precision !== o.precision : n[u.sku._id] = !0;
|
|
37
38
|
}
|
|
38
39
|
});
|
|
39
40
|
function f(u) {
|
|
40
|
-
var
|
|
41
|
-
return !!(((v = (
|
|
41
|
+
var o, v, k, C, g, x, D;
|
|
42
|
+
return !!(((v = (o = u.defaultCost) == null ? void 0 : o.costPerUnit) == null ? void 0 : v.amount) ?? ((D = (x = (g = (C = (k = m.supplier) == null ? void 0 : k.supplyItems) == null ? void 0 : C.find((R) => R.skuId === u._id)) == null ? void 0 : g.defaultCost) == null ? void 0 : x.costPerUnit) == null ? void 0 : D.amount));
|
|
42
43
|
}
|
|
43
|
-
const
|
|
44
|
+
const _ = [
|
|
44
45
|
{
|
|
45
46
|
id: "Code",
|
|
46
47
|
header: () => y("inventory.transfer.form.items.table.Code"),
|
|
@@ -65,14 +66,14 @@ function Zt(m) {
|
|
|
65
66
|
)
|
|
66
67
|
) : L(ve.FmTextField, {
|
|
67
68
|
modelValue: a.code,
|
|
68
|
-
"onUpdate:modelValue": (
|
|
69
|
+
"onUpdate:modelValue": (o) => {
|
|
69
70
|
m.updateItem({
|
|
70
71
|
...a,
|
|
71
|
-
code:
|
|
72
|
+
code: o
|
|
72
73
|
});
|
|
73
74
|
},
|
|
74
75
|
key: a.sku._id,
|
|
75
|
-
rules: [
|
|
76
|
+
rules: [We()],
|
|
76
77
|
labelMark: "required"
|
|
77
78
|
});
|
|
78
79
|
},
|
|
@@ -101,14 +102,14 @@ function Zt(m) {
|
|
|
101
102
|
)
|
|
102
103
|
) : L(ve.FmTextField, {
|
|
103
104
|
modelValue: a.name,
|
|
104
|
-
"onUpdate:modelValue": (
|
|
105
|
+
"onUpdate:modelValue": (o) => {
|
|
105
106
|
m.updateItem({
|
|
106
107
|
...a,
|
|
107
|
-
name:
|
|
108
|
+
name: o
|
|
108
109
|
});
|
|
109
110
|
},
|
|
110
111
|
key: a.sku._id,
|
|
111
|
-
rules: [
|
|
112
|
+
rules: [We()],
|
|
112
113
|
labelMark: "required"
|
|
113
114
|
});
|
|
114
115
|
},
|
|
@@ -119,11 +120,11 @@ function Zt(m) {
|
|
|
119
120
|
header: () => y("inventory.transfer.form.items.table.Amount"),
|
|
120
121
|
minSize: 200,
|
|
121
122
|
cell(u) {
|
|
122
|
-
var v, k,
|
|
123
|
-
const a = u.row.original,
|
|
124
|
-
(
|
|
123
|
+
var v, k, C;
|
|
124
|
+
const a = u.row.original, o = (C = (k = (v = m.template) == null ? void 0 : v.purchaseOrder) == null ? void 0 : k.items) == null ? void 0 : C.find(
|
|
125
|
+
(g) => g.sku._id === a.sku._id
|
|
125
126
|
);
|
|
126
|
-
return L(
|
|
127
|
+
return L(Lt, {
|
|
127
128
|
style: {
|
|
128
129
|
flex: "1 1 0%"
|
|
129
130
|
},
|
|
@@ -133,11 +134,11 @@ function Zt(m) {
|
|
|
133
134
|
},
|
|
134
135
|
key: a.sku._id,
|
|
135
136
|
unit: a.sku.unit,
|
|
136
|
-
"onUpdate:modelValue": (
|
|
137
|
+
"onUpdate:modelValue": (g) => {
|
|
137
138
|
const x = {
|
|
138
139
|
...a,
|
|
139
|
-
quantity:
|
|
140
|
-
measurement:
|
|
140
|
+
quantity: g.amount,
|
|
141
|
+
measurement: g.measurement
|
|
141
142
|
};
|
|
142
143
|
b.enableTotalCost && (x.totalCost = re(a.sku, a.quantity, a.measurement, {
|
|
143
144
|
supplier: m.supplier,
|
|
@@ -146,22 +147,22 @@ function Zt(m) {
|
|
|
146
147
|
manualTotalCost: n[a.sku._id] ? x.totalCost : void 0
|
|
147
148
|
})), m.updateItem(x);
|
|
148
149
|
},
|
|
149
|
-
stepper:
|
|
150
|
-
disableUnit: !!
|
|
150
|
+
stepper: o == null ? void 0 : o.quantityStep,
|
|
151
|
+
disableUnit: !!o,
|
|
151
152
|
disabled: m.disabled,
|
|
152
153
|
rules: [
|
|
153
|
-
|
|
154
|
+
Ht(
|
|
154
155
|
+ye(
|
|
155
|
-
(
|
|
156
|
+
(o != null && o.minimumQuantity && (o == null ? void 0 : o.minimumQuantity.amount) > 0 ? o == null ? void 0 : o.minimumQuantity : void 0) ?? {
|
|
156
157
|
amount: 1,
|
|
157
|
-
precision:
|
|
158
|
+
precision: vt(a.sku.unit, a.measurement)
|
|
158
159
|
}
|
|
159
160
|
)
|
|
160
161
|
),
|
|
161
|
-
|
|
162
|
-
+ye(
|
|
163
|
-
) :
|
|
164
|
-
...
|
|
162
|
+
o != null && o.maximumQuantity ? et(
|
|
163
|
+
+ye(o == null ? void 0 : o.maximumQuantity)
|
|
164
|
+
) : et(1 / 0),
|
|
165
|
+
...o != null && o.quantityStep ? [jt(o.quantityStep)] : []
|
|
165
166
|
],
|
|
166
167
|
applyDefaultRules: !0
|
|
167
168
|
});
|
|
@@ -170,7 +171,7 @@ function Zt(m) {
|
|
|
170
171
|
},
|
|
171
172
|
b.mustUseDefaultCost ? {
|
|
172
173
|
id: "TotalCost",
|
|
173
|
-
header:
|
|
174
|
+
header: tt,
|
|
174
175
|
size: 180,
|
|
175
176
|
accessorFn: (u) => {
|
|
176
177
|
const a = re(u.sku, u.quantity, u.measurement, {
|
|
@@ -180,11 +181,11 @@ function Zt(m) {
|
|
|
180
181
|
}
|
|
181
182
|
} : {
|
|
182
183
|
id: "Cost",
|
|
183
|
-
header:
|
|
184
|
+
header: tt,
|
|
184
185
|
size: 180,
|
|
185
186
|
cell(u) {
|
|
186
|
-
const a = u.row.original,
|
|
187
|
-
return !n[a.sku._id] &&
|
|
187
|
+
const a = u.row.original, o = f(a.sku), v = i.value.xs || i.value.sm;
|
|
188
|
+
return !n[a.sku._id] && o ? L(
|
|
188
189
|
"div",
|
|
189
190
|
{
|
|
190
191
|
class: [
|
|
@@ -196,7 +197,7 @@ function Zt(m) {
|
|
|
196
197
|
[
|
|
197
198
|
L(ve.FmButton, {
|
|
198
199
|
prependIcon: "edit",
|
|
199
|
-
variant:
|
|
200
|
+
variant: Bt.Tertiary,
|
|
200
201
|
disabled: m.disabled,
|
|
201
202
|
onClick() {
|
|
202
203
|
m.updateItem({
|
|
@@ -215,7 +216,7 @@ function Zt(m) {
|
|
|
215
216
|
[
|
|
216
217
|
L(
|
|
217
218
|
"span",
|
|
218
|
-
v ?
|
|
219
|
+
v ? Le(
|
|
219
220
|
re(a.sku, a.quantity, a.measurement, {
|
|
220
221
|
supplier: m.supplier
|
|
221
222
|
})
|
|
@@ -247,12 +248,12 @@ function Zt(m) {
|
|
|
247
248
|
m.updateItem({
|
|
248
249
|
...a,
|
|
249
250
|
totalCost: {
|
|
250
|
-
...
|
|
251
|
-
currency:
|
|
251
|
+
...yt(+k),
|
|
252
|
+
currency: bt()
|
|
252
253
|
}
|
|
253
254
|
});
|
|
254
255
|
},
|
|
255
|
-
rules: [
|
|
256
|
+
rules: [Ve(0), _t(2)]
|
|
256
257
|
},
|
|
257
258
|
{
|
|
258
259
|
prepend() {
|
|
@@ -264,11 +265,11 @@ function Zt(m) {
|
|
|
264
265
|
m.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
265
266
|
]
|
|
266
267
|
},
|
|
267
|
-
|
|
268
|
+
nt()
|
|
268
269
|
) : null;
|
|
269
270
|
},
|
|
270
271
|
append() {
|
|
271
|
-
return
|
|
272
|
+
return o ? L(ve.FmButton, {
|
|
272
273
|
prependIcon: "close",
|
|
273
274
|
variant: "tertiary",
|
|
274
275
|
disabled: m.disabled,
|
|
@@ -316,13 +317,13 @@ function Zt(m) {
|
|
|
316
317
|
}
|
|
317
318
|
];
|
|
318
319
|
return {
|
|
319
|
-
columnDefs:
|
|
320
|
+
columnDefs: E(() => b.enableTotalCost && (b.mustUseDefaultCost || m.transferType === j.PURCHASE) ? _ : _.filter(
|
|
320
321
|
(u) => u.id !== "Cost"
|
|
321
322
|
/* Cost */
|
|
322
323
|
))
|
|
323
324
|
};
|
|
324
325
|
}
|
|
325
|
-
const
|
|
326
|
+
const Wt = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, Jt = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, Xt = { class: "w-[450px] xs:w-full flex" }, es = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, ts = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ct = /* @__PURE__ */ pe({
|
|
326
327
|
__name: "SupplierPriceHistory",
|
|
327
328
|
props: {
|
|
328
329
|
prices: {}
|
|
@@ -332,31 +333,31 @@ const Gt = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
332
333
|
function n(i) {
|
|
333
334
|
return y.suppliers.find((b) => b._id === i);
|
|
334
335
|
}
|
|
335
|
-
return (i, b) => (S(),
|
|
336
|
-
(S(!0),
|
|
336
|
+
return (i, b) => (S(), q("div", Wt, [
|
|
337
|
+
(S(!0), q(ke, null, Me(Object.keys(i.prices), (t) => {
|
|
337
338
|
var f;
|
|
338
|
-
return S(),
|
|
339
|
+
return S(), q("div", {
|
|
339
340
|
key: t,
|
|
340
341
|
class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
|
|
341
342
|
}, [
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
(S(!0),
|
|
343
|
+
l("div", Jt, U((f = n(t)) == null ? void 0 : f.name), 1),
|
|
344
|
+
l("div", Xt, [
|
|
345
|
+
(S(!0), q(ke, null, Me(i.prices[t].slice(0, 3), (_) => {
|
|
345
346
|
var w;
|
|
346
|
-
return S(),
|
|
347
|
-
key:
|
|
347
|
+
return S(), q("div", {
|
|
348
|
+
key: _.date,
|
|
348
349
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
349
350
|
}, [
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
b[0] || (b[0] =
|
|
353
|
-
|
|
354
|
-
|
|
351
|
+
l("div", es, [
|
|
352
|
+
l("span", null, U(_.totalCost ? e(Le)(_.totalCost) : "No data"), 1),
|
|
353
|
+
b[0] || (b[0] = l("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
354
|
+
l("span", null, U(e(ye)(_.totalUnit, !1)), 1),
|
|
355
|
+
l("span", null, U(((w = _.measurement) == null ? void 0 : w.abbrev) ?? _.unit.abbrev), 1)
|
|
355
356
|
]),
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
b[1] || (b[1] =
|
|
359
|
-
|
|
357
|
+
l("div", ts, [
|
|
358
|
+
l("span", null, "(#" + U(_.seqNumber) + ")", 1),
|
|
359
|
+
b[1] || (b[1] = l("span", null, U(" "), -1)),
|
|
360
|
+
l("span", null, U(e(He)(new Date(_.date))), 1)
|
|
360
361
|
])
|
|
361
362
|
]);
|
|
362
363
|
}), 128))
|
|
@@ -365,10 +366,10 @@ const Gt = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
365
366
|
}), 128))
|
|
366
367
|
]));
|
|
367
368
|
}
|
|
368
|
-
}),
|
|
369
|
+
}), ss = { class: "flex flex-col gap-8 py-16" }, as = { class: "flex items-center" }, os = { class: "flex-1 flex gap-1 items-center" }, ls = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ns = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, rs = { class: "flex gap-8 w-full" }, is = { class: "flex-1 flex flex-col gap-4" }, us = { class: "flex-1 flex flex-col gap-4" }, ds = { class: "flex gap-8 w-full" }, cs = { class: "flex-1 flex flex-col gap-4" }, ms = {
|
|
369
370
|
key: 0,
|
|
370
371
|
class: "flex-1 flex flex-col gap-4"
|
|
371
|
-
},
|
|
372
|
+
}, ps = /* @__PURE__ */ pe({
|
|
372
373
|
__name: "TransferItem",
|
|
373
374
|
props: {
|
|
374
375
|
cellByColId: {},
|
|
@@ -377,59 +378,59 @@ const Gt = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
377
378
|
row: {}
|
|
378
379
|
},
|
|
379
380
|
setup(m) {
|
|
380
|
-
const { t: y } =
|
|
381
|
+
const { t: y } = Ce();
|
|
381
382
|
return (n, i) => {
|
|
382
|
-
var f,
|
|
383
|
+
var f, _, w, u, a, o, v, k, C, g, x, D, R, z, ue, T, $, O, V, I, B, Q, K, p, c, H, oe;
|
|
383
384
|
const b = P("FmLabel"), t = P("FmSpacer");
|
|
384
|
-
return S(),
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
385
|
+
return S(), q("div", ss, [
|
|
386
|
+
l("div", as, [
|
|
387
|
+
l("div", os, [
|
|
388
|
+
l("span", ls, " (" + U(n.row.original.sku.code) + ") ", 1),
|
|
389
|
+
l("span", ns, U(n.row.original.sku.name), 1)
|
|
389
390
|
]),
|
|
390
|
-
|
|
391
|
+
l("div", null, [
|
|
391
392
|
d(e(ie), {
|
|
392
|
-
render: (w = (
|
|
393
|
+
render: (w = (_ = (f = n.cellByColId.Delete) == null ? void 0 : f.column) == null ? void 0 : _.columnDef) == null ? void 0 : w.cell,
|
|
393
394
|
props: (a = (u = n.cellByColId.Delete) == null ? void 0 : u.getContext) == null ? void 0 : a.call(u)
|
|
394
395
|
}, null, 8, ["render", "props"])
|
|
395
396
|
])
|
|
396
397
|
]),
|
|
397
|
-
|
|
398
|
-
|
|
398
|
+
l("div", rs, [
|
|
399
|
+
l("div", is, [
|
|
399
400
|
d(b, {
|
|
400
401
|
label: e(y)(`inventory.transfer.form.items.table.${e(Y).Code}`)
|
|
401
402
|
}, null, 8, ["label"]),
|
|
402
403
|
d(e(ie), {
|
|
403
|
-
render: (k = (v = (
|
|
404
|
-
props: (
|
|
404
|
+
render: (k = (v = (o = n.cellByColId[e(Y).Code]) == null ? void 0 : o.column) == null ? void 0 : v.columnDef) == null ? void 0 : k.cell,
|
|
405
|
+
props: (g = (C = n.cellByColId[e(Y).Code]) == null ? void 0 : C.getContext) == null ? void 0 : g.call(C)
|
|
405
406
|
}, null, 8, ["render", "props"]),
|
|
406
|
-
i[0] || (i[0] =
|
|
407
|
+
i[0] || (i[0] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
407
408
|
]),
|
|
408
|
-
|
|
409
|
+
l("div", us, [
|
|
409
410
|
d(b, {
|
|
410
411
|
label: e(y)(`inventory.transfer.form.items.table.${e(Y).Name}`)
|
|
411
412
|
}, null, 8, ["label"]),
|
|
412
413
|
d(e(ie), {
|
|
413
|
-
render: (
|
|
414
|
+
render: (R = (D = (x = n.cellByColId[e(Y).Name]) == null ? void 0 : x.column) == null ? void 0 : D.columnDef) == null ? void 0 : R.cell,
|
|
414
415
|
props: (ue = (z = n.cellByColId[e(Y).Name]) == null ? void 0 : z.getContext) == null ? void 0 : ue.call(z)
|
|
415
416
|
}, null, 8, ["render", "props"]),
|
|
416
|
-
i[1] || (i[1] =
|
|
417
|
+
i[1] || (i[1] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
417
418
|
])
|
|
418
419
|
]),
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
l("div", ds, [
|
|
421
|
+
l("div", cs, [
|
|
421
422
|
d(b, {
|
|
422
423
|
label: e(y)(`inventory.transfer.form.items.table.${e(Y).Amount}`)
|
|
423
424
|
}, null, 8, ["label"]),
|
|
424
425
|
d(e(ie), {
|
|
425
426
|
render: (O = ($ = (T = n.cellByColId[e(Y).Amount]) == null ? void 0 : T.column) == null ? void 0 : $.columnDef) == null ? void 0 : O.cell,
|
|
426
|
-
props: (I = (
|
|
427
|
+
props: (I = (V = n.cellByColId[e(Y).Amount]) == null ? void 0 : V.getContext) == null ? void 0 : I.call(V)
|
|
427
428
|
}, null, 8, ["render", "props"]),
|
|
428
|
-
i[2] || (i[2] =
|
|
429
|
+
i[2] || (i[2] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
429
430
|
]),
|
|
430
|
-
n.cellByColId[e(Y).Cost] ? (S(),
|
|
431
|
-
d(
|
|
432
|
-
default:
|
|
431
|
+
n.cellByColId[e(Y).Cost] ? (S(), q("div", ms, [
|
|
432
|
+
d(ut, { "z-index": 50 }, {
|
|
433
|
+
default: F(() => [
|
|
433
434
|
d(b, {
|
|
434
435
|
label: e(y)(`inventory.transfer.form.items.table.${e(Y).Cost}2`)
|
|
435
436
|
}, null, 8, ["label"])
|
|
@@ -437,15 +438,15 @@ const Gt = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
437
438
|
_: 1
|
|
438
439
|
}),
|
|
439
440
|
d(e(ie), {
|
|
440
|
-
render: (
|
|
441
|
+
render: (K = (Q = (B = n.cellByColId[e(Y).Cost]) == null ? void 0 : B.column) == null ? void 0 : Q.columnDef) == null ? void 0 : K.cell,
|
|
441
442
|
props: (c = (p = n.cellByColId[e(Y).Cost]) == null ? void 0 : p.getContext) == null ? void 0 : c.call(p)
|
|
442
443
|
}, null, 8, ["render", "props"]),
|
|
443
|
-
i[3] || (i[3] =
|
|
444
|
+
i[3] || (i[3] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
444
445
|
])) : G("", !0)
|
|
445
446
|
]),
|
|
446
|
-
n.showComparePrice && Object.keys(n.comparePriceBySku[(H = n.row.original.sku) == null ? void 0 : H._id] ?? {}).length > 0 ? (S(),
|
|
447
|
+
n.showComparePrice && Object.keys(n.comparePriceBySku[(H = n.row.original.sku) == null ? void 0 : H._id] ?? {}).length > 0 ? (S(), q(ke, { key: 0 }, [
|
|
447
448
|
d(t, { class: "h-8" }),
|
|
448
|
-
d(
|
|
449
|
+
d(ct, {
|
|
449
450
|
prices: n.comparePriceBySku[(oe = n.row.original.sku) == null ? void 0 : oe._id]
|
|
450
451
|
}, null, 8, ["prices"])
|
|
451
452
|
], 64)) : G("", !0)
|
|
@@ -453,8 +454,8 @@ const Gt = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
453
454
|
};
|
|
454
455
|
}
|
|
455
456
|
});
|
|
456
|
-
function
|
|
457
|
-
const y =
|
|
457
|
+
function fs(m) {
|
|
458
|
+
const y = E({
|
|
458
459
|
get() {
|
|
459
460
|
const t = m.getEffectiveAt();
|
|
460
461
|
return t ? new Date(t) : null;
|
|
@@ -462,21 +463,21 @@ function ps(m) {
|
|
|
462
463
|
set(t) {
|
|
463
464
|
m.setEffectiveAt((t == null ? void 0 : t.toISOString()) ?? null);
|
|
464
465
|
}
|
|
465
|
-
}), n =
|
|
466
|
+
}), n = E({
|
|
466
467
|
get() {
|
|
467
468
|
return !!y.value;
|
|
468
469
|
},
|
|
469
470
|
set(t) {
|
|
470
471
|
t ? y.value = /* @__PURE__ */ new Date() : y.value = null;
|
|
471
472
|
}
|
|
472
|
-
}), i =
|
|
473
|
+
}), i = E({
|
|
473
474
|
get() {
|
|
474
|
-
return y.value === null ? "" :
|
|
475
|
+
return y.value === null ? "" : He(y.value);
|
|
475
476
|
},
|
|
476
477
|
set(t) {
|
|
477
478
|
t ? y.value = /* @__PURE__ */ new Date(`${t} ${b.value}`) : y.value = null;
|
|
478
479
|
}
|
|
479
|
-
}), b =
|
|
480
|
+
}), b = E({
|
|
480
481
|
get() {
|
|
481
482
|
return y.value === null ? "" : gt(y.value);
|
|
482
483
|
},
|
|
@@ -491,13 +492,13 @@ function ps(m) {
|
|
|
491
492
|
backdateTimeModel: b
|
|
492
493
|
};
|
|
493
494
|
}
|
|
494
|
-
const
|
|
495
|
+
const vs = {
|
|
495
496
|
width: "24",
|
|
496
497
|
height: "24",
|
|
497
498
|
viewBox: "0 0 24 24",
|
|
498
499
|
fill: "none",
|
|
499
500
|
xmlns: "http://www.w3.org/2000/svg"
|
|
500
|
-
},
|
|
501
|
+
}, ys = ["fill"], bs = ["fill"], _s = ["stroke"], gs = ["stroke"], ks = /* @__PURE__ */ pe({
|
|
501
502
|
__name: "SparkIcon",
|
|
502
503
|
props: {
|
|
503
504
|
size: {
|
|
@@ -510,23 +511,23 @@ const fs = {
|
|
|
510
511
|
}
|
|
511
512
|
},
|
|
512
513
|
setup(m) {
|
|
513
|
-
return (y, n) => (S(),
|
|
514
|
-
|
|
514
|
+
return (y, n) => (S(), q("svg", vs, [
|
|
515
|
+
l("path", {
|
|
515
516
|
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",
|
|
516
517
|
fill: m.color
|
|
517
|
-
}, null, 8,
|
|
518
|
-
|
|
518
|
+
}, null, 8, ys),
|
|
519
|
+
l("path", {
|
|
519
520
|
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",
|
|
520
521
|
fill: m.color
|
|
521
|
-
}, null, 8,
|
|
522
|
-
|
|
522
|
+
}, null, 8, bs),
|
|
523
|
+
l("path", {
|
|
523
524
|
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",
|
|
524
525
|
stroke: m.color,
|
|
525
526
|
"stroke-width": "1.5",
|
|
526
527
|
"stroke-linecap": "round",
|
|
527
528
|
"stroke-linejoin": "round"
|
|
528
|
-
}, null, 8,
|
|
529
|
-
|
|
529
|
+
}, null, 8, _s),
|
|
530
|
+
l("path", {
|
|
530
531
|
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",
|
|
531
532
|
stroke: m.color,
|
|
532
533
|
"stroke-width": "1.5",
|
|
@@ -535,14 +536,14 @@ const fs = {
|
|
|
535
536
|
}, null, 8, gs)
|
|
536
537
|
]));
|
|
537
538
|
}
|
|
538
|
-
}),
|
|
539
|
+
}), Cs = { class: "flex gap-8 items-center" }, hs = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, xs = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, Ss = { class: "flex items-center w-full" }, ws = { class: "flex-1" }, Ds = { class: "fm-typo-en-title-sm-800" }, Fs = { class: "flex items-start gap-8" }, $s = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ts = { class: "flex gap-1" }, st = /* @__PURE__ */ pe({
|
|
539
540
|
__name: "ForecastStock",
|
|
540
541
|
props: {
|
|
541
542
|
disabled: { type: Boolean }
|
|
542
543
|
},
|
|
543
544
|
emits: ["update:poItems"],
|
|
544
545
|
setup(m, { emit: y }) {
|
|
545
|
-
const n = y, i = N(!1), b = N(7), t = qt(), f =
|
|
546
|
+
const n = y, i = N(!1), b = N(7), t = qt(), f = Ae(), _ = je(), { t: w } = Ce();
|
|
546
547
|
async function u() {
|
|
547
548
|
if (b.value < 1)
|
|
548
549
|
return;
|
|
@@ -555,14 +556,14 @@ const fs = {
|
|
|
555
556
|
});
|
|
556
557
|
return;
|
|
557
558
|
}
|
|
558
|
-
const
|
|
559
|
-
const
|
|
560
|
-
if (v.find((
|
|
559
|
+
const o = t.purchaseOrderForecast.skus.reduce((v, k) => {
|
|
560
|
+
const C = _.skus.find((D) => D._id === k.id);
|
|
561
|
+
if (v.find((D) => D.sku._id === k.id) || !C)
|
|
561
562
|
return v;
|
|
562
563
|
const x = {
|
|
563
|
-
sku:
|
|
564
|
-
code:
|
|
565
|
-
name:
|
|
564
|
+
sku: C,
|
|
565
|
+
code: C.code,
|
|
566
|
+
name: C.name,
|
|
566
567
|
quantity: {
|
|
567
568
|
amount: k.amount,
|
|
568
569
|
precision: 0
|
|
@@ -570,17 +571,17 @@ const fs = {
|
|
|
570
571
|
};
|
|
571
572
|
return v.push(x), v;
|
|
572
573
|
}, a);
|
|
573
|
-
n("update:poItems",
|
|
574
|
+
n("update:poItems", o);
|
|
574
575
|
}
|
|
575
|
-
return (a,
|
|
576
|
-
const v = P("FmButton"), k = P("FmIcon"),
|
|
577
|
-
return S(),
|
|
576
|
+
return (a, o) => {
|
|
577
|
+
const v = P("FmButton"), k = P("FmIcon"), C = P("FmStepperField"), g = P("FmPopover");
|
|
578
|
+
return S(), W(g, {
|
|
578
579
|
disabled: a.disabled,
|
|
579
580
|
class: "flex",
|
|
580
581
|
"show-popover": i.value,
|
|
581
|
-
onPopoverChanged:
|
|
582
|
+
onPopoverChanged: o[3] || (o[3] = (x) => i.value = x)
|
|
582
583
|
}, {
|
|
583
|
-
"popover-button":
|
|
584
|
+
"popover-button": F(() => [
|
|
584
585
|
d(v, {
|
|
585
586
|
label: "unused",
|
|
586
587
|
variant: "secondary",
|
|
@@ -589,25 +590,25 @@ const fs = {
|
|
|
589
590
|
"border-color": a.disabled ? "disabled" : "primary",
|
|
590
591
|
disabled: a.disabled
|
|
591
592
|
}, {
|
|
592
|
-
default:
|
|
593
|
-
|
|
594
|
-
d(
|
|
593
|
+
default: F(() => [
|
|
594
|
+
l("div", Cs, [
|
|
595
|
+
d(ks, {
|
|
595
596
|
size: 24,
|
|
596
597
|
color: a.disabled ? "#c7c7cc" : "#ff7823"
|
|
597
598
|
}, null, 8, ["color"]),
|
|
598
|
-
|
|
599
|
+
l("div", hs, U(e(w)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
599
600
|
])
|
|
600
601
|
]),
|
|
601
602
|
_: 1
|
|
602
603
|
}, 8, ["text-color", "border-color", "disabled"])
|
|
603
604
|
]),
|
|
604
|
-
default:
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
605
|
+
default: F(() => [
|
|
606
|
+
l("div", xs, [
|
|
607
|
+
l("div", Ss, [
|
|
608
|
+
l("div", ws, [
|
|
608
609
|
d(Kt, { "z-index": 99 }, {
|
|
609
|
-
default:
|
|
610
|
-
|
|
610
|
+
default: F(() => [
|
|
611
|
+
l("p", Ds, U(e(w)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
611
612
|
]),
|
|
612
613
|
_: 1
|
|
613
614
|
})
|
|
@@ -616,33 +617,33 @@ const fs = {
|
|
|
616
617
|
icon: "close",
|
|
617
618
|
size: "md",
|
|
618
619
|
variant: "tertiary",
|
|
619
|
-
onClick:
|
|
620
|
+
onClick: o[0] || (o[0] = (x) => i.value = !1)
|
|
620
621
|
})
|
|
621
622
|
]),
|
|
622
|
-
d(
|
|
623
|
+
d(C, {
|
|
623
624
|
modelValue: b.value,
|
|
624
|
-
"onUpdate:modelValue":
|
|
625
|
+
"onUpdate:modelValue": o[1] || (o[1] = (x) => b.value = x),
|
|
625
626
|
label: e(w)("inventory.transfer.form.items.forecastStock.days"),
|
|
626
|
-
rules: [e(
|
|
627
|
+
rules: [e(Ve)(1)]
|
|
627
628
|
}, {
|
|
628
|
-
"helper-text":
|
|
629
|
-
|
|
629
|
+
"helper-text": F(() => [
|
|
630
|
+
l("div", Fs, [
|
|
630
631
|
d(k, {
|
|
631
632
|
name: "warning",
|
|
632
633
|
size: "sm",
|
|
633
634
|
class: "text-fm-color-system-warning-300"
|
|
634
635
|
}),
|
|
635
|
-
|
|
636
|
+
l("div", $s, U(e(w)("inventory.transfer.form.items.forecastStock.replace")), 1)
|
|
636
637
|
])
|
|
637
638
|
]),
|
|
638
639
|
_: 1
|
|
639
640
|
}, 8, ["modelValue", "label", "rules"]),
|
|
640
|
-
|
|
641
|
-
|
|
641
|
+
l("div", Ts, [
|
|
642
|
+
o[4] || (o[4] = l("div", { class: "grow" }, null, -1)),
|
|
642
643
|
d(v, {
|
|
643
644
|
label: e(w)("common.cancel"),
|
|
644
645
|
variant: "tertiary",
|
|
645
|
-
onClick:
|
|
646
|
+
onClick: o[2] || (o[2] = (x) => i.value = !1)
|
|
646
647
|
}, null, 8, ["label"]),
|
|
647
648
|
d(v, {
|
|
648
649
|
label: e(w)("inventory.transfer.form.items.forecastStock.generate"),
|
|
@@ -656,35 +657,35 @@ const fs = {
|
|
|
656
657
|
};
|
|
657
658
|
}
|
|
658
659
|
});
|
|
659
|
-
function
|
|
660
|
-
const m =
|
|
661
|
-
|
|
660
|
+
function Ps() {
|
|
661
|
+
const m = Ae(), y = it(), n = N(!1);
|
|
662
|
+
ge(n, (f) => {
|
|
662
663
|
f && (b.value = !0, i().finally(() => {
|
|
663
664
|
b.value = !1;
|
|
664
665
|
}));
|
|
665
666
|
});
|
|
666
667
|
async function i() {
|
|
667
668
|
try {
|
|
668
|
-
const { startDate: f, endDate:
|
|
669
|
-
(
|
|
669
|
+
const { startDate: f, endDate: _ } = kt(6), a = (await y.getPurchaseOrders({ start: f, end: _ })).filter(
|
|
670
|
+
(o) => {
|
|
670
671
|
var v, k;
|
|
671
|
-
return
|
|
672
|
+
return o.status === Ct.enum.COMPLETE && ((v = o.supplier) == null ? void 0 : v.internal) !== "warehouse" && ((k = o.supplier) == null ? void 0 : k.internal) !== "restaurant";
|
|
672
673
|
}
|
|
673
|
-
).reduce((
|
|
674
|
-
const k = new Date(ht(v._id)),
|
|
675
|
-
for (const
|
|
676
|
-
if (!
|
|
677
|
-
const x =
|
|
678
|
-
|
|
674
|
+
).reduce((o, v) => {
|
|
675
|
+
const k = new Date(ht(v._id)), C = v.supplier._id;
|
|
676
|
+
for (const g of v.items) {
|
|
677
|
+
if (!g.totalCost) continue;
|
|
678
|
+
const x = o[g.sku._id] ?? {}, D = x[C] ?? [];
|
|
679
|
+
D.push({
|
|
679
680
|
date: k.toISOString(),
|
|
680
|
-
totalUnit:
|
|
681
|
-
totalCost:
|
|
682
|
-
unit:
|
|
683
|
-
measurement:
|
|
681
|
+
totalUnit: g.quantity,
|
|
682
|
+
totalCost: g.totalCost,
|
|
683
|
+
unit: g.sku.unit,
|
|
684
|
+
measurement: g.measurement,
|
|
684
685
|
seqNumber: v.seqNumber
|
|
685
|
-
}), x[
|
|
686
|
+
}), x[C] = D, o[g.sku._id] = x;
|
|
686
687
|
}
|
|
687
|
-
return
|
|
688
|
+
return o;
|
|
688
689
|
}, {});
|
|
689
690
|
t.value = a;
|
|
690
691
|
} catch {
|
|
@@ -701,7 +702,7 @@ function Ts() {
|
|
|
701
702
|
comparePriceBySku: t
|
|
702
703
|
};
|
|
703
704
|
}
|
|
704
|
-
const
|
|
705
|
+
const Is = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Rs = { key: 0 }, Vs = ["colspan"], As = /* @__PURE__ */ pe({
|
|
705
706
|
__name: "TransferItemTable",
|
|
706
707
|
props: {
|
|
707
708
|
row: {},
|
|
@@ -714,27 +715,27 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
714
715
|
}
|
|
715
716
|
return (n, i) => {
|
|
716
717
|
var b, t;
|
|
717
|
-
return S(),
|
|
718
|
-
|
|
719
|
-
class:
|
|
718
|
+
return S(), q(ke, null, [
|
|
719
|
+
l("tr", {
|
|
720
|
+
class: J(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
|
|
720
721
|
"bg-fm-color-neutral-gray-100": n.row.getIsSelected()
|
|
721
722
|
}])
|
|
722
723
|
}, [
|
|
723
|
-
(S(!0),
|
|
724
|
-
var
|
|
725
|
-
return S(),
|
|
724
|
+
(S(!0), q(ke, null, Me(n.row.getVisibleCells(), (f) => {
|
|
725
|
+
var _, w, u, a;
|
|
726
|
+
return S(), q("td", {
|
|
726
727
|
key: f.id,
|
|
727
|
-
class:
|
|
728
|
+
class: J([
|
|
728
729
|
"h-[52px] px-16 text-fm-color-typo-primary",
|
|
729
|
-
((
|
|
730
|
+
((_ = y(f)) == null ? void 0 : _.cellClass) ?? "px-16"
|
|
730
731
|
]),
|
|
731
|
-
style:
|
|
732
|
+
style: lt({
|
|
732
733
|
width: (w = y(f)) == null ? void 0 : w.width,
|
|
733
734
|
maxWidth: (u = y(f)) == null ? void 0 : u.maxWidth,
|
|
734
735
|
textAlign: ((a = y(f)) == null ? void 0 : a.textAlign) ?? "left"
|
|
735
736
|
})
|
|
736
737
|
}, [
|
|
737
|
-
|
|
738
|
+
l("span", Is, [
|
|
738
739
|
d(e(ie), {
|
|
739
740
|
render: f.column.columnDef.cell,
|
|
740
741
|
props: f.getContext()
|
|
@@ -743,11 +744,11 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
743
744
|
], 6);
|
|
744
745
|
}), 128))
|
|
745
746
|
], 2),
|
|
746
|
-
n.showComparePrice && Object.keys(n.comparePriceBySku[(b = n.row.original.sku) == null ? void 0 : b._id] ?? {}).length > 0 ? (S(),
|
|
747
|
-
|
|
747
|
+
n.showComparePrice && Object.keys(n.comparePriceBySku[(b = n.row.original.sku) == null ? void 0 : b._id] ?? {}).length > 0 ? (S(), q("tr", Rs, [
|
|
748
|
+
l("td", {
|
|
748
749
|
colspan: n.row.getVisibleCells().length
|
|
749
750
|
}, [
|
|
750
|
-
d(
|
|
751
|
+
d(ct, {
|
|
751
752
|
prices: n.comparePriceBySku[(t = n.row.original.sku) == null ? void 0 : t._id]
|
|
752
753
|
}, null, 8, ["prices"])
|
|
753
754
|
], 8, Vs)
|
|
@@ -755,13 +756,13 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
755
756
|
], 64);
|
|
756
757
|
};
|
|
757
758
|
}
|
|
758
|
-
}),
|
|
759
|
+
}), Es = {
|
|
759
760
|
key: 0,
|
|
760
761
|
class: "flex flex-col gap-8"
|
|
761
|
-
}, qs = { class: "flex flex-col gap-4" },
|
|
762
|
+
}, qs = { class: "flex flex-col gap-4" }, Us = { class: "flex items-center gap-4" }, Ms = {
|
|
762
763
|
key: 0,
|
|
763
764
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
764
|
-
},
|
|
765
|
+
}, Os = /* @__PURE__ */ pe({
|
|
765
766
|
__name: "NetSuiteField",
|
|
766
767
|
props: {
|
|
767
768
|
required: { type: Boolean },
|
|
@@ -773,9 +774,9 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
773
774
|
},
|
|
774
775
|
emits: ["netsuite:ready"],
|
|
775
776
|
setup(m, { emit: y }) {
|
|
776
|
-
const n =
|
|
777
|
-
|
|
778
|
-
var
|
|
777
|
+
const n = ze(), i = m, b = y, { t } = Zt(), f = N(!1), _ = N();
|
|
778
|
+
Ne(() => {
|
|
779
|
+
var o, v, k, C;
|
|
779
780
|
let a = {
|
|
780
781
|
id: "",
|
|
781
782
|
subsidiary: { id: "", name: "" },
|
|
@@ -786,77 +787,77 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
786
787
|
return;
|
|
787
788
|
}
|
|
788
789
|
try {
|
|
789
|
-
const
|
|
790
|
+
const g = n.currentLocationSubsidiary();
|
|
790
791
|
i.setting ? a = {
|
|
791
792
|
...i.setting,
|
|
792
793
|
subsidiary: {
|
|
793
|
-
id:
|
|
794
|
-
name:
|
|
794
|
+
id: g.id || "",
|
|
795
|
+
name: g.name
|
|
795
796
|
}
|
|
796
797
|
} : a = {
|
|
797
798
|
...a,
|
|
798
799
|
subsidiary: {
|
|
799
|
-
id:
|
|
800
|
-
name:
|
|
800
|
+
id: g.id || "",
|
|
801
|
+
name: g.name
|
|
801
802
|
}
|
|
802
803
|
};
|
|
803
|
-
const x = n.getAvailableItems(
|
|
804
|
-
if (
|
|
804
|
+
const x = n.getAvailableItems(g.id), D = i.items.filter((R) => {
|
|
805
|
+
if (R.measurement != null) {
|
|
805
806
|
const z = n.getAvailableMeasurements(
|
|
806
|
-
|
|
807
|
-
|
|
807
|
+
R.sku._id,
|
|
808
|
+
g.id
|
|
808
809
|
);
|
|
809
|
-
return x.includes(
|
|
810
|
+
return x.includes(R.sku._id) && z.includes(R.measurement.id);
|
|
810
811
|
}
|
|
811
|
-
return x.includes(
|
|
812
|
-
}).map((
|
|
812
|
+
return x.includes(R.sku._id);
|
|
813
|
+
}).map((R) => R.sku._id);
|
|
813
814
|
i.onChange(
|
|
814
|
-
i.items.filter((
|
|
815
|
+
i.items.filter((R) => D.includes(R.sku._id)),
|
|
815
816
|
a
|
|
816
817
|
);
|
|
817
818
|
} finally {
|
|
818
|
-
i.supplier.internal ?
|
|
819
|
+
i.supplier.internal ? _.value = n.getNetSuiteLocation(
|
|
819
820
|
`${i.supplier.internal}_${i.supplier._id}`
|
|
820
|
-
) :
|
|
821
|
-
const
|
|
822
|
-
!n.isEnabled ||
|
|
821
|
+
) : _.value = n.getNetSuiteVendor(i.supplier._id);
|
|
822
|
+
const g = i.supplier.internal ? n.getLocationSubsidiary((o = _.value) == null ? void 0 : o.netSuiteId).id : (v = _.value) == null ? void 0 : v.subsidiaryId, x = i.supplier.internal ? (k = n.currentLocationSubsidiary()) == null ? void 0 : k.id : (C = n.currentVendorSubsidiary(i.supplier._id)) == null ? void 0 : C.id;
|
|
823
|
+
!n.isEnabled || g && n.isEnabled && g == x ? b("netsuite:ready", a) : f.value = !0;
|
|
823
824
|
}
|
|
824
825
|
});
|
|
825
|
-
const w =
|
|
826
|
+
const w = E(
|
|
826
827
|
() => i.supplier.internal ? n.currentLocationSubsidiary() : n.currentVendorSubsidiary(i.supplier._id)
|
|
827
|
-
), u =
|
|
828
|
-
var a,
|
|
829
|
-
return
|
|
830
|
-
location is ${(
|
|
828
|
+
), u = E(() => {
|
|
829
|
+
var a, o;
|
|
830
|
+
return _.value == null ? `Cannot find the NetSuite location for "${i.supplier.name}"` : `The subsidiary of the request
|
|
831
|
+
location is ${(o = n.getLocationSubsidiary((a = _.value) == null ? void 0 : a.netSuiteId)) == null ? void 0 : o.fullName}`;
|
|
831
832
|
});
|
|
832
|
-
return (a,
|
|
833
|
-
const v = P("FmLabel"), k = P("FmIcon"),
|
|
834
|
-
return e(n).isEnabled && i.required ? (S(),
|
|
833
|
+
return (a, o) => {
|
|
834
|
+
const v = P("FmLabel"), k = P("FmIcon"), C = P("FmField"), g = P("FmTooltip");
|
|
835
|
+
return e(n).isEnabled && i.required ? (S(), q("div", Es, [
|
|
835
836
|
d(v, {
|
|
836
837
|
label: `NetSuite ${e(t)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
837
838
|
}, null, 8, ["label"]),
|
|
838
|
-
|
|
839
|
-
d(
|
|
839
|
+
l("div", qs, [
|
|
840
|
+
d(g, {
|
|
840
841
|
"z-index": 51,
|
|
841
842
|
placement: "left",
|
|
842
843
|
disabled: a.disabled
|
|
843
844
|
}, {
|
|
844
|
-
content:
|
|
845
|
-
|
|
845
|
+
content: F(() => o[0] || (o[0] = [
|
|
846
|
+
Oe("This field is locked and based on the location of the request.")
|
|
846
847
|
])),
|
|
847
|
-
default:
|
|
848
|
-
d(
|
|
849
|
-
default:
|
|
848
|
+
default: F(() => [
|
|
849
|
+
d(C, null, {
|
|
850
|
+
default: F(() => {
|
|
850
851
|
var x;
|
|
851
852
|
return [
|
|
852
|
-
|
|
853
|
+
l("div", Us, [
|
|
853
854
|
d(k, {
|
|
854
855
|
name: "lock_outline",
|
|
855
856
|
size: "sm",
|
|
856
857
|
color: a.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
857
858
|
}, null, 8, ["color"]),
|
|
858
|
-
|
|
859
|
-
class:
|
|
859
|
+
l("div", {
|
|
860
|
+
class: J([a.disabled ? "text-fm-color-typo-disabled" : ""])
|
|
860
861
|
}, U((x = w.value) == null ? void 0 : x.fullName), 3)
|
|
861
862
|
])
|
|
862
863
|
];
|
|
@@ -866,21 +867,21 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
866
867
|
]),
|
|
867
868
|
_: 1
|
|
868
869
|
}, 8, ["disabled"]),
|
|
869
|
-
f.value ? (S(),
|
|
870
|
+
f.value ? (S(), q("div", Ms, U(u.value), 1)) : G("", !0)
|
|
870
871
|
])
|
|
871
872
|
])) : G("", !0);
|
|
872
873
|
};
|
|
873
874
|
}
|
|
874
|
-
}),
|
|
875
|
+
}), Bs = { class: "flex flex-col gap-4" }, Ns = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, zs = { class: "flex flex-col gap-16" }, Ls = { class: "flex flex-col gap-24" }, Hs = { class: "flex flex-col gap-8" }, js = { class: "flex flex-col gap-4" }, Ys = { class: "flex items-center gap-4" }, Qs = { class: "flex flex-col gap-8" }, Ks = { class: "flex flex-col gap-4" }, Zs = { class: "flex items-center gap-4" }, Gs = {
|
|
875
876
|
key: 3,
|
|
876
877
|
class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
|
|
877
|
-
},
|
|
878
|
+
}, Ws = {
|
|
878
879
|
key: 0,
|
|
879
880
|
class: "flex-1 flex gap-8 h-48 xs:flex-col xs:pt-16 sm:flex-col sm:pt-16"
|
|
880
|
-
}, Js = { class: "flex-1" },
|
|
881
|
+
}, Js = { class: "flex-1" }, Xs = { class: "flex-1" }, ea = {
|
|
881
882
|
key: 1,
|
|
882
883
|
class: "flex items-center gap-4"
|
|
883
|
-
},
|
|
884
|
+
}, ta = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, sa = { class: "flex flex-col gap-16" }, aa = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, oa = { class: "flex gap-8" }, la = { key: 0 }, na = /* @__PURE__ */ pe({
|
|
884
885
|
__name: "TransferForm2",
|
|
885
886
|
props: {
|
|
886
887
|
modelValue: {},
|
|
@@ -892,100 +893,100 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
892
893
|
},
|
|
893
894
|
emits: ["validation-success", "form:ready"],
|
|
894
895
|
setup(m, { expose: y, emit: n }) {
|
|
895
|
-
const i = m, b = n, t =
|
|
896
|
+
const i = m, b = n, t = xt(), { t: f } = Ce(), _ = Ye(), w = je(), u = ze(), a = Ke(), o = Ee(), v = dt(), { breakpoints: k } = Qe(), C = E(() => k.value.xs || k.value.sm), g = ot({
|
|
896
897
|
value: !1
|
|
897
|
-
}), x = N(!1),
|
|
898
|
+
}), x = N(!1), D = E(
|
|
898
899
|
() => {
|
|
899
900
|
var s;
|
|
900
901
|
return ((s = i.modelValue) == null ? void 0 : s.templateDoc) ?? v.templates.find((r) => r._id === t.template);
|
|
901
902
|
}
|
|
902
|
-
),
|
|
903
|
-
|
|
904
|
-
s &&
|
|
905
|
-
}),
|
|
903
|
+
), R = E(() => t.status === "DRAFT" || !t._rev);
|
|
904
|
+
ge(D, (s) => {
|
|
905
|
+
s && R.value && (t.supplier = (s == null ? void 0 : s.purchaseOrder.supplier) ?? t.supplier);
|
|
906
|
+
}), Ne(() => {
|
|
906
907
|
var s;
|
|
907
908
|
try {
|
|
908
909
|
if (!t.template) return;
|
|
909
910
|
if (!t.items.length) {
|
|
910
911
|
let r = [];
|
|
911
|
-
(s =
|
|
912
|
+
(s = D.value) != null && s.purchaseOrder.items && (r = D.value.purchaseOrder.items.filter((M) => {
|
|
912
913
|
var Z;
|
|
913
|
-
return ((Z =
|
|
914
|
+
return ((Z = M.quantity) == null ? void 0 : Z.amount) != 0;
|
|
914
915
|
})), t.items = r;
|
|
915
916
|
}
|
|
916
917
|
} finally {
|
|
917
918
|
x.value = !0;
|
|
918
919
|
}
|
|
919
|
-
}),
|
|
920
|
+
}), ge([x, g], ([s, r], [M, Z]) => {
|
|
920
921
|
r.value && Z.value && b("form:ready");
|
|
921
922
|
});
|
|
922
|
-
const z =
|
|
923
|
-
() =>
|
|
923
|
+
const z = E(
|
|
924
|
+
() => _.currentLocation.type === St.restaurant
|
|
924
925
|
);
|
|
925
|
-
|
|
926
|
+
_.watchLocation(async () => {
|
|
926
927
|
location && (t.supplier || (t.supplier = a.suppliers.find((s) => s) ?? t.supplier));
|
|
927
928
|
});
|
|
928
|
-
const ue =
|
|
929
|
+
const ue = Nt(), T = Yt(
|
|
929
930
|
() => t,
|
|
930
931
|
(s) => {
|
|
931
932
|
Object.assign(t, s);
|
|
932
933
|
},
|
|
933
934
|
!0,
|
|
934
935
|
!0
|
|
935
|
-
), $ =
|
|
936
|
+
), $ = E({
|
|
936
937
|
get() {
|
|
937
938
|
var s;
|
|
938
939
|
return typeof ((s = t == null ? void 0 : t.supplier) == null ? void 0 : s.internal) == "string" ? j.TRANSFER : j.PURCHASE;
|
|
939
940
|
},
|
|
940
941
|
set(s) {
|
|
941
|
-
var
|
|
942
|
-
const r = typeof ((
|
|
942
|
+
var M;
|
|
943
|
+
const r = typeof ((M = t == null ? void 0 : t.supplier) == null ? void 0 : M.internal) == "string" ? j.TRANSFER : j.PURCHASE;
|
|
943
944
|
s !== r && (t.supplier = s === j.PURCHASE ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
|
|
944
945
|
}
|
|
945
946
|
});
|
|
946
|
-
|
|
947
|
+
ge(
|
|
947
948
|
() => {
|
|
948
949
|
var s;
|
|
949
950
|
return (s = i.modelValue) == null ? void 0 : s.template;
|
|
950
951
|
},
|
|
951
952
|
(s) => {
|
|
952
|
-
|
|
953
|
-
var r,
|
|
954
|
-
t.supplier = ((
|
|
953
|
+
o.mustUsePoTemplate && !s && mt(() => {
|
|
954
|
+
var r, M;
|
|
955
|
+
t.supplier = ((M = (r = T.locationOptionsTypeTransfer.value) == null ? void 0 : r.filter(
|
|
955
956
|
(Z) => Z.internal === "restaurant"
|
|
956
|
-
)) == null ? void 0 :
|
|
957
|
+
)) == null ? void 0 : M[0]) ?? t.supplier;
|
|
957
958
|
});
|
|
958
959
|
},
|
|
959
960
|
{ immediate: !0 }
|
|
960
961
|
);
|
|
961
|
-
const O =
|
|
962
|
+
const O = E(() => {
|
|
962
963
|
let s = T.transferLocationOptions.value;
|
|
963
|
-
return
|
|
964
|
-
var
|
|
965
|
-
return (
|
|
964
|
+
return o.mustUsePoTemplate && !t.template && (s = s.filter((r) => {
|
|
965
|
+
var M;
|
|
966
|
+
return (M = r.sublabel) == null ? void 0 : M.startsWith("restaurant");
|
|
966
967
|
})), s;
|
|
967
|
-
}),
|
|
968
|
+
}), V = E({
|
|
968
969
|
get() {
|
|
969
970
|
return t.supplier._id;
|
|
970
971
|
},
|
|
971
972
|
set(s) {
|
|
972
973
|
T.transferLocationModel.value = s;
|
|
973
974
|
}
|
|
974
|
-
}), I =
|
|
975
|
+
}), I = E({
|
|
975
976
|
get() {
|
|
976
977
|
return t.remark ?? void 0;
|
|
977
978
|
},
|
|
978
979
|
set(s) {
|
|
979
980
|
t.remark = s;
|
|
980
981
|
}
|
|
981
|
-
}), { backdatePo: B, backdateSwitch:
|
|
982
|
+
}), { backdatePo: B, backdateSwitch: Q, backdateModel: K, backdateTimeModel: p } = fs({
|
|
982
983
|
getEffectiveAt() {
|
|
983
984
|
return t.effectiveAt;
|
|
984
985
|
},
|
|
985
986
|
setEffectiveAt(s) {
|
|
986
987
|
t.effectiveAt = s;
|
|
987
988
|
}
|
|
988
|
-
}), { comparePricesToggle: c, comparePriceFetching: H, comparePriceBySku: oe } =
|
|
989
|
+
}), { comparePricesToggle: c, comparePriceFetching: H, comparePriceBySku: oe } = Ps(), X = N();
|
|
989
990
|
y({
|
|
990
991
|
validateInputs: () => {
|
|
991
992
|
var s, r;
|
|
@@ -1000,7 +1001,7 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1000
1001
|
(r = (s = X.value) == null ? void 0 : s.resetInputs) == null || r.call(s);
|
|
1001
1002
|
}
|
|
1002
1003
|
});
|
|
1003
|
-
const $e =
|
|
1004
|
+
const $e = Gt({
|
|
1004
1005
|
updateItem: (s) => {
|
|
1005
1006
|
t.items = t.items.map((r) => r.sku._id !== s.sku._id ? r : s);
|
|
1006
1007
|
},
|
|
@@ -1017,20 +1018,20 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1017
1018
|
return $.value;
|
|
1018
1019
|
},
|
|
1019
1020
|
get template() {
|
|
1020
|
-
return
|
|
1021
|
+
return D.value;
|
|
1021
1022
|
},
|
|
1022
1023
|
get disabled() {
|
|
1023
1024
|
return i.disabled;
|
|
1024
1025
|
}
|
|
1025
|
-
}),
|
|
1026
|
+
}), he = E(() => {
|
|
1026
1027
|
let s = $e.columnDefs.value;
|
|
1027
1028
|
return u.isEnabled && $.value === j.TRANSFER && (s = s.filter((r) => r.id !== Y.TotalCost)), s;
|
|
1028
1029
|
});
|
|
1029
1030
|
function Te() {
|
|
1030
1031
|
var ae, fe, xe, Ie, we;
|
|
1031
|
-
const s = new Set((xe = (fe = (ae =
|
|
1032
|
+
const s = new Set((xe = (fe = (ae = D.value) == null ? void 0 : ae.purchaseOrder) == null ? void 0 : fe.items) == null ? void 0 : xe.map((A) => A.sku._id)), r = u.isEnabled ? u.getAvailableItems((we = (Ie = t.netSuite) == null ? void 0 : Ie.subsidiary) == null ? void 0 : we.id) : [], M = s.size ? w.skus.filter((A) => s.has(A._id)) : w.skus, Z = u.isEnabled ? M.filter((A) => {
|
|
1032
1033
|
var le, te, ce, ne;
|
|
1033
|
-
const ee = (te = (le =
|
|
1034
|
+
const ee = (te = (le = D.value) == null ? void 0 : le.purchaseOrder) == null ? void 0 : te.items.find(
|
|
1034
1035
|
(me) => me.sku._id === A._id
|
|
1035
1036
|
);
|
|
1036
1037
|
if (ee != null && ee.measurement != null) {
|
|
@@ -1041,7 +1042,7 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1041
1042
|
return r.includes(ee.sku._id) && me.includes(ee.measurement.id);
|
|
1042
1043
|
}
|
|
1043
1044
|
return r.includes(A._id);
|
|
1044
|
-
}).map((A) => A._id) :
|
|
1045
|
+
}).map((A) => A._id) : M.map((A) => A._id), de = M.map(
|
|
1045
1046
|
(A) => ({
|
|
1046
1047
|
label: A.name,
|
|
1047
1048
|
sublabel: A.code,
|
|
@@ -1055,7 +1056,7 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1055
1056
|
ue.open({
|
|
1056
1057
|
title: f("inventory.transfer.form.items.selectItem"),
|
|
1057
1058
|
closeButton: !0,
|
|
1058
|
-
contentComponent:
|
|
1059
|
+
contentComponent: $t,
|
|
1059
1060
|
contentComponentProps: {
|
|
1060
1061
|
modelValue: be,
|
|
1061
1062
|
items: de,
|
|
@@ -1072,12 +1073,12 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1072
1073
|
}
|
|
1073
1074
|
}).onPrimary((A) => {
|
|
1074
1075
|
const ee = t.items ?? [], le = A.map((te) => {
|
|
1075
|
-
var me,
|
|
1076
|
-
const ce = ee.find((
|
|
1076
|
+
var me, De;
|
|
1077
|
+
const ce = ee.find((_e) => _e.sku._id === te._id);
|
|
1077
1078
|
if (ce)
|
|
1078
1079
|
return ce;
|
|
1079
|
-
const ne = ((
|
|
1080
|
-
(
|
|
1080
|
+
const ne = ((De = (me = D.value) == null ? void 0 : me.purchaseOrder.items) == null ? void 0 : De.find(
|
|
1081
|
+
(_e) => _e.sku._id === te._id
|
|
1081
1082
|
)) ?? {
|
|
1082
1083
|
sku: te,
|
|
1083
1084
|
code: te.code,
|
|
@@ -1099,12 +1100,12 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1099
1100
|
le.sort((te, ce) => te.sku.code.localeCompare(ce.sku.code)), t.items = le;
|
|
1100
1101
|
});
|
|
1101
1102
|
}
|
|
1102
|
-
function
|
|
1103
|
+
function qe(s) {
|
|
1103
1104
|
return s;
|
|
1104
1105
|
}
|
|
1105
|
-
const Pe =
|
|
1106
|
+
const Pe = E(() => {
|
|
1106
1107
|
const s = [];
|
|
1107
|
-
return (!
|
|
1108
|
+
return (!o.mustUsePoTemplate || o.mustUsePoTemplate && t.template) && s.push({
|
|
1108
1109
|
label: f("inventory.transfer.form.type.purchase"),
|
|
1109
1110
|
value: j.PURCHASE
|
|
1110
1111
|
}), s.push({
|
|
@@ -1113,25 +1114,25 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1113
1114
|
}), s;
|
|
1114
1115
|
});
|
|
1115
1116
|
return (s, r) => {
|
|
1116
|
-
var me,
|
|
1117
|
-
const
|
|
1118
|
-
return S(),
|
|
1119
|
-
|
|
1120
|
-
(me = i.modelValue) != null && me.template ? (S(),
|
|
1117
|
+
var me, De;
|
|
1118
|
+
const M = P("FmChip"), Z = P("FmLabel"), de = P("FmIcon"), be = P("FmField"), ae = P("FmTooltip"), fe = P("FmSelect"), xe = P("FmTextField"), Ie = P("FmTextarea"), we = P("FmSwitch"), A = P("FmDatePicker"), ee = P("FmTimePicker"), le = P("FmFormGroup"), te = P("FmButton"), ce = P("FmTable"), ne = P("FmForm");
|
|
1119
|
+
return S(), q("div", Bs, [
|
|
1120
|
+
l("div", Ns, [
|
|
1121
|
+
(me = i.modelValue) != null && me.template ? (S(), W(M, {
|
|
1121
1122
|
key: 0,
|
|
1122
1123
|
variant: s.disabled ? "warning" : void 0,
|
|
1123
|
-
label: `${e(f)("inventory.transfer.template.title")}: ${((
|
|
1124
|
+
label: `${e(f)("inventory.transfer.template.title")}: ${((De = D.value) == null ? void 0 : De.name) ?? e(f)("inventory.transfer.form.loading")}`,
|
|
1124
1125
|
icon: "summarize",
|
|
1125
1126
|
compact: ""
|
|
1126
1127
|
}, null, 8, ["variant", "label"])) : G("", !0),
|
|
1127
|
-
d(
|
|
1128
|
-
label: e(
|
|
1128
|
+
d(M, {
|
|
1129
|
+
label: e(_).currentLocation.name,
|
|
1129
1130
|
icon: "storefront",
|
|
1130
1131
|
compact: ""
|
|
1131
1132
|
}, null, 8, ["label"]),
|
|
1132
|
-
s.lastClosingDate ? (S(),
|
|
1133
|
+
s.lastClosingDate ? (S(), W(M, {
|
|
1133
1134
|
key: 1,
|
|
1134
|
-
label: `${e(f)("inventory.transfer.form.lastClosing")}: ${e(
|
|
1135
|
+
label: `${e(f)("inventory.transfer.form.lastClosing")}: ${e(He)(s.lastClosingDate)} ${e(wt)(s.lastClosingDate)}`,
|
|
1135
1136
|
icon: "calendar_month",
|
|
1136
1137
|
compact: ""
|
|
1137
1138
|
}, null, 8, ["label"])) : G("", !0)
|
|
@@ -1142,38 +1143,38 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1142
1143
|
class: "flex flex-col gap-32",
|
|
1143
1144
|
disabled: s.disabled,
|
|
1144
1145
|
onValidationFailed: console.log,
|
|
1145
|
-
onValidationSuccess: r[13] || (r[13] = (
|
|
1146
|
+
onValidationSuccess: r[13] || (r[13] = (_e) => b("validation-success"))
|
|
1146
1147
|
}, {
|
|
1147
|
-
default:
|
|
1148
|
-
var
|
|
1148
|
+
default: F(() => {
|
|
1149
|
+
var _e, Ze;
|
|
1149
1150
|
return [
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
(
|
|
1153
|
-
|
|
1151
|
+
l("div", zs, [
|
|
1152
|
+
l("div", Ls, [
|
|
1153
|
+
(_e = i.modelValue) != null && _e.template ? (S(), q(ke, { key: 0 }, [
|
|
1154
|
+
l("div", Hs, [
|
|
1154
1155
|
d(Z, {
|
|
1155
1156
|
label: e(f)("inventory.transfer.form.type.title")
|
|
1156
1157
|
}, null, 8, ["label"]),
|
|
1157
|
-
|
|
1158
|
+
l("div", js, [
|
|
1158
1159
|
d(ae, {
|
|
1159
1160
|
"z-index": 51,
|
|
1160
1161
|
placement: "left",
|
|
1161
1162
|
disabled: s.disabled
|
|
1162
1163
|
}, {
|
|
1163
|
-
content:
|
|
1164
|
-
|
|
1164
|
+
content: F(() => r[14] || (r[14] = [
|
|
1165
|
+
Oe("This field is locked from template.")
|
|
1165
1166
|
])),
|
|
1166
|
-
default:
|
|
1167
|
+
default: F(() => [
|
|
1167
1168
|
d(be, null, {
|
|
1168
|
-
default:
|
|
1169
|
-
|
|
1169
|
+
default: F(() => [
|
|
1170
|
+
l("div", Ys, [
|
|
1170
1171
|
d(de, {
|
|
1171
1172
|
name: "lock_outline",
|
|
1172
1173
|
size: "sm",
|
|
1173
1174
|
color: s.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1174
1175
|
}, null, 8, ["color"]),
|
|
1175
|
-
|
|
1176
|
-
class:
|
|
1176
|
+
l("div", {
|
|
1177
|
+
class: J({ "text-fm-color-typo-disabled": s.disabled })
|
|
1177
1178
|
}, U(e(f)(`inventory.transfer.form.type.${$.value.toLocaleLowerCase("en-us")}`)), 3)
|
|
1178
1179
|
])
|
|
1179
1180
|
]),
|
|
@@ -1182,41 +1183,41 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1182
1183
|
]),
|
|
1183
1184
|
_: 1
|
|
1184
1185
|
}, 8, ["disabled"]),
|
|
1185
|
-
|
|
1186
|
-
class:
|
|
1186
|
+
l("div", {
|
|
1187
|
+
class: J([
|
|
1187
1188
|
"fm-typo-en-body-sm-400",
|
|
1188
1189
|
s.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"
|
|
1189
1190
|
])
|
|
1190
1191
|
}, null, 2)
|
|
1191
1192
|
])
|
|
1192
1193
|
]),
|
|
1193
|
-
|
|
1194
|
+
l("div", Qs, [
|
|
1194
1195
|
d(Z, {
|
|
1195
1196
|
label: $.value === e(j).PURCHASE ? e(f)("inventory.transfer.form.purchaseFrom") : e(f)("inventory.transfer.form.transferFrom")
|
|
1196
1197
|
}, null, 8, ["label"]),
|
|
1197
|
-
|
|
1198
|
+
l("div", Ks, [
|
|
1198
1199
|
d(ae, {
|
|
1199
1200
|
"z-index": 51,
|
|
1200
1201
|
placement: "left",
|
|
1201
1202
|
disabled: s.disabled
|
|
1202
1203
|
}, {
|
|
1203
|
-
content:
|
|
1204
|
-
|
|
1204
|
+
content: F(() => r[15] || (r[15] = [
|
|
1205
|
+
Oe("This field is locked from template.")
|
|
1205
1206
|
])),
|
|
1206
|
-
default:
|
|
1207
|
+
default: F(() => [
|
|
1207
1208
|
d(be, null, {
|
|
1208
|
-
default:
|
|
1209
|
-
var
|
|
1209
|
+
default: F(() => {
|
|
1210
|
+
var h;
|
|
1210
1211
|
return [
|
|
1211
|
-
|
|
1212
|
+
l("div", Zs, [
|
|
1212
1213
|
d(de, {
|
|
1213
1214
|
name: "lock_outline",
|
|
1214
1215
|
size: "sm",
|
|
1215
1216
|
color: s.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1216
1217
|
}, null, 8, ["color"]),
|
|
1217
|
-
|
|
1218
|
-
class:
|
|
1219
|
-
}, U((
|
|
1218
|
+
l("div", {
|
|
1219
|
+
class: J({ "text-fm-color-typo-disabled": s.disabled })
|
|
1220
|
+
}, U((h = O.value.find((se) => se.value === V.value)) == null ? void 0 : h.label), 3)
|
|
1220
1221
|
])
|
|
1221
1222
|
];
|
|
1222
1223
|
}),
|
|
@@ -1227,50 +1228,50 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1227
1228
|
}, 8, ["disabled"])
|
|
1228
1229
|
])
|
|
1229
1230
|
])
|
|
1230
|
-
], 64)) : (S(),
|
|
1231
|
+
], 64)) : (S(), q(ke, { key: 1 }, [
|
|
1231
1232
|
d(fe, {
|
|
1232
1233
|
label: e(f)("inventory.transfer.form.type.title"),
|
|
1233
1234
|
"label-mark": "required",
|
|
1234
1235
|
modelValue: $.value,
|
|
1235
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
1236
|
+
"onUpdate:modelValue": r[0] || (r[0] = (h) => $.value = h),
|
|
1236
1237
|
items: Pe.value,
|
|
1237
|
-
rules: [e(
|
|
1238
|
+
rules: [e(Ve)(1)(O.value)]
|
|
1238
1239
|
}, {
|
|
1239
|
-
default:
|
|
1240
|
-
|
|
1241
|
-
class:
|
|
1240
|
+
default: F(() => [
|
|
1241
|
+
l("span", {
|
|
1242
|
+
class: J([
|
|
1242
1243
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1243
1244
|
s.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1244
1245
|
])
|
|
1245
|
-
}, U(e(
|
|
1246
|
+
}, U(e(Dt)($.value)), 3)
|
|
1246
1247
|
]),
|
|
1247
1248
|
_: 1
|
|
1248
1249
|
}, 8, ["label", "modelValue", "items", "rules"]),
|
|
1249
1250
|
d(fe, {
|
|
1250
1251
|
label: $.value === e(j).PURCHASE ? e(f)("inventory.transfer.form.purchaseFrom") : e(f)("inventory.transfer.form.transferFrom"),
|
|
1251
1252
|
"label-mark": "required",
|
|
1252
|
-
modelValue:
|
|
1253
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
1253
|
+
modelValue: V.value,
|
|
1254
|
+
"onUpdate:modelValue": r[1] || (r[1] = (h) => V.value = h),
|
|
1254
1255
|
items: O.value
|
|
1255
1256
|
}, {
|
|
1256
|
-
"menu-wrapper":
|
|
1257
|
-
var se,
|
|
1257
|
+
"menu-wrapper": F((h) => {
|
|
1258
|
+
var se, Ge;
|
|
1258
1259
|
return [
|
|
1259
|
-
d(
|
|
1260
|
+
d(Qt, Be(h, {
|
|
1260
1261
|
items: O.value,
|
|
1261
|
-
"model-value": (
|
|
1262
|
+
"model-value": (Ge = (se = s.modelValue) == null ? void 0 : se.supplier) == null ? void 0 : Ge._id
|
|
1262
1263
|
}), null, 16, ["items", "model-value"])
|
|
1263
1264
|
];
|
|
1264
1265
|
}),
|
|
1265
|
-
default:
|
|
1266
|
-
var
|
|
1266
|
+
default: F(() => {
|
|
1267
|
+
var h;
|
|
1267
1268
|
return [
|
|
1268
|
-
|
|
1269
|
-
class:
|
|
1269
|
+
l("span", {
|
|
1270
|
+
class: J([
|
|
1270
1271
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1271
1272
|
s.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1272
1273
|
])
|
|
1273
|
-
}, U((
|
|
1274
|
+
}, U((h = O.value.find((se) => se.value === V.value)) == null ? void 0 : h.label), 3)
|
|
1274
1275
|
];
|
|
1275
1276
|
}),
|
|
1276
1277
|
_: 1
|
|
@@ -1280,98 +1281,98 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1280
1281
|
label: e(f)("inventory.transfer.form.reference"),
|
|
1281
1282
|
"label-mark": "optional",
|
|
1282
1283
|
modelValue: e(t).ref,
|
|
1283
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
1284
|
+
"onUpdate:modelValue": r[2] || (r[2] = (h) => e(t).ref = h)
|
|
1284
1285
|
}, null, 8, ["label", "modelValue"]),
|
|
1285
1286
|
d(Ie, {
|
|
1286
1287
|
label: e(f)("inventory.transfer.form.remark"),
|
|
1287
1288
|
"label-mark": "optional",
|
|
1288
1289
|
"max-length": 240,
|
|
1289
1290
|
modelValue: I.value,
|
|
1290
|
-
"onUpdate:modelValue": r[3] || (r[3] = (
|
|
1291
|
-
class:
|
|
1291
|
+
"onUpdate:modelValue": r[3] || (r[3] = (h) => I.value = h),
|
|
1292
|
+
class: J([s.disabled ? "text-fm-color-typo-disabled " : ""])
|
|
1292
1293
|
}, null, 8, ["label", "modelValue", "class"]),
|
|
1293
|
-
x.value ? (S(),
|
|
1294
|
+
x.value ? (S(), W(Os, {
|
|
1294
1295
|
key: 2,
|
|
1295
1296
|
required: e(t).template != null,
|
|
1296
1297
|
disabled: s.disabled,
|
|
1297
1298
|
supplier: e(t).supplier,
|
|
1298
1299
|
setting: e(t).netSuite,
|
|
1299
1300
|
items: e(t).items,
|
|
1300
|
-
onChange: (
|
|
1301
|
-
e(t).items =
|
|
1301
|
+
onChange: (h, se) => {
|
|
1302
|
+
e(t).items = h, e(t).netSuite = se;
|
|
1302
1303
|
},
|
|
1303
|
-
"onNetsuite:ready": r[4] || (r[4] = (
|
|
1304
|
-
|
|
1304
|
+
"onNetsuite:ready": r[4] || (r[4] = (h) => {
|
|
1305
|
+
g.value = !0;
|
|
1305
1306
|
})
|
|
1306
1307
|
}, null, 8, ["required", "disabled", "supplier", "setting", "items", "onChange"])) : G("", !0),
|
|
1307
|
-
e(
|
|
1308
|
-
|
|
1309
|
-
class:
|
|
1308
|
+
e(o).enableBackdatePo ? (S(), q("div", Gs, [
|
|
1309
|
+
l("div", {
|
|
1310
|
+
class: J([
|
|
1310
1311
|
"flex",
|
|
1311
1312
|
{
|
|
1312
|
-
"flex-col":
|
|
1313
|
+
"flex-col": C.value
|
|
1313
1314
|
}
|
|
1314
1315
|
])
|
|
1315
1316
|
}, [
|
|
1316
1317
|
d(we, {
|
|
1317
|
-
modelValue: e(
|
|
1318
|
-
"onUpdate:modelValue": r[5] || (r[5] = (
|
|
1318
|
+
modelValue: e(Q),
|
|
1319
|
+
"onUpdate:modelValue": r[5] || (r[5] = (h) => Se(Q) ? Q.value = h : null),
|
|
1319
1320
|
label: e(f)("inventory.transfer.form.backdate.title"),
|
|
1320
1321
|
sublabel: e(f)("inventory.transfer.form.backdate.subtitle"),
|
|
1321
1322
|
"label-placement": "right",
|
|
1322
1323
|
disabled: z.value && !s.lastClosingDate || s.disabled
|
|
1323
1324
|
}, null, 8, ["modelValue", "label", "sublabel", "disabled"]),
|
|
1324
|
-
|
|
1325
|
-
class:
|
|
1325
|
+
l("div", {
|
|
1326
|
+
class: J({ hidden: C.value, "w-16": !C.value })
|
|
1326
1327
|
}, null, 2),
|
|
1327
|
-
e(
|
|
1328
|
-
|
|
1328
|
+
e(Q) ? (S(), q("div", Ws, [
|
|
1329
|
+
l("div", Js, [
|
|
1329
1330
|
d(A, {
|
|
1330
|
-
modelValue: e(
|
|
1331
|
-
"onUpdate:modelValue": r[6] || (r[6] = (
|
|
1331
|
+
modelValue: e(K),
|
|
1332
|
+
"onUpdate:modelValue": r[6] || (r[6] = (h) => Se(K) ? K.value = h : null)
|
|
1332
1333
|
}, null, 8, ["modelValue"])
|
|
1333
1334
|
]),
|
|
1334
|
-
|
|
1335
|
+
l("div", Xs, [
|
|
1335
1336
|
d(ee, {
|
|
1336
1337
|
modelValue: e(p),
|
|
1337
|
-
"onUpdate:modelValue": r[7] || (r[7] = (
|
|
1338
|
+
"onUpdate:modelValue": r[7] || (r[7] = (h) => Se(p) ? p.value = h : null)
|
|
1338
1339
|
}, null, 8, ["modelValue"])
|
|
1339
1340
|
])
|
|
1340
1341
|
])) : G("", !0)
|
|
1341
1342
|
], 2),
|
|
1342
|
-
e(B) ? (S(),
|
|
1343
|
+
e(B) ? (S(), W(le, {
|
|
1343
1344
|
key: 0,
|
|
1344
1345
|
modelValue: e(B),
|
|
1345
|
-
"onUpdate:modelValue": r[8] || (r[8] = (
|
|
1346
|
+
"onUpdate:modelValue": r[8] || (r[8] = (h) => Se(B) ? B.value = h : null),
|
|
1346
1347
|
rules: [e(Ft)(new Date(s.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1347
1348
|
}, null, 8, ["modelValue", "rules"])) : G("", !0),
|
|
1348
|
-
z.value && !s.lastClosingDate ? (S(),
|
|
1349
|
+
z.value && !s.lastClosingDate ? (S(), q("div", ea, [
|
|
1349
1350
|
d(de, {
|
|
1350
1351
|
name: "error",
|
|
1351
1352
|
size: "sm",
|
|
1352
1353
|
class: "text-fm-color-typo-warning"
|
|
1353
1354
|
}),
|
|
1354
|
-
|
|
1355
|
+
l("span", ta, U(e(f)("inventory.transfer.form.backdate.error")), 1)
|
|
1355
1356
|
])) : G("", !0)
|
|
1356
1357
|
])) : G("", !0)
|
|
1357
1358
|
])
|
|
1358
1359
|
]),
|
|
1359
|
-
|
|
1360
|
+
l("div", sa, [
|
|
1360
1361
|
d(le, {
|
|
1361
1362
|
"model-value": e(t).items,
|
|
1362
|
-
rules: [e(
|
|
1363
|
+
rules: [e(Ve)(1)]
|
|
1363
1364
|
}, null, 8, ["model-value", "rules"]),
|
|
1364
|
-
|
|
1365
|
-
class:
|
|
1365
|
+
l("div", {
|
|
1366
|
+
class: J([
|
|
1366
1367
|
"flex gap-16",
|
|
1367
1368
|
{
|
|
1368
|
-
"flex-col items-start":
|
|
1369
|
-
"items-center": !
|
|
1369
|
+
"flex-col items-start": C.value,
|
|
1370
|
+
"items-center": !C.value
|
|
1370
1371
|
}
|
|
1371
1372
|
])
|
|
1372
1373
|
}, [
|
|
1373
|
-
|
|
1374
|
-
|
|
1374
|
+
l("div", aa, U(e(f)("inventory.transfer.form.items.title")), 1),
|
|
1375
|
+
l("div", oa, [
|
|
1375
1376
|
d(te, {
|
|
1376
1377
|
disabled: s.disabled,
|
|
1377
1378
|
label: e(f)("inventory.transfer.form.items.addItem"),
|
|
@@ -1380,64 +1381,64 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1380
1381
|
"text-color": "primary",
|
|
1381
1382
|
"bg-color": "transparent",
|
|
1382
1383
|
"border-color": "primary",
|
|
1383
|
-
onClick: r[9] || (r[9] = (
|
|
1384
|
+
onClick: r[9] || (r[9] = (h) => Te()),
|
|
1384
1385
|
size: "md"
|
|
1385
1386
|
}, null, 8, ["disabled", "label"]),
|
|
1386
|
-
e(t).template ? (S(),
|
|
1387
|
+
e(t).template ? (S(), W(ae, {
|
|
1387
1388
|
key: 0,
|
|
1388
1389
|
"z-index": 50
|
|
1389
1390
|
}, {
|
|
1390
|
-
content:
|
|
1391
|
-
|
|
1391
|
+
content: F(() => [
|
|
1392
|
+
l("div", null, U(e(f)("inventory.transfer.form.items.forecastStock.notAvailable")), 1)
|
|
1392
1393
|
]),
|
|
1393
|
-
default:
|
|
1394
|
-
d(
|
|
1395
|
-
"onUpdate:poItems": r[10] || (r[10] = (
|
|
1394
|
+
default: F(() => [
|
|
1395
|
+
d(st, {
|
|
1396
|
+
"onUpdate:poItems": r[10] || (r[10] = (h) => e(t).items = h),
|
|
1396
1397
|
disabled: ""
|
|
1397
1398
|
})
|
|
1398
1399
|
]),
|
|
1399
1400
|
_: 1
|
|
1400
|
-
})) : (S(),
|
|
1401
|
+
})) : (S(), W(st, {
|
|
1401
1402
|
key: 1,
|
|
1402
|
-
"onUpdate:poItems": r[11] || (r[11] = (
|
|
1403
|
+
"onUpdate:poItems": r[11] || (r[11] = (h) => e(t).items = h),
|
|
1403
1404
|
disabled: s.disabled || !!e(t).template
|
|
1404
1405
|
}, null, 8, ["disabled"]))
|
|
1405
1406
|
])
|
|
1406
1407
|
], 2),
|
|
1407
|
-
$.value === e(j).PURCHASE &&
|
|
1408
|
+
$.value === e(j).PURCHASE && R.value && e(o).enableTotalCost && ((Ze = s.modelValue) != null && Ze.items.length) ? (S(), q("div", la, [
|
|
1408
1409
|
d(we, {
|
|
1409
1410
|
label: e(H) ? e(f)("inventory.transfer.form.items.fetchingData") : e(f)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1410
1411
|
"prepend-icon": "compare_arrows",
|
|
1411
1412
|
"label-placement": "right",
|
|
1412
1413
|
"model-value": e(c),
|
|
1413
|
-
"onUpdate:modelValue": r[12] || (r[12] = (
|
|
1414
|
+
"onUpdate:modelValue": r[12] || (r[12] = (h) => Se(c) ? c.value = h : null),
|
|
1414
1415
|
disabled: e(H) || s.disabled
|
|
1415
1416
|
}, null, 8, ["label", "model-value", "disabled"])
|
|
1416
1417
|
])) : G("", !0),
|
|
1417
|
-
(S(),
|
|
1418
|
-
"column-defs":
|
|
1418
|
+
(S(), W(ce, {
|
|
1419
|
+
"column-defs": he.value,
|
|
1419
1420
|
"row-data": e(t).items,
|
|
1420
|
-
key: e(t).items.map((
|
|
1421
|
+
key: e(t).items.map((h) => h.sku._id).join("."),
|
|
1421
1422
|
"hide-footer": "",
|
|
1422
1423
|
"page-size": e(t).items.length
|
|
1423
1424
|
}, {
|
|
1424
|
-
"table-row":
|
|
1425
|
-
d(
|
|
1425
|
+
"table-row": F((h) => [
|
|
1426
|
+
d(As, {
|
|
1426
1427
|
"compare-price-by-sku": e(oe),
|
|
1427
1428
|
"show-compare-price": $.value === e(j).PURCHASE && e(c),
|
|
1428
|
-
row:
|
|
1429
|
+
row: h
|
|
1429
1430
|
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row"])
|
|
1430
1431
|
]),
|
|
1431
|
-
"list-row":
|
|
1432
|
-
(S(),
|
|
1433
|
-
row:
|
|
1432
|
+
"list-row": F((h) => [
|
|
1433
|
+
(S(), W(rt, {
|
|
1434
|
+
row: h,
|
|
1434
1435
|
key: e(t).items.map((se) => se.sku._id).join(".")
|
|
1435
1436
|
}, {
|
|
1436
|
-
default:
|
|
1437
|
-
d(
|
|
1437
|
+
default: F((se) => [
|
|
1438
|
+
d(ps, {
|
|
1438
1439
|
"compare-price-by-sku": e(oe),
|
|
1439
1440
|
"show-compare-price": $.value === e(j).PURCHASE && e(c),
|
|
1440
|
-
row:
|
|
1441
|
+
row: h,
|
|
1441
1442
|
"cell-by-col-id": se
|
|
1442
1443
|
}, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "cell-by-col-id"])
|
|
1443
1444
|
]),
|
|
@@ -1454,7 +1455,7 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1454
1455
|
]);
|
|
1455
1456
|
};
|
|
1456
1457
|
}
|
|
1457
|
-
}),
|
|
1458
|
+
}), ra = { class: "flex items-center" }, ia = { class: "fm-typo-en-title-md-800" }, ua = { class: "flex gap-4" }, da = /* @__PURE__ */ pe({
|
|
1458
1459
|
__name: "TransferDialog",
|
|
1459
1460
|
props: {
|
|
1460
1461
|
mode: {},
|
|
@@ -1465,15 +1466,15 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1465
1466
|
},
|
|
1466
1467
|
emits: ["update:show", "submitted"],
|
|
1467
1468
|
setup(m, { expose: y, emit: n }) {
|
|
1468
|
-
var
|
|
1469
|
-
const i = m, b = n, t =
|
|
1469
|
+
var K;
|
|
1470
|
+
const i = m, b = n, t = it(), f = dt(), _ = Ae(), w = Ke(), u = je(), a = Ye(), o = Ee(), { t: v } = Ce(), k = N(!1), C = N(!1), g = N(!1);
|
|
1470
1471
|
async function x(p) {
|
|
1471
1472
|
if (p) {
|
|
1472
|
-
|
|
1473
|
+
C.value = !1;
|
|
1473
1474
|
try {
|
|
1474
|
-
await w.readSuppliers(),
|
|
1475
|
+
await w.readSuppliers(), C.value = !0;
|
|
1475
1476
|
} catch {
|
|
1476
|
-
|
|
1477
|
+
_.open({
|
|
1477
1478
|
title: v("inventory.transfer.form.unableToFetchListOfSuppliers.title"),
|
|
1478
1479
|
message: v("inventory.transfer.form.unableToFetchListOfSuppliers.message"),
|
|
1479
1480
|
type: "error"
|
|
@@ -1482,7 +1483,7 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1482
1483
|
}
|
|
1483
1484
|
}
|
|
1484
1485
|
a.watchLocation(x);
|
|
1485
|
-
function
|
|
1486
|
+
function D() {
|
|
1486
1487
|
return {
|
|
1487
1488
|
remark: void 0,
|
|
1488
1489
|
ref: void 0,
|
|
@@ -1516,21 +1517,21 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1516
1517
|
templateDoc: f.templates.find((c) => c._id === i.templateId)
|
|
1517
1518
|
};
|
|
1518
1519
|
}
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1520
|
+
const R = zt(i, "show"), z = N(i.modelValue ?? D()), ue = N(((K = i.modelValue) == null ? void 0 : K._id) ?? `${Math.random()}`);
|
|
1521
|
+
ge(
|
|
1521
1522
|
() => i.show,
|
|
1522
1523
|
(p) => {
|
|
1523
1524
|
var c;
|
|
1524
|
-
p && (
|
|
1525
|
+
p && (g.value = !1, z.value = i.modelValue ?? D(), ue.value = ((c = i.modelValue) == null ? void 0 : c._id) ?? `${Math.random()}`);
|
|
1525
1526
|
}
|
|
1526
1527
|
);
|
|
1527
|
-
const T =
|
|
1528
|
+
const T = E(() => !C.value || !g.value), $ = E(() => {
|
|
1528
1529
|
switch (i.mode) {
|
|
1529
|
-
case
|
|
1530
|
+
case Fe.READ:
|
|
1530
1531
|
return "View transfer";
|
|
1531
|
-
case
|
|
1532
|
+
case Fe.CREATE:
|
|
1532
1533
|
return v("inventory.transfer.receiveRequest.create.title");
|
|
1533
|
-
case
|
|
1534
|
+
case Fe.UPDATE:
|
|
1534
1535
|
return v("inventory.transfer.receiveRequest.update.title");
|
|
1535
1536
|
}
|
|
1536
1537
|
return "";
|
|
@@ -1549,20 +1550,20 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1549
1550
|
(c = (p = O.value) == null ? void 0 : p.resetInputs) == null || c.call(p);
|
|
1550
1551
|
}
|
|
1551
1552
|
});
|
|
1552
|
-
async function
|
|
1553
|
+
async function V() {
|
|
1553
1554
|
const p = z.value;
|
|
1554
|
-
k.value = !0, (p.supplier.internal === "warehouse" || p.supplier.internal === "restaurant") && (p.items = p.items.map(({ totalCost: c, ...H }) => H)),
|
|
1555
|
+
k.value = !0, (p.supplier.internal === "warehouse" || p.supplier.internal === "restaurant") && (p.items = p.items.map(({ totalCost: c, ...H }) => H)), o.mustUseDefaultCost && (p.items = p.items.map((c) => ({
|
|
1555
1556
|
...c,
|
|
1556
1557
|
totalCost: re(c.sku, c.quantity, c.measurement)
|
|
1557
1558
|
})));
|
|
1558
1559
|
try {
|
|
1559
|
-
await t.createPurchaseOrder(p), await new Promise((c) => setTimeout(c, 1e3)),
|
|
1560
|
+
await t.createPurchaseOrder(p), await new Promise((c) => setTimeout(c, 1e3)), _.open({
|
|
1560
1561
|
title: v("inventory.transfer.receiveRequest.create.success"),
|
|
1561
1562
|
message: v("inventory.transfer.receiveRequest.create.successMessage"),
|
|
1562
1563
|
type: "success"
|
|
1563
1564
|
}), b("update:show", !1), b("submitted");
|
|
1564
1565
|
} catch (c) {
|
|
1565
|
-
|
|
1566
|
+
_.open({
|
|
1566
1567
|
title: v("inventory.transfer.receiveRequest.create.error.title"),
|
|
1567
1568
|
message: v("inventory.transfer.receiveRequest.create.error.message"),
|
|
1568
1569
|
type: "error"
|
|
@@ -1573,18 +1574,18 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1573
1574
|
}
|
|
1574
1575
|
async function I() {
|
|
1575
1576
|
const p = z.value;
|
|
1576
|
-
k.value = !0, (p.supplier.internal === "warehouse" || p.supplier.internal === "restaurant") && (p.items = p.items.map(({ totalCost: c, ...H }) => H)),
|
|
1577
|
+
k.value = !0, (p.supplier.internal === "warehouse" || p.supplier.internal === "restaurant") && (p.items = p.items.map(({ totalCost: c, ...H }) => H)), o.mustUseDefaultCost && (p.items = p.items.map((c) => ({
|
|
1577
1578
|
...c,
|
|
1578
1579
|
totalCost: re(c.sku, c.quantity, c.measurement)
|
|
1579
1580
|
})));
|
|
1580
1581
|
try {
|
|
1581
|
-
await t.updatePurchaseOrder(p), await new Promise((c) => setTimeout(c, 1e3)),
|
|
1582
|
+
await t.updatePurchaseOrder(p), await new Promise((c) => setTimeout(c, 1e3)), _.open({
|
|
1582
1583
|
title: v("inventory.transfer.receiveRequest.update.success"),
|
|
1583
1584
|
message: v("inventory.transfer.receiveRequest.update.successMessage"),
|
|
1584
1585
|
type: "success"
|
|
1585
1586
|
}), b("update:show", !1), b("submitted");
|
|
1586
1587
|
} catch (c) {
|
|
1587
|
-
|
|
1588
|
+
_.open({
|
|
1588
1589
|
title: v("inventory.transfer.receiveRequest.update.error.title"),
|
|
1589
1590
|
message: v("inventory.transfer.receiveRequest.update.error.message"),
|
|
1590
1591
|
type: "error"
|
|
@@ -1595,36 +1596,36 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1595
1596
|
}
|
|
1596
1597
|
function B() {
|
|
1597
1598
|
switch (i.mode) {
|
|
1598
|
-
case
|
|
1599
|
-
return
|
|
1600
|
-
case
|
|
1599
|
+
case Fe.CREATE:
|
|
1600
|
+
return V();
|
|
1601
|
+
case Fe.UPDATE:
|
|
1601
1602
|
return I();
|
|
1602
1603
|
}
|
|
1603
1604
|
}
|
|
1604
|
-
function
|
|
1605
|
+
function Q() {
|
|
1605
1606
|
var p, c;
|
|
1606
1607
|
(c = (p = O.value) == null ? void 0 : p.validateInputs) == null || c.call(p);
|
|
1607
1608
|
}
|
|
1608
1609
|
return (p, c) => {
|
|
1609
1610
|
const H = P("FmButton"), oe = P("FmSideSheet");
|
|
1610
|
-
return S(),
|
|
1611
|
-
modelValue: e(
|
|
1612
|
-
"onUpdate:modelValue": c[3] || (c[3] = (X) => Se(
|
|
1611
|
+
return S(), W(oe, {
|
|
1612
|
+
modelValue: e(R),
|
|
1613
|
+
"onUpdate:modelValue": c[3] || (c[3] = (X) => Se(R) ? R.value = X : null),
|
|
1613
1614
|
"dismiss-away": "",
|
|
1614
1615
|
"close-button": "",
|
|
1615
1616
|
"max-width": 900
|
|
1616
1617
|
}, {
|
|
1617
|
-
"side-sheet-header":
|
|
1618
|
-
|
|
1619
|
-
|
|
1618
|
+
"side-sheet-header": F(() => [
|
|
1619
|
+
l("div", ra, [
|
|
1620
|
+
l("div", ia, U($.value), 1)
|
|
1620
1621
|
])
|
|
1621
1622
|
]),
|
|
1622
|
-
default:
|
|
1623
|
-
(S(),
|
|
1623
|
+
default: F(() => [
|
|
1624
|
+
(S(), W(na, {
|
|
1624
1625
|
class: "w-full",
|
|
1625
1626
|
ref_key: "formRef",
|
|
1626
1627
|
ref: O,
|
|
1627
|
-
"onForm:ready": c[0] || (c[0] = () =>
|
|
1628
|
+
"onForm:ready": c[0] || (c[0] = () => g.value = !0),
|
|
1628
1629
|
onValidationSuccess: B,
|
|
1629
1630
|
modelValue: z.value,
|
|
1630
1631
|
"onUpdate:modelValue": c[1] || (c[1] = (X) => z.value = X),
|
|
@@ -1635,13 +1636,13 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1635
1636
|
"last-closing-date": p.lastClosingDate
|
|
1636
1637
|
}, null, 8, ["modelValue", "disabled", "suppliers", "skus", "last-closing-date"]))
|
|
1637
1638
|
]),
|
|
1638
|
-
"side-sheet-footer":
|
|
1639
|
-
|
|
1639
|
+
"side-sheet-footer": F(() => [
|
|
1640
|
+
l("div", ua, [
|
|
1640
1641
|
d(H, {
|
|
1641
1642
|
loading: k.value,
|
|
1642
1643
|
disabled: T.value,
|
|
1643
1644
|
label: e(v)("common.save"),
|
|
1644
|
-
onClick:
|
|
1645
|
+
onClick: Q
|
|
1645
1646
|
}, null, 8, ["loading", "disabled", "label"]),
|
|
1646
1647
|
d(H, {
|
|
1647
1648
|
disabled: T.value,
|
|
@@ -1655,26 +1656,26 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1655
1656
|
}, 8, ["modelValue"]);
|
|
1656
1657
|
};
|
|
1657
1658
|
}
|
|
1658
|
-
}),
|
|
1659
|
+
}), ca = { class: "flex flex-col py-8" }, ma = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, fa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, va = {
|
|
1659
1660
|
key: 0,
|
|
1660
1661
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
1661
|
-
},
|
|
1662
|
+
}, ya = { class: "pt-8" }, at = "ReceiveRequestViewSearchCriteria", Ra = /* @__PURE__ */ pe({
|
|
1662
1663
|
__name: "ReceiveRequestView",
|
|
1663
1664
|
setup(m) {
|
|
1664
|
-
const { t: y } =
|
|
1665
|
-
|
|
1666
|
-
name:
|
|
1667
|
-
startDate:
|
|
1668
|
-
endDate:
|
|
1665
|
+
const { t: y } = Ce(), n = Ae();
|
|
1666
|
+
Re.object({
|
|
1667
|
+
name: Re.string().optional().nullable(),
|
|
1668
|
+
startDate: Re.string().optional().nullable(),
|
|
1669
|
+
endDate: Re.string().optional().nullable()
|
|
1669
1670
|
});
|
|
1670
|
-
const i =
|
|
1671
|
-
() => !
|
|
1672
|
-
), b =
|
|
1671
|
+
const i = E(
|
|
1672
|
+
() => !o._currentLocation || u.loading.value
|
|
1673
|
+
), b = Ot(), t = Ee();
|
|
1673
1674
|
function f() {
|
|
1674
1675
|
const T = {
|
|
1675
1676
|
name: "",
|
|
1676
1677
|
...Je()
|
|
1677
|
-
}, $ = b.getItem(
|
|
1678
|
+
}, $ = b.getItem(at);
|
|
1678
1679
|
if (!$)
|
|
1679
1680
|
return T;
|
|
1680
1681
|
try {
|
|
@@ -1683,28 +1684,34 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1683
1684
|
return T;
|
|
1684
1685
|
}
|
|
1685
1686
|
}
|
|
1686
|
-
function
|
|
1687
|
-
b.setItem(
|
|
1687
|
+
function _() {
|
|
1688
|
+
b.setItem(at, JSON.stringify(w.value));
|
|
1688
1689
|
}
|
|
1689
|
-
const w = N(f()), u =
|
|
1690
|
+
const w = N(f()), u = Rt(
|
|
1691
|
+
Ue.RECEIVE_REQUEST,
|
|
1692
|
+
w.value
|
|
1693
|
+
), { columnDefs: a } = Vt(
|
|
1694
|
+
Ue.RECEIVE_REQUEST,
|
|
1695
|
+
u
|
|
1696
|
+
), o = Ye();
|
|
1690
1697
|
async function v() {
|
|
1691
|
-
const T = `inventory-record_${
|
|
1692
|
-
(
|
|
1693
|
-
const B = new Date(
|
|
1694
|
-
|
|
1698
|
+
const T = `inventory-record_${Xe(w.value.startDate).format("DD-MM-YYYY_HH-mm")}-${Xe(w.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, $ = u.purchaseOrders.value.flatMap(
|
|
1699
|
+
(V) => V.items.map((I) => {
|
|
1700
|
+
const B = new Date(Ut(V._id) ?? ""), Q = V.effectiveAt ? new Date(V.effectiveAt) : void 0, K = ye(
|
|
1701
|
+
Et(I.sku, V.deliveryOrder || [])
|
|
1695
1702
|
), p = ye(I.quantity);
|
|
1696
1703
|
return {
|
|
1697
1704
|
"SKU code": I.code,
|
|
1698
1705
|
"SKU name": I.name,
|
|
1699
|
-
"PO #":
|
|
1700
|
-
"Effective at":
|
|
1706
|
+
"PO #": V.seqNumber,
|
|
1707
|
+
"Effective at": Q,
|
|
1701
1708
|
Date: B,
|
|
1702
|
-
Status:
|
|
1703
|
-
Reference:
|
|
1704
|
-
"Received quantity":
|
|
1709
|
+
Status: V.status,
|
|
1710
|
+
Reference: V.ref ?? "",
|
|
1711
|
+
"Received quantity": K,
|
|
1705
1712
|
"Ordered quantity": p,
|
|
1706
1713
|
Unit: I.sku.unit.abbrev,
|
|
1707
|
-
"Total cost": I.totalCost ?
|
|
1714
|
+
"Total cost": I.totalCost ? Le(I.totalCost) : null
|
|
1708
1715
|
};
|
|
1709
1716
|
})
|
|
1710
1717
|
), O = [
|
|
@@ -1718,7 +1725,7 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1718
1725
|
"Ordered quantity",
|
|
1719
1726
|
"Unit"
|
|
1720
1727
|
];
|
|
1721
|
-
t.enableBackdatePo && O.insert("Effective at", 4), t.enableTotalCost && O.push("Total cost"), await
|
|
1728
|
+
t.enableBackdatePo && O.insert("Effective at", 4), t.enableTotalCost && O.push("Total cost"), await Mt(
|
|
1722
1729
|
[
|
|
1723
1730
|
{
|
|
1724
1731
|
name: "purchases",
|
|
@@ -1733,16 +1740,16 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1733
1740
|
type: "success"
|
|
1734
1741
|
});
|
|
1735
1742
|
}
|
|
1736
|
-
const k = N(Je()),
|
|
1737
|
-
|
|
1743
|
+
const k = N(Je()), C = N("");
|
|
1744
|
+
ge([() => k.value], ([T]) => {
|
|
1738
1745
|
!T.startDate || !T.endDate || (w.value.startDate = T.startDate, w.value.endDate = T.endDate, u.updateDateRange(
|
|
1739
1746
|
w.value.startDate,
|
|
1740
1747
|
w.value.endDate
|
|
1741
|
-
),
|
|
1742
|
-
}),
|
|
1743
|
-
|
|
1748
|
+
), _());
|
|
1749
|
+
}), ge([() => C.value], () => {
|
|
1750
|
+
_();
|
|
1744
1751
|
});
|
|
1745
|
-
function
|
|
1752
|
+
function g(T) {
|
|
1746
1753
|
if (T === "create") {
|
|
1747
1754
|
if (i.value) {
|
|
1748
1755
|
n.open({
|
|
@@ -1759,7 +1766,7 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1759
1766
|
if (T === "export")
|
|
1760
1767
|
return v();
|
|
1761
1768
|
}
|
|
1762
|
-
const { breakpoints: x } =
|
|
1769
|
+
const { breakpoints: x } = Qe(), D = E(() => x.value.xs || x.value.sm), R = E(() => D.value ? 10 : 20), z = Tt(), ue = E(() => [
|
|
1763
1770
|
{
|
|
1764
1771
|
label: y("inventory.transfer.receiveRequest.actions.create"),
|
|
1765
1772
|
value: "create",
|
|
@@ -1777,71 +1784,71 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1777
1784
|
]);
|
|
1778
1785
|
return (T, $) => {
|
|
1779
1786
|
const O = P("FmTable");
|
|
1780
|
-
return S(),
|
|
1787
|
+
return S(), W(Pt, {
|
|
1781
1788
|
title: e(y)("inventory.transfer.receiveRequest.title2"),
|
|
1782
1789
|
actions: ue.value,
|
|
1783
|
-
"onClick:action":
|
|
1790
|
+
"onClick:action": g
|
|
1784
1791
|
}, {
|
|
1785
|
-
default:
|
|
1786
|
-
var
|
|
1792
|
+
default: F(() => {
|
|
1793
|
+
var V;
|
|
1787
1794
|
return [
|
|
1788
|
-
|
|
1789
|
-
class:
|
|
1795
|
+
l("div", {
|
|
1796
|
+
class: J([
|
|
1790
1797
|
"flex flex-col gap-8 max-h-full",
|
|
1791
1798
|
{
|
|
1792
|
-
"p-0":
|
|
1793
|
-
"px-24 ": !
|
|
1799
|
+
"p-0": D.value,
|
|
1800
|
+
"px-24 ": !D.value
|
|
1794
1801
|
}
|
|
1795
1802
|
])
|
|
1796
1803
|
}, [
|
|
1797
|
-
d(
|
|
1804
|
+
d(It, {
|
|
1798
1805
|
"date-range-query": "",
|
|
1799
1806
|
"date-range": k.value,
|
|
1800
1807
|
"onUpdate:dateRange": $[0] || ($[0] = (I) => k.value = I),
|
|
1801
1808
|
searchable: "",
|
|
1802
1809
|
"change-location": "",
|
|
1803
|
-
search:
|
|
1804
|
-
"onUpdate:search": $[1] || ($[1] = (I) =>
|
|
1810
|
+
search: C.value,
|
|
1811
|
+
"onUpdate:search": $[1] || ($[1] = (I) => C.value = I)
|
|
1805
1812
|
}, null, 8, ["date-range", "search"]),
|
|
1806
|
-
(S(),
|
|
1807
|
-
style:
|
|
1813
|
+
(S(), W(O, {
|
|
1814
|
+
style: lt(e(z).tableHeight),
|
|
1808
1815
|
"column-defs": e(a),
|
|
1809
1816
|
"row-data": e(u).purchaseOrders.value,
|
|
1810
|
-
"search-value":
|
|
1817
|
+
"search-value": C.value,
|
|
1811
1818
|
loading: i.value,
|
|
1812
1819
|
onRowClick: $[2] || ($[2] = (I) => e(u).promptShowTransferDetails(I.original)),
|
|
1813
|
-
key: (
|
|
1814
|
-
"page-size":
|
|
1820
|
+
key: (V = e(o)._currentLocation) == null ? void 0 : V.dbName,
|
|
1821
|
+
"page-size": R.value
|
|
1815
1822
|
}, {
|
|
1816
|
-
"list-row":
|
|
1817
|
-
d(
|
|
1823
|
+
"list-row": F((I) => [
|
|
1824
|
+
d(rt, {
|
|
1818
1825
|
row: I,
|
|
1819
1826
|
onRowClick: e(u).promptShowTransferDetails
|
|
1820
1827
|
}, {
|
|
1821
|
-
default:
|
|
1822
|
-
var
|
|
1828
|
+
default: F((B) => {
|
|
1829
|
+
var Q, K, p, c, H, oe, X, $e, he, Te, qe, Pe, s, r, M, Z, de, be, ae, fe;
|
|
1823
1830
|
return [
|
|
1824
|
-
|
|
1825
|
-
|
|
1831
|
+
l("div", ca, [
|
|
1832
|
+
l("div", ma, [
|
|
1826
1833
|
d(e(ie), {
|
|
1827
|
-
render: (p = (
|
|
1834
|
+
render: (p = (K = (Q = B._id) == null ? void 0 : Q.column) == null ? void 0 : K.columnDef) == null ? void 0 : p.cell,
|
|
1828
1835
|
props: (H = (c = B._id) == null ? void 0 : c.getContext) == null ? void 0 : H.call(c)
|
|
1829
1836
|
}, null, 8, ["render", "props"])
|
|
1830
1837
|
]),
|
|
1831
|
-
|
|
1838
|
+
l("div", pa, [
|
|
1832
1839
|
d(e(ie), {
|
|
1833
1840
|
render: ($e = (X = (oe = B.supplier_name) == null ? void 0 : oe.column) == null ? void 0 : X.columnDef) == null ? void 0 : $e.cell,
|
|
1834
|
-
props: (Te = (
|
|
1841
|
+
props: (Te = (he = B.supplier_name) == null ? void 0 : he.getContext) == null ? void 0 : Te.call(he)
|
|
1835
1842
|
}, null, 8, ["render", "props"])
|
|
1836
1843
|
]),
|
|
1837
|
-
|
|
1838
|
-
I.original.ref ? (S(),
|
|
1844
|
+
l("div", fa, U(I.original.items.map((xe) => `${xe.name}`).join(", ")), 1),
|
|
1845
|
+
I.original.ref ? (S(), q("div", va, [
|
|
1839
1846
|
d(e(ie), {
|
|
1840
|
-
render: (s = (Pe = (
|
|
1841
|
-
props: (
|
|
1847
|
+
render: (s = (Pe = (qe = B.ref) == null ? void 0 : qe.column) == null ? void 0 : Pe.columnDef) == null ? void 0 : s.cell,
|
|
1848
|
+
props: (M = (r = B.ref) == null ? void 0 : r.getContext) == null ? void 0 : M.call(r)
|
|
1842
1849
|
}, null, 8, ["render", "props"])
|
|
1843
1850
|
])) : G("", !0),
|
|
1844
|
-
|
|
1851
|
+
l("div", ya, [
|
|
1845
1852
|
d(e(ie), {
|
|
1846
1853
|
render: (be = (de = (Z = B.status) == null ? void 0 : Z.column) == null ? void 0 : de.columnDef) == null ? void 0 : be.cell,
|
|
1847
1854
|
props: (fe = (ae = B.status) == null ? void 0 : ae.getContext) == null ? void 0 : fe.call(ae)
|
|
@@ -1856,13 +1863,15 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1856
1863
|
_: 1
|
|
1857
1864
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
1858
1865
|
], 2),
|
|
1859
|
-
(S(),
|
|
1860
|
-
d(
|
|
1866
|
+
(S(), W(pt, { to: "body" }, [
|
|
1867
|
+
d(da, Be(e(u).transferDialogProps.value, {
|
|
1861
1868
|
onSubmitted: e(u).fetchData
|
|
1862
1869
|
}), null, 16, ["onSubmitted"]),
|
|
1863
|
-
d(
|
|
1870
|
+
d(At, Be({
|
|
1871
|
+
scope: e(Ue).RECEIVE_REQUEST
|
|
1872
|
+
}, e(u).transferDetailsProps.value, {
|
|
1864
1873
|
onSubmitted: e(u).fetchData
|
|
1865
|
-
}), null, 16, ["onSubmitted"])
|
|
1874
|
+
}), null, 16, ["scope", "onSubmitted"])
|
|
1866
1875
|
]))
|
|
1867
1876
|
];
|
|
1868
1877
|
}),
|
|
@@ -1872,5 +1881,5 @@ const Ps = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Is = { key: 0 }
|
|
|
1872
1881
|
}
|
|
1873
1882
|
});
|
|
1874
1883
|
export {
|
|
1875
|
-
|
|
1884
|
+
Ra as default
|
|
1876
1885
|
};
|