@feedmepos/mf-inventory-portal 1.2.30-dev.1 → 1.2.30
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-kX4bqoEe.js → App-CZJre5y8.js} +57 -55
- package/dist/{ApprovalView-DCNKqVE2.js → ApprovalView-CnxHxojY.js} +34 -28
- package/dist/{BindingsDialog-d7f1f8gf.js → BindingsDialog-C6lCOPNs.js} +2 -2
- package/dist/{BindingsPicker-2HJOx0QW.js → BindingsPicker-DZtFKLQ5.js} +6 -5
- package/dist/{BindingsTable-CPAjxOZG.js → BindingsTable-BmQGLuJ4.js} +28 -24
- package/dist/{ClosingDraftView-CUng41eo.js → ClosingDraftView-KLtlh31f.js} +183 -175
- package/dist/{ClosingHistoryView-CcGc2NwU.js → ClosingHistoryView-Rf1yMhMj.js} +43 -41
- package/dist/ClosingTemplateView-C_IiKnGx.js +2019 -0
- package/dist/{DeliveryOrderPrintPreview-BsM-CCc5.js → DeliveryOrderPrintPreview-UF7V005U.js} +15 -14
- package/dist/FmDroppableField-J0xUsOTV.js +154 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-cuggJ5Xd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js} +74 -72
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js +279 -0
- package/dist/{FmMultiselectDialog-BGbrqXUF.js → FmMultiselectDialog-B0aKuf2o.js} +1 -1
- package/dist/FmMultiselectDialog-BasrjBFA.js +597 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-isogcN1O.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js} +51 -49
- package/dist/{ImportView-wAVrMEwL.js → ImportView-DRSoz0uM.js} +81 -74
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVUF4I2Q.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DA8SlWPy.js} +5 -5
- package/dist/{IngredientGroupView-BZczeXdL.js → IngredientGroupView-D5Laak2-.js} +73 -65
- package/dist/{IngredientsView-D5N5Y1ZY.js → IngredientsView-TG3fPQhR.js} +358 -345
- package/dist/{IntegrationView-Hrslmuc1.js → IntegrationView-CElpjyo7.js} +219 -209
- package/dist/{InventoryBindingForm-DH6wgxOG.js → InventoryBindingForm-CBgxRYBd.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drr5vD6f.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ys5GBHoQ.js} +41 -40
- package/dist/{InventoryBindingSummary-BU1ehpQZ.js → InventoryBindingSummary-OK3vNWhi.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1ueC4GfZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9QRntUlk.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-FHcU1zZt.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bc01NoOn.js} +22 -21
- package/dist/{PublishView-CQtj0f31.js → PublishView-CLMfiLjP.js} +26 -23
- package/dist/{PurchaseOrderPrintPreview-BQyXtHST.js → PurchaseOrderPrintPreview-Dy77yWDC.js} +10 -9
- package/dist/{ReceiveRequestView-Dm-h_SrY.js → ReceiveRequestView-BhD-NaHE.js} +478 -462
- package/dist/{RecipeView-DNNRvr1w.js → RecipeView-RWaO94w_.js} +73 -64
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js +251 -0
- package/dist/{StockView-CaOm5BCx.js → StockView-D5t8OxaG.js} +292 -282
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Z91XRszD.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-3Asf1TGd.js} +1 -1
- package/dist/{SupplierView-JSII9qwL.js → SupplierView-DiospFKq.js} +92 -80
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-DfCHteOF.js +177 -0
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CNtvx-LA.js +123 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Mehd4lGs.js → TransferDetails.vue_vue_type_script_setup_true_lang-p959Op4k.js} +318 -305
- package/dist/{TransferTemplateView-DyCpNKJd.js → TransferTemplateView-ePZFdZ0p.js} +228 -216
- package/dist/{UnitView-CqN7mlJ2.js → UnitView-Banlxw7y.js} +70 -63
- package/dist/{WarehouseView-gFWD-m8e.js → WarehouseView-BL-p5hbi.js} +123 -114
- package/dist/WastageTemplateView-B1pmSuW0.js +2288 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-EpEEb8EO.js +64040 -0
- package/dist/app-rgirz_52.js +8024 -0
- package/dist/app.d.ts +0 -21
- package/dist/app.js +6 -6
- package/dist/closing-template-zIjwO1_E.js +117 -0
- package/dist/date2-Dnc8Y81g.js +116 -0
- package/dist/dayjs.min-TdUgzmww.js +282 -0
- package/dist/{decimal-DfF_g5rc.js → decimal-C6s3GvGb.js} +4 -3
- package/dist/defineDeepModel-BSaaXVBF.js +19 -0
- package/dist/duplicate-template-Bw0H416G.js +34 -0
- package/dist/feature-C95Hao53.js +20162 -0
- package/dist/form-mode.enum-BKiNVH6A.js +4 -0
- package/dist/format-time-from-id-DlbHo6kY.js +15 -0
- package/dist/{format-unit-display-ivAljvlo.js → format-unit-display-QBS54q0R.js} +308 -297
- package/dist/{import-export.helper-B2MWv9v7.js → import-export.helper-CUKCKtP7.js} +56 -52
- package/dist/index-CFn_9RMm.js +45 -0
- package/dist/{index-DZaT0ZaL.js → index-S9Ak__QC.js} +1 -1
- package/dist/{index-BbhuWHyh.js → index-goD-WGVb.js} +16 -14
- package/dist/lodash-gq8IrP4j.js +3678 -0
- package/dist/netsuite-CnhAKyAO.js +4316 -0
- package/dist/{purchase-order-template-DdybMC_P.js → purchase-order-template-CBIpWdEW.js} +1 -1
- package/dist/router/shared.spec.d.ts +1 -0
- package/dist/row-action.enum-BcW_L_nE.js +67 -0
- package/dist/rules-DKklsaS1.js +201 -0
- package/dist/{stock-BYagIdsj.js → stock-3K93Mif9.js} +1 -1
- package/dist/{stock-V4ciPiBe.js → stock-BW8fen3H.js} +11 -10
- package/dist/style.css +1 -1
- package/dist/{supplier-CgtB1I9I.js → supplier-CObCSfot.js} +27 -26
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BIQovyZX.js → use-ingredient-select-dialog-DwvQiaVW.js} +4 -3
- package/dist/{use-inventory-binding-dialog-DyjicXgc.js → use-inventory-binding-dialog-CuLEHLDM.js} +4 -3
- package/dist/use-template-enabled-locations-2-DkUJeppb.js +111 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +0 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -13
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +0 -12
- package/dist/vue-i18n-CUznvVzc.js +2365 -0
- package/dist/xlsx-bT1p3YVR.js +24004 -0
- package/dist/xlsx.util-Cr9DpDFb.js +78 -0
- package/package.json +5 -5
- package/dist/ClosingTemplateView-D8IAdhDb.js +0 -2041
- package/dist/app-CnQ49Lyb.js +0 -131483
|
@@ -1,19 +1,35 @@
|
|
|
1
|
-
import { reactive as gt, onMounted as Ke, watch as be, computed as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { reactive as gt, onMounted as Ke, watch as be, computed as N, h as L, defineComponent as ce, openBlock as S, createElementBlock as T, Fragment as de, renderList as Se, createElementVNode as n, toDisplayString as M, unref as s, resolveComponent as $, createVNode as y, withCtx as A, createCommentVNode as j, ref as q, createBlock as W, normalizeClass as J, normalizeStyle as _t, createTextVNode as Te, nextTick as It, mergeProps as Ge, isRef as xe, createSlots as $t, Teleport as Tt, normalizeProps as Dt, guardReactiveProps as Pt } from "vue";
|
|
2
|
+
import { s as Je, G as Vt, f as ht, J as Rt, z as At, u as We, a as et, K as Et, L as Ot, t as Mt, m as Ye } from "./app-EpEEb8EO.js";
|
|
3
|
+
import { i as ft, _ as qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js";
|
|
4
|
+
import { u as Ut, P as Ze, a as Nt, _ as Bt, g as zt } from "./TransferDetails.vue_vue_type_script_setup_true_lang-p959Op4k.js";
|
|
5
|
+
import { R as Me, a as Ce, e as Qe, d as Lt, A as qe, M as Ht, B as jt } from "./rules-DKklsaS1.js";
|
|
6
|
+
import { _ as kt, u as Yt, i as Qt, e as Kt } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-Bc01NoOn.js";
|
|
7
|
+
import { d as vt } from "./dayjs.min-TdUgzmww.js";
|
|
8
|
+
import { u as Xt } from "./useTabStorage-BkIVScW_.js";
|
|
9
|
+
import { u as Zt, _ as Gt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js";
|
|
10
|
+
import { useBreakpoints as tt, components as ye, FmButtonVariant as Jt, useSnackbar as De, useDialog as Wt, useProxiedModel as xt } from "@feedmepos/ui-library";
|
|
11
|
+
import { F as Oe } from "./form-mode.enum-BKiNVH6A.js";
|
|
12
|
+
import { P as ae, a as Ct } from "./format-unit-display-QBS54q0R.js";
|
|
13
|
+
import { _ as es, a as ts, b as ss, F as os } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js";
|
|
14
|
+
import { u as st, P as as } from "./feature-C95Hao53.js";
|
|
15
|
+
import { u as Ue } from "./netsuite-CnhAKyAO.js";
|
|
16
|
+
import { c as $e, u as ns, _ as rs } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js";
|
|
10
17
|
import { useI18n as ge } from "@feedmepos/mf-common";
|
|
11
|
-
import "./FmMultiselectDialog-
|
|
12
|
-
import { u as
|
|
13
|
-
import {
|
|
18
|
+
import "./FmMultiselectDialog-B0aKuf2o.js";
|
|
19
|
+
import { u as ot } from "./supplier-CObCSfot.js";
|
|
20
|
+
import { a as ls } from "./FmMultiselectDialog-BasrjBFA.js";
|
|
21
|
+
import { d as St } from "./defineDeepModel-BSaaXVBF.js";
|
|
22
|
+
import { F as fe, _ as wt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
23
|
+
import { d as at, e as is, g as us, b as ds } from "./date2-Dnc8Y81g.js";
|
|
24
|
+
import { _ as cs } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
25
|
+
import { u as nt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-DfCHteOF.js";
|
|
26
|
+
import { u as ms } from "./vue-i18n-CUznvVzc.js";
|
|
27
|
+
import { s as ps, r as fs } from "./xlsx.util-Cr9DpDFb.js";
|
|
28
|
+
import { F as vs } from "./FmDroppableField-J0xUsOTV.js";
|
|
29
|
+
import { N as ys, H as bs } from "./app-rgirz_52.js";
|
|
14
30
|
var te = /* @__PURE__ */ ((g) => (g.Code = "Code", g.Name = "Name", g.TemplateName = "TemplateName", g.Amount = "Amount", g.Cost = "Cost", g.TotalCost = "TotalCost", g.Delete = "Delete", g))(te || {});
|
|
15
31
|
const gs = () => (ge(), L(
|
|
16
|
-
|
|
32
|
+
kt,
|
|
17
33
|
{
|
|
18
34
|
zIndex: 50,
|
|
19
35
|
class: "whitespace-nowrap"
|
|
@@ -21,7 +37,7 @@ const gs = () => (ge(), L(
|
|
|
21
37
|
`Total (${ht()})`
|
|
22
38
|
));
|
|
23
39
|
function _s(g) {
|
|
24
|
-
const { t:
|
|
40
|
+
const { t: w } = ge(), l = gt({}), { breakpoints: p } = tt(), x = st(), t = Ue();
|
|
25
41
|
Ke(() => {
|
|
26
42
|
for (const v of g.items) {
|
|
27
43
|
if (!v.totalCost)
|
|
@@ -33,12 +49,12 @@ function _s(g) {
|
|
|
33
49
|
{
|
|
34
50
|
supplier: g.supplier
|
|
35
51
|
}
|
|
36
|
-
), u = v.totalCost ??
|
|
37
|
-
e ?
|
|
52
|
+
), u = v.totalCost ?? Je.reset();
|
|
53
|
+
e ? l[v.sku._id] = e.amount !== u.amount || e.precision !== u.precision : l[v.sku._id] = !0;
|
|
38
54
|
}
|
|
39
55
|
}), be([() => g.supplier], ([v]) => {
|
|
40
56
|
for (const e of g.items) {
|
|
41
|
-
if (!e.totalCost ||
|
|
57
|
+
if (!e.totalCost || l[e.sku._id] || !f(e.sku))
|
|
42
58
|
continue;
|
|
43
59
|
const { cost: u } = $e(
|
|
44
60
|
e.sku,
|
|
@@ -52,13 +68,13 @@ function _s(g) {
|
|
|
52
68
|
}
|
|
53
69
|
});
|
|
54
70
|
function f(v) {
|
|
55
|
-
var u, k, a, i, h, _,
|
|
56
|
-
return !!(((k = (u = v.defaultCost) == null ? void 0 : u.costPerUnit) == null ? void 0 : k.amount) ?? ((
|
|
71
|
+
var u, k, a, i, h, _, C;
|
|
72
|
+
return !!(((k = (u = v.defaultCost) == null ? void 0 : u.costPerUnit) == null ? void 0 : k.amount) ?? ((C = (_ = (h = (i = (a = g.supplier) == null ? void 0 : a.supplyItems) == null ? void 0 : i.find((r) => r.skuId === v._id)) == null ? void 0 : h.defaultCost) == null ? void 0 : _.costPerUnit) == null ? void 0 : C.amount));
|
|
57
73
|
}
|
|
58
74
|
const F = [
|
|
59
75
|
{
|
|
60
76
|
id: "Code",
|
|
61
|
-
header: () =>
|
|
77
|
+
header: () => w("inventory.transfer.form.items.table.Code"),
|
|
62
78
|
accessorKey: "code",
|
|
63
79
|
size: 200,
|
|
64
80
|
cell(v) {
|
|
@@ -95,7 +111,7 @@ function _s(g) {
|
|
|
95
111
|
},
|
|
96
112
|
{
|
|
97
113
|
id: "Name",
|
|
98
|
-
header: () =>
|
|
114
|
+
header: () => w("inventory.transfer.form.items.table.Name"),
|
|
99
115
|
minSize: 300,
|
|
100
116
|
cell(v) {
|
|
101
117
|
const e = v.row.original;
|
|
@@ -131,7 +147,7 @@ function _s(g) {
|
|
|
131
147
|
},
|
|
132
148
|
{
|
|
133
149
|
id: "TemplateName",
|
|
134
|
-
header: () =>
|
|
150
|
+
header: () => w("inventory.transfer.form.items.table.Name"),
|
|
135
151
|
minSize: 300,
|
|
136
152
|
enableSorting: !1,
|
|
137
153
|
cell(v) {
|
|
@@ -165,14 +181,14 @@ function _s(g) {
|
|
|
165
181
|
},
|
|
166
182
|
{
|
|
167
183
|
id: "Amount",
|
|
168
|
-
header: () =>
|
|
184
|
+
header: () => w("inventory.transfer.form.items.table.Amount"),
|
|
169
185
|
minSize: 200,
|
|
170
186
|
cell(v) {
|
|
171
|
-
var i, h, _,
|
|
172
|
-
const e = v.row.original, u = (i = g.forecastAmounts) == null ? void 0 : i.find((c) => c.skuId === e.sku._id), k = u ? u.helperState === "error" ? `Predicted: ${u.amount} (out of range)` : `Predicted: ${u.amount}` : void 0, a = (
|
|
187
|
+
var i, h, _, C, r;
|
|
188
|
+
const e = v.row.original, u = (i = g.forecastAmounts) == null ? void 0 : i.find((c) => c.skuId === e.sku._id), k = u ? u.helperState === "error" ? `Predicted: ${u.amount} (out of range)` : `Predicted: ${u.amount}` : void 0, a = (C = (_ = (h = g.template) == null ? void 0 : h.purchaseOrder) == null ? void 0 : _.items) == null ? void 0 : C.find(
|
|
173
189
|
(c) => c.sku._id === e.sku._id
|
|
174
190
|
);
|
|
175
|
-
return L(
|
|
191
|
+
return L(es, {
|
|
176
192
|
style: {
|
|
177
193
|
flex: "1 1 0%"
|
|
178
194
|
},
|
|
@@ -200,7 +216,7 @@ function _s(g) {
|
|
|
200
216
|
supplier: g.supplier,
|
|
201
217
|
// NOTE: set undefined here if `manualTotalCost[updatedRow.sku._id] = false`, so that the function
|
|
202
218
|
// will return the auto calculated default cost instead of the manual total cost
|
|
203
|
-
manualTotalCost:
|
|
219
|
+
manualTotalCost: l[D.sku._id] ? D.totalCost : void 0
|
|
204
220
|
}
|
|
205
221
|
);
|
|
206
222
|
D.totalCost = B;
|
|
@@ -211,15 +227,15 @@ function _s(g) {
|
|
|
211
227
|
disableUnit: !!a,
|
|
212
228
|
disabled: g.disabled,
|
|
213
229
|
rules: [
|
|
214
|
-
|
|
230
|
+
ts(
|
|
215
231
|
+Ce(
|
|
216
|
-
((
|
|
232
|
+
((r = e.quantity) == null ? void 0 : r.amount) === 0 ? { amount: 0, precision: 0 } : (a == null ? void 0 : a.minimumQuantity) ?? { amount: 0, precision: 0 }
|
|
217
233
|
)
|
|
218
234
|
),
|
|
219
|
-
|
|
235
|
+
ss(
|
|
220
236
|
a != null && a.maximumQuantity ? +Ce(a == null ? void 0 : a.maximumQuantity) : 1 / 0
|
|
221
237
|
),
|
|
222
|
-
...a != null && a.quantityStep ? [
|
|
238
|
+
...a != null && a.quantityStep ? [os(a.quantityStep)] : []
|
|
223
239
|
],
|
|
224
240
|
applyDefaultRules: !0
|
|
225
241
|
});
|
|
@@ -232,7 +248,7 @@ function _s(g) {
|
|
|
232
248
|
size: 180,
|
|
233
249
|
cell(v) {
|
|
234
250
|
const e = v.row.original, u = f(e.sku), k = p.value.xs || p.value.sm;
|
|
235
|
-
if (!
|
|
251
|
+
if (!l[e.sku._id] && u) {
|
|
236
252
|
const { cost: a, supplierOverrideCost: i } = $e(
|
|
237
253
|
e.sku,
|
|
238
254
|
e.quantity,
|
|
@@ -253,13 +269,13 @@ function _s(g) {
|
|
|
253
269
|
[
|
|
254
270
|
L(ye.FmButton, {
|
|
255
271
|
prependIcon: "edit",
|
|
256
|
-
variant:
|
|
272
|
+
variant: Jt.Tertiary,
|
|
257
273
|
disabled: g.disabled,
|
|
258
274
|
onClick() {
|
|
259
275
|
g.updateItem({
|
|
260
276
|
...e,
|
|
261
277
|
totalCost: a
|
|
262
|
-
}),
|
|
278
|
+
}), l[e.sku._id] = !0;
|
|
263
279
|
}
|
|
264
280
|
}),
|
|
265
281
|
L(
|
|
@@ -270,7 +286,7 @@ function _s(g) {
|
|
|
270
286
|
[
|
|
271
287
|
L(
|
|
272
288
|
"span",
|
|
273
|
-
k ?
|
|
289
|
+
k ? Qe(a) : Ce(a)
|
|
274
290
|
),
|
|
275
291
|
L(
|
|
276
292
|
"span",
|
|
@@ -280,7 +296,7 @@ function _s(g) {
|
|
|
280
296
|
g.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-neutral-gray-400"
|
|
281
297
|
]
|
|
282
298
|
},
|
|
283
|
-
|
|
299
|
+
w("inventory.transfer.form.items.autoCalculated")
|
|
284
300
|
),
|
|
285
301
|
i ? L(
|
|
286
302
|
"span",
|
|
@@ -291,7 +307,7 @@ function _s(g) {
|
|
|
291
307
|
]
|
|
292
308
|
},
|
|
293
309
|
[
|
|
294
|
-
|
|
310
|
+
Qe(i.costPerUnit),
|
|
295
311
|
"/",
|
|
296
312
|
i.measurement ? L(
|
|
297
313
|
"span",
|
|
@@ -315,12 +331,12 @@ function _s(g) {
|
|
|
315
331
|
g.updateItem({
|
|
316
332
|
...e,
|
|
317
333
|
totalCost: {
|
|
318
|
-
...
|
|
319
|
-
currency:
|
|
334
|
+
...Lt(+a),
|
|
335
|
+
currency: Vt()
|
|
320
336
|
}
|
|
321
337
|
});
|
|
322
338
|
},
|
|
323
|
-
rules: [qe(0),
|
|
339
|
+
rules: [qe(0), Ht(2)]
|
|
324
340
|
},
|
|
325
341
|
{
|
|
326
342
|
prepend() {
|
|
@@ -354,7 +370,7 @@ function _s(g) {
|
|
|
354
370
|
// NOTE: different from PO template, if a default cost is reenabled,
|
|
355
371
|
// the total cost will automatically assigned
|
|
356
372
|
totalCost: a
|
|
357
|
-
}),
|
|
373
|
+
}), l[e.sku._id] = !1;
|
|
358
374
|
}
|
|
359
375
|
}) : null;
|
|
360
376
|
}
|
|
@@ -392,7 +408,7 @@ function _s(g) {
|
|
|
392
408
|
}
|
|
393
409
|
];
|
|
394
410
|
return {
|
|
395
|
-
columnDefs:
|
|
411
|
+
columnDefs: N(() => x.enableTotalCost && g.transferType === ae.PURCHASE ? F : F.filter(
|
|
396
412
|
(v) => v.id !== "Cost"
|
|
397
413
|
/* Cost */
|
|
398
414
|
))
|
|
@@ -404,27 +420,27 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
404
420
|
prices: {}
|
|
405
421
|
},
|
|
406
422
|
setup(g) {
|
|
407
|
-
const
|
|
408
|
-
function
|
|
409
|
-
return
|
|
423
|
+
const w = ot();
|
|
424
|
+
function l(p) {
|
|
425
|
+
return w.suppliers.find((x) => x._id === p);
|
|
410
426
|
}
|
|
411
|
-
return (p, x) => (
|
|
412
|
-
(
|
|
427
|
+
return (p, x) => (S(), T("div", hs, [
|
|
428
|
+
(S(!0), T(de, null, Se(Object.keys(p.prices), (t) => {
|
|
413
429
|
var f;
|
|
414
|
-
return
|
|
430
|
+
return S(), T("div", {
|
|
415
431
|
key: t,
|
|
416
432
|
class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
|
|
417
433
|
}, [
|
|
418
|
-
n("div", ks, M((f =
|
|
434
|
+
n("div", ks, M((f = l(t)) == null ? void 0 : f.name), 1),
|
|
419
435
|
n("div", xs, [
|
|
420
|
-
(
|
|
436
|
+
(S(!0), T(de, null, Se(p.prices[t].slice(0, 3), (F) => {
|
|
421
437
|
var I;
|
|
422
|
-
return
|
|
438
|
+
return S(), T("div", {
|
|
423
439
|
key: F.date,
|
|
424
440
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
425
441
|
}, [
|
|
426
442
|
n("div", Cs, [
|
|
427
|
-
n("span", null, M(F.totalCost ? s(
|
|
443
|
+
n("span", null, M(F.totalCost ? s(Qe)(F.totalCost) : "No data"), 1),
|
|
428
444
|
x[0] || (x[0] = n("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
429
445
|
n("span", null, M(s(Ce)(F.totalUnit, !1)), 1),
|
|
430
446
|
n("span", null, M(((I = F.measurement) == null ? void 0 : I.abbrev) ?? F.unit.abbrev), 1)
|
|
@@ -432,7 +448,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
432
448
|
n("div", Ss, [
|
|
433
449
|
n("span", null, "(#" + M(F.seqNumber) + ")", 1),
|
|
434
450
|
x[1] || (x[1] = n("span", null, M(" "), -1)),
|
|
435
|
-
n("span", null, M(s(
|
|
451
|
+
n("span", null, M(s(at)(new Date(F.date))), 1)
|
|
436
452
|
])
|
|
437
453
|
]);
|
|
438
454
|
}), 128))
|
|
@@ -453,41 +469,41 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
453
469
|
row: {}
|
|
454
470
|
},
|
|
455
471
|
setup(g) {
|
|
456
|
-
const { t:
|
|
457
|
-
return (
|
|
458
|
-
var f, F, I, v, e, u, k, a, i, h, _,
|
|
472
|
+
const { t: w } = ge();
|
|
473
|
+
return (l, p) => {
|
|
474
|
+
var f, F, I, v, e, u, k, a, i, h, _, C, r, c, D, B, Y, Q, K, O, U, V, d, b, R, X, Z;
|
|
459
475
|
const x = $("FmLabel"), t = $("FmSpacer");
|
|
460
|
-
return
|
|
476
|
+
return S(), T("div", ws, [
|
|
461
477
|
n("div", Fs, [
|
|
462
478
|
n("div", Is, [
|
|
463
|
-
n("span", $s, " (" + M(
|
|
464
|
-
n("span", Ts, M(
|
|
479
|
+
n("span", $s, " (" + M(l.row.original.sku.code) + ") ", 1),
|
|
480
|
+
n("span", Ts, M(l.row.original.sku.name), 1)
|
|
465
481
|
]),
|
|
466
482
|
n("div", null, [
|
|
467
483
|
y(s(fe), {
|
|
468
|
-
render: (I = (F = (f =
|
|
469
|
-
props: (e = (v =
|
|
484
|
+
render: (I = (F = (f = l.cellByColId.Delete) == null ? void 0 : f.column) == null ? void 0 : F.columnDef) == null ? void 0 : I.cell,
|
|
485
|
+
props: (e = (v = l.cellByColId.Delete) == null ? void 0 : v.getContext) == null ? void 0 : e.call(v)
|
|
470
486
|
}, null, 8, ["render", "props"])
|
|
471
487
|
])
|
|
472
488
|
]),
|
|
473
489
|
n("div", Ds, [
|
|
474
490
|
n("div", Ps, [
|
|
475
491
|
y(x, {
|
|
476
|
-
label: s(
|
|
492
|
+
label: s(w)(`inventory.transfer.form.items.table.${s(te).Code}`)
|
|
477
493
|
}, null, 8, ["label"]),
|
|
478
494
|
y(s(fe), {
|
|
479
|
-
render: (a = (k = (u =
|
|
480
|
-
props: (h = (i =
|
|
495
|
+
render: (a = (k = (u = l.cellByColId[s(te).Code]) == null ? void 0 : u.column) == null ? void 0 : k.columnDef) == null ? void 0 : a.cell,
|
|
496
|
+
props: (h = (i = l.cellByColId[s(te).Code]) == null ? void 0 : i.getContext) == null ? void 0 : h.call(i)
|
|
481
497
|
}, null, 8, ["render", "props"]),
|
|
482
498
|
p[0] || (p[0] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
483
499
|
]),
|
|
484
500
|
n("div", Vs, [
|
|
485
501
|
y(x, {
|
|
486
|
-
label: s(
|
|
502
|
+
label: s(w)(`inventory.transfer.form.items.table.${s(te).Name}`)
|
|
487
503
|
}, null, 8, ["label"]),
|
|
488
504
|
y(s(fe), {
|
|
489
|
-
render: (
|
|
490
|
-
props: (D = (c =
|
|
505
|
+
render: (r = (C = (_ = l.cellByColId[s(te).Name]) == null ? void 0 : _.column) == null ? void 0 : C.columnDef) == null ? void 0 : r.cell,
|
|
506
|
+
props: (D = (c = l.cellByColId[s(te).Name]) == null ? void 0 : c.getContext) == null ? void 0 : D.call(c)
|
|
491
507
|
}, null, 8, ["render", "props"]),
|
|
492
508
|
p[1] || (p[1] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
493
509
|
])
|
|
@@ -495,34 +511,34 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
495
511
|
n("div", Rs, [
|
|
496
512
|
n("div", As, [
|
|
497
513
|
y(x, {
|
|
498
|
-
label: s(
|
|
514
|
+
label: s(w)(`inventory.transfer.form.items.table.${s(te).Amount}`)
|
|
499
515
|
}, null, 8, ["label"]),
|
|
500
516
|
y(s(fe), {
|
|
501
|
-
render: (
|
|
502
|
-
props: (O = (K =
|
|
517
|
+
render: (Q = (Y = (B = l.cellByColId[s(te).Amount]) == null ? void 0 : B.column) == null ? void 0 : Y.columnDef) == null ? void 0 : Q.cell,
|
|
518
|
+
props: (O = (K = l.cellByColId[s(te).Amount]) == null ? void 0 : K.getContext) == null ? void 0 : O.call(K)
|
|
503
519
|
}, null, 8, ["render", "props"]),
|
|
504
520
|
p[2] || (p[2] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
505
521
|
]),
|
|
506
|
-
|
|
507
|
-
y(
|
|
522
|
+
l.cellByColId[s(te).Cost] ? (S(), T("div", Es, [
|
|
523
|
+
y(kt, { "z-index": 50 }, {
|
|
508
524
|
default: A(() => [
|
|
509
525
|
y(x, {
|
|
510
|
-
label: s(
|
|
526
|
+
label: s(w)(`inventory.transfer.form.items.table.${s(te).Cost}2`)
|
|
511
527
|
}, null, 8, ["label"])
|
|
512
528
|
]),
|
|
513
529
|
_: 1
|
|
514
530
|
}),
|
|
515
531
|
y(s(fe), {
|
|
516
|
-
render: (d = (V = (
|
|
517
|
-
props: (R = (b =
|
|
532
|
+
render: (d = (V = (U = l.cellByColId[s(te).Cost]) == null ? void 0 : U.column) == null ? void 0 : V.columnDef) == null ? void 0 : d.cell,
|
|
533
|
+
props: (R = (b = l.cellByColId[s(te).Cost]) == null ? void 0 : b.getContext) == null ? void 0 : R.call(b)
|
|
518
534
|
}, null, 8, ["render", "props"]),
|
|
519
535
|
p[3] || (p[3] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
520
536
|
])) : j("", !0)
|
|
521
537
|
]),
|
|
522
|
-
|
|
538
|
+
l.showComparePrice && Object.keys(l.comparePriceBySku[(X = l.row.original.sku) == null ? void 0 : X._id] ?? {}).length > 0 ? (S(), T(de, { key: 0 }, [
|
|
523
539
|
y(t, { class: "h-8" }),
|
|
524
540
|
y(Ft, {
|
|
525
|
-
prices:
|
|
541
|
+
prices: l.comparePriceBySku[(Z = l.row.original.sku) == null ? void 0 : Z._id]
|
|
526
542
|
}, null, 8, ["prices"])
|
|
527
543
|
], 64)) : j("", !0)
|
|
528
544
|
]);
|
|
@@ -530,7 +546,7 @@ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
530
546
|
}
|
|
531
547
|
});
|
|
532
548
|
function Ms(g) {
|
|
533
|
-
const
|
|
549
|
+
const w = N({
|
|
534
550
|
get() {
|
|
535
551
|
const t = g.getEffectiveAt();
|
|
536
552
|
return t ? new Date(t) : null;
|
|
@@ -538,31 +554,31 @@ function Ms(g) {
|
|
|
538
554
|
set(t) {
|
|
539
555
|
g.setEffectiveAt((t == null ? void 0 : t.toISOString()) ?? null);
|
|
540
556
|
}
|
|
541
|
-
}),
|
|
557
|
+
}), l = N({
|
|
542
558
|
get() {
|
|
543
|
-
return !!
|
|
559
|
+
return !!w.value;
|
|
544
560
|
},
|
|
545
561
|
set(t) {
|
|
546
|
-
t ?
|
|
562
|
+
t ? w.value = /* @__PURE__ */ new Date() : w.value = null;
|
|
547
563
|
}
|
|
548
|
-
}), p =
|
|
564
|
+
}), p = N({
|
|
549
565
|
get() {
|
|
550
|
-
return
|
|
566
|
+
return w.value === null ? "" : at(w.value);
|
|
551
567
|
},
|
|
552
568
|
set(t) {
|
|
553
|
-
t ?
|
|
569
|
+
t ? w.value = /* @__PURE__ */ new Date(`${t} ${x.value}`) : w.value = null;
|
|
554
570
|
}
|
|
555
|
-
}), x =
|
|
571
|
+
}), x = N({
|
|
556
572
|
get() {
|
|
557
|
-
return
|
|
573
|
+
return w.value === null ? "" : is(w.value);
|
|
558
574
|
},
|
|
559
575
|
set(t) {
|
|
560
|
-
t ?
|
|
576
|
+
t ? w.value = /* @__PURE__ */ new Date(`${p.value} ${t}`) : w.value = null;
|
|
561
577
|
}
|
|
562
578
|
});
|
|
563
579
|
return {
|
|
564
|
-
backdatePo:
|
|
565
|
-
backdateSwitch:
|
|
580
|
+
backdatePo: w,
|
|
581
|
+
backdateSwitch: l,
|
|
566
582
|
backdateModel: p,
|
|
567
583
|
backdateTimeModel: x
|
|
568
584
|
};
|
|
@@ -573,7 +589,7 @@ const qs = {
|
|
|
573
589
|
viewBox: "0 0 24 24",
|
|
574
590
|
fill: "none",
|
|
575
591
|
xmlns: "http://www.w3.org/2000/svg"
|
|
576
|
-
},
|
|
592
|
+
}, Us = ["fill"], Ns = ["fill"], Bs = ["stroke"], zs = ["stroke"], Ls = /* @__PURE__ */ ce({
|
|
577
593
|
__name: "SparkIcon",
|
|
578
594
|
props: {
|
|
579
595
|
size: {
|
|
@@ -586,15 +602,15 @@ const qs = {
|
|
|
586
602
|
}
|
|
587
603
|
},
|
|
588
604
|
setup(g) {
|
|
589
|
-
return (
|
|
605
|
+
return (w, l) => (S(), T("svg", qs, [
|
|
590
606
|
n("path", {
|
|
591
607
|
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",
|
|
592
608
|
fill: g.color
|
|
593
|
-
}, null, 8,
|
|
609
|
+
}, null, 8, Us),
|
|
594
610
|
n("path", {
|
|
595
611
|
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",
|
|
596
612
|
fill: g.color
|
|
597
|
-
}, null, 8,
|
|
613
|
+
}, null, 8, Ns),
|
|
598
614
|
n("path", {
|
|
599
615
|
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",
|
|
600
616
|
stroke: g.color,
|
|
@@ -611,7 +627,7 @@ const qs = {
|
|
|
611
627
|
}, null, 8, zs)
|
|
612
628
|
]));
|
|
613
629
|
}
|
|
614
|
-
}), Hs = { class: "flex gap-8 items-center" }, js = { class: "fm-typo-en-body-lg-600 line-clamp-1" },
|
|
630
|
+
}), Hs = { class: "flex gap-8 items-center" }, js = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, Ys = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, Qs = { class: "flex items-center w-full" }, Ks = { class: "flex-1" }, Xs = { class: "fm-typo-en-title-sm-800" }, Zs = { class: "flex items-start gap-8" }, Gs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Js = { class: "flex gap-1" }, Ws = /* @__PURE__ */ ce({
|
|
615
631
|
__name: "ForecastStock",
|
|
616
632
|
props: {
|
|
617
633
|
templateId: {},
|
|
@@ -620,8 +636,8 @@ const qs = {
|
|
|
620
636
|
templateItems: {}
|
|
621
637
|
},
|
|
622
638
|
emits: ["update:poItems", "update:forecastAmounts"],
|
|
623
|
-
setup(g, { emit:
|
|
624
|
-
const
|
|
639
|
+
setup(g, { emit: w }) {
|
|
640
|
+
const l = g, p = w, x = q(!1), t = q(7), f = Yt(), F = De(), { t: I } = ge();
|
|
625
641
|
function v(a, i, h) {
|
|
626
642
|
return i != null && a < i && (a = i), h != null && a > h && (a = h), a;
|
|
627
643
|
}
|
|
@@ -634,22 +650,22 @@ const qs = {
|
|
|
634
650
|
code: i,
|
|
635
651
|
name: h,
|
|
636
652
|
baseAmount: _,
|
|
637
|
-
measurement:
|
|
638
|
-
min:
|
|
653
|
+
measurement: C,
|
|
654
|
+
min: r,
|
|
639
655
|
max: c
|
|
640
656
|
}) {
|
|
641
|
-
if (
|
|
642
|
-
const D =
|
|
657
|
+
if (C) {
|
|
658
|
+
const D = C.conversion.amount;
|
|
643
659
|
let B = Math.ceil(_ / D);
|
|
644
|
-
return B = v(B,
|
|
660
|
+
return B = v(B, r, c), {
|
|
645
661
|
sku: a,
|
|
646
662
|
code: i,
|
|
647
663
|
name: h,
|
|
648
664
|
quantity: { amount: B, precision: 0 },
|
|
649
|
-
measurement:
|
|
665
|
+
measurement: C
|
|
650
666
|
};
|
|
651
667
|
} else {
|
|
652
|
-
const D = Math.ceil(v(_,
|
|
668
|
+
const D = Math.ceil(v(_, r, c));
|
|
653
669
|
return {
|
|
654
670
|
sku: a,
|
|
655
671
|
code: i,
|
|
@@ -661,7 +677,7 @@ const qs = {
|
|
|
661
677
|
}
|
|
662
678
|
async function k() {
|
|
663
679
|
if (t.value < 1) return;
|
|
664
|
-
x.value = !1, await f.readPurchaseOrder(t.value,
|
|
680
|
+
x.value = !1, await f.readPurchaseOrder(t.value, l.templateId);
|
|
665
681
|
const a = f.purchaseOrderForecast.skus;
|
|
666
682
|
if (a.length === 0) {
|
|
667
683
|
F.open({
|
|
@@ -670,40 +686,40 @@ const qs = {
|
|
|
670
686
|
});
|
|
671
687
|
return;
|
|
672
688
|
}
|
|
673
|
-
const i =
|
|
689
|
+
const i = l.templateItems.reduce((_, C) => {
|
|
674
690
|
var B;
|
|
675
|
-
const
|
|
691
|
+
const r = (B = l.poItems) == null ? void 0 : B.find((Y) => Y.sku._id === C.sku._id), c = a.find((Y) => Y.id === C.sku._id);
|
|
676
692
|
if (!c)
|
|
677
|
-
return
|
|
678
|
-
if (!
|
|
679
|
-
const D = c.amount ?? e(
|
|
693
|
+
return r && _.push(r), _;
|
|
694
|
+
if (!l.templateId && c.amount <= 0) return _;
|
|
695
|
+
const D = c.amount ?? e(r == null ? void 0 : r.quantity) ?? 0;
|
|
680
696
|
return _.push(
|
|
681
697
|
u({
|
|
682
|
-
sku:
|
|
683
|
-
code:
|
|
684
|
-
name:
|
|
698
|
+
sku: C.sku,
|
|
699
|
+
code: C.code,
|
|
700
|
+
name: C.name,
|
|
685
701
|
baseAmount: D,
|
|
686
|
-
measurement:
|
|
687
|
-
min: e(
|
|
688
|
-
max: e(
|
|
702
|
+
measurement: C.measurement || null,
|
|
703
|
+
min: e(C.minimumQuantity),
|
|
704
|
+
max: e(C.maximumQuantity)
|
|
689
705
|
})
|
|
690
706
|
), _;
|
|
691
707
|
}, []), h = a.map((_) => {
|
|
692
|
-
const
|
|
693
|
-
let
|
|
694
|
-
if (
|
|
695
|
-
const
|
|
696
|
-
|
|
708
|
+
const C = l.templateItems.find((Q) => Q.sku._id === _.id);
|
|
709
|
+
let r = _.amount, c = 0;
|
|
710
|
+
if (C != null && C.measurement) {
|
|
711
|
+
const Q = e(C.measurement.conversion) ?? 1;
|
|
712
|
+
r = Math.ceil(_.amount / Q);
|
|
697
713
|
} else
|
|
698
|
-
|
|
699
|
-
const D = e(
|
|
700
|
-
return { skuId: _.id, amount:
|
|
714
|
+
r = Math.ceil(_.amount);
|
|
715
|
+
const D = e(C == null ? void 0 : C.minimumQuantity) ?? 0, B = e(C == null ? void 0 : C.maximumQuantity) ?? 1 / 0, Y = r < D || r > B ? "error" : "success";
|
|
716
|
+
return { skuId: _.id, amount: r, precision: c, helperState: Y };
|
|
701
717
|
});
|
|
702
718
|
p("update:poItems", i), p("update:forecastAmounts", h);
|
|
703
719
|
}
|
|
704
720
|
return (a, i) => {
|
|
705
|
-
const h = $("FmButton"), _ = $("FmIcon"),
|
|
706
|
-
return
|
|
721
|
+
const h = $("FmButton"), _ = $("FmIcon"), C = $("FmStepperField"), r = $("FmPopover");
|
|
722
|
+
return S(), W(r, {
|
|
707
723
|
disabled: a.disabled,
|
|
708
724
|
class: "flex",
|
|
709
725
|
"show-popover": x.value,
|
|
@@ -731,10 +747,10 @@ const qs = {
|
|
|
731
747
|
}, 8, ["text-color", "border-color", "disabled"])
|
|
732
748
|
]),
|
|
733
749
|
default: A(() => [
|
|
734
|
-
n("div",
|
|
735
|
-
n("div",
|
|
750
|
+
n("div", Ys, [
|
|
751
|
+
n("div", Qs, [
|
|
736
752
|
n("div", Ks, [
|
|
737
|
-
y(
|
|
753
|
+
y(cs, { "z-index": 99 }, {
|
|
738
754
|
default: A(() => [
|
|
739
755
|
n("p", Xs, M(s(I)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
740
756
|
]),
|
|
@@ -748,7 +764,7 @@ const qs = {
|
|
|
748
764
|
onClick: i[0] || (i[0] = (c) => x.value = !1)
|
|
749
765
|
})
|
|
750
766
|
]),
|
|
751
|
-
y(
|
|
767
|
+
y(C, {
|
|
752
768
|
modelValue: t.value,
|
|
753
769
|
"onUpdate:modelValue": i[1] || (i[1] = (c) => t.value = c),
|
|
754
770
|
label: s(I)("inventory.transfer.form.items.forecastStock.days"),
|
|
@@ -761,12 +777,12 @@ const qs = {
|
|
|
761
777
|
size: "sm",
|
|
762
778
|
class: "text-fm-color-system-warning-300"
|
|
763
779
|
}),
|
|
764
|
-
n("div",
|
|
780
|
+
n("div", Gs, M(s(I)("inventory.transfer.form.items.forecastStock.replace")), 1)
|
|
765
781
|
])
|
|
766
782
|
]),
|
|
767
783
|
_: 1
|
|
768
784
|
}, 8, ["modelValue", "label", "rules"]),
|
|
769
|
-
n("div",
|
|
785
|
+
n("div", Js, [
|
|
770
786
|
i[4] || (i[4] = n("div", { class: "grow" }, null, -1)),
|
|
771
787
|
y(h, {
|
|
772
788
|
label: s(I)("common.cancel"),
|
|
@@ -786,32 +802,32 @@ const qs = {
|
|
|
786
802
|
}
|
|
787
803
|
});
|
|
788
804
|
function eo() {
|
|
789
|
-
const g = De(),
|
|
790
|
-
be(
|
|
805
|
+
const g = De(), w = nt(), l = q(!1);
|
|
806
|
+
be(l, (f) => {
|
|
791
807
|
f && (x.value = !0, p().finally(() => {
|
|
792
808
|
x.value = !1;
|
|
793
809
|
}));
|
|
794
810
|
});
|
|
795
811
|
async function p() {
|
|
796
812
|
try {
|
|
797
|
-
const { startDate: f, endDate: F } =
|
|
813
|
+
const { startDate: f, endDate: F } = us(6), e = (await w.getPurchaseOrders({ start: f, end: F })).filter(
|
|
798
814
|
(u) => {
|
|
799
815
|
var k, a;
|
|
800
|
-
return u.status ===
|
|
816
|
+
return u.status === Rt.enum.COMPLETE && ((k = u.supplier) == null ? void 0 : k.internal) !== "warehouse" && ((a = u.supplier) == null ? void 0 : a.internal) !== "restaurant";
|
|
801
817
|
}
|
|
802
818
|
).reduce((u, k) => {
|
|
803
|
-
const a = new Date(
|
|
819
|
+
const a = new Date(At(k._id)), i = k.supplier._id;
|
|
804
820
|
for (const h of k.items) {
|
|
805
821
|
if (!h.totalCost) continue;
|
|
806
|
-
const _ = u[h.sku._id] ?? {},
|
|
807
|
-
|
|
822
|
+
const _ = u[h.sku._id] ?? {}, C = _[i] ?? [];
|
|
823
|
+
C.push({
|
|
808
824
|
date: a.toISOString(),
|
|
809
825
|
totalUnit: h.quantity,
|
|
810
826
|
totalCost: h.totalCost,
|
|
811
827
|
unit: h.sku.unit,
|
|
812
828
|
measurement: h.measurement,
|
|
813
829
|
seqNumber: k.seqNumber
|
|
814
|
-
}), _[i] =
|
|
830
|
+
}), _[i] = C, u[h.sku._id] = _;
|
|
815
831
|
}
|
|
816
832
|
return u;
|
|
817
833
|
}, {});
|
|
@@ -820,12 +836,12 @@ function eo() {
|
|
|
820
836
|
g.open({
|
|
821
837
|
title: "Something went wrong",
|
|
822
838
|
message: "Cannot retrieve supplier purchase history. Please try again."
|
|
823
|
-
}),
|
|
839
|
+
}), l.value = !1;
|
|
824
840
|
}
|
|
825
841
|
}
|
|
826
842
|
const x = q(!1), t = q({});
|
|
827
843
|
return {
|
|
828
|
-
comparePricesToggle:
|
|
844
|
+
comparePricesToggle: l,
|
|
829
845
|
comparePriceFetching: x,
|
|
830
846
|
comparePriceBySku: t
|
|
831
847
|
};
|
|
@@ -841,26 +857,26 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
841
857
|
},
|
|
842
858
|
emits: ["update:item"],
|
|
843
859
|
setup(g) {
|
|
844
|
-
function
|
|
845
|
-
return
|
|
860
|
+
function w(l) {
|
|
861
|
+
return l.column.columnDef.meta;
|
|
846
862
|
}
|
|
847
|
-
return (
|
|
863
|
+
return (l, p) => {
|
|
848
864
|
var x, t;
|
|
849
|
-
return
|
|
865
|
+
return S(), T(de, null, [
|
|
850
866
|
n("tr", {
|
|
851
|
-
class:
|
|
852
|
-
"bg-fm-color-neutral-gray-100":
|
|
867
|
+
class: J(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
|
|
868
|
+
"bg-fm-color-neutral-gray-100": l.row.getIsSelected()
|
|
853
869
|
}])
|
|
854
870
|
}, [
|
|
855
|
-
(
|
|
871
|
+
(S(!0), T(de, null, Se(l.row.getVisibleCells(), (f) => {
|
|
856
872
|
var F, I, v, e;
|
|
857
|
-
return
|
|
873
|
+
return S(), T("td", {
|
|
858
874
|
key: f.id,
|
|
859
|
-
class:
|
|
875
|
+
class: J(["h-[56px] text-fm-color-typo-primary", ((F = w(f)) == null ? void 0 : F.cellClass) ?? "px-16"]),
|
|
860
876
|
style: _t({
|
|
861
|
-
width: (I =
|
|
862
|
-
maxWidth: (v =
|
|
863
|
-
textAlign: ((e =
|
|
877
|
+
width: (I = w(f)) == null ? void 0 : I.width,
|
|
878
|
+
maxWidth: (v = w(f)) == null ? void 0 : v.maxWidth,
|
|
879
|
+
textAlign: ((e = w(f)) == null ? void 0 : e.textAlign) ?? "left"
|
|
864
880
|
})
|
|
865
881
|
}, [
|
|
866
882
|
n("span", to, [
|
|
@@ -872,12 +888,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
872
888
|
], 6);
|
|
873
889
|
}), 128))
|
|
874
890
|
], 2),
|
|
875
|
-
|
|
891
|
+
l.showComparePrice && Object.keys(l.comparePriceBySku[(x = l.row.original.sku) == null ? void 0 : x._id] ?? {}).length > 0 ? (S(), T("tr", so, [
|
|
876
892
|
n("td", {
|
|
877
|
-
colspan:
|
|
893
|
+
colspan: l.row.getVisibleCells().length
|
|
878
894
|
}, [
|
|
879
895
|
y(Ft, {
|
|
880
|
-
prices:
|
|
896
|
+
prices: l.comparePriceBySku[(t = l.row.original.sku) == null ? void 0 : t._id]
|
|
881
897
|
}, null, 8, ["prices"])
|
|
882
898
|
], 8, oo)
|
|
883
899
|
])) : j("", !0)
|
|
@@ -887,7 +903,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
887
903
|
}), no = {
|
|
888
904
|
key: 0,
|
|
889
905
|
class: "flex flex-col gap-8"
|
|
890
|
-
},
|
|
906
|
+
}, ro = { class: "flex flex-col gap-4" }, lo = { class: "flex items-center gap-4" }, io = {
|
|
891
907
|
key: 0,
|
|
892
908
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
893
909
|
}, uo = /* @__PURE__ */ ce({
|
|
@@ -901,8 +917,8 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
901
917
|
onChange: { type: Function }
|
|
902
918
|
},
|
|
903
919
|
emits: ["netsuite:ready"],
|
|
904
|
-
setup(g, { emit:
|
|
905
|
-
const
|
|
920
|
+
setup(g, { emit: w }) {
|
|
921
|
+
const l = Ue(), p = g, x = w, { t } = ms(), f = q(!1), F = q();
|
|
906
922
|
Ke(() => {
|
|
907
923
|
var u, k, a, i;
|
|
908
924
|
let e = {
|
|
@@ -910,12 +926,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
910
926
|
subsidiary: { id: "", name: "" },
|
|
911
927
|
errors: []
|
|
912
928
|
};
|
|
913
|
-
if (!
|
|
929
|
+
if (!l.isEnabled || !p.required) {
|
|
914
930
|
x("netsuite:ready", e);
|
|
915
931
|
return;
|
|
916
932
|
}
|
|
917
933
|
try {
|
|
918
|
-
const h =
|
|
934
|
+
const h = l.currentLocationSubsidiary();
|
|
919
935
|
p.setting ? e = {
|
|
920
936
|
...p.setting,
|
|
921
937
|
subsidiary: {
|
|
@@ -929,42 +945,42 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
929
945
|
name: h.name
|
|
930
946
|
}
|
|
931
947
|
};
|
|
932
|
-
const _ =
|
|
933
|
-
if (
|
|
934
|
-
const c =
|
|
935
|
-
|
|
948
|
+
const _ = l.getAvailableItems(h.id), C = p.items.filter((r) => {
|
|
949
|
+
if (r.measurement != null) {
|
|
950
|
+
const c = l.getAvailableMeasurements(
|
|
951
|
+
r.sku._id,
|
|
936
952
|
h.id
|
|
937
953
|
);
|
|
938
|
-
return _.includes(
|
|
954
|
+
return _.includes(r.sku._id) && c.includes(r.measurement.id);
|
|
939
955
|
}
|
|
940
|
-
return _.includes(
|
|
941
|
-
}).map((
|
|
956
|
+
return _.includes(r.sku._id);
|
|
957
|
+
}).map((r) => r.sku._id);
|
|
942
958
|
p.onChange(
|
|
943
|
-
p.items.filter((
|
|
959
|
+
p.items.filter((r) => C.includes(r.sku._id)),
|
|
944
960
|
e
|
|
945
961
|
);
|
|
946
962
|
} finally {
|
|
947
|
-
p.supplier.internal ? F.value =
|
|
963
|
+
p.supplier.internal ? F.value = l.getNetSuiteLocation(
|
|
948
964
|
`${p.supplier.internal}_${p.supplier._id}`
|
|
949
|
-
) : F.value =
|
|
950
|
-
const h = p.supplier.internal ?
|
|
951
|
-
!
|
|
965
|
+
) : F.value = l.getNetSuiteVendor(p.supplier._id);
|
|
966
|
+
const h = p.supplier.internal ? l.getLocationSubsidiary((u = F.value) == null ? void 0 : u.netSuiteId).id : (k = F.value) == null ? void 0 : k.subsidiaryId, _ = p.supplier.internal ? (a = l.currentLocationSubsidiary()) == null ? void 0 : a.id : (i = l.currentVendorSubsidiary(p.supplier._id)) == null ? void 0 : i.id;
|
|
967
|
+
!l.isEnabled || h && l.isEnabled && h == _ ? x("netsuite:ready", e) : f.value = !0;
|
|
952
968
|
}
|
|
953
969
|
});
|
|
954
|
-
const I =
|
|
955
|
-
() => p.supplier.internal ?
|
|
956
|
-
), v =
|
|
970
|
+
const I = N(
|
|
971
|
+
() => p.supplier.internal ? l.currentLocationSubsidiary() : l.currentVendorSubsidiary(p.supplier._id)
|
|
972
|
+
), v = N(() => {
|
|
957
973
|
var e, u;
|
|
958
974
|
return F.value == null ? `Cannot find the NetSuite location for "${p.supplier.name}"` : `The subsidiary of the request
|
|
959
|
-
location is ${(u =
|
|
975
|
+
location is ${(u = l.getLocationSubsidiary((e = F.value) == null ? void 0 : e.netSuiteId)) == null ? void 0 : u.fullName}`;
|
|
960
976
|
});
|
|
961
977
|
return (e, u) => {
|
|
962
978
|
const k = $("FmLabel"), a = $("FmIcon"), i = $("FmField"), h = $("FmTooltip");
|
|
963
|
-
return s(
|
|
979
|
+
return s(l).isEnabled && p.required ? (S(), T("div", no, [
|
|
964
980
|
y(k, {
|
|
965
981
|
label: `NetSuite ${s(t)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
966
982
|
}, null, 8, ["label"]),
|
|
967
|
-
n("div",
|
|
983
|
+
n("div", ro, [
|
|
968
984
|
y(h, {
|
|
969
985
|
"z-index": 51,
|
|
970
986
|
placement: "left",
|
|
@@ -978,14 +994,14 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
978
994
|
default: A(() => {
|
|
979
995
|
var _;
|
|
980
996
|
return [
|
|
981
|
-
n("div",
|
|
997
|
+
n("div", lo, [
|
|
982
998
|
y(a, {
|
|
983
999
|
name: "lock_outline",
|
|
984
1000
|
size: "sm",
|
|
985
1001
|
color: e.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
986
1002
|
}, null, 8, ["color"]),
|
|
987
1003
|
n("div", {
|
|
988
|
-
class:
|
|
1004
|
+
class: J([e.disabled ? "text-fm-color-typo-disabled" : ""])
|
|
989
1005
|
}, M((_ = I.value) == null ? void 0 : _.fullName), 3)
|
|
990
1006
|
])
|
|
991
1007
|
];
|
|
@@ -995,7 +1011,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
995
1011
|
]),
|
|
996
1012
|
_: 1
|
|
997
1013
|
}, 8, ["disabled"]),
|
|
998
|
-
f.value ? (
|
|
1014
|
+
f.value ? (S(), T("div", io, M(v.value), 1)) : j("", !0)
|
|
999
1015
|
])
|
|
1000
1016
|
])) : j("", !0);
|
|
1001
1017
|
};
|
|
@@ -1020,15 +1036,15 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1020
1036
|
lastClosingDate: {}
|
|
1021
1037
|
},
|
|
1022
1038
|
emits: ["validation-success", "form:ready"],
|
|
1023
|
-
setup(g, { expose:
|
|
1024
|
-
const p = g, x =
|
|
1039
|
+
setup(g, { expose: w, emit: l }) {
|
|
1040
|
+
const p = g, x = l, t = St(), { t: f } = ge(), F = We(), I = et(), v = Ue(), e = ot(), u = st(), k = Ct(), { breakpoints: a } = tt(), i = N(() => a.value.xs || a.value.sm), h = gt({
|
|
1025
1041
|
value: !1
|
|
1026
|
-
}), _ = q(!1),
|
|
1042
|
+
}), _ = q(!1), C = q(0), r = q([]), c = N(
|
|
1027
1043
|
() => {
|
|
1028
1044
|
var o;
|
|
1029
1045
|
return ((o = p.modelValue) == null ? void 0 : o.templateDoc) ?? k.templates.find((m) => m._id === t.template);
|
|
1030
1046
|
}
|
|
1031
|
-
), D =
|
|
1047
|
+
), D = N(() => t.status === "DRAFT" || !t._rev);
|
|
1032
1048
|
be(c, (o) => {
|
|
1033
1049
|
var m, E;
|
|
1034
1050
|
if (o) {
|
|
@@ -1037,27 +1053,27 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1037
1053
|
if (D.value) {
|
|
1038
1054
|
const H = (m = o.purchaseOrder) == null ? void 0 : m.supplier.internal;
|
|
1039
1055
|
if (H && (H == "restaurant" || H == "warehouse")) {
|
|
1040
|
-
const ne = (E = o.purchaseOrder) == null ? void 0 : E.supplier._id, me = `${H}_${ne}`,
|
|
1041
|
-
(
|
|
1056
|
+
const ne = (E = o.purchaseOrder) == null ? void 0 : E.supplier._id, me = `${H}_${ne}`, G = F.allLocations.find(
|
|
1057
|
+
(re) => re.type === H && re.dbName === me
|
|
1042
1058
|
);
|
|
1043
|
-
if (
|
|
1044
|
-
const
|
|
1059
|
+
if (G) {
|
|
1060
|
+
const re = {
|
|
1045
1061
|
...o.purchaseOrder.supplier,
|
|
1046
|
-
name:
|
|
1047
|
-
contactName:
|
|
1048
|
-
email:
|
|
1049
|
-
phoneNumber:
|
|
1050
|
-
registrationNumber:
|
|
1051
|
-
address:
|
|
1052
|
-
preparationTime:
|
|
1062
|
+
name: G.doc.profile.name,
|
|
1063
|
+
contactName: G.doc.profile.name,
|
|
1064
|
+
email: G.doc.profile.email,
|
|
1065
|
+
phoneNumber: G.doc.profile.phoneNo,
|
|
1066
|
+
registrationNumber: G.doc.profile.regNo,
|
|
1067
|
+
address: G.doc.profile.address,
|
|
1068
|
+
preparationTime: G.preparationTime
|
|
1053
1069
|
};
|
|
1054
|
-
t.supplier =
|
|
1070
|
+
t.supplier = re;
|
|
1055
1071
|
}
|
|
1056
1072
|
} else {
|
|
1057
1073
|
const ne = e.suppliers.find(
|
|
1058
1074
|
(me) => {
|
|
1059
|
-
var
|
|
1060
|
-
return me._id === ((
|
|
1075
|
+
var G;
|
|
1076
|
+
return me._id === ((G = o.purchaseOrder.supplier) == null ? void 0 : G._id);
|
|
1061
1077
|
}
|
|
1062
1078
|
);
|
|
1063
1079
|
t.supplier = ne ?? t.supplier;
|
|
@@ -1078,20 +1094,20 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1078
1094
|
}), be([_, h], ([o, m], [E, H]) => {
|
|
1079
1095
|
m.value && H.value && x("form:ready");
|
|
1080
1096
|
});
|
|
1081
|
-
const B =
|
|
1082
|
-
() => F.currentLocation.type ===
|
|
1097
|
+
const B = N(
|
|
1098
|
+
() => F.currentLocation.type === Et.restaurant
|
|
1083
1099
|
);
|
|
1084
1100
|
F.watchLocation(async () => {
|
|
1085
1101
|
location && (t.supplier || (t.supplier = e.suppliers.find((o) => o) ?? t.supplier));
|
|
1086
1102
|
});
|
|
1087
|
-
const
|
|
1103
|
+
const Y = Wt(), Q = ns(
|
|
1088
1104
|
() => t,
|
|
1089
1105
|
(o) => {
|
|
1090
1106
|
Object.assign(t, o);
|
|
1091
1107
|
},
|
|
1092
1108
|
!0,
|
|
1093
1109
|
!0
|
|
1094
|
-
), K =
|
|
1110
|
+
), K = N({
|
|
1095
1111
|
get() {
|
|
1096
1112
|
var o;
|
|
1097
1113
|
return typeof ((o = t == null ? void 0 : t.supplier) == null ? void 0 : o.internal) == "string" ? ae.TRANSFER : ae.PURCHASE;
|
|
@@ -1099,7 +1115,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1099
1115
|
set(o) {
|
|
1100
1116
|
var E;
|
|
1101
1117
|
const m = typeof ((E = t == null ? void 0 : t.supplier) == null ? void 0 : E.internal) == "string" ? ae.TRANSFER : ae.PURCHASE;
|
|
1102
|
-
o !== m && (t.supplier = o === ae.PURCHASE ?
|
|
1118
|
+
o !== m && (t.supplier = o === ae.PURCHASE ? Q.locationOptionsTypePurchase.value[0] : Q.locationOptionsTypeTransfer.value[0]);
|
|
1103
1119
|
}
|
|
1104
1120
|
});
|
|
1105
1121
|
be(
|
|
@@ -1110,28 +1126,28 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1110
1126
|
(o) => {
|
|
1111
1127
|
u.mustUsePoTemplate && !o && It(() => {
|
|
1112
1128
|
var m, E;
|
|
1113
|
-
t.supplier = ((E = (m =
|
|
1129
|
+
t.supplier = ((E = (m = Q.locationOptionsTypeTransfer.value) == null ? void 0 : m.filter(
|
|
1114
1130
|
(H) => H.internal === "restaurant"
|
|
1115
1131
|
)) == null ? void 0 : E[0]) ?? t.supplier;
|
|
1116
1132
|
});
|
|
1117
1133
|
},
|
|
1118
1134
|
{ immediate: !0 }
|
|
1119
1135
|
);
|
|
1120
|
-
const O =
|
|
1121
|
-
let o =
|
|
1136
|
+
const O = N(() => {
|
|
1137
|
+
let o = Q.transferLocationOptions.value;
|
|
1122
1138
|
return u.mustUsePoTemplate && !t.template && (o = o.filter((m) => {
|
|
1123
1139
|
var E;
|
|
1124
1140
|
return (E = m.sublabel) == null ? void 0 : E.startsWith("restaurant");
|
|
1125
1141
|
})), o;
|
|
1126
|
-
}),
|
|
1142
|
+
}), U = N({
|
|
1127
1143
|
get() {
|
|
1128
1144
|
var o;
|
|
1129
1145
|
return (o = t.supplier) == null ? void 0 : o._id;
|
|
1130
1146
|
},
|
|
1131
1147
|
set(o) {
|
|
1132
|
-
|
|
1148
|
+
Q.transferLocationModel.value = o;
|
|
1133
1149
|
}
|
|
1134
|
-
}), V =
|
|
1150
|
+
}), V = N({
|
|
1135
1151
|
get() {
|
|
1136
1152
|
return t.remark ?? void 0;
|
|
1137
1153
|
},
|
|
@@ -1145,24 +1161,24 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1145
1161
|
setEffectiveAt(o) {
|
|
1146
1162
|
t.effectiveAt = o;
|
|
1147
1163
|
}
|
|
1148
|
-
}), { comparePricesToggle: Z, comparePriceFetching: he, comparePriceBySku: ke } = eo(),
|
|
1149
|
-
|
|
1164
|
+
}), { comparePricesToggle: Z, comparePriceFetching: he, comparePriceBySku: ke } = eo(), le = q();
|
|
1165
|
+
w({
|
|
1150
1166
|
validateInputs: () => {
|
|
1151
1167
|
var o, m;
|
|
1152
|
-
(m = (o =
|
|
1168
|
+
(m = (o = le.value) == null ? void 0 : o.validateInputs) == null || m.call(o);
|
|
1153
1169
|
},
|
|
1154
1170
|
resetInputsValidation: () => {
|
|
1155
1171
|
var o, m;
|
|
1156
|
-
(m = (o =
|
|
1172
|
+
(m = (o = le.value) == null ? void 0 : o.resetInputsValidation) == null || m.call(o);
|
|
1157
1173
|
},
|
|
1158
1174
|
resetInputs: () => {
|
|
1159
1175
|
var o, m;
|
|
1160
|
-
(m = (o =
|
|
1176
|
+
(m = (o = le.value) == null ? void 0 : o.resetInputs) == null || m.call(o);
|
|
1161
1177
|
}
|
|
1162
1178
|
});
|
|
1163
|
-
const we =
|
|
1179
|
+
const we = N(() => ({
|
|
1164
1180
|
updateItem: (o) => {
|
|
1165
|
-
const m =
|
|
1181
|
+
const m = Ot.parse(o);
|
|
1166
1182
|
t.items = t.items.map((E) => E.id && E.id !== o.id || !E.id && E.sku._id !== o.sku._id ? E : m);
|
|
1167
1183
|
},
|
|
1168
1184
|
deleteItem: (o) => {
|
|
@@ -1170,7 +1186,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1170
1186
|
(m) => m.id ? m.id !== o.id : m.sku._id !== o.sku._id
|
|
1171
1187
|
);
|
|
1172
1188
|
}
|
|
1173
|
-
})),
|
|
1189
|
+
})), Ne = _s({
|
|
1174
1190
|
updateItem: (o) => we.value.updateItem(o),
|
|
1175
1191
|
deleteItem: (o) => we.value.deleteItem(o),
|
|
1176
1192
|
get supplier() {
|
|
@@ -1189,12 +1205,12 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1189
1205
|
return p.disabled;
|
|
1190
1206
|
},
|
|
1191
1207
|
get forecastAmounts() {
|
|
1192
|
-
return
|
|
1208
|
+
return r.value;
|
|
1193
1209
|
}
|
|
1194
|
-
}), Be =
|
|
1210
|
+
}), Be = N(() => Ne.columnDefs.value);
|
|
1195
1211
|
function ze() {
|
|
1196
|
-
var
|
|
1197
|
-
const o = (He = (Fe = (
|
|
1212
|
+
var re, Fe, He, Ae, je;
|
|
1213
|
+
const o = (He = (Fe = (re = c.value) == null ? void 0 : re.purchaseOrder) == null ? void 0 : Fe.items) == null ? void 0 : He.groupBy((z) => z.sku._id), m = v.isEnabled ? v.getAvailableItems((je = (Ae = t.netSuite) == null ? void 0 : Ae.subsidiary) == null ? void 0 : je.id) : [], E = o != null && o.size ? I.skus.filter((z) => o.has(z._id)) : I.skus, H = v.isEnabled ? E.filter((z) => {
|
|
1198
1214
|
var ie, se, ue, pe;
|
|
1199
1215
|
const ee = (se = (ie = c.value) == null ? void 0 : ie.purchaseOrder) == null ? void 0 : se.items.find(
|
|
1200
1216
|
(ve) => ve.sku._id === z._id
|
|
@@ -1221,7 +1237,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1221
1237
|
), me = ne.filter((z) => {
|
|
1222
1238
|
var ee;
|
|
1223
1239
|
return (ee = t.items) == null ? void 0 : ee.find((ie) => ie.sku._id === z.value._id);
|
|
1224
|
-
}).map((z) => z.value),
|
|
1240
|
+
}).map((z) => z.value), G = [
|
|
1225
1241
|
{
|
|
1226
1242
|
type: "string",
|
|
1227
1243
|
key: "tags",
|
|
@@ -1229,15 +1245,15 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1229
1245
|
values: ["Inactive", "Active"]
|
|
1230
1246
|
}
|
|
1231
1247
|
];
|
|
1232
|
-
|
|
1248
|
+
Y.open({
|
|
1233
1249
|
title: f("inventory.transfer.form.items.selectItem"),
|
|
1234
1250
|
closeButton: !0,
|
|
1235
|
-
contentComponent:
|
|
1251
|
+
contentComponent: ls,
|
|
1236
1252
|
contentComponentProps: {
|
|
1237
1253
|
modelValue: me,
|
|
1238
1254
|
items: ne,
|
|
1239
1255
|
virtualScroll: !0,
|
|
1240
|
-
filterAttributes:
|
|
1256
|
+
filterAttributes: G
|
|
1241
1257
|
},
|
|
1242
1258
|
primaryActions: {
|
|
1243
1259
|
text: f("common.confirm"),
|
|
@@ -1284,7 +1300,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1284
1300
|
function Pe(o) {
|
|
1285
1301
|
return o;
|
|
1286
1302
|
}
|
|
1287
|
-
const Le =
|
|
1303
|
+
const Le = N(() => {
|
|
1288
1304
|
var o;
|
|
1289
1305
|
return c.value ? ((o = c.value) == null ? void 0 : o.purchaseOrder.items) || [] : I.skus.map((m) => ({
|
|
1290
1306
|
quantity: {
|
|
@@ -1300,7 +1316,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1300
1316
|
},
|
|
1301
1317
|
measurement: m.trackingMeasurement ? m.unit.measurements.find((E) => E.id === m.trackingMeasurement) : null
|
|
1302
1318
|
}));
|
|
1303
|
-
}), Ve =
|
|
1319
|
+
}), Ve = N(() => {
|
|
1304
1320
|
const o = [];
|
|
1305
1321
|
return (!u.mustUsePoTemplate || u.mustUsePoTemplate && t.template) && o.push({
|
|
1306
1322
|
label: f("inventory.transfer.form.type.purchase"),
|
|
@@ -1309,16 +1325,16 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1309
1325
|
label: f("inventory.transfer.form.type.transfer"),
|
|
1310
1326
|
value: ae.TRANSFER
|
|
1311
1327
|
}), o;
|
|
1312
|
-
}), Re =
|
|
1328
|
+
}), Re = N(() => {
|
|
1313
1329
|
var o;
|
|
1314
1330
|
return (o = p.modelValue) == null ? void 0 : o.items.every((m) => m.quantity.amount <= 0);
|
|
1315
1331
|
});
|
|
1316
1332
|
return (o, m) => {
|
|
1317
1333
|
var pe, ve;
|
|
1318
|
-
const E = $("FmChip"), H = $("FmLabel"), ne = $("FmIcon"), me = $("FmField"),
|
|
1319
|
-
return
|
|
1334
|
+
const E = $("FmChip"), H = $("FmLabel"), ne = $("FmIcon"), me = $("FmField"), G = $("FmTooltip"), re = $("FmSelect"), Fe = $("FmTextField"), He = $("FmTextarea"), Ae = $("FmSwitch"), je = $("FmDatePicker"), z = $("FmTimePicker"), ee = $("FmFormGroup"), ie = $("FmButton"), se = $("FmTable"), ue = $("FmForm");
|
|
1335
|
+
return S(), T("div", co, [
|
|
1320
1336
|
n("div", mo, [
|
|
1321
|
-
(pe = p.modelValue) != null && pe.template ? (
|
|
1337
|
+
(pe = p.modelValue) != null && pe.template ? (S(), W(E, {
|
|
1322
1338
|
key: 0,
|
|
1323
1339
|
variant: o.disabled ? "warning" : void 0,
|
|
1324
1340
|
label: `${s(f)("inventory.transfer.template.title")}: ${((ve = c.value) == null ? void 0 : ve.name) ?? s(f)("inventory.transfer.form.loading")}`,
|
|
@@ -1330,33 +1346,33 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1330
1346
|
icon: "storefront",
|
|
1331
1347
|
compact: ""
|
|
1332
1348
|
}, null, 8, ["label"]),
|
|
1333
|
-
o.lastClosingDate ? (
|
|
1349
|
+
o.lastClosingDate ? (S(), W(E, {
|
|
1334
1350
|
key: 1,
|
|
1335
|
-
label: `${s(f)("inventory.transfer.form.lastClosing")}: ${s(
|
|
1351
|
+
label: `${s(f)("inventory.transfer.form.lastClosing")}: ${s(at)(o.lastClosingDate)} ${s(ds)(o.lastClosingDate)}`,
|
|
1336
1352
|
icon: "calendar_month",
|
|
1337
1353
|
compact: ""
|
|
1338
1354
|
}, null, 8, ["label"])) : j("", !0)
|
|
1339
1355
|
]),
|
|
1340
1356
|
y(ue, {
|
|
1341
1357
|
ref_key: "formRef",
|
|
1342
|
-
ref:
|
|
1358
|
+
ref: le,
|
|
1343
1359
|
class: "flex flex-col gap-32",
|
|
1344
1360
|
disabled: o.disabled,
|
|
1345
1361
|
onValidationFailed: console.log,
|
|
1346
1362
|
onValidationSuccess: m[14] || (m[14] = (Ie) => x("validation-success"))
|
|
1347
1363
|
}, {
|
|
1348
1364
|
default: A(() => {
|
|
1349
|
-
var Ie, _e,
|
|
1365
|
+
var Ie, _e, rt, lt, it, ut, dt, ct;
|
|
1350
1366
|
return [
|
|
1351
1367
|
n("div", po, [
|
|
1352
1368
|
n("div", fo, [
|
|
1353
|
-
(Ie = p.modelValue) != null && Ie.template ? (
|
|
1369
|
+
(Ie = p.modelValue) != null && Ie.template ? (S(), T(de, { key: 0 }, [
|
|
1354
1370
|
n("div", vo, [
|
|
1355
1371
|
y(H, {
|
|
1356
1372
|
label: s(f)("inventory.transfer.form.type.title")
|
|
1357
1373
|
}, null, 8, ["label"]),
|
|
1358
1374
|
n("div", yo, [
|
|
1359
|
-
y(
|
|
1375
|
+
y(G, {
|
|
1360
1376
|
"z-index": 51,
|
|
1361
1377
|
placement: "left",
|
|
1362
1378
|
disabled: o.disabled
|
|
@@ -1374,7 +1390,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1374
1390
|
color: o.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1375
1391
|
}, null, 8, ["color"]),
|
|
1376
1392
|
n("div", {
|
|
1377
|
-
class:
|
|
1393
|
+
class: J({ "text-fm-color-typo-disabled": o.disabled })
|
|
1378
1394
|
}, M(s(f)(`inventory.transfer.form.type.${K.value.toLocaleLowerCase("en-us")}`)), 3)
|
|
1379
1395
|
])
|
|
1380
1396
|
]),
|
|
@@ -1384,7 +1400,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1384
1400
|
_: 1
|
|
1385
1401
|
}, 8, ["disabled"]),
|
|
1386
1402
|
n("div", {
|
|
1387
|
-
class:
|
|
1403
|
+
class: J([
|
|
1388
1404
|
"fm-typo-en-body-sm-400",
|
|
1389
1405
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"
|
|
1390
1406
|
])
|
|
@@ -1396,7 +1412,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1396
1412
|
label: K.value === s(ae).PURCHASE ? s(f)("inventory.transfer.form.purchaseFrom") : s(f)("inventory.transfer.form.transferFrom")
|
|
1397
1413
|
}, null, 8, ["label"]),
|
|
1398
1414
|
n("div", _o, [
|
|
1399
|
-
y(
|
|
1415
|
+
y(G, {
|
|
1400
1416
|
"z-index": 51,
|
|
1401
1417
|
placement: "left",
|
|
1402
1418
|
disabled: o.disabled
|
|
@@ -1416,8 +1432,8 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1416
1432
|
color: o.disabled ? "neutral-gray-200" : "neutral-gray-400"
|
|
1417
1433
|
}, null, 8, ["color"]),
|
|
1418
1434
|
n("div", {
|
|
1419
|
-
class:
|
|
1420
|
-
}, M((P = O.value.find((oe) => oe.value ===
|
|
1435
|
+
class: J({ "text-fm-color-typo-disabled": o.disabled })
|
|
1436
|
+
}, M((P = O.value.find((oe) => oe.value === U.value)) == null ? void 0 : P.label), 3)
|
|
1421
1437
|
])
|
|
1422
1438
|
];
|
|
1423
1439
|
}),
|
|
@@ -1428,8 +1444,8 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1428
1444
|
}, 8, ["disabled"])
|
|
1429
1445
|
])
|
|
1430
1446
|
])
|
|
1431
|
-
], 64)) : (
|
|
1432
|
-
y(
|
|
1447
|
+
], 64)) : (S(), T(de, { key: 1 }, [
|
|
1448
|
+
y(re, {
|
|
1433
1449
|
label: s(f)("inventory.transfer.form.type.title"),
|
|
1434
1450
|
"label-mark": "required",
|
|
1435
1451
|
modelValue: K.value,
|
|
@@ -1439,26 +1455,26 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1439
1455
|
}, {
|
|
1440
1456
|
default: A(() => [
|
|
1441
1457
|
n("span", {
|
|
1442
|
-
class:
|
|
1458
|
+
class: J([
|
|
1443
1459
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1444
1460
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1445
1461
|
])
|
|
1446
|
-
}, M(s(
|
|
1462
|
+
}, M(s(Mt)(K.value)), 3)
|
|
1447
1463
|
]),
|
|
1448
1464
|
_: 1
|
|
1449
1465
|
}, 8, ["label", "modelValue", "items", "rules"]),
|
|
1450
|
-
y(
|
|
1466
|
+
y(re, {
|
|
1451
1467
|
label: K.value === s(ae).PURCHASE ? s(f)("inventory.transfer.form.purchaseFrom") : s(f)("inventory.transfer.form.transferFrom"),
|
|
1452
1468
|
"label-mark": "required",
|
|
1453
|
-
modelValue:
|
|
1454
|
-
"onUpdate:modelValue": m[1] || (m[1] = (P) =>
|
|
1469
|
+
modelValue: U.value,
|
|
1470
|
+
"onUpdate:modelValue": m[1] || (m[1] = (P) => U.value = P),
|
|
1455
1471
|
items: O.value,
|
|
1456
1472
|
rules: [s(qe)(1)(O.value)]
|
|
1457
1473
|
}, {
|
|
1458
1474
|
"menu-wrapper": A((P) => {
|
|
1459
1475
|
var oe, Ee;
|
|
1460
1476
|
return [
|
|
1461
|
-
y(
|
|
1477
|
+
y(rs, Ge(P, {
|
|
1462
1478
|
items: O.value,
|
|
1463
1479
|
"model-value": (Ee = (oe = o.modelValue) == null ? void 0 : oe.supplier) == null ? void 0 : Ee._id
|
|
1464
1480
|
}), null, 16, ["items", "model-value"])
|
|
@@ -1468,11 +1484,11 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1468
1484
|
var P;
|
|
1469
1485
|
return [
|
|
1470
1486
|
n("span", {
|
|
1471
|
-
class:
|
|
1487
|
+
class: J([
|
|
1472
1488
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
1473
1489
|
o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
1474
1490
|
])
|
|
1475
|
-
}, M((P = O.value.find((oe) => oe.value ===
|
|
1491
|
+
}, M((P = O.value.find((oe) => oe.value === U.value)) == null ? void 0 : P.label), 3)
|
|
1476
1492
|
];
|
|
1477
1493
|
}),
|
|
1478
1494
|
_: 1
|
|
@@ -1490,9 +1506,9 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1490
1506
|
"max-length": 240,
|
|
1491
1507
|
modelValue: V.value,
|
|
1492
1508
|
"onUpdate:modelValue": m[3] || (m[3] = (P) => V.value = P),
|
|
1493
|
-
class:
|
|
1509
|
+
class: J([o.disabled ? "text-fm-color-typo-disabled " : ""])
|
|
1494
1510
|
}, null, 8, ["label", "modelValue", "class"]),
|
|
1495
|
-
_.value ? (
|
|
1511
|
+
_.value ? (S(), W(uo, {
|
|
1496
1512
|
key: 2,
|
|
1497
1513
|
required: s(t).template != null,
|
|
1498
1514
|
disabled: o.disabled,
|
|
@@ -1506,9 +1522,9 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1506
1522
|
h.value = !0;
|
|
1507
1523
|
})
|
|
1508
1524
|
}, null, 8, ["required", "disabled", "supplier", "setting", "items", "onChange"])) : j("", !0),
|
|
1509
|
-
s(u).enableBackdatePo ? (
|
|
1525
|
+
s(u).enableBackdatePo ? (S(), T("div", ko, [
|
|
1510
1526
|
n("div", {
|
|
1511
|
-
class:
|
|
1527
|
+
class: J([
|
|
1512
1528
|
"flex",
|
|
1513
1529
|
{
|
|
1514
1530
|
"flex-col": i.value
|
|
@@ -1524,9 +1540,9 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1524
1540
|
disabled: B.value && !o.lastClosingDate || o.disabled
|
|
1525
1541
|
}, null, 8, ["modelValue", "label", "sublabel", "disabled"]),
|
|
1526
1542
|
n("div", {
|
|
1527
|
-
class:
|
|
1543
|
+
class: J({ hidden: i.value, "w-16": !i.value })
|
|
1528
1544
|
}, null, 2),
|
|
1529
|
-
s(b) ? (
|
|
1545
|
+
s(b) ? (S(), T("div", xo, [
|
|
1530
1546
|
n("div", Co, [
|
|
1531
1547
|
y(je, {
|
|
1532
1548
|
modelValue: s(R),
|
|
@@ -1541,13 +1557,13 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1541
1557
|
])
|
|
1542
1558
|
])) : j("", !0)
|
|
1543
1559
|
], 2),
|
|
1544
|
-
s(d) ? (
|
|
1560
|
+
s(d) ? (S(), W(ee, {
|
|
1545
1561
|
key: 0,
|
|
1546
1562
|
modelValue: s(d),
|
|
1547
1563
|
"onUpdate:modelValue": m[8] || (m[8] = (P) => xe(d) ? d.value = P : null),
|
|
1548
|
-
rules: [s(
|
|
1564
|
+
rules: [s(jt)(new Date(o.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1549
1565
|
}, null, 8, ["modelValue", "rules"])) : j("", !0),
|
|
1550
|
-
B.value && !o.lastClosingDate ? (
|
|
1566
|
+
B.value && !o.lastClosingDate ? (S(), T("div", wo, [
|
|
1551
1567
|
y(ne, {
|
|
1552
1568
|
name: "error",
|
|
1553
1569
|
size: "sm",
|
|
@@ -1564,7 +1580,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1564
1580
|
rules: [s(qe)(1)]
|
|
1565
1581
|
}, null, 8, ["model-value", "rules"]),
|
|
1566
1582
|
n("div", {
|
|
1567
|
-
class:
|
|
1583
|
+
class: J([
|
|
1568
1584
|
"flex gap-16",
|
|
1569
1585
|
{
|
|
1570
1586
|
"flex-col items-start": i.value,
|
|
@@ -1590,15 +1606,15 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1590
1606
|
"template-items": Le.value,
|
|
1591
1607
|
"po-items": s(t).items,
|
|
1592
1608
|
"onUpdate:forecastAmounts": m[10] || (m[10] = (P) => {
|
|
1593
|
-
|
|
1609
|
+
r.value = P;
|
|
1594
1610
|
}),
|
|
1595
1611
|
"onUpdate:poItems": m[11] || (m[11] = (P) => {
|
|
1596
|
-
s(t).items = P,
|
|
1612
|
+
s(t).items = P, C.value++;
|
|
1597
1613
|
})
|
|
1598
1614
|
}, null, 8, ["template-id", "template-items", "po-items"])
|
|
1599
1615
|
])
|
|
1600
1616
|
], 2),
|
|
1601
|
-
K.value === s(ae).PURCHASE && D.value && s(u).enableTotalCost && ((_e = o.modelValue) != null && _e.items.length) ? (
|
|
1617
|
+
K.value === s(ae).PURCHASE && D.value && s(u).enableTotalCost && ((_e = o.modelValue) != null && _e.items.length) ? (S(), T("div", Do, [
|
|
1602
1618
|
y(Ae, {
|
|
1603
1619
|
label: s(he) ? s(f)("inventory.transfer.form.items.fetchingData") : s(f)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1604
1620
|
"prepend-icon": "compare_arrows",
|
|
@@ -1612,15 +1628,15 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1612
1628
|
"model-value": Re.value,
|
|
1613
1629
|
rules: [() => Re.value ? "Must have at least one non-zero item" : !0]
|
|
1614
1630
|
}, null, 8, ["model-value", "rules"]),
|
|
1615
|
-
(
|
|
1631
|
+
(S(), W(se, {
|
|
1616
1632
|
"column-defs": Be.value,
|
|
1617
1633
|
"column-visibility": {
|
|
1618
|
-
[s(te).Code]: !(((
|
|
1634
|
+
[s(te).Code]: !(((rt = o.modelValue) == null ? void 0 : rt.template) ?? ((lt = o.modelValue) == null ? void 0 : lt.templateDoc)),
|
|
1619
1635
|
[s(te).Name]: !(((it = o.modelValue) == null ? void 0 : it.template) ?? ((ut = o.modelValue) == null ? void 0 : ut.templateDoc)),
|
|
1620
1636
|
[s(te).TemplateName]: !!(((dt = o.modelValue) == null ? void 0 : dt.template) ?? ((ct = o.modelValue) == null ? void 0 : ct.templateDoc))
|
|
1621
1637
|
},
|
|
1622
1638
|
"row-data": s(t).items,
|
|
1623
|
-
key:
|
|
1639
|
+
key: C.value,
|
|
1624
1640
|
"hide-footer": "",
|
|
1625
1641
|
"page-size": s(t).items.length
|
|
1626
1642
|
}, {
|
|
@@ -1640,7 +1656,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1640
1656
|
];
|
|
1641
1657
|
}),
|
|
1642
1658
|
"list-row": A((P) => [
|
|
1643
|
-
(
|
|
1659
|
+
(S(), W(wt, {
|
|
1644
1660
|
row: P,
|
|
1645
1661
|
key: s(t).items.map((oe) => oe.sku._id).join(".")
|
|
1646
1662
|
}, {
|
|
@@ -1675,9 +1691,9 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1675
1691
|
lastClosingDate: {}
|
|
1676
1692
|
},
|
|
1677
1693
|
emits: ["update:show", "submitted"],
|
|
1678
|
-
setup(g, { expose:
|
|
1694
|
+
setup(g, { expose: w, emit: l }) {
|
|
1679
1695
|
var V;
|
|
1680
|
-
const p = g, x =
|
|
1696
|
+
const p = g, x = l, t = nt(), f = Ct(), F = De(), I = ot(), v = et(), e = We(), { t: u } = ge(), k = q(!1), a = q(!1), i = q(!1);
|
|
1681
1697
|
async function h(d) {
|
|
1682
1698
|
if (d) {
|
|
1683
1699
|
a.value = !1;
|
|
@@ -1727,15 +1743,15 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1727
1743
|
templateDoc: f.templates.find((b) => b._id === p.templateId)
|
|
1728
1744
|
};
|
|
1729
1745
|
}
|
|
1730
|
-
const
|
|
1746
|
+
const C = xt(p, "show"), r = q(p.modelValue ?? _()), c = q(((V = p.modelValue) == null ? void 0 : V._id) ?? `${Math.random()}`);
|
|
1731
1747
|
be(
|
|
1732
1748
|
() => p.show,
|
|
1733
1749
|
(d) => {
|
|
1734
1750
|
var b;
|
|
1735
|
-
d && (i.value = !1,
|
|
1751
|
+
d && (i.value = !1, r.value = p.modelValue ?? _(), c.value = ((b = p.modelValue) == null ? void 0 : b._id) ?? `${Math.random()}`);
|
|
1736
1752
|
}
|
|
1737
1753
|
);
|
|
1738
|
-
const D =
|
|
1754
|
+
const D = N(() => !a.value || !i.value), B = N(() => {
|
|
1739
1755
|
switch (p.mode) {
|
|
1740
1756
|
case Oe.READ:
|
|
1741
1757
|
return "View transfer";
|
|
@@ -1745,23 +1761,23 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1745
1761
|
return u("inventory.transfer.receiveRequest.update.title");
|
|
1746
1762
|
}
|
|
1747
1763
|
return "";
|
|
1748
|
-
}),
|
|
1749
|
-
|
|
1764
|
+
}), Y = q();
|
|
1765
|
+
w({
|
|
1750
1766
|
validateInputs: () => {
|
|
1751
1767
|
var d, b;
|
|
1752
|
-
(b = (d =
|
|
1768
|
+
(b = (d = Y.value) == null ? void 0 : d.validateInputs) == null || b.call(d);
|
|
1753
1769
|
},
|
|
1754
1770
|
resetInputsValidation: () => {
|
|
1755
1771
|
var d, b;
|
|
1756
|
-
(b = (d =
|
|
1772
|
+
(b = (d = Y.value) == null ? void 0 : d.resetInputsValidation) == null || b.call(d);
|
|
1757
1773
|
},
|
|
1758
1774
|
resetInputs: () => {
|
|
1759
1775
|
var d, b;
|
|
1760
|
-
(b = (d =
|
|
1776
|
+
(b = (d = Y.value) == null ? void 0 : d.resetInputs) == null || b.call(d);
|
|
1761
1777
|
}
|
|
1762
1778
|
});
|
|
1763
|
-
async function
|
|
1764
|
-
const d =
|
|
1779
|
+
async function Q() {
|
|
1780
|
+
const d = r.value;
|
|
1765
1781
|
if (k.value = !0, d.items = d.items.filter((b) => b.quantity.amount > 0), !d.items.length) {
|
|
1766
1782
|
F.open({
|
|
1767
1783
|
title: "Cannot create order",
|
|
@@ -1788,7 +1804,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1788
1804
|
}
|
|
1789
1805
|
}
|
|
1790
1806
|
async function K() {
|
|
1791
|
-
const d =
|
|
1807
|
+
const d = r.value;
|
|
1792
1808
|
if (k.value = !0, d.items = d.items.filter((b) => b.quantity.amount > 0), !d.items.length) {
|
|
1793
1809
|
F.open({
|
|
1794
1810
|
title: "Cannot create order",
|
|
@@ -1817,16 +1833,16 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1817
1833
|
function O() {
|
|
1818
1834
|
switch (p.mode) {
|
|
1819
1835
|
case Oe.CREATE:
|
|
1820
|
-
return
|
|
1836
|
+
return Q();
|
|
1821
1837
|
case Oe.UPDATE:
|
|
1822
1838
|
return K();
|
|
1823
1839
|
}
|
|
1824
1840
|
}
|
|
1825
|
-
function
|
|
1841
|
+
function U() {
|
|
1826
1842
|
var R, X;
|
|
1827
|
-
const d =
|
|
1843
|
+
const d = as.validatePurchaseOrderItems({
|
|
1828
1844
|
skusById: v.skuById ?? {},
|
|
1829
|
-
items:
|
|
1845
|
+
items: r.value.items ?? []
|
|
1830
1846
|
}), b = Object.values(d).flat();
|
|
1831
1847
|
if (b.length > 0) {
|
|
1832
1848
|
const Z = b[0];
|
|
@@ -1837,13 +1853,13 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1837
1853
|
});
|
|
1838
1854
|
return;
|
|
1839
1855
|
}
|
|
1840
|
-
(X = (R =
|
|
1856
|
+
(X = (R = Y.value) == null ? void 0 : R.validateInputs) == null || X.call(R);
|
|
1841
1857
|
}
|
|
1842
1858
|
return (d, b) => {
|
|
1843
1859
|
const R = $("FmButton"), X = $("FmSideSheet");
|
|
1844
|
-
return
|
|
1845
|
-
modelValue: s(
|
|
1846
|
-
"onUpdate:modelValue": b[3] || (b[3] = (Z) => xe(
|
|
1860
|
+
return S(), W(X, {
|
|
1861
|
+
modelValue: s(C),
|
|
1862
|
+
"onUpdate:modelValue": b[3] || (b[3] = (Z) => xe(C) ? C.value = Z : null),
|
|
1847
1863
|
"dismiss-away": "",
|
|
1848
1864
|
"close-button": "",
|
|
1849
1865
|
"max-width": 900
|
|
@@ -1854,14 +1870,14 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1854
1870
|
])
|
|
1855
1871
|
]),
|
|
1856
1872
|
default: A(() => [
|
|
1857
|
-
(
|
|
1873
|
+
(S(), W(Po, {
|
|
1858
1874
|
class: "w-full",
|
|
1859
1875
|
ref_key: "formRef",
|
|
1860
|
-
ref:
|
|
1876
|
+
ref: Y,
|
|
1861
1877
|
"onForm:ready": b[0] || (b[0] = () => i.value = !0),
|
|
1862
1878
|
onValidationSuccess: O,
|
|
1863
|
-
modelValue:
|
|
1864
|
-
"onUpdate:modelValue": b[1] || (b[1] = (Z) =>
|
|
1879
|
+
modelValue: r.value,
|
|
1880
|
+
"onUpdate:modelValue": b[1] || (b[1] = (Z) => r.value = Z),
|
|
1865
1881
|
disabled: k.value || D.value,
|
|
1866
1882
|
suppliers: s(I).suppliers,
|
|
1867
1883
|
skus: s(v).skus,
|
|
@@ -1875,7 +1891,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1875
1891
|
loading: k.value,
|
|
1876
1892
|
disabled: D.value,
|
|
1877
1893
|
label: s(u)("common.save"),
|
|
1878
|
-
onClick:
|
|
1894
|
+
onClick: U
|
|
1879
1895
|
}, null, 8, ["loading", "disabled", "label"]),
|
|
1880
1896
|
y(R, {
|
|
1881
1897
|
disabled: D.value,
|
|
@@ -1891,7 +1907,7 @@ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }
|
|
|
1891
1907
|
}
|
|
1892
1908
|
});
|
|
1893
1909
|
function Oo(g) {
|
|
1894
|
-
const [
|
|
1910
|
+
const [w, l, p, ...x] = ps(g), t = p.map((v) => v.toLowerCase().trim().replace(/ /g, "_")), F = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((v) => !t.includes(v));
|
|
1895
1911
|
if (F.length)
|
|
1896
1912
|
throw new Error(
|
|
1897
1913
|
`Missing headers (${F.join()}). Excel file does not come from the template.`
|
|
@@ -1909,11 +1925,11 @@ function Oo(g) {
|
|
|
1909
1925
|
});
|
|
1910
1926
|
}
|
|
1911
1927
|
function Mo(g) {
|
|
1912
|
-
const
|
|
1928
|
+
const w = g.SheetNames;
|
|
1913
1929
|
try {
|
|
1914
|
-
return
|
|
1930
|
+
return w.reduce(
|
|
1915
1931
|
(p, x) => {
|
|
1916
|
-
const t = new Array(), f = g.Sheets[x], F =
|
|
1932
|
+
const t = new Array(), f = g.Sheets[x], F = et(), I = Oo(f), v = [];
|
|
1917
1933
|
for (const { index: u, data: k } of I) {
|
|
1918
1934
|
k.scanned_code === "" && t.push(`Row ${u + 1}: Scanned code is empty`), k.item_name === "" && t.push(`Row ${u + 1}: Item name is empty`), k.uom === "" && t.push(`Row ${u + 1}: UOM is empty`), k["transfer_quantity(uom)"] === "" && t.push(`Row ${u + 1}: Transfer quantity is empty`);
|
|
1919
1935
|
const a = F.skus.find((_) => _.code === k.scanned_code);
|
|
@@ -1924,7 +1940,7 @@ function Mo(g) {
|
|
|
1924
1940
|
const i = a.unit.abbrev === k.uom;
|
|
1925
1941
|
let h = null;
|
|
1926
1942
|
if (!i) {
|
|
1927
|
-
const _ = a.unit.measurements.find((
|
|
1943
|
+
const _ = a.unit.measurements.find((C) => C.abbrev === k.uom);
|
|
1928
1944
|
if (!_) {
|
|
1929
1945
|
t.push(`Row ${u + 1}: Measurement not found`);
|
|
1930
1946
|
continue;
|
|
@@ -1935,7 +1951,7 @@ function Mo(g) {
|
|
|
1935
1951
|
sku: a,
|
|
1936
1952
|
code: k.scanned_code,
|
|
1937
1953
|
name: k.item_name,
|
|
1938
|
-
quantity:
|
|
1954
|
+
quantity: Je.fromNumber(Number(k["transfer_quantity(uom)"])),
|
|
1939
1955
|
measurement: h
|
|
1940
1956
|
});
|
|
1941
1957
|
}
|
|
@@ -1952,20 +1968,20 @@ function Mo(g) {
|
|
|
1952
1968
|
importCreateResult: new Array()
|
|
1953
1969
|
}
|
|
1954
1970
|
);
|
|
1955
|
-
} catch (
|
|
1971
|
+
} catch (l) {
|
|
1956
1972
|
return {
|
|
1957
1973
|
invalidExcel: !0,
|
|
1958
|
-
invalidExcelMessage: (
|
|
1974
|
+
invalidExcelMessage: (l == null ? void 0 : l.message) ?? "Invalid excel",
|
|
1959
1975
|
importCreateResult: []
|
|
1960
1976
|
};
|
|
1961
1977
|
}
|
|
1962
1978
|
}
|
|
1963
|
-
const qo = { class: "flex flex-col flex-1" },
|
|
1979
|
+
const qo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, No = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Bo = {
|
|
1964
1980
|
key: 0,
|
|
1965
1981
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
1966
1982
|
}, zo = { key: 0 }, Lo = {
|
|
1967
|
-
class: /* @__PURE__ */
|
|
1968
|
-
}, Ho = { class: "flex-1" }, jo = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" },
|
|
1983
|
+
class: /* @__PURE__ */ J(["fm-typo-en-body-lg-600"])
|
|
1984
|
+
}, Ho = { class: "flex-1" }, jo = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" }, Yo = { class: "flex-auto line-clamp-2 text-ellipsis break-all" }, Qo = { class: "text-fm-color-typo-primary" }, Ko = { class: "ml-auto" }, Xo = { key: 0 }, Zo = /* @__PURE__ */ ce({
|
|
1969
1985
|
__name: "XilnexResult",
|
|
1970
1986
|
props: {
|
|
1971
1987
|
type: {},
|
|
@@ -1974,30 +1990,30 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
1974
1990
|
errors: {}
|
|
1975
1991
|
},
|
|
1976
1992
|
setup(g) {
|
|
1977
|
-
const
|
|
1978
|
-
|
|
1993
|
+
const w = g, { t: l } = ge(), p = q(!1), x = () => {
|
|
1994
|
+
w.errors.length && (p.value = !p.value);
|
|
1979
1995
|
};
|
|
1980
1996
|
return (t, f) => {
|
|
1981
1997
|
var v;
|
|
1982
1998
|
const F = $("FmIcon"), I = $("FmTooltip");
|
|
1983
|
-
return
|
|
1999
|
+
return S(), T("div", qo, [
|
|
1984
2000
|
n("div", {
|
|
1985
2001
|
onClick: x,
|
|
1986
|
-
class:
|
|
2002
|
+
class: J({
|
|
1987
2003
|
"cursor-pointer": t.errors.length
|
|
1988
2004
|
})
|
|
1989
2005
|
}, [
|
|
1990
|
-
n("div",
|
|
1991
|
-
n("div",
|
|
2006
|
+
n("div", Uo, [
|
|
2007
|
+
n("div", No, [
|
|
1992
2008
|
n("div", {
|
|
1993
|
-
class:
|
|
2009
|
+
class: J({
|
|
1994
2010
|
"text-fm-color-system-error-300": t.errors.length
|
|
1995
2011
|
})
|
|
1996
2012
|
}, [
|
|
1997
2013
|
Te(M(t.name) + " ", 1),
|
|
1998
|
-
t.type === "create" ? (
|
|
2014
|
+
t.type === "create" ? (S(), T("span", Bo, "(" + M(s(l)("inventory.closing.template.import.new")) + ")", 1)) : j("", !0)
|
|
1999
2015
|
], 2),
|
|
2000
|
-
t.errors.length ? (
|
|
2016
|
+
t.errors.length ? (S(), T("div", zo, [
|
|
2001
2017
|
y(F, {
|
|
2002
2018
|
name: "error",
|
|
2003
2019
|
size: "sm",
|
|
@@ -2007,7 +2023,7 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2007
2023
|
]),
|
|
2008
2024
|
f[0] || (f[0] = n("hr", { class: "my-2" }, null, -1)),
|
|
2009
2025
|
n("div", Lo, [
|
|
2010
|
-
(v = t.items) != null && v.length ? (
|
|
2026
|
+
(v = t.items) != null && v.length ? (S(!0), T(de, { key: 0 }, Se(t.items, (e, u) => (S(), T("div", {
|
|
2011
2027
|
key: u,
|
|
2012
2028
|
class: "flex gap-4 mt-2 items-center"
|
|
2013
2029
|
}, [
|
|
@@ -2028,13 +2044,13 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2028
2044
|
"z-index": 51
|
|
2029
2045
|
}, {
|
|
2030
2046
|
default: A(() => [
|
|
2031
|
-
n("span",
|
|
2047
|
+
n("span", Yo, M(e.name), 1)
|
|
2032
2048
|
]),
|
|
2033
2049
|
_: 2
|
|
2034
2050
|
}, 1032, ["content"])
|
|
2035
2051
|
]),
|
|
2036
2052
|
n("div", null, [
|
|
2037
|
-
n("span",
|
|
2053
|
+
n("span", Qo, M(s(Je).toFormatString({
|
|
2038
2054
|
value: e.quantity
|
|
2039
2055
|
})), 1),
|
|
2040
2056
|
Te(" " + M(e.measurement ? e.measurement.abbrev : e.sku.unit.abbrev), 1)
|
|
@@ -2043,30 +2059,30 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2043
2059
|
])
|
|
2044
2060
|
]),
|
|
2045
2061
|
n("div", Ko, [
|
|
2046
|
-
t.errors.length ? (
|
|
2062
|
+
t.errors.length ? (S(), W(F, {
|
|
2047
2063
|
key: 0,
|
|
2048
2064
|
name: p.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
2049
2065
|
size: "md"
|
|
2050
2066
|
}, null, 8, ["name"])) : j("", !0)
|
|
2051
2067
|
])
|
|
2052
2068
|
], 2),
|
|
2053
|
-
p.value ? (
|
|
2069
|
+
p.value ? (S(), T("div", {
|
|
2054
2070
|
key: 0,
|
|
2055
|
-
class:
|
|
2071
|
+
class: J(["flex flex-col gap-4 pl-8 fm-typo-en-body-sm-400", {
|
|
2056
2072
|
"text-fm-color-typo-secondary": !t.errors.length,
|
|
2057
2073
|
"text-fm-color-system-error-300": t.errors.length
|
|
2058
2074
|
}])
|
|
2059
2075
|
}, [
|
|
2060
|
-
t.errors.length ? (
|
|
2076
|
+
t.errors.length ? (S(), T("div", Xo, [
|
|
2061
2077
|
n("ol", null, [
|
|
2062
|
-
(
|
|
2078
|
+
(S(!0), T(de, null, Se(t.errors, (e, u) => (S(), T("li", { key: u }, M(e), 1))), 128))
|
|
2063
2079
|
])
|
|
2064
2080
|
])) : j("", !0)
|
|
2065
2081
|
], 2)) : j("", !0)
|
|
2066
2082
|
]);
|
|
2067
2083
|
};
|
|
2068
2084
|
}
|
|
2069
|
-
}),
|
|
2085
|
+
}), Go = { class: "flex flex-col gap-24" }, Jo = {
|
|
2070
2086
|
key: 0,
|
|
2071
2087
|
class: "flex items-center gap-8"
|
|
2072
2088
|
}, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ea = { class: "flex flex-col gap-8" }, ta = { class: "line-clamp-2 text-ellipsis break-all" }, sa = {
|
|
@@ -2078,19 +2094,19 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2078
2094
|
}, aa = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, na = {
|
|
2079
2095
|
key: 0,
|
|
2080
2096
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
2081
|
-
},
|
|
2097
|
+
}, ra = { class: "fm-typo-en-body-lg-600" }, yt = "Transfer note", la = /* @__PURE__ */ ce({
|
|
2082
2098
|
__name: "XilnexImportForm",
|
|
2083
|
-
setup(g, { expose:
|
|
2084
|
-
const
|
|
2099
|
+
setup(g, { expose: w }) {
|
|
2100
|
+
const l = q(null), p = De(), x = q(!1), t = q(!1), f = St(), F = q(!1), I = Ue();
|
|
2085
2101
|
q([]);
|
|
2086
|
-
const v =
|
|
2102
|
+
const v = N({
|
|
2087
2103
|
get() {
|
|
2088
|
-
var
|
|
2089
|
-
return ((
|
|
2104
|
+
var r;
|
|
2105
|
+
return ((r = f.supplier) == null ? void 0 : r.name) ?? "";
|
|
2090
2106
|
},
|
|
2091
|
-
set(
|
|
2092
|
-
|
|
2093
|
-
name:
|
|
2107
|
+
set(r) {
|
|
2108
|
+
r && (f.supplier = {
|
|
2109
|
+
name: r,
|
|
2094
2110
|
registrationNumber: "",
|
|
2095
2111
|
_id: "xilnex",
|
|
2096
2112
|
internal: "restaurant",
|
|
@@ -2106,53 +2122,53 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2106
2122
|
}
|
|
2107
2123
|
});
|
|
2108
2124
|
Ke(async () => {
|
|
2109
|
-
const
|
|
2110
|
-
console.log(
|
|
2125
|
+
const r = await I.getNetSuiteLocations();
|
|
2126
|
+
console.log(r), F.value = !0;
|
|
2111
2127
|
});
|
|
2112
|
-
const e =
|
|
2128
|
+
const e = N({
|
|
2113
2129
|
get() {
|
|
2114
2130
|
return "";
|
|
2115
2131
|
},
|
|
2116
|
-
set(
|
|
2117
|
-
if (
|
|
2118
|
-
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B,
|
|
2119
|
-
c.setFullYear(parseInt(D)), c.setMonth(parseInt(B) - 1), c.setDate(parseInt(
|
|
2132
|
+
set(r) {
|
|
2133
|
+
if (r) {
|
|
2134
|
+
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B, Y] = r.split("-");
|
|
2135
|
+
c.setFullYear(parseInt(D)), c.setMonth(parseInt(B) - 1), c.setDate(parseInt(Y)), f.effectiveAt = c.toISOString();
|
|
2120
2136
|
}
|
|
2121
2137
|
}
|
|
2122
|
-
}), u =
|
|
2138
|
+
}), u = N({
|
|
2123
2139
|
get() {
|
|
2124
2140
|
return null;
|
|
2125
2141
|
},
|
|
2126
|
-
set(
|
|
2127
|
-
if (
|
|
2128
|
-
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B] =
|
|
2142
|
+
set(r) {
|
|
2143
|
+
if (r) {
|
|
2144
|
+
const c = f.effectiveAt ? new Date(f.effectiveAt) : /* @__PURE__ */ new Date(), [D, B] = r.split(":");
|
|
2129
2145
|
c.setMinutes(parseInt(D)), c.setSeconds(parseInt(B)), f.effectiveAt = c.toISOString();
|
|
2130
2146
|
}
|
|
2131
2147
|
}
|
|
2132
|
-
}), k = q(new Array()), a = q([]), i =
|
|
2133
|
-
() => !!k.value.length || a.value.some((
|
|
2148
|
+
}), k = q(new Array()), a = q([]), i = N(
|
|
2149
|
+
() => !!k.value.length || a.value.some((r) => r.errors.length)
|
|
2134
2150
|
), h = q();
|
|
2135
|
-
|
|
2151
|
+
w({
|
|
2136
2152
|
validateInputs: () => {
|
|
2137
|
-
var
|
|
2138
|
-
(c = (
|
|
2153
|
+
var r, c;
|
|
2154
|
+
(c = (r = h.value) == null ? void 0 : r.validateInputs) == null || c.call(r);
|
|
2139
2155
|
},
|
|
2140
2156
|
resetInputsValidation: () => {
|
|
2141
|
-
var
|
|
2142
|
-
(c = (
|
|
2157
|
+
var r, c;
|
|
2158
|
+
(c = (r = h.value) == null ? void 0 : r.resetInputsValidation) == null || c.call(r);
|
|
2143
2159
|
},
|
|
2144
2160
|
resetInputs: () => {
|
|
2145
|
-
var
|
|
2146
|
-
(c = (
|
|
2161
|
+
var r, c;
|
|
2162
|
+
(c = (r = h.value) == null ? void 0 : r.resetInputs) == null || c.call(r);
|
|
2147
2163
|
}
|
|
2148
2164
|
});
|
|
2149
2165
|
const { t: _ } = ge();
|
|
2150
|
-
async function
|
|
2166
|
+
async function C(r) {
|
|
2151
2167
|
k.value = [], a.value = [];
|
|
2152
2168
|
try {
|
|
2153
2169
|
x.value = !0;
|
|
2154
2170
|
const [c] = await Promise.all([
|
|
2155
|
-
|
|
2171
|
+
fs(r),
|
|
2156
2172
|
// fake buffer
|
|
2157
2173
|
new Promise((B) => setTimeout(B, 1e3))
|
|
2158
2174
|
]), D = Mo(c);
|
|
@@ -2180,16 +2196,16 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2180
2196
|
}), x.value = !1;
|
|
2181
2197
|
}
|
|
2182
2198
|
}
|
|
2183
|
-
return be(
|
|
2184
|
-
|
|
2185
|
-
}), (
|
|
2186
|
-
const D = $("FmSelect"), B = $("FmDatePicker"),
|
|
2187
|
-
return
|
|
2199
|
+
return be(l, (r) => {
|
|
2200
|
+
r && C(r);
|
|
2201
|
+
}), (r, c) => {
|
|
2202
|
+
const D = $("FmSelect"), B = $("FmDatePicker"), Y = $("FmTimePicker"), Q = $("FmCircularProgress"), K = $("FmLabel"), O = $("FmIcon"), U = $("FmButton"), V = $("FmForm");
|
|
2203
|
+
return S(), W(V, {
|
|
2188
2204
|
ref_key: "formRef",
|
|
2189
2205
|
ref: h
|
|
2190
2206
|
}, {
|
|
2191
2207
|
default: A(() => [
|
|
2192
|
-
n("div",
|
|
2208
|
+
n("div", Go, [
|
|
2193
2209
|
y(D, {
|
|
2194
2210
|
modelValue: v.value,
|
|
2195
2211
|
"onUpdate:modelValue": c[0] || (c[0] = (d) => v.value = d),
|
|
@@ -2213,33 +2229,33 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2213
2229
|
label: "Transfer date",
|
|
2214
2230
|
rules: [s(Me)()]
|
|
2215
2231
|
}, null, 8, ["modelValue", "rules"]),
|
|
2216
|
-
y(
|
|
2232
|
+
y(Y, {
|
|
2217
2233
|
modelValue: u.value,
|
|
2218
2234
|
"onUpdate:modelValue": c[2] || (c[2] = (d) => u.value = d),
|
|
2219
2235
|
label: "Transfer time",
|
|
2220
2236
|
rules: [s(Me)()]
|
|
2221
2237
|
}, null, 8, ["modelValue", "rules"]),
|
|
2222
|
-
t.value ? (
|
|
2238
|
+
t.value ? (S(), T("div", Jo, [
|
|
2223
2239
|
n("div", null, [
|
|
2224
|
-
y(
|
|
2240
|
+
y(Q, {
|
|
2225
2241
|
size: "md",
|
|
2226
2242
|
color: "neutral-gray-200"
|
|
2227
2243
|
})
|
|
2228
2244
|
]),
|
|
2229
2245
|
n("div", Wo, M(s(_)("inventory.formField.loading")), 1)
|
|
2230
|
-
])) : (
|
|
2231
|
-
y(
|
|
2246
|
+
])) : (S(), T(de, { key: 1 }, [
|
|
2247
|
+
y(vs, {
|
|
2232
2248
|
"max-file-size": 5,
|
|
2233
|
-
class:
|
|
2249
|
+
class: J({
|
|
2234
2250
|
"w-full": !0,
|
|
2235
|
-
"h-[200px]": !
|
|
2251
|
+
"h-[200px]": !l.value
|
|
2236
2252
|
}),
|
|
2237
2253
|
accept: ".xlsx,.xls",
|
|
2238
2254
|
label: yt,
|
|
2239
|
-
onFileUpload: c[3] || (c[3] = (d) =>
|
|
2255
|
+
onFileUpload: c[3] || (c[3] = (d) => l.value = d),
|
|
2240
2256
|
"button-label": s(_)("inventory.ingredient.import.selectFile")
|
|
2241
2257
|
}, $t({ _: 2 }, [
|
|
2242
|
-
|
|
2258
|
+
l.value ? {
|
|
2243
2259
|
name: "default",
|
|
2244
2260
|
fn: A(({ openFileDialog: d }) => [
|
|
2245
2261
|
y(K, null, {
|
|
@@ -2250,7 +2266,7 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2250
2266
|
}),
|
|
2251
2267
|
n("div", ea, [
|
|
2252
2268
|
n("div", {
|
|
2253
|
-
class:
|
|
2269
|
+
class: J([
|
|
2254
2270
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
2255
2271
|
{
|
|
2256
2272
|
"border border-fm-color-neutral-gray-100": x.value,
|
|
@@ -2259,18 +2275,18 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2259
2275
|
}
|
|
2260
2276
|
])
|
|
2261
2277
|
}, [
|
|
2262
|
-
x.value ? (
|
|
2278
|
+
x.value ? (S(), W(Q, {
|
|
2263
2279
|
key: 0,
|
|
2264
2280
|
size: "md",
|
|
2265
2281
|
color: "neutral-gray-200"
|
|
2266
|
-
})) : (
|
|
2282
|
+
})) : (S(), W(O, {
|
|
2267
2283
|
key: 1,
|
|
2268
2284
|
name: i.value ? "error" : "attach_file",
|
|
2269
2285
|
outline: "",
|
|
2270
2286
|
color: i.value ? "system-error-300" : void 0
|
|
2271
2287
|
}, null, 8, ["name", "color"])),
|
|
2272
2288
|
n("div", {
|
|
2273
|
-
class:
|
|
2289
|
+
class: J([
|
|
2274
2290
|
"fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
|
|
2275
2291
|
{
|
|
2276
2292
|
"text-fm-color-typo-disabled": x.value,
|
|
@@ -2278,10 +2294,10 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2278
2294
|
}
|
|
2279
2295
|
])
|
|
2280
2296
|
}, [
|
|
2281
|
-
n("div", ta, M(
|
|
2297
|
+
n("div", ta, M(l.value.name), 1)
|
|
2282
2298
|
], 2),
|
|
2283
|
-
x.value ? j("", !0) : (
|
|
2284
|
-
y(
|
|
2299
|
+
x.value ? j("", !0) : (S(), T("div", sa, [
|
|
2300
|
+
y(U, {
|
|
2285
2301
|
label: s(_)("inventory.ingredient.import.replaceFile"),
|
|
2286
2302
|
variant: i.value ? "destructive" : "secondary",
|
|
2287
2303
|
"prepend-icon": i.value ? void 0 : "autorenew",
|
|
@@ -2289,8 +2305,8 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2289
2305
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
2290
2306
|
]))
|
|
2291
2307
|
], 2),
|
|
2292
|
-
k.value.length ? (
|
|
2293
|
-
(
|
|
2308
|
+
k.value.length ? (S(), T("div", oa, [
|
|
2309
|
+
(S(!0), T(de, null, Se(k.value, (b, R) => (S(), T("div", {
|
|
2294
2310
|
key: R,
|
|
2295
2311
|
class: "flex gap-8 items-center"
|
|
2296
2312
|
}, [
|
|
@@ -2307,9 +2323,9 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2307
2323
|
key: "0"
|
|
2308
2324
|
} : void 0
|
|
2309
2325
|
]), 1032, ["class", "button-label"]),
|
|
2310
|
-
|
|
2311
|
-
n("div",
|
|
2312
|
-
(
|
|
2326
|
+
l.value ? (S(), T("div", na, [
|
|
2327
|
+
n("div", ra, M(s(_)("inventory.ingredient.import.summary")), 1),
|
|
2328
|
+
(S(!0), T(de, null, Se(a.value, (d, b) => (S(), W(Zo, {
|
|
2313
2329
|
key: b,
|
|
2314
2330
|
name: `Transfer Note ${b + 1}`,
|
|
2315
2331
|
items: d.poItems,
|
|
@@ -2330,9 +2346,9 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2330
2346
|
show: { type: Boolean }
|
|
2331
2347
|
},
|
|
2332
2348
|
emits: ["update:show", "submitted"],
|
|
2333
|
-
setup(g, { expose:
|
|
2334
|
-
const p =
|
|
2335
|
-
|
|
2349
|
+
setup(g, { expose: w, emit: l }) {
|
|
2350
|
+
const p = l, t = xt(g, "show"), f = De(), F = nt(), I = q(!1), v = q(), e = q();
|
|
2351
|
+
w({
|
|
2336
2352
|
validateInputs: () => {
|
|
2337
2353
|
var a, i;
|
|
2338
2354
|
(i = (a = v.value) == null ? void 0 : a.validateInputs) == null || i.call(a);
|
|
@@ -2351,7 +2367,7 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2351
2367
|
(i = (a = v.value) == null ? void 0 : a.validateInputs) == null || i.call(a);
|
|
2352
2368
|
}
|
|
2353
2369
|
async function k() {
|
|
2354
|
-
var i, h, _,
|
|
2370
|
+
var i, h, _, C, r;
|
|
2355
2371
|
if (!((h = (i = e.value) == null ? void 0 : i.supplier) != null && h.name)) {
|
|
2356
2372
|
f.open({
|
|
2357
2373
|
title: "Upload failed",
|
|
@@ -2360,7 +2376,7 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2360
2376
|
});
|
|
2361
2377
|
return;
|
|
2362
2378
|
}
|
|
2363
|
-
if (!((_ = e.value) != null && _.items) || ((
|
|
2379
|
+
if (!((_ = e.value) != null && _.items) || ((r = (C = e.value) == null ? void 0 : C.items) == null ? void 0 : r.length) === 0) {
|
|
2364
2380
|
f.open({
|
|
2365
2381
|
title: "Upload failed",
|
|
2366
2382
|
message: "No data to upload",
|
|
@@ -2399,10 +2415,10 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2399
2415
|
}
|
|
2400
2416
|
}
|
|
2401
2417
|
return (a, i) => {
|
|
2402
|
-
const h = $("FmSpacer"), _ = $("FmButton"),
|
|
2403
|
-
return
|
|
2418
|
+
const h = $("FmSpacer"), _ = $("FmButton"), C = $("FmDialog");
|
|
2419
|
+
return S(), W(C, {
|
|
2404
2420
|
modelValue: s(t),
|
|
2405
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
2421
|
+
"onUpdate:modelValue": i[2] || (i[2] = (r) => xe(t) ? t.value = r : null),
|
|
2406
2422
|
overlay: !0,
|
|
2407
2423
|
"close-button": !1
|
|
2408
2424
|
}, {
|
|
@@ -2417,7 +2433,7 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2417
2433
|
label: "Cancel",
|
|
2418
2434
|
size: "md",
|
|
2419
2435
|
variant: "tertiary",
|
|
2420
|
-
onClick: i[1] || (i[1] = (
|
|
2436
|
+
onClick: i[1] || (i[1] = (r) => p("update:show", !1))
|
|
2421
2437
|
}, null, 8, ["disabled"]),
|
|
2422
2438
|
y(_, {
|
|
2423
2439
|
disabled: I.value,
|
|
@@ -2431,12 +2447,12 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2431
2447
|
]),
|
|
2432
2448
|
default: A(() => [
|
|
2433
2449
|
n("div", ia, [
|
|
2434
|
-
y(
|
|
2450
|
+
y(la, {
|
|
2435
2451
|
ref_key: "formRef",
|
|
2436
2452
|
ref: v,
|
|
2437
2453
|
onValidationSuccess: k,
|
|
2438
2454
|
modelValue: e.value,
|
|
2439
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
2455
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => e.value = r)
|
|
2440
2456
|
}, null, 8, ["modelValue"])
|
|
2441
2457
|
])
|
|
2442
2458
|
]),
|
|
@@ -2447,27 +2463,27 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2447
2463
|
}), da = { class: "flex flex-col py-8" }, ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ma = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, pa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, fa = {
|
|
2448
2464
|
key: 0,
|
|
2449
2465
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
2450
|
-
}, va = { class: "pt-8" }, bt = "ReceiveRequestViewSearchCriteria",
|
|
2466
|
+
}, va = { class: "pt-8" }, bt = "ReceiveRequestViewSearchCriteria", ja = /* @__PURE__ */ ce({
|
|
2451
2467
|
__name: "ReceiveRequestView",
|
|
2452
2468
|
setup(g) {
|
|
2453
|
-
const { t:
|
|
2454
|
-
|
|
2455
|
-
name:
|
|
2456
|
-
startDate:
|
|
2457
|
-
endDate:
|
|
2469
|
+
const { t: w } = ge(), l = De();
|
|
2470
|
+
Ye.object({
|
|
2471
|
+
name: Ye.string().optional().nullable(),
|
|
2472
|
+
startDate: Ye.string().optional().nullable(),
|
|
2473
|
+
endDate: Ye.string().optional().nullable()
|
|
2458
2474
|
});
|
|
2459
|
-
const p =
|
|
2475
|
+
const p = N(
|
|
2460
2476
|
() => !k._currentLocation || e.loading.value
|
|
2461
|
-
), x =
|
|
2477
|
+
), x = Xt(), t = st(), f = Ue();
|
|
2462
2478
|
function F() {
|
|
2463
2479
|
const O = {
|
|
2464
2480
|
name: "",
|
|
2465
2481
|
...ft()
|
|
2466
|
-
},
|
|
2467
|
-
if (!
|
|
2482
|
+
}, U = x.getItem(bt);
|
|
2483
|
+
if (!U)
|
|
2468
2484
|
return O;
|
|
2469
2485
|
try {
|
|
2470
|
-
return JSON.parse(
|
|
2486
|
+
return JSON.parse(U);
|
|
2471
2487
|
} catch {
|
|
2472
2488
|
return O;
|
|
2473
2489
|
}
|
|
@@ -2475,21 +2491,21 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2475
2491
|
function I() {
|
|
2476
2492
|
x.setItem(bt, JSON.stringify(v.value));
|
|
2477
2493
|
}
|
|
2478
|
-
const v = q(F()), e =
|
|
2494
|
+
const v = q(F()), e = Ut(
|
|
2479
2495
|
Ze.RECEIVE_REQUEST,
|
|
2480
2496
|
v.value
|
|
2481
|
-
), { columnDefs: u } =
|
|
2497
|
+
), { columnDefs: u } = Nt(
|
|
2482
2498
|
Ze.RECEIVE_REQUEST,
|
|
2483
2499
|
e,
|
|
2484
2500
|
e.shipments
|
|
2485
|
-
), k =
|
|
2501
|
+
), k = We();
|
|
2486
2502
|
async function a() {
|
|
2487
|
-
const O = `inventory-record_${vt(v.value.startDate).format("DD-MM-YYYY_HH-mm")}-${vt(v.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`,
|
|
2503
|
+
const O = `inventory-record_${vt(v.value.startDate).format("DD-MM-YYYY_HH-mm")}-${vt(v.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, U = e.purchaseOrders.value.flatMap(
|
|
2488
2504
|
(d) => d.items.map((b) => {
|
|
2489
|
-
var
|
|
2490
|
-
const R = new Date(
|
|
2491
|
-
|
|
2492
|
-
), he = Ce(b.quantity), ke = ((
|
|
2505
|
+
var le;
|
|
2506
|
+
const R = new Date(Qt(d._id) ?? ""), X = d.effectiveAt ? new Date(d.effectiveAt) : void 0, Z = Ce(
|
|
2507
|
+
zt(b.sku, d.deliveryOrder || [])
|
|
2508
|
+
), he = Ce(b.quantity), ke = ((le = b == null ? void 0 : b.measurement) == null ? void 0 : le.abbrev) || b.sku.unit.abbrev;
|
|
2493
2509
|
return {
|
|
2494
2510
|
"SKU code": b.code,
|
|
2495
2511
|
"SKU name": b.name,
|
|
@@ -2501,7 +2517,7 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2501
2517
|
"Received quantity": Z,
|
|
2502
2518
|
"Ordered quantity": he,
|
|
2503
2519
|
Unit: ke,
|
|
2504
|
-
"Total cost": b.totalCost ?
|
|
2520
|
+
"Total cost": b.totalCost ? Qe(b.totalCost) : null
|
|
2505
2521
|
};
|
|
2506
2522
|
})
|
|
2507
2523
|
), V = [
|
|
@@ -2515,18 +2531,18 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2515
2531
|
"Ordered quantity",
|
|
2516
2532
|
"Unit"
|
|
2517
2533
|
];
|
|
2518
|
-
t.enableBackdatePo && V.insert("Effective at", 4), t.enableTotalCost && V.push("Total cost"), await
|
|
2534
|
+
t.enableBackdatePo && V.insert("Effective at", 4), t.enableTotalCost && V.push("Total cost"), await Kt(
|
|
2519
2535
|
[
|
|
2520
2536
|
{
|
|
2521
2537
|
name: "purchases",
|
|
2522
|
-
data:
|
|
2538
|
+
data: U,
|
|
2523
2539
|
columns: V
|
|
2524
2540
|
}
|
|
2525
2541
|
],
|
|
2526
2542
|
O
|
|
2527
|
-
),
|
|
2528
|
-
title:
|
|
2529
|
-
message:
|
|
2543
|
+
), l.open({
|
|
2544
|
+
title: w("inventory.transfer.receiveRequest.export.success"),
|
|
2545
|
+
message: w("inventory.transfer.receiveRequest.export.message", [O]),
|
|
2530
2546
|
type: "success"
|
|
2531
2547
|
});
|
|
2532
2548
|
}
|
|
@@ -2542,7 +2558,7 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2542
2558
|
function _(O) {
|
|
2543
2559
|
if (O === "create") {
|
|
2544
2560
|
if (p.value) {
|
|
2545
|
-
|
|
2561
|
+
l.open({
|
|
2546
2562
|
title: "Loading data...",
|
|
2547
2563
|
message: "Please wait.",
|
|
2548
2564
|
type: "info"
|
|
@@ -2558,28 +2574,28 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2558
2574
|
if (O === "export")
|
|
2559
2575
|
return a();
|
|
2560
2576
|
}
|
|
2561
|
-
const { breakpoints:
|
|
2577
|
+
const { breakpoints: C } = tt(), r = N(() => C.value.xs || C.value.sm), c = N(() => r.value ? 10 : 20), D = Zt(), B = N(() => [
|
|
2562
2578
|
{
|
|
2563
|
-
label:
|
|
2579
|
+
label: w("inventory.transfer.receiveRequest.actions.create"),
|
|
2564
2580
|
value: "create",
|
|
2565
2581
|
isPrimary: !0,
|
|
2566
2582
|
prependIcon: "add"
|
|
2567
2583
|
},
|
|
2568
2584
|
...t.enableXilnexTransferNote ? [
|
|
2569
2585
|
{
|
|
2570
|
-
label:
|
|
2586
|
+
label: "Upload",
|
|
2571
2587
|
value: "upload"
|
|
2572
2588
|
}
|
|
2573
2589
|
] : [],
|
|
2574
2590
|
{
|
|
2575
|
-
label:
|
|
2591
|
+
label: w("inventory.common.refresh"),
|
|
2576
2592
|
value: "refresh"
|
|
2577
2593
|
},
|
|
2578
2594
|
{
|
|
2579
|
-
label:
|
|
2595
|
+
label: w("inventory.common.export"),
|
|
2580
2596
|
value: "export"
|
|
2581
2597
|
}
|
|
2582
|
-
]),
|
|
2598
|
+
]), Y = N(() => {
|
|
2583
2599
|
const O = [
|
|
2584
2600
|
{
|
|
2585
2601
|
type: "string",
|
|
@@ -2589,7 +2605,7 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2589
2605
|
new Set(e.purchaseOrders.value.map((V) => V.status))
|
|
2590
2606
|
)
|
|
2591
2607
|
}
|
|
2592
|
-
],
|
|
2608
|
+
], U = [
|
|
2593
2609
|
{
|
|
2594
2610
|
type: "string",
|
|
2595
2611
|
key: "netsuiteTransactionNumber",
|
|
@@ -2618,28 +2634,28 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2618
2634
|
}).filter((V) => V != null)
|
|
2619
2635
|
}
|
|
2620
2636
|
];
|
|
2621
|
-
return [...O, ...f.isEnabled ?
|
|
2622
|
-
}),
|
|
2623
|
-
if (!
|
|
2637
|
+
return [...O, ...f.isEnabled ? U : []];
|
|
2638
|
+
}), Q = q(null), K = N(() => {
|
|
2639
|
+
if (!Q.value)
|
|
2624
2640
|
return e.purchaseOrders.value;
|
|
2625
|
-
const O =
|
|
2626
|
-
return e.purchaseOrders.value.filter((
|
|
2641
|
+
const O = ys.build(Q.value);
|
|
2642
|
+
return e.purchaseOrders.value.filter((U) => {
|
|
2627
2643
|
var V, d, b, R;
|
|
2628
|
-
return
|
|
2644
|
+
return bs(
|
|
2629
2645
|
{
|
|
2630
|
-
netsuiteTransactionNumber: (d = (V =
|
|
2631
|
-
netsuiteOrderNo: (b =
|
|
2632
|
-
netsuiteOrderId: (R =
|
|
2633
|
-
status:
|
|
2646
|
+
netsuiteTransactionNumber: (d = (V = U.netSuite) == null ? void 0 : V.additionalInfo) == null ? void 0 : d.transactionnumber,
|
|
2647
|
+
netsuiteOrderNo: (b = U.netSuite) == null ? void 0 : b.refNo,
|
|
2648
|
+
netsuiteOrderId: (R = U.netSuite) == null ? void 0 : R.id,
|
|
2649
|
+
status: U.status
|
|
2634
2650
|
},
|
|
2635
2651
|
O
|
|
2636
2652
|
);
|
|
2637
2653
|
});
|
|
2638
2654
|
});
|
|
2639
|
-
return (O,
|
|
2655
|
+
return (O, U) => {
|
|
2640
2656
|
const V = $("FmTable");
|
|
2641
|
-
return
|
|
2642
|
-
title: s(
|
|
2657
|
+
return S(), W(Gt, {
|
|
2658
|
+
title: s(w)("inventory.transfer.receiveRequest.title2"),
|
|
2643
2659
|
actions: B.value,
|
|
2644
2660
|
"onClick:action": _
|
|
2645
2661
|
}, {
|
|
@@ -2647,60 +2663,60 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2647
2663
|
var d, b;
|
|
2648
2664
|
return [
|
|
2649
2665
|
n("div", {
|
|
2650
|
-
class:
|
|
2666
|
+
class: J([
|
|
2651
2667
|
"flex flex-col gap-8 max-h-full",
|
|
2652
2668
|
{
|
|
2653
|
-
"p-0":
|
|
2654
|
-
"px-24 ": !
|
|
2669
|
+
"p-0": r.value,
|
|
2670
|
+
"px-24 ": !r.value
|
|
2655
2671
|
}
|
|
2656
2672
|
])
|
|
2657
2673
|
}, [
|
|
2658
|
-
y(
|
|
2674
|
+
y(qt, {
|
|
2659
2675
|
"date-range-query": "",
|
|
2660
2676
|
"date-range": i.value,
|
|
2661
|
-
"onUpdate:dateRange":
|
|
2677
|
+
"onUpdate:dateRange": U[0] || (U[0] = (R) => i.value = R),
|
|
2662
2678
|
searchable: "",
|
|
2663
2679
|
"change-location": "",
|
|
2664
2680
|
search: h.value,
|
|
2665
|
-
"onUpdate:search":
|
|
2681
|
+
"onUpdate:search": U[1] || (U[1] = (R) => h.value = R),
|
|
2666
2682
|
filterable: "",
|
|
2667
|
-
"filter-attributes":
|
|
2668
|
-
filter:
|
|
2669
|
-
"onUpdate:filter":
|
|
2683
|
+
"filter-attributes": Y.value,
|
|
2684
|
+
filter: Q.value,
|
|
2685
|
+
"onUpdate:filter": U[2] || (U[2] = (R) => Q.value = R)
|
|
2670
2686
|
}, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
|
|
2671
|
-
(
|
|
2687
|
+
(S(), W(V, {
|
|
2672
2688
|
style: _t(s(D).tableHeight),
|
|
2673
2689
|
"column-defs": s(u),
|
|
2674
2690
|
"row-data": K.value,
|
|
2675
2691
|
"search-value": h.value,
|
|
2676
2692
|
loading: p.value,
|
|
2677
|
-
onRowClick:
|
|
2693
|
+
onRowClick: U[3] || (U[3] = (R) => s(e).promptShowTransferDetails(R.original)),
|
|
2678
2694
|
key: (d = s(k)._currentLocation) == null ? void 0 : d.dbName,
|
|
2679
2695
|
"page-size": c.value
|
|
2680
2696
|
}, {
|
|
2681
2697
|
"list-row": A((R) => [
|
|
2682
|
-
y(
|
|
2698
|
+
y(wt, {
|
|
2683
2699
|
row: R,
|
|
2684
2700
|
onRowClick: s(e).promptShowTransferDetails
|
|
2685
2701
|
}, {
|
|
2686
2702
|
default: A((X) => {
|
|
2687
|
-
var Z, he, ke,
|
|
2703
|
+
var Z, he, ke, le, we, Ne, Be, ze, Pe, Le, Ve, Re, o, m, E, H, ne, me, G, re;
|
|
2688
2704
|
return [
|
|
2689
2705
|
n("div", da, [
|
|
2690
2706
|
n("div", ca, [
|
|
2691
2707
|
y(s(fe), {
|
|
2692
2708
|
render: (ke = (he = (Z = X._id) == null ? void 0 : Z.column) == null ? void 0 : he.columnDef) == null ? void 0 : ke.cell,
|
|
2693
|
-
props: (we = (
|
|
2709
|
+
props: (we = (le = X._id) == null ? void 0 : le.getContext) == null ? void 0 : we.call(le)
|
|
2694
2710
|
}, null, 8, ["render", "props"])
|
|
2695
2711
|
]),
|
|
2696
2712
|
n("div", ma, [
|
|
2697
2713
|
y(s(fe), {
|
|
2698
|
-
render: (ze = (Be = (
|
|
2714
|
+
render: (ze = (Be = (Ne = X.supplier_name) == null ? void 0 : Ne.column) == null ? void 0 : Be.columnDef) == null ? void 0 : ze.cell,
|
|
2699
2715
|
props: (Le = (Pe = X.supplier_name) == null ? void 0 : Pe.getContext) == null ? void 0 : Le.call(Pe)
|
|
2700
2716
|
}, null, 8, ["render", "props"])
|
|
2701
2717
|
]),
|
|
2702
2718
|
n("div", pa, M(R.original.items.map((Fe) => `${Fe.name}`).join(", ")), 1),
|
|
2703
|
-
R.original.ref ? (
|
|
2719
|
+
R.original.ref ? (S(), T("div", fa, [
|
|
2704
2720
|
y(s(fe), {
|
|
2705
2721
|
render: (o = (Re = (Ve = X.ref) == null ? void 0 : Ve.column) == null ? void 0 : Re.columnDef) == null ? void 0 : o.cell,
|
|
2706
2722
|
props: (E = (m = X.ref) == null ? void 0 : m.getContext) == null ? void 0 : E.call(m)
|
|
@@ -2709,7 +2725,7 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2709
2725
|
n("div", va, [
|
|
2710
2726
|
y(s(fe), {
|
|
2711
2727
|
render: (me = (ne = (H = X.status) == null ? void 0 : H.column) == null ? void 0 : ne.columnDef) == null ? void 0 : me.cell,
|
|
2712
|
-
props: (
|
|
2728
|
+
props: (re = (G = X.status) == null ? void 0 : G.getContext) == null ? void 0 : re.call(G)
|
|
2713
2729
|
}, null, 8, ["render", "props"])
|
|
2714
2730
|
])
|
|
2715
2731
|
])
|
|
@@ -2721,11 +2737,11 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2721
2737
|
_: 1
|
|
2722
2738
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2723
2739
|
], 2),
|
|
2724
|
-
(
|
|
2725
|
-
y(Eo,
|
|
2740
|
+
(S(), W(Tt, { to: "body" }, [
|
|
2741
|
+
y(Eo, Ge(s(e).transferDialogProps.value, {
|
|
2726
2742
|
onSubmitted: s(e).fetchData
|
|
2727
2743
|
}), null, 16, ["onSubmitted"]),
|
|
2728
|
-
y(
|
|
2744
|
+
y(Bt, Ge({
|
|
2729
2745
|
scope: s(Ze).RECEIVE_REQUEST
|
|
2730
2746
|
}, {
|
|
2731
2747
|
...s(e).transferDetailsProps.value,
|
|
@@ -2744,5 +2760,5 @@ const qo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, U
|
|
|
2744
2760
|
}
|
|
2745
2761
|
});
|
|
2746
2762
|
export {
|
|
2747
|
-
|
|
2763
|
+
ja as default
|
|
2748
2764
|
};
|