diff --git a/inventory-web/src/App.vue b/inventory-web/src/App.vue
index c509d38..d0ea334 100644
--- a/inventory-web/src/App.vue
+++ b/inventory-web/src/App.vue
@@ -239,7 +239,7 @@ const handleLogout = () => {
diff --git a/inventory-web/src/views/stock/inbound/buy.vue b/inventory-web/src/views/stock/inbound/buy.vue
index b477ac1..36cc209 100644
--- a/inventory-web/src/views/stock/inbound/buy.vue
+++ b/inventory-web/src/views/stock/inbound/buy.vue
@@ -452,7 +452,8 @@
:http-request="(opts) => customUpload(opts, 'arrival_photo')"
:on-preview="handlePreviewPicture"
:on-remove="(file) => handleRemoveImage(file, 'arrival_photo')"
- :before-upload="beforeAvatarUpload">
+ :before-upload="beforeAvatarUpload"
+ :before-remove="handleBeforeRemove">
拍照
@@ -471,7 +472,8 @@
:http-request="(opts) => customUpload(opts, 'inspection_report')"
:on-preview="handlePreviewPicture"
:on-remove="(file) => handleRemoveImage(file, 'inspection_report')"
- :before-upload="beforeAvatarUpload">
+ :before-upload="beforeAvatarUpload"
+ :before-remove="handleBeforeRemove">
拍照
@@ -1644,6 +1646,23 @@ const handleDelete = (row: any) => {
}).catch(() => {});
};
+// ==========================================
+// 拦截图片/文件删除:弹出确认框
+// ==========================================
+const handleBeforeRemove = (uploadFile, uploadFiles) => {
+ return new Promise((resolve, reject) => {
+ ElMessageBox.confirm(
+ `确定要移除文件 "${uploadFile.name}" 吗?`,
+ '提示',
+ { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
+ ).then(() => {
+ resolve(true);
+ }).catch(() => {
+ reject(false);
+ });
+ });
+};
+
// ------------------------------------
// 打印逻辑
// ------------------------------------
diff --git a/inventory-web/src/views/stock/inbound/product.vue b/inventory-web/src/views/stock/inbound/product.vue
index 32b9fba..5fc7cb7 100644
--- a/inventory-web/src/views/stock/inbound/product.vue
+++ b/inventory-web/src/views/stock/inbound/product.vue
@@ -389,7 +389,7 @@
-
+
拍照
@@ -403,7 +403,7 @@
-
+
拍照
@@ -416,7 +416,7 @@
-
+
拍照
@@ -1374,6 +1374,24 @@ const handleDelete = (row: any) => {
}
}).catch(() => {});
};
+
+// ==========================================
+// 拦截图片/文件删除:弹出确认框
+// ==========================================
+const handleBeforeRemove = (uploadFile, uploadFiles) => {
+ return new Promise((resolve, reject) => {
+ ElMessageBox.confirm(
+ `确定要移除文件 "${uploadFile.name}" 吗?`,
+ '提示',
+ { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
+ ).then(() => {
+ resolve(true);
+ }).catch(() => {
+ reject(false);
+ });
+ });
+};
+
const handlePrint = async (row: any) => {
printVisible.value = true; printLoading.value = true; previewUrl.value = ''
currentPrintData.value = { global_print_id: row.global_print_id, material_name: row.material_name, spec_model: row.spec_model, category: row.category, material_type: row.material_type, warehouse_loc: row.warehouse_loc, serial_number: row.serial_number, sku: row.sku }
diff --git a/inventory-web/src/views/stock/inbound/semi.vue b/inventory-web/src/views/stock/inbound/semi.vue
index 7948842..8da5441 100644
--- a/inventory-web/src/views/stock/inbound/semi.vue
+++ b/inventory-web/src/views/stock/inbound/semi.vue
@@ -464,7 +464,7 @@
-
+
拍照
@@ -476,7 +476,7 @@
-
+
拍照
@@ -1450,6 +1450,24 @@ const handleDelete = (row: any) => {
}
}).catch(() => {});
};
+
+// ==========================================
+// 拦截图片/文件删除:弹出确认框
+// ==========================================
+const handleBeforeRemove = (uploadFile, uploadFiles) => {
+ return new Promise((resolve, reject) => {
+ ElMessageBox.confirm(
+ `确定要移除文件 "${uploadFile.name}" 吗?`,
+ '提示',
+ { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
+ ).then(() => {
+ resolve(true);
+ }).catch(() => {
+ reject(false);
+ });
+ });
+};
+
const handlePrint = async (row: any) => {
printVisible.value = true; printLoading.value = true; previewUrl.value = ''
currentPrintData.value = { global_print_id: row.global_print_id, material_name: row.material_name, spec_model: row.spec_model, category: row.category, material_type: row.material_type, warehouse_loc: row.warehouse_loc, serial_number: row.serial_number, batch_number: row.batch_number, sku: row.sku }