Merge branch 'dev' into 8120-CompactSummaryPopup
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
376323652b
|
@ -29,5 +29,5 @@ yarn-error.log*
|
|||
*.sln
|
||||
|
||||
# Cypress directories and files
|
||||
/tests/cypress/videos
|
||||
/tests/cypress/screenshots
|
||||
/test/cypress/videos
|
||||
/test/cypress/screenshots
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup>
|
||||
import axios from 'axios';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { computed, ref, useAttrs, watch } from 'vue';
|
||||
import { useRouter, onBeforeRouteLeave } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
@ -17,6 +17,7 @@ const quasar = useQuasar();
|
|||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
const { validate } = useValidator();
|
||||
const $attrs = useAttrs();
|
||||
|
||||
const $props = defineProps({
|
||||
model: {
|
||||
|
@ -113,9 +114,11 @@ onBeforeRouteLeave((to, from, next) => {
|
|||
});
|
||||
|
||||
async function fetch(data) {
|
||||
resetData(data);
|
||||
emit('onFetch', data);
|
||||
return data;
|
||||
const keyData = $attrs['key-data'];
|
||||
const rows = keyData ? data[keyData] : data;
|
||||
resetData(rows);
|
||||
emit('onFetch', rows);
|
||||
return rows;
|
||||
}
|
||||
|
||||
function resetData(data) {
|
||||
|
|
|
@ -12,6 +12,7 @@ const props = defineProps({
|
|||
baseUrl: { type: String, default: undefined },
|
||||
customUrl: { type: String, default: undefined },
|
||||
filter: { type: Object, default: () => {} },
|
||||
userFilter: { type: Object, default: () => {} },
|
||||
descriptor: { type: Object, required: true },
|
||||
filterPanel: { type: Object, default: undefined },
|
||||
searchDataKey: { type: String, default: undefined },
|
||||
|
@ -32,6 +33,7 @@ const url = computed(() => {
|
|||
const arrayData = useArrayData(props.dataKey, {
|
||||
url: url.value,
|
||||
filter: props.filter,
|
||||
userFilter: props.userFilter,
|
||||
});
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
|
|
@ -75,6 +75,7 @@ const focus = () => {
|
|||
|
||||
defineExpose({
|
||||
focus,
|
||||
vnInputRef,
|
||||
});
|
||||
|
||||
const mixinRules = [
|
||||
|
|
|
@ -804,7 +804,7 @@ watch(
|
|||
<QItem class="q-mt-sm">
|
||||
<QInput
|
||||
class="full-width"
|
||||
:label="t('to')"
|
||||
:label="t('globals.to')"
|
||||
@click="dateToDialog = true"
|
||||
@focus="(evt) => evt.target.blur()"
|
||||
@clear="selectFilter('date', 'from')"
|
||||
|
@ -1059,9 +1059,9 @@ en:
|
|||
Deletes: Deletes
|
||||
Accesses: Accesses
|
||||
Users:
|
||||
User: Usuario
|
||||
All: Todo
|
||||
System: Sistema
|
||||
User: User
|
||||
All: All
|
||||
System: System
|
||||
properties:
|
||||
id: ID
|
||||
claimFk: Claim ID
|
||||
|
|
|
@ -94,8 +94,8 @@ function checkIsMain() {
|
|||
/>
|
||||
<div :id="searchbarId"></div>
|
||||
</slot>
|
||||
<RightAdvancedMenu :is-main-section="isMainSection">
|
||||
<template #advanced-menu v-if="$slots[advancedMenuSlot] || rightFilter">
|
||||
<RightAdvancedMenu :is-main-section="isMainSection && rightFilter">
|
||||
<template #advanced-menu v-if="$slots[advancedMenuSlot]">
|
||||
<slot :name="advancedMenuSlot">
|
||||
<VnTableFilter
|
||||
v-if="rightFilter && columns"
|
||||
|
|
|
@ -41,7 +41,7 @@ const card = toRef(props, 'item');
|
|||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span class="link">
|
||||
<span class="link" @click.stop>
|
||||
{{ card.name }}
|
||||
<ItemDescriptorProxy :id="card.id" />
|
||||
</span>
|
||||
|
|
|
@ -190,7 +190,10 @@ const getLocale = (label) => {
|
|||
const globalLocale = `globals.params.${param}`;
|
||||
if (te(globalLocale)) return t(globalLocale);
|
||||
else if (te(t(`params.${param}`)));
|
||||
else return t(`${route.meta.moduleName.toLowerCase()}.params.${param}`);
|
||||
else {
|
||||
const camelCaseModuleName = route.meta.moduleName.charAt(0).toLowerCase() + route.meta.moduleName.slice(1);
|
||||
return t(`${camelCaseModuleName}.params.${param}`);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -78,6 +78,10 @@ const props = defineProps({
|
|||
type: String,
|
||||
default: '',
|
||||
},
|
||||
keyData: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['onFetch', 'onPaginate', 'onChange']);
|
||||
|
@ -255,7 +259,7 @@ defineExpose({
|
|||
:disable="disableInfiniteScroll || !store.hasMoreData"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<slot name="body" :rows="store.data"></slot>
|
||||
<slot name="body" :rows="keyData ? store.data[keyData] : store.data"></slot>
|
||||
<div v-if="isLoading" class="spinner info-row q-pa-md text-center">
|
||||
<QSpinner color="primary" size="md" />
|
||||
</div>
|
||||
|
|
|
@ -170,10 +170,9 @@ export function useArrayData(key, userOptions) {
|
|||
|
||||
async function addOrder(field, direction = 'ASC') {
|
||||
const newOrder = field + ' ' + direction;
|
||||
let order = store.order || [];
|
||||
if (typeof order == 'string') order = [order];
|
||||
const order = toArray(store.order);
|
||||
|
||||
let index = order.findIndex((o) => o.split(' ')[0] === field);
|
||||
let index = getOrderIndex(order, field);
|
||||
if (index > -1) {
|
||||
order[index] = newOrder;
|
||||
} else {
|
||||
|
@ -190,16 +189,24 @@ export function useArrayData(key, userOptions) {
|
|||
}
|
||||
|
||||
async function deleteOrder(field) {
|
||||
let order = store.order ?? [];
|
||||
if (typeof order == 'string') order = [order];
|
||||
|
||||
const index = order.findIndex((o) => o.split(' ')[0] === field);
|
||||
const order = toArray(store.order);
|
||||
const index = getOrderIndex(order, field);
|
||||
if (index > -1) order.splice(index, 1);
|
||||
|
||||
store.order = order;
|
||||
fetch({});
|
||||
}
|
||||
|
||||
function getOrderIndex(order, field) {
|
||||
return order.findIndex((o) => o.split(' ')[0] === field);
|
||||
}
|
||||
|
||||
function toArray(str = []) {
|
||||
if (!str) return [];
|
||||
if (Array.isArray(str)) return str;
|
||||
if (typeof str === 'string') return str.split(',').map((item) => item.trim());
|
||||
}
|
||||
|
||||
function sanitizerParams(params, exprBuilder) {
|
||||
for (const param in params) {
|
||||
if (params[param] === '' || params[param] === null) {
|
||||
|
@ -290,8 +297,7 @@ export function useArrayData(key, userOptions) {
|
|||
|
||||
Object.assign(params, store.userParams);
|
||||
if (params.filter) params.filter.skip = store.skip;
|
||||
if (store?.order && typeof store?.order == 'string') store.order = [store.order];
|
||||
if (store.order?.length) params.filter.order = [...store.order];
|
||||
if (store.order) params.filter.order = toArray(store.order);
|
||||
else delete params.filter.order;
|
||||
|
||||
return { filter, params, limit: filter.limit };
|
||||
|
|
|
@ -312,11 +312,11 @@ input::-webkit-inner-spin-button {
|
|||
}
|
||||
|
||||
.q-item > .q-item__section:has(.q-checkbox) {
|
||||
max-width: min-content;
|
||||
max-width: fit-content;
|
||||
}
|
||||
|
||||
.row > .column:has(.q-checkbox) {
|
||||
max-width: min-content;
|
||||
max-width: fit-content;
|
||||
}
|
||||
.q-field__inner {
|
||||
.q-field__control {
|
||||
|
|
|
@ -2,9 +2,10 @@ globals:
|
|||
lang:
|
||||
es: Spanish
|
||||
en: English
|
||||
quantity: Quantity
|
||||
language: Language
|
||||
quantity: Quantity
|
||||
entity: Entity
|
||||
preview: Preview
|
||||
user: User
|
||||
details: Details
|
||||
collapseMenu: Collapse lateral menu
|
||||
|
@ -36,7 +37,6 @@ globals:
|
|||
confirm: Confirm
|
||||
assign: Assign
|
||||
back: Back
|
||||
downloadPdf: Download PDF
|
||||
yes: 'Yes'
|
||||
no: 'No'
|
||||
noChanges: No changes to save
|
||||
|
@ -60,6 +60,7 @@ globals:
|
|||
downloadCSVSuccess: CSV downloaded successfully
|
||||
reference: Reference
|
||||
agency: Agency
|
||||
entry: Entry
|
||||
warehouseOut: Warehouse Out
|
||||
warehouseIn: Warehouse In
|
||||
landed: Landed
|
||||
|
@ -68,11 +69,11 @@ globals:
|
|||
amount: Amount
|
||||
packages: Packages
|
||||
download: Download
|
||||
downloadPdf: Download PDF
|
||||
selectRows: 'Select all { numberRows } row(s)'
|
||||
allRows: 'All { numberRows } row(s)'
|
||||
markAll: Mark all
|
||||
requiredField: Required field
|
||||
valueCantBeEmpty: Value cannot be empty
|
||||
class: clase
|
||||
type: Type
|
||||
reason: reason
|
||||
|
@ -82,6 +83,9 @@ globals:
|
|||
warehouse: Warehouse
|
||||
company: Company
|
||||
fieldRequired: Field required
|
||||
valueCantBeEmpty: Value cannot be empty
|
||||
Value can't be blank: Value cannot be blank
|
||||
Value can't be null: Value cannot be null
|
||||
allowedFilesText: 'Allowed file types: { allowedContentTypes }'
|
||||
smsSent: SMS sent
|
||||
confirmDeletion: Confirm deletion
|
||||
|
@ -131,6 +135,26 @@ globals:
|
|||
medium: Medium
|
||||
big: Big
|
||||
email: Email
|
||||
supplier: Supplier
|
||||
ticketList: Ticket List
|
||||
created: Created
|
||||
worker: Worker
|
||||
now: Now
|
||||
name: Name
|
||||
new: New
|
||||
comment: Comment
|
||||
observations: Observations
|
||||
goToModuleIndex: Go to module index
|
||||
createInvoiceIn: Create invoice in
|
||||
myAccount: My account
|
||||
noOne: No one
|
||||
maxTemperature: Max
|
||||
minTemperature: Min
|
||||
changePass: Change password
|
||||
deleteConfirmTitle: Delete selected elements
|
||||
changeState: Change state
|
||||
raid: 'Raid {daysInForward} days'
|
||||
isVies: Vies
|
||||
pageTitles:
|
||||
logIn: Login
|
||||
addressEdit: Update address
|
||||
|
@ -152,13 +176,14 @@ globals:
|
|||
subRoles: Subroles
|
||||
inheritedRoles: Inherited Roles
|
||||
customers: Customers
|
||||
customerCreate: New customer
|
||||
createCustomer: Create customer
|
||||
createOrder: New order
|
||||
list: List
|
||||
webPayments: Web Payments
|
||||
extendedList: Extended list
|
||||
notifications: Notifications
|
||||
defaulter: Defaulter
|
||||
customerCreate: New customer
|
||||
createOrder: New order
|
||||
fiscalData: Fiscal data
|
||||
billingData: Billing data
|
||||
consignees: Consignees
|
||||
|
@ -194,27 +219,28 @@ globals:
|
|||
claims: Claims
|
||||
claimCreate: New claim
|
||||
lines: Lines
|
||||
photos: Photos
|
||||
development: Development
|
||||
photos: Photos
|
||||
action: Action
|
||||
invoiceOuts: Invoice out
|
||||
negativeBases: Negative Bases
|
||||
globalInvoicing: Global invoicing
|
||||
invoiceOutCreate: Create invoice out
|
||||
order: Orders
|
||||
orderList: List
|
||||
orderCreate: New order
|
||||
catalog: Catalog
|
||||
volume: Volume
|
||||
shelving: Shelving
|
||||
shelvingList: Shelving List
|
||||
shelvingCreate: New shelving
|
||||
invoiceIns: Invoices In
|
||||
invoiceInCreate: Create invoice in
|
||||
vat: VAT
|
||||
labeler: Labeler
|
||||
dueDay: Due day
|
||||
intrastat: Intrastat
|
||||
corrective: Corrective
|
||||
order: Orders
|
||||
orderList: List
|
||||
orderCreate: New order
|
||||
catalog: Catalog
|
||||
volume: Volume
|
||||
workers: Workers
|
||||
workerCreate: New worker
|
||||
department: Department
|
||||
|
@ -227,10 +253,10 @@ globals:
|
|||
wagonsList: Wagons List
|
||||
wagonCreate: Create wagon
|
||||
wagonEdit: Edit wagon
|
||||
wagonCounter: Trolley counter
|
||||
typesList: Types List
|
||||
typeCreate: Create type
|
||||
typeEdit: Edit type
|
||||
wagonCounter: Trolley counter
|
||||
roadmap: Roadmap
|
||||
stops: Stops
|
||||
routes: Routes
|
||||
|
@ -239,21 +265,16 @@ globals:
|
|||
routeCreate: New route
|
||||
RouteRoadmap: Roadmaps
|
||||
RouteRoadmapCreate: Create roadmap
|
||||
RouteExtendedList: Router
|
||||
autonomous: Autonomous
|
||||
suppliers: Suppliers
|
||||
supplier: Supplier
|
||||
expedition: Expedition
|
||||
services: Service
|
||||
components: Components
|
||||
pictures: Pictures
|
||||
packages: Packages
|
||||
tracking: Tracking
|
||||
labeler: Labeler
|
||||
supplierCreate: New supplier
|
||||
accounts: Accounts
|
||||
addresses: Addresses
|
||||
agencyTerm: Agency agreement
|
||||
travel: Travels
|
||||
create: Create
|
||||
extraCommunity: Extra community
|
||||
travelCreate: New travel
|
||||
history: Log
|
||||
|
@ -261,14 +282,13 @@ globals:
|
|||
items: Items
|
||||
diary: Diary
|
||||
tags: Tags
|
||||
create: Create
|
||||
buyRequest: Buy requests
|
||||
fixedPrice: Fixed prices
|
||||
buyRequest: Buy requests
|
||||
wasteBreakdown: Waste breakdown
|
||||
itemCreate: New item
|
||||
barcode: Barcodes
|
||||
tax: Tax
|
||||
botanical: Botanical
|
||||
barcode: Barcodes
|
||||
itemTypeCreate: New item type
|
||||
family: Item Type
|
||||
lastEntries: Last entries
|
||||
|
@ -284,13 +304,20 @@ globals:
|
|||
formation: Formation
|
||||
locations: Locations
|
||||
warehouses: Warehouses
|
||||
saleTracking: Sale tracking
|
||||
roles: Roles
|
||||
connections: Connections
|
||||
acls: ACLs
|
||||
mailForwarding: Mail forwarding
|
||||
mailAlias: Mail alias
|
||||
privileges: Privileges
|
||||
observation: Notes
|
||||
expedition: Expedition
|
||||
saleTracking: Sale tracking
|
||||
services: Service
|
||||
tracking: Tracking
|
||||
components: Components
|
||||
pictures: Pictures
|
||||
packages: Packages
|
||||
ldap: LDAP
|
||||
samba: Samba
|
||||
twoFactor: Two factor
|
||||
|
@ -301,27 +328,12 @@ globals:
|
|||
serial: Serial
|
||||
medical: Mutual
|
||||
pit: IRPF
|
||||
RouteExtendedList: Router
|
||||
wasteRecalc: Waste recaclulate
|
||||
operator: Operator
|
||||
parking: Parking
|
||||
supplier: Supplier
|
||||
created: Created
|
||||
worker: Worker
|
||||
now: Now
|
||||
name: Name
|
||||
new: New
|
||||
comment: Comment
|
||||
observations: Observations
|
||||
goToModuleIndex: Go to module index
|
||||
unsavedPopup:
|
||||
title: Unsaved changes will be lost
|
||||
subtitle: Are you sure exit without saving?
|
||||
createInvoiceIn: Create invoice in
|
||||
myAccount: My account
|
||||
noOne: No one
|
||||
maxTemperature: Max
|
||||
minTemperature: Min
|
||||
params:
|
||||
clientFk: Client id
|
||||
salesPersonFk: Sales person
|
||||
|
@ -339,19 +351,13 @@ globals:
|
|||
supplierFk: Supplier
|
||||
supplierRef: Supplier ref
|
||||
serial: Serial
|
||||
amount: Importe
|
||||
amount: Amount
|
||||
awbCode: AWB
|
||||
correctedFk: Rectified
|
||||
correctingFk: Rectificative
|
||||
daysOnward: Days onward
|
||||
countryFk: Country
|
||||
companyFk: Company
|
||||
changePass: Change password
|
||||
setPass: Set password
|
||||
deleteConfirmTitle: Delete selected elements
|
||||
changeState: Change state
|
||||
raid: 'Raid {daysInForward} days'
|
||||
isVies: Vies
|
||||
errors:
|
||||
statusUnauthorized: Access denied
|
||||
statusInternalServerError: An internal server error has ocurred
|
||||
|
@ -491,21 +497,6 @@ invoiceOut:
|
|||
comercial: Comercial
|
||||
errors:
|
||||
downloadCsvFailed: CSV download failed
|
||||
shelving:
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Priority
|
||||
newShelving: New Shelving
|
||||
summary:
|
||||
recyclable: Recyclable
|
||||
parking:
|
||||
pickingOrder: Picking order
|
||||
sector: Sector
|
||||
row: Row
|
||||
column: Column
|
||||
searchBar:
|
||||
info: You can search by parking code
|
||||
label: Search parking...
|
||||
department:
|
||||
chat: Chat
|
||||
bossDepartment: Boss Department
|
||||
|
@ -697,6 +688,9 @@ supplier:
|
|||
consumption:
|
||||
entry: Entry
|
||||
travel:
|
||||
search: Search travel
|
||||
searchInfo: You can search by travel id or name
|
||||
id: Id
|
||||
travelList:
|
||||
tableVisibleColumns:
|
||||
ref: Reference
|
||||
|
@ -727,62 +721,6 @@ travel:
|
|||
destination: Destination
|
||||
thermograph: Thermograph
|
||||
travelFileDescription: 'Travel id { travelId }'
|
||||
item:
|
||||
descriptor:
|
||||
buyer: Buyer
|
||||
color: Color
|
||||
category: Category
|
||||
available: Available
|
||||
warehouseText: 'Calculated on the warehouse of { warehouseName }'
|
||||
itemDiary: Item diary
|
||||
list:
|
||||
id: Identifier
|
||||
stems: Stems
|
||||
category: Category
|
||||
typeName: Type
|
||||
isActive: Active
|
||||
userName: Buyer
|
||||
weightByPiece: Weight/Piece
|
||||
stemMultiplier: Multiplier
|
||||
fixedPrice:
|
||||
itemFk: Item ID
|
||||
groupingPrice: Grouping price
|
||||
packingPrice: Packing price
|
||||
hasMinPrice: Has min price
|
||||
minPrice: Min price
|
||||
started: Started
|
||||
ended: Ended
|
||||
create:
|
||||
priority: Priority
|
||||
buyRequest:
|
||||
requester: Requester
|
||||
requested: Requested
|
||||
attender: Atender
|
||||
achieved: Achieved
|
||||
concept: Concept
|
||||
summary:
|
||||
otherData: Other data
|
||||
tax: Tax
|
||||
botanical: Botanical
|
||||
barcode: Barcode
|
||||
completeName: Complete name
|
||||
family: Familiy
|
||||
stems: Stems
|
||||
multiplier: Multiplier
|
||||
buyer: Buyer
|
||||
doPhoto: Do photo
|
||||
intrastatCode: Intrastat code
|
||||
ref: Reference
|
||||
relevance: Relevance
|
||||
weight: Weight (gram)/stem
|
||||
units: Units/box
|
||||
expense: Expense
|
||||
generic: Generic
|
||||
recycledPlastic: Recycled plastic
|
||||
nonRecycledPlastic: Non recycled plastic
|
||||
minSalesQuantity: Min sales quantity
|
||||
genus: Genus
|
||||
specie: Specie
|
||||
components:
|
||||
topbar: {}
|
||||
itemsFilterPanel:
|
||||
|
|
|
@ -5,6 +5,7 @@ globals:
|
|||
language: Idioma
|
||||
quantity: Cantidad
|
||||
entity: Entidad
|
||||
preview: Vista previa
|
||||
user: Usuario
|
||||
details: Detalles
|
||||
collapseMenu: Contraer menú lateral
|
||||
|
@ -54,11 +55,12 @@ globals:
|
|||
today: Hoy
|
||||
yesterday: Ayer
|
||||
dateFormat: es-ES
|
||||
noSelectedRows: No tienes ninguna línea seleccionada
|
||||
microsip: Abrir en MicroSIP
|
||||
noSelectedRows: No tienes ninguna línea seleccionada
|
||||
downloadCSVSuccess: Descarga de CSV exitosa
|
||||
reference: Referencia
|
||||
agency: Agencia
|
||||
entry: Entrada
|
||||
warehouseOut: Alm. salida
|
||||
warehouseIn: Alm. entrada
|
||||
landed: F. entrega
|
||||
|
@ -133,6 +135,26 @@ globals:
|
|||
medium: Mediano/a
|
||||
big: Grande
|
||||
email: Correo
|
||||
supplier: Proveedor
|
||||
ticketList: Listado de tickets
|
||||
created: Fecha creación
|
||||
worker: Trabajador
|
||||
now: Ahora
|
||||
name: Nombre
|
||||
new: Nuevo
|
||||
comment: Comentario
|
||||
observations: Observaciones
|
||||
goToModuleIndex: Ir al índice del módulo
|
||||
createInvoiceIn: Crear factura recibida
|
||||
myAccount: Mi cuenta
|
||||
noOne: Nadie
|
||||
maxTemperature: Máx
|
||||
minTemperature: Mín
|
||||
changePass: Cambiar contraseña
|
||||
deleteConfirmTitle: Eliminar los elementos seleccionados
|
||||
changeState: Cambiar estado
|
||||
raid: 'Redada {daysInForward} días'
|
||||
isVies: Vies
|
||||
pageTitles:
|
||||
logIn: Inicio de sesión
|
||||
addressEdit: Modificar consignatario
|
||||
|
@ -155,17 +177,17 @@ globals:
|
|||
inheritedRoles: Roles heredados
|
||||
customers: Clientes
|
||||
customerCreate: Nuevo cliente
|
||||
createCustomer: Crear cliente
|
||||
createOrder: Nuevo pedido
|
||||
list: Listado
|
||||
webPayments: Pagos Web
|
||||
extendedList: Listado extendido
|
||||
notifications: Notificaciones
|
||||
defaulter: Morosos
|
||||
createCustomer: Crear cliente
|
||||
fiscalData: Datos fiscales
|
||||
billingData: Forma de pago
|
||||
consignees: Consignatarios
|
||||
'address-create': Nuevo consignatario
|
||||
address-create: Nuevo consignatario
|
||||
notes: Notas
|
||||
credits: Créditos
|
||||
greuges: Greuges
|
||||
|
@ -231,10 +253,10 @@ globals:
|
|||
wagonsList: Listado vagones
|
||||
wagonCreate: Crear tipo
|
||||
wagonEdit: Editar tipo
|
||||
wagonCounter: Contador de carros
|
||||
typesList: Listado tipos
|
||||
typeCreate: Crear tipo
|
||||
typeEdit: Editar tipo
|
||||
wagonCounter: Contador de carros
|
||||
roadmap: Troncales
|
||||
stops: Paradas
|
||||
routes: Rutas
|
||||
|
@ -243,8 +265,8 @@ globals:
|
|||
routeCreate: Nueva ruta
|
||||
RouteRoadmap: Troncales
|
||||
RouteRoadmapCreate: Crear troncal
|
||||
autonomous: Autónomos
|
||||
RouteExtendedList: Enrutador
|
||||
autonomous: Autónomos
|
||||
suppliers: Proveedores
|
||||
supplier: Proveedor
|
||||
supplierCreate: Nuevo proveedor
|
||||
|
@ -309,23 +331,9 @@ globals:
|
|||
wasteRecalc: Recalcular mermas
|
||||
operator: Operario
|
||||
parking: Parking
|
||||
supplier: Proveedor
|
||||
created: Fecha creación
|
||||
worker: Trabajador
|
||||
now: Ahora
|
||||
name: Nombre
|
||||
new: Nuevo
|
||||
comment: Comentario
|
||||
observations: Observaciones
|
||||
goToModuleIndex: Ir al índice del módulo
|
||||
unsavedPopup:
|
||||
title: Los cambios que no haya guardado se perderán
|
||||
subtitle: ¿Seguro que quiere salir sin guardar?
|
||||
createInvoiceIn: Crear factura recibida
|
||||
myAccount: Mi cuenta
|
||||
noOne: Nadie
|
||||
maxTemperature: Máx
|
||||
minTemperature: Mín
|
||||
params:
|
||||
clientFk: Id cliente
|
||||
salesPersonFk: Comercial
|
||||
|
@ -348,12 +356,6 @@ globals:
|
|||
packing: ITP
|
||||
countryFk: País
|
||||
companyFk: Empresa
|
||||
changePass: Cambiar contraseña
|
||||
setPass: Establecer contraseña
|
||||
deleteConfirmTitle: Eliminar los elementos seleccionados
|
||||
changeState: Cambiar estado
|
||||
raid: 'Redada {daysInForward} días'
|
||||
isVies: Vies
|
||||
errors:
|
||||
statusUnauthorized: Acceso denegado
|
||||
statusInternalServerError: Ha ocurrido un error interno del servidor
|
||||
|
@ -448,11 +450,15 @@ ticket:
|
|||
attender: Consignatario
|
||||
create:
|
||||
address: Dirección
|
||||
invoiceOut:
|
||||
card:
|
||||
issued: Fecha emisión
|
||||
customerCard: Ficha del cliente
|
||||
ticketList: Listado de tickets
|
||||
order:
|
||||
field:
|
||||
salesPersonFk: Comercial
|
||||
form:
|
||||
clientFk: Cliente
|
||||
addressFk: Dirección
|
||||
agencyModeFk: Agencia
|
||||
list:
|
||||
newOrder: Nuevo Pedido
|
||||
summary:
|
||||
issued: Fecha
|
||||
dued: Fecha límite
|
||||
|
@ -463,47 +469,6 @@ invoiceOut:
|
|||
fee: Cuota
|
||||
tickets: Tickets
|
||||
totalWithVat: Importe
|
||||
globalInvoices:
|
||||
errors:
|
||||
chooseValidClient: Selecciona un cliente válido
|
||||
chooseValidCompany: Selecciona una empresa válida
|
||||
chooseValidPrinter: Selecciona una impresora válida
|
||||
chooseValidSerialType: Selecciona una tipo de serie válida
|
||||
fillDates: La fecha de la factura y la fecha máxima deben estar completas
|
||||
invoiceDateLessThanMaxDate: La fecha de la factura no puede ser menor que la fecha máxima
|
||||
invoiceWithFutureDate: Existe una factura con una fecha futura
|
||||
noTicketsToInvoice: No existen tickets para facturar
|
||||
criticalInvoiceError: Error crítico en la facturación proceso detenido
|
||||
invalidSerialTypeForAll: El tipo de serie debe ser global cuando se facturan todos los clientes
|
||||
table:
|
||||
addressId: Id dirección
|
||||
streetAddress: Dirección fiscal
|
||||
statusCard:
|
||||
percentageText: '{getPercentage}% {getAddressNumber} de {getNAddresses}'
|
||||
pdfsNumberText: '{nPdfs} de {totalPdfs} PDFs'
|
||||
negativeBases:
|
||||
clientId: Id cliente
|
||||
base: Base
|
||||
active: Activo
|
||||
hasToInvoice: Facturar
|
||||
verifiedData: Datos comprobados
|
||||
comercial: Comercial
|
||||
errors:
|
||||
downloadCsvFailed: Error al descargar CSV
|
||||
shelving:
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Prioridad
|
||||
newShelving: Nuevo Carro
|
||||
summary:
|
||||
recyclable: Reciclable
|
||||
parking:
|
||||
pickingOrder: Orden de recogida
|
||||
row: Fila
|
||||
column: Columna
|
||||
searchBar:
|
||||
info: Puedes buscar por código de parking
|
||||
label: Buscar parking...
|
||||
department:
|
||||
chat: Chat
|
||||
bossDepartment: Jefe de departamento
|
||||
|
@ -693,6 +658,9 @@ supplier:
|
|||
consumption:
|
||||
entry: Entrada
|
||||
travel:
|
||||
search: Buscar envío
|
||||
searchInfo: Buscar envío por id o nombre
|
||||
id: Id
|
||||
travelList:
|
||||
tableVisibleColumns:
|
||||
ref: Referencia
|
||||
|
@ -723,62 +691,6 @@ travel:
|
|||
destination: Destino
|
||||
thermograph: Termógrafo
|
||||
travelFileDescription: 'Id envío { travelId }'
|
||||
item:
|
||||
descriptor:
|
||||
buyer: Comprador
|
||||
color: Color
|
||||
category: Categoría
|
||||
available: Disponible
|
||||
warehouseText: 'Calculado sobre el almacén de { warehouseName }'
|
||||
itemDiary: Registro de compra-venta
|
||||
list:
|
||||
id: Identificador
|
||||
stems: Tallos
|
||||
category: Reino
|
||||
typeName: Tipo
|
||||
isActive: Activo
|
||||
weightByPiece: Peso (gramos)/tallo
|
||||
userName: Comprador
|
||||
stemMultiplier: Multiplicador
|
||||
fixedPrice:
|
||||
itemFk: ID Artículo
|
||||
groupingPrice: Precio grouping
|
||||
packingPrice: Precio packing
|
||||
hasMinPrice: Tiene precio mínimo
|
||||
minPrice: Precio min
|
||||
started: Inicio
|
||||
ended: Fin
|
||||
create:
|
||||
priority: Prioridad
|
||||
summary:
|
||||
otherData: Otros datos
|
||||
tax: IVA
|
||||
botanical: Botánico
|
||||
barcode: Código de barras
|
||||
completeName: Nombre completo
|
||||
family: Familia
|
||||
stems: Tallos
|
||||
multiplier: Multiplicador
|
||||
buyer: Comprador
|
||||
doPhoto: Hacer foto
|
||||
intrastatCode: Código intrastat
|
||||
ref: Referencia
|
||||
relevance: Relevancia
|
||||
weight: Peso (gramos)/tallo
|
||||
units: Unidades/caja
|
||||
expense: Gasto
|
||||
generic: Genérico
|
||||
recycledPlastic: Plástico reciclado
|
||||
nonRecycledPlastic: Plástico no reciclado
|
||||
minSalesQuantity: Cantidad mínima de venta
|
||||
genus: Genus
|
||||
specie: Specie
|
||||
buyRequest:
|
||||
requester: Solicitante
|
||||
requested: Solicitado
|
||||
attender: Comprador
|
||||
achieved: Conseguido
|
||||
concept: Concepto
|
||||
components:
|
||||
topbar: {}
|
||||
itemsFilterPanel:
|
||||
|
|
|
@ -153,6 +153,7 @@ const updateDateParams = (value, params) => {
|
|||
data-key="CustomerConsumption"
|
||||
url="Clients/consumption"
|
||||
:order="['itemTypeFk', 'itemName', 'itemSize', 'description']"
|
||||
:filter="{ where: { clientFk: route.params.id } }"
|
||||
:columns="columns"
|
||||
search-url="consumption"
|
||||
:user-params="userParams"
|
||||
|
|
|
@ -188,14 +188,18 @@ const debtWarning = computed(() => {
|
|||
</QBtn>
|
||||
<QBtn
|
||||
:to="{
|
||||
name: 'AccountSummary',
|
||||
params: { id: entity.id },
|
||||
name: 'OrderList',
|
||||
query: {
|
||||
createForm: JSON.stringify({
|
||||
clientFk: entity.id,
|
||||
}),
|
||||
},
|
||||
}"
|
||||
size="md"
|
||||
icon="face"
|
||||
icon="vn:basketadd"
|
||||
color="primary"
|
||||
>
|
||||
<QTooltip>{{ t('Go to user') }}</QTooltip>
|
||||
<QTooltip>{{ t('globals.pageTitles.createOrder') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
v-if="entity.supplier"
|
||||
|
@ -219,14 +223,9 @@ en:
|
|||
unpaidDated: 'Date {dated}'
|
||||
unpaidAmount: 'Amount {amount}'
|
||||
es:
|
||||
Go to module index: Ir al índice del módulo
|
||||
Customer ticket list: Listado de tickets del cliente
|
||||
Customer invoice out list: Listado de facturas del cliente
|
||||
New order: Nuevo pedido
|
||||
New ticket: Nuevo ticket
|
||||
Go to user: Ir al usuario
|
||||
Go to supplier: Ir al proveedor
|
||||
Customer unpaid: Cliente impago
|
||||
Unpaid: Impagado
|
||||
unpaidDated: 'Fecha {dated}'
|
||||
unpaidAmount: 'Importe {amount}'
|
||||
|
|
|
@ -51,7 +51,6 @@ const openCreateForm = (type) => {
|
|||
};
|
||||
const clientFk = {
|
||||
ticket: 'clientId',
|
||||
order: 'clientFk',
|
||||
};
|
||||
const key = clientFk[type];
|
||||
if (!key) return;
|
||||
|
@ -70,11 +69,6 @@ const openCreateForm = (type) => {
|
|||
{{ t('globals.pageTitles.createTicket') }}
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-ripple clickable @click="openCreateForm('order')">
|
||||
<QItemSection>
|
||||
{{ t('globals.pageTitles.createOrder') }}
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-ripple clickable>
|
||||
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
||||
</QItem>
|
||||
|
|
|
@ -50,7 +50,8 @@ const filterClientFindOne = {
|
|||
>
|
||||
<template #form="{ data }">
|
||||
<VnRow>
|
||||
<QCheckbox :label="t('Unpaid client')" v-model="data.unpaid" />
|
||||
<QCheckbox :label="t('Unpaid client')" v-model="data.unpaid"
|
||||
data-cy="UnpaidCheckBox" />
|
||||
</VnRow>
|
||||
|
||||
<VnRow class="row q-gutter-md q-mb-md" v-show="data.unpaid">
|
||||
|
|
|
@ -408,7 +408,7 @@ function handleLocation(data, location) {
|
|||
order: ['id DESC'],
|
||||
}"
|
||||
>
|
||||
<template #rightMenu>
|
||||
<template #advanced-menu>
|
||||
<CustomerFilter data-key="CustomerList" />
|
||||
</template>
|
||||
<template #body>
|
||||
|
|
|
@ -11,14 +11,14 @@ import VnInput from 'src/components/common/VnInput.vue';
|
|||
import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue';
|
||||
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const dataRef = ref(null);
|
||||
|
||||
const balanceDueTotal = ref(0);
|
||||
const selected = ref([]);
|
||||
|
||||
const arrayData = useArrayData('CustomerDefaulter');
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -165,26 +165,37 @@ const viewAddObservation = (rowsSelected) => {
|
|||
});
|
||||
};
|
||||
|
||||
const onFetch = async (data) => {
|
||||
balanceDueTotal.value = data.reduce((acc, { amount = 0 }) => acc + amount, 0);
|
||||
};
|
||||
|
||||
function exprBuilder(param, value) {
|
||||
switch (param) {
|
||||
case 'clientFk':
|
||||
return { [`d.${param}`]: value };
|
||||
case 'creditInsurance':
|
||||
case 'amount':
|
||||
case 'workerFk':
|
||||
case 'departmentFk':
|
||||
case 'countryFk':
|
||||
case 'payMethod':
|
||||
case 'salesPersonFk':
|
||||
case 'creditInsurance':
|
||||
case 'countryFk':
|
||||
return { [`c.${param}`]: value };
|
||||
case 'payMethod':
|
||||
return { [`c.payMethodFk`]: value };
|
||||
case 'workerFk':
|
||||
return { [`co.${param}`]: value };
|
||||
case 'departmentFk':
|
||||
return { [`wd.${param}`]: value };
|
||||
case 'amount':
|
||||
case 'clientFk':
|
||||
return { [`d.${param}`]: value };
|
||||
case 'created':
|
||||
return { 'd.created': { between: dateRange(value) } };
|
||||
case 'defaulterSinced':
|
||||
return { 'd.defaulterSinced': { between: dateRange(value) } };
|
||||
case 'isWorker': {
|
||||
if (value == undefined) return;
|
||||
const search = value ? 'worker' : { neq: 'worker' };
|
||||
return { 'c.businessTypeFk': search };
|
||||
}
|
||||
case 'hasRecovery': {
|
||||
if (value == undefined) return;
|
||||
const search = value ? null : { neq: null };
|
||||
return { 'r.finished': search };
|
||||
}
|
||||
case 'observation':
|
||||
return { 'co.text': { like: `%${value}%` } };
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -192,7 +203,7 @@ function exprBuilder(param, value) {
|
|||
<template>
|
||||
<VnSubToolbar>
|
||||
<template #st-data>
|
||||
<CustomerBalanceDueTotal :amount="balanceDueTotal" />
|
||||
<CustomerBalanceDueTotal :amount="arrayData.store.data?.amount" />
|
||||
</template>
|
||||
<template #st-actions>
|
||||
<QBtn
|
||||
|
@ -211,8 +222,6 @@ function exprBuilder(param, value) {
|
|||
url="Defaulters/filter"
|
||||
:expr-builder="exprBuilder"
|
||||
:columns="columns"
|
||||
@on-fetch="onFetch"
|
||||
:use-model="true"
|
||||
:table="{
|
||||
'row-key': 'clientFk',
|
||||
selection: 'multiple',
|
||||
|
@ -221,6 +230,7 @@ function exprBuilder(param, value) {
|
|||
:disable-option="{ card: true }"
|
||||
auto-load
|
||||
:order="['amount DESC']"
|
||||
key-data="defaulters"
|
||||
>
|
||||
<template #column-clientFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { onBeforeMount, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { useQuasar } from 'quasar';
|
||||
import axios from 'axios';
|
||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
@ -13,11 +13,12 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
|||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||
import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const quasar = useQuasar();
|
||||
const urlUpdate = ref('');
|
||||
const agencyModes = ref([]);
|
||||
const incoterms = ref([]);
|
||||
|
@ -83,8 +84,26 @@ const deleteNote = (id, index) => {
|
|||
notes.value.splice(index, 1);
|
||||
};
|
||||
|
||||
const onDataSaved = async () => {
|
||||
let payload = {
|
||||
const updateAddress = async (data) => {
|
||||
await axios.patch(urlUpdate.value, data);
|
||||
};
|
||||
|
||||
const updateAddressTicket = async () => {
|
||||
urlUpdate.value += '?updateObservations=true';
|
||||
};
|
||||
|
||||
const updateObservations = async (payload) => {
|
||||
await axios.post('AddressObservations/crud', payload);
|
||||
notes.value = [];
|
||||
deletes.value = [];
|
||||
toCustomerAddress();
|
||||
};
|
||||
async function updateAll({ data, payload }) {
|
||||
await updateObservations(payload);
|
||||
await updateAddress(data);
|
||||
}
|
||||
function getPayload() {
|
||||
return {
|
||||
creates: notes.value.filter((note) => note.$isNew),
|
||||
deletes: deletes.value,
|
||||
updates: notes.value
|
||||
|
@ -101,14 +120,40 @@ const onDataSaved = async () => {
|
|||
where: { id: note.id },
|
||||
})),
|
||||
};
|
||||
}
|
||||
|
||||
await axios.post('AddressObservations/crud', payload);
|
||||
notes.value = [];
|
||||
deletes.value = [];
|
||||
async function handleDialog(data) {
|
||||
const payload = getPayload();
|
||||
const body = { data, payload };
|
||||
if (payload.updates.length) {
|
||||
quasar
|
||||
.dialog({
|
||||
component: VnConfirm,
|
||||
componentProps: {
|
||||
title: t(
|
||||
'confirmTicket'
|
||||
),
|
||||
message: t('confirmDeletionMessage'),
|
||||
},
|
||||
})
|
||||
.onOk(async () => {
|
||||
await updateAddressTicket();
|
||||
await updateAll(body);
|
||||
toCustomerAddress();
|
||||
};
|
||||
})
|
||||
.onCancel(async () => {
|
||||
await updateAll(body);
|
||||
toCustomerAddress();
|
||||
});
|
||||
} else {
|
||||
updateAll(body);
|
||||
toCustomerAddress();
|
||||
}
|
||||
}
|
||||
|
||||
const toCustomerAddress = () => {
|
||||
notes.value = [];
|
||||
deletes.value = [];
|
||||
router.push({
|
||||
name: 'CustomerAddress',
|
||||
params: {
|
||||
|
@ -143,7 +188,7 @@ function handleLocation(data, location) {
|
|||
:observe-form-changes="false"
|
||||
:url-update="urlUpdate"
|
||||
:url="`Addresses/${route.params.addressId}`"
|
||||
@on-data-saved="onDataSaved()"
|
||||
:save-fn="handleDialog"
|
||||
auto-load
|
||||
>
|
||||
<template #moreActions>
|
||||
|
@ -336,4 +381,9 @@ es:
|
|||
Remove note: Eliminar nota
|
||||
Longitude: Longitud
|
||||
Latitude: Latitud
|
||||
confirmTicket: ¿Desea modificar también los estados de todos los tickets que están a punto de ser servidos?
|
||||
confirmDeletionMessage: Si le das a aceptar, se modificaran todas las notas de los ticket a futuro
|
||||
en:
|
||||
confirmTicket: Do you also want to modify the states of all the tickets that are about to be served?
|
||||
confirmDeletionMessage: If you click accept, all the notes of the future tickets will be modified
|
||||
</i18n>
|
||||
|
|
|
@ -214,7 +214,7 @@ const toCustomerSamples = () => {
|
|||
<template #custom-buttons>
|
||||
<QBtn
|
||||
:disabled="isLoading || !sampleType?.hasPreview"
|
||||
:label="t('Preview')"
|
||||
:label="t('globals.preview')"
|
||||
:loading="isLoading"
|
||||
@click.stop="getPreview()"
|
||||
color="primary"
|
||||
|
@ -353,7 +353,6 @@ es:
|
|||
Its only used when sample is sent: Se utiliza únicamente cuando se envía la plantilla
|
||||
To who should the recipient replay?: ¿A quien debería responder el destinatario?
|
||||
Edit address: Editar dirección
|
||||
Preview: Vista previa
|
||||
Email cannot be blank: Debes introducir un email
|
||||
Choose a sample: Selecciona una plantilla
|
||||
Choose a company: Selecciona una empresa
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
import { describe, it, expect, vi, afterEach } from 'vitest';
|
||||
import axios from 'axios';
|
||||
import { getAddresses } from 'src/pages/Customer/composables/getAddresses';
|
||||
|
||||
vi.mock('axios');
|
||||
|
||||
describe('getAddresses', () => {
|
||||
afterEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
it('should fetch addresses with correct parameters for a valid clientId', async () => {
|
||||
const clientId = '12345';
|
||||
|
||||
await getAddresses(clientId);
|
||||
|
||||
expect(axios.get).toHaveBeenCalledWith(`Clients/${clientId}/addresses`, {
|
||||
params: {
|
||||
filter: JSON.stringify({
|
||||
fields: ['nickname', 'street', 'city', 'id'],
|
||||
where: { isActive: true },
|
||||
order: 'nickname ASC',
|
||||
}),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should return undefined when clientId is not provided', async () => {
|
||||
await getAddresses(undefined);
|
||||
|
||||
expect(axios.get).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,41 @@
|
|||
import { describe, it, expect, vi, afterEach } from 'vitest';
|
||||
import axios from 'axios';
|
||||
import { getClient } from 'src/pages/Customer/composables/getClient';
|
||||
|
||||
vi.mock('axios');
|
||||
|
||||
describe('getClient', () => {
|
||||
afterEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
const generateParams = (clientId) => ({
|
||||
params: {
|
||||
filter: JSON.stringify({
|
||||
include: {
|
||||
relation: 'defaultAddress',
|
||||
scope: {
|
||||
fields: ['id', 'agencyModeFk'],
|
||||
},
|
||||
},
|
||||
where: { id: clientId },
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
it('should fetch client data with correct parameters for a valid clientId', async () => {
|
||||
const clientId = '12345';
|
||||
|
||||
await getClient(clientId);
|
||||
|
||||
expect(axios.get).toHaveBeenCalledWith('Clients', generateParams(clientId));
|
||||
});
|
||||
|
||||
it('should return undefined when clientId is not provided', async () => {
|
||||
const clientId = undefined;
|
||||
|
||||
await getClient(clientId);
|
||||
|
||||
expect(axios.get).toHaveBeenCalledWith('Clients', generateParams(clientId));
|
||||
});
|
||||
});
|
|
@ -0,0 +1,14 @@
|
|||
import axios from 'axios';
|
||||
|
||||
export async function getAddresses(clientId) {
|
||||
if (!clientId) return;
|
||||
const filter = {
|
||||
fields: ['nickname', 'street', 'city', 'id'],
|
||||
where: { isActive: true },
|
||||
order: 'nickname ASC',
|
||||
};
|
||||
const params = { filter: JSON.stringify(filter) };
|
||||
return await axios.get(`Clients/${clientId}/addresses`, {
|
||||
params,
|
||||
});
|
||||
};
|
|
@ -0,0 +1,15 @@
|
|||
import axios from 'axios';
|
||||
|
||||
export async function getClient(clientId) {
|
||||
const filter = {
|
||||
include: {
|
||||
relation: 'defaultAddress',
|
||||
scope: {
|
||||
fields: ['id', 'agencyModeFk'],
|
||||
},
|
||||
},
|
||||
where: { id: clientId },
|
||||
};
|
||||
const params = { filter: JSON.stringify(filter) };
|
||||
return await axios.get('Clients', { params });
|
||||
};
|
|
@ -148,7 +148,7 @@ es:
|
|||
Supplier card: Ficha del proveedor
|
||||
All travels with current agency: Todos los envíos con la agencia actual
|
||||
All entries with current supplier: Todas las entradas con el proveedor actual
|
||||
Go to module index: Ir al índice del modulo
|
||||
Show entry report: Ver informe del pedido
|
||||
Inventory entry: Es inventario
|
||||
Virtual entry: Es una redada
|
||||
</i18n>
|
||||
|
|
|
@ -205,7 +205,7 @@ const columns = computed(() => [
|
|||
userFilter: entryFilter,
|
||||
}"
|
||||
>
|
||||
<template #rightMenu>
|
||||
<template #advanced-menu>
|
||||
<EntryFilter data-key="EntryList" />
|
||||
</template>
|
||||
<template #body>
|
||||
|
@ -231,7 +231,7 @@ const columns = computed(() => [
|
|||
>
|
||||
<QTooltip>{{
|
||||
t(
|
||||
'entry.list.tableVisibleColumns.isExcludedFromAvailable'
|
||||
'entry.list.tableVisibleColumns.isExcludedFromAvailable',
|
||||
)
|
||||
}}</QTooltip>
|
||||
</QIcon>
|
||||
|
|
|
@ -268,7 +268,7 @@ function deleteFile(dmsFk) {
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('invoicein.summary.sage')"
|
||||
:label="t('invoiceIn.summary.sage')"
|
||||
v-model="data.withholdingSageFk"
|
||||
:options="sageWithholdings"
|
||||
option-value="id"
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import InvoiceInDescriptor from './InvoiceInDescriptor.vue';
|
||||
import InvoiceInFilter from '../InvoiceInFilter.vue';
|
||||
import InvoiceInSearchbar from '../InvoiceInSearchbar.vue';
|
||||
import { onBeforeRouteUpdate } from 'vue-router';
|
||||
import { setRectificative } from '../composables/setRectificative';
|
||||
|
||||
const filter = {
|
||||
include: [
|
||||
|
@ -39,20 +35,13 @@ const filter = {
|
|||
},
|
||||
],
|
||||
};
|
||||
|
||||
onBeforeRouteUpdate(async (to) => await setRectificative(to));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="InvoiceIn"
|
||||
base-url="InvoiceIns"
|
||||
:filter="filter"
|
||||
:descriptor="InvoiceInDescriptor"
|
||||
:filter-panel="InvoiceInFilter"
|
||||
search-data-key="InvoiceInList"
|
||||
>
|
||||
<template #searchbar>
|
||||
<InvoiceInSearchbar />
|
||||
</template>
|
||||
</VnCard>
|
||||
:user-filter="filter"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -105,7 +105,7 @@ async function setInvoiceCorrection(id) {
|
|||
if (correctingData[0]) invoiceInCorrection.corrected = correctingData[0].correctedFk;
|
||||
|
||||
invoiceInCorrection.correcting = correctedData.map(
|
||||
(corrected) => corrected.correctingFk
|
||||
(corrected) => corrected.correctingFk,
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
@ -123,13 +123,13 @@ async function setInvoiceCorrection(id) {
|
|||
<InvoiceInDescriptorMenu :invoice="entity" />
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('invoicein.list.issued')" :value="toDate(entity.issued)" />
|
||||
<VnLv :label="t('invoiceIn.list.issued')" :value="toDate(entity.issued)" />
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.bookedDate')"
|
||||
:label="t('invoiceIn.summary.bookedDate')"
|
||||
:value="toDate(entity.booked)"
|
||||
/>
|
||||
<VnLv :label="t('invoicein.list.amount')" :value="toCurrency(totalAmount)" />
|
||||
<VnLv :label="t('invoicein.list.supplier')">
|
||||
<VnLv :label="t('invoiceIn.list.amount')" :value="toCurrency(totalAmount)" />
|
||||
<VnLv :label="t('invoiceIn.list.supplier')">
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{ entity?.supplier?.nickname }}
|
||||
|
@ -146,7 +146,7 @@ async function setInvoiceCorrection(id) {
|
|||
color="primary"
|
||||
:to="routes.getSupplier(entity.supplierFk)"
|
||||
>
|
||||
<QTooltip>{{ t('invoicein.list.supplier') }}</QTooltip>
|
||||
<QTooltip>{{ t('globals.supplier') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
size="md"
|
||||
|
@ -154,7 +154,7 @@ async function setInvoiceCorrection(id) {
|
|||
color="primary"
|
||||
:to="routes.getEntry(entity.entryFk)"
|
||||
>
|
||||
<QTooltip>{{ t('Entry') }}</QTooltip>
|
||||
<QTooltip>{{ t('globals.entry') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
size="md"
|
||||
|
@ -162,7 +162,7 @@ async function setInvoiceCorrection(id) {
|
|||
color="primary"
|
||||
:to="routes.getTickets(entity.supplierFk)"
|
||||
>
|
||||
<QTooltip>{{ t('InvoiceOut.card.ticketList') }}</QTooltip>
|
||||
<QTooltip>{{ t('globals.ticketList') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
v-if="
|
||||
|
|
|
@ -40,15 +40,15 @@ const cplusRectificationTypes = ref([]);
|
|||
const siiTypeInvoiceIns = ref([]);
|
||||
const actions = {
|
||||
unbook: {
|
||||
title: t('assertAction', { action: t('invoicein.descriptorMenu.unbook') }),
|
||||
title: t('assertAction', { action: t('invoiceIn.descriptorMenu.unbook') }),
|
||||
action: toUnbook,
|
||||
},
|
||||
delete: {
|
||||
title: t('assertAction', { action: t('invoicein.descriptorMenu.delete') }),
|
||||
title: t('assertAction', { action: t('invoiceIn.descriptorMenu.delete') }),
|
||||
action: deleteInvoice,
|
||||
},
|
||||
clone: {
|
||||
title: t('assertAction', { action: t('invoicein.descriptorMenu.clone') }),
|
||||
title: t('assertAction', { action: t('invoiceIn.descriptorMenu.clone') }),
|
||||
action: cloneInvoice,
|
||||
},
|
||||
showPdf: { cb: showPdfInvoice },
|
||||
|
@ -96,7 +96,7 @@ async function deleteInvoice() {
|
|||
await axios.delete(`InvoiceIns/${entityId.value}`);
|
||||
quasar.notify({
|
||||
type: 'positive',
|
||||
message: t('invoicein.descriptorMenu.invoiceDeleted'),
|
||||
message: t('invoiceIn.descriptorMenu.invoiceDeleted'),
|
||||
});
|
||||
push({ path: '/invoice-in' });
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ async function cloneInvoice() {
|
|||
const { data } = await axios.post(`InvoiceIns/${entityId.value}/clone`);
|
||||
quasar.notify({
|
||||
type: 'positive',
|
||||
message: t('invoicein.descriptorMenu.invoiceCloned'),
|
||||
message: t('invoiceIn.descriptorMenu.invoiceCloned'),
|
||||
});
|
||||
push({ path: `/invoice-in/${data.id}/summary` });
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ function sendPdfInvoice({ address }) {
|
|||
const createInvoiceInCorrection = async () => {
|
||||
const { data: correctingId } = await axios.post(
|
||||
'InvoiceIns/corrective',
|
||||
Object.assign(correctionFormData, { id: entityId.value })
|
||||
Object.assign(correctionFormData, { id: entityId.value }),
|
||||
);
|
||||
push({ path: `/invoice-in/${correctingId}/summary` });
|
||||
};
|
||||
|
@ -186,7 +186,7 @@ const createInvoiceInCorrection = async () => {
|
|||
clickable
|
||||
@click="book(entityId)"
|
||||
>
|
||||
<QItemSection>{{ t('invoicein.descriptorMenu.toBook') }}</QItemSection>
|
||||
<QItemSection>{{ t('invoiceIn.descriptorMenu.toBook') }}</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</InvoiceInToBook>
|
||||
|
@ -197,7 +197,7 @@ const createInvoiceInCorrection = async () => {
|
|||
@click="triggerMenu('unbook')"
|
||||
>
|
||||
<QItemSection>
|
||||
{{ t('invoicein.descriptorMenu.toUnbook') }}
|
||||
{{ t('invoiceIn.descriptorMenu.toUnbook') }}
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem
|
||||
|
@ -206,19 +206,19 @@ const createInvoiceInCorrection = async () => {
|
|||
clickable
|
||||
@click="triggerMenu('delete')"
|
||||
>
|
||||
<QItemSection>{{ t('invoicein.descriptorMenu.deleteInvoice') }}</QItemSection>
|
||||
<QItemSection>{{ t('invoiceIn.descriptorMenu.deleteInvoice') }}</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-if="canEditProp('clone')" v-ripple clickable @click="triggerMenu('clone')">
|
||||
<QItemSection>{{ t('invoicein.descriptorMenu.cloneInvoice') }}</QItemSection>
|
||||
<QItemSection>{{ t('invoiceIn.descriptorMenu.cloneInvoice') }}</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-if="isAgricultural()" v-ripple clickable @click="triggerMenu('showPdf')">
|
||||
<QItemSection>{{
|
||||
t('invoicein.descriptorMenu.showAgriculturalPdf')
|
||||
t('invoiceIn.descriptorMenu.showAgriculturalPdf')
|
||||
}}</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-if="isAgricultural()" v-ripple clickable @click="triggerMenu('sendPdf')">
|
||||
<QItemSection
|
||||
>{{ t('invoicein.descriptorMenu.sendAgriculturalPdf') }}...</QItemSection
|
||||
>{{ t('invoiceIn.descriptorMenu.sendAgriculturalPdf') }}...</QItemSection
|
||||
>
|
||||
</QItem>
|
||||
<QItem
|
||||
|
@ -228,7 +228,7 @@ const createInvoiceInCorrection = async () => {
|
|||
@click="triggerMenu('correct')"
|
||||
>
|
||||
<QItemSection
|
||||
>{{ t('invoicein.descriptorMenu.createCorrective') }}...</QItemSection
|
||||
>{{ t('invoiceIn.descriptorMenu.createCorrective') }}...</QItemSection
|
||||
>
|
||||
</QItem>
|
||||
<QItem v-if="invoice.dmsFk" v-ripple clickable @click="downloadFile(invoice.dmsFk)">
|
||||
|
@ -272,7 +272,6 @@ const createInvoiceInCorrection = async () => {
|
|||
>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
{{ console.log('opt: ', opt) }}
|
||||
<QItemSection>
|
||||
<QItemLabel
|
||||
>{{ opt.id }} -
|
||||
|
|
|
@ -27,14 +27,14 @@ const intrastatTotals = ref({ amount: 0, net: 0, stems: 0 });
|
|||
const vatColumns = ref([
|
||||
{
|
||||
name: 'expense',
|
||||
label: 'invoicein.summary.expense',
|
||||
label: 'invoiceIn.summary.expense',
|
||||
field: (row) => row.expenseFk,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'landed',
|
||||
label: 'invoicein.summary.taxableBase',
|
||||
label: 'invoiceIn.summary.taxableBase',
|
||||
field: (row) => row.taxableBase,
|
||||
format: (value) => toCurrency(value),
|
||||
sortable: true,
|
||||
|
@ -42,7 +42,7 @@ const vatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'vat',
|
||||
label: 'invoicein.summary.sageVat',
|
||||
label: 'invoiceIn.summary.sageVat',
|
||||
field: (row) => {
|
||||
if (row.taxTypeSage) return `#${row.taxTypeSage.id} : ${row.taxTypeSage.vat}`;
|
||||
},
|
||||
|
@ -52,7 +52,7 @@ const vatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'transaction',
|
||||
label: 'invoicein.summary.sageTransaction',
|
||||
label: 'invoiceIn.summary.sageTransaction',
|
||||
field: (row) => {
|
||||
if (row.transactionTypeSage)
|
||||
return `#${row.transactionTypeSage.id} : ${row.transactionTypeSage?.transaction}`;
|
||||
|
@ -63,7 +63,7 @@ const vatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'rate',
|
||||
label: 'invoicein.summary.rate',
|
||||
label: 'invoiceIn.summary.rate',
|
||||
field: (row) => taxRate(row.taxableBase, row.taxTypeSage?.rate),
|
||||
format: (value) => toCurrency(value),
|
||||
sortable: true,
|
||||
|
@ -71,7 +71,7 @@ const vatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'currency',
|
||||
label: 'invoicein.summary.currency',
|
||||
label: 'invoiceIn.summary.currency',
|
||||
field: (row) => row.foreignValue,
|
||||
format: (val) => val && toCurrency(val, currency.value),
|
||||
sortable: true,
|
||||
|
@ -82,21 +82,21 @@ const vatColumns = ref([
|
|||
const dueDayColumns = ref([
|
||||
{
|
||||
name: 'date',
|
||||
label: 'invoicein.summary.dueDay',
|
||||
label: 'invoiceIn.summary.dueDay',
|
||||
field: (row) => toDate(row.dueDated),
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'bank',
|
||||
label: 'invoicein.summary.bank',
|
||||
label: 'invoiceIn.summary.bank',
|
||||
field: (row) => row.bank.bank,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'amount',
|
||||
label: 'invoicein.list.amount',
|
||||
label: 'invoiceIn.list.amount',
|
||||
field: (row) => row.amount,
|
||||
format: (value) => toCurrency(value),
|
||||
sortable: true,
|
||||
|
@ -104,7 +104,7 @@ const dueDayColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'landed',
|
||||
label: 'invoicein.summary.foreignValue',
|
||||
label: 'invoiceIn.summary.foreignValue',
|
||||
field: (row) => row.foreignValue,
|
||||
format: (val) => val && toCurrency(val, currency.value),
|
||||
sortable: true,
|
||||
|
@ -115,7 +115,7 @@ const dueDayColumns = ref([
|
|||
const intrastatColumns = ref([
|
||||
{
|
||||
name: 'code',
|
||||
label: 'invoicein.summary.code',
|
||||
label: 'invoiceIn.summary.code',
|
||||
field: (row) => {
|
||||
return `${row.intrastat.id}: ${row.intrastat?.description}`;
|
||||
},
|
||||
|
@ -124,21 +124,21 @@ const intrastatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'amount',
|
||||
label: 'invoicein.list.amount',
|
||||
label: 'invoiceIn.list.amount',
|
||||
field: (row) => toCurrency(row.amount),
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'net',
|
||||
label: 'invoicein.summary.net',
|
||||
label: 'invoiceIn.summary.net',
|
||||
field: (row) => row.net,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'stems',
|
||||
label: 'invoicein.summary.stems',
|
||||
label: 'invoiceIn.summary.stems',
|
||||
field: (row) => row.stems,
|
||||
format: (value) => value,
|
||||
sortable: true,
|
||||
|
@ -146,7 +146,7 @@ const intrastatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'landed',
|
||||
label: 'invoicein.summary.country',
|
||||
label: 'invoiceIn.summary.country',
|
||||
field: (row) => row.country?.code,
|
||||
format: (value) => value,
|
||||
sortable: true,
|
||||
|
@ -214,7 +214,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
:label="t('invoicein.list.supplier')"
|
||||
:label="t('invoiceIn.list.supplier')"
|
||||
:value="entity.supplier?.name"
|
||||
>
|
||||
<template #value>
|
||||
|
@ -225,14 +225,14 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('invoicein.list.supplierRef')"
|
||||
:label="t('invoiceIn.list.supplierRef')"
|
||||
:value="entity.supplierRef"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.currency')"
|
||||
:label="t('invoiceIn.summary.currency')"
|
||||
:value="entity.currency?.code"
|
||||
/>
|
||||
<VnLv :label="t('invoicein.serial')" :value="`${entity.serial}`" />
|
||||
<VnLv :label="t('invoiceIn.serial')" :value="`${entity.serial}`" />
|
||||
<VnLv
|
||||
:label="t('globals.country')"
|
||||
:value="entity.supplier?.country?.code"
|
||||
|
@ -247,19 +247,19 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</QCardSection>
|
||||
<VnLv
|
||||
:ellipsis-value="false"
|
||||
:label="t('invoicein.summary.issued')"
|
||||
:label="t('invoiceIn.summary.issued')"
|
||||
:value="toDate(entity.issued)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.operated')"
|
||||
:label="t('invoiceIn.summary.operated')"
|
||||
:value="toDate(entity.operated)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.bookEntried')"
|
||||
:label="t('invoiceIn.summary.bookEntried')"
|
||||
:value="toDate(entity.bookEntried)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.bookedDate')"
|
||||
:label="t('invoiceIn.summary.bookedDate')"
|
||||
:value="toDate(entity.booked)"
|
||||
/>
|
||||
<VnLv :label="t('globals.isVies')" :value="entity.supplier?.isVies" />
|
||||
|
@ -272,18 +272,18 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.sage')"
|
||||
:label="t('invoiceIn.summary.sage')"
|
||||
:value="entity.sageWithholding?.withholding"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.vat')"
|
||||
:label="t('invoiceIn.summary.vat')"
|
||||
:value="entity.expenseDeductible?.name"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.card.company')"
|
||||
:label="t('invoiceIn.card.company')"
|
||||
:value="entity.company?.code"
|
||||
/>
|
||||
<VnLv :label="t('invoicein.isBooked')" :value="invoiceIn?.isBooked" />
|
||||
<VnLv :label="t('invoiceIn.isBooked')" :value="invoiceIn?.isBooked" />
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
|
@ -294,11 +294,11 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</QCardSection>
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.taxableBase')"
|
||||
:label="t('invoiceIn.summary.taxableBase')"
|
||||
:value="toCurrency(entity.totals.totalTaxableBase)"
|
||||
/>
|
||||
<VnLv label="Total" :value="toCurrency(entity.totals.totalVat)" />
|
||||
<VnLv :label="t('invoicein.summary.dueTotal')">
|
||||
<VnLv :label="t('invoiceIn.summary.dueTotal')">
|
||||
<template #value>
|
||||
<QChip
|
||||
dense
|
||||
|
@ -306,8 +306,8 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
:color="amountsNotMatch ? 'negative' : 'transparent'"
|
||||
:title="
|
||||
amountsNotMatch
|
||||
? t('invoicein.summary.noMatch')
|
||||
: t('invoicein.summary.dueTotal')
|
||||
? t('invoiceIn.summary.noMatch')
|
||||
: t('invoiceIn.summary.dueTotal')
|
||||
"
|
||||
>
|
||||
{{ toCurrency(entity.totals.totalDueDay) }}
|
||||
|
@ -318,7 +318,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</QCard>
|
||||
<!--Vat-->
|
||||
<QCard v-if="entity.invoiceInTax.length" class="vat">
|
||||
<VnTitle :url="getLink('vat')" :text="t('invoicein.card.vat')" />
|
||||
<VnTitle :url="getLink('vat')" :text="t('invoiceIn.card.vat')" />
|
||||
<QTable
|
||||
:columns="vatColumns"
|
||||
:rows="entity.invoiceInTax"
|
||||
|
@ -366,7 +366,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</QCard>
|
||||
<!--Due Day-->
|
||||
<QCard v-if="entity.invoiceInDueDay.length" class="due-day">
|
||||
<VnTitle :url="getLink('due-day')" :text="t('invoicein.card.dueDay')" />
|
||||
<VnTitle :url="getLink('due-day')" :text="t('invoiceIn.card.dueDay')" />
|
||||
<QTable :columns="dueDayColumns" :rows="entity.invoiceInDueDay" flat>
|
||||
<template #header="dueDayProps">
|
||||
<QTr :props="dueDayProps" class="bg">
|
||||
|
@ -404,7 +404,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
<QCard v-if="entity.invoiceInIntrastat.length">
|
||||
<VnTitle
|
||||
:url="getLink('intrastat')"
|
||||
:text="t('invoicein.card.intrastat')"
|
||||
:text="t('invoiceIn.card.intrastat')"
|
||||
/>
|
||||
<QTable
|
||||
:columns="intrastatColumns"
|
||||
|
|
|
@ -83,7 +83,7 @@ const redirectToInvoiceInBasicData = (__, { id }) => {
|
|||
</template>
|
||||
</VnSelect>
|
||||
<VnInput
|
||||
:label="t('invoicein.list.supplierRef')"
|
||||
:label="t('invoiceIn.list.supplierRef')"
|
||||
v-model="data.supplierRef"
|
||||
/>
|
||||
</VnRow>
|
||||
|
@ -97,10 +97,10 @@ const redirectToInvoiceInBasicData = (__, { id }) => {
|
|||
map-options
|
||||
hide-selected
|
||||
:required="true"
|
||||
:rules="validate('invoicein.companyFk')"
|
||||
:rules="validate('invoiceIn.companyFk')"
|
||||
/>
|
||||
<VnInputDate
|
||||
:label="t('invoicein.summary.issued')"
|
||||
:label="t('invoiceIn.summary.issued')"
|
||||
v-model="data.issued"
|
||||
/>
|
||||
</VnRow>
|
||||
|
|
|
@ -164,7 +164,7 @@ function handleDaysAgo(params, daysAgo) {
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="$t('invoicein.isBooked')"
|
||||
:label="$t('invoiceIn.isBooked')"
|
||||
v-model="params.isBooked"
|
||||
@update:model-value="searchFn()"
|
||||
toggle-indeterminate
|
||||
|
|
|
@ -8,17 +8,17 @@ import InvoiceInFilter from './InvoiceInFilter.vue';
|
|||
import InvoiceInSummary from './Card/InvoiceInSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import InvoiceInSearchbar from 'src/pages/InvoiceIn/InvoiceInSearchbar.vue';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const user = useState().getUser();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const { t } = useI18n();
|
||||
const dataKey = 'InvoiceInList';
|
||||
|
||||
const tableRef = ref();
|
||||
const companies = ref([]);
|
||||
|
@ -26,7 +26,7 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'isBooked',
|
||||
label: t('invoicein.isBooked'),
|
||||
label: t('invoiceIn.isBooked'),
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'supplierFk',
|
||||
label: t('invoicein.list.supplier'),
|
||||
label: t('invoiceIn.list.supplier'),
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
attrs: {
|
||||
|
@ -55,16 +55,16 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'supplierRef',
|
||||
label: t('invoicein.list.supplierRef'),
|
||||
label: t('invoiceIn.list.supplierRef'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'serial',
|
||||
label: t('invoicein.serial'),
|
||||
label: t('invoiceIn.serial'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('invoicein.list.issued'),
|
||||
label: t('invoiceIn.list.issued'),
|
||||
name: 'issued',
|
||||
component: null,
|
||||
columnFilter: {
|
||||
|
@ -74,7 +74,7 @@ const cols = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('invoicein.list.dueDated'),
|
||||
label: t('invoiceIn.list.dueDated'),
|
||||
name: 'dueDated',
|
||||
component: null,
|
||||
columnFilter: {
|
||||
|
@ -86,12 +86,12 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'awbCode',
|
||||
label: t('invoicein.list.awb'),
|
||||
label: t('invoiceIn.list.awb'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'amount',
|
||||
label: t('invoicein.list.amount'),
|
||||
label: t('invoiceIn.list.amount'),
|
||||
format: ({ amount }) => toCurrency(amount),
|
||||
cardVisible: true,
|
||||
},
|
||||
|
@ -130,19 +130,25 @@ const cols = computed(() => [
|
|||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData url="Companies" @on-fetch="(data) => (companies = data)" auto-load />
|
||||
<InvoiceInSearchbar />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<InvoiceInFilter data-key="InvoiceInList" />
|
||||
<VnSection
|
||||
:data-key
|
||||
:columns="cols"
|
||||
prefix="invoiceIn"
|
||||
:array-data-props="{
|
||||
url: 'InvoiceIns/filter',
|
||||
order: ['issued DESC', 'id DESC'],
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<InvoiceInFilter :data-key />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="InvoiceInList"
|
||||
url="InvoiceIns/filter"
|
||||
:order="['issued DESC', 'id DESC']"
|
||||
:data-key
|
||||
:create="{
|
||||
urlCreate: 'InvoiceIns',
|
||||
title: t('globals.createInvoiceIn'),
|
||||
|
@ -165,7 +171,7 @@ const cols = computed(() => [
|
|||
<VnSelect
|
||||
v-model="data.supplierFk"
|
||||
url="Suppliers"
|
||||
:fields="['id', 'nickname', 'name']"
|
||||
:fields="['id', 'name', 'nickname']"
|
||||
:label="t('globals.supplier')"
|
||||
option-value="id"
|
||||
option-label="nickname"
|
||||
|
@ -176,13 +182,15 @@ const cols = computed(() => [
|
|||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.nickname }}</QItemLabel>
|
||||
<QItemLabel caption> #{{ scope.opt?.id }}, {{ scope.opt?.name }} </QItemLabel>
|
||||
<QItemLabel caption>
|
||||
#{{ scope.opt?.id }}, {{ scope.opt?.name }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<VnInput
|
||||
:label="t('invoicein.list.supplierRef')"
|
||||
:label="t('invoiceIn.list.supplierRef')"
|
||||
v-model="data.supplierRef"
|
||||
/>
|
||||
<VnSelect
|
||||
|
@ -194,7 +202,12 @@ const cols = computed(() => [
|
|||
option-label="code"
|
||||
:required="true"
|
||||
/>
|
||||
<VnInputDate :label="t('invoicein.summary.issued')" v-model="data.issued" />
|
||||
<VnInputDate
|
||||
:label="t('invoiceIn.summary.issued')"
|
||||
v-model="data.issued"
|
||||
/>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<script setup>
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="InvoiceInList"
|
||||
:label="t('Search invoice')"
|
||||
:info="t('Search invoices in by id or supplier fiscal name')"
|
||||
url="InvoiceIns/filter"
|
||||
/>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
Search invoice: Buscar factura recibida
|
||||
Search invoices in by id or supplier fiscal name: Buscar facturas recibidas por id o por nombre fiscal del proveedor
|
||||
</i18n>
|
|
@ -1,4 +1,6 @@
|
|||
invoicein:
|
||||
invoiceIn:
|
||||
search: Search invoice
|
||||
searchInfo: Search incoming invoices by ID or supplier fiscal name
|
||||
serial: Serial
|
||||
isBooked: Is booked
|
||||
list:
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
invoicein:
|
||||
invoiceIn:
|
||||
search: Buscar factura recibida
|
||||
searchInfo: Buscar facturas recibidas por ID o nombre fiscal del proveedor
|
||||
serial: Serie
|
||||
isBooked: Contabilizada
|
||||
list:
|
||||
|
@ -63,6 +65,7 @@ invoicein:
|
|||
params:
|
||||
search: Id o nombre proveedor
|
||||
correctedFk: Rectificada
|
||||
isBooked: Contabilizada
|
||||
account: Cuenta contable
|
||||
correctingFk: Rectificativa
|
||||
|
||||
|
|
|
@ -1,19 +1,11 @@
|
|||
<script setup>
|
||||
import InvoiceOutDescriptor from './InvoiceOutDescriptor.vue';
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import InvoiceOutFilter from '../InvoiceOutFilter.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="InvoiceOut"
|
||||
base-url="InvoiceOuts"
|
||||
:descriptor="InvoiceOutDescriptor"
|
||||
:filter-panel="InvoiceOutFilter"
|
||||
search-data-key="InvoiceOutList"
|
||||
:searchbar-props="{
|
||||
url: 'InvoiceOuts/filter',
|
||||
label: 'Search invoice',
|
||||
info: 'You can search by invoice reference',
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ref, computed, watchEffect } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import { usePrintService } from 'src/composables/usePrintService';
|
||||
|
@ -12,12 +11,12 @@ import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
|
|||
import { toCurrency, toDate } from 'src/filters/index';
|
||||
import { QBtn } from 'quasar';
|
||||
import axios from 'axios';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import InvoiceOutFilter from './InvoiceOutFilter.vue';
|
||||
import VnRow from 'src/components/ui/VnRow.vue';
|
||||
import VnRadio from 'src/components/common/VnRadio.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
|
@ -30,9 +29,11 @@ const MODEL = 'InvoiceOuts';
|
|||
const { openReport } = usePrintService();
|
||||
const addressOptions = ref([]);
|
||||
const selectedOption = ref('ticket');
|
||||
const dataKey = 'InvoiceOutList';
|
||||
|
||||
async function fetchClientAddress(id) {
|
||||
const { data } = await axios.get(
|
||||
`Clients/${id}/addresses?filter[order]=isActive DESC`
|
||||
`Clients/${id}/addresses?filter[order]=isActive DESC`,
|
||||
);
|
||||
addressOptions.value = data;
|
||||
}
|
||||
|
@ -180,16 +181,19 @@ watchEffect(selectedRows);
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
:info="t('youCanSearchByInvoiceReference')"
|
||||
:label="t('Search invoice')"
|
||||
data-key="invoiceOutList"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<InvoiceOutFilter data-key="invoiceOutList" />
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="invoiceOut"
|
||||
:array-data-props="{
|
||||
url: 'InvoiceOuts/filter',
|
||||
order: ['id DESC'],
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<InvoiceOutFilter data-key="InvoiceOutList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<VnSubToolbar>
|
||||
<template #st-actions>
|
||||
<QBtn
|
||||
|
@ -199,14 +203,13 @@ watchEffect(selectedRows);
|
|||
:disable="!hasSelectedCards"
|
||||
data-cy="InvoiceOutDownloadPdfBtn"
|
||||
>
|
||||
<QTooltip>{{ t('downloadPdf') }}</QTooltip>
|
||||
<QTooltip>{{ t('globals.downloadPdf') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="invoiceOutList"
|
||||
:url="`${MODEL}/filter`"
|
||||
:data-key="dataKey"
|
||||
:create="{
|
||||
urlCreate: 'InvoiceOuts/createManualInvoice',
|
||||
title: t('createManualInvoice'),
|
||||
|
@ -215,7 +218,6 @@ watchEffect(selectedRows);
|
|||
}"
|
||||
:right-search="false"
|
||||
v-model:selected="selectedRows"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="invoice-out"
|
||||
:table="{
|
||||
|
@ -293,13 +295,17 @@ watchEffect(selectedRows);
|
|||
<QItemLabel
|
||||
:class="{
|
||||
'color-vn-label':
|
||||
!scope.opt?.isActive,
|
||||
!scope.opt
|
||||
?.isActive,
|
||||
}"
|
||||
>
|
||||
{{
|
||||
`${
|
||||
!scope.opt?.isActive
|
||||
? t('inactive')
|
||||
!scope.opt
|
||||
?.isActive
|
||||
? t(
|
||||
'inactive',
|
||||
)
|
||||
: ''
|
||||
} `
|
||||
}}
|
||||
|
@ -308,19 +314,26 @@ watchEffect(selectedRows);
|
|||
}}</span>
|
||||
<span
|
||||
v-if="
|
||||
scope.opt?.province ||
|
||||
scope.opt
|
||||
?.province ||
|
||||
scope.opt?.city ||
|
||||
scope.opt?.street
|
||||
"
|
||||
>
|
||||
, {{ scope.opt?.street }},
|
||||
,
|
||||
{{
|
||||
scope.opt?.street
|
||||
}},
|
||||
{{ scope.opt?.city }},
|
||||
{{
|
||||
scope.opt?.province?.name
|
||||
scope.opt
|
||||
?.province
|
||||
?.name
|
||||
}}
|
||||
-
|
||||
{{
|
||||
scope.opt?.agencyMode
|
||||
scope.opt
|
||||
?.agencyMode
|
||||
?.name
|
||||
}}
|
||||
</span>
|
||||
|
@ -383,7 +396,9 @@ watchEffect(selectedRows);
|
|||
<VnSelect
|
||||
url="TaxAreas"
|
||||
v-model="data.taxArea"
|
||||
:label="t('invoiceOutList.tableVisibleColumns.taxArea')"
|
||||
:label="
|
||||
t('invoiceOutList.tableVisibleColumns.taxArea')
|
||||
"
|
||||
:options="taxAreasOptions"
|
||||
option-label="code"
|
||||
option-value="code"
|
||||
|
@ -397,6 +412,8 @@ watchEffect(selectedRows);
|
|||
</div>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -39,7 +39,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'country',
|
||||
label: t('negativeBases.country'),
|
||||
label: t('invoiceOut.negativeBases.country'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Countries',
|
||||
|
@ -53,7 +53,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'clientId',
|
||||
label: t('negativeBases.clientId'),
|
||||
label: t('invoiceOut.negativeBases.clientId'),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
|
@ -85,28 +85,28 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'taxableBase',
|
||||
label: t('negativeBases.base'),
|
||||
label: t('invoiceOut.negativeBases.base'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'ticketFk',
|
||||
label: t('negativeBases.ticketId'),
|
||||
label: t('invoiceOut.negativeBases.ticketId'),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'isActive',
|
||||
label: t('negativeBases.active'),
|
||||
label: t('invoiceOut.negativeBases.active'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'hasToInvoice',
|
||||
label: t('negativeBases.hasToInvoice'),
|
||||
label: t('invoiceOut.negativeBases.hasToInvoice'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'hasVerifiedData',
|
||||
label: t('negativeBases.verifiedData'),
|
||||
label: t('invoiceOut.negativeBases.verifiedData'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
|
|
@ -105,28 +105,3 @@ const props = defineProps({
|
|||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
from: From
|
||||
to: To
|
||||
company: Company
|
||||
country: Country
|
||||
clientId: Client Id
|
||||
clientSocialName: Client
|
||||
amount: Amount
|
||||
comercialName: Comercial
|
||||
es:
|
||||
params:
|
||||
from: Desde
|
||||
to: Hasta
|
||||
company: Empresa
|
||||
country: País
|
||||
clientId: Id cliente
|
||||
clientSocialName: Cliente
|
||||
amount: Importe
|
||||
comercialName: Comercial
|
||||
Date is required: La fecha es requerida
|
||||
|
||||
</i18n>
|
||||
|
|
|
@ -1,3 +1,60 @@
|
|||
invoiceOut:
|
||||
search: Search invoice
|
||||
searchInfo: You can search by invoice reference
|
||||
params:
|
||||
company: Company
|
||||
country: Country
|
||||
clientId: Client ID
|
||||
clientSocialName: Client
|
||||
taxableBase: Base
|
||||
ticketFk: Ticket
|
||||
isActive: Active
|
||||
hasToInvoice: Has to invoice
|
||||
hasVerifiedData: Verified data
|
||||
workerName: Worker
|
||||
card:
|
||||
issued: Issued
|
||||
customerCard: Customer card
|
||||
ticketList: Ticket List
|
||||
summary:
|
||||
issued: Issued
|
||||
dued: Due
|
||||
booked: Booked
|
||||
taxBreakdown: Tax breakdown
|
||||
taxableBase: Taxable base
|
||||
rate: Rate
|
||||
fee: Fee
|
||||
tickets: Tickets
|
||||
totalWithVat: Amount
|
||||
globalInvoices:
|
||||
errors:
|
||||
chooseValidClient: Choose a valid client
|
||||
chooseValidCompany: Choose a valid company
|
||||
chooseValidPrinter: Choose a valid printer
|
||||
chooseValidSerialType: Choose a serial type
|
||||
fillDates: Invoice date and the max date should be filled
|
||||
invoiceDateLessThanMaxDate: Invoice date can not be less than max date
|
||||
invoiceWithFutureDate: Exists an invoice with a future date
|
||||
noTicketsToInvoice: There are not tickets to invoice
|
||||
criticalInvoiceError: 'Critical invoicing error, process stopped'
|
||||
invalidSerialTypeForAll: The serial type must be global when invoicing all clients
|
||||
table:
|
||||
addressId: Address id
|
||||
streetAddress: Street
|
||||
statusCard:
|
||||
percentageText: '{getPercentage}% {getAddressNumber} of {getNAddresses}'
|
||||
pdfsNumberText: '{nPdfs} of {totalPdfs} PDFs'
|
||||
negativeBases:
|
||||
country: Country
|
||||
clientId: Client Id
|
||||
base: Base
|
||||
ticketId: Ticket
|
||||
active: Active
|
||||
hasToInvoice: Has to Invoice
|
||||
verifiedData: Verified Data
|
||||
comercial: Commercial
|
||||
errors:
|
||||
downloadCsvFailed: CSV download failed
|
||||
invoiceOutModule:
|
||||
customer: Client
|
||||
amount: Amount
|
||||
|
@ -14,26 +71,3 @@ invoiceOutList:
|
|||
ticket: Ticket
|
||||
taxArea: Tax area
|
||||
customsAgent: Custom Agent
|
||||
DownloadPdf: Download PDF
|
||||
InvoiceOutSummary: Summary
|
||||
negativeBases:
|
||||
country: Country
|
||||
clientId: Client ID
|
||||
base: Base
|
||||
ticketId: Ticket
|
||||
active: Active
|
||||
hasToInvoice: Has to invoice
|
||||
verifiedData: Verified data
|
||||
commercial: Commercial
|
||||
invoiceout:
|
||||
params:
|
||||
company: Company
|
||||
country: Country
|
||||
clientId: Client ID
|
||||
clientSocialName: Client
|
||||
taxableBase: Base
|
||||
ticketFk: Ticket
|
||||
isActive: Active
|
||||
hasToInvoice: Has to invoice
|
||||
hasVerifiedData: Verified data
|
||||
workerName: Worker
|
|
@ -1,5 +1,60 @@
|
|||
Search invoice: Buscar factura emitida
|
||||
You can search by invoice reference: Puedes buscar por referencia de la factura
|
||||
invoiceOut:
|
||||
search: Buscar factura emitida
|
||||
searchInfo: Puedes buscar por referencia de la factura
|
||||
params:
|
||||
company: Empresa
|
||||
country: País
|
||||
clientId: ID del cliente
|
||||
clientSocialName: Cliente
|
||||
taxableBase: Base
|
||||
ticketFk: Ticket
|
||||
isActive: Activo
|
||||
hasToInvoice: Debe facturar
|
||||
hasVerifiedData: Datos verificados
|
||||
workerName: Comercial
|
||||
card:
|
||||
issued: Fecha emisión
|
||||
customerCard: Ficha del cliente
|
||||
ticketList: Listado de tickets
|
||||
summary:
|
||||
issued: Fecha
|
||||
dued: Fecha límite
|
||||
booked: Contabilizada
|
||||
taxBreakdown: Desglose impositivo
|
||||
taxableBase: Base imp.
|
||||
rate: Tarifa
|
||||
fee: Cuota
|
||||
tickets: Tickets
|
||||
totalWithVat: Importe
|
||||
globalInvoices:
|
||||
errors:
|
||||
chooseValidClient: Selecciona un cliente válido
|
||||
chooseValidCompany: Selecciona una empresa válida
|
||||
chooseValidPrinter: Selecciona una impresora válida
|
||||
chooseValidSerialType: Selecciona una tipo de serie válida
|
||||
fillDates: La fecha de la factura y la fecha máxima deben estar completas
|
||||
invoiceDateLessThanMaxDate: La fecha de la factura no puede ser menor que la fecha máxima
|
||||
invoiceWithFutureDate: Existe una factura con una fecha futura
|
||||
noTicketsToInvoice: No existen tickets para facturar
|
||||
criticalInvoiceError: Error crítico en la facturación proceso detenido
|
||||
invalidSerialTypeForAll: El tipo de serie debe ser global cuando se facturan todos los clientes
|
||||
table:
|
||||
addressId: Id dirección
|
||||
streetAddress: Dirección fiscal
|
||||
statusCard:
|
||||
percentageText: '{getPercentage}% {getAddressNumber} de {getNAddresses}'
|
||||
pdfsNumberText: '{nPdfs} de {totalPdfs} PDFs'
|
||||
negativeBases:
|
||||
country: País
|
||||
clientId: Id cliente
|
||||
base: Base
|
||||
ticketId: Ticket
|
||||
active: Activo
|
||||
hasToInvoice: Facturar
|
||||
verifiedData: Datos comprobados
|
||||
comercial: Comercial
|
||||
errors:
|
||||
downloadCsvFailed: Error al descargar CSV
|
||||
invoiceOutModule:
|
||||
customer: Cliente
|
||||
amount: Importe
|
||||
|
@ -16,27 +71,3 @@ invoiceOutList:
|
|||
ticket: Ticket
|
||||
taxArea: Area
|
||||
customsAgent: Agente de aduanas
|
||||
DownloadPdf: Descargar PDF
|
||||
InvoiceOutSummary: Resumen
|
||||
negativeBases:
|
||||
country: País
|
||||
clientId: ID del cliente
|
||||
client: Cliente
|
||||
base: Base
|
||||
ticketId: Ticket
|
||||
active: Activo
|
||||
hasToInvoice: Debe facturar
|
||||
verifiedData: Datos verificados
|
||||
commercial: Comercial
|
||||
invoiceout:
|
||||
params:
|
||||
company: Empresa
|
||||
country: País
|
||||
clientId: ID del cliente
|
||||
clientSocialName: Cliente
|
||||
taxableBase: Base
|
||||
ticketFk: Ticket
|
||||
isActive: Activo
|
||||
hasToInvoice: Debe facturar
|
||||
hasVerifiedData: Datos verificados
|
||||
workerName: Comercial
|
|
@ -1,19 +1,11 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import ItemDescriptor from './ItemDescriptor.vue';
|
||||
import ItemListFilter from '../ItemListFilter.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="Item"
|
||||
base-url="Items"
|
||||
:descriptor="ItemDescriptor"
|
||||
:filter-panel="ItemListFilter"
|
||||
search-data-key="ItemList"
|
||||
:searchbar-props="{
|
||||
url: 'Items/filter',
|
||||
label: 'searchbar.label',
|
||||
info: 'searchbar.info',
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -6,18 +6,17 @@ import VnImg from 'src/components/ui/VnImg.vue';
|
|||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import ItemSummary from '../Item/Card/ItemSummary.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import ItemDescriptorProxy from './Card/ItemDescriptorProxy.vue';
|
||||
import ItemTypeDescriptorProxy from './ItemType/Card/ItemTypeDescriptorProxy.vue';
|
||||
import { cloneItem } from 'src/pages/Item/composables/cloneItem';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import ItemListFilter from './ItemListFilter.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import axios from 'axios';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const entityId = computed(() => route.params.id);
|
||||
const { openCloneDialog } = cloneItem();
|
||||
|
@ -25,9 +24,11 @@ const { viewSummary } = useSummaryDialog();
|
|||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
const route = useRoute();
|
||||
const dataKey = 'ItemList';
|
||||
const validPriorities = ref([]);
|
||||
const defaultTag = ref();
|
||||
const defaultPriority = ref();
|
||||
|
||||
const itemFilter = {
|
||||
include: [
|
||||
{
|
||||
|
@ -324,22 +325,29 @@ onBeforeMount(async () => {
|
|||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="ItemList"
|
||||
:label="t('item.searchbar.label')"
|
||||
:info="t('item.searchbar.info')"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="item"
|
||||
:array-data-props="{
|
||||
url: 'Items/filter',
|
||||
order: ['isActive DESC', 'name', 'id'],
|
||||
userFilter: itemFilter,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<ItemListFilter data-key="ItemList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<VnTable
|
||||
v-if="defaultTag"
|
||||
ref="tableRef"
|
||||
data-key="ItemList"
|
||||
url="Items/filter"
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
redirect="Item"
|
||||
:create="{
|
||||
urlCreate: 'Items/new',
|
||||
title: t('item.list.newItem'),
|
||||
|
@ -350,12 +358,7 @@ onBeforeMount(async () => {
|
|||
priority: defaultPriority,
|
||||
},
|
||||
}"
|
||||
:order="['isActive DESC', 'name', 'id']"
|
||||
:columns="columns"
|
||||
redirect="Item"
|
||||
:is-editable="false"
|
||||
:right-search="false"
|
||||
:filter="itemFilter"
|
||||
>
|
||||
<template #column-image="{ row }">
|
||||
<VnImg
|
||||
|
@ -391,7 +394,7 @@ onBeforeMount(async () => {
|
|||
{{ row?.subName.toUpperCase() }}
|
||||
</div>
|
||||
</div>
|
||||
<FetchedTags :item="row" />
|
||||
<FetchedTags :item="row" :columns="3" />
|
||||
</template>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnInput
|
||||
|
@ -413,7 +416,9 @@ onBeforeMount(async () => {
|
|||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||
<QItemLabel caption> #{{ scope.opt?.id }} </QItemLabel>
|
||||
<QItemLabel caption>
|
||||
#{{ scope.opt?.id }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
|
@ -457,7 +462,9 @@ onBeforeMount(async () => {
|
|||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.description }}</QItemLabel>
|
||||
<QItemLabel caption> #{{ scope.opt?.id }} </QItemLabel>
|
||||
<QItemLabel caption>
|
||||
#{{ scope.opt?.id }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
|
@ -484,6 +491,8 @@ onBeforeMount(async () => {
|
|||
</VnSelect>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.subName {
|
||||
|
@ -497,5 +506,4 @@ es:
|
|||
New item: Nuevo artículo
|
||||
Create Item: Crear artículo
|
||||
You can search by id: Puedes buscar por id
|
||||
Preview: Vista previa
|
||||
</i18n>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { onMounted } from 'vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
@ -233,7 +232,7 @@ onMounted(async () => {
|
|||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('params.buyerFk')"
|
||||
v-model="params.buyerFk"
|
||||
v-model="params.workerFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="buyersOptions"
|
||||
option-value="id"
|
||||
|
@ -266,10 +265,10 @@ onMounted(async () => {
|
|||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>
|
||||
{{ scope.opt?.name}}
|
||||
{{ scope.opt?.name }}
|
||||
</QItemLabel>
|
||||
<QItemLabel caption>
|
||||
{{ `#${scope.opt?.id } , ${ scope.opt?.nickname}` }}
|
||||
{{ `#${scope.opt?.id} , ${scope.opt?.nickname}` }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
|
|
|
@ -272,11 +272,12 @@ const onDenyAccept = (_, responseData) => {
|
|||
<template #column-achieved="{ row }">
|
||||
<span>
|
||||
<VnInput
|
||||
ref="achievedRef"
|
||||
type="number"
|
||||
v-model.number="row.saleQuantity"
|
||||
:disable="!row.itemFk || row.isOk != null"
|
||||
@blur="changeQuantity(row)"
|
||||
@keyup.enter="changeQuantity(row)"
|
||||
@keyup.enter="$refs.achievedRef.vnInputRef.blur()"
|
||||
dense
|
||||
/>
|
||||
</span>
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import ItemTypeDescriptor from 'src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue';
|
||||
import ItemTypeFilter from 'src/pages/Item/ItemType/ItemTypeFilter.vue';
|
||||
import ItemTypeSearchbar from '../ItemTypeSearchbar.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="ItemTypeSummary"
|
||||
base-url="ItemTypes"
|
||||
:descriptor="ItemTypeDescriptor"
|
||||
:filter-panel="ItemTypeFilter"
|
||||
search-data-key="ItemTypeList"
|
||||
search-url="ItemTypes"
|
||||
>
|
||||
<template #searchbar>
|
||||
<ItemTypeSearchbar />
|
||||
</template>
|
||||
</VnCard>
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -63,7 +63,3 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
|||
</CardDescriptor>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Go to module index: Ir al índice del módulo
|
||||
</i18n>
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
const { t } = useI18n();
|
||||
|
||||
const props = defineProps({
|
||||
dataKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['search']);
|
||||
const exprBuilder = (param, value) => {
|
||||
switch (param) {
|
||||
case 'name':
|
||||
return {
|
||||
name: { like: `%${value}%` },
|
||||
};
|
||||
case 'code':
|
||||
return {
|
||||
code: { like: `%${value}%` },
|
||||
};
|
||||
case 'search':
|
||||
if (value) {
|
||||
if (!isNaN(value)) {
|
||||
return { id: value };
|
||||
} else {
|
||||
return {
|
||||
or: [
|
||||
{
|
||||
name: {
|
||||
like: `%${value}%`,
|
||||
},
|
||||
},
|
||||
{
|
||||
code: {
|
||||
like: `%${value}%`,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnFilterPanel
|
||||
:data-key="props.dataKey"
|
||||
:search-button="true"
|
||||
@search="emit('search')"
|
||||
search-url="table"
|
||||
:expr-builder="exprBuilder"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ params }">
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput :label="t('Name')" v-model="params.name" is-outlined />
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput v-model="params.code" :label="t('Code')" is-outlined />
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
name: Name
|
||||
code: Code
|
||||
es:
|
||||
params:
|
||||
name: Nombre
|
||||
code: Código
|
||||
Name: Nombre
|
||||
Code: Código
|
||||
</i18n>
|
|
@ -1,19 +0,0 @@
|
|||
<script setup>
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="ItemTypeList"
|
||||
url="ItemTypes"
|
||||
:label="t('Search item type')"
|
||||
:info="t('Search itemType by id, name or code')"
|
||||
/>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
Search item type: Buscar familia
|
||||
Search itemType by id, name or code: Buscar familia por id, nombre o código
|
||||
</i18n>
|
|
@ -15,3 +15,5 @@ itemType:
|
|||
promo: Promo
|
||||
itemPackingType: Item packing type
|
||||
isUnconventionalSize: Is unconventional size
|
||||
search: Search item type
|
||||
searchInfo: Search item type by id, name or code
|
||||
|
|
|
@ -15,3 +15,5 @@ itemType:
|
|||
promo: Promoción
|
||||
itemPackingType: Tipo de embalaje
|
||||
isUnconventionalSize: Es de tamaño poco convencional
|
||||
search: Buscar familia
|
||||
searchInfo: Buscar familia por id, nombre o código
|
||||
|
|
|
@ -1,17 +1,50 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { ref, computed } from 'vue';
|
||||
import ItemTypeSearchbar from 'src/pages/Item/ItemType/ItemTypeSearchbar.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import ItemTypeFilter from './ItemType/ItemTypeFilter.vue';
|
||||
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
const itemCategoriesOptions = ref([]);
|
||||
const temperatureOptions = ref([]);
|
||||
const dataKey = 'ItemTypeList';
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
switch (param) {
|
||||
case 'name':
|
||||
return {
|
||||
name: { like: `%${value}%` },
|
||||
};
|
||||
case 'code':
|
||||
return {
|
||||
code: { like: `%${value}%` },
|
||||
};
|
||||
case 'search':
|
||||
if (value) {
|
||||
if (!isNaN(value)) {
|
||||
return { id: value };
|
||||
} else {
|
||||
return {
|
||||
or: [
|
||||
{
|
||||
name: {
|
||||
like: `%${value}%`,
|
||||
},
|
||||
},
|
||||
{
|
||||
code: {
|
||||
like: `%${value}%`,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
|
@ -103,23 +136,15 @@ const columns = computed(() => [
|
|||
@on-fetch="(data) => (temperatureOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<ItemTypeFilter data-key="ItemTypeList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<ItemTypeSearchbar />
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="ItemTypeList"
|
||||
url="ItemTypes"
|
||||
:create="{
|
||||
urlCreate: 'ItemTypes',
|
||||
title: t('Create ItemTypes'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {},
|
||||
}"
|
||||
:user-filter="{
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="itemType"
|
||||
:array-data-props="{
|
||||
url: 'ItemTypes',
|
||||
order: 'name ASC',
|
||||
exprBuilder,
|
||||
userFilter: {
|
||||
include: {
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
|
@ -132,11 +157,21 @@ const columns = computed(() => [
|
|||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}"
|
||||
>
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
:data-key="dataKey"
|
||||
:create="{
|
||||
urlCreate: 'ItemTypes',
|
||||
title: t('Create ItemTypes'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {},
|
||||
}"
|
||||
order="name ASC"
|
||||
:columns="columns"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
redirect="item/item-type"
|
||||
>
|
||||
<template #column-workerFk="{ row }">
|
||||
|
@ -146,6 +181,8 @@ const columns = computed(() => [
|
|||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -180,44 +180,46 @@ item:
|
|||
intrastat: Intrastat
|
||||
origin: Origin
|
||||
buyRequest:
|
||||
ticketId: 'Ticket ID'
|
||||
shipped: 'Shipped'
|
||||
requester: 'Requester'
|
||||
requested: 'Requested'
|
||||
price: 'Price'
|
||||
attender: 'Attender'
|
||||
item: 'Item'
|
||||
achieved: 'Achieved'
|
||||
concept: 'Concept'
|
||||
state: 'State'
|
||||
ticketId: Ticket ID
|
||||
shipped: Shipped
|
||||
requester: Requester
|
||||
requested: Requested
|
||||
price: Price
|
||||
attender: Attender
|
||||
item: Item
|
||||
achieved: Achieved
|
||||
concept: Concept
|
||||
state: State
|
||||
summary:
|
||||
basicData: 'Basic data'
|
||||
otherData: 'Other data'
|
||||
description: 'Description'
|
||||
tax: 'Tax'
|
||||
tags: 'Tags'
|
||||
botanical: 'Botanical'
|
||||
barcode: 'Barcode'
|
||||
name: 'Nombre'
|
||||
completeName: 'Nombre completo'
|
||||
family: 'Familia'
|
||||
size: 'Medida'
|
||||
origin: 'Origen'
|
||||
stems: 'Tallos'
|
||||
multiplier: 'Multiplicador'
|
||||
buyer: 'Comprador'
|
||||
doPhoto: 'Do photo'
|
||||
intrastatCode: 'Código intrastat'
|
||||
basicData: Basic data
|
||||
otherData: Other data
|
||||
description: Description
|
||||
tax: Tax
|
||||
tags: Tags
|
||||
botanical: Botanical
|
||||
barcode: Barcode
|
||||
name: Name
|
||||
completeName: Complete name
|
||||
family: Family
|
||||
size: Size
|
||||
origin: Origin
|
||||
stems: Stems
|
||||
multiplier: Multiplier
|
||||
buyer: Buyer
|
||||
doPhoto: Do photo
|
||||
intrastatCode: Intrastat code
|
||||
intrastat: 'Intrastat'
|
||||
ref: 'Referencia'
|
||||
relevance: 'Relevancia'
|
||||
weight: 'Peso (gramos)/tallo'
|
||||
units: 'Unidades/caja'
|
||||
expense: 'Gasto'
|
||||
generic: 'Genérico'
|
||||
recycledPlastic: 'Plástico reciclado'
|
||||
nonRecycledPlastic: 'Plástico no reciclado'
|
||||
minSalesQuantity: 'Cantidad mínima de venta'
|
||||
genus: 'Genus'
|
||||
specie: 'Specie'
|
||||
ref: Reference
|
||||
relevance: Relevance
|
||||
weight: Weight (gram)/stem
|
||||
units: Units/box
|
||||
expense: Expense
|
||||
generic: Generic
|
||||
recycledPlastic: Recycled plastic
|
||||
nonRecycledPlastic: Non recycled plastic
|
||||
minSalesQuantity: Min sales quantity
|
||||
genus: Genus
|
||||
specie: Specie
|
||||
search: 'Search item'
|
||||
searchInfo: 'You can search by id'
|
||||
regularizeStock: Regularize stock
|
|
@ -73,9 +73,6 @@ itemTags:
|
|||
addTag: Añadir etiqueta
|
||||
tag: Etiqueta
|
||||
value: Valor
|
||||
searchbar:
|
||||
label: Buscar artículo
|
||||
info: Buscar por id de artículo
|
||||
itemType:
|
||||
shared:
|
||||
code: Código
|
||||
|
@ -108,9 +105,6 @@ item:
|
|||
concept: Concepto
|
||||
denyOptions: Denegado
|
||||
scopeDays: Días en adelante
|
||||
searchbar:
|
||||
label: Buscar artículo
|
||||
info: Puedes buscar por id
|
||||
descriptor:
|
||||
item: Artículo
|
||||
buyer: Comprador
|
||||
|
@ -182,35 +176,35 @@ item:
|
|||
intrastat: Intrastat
|
||||
origin: Origen
|
||||
summary:
|
||||
basicData: 'Datos básicos'
|
||||
otherData: 'Otros datos'
|
||||
description: 'Descripción'
|
||||
tax: 'IVA'
|
||||
tags: 'Etiquetas'
|
||||
botanical: 'Botánico'
|
||||
barcode: 'Código de barras'
|
||||
name: 'Nombre'
|
||||
completeName: 'Nombre completo'
|
||||
family: 'Familia'
|
||||
size: 'Medida'
|
||||
origin: 'Origen'
|
||||
stems: 'Tallos'
|
||||
multiplier: 'Multiplicador'
|
||||
buyer: 'Comprador'
|
||||
doPhoto: 'Hacer foto'
|
||||
intrastatCode: 'Código intrastat'
|
||||
intrastat: 'Intrastat'
|
||||
ref: 'Referencia'
|
||||
relevance: 'Relevancia'
|
||||
weight: 'Peso (gramos)/tallo'
|
||||
units: 'Unidades/caja'
|
||||
expense: 'Gasto'
|
||||
generic: 'Genérico'
|
||||
recycledPlastic: 'Plástico reciclado'
|
||||
nonRecycledPlastic: 'Plástico no reciclado'
|
||||
minSalesQuantity: 'Cantidad mínima de venta'
|
||||
genus: 'Genus'
|
||||
specie: 'Specie'
|
||||
basicData: Datos básicos
|
||||
otherData: Otros datos
|
||||
description: Descripción
|
||||
tax: IVA
|
||||
tags: Etiquetas
|
||||
botanical: Botánico
|
||||
barcode: Código de barras
|
||||
name: Nombre
|
||||
completeName: Nombre completo
|
||||
family: Familia
|
||||
size: Medida
|
||||
origin: Origen
|
||||
stems: Tallos
|
||||
multiplier: Multiplicador
|
||||
buyer: Comprador
|
||||
doPhoto: Hacer foto
|
||||
intrastatCode: Código intrastat
|
||||
intrastat: Intrastat
|
||||
ref: Referencia
|
||||
relevance: Relevancia
|
||||
weight: Peso (gramos)/tallo
|
||||
units: Unidades/caja
|
||||
expense: Gasto
|
||||
generic: Genérico
|
||||
recycledPlastic: Plástico reciclado
|
||||
nonRecycledPlastic: Plástico no reciclado
|
||||
minSalesQuantity: Cantidad mínima de venta
|
||||
genus: Genus
|
||||
specie: Specie
|
||||
regularizeStock: Regularizar stock
|
||||
buyRequest:
|
||||
ticketId: 'ID Ticket'
|
||||
|
@ -223,3 +217,5 @@ item:
|
|||
achieved: 'Conseguido'
|
||||
concept: 'Concepto'
|
||||
state: 'Estado'
|
||||
search: 'Buscar artículo'
|
||||
searchInfo: 'Puedes buscar por id'
|
|
@ -290,7 +290,7 @@ const columns = computed(() => [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: t('salesTicketsTable.preview'),
|
||||
title: t('globals.preview'),
|
||||
icon: 'preview',
|
||||
color: 'primary',
|
||||
action: (row) => viewSummary(row.id, TicketSummary),
|
||||
|
|
|
@ -33,7 +33,6 @@ salesTicketsTable:
|
|||
isFragile: Is fragile
|
||||
zone: Zone
|
||||
goToLines: Go to lines
|
||||
preview: Preview
|
||||
total: Total
|
||||
preparation: H.Prep
|
||||
payMethod: Pay method
|
||||
|
|
|
@ -115,6 +115,7 @@ const removeTagGroupParam = (params, search, valIndex) => {
|
|||
} else {
|
||||
params.tagGroups.splice(valIndex, 1);
|
||||
}
|
||||
search();
|
||||
};
|
||||
|
||||
const setCategoryList = (data) => {
|
||||
|
|
|
@ -136,7 +136,7 @@ const columns = computed(() => [
|
|||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('InvoiceOutSummary'),
|
||||
title: t('globals.pageTitles.summary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, OrderSummary),
|
||||
isPrimary: true,
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import ParkingDescriptor from 'pages/Parking/Card/ParkingDescriptor.vue';
|
||||
import ParkingFilter from 'pages/Parking/ParkingFilter.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="Parking"
|
||||
base-url="Parkings"
|
||||
:descriptor="ParkingDescriptor"
|
||||
:filter-panel="ParkingFilter"
|
||||
search-data-key="ParkingList"
|
||||
:searchbar-props="{
|
||||
url: 'Parkings',
|
||||
label: 'parking.searchBar.label',
|
||||
info: 'parking.searchBar.info',
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -5,17 +5,17 @@ import { useI18n } from 'vue-i18n';
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import CardList from 'components/ui/CardList.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
import ParkingFilter from './ParkingFilter.vue';
|
||||
import ParkingSummary from './Card/ParkingSummary.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const { push } = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const dataKey = 'ParkingList';
|
||||
|
||||
onMounted(() => (stateStore.rightDrawer = true));
|
||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||
|
@ -37,38 +37,38 @@ function exprBuilder(param, value) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="ParkingList"
|
||||
:label="t('Search parking')"
|
||||
:info="t('You can search by parking code')"
|
||||
/>
|
||||
</template>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
prefix="parking"
|
||||
:array-data-props="{
|
||||
url: 'Parkings',
|
||||
order: ['code'],
|
||||
userFilter: filter,
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<ParkingFilter data-key="ParkingList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate
|
||||
data-key="ParkingList"
|
||||
url="Parkings"
|
||||
:user-filter="filter"
|
||||
:expr-builder="exprBuilder"
|
||||
:limit="20"
|
||||
order="code"
|
||||
>
|
||||
<VnPaginate :data-key="dataKey">
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
:key="row.id"
|
||||
:id="row.id"
|
||||
:title="row.code"
|
||||
@click="push({ path: `/parking/${row.id}` })"
|
||||
@click="
|
||||
push({ path: `/shelving/parking/${row.id}/summary` })
|
||||
"
|
||||
>
|
||||
<template #list-items>
|
||||
<VnLv label="Sector" :value="row.sector?.description" />
|
||||
<VnLv
|
||||
label="Sector"
|
||||
:value="row.sector?.description"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('parking.pickingOrder')"
|
||||
:value="row.pickingOrder"
|
||||
|
@ -86,9 +86,6 @@ function exprBuilder(param, value) {
|
|||
</VnPaginate>
|
||||
</div>
|
||||
</QPage>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
Search parking: Buscar parking
|
||||
You can search by parking code: Puede buscar por el código del parking
|
||||
</i18n>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
parking:
|
||||
pickingOrder: Picking order
|
||||
sector: Sector
|
||||
row: Row
|
||||
column: Column
|
||||
search: Search parking
|
||||
searchInfo: You can search by parking code
|
|
@ -0,0 +1,7 @@
|
|||
parking:
|
||||
pickingOrder: Orden de recogida
|
||||
row: Fila
|
||||
sector: Sector
|
||||
column: Columna
|
||||
search: Buscar parking
|
||||
searchInfo: Puedes buscar por código de parking
|
|
@ -2,11 +2,12 @@
|
|||
import { computed } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const dataKey = 'AgencyList';
|
||||
function navigate(id) {
|
||||
router.push({ path: `/agency/${id}` });
|
||||
}
|
||||
|
@ -67,26 +68,28 @@ const columns = computed(() => [
|
|||
]);
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
:info="t('You can search by name')"
|
||||
:label="t('Search agency')"
|
||||
data-key="AgencyList"
|
||||
:expr-builder="exprBuilder"
|
||||
/>
|
||||
<div class="list-container">
|
||||
<div class="list">
|
||||
<VnSection
|
||||
:data-key
|
||||
:columns="columns"
|
||||
prefix="agency"
|
||||
:right-filter="false"
|
||||
:array-data-props="{
|
||||
url: 'Agencies',
|
||||
order: 'name',
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #body>
|
||||
<VnTable
|
||||
data-key="AgencyList"
|
||||
url="Agencies"
|
||||
order="name"
|
||||
:data-key
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:use-model="true"
|
||||
redirect="agency"
|
||||
redirect="route/agency"
|
||||
default-mode="card"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
|
@ -104,8 +107,6 @@ const columns = computed(() => [
|
|||
es:
|
||||
isOwn: Tiene propietario
|
||||
isAnyVolumeAllowed: Permite cualquier volumen
|
||||
Search agency: Buscar agencia
|
||||
You can search by name: Puedes buscar por nombre
|
||||
en:
|
||||
isOwn: Has owner
|
||||
isAnyVolumeAllowed: Allows any volume
|
||||
|
|
|
@ -1,17 +1,7 @@
|
|||
<script setup>
|
||||
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Agency"
|
||||
base-url="Agencies"
|
||||
:descriptor="AgencyDescriptor"
|
||||
search-data-key="AgencyList"
|
||||
:searchbar-props="{
|
||||
url: 'Agencies',
|
||||
label: 'agency.searchBar.label',
|
||||
info: 'agency.searchBar.info',
|
||||
}"
|
||||
/>
|
||||
<VnCardBeta data-key="Agency" base-url="Agencies" :descriptor="AgencyDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
import { describe, it, expect, vi, afterEach } from 'vitest';
|
||||
import axios from 'axios';
|
||||
import { getAgencies } from 'src/pages/Route/Agency/composables/getAgencies';
|
||||
|
||||
vi.mock('axios');
|
||||
|
||||
describe('getAgencies', () => {
|
||||
afterEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
const generateParams = (formData) => ({
|
||||
params: {
|
||||
warehouseFk: formData.warehouseId,
|
||||
addressFk: formData.addressId,
|
||||
landed: formData.landed,
|
||||
},
|
||||
});
|
||||
|
||||
it('should fetch agencies data with correct parameters for valid formData', async () => {
|
||||
const formData = {
|
||||
warehouseId: '123',
|
||||
addressId: '456',
|
||||
landed: 'true',
|
||||
};
|
||||
|
||||
await getAgencies(formData);
|
||||
|
||||
expect(axios.get).toHaveBeenCalledWith('Agencies/getAgenciesWithWarehouse', generateParams(formData));
|
||||
});
|
||||
|
||||
it('should not call API when formData is missing required landed field', async () => {
|
||||
const formData = { warehouseId: '123', addressId: '456' };
|
||||
|
||||
await getAgencies(formData);
|
||||
|
||||
expect(axios.get).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not call API when formData is missing required addressId field', async () => {
|
||||
const formData = { warehouseId: '123', landed: 'true' };
|
||||
|
||||
await getAgencies(formData);
|
||||
|
||||
expect(axios.get).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not call API when formData is missing required warehouseId field', async () => {
|
||||
const formData = { addressId: '456', landed: 'true' };
|
||||
|
||||
await getAgencies(formData);
|
||||
|
||||
expect(axios.get).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
import axios from 'axios';
|
||||
|
||||
export async function getAgencies(formData) {
|
||||
if (!formData.warehouseId || !formData.addressId || !formData.landed) return;
|
||||
let params = {
|
||||
warehouseFk: formData.warehouseId,
|
||||
addressFk: formData.addressId,
|
||||
landed: formData.landed,
|
||||
};
|
||||
|
||||
return await axios.get('Agencies/getAgenciesWithWarehouse', { params });
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
agency:
|
||||
search: Search agency
|
||||
searchInfo: You can search by name
|
||||
isOwn: Own
|
||||
isAnyVolumeAllowed: Any volume allowed
|
||||
notification:
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
agency:
|
||||
search: Buscar agencia
|
||||
searchInfo: Puedes buscar por nombre
|
||||
isOwn: Propio
|
||||
isAnyVolumeAllowed: Cualquier volumen
|
||||
removeItem: Agencia eliminada correctamente
|
||||
|
|
|
@ -1,19 +1,8 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import RouteDescriptor from 'pages/Route/Card/RouteDescriptor.vue';
|
||||
import RouteFilter from './RouteFilter.vue';
|
||||
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Route"
|
||||
base-url="Routes"
|
||||
:descriptor="RouteDescriptor"
|
||||
:filter-panel="RouteFilter"
|
||||
search-data-key="RouteList"
|
||||
>
|
||||
<template #searchbar>
|
||||
<RouteSearchbar />
|
||||
</template>
|
||||
</VnCard>
|
||||
<VnCardBeta data-key="Route" base-url="Routes" :descriptor="RouteDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -1,19 +1,7 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import RoadmapDescriptor from 'pages/Route/Roadmap/RoadmapDescriptor.vue';
|
||||
import RoadmapFilter from 'pages/Route/Roadmap/RoadmapFilter.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Roadmap"
|
||||
base-url="Roadmaps"
|
||||
:descriptor="RoadmapDescriptor"
|
||||
:filter-panel="RoadmapFilter"
|
||||
search-data-key="RoadmapList"
|
||||
:searchbar-props="{
|
||||
url: 'Roadmaps',
|
||||
label: 'Search roadmap',
|
||||
info: 'You can search by roadmap id or customer name',
|
||||
}"
|
||||
/>
|
||||
<VnCardBeta data-key="Roadmap" base-url="Roadmaps" :descriptor="RoadmapDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -18,22 +18,6 @@ const props = defineProps({
|
|||
const emit = defineEmits(['search']);
|
||||
|
||||
const supplierList = ref([]);
|
||||
const exprBuilder = (param, value) => {
|
||||
switch (param) {
|
||||
case 'tractorPlate':
|
||||
case 'trailerPlate':
|
||||
case 'driverName':
|
||||
case 'phone':
|
||||
return { [param]: { like: `%${value}%` } };
|
||||
case 'supplierFk':
|
||||
case 'price':
|
||||
return { [param]: value };
|
||||
case 'from':
|
||||
return { etd: { gte: value } };
|
||||
case 'to':
|
||||
return { etd: { lte: value } };
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -48,7 +32,6 @@ const exprBuilder = (param, value) => {
|
|||
<VnFilterPanel
|
||||
:data-key="props.dataKey"
|
||||
:search-button="true"
|
||||
:expr-builder="exprBuilder"
|
||||
@search="emit('search')"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
|
|
|
@ -142,7 +142,7 @@ const total = computed(() => {
|
|||
const openDmsUploadDialog = async () => {
|
||||
dmsDialog.value.rowsToCreateInvoiceIn = selectedRows.value
|
||||
.filter(
|
||||
(agencyTerm) => agencyTerm.supplierFk === selectedRows.value?.[0].supplierFk
|
||||
(agencyTerm) => agencyTerm.supplierFk === selectedRows.value?.[0].supplierFk,
|
||||
)
|
||||
.map((agencyTerm) => ({
|
||||
routeFk: agencyTerm.routeFk,
|
||||
|
@ -277,5 +277,4 @@ es:
|
|||
Price: Precio
|
||||
Received: Recibida
|
||||
Autonomous: Autónomos
|
||||
Preview: Vista previa
|
||||
</i18n>
|
||||
|
|
|
@ -3,17 +3,16 @@ import { computed, ref } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import { toHour } from 'src/filters';
|
||||
|
||||
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
|
||||
import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const tableRef = ref([]);
|
||||
const dataKey = 'RouteList';
|
||||
const routeFilter = {
|
||||
include: [
|
||||
{
|
||||
|
@ -110,18 +109,23 @@ const columns = computed(() => [
|
|||
]);
|
||||
</script>
|
||||
<template>
|
||||
<RouteSearchbar />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<RouteFilter data-key="RouteList" />
|
||||
<VnSection
|
||||
:data-key
|
||||
:columns="columns"
|
||||
prefix="route"
|
||||
:array-data-props="{
|
||||
url: 'Routes/filter',
|
||||
userFilter: routeFilter,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<RouteFilter :data-key />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<VnTable
|
||||
data-key="RouteList"
|
||||
url="Routes/filter"
|
||||
:data-key
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:filter="routeFilter"
|
||||
redirect="route"
|
||||
:create="{
|
||||
urlCreate: 'Routes',
|
||||
|
@ -138,4 +142,6 @@ const columns = computed(() => [
|
|||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
|
|
@ -15,11 +15,14 @@ import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
|||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import RoadmapFilter from './Roadmap/RoadmapFilter.vue';
|
||||
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const selectedRows = ref([]);
|
||||
const dataKey = 'RoadmapList';
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -112,7 +115,7 @@ const removeSelection = async () => {
|
|||
await Promise.all(
|
||||
selectedRows.value.map((roadmap) => {
|
||||
axios.delete(`Roadmaps/${roadmap.id}`);
|
||||
})
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -128,14 +131,28 @@ function confirmRemove() {
|
|||
})
|
||||
.onOk(() => tableRef.value++);
|
||||
}
|
||||
|
||||
function exprBuilder(param, value) {
|
||||
switch (param) {
|
||||
case 'search':
|
||||
return /^\d+$/.test(value) ? { id: value } : { name: { like: `%${value}%` } };
|
||||
case 'tractorPlate':
|
||||
case 'trailerPlate':
|
||||
case 'driverName':
|
||||
case 'phone':
|
||||
return { [param]: { like: `%${value}%` } };
|
||||
case 'supplierFk':
|
||||
case 'price':
|
||||
return { [param]: value };
|
||||
case 'from':
|
||||
return { etd: { gte: value } };
|
||||
case 'to':
|
||||
return { etd: { lte: value } };
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="RoadmapList"
|
||||
:label="t('Search roadmaps')"
|
||||
:info="t('You can search by roadmap reference')"
|
||||
/>
|
||||
<QDialog v-model="isCloneDialogOpen">
|
||||
<QCard style="min-width: 350px">
|
||||
<QCardSection>
|
||||
|
@ -177,12 +194,24 @@ function confirmRemove() {
|
|||
</QBtn>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<VnSection
|
||||
:data-key
|
||||
:columns="columns"
|
||||
prefix="route.roadmap"
|
||||
:array-data-props="{
|
||||
url: 'roadmaps',
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<RoadmapFilter :dataKey />
|
||||
</template>
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="RoadmapList"
|
||||
url="roadmaps"
|
||||
:data-key
|
||||
:columns="columns"
|
||||
:right-search="true"
|
||||
:right-search="false"
|
||||
:use-model="true"
|
||||
default-mode="table"
|
||||
v-model:selected="selectedRows"
|
||||
|
@ -210,6 +239,8 @@ function confirmRemove() {
|
|||
<VnInputTime v-model="data.etd" />
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -236,6 +267,5 @@ es:
|
|||
Plate: Matrícula
|
||||
Price: Precio
|
||||
Observations: Observaciones
|
||||
Preview: Vista previa
|
||||
Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida
|
||||
</i18n>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
route:
|
||||
roadmap:
|
||||
search: Search roadmap
|
||||
searchInfo: You can search by roadmap reference
|
||||
params:
|
||||
etd: ETD
|
||||
tractorPlate: Plate
|
||||
|
@ -33,10 +36,11 @@ route:
|
|||
Mark as served: Mark as served
|
||||
Download selected routes as PDF: Download selected routes as PDF
|
||||
Add ticket: Add ticket
|
||||
Preview: Preview
|
||||
Summary: Summary
|
||||
Route is closed: Route is closed
|
||||
Route is not served: Route is not served
|
||||
search: Search route
|
||||
searchInfo: You can search by route reference
|
||||
cmr:
|
||||
list:
|
||||
results: results
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
route:
|
||||
roadmap:
|
||||
search: Buscar troncales
|
||||
searchInfo: Puedes buscar por referencia del troncal
|
||||
params:
|
||||
agencyModeName: Agencia Ruta
|
||||
agencyAgreement: Agencia Acuerdo
|
||||
|
@ -33,10 +36,12 @@ route:
|
|||
Mark as served: Marcar como servidas
|
||||
Download selected routes as PDF: Descargar rutas seleccionadas como PDF
|
||||
Add ticket: Añadir tickets
|
||||
Preview: Vista previa
|
||||
preview: Vista previa
|
||||
Summary: Resumen
|
||||
Route is closed: La ruta está cerrada
|
||||
Route is not served: La ruta no está servida
|
||||
search: Buscar rutas
|
||||
searchInfo: Puedes buscar por referencia de la ruta
|
||||
cmr:
|
||||
list:
|
||||
results: resultados
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import ShelvingDescriptor from 'pages/Shelving/Card/ShelvingDescriptor.vue';
|
||||
import ShelvingFilter from './ShelvingFilter.vue';
|
||||
import ShelvingSearchbar from './ShelvingSearchbar.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="Shelving"
|
||||
base-url="Shelvings"
|
||||
:descriptor="ShelvingDescriptor"
|
||||
:filter-panel="ShelvingFilter"
|
||||
search-data-key="ShelvingList"
|
||||
>
|
||||
<template #searchbar>
|
||||
<ShelvingSearchbar />
|
||||
</template>
|
||||
</VnCard>
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -6,13 +6,14 @@ import VnLv from 'components/ui/VnLv.vue';
|
|||
import { useRouter } from 'vue-router';
|
||||
import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
|
||||
import ShelvingSummary from 'pages/Shelving/Card/ShelvingSummary.vue';
|
||||
import ShelvingSearchbar from 'pages/Shelving/Card/ShelvingSearchbar.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const dataKey = 'ShelvingList';
|
||||
|
||||
const filter = {
|
||||
include: [{ relation: 'parking' }],
|
||||
};
|
||||
|
@ -34,21 +35,23 @@ function exprBuilder(param, value) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<ShelvingSearchbar />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
prefix="shelving"
|
||||
:array-data-props="{
|
||||
url: 'Shelvings',
|
||||
order: ['code'],
|
||||
userFilter: filter,
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<ShelvingFilter data-key="ShelvingList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate
|
||||
data-key="ShelvingList"
|
||||
url="Shelvings"
|
||||
:filter="filter"
|
||||
:expr-builder="exprBuilder"
|
||||
:limit="20"
|
||||
>
|
||||
<VnPaginate :data-key="dataKey">
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
|
@ -88,4 +91,6 @@ function exprBuilder(param, value) {
|
|||
</RouterLink>
|
||||
</QPageSticky>
|
||||
</QPage>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
shelving:
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Priority
|
||||
newShelving: New Shelving
|
||||
summary:
|
||||
recyclable: Recyclable
|
||||
search: Search shelving
|
||||
searchInfo: You can search by shelving reference
|
|
@ -0,0 +1,9 @@
|
|||
shelving:
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Prioridad
|
||||
newShelving: Nuevo Carro
|
||||
summary:
|
||||
recyclable: Reciclable
|
||||
search: Buscar carro
|
||||
searchInfo: Puedes buscar por referencia del carro
|
|
@ -188,7 +188,6 @@ const getEntryQueryParams = (supplier) => {
|
|||
es:
|
||||
All entries with current supplier: Todas las entradas con proveedor actual
|
||||
Go to client: Ir a cliente
|
||||
Go to module index: Ir al índice del módulo
|
||||
Inactive supplier: Proveedor inactivo
|
||||
Unverified supplier: Proveedor no verificado
|
||||
</i18n>
|
||||
|
|
|
@ -250,7 +250,6 @@ const setData = (entity) => {
|
|||
<i18n>
|
||||
es:
|
||||
This ticket is deleted: Este ticket está eliminado
|
||||
Go to module index: Ir al índice del modulo
|
||||
Client inactive: Cliente inactivo
|
||||
Client not checked: Cliente no verificado
|
||||
Client has debt: Cliente con deuda
|
||||
|
|
|
@ -16,6 +16,8 @@ import VnInputTime from 'src/components/common/VnInputTime.vue';
|
|||
import { useAcl } from 'src/composables/useAcl';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import { getAddresses } from 'src/pages/Customer/composables/getAddresses';
|
||||
import { getClient } from 'src/pages/Customer/composables/getClient';
|
||||
|
||||
const props = defineProps({
|
||||
ticket: {
|
||||
|
@ -40,7 +42,10 @@ const { openReport, sendEmail } = usePrintService();
|
|||
const ticketSummary = useArrayData('TicketSummary');
|
||||
const { ticket } = toRefs(props);
|
||||
const ticketId = computed(() => props.ticket.id ?? currentRoute.value.params.id);
|
||||
const client = ref();
|
||||
const client = ref(null);
|
||||
const address = ref(null);
|
||||
const addressesOptions = ref([]);
|
||||
const selectedClient = ref();
|
||||
const showTransferDialog = ref(false);
|
||||
const showTurnDialog = ref(false);
|
||||
const showChangeTimeDialog = ref(false);
|
||||
|
@ -52,6 +57,31 @@ const weight = ref();
|
|||
const hasDocuwareFile = ref();
|
||||
const quasar = useQuasar();
|
||||
const canRestoreTicket = ref(false);
|
||||
|
||||
const onClientSelected = async(clientId) =>{
|
||||
client.value = clientId;
|
||||
await fetchClient();
|
||||
await fetchAddresses();
|
||||
};
|
||||
|
||||
const onAddressSelected = (addressId) => {
|
||||
address.value = addressId;
|
||||
}
|
||||
|
||||
const fetchClient = async () => {
|
||||
const { data } = await getClient(client.value)
|
||||
const [retrievedClient] = data;
|
||||
selectedClient.value = retrievedClient;
|
||||
};
|
||||
|
||||
const fetchAddresses = async () => {
|
||||
const { data } = await getAddresses(client.value);
|
||||
addressesOptions.value = data;
|
||||
|
||||
const { defaultAddress } = selectedClient.value;
|
||||
address.value = defaultAddress.id;
|
||||
};
|
||||
|
||||
const actions = {
|
||||
clone: async () => {
|
||||
const opts = { message: t('Ticket cloned'), type: 'positive' };
|
||||
|
@ -260,17 +290,14 @@ async function makeInvoice() {
|
|||
window.location.reload();
|
||||
}
|
||||
|
||||
async function transferClient(client) {
|
||||
async function transferClient() {
|
||||
const params = {
|
||||
clientFk: client,
|
||||
clientFk: client.value,
|
||||
addressFk: address.value,
|
||||
};
|
||||
|
||||
const { data } = await axios.patch(
|
||||
`Tickets/${ticketId.value}/transferClient`,
|
||||
params
|
||||
);
|
||||
|
||||
if (data) window.location.reload();
|
||||
await axios.patch( `Tickets/${ticketId.value}/transferClient`, params );
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
async function addTurn(day) {
|
||||
|
@ -446,7 +473,7 @@ async function ticketToRestore() {
|
|||
</QItem>
|
||||
<QDialog ref="dialogRef" v-model="showTransferDialog">
|
||||
<FormPopup
|
||||
@on-submit="transferClient(client)"
|
||||
@on-submit="transferClient()"
|
||||
:title="t('Transfer client')"
|
||||
:custom-submit-button-label="t('Transfer client')"
|
||||
:default-cancel-button="false"
|
||||
|
@ -454,10 +481,11 @@ async function ticketToRestore() {
|
|||
<template #form-inputs>
|
||||
<VnSelect
|
||||
url="Clients"
|
||||
:fields="['id', 'name']"
|
||||
:fields="['id', 'name', 'defaultAddressFk']"
|
||||
v-model="client"
|
||||
:label="t('Client')"
|
||||
auto-load
|
||||
@update:model-value="() => onClientSelected(client)"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
@ -470,6 +498,29 @@ async function ticketToRestore() {
|
|||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<VnSelect
|
||||
:disable="!client"
|
||||
:options="addressesOptions"
|
||||
:fields="['id', 'nickname']"
|
||||
option-value="id"
|
||||
option-label="nickname"
|
||||
v-model="address"
|
||||
:label="t('ticketList.addressNickname')"
|
||||
auto-load
|
||||
:hint="!client ? t('Select a client to enable') : ''"
|
||||
@update:model-value="() => onAddressSelected(address)"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>
|
||||
{{ `#${scope.opt.id} - ` }}
|
||||
{{ scope.opt.nickname }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</template>
|
||||
</FormPopup>
|
||||
</QDialog>
|
||||
|
@ -814,4 +865,5 @@ es:
|
|||
Are you sure you want to restore the ticket?: ¿Seguro que quieres restaurar el ticket?
|
||||
You are going to restore this ticket: Vas a restaurar este ticket
|
||||
Ticket restored: Ticket restaurado
|
||||
Select a client to enable: Selecciona un cliente para habilitar
|
||||
</i18n>
|
||||
|
|
|
@ -9,9 +9,11 @@ import VnRow from 'components/ui/VnRow.vue';
|
|||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import { getClient } from 'src/pages/Customer/composables/getClient';
|
||||
import { getAddresses } from 'src/pages/Customer/composables/getAddresses';
|
||||
import { getAgencies } from 'src/pages/Route/Agency/composables/getAgencies';
|
||||
|
||||
import { useState } from 'composables/useState';
|
||||
import axios from 'axios';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
@ -37,33 +39,13 @@ onBeforeMount(async () => {
|
|||
});
|
||||
|
||||
const fetchClient = async (formData) => {
|
||||
const filter = {
|
||||
include: {
|
||||
relation: 'defaultAddress',
|
||||
scope: {
|
||||
fields: ['id', 'agencyModeFk'],
|
||||
},
|
||||
},
|
||||
where: { id: formData.clientId },
|
||||
};
|
||||
const params = { filter: JSON.stringify(filter) };
|
||||
const { data } = await axios.get('Clients', { params });
|
||||
const { data } = await getClient(formData.clientId);
|
||||
const [client] = data;
|
||||
selectedClient.value = client;
|
||||
};
|
||||
|
||||
const fetchAddresses = async (formData) => {
|
||||
if (!formData.clientId) return;
|
||||
|
||||
const filter = {
|
||||
fields: ['nickname', 'street', 'city', 'id'],
|
||||
where: { isActive: true },
|
||||
order: 'nickname ASC',
|
||||
};
|
||||
const params = { filter: JSON.stringify(filter) };
|
||||
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
|
||||
params,
|
||||
});
|
||||
const { data } = await getAddresses(formData.clientId);
|
||||
addressesOptions.value = data;
|
||||
|
||||
const { defaultAddress } = selectedClient.value;
|
||||
|
@ -76,15 +58,7 @@ const onClientSelected = async (formData) => {
|
|||
};
|
||||
|
||||
const fetchAvailableAgencies = async (formData) => {
|
||||
if (!formData.warehouseId || !formData.addressId || !formData.landed) return;
|
||||
let params = {
|
||||
warehouseFk: formData.warehouseId,
|
||||
addressFk: formData.addressId,
|
||||
landed: formData.landed,
|
||||
};
|
||||
|
||||
const { data } = await axios.get('Agencies/getAgenciesWithWarehouse', { params });
|
||||
|
||||
const { data } = await getAgencies(formData);
|
||||
agenciesOptions.value = data;
|
||||
|
||||
const defaultAgency = agenciesOptions.value.find(
|
||||
|
|
|
@ -9,9 +9,11 @@ import FetchData from 'components/FetchData.vue';
|
|||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import { getClient } from 'src/pages/Customer/composables/getClient';
|
||||
import { getAddresses } from 'src/pages/Customer/composables/getAddresses';
|
||||
import { getAgencies } from 'src/pages/Route/Agency/composables/getAgencies';
|
||||
|
||||
import { useState } from 'composables/useState';
|
||||
import axios from 'axios';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
@ -37,33 +39,13 @@ onBeforeMount(async () => {
|
|||
});
|
||||
|
||||
const fetchClient = async (formData) => {
|
||||
const filter = {
|
||||
include: {
|
||||
relation: 'defaultAddress',
|
||||
scope: {
|
||||
fields: ['id', 'agencyModeFk'],
|
||||
},
|
||||
},
|
||||
where: { id: formData.clientId },
|
||||
};
|
||||
const params = { filter: JSON.stringify(filter) };
|
||||
const { data } = await axios.get('Clients', { params });
|
||||
const { data } = await getClient(formData.clientId);
|
||||
const [client] = data;
|
||||
selectedClient.value = client;
|
||||
};
|
||||
|
||||
const fetchAddresses = async (formData) => {
|
||||
if (!formData.clientId) return;
|
||||
|
||||
const filter = {
|
||||
fields: ['nickname', 'street', 'city', 'id'],
|
||||
where: { isActive: true },
|
||||
order: 'nickname ASC',
|
||||
};
|
||||
const params = { filter: JSON.stringify(filter) };
|
||||
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
|
||||
params,
|
||||
});
|
||||
const { data } = await getAddresses(formData.clientId);
|
||||
addressesOptions.value = data;
|
||||
|
||||
const { defaultAddress } = selectedClient.value;
|
||||
|
@ -76,15 +58,7 @@ const onClientSelected = async (formData) => {
|
|||
};
|
||||
|
||||
const fetchAvailableAgencies = async (formData) => {
|
||||
if (!formData.warehouseId || !formData.addressId || !formData.landed) return;
|
||||
let params = {
|
||||
warehouseFk: formData.warehouseId,
|
||||
addressFk: formData.addressId,
|
||||
landed: formData.landed,
|
||||
};
|
||||
|
||||
const { data } = await axios.get('Agencies/getAgenciesWithWarehouse', { params });
|
||||
|
||||
const { data } = await getAgencies(formData);
|
||||
agenciesOptions.value = data;
|
||||
|
||||
const defaultAgency = agenciesOptions.value.find(
|
||||
|
|
|
@ -22,6 +22,9 @@ import { toTimeFormat } from 'src/filters/date';
|
|||
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||
import TicketProblems from 'src/components/TicketProblems.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import { getClient } from 'src/pages/Customer/composables/getClient';
|
||||
import { getAddresses } from 'src/pages/Customer/composables/getAddresses';
|
||||
import { getAgencies } from 'src/pages/Route/Agency/composables/getAgencies';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
@ -237,15 +240,7 @@ const onClientSelected = async (formData) => {
|
|||
};
|
||||
|
||||
const fetchAvailableAgencies = async (formData) => {
|
||||
if (!formData.warehouseId || !formData.addressId || !formData.landed) return;
|
||||
let params = {
|
||||
warehouseFk: formData.warehouseId,
|
||||
addressFk: formData.addressId,
|
||||
landed: formData.landed,
|
||||
};
|
||||
|
||||
const { data } = await axios.get('Agencies/getAgenciesWithWarehouse', { params });
|
||||
|
||||
const { data } = await getAgencies(formData);
|
||||
agenciesOptions.value = data;
|
||||
|
||||
const defaultAgency = agenciesOptions.value.find(
|
||||
|
@ -257,34 +252,13 @@ const fetchAvailableAgencies = async (formData) => {
|
|||
};
|
||||
|
||||
const fetchClient = async (formData) => {
|
||||
const filter = {
|
||||
include: {
|
||||
relation: 'defaultAddress',
|
||||
scope: {
|
||||
fields: ['id', 'agencyModeFk'],
|
||||
},
|
||||
},
|
||||
where: { id: formData.clientId },
|
||||
};
|
||||
const params = { filter: JSON.stringify(filter) };
|
||||
const { data } = await axios.get('Clients', { params });
|
||||
const { data } = await getClient(formData.clientId);
|
||||
const [client] = data;
|
||||
selectedClient.value = client;
|
||||
};
|
||||
|
||||
const fetchAddresses = async (formData) => {
|
||||
if (!formData.clientId) return;
|
||||
|
||||
const filter = {
|
||||
fields: ['nickname', 'street', 'city', 'id', 'isActive'],
|
||||
order: ['isDefaultAddress DESC', 'isActive DESC', 'nickname ASC'],
|
||||
};
|
||||
const params = { filter: JSON.stringify(filter) };
|
||||
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
|
||||
params,
|
||||
});
|
||||
addressesOptions.value = data;
|
||||
|
||||
const { data } = await getAddresses(formData.clientId);
|
||||
addressesOptions.value = data;
|
||||
|
||||
const { defaultAddress } = selectedClient.value;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import TravelDescriptor from './TravelDescriptor.vue';
|
||||
import TravelFilter from '../TravelFilter.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
|
||||
const filter = {
|
||||
const userFilter = {
|
||||
fields: [
|
||||
'id',
|
||||
'ref',
|
||||
|
@ -14,6 +13,9 @@ const filter = {
|
|||
'warehouseOutFk',
|
||||
'cargoSupplierFk',
|
||||
'agencyModeFk',
|
||||
'isRaid',
|
||||
'isDelivered',
|
||||
'isReceived',
|
||||
],
|
||||
include: [
|
||||
{
|
||||
|
@ -32,17 +34,10 @@ const filter = {
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="Travel"
|
||||
base-url="Travels"
|
||||
search-data-key="TravelList"
|
||||
:filter="filter"
|
||||
:descriptor="TravelDescriptor"
|
||||
:filter-panel="TravelFilter"
|
||||
:searchbar-props="{
|
||||
url: 'Travels/filter',
|
||||
searchUrl: 'table',
|
||||
label: 'Search travel',
|
||||
}"
|
||||
:user-filter="userFilter"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -85,7 +85,6 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
|||
|
||||
<i18n>
|
||||
es:
|
||||
Go to module index: Ir al índice del módulo
|
||||
The travel will be deleted: El envío será eliminado
|
||||
Do you want to delete this travel?: ¿Quieres eliminar este envío?
|
||||
All travels with current agency: Todos los envíos con la agencia actual
|
||||
|
|
|
@ -5,18 +5,18 @@ import { useRouter, useRoute } from 'vue-router';
|
|||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import TravelSummary from './Card/TravelSummary.vue';
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import TravelFilter from './TravelFilter.vue';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const tableRef = ref();
|
||||
const dataKey = 'TravelList';
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
|
@ -196,21 +196,23 @@ const columns = computed(() => [
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
:info="t('You can search by travel id or name')"
|
||||
:label="t('Search travel')"
|
||||
data-key="TravelList"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="travel"
|
||||
:array-data-props="{
|
||||
url: 'Travels/filter',
|
||||
order: ['landed DESC'],
|
||||
userParams: { daysOnward: 7 },
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<TravelFilter data-key="TravelList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="TravelList"
|
||||
url="Travels/filter"
|
||||
redirect="travel"
|
||||
:data-key="dataKey"
|
||||
:create="{
|
||||
urlCreate: 'Travels',
|
||||
title: t('Create Travels'),
|
||||
|
@ -220,8 +222,7 @@ const columns = computed(() => [
|
|||
},
|
||||
}"
|
||||
:right-search="false"
|
||||
:user-params="{ daysOnward: 7 }"
|
||||
order="landed DESC"
|
||||
redirect="travel"
|
||||
:columns="columns"
|
||||
:is-editable="false"
|
||||
>
|
||||
|
@ -280,6 +281,8 @@ const columns = computed(() => [
|
|||
/>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
<i18n>
|
||||
en:
|
||||
|
|
|
@ -11,7 +11,7 @@ const { t } = useI18n();
|
|||
const counters = ref({
|
||||
alquilerBandeja: { count: 0, id: 96001, title: 'CC Bandeja', isTray: true },
|
||||
bandejaRota: { count: 0, id: 88381, title: 'CC Bandeja Rota', isTray: true },
|
||||
carryOficial: { count: 0, id: 96000, title: 'CC Carry OFICIAL TAG5' },
|
||||
carryOficial: { count: 0, id: 96000, title: 'CC Carry OFICIAL TAG6' },
|
||||
candadoRojo: { count: 0, id: 96002, title: 'CC Carry NO OFICIAL' },
|
||||
sacadores: { count: 0, id: 142260, title: 'CC Sacadores' },
|
||||
sinChapa: { count: 0, id: 2214, title: 'DC Carry Sin Placa CC' },
|
||||
|
|
|
@ -10,6 +10,7 @@ import axios from 'axios';
|
|||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
import EditPictureForm from 'components/EditPictureForm.vue';
|
||||
import WorkerDescriptorMenu from './WorkerDescriptorMenu.vue';
|
||||
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -115,10 +116,13 @@ const handlePhotoUpdated = (evt = false) => {
|
|||
:value="entity.user?.emailUser?.email"
|
||||
copy
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('worker.list.department')"
|
||||
:value="entity.department ? entity.department.department.name : null"
|
||||
/>
|
||||
<VnLv :label="t('worker.list.department')">
|
||||
<template #value>
|
||||
<span class="link" v-text="entity.department?.department?.name" />
|
||||
<DepartmentDescriptorProxy :id="entity.department?.department?.id" />
|
||||
</template>
|
||||
</VnLv>
|
||||
|
||||
<VnLv :value="entity.phone">
|
||||
<template #label>
|
||||
{{ t('globals.phone') }}
|
||||
|
|
|
@ -66,7 +66,3 @@ const setData = (entity) => {
|
|||
</CardDescriptor>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Go to module index: Ir al índice del módulo
|
||||
</i18n>
|
||||
|
|
|
@ -90,7 +90,7 @@ const redirectToZoneSummary = (id) => {
|
|||
color="primary"
|
||||
@click.stop="viewSummary(props.row.id, ZoneSummary)"
|
||||
>
|
||||
<QTooltip>{{ t('zoneClosingTable.preview') }}</QTooltip>
|
||||
<QTooltip>{{ t('globals.preview') }}</QTooltip>
|
||||
</QIcon>
|
||||
</div>
|
||||
</QTd>
|
||||
|
|
|
@ -50,8 +50,7 @@ deliveryPanel:
|
|||
postcode: Postcode
|
||||
query: Query
|
||||
noEventsWarning: No service for the specified zone
|
||||
zoneClosingTable:
|
||||
preview: Preview
|
||||
|
||||
warehouses:
|
||||
deleteTitle: This item will be deleted
|
||||
deleteSubtitle: Are you sure you want to continue?
|
||||
|
|
|
@ -1,25 +1,13 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/agency',
|
||||
name: 'Agency',
|
||||
meta: {
|
||||
title: 'agency',
|
||||
icon: 'garage_home',
|
||||
moduleName: 'Agency',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'AgencyCard' },
|
||||
menus: {
|
||||
main: [],
|
||||
card: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/agency/:id',
|
||||
const agencyCard = {
|
||||
path: ':id',
|
||||
name: 'AgencyCard',
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyCard.vue'),
|
||||
redirect: { name: 'AgencySummary' },
|
||||
meta: {
|
||||
menu: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'AgencySummary',
|
||||
|
@ -28,8 +16,7 @@ export default {
|
|||
title: 'summary',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'AgencyBasicData',
|
||||
|
@ -38,8 +25,7 @@ export default {
|
|||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () =>
|
||||
import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
||||
component: () => import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'workCenter',
|
||||
|
@ -54,9 +40,7 @@ export default {
|
|||
title: 'workCenters',
|
||||
},
|
||||
component: () =>
|
||||
import(
|
||||
'src/pages/Route/Agency/Card/AgencyWorkcenter.vue'
|
||||
),
|
||||
import('src/pages/Route/Agency/Card/AgencyWorkcenter.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -87,6 +71,43 @@ export default {
|
|||
component: () => import('src/pages/Route/Agency/Card/AgencyLog.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'Agency',
|
||||
path: '/agency',
|
||||
meta: {
|
||||
title: 'agency',
|
||||
icon: 'garage_home',
|
||||
moduleName: 'Agency',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'RouteMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'AgencyMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'AgencyIndexMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'AgencyIndexMain',
|
||||
path: '',
|
||||
redirect: { name: 'AgencyList' },
|
||||
component: () => import('src/pages/Route/Agency/AgencyList.vue'),
|
||||
children: [
|
||||
{
|
||||
name: 'AgencyList',
|
||||
path: 'list',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
agencyCard,
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -12,10 +12,6 @@ import Supplier from './supplier';
|
|||
import Travel from './travel';
|
||||
import Order from './order';
|
||||
import Entry from './entry';
|
||||
import roadmap from './roadmap';
|
||||
import Parking from './parking';
|
||||
import Agency from './agency';
|
||||
import ItemType from './itemType';
|
||||
import Zone from './zone';
|
||||
import Account from './account';
|
||||
import Monitor from './monitor';
|
||||
|
@ -35,10 +31,6 @@ export default [
|
|||
Order,
|
||||
invoiceIn,
|
||||
Entry,
|
||||
roadmap,
|
||||
Parking,
|
||||
Agency,
|
||||
ItemType,
|
||||
Zone,
|
||||
Account,
|
||||
Monitor,
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
import { setRectificative } from 'src/pages/InvoiceIn/composables/setRectificative';
|
||||
export default {
|
||||
path: '/invoice-in',
|
||||
name: 'InvoiceIn',
|
||||
|
||||
const invoiceInCard = {
|
||||
name: 'InvoiceInCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInCard.vue'),
|
||||
redirect: { name: 'InvoiceInSummary' },
|
||||
meta: {
|
||||
title: 'invoiceIns',
|
||||
icon: 'vn:invoice-in',
|
||||
moduleName: 'InvoiceIn',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'InvoiceInMain' },
|
||||
menus: {
|
||||
main: ['InvoiceInList', 'InvoiceInSerial'],
|
||||
card: [
|
||||
menu: [
|
||||
'InvoiceInBasicData',
|
||||
'InvoiceInVat',
|
||||
'InvoiceInDueDay',
|
||||
|
@ -23,60 +17,13 @@ export default {
|
|||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'InvoiceInMain',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'InvoiceInList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'InvoiceInList',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/InvoiceInList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'serial',
|
||||
name: 'InvoiceInSerial',
|
||||
meta: {
|
||||
title: 'serial',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/InvoiceIn/Serial/InvoiceInSerial.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'InvoiceInCreare',
|
||||
meta: {
|
||||
title: 'invoiceInCreate',
|
||||
icon: 'create',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/InvoiceInCreate.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInCard.vue'),
|
||||
redirect: { name: 'InvoiceInSummary' },
|
||||
beforeEnter: async (to, from, next) => {
|
||||
await setRectificative(to);
|
||||
next();
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'InvoiceInSummary',
|
||||
path: 'summary',
|
||||
name: 'InvoiceInSummary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/InvoiceIn/Card/InvoiceInSummary.vue'),
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInSummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInBasicData',
|
||||
|
@ -117,15 +64,6 @@ export default {
|
|||
component: () =>
|
||||
import('src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue'),
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInLog',
|
||||
path: 'log',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInLog.vue'),
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInCorrective',
|
||||
path: 'corrective',
|
||||
|
@ -136,6 +74,71 @@ export default {
|
|||
component: () =>
|
||||
import('src/pages/InvoiceIn/Card/InvoiceInCorrective.vue'),
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInLog',
|
||||
path: 'log',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInLog.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'InvoiceIn',
|
||||
path: '/invoice-in',
|
||||
meta: {
|
||||
title: 'invoiceIns',
|
||||
icon: 'vn:invoice-in',
|
||||
moduleName: 'InvoiceIn',
|
||||
menu: ['InvoiceInList', 'InvoiceInSerial'],
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'InvoiceInMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'InvoiceInMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'InvoiceInIndexMain' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'InvoiceInIndexMain',
|
||||
redirect: { name: 'InvoiceInList' },
|
||||
component: () => import('src/pages/InvoiceIn/InvoiceInList.vue'),
|
||||
children: [
|
||||
{
|
||||
name: 'InvoiceInList',
|
||||
path: 'list',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
invoiceInCard,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'InvoiceInCreare',
|
||||
meta: {
|
||||
title: 'invoiceInCreate',
|
||||
icon: 'create',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/InvoiceInCreate.vue'),
|
||||
},
|
||||
{
|
||||
path: 'serial',
|
||||
name: 'InvoiceInSerial',
|
||||
meta: {
|
||||
title: 'serial',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/Serial/InvoiceInSerial.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue