Merge pull request 'HOTFIX: itemFixedPrice' (!755) from hotfix_itemFixedPrice into master
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #755 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
0b47623011
|
@ -1184,7 +1184,7 @@ item:
|
|||
producer: Producer
|
||||
landed: Landed
|
||||
fixedPrice:
|
||||
itemId: Item ID
|
||||
itemFk: Item ID
|
||||
groupingPrice: Grouping price
|
||||
packingPrice: Packing price
|
||||
hasMinPrice: Has min price
|
||||
|
|
|
@ -1168,7 +1168,7 @@ item:
|
|||
producer: Productor
|
||||
landed: F. entrega
|
||||
fixedPrice:
|
||||
itemId: ID Artículo
|
||||
itemFk: ID Artículo
|
||||
groupingPrice: Precio grouping
|
||||
packingPrice: Precio packing
|
||||
hasMinPrice: Tiene precio mínimo
|
||||
|
|
|
@ -36,23 +36,23 @@ const user = state.getUser();
|
|||
const fixedPrices = ref([]);
|
||||
const warehousesOptions = ref([]);
|
||||
const rowsSelected = ref([]);
|
||||
|
||||
const itemFixedPriceFilterRef = ref();
|
||||
|
||||
const params = reactive({});
|
||||
const defaultColumnAttrs = {
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
params.warehouseFk = user.value.warehouseFk;
|
||||
});
|
||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||
|
||||
const defaultColumnAttrs = {
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
};
|
||||
const columns = computed(() => [
|
||||
{
|
||||
label: t('item.fixedPrice.itemId'),
|
||||
name: 'itemId',
|
||||
label: t('item.fixedPrice.itemFk'),
|
||||
name: 'itemFk',
|
||||
...defaultColumnAttrs,
|
||||
isId: true,
|
||||
cardVisible: true,
|
||||
|
@ -76,53 +76,28 @@ const columns = computed(() => [
|
|||
name: 'rate2',
|
||||
...defaultColumnAttrs,
|
||||
cardVisible: true,
|
||||
columnField: {
|
||||
class: 'expand',
|
||||
component: 'input',
|
||||
type: 'number',
|
||||
},
|
||||
columnFilter: {
|
||||
class: 'expand',
|
||||
component: 'input',
|
||||
type: 'number',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('item.fixedPrice.packingPrice'),
|
||||
field: 'rate3',
|
||||
name: 'rate3',
|
||||
...defaultColumnAttrs,
|
||||
cardVisible: true,
|
||||
columnField: {
|
||||
class: 'expand',
|
||||
component: 'input',
|
||||
type: 'number',
|
||||
},
|
||||
columnFilter: {
|
||||
class: 'expand',
|
||||
component: 'input',
|
||||
type: 'number',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
label: t('item.fixedPrice.minPrice'),
|
||||
field: 'minPrice',
|
||||
columnClass: 'shrink',
|
||||
name: 'minPrice',
|
||||
...defaultColumnAttrs,
|
||||
cardVisible: true,
|
||||
columnField: {
|
||||
class: 'expand',
|
||||
component: 'input',
|
||||
type: 'number',
|
||||
},
|
||||
columnFilter: {
|
||||
class: 'expand',
|
||||
component: 'input',
|
||||
type: 'number',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('item.fixedPrice.started'),
|
||||
field: 'started',
|
||||
|
@ -162,17 +137,10 @@ const columns = computed(() => [
|
|||
name: 'warehouseFk',
|
||||
...defaultColumnAttrs,
|
||||
columnClass: 'shrink',
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
},
|
||||
columnField: {
|
||||
component: 'select',
|
||||
class: 'expand',
|
||||
},
|
||||
attrs: {
|
||||
|
||||
options: warehousesOptions,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
name: 'tableActions',
|
||||
|
@ -458,7 +426,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
:default-save="false"
|
||||
data-key="ItemFixedPrices"
|
||||
url="FixedPrices/filter"
|
||||
:order="['itemFk ASC']"
|
||||
:order="['description DESC']"
|
||||
save-url="FixedPrices/crud"
|
||||
:user-params="{ warehouseFk: user.warehouseFk }"
|
||||
ref="tableRef"
|
||||
|
@ -492,7 +460,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
<QCheckbox flat v-model="scope.selected" />
|
||||
</template>
|
||||
|
||||
<template #column-itemId="props">
|
||||
<template #column-itemFk="props">
|
||||
<VnSelect
|
||||
style="max-width: 100px"
|
||||
url="Items/withName"
|
||||
|
@ -518,29 +486,35 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
</span>
|
||||
<span class="subName">{{ row.subName }}</span>
|
||||
<ItemDescriptorProxy :id="row.itemFk" />
|
||||
<FetchedTags style="width: max-content; max-width: 220px" :item="row" />
|
||||
<FetchedTags :item="row" />
|
||||
</template>
|
||||
<template #column-rate2="props">
|
||||
<QTd class="col">
|
||||
<VnInput
|
||||
mask="###.##"
|
||||
type="currency"
|
||||
style="width: 75px"
|
||||
v-model.number="props.row.rate2"
|
||||
v-on="getRowUpdateInputEvents(props)"
|
||||
>
|
||||
<template #append>€</template>
|
||||
</VnInput>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #column-rate3="props">
|
||||
<QTd class="col">
|
||||
<VnInput
|
||||
mask="###.##"
|
||||
style="width: 75px"
|
||||
type="currency"
|
||||
v-model.number="props.row.rate3"
|
||||
v-on="getRowUpdateInputEvents(props)"
|
||||
>
|
||||
<template #append>€</template>
|
||||
</VnInput>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #column-minPrice="props">
|
||||
<QTd class="col">
|
||||
<div class="row" style="width: 115px">
|
||||
<div class="row">
|
||||
<QCheckbox
|
||||
:model-value="props.row.hasMinPrice"
|
||||
@update:model-value="updateMinPrice($event, props)"
|
||||
|
@ -549,6 +523,8 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
/>
|
||||
<VnInput
|
||||
class="col"
|
||||
type="currency"
|
||||
mask="###.##"
|
||||
:disable="props.row.hasMinPrice === 1"
|
||||
v-model.number="props.row.minPrice"
|
||||
v-on="getRowUpdateInputEvents(props)"
|
||||
|
@ -577,6 +553,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
/>
|
||||
</template>
|
||||
<template #column-warehouseFk="props">
|
||||
<QTd class="col">
|
||||
<VnSelect
|
||||
style="max-width: 150px"
|
||||
:options="warehousesOptions"
|
||||
|
@ -586,6 +563,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
v-model="props.row.warehouseFk"
|
||||
v-on="getRowUpdateInputEvents(props, false, 'select')"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #column-deleteAction="{ row, rowIndex }">
|
||||
<QIcon
|
||||
|
|
Loading…
Reference in New Issue