127 lines
3.1 KiB
Vue
127 lines
3.1 KiB
Vue
<script setup>
|
|
import { ref } from 'vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
|
import VnTable from 'components/VnTable/VnTable.vue';
|
|
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
|
|
|
const { t } = useI18n();
|
|
const tableRef = ref();
|
|
const $props = defineProps({
|
|
workerFk: {
|
|
type: Number,
|
|
required: true,
|
|
},
|
|
dated: {
|
|
type: Date,
|
|
required: true,
|
|
},
|
|
});
|
|
const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}&dated=${$props.dated}`;
|
|
const columns = [
|
|
{
|
|
align: 'right',
|
|
label: t('Entry'),
|
|
name: 'entryFk',
|
|
isTitle: true,
|
|
isId: true,
|
|
columnFilter: false,
|
|
},
|
|
{
|
|
align: 'right',
|
|
name: 'itemFk',
|
|
label: t('Item'),
|
|
columnFilter: false,
|
|
},
|
|
{
|
|
align: 'left',
|
|
label: t('Name'),
|
|
name: 'itemName',
|
|
create: true,
|
|
columnClass: 'expand',
|
|
columnFilter: false,
|
|
cardVisible: true,
|
|
},
|
|
{
|
|
align: 'right',
|
|
name: 'volume',
|
|
label: t('Volume'),
|
|
columnFilter: false,
|
|
cardVisible: true,
|
|
},
|
|
{
|
|
align: 'right',
|
|
label: t('Packaging'),
|
|
name: 'packagingFk',
|
|
columnFilter: false,
|
|
cardVisible: true,
|
|
},
|
|
{
|
|
align: 'right',
|
|
label: 'Packing',
|
|
name: 'packing',
|
|
columnFilter: false,
|
|
cardVisible: true,
|
|
},
|
|
];
|
|
</script>
|
|
<template>
|
|
<QDialog>
|
|
<div class="container">
|
|
<VnTable
|
|
ref="tableRef"
|
|
data-key="StockBoughtsDetail"
|
|
:url="customUrl"
|
|
order="volume DESC"
|
|
:columns="columns"
|
|
:right-search="false"
|
|
:disable-infinite-scroll="true"
|
|
:disable-option="{ card: true }"
|
|
:limit="0"
|
|
:without-header="true"
|
|
:with-filters="false"
|
|
auto-load
|
|
>
|
|
<template #column-entryFk="{ row }">
|
|
<span class="link">
|
|
{{ row?.entryFk }}
|
|
<EntryDescriptorProxy :id="row.entryFk" />
|
|
</span>
|
|
</template>
|
|
<template #column-itemName="{ row }">
|
|
<span class="link">
|
|
{{ row?.itemName }}
|
|
<ItemDescriptorProxy :id="row.itemFk" />
|
|
</span>
|
|
</template>
|
|
</VnTable>
|
|
</div>
|
|
</QDialog>
|
|
</template>
|
|
<style lang="css" scoped>
|
|
.container {
|
|
max-width: 100%;
|
|
width: 50%;
|
|
overflow: auto;
|
|
justify-content: center;
|
|
align-items: center;
|
|
margin: auto;
|
|
background-color: var(--vn-section-color);
|
|
padding: 2%;
|
|
}
|
|
</style>
|
|
<i18n>
|
|
es:
|
|
Buyer: Comprador
|
|
Reserve: Reservado
|
|
Bought: Comprado
|
|
More: Más
|
|
Date: Fecha
|
|
Entry: Entrada
|
|
Item: Artículo
|
|
Name: Nombre
|
|
Volume: Volumen
|
|
Packaging: Embalage
|
|
</i18n>
|