guoyuji
2024-05-07 fcd6de629c4f6b8d9e610da854f15ef40115b058
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -26,8 +26,7 @@
      break
    }
    case 'printing' :{
      const url = router.resolve({path: '/main/delivery/deliveryPrinting', query: { deliveryID: row.deliveryId }})
      window.open(url.href, '_blank')
      router.push({path: '/main/delivery/deliveryPrinting', query: { deliveryID: row.deliveryId }})
      break
    }
    case 'delete':{
@@ -84,7 +83,6 @@
request.post(`/Delivery/getSelectShippingOrder/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => {
  if(res.code==200){
    console.log(res.data.data)
    total.dataTotal = res.data.total.total*1
    total.pageTotal= res.data.total.pageTotal
@@ -264,20 +262,31 @@
  },
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['quantity','area']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return t('basicData.total')
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
        }
        return ''
      })
    ]
  }
})
//表尾求和
const sumNum = (list, field) => {
  let count = 0
  list.forEach(item => {
    count += Number(item[field])
  })
  return count.toFixed(2)
}
</script>
<template>
@@ -295,7 +304,6 @@
    <vxe-grid
        max-height="97%"
        @filter-change="filterChanged"
        @cell-dblclick="cellClickEvent"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
@@ -355,14 +363,13 @@
    <el-dialog
        v-model="dialogTableVisible"
        destroy-on-close
        style="width: 75%;height:70% ">
        id="deliveryPrinting"
        style="width: 100%;height:100%;margin-top: 0; ">
      <DeliveryPrinting
          :deliveryId="rowClickIndex.deliveryId"
          style="width: 100%;height: 100%" />
          style="width: 100%;height: 100%;" />
    </el-dialog>
  </div>
</template>
<style scoped>
</style>