Merge remote-tracking branch 'origin/master'

master
夜笙歌 9 months ago
commit 973deeff20

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询测温记录报表列表
export function listTemperatureHistory(query) {
return request({
url: '/report/temperatureHistory/list',
method: 'get',
params: query
})
}
// 查询测温记录报表详细
export function getTemperatureHistory(objId) {
return request({
url: '/report/temperatureHistory/' + objId,
method: 'get'
})
}
// 新增测温记录报表
export function addTemperatureHistory(data) {
return request({
url: '/report/temperatureHistory',
method: 'post',
data: data
})
}
// 修改测温记录报表
export function updateTemperatureHistory(data) {
return request({
url: '/report/temperatureHistory',
method: 'put',
data: data
})
}
// 删除测温记录报表
export function delTemperatureHistory(objId) {
return request({
url: '/report/temperatureHistory/' + objId,
method: 'delete'
})
}

@ -20,9 +20,9 @@
<el-form-item label="记录时间">
<el-date-picker
v-model="daterangeRecordTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
style="width: 340px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -220,6 +220,7 @@ import {
addElectricalInspection,
updateElectricalInspection
} from '@/api/report/electricalInspection'
import { parseTime } from '@//utils/ruoyi'
export default {
name: 'ElectricalInspection',
@ -275,6 +276,9 @@ export default {
}
},
created() {
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeRecordTime[0] = nowDate + ' 00:00:00'
this.daterangeRecordTime[1] = nowDate + ' 23:59:59'
this.getList()
},
methods: {

@ -19,10 +19,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="MES工单号" prop="productOrderNo">
<el-form-item label="SAP计划编号" prop="productOrderNo">
<el-input
v-model="queryParams.productOrderNo"
placeholder="请输入工单号"
placeholder="请输入SAP计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
@ -78,7 +78,7 @@
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="工厂" align="center" prop="factoryName" v-if="columns[1].visible" width="110"/>
<el-table-column label="产线" align="center" prop="productLineName" v-if="columns[20].visible"/>
<el-table-column label="MES工单号" align="center" prop="productOrderNo" v-if="columns[3].visible" width="90"/>
<el-table-column label="SAP计划编号" align="center" prop="productOrderNo" v-if="columns[3].visible" width="90"/>
<el-table-column label="销售订单号" align="center" prop="productSaleNo" v-if="columns[4].visible"/>
<el-table-column label="销售行号" align="center" prop="productSaleLineNo" v-if="columns[5].visible"/>
<el-table-column label="物料编码" align="center" prop="productCode" v-if="columns[6].visible" width="100"/>

@ -1,55 +1,43 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="产线" prop="PRODUCT_LINE_NAME">
<el-select v-model="queryParams.WORK_CENTER_CODE" placeholder="请选择产线">
<el-option
v-for="item in productLineList"
:key="item.workCenterCode"
:label="item.workCenterName"
:value="item.workCenterCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="产品编码" prop="MATERIAL_CODE">
<el-input
v-model="queryParams.MATERIAL_CODE"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="MATERIAL_NAME">
<el-input
v-model="queryParams.MATERIAL_NAME"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="SAP订单编号" prop="ORDER_CODE">
<!-- <el-form-item label="线号" prop="lineNo">-->
<!-- <el-input-->
<!-- v-model="queryParams.lineNo"-->
<!-- placeholder="请输入线号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="工位号" prop="gongwno">-->
<!-- <el-input-->
<!-- v-model="queryParams.gongwno"-->
<!-- placeholder="请输入工位号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="产品条码" prop="cpno">
<el-input
v-model="queryParams.ORDER_CODE"
placeholder="请输入SAP计划编号"
v-model="queryParams.cpno"
placeholder="请输入产品条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工位">
<el-select v-model="queryParams.stationCode" placeholder="请选择工位">
<el-option
v-for="item in findStationList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="起止时间">
<!-- <el-form-item label="实际测试时间" prop="testedtime">-->
<!-- <el-input-->
<!-- v-model="queryParams.testedtime"-->
<!-- placeholder="请输入实际测试时间"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="开始测试时间">
<el-date-picker
v-model="daterangeBeginTime"
v-model="daterangeBegindatetime"
style="width: 340px"
value-format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始时间"
@ -61,83 +49,89 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- >导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="temperatureHistoryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="线号" align="center" prop="LINE_NO" v-if="columns[1].visible"/>
<el-table-column label="工位号" align="center" prop="GONGW_NO" v-if="columns[2].visible"/>
<el-table-column label="产品条码" align="center" prop="CP_NO" v-if="columns[3].visible">
<el-table-column label="主键" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="线号" align="center" prop="lineNo" v-if="columns[1].visible"/>
<el-table-column label="工位号" align="center" prop="gongwno" v-if="columns[2].visible"/>
<el-table-column label="产品条码" align="center" prop="cpno" v-if="columns[3].visible" width="200" />
<el-table-column label="产品型号" align="center" prop="cpmodel" v-if="columns[4].visible" width="180"/>
<el-table-column label="基准型号" align="center" prop="factorymodel" v-if="columns[5].visible" width="180"/>
<el-table-column label="测试结果" align="center" prop="cpresult" v-if="columns[12].visible"/>
<el-table-column label="开始测试时间" align="center" prop="begindatetime" width="180" v-if="columns[11].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.begindatetime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="产品型号" align="center" prop="CP_MODEL" v-if="columns[4].visible"/>
<el-table-column label="基准型号" align="center" prop="FACTORY_MODEL" v-if="columns[5].visible"/>
<el-table-column label="工作电压" align="center" prop="VOLTAGE" v-if="columns[6].visible"/>
<el-table-column label="测试通道" align="center" prop="POINT2" v-if="columns[7].visible"/>
<el-table-column label="计划测试时间" align="center" prop="TEST_TIME" v-if="columns[7].visible"/>
<el-table-column label="实际测试时间" align="center" prop="TESTED_TIME" v-if="columns[7].visible"/>
<el-table-column label="环温" align="center" prop="ETEMP" v-if="columns[7].visible"/>
<el-table-column label="开始测试时间" align="center" prop="BEGIN_DATETIME" v-if="columns[7].visible"/>
<el-table-column label="测试结果" align="center" prop="CP_RESULT" v-if="columns[7].visible"/>
<el-table-column label="测试结束时间" align="center" prop="END_DATETIME" v-if="columns[7].visible"/>
<el-table-column label="系统用户" align="center" prop="USER_NAME" v-if="columns[7].visible"/>
<el-table-column label="备注" align="center" prop="REMARK" v-if="columns[7].visible"/>
<el-table-column label="第几次测试" align="center" prop="TEST_NO" v-if="columns[7].visible"/>
<el-table-column label="温度数据" align="center" prop="TEMP_MES" v-if="columns[7].visible"/>
<el-table-column label="计划测试时间" align="center" prop="TEST_TIME" v-if="columns[7].visible"/>
<el-table-column label="功率数据" align="center" prop="POWER_MES" v-if="columns[7].visible"/>
<el-table-column label="部件测试数据" align="center" prop="PART_MES" v-if="columns[7].visible"/>
<el-table-column label="故障代码" align="center" prop="ERRORCODE_MES" v-if="columns[7].visible"/>
<el-table-column label="记录插入时间" align="center" prop="RECORD_TIME" v-if="columns[7].visible"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-search"-->
<!-- @click="handleOrderDetails(scope.row)"-->
<!-- v-hasPermi="['report:pointDnb:edit']"-->
<!-- >检验详情</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="测试结束时间" align="center" prop="enddatetime" width="180" v-if="columns[13].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.enddatetime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="工作电压" align="center" prop="voltage" v-if="columns[6].visible"/>
<el-table-column label="测试通道" align="center" prop="point2" v-if="columns[7].visible" width="160"/>
<el-table-column label="计划测试时间" align="center" prop="testtime" v-if="columns[8].visible" width="100"/>
<el-table-column label="实际测试时间" align="center" prop="testedtime" v-if="columns[9].visible" width="100"/>
<el-table-column label="环温" align="center" prop="etemp" v-if="columns[10].visible"/>
<el-table-column label="系统用户" align="center" prop="username" v-if="columns[14].visible"/>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[15].visible"/>
<el-table-column label="第几次测试" align="center" prop="testno" v-if="columns[16].visible"/>
<el-table-column label="温度数据" align="center" prop="tempMes" v-if="columns[17].visible" :show-overflow-tooltip="true"/>
<el-table-column label="功率数据" align="center" prop="powerMes" v-if="columns[18].visible" :show-overflow-tooltip="true"/>
<el-table-column label="部件测试数据" align="center" prop="partMes" v-if="columns[19].visible" :show-overflow-tooltip="true"/>
<el-table-column label="是否测试部件" align="center" prop="isorder" v-if="columns[20].visible"/>
<el-table-column label="低压启动测试时间" align="center" prop="lowvTime" v-if="columns[21].visible"/>
<el-table-column label="低压启动标准下限" align="center" prop="lowvPowermin" v-if="columns[22].visible"/>
<el-table-column label="低压启动标准上限" align="center" prop="lowvPowermax" v-if="columns[23].visible"/>
<el-table-column label="低压启动实际采集值" align="center" prop="lowvPowerfact" v-if="columns[24].visible" width="100"/>
<el-table-column label="低压启动测试电压" align="center" prop="lowvoltage" v-if="columns[25].visible"/>
<el-table-column label="同步时间" align="center" prop="syncDatetime" width="180" v-if="columns[26].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.syncDatetime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="供电频率" align="center" prop="frequency" v-if="columns[27].visible"/>
</el-table>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
temperatureRecordReportList
} from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
listTemperatureHistory,
getTemperatureHistory,
delTemperatureHistory,
addTemperatureHistory,
updateTemperatureHistory
} from '@/api/report/temperatureHistory'
import { parseTime } from '@//utils/ruoyi'
export default {
name: 'ReportInfo',
dicts: ['is_flag'],
name: 'TemperatureHistory',
data() {
return {
//
@ -152,73 +146,99 @@ export default {
showSearch: true,
//
total: 0,
//
reportList: [],
//
temperatureHistoryList: [],
//
daterangeBegindatetime: [],
//
title: '',
//
open: false,
//
daterangeBeginTime: [],
//
queryParams: {
// pageNum: 1,
// pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
pageNum: 1,
pageSize: 10,
lineNo: null,
gongwno: null,
cpno: null,
cpmodel: null,
factorymodel: null,
voltage: null,
point2: null,
testtime: null,
testedtime: null,
etemp: null,
begindatetime: null,
cpresult: null,
enddatetime: null,
username: null,
testno: null,
tempMes: null,
powerMes: null,
partMes: null,
isorder: null,
lowvTime: null,
lowvPowermin: null,
lowvPowermax: null,
lowvPowerfact: null,
lowvoltage: null,
syncDatetime: null,
frequency: null
},
//
form: {},
//
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `工位`, visible: true },
{ key: 2, label: `订单编号`, visible: true },
{ key: 3, label: `物料编码`, visible: true },
{ key: 4, label: `物料名称`, visible: true },
{ key: 5, label: `产品编码`, visible: true },
{ key: 6, label: `产品型号`, visible: true },
{ key: 7, label: `数量`, visible: true },
],
// 线
productLineList: [],
//
findStationList: []
{ key: 0, label: `主键`, visible: false },
{ key: 1, label: `线号`, visible: true },
{ key: 2, label: `工位号`, visible: true },
{ key: 3, label: `产品条码`, visible: true },
{ key: 4, label: `产品型号`, visible: true },
{ key: 5, label: `基准型号`, visible: true },
{ key: 6, label: `工作电压`, visible: true },
{ key: 7, label: `测试通道`, visible: true },
{ key: 8, label: `计划测试时间`, visible: true },
{ key: 9, label: `实际测试时间`, visible: true },
{ key: 10, label: `环温`, visible: true },
{ key: 11, label: `开始测试时间`, visible: true },
{ key: 12, label: `测试结果`, visible: true },
{ key: 13, label: `测试结束时间`, visible: true },
{ key: 14, label: `系统用户`, visible: true },
{ key: 15, label: `备注`, visible: true },
{ key: 16, label: `第几次测试`, visible: true },
{ key: 17, label: `温度数据`, visible: true },
{ key: 18, label: `功率数据`, visible: true },
{ key: 19, label: `部件测试数据`, visible: true },
{ key: 20, label: `是否测试部件`, visible: true },
{ key: 21, label: `低压启动测试时间`, visible: true },
{ key: 22, label: `低压启动标准下限`, visible: true },
{ key: 23, label: `低压启动标准上限`, visible: true },
{ key: 24, label: `低压启动实际采集值`, visible: true },
{ key: 25, label: `低压启动测试电压`, visible: true },
{ key: 26, label: `同步时间`, visible: true },
{ key: 27, label: `供电频率`, visible: true }
]
}
},
created() {
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
})
findProductLineList({productLineType: 2}).then(response => {
this.findStationList = response.data;
});
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate
this.daterangeBeginTime[1] = nowDate
this.daterangeBegindatetime[0] = nowDate + ' 00:00:00'
this.daterangeBegindatetime[1] = nowDate + ' 23:59:59'
this.getList()
},
methods: {
/** 查询工单信息列表 */
/** 查询测温记录报表列表 */
getList() {
this.loading = true
if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) {
this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
this.queryParams.endBeginTime = this.daterangeBeginTime[1]
} else {
this.queryParams.beginBeginTime = null
this.queryParams.endBeginTime = null
this.queryParams.params = {}
if (null != this.daterangeBegindatetime && '' != this.daterangeBegindatetime) {
this.queryParams.params["beginBegindatetime"] = this.daterangeBegindatetime[0];
this.queryParams.params["endBegindatetime"] = this.daterangeBegindatetime[1];
}
temperatureRecordReportList(this.queryParams).then(response => {
this.reportList = response.data
this.total = response.total;
listTemperatureHistory(this.queryParams).then(response => {
this.temperatureHistoryList = response.rows
this.total = response.total
this.loading = false
})
},
@ -229,20 +249,42 @@ export default {
},
//
reset() {
this.daterangeBeginTime = []
this.daterangeBegindatetime = [];
this.form = {
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
objId: null,
lineNo: null,
gongwno: null,
cpno: null,
cpmodel: null,
factorymodel: null,
voltage: null,
point2: null,
testtime: null,
testedtime: null,
etemp: null,
begindatetime: null,
cpresult: null,
enddatetime: null,
username: null,
remark: null,
testno: null,
tempMes: null,
powerMes: null,
partMes: null,
isorder: null,
lowvTime: null,
lowvPowermin: null,
lowvPowermax: null,
lowvPowerfact: null,
lowvoltage: null,
syncDatetime: null,
frequency: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
// this.queryParams.pageNum = 1;
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
@ -250,25 +292,65 @@ export default {
this.resetForm('queryForm')
this.handleQuery()
},
/** 查看明细 */
handleOrderDetails(row) {
this.$tab.openPage("SAP订单信息","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE});
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加测温记录报表'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const objId = row.objId || this.ids
getTemperatureHistory(objId).then(response => {
this.form = response.data
this.open = true
this.title = '修改测温记录报表'
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.objId != null) {
updateTemperatureHistory(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addTemperatureHistory(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids
this.$modal.confirm('是否确认删除测温记录报表编号为"' + objIds + '"的数据项?').then(function() {
return delTemperatureHistory(objIds)
}).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {
this.download('/report/productionReport/export', {
this.download('report/temperatureHistory/export', {
...this.queryParams
}, `report_${new Date().getTime()}.xlsx`)
}, `temperatureHistory_${new Date().getTime()}.xlsx`)
}
}
}
</script>

Loading…
Cancel
Save