0
0
Fork 0

perf: improve style

This commit is contained in:
Javier Segarra 2024-09-13 15:16:40 +02:00
parent d347a81d74
commit 6e6af0af80
1 changed files with 44 additions and 66 deletions

View File

@ -76,53 +76,28 @@ const columns = computed(() => [
name: 'rate2', name: 'rate2',
...defaultColumnAttrs, ...defaultColumnAttrs,
cardVisible: true, cardVisible: true,
columnField: {
class: 'expand',
component: 'input', component: 'input',
type: 'number', type: 'number',
}, },
columnFilter: {
class: 'expand',
component: 'input',
type: 'number',
},
},
{ {
label: t('item.fixedPrice.packingPrice'), label: t('item.fixedPrice.packingPrice'),
field: 'rate3', field: 'rate3',
name: 'rate3', name: 'rate3',
...defaultColumnAttrs, ...defaultColumnAttrs,
cardVisible: true, cardVisible: true,
columnField: {
class: 'expand',
component: 'input', component: 'input',
type: 'number', type: 'number',
}, },
columnFilter: {
class: 'expand',
component: 'input',
type: 'number',
},
},
{ {
label: t('item.fixedPrice.minPrice'), label: t('item.fixedPrice.minPrice'),
field: 'minPrice', field: 'minPrice',
columnClass: 'shrink',
name: 'minPrice', name: 'minPrice',
...defaultColumnAttrs, ...defaultColumnAttrs,
cardVisible: true, cardVisible: true,
columnField: {
class: 'expand',
component: 'input', component: 'input',
type: 'number', type: 'number',
}, },
columnFilter: {
class: 'expand',
component: 'input',
type: 'number',
},
},
{ {
label: t('item.fixedPrice.started'), label: t('item.fixedPrice.started'),
field: 'started', field: 'started',
@ -162,17 +137,10 @@ const columns = computed(() => [
name: 'warehouseFk', name: 'warehouseFk',
...defaultColumnAttrs, ...defaultColumnAttrs,
columnClass: 'shrink', columnClass: 'shrink',
columnFilter: {
component: 'select', component: 'select',
},
columnField: {
component: 'select',
class: 'expand',
},
attrs: {
options: warehousesOptions, options: warehousesOptions,
}, },
},
{ {
align: 'right', align: 'right',
name: 'tableActions', name: 'tableActions',
@ -518,29 +486,35 @@ function handleOnDataSave({ CrudModelRef }) {
</span> </span>
<span class="subName">{{ row.subName }}</span> <span class="subName">{{ row.subName }}</span>
<ItemDescriptorProxy :id="row.itemFk" /> <ItemDescriptorProxy :id="row.itemFk" />
<FetchedTags style="width: max-content; max-width: 220px" :item="row" /> <FetchedTags :item="row" />
</template> </template>
<template #column-rate2="props"> <template #column-rate2="props">
<QTd class="col">
<VnInput <VnInput
mask="###.##" type="currency"
style="width: 75px"
v-model.number="props.row.rate2" v-model.number="props.row.rate2"
v-on="getRowUpdateInputEvents(props)" v-on="getRowUpdateInputEvents(props)"
> >
<template #append></template> <template #append></template>
</VnInput> </VnInput>
</QTd>
</template> </template>
<template #column-rate3="props"> <template #column-rate3="props">
<QTd class="col">
<VnInput <VnInput
mask="###.##" style="width: 75px"
type="currency"
v-model.number="props.row.rate3" v-model.number="props.row.rate3"
v-on="getRowUpdateInputEvents(props)" v-on="getRowUpdateInputEvents(props)"
> >
<template #append></template> <template #append></template>
</VnInput> </VnInput>
</QTd>
</template> </template>
<template #column-minPrice="props"> <template #column-minPrice="props">
<QTd class="col"> <QTd class="col">
<div class="row" style="width: 115px"> <div class="row">
<QCheckbox <QCheckbox
:model-value="props.row.hasMinPrice" :model-value="props.row.hasMinPrice"
@update:model-value="updateMinPrice($event, props)" @update:model-value="updateMinPrice($event, props)"
@ -549,6 +523,8 @@ function handleOnDataSave({ CrudModelRef }) {
/> />
<VnInput <VnInput
class="col" class="col"
type="currency"
mask="###.##"
:disable="props.row.hasMinPrice === 1" :disable="props.row.hasMinPrice === 1"
v-model.number="props.row.minPrice" v-model.number="props.row.minPrice"
v-on="getRowUpdateInputEvents(props)" v-on="getRowUpdateInputEvents(props)"
@ -577,6 +553,7 @@ function handleOnDataSave({ CrudModelRef }) {
/> />
</template> </template>
<template #column-warehouseFk="props"> <template #column-warehouseFk="props">
<QTd class="col">
<VnSelect <VnSelect
style="max-width: 150px" style="max-width: 150px"
:options="warehousesOptions" :options="warehousesOptions"
@ -586,6 +563,7 @@ function handleOnDataSave({ CrudModelRef }) {
v-model="props.row.warehouseFk" v-model="props.row.warehouseFk"
v-on="getRowUpdateInputEvents(props, false, 'select')" v-on="getRowUpdateInputEvents(props, false, 'select')"
/> />
</QTd>
</template> </template>
<template #column-deleteAction="{ row, rowIndex }"> <template #column-deleteAction="{ row, rowIndex }">
<QIcon <QIcon