Compare commits
2 Commits
60aae40575
...
1253711147
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1253711147 | ||
|
|
87adc68376 |
@ -128,18 +128,6 @@ watch(open, (isOpen) => {
|
||||
}
|
||||
});
|
||||
|
||||
function onGoodChange(result: any, value: string | number) {
|
||||
const val = Number(value) || 0;
|
||||
result.good = val;
|
||||
result.reject = Math.max(0, result.cutting_result - val);
|
||||
}
|
||||
|
||||
function onRejectChange(result: any, value: string | number) {
|
||||
const val = Number(value) || 0;
|
||||
result.reject = val;
|
||||
result.good = Math.max(0, result.cutting_result - val);
|
||||
}
|
||||
|
||||
function setSharedPrice(type: string, value: string) {
|
||||
verifyForm.shared_prices[type] = value;
|
||||
verifyForm.variant_prices = verifyForm.variant_prices.map((row) => ({
|
||||
@ -239,15 +227,13 @@ function submitVerify() {
|
||||
<label :for="`stock-good-${index}`"
|
||||
class="text-[10px] text-muted-foreground block mb-0.5">Bagus</label>
|
||||
<NumberInput :id="`stock-good-${index}`" :model-value="result.good"
|
||||
class="h-7 w-20 px-1.5 text-xs text-center"
|
||||
@update:model-value="val => onGoodChange(result, val)" />
|
||||
class="h-7 w-20 px-1.5 text-xs text-center" />
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<label :for="`stock-reject-${index}`"
|
||||
class="text-[10px] text-muted-foreground block mb-0.5">Reject</label>
|
||||
<NumberInput :id="`stock-reject-${index}`" :model-value="result.reject"
|
||||
class="h-7 w-20 px-1.5 text-xs text-center"
|
||||
@update:model-value="val => onRejectChange(result, val)" />
|
||||
class="h-7 w-20 px-1.5 text-xs text-center" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -273,7 +259,29 @@ function submitVerify() {
|
||||
</div>
|
||||
<div class="space-y-2">
|
||||
<div v-for="material in group.items" :key="material.id"
|
||||
class="rounded-md border bg-background p-2.5">
|
||||
class="flex items-center gap-3 rounded-md border bg-background p-2.5">
|
||||
<div class="shrink-0">
|
||||
<MediaThumbnailCell :items="material.images ?? material.raw_material_price?.images ?? []" :max-visible="1" />
|
||||
</div>
|
||||
<div class="min-w-0 flex-1">
|
||||
<p class="truncate text-sm font-medium">
|
||||
{{ material.raw_material_name || material.raw_material_price?.raw_material?.name }}
|
||||
</p>
|
||||
<p class="truncate text-xs text-muted-foreground">
|
||||
{{ material.variant || material.raw_material_price?.variant }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-else>
|
||||
<div v-for="material in group.items" :key="material.id"
|
||||
class="flex items-center gap-3 rounded-lg border p-3">
|
||||
<div class="shrink-0">
|
||||
<MediaThumbnailCell :items="material.images ?? material.raw_material_price?.images ?? []" :max-visible="1" />
|
||||
</div>
|
||||
<div class="min-w-0 flex-1">
|
||||
<p class="truncate text-sm font-medium">
|
||||
{{ material.raw_material_name || material.raw_material_price?.raw_material?.name }}
|
||||
</p>
|
||||
@ -282,18 +290,6 @@ function submitVerify() {
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-else>
|
||||
<div v-for="material in group.items" :key="material.id"
|
||||
class="rounded-lg border p-3">
|
||||
<p class="truncate text-sm font-medium">
|
||||
{{ material.raw_material_name || material.raw_material_price?.raw_material?.name }}
|
||||
</p>
|
||||
<p class="truncate text-xs text-muted-foreground">
|
||||
{{ material.variant || material.raw_material_price?.variant }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user