新增开模件属性、物料号属性

This commit is contained in:
weibl
2026-01-21 10:44:04 +08:00
parent f993d789a7
commit 402be69b3b
2 changed files with 28 additions and 3 deletions

View File

@@ -38,7 +38,7 @@
@change="changeFun($event, 'form')"
@load="loadTableForm"
:colNum="2"
:hideKeys="hideKeys"
:hideKeys="hideKeys.concat(formHideKeys)"
:data="editFormInfo"
>
<template #form-pMemberList>
@@ -162,11 +162,17 @@ const visibleDialog = async (isCreate: boolean, row?: any) => {
isCreateDialog.value = isCreate;
loadingInterface.value = true;
if (isCreate) {
formHideKeys.value = ['materialNo'];
nextTick(() => {
tableFormRef.value.resetFun();
});
}
if (!isCreateDialog.value) {
if (row?.isMoldMaking === 'Y') {
formHideKeys.value = [];
} else {
formHideKeys.value = ['materialNo'];
}
const res: any = await dataQueryDirApi({ uuid: row.uuid, current: 1, size: 99 });
row.attachments =
res.data?.data?.map((item: { originalName: any; fileSize: any; id: number }) => {
@@ -364,11 +370,13 @@ const deleteFileList = ref<number[]>([]);
const oldAttachments = ref<any[]>([]);
const formHideKeys = ref<any[]>(['materialNo']);
const changeFun = async (val: any, type: string) => {
const formData = tableFormRef.value.getFormDataFun();
// editFormInfo.value = { ...formData };
console.log('val', val);
if (val.key === 'projectId') {
console.log('val', val);
let nodeType = '';
let nextKey = '';
let nodeId = '';
@@ -461,6 +469,13 @@ const changeFun = async (val: any, type: string) => {
}
editFormInfo.value = { ...formData };
}
if (val.key === 'isMoldMaking') {
if (val.val?.value === 'Y') {
formHideKeys.value = [];
} else {
formHideKeys.value = ['materialNo'];
}
}
emits('changeForm', { val, type });
};