feat: 导入调整

This commit is contained in:
caiyuchao
2025-08-25 10:48:46 +08:00
parent 41bc7d149e
commit 6e0409bd42
4 changed files with 22 additions and 17 deletions

View File

@@ -150,13 +150,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
auth: ['license:customer:export'],
onClick: onExport,
},
{
label: $t('ui.actionTitle.import', [$t('customer.customer')]),
type: 'primary',
icon: ACTION_ICON.UPLOAD,
auth: ['license:customer:import'],
onClick: handleImport,
},
// {
// label: $t('ui.actionTitle.import', [$t('customer.customer')]),
// type: 'primary',
// icon: ACTION_ICON.UPLOAD,
// auth: ['license:customer:import'],
// onClick: handleImport,
// },
]"
/>
</template>

View File

@@ -96,7 +96,7 @@ const columns = [
color: 'red',
},
},
` ${data.value.new}`,
` ${data.value.new ? '→' : ''} ${data.value.new}`,
);
return h('div', {}, [data.value.old, after]);
}
@@ -210,7 +210,9 @@ const handleUpload = async (record: any) => {
</template>
<template
v-else-if="
props.formData?.status === 3 && props.formData?.showUpload
props.formData?.status === 3 &&
props.formData?.showUpload &&
false
"
>
<div

View File

@@ -97,6 +97,9 @@ export function useFormSchema(): VbenFormSchema[] {
},
dependencies: {
trigger(values, form) {
if (values.id) {
return;
}
const projectCode = projectList.value.find((project) => {
return project.id === values.projectId;
})?.code;
@@ -109,7 +112,7 @@ export function useFormSchema(): VbenFormSchema[] {
);
},
// 只有指定的字段改变时,才会触发
triggerFields: ['customerId', 'projectId'],
triggerFields: ['customerId', 'projectId', 'id'],
},
rules: z.string().refine(
async (value: string) => {

View File

@@ -171,13 +171,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
auth: ['license:project:export'],
onClick: onExport,
},
{
label: $t('ui.actionTitle.import', [$t('project.project')]),
type: 'primary',
icon: ACTION_ICON.UPLOAD,
auth: ['license:project:import'],
onClick: handleImport,
},
// {
// label: $t('ui.actionTitle.import', [$t('project.project')]),
// type: 'primary',
// icon: ACTION_ICON.UPLOAD,
// auth: ['license:project:import'],
// onClick: handleImport,
// },
]"
/>
</template>