@feedmepos/mf-inventory-portal 0.0.19-dev.1 → 0.0.19-dev.11
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/ApprovalView-BtgtZgDY.js +121 -0
- package/dist/{BindingsDialog-DpC48bqK.js → BindingsDialog-DDqu7p2z.js} +9 -10
- package/dist/{BindingsPicker-BU52g6zk.js → BindingsPicker-BDhn5Do7.js} +7 -8
- package/dist/{BindingsTable-aIuFdScv.js → BindingsTable-C5R7orsB.js} +4 -6
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0sbKAX9.js +272 -0
- package/dist/IngredientsView-Ac52Wd12.js +1751 -0
- package/dist/IntegrationView-6mJtJK-d.js +1172 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BuyM580N.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C2BFaTg-.js} +1 -1
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-CL0RBLOF.js +88 -0
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js +29 -0
- package/dist/{PurchaseOrderPrintPreview-EeKhENYH.js → PurchaseOrderPrintPreview-UzrsJ0AN.js} +12 -12
- package/dist/ReceiveRequestView-DW9u9TJZ.js +208 -0
- package/dist/RecipeView-W15pCZKU.js +573 -0
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +59 -0
- package/dist/StockView-BqEe-OIX.js +1877 -0
- package/dist/SupplierView-CGr2N-e7.js +801 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DupNA58V.js +739 -0
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-COVncBoC.js +1676 -0
- package/dist/TransferTemplateView-HgaSR8L8.js +1101 -0
- package/dist/UnitView-C07Yrynl.js +638 -0
- package/dist/WarehouseView-DL-8j9vX.js +1050 -0
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/purchase-order-template.d.ts +7 -0
- package/dist/app-B1MZZxUg.js +67134 -0
- package/dist/app.d.ts +1185 -0
- package/dist/app.js +7 -3
- package/dist/components/FmDroppableField.vue.d.ts +1 -1
- package/dist/components/FmMultiselectDialogProps.d.ts +7 -0
- package/dist/components/FmUnitInputProps.d.ts +2 -0
- package/dist/components/FmUnitInputRules.d.ts +1 -0
- package/dist/components/row-action.enum.d.ts +5 -1
- package/dist/composable/defineDeepModel.d.ts +2 -0
- package/dist/{decimal-BAZuuTcd.js → decimal-BXf_WdLk.js} +1 -1
- package/dist/helper/country.d.ts +2 -0
- package/dist/id-to-date-Dlovyec6.js +30 -0
- package/dist/layout-BJjS48J5.js +151 -0
- package/dist/purchase-order-transaction-type-CMIu0jrP.js +299 -0
- package/dist/router/name.d.ts +2 -1
- package/dist/row-action.enum-PMKMRrZR.js +50 -0
- package/dist/stores/supplier.d.ts +90 -7
- package/dist/style.css +1 -1
- package/dist/supplier-IDQmZ4VM.js +54 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +2 -0
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +2 -0
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +26 -0
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +14 -2
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -2
- package/dist/views/ingredients/helper/calculate-default-cost.d.ts +9 -0
- package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +4 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +22 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +2 -1
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +187 -0
- package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +23 -0
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +21 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +9 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +6 -0
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +112 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -1
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +18 -12
- package/dist/views/receive-request/helper/get-transfer-type.d.ts +2 -0
- package/dist/views/recipe/composables/use-recipe-form.d.ts +14 -2
- package/dist/views/recipe/composables/use-recipe-table.d.ts +1 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/stock/composables/use-stock-action.d.ts +26 -0
- package/dist/views/stock/composables/use-stock-table.d.ts +1 -8
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/views/stock/helper/stock-row-action.d.ts +2 -2
- package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +20 -0
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +9 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +22 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialogProps.d.ts +10 -0
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +16 -0
- package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateFormProps.d.ts +7 -0
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +18 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +116 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +113 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +914 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +290 -0
- package/dist/views/unit/composables/use-unit-form.d.ts +14 -2
- package/dist/views/unit/composables/use-unit-table.d.ts +1 -2
- package/dist/{xlsx-vUzm_udV.js → xlsx-CfdXcS72.js} +1 -1
- package/dist/xlsx.util-C5Wx4IUs.js +109 -0
- package/package.json +6 -5
- package/dist/ApprovalView-BTZwnKLf.js +0 -118
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DjgmtvXU.js +0 -268
- package/dist/FmMultiselectDialog.vue_vue_type_script_setup_true_lang-n09XXJZK.js +0 -143
- package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-B-19iYaK.js +0 -236
- package/dist/IngredientsView-DMyEGdik.js +0 -1767
- package/dist/IntegrationView-Dn_qL_vC.js +0 -1166
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DGTLUrb9.js +0 -276
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js +0 -35
- package/dist/ReceiveRequestView-BOdgbFFM.js +0 -1394
- package/dist/RecipeView-B1aNLDIK.js +0 -573
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-B5EK101t.js +0 -58
- package/dist/StockView-C_Ur_jTg.js +0 -1862
- package/dist/SupplierView-CXfOoHTr.js +0 -796
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-kjV5Eazv.js +0 -1028
- package/dist/UnitView-DHXfAsnq.js +0 -635
- package/dist/WarehouseView-DMwbxs1q.js +0 -1043
- package/dist/app-BkcO8oNJ.js +0 -66113
- package/dist/date2-Cvp5iJkI.js +0 -95
- package/dist/dayjs.min-D1_pOsO7.js +0 -282
- package/dist/fuzzy-0roCBvgC.js +0 -41
- package/dist/index-B_aEOJsR.js +0 -21515
- package/dist/layout-BnTfCS_X.js +0 -151
- package/dist/number-DLj3W3RW.js +0 -97
- package/dist/row-action.enum-BwQbURNh.js +0 -28
- package/dist/rules-CCmXA0Yi.js +0 -85
- package/dist/stock-estimate-CL4HShG8.js +0 -122
- package/dist/supplier-CjAH8O1y.js +0 -65
- package/dist/use-inventory-binding-dialog-GkJOzE6V.js +0 -93
- package/dist/xlsx.util-B_bqymTM.js +0 -107
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as y, computed as V, ref as w, watch as h, resolveComponent as u, openBlock as F, createBlock as A, withCtx as s, createVNode as g, createElementVNode as k, normalizeClass as K } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { l as d } from "./app-B1MZZxUg.js";
|
|
3
3
|
const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
|
|
4
4
|
__name: "NumberPrecisionInput",
|
|
5
5
|
props: {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { n as m, j as F } from "./app-B1MZZxUg.js";
|
|
2
|
+
import { useCoreStore as v } from "@feedmepos/mf-common";
|
|
3
|
+
import { ref as h, defineComponent as y, resolveComponent as d, openBlock as _, createElementBlock as f, renderSlot as k, createVNode as p, withCtx as g } from "vue";
|
|
4
|
+
const l = m((e, t) => {
|
|
5
|
+
const a = F(), o = v();
|
|
6
|
+
return {
|
|
7
|
+
async getInventoryForecast() {
|
|
8
|
+
var n;
|
|
9
|
+
const r = ((n = o.currentBusiness.value) == null ? void 0 : n._id) ?? "", c = a.currentLocationId ?? "", i = `${e.dataBackendUrl}/${r}/${c}/inventory-forecast`;
|
|
10
|
+
try {
|
|
11
|
+
return await t.get(i);
|
|
12
|
+
} catch {
|
|
13
|
+
return { skus: [] };
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
async getPurchaseOrderForecast(r) {
|
|
17
|
+
var u;
|
|
18
|
+
const c = ((u = o.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = a.currentLocationId ?? "", n = `${e.dataBackendUrl}/${c}/${i}/purchase-order-forecast?days=${r}`;
|
|
19
|
+
try {
|
|
20
|
+
return await t.get(n);
|
|
21
|
+
} catch {
|
|
22
|
+
return { skus: [] };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
function S() {
|
|
28
|
+
return {
|
|
29
|
+
inventoryForecast: { skus: [] },
|
|
30
|
+
purchaseOrderForecast: { skus: [] }
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const s = h(S());
|
|
34
|
+
function P() {
|
|
35
|
+
return {
|
|
36
|
+
// state
|
|
37
|
+
get inventoryForecast() {
|
|
38
|
+
return s.value.inventoryForecast;
|
|
39
|
+
},
|
|
40
|
+
set inventoryForecast(e) {
|
|
41
|
+
s.value.inventoryForecast = e;
|
|
42
|
+
},
|
|
43
|
+
get purchaseOrderForecast() {
|
|
44
|
+
return s.value.purchaseOrderForecast;
|
|
45
|
+
},
|
|
46
|
+
set purchaseOrderForecast(e) {
|
|
47
|
+
s.value.purchaseOrderForecast = e;
|
|
48
|
+
},
|
|
49
|
+
// actions
|
|
50
|
+
async readStockEstimateBalance() {
|
|
51
|
+
const e = l();
|
|
52
|
+
this.inventoryForecast = await e.getInventoryForecast();
|
|
53
|
+
},
|
|
54
|
+
async readPurchaseOrder(e) {
|
|
55
|
+
const t = l();
|
|
56
|
+
this.purchaseOrderForecast = await t.getPurchaseOrderForecast(e);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const I = { class: "flex items-center gap-8" }, O = "Experience enhanced inventory features with premium plan.", E = /* @__PURE__ */ y({
|
|
61
|
+
__name: "PremiumBadge",
|
|
62
|
+
props: {
|
|
63
|
+
zIndex: {}
|
|
64
|
+
},
|
|
65
|
+
setup(e) {
|
|
66
|
+
return (t, a) => {
|
|
67
|
+
const o = d("FmPill"), r = d("FmTooltip");
|
|
68
|
+
return _(), f("div", I, [
|
|
69
|
+
k(t.$slots, "default"),
|
|
70
|
+
p(r, {
|
|
71
|
+
variant: "plain",
|
|
72
|
+
placement: "top",
|
|
73
|
+
content: O,
|
|
74
|
+
"z-index": t.zIndex
|
|
75
|
+
}, {
|
|
76
|
+
default: g(() => [
|
|
77
|
+
p(o, { variant: "premium" })
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
}, 8, ["z-index"])
|
|
81
|
+
]);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
E as _,
|
|
87
|
+
P as u
|
|
88
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as i, resolveComponent as t, openBlock as r, createElementBlock as p, renderSlot as l, createVNode as o, withCtx as s } from "vue";
|
|
2
|
+
const m = { class: "flex items-center gap-8" }, c = "Experience premium feature as a preview. This will become a premium feature.", f = /* @__PURE__ */ i({
|
|
3
|
+
__name: "PreviewBadge",
|
|
4
|
+
props: {
|
|
5
|
+
zIndex: {}
|
|
6
|
+
},
|
|
7
|
+
setup(_) {
|
|
8
|
+
return (e, d) => {
|
|
9
|
+
const n = t("FmPill"), a = t("FmTooltip");
|
|
10
|
+
return r(), p("div", m, [
|
|
11
|
+
l(e.$slots, "default"),
|
|
12
|
+
o(a, {
|
|
13
|
+
variant: "plain",
|
|
14
|
+
placement: "top",
|
|
15
|
+
content: c,
|
|
16
|
+
"z-index": e.zIndex
|
|
17
|
+
}, {
|
|
18
|
+
default: s(() => [
|
|
19
|
+
o(n, { variant: "beta" })
|
|
20
|
+
]),
|
|
21
|
+
_: 1
|
|
22
|
+
}, 8, ["z-index"])
|
|
23
|
+
]);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
f as _
|
|
29
|
+
};
|
package/dist/{PurchaseOrderPrintPreview-EeKhENYH.js → PurchaseOrderPrintPreview-UzrsJ0AN.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as x, computed as f, ref as m, onMounted as g, openBlock as r, createElementBlock as o, createElementVNode as e, toDisplayString as t, normalizeStyle as w, createTextVNode as i, Fragment as u, createCommentVNode as h, renderList as _, normalizeClass as k, pushScopeId as S, popScopeId as C } from "vue";
|
|
2
2
|
import { useRoute as P } from "vue-router";
|
|
3
|
-
import {
|
|
4
|
-
const n = (
|
|
3
|
+
import { aa as v, i as R } from "./app-B1MZZxUg.js";
|
|
4
|
+
const n = (a) => (S("data-v-54384fc1"), a = a(), C(), a), A = { class: "purchase-box" }, N = { valign: "bottom" }, E = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "title" }, "Inventory Receive Note", -1)), O = { class: "text-right" }, D = { class: "header" }, q = /* @__PURE__ */ n(() => /* @__PURE__ */ e("hr", null, null, -1)), I = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "header" }, "Supplier", -1)), T = { class: "sub-header" }, F = { class: "caption" }, L = { class: "address" }, U = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), V = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), z = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), B = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), H = { class: "text-right" }, M = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "header" }, "Delivery To", -1)), J = { class: "sub-header" }, Q = { class: "address" }, j = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), G = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), K = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), W = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), X = { class: "purchase-body" }, Y = /* @__PURE__ */ n(() => /* @__PURE__ */ e("thead", { class: "item-header" }, [
|
|
5
5
|
/* @__PURE__ */ e("tr", null, [
|
|
6
6
|
/* @__PURE__ */ e("th", {
|
|
7
7
|
class: "text-left",
|
|
@@ -20,15 +20,15 @@ const n = (d) => (S("data-v-54384fc1"), d = d(), C(), d), A = { class: "purchase
|
|
|
20
20
|
], -1)), Z = { class: "text-left" }, $ = { class: "text-left" }, ee = { class: "text-right" }, te = /* @__PURE__ */ n(() => /* @__PURE__ */ e("hr", null, null, -1)), se = { style: { "padding-top": "30px" } }, le = /* @__PURE__ */ n(() => /* @__PURE__ */ e("hr", null, null, -1)), ne = { valign: "bottom" }, re = { class: "header" }, oe = { class: "caption" }, ie = {
|
|
21
21
|
class: "text-left",
|
|
22
22
|
style: { width: "20%" }
|
|
23
|
-
}, ue = { class: "text-left" },
|
|
23
|
+
}, ue = { class: "text-left" }, ae = {
|
|
24
24
|
class: "text-right",
|
|
25
25
|
style: { width: "15%" }
|
|
26
|
-
},
|
|
26
|
+
}, de = {
|
|
27
27
|
class: "text-right",
|
|
28
28
|
style: { width: "15%" }
|
|
29
29
|
}, ce = /* @__PURE__ */ x({
|
|
30
30
|
__name: "PurchaseOrderPrintPreview",
|
|
31
|
-
setup(
|
|
31
|
+
setup(a) {
|
|
32
32
|
const p = f(() => {
|
|
33
33
|
switch (s.value.status) {
|
|
34
34
|
case v.enum.CANCEL:
|
|
@@ -50,12 +50,12 @@ const n = (d) => (S("data-v-54384fc1"), d = d(), C(), d), A = { class: "purchase
|
|
|
50
50
|
}, t(s.value.status), 5)
|
|
51
51
|
]),
|
|
52
52
|
e("td", O, [
|
|
53
|
-
e("div",
|
|
53
|
+
e("div", D, "PO #" + t(s.value.orderNumber), 1),
|
|
54
54
|
e("div", null, t(s.value.createdAt), 1)
|
|
55
55
|
])
|
|
56
56
|
])
|
|
57
57
|
]),
|
|
58
|
-
|
|
58
|
+
q,
|
|
59
59
|
e("table", null, [
|
|
60
60
|
e("tr", null, [
|
|
61
61
|
e("td", null, [
|
|
@@ -133,11 +133,11 @@ const n = (d) => (S("data-v-54384fc1"), d = d(), C(), d), A = { class: "purchase
|
|
|
133
133
|
e("div", null, [
|
|
134
134
|
e("table", null, [
|
|
135
135
|
e("tbody", null, [
|
|
136
|
-
(r(!0), o(u, null, _(l.items, (
|
|
137
|
-
e("td", ie, t(
|
|
138
|
-
e("td", ue, t(
|
|
139
|
-
e("td",
|
|
140
|
-
e("td",
|
|
136
|
+
(r(!0), o(u, null, _(l.items, (d, b) => (r(), o("tr", { key: b }, [
|
|
137
|
+
e("td", ie, t(d.code), 1),
|
|
138
|
+
e("td", ue, t(d.description), 1),
|
|
139
|
+
e("td", ae, t(d.quantity), 1),
|
|
140
|
+
e("td", de, t(d.unit), 1)
|
|
141
141
|
]))), 128))
|
|
142
142
|
])
|
|
143
143
|
])
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { defineComponent as ie, ref as R, watch as L, computed as J, resolveComponent as ce, openBlock as b, createBlock as k, unref as e, withCtx as C, createElementVNode as u, createVNode as c, normalizeStyle as le, toDisplayString as ue, createElementBlock as me, createCommentVNode as de, Teleport as pe, mergeProps as Q } from "vue";
|
|
2
|
+
import { Y as h, j as fe, o as G, a as Z, G as ve, Z as _e, b as ye } from "./app-B1MZZxUg.js";
|
|
3
|
+
import { i as W, _ as ge, a as De } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0sbKAX9.js";
|
|
4
|
+
import { u as be } from "./purchase-order-transaction-type-CMIu0jrP.js";
|
|
5
|
+
import { u as he, _ as xe, g as Se } from "./TransferDetails.vue_vue_type_script_setup_true_lang-DupNA58V.js";
|
|
6
|
+
import { i as Re, e as ke } from "./id-to-date-Dlovyec6.js";
|
|
7
|
+
import { useSnackbar as Ce, useBreakpoints as qe } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as we } from "./TransferDialog.vue_vue_type_script_setup_true_lang-COVncBoC.js";
|
|
9
|
+
import { _ as Te, F as x, u as Fe } from "./layout-BJjS48J5.js";
|
|
10
|
+
import "./array-AvWd53LI.js";
|
|
11
|
+
import { useI18n as Oe } from "@feedmepos/mf-common";
|
|
12
|
+
const Ye = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Ee = { class: "flex flex-col py-8" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, $e = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
15
|
+
}, Ne = { class: "pt-8" }, X = "ReceiveRequestViewSearchCriteria", Xe = /* @__PURE__ */ ie({
|
|
16
|
+
__name: "ReceiveRequestView",
|
|
17
|
+
setup(je) {
|
|
18
|
+
const { t: m } = Oe(), B = Ce();
|
|
19
|
+
h.object({
|
|
20
|
+
name: h.string().optional().nullable(),
|
|
21
|
+
startDate: h.string().optional().nullable(),
|
|
22
|
+
endDate: h.string().optional().nullable()
|
|
23
|
+
});
|
|
24
|
+
const q = _e(), w = ye();
|
|
25
|
+
function I() {
|
|
26
|
+
const o = {
|
|
27
|
+
name: "",
|
|
28
|
+
...W()
|
|
29
|
+
}, r = q.getItem(X);
|
|
30
|
+
if (!r)
|
|
31
|
+
return o;
|
|
32
|
+
try {
|
|
33
|
+
return JSON.parse(r);
|
|
34
|
+
} catch {
|
|
35
|
+
return o;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function T() {
|
|
39
|
+
q.setItem(X, JSON.stringify(i.value));
|
|
40
|
+
}
|
|
41
|
+
const i = R(I()), a = be("receive/request", i.value), { columnDefs: ee } = he("receive/request", a), F = fe();
|
|
42
|
+
async function te() {
|
|
43
|
+
const o = `inventory-record_${G(i.value.startDate).format("DD-MM-YYYY_HH-mm")}-${G(i.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, r = a.purchaseOrders.value.flatMap(
|
|
44
|
+
(n) => n.items.map((t) => {
|
|
45
|
+
const s = new Date(Re(n._id) ?? ""), p = n.effectiveAt ? new Date(n.effectiveAt) : void 0, f = Z(
|
|
46
|
+
Se(t.sku, n.deliveryOrder || [])
|
|
47
|
+
), v = Z(t.quantity);
|
|
48
|
+
return {
|
|
49
|
+
"SKU code": t.code,
|
|
50
|
+
"SKU name": t.name,
|
|
51
|
+
"PO #": n.seqNumber,
|
|
52
|
+
"Effective at": p,
|
|
53
|
+
Date: s,
|
|
54
|
+
Status: n.status,
|
|
55
|
+
Reference: n.ref ?? "",
|
|
56
|
+
"Received quantity": f,
|
|
57
|
+
"Ordered quantity": v,
|
|
58
|
+
Unit: t.sku.unit.abbrev,
|
|
59
|
+
"Total cost": t.totalCost ? ve(t.totalCost) : null
|
|
60
|
+
};
|
|
61
|
+
})
|
|
62
|
+
), l = [
|
|
63
|
+
"SKU code",
|
|
64
|
+
"SKU name",
|
|
65
|
+
"PO #",
|
|
66
|
+
"Date",
|
|
67
|
+
"Status",
|
|
68
|
+
"Reference",
|
|
69
|
+
"Received quantity",
|
|
70
|
+
"Ordered quantity",
|
|
71
|
+
"Unit"
|
|
72
|
+
];
|
|
73
|
+
w.enableBackdatePo && l.insert("Effective at", 4), w.enableTotalCost && l.push("Total cost"), await ke(
|
|
74
|
+
[
|
|
75
|
+
{
|
|
76
|
+
name: "purchases",
|
|
77
|
+
data: r,
|
|
78
|
+
columns: l
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
o
|
|
82
|
+
), B.open({
|
|
83
|
+
title: m("inventory.transfer.receiveRequest.export.success"),
|
|
84
|
+
message: m("inventory.transfer.receiveRequest.export.message", [o]),
|
|
85
|
+
type: "success"
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
const S = R(W()), d = R("");
|
|
89
|
+
L([() => S.value], ([o]) => {
|
|
90
|
+
!o.startDate || !o.endDate || (i.value.startDate = o.startDate, i.value.endDate = o.endDate, a.updateDateRange(
|
|
91
|
+
i.value.startDate,
|
|
92
|
+
i.value.endDate
|
|
93
|
+
), T());
|
|
94
|
+
}), L([() => d.value], () => {
|
|
95
|
+
T();
|
|
96
|
+
});
|
|
97
|
+
function ae(o) {
|
|
98
|
+
o === "create" && a.promptCreateTransferDialog();
|
|
99
|
+
}
|
|
100
|
+
const { breakpoints: O } = qe(), oe = J(() => O.value.xs || O.value.sm ? 10 : 20), re = Fe(), ne = J(() => [
|
|
101
|
+
{
|
|
102
|
+
icon: "refresh",
|
|
103
|
+
onClick: a.fetchData
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
icon: "ios_share",
|
|
107
|
+
onClick: te
|
|
108
|
+
}
|
|
109
|
+
]);
|
|
110
|
+
return (o, r) => {
|
|
111
|
+
const l = ce("FmTable");
|
|
112
|
+
return b(), k(ge, {
|
|
113
|
+
title: e(m)("inventory.transfer.receiveRequest.title2"),
|
|
114
|
+
actions: [
|
|
115
|
+
{
|
|
116
|
+
label: e(m)("inventory.transfer.receiveRequest.actions.create"),
|
|
117
|
+
value: "create",
|
|
118
|
+
isPrimary: !0,
|
|
119
|
+
prependIcon: "add"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"onClick:action": ae
|
|
123
|
+
}, {
|
|
124
|
+
default: C(() => {
|
|
125
|
+
var n;
|
|
126
|
+
return [
|
|
127
|
+
u("div", Ye, [
|
|
128
|
+
c(De, {
|
|
129
|
+
"date-range-query": "",
|
|
130
|
+
"date-range": S.value,
|
|
131
|
+
"onUpdate:dateRange": r[0] || (r[0] = (t) => S.value = t),
|
|
132
|
+
searchable: "",
|
|
133
|
+
"change-location": "",
|
|
134
|
+
search: d.value,
|
|
135
|
+
"onUpdate:search": r[1] || (r[1] = (t) => d.value = t),
|
|
136
|
+
actions: ne.value
|
|
137
|
+
}, null, 8, ["date-range", "search", "actions"]),
|
|
138
|
+
(b(), k(l, {
|
|
139
|
+
style: le(e(re).tableHeight),
|
|
140
|
+
"column-defs": e(ee),
|
|
141
|
+
"row-data": e(a).purchaseOrders.value,
|
|
142
|
+
"search-value": d.value,
|
|
143
|
+
loading: !e(F)._currentLocation || e(a).loading.value,
|
|
144
|
+
onRowClick: r[2] || (r[2] = (t) => e(a).promptShowTransferDetails(t.original)),
|
|
145
|
+
key: (n = e(F)._currentLocation) == null ? void 0 : n.dbName,
|
|
146
|
+
"page-size": oe.value
|
|
147
|
+
}, {
|
|
148
|
+
"list-row": C((t) => [
|
|
149
|
+
c(Te, {
|
|
150
|
+
row: t,
|
|
151
|
+
onRowClick: e(a).promptShowTransferDetails
|
|
152
|
+
}, {
|
|
153
|
+
default: C((s) => {
|
|
154
|
+
var p, f, v, _, Y, E, M, P, y, U, $, N, j, g, A, H, V, K, D, z;
|
|
155
|
+
return [
|
|
156
|
+
u("div", Ee, [
|
|
157
|
+
u("div", Me, [
|
|
158
|
+
c(e(x), {
|
|
159
|
+
render: (v = (f = (p = s._id) == null ? void 0 : p.column) == null ? void 0 : f.columnDef) == null ? void 0 : v.cell,
|
|
160
|
+
props: (Y = (_ = s._id) == null ? void 0 : _.getContext) == null ? void 0 : Y.call(_)
|
|
161
|
+
}, null, 8, ["render", "props"])
|
|
162
|
+
]),
|
|
163
|
+
u("div", Pe, [
|
|
164
|
+
c(e(x), {
|
|
165
|
+
render: (P = (M = (E = s.supplier_name) == null ? void 0 : E.column) == null ? void 0 : M.columnDef) == null ? void 0 : P.cell,
|
|
166
|
+
props: (U = (y = s.supplier_name) == null ? void 0 : y.getContext) == null ? void 0 : U.call(y)
|
|
167
|
+
}, null, 8, ["render", "props"])
|
|
168
|
+
]),
|
|
169
|
+
u("div", Ue, ue(t.original.items.map((se) => `${se.name}`).join(", ")), 1),
|
|
170
|
+
t.original.ref ? (b(), me("div", $e, [
|
|
171
|
+
c(e(x), {
|
|
172
|
+
render: (j = (N = ($ = s.ref) == null ? void 0 : $.column) == null ? void 0 : N.columnDef) == null ? void 0 : j.cell,
|
|
173
|
+
props: (A = (g = s.ref) == null ? void 0 : g.getContext) == null ? void 0 : A.call(g)
|
|
174
|
+
}, null, 8, ["render", "props"])
|
|
175
|
+
])) : de("", !0),
|
|
176
|
+
u("div", Ne, [
|
|
177
|
+
c(e(x), {
|
|
178
|
+
render: (K = (V = (H = s.status) == null ? void 0 : H.column) == null ? void 0 : V.columnDef) == null ? void 0 : K.cell,
|
|
179
|
+
props: (z = (D = s.status) == null ? void 0 : D.getContext) == null ? void 0 : z.call(D)
|
|
180
|
+
}, null, 8, ["render", "props"])
|
|
181
|
+
])
|
|
182
|
+
])
|
|
183
|
+
];
|
|
184
|
+
}),
|
|
185
|
+
_: 2
|
|
186
|
+
}, 1032, ["row", "onRowClick"])
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
190
|
+
]),
|
|
191
|
+
(b(), k(pe, { to: "body" }, [
|
|
192
|
+
c(we, Q(e(a).transferDialogProps.value, {
|
|
193
|
+
onSubmitted: e(a).fetchData
|
|
194
|
+
}), null, 16, ["onSubmitted"]),
|
|
195
|
+
c(xe, Q(e(a).transferDetailsProps.value, {
|
|
196
|
+
onSubmitted: e(a).fetchData
|
|
197
|
+
}), null, 16, ["onSubmitted"])
|
|
198
|
+
]))
|
|
199
|
+
];
|
|
200
|
+
}),
|
|
201
|
+
_: 1
|
|
202
|
+
}, 8, ["title", "actions"]);
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
export {
|
|
207
|
+
Xe as default
|
|
208
|
+
};
|