diff --git a/src/views/erp/component/product/ProductForm.vue b/src/views/erp/component/product/ProductForm.vue index f5c2ef84..ae9e14d3 100644 --- a/src/views/erp/component/product/ProductForm.vue +++ b/src/views/erp/component/product/ProductForm.vue @@ -99,7 +99,7 @@ - +
+ + + import { ProductApi, ProductVO } from '@/api/erp/product/product' import { ProductUnitApi, ProductUnitVO } from '@/api/erp/product/unit' +import { createImageViewer } from '@/components/ImageViewer' import { CommonStatusEnum } from '@/utils/constants' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' @@ -246,6 +254,14 @@ const handleRegenerateCode = async () => { } } +const handlePreviewQrcode = () => { + if (!formData.value.qrcodeUrl) return + createImageViewer({ + zIndex: 9999999, + urlList: [formData.value.qrcodeUrl] + }) +} + /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 const submitForm = async () => { @@ -328,6 +344,7 @@ const resetForm = () => { display: flex; align-items: center; justify-content: center; + gap: 10px; background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity 0.2s ease; diff --git a/src/views/erp/mold/components/MoldForm.vue b/src/views/erp/mold/components/MoldForm.vue index 58bcf7fe..c48bd250 100644 --- a/src/views/erp/mold/components/MoldForm.vue +++ b/src/views/erp/mold/components/MoldForm.vue @@ -100,6 +100,13 @@
{{ t('MoldManagement.Mold.qrcodeEmpty') }}
+ + + ([]) // 产品单位列表 const { t } = useI18n() // 国际化 @@ -255,6 +263,14 @@ const handleRegenerateCode = async () => { } } +const handlePreviewQrcode = () => { + if (!formData.value.qrcodeUrl) return + createImageViewer({ + zIndex: 9999999, + urlList: [formData.value.qrcodeUrl] + }) +} + /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 const submitForm = async () => { @@ -336,6 +352,7 @@ const resetForm = () => { display: flex; align-items: center; justify-content: center; + gap: 10px; background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity 0.2s ease; diff --git a/src/views/erp/product/product/ProductForm.vue b/src/views/erp/product/product/ProductForm.vue index 9016913e..f75577b2 100644 --- a/src/views/erp/product/product/ProductForm.vue +++ b/src/views/erp/product/product/ProductForm.vue @@ -133,7 +133,7 @@ - +
+ + + { } } +const handlePreviewQrcode = () => { + if (!formData.value.qrcodeUrl) return + createImageViewer({ + zIndex: 9999999, + urlList: [formData.value.qrcodeUrl] + }) +} + /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 const submitForm = async () => { @@ -367,6 +383,7 @@ const resetForm = () => { display: flex; align-items: center; justify-content: center; + gap: 10px; background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity 0.2s ease; diff --git a/src/views/mes/deviceledger/DeviceLedgerForm.vue b/src/views/mes/deviceledger/DeviceLedgerForm.vue index db7b096f..1c31bb81 100644 --- a/src/views/mes/deviceledger/DeviceLedgerForm.vue +++ b/src/views/mes/deviceledger/DeviceLedgerForm.vue @@ -214,6 +214,13 @@
{{ t('EquipmentManagement.EquipmentLedger.qrcodeEmpty') }}
+ + + { } } +const handlePreviewQrcode = () => { + if (!formData.value.qrcodeUrl) return + createImageViewer({ + zIndex: 9999999, + urlList: [formData.value.qrcodeUrl] + }) +} + const ensureOptionsLoaded = async () => { const [deviceTypeRes, userRes, criticalRes, beijianRes] = await Promise.all([ DeviceTypeApi.getDeviceTypeTree({ pageNo: 1, pageSize: 10 }), @@ -728,6 +744,7 @@ const resetForm = () => { display: flex; align-items: center; justify-content: center; + gap: 10px; background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity 0.2s ease;