Merge branch 'test' into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
commit
59b709b57d
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { ref, onUnmounted } from 'vue';
|
||||
import { ref, onUnmounted, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
import { date } from 'quasar';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
@ -19,6 +19,7 @@ const stateStore = useStateStore();
|
|||
const validationsStore = useValidator();
|
||||
const { models } = validationsStore;
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
model: {
|
||||
|
@ -381,6 +382,13 @@ setLogTree();
|
|||
onUnmounted(() => {
|
||||
stateStore.rightDrawer = false;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value.params.id,
|
||||
() => {
|
||||
applyFilter();
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
|
|
@ -20,11 +20,17 @@ const $props = defineProps({
|
|||
const entityId = computed(() => $props.id || route.params.id);
|
||||
|
||||
const entriesTableColumns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
field: 'id',
|
||||
label: t('globals.id'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'itemFk',
|
||||
field: 'itemFk',
|
||||
label: t('globals.id'),
|
||||
label: t('entry.latestBuys.tableVisibleColumns.itemFk'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -76,11 +82,11 @@ const entriesTableColumns = computed(() => [
|
|||
</QCardSection>
|
||||
<QCardActions align="right">
|
||||
<QBtn
|
||||
:label="t('Print buys')"
|
||||
:label="t('printLabels')"
|
||||
color="primary"
|
||||
icon="print"
|
||||
:loading="isLoading"
|
||||
@click="openReport(`Entries/${entityId}/buy-label`)"
|
||||
@click="openReport(`Entries/${entityId}/print`)"
|
||||
unelevated
|
||||
autofocus
|
||||
/>
|
||||
|
@ -109,6 +115,19 @@ const entriesTableColumns = computed(() => [
|
|||
<QTd v-for="col in props.cols" :key="col.name">
|
||||
{{ col.value }}
|
||||
</QTd>
|
||||
<QBtn
|
||||
icon="print"
|
||||
v-if="props.row.stickers > 0"
|
||||
:loading="isLoading"
|
||||
@click="
|
||||
openReport(
|
||||
`Entries/${props.row.id}/buy-label`
|
||||
)
|
||||
"
|
||||
unelevated
|
||||
>
|
||||
<QTooltip>{{ t('printLabel') }}</QTooltip>
|
||||
</QBtn>
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
|
|
|
@ -86,7 +86,7 @@ const columns = computed(() => [
|
|||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('printBuys'),
|
||||
title: t('printLabels'),
|
||||
icon: 'print',
|
||||
action: (row) => printBuys(row.id),
|
||||
},
|
||||
|
|
|
@ -10,4 +10,5 @@ landed: Landed
|
|||
shipped: Shipped
|
||||
fromShipped: Shipped(from)
|
||||
toShipped: Shipped(to)
|
||||
printBuys: Print buys
|
||||
printLabels: Print stickers
|
||||
printLabel: Print sticker
|
||||
|
|
|
@ -14,4 +14,5 @@ landed: F. llegada
|
|||
shipped: F. salida
|
||||
fromShipped: F. salida(desde)
|
||||
toShipped: F. salida(hasta)
|
||||
Print buys: Imprimir etiquetas
|
||||
printLabels: Imprimir etiquetas
|
||||
printLabel: Imprimir etiqueta
|
||||
|
|
|
@ -48,7 +48,6 @@ const entityId = computed(() => {
|
|||
return $props.id || route.params.id;
|
||||
});
|
||||
const regularizeStockFormDialog = ref(null);
|
||||
const item = ref(null);
|
||||
const available = ref(null);
|
||||
const visible = ref(null);
|
||||
const _warehouseFk = ref(null);
|
||||
|
@ -131,12 +130,7 @@ const openCloneDialog = async () => {
|
|||
:subtitle="data.subtitle"
|
||||
:summary="$props.summary"
|
||||
:url="`Items/${entityId}/getCard`"
|
||||
@on-fetch="
|
||||
(data) => {
|
||||
item = data;
|
||||
setData(data);
|
||||
}
|
||||
"
|
||||
@on-fetch="setData"
|
||||
>
|
||||
<template #menu="{}">
|
||||
<QItem v-ripple clickable @click="openRegularizeStockForm()">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { onMounted, computed, onUnmounted, reactive, ref, nextTick } from 'vue';
|
||||
import { onMounted, computed, onUnmounted, reactive, ref, nextTick, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
||||
|
@ -21,6 +21,7 @@ import axios from 'axios';
|
|||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const stateStore = useStateStore();
|
||||
const state = useState();
|
||||
|
||||
|
@ -169,6 +170,14 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value.params.id,
|
||||
(newId) => {
|
||||
itemsBalanceFilter.where.itemFk = newId;
|
||||
itemBalancesRef.value.fetch();
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -391,7 +391,7 @@ async function changeState(value) {
|
|||
<QTd>{{ props.row.quantity }}</QTd>
|
||||
<QTd class="description-cell">
|
||||
<div class="row full-width justify-between">
|
||||
{{ props.row.item.name }}
|
||||
{{ props.row.concept }}
|
||||
<div v-if="props.row.item.subName" class="subName">
|
||||
{{ props.row.item.subName.toUpperCase() }}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<script setup>
|
||||
import axios from 'axios';
|
||||
import { computed, ref } from 'vue';
|
||||
import { computed, ref, onMounted } from 'vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { toDate, toCurrency } from 'src/filters/index';
|
||||
import TicketSummary from './Card/TicketSummary.vue';
|
||||
|
@ -10,6 +11,8 @@ import VnTable from 'src/components/VnTable/VnTable.vue';
|
|||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import VnRow from 'src/components/ui/VnRow.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import TicketFilter from './TicketFilter.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
|
@ -18,6 +21,15 @@ const clientsOptions = ref([]);
|
|||
const addressesOptions = ref([]);
|
||||
const agenciesOptions = ref([]);
|
||||
const selectedClient = ref();
|
||||
const stateStore = useStateStore();
|
||||
const from = Date.vnNew();
|
||||
const to = Date.vnNew();
|
||||
to.setDate(to.getDate() + 1);
|
||||
|
||||
const userParams = {
|
||||
from: from.toISOString(),
|
||||
to: to.toISOString(),
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
|
@ -187,6 +199,8 @@ const fetchAddresses = async (formData) => {
|
|||
const getColor = (row) => {
|
||||
return row?.classColor ? `bg-${row.classColor}` : 'bg-orange';
|
||||
};
|
||||
|
||||
onMounted(() => (stateStore.rightDrawer = true));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -195,6 +209,11 @@ const getColor = (row) => {
|
|||
:label="t('Search ticket')"
|
||||
:info="t('You can search by ticket id or alias')"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<TicketFilter data-key="Tickets" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="Tickets"
|
||||
|
@ -206,7 +225,10 @@ const getColor = (row) => {
|
|||
formInitialData: {},
|
||||
}"
|
||||
default-mode="table"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
:user-params="userParams"
|
||||
:right-search="false"
|
||||
redirect="ticket"
|
||||
auto-load
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue