forked from verdnatura/salix-front
refs #6321 updates
This commit is contained in:
parent
527c845356
commit
6e701bd455
|
@ -4,29 +4,6 @@ import { useI18n } from 'vue-i18n';
|
|||
|
||||
const emit = defineEmits(['onSubmit']);
|
||||
|
||||
const $props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
subtitle: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
defaultSubmitButton: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
defaultCancelButton: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
customSubmitButtonLabel: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const closeButton = ref(null);
|
||||
|
|
|
@ -462,6 +462,8 @@ export default {
|
|||
inkFk: 'Color',
|
||||
timed: 'timed',
|
||||
minTimed: 'Hora',
|
||||
negativeAction: 'Negativo',
|
||||
totalNegative: 'Total negativos',
|
||||
modalOrigin:{
|
||||
title: 'Actualizar negativos',
|
||||
question: 'Seleccione un estado para guardar'
|
||||
|
|
|
@ -9,11 +9,6 @@ import TicketDescriptorDialog from 'pages/Ticket/Negative/TicketLackDescriptorDi
|
|||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import axios from 'axios';
|
||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnSelectFilter from 'components/common/VnSelectFilter.vue';
|
||||
import VnSelectDialog from 'components/common/VnSelectDialog.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import { useDialogPluginComponent } from 'quasar';
|
||||
|
||||
const session = useSession();
|
||||
|
@ -25,6 +20,7 @@ const { t } = useI18n();
|
|||
const selectedRows = ref([]);
|
||||
const showTicketDialog = ref(false);
|
||||
const showNegativeOriginDialog = ref(false);
|
||||
const showTotalNegativeOriginDialog = ref(false);
|
||||
const reasonegativeOriginDialog = ref(null);
|
||||
const currentRow = ref(null);
|
||||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||
|
@ -40,7 +36,39 @@ const viewSummary = (value) => {
|
|||
// });
|
||||
};
|
||||
const originDialogRef = ref();
|
||||
|
||||
const totalNegativeDialogRef = ref();
|
||||
const columnsTotalNegativeDialog = computed(() => [
|
||||
{
|
||||
name: 'id',
|
||||
label: t('ticket.negative.id'),
|
||||
field: ({ id }) => id,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'itemFk',
|
||||
label: t('ticket.negative.itemFk'),
|
||||
field: ({ itemFk }) => itemFk,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'type',
|
||||
label: t('ticket.negative.type'),
|
||||
field: ({ type }) => type,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'dated',
|
||||
label: t('ticket.negative.dated'),
|
||||
field: ({ dated }) => dated,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'quantity',
|
||||
label: t('ticket.negative.quantity'),
|
||||
field: ({ quantity }) => quantity,
|
||||
sortable: true,
|
||||
},
|
||||
]);
|
||||
const columns = computed(() => [
|
||||
{
|
||||
name: 'minTimed',
|
||||
|
@ -149,11 +177,18 @@ const updateNegativeOrigin = async () => {
|
|||
<div class="flex items-center q-ml-lg">
|
||||
<QBtn
|
||||
color="primary"
|
||||
icon="save"
|
||||
:disable="!selectedRows?.length"
|
||||
@click="showNegativeOriginDialog = true"
|
||||
:label="t('ticket.negative.negativeAction')"
|
||||
>
|
||||
<QTooltip>{{ t('globals.save') }}</QTooltip>
|
||||
<QTooltip>{{ t('ticket.negative.negativeAction') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
color="primary"
|
||||
@click="showTotalNegativeOriginDialog = true"
|
||||
:label="t('ticket.negative.totalNegative')"
|
||||
>
|
||||
<QTooltip>{{ t('ticket.negative.totalNegative') }}</QTooltip>
|
||||
</QBtn>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -255,6 +290,64 @@ const updateNegativeOrigin = async () => {
|
|||
</QCard>
|
||||
</QDialog>
|
||||
|
||||
<QDialog
|
||||
ref="totalNegativeDialogRef"
|
||||
@hide="onDialogHide"
|
||||
v-model="showTotalNegativeOriginDialog"
|
||||
>
|
||||
<QCard class="q-pa-sm">
|
||||
<QCardSection class="row items-center q-pb-none">
|
||||
<span class="text-h6 text-grey">{{
|
||||
t('ticket.negative.totalNegative')
|
||||
}}</span>
|
||||
<QSpace />
|
||||
<QBtn
|
||||
icon="close"
|
||||
:disable="isLoading"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
v-close-popup
|
||||
/>
|
||||
</QCardSection>
|
||||
<QCardSection
|
||||
class="row items-center justify-center column items-stretch"
|
||||
>
|
||||
<VnPaginate
|
||||
data-key="NegativeOriginList"
|
||||
:url="`Tickets/negativeOrigin`"
|
||||
auto-load
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<QTable
|
||||
:columns="columnsTotalNegativeDialog"
|
||||
:rows="rows"
|
||||
:dense="$q.screen.lt.md"
|
||||
flat
|
||||
row-key="itemFk"
|
||||
selection="multiple"
|
||||
v-model:selected="selectedRows"
|
||||
:grid="$q.screen.lt.md"
|
||||
auto-load
|
||||
:rows-per-page-options="[0]"
|
||||
hide-pagination
|
||||
:pagination="{ rowsPerPage: null }"
|
||||
:no-data-label="t('globals.noResults')"
|
||||
>
|
||||
<template #top>
|
||||
<div style="width: 100%; display: table">
|
||||
<div style="float: right; color: lightgray">
|
||||
{{ `${rows.length} ${t('globals.results')}` }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
</QDialog>
|
||||
|
||||
<QDialog
|
||||
ref="originDialogRef"
|
||||
@hide="onDialogHide"
|
||||
|
|
Loading…
Reference in New Issue