This commit is contained in:
2025-07-08 15:06:55 +08:00
parent b19e50f135
commit 072775e798

View File

@@ -82,8 +82,8 @@ const updateTable = async () => {
}); });
} }
const editMaterial = (index) => { const editMaterial = (index, vIndex) => {
AddMaterialRef.value[index].open(); AddMaterialRef.value[(3 * index) + vIndex].open();
} }
const success = async () => { const success = async () => {
@@ -148,7 +148,7 @@ const success = async () => {
</template> </template>
<template v-slot:material="{record, rowIndex}"> <template v-slot:material="{record, rowIndex}">
<div class="flex flex-col gap-[12px]"> <div class="flex flex-col gap-[12px]">
<div class="flex gap-[12px]" v-for="v in record.childrenMaterial"> <div class="flex gap-[12px]" v-for="(v, index) in record.childrenMaterial">
<add-material <add-material
:disabled="record.status !== 0 && record.status !== 2" :disabled="record.status !== 0 && record.status !== 2"
ref="AddMaterialRef" ref="AddMaterialRef"
@@ -163,7 +163,7 @@ const success = async () => {
</add-material> </add-material>
<view-material <view-material
:disabled="record.status !== 0 && record.status !== 2" :disabled="record.status !== 0 && record.status !== 2"
@edit="editMaterial(rowIndex)" @edit="editMaterial(rowIndex, index)"
:material="v" :material="v"
:id="po.id"> :id="po.id">
<x-image-small-list <x-image-small-list