Changes
This commit is contained in:
@@ -15,7 +15,8 @@ const inventoryChangeData = ref({
|
||||
sourceProjectId: null,
|
||||
destinationSpaceId: null,
|
||||
destinationProjectId: null,
|
||||
quantity: 1
|
||||
quantity: 1,
|
||||
serials: []
|
||||
})
|
||||
|
||||
const resetInput = () => {
|
||||
@@ -93,7 +94,14 @@ const createMovement = async () => {
|
||||
.from("movements")
|
||||
.insert(movements)
|
||||
.select()
|
||||
if(error) console.log(error)
|
||||
if(error) {
|
||||
console.log(error)
|
||||
} else {
|
||||
resetInput()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -146,6 +154,7 @@ const findSpaceBySpaceNumber = (input) => {
|
||||
|
||||
const barcodeInput = ref("")
|
||||
const showBarcodeTip = ref(true)
|
||||
const serialInput = ref("")
|
||||
|
||||
const processBarcodeInput = () => {
|
||||
if(findProductByBarcodeOrEAN(barcodeInput.value) && !findSpaceBySpaceNumber(barcodeInput.value)){
|
||||
@@ -380,6 +389,29 @@ const processBarcodeInput = () => {
|
||||
id="quantityInput"
|
||||
/>
|
||||
</UFormGroup>
|
||||
<UFormGroup
|
||||
label="Seriennummern:"
|
||||
class="mt-3 w-80"
|
||||
>
|
||||
<InputGroup class="w-full">
|
||||
<UInput
|
||||
variant="outline"
|
||||
color="primary"
|
||||
placeholder="Seriennummern"
|
||||
v-model="serialInput"
|
||||
/>
|
||||
<UButton
|
||||
@click="inventoryChangeData.serials.push(serialInput)"
|
||||
>
|
||||
+
|
||||
</UButton>
|
||||
</InputGroup>
|
||||
|
||||
</UFormGroup>
|
||||
|
||||
<ul>
|
||||
<li v-for="serial in inventoryChangeData.serials">{{serial}}</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</UDashboardPanelContent>
|
||||
|
||||
Reference in New Issue
Block a user