updates
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
0eab0a9a98
commit
ebdc1e9906
|
@ -111,7 +111,7 @@ const onDataSaved = async () => {
|
||||||
:filter="filterBanks"
|
:filter="filterBanks"
|
||||||
@on-fetch="(data) => (bankOptions = data)"
|
@on-fetch="(data) => (bankOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
url="Accountings"
|
url="dAccountings"
|
||||||
/>
|
/>
|
||||||
<fetch-data
|
<fetch-data
|
||||||
:filter="filterClientFindOne"
|
:filter="filterClientFindOne"
|
||||||
|
|
|
@ -76,7 +76,7 @@ async function insert() {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
url="Accountings"
|
url="Accountidngs"
|
||||||
auto-load
|
auto-load
|
||||||
limit="30"
|
limit="30"
|
||||||
@on-fetch="(data) => (banks = data)"
|
@on-fetch="(data) => (banks = data)"
|
||||||
|
|
|
@ -93,3 +93,4 @@ proposal:
|
||||||
counter: Counter
|
counter: Counter
|
||||||
groupingPrice: Grouping Price
|
groupingPrice: Grouping Price
|
||||||
itemOldPrice: itemOld Price
|
itemOldPrice: itemOld Price
|
||||||
|
status: State
|
||||||
|
|
|
@ -93,3 +93,4 @@ proposal:
|
||||||
counter: Contador
|
counter: Contador
|
||||||
groupingPrice: Precio Grouping
|
groupingPrice: Precio Grouping
|
||||||
itemOldPrice: Precio itemOld
|
itemOldPrice: Precio itemOld
|
||||||
|
status: Estado
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
const DEFAULT_WAREHOUSE = 'Algemesi';
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dataKey: {
|
dataKey: {
|
||||||
|
@ -14,14 +14,15 @@ const props = defineProps({
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const arrayData = useArrayData(props.dataKey);
|
||||||
|
const warehouse = ref(null);
|
||||||
|
onMounted(async () => {
|
||||||
|
warehouse.value = arrayData.store?.userParams?.warehouse;
|
||||||
|
});
|
||||||
|
|
||||||
const to = Date.vnNew();
|
const to = Date.vnNew();
|
||||||
to.setDate(to.getDate() + 1);
|
to.setDate(to.getDate() + 1);
|
||||||
|
|
||||||
const defaultParams = {
|
|
||||||
warehouse: null,
|
|
||||||
};
|
|
||||||
|
|
||||||
const warehouses = ref();
|
const warehouses = ref();
|
||||||
const categoriesOptions = ref([]);
|
const categoriesOptions = ref([]);
|
||||||
const itemTypesRef = ref(null);
|
const itemTypesRef = ref(null);
|
||||||
|
@ -31,12 +32,9 @@ const itemTypesFilter = {
|
||||||
order: 'name ASC',
|
order: 'name ASC',
|
||||||
where: {},
|
where: {},
|
||||||
};
|
};
|
||||||
|
const defaultParams = {
|
||||||
const handleWarehouses = async (data) => {
|
warehouse: arrayData.store?.userParams?.warehouse,
|
||||||
warehouses.value = data;
|
|
||||||
defaultParams.warehouse = data.find((w) => w.name === DEFAULT_WAREHOUSE).id;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onCategoryChange = async (categoryFk, search) => {
|
const onCategoryChange = async (categoryFk, search) => {
|
||||||
if (!categoryFk) {
|
if (!categoryFk) {
|
||||||
itemTypesFilter.where.categoryFk = null;
|
itemTypesFilter.where.categoryFk = null;
|
||||||
|
@ -50,16 +48,17 @@ const onCategoryChange = async (categoryFk, search) => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="Warehouses" @on-fetch="handleWarehouses" auto-load />
|
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
|
||||||
<FetchData
|
<FetchData
|
||||||
url="ItemCategories"
|
url="ItemCategories"
|
||||||
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
|
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
|
||||||
@on-fetch="(data) => (categoriesOptions = data)"
|
@on-fetch="(data) => (categoriesOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<VnFilterPanel
|
<VnFilterPanel
|
||||||
:data-key="props.dataKey"
|
|
||||||
:params="defaultParams"
|
:params="defaultParams"
|
||||||
|
:data-key="props.dataKey"
|
||||||
:search-button="true"
|
:search-button="true"
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
|
@ -70,6 +69,17 @@ const onCategoryChange = async (categoryFk, search) => {
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ params, searchFn }">
|
<template #body="{ params, searchFn }">
|
||||||
<QList dense class="q-gutter-y-sm q-mt-sm">
|
<QList dense class="q-gutter-y-sm q-mt-sm">
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnInput
|
||||||
|
v-model="params.days"
|
||||||
|
:label="t('negative.days')"
|
||||||
|
dense
|
||||||
|
is-outlined
|
||||||
|
type="number"
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref, onBeforeMount } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||||
|
@ -8,11 +8,14 @@ import TicketLackDetail from 'pages/Ticket/Negative/TicketLackDetail.vue';
|
||||||
import ChangeQuantityDialog from 'pages/Ticket/Negative/ChangeQuantityDialog.vue';
|
import ChangeQuantityDialog from 'pages/Ticket/Negative/ChangeQuantityDialog.vue';
|
||||||
import ChangeStateDialog from 'pages/Ticket/Negative/ChangeStateDialog.vue';
|
import ChangeStateDialog from 'pages/Ticket/Negative/ChangeStateDialog.vue';
|
||||||
import ItemProposal from 'src/pages/Item/components/ItemProposal.vue';
|
import ItemProposal from 'src/pages/Item/components/ItemProposal.vue';
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
|
||||||
import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue';
|
import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue';
|
||||||
import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOriginDialog.vue';
|
import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOriginDialog.vue';
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
import axios from 'axios';
|
||||||
|
const DEFAULT_WAREHOUSE = 'Algemesi';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -25,7 +28,10 @@ const showChangeQuantityDialog = ref(false);
|
||||||
const showChangeStateDialog = ref(false);
|
const showChangeStateDialog = ref(false);
|
||||||
const showFree = ref(true);
|
const showFree = ref(true);
|
||||||
const currentRow = ref(null);
|
const currentRow = ref(null);
|
||||||
|
const negativeParams = computed(() => ({
|
||||||
|
days: 22,
|
||||||
|
warehouse: null,
|
||||||
|
}));
|
||||||
const viewSummary = (row) => {
|
const viewSummary = (row) => {
|
||||||
currentRow.value = row;
|
currentRow.value = row;
|
||||||
};
|
};
|
||||||
|
@ -94,6 +100,18 @@ const columns = computed(() => [
|
||||||
field: (row) => row,
|
field: (row) => row,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
stateStore.rightDrawer = false;
|
||||||
|
|
||||||
|
const data = await axios.get('Warehouses');
|
||||||
|
console.log(data);
|
||||||
|
// .then((data) => {
|
||||||
|
// negativeParams.value.warehouse = data.find(
|
||||||
|
// (w) => w.name === DEFAULT_WAREHOUSE
|
||||||
|
// ).id;
|
||||||
|
// });
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -189,10 +207,11 @@ const columns = computed(() => [
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<div v-show="!currentRow" class="list">
|
<div v-show="!currentRow" class="list">
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
|
auto-load
|
||||||
data-key="NegativeList"
|
data-key="NegativeList"
|
||||||
:url="`Tickets/itemLack`"
|
:url="`Tickets/itemLack`"
|
||||||
:order="['itemFk DESC']"
|
:order="['itemFk DESC']"
|
||||||
auto-load
|
:user-params="negativeParams"
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<QTable
|
<QTable
|
||||||
|
|
|
@ -20,6 +20,7 @@ negative:
|
||||||
type: 'Type'
|
type: 'Type'
|
||||||
negativeAction: 'Negative'
|
negativeAction: 'Negative'
|
||||||
totalNegative: 'Total negatives'
|
totalNegative: 'Total negatives'
|
||||||
|
days: Dias
|
||||||
modalOrigin:
|
modalOrigin:
|
||||||
title: 'Update negatives'
|
title: 'Update negatives'
|
||||||
question: 'Select a state to update'
|
question: 'Select a state to update'
|
||||||
|
|
|
@ -21,6 +21,7 @@ negative:
|
||||||
type: 'Tipo'
|
type: 'Tipo'
|
||||||
negativeAction: 'Negativo'
|
negativeAction: 'Negativo'
|
||||||
totalNegative: 'Total negativos'
|
totalNegative: 'Total negativos'
|
||||||
|
days: Rango de dias
|
||||||
modalOrigin:
|
modalOrigin:
|
||||||
title: 'Actualizar negativos'
|
title: 'Actualizar negativos'
|
||||||
question: 'Seleccione un estado para guardar'
|
question: 'Seleccione un estado para guardar'
|
||||||
|
|
Loading…
Reference in New Issue