a
This commit is contained in:
@@ -61,7 +61,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary" size="small" icon="el-icon-search" style="margin-left: 15px;margin-top: 5px" plain @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
|
<el-button type="primary" size="small" icon="el-icon-search" style="margin-left: 15px;margin-top: 5px" plain @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
|
||||||
<el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
|
<el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
|
||||||
<el-button type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button>
|
<el-button v-positive="'loading'" type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="AddTableData()">新增</el-button>
|
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="AddTableData()">新增</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|||||||
@@ -15,15 +15,11 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<!--<el-select v-model="ModelValue" placeholder="规格" style="width: 150px;margin-top: 10px;margin-bottom: 5px" filterable size="small" clearable="">-->
|
|
||||||
<!--<el-option-->
|
|
||||||
<!--v-for="item in Model"-->
|
|
||||||
<!--:key="item.value"-->
|
|
||||||
<!--:label="item.label"-->
|
|
||||||
<!--:value="item.value"/>-->
|
|
||||||
<!--</el-select>-->
|
|
||||||
<el-input v-model="ModelValue" placeholder="名称规格型号" style="width: 180px" size="small" clearable/>
|
<el-input v-model="ModelValue" placeholder="名称规格型号" style="width: 180px" size="small" clearable/>
|
||||||
<el-button icon="el-icon-search" type="primary" plain size="small" @click="pageCurrentWB = 1;pageSizeWB = 1000;pageCurrent = 1;pageSize = 1000;getTableData()">查询</el-button>
|
<el-button icon="el-icon-search" type="primary" plain size="small" @click="pageCurrentWB = 1;pageSizeWB = 1000;pageCurrent = 1;pageSize = 1000;getTableData()">查询</el-button>
|
||||||
|
<el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
|
||||||
|
<el-button v-positive="'loading'" type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button>
|
||||||
|
</el-tooltip>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<div v-for="(file, key) in hadFile" :key="key">
|
<div v-for="(file, key) in hadFile" :key="key">
|
||||||
@@ -42,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<h3>自制件</h3>
|
<div style="font-size: 22px;font-weight: bold;margin-top: 5px">自制件</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
@@ -175,21 +171,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<h3>外购件</h3>
|
<div style="font-size: 22px;font-weight: bold;margin-top: 5px">
|
||||||
<el-table
|
外购件
|
||||||
v-loading="loadingWB"
|
<el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
|
||||||
:data="tableDataWB"
|
<el-button v-positive="'loading'" type="warning" size="small" icon="el-icon-download" plain style="float: right;margin: 3px 150px 5px 0" @click="exportExcel2()">导出</el-button>
|
||||||
style="width: 100%;min-height: 600px;"
|
</el-tooltip>
|
||||||
size="mini"
|
</div>
|
||||||
stripe
|
<el-table v-loading="loadingWB" :data="tableDataWB" style="width: 100%;min-height: 600px;" size="mini" stripe height="500" highlight-current-row border>
|
||||||
height="500"
|
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||||
highlight-current-row
|
|
||||||
border>
|
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
align="center"
|
|
||||||
type="index"
|
|
||||||
width="50"/>
|
|
||||||
<el-table-column align="center" prop="物料名称" label="物料名称">
|
<el-table-column align="center" prop="物料名称" label="物料名称">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.物料名称 }}
|
{{ scope.row.物料名称 }}
|
||||||
@@ -328,11 +317,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// machine(val) {
|
|
||||||
// if (val.length > 0) {
|
|
||||||
// this.machineValue = val[0].value
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
machineValue(val) {
|
machineValue(val) {
|
||||||
this.groupValue = ''
|
this.groupValue = ''
|
||||||
this.group = []
|
this.group = []
|
||||||
@@ -359,6 +343,42 @@ export default {
|
|||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
methods: {
|
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()即可根据
|
// 在什么情况下需要查询上传的附件,调用this.getFileData()即可根据
|
||||||
getFileData(machineValue) {
|
getFileData(machineValue) {
|
||||||
this.hadFile = []
|
this.hadFile = []
|
||||||
@@ -394,11 +414,9 @@ export default {
|
|||||||
param[2] = group_check
|
param[2] = group_check
|
||||||
param[3] = this.groupValue
|
param[3] = this.groupValue
|
||||||
this.getSelect(searchModel, ['规格', '规格'], 'Model', param)
|
this.getSelect(searchModel, ['规格', '规格'], 'Model', param)
|
||||||
console.log(this.Model, 989898)
|
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
this.getFileData(this.machineValue)
|
this.getFileData(this.machineValue)
|
||||||
console.log(this.hadFile, 88899)
|
|
||||||
if (this.machineValue) {
|
if (this.machineValue) {
|
||||||
const machine_check = this.machineValue ? 1 : 0
|
const machine_check = this.machineValue ? 1 : 0
|
||||||
const group_check = this.groupValue ? 1 : 0
|
const group_check = this.groupValue ? 1 : 0
|
||||||
@@ -408,7 +426,6 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
const res = response.data
|
const res = response.data
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
console.log(this.tableData)
|
|
||||||
this.tableData = res.rows.map(item => {
|
this.tableData = res.rows.map(item => {
|
||||||
if (item.整改类型 === '1') {
|
if (item.整改类型 === '1') {
|
||||||
item.整改类型 = '新增'
|
item.整改类型 = '新增'
|
||||||
@@ -432,7 +449,6 @@ export default {
|
|||||||
const data = response.data
|
const data = response.data
|
||||||
this.totalWB = data.total
|
this.totalWB = data.total
|
||||||
this.tableDataWB = data.rows.map(item => {
|
this.tableDataWB = data.rows.map(item => {
|
||||||
console.log(item)
|
|
||||||
if (item.整改类型 === '1') {
|
if (item.整改类型 === '1') {
|
||||||
item.整改类型 = '新增'
|
item.整改类型 = '新增'
|
||||||
} else if (item.整改类型 === '2') {
|
} else if (item.整改类型 === '2') {
|
||||||
|
|||||||
Reference in New Issue
Block a user