update:新增代办
This commit is contained in:
@@ -90,7 +90,7 @@ const initFun = async () => {
|
||||
await initDetailData({
|
||||
data: props.data,
|
||||
ref: TableFormRef.value,
|
||||
hideKeys: hideKeys.value,
|
||||
hideKeys: hideKeys,
|
||||
});
|
||||
editFormInfo.value = {
|
||||
...props.data,
|
||||
|
||||
@@ -125,7 +125,7 @@ const initFun = async () => {
|
||||
await initDetailData({
|
||||
data: props.data,
|
||||
ref: TableFormRef.value,
|
||||
hideKeys: hideKeys.value,
|
||||
hideKeys: hideKeys,
|
||||
});
|
||||
editFormInfo.value = {
|
||||
...props.data,
|
||||
|
||||
@@ -87,7 +87,7 @@ const initFun = async () => {
|
||||
await initDetailData({
|
||||
data: props.data,
|
||||
ref: TableFormRef.value,
|
||||
hideKeys: hideKeys.value,
|
||||
hideKeys: hideKeys,
|
||||
});
|
||||
editFormInfo.value = {
|
||||
...props.data,
|
||||
|
||||
@@ -8,7 +8,8 @@ import { ElMessage } from 'element-plus';
|
||||
|
||||
// 初始化
|
||||
export const initDetailData = async (initData: any) => {
|
||||
const { data = {}, ref } = initData;
|
||||
const { data = {}, ref, hideKeys } = initData;
|
||||
// hideKeys必须传递hideKeys.value,否则hideKeys无法双向绑定
|
||||
if (data.tMemberList) {
|
||||
data.tMemberList = getMemberListIds(data.tMemberList);
|
||||
}
|
||||
@@ -63,18 +64,30 @@ export const initDetailData = async (initData: any) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
data.extras?.some((item: any) => {
|
||||
let newKeys: any = [...(hideKeys.value || [])];
|
||||
data.extras?.forEach((item: any) => {
|
||||
// 更具需求时间,默认展示需求紧急说明
|
||||
if (item.propertyName === 'urgencyDesc') {
|
||||
if (item.propertyValue) {
|
||||
initData.hideKeys = initData.hideKeys.filter((item: any) => {
|
||||
newKeys = newKeys.filter((item: any) => {
|
||||
return item !== 'urgencyDesc';
|
||||
});
|
||||
} else {
|
||||
initData.hideKeys.push('urgencyDesc');
|
||||
newKeys.push('urgencyDesc');
|
||||
}
|
||||
}
|
||||
// 更具是否开模,默认展示物料号
|
||||
if (item.propertyName === 'isMoldMaking') {
|
||||
if (item.propertyValue === 'Y') {
|
||||
newKeys = newKeys.filter((item: any) => {
|
||||
return item !== 'materialNo';
|
||||
});
|
||||
} else {
|
||||
newKeys.push('materialNo');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
initData.hideKeys.value = newKeys;
|
||||
};
|
||||
|
||||
// 获取确认人列表
|
||||
|
||||
@@ -95,7 +95,7 @@ const initFun = async () => {
|
||||
await initDetailData({
|
||||
data: props.data,
|
||||
ref: TableFormRef.value,
|
||||
hideKeys: hideKeys.value,
|
||||
hideKeys: hideKeys,
|
||||
});
|
||||
editFormInfo.value = {
|
||||
...props.data,
|
||||
|
||||
@@ -97,7 +97,7 @@ const initFun = async () => {
|
||||
await initDetailData({
|
||||
data: props.data,
|
||||
ref: TableFormRef.value,
|
||||
hideKeys: hideKeys.value,
|
||||
hideKeys: hideKeys,
|
||||
});
|
||||
editFormInfo.value = {
|
||||
...props.data,
|
||||
|
||||
@@ -90,7 +90,7 @@ const initFun = async () => {
|
||||
await initDetailData({
|
||||
data: props.data,
|
||||
ref: TableFormRef.value,
|
||||
hideKeys: hideKeys.value,
|
||||
hideKeys: hideKeys,
|
||||
});
|
||||
editFormInfo.value = {
|
||||
...props.data,
|
||||
|
||||
Reference in New Issue
Block a user