refs #7283 itemRequestFixed
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-08-27 14:39:21 +02:00
parent 477984076b
commit 6de59c6419
3 changed files with 30 additions and 4 deletions

View File

@ -164,6 +164,7 @@ const columns = computed(() => [
{ {
title: t('Delete'), title: t('Delete'),
icon: 'delete', icon: 'delete',
isPrimary: true,
}, },
], ],
}, },

View File

@ -226,11 +226,13 @@ const columns = computed(() => [
title: t('Clone item'), title: t('Clone item'),
icon: 'vn:clone', icon: 'vn:clone',
action: cloneItem, action: cloneItem,
isPrimary: true,
}, },
{ {
title: t('view Summary'), title: t('view Summary'),
icon: 'preview', icon: 'preview',
action: (row) => viewSummary(row.id, ItemSummary), action: (row) => viewSummary(row.id, ItemSummary),
isPrimary: true,
}, },
], ],
}, },

View File

@ -9,7 +9,8 @@ import useNotify from 'src/composables/useNotify.js';
import axios from 'axios'; import axios from 'axios';
import { toDate } from 'src/filters'; import { toDate } from 'src/filters';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const { t } = useI18n(); const { t } = useI18n();
const { notify } = useNotify(); const { notify } = useNotify();
const stateStore = useStateStore(); const stateStore = useStateStore();
@ -64,7 +65,7 @@ const columns = computed(() => [
}, },
{ {
label: t('item.buyRequest.requested'), label: t('item.buyRequest.requested'),
name: 'saleQuantity', name: 'quantity',
align: 'left', align: 'left',
}, },
{ {
@ -100,7 +101,7 @@ const columns = computed(() => [
{ {
label: t('item.buyRequest.state'), label: t('item.buyRequest.state'),
name: 'state', name: 'state',
action: (row) => getState(row.isOk), format: (row) => getState(row.isOk),
align: 'left', align: 'left',
}, },
{ {
@ -333,11 +334,12 @@ onBeforeMount(() => {
/> />
</QDialog> </QDialog>
</QPage> --> </QPage> -->
<VnSubToolbar />
<VnTable <VnTable
ref="tableRef" ref="tableRef"
data-key="itemRequest" data-key="itemRequest"
url="ticketRequests/filter" url="ticketRequests/filter"
order="id DESC" order="shippedDate ASC, isOk ASC"
:columns="columns" :columns="columns"
:is-editable="true" :is-editable="true"
auto-load auto-load
@ -355,6 +357,27 @@ onBeforeMount(() => {
<WorkerDescriptorProxy :id="row.requesterFk" /> <WorkerDescriptorProxy :id="row.requesterFk" />
</span> </span>
</template> </template>
<template #column-item="{ row }">
<span @click.stop disabled="row.isOk != null">
<VnInput type="number" v-model="row.item" fill-input />
</span>
</template>
<template #column-achieved="{ row }">
<span @click.stop disabled="!request.itemFk || request.isOk != null">
<VnInput
type="number"
v-model="row.achieved"
fill-input
@keyup.enter="changeQuantity(row)"
/>
</span>
</template>
<template #column-concept="{ row }">
<span @click.stop disabled="row.isOk != null">
{{ row.itemDescription }}
</span>
</template>
</VnTable> </VnTable>
</template> </template>