refactor: refs #7553 modified QDrawer and table columns
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
1889aa85b5
commit
f5eacea483
|
@ -1,11 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted, onUnmounted, watch, nextTick } from 'vue';
|
import { ref, computed, onUnmounted, watch, nextTick } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
@ -42,28 +41,36 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('volume.item'),
|
label: t('volume.item'),
|
||||||
name: 'itemFk',
|
name: 'itemFk',
|
||||||
|
chip: {
|
||||||
|
condition: () => true,
|
||||||
|
},
|
||||||
|
isId: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('volume.description'),
|
label: t('volume.description'),
|
||||||
name: 'concept',
|
name: 'concept',
|
||||||
columnClass: 'expand',
|
columnClass: 'expand',
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('volume.packingType'),
|
label: t('volume.packingType'),
|
||||||
name: 'itemPackingTypeFk',
|
name: 'itemPackingTypeFk',
|
||||||
|
cardVisible: true,
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.item.itemPackingTypeFk),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.item.itemPackingTypeFk),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('volume.quantity'),
|
label: t('volume.quantity'),
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('volume.volumeQuantity'),
|
label: t('volume.volumeQuantity'),
|
||||||
name: 'volume',
|
name: 'volume',
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -86,10 +93,6 @@ const applyVolumes = async (salesData) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
stateStore.rightDrawer = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -101,28 +104,32 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
@on-fetch="(data) => applyVolumes(data)"
|
@on-fetch="(data) => applyVolumes(data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<RightMenu v-if="packingTypeVolume.length">
|
<QDrawer
|
||||||
<template #right-panel>
|
v-if="packingTypeVolume.length"
|
||||||
<QCard
|
side="right"
|
||||||
v-for="(packingType, index) in packingTypeVolume"
|
:width="270"
|
||||||
:key="index"
|
v-model="stateStore.rightDrawer"
|
||||||
class="q-pa-md q-mb-md q-ma-md color-vn-text"
|
>
|
||||||
bordered
|
<QCard
|
||||||
flat
|
v-for="(packingType, index) in packingTypeVolume"
|
||||||
style="border-color: black"
|
:key="index"
|
||||||
>
|
class="q-pa-md q-mb-md q-ma-md color-vn-text"
|
||||||
<QCardSection class="column items-center" horizontal>
|
bordered
|
||||||
<span>
|
flat
|
||||||
{{ t('volume.type') }}:
|
style="border-color: black"
|
||||||
{{ dashIfEmpty(packingType.description) }}
|
>
|
||||||
</span>
|
<QCardSection class="column items-center" horizontal>
|
||||||
</QCardSection>
|
<span>
|
||||||
<QCardSection class="column items-center" horizontal>
|
{{ t('volume.type') }}:
|
||||||
<span> {{ t('volume.volume') }}: {{ packingType.volume }} </span>
|
{{ dashIfEmpty(packingType.description) }}
|
||||||
</QCardSection>
|
</span>
|
||||||
</QCard>
|
</QCardSection>
|
||||||
</template>
|
<QCardSection class="column items-center" horizontal>
|
||||||
</RightMenu>
|
<span> {{ t('volume.volume') }}: {{ packingType.volume }} </span>
|
||||||
|
</QCardSection>
|
||||||
|
</QCard>
|
||||||
|
</QDrawer>
|
||||||
|
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="TicketVolume"
|
data-key="TicketVolume"
|
||||||
|
|
Loading…
Reference in New Issue