From 12ef895481038a7bec06a2c6cb47748a6353e848 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 11 五月 2023 17:35:04 +0800
Subject: [PATCH] 1.生产进度报表提交
---
src/views/bbgl/rygz.vue | 66 +++++++++++++++++++++++++-------
1 files changed, 51 insertions(+), 15 deletions(-)
diff --git a/src/views/bbgl/rygz.vue b/src/views/bbgl/rygz.vue
index c4835c3..70b12c0 100644
--- a/src/views/bbgl/rygz.vue
+++ b/src/views/bbgl/rygz.vue
@@ -90,6 +90,7 @@
:data="tableData"
:height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
border
+
:row-class-name="tableRowClassName"
:style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
highlight-current-row
@@ -97,6 +98,8 @@
:cell-style="this.$cellStyle"
@sort-change="sortChange"
>
+ <!-- :summary-method="getSummaries"-->
+ <!-- show-summary-->
<el-table-column
prop="RowNum"
width="50"
@@ -156,21 +159,21 @@
show-tooltip-when-overflow
sortable="custom"
/>
+ <!-- <el-table-column-->
+ <!-- prop="group_name"-->
+ <!-- label="鐢熶骇鐝粍"-->
+ <!-- width="110"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- sortable="custom"-->
+ <!-- />-->
<el-table-column
- prop="group_name"
- label="鐢熶骇鐝粍"
- width="110"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="good_qty"
+ prop="report_qty"
label="鎶ュ伐鏁伴噺"
width="110"
sortable="custom"
>
<template slot-scope="{row}">
- <div v-if="row.good_qty">{{ row.good_qty }}</div>
+ <div v-if="row.report_qty">{{ row.report_qty }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -181,23 +184,23 @@
sortable="custom"
>
<template slot-scope="{row}">
- <div v-if="row.unprice">{{ row.unprice }}鍏�</div>
+ <div v-if="row.unprice">{{ row.unprice }} 鍏�</div>
<div v-else>/</div>
</template>
</el-table-column>
<el-table-column
- prop="usermoney"
- label="鐝粍璁颁欢宸ヨ祫"
- width="130"
+ prop="moneys"
+ label="涓汉璁颁欢宸ヨ祫"
+ 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>
<el-table-column
- prop="lm_user"
+ prop="username"
label="鎶ュ伐浜哄憳"
width="110"
sortable="custom"
@@ -352,6 +355,39 @@
}
})
},
+ getSummaries(param) {
+ const { columns, data } = param
+ const sums = []
+
+ columns.forEach((column, index) => {
+ if (index === 9) {
+ sums[index] = '鎬讳环'
+ return
+ }
+ const values = data.map(item => Number(item[column.property]))
+ if (column.property === 'moneys') {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr)
+ if (!isNaN(value)) {
+ return prev + curr
+ } else {
+ return prev
+ }
+ }, 0)
+
+ sums[index] += ' 鍏�'
+ } else {
+ // sums[index] = 'N/A'
+ sums[index] = ' '
+ }
+ })
+
+ this.$nextTick(() => {
+ this.$refs.tableDataRef.doLayout()
+ })
+
+ return sums
+ },
async getPeopleSalaryReportSearch() {
let tempDate = this.form.reportdate
if (tempDate.length > 0) {
--
Gitblit v1.9.3