|
|
|
|
@ -133,7 +133,7 @@
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col v-if="formType === 'update'" :span="12">
|
|
|
|
|
<el-col v-if="formType === 'update'" :span="24">
|
|
|
|
|
<el-form-item :label="t('FactoryModeling.ProductInformation.qrcode')" prop="qrcodeUrl">
|
|
|
|
|
<div class="product-form-qrcode-wrap">
|
|
|
|
|
<el-image
|
|
|
|
|
@ -154,6 +154,13 @@
|
|
|
|
|
{{ t('FactoryModeling.ProductInformation.qrcodeEmpty') }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="product-form-qrcode-mask">
|
|
|
|
|
<el-button
|
|
|
|
|
circle
|
|
|
|
|
:disabled="!formData.qrcodeUrl"
|
|
|
|
|
@click="handlePreviewQrcode"
|
|
|
|
|
>
|
|
|
|
|
<Icon icon="ep:zoom-in" />
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
circle
|
|
|
|
|
:loading="regenerateCodeLoading"
|
|
|
|
|
@ -183,6 +190,7 @@
|
|
|
|
|
import { ProductApi, ProductVO } from '@/api/erp/product/product'
|
|
|
|
|
import { ProductCategoryApi, ProductCategoryVO } from '@/api/erp/product/category'
|
|
|
|
|
import { ProductUnitApi, ProductUnitVO } from '@/api/erp/product/unit'
|
|
|
|
|
import { createImageViewer } from '@/components/ImageViewer'
|
|
|
|
|
import { CommonStatusEnum } from '@/utils/constants'
|
|
|
|
|
import { defaultProps, handleTree } from '@/utils/tree'
|
|
|
|
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
|
|
|
@ -286,6 +294,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 () => {
|
|
|
|
|
@ -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;
|
|
|
|
|
|