forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7663-setWeight
This commit is contained in:
commit
af5e47ed3e
|
@ -2,10 +2,6 @@
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
maxLength: {
|
|
||||||
type: Number,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
|
|
|
@ -261,6 +261,7 @@ globals:
|
||||||
ticketsMonitor: Tickets monitor
|
ticketsMonitor: Tickets monitor
|
||||||
clientsActionsMonitor: Clients and actions
|
clientsActionsMonitor: Clients and actions
|
||||||
serial: Serial
|
serial: Serial
|
||||||
|
medical: Mutual
|
||||||
created: Created
|
created: Created
|
||||||
worker: Worker
|
worker: Worker
|
||||||
now: Now
|
now: Now
|
||||||
|
@ -879,6 +880,7 @@ worker:
|
||||||
timeControl: Time control
|
timeControl: Time control
|
||||||
locker: Locker
|
locker: Locker
|
||||||
balance: Balance
|
balance: Balance
|
||||||
|
medical: Medical
|
||||||
list:
|
list:
|
||||||
name: Name
|
name: Name
|
||||||
email: Email
|
email: Email
|
||||||
|
@ -958,6 +960,15 @@ worker:
|
||||||
amount: Importe
|
amount: Importe
|
||||||
remark: Bonficado
|
remark: Bonficado
|
||||||
hasDiploma: Diploma
|
hasDiploma: Diploma
|
||||||
|
medical:
|
||||||
|
tableVisibleColumns:
|
||||||
|
date: Date
|
||||||
|
time: Hour
|
||||||
|
center: Formation Center
|
||||||
|
invoice: Invoice
|
||||||
|
amount: Amount
|
||||||
|
isFit: Fit
|
||||||
|
remark: Observations
|
||||||
imageNotFound: Image not found
|
imageNotFound: Image not found
|
||||||
balance:
|
balance:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
|
|
@ -265,6 +265,7 @@ globals:
|
||||||
ticketsMonitor: Monitor de tickets
|
ticketsMonitor: Monitor de tickets
|
||||||
clientsActionsMonitor: Clientes y acciones
|
clientsActionsMonitor: Clientes y acciones
|
||||||
serial: Facturas por serie
|
serial: Facturas por serie
|
||||||
|
medical: Mutua
|
||||||
created: Fecha creación
|
created: Fecha creación
|
||||||
worker: Trabajador
|
worker: Trabajador
|
||||||
now: Ahora
|
now: Ahora
|
||||||
|
@ -882,6 +883,8 @@ worker:
|
||||||
timeControl: Control de horario
|
timeControl: Control de horario
|
||||||
locker: Taquilla
|
locker: Taquilla
|
||||||
balance: Balance
|
balance: Balance
|
||||||
|
formation: Formación
|
||||||
|
medical: Mutua
|
||||||
list:
|
list:
|
||||||
name: Nombre
|
name: Nombre
|
||||||
email: Email
|
email: Email
|
||||||
|
@ -952,6 +955,15 @@ worker:
|
||||||
amount: Importe
|
amount: Importe
|
||||||
remark: Bonficado
|
remark: Bonficado
|
||||||
hasDiploma: Diploma
|
hasDiploma: Diploma
|
||||||
|
medical:
|
||||||
|
tableVisibleColumns:
|
||||||
|
date: Fecha
|
||||||
|
time: Hora
|
||||||
|
center: Centro de Formación
|
||||||
|
invoice: Factura
|
||||||
|
amount: Importe
|
||||||
|
isFit: Apto
|
||||||
|
remark: Observaciones
|
||||||
imageNotFound: No se ha encontrado la imagen
|
imageNotFound: No se ha encontrado la imagen
|
||||||
balance:
|
balance:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
|
|
@ -423,7 +423,7 @@ const lockIconType = (groupingMode, mode) => {
|
||||||
<span v-if="props.row.item.subName" class="subName">
|
<span v-if="props.row.item.subName" class="subName">
|
||||||
{{ props.row.item.subName }}
|
{{ props.row.item.subName }}
|
||||||
</span>
|
</span>
|
||||||
<FetchedTags :item="props.row.item" :max-length="5" />
|
<FetchedTags :item="props.row.item" />
|
||||||
</QTd>
|
</QTd>
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -319,7 +319,7 @@ const fetchEntryBuys = async () => {
|
||||||
<span v-if="row.item.subName" class="subName">
|
<span v-if="row.item.subName" class="subName">
|
||||||
{{ row.item.subName }}
|
{{ row.item.subName }}
|
||||||
</span>
|
</span>
|
||||||
<FetchedTags :item="row.item" :max-length="5" />
|
<FetchedTags :item="row.item" />
|
||||||
</QTd>
|
</QTd>
|
||||||
</QTr>
|
</QTr>
|
||||||
<!-- Esta última row es utilizada para agregar un espaciado y así marcar una diferencia visual entre los diferentes buys -->
|
<!-- Esta última row es utilizada para agregar un espaciado y así marcar una diferencia visual entre los diferentes buys -->
|
||||||
|
|
|
@ -436,7 +436,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
{{ row.name }}
|
{{ row.name }}
|
||||||
</span>
|
</span>
|
||||||
<ItemDescriptorProxy :id="row.itemFk" />
|
<ItemDescriptorProxy :id="row.itemFk" />
|
||||||
<FetchedTags :item="row" :max-length="6" />
|
<FetchedTags :item="row" />
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-groupingPrice="props">
|
<template #body-cell-groupingPrice="props">
|
||||||
|
|
|
@ -517,7 +517,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
<template #body-cell-description="{ row }">
|
<template #body-cell-description="{ row }">
|
||||||
<QTd class="col">
|
<QTd class="col">
|
||||||
<span>{{ row.name }} {{ row.subName }}</span>
|
<span>{{ row.name }} {{ row.subName }}</span>
|
||||||
<FetchedTags :item="row" :max-length="6" />
|
<FetchedTags :item="row" />
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-isActive="{ row }">
|
<template #body-cell-isActive="{ row }">
|
||||||
|
|
|
@ -380,21 +380,6 @@ function addOrder(value, field, params) {
|
||||||
@click="tagValues.push({})"
|
@click="tagValues.push({})"
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
<!-- <QItem>
|
|
||||||
<QItemSection class="q-py-sm">
|
|
||||||
<QBtn
|
|
||||||
:label="t('Search')"
|
|
||||||
class="full-width"
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
icon="search"
|
|
||||||
rounded
|
|
||||||
type="button"
|
|
||||||
unelevated
|
|
||||||
@click.stop="applyTagFilter(params, searchFn)"
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem> -->
|
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
</template>
|
</template>
|
||||||
</VnFilterPanel>
|
</VnFilterPanel>
|
||||||
|
|
|
@ -77,10 +77,6 @@ const addToOrder = async () => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// .container {
|
|
||||||
// max-width: 768px;
|
|
||||||
// width: 100%;
|
|
||||||
// }
|
|
||||||
.td {
|
.td {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import FetchData from 'src/components/FetchData.vue';
|
||||||
import VnImg from 'src/components/ui/VnImg.vue';
|
import VnImg from 'src/components/ui/VnImg.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||||
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -280,7 +281,12 @@ watch(
|
||||||
<VnImg :id="parseInt(row?.item?.image)" class="rounded" />
|
<VnImg :id="parseInt(row?.item?.image)" class="rounded" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template #column-id="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row?.item?.id }}
|
||||||
|
<ItemDescriptorProxy :id="row?.item?.id" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<template #column-itemFk="{ row }">
|
<template #column-itemFk="{ row }">
|
||||||
<div class="row column full-width justify-between items-start">
|
<div class="row column full-width justify-between items-start">
|
||||||
{{ row?.item?.name }}
|
{{ row?.item?.name }}
|
||||||
|
@ -288,7 +294,7 @@ watch(
|
||||||
{{ row?.item?.subName.toUpperCase() }}
|
{{ row?.item?.subName.toUpperCase() }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<FetchedTags :item="row?.item" :max-length="6" />
|
<FetchedTags :item="row?.item" />
|
||||||
</template>
|
</template>
|
||||||
<template #column-amount="{ row }">
|
<template #column-amount="{ row }">
|
||||||
{{ toCurrency(row.quantity * row.price) }}
|
{{ toCurrency(row.quantity * row.price) }}
|
||||||
|
|
|
@ -192,7 +192,7 @@ const detailsColumns = ref([
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<FetchedTags :item="props.row.item" :max-length="5" />
|
<FetchedTags :item="props.row.item" />
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd key="quantity" :props="props">
|
<QTd key="quantity" :props="props">
|
||||||
{{ props.row.quantity }}
|
{{ props.row.quantity }}
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { ref } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
import { dashIfEmpty } from 'src/filters';
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||||
|
@ -58,6 +59,9 @@ const loadVolumes = async (rows) => {
|
||||||
});
|
});
|
||||||
volumes.value = rows;
|
volumes.value = rows;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const stateStore = useStateStore();
|
||||||
|
onMounted(async () => (stateStore.rightDrawer = false));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -84,6 +88,7 @@ const loadVolumes = async (rows) => {
|
||||||
@on-fetch="(data) => loadVolumes(data)"
|
@on-fetch="(data) => loadVolumes(data)"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:column-search="false"
|
:column-search="false"
|
||||||
|
:disable-option="{ card: true }"
|
||||||
>
|
>
|
||||||
<template #column-itemFk="{ row }">
|
<template #column-itemFk="{ row }">
|
||||||
<span class="link">
|
<span class="link">
|
||||||
|
@ -92,7 +97,13 @@ const loadVolumes = async (rows) => {
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-description="{ row }">
|
<template #column-description="{ row }">
|
||||||
<FetchedTags :item="row.item" :max-length="5" />
|
<div class="row column full-width justify-between items-start">
|
||||||
|
{{ row?.item?.name }}
|
||||||
|
<div v-if="row?.item?.subName" class="subName">
|
||||||
|
{{ row?.item?.subName.toUpperCase() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<FetchedTags :item="row?.item" />
|
||||||
</template>
|
</template>
|
||||||
<template #column-volume="{ rowIndex }">
|
<template #column-volume="{ rowIndex }">
|
||||||
{{ volumes?.[rowIndex]?.volume }}
|
{{ volumes?.[rowIndex]?.volume }}
|
||||||
|
@ -121,6 +132,11 @@ const loadVolumes = async (rows) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subName {
|
||||||
|
color: var(--vn-label-color);
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
|
|
|
@ -11,6 +11,9 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import OrderSearchbar from './Card/OrderSearchbar.vue';
|
import OrderSearchbar from './Card/OrderSearchbar.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import OrderFilter from './Card/OrderFilter.vue';
|
import OrderFilter from './Card/OrderFilter.vue';
|
||||||
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import { toDateTimeFormat } from 'src/filters/date';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
@ -75,7 +78,7 @@ const columns = computed(() => [
|
||||||
label: t('module.created'),
|
label: t('module.created'),
|
||||||
component: 'date',
|
component: 'date',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
format: (row) => toDate(row?.landed),
|
format: (row) => toDateTimeFormat(row?.landed),
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
|
@ -115,6 +118,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
columnClass: 'expand',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -132,6 +136,7 @@ const columns = computed(() => [
|
||||||
title: t('InvoiceOutSummary'),
|
title: t('InvoiceOutSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, OrderSummary),
|
action: (row) => viewSummary(row.id, OrderSummary),
|
||||||
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -154,6 +159,16 @@ async function fetchAgencies({ landed, addressId }) {
|
||||||
});
|
});
|
||||||
agencyList.value = data;
|
agencyList.value = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getDateColor = (date) => {
|
||||||
|
const today = Date.vnNew();
|
||||||
|
today.setHours(0, 0, 0, 0);
|
||||||
|
const timeTicket = new Date(date);
|
||||||
|
timeTicket.setHours(0, 0, 0, 0);
|
||||||
|
const comparation = today - timeTicket;
|
||||||
|
if (comparation == 0) return 'bg-warning';
|
||||||
|
if (comparation < 0) return 'bg-success';
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<OrderSearchbar />
|
<OrderSearchbar />
|
||||||
|
@ -183,6 +198,25 @@ async function fetchAgencies({ landed, addressId }) {
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
redirect="order"
|
redirect="order"
|
||||||
>
|
>
|
||||||
|
<template #column-clientFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row?.clientName }}
|
||||||
|
<CustomerDescriptorProxy :id="row?.clientFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-salesPersonFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row?.name }}
|
||||||
|
<WorkerDescriptorProxy :id="row?.salesPersonFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-landed="{ row }">
|
||||||
|
<span v-if="getDateColor(row.landed)">
|
||||||
|
<QChip :class="getDateColor(row.landed)" dense square>
|
||||||
|
{{ toDate(row?.landed) }}
|
||||||
|
</QChip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Clients"
|
url="Clients"
|
||||||
|
|
|
@ -208,7 +208,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<QTd no-hover>
|
<QTd no-hover>
|
||||||
<span>{{ buy.subName }}</span>
|
<span>{{ buy.subName }}</span>
|
||||||
<FetchedTags :item="buy" :max-length="5" />
|
<FetchedTags :item="buy" />
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd no-hover> {{ dashIfEmpty(buy.quantity) }}</QTd>
|
<QTd no-hover> {{ dashIfEmpty(buy.quantity) }}</QTd>
|
||||||
<QTd no-hover> {{ dashIfEmpty(buy.price) }}</QTd>
|
<QTd no-hover> {{ dashIfEmpty(buy.price) }}</QTd>
|
||||||
|
|
|
@ -245,7 +245,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<span>{{ row.item.name }}</span>
|
<span>{{ row.item.name }}</span>
|
||||||
<span class="color-vn-label">{{ row.item.subName }}</span>
|
<span class="color-vn-label">{{ row.item.subName }}</span>
|
||||||
<FetchedTags :item="row.item" :max-length="6" />
|
<FetchedTags :item="row.item" />
|
||||||
</div>
|
</div>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -310,7 +310,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<span>{{ row.item.name }}</span>
|
<span>{{ row.item.name }}</span>
|
||||||
<span class="color-vn-label">{{ row.item.subName }}</span>
|
<span class="color-vn-label">{{ row.item.subName }}</span>
|
||||||
<FetchedTags :item="row.item" :max-length="6" />
|
<FetchedTags :item="row.item" />
|
||||||
</div>
|
</div>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -656,7 +656,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<span>{{ row.concept }}</span>
|
<span>{{ row.concept }}</span>
|
||||||
<span class="color-vn-label">{{ row.item?.subName }}</span>
|
<span class="color-vn-label">{{ row.item?.subName }}</span>
|
||||||
<FetchedTags v-if="row.item" :item="row.item" :max-length="6" />
|
<FetchedTags v-if="row.item" :item="row.item" />
|
||||||
<QPopupProxy v-if="row.id && isTicketEditable">
|
<QPopupProxy v-if="row.id && isTicketEditable">
|
||||||
<VnInput v-model="row.concept" @change="updateConcept(row)" />
|
<VnInput v-model="row.concept" @change="updateConcept(row)" />
|
||||||
</QPopupProxy>
|
</QPopupProxy>
|
||||||
|
|
|
@ -412,7 +412,7 @@ const qCheckBoxController = (sale, action) => {
|
||||||
<span v-if="row.subName" class="color-vn-label">
|
<span v-if="row.subName" class="color-vn-label">
|
||||||
{{ row.subName }}
|
{{ row.subName }}
|
||||||
</span>
|
</span>
|
||||||
<FetchedTags :item="row" :max-length="6" tag="value" />
|
<FetchedTags :item="row" tag="value" />
|
||||||
</div>
|
</div>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -391,7 +391,6 @@ async function changeState(value) {
|
||||||
<FetchedTags
|
<FetchedTags
|
||||||
class="fetched-tags"
|
class="fetched-tags"
|
||||||
:item="props.row.item"
|
:item="props.row.item"
|
||||||
:max-length="5"
|
|
||||||
></FetchedTags>
|
></FetchedTags>
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd>{{ props.row.price }} €</QTd>
|
<QTd>{{ props.row.price }} €</QTd>
|
||||||
|
|
|
@ -145,7 +145,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<span>{{ row.item.name }}</span>
|
<span>{{ row.item.name }}</span>
|
||||||
<span class="color-vn-label">{{ row.item.subName }}</span>
|
<span class="color-vn-label">{{ row.item.subName }}</span>
|
||||||
<FetchedTags :item="row.item" :max-length="6" />
|
<FetchedTags :item="row.item" />
|
||||||
</div>
|
</div>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -0,0 +1,91 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref, computed } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
|
const tableRef = ref();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
const entityId = computed(() => route.params.id);
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'date',
|
||||||
|
label: t('worker.medical.tableVisibleColumns.date'),
|
||||||
|
create: true,
|
||||||
|
component: 'date',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'time',
|
||||||
|
label: t('worker.medical.tableVisibleColumns.time'),
|
||||||
|
create: true,
|
||||||
|
component: 'time',
|
||||||
|
attrs: {
|
||||||
|
timeOnly: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'centerFk',
|
||||||
|
label: t('worker.medical.tableVisibleColumns.center'),
|
||||||
|
create: true,
|
||||||
|
component: 'select',
|
||||||
|
attrs: {
|
||||||
|
url: 'medicalCenters',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'invoice',
|
||||||
|
label: t('worker.medical.tableVisibleColumns.invoice'),
|
||||||
|
create: true,
|
||||||
|
component: 'input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'amount',
|
||||||
|
label: t('worker.medical.tableVisibleColumns.amount'),
|
||||||
|
create: true,
|
||||||
|
component: 'input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'isFit',
|
||||||
|
label: t('worker.medical.tableVisibleColumns.isFit'),
|
||||||
|
create: true,
|
||||||
|
component: 'checkbox',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'remark',
|
||||||
|
label: t('worker.medical.tableVisibleColumns.remark'),
|
||||||
|
create: true,
|
||||||
|
component: 'input',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<VnTable
|
||||||
|
ref="tableRef"
|
||||||
|
data-key="WorkerMedical"
|
||||||
|
:url="`Workers/${entityId}/medicalReview`"
|
||||||
|
save-url="MedicalReviews/crud"
|
||||||
|
:create="{
|
||||||
|
urlCreate: 'medicalReviews',
|
||||||
|
title: t('Create medicalReview'),
|
||||||
|
onDataSaved: () => tableRef.reload(),
|
||||||
|
formInitialData: {
|
||||||
|
workerFk: entityId,
|
||||||
|
},
|
||||||
|
}"
|
||||||
|
order="date DESC"
|
||||||
|
:columns="columns"
|
||||||
|
auto-load
|
||||||
|
:right-search="false"
|
||||||
|
:is-editable="true"
|
||||||
|
:use-model="true"
|
||||||
|
/>
|
||||||
|
</template>
|
|
@ -25,6 +25,7 @@ export default {
|
||||||
'WorkerLocker',
|
'WorkerLocker',
|
||||||
'WorkerBalance',
|
'WorkerBalance',
|
||||||
'WorkerFormation',
|
'WorkerFormation',
|
||||||
|
'WorkerMedical',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
@ -196,6 +197,15 @@ export default {
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Worker/Card/WorkerFormation.vue'),
|
component: () => import('src/pages/Worker/Card/WorkerFormation.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'WorkerMedical',
|
||||||
|
path: 'medical',
|
||||||
|
meta: {
|
||||||
|
title: 'medical',
|
||||||
|
icon: 'medical_information',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Worker/Card/WorkerMedical.vue'),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue