feat: 完善追溯码出库上链管理

This commit is contained in:
Nixevol
2026-07-04 06:04:46 +08:00
parent a1120848e9
commit cfce2d9a75
16 changed files with 457 additions and 46 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
</n-descriptions>
</n-card>
<n-card :title="t('pages.artwork.traceCodes')" :bordered="false" class="table-card">
<n-card :bordered="false" class="table-card">
<div class="trace-table-wrap">
<trace-code-panel :artwork-id="artworkId" @changed="loadArtwork" />
</div>
+4 -1
View File
@@ -35,6 +35,7 @@
class="table-fill"
flex-height
remote
:scroll-x="1280"
:row-key="(r) => r.id"
/>
<div class="table-pagination">
@@ -79,7 +80,7 @@ const columns: DataTableColumns<any> = [
: h(NAvatar, { size: 44, style: 'border-radius:8px' }, { default: () => '—' }),
},
{ title: () => t('pages.artwork.archiveNo'), key: 'archiveNo', width: 140, render: (r) => r.archiveNo || '-' },
{ title: () => t('pages.artwork.title'), key: 'title', ellipsis: { tooltip: true } },
{ title: () => t('pages.artwork.title'), key: 'title', width: 200, ellipsis: { tooltip: true } },
{ title: () => t('pages.artwork.artist'), key: 'artist', width: 110, render: (r) => r.artist || '-' },
{ title: () => t('pages.artwork.template'), key: 'template', width: 120, render: (r) => r.template?.name || '-' },
{ title: () => t('pages.artwork.codeCount'), key: 'codeCount', width: 80, render: (r) => r.codeCount ?? 0 },
@@ -106,6 +107,8 @@ const columns: DataTableColumns<any> = [
title: () => t('common.label.operation'),
key: 'ops',
width: 112,
fixed: 'right',
align: 'center',
render: (r) =>
h('div', { class: 'row-actions' }, [
h(
+5 -2
View File
@@ -30,6 +30,7 @@
class="table-fill"
flex-height
remote
:scroll-x="1120"
:row-key="(r) => r.id"
/>
<div class="table-pagination">
@@ -95,7 +96,7 @@ const columns: DataTableColumns<any> = [
? h(NAvatar, { src: r.images[0].url, size: 40, style: 'border-radius:8px' })
: h(NAvatar, { size: 40, style: 'border-radius:8px' }, { default: () => '—' }),
},
{ title: () => t('pages.artwork.title'), key: 'title', ellipsis: { tooltip: true } },
{ title: () => t('pages.artwork.title'), key: 'title', width: 220, ellipsis: { tooltip: true } },
{ title: () => t('pages.artwork.artist'), key: 'artist', width: 110, render: (r) => r.artist || '-' },
{
title: () => t('pages.audit.status'),
@@ -103,12 +104,14 @@ const columns: DataTableColumns<any> = [
width: 100,
render: (r) => h(NTag, { size: 'small', type: auditTagType(r.auditStatus) }, { default: () => t(`common.auditStatus.${r.auditStatus}`) }),
},
{ title: () => t('pages.audit.remark'), key: 'auditRemark', ellipsis: { tooltip: true }, render: (r) => r.auditRemark || '-' },
{ title: () => t('pages.audit.remark'), key: 'auditRemark', width: 260, ellipsis: { tooltip: true }, render: (r) => r.auditRemark || '-' },
{ title: () => t('common.label.updatedAt'), key: 'updatedAt', width: 160, render: (r) => fmt(r.updatedAt) },
{
title: () => t('common.label.operation'),
key: 'ops',
width: 150,
fixed: 'right',
align: 'center',
render: (r) =>
h('div', { style: 'display:flex;gap:2px' }, [
h(NButton, { quaternary: true, circle: true, size: 'small', title: t('common.action.detail'), onClick: () => router.push(`/artworks/${r.id}`) }, { icon: () => h(NIcon, null, { default: () => h(EyeOutline) }) }),
+1
View File
@@ -51,6 +51,7 @@
class="table-fill"
flex-height
remote
:scroll-x="1320"
:row-key="(r) => r.id"
/>
<div class="table-pagination">
+6 -1
View File
@@ -27,6 +27,7 @@
class="table-fill"
flex-height
remote
:scroll-x="1080"
:row-key="(r) => r.id"
/>
<div class="table-pagination">
@@ -129,10 +130,12 @@ const rules: FormRules = { name: { required: true, message: () => t('pages.templ
const columns: DataTableColumns<any> = [
{ title: 'ID', key: 'id', width: 70 },
{ title: () => t('pages.template.name'), key: 'name' },
{ title: () => t('pages.template.name'), key: 'name', width: 180, ellipsis: { tooltip: true } },
{
title: () => t('pages.template.fields'),
key: 'fields',
width: 340,
ellipsis: { tooltip: true },
render: (r) => (r.fields || []).map((f: any) => f.label).join('、') || '-',
},
{
@@ -147,6 +150,8 @@ const columns: DataTableColumns<any> = [
title: () => t('common.label.operation'),
key: 'ops',
width: 130,
fixed: 'right',
align: 'center',
render: (r) =>
auth.canWrite
? h('div', { style: 'display:flex;gap:4px' }, [
+5 -2
View File
@@ -21,6 +21,7 @@
class="table-fill"
flex-height
remote
:scroll-x="980"
:row-key="(r) => r.id"
/>
<div class="table-pagination">
@@ -100,8 +101,8 @@ const pwdUserId = ref<number | null>(null);
const columns: DataTableColumns<any> = [
{ title: 'ID', key: 'id', width: 64 },
{ title: () => t('pages.user.username'), key: 'username' },
{ title: () => t('pages.user.realName'), key: 'realName', render: (r) => r.realName || '-' },
{ title: () => t('pages.user.username'), key: 'username', width: 160, ellipsis: { tooltip: true } },
{ title: () => t('pages.user.realName'), key: 'realName', width: 160, ellipsis: { tooltip: true }, render: (r) => r.realName || '-' },
{ title: () => t('pages.user.role'), key: 'role', width: 120, render: (r) => t(`common.role.${r.role}`) },
{
title: () => t('common.label.status'),
@@ -114,6 +115,8 @@ const columns: DataTableColumns<any> = [
title: () => t('common.label.operation'),
key: 'ops',
width: 140,
fixed: 'right',
align: 'center',
render: (r) =>
h('div', { style: 'display:flex;gap:2px' }, [
h(NButton, { quaternary: true, circle: true, size: 'small', onClick: () => openEdit(r) }, { icon: () => h(NIcon, null, { default: () => h(CreateOutline) }) }),