forked from verdnatura/salix-front
Small change
This commit is contained in:
parent
768b619904
commit
34ee92ac24
|
@ -29,6 +29,7 @@ const itemShelvignsSales = ref([]);
|
|||
const shelvingsOptions = ref([]);
|
||||
const parkingsOptions = ref([]);
|
||||
const saleTrackingUrl = computed(() => `SaleTrackings/${route.params.id}/filter`);
|
||||
const oldQuantity = ref(null);
|
||||
|
||||
watch(
|
||||
() => route.params.id,
|
||||
|
@ -191,10 +192,12 @@ const showShelving = async (sale) => {
|
|||
|
||||
const updateQuantity = async (sale) => {
|
||||
try {
|
||||
if (oldQuantity.value === sale.quantity) return;
|
||||
const params = {
|
||||
quantity: sale.quantity,
|
||||
};
|
||||
await axios.patch(`ItemShelvingSales/${sale.id}`, params);
|
||||
oldQuantity.value = null;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
@ -431,7 +434,7 @@ const clickControled = (sale) => {
|
|||
<span v-if="row.subName" class="color-vn-label">
|
||||
{{ row.subName }}
|
||||
</span>
|
||||
<FetchedTags :item="row" :max-length="6" />
|
||||
<FetchedTags :item="row" :max-length="6" tag="value" />
|
||||
</div>
|
||||
</QTd>
|
||||
</template>
|
||||
|
@ -498,7 +501,7 @@ const clickControled = (sale) => {
|
|||
v-model.number="row.quantity"
|
||||
@keyup.enter="updateQuantity(row)"
|
||||
@blur="updateQuantity(row)"
|
||||
@focus="edit.oldQuantity = row.quantity"
|
||||
@focus="oldQuantity = row.quantity"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue