From a660db06773007b1be690e0674829c00a57aeb7b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 十二月 2025 16:21:23 +0800
Subject: [PATCH] 订单首页流程卡新增楼层编号显示
---
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeControl.vue | 54 +++++++++++++++++++++++++++++-------------------------
1 files changed, 29 insertions(+), 25 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeControl.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeControl.vue
index b5a8092..939ff1d 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeControl.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeControl.vue
@@ -21,7 +21,7 @@
import RectRenderer from './page/RectRenderer.vue';
import request from "@/utils/request";
import { useI18n } from "vue-i18n";
-import { ElMessage } from "element-plus";
+import {ElMessage, ElMessageBox} from "element-plus";
import requestOptimize from "@/utils/requestOptimize";
import useUserInfoStore from "@/stores/userInfo";
@@ -180,41 +180,45 @@
const response = await requestOptimize.post('api/cutFiles', {
fileName: processId,
projectNo: processId,
- glassThickness:inventoryData.value[0].thickness,
- glassType:inventoryData.value[0].model,
+ glassThickness: inventoryData.value[0].thickness,
+ glassType: inventoryData.value[0].model,
quantity: inventoryData.value[0].processingQuantity,
- fileType:"OPT",
- fileSaveMode:fileMode.value,
- glassIdMode:glassIdMode.value,
- haveMark:haveMark.value,
- haveOptimaMark:haveOptimaMark.value,
- haveQMark:haveQMark.value,
- optimaMarkPosition:optimaMarkPosition.value,
- optimaMarkName:optimaMarkName.value,
- optimaMarkWidth:optimaMarkWidth.value,
- optimaMarkHeight:optimaMarkHeight.value,
+ fileType: "OPT",
+ fileSaveMode: fileMode.value,
+ glassIdMode: glassIdMode.value,
+ haveMark: haveMark.value,
+ haveOptimaMark: haveOptimaMark.value,
+ haveQMark: haveQMark.value,
+ optimaMarkPosition: optimaMarkPosition.value,
+ optimaMarkName: optimaMarkName.value,
+ optimaMarkWidth: optimaMarkWidth.value,
+ optimaMarkHeight: optimaMarkHeight.value,
layouts: optimizeLayouts.value.layouts
}, {
headers: {
'Content-Type': 'application/json'
- },
- responseType: 'blob'
+ }
});
- // 澶勭悊涓嬭浇
- const downloadUrl = window.URL.createObjectURL(response);
- const a = document.createElement('a');
- a.href = downloadUrl;
- a.download = 'output.opt';
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
- window.URL.revokeObjectURL(downloadUrl);
- ElMessage.success('OPT鏂囦欢淇濆瓨鎴愬姛');
+ // 浣跨敤 MessageBox 鏄剧ず鏂囦欢淇濆瓨浣嶇疆淇℃伅
+ if (response.data && response.data.length > 0) {
+ const filePath = response.data[0];
+ ElMessageBox.alert(`OPT鏂囦欢淇濆瓨鎴愬姛锛屼綅缃細${filePath}`, '淇濆瓨鎴愬姛', {
+ confirmButtonText: '纭畾',
+ type: 'success',
+ dangerouslyUseHTMLString: true
+ });
+ } else {
+ ElMessageBox.alert('OPT鏂囦欢淇濆瓨鎴愬姛', '淇濆瓨鎴愬姛', {
+ confirmButtonText: '纭畾',
+ type: 'success'
+ });
+ }
} catch (error) {
console.error('淇濆瓨澶辫触:', error);
ElMessage.error('淇濆瓨澶辫触锛岃绋嶅悗鍐嶈瘯');
}
};
+
</script>
\ No newline at end of file
--
Gitblit v1.8.0