improved multiple warehouse stuff
This commit is contained in:
@@ -33,6 +33,7 @@ Vue.component('change-status-modal', {
|
||||
return [
|
||||
{value: 'noChanges', text: 'Keine Änderungen'},
|
||||
{value: 'accepted', text: 'Akzeptiert'},
|
||||
{value: 'ordered', text: 'Bestellt'},
|
||||
{value: 'cancelled', text: 'Storniert'},
|
||||
];
|
||||
case 'accepted':
|
||||
@@ -174,7 +175,7 @@ Vue.component('change-status-modal', {
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<tt-modal :show="true" @submit="submit" @update:show="$emit('close')" title="Status ändern" :save-loading="submitLoading">
|
||||
<tt-modal :show="true" :delete="false" @submit="submit" @update:show="$emit('close')" title="Status ändern" :save-loading="submitLoading">
|
||||
<tt-loader :absolute="false" v-if="!order"/>
|
||||
<template v-else>
|
||||
<tt-select label="Neuer Status" v-model="newStatus" :options="availableStatuses" sm row/>
|
||||
@@ -381,6 +382,8 @@ Vue.component('warehouse-order-modal', {
|
||||
return;
|
||||
}
|
||||
|
||||
this.order.editor = parseInt(window.TT_CONFIG['USER_ID']);
|
||||
|
||||
const orderRequests = JSON.parse(localStorage.getItem('WarehouseOrder_create'));
|
||||
if (!orderRequests) return;
|
||||
|
||||
@@ -388,7 +391,10 @@ Vue.component('warehouse-order-modal', {
|
||||
const positions = JSON.parse(orderRequest.positions);
|
||||
const parsedPositions = await Promise.all(positions.map(async p => {
|
||||
const distributor = (await axios.get(`${window.TT_CONFIG.BASE_PATH}/WarehouseOrder/getArticleDistributorData`,
|
||||
{params: {articleId: p.articleId}})).data[0];
|
||||
{params: {articleId: p.articleId}}))
|
||||
.data
|
||||
.filter(d => !isNaN(d.purchasePrice))
|
||||
.sort((a, b) => a.purchasePrice - b.purchasePrice)[0];
|
||||
return {
|
||||
article: p.articleId,
|
||||
amount: p.amount,
|
||||
|
||||
Reference in New Issue
Block a user