更新大连模块的 搜索查询 Excel导出大改

This commit is contained in:
XingCheng3
2026-05-23 16:47:08 +08:00
parent 381f02595f
commit d543f94149
25 changed files with 420 additions and 171 deletions

View File

@@ -6,7 +6,22 @@ export default {
install(Vue) { install(Vue) {
Vue.prototype.exportExcel_NPOI = function(param) { Vue.prototype.exportExcel_NPOI = function(param) {
console.log(param, 1) console.log(param, 1)
download(`${ExcelDownLoad}?param=${param}`) return download(`${ExcelDownLoad}?param=${param}`)
}
Vue.prototype.runExcelExport = function(param, loadingKey) {
if (loadingKey) {
this[loadingKey] = true
}
return this.exportExcel_NPOI(param).then(() => {
this.$message.success('导出成功')
}).catch(error => {
console.error('导出失败:', error)
this.$message.error(error.message || '导出失败')
}).finally(() => {
if (loadingKey) {
this[loadingKey] = false
}
})
} }
// 用于生成传通讯服务器参数。 // 用于生成传通讯服务器参数。
// 传入参数 // 传入参数
@@ -396,24 +411,41 @@ export default {
} }
} }
function download(url) { function download(url) {
getBlob(url, function(blob, filename) { return getBlob(url).then(({ blob, filename }) => {
console.log(blob, filename, 2) console.log(blob, filename, 2)
saveAs(blob, filename) saveAs(blob, filename)
return filename
}) })
} }
function getBlob(url, cb) { function getBlob(url) {
var xhr = new XMLHttpRequest() return new Promise((resolve, reject) => {
xhr.open('GET', url, true) var xhr = new XMLHttpRequest()
xhr.responseType = 'blob' xhr.open('GET', url, true)
xhr.onload = function() { xhr.responseType = 'blob'
if (xhr.status === 200) { xhr.timeout = 1500000
const name = xhr.getResponseHeader('content-disposition').split('=')[1] xhr.onload = function() {
var filename = decodeURIComponent(name) if (xhr.status === 200) {
cb(xhr.response, filename) try {
const disposition = xhr.getResponseHeader('content-disposition') || ''
const name = disposition.indexOf('=') > -1 ? disposition.split('=').pop() : '导出.xlsx'
var filename = decodeURIComponent(name)
resolve({ blob: xhr.response, filename })
} catch (error) {
reject(error)
}
} else {
reject(new Error('导出失败,状态码:' + xhr.status))
}
} }
} xhr.onerror = function() {
xhr.send() reject(new Error('导出请求失败'))
}
xhr.ontimeout = function() {
reject(new Error('导出超时'))
}
xhr.send()
})
} }
function saveAs(blob, filename) { function saveAs(blob, filename) {
@@ -432,4 +464,3 @@ function saveAs(blob, filename) {
window.URL.revokeObjectURL(link.href) window.URL.revokeObjectURL(link.href)
} }
} }

View File

