From b1a2e1ec57bf3a7040b26efe4f92c49323417f50 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期三, 13 八月 2025 16:44:17 +0800
Subject: [PATCH] 修改流程进度添加复制和添加发货面积

---
 north-glass-erp/northglass-erp/src/lang/en.js                           |    3 +
 north-glass-erp/northglass-erp/src/lang/ar.js                           |    3 +
 north-glass-erp/northglass-erp/src/lang/ru.js                           |    3 +
 north-glass-erp/src/main/resources/mapper/pp/Report.xml                 |   10 +++--
 north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue |   30 ++++++++++++++-
 north-glass-erp/northglass-erp/src/lang/zh.js                           |    3 +
 north-glass-erp/northglass-erp/src/lang/kr.js                           |    3 +
 north-glass-erp/northglass-erp/src/views/sd/bom/MaterialBOM.vue         |    4 +-
 north-glass-erp/northglass-erp/src/hook/copyTableCellValue.js           |   32 ++++++++++++++++
 9 files changed, 78 insertions(+), 13 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue b/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue
index 7700cc5..55ac32e 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue
@@ -1,9 +1,12 @@
 <script setup>
 import {computed, onMounted, reactive, ref, watch} from "vue";
+import {addListener,destroyAreaBox} from "@/hook/mouseMoveHomePage";
 import {changeFilterEvent, filterChanged} from "@/hook"
 import {useI18n} from "vue-i18n"
 import request from "@/utils/request"
 import {ElMessage} from "element-plus"
+import VxeUI from "vxe-pc-ui";
+import {copyTableCellValue,copyTableCellValueShow} from "@/hook/copyTableCellValue";
 const { t } = useI18n()
 const xGrid = ref()
 const gridOptions = reactive({
@@ -25,6 +28,7 @@
   filterConfig: {   //绛涢�夐厤缃」
     // remote: true
   },
+  mouseConfig:{selected: true},
   columnConfig: {
     resizable: true,
     useKey: true
@@ -64,6 +68,17 @@
     ]
   }
 })
+const gridEvents = {
+  cellDblclick ({row,column}) {
+    if(orderType.value===1){
+      copyTableCellValue(row,column)
+    }else{
+      copyTableCellValueShow(row,column)
+    }
+
+  }
+}
+
 const list = ref([])
 
 let props = defineProps({
@@ -84,16 +99,18 @@
   {field: 'glassQuantity', width: 90,title: t('order.glassQuantity')},
   {field: 'grossArea',slots: { default: 'show'}, width: 90,title: t('order.area')},
   {field: 'shippedQuantity',slots: { default: 'show'},width: 120, title: t('delivery.deliveryQuantity')},
+  {field: 'shippedArea',slots: { default: 'show'},width: 120, title: t('report.shippedArea')},
   {field: 'Storage',slots: { default: 'show'},width: 120, title: t('report.inventoryNum')},
   // {field: 'inventoryArea',slots: { default: 'show'},width: 120, title: t('report.inventoryArea')},
   {field: 'StorageArea',slots: { default: 'show'},width: 120, title: t('report.StorageArea')},
   {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')},
 ]
-let column = [0,1,3,8,10,11,12,14]
+let column = [0,1,3,8,10,11,12,13,14]
 let orderType = ref(1)
 
 onMounted(()=>{
   getWorkOrder()
+  //addListener(xGrid.value,gridOptions)
 })
 
 watch(()=>props.orderId,(newValue)=>{
@@ -146,7 +163,7 @@
       gridOptions.columns.forEach(item =>{
         item.filterMethod = filterChanged
       })
-      list.value = ['quantity','Storage','gross_area','shippedQuantity','glassQuantity','StorageArea']
+      list.value = ['quantity','Storage','gross_area','shippedQuantity','shippedArea','glassQuantity','StorageArea']
       title.value = res.data.title
       res.data.title.forEach((item,index) =>{
         list.value.push('reportWorkQuantity.'+item.process)
@@ -240,6 +257,7 @@
         class="mytable-scrollbar"
         ref="xGrid"
         v-bind="gridOptions"
+        v-on="gridEvents"
     >
       <template #num1_filter="{ column, $panel }">
         <div>
@@ -286,5 +304,13 @@
 ::v-deep(.vxe-grid .vxe-body--column.row-green) {
   background-color: #D5EAFF;
 }
+.vxe-grid {
+  /* 绂佺敤娴忚鍣ㄩ粯璁ら�変腑 */
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  transform: translateZ(0);
+}
 
 </style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/hook/copyTableCellValue.js b/north-glass-erp/northglass-erp/src/hook/copyTableCellValue.js
new file mode 100644
index 0000000..78529c4
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/hook/copyTableCellValue.js
@@ -0,0 +1,32 @@
+import VxeUI from "vxe-pc-ui";
+
+function copyTableCellValueShow(row, column) {
+    if(column.field.indexOf('.')>-1){
+        let  array = column.field.split('.')
+        if (row[array[0]][array[1]+'Show']!==null){
+            VxeUI.clipboard.copy(row[array[0]+'Show'][array[1]])
+        }
+
+    }else {
+        if (row[column.field+'Show']!==null){
+            VxeUI.clipboard.copy(row[column.field+'Show'])
+        }
+
+    }
+}
+
+function copyTableCellValue(row, column) {
+    if(column.field.indexOf('.')>-1){
+        let  array = column.field.split('.')
+        if (row[array[0]][array[1]]!==null){
+            VxeUI.clipboard.copy(row[array[0]][array[1]])
+        }
+
+    }else {
+        if (row[column.field]!==null){
+            VxeUI.clipboard.copy(row[column.field])
+        }
+
+    }
+}
+export {copyTableCellValue,copyTableCellValueShow}
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/lang/ar.js b/north-glass-erp/northglass-erp/src/lang/ar.js
index d16c8a3..29d9b83 100644
--- a/north-glass-erp/northglass-erp/src/lang/ar.js
+++ b/north-glass-erp/northglass-erp/src/lang/ar.js
@@ -1074,7 +1074,8 @@
         finished :'賲毓丿賱 丕賱賲賳鬲噩丕鬲 丕賱賳賴丕卅賷丞',
         finishedProductReport :'鬲賯乇賷乇 丕賱賲賳鬲噩丕鬲 丕賱賳賴丕卅賷丞',
         workProcessName:'鍦ㄥ埗鍝佸悕绉�',
-        StorageArea:'鍏ュ簱闈㈢Н'
+        StorageArea:'鍏ュ簱闈㈢Н',
+        shippedArea:'鍙戣揣闈㈢Н'
     },
     productionBasicData:{
         page:{
diff --git a/north-glass-erp/northglass-erp/src/lang/en.js b/north-glass-erp/northglass-erp/src/lang/en.js
index 444600c..f4e25dc 100644
--- a/north-glass-erp/northglass-erp/src/lang/en.js
+++ b/north-glass-erp/northglass-erp/src/lang/en.js
@@ -1077,7 +1077,8 @@
         finished :'Rate of finished product',
         finishedProductReport :'Finished product report',
         workProcessName:'鍦ㄥ埗鍝佸悕绉�',
-        StorageArea:'鍏ュ簱闈㈢Н'
+        StorageArea:'鍏ュ簱闈㈢Н',
+        shippedArea:'鍙戣揣闈㈢Н'
     },
     productionBasicData:{
         page:{
diff --git a/north-glass-erp/northglass-erp/src/lang/kr.js b/north-glass-erp/northglass-erp/src/lang/kr.js
index e41a6ab..8371095 100644
--- a/north-glass-erp/northglass-erp/src/lang/kr.js
+++ b/north-glass-erp/northglass-erp/src/lang/kr.js
@@ -1085,7 +1085,8 @@
         finished :'鞏戫拡毳�',
         finishedProductReport :'鞕勳牅頀� 氤搓碃靹�',
         workProcessName:'鍦ㄥ埗鍝佸悕绉�',
-        StorageArea:'鍏ュ簱闈㈢Н'
+        StorageArea:'鍏ュ簱闈㈢Н',
+        shippedArea:'鍙戣揣闈㈢Н'
     },
     productionBasicData:{
         page:{
diff --git a/north-glass-erp/northglass-erp/src/lang/ru.js b/north-glass-erp/northglass-erp/src/lang/ru.js
index 0113559..7a05fdf 100644
--- a/north-glass-erp/northglass-erp/src/lang/ru.js
+++ b/north-glass-erp/northglass-erp/src/lang/ru.js
@@ -1073,7 +1073,8 @@
         finished :'袣芯褝褎褎懈褑懈械薪褌 谐芯褌芯胁芯泄 锌褉芯写褍泻褑懈懈',
         finishedProductReport :'袨褌褔械褌 芯 谐芯褌芯胁芯泄 锌褉芯写褍泻褑懈懈',
         workProcessName:'鍦ㄥ埗鍝佸悕绉�',
-        StorageArea:'鍏ュ簱闈㈢Н'
+        StorageArea:'鍏ュ簱闈㈢Н',
+        shippedArea:'鍙戣揣闈㈢Н'
     },
     productionBasicData:{
         page:{
diff --git a/north-glass-erp/northglass-erp/src/lang/zh.js b/north-glass-erp/northglass-erp/src/lang/zh.js
index e44de48..a22cba9 100644
--- a/north-glass-erp/northglass-erp/src/lang/zh.js
+++ b/north-glass-erp/northglass-erp/src/lang/zh.js
@@ -1089,7 +1089,8 @@
         finished :'鎴愬搧鐜�',
         finishedProductReport :'鎴愬搧鎶ヨ〃',
         workProcessName:'鍦ㄥ埗鍝佸悕绉�',
-        StorageArea:'鍏ュ簱闈㈢Н'
+        StorageArea:'鍏ュ簱闈㈢Н',
+        shippedArea:'鍙戣揣闈㈢Н'
 
     },
     productionBasicData:{
diff --git a/north-glass-erp/northglass-erp/src/views/sd/bom/MaterialBOM.vue b/north-glass-erp/northglass-erp/src/views/sd/bom/MaterialBOM.vue
index 887ef8c..9277d4a 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/bom/MaterialBOM.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/bom/MaterialBOM.vue
@@ -399,13 +399,13 @@
       id="print"
       v-model="dialogTableVisible"
       destroy-on-close
-      style="width: 400px;height:40%;"
+      style="width: 400px;height:280px;margin-top: 200px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
   >
     <el-form
         ref="ruleFormRef"
-        style="max-width: 600px"
+        style="max-width: 600px;"
         :model="ruleForm"
         status-icon
         :rules="rules"
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index ce492e4..f1930cf 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -186,15 +186,17 @@
                c.quantity-ifnull(c.termination_quantity,0) as glassQuantity,
 
                c.quantity-ifnull(c.termination_quantity,0) as quantityShow,
-               (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area as grossAreaShow,
+               round( (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2) as grossAreaShow,
                ifnull(c.received_quantity, 0) as StorageShow,
                ifnull(dd.quantity, 0) as shippedQuantityShow, -- 鍙戣揣鏁伴噺
-               (ifnull(c.received_quantity, 0))*a.compute_area  as StorageAreaShow,-- 鍏ュ簱闈㈢Н
+               round(ifnull(dd.quantity, 0)*a.compute_area,2) as shippedAreaShow, -- 鍙戣揣闈㈢Н
+               round((ifnull(c.received_quantity, 0))*a.compute_area,2)  as StorageAreaShow,-- 鍏ュ簱闈㈢Н
 
-               if(c.technology_number=1,(c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,0) as grossArea,
+               if(c.technology_number=1, round((c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2),0) as grossArea,
                if(c.technology_number=1,ifnull(c.received_quantity, 0) ,0)                        as Storage,
                if(c.technology_number=1,ifnull(dd.quantity, 0) ,0)                          as shippedQuantity,
-               if(c.technology_number=1,(ifnull(c.received_quantity, 0))*a.compute_area,0)  as StorageArea,
+               if(c.technology_number=1,round(ifnull(dd.quantity, 0)*a.compute_area,2),0)         as shippedArea,
+               if(c.technology_number=1, round((ifnull(c.received_quantity, 0))*a.compute_area,2),0)  as StorageArea,
 
 
                ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber,

--
Gitblit v1.8.0