#8409: Added VnSelectSupplier #1274
|
@ -146,66 +146,54 @@ const cols = computed(() => [
|
||||||
<template #advanced-menu>
|
<template #advanced-menu>
|
||||||
<InvoiceInFilter :data-key />
|
<InvoiceInFilter :data-key />
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
<template #body>
|
||||||
<template #body>
|
<VnTable
|
||||||
<VnTable
|
ref="tableRef"
|
||||||
ref="tableRef"
|
data-key="InvoiceInList"
|
||||||
data-key="InvoiceInList"
|
url="InvoiceIns/filter"
|
||||||
url="InvoiceIns/filter"
|
:order="['issued DESC', 'id DESC']"
|
||||||
:order="['issued DESC', 'id DESC']"
|
:create="{
|
||||||
:create="{
|
urlCreate: 'InvoiceIns',
|
||||||
urlCreate: 'InvoiceIns',
|
title: t('globals.createInvoiceIn'),
|
||||||
title: t('globals.createInvoiceIn'),
|
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
formInitialData: { companyFk: user.companyFk, issued: Date.vnNew() },
|
||||||
formInitialData: { companyFk: user.companyFk, issued: Date.vnNew() },
|
}"
|
||||||
}"
|
redirect="invoice-in"
|
||||||
redirect="invoice-in"
|
:columns="cols"
|
||||||
:columns="cols"
|
:right-search="false"
|
||||||
:right-search="false"
|
:disable-option="{ card: true }"
|
||||||
:disable-option="{ card: true }"
|
:auto-load="!!$route.query.table"
|
||||||
:auto-load="!!$route.query.table"
|
|
||||||
>
|
|
||||||
<template #column-supplierFk="{ row }">
|
|
||||||
<span class="link" @click.stop>
|
|
||||||
{{ row.supplierName }}
|
|
||||||
<SupplierDescriptorProxy :id="row.supplierFk" />
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
<template #more-create-dialog="{ data }">
|
|
||||||
<VnSelect
|
|
||||||
v-model="data.supplierFk"
|
|
||||||
url="Suppliers"
|
|
||||||
:fields="['id', 'nickname', 'name']"
|
|
||||||
:label="t('globals.supplier')"
|
|
||||||
option-value="id"
|
|
||||||
option-label="nickname"
|
|
||||||
:filter-options="['id', 'name', 'nickname']"
|
|
||||||
:required="true"
|
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #column-supplierFk="{ row }">
|
||||||
<QItem v-bind="scope.itemProps">
|
<span class="link" @click.stop>
|
||||||
<QItemSection>
|
{{ row.supplierName }}
|
||||||
<QItemLabel>{{ scope.opt?.nickname }}</QItemLabel>
|
<SupplierDescriptorProxy :id="row.supplierFk" />
|
||||||
<QItemLabel caption> #{{ scope.opt?.id }}, {{ scope.opt?.name }} </QItemLabel>
|
</span>
|
||||||
</QItemSection>
|
</template>
|
||||||
</QItem>
|
<template #more-create-dialog="{ data }">
|
||||||
|
<VnSelectSupplier
|
||||||
|
v-model="data.supplierFk"
|
||||||
|
hide-selected
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
<VnInput
|
||||||
|
:label="t('invoicein.list.supplierRef')"
|
||||||
jon marked this conversation as resolved
|
|||||||
|
v-model="data.supplierRef"
|
||||||
|
/>
|
||||||
|
<VnSelect
|
||||||
|
url="Companies"
|
||||||
|
:label="t('globals.company')"
|
||||||
|
:fields="['id', 'code']"
|
||||||
|
v-model="data.companyFk"
|
||||||
|
option-value="id"
|
||||||
|
option-label="code"
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
<VnInputDate
|
||||||
|
:label="t('invoicein.summary.issued')"
|
||||||
|
v-model="data.issued"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnSelect>
|
|
||||||
<VnInput
|
|
||||||
:label="t('invoicein.list.supplierRef')"
|
|
||||||
v-model="data.supplierRef"
|
|
||||||
/>
|
|
||||||
<VnSelect
|
|
||||||
url="Companies"
|
|
||||||
:label="t('globals.company')"
|
|
||||||
:fields="['id', 'code']"
|
|
||||||
v-model="data.companyFk"
|
|
||||||
option-value="id"
|
|
||||||
option-label="code"
|
|
||||||
:required="true"
|
|
||||||
/>
|
|
||||||
<VnInputDate :label="t('invoicein.summary.issued')" v-model="data.issued" />
|
|
||||||
</template>
|
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
</VnSection>
|
</VnSection>
|
||||||
|
|
Loading…
Reference in New Issue
bien visto