@@ -3,7 +3,7 @@
<el-card> <el-card>
<el-row> <el-row>
<span style="margin-left: 10px">工位号</span> <span style="margin-left: 10px">工位号</span>
<el-select v-model="stationNumberValue" placeholder="请选择工位号" size="small" style="width: 200px"> <el-select v-model="stationNumberValue" placeholder="请选择工位号" size="small" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -14,6 +14,7 @@
<span>呼叫日期:</span> <span>呼叫日期:</span>
<el-date-picker v-model="startTime" size="small" type="daterange" value-format="yyyy-MM-dd" style="width:250px"/> <el-date-picker v-model="startTime" size="small" type="daterange" value-format="yyyy-MM-dd" style="width:250px"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 20px;margin-top: 15px" @click="pageSize=15;fetchData();searchChart();searchChart2()">查询</el-button> <el-button type="success" icon="el-icon-search" size="small" style="margin-left: 20px;margin-top: 15px" @click="pageSize=15;fetchData();searchChart();searchChart2()">查询</el-button>
<el-button :loading="exportLoading" :disabled="exportLoading" type="info" icon="el-icon-download" size="small" style="margin-left: 10px;margin-top: 15px" @click="exportExcel">Excel</el-button>
<!-- <el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px;margin-top: 15px" @click="handleDownload">导出EXCEL</el-button>--> <!-- <el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px;margin-top: 15px" @click="handleDownload">导出EXCEL</el-button>-->
</el-row> </el-row>
<el-row style="margin-top: 10px"> <el-row style="margin-top: 10px">
@@ -105,6 +106,7 @@ export default {
pageCurrent: 1, pageCurrent: 1,
totalNum: 0, totalNum: 0,
downloadLoading: '', downloadLoading: '',
exportLoading: false,
tableData_excel: [], tableData_excel: [],
stationNumberValue: '', stationNumberValue: '',
stationNumber: [], stationNumber: [],
@@ -132,16 +134,20 @@ export default {
if (response.data.length > 0) this.stationNumberValue = response.data[0].工位号 if (response.data.length > 0) this.stationNumberValue = response.data[0].工位号
}) })
}, },
fetchData() { getParam(pageCurrent, pageSize) {
this.listLoading = true
var param = [] var param = []
param[0] = ['开始时间', this.startTime[0] + ' 00:00:00'] param[0] = ['开始时间', this.startTime[0] + ' 00:00:00']
param[1] = ['结束时间', this.startTime[1] + ' 23:59:59'] param[1] = ['结束时间', this.startTime[1] + ' 23:59:59']
param[2] = ['工位号', this.stationNumberValue] param[2] = ['工位号', this.stationNumberValue]
param[3] = ['PageCurrent', this.pageCurrent] param[3] = ['PageCurrent', pageCurrent]
param[4] = ['PageSize', this.pageSize] param[4] = ['PageSize', pageSize]
param[5] = ['PageCount', 1000, 'int', '1'] param[5] = ['PageCount', 1000, 'int', '1']
param[6] = ['ItemCount', 1000, 'int', '1'] param[6] = ['ItemCount', 1000, 'int', '1']
return param
},
fetchData() {
this.listLoading = true
var param = this.getParam(this.pageCurrent, this.pageSize)
var Data = this.CreateData('11', 'ANDON_工位呼叫_综合查询', param) var Data = this.CreateData('11', 'ANDON_工位呼叫_综合查询', param)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
this.tableData = response.data.result this.tableData = response.data.result
@@ -159,6 +165,16 @@ export default {
this.pageCurrent = val this.pageCurrent = val
this.fetchData() this.fetchData()
}, },
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('暂无数据')
return
}
var exportData = JSON.parse(this.CreateData('2005', 'ANDON_工位呼叫_综合查询', this.getParam(1, 99999999)))
exportData.exportFileName = '工位呼叫统计'
exportData.exportColumns = '工位号,呼叫类型,呼叫时间,员工姓名=呼叫人,编号描述=问题描述,复位时间=解除时间,复位人员=解除人员,持续时间=持续时间(s)'
this.runExcelExport(JSON.stringify(exportData), 'exportLoading')
},
// 导出excel // 导出excel
handleDownload() { handleDownload() {
this.downloadLoading = true this.downloadLoading = true
@@ -393,4 +409,3 @@ span{
/*margin: 10px 0px 10px 10px;*/ /*margin: 10px 0px 10px 10px;*/
} }
</style> </style>

View File

@@ -5,6 +5,7 @@
<span>呼叫日期:</span> <span>呼叫日期:</span>
<el-date-picker v-model="startTime" size="small" type="daterange" value-format="yyyy-MM-dd" style="width:250px"/> <el-date-picker v-model="startTime" size="small" type="daterange" value-format="yyyy-MM-dd" style="width:250px"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 20px;margin-top: 15px" @click="pageSize=15;fetchData();searchChart();searchChart2()">查询</el-button> <el-button type="success" icon="el-icon-search" size="small" style="margin-left: 20px;margin-top: 15px" @click="pageSize=15;fetchData();searchChart();searchChart2()">查询</el-button>
<el-button :loading="exportLoading" :disabled="exportLoading" type="info" icon="el-icon-download" size="small" style="margin-left: 10px;margin-top: 15px" @click="exportExcel">Excel</el-button>
<!-- <el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px;margin-top: 15px" @click="handleDownload">导出EXCEL</el-button>--> <!-- <el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px;margin-top: 15px" @click="handleDownload">导出EXCEL</el-button>-->
</el-row> </el-row>
<el-row style="margin-top: 10px"> <el-row style="margin-top: 10px">
@@ -96,6 +97,7 @@ export default {
pageCurrent: 1, pageCurrent: 1,
totalNum: 0, totalNum: 0,
downloadLoading: '', downloadLoading: '',
exportLoading: false,
tableData_excel: [], tableData_excel: [],
stationNumberValue: '', stationNumberValue: '',
stationNumber: [], stationNumber: [],
@@ -123,15 +125,19 @@ export default {
if (response.data.length > 0) this.stationNumberValue = response.data[0].工位号 if (response.data.length > 0) this.stationNumberValue = response.data[0].工位号
}) })
}, },
fetchData() { getParam(pageCurrent, pageSize) {
this.listLoading = true
var param = [] var param = []
param[0] = ['开始时间', this.startTime[0] + ' 00:00:00'] param[0] = ['开始时间', this.startTime[0] + ' 00:00:00']
param[1] = ['结束时间', this.startTime[1] + ' 23:59:59'] param[1] = ['结束时间', this.startTime[1] + ' 23:59:59']
param[2] = ['PageCurrent', this.pageCurrent] param[2] = ['PageCurrent', pageCurrent]
param[3] = ['PageSize', this.pageSize] param[3] = ['PageSize', pageSize]
param[4] = ['PageCount', 1000, 'int', '1'] param[4] = ['PageCount', 1000, 'int', '1']
param[5] = ['ItemCount', 1000, 'int', '1'] param[5] = ['ItemCount', 1000, 'int', '1']
return param
},
fetchData() {
this.listLoading = true
var param = this.getParam(this.pageCurrent, this.pageSize)
var Data = this.CreateData('11', 'ANDON_类型呼叫_综合查询', param) var Data = this.CreateData('11', 'ANDON_类型呼叫_综合查询', param)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
this.tableData = response.data.result this.tableData = response.data.result
@@ -149,6 +155,16 @@ export default {
this.pageCurrent = val this.pageCurrent = val
this.fetchData() this.fetchData()
}, },
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('暂无数据')
return
}
var exportData = JSON.parse(this.CreateData('2005', 'ANDON_类型呼叫_综合查询', this.getParam(1, 99999999)))
exportData.exportFileName = '类型呼叫统计'
exportData.exportColumns = '工位号,呼叫类型,呼叫时间,员工姓名=呼叫人,编号描述=问题描述,复位时间=解除时间,复位人员=解除人员,持续时间=持续时间(s)'
this.runExcelExport(JSON.stringify(exportData), 'exportLoading')
},
// 导出excel // 导出excel
handleDownload() { handleDownload() {
this.downloadLoading = true this.downloadLoading = true
@@ -379,4 +395,3 @@ span{
/*margin: 10px 0px 10px 10px;*/ /*margin: 10px 0px 10px 10px;*/
} }
</style> </style>

View File

@@ -4,7 +4,7 @@
<div class="topDiv"> <div class="topDiv">
<span style="margin-left: 10px">工位号</span> <span style="margin-left: 10px">工位号</span>
<el-select v-model="stationNumberValue" placeholder="请选择工位号" filterable clearable size="small" <el-select v-model="stationNumberValue" placeholder="请选择工位号" filterable clearable size="small"
style="width:200px"> style="width:240px">
<el-option v-for="item in stationNumber" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in stationNumber" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<span style="margin-left: 10px">是否结束</span> <span style="margin-left: 10px">是否结束</span>
@@ -17,6 +17,8 @@
start-placeholder="开始日期" end-placeholder="结束日期" /> start-placeholder="开始日期" end-placeholder="结束日期" />
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" <el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px"
@click="pageSize = 100; pageCurrent = 1; searchTable()">查询</el-button> @click="pageSize = 100; pageCurrent = 1; searchTable()">查询</el-button>
<el-button :loading="exportLoading" :disabled="exportLoading" type="info" size="small" icon="el-icon-download"
style="margin-left: 10px" @click="exportExcel">Excel</el-button>
<el-button type="danger" plain size="small" icon="el-icon-delete" style="margin-left: 10px" <el-button type="danger" plain size="small" icon="el-icon-delete" style="margin-left: 10px"
:loading="deleteLoading" @click="handleBatchDelete">删除</el-button> :loading="deleteLoading" @click="handleBatchDelete">删除</el-button>
</div> </div>
@@ -80,7 +82,8 @@ export default {
pageSize: 100, pageSize: 100,
pageCurrent: 1, pageCurrent: 1,
selectedRows: [], selectedRows: [],
deleteLoading: false deleteLoading: false,
exportLoading: false
} }
}, },
created() { created() {
@@ -114,22 +117,29 @@ export default {
const found = this.stationNumber.find(item => item.value === stationCode) const found = this.stationNumber.find(item => item.value === stationCode)
return found ? found.label : stationCode return found ? found.label : stationCode
}, },
searchTable() { getQueryParam(pageCurrent, pageSize) {
if (!this.dateTime || this.dateTime.length !== 2) { if (!this.dateTime || this.dateTime.length !== 2) {
this.$message.warning('请选择查询时间范围!') this.$message.warning('请选择查询时间范围!')
return return null
} }
this.loading = true
this.tableData = []
const param = [] const param = []
param.push(['工位号', this.stationNumberValue || '']) param.push(['工位号', this.stationNumberValue || ''])
param.push(['是否结束', this.isEndedValue || '']) param.push(['是否结束', this.isEndedValue || ''])
param.push(['开始时间', this.dateTime[0] + ' 00:00:00']) param.push(['开始时间', this.dateTime[0] + ' 00:00:00'])
param.push(['结束时间', this.dateTime[1] + ' 23:59:59']) param.push(['结束时间', this.dateTime[1] + ' 23:59:59'])
param.push(['PageCurrent', this.pageCurrent]) param.push(['PageCurrent', pageCurrent])
param.push(['PageSize', this.pageSize]) param.push(['PageSize', pageSize])
param.push(['PageCount', '0', 'int', '1']) param.push(['PageCount', '0', 'int', '1'])
param.push(['ItemCount', '0', 'int', '1']) param.push(['ItemCount', '0', 'int', '1'])
return param
},
searchTable() {
const param = this.getQueryParam(this.pageCurrent, this.pageSize)
if (!param) {
return
}
this.loading = true
this.tableData = []
const Data = this.CreateData('11', '报警工位记录表_分页_查询', param) const Data = this.CreateData('11', '报警工位记录表_分页_查询', param)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
if (response.data.result && response.data.result.length > 0) { if (response.data.result && response.data.result.length > 0) {
@@ -149,6 +159,21 @@ export default {
console.error('searchTable error:', err) console.error('searchTable error:', err)
}) })
}, },
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('暂无数据')
return
}
const param = this.getQueryParam(1, 99999999)
if (!param) {
return
}
const exportData = JSON.parse(this.CreateData('2005', '报警工位记录表_分页_查询', param))
exportData.exportFileName = '工位报警记录'
exportData.exportColumns = '工位号,开始时间,结束时间,持续时间'
const Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
},
handleSelectionChange(rows) { handleSelectionChange(rows) {
this.selectedRows = rows || [] this.selectedRows = rows || []
}, },

View File

@@ -3,7 +3,7 @@
<el-card class="topCard"> <el-card class="topCard">
<div class="topDiv"> <div class="topDiv">
<span style="margin-left: 10px">工位号</span> <span style="margin-left: 10px">工位号</span>
<el-select v-model="stationNumberValue" placeholder="工位号" clearable size="small" style="width:150px"> <el-select v-model="stationNumberValue" placeholder="工位号" filterable size="small" style="width:240px">
<el-option v-for="item in stationNumber" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in stationNumber" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<span style="margin-left: 10px">消息来源</span> <span style="margin-left: 10px">消息来源</span>
@@ -22,10 +22,11 @@
start-placeholder="开始日期" end-placeholder="结束日期" /> start-placeholder="开始日期" end-placeholder="结束日期" />
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" <el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px"
@click="pageSize = 50; pageCurrent = 1; searchTable()">查询</el-button> @click="pageSize = 50; pageCurrent = 1; searchTable()">查询</el-button>
<el-button :loading="exportLoading" :disabled="exportLoading" type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel">Excel</el-button>
<!-- <el-button type="success" plain icon="el-icon-document-copy" size="small" @click="copyData('form4')">复制</el-button>--> <!-- <el-button type="success" plain icon="el-icon-document-copy" size="small" @click="copyData('form4')">复制</el-button>-->
</div> </div>
<el-table v-loading="loading" :data="tableData" :row-style="rowStyle" border size="mini" height="570" center <el-table v-loading="loading" :data="tableData" :row-style="rowStyle" border size="mini" height="570" center
style="width: 80%"> style="width: 90%">
<el-table-column width="60" label="序号" type="index" align="center" /> <el-table-column width="60" label="序号" type="index" align="center" />
<el-table-column label="工位号" align="center" width="120px"> <el-table-column label="工位号" align="center" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -84,7 +85,8 @@ export default {
total: 0, // 总条数 total: 0, // 总条数
pageList: 50, // 每页显示条数 pageList: 50, // 每页显示条数
pageSize: 50, // 每页显示条数 pageSize: 50, // 每页显示条数
pageCurrent: 1 // 后台获取页 pageCurrent: 1, // 后台获取页
exportLoading: false // Excel导出中
} }
}, },
created() { created() {
@@ -103,20 +105,18 @@ export default {
value: response.data[i].工位号 value: response.data[i].工位号
}) })
} }
if (this.stationNumber.length > 0 && this.stationNumberValue === '') {
this.stationNumberValue = this.stationNumber[0].value
this.searchTable()
}
}) })
}, },
searchTable() { getParam(pageCurrent, pageSize) {
// if (this.stationNumberValue === '') {
// this.$message.error('请选择工位号')
// return
// }
this.loading = true
this.tableData = []
var param = [] var param = []
param[0] = ['查询来源', 2] param[0] = ['查询来源', 2]
param[1] = ['工位号', this.stationNumberValue] param[1] = ['工位号', this.stationNumberValue]
param[2] = ['PageCurrent', this.pageCurrent] param[2] = ['PageCurrent', pageCurrent]
param[3] = ['PageSize', this.pageSize] param[3] = ['PageSize', pageSize]
param[4] = ['PageCount', '1111', 'int', '1'] param[4] = ['PageCount', '1111', 'int', '1']
param[5] = ['ItemCount', '1111', 'int', '1'] param[5] = ['ItemCount', '1111', 'int', '1']
param[6] = ['开始日期', this.dateTime[0] + ' ' + '00:00:00'] param[6] = ['开始日期', this.dateTime[0] + ' ' + '00:00:00']
@@ -124,15 +124,46 @@ export default {
param[8] = ['内容', this.contentSearchValue] param[8] = ['内容', this.contentSearchValue]
param[9] = ['消息来源', this.msgSourceNotLike] param[9] = ['消息来源', this.msgSourceNotLike]
param[10] = ['消息类型', this.msgTypeValue] param[10] = ['消息类型', this.msgTypeValue]
var Data = this.CreateData('11', '日志_工位操作_查询', param) return param
},
validateSearch() {
if (this.stationNumberValue === '') {
this.$message.error('请选择工位号')
return false
}
return true
},
searchTable() {
if (!this.validateSearch()) {
return
}
this.loading = true
this.tableData = []
var Data = this.CreateData('11', '日志_工位操作_查询', this.getParam(this.pageCurrent, this.pageSize))
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
if (response.data.result.length !== 0) { this.tableData = response.data && response.data.result ? response.data.result : []
this.tableData = response.data.result this.total = response.data && response.data.output && response.data.output[0] ? parseInt(response.data.output[0].ItemCount) || 0 : 0
} this.loading = false
this.total = parseInt(response.data.output[0].ItemCount) }).catch(error => {
console.error('查询工位日志失败:', error)
this.$message.error('查询工位日志失败')
this.loading = false this.loading = false
}) })
}, },
exportExcel() {
if (!this.validateSearch()) {
return
}
if (this.tableData.length === 0) {
this.$message.warning('暂无数据')
return
}
var exportData = JSON.parse(this.CreateData('2005', '日志_工位操作_查询', this.getParam(1, 99999999)))
exportData.exportFileName = '工位报警日志'
exportData.exportColumns = '工位号,操作类型,消息类型,操作人,内容,操作时间'
var Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
},
rowStyle({ row, rowIndex }) { rowStyle({ row, rowIndex }) {
console.log(row.消息类型) console.log(row.消息类型)
if (row.消息类型 === 'ERROR') { if (row.消息类型 === 'ERROR') {

View File

@@ -168,6 +168,7 @@ export default {
dataType: [], dataType: [],
PLCIP: [], PLCIP: [],
tableData: [], tableData: [],
exportLoading: false,
activeValue: '', activeValue: '',
active: [{ active: [{
label: '启用', label: '启用',
@@ -311,13 +312,13 @@ export default {
method: 'post', method: 'post',
data: { data: {
type: '3', type: '3',
name: `SELECT [工位号] FROM [dbo].[MES_计划BOM_工位与名称]` name: `SELECT [工位号],[工位名称] FROM [dbo].[MES_计划BOM_工位与名称]`
} }
}).then(response => { }).then(response => {
if (response.data.length) { if (response.data.length) {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.dataType.push({ this.dataType.push({
label: response.data[i].工位号, label: `${response.data[i].工位号}${response.data[i].工位名称 || ''}`,
value: response.data[i].工位号 value: response.data[i].工位号
}) })
} }
@@ -380,8 +381,11 @@ export default {
var param = [] var param = []
param[0] = ['type_ischeck', dataTypeValue_check] param[0] = ['type_ischeck', dataTypeValue_check]
param[1] = ['type', this.dataTypeValue] param[1] = ['type', this.dataTypeValue]
var Data = this.CreateData('2001', '基础数据_工位信息维护_导出', param) var exportData = JSON.parse(this.CreateData('2005', '基础数据_工位信息维护_查询', param))
this.exportExcel_NPOI(Data) exportData.exportFileName = '工位信息维护'
exportData.exportColumns = '文件名称=MES工序号,工控机名称=MES资源号,工位号=PLCS工位号,工位名称,工控机IP,是否启用MES=工位MES界面'
var Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
} else { } else {
this.$message.warning('暂无数据') this.$message.warning('暂无数据')
} }
@@ -1406,4 +1410,3 @@ export default {
display: none; display: none;
} }
</style> </style>

View File

@@ -10,7 +10,7 @@
filterable filterable
clearable clearable
size="small" size="small"
style="width: 200px"> style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -65,7 +65,7 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"/> end-placeholder="结束日期"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="selectDate()">查询</el-button> <el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="selectDate()">查询</el-button>
<el-button type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel()">导出Excel</el-button> <el-button :loading="exportLoading" :disabled="exportLoading" type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel()">导出Excel</el-button>
</div> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@@ -187,7 +187,8 @@ export default {
tableData: [], tableData: [],
total: 0, total: 0,
pageSize: 30, pageSize: 30,
pageCurrent: 1 pageCurrent: 1,
exportLoading: false
} }
}, },
created() { created() {
@@ -288,8 +289,11 @@ export default {
param.push(['PageSize', 9999999]) param.push(['PageSize', 9999999])
param.push(['PageCount', '0', 'int', '1']) param.push(['PageCount', '0', 'int', '1'])
param.push(['ItemCount', '0', 'int', '1']) param.push(['ItemCount', '0', 'int', '1'])
var Data = this.CreateData('2001', '电子看板_质量数据_首件数据_moby_历史_分页_查询', param) var exportData = JSON.parse(this.CreateData('2005', '电子看板_质量数据_首件数据_moby_历史_分页_查询', param))
this.exportExcel_NPOI(Data) exportData.exportFileName = '首件记录查询'
exportData.exportColumns = '工位号,产品型号,班次,检测项目,测量值,上限值,下限值,单位,是否合格,检测人,上传成功时间=上传时间'
var Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageCurrent = 1 this.pageCurrent = 1

View File

@@ -3,7 +3,7 @@
<el-card class="topCard"> <el-card class="topCard">
<div class="topDiv"> <div class="topDiv">
<span style="">工位号</span> <span style="">工位号</span>
<el-select v-model="stationNumberValue" placeholder="请选择工位号" clearable size="small" style="width: 200px"> <el-select v-model="stationNumberValue" placeholder="请选择工位号" clearable size="small" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -24,6 +24,7 @@
<el-input v-model="testItemKeyword" placeholder="输入检测项目关键字" clearable size="small" style="width: 200px"/> <el-input v-model="testItemKeyword" placeholder="输入检测项目关键字" clearable size="small" style="width: 200px"/>
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 20px;" @click="getTableData()">查询</el-button> <el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 20px;" @click="getTableData()">查询</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="small" style="margin-left: 20px;" @click="addStationParams()">增加</el-button> <el-button type="primary" plain icon="el-icon-plus" size="small" style="margin-left: 20px;" @click="addStationParams()">增加</el-button>
<el-button :loading="exportLoading" :disabled="exportLoading" type="warning" plain icon="el-icon-download" size="small" style="margin-left: 20px;" @click="exportExcel">导出</el-button>
</div> </div>
<div style="margin-top: 5px"> <div style="margin-top: 5px">
<el-table <el-table
@@ -121,7 +122,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工位号" prop="工位号" style="display: inline-block"> <el-form-item label="工位号" prop="工位号" style="display: inline-block">
<el-select v-model="form_stationParams.工位号" size="small" placeholder="请选择工位号"> <el-select v-model="form_stationParams.工位号" size="small" placeholder="请选择工位号" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -270,6 +271,7 @@ export default {
title_Params: '', title_Params: '',
dialogFormVisible_AddOrEditParams: false, dialogFormVisible_AddOrEditParams: false,
loading: false, loading: false,
exportLoading: false,
ParamsType: [ ParamsType: [
{ {
label: '定量', label: '定量',
@@ -334,12 +336,16 @@ export default {
}) })
}, },
getTableData() { getQueryParam() {
this.loading = true
var param = [] var param = []
param.push(['工位号', this.stationNumberValue]) param.push(['工位号', this.stationNumberValue])
param.push(['产品代码', this.productCodeValue]) param.push(['产品代码', this.productCodeValue])
param.push(['检测项目', this.testItemKeyword]) param.push(['检测项目', this.testItemKeyword])
return param
},
getTableData() {
this.loading = true
var param = this.getQueryParam()
var Data = this.CreateData('11', '电子看板_质量数据_首件数据_基础表_查询', param) var Data = this.CreateData('11', '电子看板_质量数据_首件数据_基础表_查询', param)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
this.tableData = [] this.tableData = []
@@ -354,6 +360,18 @@ export default {
console.error('Error fetching interface data:', error) console.error('Error fetching interface data:', error)
}) })
}, },
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('暂无数据')
return
}
var exportData = JSON.parse(this.CreateData('2005', '电子看板_质量数据_首件数据_基础表_查询', this.getQueryParam()))
exportData.exportFileName = '首件检测项维护'
exportData.exportColumns = '工位号,工位名称,产品型号,检测项目,项目类型,检测项目代码,实测项目代码,必填=是否必填,上限值,下限值,单位,数据类型=判定标准'
var Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
},
addStationParams() { addStationParams() {
this.title_Params = '添加参数' this.title_Params = '添加参数'
this.dialogFormVisible_AddOrEditParams = true this.dialogFormVisible_AddOrEditParams = true

View File

@@ -3,7 +3,7 @@
<el-card class="topCard"> <el-card class="topCard">
<div class="topDiv"> <div class="topDiv">
<span style="">工位号</span> <span style="">工位号</span>
<el-select v-model="stationNumberValue" placeholder="请选择工位号" size="small" style="width: 200px" <el-select v-model="stationNumberValue" placeholder="请选择工位号" size="small" style="width: 240px"
@change="getTableData"> @change="getTableData">
<el-option v-for="item in stationNumber" :key="item.value" :label="item.label" :value="item.value" <el-option v-for="item in stationNumber" :key="item.value" :label="item.label" :value="item.value"
size="mini" /> size="mini" />

View File

@@ -3,7 +3,7 @@
<el-card class="topCard"> <el-card class="topCard">
<div class="topDiv"> <div class="topDiv">
<span style="">工位号</span> <span style="">工位号</span>
<el-select v-model="stationNumberValue" placeholder="请选择工位号" clearable size="small" style="width: 200px"> <el-select v-model="stationNumberValue" placeholder="请选择工位号" clearable size="small" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -79,7 +79,7 @@
<el-dialog :visible.sync="dialogFormVisible_AddStationInterface" title="添加接口" center style="min-height: 230px;" width="400px"> <el-dialog :visible.sync="dialogFormVisible_AddStationInterface" title="添加接口" center style="min-height: 230px;" width="400px">
<el-form ref="form_stationInterFace" :model="form_stationInterFace" :rules="rules_stationInterFace" label-position="right" label-width="110px"> <el-form ref="form_stationInterFace" :model="form_stationInterFace" :rules="rules_stationInterFace" label-position="right" label-width="110px">
<el-form-item label="工位号" prop="工位号" style="display: inline-block"> <el-form-item label="工位号" prop="工位号" style="display: inline-block">
<el-select v-model="form_stationInterFace.工位号" size="small" placeholder="请选择工位号"> <el-select v-model="form_stationInterFace.工位号" size="small" placeholder="请选择工位号" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"

View File

@@ -3,7 +3,7 @@
<el-card class="topCard"> <el-card class="topCard">
<div class="topDiv"> <div class="topDiv">
<span style="">工位号</span> <span style="">工位号</span>
<el-select v-model="stationNumberValue" placeholder="请选择工位号" clearable size="small" style="width: 200px"> <el-select v-model="stationNumberValue" placeholder="请选择工位号" clearable size="small" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -13,6 +13,20 @@
</el-select> </el-select>
<span style="">模组/PACK</span> <span style="">模组/PACK</span>
<el-input v-model="assemblyNumberValue" style="width:240px;" placeholder="模组/PACK码" size="small" clearable/> <el-input v-model="assemblyNumberValue" style="width:240px;" placeholder="模组/PACK码" size="small" clearable/>
<span style="">接口名称</span>
<el-input v-model="interfaceNameValue" style="width:220px;" placeholder="接口名称" size="small" clearable/>
<span style="">操作时间</span>
<el-date-picker
v-model="dateTime"
:clearable="false"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width:240px;"/>
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 20px;" @click="pageCurrent = 1;getTableData()">查询</el-button> <el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 20px;" @click="pageCurrent = 1;getTableData()">查询</el-button>
</div> </div>
<div style="margin-top: 5px"> <div style="margin-top: 5px">
@@ -78,7 +92,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="返回时间" width="90"> <el-table-column align="center" label="返回时间" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请求时间 }} {{ scope.row.返回时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="累积用时" width="80"> <el-table-column align="center" label="累积用时" width="80">
@@ -104,6 +118,8 @@
</template> </template>
<script> <script>
import { getBeforeOrAfterTime, getNowShotTime } from '@/utils/tool'
export default { export default {
data() { data() {
return { return {
@@ -111,6 +127,8 @@ export default {
interFace: [], interFace: [],
stationNumberValue: '', stationNumberValue: '',
assemblyNumberValue: '', assemblyNumberValue: '',
interfaceNameValue: '',
dateTime: [getBeforeOrAfterTime(-2), getNowShotTime()],
stationNumber: [], stationNumber: [],
loading: false, loading: false,
tableData: [], tableData: [],
@@ -143,13 +161,7 @@ export default {
getTableData() { getTableData() {
this.loading = true this.loading = true
var param = [] var param = this.getParam(this.pageCurrent, this.pageSize)
param[0] = ['工位号', this.stationNumberValue]
param[1] = ['发动机号', this.assemblyNumberValue]
param[2] = ['PageCurrent', this.pageCurrent]
param[3] = ['PageSize', this.pageSize]
param[4] = ['PageCount', '1111', 'int', '1']
param[5] = ['ItemCount', '1111', 'int', '1']
var Data = this.CreateData('11', 'MOM_接口_Moby_查询', param) var Data = this.CreateData('11', 'MOM_接口_Moby_查询', param)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
this.tableData = [] this.tableData = []
@@ -171,6 +183,19 @@ export default {
console.error('Error fetching interface data:', error) console.error('Error fetching interface data:', error)
}) })
}, },
getParam(pageCurrent, pageSize) {
var param = []
param[0] = ['工位号', this.stationNumberValue]
param[1] = ['发动机号', this.assemblyNumberValue]
param[2] = ['接口名称', this.interfaceNameValue]
param[3] = ['开始时间', this.dateTime[0] + ' 00:00:00']
param[4] = ['结束时间', this.dateTime[1] + ' 23:59:59']
param[5] = ['PageCurrent', pageCurrent]
param[6] = ['PageSize', pageSize]
param[7] = ['PageCount', '1111', 'int', '1']
param[8] = ['ItemCount', '1111', 'int', '1']
return param
},
submitEdit_StationInterface(row) { submitEdit_StationInterface(row) {
var param = [] var param = []

View File

@@ -93,7 +93,7 @@
<el-dialog :visible.sync="dialogFormVisible" :title="title" center style="min-height: 200px;" width="400px"> <el-dialog :visible.sync="dialogFormVisible" :title="title" center style="min-height: 200px;" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="110px"> <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="110px">
<el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block"> <el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block">
<el-select v-model="form.stationNumberValue" size="small" placeholder="请选择工位号"> <el-select v-model="form.stationNumberValue" size="small" placeholder="请选择工位号" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -955,4 +955,3 @@ export default {
background-color: white!important; background-color: white!important;
} }
</style> </style>

View File

@@ -44,7 +44,7 @@
<el-button type="primary" size="small" icon="el-icon-circle-plus" @click="creatOrder('form')">创建物料</el-button> <el-button type="primary" size="small" icon="el-icon-circle-plus" @click="creatOrder('form')">创建物料</el-button>
<!-- <el-button type="success" size="small" plain icon="el-icon-document-copy" @click="copyOrder('form4')">复制物料</el-button>--> <!-- <el-button type="success" size="small" plain icon="el-icon-document-copy" @click="copyOrder('form4')">复制物料</el-button>-->
<!-- <el-button type="info" plain size="small" icon="el-icon-upload2" @click="importOrder('form')">物料导入</el-button>--> <!-- <el-button type="info" plain size="small" icon="el-icon-upload2" @click="importOrder('form')">物料导入</el-button>-->
<el-button type="warning" plain size="small" icon="el-icon-download" @click="exportExcel()">物料导出</el-button> <el-button :loading="exportLoading" :disabled="exportLoading" type="warning" plain size="small" icon="el-icon-download" @click="exportExcel()">物料导出</el-button>
</div> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@@ -155,7 +155,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block"> <el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block">
<el-select v-model="form.stationNumberValue" size="small" placeholder="请选择工位号"> <el-select v-model="form.stationNumberValue" size="small" placeholder="请选择工位号" style="width: 250px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -530,6 +530,7 @@ export default {
engineTypeValue: '', engineTypeValue: '',
version: '', version: '',
versionList: [], versionList: [],
exportLoading: false,
engineType: [], engineType: [],
engineType1: [], engineType1: [],
isVerification: '', isVerification: '',
@@ -1163,10 +1164,17 @@ export default {
exportExcel() { exportExcel() {
if (this.tableData.length !== 0) { if (this.tableData.length !== 0) {
var param = [] var param = []
const isVerification = this.isVerification === '' ? 9999 : this.isVerification
param[0] = ['产品型号代码', this.engineTypeValue] param[0] = ['产品型号代码', this.engineTypeValue]
param[1] = ['工位号', this.stationNumberValue] param[1] = ['工位号', this.stationNumberValue]
var Data = this.CreateData('2001', '电子看板_装配零件_总物料表_导出新', param) param[2] = ['是否验证', isVerification]
this.exportExcel_NPOI(Data) param[3] = ['物料号', this.materialCode]
param[4] = ['版本号', this.version]
var exportData = JSON.parse(this.CreateData('2005', '电子看板_装配零件_查询', param))
exportData.exportFileName = '物料扫码维护'
exportData.exportColumns = '工位号,版本号,物料号,零件名称,零件数量=物料数量,是否验证,是否批次,零件图号=匹配规则,条码长度=匹配长度'
var Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
} else { } else {
this.$message.warning('暂无数据') this.$message.warning('暂无数据')
} }

View File

@@ -3,7 +3,7 @@
<el-card class="topCard"> <el-card class="topCard">
<div class="topDiv"> <div class="topDiv">
<span style="margin-left: 10px">工位号</span> <span style="margin-left: 10px">工位号</span>
<el-select v-model="stationNumberValue" placeholder="请选择工位号" size="small" style="width: 250px" @change="searchTable"> <el-select v-model="stationNumberValue" placeholder="请选择工位号" filterable clearable size="small" style="width: 250px" @change="searchTable">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -12,7 +12,7 @@
size="mini"/> size="mini"/>
</el-select> </el-select>
<span style="margin-left: 10px">产品型号</span> <span style="margin-left: 10px">产品型号</span>
<el-select v-model="engineTypeValue" placeholder="请选择产品型号" size="small" style="width: 150px" @change="searchTable"> <el-select v-model="engineTypeValue" placeholder="请选择产品型号" filterable size="small" style="width: 150px" @change="searchTable">
<el-option <el-option
v-for="item in engineType" v-for="item in engineType"
:key="item.value" :key="item.value"
@@ -30,6 +30,7 @@
size="mini"/> size="mini"/>
</el-select> </el-select>
<el-button type="primary" plain size="small" icon="el-icon-search" @click="searchTable()">查询</el-button> <el-button type="primary" plain size="small" icon="el-icon-search" @click="searchTable()">查询</el-button>
<el-button :loading="exportLoading" :disabled="exportLoading" type="info" size="small" icon="el-icon-download" @click="exportExcel">Excel</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addTo">新增</el-button> <el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addTo">新增</el-button>
<!-- <el-button type="success" size="small" plain icon="el-icon-document-copy" @click="copyOrder('form4')">复制工步</el-button>--> <!-- <el-button type="success" size="small" plain icon="el-icon-document-copy" @click="copyOrder('form4')">复制工步</el-button>-->
</div> </div>
@@ -44,6 +45,11 @@
style="width: 100%" style="width: 100%"
border border
size="mini"> size="mini">
<el-table-column align="center" fixed label="工位号" width="100px">
<template slot-scope="scope">
{{ scope.row.工位号 }}
</template>
</el-table-column>
<el-table-column align="center" fixed label="版本号" width="80px"> <el-table-column align="center" fixed label="版本号" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.版本号 }} {{ scope.row.版本号 }}
@@ -159,7 +165,7 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="工位号" prop="stationNumber" style="display: inline-block"> <el-form-item label="工位号" prop="stationNumber" style="display: inline-block">
<el-select v-model="form.stationNumber" placeholder="请选择工位号" size="small" style="width: 150px"> <el-select v-model="form.stationNumber" placeholder="请选择工位号" size="small" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -345,7 +351,7 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="工位号" prop="stationNumber" style="display: inline-block"> <el-form-item label="工位号" prop="stationNumber" style="display: inline-block">
<el-select v-model="form1.stationNumber" placeholder="请选择工位号" size="small" style="width: 150px"> <el-select v-model="form1.stationNumber" placeholder="请选择工位号" size="small" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -529,7 +535,7 @@
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" title="数据复制" center style="min-height: 200px" width="400px"> <el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" title="数据复制" center style="min-height: 200px" width="400px">
<el-form ref="form4" :model="form4" :rules="rules4" label-position="right" label-width="110px"> <el-form ref="form4" :model="form4" :rules="rules4" label-position="right" label-width="110px">
<el-form-item label="工位号" prop="engineTypeValue" style="display: inline-block"> <el-form-item label="工位号" prop="engineTypeValue" style="display: inline-block">
<el-select v-model="form4.stationNumberValue" placeholder="请选择工位号" size="small"> <el-select v-model="form4.stationNumberValue" placeholder="请选择工位号" size="small" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -698,6 +704,7 @@ export default {
labelText: '', labelText: '',
labelNumber: '', labelNumber: '',
loading1: false, loading1: false,
exportLoading: false,
dialogFormVisible: false, dialogFormVisible: false,
dialogFormVisible1: false, dialogFormVisible1: false,
dialogFormVisible4: false, dialogFormVisible4: false,
@@ -821,7 +828,7 @@ export default {
}, },
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
this.searchTable() this.searchTable(false)
}, 300) }, 300)
}, },
methods: { methods: {
@@ -830,10 +837,6 @@ export default {
var param = [] var param = []
var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param) var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
if (response.data.length) {
this.stationNumberValue = response.data[0].工位号
this.stationName = response.data[0].工位名称
}
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.stationNumber.push({ this.stationNumber.push({
label: `${response.data[i].工位号}${response.data[i].工位名称}`, label: `${response.data[i].工位号}${response.data[i].工位名称}`,
@@ -932,12 +935,26 @@ export default {
} }
}, },
// 查询MES消息 // 查询MES消息
searchTable() { getQueryParam() {
this.tableData = []
var param = [] var param = []
param[0] = ['产品型号代码', this.engineTypeValue] param[0] = ['产品型号代码', this.engineTypeValue]
param[1] = ['工位号', this.stationNumberValue] param[1] = ['工位号', this.stationNumberValue || null]
param[2] = ['版本号', this.version] param[2] = ['版本号', this.version]
return param
},
validateSearch(showWarning = true) {
if (!this.engineTypeValue) {
if (showWarning) this.$message.warning('请选择产品型号')
return false
}
return true
},
searchTable(showWarning = true) {
if (!this.validateSearch(showWarning)) {
return
}
this.tableData = []
var param = this.getQueryParam()
var Data = this.CreateData('11', '电子看板_工序内容_查询', param) var Data = this.CreateData('11', '电子看板_工序内容_查询', param)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
if (response.data.length !== 0) { if (response.data.length !== 0) {
@@ -953,6 +970,20 @@ export default {
} }
}) })
}, },
exportExcel() {
if (!this.validateSearch()) {
return
}
if (this.tableData.length === 0) {
this.$message.warning('暂无数据')
return
}
var exportData = JSON.parse(this.CreateData('2005', '电子看板_工序内容_查询', this.getQueryParam()))
exportData.exportFileName = '工步内容维护'
exportData.exportColumns = '工位号,版本号,标记名称=标记,工步号=序号,操作内容=主要步骤,技术要求=关键要素,工步属性名称=工步类型,关联物料,扭矩=扭矩(Nm),等级,选装代码,数量,辅料号,辅料名称,工夹具名称,工夹具型号_序列号=工夹具型号/序列号'
var Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
},
selectDate3() { selectDate3() {
this.tableData1 = [] this.tableData1 = []
var param = [] var param = []
@@ -1478,4 +1509,3 @@ export default {
height: 100px; height: 100px;
} }
</style> </style>

View File

@@ -20,7 +20,7 @@
</el-select> </el-select>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="handleSearch">查询</el-button> <el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="handleSearch">查询</el-button>
<el-button type="success" plain size="small" icon="el-icon-plus" @click="handleAdd">新增</el-button> <el-button type="success" plain size="small" icon="el-icon-plus" @click="handleAdd">新增</el-button>
<el-button type="warning" plain size="small" icon="el-icon-download" @click="handleExport">导出</el-button> <el-button :loading="exportLoading" :disabled="exportLoading" type="warning" plain size="small" icon="el-icon-download" @click="handleExport">导出</el-button>
</div> </div>
<!-- 数据表格 --> <!-- 数据表格 -->
@@ -311,6 +311,7 @@ export default {
total: 0, total: 0,
pageSize: 50, pageSize: 50,
pageCurrent: 1, pageCurrent: 1,
exportLoading: false,
// 弹窗 // 弹窗
dialogVisible: false, dialogVisible: false,
dialogTitle: '新增', dialogTitle: '新增',
@@ -622,8 +623,11 @@ export default {
param[6] = ['PageSize', 99999999] param[6] = ['PageSize', 99999999]
param[7] = ['PageCount', '1111', 'int', '1'] param[7] = ['PageCount', '1111', 'int', '1']
param[8] = ['ItemCount', '1111', 'int', '1'] param[8] = ['ItemCount', '1111', 'int', '1']
const Data = this.CreateData('2001', 'MES收集组维护_分页查询', param) const exportData = JSON.parse(this.CreateData('2005', 'MES收集组维护_分页查询', param))
this.exportExcel_NPOI(Data) exportData.exportFileName = 'MES收集组维护'
exportData.exportColumns = 'TagId1,TagId2,TagId3,TagId4,TagId5,TagId6,TagId7,TagId8,组号,来源工位号,工位号,是否启用,MOM_参数=参数,MOM_参数描述=参数描述,MOM_数据类型=数据类型,可用型号'
const Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
} }
} }
} }

View File

@@ -195,12 +195,12 @@
</el-card> </el-card>
<el-dialog :visible.sync="dialogFormVisible4" title="数据复制" center style="min-height: 200px" width="400px"> <el-dialog :visible.sync="dialogFormVisible4" title="数据复制" center style="min-height: 200px" width="400px">
<el-form ref="form1" :model="form4" :rules="rules4" label-position="right" label-width="110px"> <el-form ref="form1" :model="form4" :rules="rules4" label-position="right" label-width="110px">
<el-form-item label="产品型号" prop="engineTypeValue" style="display: inline-block"> <el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block">
<el-select v-model="form4.stationNumberValue" placeholder="请选择工位号" size="small"> <el-select v-model="form4.stationNumberValue" placeholder="请选择工位号" size="small" style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
:label="item.label" :label="`【${item.value}】${item.label}`"
:value="item.value" :value="item.value"
size="mini"/> size="mini"/>
</el-select> </el-select>
@@ -753,4 +753,3 @@ export default {
} }
</style> </style>

View File

@@ -10,7 +10,7 @@
filterable filterable
clearable clearable
size="small" size="small"
style="width: 200px"> style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -186,7 +186,7 @@ export default {
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.stationNumber.push({ this.stationNumber.push({
label: response.data[i].工位号, label: `${response.data[i].工位号}${response.data[i].工位名称 || ''}`,
value: response.data[i].工位号 value: response.data[i].工位号
}) })
} }
@@ -305,9 +305,11 @@ export default {
var param = [] var param = []
param[0] = ['开始时间', this.dateTime[0] + ' ' + '00:00:00'] param[0] = ['开始时间', this.dateTime[0] + ' ' + '00:00:00']
param[1] = ['结束时间', this.dateTime[1] + ' ' + '23:59:59'] param[1] = ['结束时间', this.dateTime[1] + ' ' + '23:59:59']
param[2] = ['工位号_ischeck', 1] param[2] = ['工位号', this.stationNumberValue]
param[3] = ['工位号', this.stationNumberValue] var exportData = JSON.parse(this.CreateData('2005', '质量数据_发动机质量数据_各个工位_视图_发动机型号_NG综合查询', param))
var Data = this.CreateData('2001', '质量数据查询_综合查询新', param) exportData.exportFileName = '质量NG分析'
exportData.exportColumns = '工位号,测量项目,不合格次数'
var Data = JSON.stringify(exportData)
this.exportExcel_NPOI(Data) this.exportExcel_NPOI(Data)
} else { } else {
this.$message.warning('暂无数据') this.$message.warning('暂无数据')

View File

@@ -10,7 +10,7 @@
filterable filterable
clearable clearable
size="small" size="small"
style="width: 200px" style="width: 240px"
@change="getMeasuringPosition();getTraceabilityCode();getBatchBarcode();getAssemblyNumber()"> @change="getMeasuringPosition();getTraceabilityCode();getBatchBarcode();getAssemblyNumber()">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
@@ -62,7 +62,7 @@
<!-- size="mini"/>--> <!-- size="mini"/>-->
<!-- </el-select>--> <!-- </el-select>-->
<el-button type="primary" plain size="small" icon="el-icon-search" @click="pageCurrent = 1;selectDate()">详情查询</el-button> <el-button type="primary" plain size="small" icon="el-icon-search" @click="pageCurrent = 1;selectDate()">详情查询</el-button>
<el-button type="primary" size="small" icon="el-icon-download" @click="exportExcel()">详情Excel</el-button> <el-button :loading="exportLoading" :disabled="exportLoading" type="primary" size="small" icon="el-icon-download" @click="exportExcel()">详情Excel</el-button>
</div> </div>
<div class="filter-row"> <div class="filter-row">
<span style="margin-left: 10px">测量项目</span> <span style="margin-left: 10px">测量项目</span>
@@ -277,7 +277,8 @@ export default {
total: 0, // 总条数 total: 0, // 总条数
pageList: 30, // 每页显示条数 pageList: 30, // 每页显示条数
pageSize: 30, // 每页显示条数 pageSize: 30, // 每页显示条数
pageCurrent: 1 // 后台获取页 pageCurrent: 1, // 后台获取页
exportLoading: false // Excel导出中
} }
}, },
created() { created() {
@@ -315,7 +316,7 @@ export default {
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.stationNumber.push({ this.stationNumber.push({
label: response.data[i].工位号, label: `${response.data[i].工位号}${response.data[i].工位名称 || ''}`,
value: response.data[i].工位号 value: response.data[i].工位号
}) })
} }
@@ -545,10 +546,17 @@ export default {
param[14] = ['批次条码_ischeck', traceabilityCode_check] param[14] = ['批次条码_ischeck', traceabilityCode_check]
param[15] = ['批次条码', this.traceabilityCode] param[15] = ['批次条码', this.traceabilityCode]
param[16] = ['合格标志', this.isQualifiedValue] param[16] = ['合格标志', this.isQualifiedValue]
// param[17] = ['生产时间_ischeck', measuringProjectTime_check] param[17] = ['PageCurrent', 1]
// param[18] = ['生产时间', this.measuringProjectTime] param[18] = ['PageSize', 99999999]
var Data = this.CreateData('2001', '质量数据查询_综合查询新', param) param[19] = ['PageCount', '1111', 'int', '1']
this.exportExcel_NPOI(Data) param[20] = ['ItemCount', '1111', 'int', '1']
// param[21] = ['生产时间_ischeck', measuringProjectTime_check]
// param[22] = ['生产时间', this.measuringProjectTime]
var exportData = JSON.parse(this.CreateData('2005', '质量数据_发动机质量数据_各个工位_视图_发动机型号_综合查询', param))
exportData.exportFileName = '质量数据查询'
exportData.exportColumns = '发动机号=产品编号,工位号,测量项目,测量值,测量单位,上限值=值上限,下限值=值下限,生产日期,合格标志'
var Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
} else { } else {
this.$message.warning('暂无数据') this.$message.warning('暂无数据')
} }

View File

@@ -3,7 +3,7 @@
<el-card class="topCard"> <el-card class="topCard">
<div class="topDiv"> <div class="topDiv">
<span style="margin-left: 10px">工位号</span> <span style="margin-left: 10px">工位号</span>
<el-select v-model="stationValue" placeholder="工位号" clearable size="small" style="width:150px"> <el-select v-model="stationValue" placeholder="工位号" clearable filterable size="small" style="width:240px">
<el-option <el-option
v-for="item in stationList" v-for="item in stationList"
:key="item.value" :key="item.value"
@@ -129,7 +129,7 @@ export default {
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
if (response.data && response.data.length > 0) { if (response.data && response.data.length > 0) {
this.stationList = response.data.map(item => ({ this.stationList = response.data.map(item => ({
label: `${item.工位号} - ${item.工位名称 || ''}`, label: `${item.工位号}${item.工位名称 || ''}`,
value: item.工位号 value: item.工位号
})) }))
} }

View File

@@ -9,11 +9,11 @@
<!-- 工位Tab额外筛选 --> <!-- 工位Tab额外筛选 -->
<template v-if="activeTab === 'station'"> <template v-if="activeTab === 'station'">
<span class="query-label" style="margin-left: 12px">开始工位</span> <span class="query-label" style="margin-left: 12px">开始工位</span>
<el-select v-model="startStation" placeholder="请选择" filterable clearable size="small" style="width: 200px"> <el-select v-model="startStation" placeholder="请选择" filterable clearable size="small" style="width: 240px">
<el-option v-for="item in allStationOptions" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in allStationOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<span class="query-label" style="margin-left: 8px"></span> <span class="query-label" style="margin-left: 8px"></span>
<el-select v-model="endStation" placeholder="请选择" filterable clearable size="small" style="width: 200px"> <el-select v-model="endStation" placeholder="请选择" filterable clearable size="small" style="width: 240px">
<el-option v-for="item in allStationOptions" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in allStationOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</template> </template>

View File

@@ -10,7 +10,7 @@
filterable filterable
clearable clearable
size="small" size="small"
style="width: 200px"> style="width: 240px">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -71,7 +71,7 @@
start-placeholder="开始时间" start-placeholder="开始时间"
end-placeholder="结束时间" end-placeholder="结束时间"
@change="getOrderNumber()"/> @change="getOrderNumber()"/>
<el-button type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel()">Excel</el-button> <el-button :loading="exportLoading" :disabled="exportLoading" type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel()">Excel</el-button>
</div> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@@ -200,7 +200,8 @@ export default {
total: 0, // 总条数 total: 0, // 总条数
pageList: 30, // 每页显示条数 pageList: 30, // 每页显示条数
pageSize: 30, // 每页显示条数 pageSize: 30, // 每页显示条数
pageCurrent: 1 // 后台获取页 pageCurrent: 1, // 后台获取页
exportLoading: false // Excel导出中
} }
}, },
created() { created() {
@@ -235,7 +236,7 @@ export default {
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.stationNumber.push({ this.stationNumber.push({
label: response.data[i].工位号, label: `${response.data[i].工位号}${response.data[i].工位名称 || ''}`,
value: response.data[i].工位号 value: response.data[i].工位号
}) })
} }
@@ -249,7 +250,7 @@ export default {
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.stationNumberN.push({ this.stationNumberN.push({
label: response.data[i].工位号, label: `${response.data[i].工位号}${response.data[i].工位名称 || ''}`,
value: response.data[i].工位号 value: response.data[i].工位号
}) })
} }
@@ -341,8 +342,15 @@ export default {
param[9] = ['订单号', this.orderNumberValue] param[9] = ['订单号', this.orderNumberValue]
param[10] = ['机型_ischeck', engineTypeValue_check] param[10] = ['机型_ischeck', engineTypeValue_check]
param[11] = ['机型', this.engineTypeValue] param[11] = ['机型', this.engineTypeValue]
var Data = this.CreateData('2001', '质量数据查询_测量数据发动机在线状态_报表_NEW新', param) param[12] = ['PageCurrent', 1]
this.exportExcel_NPOI(Data) param[13] = ['PageSize', 99999999]
param[14] = ['PageCount', '1111', 'int', '1']
param[15] = ['ItemCount', '1111', 'int', '1']
var exportData = JSON.parse(this.CreateData('2005', '质量数据查询_测量数据发动机在线状态_查询_NEW', param))
exportData.exportFileName = '过站信息查询'
exportData.exportColumns = '机型=产品型号,发动机号=产品编号,工位号,托盘编号,到达时间,离开时间,在线时间=生产节拍(m),是否合格'
var Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
} else { } else {
this.$message.warning('暂无数据') this.$message.warning('暂无数据')
} }

View File

@@ -4,7 +4,7 @@
<div class="topDiv"> <div class="topDiv">
<div> <div>
<span style="margin-left: 10px">工位号</span> <span style="margin-left: 10px">工位号</span>
<el-select v-model="stationNumberValue" placeholder="请选择工位号" filterable clearable size="small" style="width: 200px" @change="getPartName();getBatchBarcode()"> <el-select v-model="stationNumberValue" placeholder="请选择工位号" filterable clearable size="small" style="width: 240px" @change="getPartName();getBatchBarcode()">
<el-option <el-option
v-for="item in stationNumber" v-for="item in stationNumber"
:key="item.value" :key="item.value"
@@ -12,15 +12,15 @@
:value="item.value" :value="item.value"
size="mini"/> size="mini"/>
</el-select> </el-select>
<!-- <span style="margin-left: 10px">产品型号</span>--> <span style="margin-left: 10px">产品型号</span>
<!-- <el-select v-model="engineTypeValue" placeholder="请选择机型" filterable clearable size="small" style="width: 240px" @change="getPartName()">--> <el-select v-model="engineTypeValue" placeholder="请选择产品型号" filterable clearable size="small" style="width: 150px" @change="getPartName()">
<!-- <el-option--> <el-option
<!-- v-for="item in engineType"--> v-for="item in engineType"
<!-- :key="item.value"--> :key="item.value"
<!-- :label="item.label"--> :label="item.label"
<!-- :value="item.value"--> :value="item.value"
<!-- size="mini"/>--> size="mini"/>
<!-- </el-select>--> </el-select>
<span style="margin-left: 10px">产品编号</span> <span style="margin-left: 10px">产品编号</span>
<el-input v-model="assemblyNumberValue" placeholder="请输入产品编号" clearable size="small" style="width: 240px;"/> <el-input v-model="assemblyNumberValue" placeholder="请输入产品编号" clearable size="small" style="width: 240px;"/>
@@ -68,7 +68,7 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
@change="getTraceabilityCode();getBatchBarcode()"/> @change="getTraceabilityCode();getBatchBarcode()"/>
<el-button type="info" size="small" icon="el-icon-download" @click="exportExcel()">Excel</el-button> <el-button :loading="exportLoading" :disabled="exportLoading" type="info" size="small" icon="el-icon-download" @click="exportExcel()">Excel</el-button>
<!-- <span style="margin-left: 10px">批次条码</span>--> <!-- <span style="margin-left: 10px">批次条码</span>-->
<!-- <el-input v-model="batchBarcodeValue" placeholder="请输入批次条码" clearable size="small" style="width: 200px; margin-left: 13px"/>--> <!-- <el-input v-model="batchBarcodeValue" placeholder="请输入批次条码" clearable size="small" style="width: 200px; margin-left: 13px"/>-->
<!-- <el-select v-model="batchBarcodeValue" placeholder="请选择批次条码" clearable filterable size="small" style="width: 200px;margin-left: 13px">--> <!-- <el-select v-model="batchBarcodeValue" placeholder="请选择批次条码" clearable filterable size="small" style="width: 200px;margin-left: 13px">-->
@@ -97,16 +97,11 @@
size="mini"> size="mini">
<!-- <el-table-column :selectable="selectable" type="selection" width="45" align="center"/>--> <!-- <el-table-column :selectable="selectable" type="selection" width="45" align="center"/>-->
<el-table-column type="index" width="60" label="序号" align="center"/> <el-table-column type="index" width="60" label="序号" align="center"/>
<el-table-column align="center" width="120px" label="订单号"> <el-table-column align="center" width="100px" label="产品型号">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.订单 }} {{ scope.row.发动机型 }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" width="80px" label="型号">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.发动机型号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" width="200px" label="产品编号"> <el-table-column align="center" width="200px" label="产品编号">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.发动机号 }} {{ scope.row.发动机号 }}
@@ -222,7 +217,8 @@ export default {
total: 0, // 总条数 total: 0, // 总条数
pageList: 30, // 每页显示条数 pageList: 30, // 每页显示条数
pageSize: 30, // 每页显示条数 pageSize: 30, // 每页显示条数
pageCurrent: 1 // 后台获取页 pageCurrent: 1, // 后台获取页
exportLoading: false // Excel导出中
} }
}, },
created() { created() {
@@ -260,7 +256,7 @@ export default {
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.stationNumber.push({ this.stationNumber.push({
label: response.data[i].工位号, label: `${response.data[i].工位号}${response.data[i].工位名称 || ''}`,
value: response.data[i].工位号 value: response.data[i].工位号
}) })
} }
@@ -269,18 +265,16 @@ export default {
this.getMeasuringPosition() this.getMeasuringPosition()
}) })
}, },
// 机型 // 产品型号
getEngineType() { getEngineType() {
this.engineType = [] this.engineType = []
var param = [] var param = []
var Data = this.CreateData('11', 'CATL_基础信息_机型信息_查询', param) var Data = this.CreateData('11', 'MES_基本变量_机型代码_查询', param)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
if (response.data.length > 0) this.engineTypeValue = response.data[0].机型号
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.engineType.push({ this.engineType.push({
label: response.data[i].机型号, label: response.data[i].发动机型号,
value: response.data[i].机型号, value: response.data[i].发动机型号
labelName: response.data[i].机型号
}) })
} }
}) })
@@ -469,8 +463,15 @@ export default {
param[11] = ['二维码', this.traceabilityCode] param[11] = ['二维码', this.traceabilityCode]
param[12] = ['物料条码批次_ischeck', batchBarcodeValue_check] param[12] = ['物料条码批次_ischeck', batchBarcodeValue_check]
param[13] = ['物料条码批次', this.batchBarcodeValue] param[13] = ['物料条码批次', this.batchBarcodeValue]
var Data = this.CreateData('2001', '物料数据查询_报表新', param) param[14] = ['PageCurrent', 1]
this.exportExcel_NPOI(Data) param[15] = ['PageSize', 99999999]
param[16] = ['PageCount', '1111', 'int', '1']
param[17] = ['ItemCount', '1111', 'int', '1']
var exportData = JSON.parse(this.CreateData('2005', '物料数据_视图_查询', param))
exportData.exportFileName = '物料数据查询'
exportData.exportColumns = '发动机型号=产品型号,发动机号=产品编号,工位号,零件数量=数量,零件名称,物料号,物料条码,物料条码批次,操作时间'
var Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
} else { } else {
this.$message.warning('暂无数据') this.$message.warning('暂无数据')
} }

View File

@@ -14,10 +14,12 @@
<span style="margin-left: 10px">校验状态</span> <span style="margin-left: 10px">校验状态</span>
<el-select v-model="verifyStatusValue" placeholder="请选择" clearable size="small" style="width: 120px"> <el-select v-model="verifyStatusValue" placeholder="请选择" clearable size="small" style="width: 120px">
<el-option label="全部" value="" /> <el-option label="全部" value="" />
<el-option label="通过" value="1" /> <el-option label="进行中" value="0" />
<el-option label="成功" value="1" />
<el-option label="失败" value="2" />
</el-select> </el-select>
<span style="margin-left: 10px">完成时间</span> <span style="margin-left: 10px">记录时间</span>
<el-date-picker <el-date-picker
v-model="dateTime" v-model="dateTime"
:clearable="false" :clearable="false"
@@ -32,7 +34,7 @@
end-placeholder="结束时间" /> end-placeholder="结束时间" />
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" @click="handleSearch">查询</el-button> <el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" @click="handleSearch">查询</el-button>
<el-button type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel">Excel</el-button> <el-button :loading="exportLoading" :disabled="exportLoading" type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel">Excel</el-button>
</div> </div>
<el-table <el-table
@@ -63,10 +65,11 @@
</el-table-column> </el-table-column>
<el-table-column label="校验状态" width="100" align="center"> <el-table-column label="校验状态" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="getResultType(scope.row.校验状态)" size="mini">{{ getStatusText(scope.row.校验状态) }}</el-tag> <el-tag :type="getStatusType(scope.row.校验状态)" size="mini">{{ getStatusText(scope.row.校验状态) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作人" width="110" align="center" prop="操作人" show-overflow-tooltip /> <el-table-column label="操作人" width="110" align="center" prop="操作人" show-overflow-tooltip />
<el-table-column label="创建时间" width="160" align="center" prop="创建时间" show-overflow-tooltip />
<el-table-column label="完成时间" width="160" align="center" prop="完成时间" show-overflow-tooltip /> <el-table-column label="完成时间" width="160" align="center" prop="完成时间" show-overflow-tooltip />
</el-table> </el-table>
@@ -98,7 +101,8 @@ export default {
dateTime: '', dateTime: '',
total: 0, total: 0,
pageSize: 50, pageSize: 50,
pageCurrent: 1 pageCurrent: 1,
exportLoading: false
} }
}, },
created() { created() {
@@ -155,17 +159,29 @@ export default {
this.$message.warning('暂无数据') this.$message.warning('暂无数据')
return return
} }
const Data = this.CreateData('2001', 'PACK下线三码校验_记录_分页查询', this.getParam(1, 99999999)) const exportData = JSON.parse(this.CreateData('2005', 'PACK下线三码校验_记录_分页查询', this.getParam(1, 99999999)))
this.exportExcel_NPOI(Data) exportData.exportFileName = '三码校验记录'
exportData.exportColumns = '产品编号,产品型号,机型代码,扫描箱体码,扫描客户标签码,箱体码校验结果=箱体码结果,客户标签码校验结果=客户标签结果,校验状态,操作人,创建时间,完成时间'
const Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
}, },
getResultType(value) { getResultType(value) {
return Number(value) === 1 ? 'success' : 'danger' const status = Number(value)
if (status === 1) return 'success'
if (status === 2) return 'danger'
return 'warning'
}, },
getResultText(value) { getResultText(value) {
return Number(value) === 1 ? '通过' : '失败' const status = Number(value)
if (status === 1) return '成功'
if (status === 2) return '失败'
return '进行中'
},
getStatusType(value) {
return this.getResultType(value)
}, },
getStatusText(value) { getStatusText(value) {
return Number(value) === 1 ? '通过' : '失败' return this.getResultText(value)
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageCurrent = 1 this.pageCurrent = 1

View File

@@ -67,6 +67,8 @@
style="margin-left: 5px" style="margin-left: 5px"
@click="pageSize = 50; pageCurrent = 1; getTable()">查询</el-button> @click="pageSize = 50; pageCurrent = 1; getTable()">查询</el-button>
<el-button <el-button
:loading="exportLoading"
:disabled="exportLoading"
type="success" type="success"
plain plain
size="small" size="small"
@@ -143,7 +145,8 @@ export default {
total: 0, total: 0,
pageSize: 50, pageSize: 50,
pageCurrent: 1, pageCurrent: 1,
loading: false loading: false,
exportLoading: false
} }
}, },
created() { created() {
@@ -210,8 +213,11 @@ export default {
param[8] = ['PageSize', 99999999] param[8] = ['PageSize', 99999999]
param[9] = ['PageCount', '1111', 'int', '1'] param[9] = ['PageCount', '1111', 'int', '1']
param[10] = ['ItemCount', '1111', 'int', '1'] param[10] = ['ItemCount', '1111', 'int', '1']
const Data = this.CreateData('2001', '生产计划_上线产品明细_分页查询', param) const exportData = JSON.parse(this.CreateData('2005', '生产计划_上线产品明细_分页查询', param))
this.exportExcel_NPOI(Data) exportData.exportFileName = '上线产品明细'
exportData.exportColumns = '发动机号=产品编号,产品型号,上线工位,当前工位,上线时间,下线时间,模组码,pack码=PACK码,箱体码'
const Data = JSON.stringify(exportData)
this.runExcelExport(Data, 'exportLoading')
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageCurrent = 1 this.pageCurrent = 1

View File

@@ -8,7 +8,8 @@ window.g = {
printTemplate: 'BQFT_BarCode_001', printTemplate: 'BQFT_BarCode_001',
// charDataUrl: 'http://127.0.0.1:9984', // charDataUrl: 'http://127.0.0.1:9984',
// baseURL: 'http://192.168.10.205:20021', // baseURL: 'http://192.168.10.205:20021',
// baseURL: 'http://127.0.0.1:10260', baseURL: 'http://127.0.0.1:10260',
baseURL: 'http://172.16.1.5:10000', // baseURL: 'http://localhost:57966',
// baseURL: 'http://172.16.1.5:10000',
API_MES_Controller_URL: 'http://172.16.1.5:9983' API_MES_Controller_URL: 'http://172.16.1.5:9983'
} }