forked from verdnatura/salix-front
Merge branch 'dev' into 7717_fixOrderCatalog
This commit is contained in:
commit
610e7c150b
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "24.32.0",
|
"version": "24.34.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -17,6 +17,7 @@ import { toDateFormat } from 'src/filters/date.js';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
import { dashIfEmpty } from 'src/filters';
|
||||||
import { date } from 'quasar';
|
import { date } from 'quasar';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -33,6 +34,7 @@ const itemsBalanceFilter = reactive({
|
||||||
const itemBalances = ref([]);
|
const itemBalances = ref([]);
|
||||||
const warehouseFk = ref(null);
|
const warehouseFk = ref(null);
|
||||||
const _showWhatsBeforeInventory = ref(false);
|
const _showWhatsBeforeInventory = ref(false);
|
||||||
|
const inventoriedDate = ref(null);
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
|
@ -98,7 +100,7 @@ const showWhatsBeforeInventory = computed({
|
||||||
set: (val) => {
|
set: (val) => {
|
||||||
_showWhatsBeforeInventory.value = val;
|
_showWhatsBeforeInventory.value = val;
|
||||||
if (!val) itemsBalanceFilter.where.date = null;
|
if (!val) itemsBalanceFilter.where.date = null;
|
||||||
else itemsBalanceFilter.where.date = new Date();
|
else itemsBalanceFilter.where.date = inventoriedDate.value ?? new Date();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -160,6 +162,8 @@ onMounted(async () => {
|
||||||
if (route.query.warehouseFk) warehouseFk.value = route.query.warehouseFk;
|
if (route.query.warehouseFk) warehouseFk.value = route.query.warehouseFk;
|
||||||
else if (user.value) warehouseFk.value = user.value.warehouseFk;
|
else if (user.value) warehouseFk.value = user.value.warehouseFk;
|
||||||
itemsBalanceFilter.where.warehouseFk = warehouseFk.value;
|
itemsBalanceFilter.where.warehouseFk = warehouseFk.value;
|
||||||
|
const { data } = await axios.get('Configs/findOne');
|
||||||
|
inventoriedDate.value = data.inventoried;
|
||||||
await fetchItemBalances();
|
await fetchItemBalances();
|
||||||
await scrollToToday();
|
await scrollToToday();
|
||||||
});
|
});
|
||||||
|
@ -284,7 +288,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
>
|
>
|
||||||
{{ row.entityId }}
|
{{ row.entityId }}
|
||||||
</component>
|
</component>
|
||||||
<span class="link">
|
<span :class="{ link: row.entityId }">
|
||||||
{{ dashIfEmpty(row.entityName) }}
|
{{ dashIfEmpty(row.entityName) }}
|
||||||
</span>
|
</span>
|
||||||
</QBadge>
|
</QBadge>
|
||||||
|
|
Loading…
Reference in New Issue