廖井涛
2024-07-10 78809560f4315777e770acec0e24cb42e2ca97a7
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -26,10 +26,6 @@
      router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}})
      break
    }
    case 'setType': {
      alert('我接收到子组件传送的删除信息')
      break
    }
    case 'delete': {
      request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => {
        if (res.code == 200) {
@@ -146,7 +142,7 @@
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: false},//鼠标移动或选择高亮
  id: 'CustomerListRight',
  id: 'AddProcessCardRight',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
@@ -162,6 +158,9 @@
  },
  customConfig: {
    storage: true
  },
  sortConfig:{
    multiple:true
  },
  editConfig: {
    trigger: 'click',
@@ -223,16 +222,8 @@
  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) {
@@ -265,7 +256,7 @@
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: false},//鼠标移动或选择高亮
  id: 'CustomerList',
  id: 'AddProcessCardLeft',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
@@ -709,6 +700,21 @@
    return parseFloat((row.baiscQuantity*row.thickness*row.width*row.height*2.5/1000000).toFixed(2))
}
let quantit = ref('')
let weight = ref('')
const handleCheckboxChange=({ row}) =>{
  const $grid = xGrid.value
  //获取右边表格checkbox选中的数据
  const checkedList = $grid.getCheckboxRecords()
  let quantitySum = 0;
  let weightsum=0;
  checkedList.forEach(item => {
    quantitySum += item.baiscQuantity;
    weightsum += weightSum(item);
  });
  quantit.value = quantitySum;
  weight.value = parseFloat(weightsum.toFixed(2));
}
</script>
<template>
@@ -774,6 +780,10 @@
        <div width="12%">
          <el-main style="">
            <div>
              <span><el-input v-model="quantit"  style="width: 80px;"/></span>
              <span><el-input v-model="weight"  style="width: 80px;"/></span>
            </div>
            <span>{{ $t('processCard.selectedQuantity') }}:<el-input v-model="checkedNum" clearable
                                                                     type="number"></el-input></span><br>
            <el-button type="primary" @click="addRight"> →</el-button>
@@ -800,6 +810,7 @@
                max-height="100%"
                v-bind="gridOptions"
                checkbox-config="{ reserve: true, strict: true }"
                @checkbox-change="handleCheckboxChange"
            >
              <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
              <!--      下拉显示所有信息插槽-->