Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/pr-dev This commit looks good Details
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2025-02-04 13:01:50 +01:00
commit a3177f126e
6 changed files with 10 additions and 11 deletions

View File

@ -75,6 +75,7 @@ const focus = () => {
defineExpose({ defineExpose({
focus, focus,
vnInputRef,
}); });
const mixinRules = [ const mixinRules = [

View File

@ -119,7 +119,7 @@ watch(
() => props.data, () => props.data,
() => { () => {
store.data = props.data; store.data = props.data;
} },
); );
watch( watch(
@ -128,12 +128,12 @@ watch(
if (!mounted.value) return; if (!mounted.value) return;
emit('onChange', data); emit('onChange', data);
}, },
{ immediate: true } { immediate: true },
); );
watch( watch(
() => [props.url, props.filter], () => [props.url, props.filter],
([url, filter]) => mounted.value && fetch({ url, filter }) ([url, filter]) => mounted.value && fetch({ url, filter }),
); );
const addFilter = async (filter, params) => { const addFilter = async (filter, params) => {
await arrayData.addFilter({ filter, params }); await arrayData.addFilter({ filter, params });
@ -194,7 +194,7 @@ function endPagination() {
async function onLoad(index, done) { async function onLoad(index, done) {
if (!store.data || !mounted.value) return done(); if (!store.data || !mounted.value) return done();
if (store.data.length === 0 || !props.url) return done(false); if (store.data.length === 0 || !arrayData.store.url) return done(false);
pagination.value.page = pagination.value.page + 1; pagination.value.page = pagination.value.page + 1;

View File

@ -125,7 +125,7 @@ onMounted(async () => {
inventoriedDate.value = inventoriedDate.value =
(await axios.get('Configs/findOne')).data?.inventoried || today; (await axios.get('Configs/findOne')).data?.inventoried || today;
if (query.warehouseFk) ref.warehouseFk = query.warehouseFk; if (query.warehouseFk) ref.warehouseFk = +query.warehouseFk;
else if (!ref.warehouseFk && user.value) ref.warehouseFk = user.value.warehouseFk; else if (!ref.warehouseFk && user.value) ref.warehouseFk = user.value.warehouseFk;
if (ref.date) showWhatsBeforeInventory.value = true; if (ref.date) showWhatsBeforeInventory.value = true;
ref.itemFk = route.params.id; ref.itemFk = route.params.id;
@ -143,7 +143,7 @@ onMounted(async () => {
const fetchItemBalances = async () => await arrayDataItemBalances.fetch({}); const fetchItemBalances = async () => await arrayDataItemBalances.fetch({});
const getBadgeAttrs = (_date) => { const getBadgeAttrs = (_date) => {
const isSameDate = date.isSameDate(today.value, _date); const isSameDate = date.isSameDate(today, _date);
const attrs = { const attrs = {
'text-color': isSameDate ? 'black' : 'white', 'text-color': isSameDate ? 'black' : 'white',
color: isSameDate ? 'warning' : 'transparent', color: isSameDate ? 'warning' : 'transparent',
@ -153,8 +153,6 @@ const getBadgeAttrs = (_date) => {
const scrollToToday = async () => { const scrollToToday = async () => {
await nextTick(); await nextTick();
const today = Date.vnNew();
today.setHours(0, 0, 0, 0);
const todayCell = document.querySelector(`td[data-date="${today.toISOString()}"]`); const todayCell = document.querySelector(`td[data-date="${today.toISOString()}"]`);
if (todayCell) { if (todayCell) {
todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' }); todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' });

View File

@ -272,11 +272,12 @@ const onDenyAccept = (_, responseData) => {
<template #column-achieved="{ row }"> <template #column-achieved="{ row }">
<span> <span>
<VnInput <VnInput
ref="achievedRef"
type="number" type="number"
v-model.number="row.saleQuantity" v-model.number="row.saleQuantity"
:disable="!row.itemFk || row.isOk != null" :disable="!row.itemFk || row.isOk != null"
@blur="changeQuantity(row)" @blur="changeQuantity(row)"
@keyup.enter="changeQuantity(row)" @keyup.enter="$refs.achievedRef.vnInputRef.blur()"
dense dense
/> />
</span> </span>

View File

@ -21,7 +21,6 @@ const catalogParams = {
}; };
const arrayData = useArrayData(dataKey, { const arrayData = useArrayData(dataKey, {
url: 'Orders/CatalogFilter', url: 'Orders/CatalogFilter',
limit: 50,
userParams: catalogParams, userParams: catalogParams,
}); });
const store = arrayData.store; const store = arrayData.store;

View File

@ -81,7 +81,7 @@ const columns = computed(() => [
label: t('module.created'), label: t('module.created'),
component: 'date', component: 'date',
cardVisible: true, cardVisible: true,
format: (row) => toDateTimeFormat(row?.landed), format: (row) => toDateTimeFormat(row?.created),
columnField: { columnField: {
component: null, component: null,
}, },