0
0
Fork 0

feat: remove comments

This commit is contained in:
Javier Segarra 2024-09-17 14:06:14 +02:00
parent 26eae51585
commit 8c6e399fd2
9 changed files with 5 additions and 302 deletions

View File

@ -1,22 +1,17 @@
<script setup> <script setup>
import { ref, computed, onUnmounted } from 'vue'; import { ref, computed, onUnmounted } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import VnPaginate from 'components/ui/VnPaginate.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import FetchedTags from 'components/ui/FetchedTags.vue'; import FetchedTags from 'components/ui/FetchedTags.vue';
import { useSession } from 'src/composables/useSession';
import VnLv from 'src/components/ui/VnLv.vue';
import VnImg from 'src/components/ui/VnImg.vue'; import VnImg from 'src/components/ui/VnImg.vue';
import { toCurrency } from 'filters/index'; import { toCurrency } from 'filters/index';
import VnStockValueDisplay from 'src/components/ui/VnStockValueDisplay.vue'; import VnStockValueDisplay from 'src/components/ui/VnStockValueDisplay.vue';
import { useDialogPluginComponent } from 'quasar'; import { useDialogPluginComponent } from 'quasar';
import VnTable from 'src/components/VnTable/VnTable.vue'; import VnTable from 'src/components/VnTable/VnTable.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue'; import VnInputNumber from 'src/components/common/VnInputNumber.vue';
const MATCH_VALUES = [5, 6, 7, 8]; const MATCH_VALUES = [5, 6, 7, 8];
const { t } = useI18n(); const { t } = useI18n();
const session = useSession();
const primaryColor = '#f5b351'; const primaryColor = '#f5b351';
const colorSpacer = '#ecf0f1'; const colorSpacer = '#ecf0f1';
@ -50,33 +45,15 @@ const $props = defineProps({
}); });
const proposalSelected = ref([]); const proposalSelected = ref([]);
const quantity = ref(-1); const quantity = ref(-1);
const token = session.getTokenMultimedia();
// const index = ref(0);
// const currentTicket = computed(() => $props.tickets[index.value]);
const showProposalDialog = ref(false);
const defaultColumnAttrs = { const defaultColumnAttrs = {
align: 'left', align: 'left',
sortable: true, sortable: true,
}; };
// const compatibility = ref(null);
// const compatibility = computed(() => `linear-gradient(to right,red 10%, white 10%);`);
const statusConditionalValue = (row) => { const statusConditionalValue = (row) => {
const total = MATCH_VALUES.reduce((acc, i) => acc + row[`match${i}`], 0); const total = MATCH_VALUES.reduce((acc, i) => acc + row[`match${i}`], 0);
// const STATUS_VALUES = { 1: 'white', 2: '$secondary', 3: 'positive', 4: 'warning' };
// const status = STATUS_VALUES[total];
// const compatibility = `${100 * (total / values.length)}%`;
return total; return total;
}; };
// const conditionalValue = (tag) => (tag === 1 ? 'match' : 'not-match');
const conditionalValuePrice = (price) => (price > 1.3 ? 'match' : 'not-match'); const conditionalValuePrice = (price) => (price > 1.3 ? 'match' : 'not-match');
// const changeTicket = (type, _index = 0) => {
// const value = type ? 1 : -1;
// const nextIndex = index.value + value + _index;
// const ticket = $props.tickets[nextIndex];
// if (ticket.ticketFk === currentTicket.value.ticketFk)
// return changeTicket(true, nextIndex - 1);
// index.value = nextIndex;
// };
const columns = computed(() => [ const columns = computed(() => [
{ {
...defaultColumnAttrs, ...defaultColumnAttrs,
@ -123,45 +100,6 @@ const columns = computed(() => [
columnClass: 'expand', columnClass: 'expand',
columnFilter: { class: 'expand' }, columnFilter: { class: 'expand' },
}, },
// {
// ...defaultColumnAttrs,
// label: t('proposal.subName'),
// name: 'subName',
// field: 'subName',
// },
/*{
...defaultColumnAttrs,
label: t('proposal.value5'),
name: 'value5',
field: 'value5',
classes: ({ match5 }) => conditionalValue(match5),
},
{
...defaultColumnAttrs,
label: t('proposal.value6'),
name: 'value6',
field: 'value6',
classes: ({ match6 }) => conditionalValue(match6),
},
{
...defaultColumnAttrs,
label: t('proposal.value7'),
name: 'value7',
field: 'value7',
classes: ({ match7 }) => conditionalValue(match7),
},
{
...defaultColumnAttrs,
label: t('proposal.value8'),
name: 'value8',
field: 'value8',
classes: ({ match8 }) => conditionalValue(match8),
},*/
// {
// ...defaultColumnAttrs,
// label: t('proposal.tags'),
// name: 'tags',
// },
{ {
...defaultColumnAttrs, ...defaultColumnAttrs,
@ -194,27 +132,12 @@ const columns = computed(() => [
]); ]);
async function confirm() { async function confirm() {
// console.log('');
// const response = { address: address.value };
// if (props.promise) {
// isLoading.value = true;
// // eslint-disable-next-line no-unused-vars
// const { address: _address, ...restData } = props.data;
// try {
// Object.assign(response, restData);
// await props.promise(response);
// } finally {
// isLoading.value = false;
// }
// }
// onDialogOK({ data: true });
emit('refreshData', { type: 'refresh', itemProposal: proposalSelected.value[0] }); emit('refreshData', { type: 'refresh', itemProposal: proposalSelected.value[0] });
proposalSelected.value = []; proposalSelected.value = [];
popupProxyRef.value.hide(); popupProxyRef.value.hide();
} }
const { dialogRef, onDialogOK, onDialogCancel } = useDialogPluginComponent(); const { dialogRef, onDialogOK, onDialogCancel } = useDialogPluginComponent();
const popupProxyRef = ref(null); const popupProxyRef = ref(null);
// Definir el emisor de eventos
const emit = defineEmits(['dialogClosed', 'refreshData']); const emit = defineEmits(['dialogClosed', 'refreshData']);
function onDialogClose() { function onDialogClose() {
@ -231,15 +154,7 @@ const isSelectionAvailable = ({ row }) => {
}; };
</script> </script>
<template> <template>
<!-- <QPopupProxy ref="popupProxyRef"> -->
<!-- <QCard style="min-width: 500px">
<QCardSection class="row items-center justify-center column items-stretch"> -->
<!-- <VnRow style="display: flex"> -->
<div style="min-width: 65vw"> <div style="min-width: 65vw">
<!-- {{ proposalSelected }} -->
<!-- {{ $props.itemLack.itemFk }}
{{ $props.itemLack.warehouseFk }} -->
<!-- {{ rows[1].available }} -->
<VnTable <VnTable
data-key="ItemsGetSimilar" data-key="ItemsGetSimilar"
url="Items/getSimilar" url="Items/getSimilar"
@ -286,15 +201,7 @@ const isSelectionAvailable = ({ row }) => {
class="q-ml-xs" class="q-ml-xs"
/></div /></div
></template> ></template>
<!-- <template #body="scope">{{ scope }}</template> -->
<template #body-selection="{ data }"> <template #body-selection="{ data }">
<!-- <QTd align="center"> -->
<!-- {{ data.row.available }}
{{ $props.itemLack.lack * -1 }} -->
<!-- {{
$props.replaceAction &&
data.row.available >= $props.itemLack.lack * -1
}} -->
<QCheckbox <QCheckbox
class="q-ma-xs" class="q-ma-xs"
flat flat
@ -303,10 +210,6 @@ const isSelectionAvailable = ({ row }) => {
@update:model-value="(evt, _) => handleSelection(data.row, null)" @update:model-value="(evt, _) => handleSelection(data.row, null)"
> >
</QCheckbox> </QCheckbox>
<!-- <div v-else class="q-ml-sm">
<QIcon name="info" size="sm"></QIcon>
</div
>-->
</template> </template>
<template #column-longName="{ row }"> <template #column-longName="{ row }">
<!-- <QTd align="left" class="text-primary"> --> <!-- <QTd align="left" class="text-primary"> -->
@ -330,7 +233,6 @@ const isSelectionAvailable = ({ row }) => {
<!-- </QTd> --> <!-- </QTd> -->
</template> </template>
<template #column-status="{ row }"> <template #column-status="{ row }">
<!-- <QTd class="col" align="center"> -->
<div <div
:style="{ background: gradientStyle(statusConditionalValue(row)) }" :style="{ background: gradientStyle(statusConditionalValue(row)) }"
class="compatibility" class="compatibility"
@ -339,33 +241,20 @@ const isSelectionAvailable = ({ row }) => {
{{ compatibilityItem(statusConditionalValue(row)) }} {{ compatibilityItem(statusConditionalValue(row)) }}
</QTooltip> </QTooltip>
</div> </div>
<!-- </QTd> -->
</template> </template>
<!-- <template #column-tags="{ row }">
<QTd class="col" align="center"> </QTd>
</template> -->
<template #column-price2="{ row }"> <template #column-price2="{ row }">
<!-- <QTd align="center"> -->
<QTooltip> <QTooltip>
{{ toCurrency(row.price2) }} {{ toCurrency(row.price2) }}
</QTooltip> </QTooltip>
<span :class="[conditionalValuePrice(row.price2)]">{{ <span :class="[conditionalValuePrice(row.price2)]">{{
toCurrency(row.price2) toCurrency(row.price2)
}}</span> }}</span>
<!-- </QTd> -->
</template> </template>
<template #column-difference="{ row }"> <template #column-difference="{ row }">
<!-- <pre>asdad{{ row }}</pre> -->
<!-- <QTd class="col" align="left"> -->
<VnStockValueDisplay :value="row.id % 2 === 0 ? 10 : -10" /> <VnStockValueDisplay :value="row.id % 2 === 0 ? 10 : -10" />
<!-- </QTd> -->
</template> </template>
</VnTable> </VnTable>
</div> </div>
<!-- </QCardSection>
</QCard> -->
<!-- </QPopupProxy> -->
</template> </template>
<style lang="scss"> <style lang="scss">
.compatibility { .compatibility {

View File

@ -1,10 +1,8 @@
<script setup> <script setup>
import { computed, nextTick, onMounted, onUnmounted, ref } from 'vue'; import { computed, onMounted, onUnmounted, ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import axios from 'axios';
import ChangeQuantityDialog from 'pages/Ticket/Negative/components/ChangeQuantityDialog.vue'; import ChangeQuantityDialog from 'pages/Ticket/Negative/components/ChangeQuantityDialog.vue';
import ChangeStateDialog from 'pages/Ticket/Negative/components/ChangeStateDialog.vue'; import ChangeStateDialog from 'pages/Ticket/Negative/components/ChangeStateDialog.vue';
import ItemProposal from 'pages/Item/components/ItemProposal.vue';
import FetchedTags from 'components/ui/FetchedTags.vue'; import FetchedTags from 'components/ui/FetchedTags.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';
@ -12,7 +10,6 @@ import TicketTransfer from '../Card/TicketTransfer.vue';
import TicketMassiveUpdate from '../Card/TicketMassiveUpdate.vue'; import TicketMassiveUpdate from '../Card/TicketMassiveUpdate.vue';
import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue';
import FetchData from 'src/components/FetchData.vue'; import FetchData from 'src/components/FetchData.vue';
import useNotify from 'src/composables/useNotify.js';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
@ -89,12 +86,9 @@ const replaceItem = () => {
if (ticket.quantity > itemProposalSelected.value.available) continue; if (ticket.quantity > itemProposalSelected.value.available) continue;
originalRowDataCopy.value.splice(originalRowDataCopy.value.indexOf(ticket)); originalRowDataCopy.value.splice(originalRowDataCopy.value.indexOf(ticket));
ticket.itemFk = itemProposalSelected.value.id; ticket.itemFk = itemProposalSelected.value.id;
// ticket.quantity *= 2;
selectedRows.value.push({ ticketFk: ticket.ticketFk }); selectedRows.value.push({ ticketFk: ticket.ticketFk });
itemProposalSelected.value.available -= ticket.quantity; itemProposalSelected.value.available -= ticket.quantity;
itemLack.value.lack += ticket.quantity; itemLack.value.lack += ticket.quantity;
// tableRef.value.rows.pop();
console.log(store.data);
const index = store.data.findIndex((t) => t.ticketFk === ticket.ticketFk); const index = store.data.findIndex((t) => t.ticketFk === ticket.ticketFk);
store.data.splice(index, 1); store.data.splice(index, 1);
console.log(ticket); console.log(ticket);
@ -129,7 +123,6 @@ const replaceItem = () => {
@on-fetch=" @on-fetch="
(data) => { (data) => {
itemLack = data[0]; itemLack = data[0];
// itemLackForm.value.fetch();
} }
" "
auto-load auto-load
@ -147,11 +140,6 @@ const replaceItem = () => {
:selected-rows="selectedRows" :selected-rows="selectedRows"
></ChangeStateDialog> ></ChangeStateDialog>
</TicketMassiveUpdate> </TicketMassiveUpdate>
<!-- <QBtn >
<QTooltip bottom anchor="bottom right">
{{ t() }}
</QTooltip>
</QBtn> -->
<TicketMassiveUpdate <TicketMassiveUpdate
label="negative.buttonsUpdate.quantity" label="negative.buttonsUpdate.quantity"
@click="showChangeQuantityDialog = true" @click="showChangeQuantityDialog = true"
@ -164,32 +152,6 @@ const replaceItem = () => {
> >
</ChangeQuantityDialog> </ChangeQuantityDialog>
</TicketMassiveUpdate> </TicketMassiveUpdate>
<!-- <TicketMassiveUpdate
icon="refresh"
color="primary"
label="negative.buttonsUpdate.itemProposal"
@click="showChangeQuantityDialog = true"
:disable="selectedRows.length < 2"
tooltip="negative.buttonsUpdate.itemProposal"
>
</TicketMassiveUpdate> -->
<!-- <QBtn
color="primary"
@click="
openConfirmationModal(
t('negative.detail.modal.split.title'),
t('negative.detail.modal.split.subTitle'),
split,
() => (showSplitDialog = true)
)
"
:disable="selectedRows.length < 1"
icon="call_split"
>
<QTooltip bottom anchor="bottom right">
{{ t('globals.split') }}
</QTooltip>
</QBtn> -->
<QBtn color="primary" icon="vn:splitline"> <QBtn color="primary" icon="vn:splitline">
<QTooltip>{{ t('ticketSale.transferLines') }}</QTooltip> <QTooltip>{{ t('ticketSale.transferLines') }}</QTooltip>
<TicketTransfer <TicketTransfer
@ -220,10 +182,6 @@ const replaceItem = () => {
</VnSubToolbar> </VnSubToolbar>
<QPage> <QPage>
<div class="full-width" style="padding-bottom: 0px"> <div class="full-width" style="padding-bottom: 0px">
<!-- <p>item:{{ item }}</p>
<p>itemLack:{{ itemLack }}</p>
<p>selectedRows:{{ selectedRows }}</p>
<p>itemProposalSelected:{{ itemProposalSelected }}</p> -->
<VnPaginate <VnPaginate
:data-key="URL_KEY" :data-key="URL_KEY"
:url="`${URL_KEY}/${entityId}`" :url="`${URL_KEY}/${entityId}`"
@ -233,8 +191,6 @@ const replaceItem = () => {
class="full-width q-pa-md" class="full-width q-pa-md"
> >
<template #body> <template #body>
<!-- <VnLv >
<template #label> -->
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<VnImg :id="item.id" class="rounded image-wrapper"></VnImg> <VnImg :id="item.id" class="rounded image-wrapper"></VnImg>
<div <div
@ -264,22 +220,11 @@ const replaceItem = () => {
</QBtn> </QBtn>
<FetchedTags class="q-ml-md" :item="item" /> <FetchedTags class="q-ml-md" :item="item" />
</div> </div>
<!-- {{ rows }} -->
<!-- </template>
<template #value> </template>
</VnLv> -->
</template> </template>
</VnPaginate> </VnPaginate>
</div> </div>
<TicketLackTable :filter="{ alertLevel: showFree }"></TicketLackTable> <TicketLackTable :filter="{ alertLevel: showFree }"></TicketLackTable>
</QPage> </QPage>
<!--<HandleSplited
ref="splitDialogRef"
@hide="onDialogHide"
v-model="showSplitDialog"
:tickets="resultSplit"
></HandleSplited>-->
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.list-enter-active, .list-enter-active,

View File

@ -1,9 +1,6 @@
<script setup> <script setup>
import { ref, onMounted } from 'vue'; import { ref } from 'vue';
import { useI18n } from 'vue-i18n'; 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 FetchData from 'components/FetchData.vue';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
@ -16,17 +13,10 @@ 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 warehouses = ref();
const categoriesOptions = ref([]);
const itemTypesRef = ref(null); const itemTypesRef = ref(null);
const itemTypesOptions = ref([]); const itemTypesOptions = ref([]);
@ -36,16 +26,6 @@ const itemTypesFilter = {
order: 'name ASC', order: 'name ASC',
where: {}, where: {},
}; };
const onCategoryChange = async (categoryFk, search) => {
if (!categoryFk) {
itemTypesFilter.where.categoryFk = null;
delete itemTypesFilter.where.categoryFk;
} else {
itemTypesFilter.where.categoryFk = categoryFk;
}
search();
await itemTypesRef.value.fetch();
};
</script> </script>
<template> <template>

View File

@ -10,7 +10,6 @@ import { dashIfEmpty, toDate, toHour } from 'src/filters';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { useState } from 'src/composables/useState'; import { useState } from 'src/composables/useState';
import { useRole } from 'src/composables/useRole'; import { useRole } from 'src/composables/useRole';
import TicketMassiveUpdate from '../Card/TicketMassiveUpdate.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import RightMenu from 'src/components/common/RightMenu.vue'; import RightMenu from 'src/components/common/RightMenu.vue';
const router = useRouter(); const router = useRouter();
@ -21,22 +20,15 @@ const stateStore = useStateStore();
const { t } = useI18n(); const { t } = useI18n();
const selectedRows = ref([]); const selectedRows = ref([]);
const showNegativeOriginDialog = ref(false); const showNegativeOriginDialog = ref(false);
// const showTotalNegativeOriginDialog = ref(false);
// const showFilterPanel = ref(false);
const currentRow = ref(null);
// const state = useState();
const negativeParams = reactive({ const negativeParams = reactive({
days: useRole().likeAny('buyer') ? 2 : 0, days: useRole().likeAny('buyer') ? 2 : 0,
warehouseFk: useState().getUser().value.warehouseFk, warehouseFk: useState().getUser().value.warehouseFk,
}); });
const redirectToCreateView = ({ itemFk }) => { const redirectToCreateView = ({ itemFk }) => {
// stateStore.rightDrawer = false;
// currentRow.value = row;
router.push({ name: 'NegativeDetail', params: { id: itemFk } }); router.push({ name: 'NegativeDetail', params: { id: itemFk } });
}; };
const originDialogRef = ref(); const originDialogRef = ref();
// const totalNegativeDialogRef = ref();
const columns = computed(() => [ const columns = computed(() => [
{ {
name: 'date', name: 'date',
@ -159,25 +151,15 @@ const columns = computed(() => [
}, },
]); ]);
const tableRef = ref(); const tableRef = ref();
// const ticketDetailRef = ref();
onBeforeMount(() => { onBeforeMount(() => {
stateStore.$state.rightDrawer = true; stateStore.$state.rightDrawer = true;
}); });
// const handleWarehouses = async (data) => {
// negativeParams.warehouse = data.find((w) => w.name === DEFAULT_WAREHOUSE).id;
// await tableRef.value.fetch();
// showFilterPanel.value = true;
// };
</script> </script>
<template> <template>
<QPage class="column items-center"> <QPage class="column items-center">
<!-- <FetchData url="Warehouses" @on-fetch="handleWarehouses" auto-load /> -->
<VnSubToolbar class="bg-vn-dark justify-end"> <VnSubToolbar class="bg-vn-dark justify-end">
<template #st-actions> <template #st-actions>
<!-- <QBtnGroup push style="column-gap: 1px" v-if="!currentRow"> -->
<QBtn <QBtn
color="primary" color="primary"
:disable="!selectedRows?.length" :disable="!selectedRows?.length"
@ -193,14 +175,6 @@ onBeforeMount(() => {
></QPopupProxy> ></QPopupProxy>
<QTooltip>{{ t('negative.negativeAction') }}</QTooltip> <QTooltip>{{ t('negative.negativeAction') }}</QTooltip>
</QBtn> </QBtn>
<!-- <QBtn
color="primary"
@click="showTotalNegativeOriginDialog = true"
:label="t('negative.totalNegative')"
>
<QTooltip>{{ t('negative.totalNegative') }}</QTooltip>
</QBtn> -->
<!-- </QBtnGroup> -->
</template> </template>
</VnSubToolbar> </VnSubToolbar>
<RightMenu> <RightMenu>
@ -229,14 +203,12 @@ onBeforeMount(() => {
}" }"
> >
<template #column-itemFk="{ row }"> <template #column-itemFk="{ row }">
<!-- <QTd style="height: 76px; flex-direction: row; display: flex"> -->
{{ row.itemFk }} {{ row.itemFk }}
<VnImg <VnImg
style="width: 50px; height: 50px; float: inline-end" style="width: 50px; height: 50px; float: inline-end"
:id="row.itemFk" :id="row.itemFk"
class="rounded" class="rounded"
></VnImg> ></VnImg>
<!-- </QTd> -->
</template> </template>
</VnTable> </VnTable>
</QPage> </QPage>
@ -267,7 +239,5 @@ div.q-dialog__inner > div {
.q-btn-group > .q-btn-item:not(:first-child) { .q-btn-group > .q-btn-item:not(:first-child) {
border-top-left-radius: 0; border-top-left-radius: 0;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
// border-top-right-radius: 0;
// border-bottom-right-radius: 0;
} }
</style> </style>

View File

@ -3,12 +3,8 @@ import { computed, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import axios from 'axios'; import axios from 'axios';
import FetchData from 'src/components/FetchData.vue'; import FetchData from 'src/components/FetchData.vue';
import VnSelect from 'components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import { toDate, toHour } from 'src/filters'; import { toDate, toHour } from 'src/filters';
import useNotify from 'src/composables/useNotify.js'; import useNotify from 'src/composables/useNotify.js';
import { useDialogPluginComponent } from 'quasar';
import ZoneDescriptorProxy from 'pages/Zone/Card/ZoneDescriptorProxy.vue'; import ZoneDescriptorProxy from 'pages/Zone/Card/ZoneDescriptorProxy.vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import VnTable from 'src/components/VnTable/VnTable.vue'; import VnTable from 'src/components/VnTable/VnTable.vue';
@ -46,13 +42,6 @@ const { notify } = useNotify();
const route = useRoute(); const route = useRoute();
const itemLack = ref(null); const itemLack = ref(null);
// defineProps({
// rows: {
// type: [Object],
// required: true,
// default: () => {},
// },
// });
const getInputEvents = (colField, props) => ({ const getInputEvents = (colField, props) => ({
'update:modelValue': () => saveChange(colField, props), 'update:modelValue': () => saveChange(colField, props),
'keyup.enter': () => saveChange(colField, props), 'keyup.enter': () => saveChange(colField, props),
@ -181,21 +170,8 @@ const columns = computed(() => [
sortable: true, sortable: true,
component: 'input', component: 'input',
type: 'number', type: 'number',
// attrs: ({ row }) => {
// return {
// workerId: row.workerFk,
// name: row.userName,
// }
// attrs: (props) => ({
// events: getInputEvents(props),
// }),
}, },
]); ]);
const emit = defineEmits([...useDialogPluginComponent.emits, 'selection', 'close']);
function rowsHasSelected(selection) {
emit('selection', selection);
}
const itemLackForm = ref(); const itemLackForm = ref();
const reload = async () => { const reload = async () => {
@ -203,8 +179,6 @@ const reload = async () => {
}; };
defineExpose({ reload }); defineExpose({ reload });
// Función de comparación
const tableRef = ref(null); const tableRef = ref(null);
</script> </script>
@ -233,7 +207,6 @@ const tableRef = ref(null);
@on-fetch=" @on-fetch="
(data) => { (data) => {
itemLack = data[0]; itemLack = data[0];
// itemLackForm.value.fetch();
} }
" "
auto-load auto-load
@ -259,10 +232,6 @@ const tableRef = ref(null);
:right-search="false" :right-search="false"
v-model:selected="rowsSelected" v-model:selected="rowsSelected"
> >
<!--
<template #body="props">
{{ props }}
</template> -->
<template #column-quantity="props"> <template #column-quantity="props">
<VnInputNumber <VnInputNumber
v-model.number="props.row.quantity" v-model.number="props.row.quantity"

View File

@ -8,7 +8,7 @@ import VnInput from 'src/components/common/VnInput.vue';
const { t } = useI18n(); const { t } = useI18n();
const showChangeQuantityDialog = ref(false); const showChangeQuantityDialog = ref(false);
const newQuantity = ref(null); const newQuantity = ref(null);
const { dialogRef, onDialogHide } = useDialogPluginComponent(); const { dialogRef } = useDialogPluginComponent();
const $props = defineProps({ const $props = defineProps({
selectedRows: { selectedRows: {
type: Array, type: Array,
@ -34,22 +34,7 @@ const updateQuantity = async () => {
</script> </script>
<template> <template>
<!-- <QDialog ref="dialogRef" @hide="onDialogHide" v-model="showChangeQuantityDialog"> -->
<QCard class="q-pa-sm"> <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.changeQuantity.title')
}}</span>
<QSpace />
<QBtn icon="close" flat round dense v-close-popup />
</QCardSection> -->
<QCardSection class="row items-center justify-center column items-stretch"> <QCardSection class="row items-center justify-center column items-stretch">
<span>{{ t('negative.detail.modal.changeQuantity.title') }}</span> <span>{{ t('negative.detail.modal.changeQuantity.title') }}</span>
<VnInput <VnInput
@ -70,7 +55,6 @@ const updateQuantity = async () => {
autofocus autofocus
/> </QCardActions /> </QCardActions
></QCard> ></QCard>
<!-- </QDialog> -->
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -10,7 +10,7 @@ const editableStates = ref([]);
const { t } = useI18n(); const { t } = useI18n();
const showChangeStateDialog = ref(false); const showChangeStateDialog = ref(false);
const newState = ref(null); const newState = ref(null);
const { dialogRef, onDialogHide } = useDialogPluginComponent(); const { dialogRef } = useDialogPluginComponent();
const $props = defineProps({ const $props = defineProps({
selectedRows: { selectedRows: {
type: Array, type: Array,
@ -36,27 +36,12 @@ const updateState = async () => {
</script> </script>
<template> <template>
<!-- <QDialog ref="dialogRef" @hide="onDialogHide" v-model="showChangeStateDialog"> -->
<FetchData <FetchData
url="States/editableStates" url="States/editableStates"
@on-fetch="(data) => (editableStates = data)" @on-fetch="(data) => (editableStates = data)"
auto-load auto-load
/> />
<QCard class="q-pa-sm"> <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.changeState.title')
}}</span>
<QSpace />
<QBtn icon="close" flat round dense v-close-popup />
</QCardSection> -->
<QCardSection class="row items-center justify-center column items-stretch"> <QCardSection class="row items-center justify-center column items-stretch">
<span>{{ t('negative.detail.modal.changeState.title') }}</span> <span>{{ t('negative.detail.modal.changeState.title') }}</span>
<VnSelect <VnSelect
@ -78,7 +63,6 @@ const updateState = async () => {
autofocus autofocus
/> </QCardActions /> </QCardActions
></QCard> ></QCard>
<!-- </QDialog> -->
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -4,15 +4,12 @@ import { useI18n } from 'vue-i18n';
import axios from 'axios'; import axios from 'axios';
import { useDialogPluginComponent } from 'quasar'; import { useDialogPluginComponent } from 'quasar';
import VnSelect from 'src/components/common/VnSelect.vue'; import VnSelect from 'src/components/common/VnSelect.vue';
import FetchData from 'components/FetchData.vue';
import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue'; import VnInputDate from 'src/components/common/VnInputDate.vue';
import VnInput from 'src/components/common/VnInput.vue';
const { t } = useI18n(); const { t } = useI18n();
const showSplitDialog = ref(false); const showSplitDialog = ref(false);
const newState = ref(null); const newState = ref(null);
const resultSplit = ref([]);
const { dialogRef, onDialogHide } = useDialogPluginComponent(); const { dialogRef, onDialogHide } = useDialogPluginComponent();
const $props = defineProps({ const $props = defineProps({
tickets: { tickets: {
@ -54,13 +51,6 @@ const columns = computed(() => [
field: ({ message }) => message, field: ({ message }) => message,
sortable: true, sortable: true,
}, },
// {
// name: 'actions',
// align: 'center',
// label: t('negative.split.actions'),
// // style: 'padding-left: 100px',
// // headerStyle: 'padding-left: 100px',
// },
]); ]);
const formData = ref({ agencies: [] }); const formData = ref({ agencies: [] });
@ -80,7 +70,6 @@ const handleDateChanged = async () => {
}); });
formData.value.agencies = zoneData; formData.value.agencies = zoneData;
if (zoneData.length === 1) formData.value.agencyModeFk = zoneData[0]; if (zoneData.length === 1) formData.value.agencyModeFk = zoneData[0];
// formData.value.dateChanged = false;
}; };
const ticketsSelected = ref([]); const ticketsSelected = ref([]);
onMounted(() => { onMounted(() => {

View File

@ -7,7 +7,7 @@ import { useDialogPluginComponent } from 'quasar';
const { t } = useI18n(); const { t } = useI18n();
const showNegativeOriginDialog = ref(false); const showNegativeOriginDialog = ref(false);
const reason = ref(null); const reason = ref(null);
const { dialogRef, onDialogHide } = useDialogPluginComponent(); const { dialogRef } = useDialogPluginComponent();
const $props = defineProps({ const $props = defineProps({
selectedRows: { selectedRows: {
type: Array, type: Array,
@ -32,12 +32,6 @@ const update = async () => {
</script> </script>
<template> <template>
<!-- <QDialog
ref="dialogRef"
@hide="onDialogHide"
v-model="showNegativeOriginDialog"
full-width
> -->
<QCard class="q-pa-sm"> <QCard class="q-pa-sm">
<QCardSection class="row items-center q-pb-none"> <QCardSection class="row items-center q-pb-none">
<QAvatar <QAvatar
@ -76,7 +70,6 @@ const update = async () => {
autofocus autofocus
/> </QCardActions /> </QCardActions
></QCard> ></QCard>
<!-- </QDialog> -->
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>