From bf90cf8568301edb38920e8b0a0ce7e137a668ef Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 21 八月 2025 09:51:55 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/components/sd/order/OrderProcessCollect.vue |   48 +++++++++++++++++++++++++++---------------------
 1 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcessCollect.vue b/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcessCollect.vue
index 08ecf40..ba7704d 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcessCollect.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcessCollect.vue
@@ -41,7 +41,7 @@
   mergeCells:[],
   toolbarConfig: {
     zoom: true,
-    /*custom: true*/
+     // custom: true
   },
   cellClassName ({ row, column,columnIndex})  {
     if (columnIndex>10 && row.thisQuantity*1 === row.reportWorkQuantity[column.title]*1){
@@ -69,24 +69,19 @@
   orderId:null
 })
 const columns = [
-  {field: 'order_number',fixed:"left", width: 90,title: t('order.OrderNum'),showOverflow:"ellipsis"},
-  // {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
   {field: 'product_name', width: 150, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
   {field: 'glass_child',width: 130, title: t('reportingWorks.glassChild') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
   {field: 'order_type', width: 120,title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
   {field: 'process_id',width: 110, title: t('processCard.processId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
-  {field: 'technology_number', width: 90,title:  t('processCard.technologyNumber'),showOverflow:"ellipsis"},
-  {field: 'child_width', width: 90,title:  t('order.width'),showOverflow:"ellipsis"},
-  {field: 'child_height', width: 90,title:  t('order.height'),showOverflow:"ellipsis"},
-  {field: 'quantity', width: 90,title: t('order.quantity')},
-  {field: 'glassQuantity', width: 90,title: t('order.glassQuantity')},
-  {field: 'gross_area', width: 90,title: t('order.area')},
-  {field: 'shippedQuantity',width: 120, title: t('delivery.deliveryQuantity')},
-  {field: 'inventory',width: 120, title: t('productStock.inventoryQuantity')},
-  {field: 'inventoryArea',width: 120, title: t('report.inventoryArea')},
+  {field: 'technology_number', width: 90,title:  t('processCard.technologyNumber'),showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+  {field: 'quantity',slots: { default: 'show'}, width: 90,title: t('order.quantity')},
+  {field: 'thisQuantity', width: 90,title: t('order.glassQuantity')},
+  {field: 'gross_area',slots: { default: 'show'}, width: 90,title: t('order.area')},
+  {field: 'inventory',slots: { default: 'show'},width: 120, title: t('report.inventoryNum')},
+  {field: 'inventoryArea',slots: { default: 'show'},width: 120, title: t('report.StorageArea')},
   {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')},
 ]
-let column = [0,1,3,6,7,8,10,11,12,13]
+let column = [0,2,3,5,7,8,9]
 
 
 onMounted(()=>{
@@ -96,7 +91,9 @@
 watch(()=>props.orderId,(newValue)=>{
   getWorkOrder()
 })
-
+const show = (row,column ) =>{
+  return row[column.field+'Show']
+}
 
 let mergeCells = ref()
 const getWorkOrder = () => {
@@ -107,7 +104,9 @@
       gridOptions.columns.forEach(item =>{
         item.filterMethod = filterChanged
       })
-      list.value = ['quantity','inventory','inventoryArea','gross_area','shippedQuantity','glassQuantity']
+      console.log(res)
+
+      list.value = ['quantity','thisQuantity','inventory','inventoryArea','gross_area','glassQuantity','broken_num']
       res.data.title.forEach((item,index) =>{
         list.value.push('reportWorkQuantity.'+item.process)
         let column = {slots: { default: 'quantitySum'},
@@ -119,7 +118,7 @@
       res.data.data.forEach(item => {
         item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity)
         item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount)
-        item.reportWorkQuantityShow=JSON.parse(item.reportWorkQuantityShow)
+         item.reportWorkQuantityShow=JSON.parse(item.reportWorkQuantityShow)
       })
 
       await xGrid.value.loadData(res.data.data)
@@ -145,19 +144,22 @@
 
 }
 const footSum =(list, field) => {
-  if(xGrid.value.isFilter()){
-    return
-  }
   let count = 0
   list.forEach(item => {
     if(field.indexOf('.')>-1){
       let  array = field.split('.')
-      count += Number(item[array[0]][array[1]]) || 0
+      //鍒ゆ柇鏄惁涓虹瓫閫夌姸鎬佸拰闈炶鍗曞悎骞剁姸鎬�
+      if(xGrid.value.isFilter() ){
+        count += Number(item[array[0]+'Show'][array[1]]) || 0
+      }else{
+        count += Number(item[array[0]][array[1]]) || 0
+      }
+
     }else {
       count += Number(item[field])  || 0
     }
   })
-  return count.toFixed(2)
+  return count.toFixed(2).replace(/\.?0+$/, '');
 }
 
 const quantitySum = ( row,column )=>{
@@ -200,6 +202,10 @@
       <template #quantitySum="{ row,column }">
         <span>{{ quantitySum(row,column) }} </span>
       </template>
+      <template #show="{ row,column }">
+        <span>{{ show(row,column) }} </span>
+      </template>
+
 
     </vxe-grid>
   </div>

--
Gitblit v1.8.0