#6321 - Negative ticket #158
|
@ -367,12 +367,6 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
|||
<template #top-left v-if="!$props.withoutHeader">
|
||||
<slot name="top-left"></slot>
|
||||
</template>
|
||||
<template #body-selection="props">
|
||||
<slot name="body-selection" v-bind="props">
|
||||
<QCheckbox class="q-ma-xs" v-model="props.selected"></QCheckbox>
|
||||
</slot>
|
||||
</template>
|
||||
|
||||
<template #top-right v-if="!$props.withoutHeader">
|
||||
<VnVisibleColumn
|
||||
jgallego marked this conversation as resolved
|
||||
v-if="isTableMode"
|
||||
|
|
|
@ -2,21 +2,22 @@
|
|||
import { ref } from 'vue';
|
||||
|
||||
defineProps({
|
||||
label: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: 'refresh',
|
||||
required: true,
|
||||
default: null,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: 'primary',
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: 'refresh',
|
||||
},
|
||||
tooltip: {
|
||||
type: String,
|
||||
default: 'primary',
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
const popupProxyRef = ref(null);
|
||||
|
@ -32,20 +33,3 @@ const popupProxyRef = ref(null);
|
|||
<QTooltip>{{ $t($props.tooltip) }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
valentinesDay: Valentine's Day
|
||||
mothersDay: Mother's Day
|
||||
allSaints: All Saints' Day
|
||||
es:
|
||||
params:
|
||||
valentinesDay: Día de San Valentín
|
||||
mothersDay: Día de la Madre
|
||||
allSaints: Día de Todos los Santos
|
||||
Campaign consumption: Consumo campaña
|
||||
Campaign: Campaña
|
||||
From: Desde
|
||||
To: Hasta
|
||||
</i18n>
|
||||
|
|
|
@ -85,8 +85,4 @@ defineExpose({
|
|||
.img_zoom {
|
||||
border-radius: 0%;
|
||||
}
|
||||
.image-wrapper {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -88,15 +88,4 @@ const val = computed(() => $props.value);
|
|||
:deep(.q-checkbox.disabled) {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.image {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
& > .q-btn .value {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed, onUnmounted } from 'vue';
|
||||
// import axios from 'axios';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||
|
@ -84,19 +83,6 @@ const columns = computed(() => [
|
|||
columnClass: 'shrink',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// ...defaultColumnAttrs,
|
||||
// label: t('proposal.difference'),
|
||||
// name: 'difference',
|
||||
// style: 'max-width: 75px',
|
||||
// },
|
||||
// {
|
||||
// ...defaultColumnAttrs,
|
||||
// label: t('proposal.compatibility'),
|
||||
// name: 'status',
|
||||
// field: statusConditionalValue,
|
||||
// sortable: true,
|
||||
// },
|
||||
{
|
||||
...defaultColumnAttrs,
|
||||
label: t('proposal.counter'),
|
||||
|
@ -149,22 +135,6 @@ const columns = computed(() => [
|
|||
name: 'located',
|
||||
field: 'located',
|
||||
},
|
||||
// {
|
||||
// name: 'tableActions',
|
||||
// align: 'left',
|
||||
// actions: [
|
||||
// {
|
||||
// title: t('Open details'),
|
||||
// icon: 'change_circle',
|
||||
// show: (row) => isSelectionAvailable(row),
|
||||
// action: (row) => {
|
||||
// proposalSelected.value = [row];
|
||||
// confirm();
|
||||
// },
|
||||
// isPrimary: true,
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
]);
|
||||
const isSelected = (row) => proposalSelected.value.some((item) => row.id === item.id);
|
||||
function change(row) {
|
||||
|
@ -203,13 +173,6 @@ async function confirm(row) {
|
|||
console.error(error);
|
||||
}
|
||||
}
|
||||
// const { dialogRef, onDialogOK, onDialogCancel } = useDialogPluginComponent();
|
||||
|
||||
// function onDialogClose() {
|
||||
// console.log('Dialog has been closed');
|
||||
// // Emitir el evento personalizado
|
||||
// emit('onDialogClosed', { data: true });
|
||||
// }
|
||||
onUnmounted(() => {});
|
||||
function handleSelection(value, _) {
|
||||
quantity.value = value.available;
|
||||
|
@ -225,9 +188,7 @@ const isSelectionAvailable = (itemProposal) => {
|
|||
const byQuantity =
|
||||
(100 * itemProposal.available) / Math.abs($props.itemLack.lack) < 30;
|
||||
return byQuantity;
|
||||
// return $props.replaceAction && row.available >= Math.abs($props.itemLack.lack);
|
||||
};
|
||||
// watch(proposalSelected, ({ available }) => (quantity.value = available));
|
||||
</script>
|
||||
jsegarra marked this conversation as resolved
jgallego
commented
30 ? 30 ?
jsegarra
commented
Lo habia reemplazado arroba y faltaba esta Lo habia reemplazado arroba y faltaba esta
|
||||
<template>
|
||||
<VnTable
|
||||
|
@ -254,7 +215,6 @@ const isSelectionAvailable = (itemProposal) => {
|
|||
}"
|
||||
>
|
||||
<template #body-selection="props">
|
||||
<!-- {{ isSelectionAvailable(props) }} -->
|
||||
<QCheckbox
|
||||
class="q-ma-xs"
|
||||
flat
|
||||
|
@ -273,19 +233,11 @@ const isSelectionAvailable = (itemProposal) => {
|
|||
<template #column-longName="{ row }">
|
||||
<QTd
|
||||
class="flex"
|
||||
style="
|
||||
max-width: 100%;
|
||||
/* align-items: center; */
|
||||
/* justify-content: flex-start; */
|
||||
/* flex: 1 1 100px; */
|
||||
flex-shrink: 50px;
|
||||
flex-wrap: nowrap;
|
||||
"
|
||||
style="max-width: 100%; flex-shrink: 50px; flex-wrap: nowrap"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ row.id }}
|
||||
</QTooltip>
|
||||
<!-- <QBtn flat color="blue" dense>{{ }}</QBtn> -->
|
||||
<QBtn
|
||||
data-cy="replaceBtn"
|
||||
icon="change_circle"
|
||||
|
@ -301,30 +253,19 @@ const isSelectionAvailable = (itemProposal) => {
|
|||
<QTooltip> {{ t('Open_details') }}</QTooltip>
|
||||
</QBtn>
|
||||
<div
|
||||
id="middle"
|
||||
style="
|
||||
/* position: absolute; */
|
||||
float: left;
|
||||
margin-right: 2px;
|
||||
flex: 2 0 5px;
|
||||
"
|
||||
class="middle compatibility"
|
||||
:style="{
|
||||
background: gradientStyle(statusConditionalValue(row)),
|
||||
}"
|
||||
class="compatibility"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ compatibilityItem(statusConditionalValue(row)) }}
|
||||
</QTooltip>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div style="flex: 2 0 100%">
|
||||
<div>
|
||||
<span style="font-size: x-small">({{ row.id }})</span
|
||||
><span class="link">{{ row.longName }}</span>
|
||||
<!-- :style="{
|
||||
color: gradientStyle(statusConditionalValue(row)),
|
||||
}" -->
|
||||
<ItemDescriptorProxy :id="row.id" />
|
||||
</div>
|
||||
<div class="inline-tag">
|
||||
|
@ -343,7 +284,6 @@ const isSelectionAvailable = (itemProposal) => {
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </section> -->
|
||||
</QTd>
|
||||
</template>
|
||||
<template #column-available="{ row }">
|
||||
|
@ -355,16 +295,6 @@ const isSelectionAvailable = (itemProposal) => {
|
|||
<template #column-minQuantity="{ row }">
|
||||
{{ row.minQuantity }}
|
||||
</template>
|
||||
<!-- <template #column-status="{ row }">
|
||||
<div
|
||||
:style="{ background: gradientStyle(statusConditionalValue(row)) }"
|
||||
class="compatibility"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ compatibilityItem(statusConditionalValue(row)) }}
|
||||
</QTooltip>
|
||||
</div>
|
||||
</template> -->
|
||||
<template #column-price2="{ row }">
|
||||
<div class="flex column items-center content-center">
|
||||
<VnStockValueDisplay :value="sales[0].price - row.price2" />
|
||||
|
@ -382,14 +312,17 @@ const isSelectionAvailable = (itemProposal) => {
|
|||
.compatibility {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.middle {
|
||||
float: left;
|
||||
margin-right: 2px;
|
||||
flex: 2 0 5px;
|
||||
}
|
||||
.match {
|
||||
color: $negative;
|
||||
}
|
||||
.not-match {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin: 0.05rem;
|
||||
padding: 1px;
|
||||
|
|
|
@ -238,7 +238,7 @@ watch(
|
|||
lineFilter.value.where.orderFk = router.currentRoute.value.params.id;
|
||||
|
||||
tableLinesRef.value.reload();
|
||||
}
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
|
@ -295,11 +295,13 @@ watch(
|
|||
:user-filter="lineFilter"
|
||||
>
|
||||
<template #column-image="{ row }">
|
||||
<VnImg
|
||||
:id="parseInt(row?.item?.image)"
|
||||
class="rounded image-wrapper"
|
||||
zoom-resolution="1600x900"
|
||||
/>
|
||||
<div class="image-wrapper">
|
||||
<VnImg
|
||||
:id="parseInt(row?.item?.image)"
|
||||
class="rounded"
|
||||
zoom-resolution="1600x900"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template #column-id="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
|
@ -359,7 +361,7 @@ watch(
|
|||
}
|
||||
}
|
||||
|
||||
.imafge-wrapper {
|
||||
.image-wrapper {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
margin-left: 30%;
|
||||
|
|
|
@ -1,113 +0,0 @@
|
|||
<script setup>
|
||||
import { ref, toRefs } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import axios from 'axios';
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import { watch } from 'vue';
|
||||
import { onMounted } from 'vue';
|
||||
const { t } = useI18n();
|
||||
const columns = [
|
||||
{
|
||||
name: 'name',
|
||||
required: true,
|
||||
label: 'Dessert (100g serving)',
|
||||
align: 'left',
|
||||
field: (row) => row.name,
|
||||
format: (val) => `${val}`,
|
||||
sortable: true,
|
||||
},
|
||||
];
|
||||
|
||||
const rows = [
|
||||
{
|
||||
name: 'Frozen Yogurt',
|
||||
calories: 159,
|
||||
fat: 6.0,
|
||||
carbs: 24,
|
||||
protein: 4.0,
|
||||
sodium: 87,
|
||||
calcium: '14%',
|
||||
iron: '1%',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QBtn color="primary" icon="show_chart">
|
||||
<QPopupProxy ref="popupProxyRef" style="max-width: none">
|
||||
<QCard class="column q-pa-md">
|
||||
<span class="text-body1 q-mb-sm">{{ t('Campaign consumption') }}</span>
|
||||
<VnRow class="q-gutter-md q-mb-md" style="min-width: 70vw">
|
||||
<QCard class="column q-pa-md vn-one">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<span class="text-body1 q-mb-sm"
|
||||
>Lineas a transferir</span
|
||||
></VnRow
|
||||
>
|
||||
<QTable
|
||||
flat
|
||||
bordered
|
||||
title="Treats"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
row-key="name"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="column q-pa-md vn-one">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<span class="text-body1 q-mb-sm"
|
||||
>Ticket destinatario</span
|
||||
></VnRow
|
||||
>
|
||||
<QTable
|
||||
flat
|
||||
bordered
|
||||
title="Treats"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
row-key="name"
|
||||
/>
|
||||
</QCard>
|
||||
</VnRow>
|
||||
<!-- <div class="q-mt-lg row justify-end">
|
||||
<QBtn
|
||||
:label="t('globals.cancel')"
|
||||
color="primary"
|
||||
flat
|
||||
class="q-mr-md"
|
||||
v-close-popup
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('globals.save')"
|
||||
type="submit"
|
||||
color="primary"
|
||||
@click="onSubmit()"
|
||||
/>
|
||||
</div> -->
|
||||
</QCard>
|
||||
</QPopupProxy>
|
||||
<QTooltip>{{ t('Campaign consumption') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
valentinesDay: Valentine's Day
|
||||
mothersDay: Mother's Day
|
||||
allSaints: All Saints' Day
|
||||
es:
|
||||
params:
|
||||
valentinesDay: Día de San Valentín
|
||||
mothersDay: Día de la Madre
|
||||
allSaints: Día de Todos los Santos
|
||||
Campaign consumption: Consumo campaña
|
||||
Campaign: Campaña
|
||||
From: Desde
|
||||
To: Hasta
|
||||
</i18n>
|
|
@ -25,11 +25,9 @@ const changeStateDialogRef = ref(null);
|
|||
const changeQuantityDialogRef = ref(null);
|
||||
const showProposalDialog = ref(false);
|
||||
const showChangeQuantityDialog = ref(false);
|
||||
const showFree = ref(true);
|
||||
const selectedRows = ref([]);
|
||||
const route = useRoute();
|
||||
const itemLack = ref(null);
|
||||
const originalRowDataCopy = ref(null);
|
||||
onMounted(() => {
|
||||
stateStore.rightDrawer = false;
|
||||
});
|
||||
|
@ -194,28 +192,19 @@ const closeDialogs = (refs, evt) => {
|
|||
@click="showProposalDialog = true"
|
||||
:disable="selectedRows.length < 1"
|
||||
>
|
||||
<QIcon
|
||||
name="import_export"
|
||||
class="rotate-90"
|
||||
@click="showItemProposal"
|
||||
></QIcon>
|
||||
<!-- <ItemProposalProxy
|
||||
<QIcon name="import_export" class="rotate-90"></QIcon>
|
||||
<ItemProposalProxy
|
||||
ref="proposalDialogRef"
|
||||
:item-lack="itemLack"
|
||||
:replace-action="true"
|
||||
:sales="selectedRows"
|
||||
@item-replaced="itemProposalEvt"
|
||||
></ItemProposalProxy> -->
|
||||
></ItemProposalProxy>
|
||||
<QTooltip bottom anchor="bottom right">
|
||||
{{ t('itemProposal') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</QBtnGroup>
|
||||
<!-- <QCheckbox
|
||||
v-model="showFree"
|
||||
data-cy="showFree"
|
||||
:label="t('negative.detail.showFree')"
|
||||
/> -->
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<TicketLackTable
|
||||
|
|
|
@ -13,11 +13,6 @@ const props = defineProps({
|
|||
required: true,
|
||||
},
|
||||
});
|
||||
// const arrayData = useArrayData(props.dataKey);
|
||||
// const warehouse = ref(null);
|
||||
// onMounted(async () => {
|
||||
// warehouse.value = arrayData.store?.userParams?.warehouse;
|
||||
// });
|
||||
|
||||
const to = Date.vnNew();
|
||||
to.setDate(to.getDate() + 1);
|
||||
|
|
|
@ -45,7 +45,6 @@ const { t } = useI18n();
|
|||
const { notify } = useNotify();
|
||||
|
||||
const route = useRoute();
|
||||
// const itemLack = ref(null);
|
||||
const getInputEvents = ({ col, ...rows }) => ({
|
||||
'update:modelValue': () => saveChange(col.name, rows),
|
||||
'keyup.enter': () => saveChange(col.name, rows),
|
||||
|
@ -212,9 +211,6 @@ watch(selectedRows, () => emit('update:selection', selectedRows));
|
|||
function onBuysFetched(data) {
|
||||
Object.assign(item.value, data[0]);
|
||||
}
|
||||
// function onTicketLackFetched(data) {
|
||||
// itemLack.value = data[0];
|
||||
// }
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -231,12 +227,6 @@ function onBuysFetched(data) {
|
|||
@on-fetch="onBuysFetched"
|
||||
auto-load
|
||||
/>
|
||||
<!-- <FetchData
|
||||
:url="`Tickets/itemLack`"
|
||||
:params="{ itemFk: entityId }"
|
||||
@on-fetch="onTicketLackFetched"
|
||||
auto-load
|
||||
/> -->
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="NegativeItem"
|
||||
|
|
|
@ -23,8 +23,7 @@ const updateQuantity = async () => {
|
|||
}),
|
||||
);
|
||||
|
||||
const results = await Promise.allSettled(rowsToUpdate);
|
||||
console.log(results);
|
||||
await Promise.allSettled(rowsToUpdate);
|
||||
emit('update-quantity', newQuantity.value);
|
||||
} catch (err) {
|
||||
return err;
|
||||
|
|
|
@ -25,8 +25,8 @@ const updateState = async () => {
|
|||
code: newState.value,
|
||||
}),
|
||||
);
|
||||
const results = await Promise.allSettled(rowsToUpdate);
|
||||
console.log(results);
|
||||
await Promise.allSettled(rowsToUpdate);
|
||||
|
||||
emit('update-state', newState.value);
|
||||
} catch (err) {
|
||||
return err;
|
||||
|
|
|
@ -1,270 +0,0 @@
|
|||
<script setup>
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import axios from 'axios';
|
||||
import { useDialogPluginComponent } from 'quasar';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
const { t } = useI18n();
|
||||
const showSplitDialog = ref(false);
|
||||
const newState = ref(null);
|
||||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||
const $props = defineProps({
|
||||
tickets: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const tickets = ref($props.tickets ?? []);
|
||||
const rowBtnDisable = () =>
|
||||
!(
|
||||
formData.value?.agencyModeFk &&
|
||||
formData.value?.date &&
|
||||
rowsSelected.value.length > 0
|
||||
);
|
||||
const rowsSelected = ref([]);
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
name: 'status',
|
||||
label: t('negative.split.status'),
|
||||
field: ({ status }) => status,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'ticket',
|
||||
label: t('negative.split.ticket'),
|
||||
field: ({ ticket }) => ticket,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'newTicket',
|
||||
label: t('negative.split.newTicket'),
|
||||
field: ({ newTicket }) => newTicket,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'message',
|
||||
label: t('negative.split.message'),
|
||||
field: ({ message }) => message,
|
||||
sortable: true,
|
||||
},
|
||||
]);
|
||||
|
||||
const formData = ref({ agencies: [] });
|
||||
const handleDateChanged = async () => {
|
||||
const { data: agencyData } = await axios.get('Agencies/getLanded', {
|
||||
params: {
|
||||
addressFk: 123,
|
||||
agencyModeFk: 8,
|
||||
warehouseFk: 1,
|
||||
shipped: '2001-02-08T23:00:00.000Z',
|
||||
},
|
||||
});
|
||||
if (!agencyData) formData.value.agencies = [];
|
||||
const { zoneFk } = agencyData;
|
||||
const { data: zoneData } = await axios.get('Zones/Includingexpired', {
|
||||
params: { filter: { fields: ['id', 'name'], where: { id: zoneFk } } },
|
||||
});
|
||||
formData.value.agencies = zoneData;
|
||||
if (zoneData.length === 1) formData.value.agencyModeFk = zoneData[0];
|
||||
};
|
||||
const ticketsSelected = ref([]);
|
||||
onMounted(() => {
|
||||
ticketsSelected.value = [...new Set($props.tickets.map(({ ticketFk }) => ticketFk))];
|
||||
});
|
||||
|
||||
const updateState = async () => {
|
||||
try {
|
||||
showSplitDialog.value = true;
|
||||
const rowsToUpdate = $props.tickets.map(({ ticketFk }) =>
|
||||
axios.post(`Tickets/state`, {
|
||||
ticketFk,
|
||||
code: newState.value,
|
||||
})
|
||||
);
|
||||
await Promise.all(rowsToUpdate);
|
||||
} catch (err) {
|
||||
return err;
|
||||
} finally {
|
||||
dialogRef.value.hide({ type: 'refresh', refresh: true });
|
||||
}
|
||||
};
|
||||
|
||||
function getIcon(value) {
|
||||
const icons = {
|
||||
split: {
|
||||
name: 'check_circle',
|
||||
color: 'secondary',
|
||||
},
|
||||
noSplit: {
|
||||
name: 'warning',
|
||||
color: 'primary',
|
||||
},
|
||||
error: {
|
||||
name: 'close',
|
||||
color: 'negative',
|
||||
},
|
||||
};
|
||||
return icons[value];
|
||||
}
|
||||
|
||||
const updateNewTickets = async () => {
|
||||
tickets.value = $props.tickets.filter((ticket) => ticket.newTicket !== 1000005);
|
||||
console.log('updateNewTickets');
|
||||
rowsSelected.value = [];
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QDialog ref="dialogRef" @hide="onDialogHide" v-model="showSplitDialog">
|
||||
<QCard class="q-pa-sm">
|
||||
<QCardSection class="row items-center q-pb-none">
|
||||
<QAvatar
|
||||
:icon="icon"
|
||||
color="primary"
|
||||
text-color="white"
|
||||
size="xl"
|
||||
v-if="icon"
|
||||
/>
|
||||
<span class="text-h6 text-grey">{{
|
||||
t('negative.detail.modal.handleSplited.title')
|
||||
}}</span>
|
||||
<QSpace />
|
||||
<QBtn icon="close" flat round dense v-close-popup />
|
||||
</QCardSection>
|
||||
<QCardSection class="row items-center justify-center column items-stretch">
|
||||
<Qform>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<VnInputDate
|
||||
:label="t('Max date')"
|
||||
v-model="formData.date"
|
||||
@update:model-value="(evt) => handleDateChanged()" />
|
||||
|
||||
<VnSelect
|
||||
:disable="formData.agencies.length < 1"
|
||||
:label="t('Agency')"
|
||||
v-model="formData.agencyModeFk"
|
||||
:options="formData.agencies"
|
||||
option-label="name"
|
||||
option-value="id" />
|
||||
|
||||
<QBtn
|
||||
icon="save"
|
||||
:disable="rowBtnDisable()"
|
||||
color="primary"
|
||||
flat
|
||||
rounded
|
||||
@click="updateNewTickets"
|
||||
/></VnRow>
|
||||
</Qform>
|
||||
<VnPaginate data-key="splitLack" :data="tickets">
|
||||
<template #body="{ rows }">
|
||||
<QTable
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
selection="multiple"
|
||||
row-key="newTicket"
|
||||
v-model:selected="rowsSelected"
|
||||
:no-data-label="t('globals.noResults')"
|
||||
flat
|
||||
dense
|
||||
hide-bottom
|
||||
auto-load
|
||||
:rows-per-page-options="[0]"
|
||||
hide-pagination
|
||||
:pagination="{ rowsPerPage: null }"
|
||||
>
|
||||
<template #header="props">
|
||||
<QTr :props="props">
|
||||
<QTh></QTh>
|
||||
<QTh
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
>
|
||||
{{ t(col.label) }}
|
||||
</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
<template #body="props">
|
||||
<QTr :props="props">
|
||||
<Qtd>
|
||||
<QCheckbox v-model="props.selected" />
|
||||
</Qtd>
|
||||
<QTd
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
>
|
||||
<span
|
||||
v-if="
|
||||
![
|
||||
'status',
|
||||
'message',
|
||||
'actions',
|
||||
].includes(col.name)
|
||||
"
|
||||
>
|
||||
{{ col.value }}
|
||||
</span>
|
||||
<span v-if="'status' === col.name">
|
||||
<QIcon
|
||||
:name="`${getIcon(col.value).name}`"
|
||||
size="xs"
|
||||
class="cursor-pointer"
|
||||
:color="getIcon(col.value).color"
|
||||
>
|
||||
</QIcon>
|
||||
</span>
|
||||
<span v-if="'message' === col.name">message</span>
|
||||
</QTd></QTr
|
||||
></template
|
||||
>
|
||||
</QTable></template
|
||||
>
|
||||
</VnPaginate>
|
||||
</QCardSection>
|
||||
<QCardActions align="right">
|
||||
<QBtn :label="t('globals.cancel')" color="primary" flat v-close-popup />
|
||||
<QBtn
|
||||
:label="t('globals.confirm')"
|
||||
color="primary"
|
||||
:disable="!newState"
|
||||
@click="updateState"
|
||||
unelevated
|
||||
autofocus
|
||||
/> </QCardActions
|
||||
></QCard>
|
||||
</QDialog>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.splitRow {
|
||||
border: 1px solid #ec8916;
|
||||
border-width: 1px 0 1px 0;
|
||||
}
|
||||
.list {
|
||||
max-height: 100%;
|
||||
padding: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.grid-style-transition {
|
||||
transition: transform 0.28s, background-color 0.28s;
|
||||
}
|
||||
|
||||
#true {
|
||||
background-color: $positive;
|
||||
}
|
||||
|
||||
#false {
|
||||
background-color: $negative;
|
||||
}
|
||||
|
||||
div.q-dialog__inner > div {
|
||||
max-width: fit-content !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
necesario para reemplazar o concatenar acciones a la parte de la derecha de la tabla