From ee893485bb91cf26ea74d3420e88f3c02a1d63f5 Mon Sep 17 00:00:00 2001 From: DXC Date: Fri, 15 May 2026 14:29:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A8=E5=B9=BF=E7=B2=98=E8=B4=B4?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=8A=9F=E8=83=BD=E8=87=B3=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E9=A1=B5=E9=9D=A2=EF=BC=88?= =?UTF-8?q?purchase/buy/product/semi=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventory-web/src/views/purchase/index.vue | 11 ++++++++++- inventory-web/src/views/stock/inbound/buy.vue | 15 +++++++++++++-- .../src/views/stock/inbound/product.vue | 16 +++++++++++++--- inventory-web/src/views/stock/inbound/semi.vue | 13 +++++++++++-- 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/inventory-web/src/views/purchase/index.vue b/inventory-web/src/views/purchase/index.vue index bb8df41..de83970 100644 --- a/inventory-web/src/views/purchase/index.vue +++ b/inventory-web/src/views/purchase/index.vue @@ -147,7 +147,7 @@ - + { if (res.code === 200) { const newUrl = res.data.url form.value.images!.push(newUrl) + // 同步更新 fileList,触发 el-upload UI 刷新 + fileList.value.push({ name: newUrl.split('/').pop(), url: getImageUrl(newUrl) }) onSuccess(res) } else { ElMessage.error(res.msg || '上传失败') @@ -512,6 +515,12 @@ const handleRemoveImage = async (uploadFile: any) => { } } +// 粘贴上传处理器(PC 端:鼠标悬停 + Ctrl+V 直接粘贴图片) +const handlePasteLink = (link: string, field: string) => { + // 采购单没有独立的外链输入框,暂不支持网页图片链接自动填入 +} +usePasteUpload(customUpload, 'images', '#upload-purchase-images', handlePasteLink) + // --- 提交 --- const submitForm = async () => { if (!form.value.name.trim()) { ElMessage.warning('请选择或填写采购物品'); return } diff --git a/inventory-web/src/views/stock/inbound/buy.vue b/inventory-web/src/views/stock/inbound/buy.vue index 2dd8772..c162ac2 100644 --- a/inventory-web/src/views/stock/inbound/buy.vue +++ b/inventory-web/src/views/stock/inbound/buy.vue @@ -447,7 +447,7 @@ -
+
-
+
{ + if (field === 'inspection_report') { + inspection_report_url.value = link + } +} +usePasteUpload(customUpload, 'arrival_photo', '#upload-arrival_photo', handlePasteLink) +usePasteUpload(customUpload, 'inspection_report', '#upload-inspection_report', handlePasteLink) + const handlePreviewPicture = (uploadFile: any) => { dialogImageUrl.value = uploadFile.url!; dialogVisibleImage.value = true } const triggerCamera = (field: 'arrival_photo' | 'inspection_report') => { currentCameraField.value = field; diff --git a/inventory-web/src/views/stock/inbound/product.vue b/inventory-web/src/views/stock/inbound/product.vue index 8fd8bd1..1a20cc7 100644 --- a/inventory-web/src/views/stock/inbound/product.vue +++ b/inventory-web/src/views/stock/inbound/product.vue @@ -388,7 +388,7 @@ -
+
@@ -402,7 +402,7 @@ -
+