loulijun2021
2023-05-06 cbcf2f774d7bd505502cf05a09eb38ee553f7c34
src/views/bbgl/rygz.vue
@@ -90,8 +90,7 @@
          :data="tableData"
          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
          border
          :summary-method="getSummaries"
          show-summary
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
          highlight-current-row
@@ -99,6 +98,8 @@
          :cell-style="this.$cellStyle"
          @sort-change="sortChange"
        >
          <!--          :summary-method="getSummaries"-->
          <!--          show-summary-->
          <el-table-column
            prop="RowNum"
            width="50"
@@ -188,13 +189,13 @@
            </template>
          </el-table-column>
          <el-table-column
            prop="usermoney"
            prop="moneys"
            label="个人记件工资"
            width="130"
            min-width="130"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.usermoney">{{ row.usermoney }} 元</div>
              <div v-if="row.moneys">{{ row.moneys }} 元</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
@@ -359,12 +360,12 @@
      const sums = []
      columns.forEach((column, index) => {
        if (index === 10) {
        if (index === 9) {
          sums[index] = '总价'
          return
        }
        const values = data.map(item => Number(item[column.property]))
        if (column.property === 'usermoney') {
        if (column.property === 'moneys') {
          sums[index] = values.reduce((prev, curr) => {
            const value = Number(curr)
            if (!isNaN(value)) {