From d21bf3ca039b88f9cc839fc341f2dfda3e5cb01c Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Mon, 18 May 2020 16:37:42 +0800
Subject: [PATCH] a
---
.../index.vue | 2 +-
.../TechnologyCenter/QueryParts/index.vue | 80 +++++++++++--------
2 files changed, 49 insertions(+), 33 deletions(-)
diff --git a/src/views/Assembly/QualityInspectionInformationInquiry/index.vue b/src/views/Assembly/QualityInspectionInformationInquiry/index.vue
index 9d77176e..5a42429e 100644
--- a/src/views/Assembly/QualityInspectionInformationInquiry/index.vue
+++ b/src/views/Assembly/QualityInspectionInformationInquiry/index.vue
@@ -61,7 +61,7 @@
查询
- 导出
+ 导出
新增
diff --git a/src/views/TechnologyCenter/QueryParts/index.vue b/src/views/TechnologyCenter/QueryParts/index.vue
index fde81716..a21179c7 100644
--- a/src/views/TechnologyCenter/QueryParts/index.vue
+++ b/src/views/TechnologyCenter/QueryParts/index.vue
@@ -15,15 +15,11 @@
:label="item.label"
:value="item.value"/>
-
-
-
-
-
-
-
查询
+
+ 导出
+
@@ -42,7 +38,7 @@
- 自制件
+ 自制件
- 外购件
-
-
+
+ 外购件
+
+ 导出
+
+
+
+
{{ scope.row.物料名称 }}
@@ -328,11 +317,6 @@ export default {
}
},
watch: {
- // machine(val) {
- // if (val.length > 0) {
- // this.machineValue = val[0].value
- // }
- // },
machineValue(val) {
this.groupValue = ''
this.group = []
@@ -359,6 +343,42 @@ export default {
this.fetchData()
},
methods: {
+ exportExcel() {
+ if (this.tableData.length === 0) {
+ this.$message.warning('请先查询要导出的数据')
+ } else {
+ const machine_check = this.machineValue ? 1 : 0
+ const group_check = this.groupValue ? 1 : 0
+ const Model_check = this.ModelValue ? 1 : 0
+ var param = []
+ param[0] = ['机床流水号_check', machine_check]
+ param[1] = ['机床流水号', this.machineValue]
+ param[2] = ['组件流水号_check', group_check]
+ param[3] = ['组件流水号', this.groupValue]
+ param[4] = ['规格_check', Model_check]
+ param[5] = ['规格', this.ModelValue]
+ var Data = this.CreateData('2001', '报表_PDM_零件明细表_基本件_查询数据_综合gj', param)
+ this.exportExcel_NPOI(Data)
+ }
+ },
+ exportExcel2() {
+ if (this.tableDataWB.length === 0) {
+ this.$message.warning('请先查询要导出的数据')
+ } else {
+ const machine_check = this.machineValue ? 1 : 0
+ const group_check = this.groupValue ? 1 : 0
+ const Model_check = this.ModelValue ? 1 : 0
+ var param = []
+ param[0] = ['机床流水号_check', machine_check]
+ param[1] = ['机床流水号', this.machineValue]
+ param[2] = ['组件流水号_check', group_check]
+ param[3] = ['组件流水号', this.groupValue]
+ param[4] = ['规格_check', Model_check]
+ param[5] = ['规格', this.ModelValue]
+ var Data = this.CreateData('2001', '报表_PDM_零件明细表_标准件和外购件_查询数据', param)
+ this.exportExcel_NPOI(Data)
+ }
+ },
// 在什么情况下需要查询上传的附件,调用this.getFileData()即可根据
getFileData(machineValue) {
this.hadFile = []
@@ -394,11 +414,9 @@ export default {
param[2] = group_check
param[3] = this.groupValue
this.getSelect(searchModel, ['规格', '规格'], 'Model', param)
- console.log(this.Model, 989898)
},
getTableData() {
this.getFileData(this.machineValue)
- console.log(this.hadFile, 88899)
if (this.machineValue) {
const machine_check = this.machineValue ? 1 : 0
const group_check = this.groupValue ? 1 : 0
@@ -408,7 +426,6 @@ export default {
this.loading = false
const res = response.data
this.total = res.total
- console.log(this.tableData)
this.tableData = res.rows.map(item => {
if (item.整改类型 === '1') {
item.整改类型 = '新增'
@@ -432,7 +449,6 @@ export default {
const data = response.data
this.totalWB = data.total
this.tableDataWB = data.rows.map(item => {
- console.log(item)
if (item.整改类型 === '1') {
item.整改类型 = '新增'
} else if (item.整改类型 === '2') {