chenlu
2024-07-04 85aa4497849d485aa2e7ae01976ddc572f7022cc
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -146,7 +146,7 @@
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: false},//鼠标移动或选择高亮
  id: 'CustomerList',
  id: 'AddProcessCardRight',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
@@ -222,20 +222,38 @@
  },
  data: [],//table body实际数据
  //脚部求和
  weighAllAmount(data) {
    let count = 0
    data.forEach(row => {
      count += row.weight
    })
    return count
  },
  footerMethod ({ columns, data }) {//页脚函数
    let count = 0
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return t('basicData.total')
        }
        const List = ["baiscQuantity",'computeGrossArea','weight','perimeter']
        const List = ["baiscQuantity",'computeGrossArea']
        if (List.includes(column.field)) {
          return footSum(data, column.field)
        }
        if (column.field === 'weight'){
          data.forEach(row => {
            count += weightSum(row)
          })
          return  parseFloat(count.toFixed(2))
        }
        return ''
      })
    ]
  }
  },
})
@@ -247,7 +265,7 @@
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: false},//鼠标移动或选择高亮
  id: 'CustomerList',
  id: 'AddProcessCardLeft',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
@@ -289,7 +307,7 @@
    },
    {
      field: 'landingSequence',
      title: '落架顺序',
      title: t('processCard.landingSequence'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
@@ -325,7 +343,7 @@
        if (columnIndex === 0) {
          return t('basicData.total')
        }
        const List = ["quantity",'goodsQuantity','area','perimeter']
        const List = ["quantity",'goodsQuantity','area']
        if (List.includes(column.field)) {
          return footSum(data, column.field)
        }
@@ -691,6 +709,18 @@
    return parseFloat((row.baiscQuantity*row.thickness*row.width*row.height*2.5/1000000).toFixed(2))
}
//右边表格定义
// const $grid = xGrid.value
// //获取右边表格checkbox选中的数据
// const checkedList = $grid.getCheckboxRecords()
// const checkedSum = (checkedList) =>{
//   let sum = 0
//   checkedList.forEach((item)=>{
//     sum += parseFloat(item.weightSum)
//   })
//   return sum
// }
</script>
<template>