From ff0604306c9cf18a05e5d8a3a136432284c290bb Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 23 五月 2023 09:15:04 +0800
Subject: [PATCH] 1.递交
---
src/views/bbgl/rygz.vue | 100 +++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 83 insertions(+), 17 deletions(-)
diff --git a/src/views/bbgl/rygz.vue b/src/views/bbgl/rygz.vue
index 79a8ad6..746db47 100644
--- a/src/views/bbgl/rygz.vue
+++ b/src/views/bbgl/rygz.vue
@@ -1,8 +1,35 @@
<template>
<div>
<div class="body" :style="{height:mainHeight+'px'}">
- <div class="bodyTopButtonGroup">
+ <div class="bodyTopButtonGroup" style="justify-content: space-between">
<el-button v-waves type="primary" icon="el-icon-download" @click="download">瀵煎嚭</el-button>
+
+
+ <div class="topRight" style="display: flex;align-items: center">
+ <div
+ style="color: red;margin: 0px 10px 0 0;"
+ >褰撳墠鎶ヨ〃鍙粺璁¤嚜鍒朵欢宸ュ簭
+ </div>
+
+ <!-- <div style="font-size: 14px;margin-right: 15px;color: #a7a7a7">鍓旈櫎宸ュ簭</div>-->
+ <el-select
+ v-model="form.rejectstepcode"
+ style="width: 220px;"
+ multiple
+ placeholder="璇烽�夋嫨鍓旈櫎杞﹂棿"
+ collapse-tags
+ filterable
+ clearable
+ @change="getPeopleSalaryReportSearch"
+ >
+ <el-option
+ v-for="item in WorkShopArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </div>
</div>
<div class="bodyTopFormGroup">
@@ -15,19 +42,19 @@
>
<div class="elForm">
<el-form-item label="宸ュ崟缂栧彿" style="display: flex;">
- <el-input v-model="form.wocode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ <el-input v-model="form.wocode" placeholder="璇疯緭鍏�" style="width: 200px"/>
</el-form-item>
<el-form-item label="浜у搧缂栫爜" style=" display: flex;">
- <el-input v-model="form.partcode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ <el-input v-model="form.partcode" placeholder="璇疯緭鍏�" style="width: 200px"/>
</el-form-item>
<el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
- <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�"/>
</el-form-item>
<el-form-item label="瑙勬牸鍨嬪彿" style=" display: flex;">
- <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
+ <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�"/>
</el-form-item>
<el-form-item v-show="isExpandForm" label="宸ュ簭鍚嶇О" style=" display: flex;">
- <el-input v-model="form.stepname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ <el-input v-model="form.stepname" style="width: 200px" placeholder="璇疯緭鍏�"/>
</el-form-item>
<el-form-item v-show="isExpandForm" label="鐢熶骇鐝粍" style=" display: flex;">
<el-select v-model="form.groupcode" style="width: 200px" placeholder="璇烽�夋嫨">
@@ -40,7 +67,7 @@
</el-select>
</el-form-item>
<el-form-item v-show="isExpandForm" label="鎶ュ伐浜哄憳" style=" display: flex;">
- <el-input v-model="form.reportname" style="width: 200px" placeholder="璇疯緭鍏�" />
+ <el-input v-model="form.reportname" style="width: 200px" placeholder="璇疯緭鍏�"/>
</el-form-item>
<el-form-item v-show="isExpandForm" label="鎶ュ伐鏃堕棿" style="display: flex;align-items: center">
<el-date-picker
@@ -95,8 +122,7 @@
:data="tableData"
:height="isExpandForm?(tableHeight-80):(tableHeight-40)+'px'"
border
- :summary-method="getSummaries"
- show-summary
+
:row-class-name="tableRowClassName"
:style="{width: 100+'%',height:isExpandForm?(tableHeight-80):(tableHeight-40)+'px',}"
highlight-current-row
@@ -104,6 +130,8 @@
:cell-style="this.$cellStyle"
@sort-change="sortChange"
>
+<!-- :summary-method="getSummaries"-->
+<!-- show-summary-->
<el-table-column
prop="RowNum"
width="50"
@@ -199,7 +227,7 @@
</el-table-column>
<el-table-column
prop="ratio"
- label="宸ュ簭鍗曚环"
+ label="鍒嗛厤姣斾緥"
width="110"
sortable="custom"
>
@@ -210,7 +238,7 @@
</el-table-column>
<el-table-column
prop="usermoney"
- label="涓汉璁颁欢宸ヨ祫"
+ label="涓汉璁′欢宸ヨ祫"
width="130"
sortable="custom"
>
@@ -253,8 +281,7 @@
:data="tableData2"
:height="isExpandForm?(tableHeight-80):(tableHeight-40)+'px'"
border
- :summary-method="getSummaries"
- show-summary
+
:row-class-name="tableRowClassName"
:style="{width: 100+'%',height:isExpandForm?(tableHeight-80):(tableHeight-40)+'px',}"
highlight-current-row
@@ -262,6 +289,8 @@
:cell-style="this.$cellStyle"
@sort-change="sortChange"
>
+<!-- :summary-method="getSummaries"-->
+<!-- show-summary-->
<el-table-column
prop="RowNum"
width="50"
@@ -357,7 +386,7 @@
</el-table-column>
<el-table-column
prop="usermoney"
- label="涓汉璁颁欢宸ヨ祫"
+ label="涓汉璁′欢宸ヨ祫"
width="130"
sortable="custom"
>
@@ -448,6 +477,8 @@
import { MesOrderStepReportSelectUserGroup } from '@/api/scgl'
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
+import { StepSelect } from '@/api/zzmx'
+import { WorkShopSelect } from '@/api/sbgl'
export default {
name: 'Zzjg',
@@ -461,6 +492,8 @@
isExpandForm: false,
mainHeight: 0,
tableHeight: 0,
+ // StepSelectArr: [], // 鍓旈櫎宸ュ簭鏁扮粍
+ WorkShopArr: [],//鍓旈櫎杞﹂棿鏁扮粍
form: {
wocode: '', // 宸ュ崟缂栧彿
partcode: '', // 浜у搧缂栫爜
@@ -470,6 +503,7 @@
groupcode: '', // 鐢熶骇鐝粍
reportname: '', // 鎿嶄綔浜哄憳
reportdate: '', // 鎿嶄綔鏃堕棿
+ rejectstepcode: [], // 鍓旈櫎宸ュ簭(鍥哄畾钖祫宸ュ簭涓嶅弬涓庤绠�
compute: 'last', // 璁′欢鏂瑰紡
prop: 'partcode', // 鎺掑簭瀛楁
order: 'desc', // 鎺掑簭瀛楁
@@ -533,15 +567,28 @@
this.getPeopleSalaryReportSearch().then(res => {
if (res.code === '200') {
this.getMesOrderStepReportSelectUserGroup()
+ this.getWorkShopSelect()
}
})
+ },
+ // 鑾峰彇宸ュ簭涓嬫媺鎺ュ彛
+ // async getStepSelect() {
+ // const { data: res } = await StepSelect()
+ // this.StepSelectArr = res
+ // },
+ // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
+ async getWorkShopSelect() {
+ const { data: res } = await WorkShopSelect()
+ this.WorkShopArr = res
},
getSummaries(param) {
const { columns, data } = param
const sums = []
+ const i = this.form.compute === 'last' ? 11 : 10
+
columns.forEach((column, index) => {
- if (index === 10) {
+ if (index === i) {
sums[index] = '鎬讳环'
return
}
@@ -550,9 +597,10 @@
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
- return prev + curr
+ // return prev + curr
+ return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
} else {
- return prev
+ return Math.round(prev * 100) / 100
}
}, 0)
@@ -567,7 +615,10 @@
this.$refs.tableDataRef.doLayout()
this.$refs.tableDataRef2.doLayout()
})
+ // (Math.round(sums * 100) / 100).toS
+ // console.log(typeof sums)
+ // console.log(sums[11].split(' '))
return sums
},
async getPeopleSalaryReportSearch() {
@@ -584,6 +635,7 @@
groupcode: this.form.groupcode,
compute: this.form.compute,
reportname: this.form.reportname,
+ rejectstepcode: this.form.rejectstepcode.join(','),
reportdate: tempDate,
prop: this.form.prop,
order: this.form.order,
@@ -890,6 +942,20 @@
height: 100% !important;
}
}
+
+.topRight ::v-deep {
+ input::-webkit-input-placeholder {
+ color: $main_color;
+ }
+
+ //input::-moz-input-placeholder {
+ // color: rgba(0, 204, 254, 1);
+ //}
+
+ input::-ms-input-placeholder {
+ color: $main_color;
+ }
+}
</style>
<style>
--
Gitblit v1.9.3