forked from verdnatura/salix-front
fix: refs #7553 requested changes
This commit is contained in:
parent
34f70d026e
commit
44d98865fe
|
@ -63,7 +63,7 @@ globals:
|
|||
shipped: F. envío
|
||||
totalEntries: Ent. totales
|
||||
amount: Importe
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
download: Descargar
|
||||
downloadPdf: Descargar PDF
|
||||
selectRows: 'Seleccionar las { numberRows } filas(s)'
|
||||
|
@ -265,7 +265,7 @@ globals:
|
|||
tracking: Estados
|
||||
components: Componentes
|
||||
pictures: Fotos
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
ldap: LDAP
|
||||
samba: Samba
|
||||
twoFactor: Doble factor
|
||||
|
@ -484,7 +484,7 @@ ticket:
|
|||
tracking: Estados
|
||||
components: Componentes
|
||||
pictures: Fotos
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
list:
|
||||
nickname: Alias
|
||||
state: Estado
|
||||
|
|
|
@ -20,7 +20,6 @@ const { viewSummary } = useSummaryDialog();
|
|||
const tableRef = ref();
|
||||
const agencyList = ref([]);
|
||||
const addressesList = ref([]);
|
||||
const clientId = ref();
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
|
@ -191,6 +190,7 @@ const getDateColor = (date) => {
|
|||
formInitialData: {
|
||||
active: true,
|
||||
addressId: null,
|
||||
clientFk: null,
|
||||
},
|
||||
}"
|
||||
:user-params="{ showEmpty: false }"
|
||||
|
@ -221,7 +221,7 @@ const getDateColor = (date) => {
|
|||
<VnSelect
|
||||
url="Clients"
|
||||
:include="{ relation: 'addresses' }"
|
||||
v-model="clientId"
|
||||
v-model="data.clientFk"
|
||||
:label="t('module.customer')"
|
||||
@update:model-value="(id) => fetchClientAddress(id, data)"
|
||||
/>
|
||||
|
|
|
@ -12,6 +12,7 @@ import VnInputTime from 'components/common/VnInputTime.vue';
|
|||
|
||||
import axios from 'axios';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
import { toTimeFormat } from 'filters/date.js';
|
||||
|
||||
const $props = defineProps({
|
||||
|
@ -23,7 +24,7 @@ const $props = defineProps({
|
|||
});
|
||||
|
||||
const emit = defineEmits(['updateForm']);
|
||||
|
||||
const { validate } = useValidator();
|
||||
const { notify } = useNotify();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
@ -306,6 +307,7 @@ onMounted(() => onFormModelInit());
|
|||
hide-selected
|
||||
map-options
|
||||
:required="true"
|
||||
:rules="validate('basicData.client')"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
@ -326,6 +328,7 @@ onMounted(() => onFormModelInit());
|
|||
hide-selected
|
||||
map-options
|
||||
:required="true"
|
||||
:rules="validate('basicData.warehouse')"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
|
@ -338,6 +341,7 @@ onMounted(() => onFormModelInit());
|
|||
hide-selected
|
||||
map-options
|
||||
:required="true"
|
||||
:rules="validate('basicData.address')"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
@ -385,6 +389,7 @@ onMounted(() => onFormModelInit());
|
|||
:label="t('basicData.alias')"
|
||||
v-model="formData.nickname"
|
||||
:required="true"
|
||||
:rules="validate('basicData.alias')"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow class="row q-gutter-md q-mb-md no-wrap">
|
||||
|
@ -397,6 +402,7 @@ onMounted(() => onFormModelInit());
|
|||
hide-selected
|
||||
map-options
|
||||
:required="true"
|
||||
:rules="validate('basicData.company')"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('basicData.agency')"
|
||||
|
@ -407,6 +413,7 @@ onMounted(() => onFormModelInit());
|
|||
hide-selected
|
||||
map-options
|
||||
@focus="agencyFetchRef.fetch()"
|
||||
:rules="validate('basicData.agency')"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('basicData.zone')"
|
||||
|
@ -421,6 +428,7 @@ onMounted(() => onFormModelInit());
|
|||
map-options
|
||||
:required="true"
|
||||
@focus="zonesFetchRef.fetch()"
|
||||
:rules="validate('basicData.zone')"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
@ -440,16 +448,19 @@ onMounted(() => onFormModelInit());
|
|||
:label="t('basicData.shipped')"
|
||||
v-model="formData.shipped"
|
||||
:required="true"
|
||||
:rules="validate('basicData.shipped')"
|
||||
/>
|
||||
<VnInputTime
|
||||
:label="t('basicData.shippedHour')"
|
||||
v-model="formData.shipped"
|
||||
:required="true"
|
||||
:rules="validate('basicData.shippedHour')"
|
||||
/>
|
||||
<VnInputDate
|
||||
:label="t('basicData.landed')"
|
||||
v-model="formData.landed"
|
||||
:required="true"
|
||||
:rules="validate('basicData.landed')"
|
||||
/>
|
||||
</VnRow>
|
||||
</QForm>
|
||||
|
|
|
@ -221,7 +221,12 @@ function ticketFilter(ticket) {
|
|||
size="md"
|
||||
icon="vn:basketadd"
|
||||
color="primary"
|
||||
:to="{ name: 'OrderList' }"
|
||||
:to="{
|
||||
name: 'OrderList',
|
||||
query: {
|
||||
createForm: JSON.stringify({}),
|
||||
},
|
||||
}"
|
||||
>
|
||||
<QTooltip>{{ t('ticket.card.newOrder') }}</QTooltip>
|
||||
</QBtn>
|
||||
|
|
|
@ -100,10 +100,14 @@ const actions = {
|
|||
|
||||
function openDeliveryNote(type = 'deliveryNote', documentType = 'pdf') {
|
||||
const path = `Tickets/${ticket.value.id}/delivery-note-${documentType}`;
|
||||
openReport(path, {
|
||||
recipientId: ticket.value.clientFk,
|
||||
type: type,
|
||||
});
|
||||
openReport(
|
||||
path,
|
||||
{
|
||||
recipientId: ticket.value.clientFk,
|
||||
type: type,
|
||||
},
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
|
||||
function sendDeliveryNoteConfirmation(type = 'deliveryNote', documentType = 'pdf') {
|
||||
|
|
|
@ -685,7 +685,9 @@ watch(
|
|||
<template #column-itemFk="{ row }">
|
||||
<VnSelect
|
||||
v-if="row.isNew"
|
||||
url="Items"
|
||||
url="Items/WithName"
|
||||
:fields="['id', 'name']"
|
||||
:sort-by="['id DESC']"
|
||||
:options="items"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
|
|
|
@ -104,7 +104,21 @@ const columns = computed(() => [
|
|||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
name: 'actions',
|
||||
align: 'left',
|
||||
columnFilter: null,
|
||||
},
|
||||
]);
|
||||
|
||||
async function deleteService(row) {
|
||||
const serviceId = row.id;
|
||||
|
||||
const { data } = await axios.delete(`TicketServices/${serviceId}`);
|
||||
if (data) notify('Service deleted successfully', 'positive');
|
||||
ticketServiceCrudRef.value.reload();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -123,6 +137,8 @@ const columns = computed(() => [
|
|||
:data-required="crudModelRequiredData"
|
||||
auto-load
|
||||
v-model:selected="selected"
|
||||
:order="['description ASC']"
|
||||
:default-remove="false"
|
||||
>
|
||||
<template #moreBeforeActions>
|
||||
<QBtn
|
||||
|
@ -180,6 +196,21 @@ const columns = computed(() => [
|
|||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-actions="{ row }">
|
||||
<QTd auto-width>
|
||||
<QIcon
|
||||
color="primary"
|
||||
name="delete"
|
||||
class="cursor-pointer"
|
||||
size="sm"
|
||||
@click.stop="deleteService(row)"
|
||||
>
|
||||
<QTooltip class="text-no-wrap">
|
||||
{{ t('globals.delete') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
</CrudModel>
|
||||
|
@ -187,3 +218,4 @@ const columns = computed(() => [
|
|||
<QBtn fab color="primary" icon="add" @click="ticketServiceCrudRef.insert()" />
|
||||
</QPageSticky>
|
||||
</template>
|
||||
ñ
|
||||
|
|
|
@ -260,15 +260,6 @@ function toTicketUrl(section) {
|
|||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('ticket.summary.consignee')"
|
||||
:value="
|
||||
entity.client.salesPersonUser.nickname +
|
||||
' #' +
|
||||
entity.client.salesPersonUser.id
|
||||
"
|
||||
>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('ticket.summary.consigneeAddress')"
|
||||
:value="formattedAddress()"
|
||||
/>
|
||||
</QCard>
|
||||
|
|
|
@ -59,6 +59,7 @@ const arrayData = useArrayData('AdvanceTickets', {
|
|||
exprBuilder: exprBuilder,
|
||||
limit: 0,
|
||||
});
|
||||
console.log('arrayData: ', arrayData);
|
||||
const { store } = arrayData;
|
||||
const tickets = computed(() =>
|
||||
(store.data || []).map((ticket, index) => ({ ...ticket, index: index }))
|
||||
|
@ -461,6 +462,7 @@ onMounted(async () => {
|
|||
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
userParams.dateFuture = tomorrow;
|
||||
userParams.dateToAdvance = today;
|
||||
userParams.scopeDays = 1;
|
||||
userParams.warehouseFk = user.value.warehouseFk;
|
||||
const filter = { limit: 0 };
|
||||
await arrayData.addFilter({ filter, userParams });
|
||||
|
@ -550,6 +552,7 @@ onMounted(async () => {
|
|||
style="max-width: 99%"
|
||||
>
|
||||
<template #header="props">
|
||||
{{ userParams.scopeDays }}
|
||||
<QTr :props="props">
|
||||
<QTh
|
||||
class="horizontal-separator text-uppercase color-vn-label"
|
||||
|
|
|
@ -9,6 +9,7 @@ import VnInputDate from 'src/components/common/VnInputDate.vue';
|
|||
|
||||
import axios from 'axios';
|
||||
import { onMounted } from 'vue';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
|
@ -116,6 +117,15 @@ onMounted(async () => await getItemPackingTypes());
|
|||
</VnSelect>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputNumber
|
||||
v-model="params.scopeDays"
|
||||
:label="t('Days onward')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useRoute } from 'vue-router';
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { toDate, toCurrency } from 'src/filters/index';
|
||||
import { toDate, toCurrency, dashIfEmpty } from 'src/filters/index';
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
import TicketSummary from './Card/TicketSummary.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
|
@ -21,6 +21,7 @@ import FetchData from 'src/components/FetchData.vue';
|
|||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import ZoneDescriptorProxy from '../Zone/Card/ZoneDescriptorProxy.vue';
|
||||
import { toTimeFormat } from 'src/filters/date';
|
||||
import InvoiceOutDescriptorProxy from '../InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
@ -150,6 +151,11 @@ const columns = computed(() => [
|
|||
},
|
||||
columnClass: 'expand',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'refFk',
|
||||
label: t('ticketList.ref'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'zoneFk',
|
||||
|
@ -477,59 +483,66 @@ function setReference(data) {
|
|||
}"
|
||||
>
|
||||
<template #column-statusIcons="{ row }">
|
||||
<QIcon
|
||||
v-if="row.isTaxDataChecked === 0"
|
||||
color="primary"
|
||||
name="vn:no036"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('No verified data') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon v-if="row.hasTicketRequest" color="primary" name="vn:claims" size="xs">
|
||||
<QTooltip>
|
||||
{{ t('Purchase request') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="row.itemShortage"
|
||||
color="primary"
|
||||
name="vn:unavailable"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Not visible') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon v-if="row.isFreezed" color="primary" name="vn:frozen" size="xs">
|
||||
<QTooltip>
|
||||
{{ t('Client frozen') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon v-if="row.risk" color="primary" name="vn:risk" size="xs">
|
||||
<QTooltip> {{ t('Risk') }}: {{ row.risk }} </QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="row.hasComponentLack"
|
||||
color="primary"
|
||||
name="vn:components"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Component lack') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="row.hasRounding"
|
||||
color="primary"
|
||||
name="vn:sync_problem"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Rounding') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<div class="q-gutter-x-xs">
|
||||
<QIcon
|
||||
v-if="row.isTaxDataChecked === 0"
|
||||
color="primary"
|
||||
name="vn:no036"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('No verified data') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="row.hasTicketRequest"
|
||||
color="primary"
|
||||
name="vn:buyrequest"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Purchase request') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="row.itemShortage"
|
||||
color="primary"
|
||||
name="vn:unavailable"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Not visible') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon v-if="row.isFreezed" color="primary" name="vn:frozen" size="xs">
|
||||
<QTooltip>
|
||||
{{ t('Client frozen') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon v-if="row.risk" color="primary" name="vn:risk" size="xs">
|
||||
<QTooltip> {{ t('Risk') }}: {{ row.risk }} </QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="row.hasComponentLack"
|
||||
color="primary"
|
||||
name="vn:components"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Component lack') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="row.hasRounding"
|
||||
color="primary"
|
||||
name="sync_problem"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Rounding') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</div>
|
||||
</template>
|
||||
<template #column-salesPersonFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
|
@ -566,9 +579,15 @@ function setReference(data) {
|
|||
{{ row.state }}
|
||||
</span>
|
||||
</template>
|
||||
<template #column-refFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ dashIfEmpty(row.refFk) }}
|
||||
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-zoneFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row.zoneName }}
|
||||
{{ dashIfEmpty(row.zoneName) }}
|
||||
<ZoneDescriptorProxy :id="row.zoneFk" />
|
||||
</span>
|
||||
</template>
|
||||
|
@ -586,6 +605,7 @@ function setReference(data) {
|
|||
<VnRow>
|
||||
<VnSelect
|
||||
url="Clients"
|
||||
:fields="['id', 'name']"
|
||||
:label="t('ticketList.client')"
|
||||
v-model="data.clientId"
|
||||
:options="clientsOptions"
|
||||
|
|
|
@ -270,3 +270,4 @@ ticketList:
|
|||
closure: Closure
|
||||
toLines: Go to lines
|
||||
addressNickname: Address nickname
|
||||
ref: Reference
|
||||
|
|
|
@ -273,3 +273,4 @@ ticketList:
|
|||
closure: Cierre
|
||||
toLines: Ir a lineas
|
||||
addressNickname: Alias consignatario
|
||||
ref: Referencia
|
||||
|
|
|
@ -198,7 +198,7 @@ export default {
|
|||
name: 'TicketPackage',
|
||||
meta: {
|
||||
title: 'packages',
|
||||
icon: 'vn:bin',
|
||||
icon: 'vn:bucket',
|
||||
},
|
||||
component: () => import('src/pages/Ticket/Card/TicketPackage.vue'),
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue