This commit is contained in:
Javier Segarra 2024-06-13 09:37:39 +02:00
parent 1641ad396c
commit bb58f72e3f
13 changed files with 77 additions and 28 deletions

View File

@ -63,6 +63,7 @@ globals:
shipped: Shipped
totalEntries: Total entries
amount: Amount
removeSelection: Clear selection
packages: Packages
download: Download
selectRows: 'Select all { numberRows } row(s)'

View File

@ -71,7 +71,8 @@ globals:
requiredField: Campo obligatorio
class: clase
type: Tipo
reason: motivo
reason: Motivo
removeSelection: Eliminar selección
noResults: Sin resultados
results: resultados
system: Sistema

View File

@ -134,7 +134,8 @@ const columns = computed(() => [
},
]);
async function confirm() {
quantity.value = 0;
console.log('');
// quantity.value = 0;
// const response = { address: address.value };
// if (props.promise) {
// isLoading.value = true;
@ -170,13 +171,13 @@ async function confirm() {
</QCardSection>
<QCardSection class="row items-center justify-center column items-stretch">
<span class="text-h6 text-grey">
{{ currentTicket }}
<!-- {{ currentTicket }} -->
{{
t('proposal.title', {
ticketFk: currentTicket.ticketFk,
saleFk: currentTicket.saleFk,
})
}}**
}}
</span>
</QCardSection>
<QCardSection class="row items-center justify-center column items-stretch">
@ -189,7 +190,11 @@ async function confirm() {
@click="changeTicket(false)"
:disable="index === 0"
/>
<!-- <span>{{ currentTicket.ticketFk }}</span> -->
<span>
Ticket #{{ currentTicket.ticketFk }} -
<!-- {{ currentTicket.client?.name }} ({{ currentTicket.client?.id }}) -->
{{ currentTicket.nickname }}</span
>
<QBtn
icon="arrow_right"
flat
@ -279,19 +284,37 @@ async function confirm() {
</div>
</QCardSection>
<QCardActions align="right">
<QBtn :label="t('globals.cancel')" color="primary" flat v-close-popup />
<QBtn
:label="t('globals.replace')"
:label="t('globals.removeSelection')"
color="primary"
flat
:disable="proposalSelected.length < 1 || quantity === 0"
@click="proposalSelected = []"
/>
<QBtnDropdown
top
split
:label="t('proposal.replace')"
color="primary"
:loading="isLoading"
@click="confirm"
:disable="proposalSelected.length < 1 || quantity === 0"
unelevated
/>
><QList>
<QItem clickable @click="confirm">
<QItemSection>
<QItemLabel>
{{ t('proposal.replaceAndConfirm') }}
</QItemLabel>
</QItemSection>
</QItem>
</QList></QBtnDropdown
>
<QInput
v-model="quantity"
v-model.number="quantity"
v-if="quantity > -1"
@update:model-value="(val) => (quantity = +val)"
@update:model-value="(val) => (quantity = val)"
type="number"
min="0"
:label="t('proposal.quantityToReplace')"

View File

@ -89,7 +89,7 @@ itemType:
category: Reino
temperature: Temperatura
proposal:
title: Items de sustitución para el ticket {ticketFk}:{saleFk}
title: Items de sustitución para los tickets seleccionados
itemFk: Item
longName: Nombre
subName: Productor
@ -106,3 +106,5 @@ proposal:
itemOldPrice: Precio itemOld
status: Estado
quantityToReplace: Cantidad a reemplazar
replace: Sustituir para este ticket
replaceAndConfirm: Sustituir y confirmar precio

View File

@ -3,10 +3,10 @@ import { computed, nextTick, onMounted, onUnmounted, ref, toRefs } from 'vue';
import { useI18n } from 'vue-i18n';
import { QBtn, QCheckbox, useQuasar } from 'quasar';
import axios from 'axios';
import HandleSplited from 'pages/Ticket/Negative/HandleSplited.vue';
import ChangeQuantityDialog from 'pages/Ticket/Negative/ChangeQuantityDialog.vue';
import ChangeStateDialog from 'pages/Ticket/Negative/ChangeStateDialog.vue';
import ItemProposal from 'src/pages/Item/components/ItemProposal.vue';
import HandleSplited from 'pages/Ticket/Negative/components/HandleSplited.vue';
import ChangeQuantityDialog from 'pages/Ticket/Negative/components/ChangeQuantityDialog.vue';
import ChangeStateDialog from 'pages/Ticket/Negative/components/ChangeStateDialog.vue';
import ItemProposal from 'pages/Item/components/ItemProposal.vue';
import { useVnConfirm } from 'composables/useVnConfirm';
import VnPaginate from 'src/components/ui/VnPaginate.vue';
@ -19,6 +19,7 @@ import useNotify from 'src/composables/useNotify.js';
import { useStateStore } from 'stores/useStateStore';
import { useDialogPluginComponent } from 'quasar';
import { useSession } from 'src/composables/useSession';
import ZoneDescriptorProxy from 'pages/Zone/Card/ZoneDescriptorProxy.vue';
const { openConfirmationModal } = useVnConfirm();
const { t } = useI18n();
@ -153,8 +154,8 @@ const tableColumnComponents = computed(() => ({
event: getInputEvents,
},
zoneName: {
component: 'span',
props: {},
component: QBtn,
props: { color: 'blue', sortable: true, flat: true },
event: () => ({}),
},
nickname: {
@ -496,10 +497,10 @@ const split = async () => {
>{{ col.value }}
<ItemDescriptorProxy :id="$props.entityId"
/></template>
<template v-if="col.name === 'itemFk'"
>{{ col.value }}
<ItemDescriptorProxy :id="$props.entityId"
/></template>
<template v-if="col.name === 'zoneName'">
{{ col.value }}
<ZoneDescriptorProxy :id="props.row.zoneFk" />
</template>
</component>
</template>
</QTd>

View File

@ -2,6 +2,8 @@
import { ref, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { useArrayData } from 'composables/useArrayData';
import VnInputDate from 'components/common/VnInputDate.vue';
import VnInputTime from 'components/common/VnInputTime.vue';
import FetchData from 'components/FetchData.vue';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
@ -112,6 +114,25 @@ const onCategoryChange = async (categoryFk, search) => {
/>
</QItemSection>
</QItem>
<QCard bordered>
<QItem>
<QItemSection>
<VnInputDate
:label="t('negative.date')"
v-model="params.date"
></VnInputDate
></QItemSection>
</QItem>
<QItem>
<QItemSection
><VnInputTime
:label="t('negative.timed')"
v-model="params.time"
></VnInputTime>
</QItemSection>
</QItem>
</QCard>
<QCard bordered>
<QItem>
<QItemSection v-if="categoriesOptions">

View File

@ -7,8 +7,8 @@ import TicketLackFilter from 'pages/Ticket/Negative/TicketLackFilter.vue';
import TicketLackDetail from 'pages/Ticket/Negative/TicketLackDetail.vue';
import FetchData from 'components/FetchData.vue';
import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue';
import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOriginDialog.vue';
import NegativeOriginDialog from 'pages/Ticket/Negative/components/NegativeOriginDialog.vue';
import TotalNegativeOriginDialog from 'pages/Ticket/Negative/components/TotalNegativeOriginDialog.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import { onBeforeMount } from 'vue';
@ -33,11 +33,10 @@ const originDialogRef = ref();
const totalNegativeDialogRef = ref();
const columns = computed(() => [
{
name: 'Date',
label: t('negative.minTimed'),
name: 'date',
label: t('negative.date'),
field: 'timed',
format: (val) => toDate(val),
sortable: true,
},
{
@ -161,7 +160,7 @@ const handleWarehouses = async (data) => {
ref="vnPaginateRef"
data-key="NegativeList"
:url="`Tickets/itemLack`"
:order="['itemFk DESC']"
:order="['itemFk DESC, date DESC, timed DESC']"
:user-params="negativeParams"
>
<template #body="{ rows }">

View File

@ -17,7 +17,8 @@ negative:
warehouse: 'Almacen'
lack: 'Negativo'
inkFk: 'Color'
timed: 'Timed'
timed: 'Hora'
date: 'Fecha'
minTimed: 'Hora'
type: 'Tipo'
negativeAction: 'Negativo'