This commit is contained in:
parent
8af09d46ed
commit
f20660839a
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
|
|
|
@ -54,9 +54,8 @@ const onIntrastatCreated = (response, formData) => {
|
|||
auto-load
|
||||
/>
|
||||
<FormModel
|
||||
:url="`Items/${route.params.id}`"
|
||||
:url-update="`Items/${route.params.id}`"
|
||||
model="item"
|
||||
model="Item"
|
||||
auto-load
|
||||
:clear-store-on-unmount="false"
|
||||
>
|
||||
|
|
|
@ -6,7 +6,7 @@ import ItemListFilter from '../ItemListFilter.vue';
|
|||
<template>
|
||||
<VnCard
|
||||
data-key="Item"
|
||||
url="Items"
|
||||
:url="`Items/${$route.params.id}/getCard`"
|
||||
:descriptor="ItemDescriptor"
|
||||
:filter-panel="ItemListFilter"
|
||||
search-data-key="ItemList"
|
||||
|
|
|
@ -8,7 +8,6 @@ import VnLv from 'src/components/ui/VnLv.vue';
|
|||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import RegularizeStockForm from 'components/RegularizeStockForm.vue';
|
||||
import ItemDescriptorImage from 'src/pages/Item/Card/ItemDescriptorImage.vue';
|
||||
import useCardDescription from 'src/composables/useCardDescription';
|
||||
import axios from 'axios';
|
||||
import { dashIfEmpty } from 'src/filters';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
|
@ -58,10 +57,8 @@ onMounted(async () => {
|
|||
mounted.value = true;
|
||||
});
|
||||
|
||||
const data = ref(useCardDescription());
|
||||
const setData = async (entity) => {
|
||||
if (!entity) return;
|
||||
data.value = useCardDescription(entity.name, entity.id);
|
||||
await updateStock();
|
||||
};
|
||||
|
||||
|
@ -97,10 +94,8 @@ const openRegularizeStockForm = () => {
|
|||
|
||||
<template>
|
||||
<CardDescriptor
|
||||
data-key="ItemData"
|
||||
data-key="Item"
|
||||
module="Item"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
:summary="$props.summary"
|
||||
:url="`Items/${entityId}/getCard`"
|
||||
@on-fetch="setData"
|
||||
|
|
Loading…
Reference in New Issue