fix: refs #7524 use limit ticket section
gitea/salix-front/pipeline/pr-test This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-08-29 13:53:10 +02:00
parent 35829c743b
commit 42e7629c40
4 changed files with 11 additions and 37 deletions

View File

@ -30,7 +30,6 @@ const { t } = useI18n();
const agencyFetchRef = ref(null);
const zonesFetchRef = ref(null);
const clientsOptions = ref([]);
const warehousesOptions = ref([]);
const companiesOptions = ref([]);
const agenciesOptions = ref([]);
@ -273,15 +272,6 @@ const redirectToCustomerAddress = () => {
onMounted(() => onFormModelInit());
</script>
<template>
<FetchData
url="Clients"
:filter="{
fields: ['id', 'name'],
order: 'id',
}"
@on-fetch="(data) => (clientsOptions = data)"
auto-load
/>
<FetchData
url="Warehouses"
@on-fetch="(data) => (warehousesOptions = data)"
@ -317,7 +307,9 @@ onMounted(() => onFormModelInit());
v-model="clientId"
option-value="id"
option-label="name"
:options="clientsOptions"
url="Clients"
:fields="['id', 'name']"
sort-by="id"
hide-selected
map-options
:required="true"

View File

@ -3,7 +3,6 @@ import { onMounted, ref, computed, onUnmounted, reactive, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import FetchData from 'components/FetchData.vue';
import VnInput from 'src/components/common/VnInput.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import TicketEditManaProxy from './TicketEditMana.vue';
@ -35,7 +34,6 @@ const selectedExpeditions = ref([]);
const allColumnNames = ref([]);
const visibleColumns = ref([]);
const newTicketWithRoute = ref(false);
const itemsOptions = ref([]);
const exprBuilder = (param, value) => {
switch (param) {
@ -139,7 +137,9 @@ const columns = computed(() => [
filterValue: null,
event: getInputEvents,
attrs: {
options: itemsOptions.value,
url: 'Items',
fields: ['id', 'name'],
'sort-by': 'name ASC',
'option-value': 'id',
'option-label': 'name',
dense: true,
@ -274,12 +274,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</script>
<template>
<FetchData
url="Items"
auto-load
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
@on-fetch="(data) => (itemsOptions = data)"
/>
<VnSubToolbar>
<template #st-data>
<TableVisibleColumns

View File

@ -38,7 +38,6 @@ const ticketConfig = ref(null);
const isLocked = ref(false);
const isTicketEditable = ref(false);
const sales = ref([]);
const itemsWithNameOptions = ref([]);
const editableStatesOptions = ref([]);
const selectedSales = ref([]);
const mana = ref(null);
@ -435,12 +434,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
auto-load
@on-fetch="(data) => (isLocked = data)"
/>
<FetchData
url="Items/withName"
:filter="{ fields: ['id', 'name'], order: 'id DESC' }"
auto-load
@on-fetch="(data) => (itemsWithNameOptions = data)"
/>
<FetchData
url="States/editableStates"
:filter="{ fields: ['code', 'name', 'id', 'alertLevel'], order: 'name ASC' }"
@ -626,10 +619,12 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</div>
<VnSelect
v-else
:options="itemsWithNameOptions"
hide-selected
option-label="name"
option-value="id"
url="Items/withName"
:fields="['id', 'name']"
sort-by="id DESC"
@update:model-value="changeQuantity(row)"
v-model="row.itemFk"
>

View File

@ -26,7 +26,6 @@ const saleTrackingFetchDataRef = ref(null);
const sales = ref([]);
const saleTrackings = ref([]);
const itemShelvignsSales = ref([]);
const shelvingsOptions = ref([]);
const parkingsOptions = ref([]);
const saleTrackingUrl = computed(() => `SaleTrackings/${route.params.id}/filter`);
const oldQuantity = ref(null);
@ -330,12 +329,6 @@ const qCheckBoxController = (sale, action) => {
auto-load
@on-fetch="(data) => (sales = data)"
/>
<FetchData
url="Shelvings"
auto-load
@on-fetch="(data) => (shelvingsOptions = data)"
/>
<FetchData url="Parkings" auto-load @on-fetch="(data) => (parkingsOptions = data)" />
<QTable
:rows="sales"
:columns="columns"
@ -500,7 +493,7 @@ const qCheckBoxController = (sale, action) => {
<template #body-cell-shelving="{ row }">
<QTd auto-width>
<VnSelect
:options="shelvingsOptions"
url="Shelvings"
hide-selected
option-label="code"
option-value="code"
@ -513,7 +506,7 @@ const qCheckBoxController = (sale, action) => {
<template #body-cell-parking="{ row }">
<QTd auto-width>
<VnSelect
:options="parkingsOptions"
url="Parkings"
hide-selected
option-label="code"
option-value="id"