From 714ed2fda4d83bdc2da48ccfe7e42f220acbee99 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期五, 21 十一月 2025 16:49:06 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue | 138 +++++++++++++--------------------------------
1 files changed, 41 insertions(+), 97 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
index 8ef03eb..4e4b7d7 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
@@ -116,7 +116,7 @@
sortable: true
},
{
- field: 'product_name',
+ field: 'productName',
width: 150,
title: t('order.product'),
filters: [{data: ''}],
@@ -140,7 +140,7 @@
sortable: true
},
{
- field: 'building_number',
+ field: 'buildingNumber',
width: 150,
title: '妤煎眰鍙�',
filters: [{data: ''}],
@@ -189,7 +189,7 @@
sortable: true
},
{
- field: 'icon',
+ field: 'markIcon',
width: 150,
title: '鍗版爣绫诲瀷',
filters: [{data: ''}],
@@ -485,103 +485,47 @@
}
emit('getSmallPieceData', 1);
optimizeData.value.glassDetails = [];
- // 浠庡悗绔帴鍙h幏鍙� glassDetail 鏁版嵁锛岃�屼笉鏄粠琛ㄦ牸涓鍙�
- fetchGlassDetailData();
+ // 浠庤〃鏍间腑鑾峰彇 glassDetail 鏁版嵁锛岃�屼笉鏄粠鍚庣鎺ュ彛璇诲彇
+ const tableData = xGrid.value.getTableData().fullData;
+ const glassDetailData = tableData.map(item => {
+ let rackNoValue = 0;
+ if (item.rackNo !== undefined && item.rackNo !== null && item.rackNo !== '') {
+ rackNoValue = item.rackNo;
+ }
+ return {
+ width: item.width,
+ height: item.height,
+ processId: item.processId,
+ layer: item.layer,
+ totalLayer: item.totalLayer,
+ orderSort: item.order_number,
+ markIcon: item.markIcon,
+ quantity: item.quantity,
+ patchState: item.patchState,
+ upGrind: item.longGrind1,
+ downGrind: item.longGrind2,
+ leftGrind: item.shortGrind1,
+ rightGrind: item.shortGrind2,
+ heatLayoutId: item.heatLayoutId,
+ process: item.process,
+ orderNo: item.orderNo,
+ customerName: item.customerName,
+ processingNote: item.processingNote,
+ projectName: item.projectName,
+ productName: item.productName,
+ buildingNumber: item.buildingNumber,
+ rackNo: rackNoValue
+ };
+ });
- // xGrid.value.getTableData().fullData.forEach(items=>{
- // let rackNoValue = 0;
- // if (items.rackNo !== undefined && items.rackNo !== null && items.rackNo !== '') {
- // rackNoValue = items.rackNo;
- // }
- // const detail={
- // width :null,
- // height :null,
- // processId :null,
- // layer :null,
- // totalLayer :null,
- // orderSort :null,
- // markIcon :null,
- // quantity:null,
- // patchState :null,
- // upGrind :null,
- // downGrind :null,
- // leftGrind:null,
- // rightGrind :null,
- // rackNo: rackNoValue
- // }
- // detail.width=items.width
- // detail.height=items.height
- // detail.processId=items.process_ids
- // detail.layer=items.layer
- // detail.totalLayer=items.total_layer
- // detail.orderSort=items.order_number
- // detail.markIcon=items.icon
- // detail.patchState=items.patch_state
- // detail.quantity=items.quantity
- // detail.upGrind=items.longGrind1
- // detail.downGrind=items.longGrind2
- // detail.leftGrind=items.shortGrind1
- // detail.rightGrind=items.shortGrind2
- // detail.rackNo=items.rackNo
- //
- // optimizeData.value.glassDetails .push(detail)
- // })
+ // 鏇存柊 optimizeData 涓殑 glassDetails
+ optimizeData.value.glassDetails = glassDetailData;
+
+ // 鎵撳紑浼樺寲瀵硅瘽妗�
+ dialogVisible.value[4] = true;
}else{
dialogVisible.value[index] = true;
- }
-};
-
-const fetchGlassDetailData = async () => {
- try {
- const res = await request.post(`/glassOptimize/optimizeInfo/${projectNo.value}/${username}`);
- console.log(res);
- if (res.code === "200" && res.data && res.data.data) {
- // 澶勭悊浠庡悗绔幏鍙栫殑鏁版嵁
- const glassDetailData = res.data.data.map(item => {
- let rackNoValue = 0;
- if (item.rackNo !== undefined && item.rackNo !== null && item.rackNo !== '') {
- rackNoValue = item.rackNo;
- }
- return {
- width: item.width,
- height: item.height,
- processId: item.processId,
- layer: item.layer,
- totalLayer: item.totalLayer,
- orderSort: item.order_number,
- markIcon: item.markIcon,
- quantity: item.quantity,
- patchState: item.patchState,
- upGrind: item.upGrind,
- downGrind: item.downGrind,
- leftGrind: item.leftGrind,
- rightGrind:item.rightGrind,
- heatLayoutId:item.heatLayoutId,
- process:item.process,
- orderNo:item.orderNo,
- customerName:item.customerName,
- processingNote:item.processingNote,
- projectName:item.projectName,
- productName:item.productName,
- buildingNumber:item.buildingNumber,
- rackNo: rackNoValue
- };
- });
-
- // 鏇存柊 optimizeData 涓殑 glassDetails
- optimizeData.value.glassDetails = glassDetailData;
-
- // 鎵撳紑浼樺寲瀵硅瘽妗�
- dialogVisible.value[4] = true;
-
- console.log('鑾峰彇鍒扮殑 glassDetail 鏁版嵁:', glassDetailData);
- } else {
- ElMessage.error('鑾峰彇鐜荤拑璇︽儏鏁版嵁澶辫触');
- }
- } catch (error) {
- console.error('鑾峰彇 glassDetail 鏁版嵁鍑洪敊:', error);
- ElMessage.error('鑾峰彇鐜荤拑璇︽儏鏁版嵁鏃跺彂鐢熼敊璇�');
}
};
@@ -727,7 +671,7 @@
const fetchData = () => {
//鍚敤琛ㄦ牸鎷栧姩閫変腑
addListener(xGrid.value,gridOptions,cellArea.value)
- request.post(`/glassOptimize/projectInfo/${projectNo.value}/${username}`).then((res) => {
+ request.post(`/glassOptimize/optimizeInfo/${projectNo.value}/${username}`).then((res) => {
if ((Number(res.code) === 200)) {
let data = res.data.data;
const grindingTrimming = res.data.grindingTrimming;
--
Gitblit v1.8.0