diff --git a/src/api/erp/mold/index.ts b/src/api/erp/mold/index.ts
index 5089ba0f..6b4767e8 100644
--- a/src/api/erp/mold/index.ts
+++ b/src/api/erp/mold/index.ts
@@ -33,6 +33,7 @@ export interface MoldVO {
inTime: Date // 入库时间
status: number // 状态
images: string // 模具图片
+ qrcodeUrl?: string
fileUrl?: string
remark: string // 备注
isEnable: boolean // 是否启用
diff --git a/src/views/erp/mold/detail/index.vue b/src/views/erp/mold/detail/index.vue
index 01fd7ae2..f1d25a55 100644
--- a/src/views/erp/mold/detail/index.vue
+++ b/src/views/erp/mold/detail/index.vue
@@ -21,6 +21,21 @@
{{ detailData?.remark ?? '' }}
+
+
+
@@ -310,6 +325,12 @@ const maintainDateRange = ref(undefined)
const repairExportLoading = ref(false)
const repairDateRange = ref(undefined)
+const openQrCode = () => {
+ const url = detailData.value?.qrcodeUrl
+ if (!url) return
+ window.open(String(url), '_blank')
+}
+
const formatDetailDate = (value: any) => {
if (!value) return ''
return formatDate(new Date(value), 'YYYY-MM-DD')
@@ -691,6 +712,49 @@ onMounted(async () => {
margin-bottom: 16px;
}
+.mold-qrcode {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ flex-wrap: wrap;
+}
+
+.mold-qrcode-img {
+ width: 150px;
+ height: 150px;
+ border-radius: 10px;
+ overflow: hidden;
+ border: 1px solid var(--el-border-color-lighter);
+ background: var(--el-fill-color-blank);
+}
+
+.mold-qrcode-error {
+ display: flex;
+ width: 100%;
+ height: 100%;
+ font-size: 12px;
+ color: var(--el-text-color-secondary);
+ background: var(--el-fill-color);
+ align-items: center;
+ justify-content: center;
+}
+
+.mold-qrcode-meta {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+}
+
+.mold-qrcode-title {
+ font-weight: 600;
+ color: var(--el-text-color-primary);
+}
+
+.mold-qrcode-sub {
+ font-size: 12px;
+ color: var(--el-text-color-secondary);
+}
+
.mold-history-table {
margin-top: 8px;
}