From e9f8d23f55f64903d834308f9f167aaf3195c20d Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 30 七月 2025 09:10:26 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue |   63 ++++++++++++++++++++++++-------
 1 files changed, 49 insertions(+), 14 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 6483eab..cc69b2c 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,7 +1,6 @@
 <script setup>
 import {computed, onMounted, reactive, ref, watch} from "vue";
 import {changeFilterEvent, filterChanged} from "@/hook"
-import footSum from "@/hook/footSum"
 import {useI18n} from "vue-i18n"
 import request from "@/utils/request"
 import {ElMessage} from "element-plus"
@@ -42,10 +41,10 @@
   mergeCells:[],
   toolbarConfig: {
     zoom: true,
-    custom: true
+    /*custom: true*/
   },
   cellClassName ({ row, column,columnIndex})  {
-    if (columnIndex>10 && row.quantity*1 === row.reportWorkQuantity[column.title]*1){
+    if (columnIndex>10 && row.thisQuantity*1 === row.reportWorkQuantity[column.title]*1){
         return 'row-green'
     }
     return null
@@ -77,14 +76,17 @@
   {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: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')},
 ]
-let column = [0,1,3,6,7,8,9]
+let column = [0,1,3,6,7,8,10,11,12,13]
 
 
 onMounted(()=>{
@@ -96,16 +98,16 @@
 })
 
 
-
+let mergeCells = ref()
 const getWorkOrder = () => {
+  gridOptions.loading = true
   request.post(`/report/processCardProgress/${props.orderId}`,column).then(async (res) => {
     if (res.code == 200) {
-
       gridOptions.columns = JSON.parse(JSON.stringify(columns))
       gridOptions.columns.forEach(item =>{
         item.filterMethod = filterChanged
       })
-      list.value = ['quantity']
+      list.value = ['quantity','inventory','inventoryArea','gross_area','shippedQuantity','glassQuantity']
       res.data.title.forEach((item,index) =>{
         list.value.push('reportWorkQuantity.'+item.process)
         let column = {slots: { default: 'quantitySum'},
@@ -117,23 +119,55 @@
       res.data.data.forEach(item => {
         item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity)
         item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount)
+        item.reportWorkQuantityShow=JSON.parse(item.reportWorkQuantityShow)
       })
-      //gridOptions.mergeCells= res.data.mergeCells
+
       await xGrid.value.loadData(res.data.data)
+      await xGrid.value.setMergeCells(res.data.mergeCells)
+      mergeCells.value = res.data.mergeCells
+      gridOptions.loading = false
+
     } else {
       ElMessage.warning(res.msg)
     }
   })
 }
 
-const quantitySum = ( row,column )=>{
-  const reportWorkQuantity = row.reportWorkQuantity[column.title] || 0
-  const reportWorkQuantityCount = row.reportWorkQuantityCount[column.title] || 0
-  if(reportWorkQuantity===reportWorkQuantityCount){
-    return reportWorkQuantity
+const filterChange = () =>{
+  if(xGrid.value.isFilter()){
+    xGrid.value.clearMergeCells()
+    xGrid.value.clearMergeFooterItems()
+  }else{
+    xGrid.value.setMergeCells(mergeCells.value)
+    xGrid.value.updateFooter()
   }
 
-  return (reportWorkQuantity
+
+}
+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
+    }else {
+      count += Number(item[field])  || 0
+    }
+  })
+  return count.toFixed(2)
+}
+
+const quantitySum = ( row,column )=>{
+  const reportWorkQuantityCount = row.reportWorkQuantityCount[column.title] || ''
+  const reportWorkQuantityShow = row.reportWorkQuantityShow[column.title] || ''
+  if(reportWorkQuantityShow===reportWorkQuantityCount){
+    return reportWorkQuantityShow
+  }
+
+  return (reportWorkQuantityShow
       +'('
       +reportWorkQuantityCount
       +')' )
@@ -144,6 +178,7 @@
 <template>
   <div style="width: 100%;height: 100%">
     <vxe-grid
+        @filter-change ='filterChange'
         height="100%"
         size="mini"
         class="mytable-scrollbar"

--
Gitblit v1.8.0