commit 2022-09-06

This commit is contained in:
LIUHAO
2022-09-06 11:41:18 +08:00
parent 0a551baa42
commit a137256830
28 changed files with 1991 additions and 98 deletions

23
src/WorkRecode/WorkRecode Normal file
View File

@@ -0,0 +1,23 @@
2022-08-29:
SQL SEVER点检表、视图、存储过程增加
2022-08-30:
1、订单计划状态
0 已结束
1 生产中
2 未上线
3 未完成
4 已超额
删除修改状态判断修改
2、SQL SEVER
1装配质量数据查询质量数据查询_综合查询新
2物料数据查询物料数据查询_报表新
3过站信息查询质量数据查询_测量数据发动机在线状态_报表_NEW新
4分线质量查询质量数据分线_导出新
5分线物料查询物料数据分线查询_报表新
6生产计划订单完工MES_计划BOM_发动机订单计划_订单完工_报表新
7设备报警统计测量数据工位报警全部视图_查询新
8物料ANDONANDON_ANDON信息_备份_物料Andon综合查询新
9质量ANDONANDON_ANDON信息_备份_质量Andon综合查询新
10设备ANDONANDON_ANDON信息_备份_故障Andon综合查询新
2022-09-05:
1、基本变量写入修改

View File

@@ -78,3 +78,4 @@ export default service
// return 1
// }
// }
export const action = 'http://192.168.1.178:8082/submit/MESCommonBase.ashx'

View File

@@ -256,7 +256,7 @@ export default {
// param[5] = ['订单号', this.orderNumberValue]
// param[6] = ['产品型号_ischeck', engineTypeValue_check]
// param[7] = ['产品型号', this.engineTypeValue]
var Data = this.CreateData('2001', 'ANDON_ANDON信息_备份_故障Andon综合查询', param)
var Data = this.CreateData('2001', 'ANDON_ANDON信息_备份_故障Andon综合查询', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -256,7 +256,7 @@ export default {
// param[5] = ['订单号', this.orderNumberValue]
// param[6] = ['产品型号_ischeck', engineTypeValue_check]
// param[7] = ['产品型号', this.engineTypeValue]
var Data = this.CreateData('2001', 'ANDON_ANDON信息_备份_物料Andon综合查询', param)
var Data = this.CreateData('2001', 'ANDON_ANDON信息_备份_物料Andon综合查询', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -256,7 +256,7 @@ export default {
// param[5] = ['订单号', this.orderNumberValue]
// param[6] = ['产品型号_ischeck', engineTypeValue_check]
// param[7] = ['产品型号', this.engineTypeValue]
var Data = this.CreateData('2001', 'ANDON_ANDON信息_备份_质量Andon综合查询', param)
var Data = this.CreateData('2001', 'ANDON_ANDON信息_备份_质量Andon综合查询', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -0,0 +1,259 @@
<template>
<div class="app-container">
<el-card class="topCard">
<div class="topDiv">
<span style="margin-left: 10px">工位号</span>
<el-select v-model="dataTypeValue" placeholder="工位号" clearable size="small" style="width:100px">
<el-option
v-for="item in dataType"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<!-- <span style="margin-left: 10px">变量类型</span>-->
<!-- <el-select v-model="valueTypeValue" placeholder="变量类型" clearable size="small" style="width:100px">-->
<!-- <el-option-->
<!-- v-for="item in valueType"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"/>-->
<!-- </el-select>-->
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" @click="pageSize=100;pageCurrent=1;searchTable()">查询</el-button>
</div>
<el-table
v-loading="loading"
:data="tableData"
highlight-current-row
border
size="mini"
height="740"
center
style="width: 100%">
<el-table-column type="index" width="60" label="序号" align="center"/>
<el-table-column label="TagID" align="center">
<template slot-scope="scope">
{{ scope.row.TagID }}
</template>
</el-table-column>
<el-table-column label="TagName" width="200px" align="center">
<template slot-scope="scope">
{{ scope.row.TagName }}
</template>
</el-table-column>
<el-table-column label="工位号" align="center">
<template slot-scope="scope">
{{ scope.row.工位号 }}
</template>
</el-table-column>
<el-table-column label="测量位置" align="center">
<template slot-scope="scope">
{{ scope.row.测量位置 }}
</template>
</el-table-column>
<el-table-column label="测量项目" align="center">
<template slot-scope="scope">
{{ scope.row.测量项目 }}
</template>
</el-table-column>
<el-table-column label="变量类型名称" width="300px" align="center">
<template slot-scope="scope">
{{ scope.row.变量类型名称 }}
</template>
</el-table-column>
<el-table-column label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
plain
icon="el-icon-edit"
@click="editShiftTable(scope.row)">编辑</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[50, 100, 200]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<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-item label="测量项目" prop="measurementItems" style="display: inline-block">
<el-input
v-model="form.measurementItems"
clearable
size="small"
placeholder="测量项目"/>
</el-form-item>
<el-form-item label="变量类型名称" prop="valueName" style="display: inline-block">
<el-input
v-model="form.valueName"
clearable
size="small"
placeholder="变量类型名称"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff('form')">取消</el-button>
<el-button type="primary" size="small" @click="submitAdd1('form')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import request from '@/utils/request'
export default {
data() {
return {
loading: false,
tableData: [],
dataType: [], // 工位数组
dataTypeValue: '', // 工位信息
valueType: [
{
label: '基本变量',
value: 8
}, {
label: '报警变量',
value: 9
}, {
label: '质量变量',
value: 7
}
],
valueTypeValue: '9',
dialogFormVisible: false,
title: '',
form: {
tagID: '',
stationNo: '',
measurementItems: '',
valueName: ''
},
rules: { // 表单验证规则
},
total: 0, // 总条数
pageList: 100, // 每页显示条数
pageSize: 100, // 每页显示条数
pageCurrent: 1 // 后台获取页
}
},
created() {
this.getNumber()
this.searchTable()
},
methods: {
// 初始化获取产品型号
getNumber() {
this.dataType = []
request({
url: '',
method: 'post',
data: {
type: '3',
name: `SELECT [工位号] FROM [dbo].[MES_计划BOM_工位与名称]`
}
}).then(response => {
if (response.data.length) {
for (let i = 0; i < response.data.length; i++) {
this.dataType.push({
label: response.data[i].工位号,
value: response.data[i].工位号
})
}
}
})
},
searchTable() {
this.loading = true
this.tableData = []
let stationNumberValue_check, valueType_check
// this.engineTypeValue ? engineTypeValue_check = 1 : (engineTypeValue_check = 0, this.engineTypeValue = '')
this.dataTypeValue ? stationNumberValue_check = 1 : (stationNumberValue_check = 0, this.dataTypeValue = '')
this.valueTypeValue ? valueType_check = 1 : (valueType_check = 0, this.valueTypeValue = '')
var param = []
param[0] = ['变量类型_ischeck', valueType_check]
param[1] = ['变量类型', this.valueTypeValue]
param[2] = ['工位号_ischeck', stationNumberValue_check]
param[3] = ['工位号', this.dataTypeValue]
param[4] = ['PageCurrent', this.pageCurrent]
param[5] = ['PageSize', this.pageSize]
param[6] = ['PageCount', '1111', 'int', '1']
param[7] = ['ItemCount', '1111', 'int', '1']
var Data = this.CreateData('11', 'MES_基本变量_查询数据', param)
this.ExecDatabase(Data).then(response => {
console.log(response, 66)
if (response.data.result.length !== 0) {
this.tableData = response.data.result
}
this.total = parseInt(response.data.output[0].ItemCount)
this.loading = false
})
},
editShiftTable(row) {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.form.tagID = row.TagID
this.form.measurementItems = row.测量项目
this.form.stationNo = row.工位号
this.form.valueName = row.变量类型名称
this.title = '编辑'
this.dialogFormVisible = true
},
submitAdd1() {
this.$refs['form'].validate((valid) => {
if (valid) {
var param = []
param[0] = ['工位号', this.form.stationNo]
param[1] = ['TagID', this.form.tagID]
param[2] = ['测量项目', this.form.measurementItems]
param[3] = ['变量类型名称', this.form.valueName]
var Data = this.CreateData('12', '基础数据_报警变量维护_编辑', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message({
message: '修改成功',
type: 'success'
})
this.searchTable()
} else {
this.$message.error('修改失败!')
}
})
this.dialogFormVisible = false
} else {
return false
}
})
},
callOff() {
this.dialogFormVisible = false
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
.topDiv{
margin-bottom: 10px;
}
</style>

View File

@@ -10,7 +10,9 @@
:value="item.value"/>
</el-select>
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 15px" plain @click="searchTable()">查询</el-button>
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="writeVariable1()">写入变量</el-button>
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="writeVariable1('8')">写入基本变量</el-button>
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="writeVariable1('9')">写入报警变量</el-button>
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="writeVariable1('7')">写入质量变量</el-button>
<!-- <el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="addShiftTable('form')">新增</el-button>-->
<!-- <el-button type="info" plain size="small" icon="el-icon-upload2" @click="importOrder('form')">导入</el-button>-->
<el-table
@@ -160,7 +162,7 @@ export default {
this.multipleSelection = val
console.log(this.multipleSelection, 'this.multipleSelection')
},
writeVariable1() {
writeVariable1(val) {
if (!this.multipleSelection.length) {
this.$message.error('请选择工位号!')
} else {
@@ -169,11 +171,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.writeVariable()
this.writeVariable(val)
})
}
},
async writeVariable() {
async writeVariable(val) {
// eslint-disable-next-line no-unused-vars
let ip, numberAlarms, massNumber, stationNo, fourNumber
this.multipleSelection_variable = this.multipleSelection
@@ -184,18 +186,19 @@ export default {
ip = this.multipleSelection_variable[i].PLC
numberAlarms = this.multipleSelection_variable[i].报警数
massNumber = this.multipleSelection_variable[i].质量组数
await this.writeVariableDetermine(ip, numberAlarms, massNumber, stationNo, fourNumber)
await this.writeVariableDetermine(ip, numberAlarms, massNumber, stationNo, fourNumber, val)
console.log(ip, numberAlarms, massNumber, stationNo, fourNumber, 'ip, numberAlarms, massNumber, stationNo, fourNumber')
}
this.$message.success(`写入完成!`)
},
async writeVariableDetermine(ip, numberAlarms, massNumber, stationNo, fourNumber) {
async writeVariableDetermine(ip, numberAlarms, massNumber, stationNo, fourNumber, val) {
var param = []
param[0] = ['IP', ip]
param[1] = ['工位号', stationNo]
param[2] = ['工位代码', fourNumber]
param[3] = ['报警个数', numberAlarms]
param[4] = ['质量组数', massNumber]
param[5] = ['变量类型', val]
var Data = this.CreateData('12', 'MES_基本变量数据_增加', param)
return new Promise((resolve, reject) => {
this.ExecDatabase(Data).then(response => {
@@ -400,6 +403,7 @@ export default {
console.log(data, 1111)
this.worksheet = data.worksheet // 获取每个多选文件的表格坐标及值
this.itemFile = data.itemFile
console.log(this.worksheet, 'this.worksheet')
},
handleRemove(file) { // 移除文件
for (let i = 0; i < this.itemFile.length; i++) {

View File

@@ -382,7 +382,7 @@ export default {
// param[5] = ['订单号', this.orderNumberValue]
// param[6] = ['产品型号_ischeck', engineTypeValue_check]
// param[7] = ['产品型号', this.engineTypeValue]
var Data = this.CreateData('2001', '测量数据工位报警全部视图_查询', param)
var Data = this.CreateData('2001', '测量数据工位报警全部视图_查询', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -40,11 +40,7 @@
style="width: 100%;max-height: 700px"
border
size="mini">
<el-table-column width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column width="60" type="index" label="序号" align="center"/>
<el-table-column align="center" label="设备编号">
<template slot-scope="scope">
{{ scope.row.设备编号 }}
@@ -52,12 +48,12 @@
</el-table-column>
<el-table-column align="center" label="设备名称">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
{{ scope.row.设备名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="保养内容">
<el-table-column align="center" label="保养类型">
<template slot-scope="scope">
{{ scope.row.设备维护内容 }}
{{ scope.row.点检表类型名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="150">
@@ -84,7 +80,7 @@
</el-card>
<el-dialog :visible.sync="dialogFormVisible" :title="title" center style="min-height: 200px;" width="450px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="110px">
<el-form-item v-show="title === '编辑'" label="工位号" prop="serialNumber" style="display: inline-block">
<el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block">
<el-select v-model="form.stationNumberValue" placeholder="请选择工位号" size="small">
<el-option
v-for="item in stationNumber"
@@ -94,7 +90,7 @@
size="mini"/>
</el-select>
</el-form-item>
<el-form-item v-show="title === '编辑'" label="保养类型" prop="serialNumber" style="display: inline-block">
<el-form-item label="保养类型" prop="maintenanceTypeValue" style="display: inline-block">
<el-select v-model="form.maintenanceTypeValue" placeholder="请选择保养类型" size="small">
<el-option
v-for="item in maintenanceType"
@@ -104,13 +100,6 @@
size="mini"/>
</el-select>
</el-form-item>
<el-form-item label="序号" prop="serialNumber" style="display: inline-block">
<el-input
v-model="form.serialNumber"
clearable
size="small"
placeholder="序号"/>
</el-form-item>
<el-form-item label="设备编号" prop="orderNumber" style="display: inline-block">
<el-input
v-model="form.orderNumber"
@@ -128,16 +117,6 @@
size="small"
placeholder="设备名称"/>
</el-form-item>
<el-form-item label="保养内容" prop="maintenanceContents" style="display: inline-block">
<el-input
v-model="form.maintenanceContents"
:row="2"
type="textarea"
clearable
size="small"
style="width: 200px;"
placeholder="保养内容"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff('form')">取消</el-button>
@@ -336,7 +315,6 @@ export default {
selectable(selection, row) {
return true
},
// 初始化获取订单号
getStationNumber() {
this.stationNumber = []
var param = []
@@ -359,15 +337,15 @@ export default {
getMaintenanceType() {
this.maintenanceType = []
var param = []
var Data = this.CreateData('11', '设备管理_保养类型_查询', param)
var Data = this.CreateData('11', '设备管理_保养类型_查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data.length) {
this.maintenanceTypeValue = response.data[0].保养类型代码
this.maintenanceTypeValue = response.data[0].点检表类型流水号
}
this.maintenanceType.push({
label: response.data[i].保养类型名称,
value: response.data[i].保养类型代码
label: response.data[i].点检表类型名称,
value: response.data[i].点检表类型流水号
})
}
})
@@ -378,7 +356,7 @@ export default {
var param = []
param[0] = ['工位号', this.stationNumberValue]
param[1] = ['保养类型代码', this.maintenanceTypeValue]
var Data = this.CreateData('11', '设备管理_设备维护内容_查询', param)
var Data = this.CreateData('11', '设备管理_设备维护内容_查询', param)
this.ExecDatabase(Data).then(response => {
console.log(response, 66)
if (response.data.length !== 0) {
@@ -455,7 +433,8 @@ export default {
this.form.partName = ''
this.form.orderNumber = ''
this.form.serialNumber = ''
this.maintenanceContents = ''
this.form.stationNumberValue = ''
this.form.maintenanceTypeValue = ''
this.dialogFormVisible = true
},
// 提交新增订单
@@ -463,13 +442,12 @@ export default {
this.$refs[formName].validate((valid) => {
if (valid) {
var param = []
param[0] = ['工位号', this.stationNumberValue]
param[1] = ['保养类型代码', this.maintenanceTypeValue]
param[2] = ['序号', this.form.serialNumber]
param[0] = ['工位号', this.form.stationNumberValue]
param[1] = ['保养类型代码', this.form.maintenanceTypeValue]
param[2] = ['设备名称', this.form.partName]
param[3] = ['设备编号', this.form.orderNumber]
param[4] = ['设备维护内容', this.form.maintenanceContents]
// console.log(param, 'param')
var Data = this.CreateData('12', '设备管理_设备维护内容_增加', param)
var Data = this.CreateData('12', '设备管理_设备维护内容_增加', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message({
@@ -501,8 +479,8 @@ export default {
type: 'warning'
}).then(() => {
var param = []
param[0] = ['维护计划流水号', row.维护计划流水号]
var Data = this.CreateData('12', '设备管理_设备维护内容_删除', param)
param[0] = ['ID', row.ID]
var Data = this.CreateData('12', '设备管理_设备维护内容_删除', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message({
@@ -527,13 +505,11 @@ export default {
this.$refs['form'].resetFields()
}
this.title = '编辑'
this.form.partName = row.机床名称
this.form.partName = row.设备名称
this.form.orderNumber = row.设备编号
this.form.stationNumberValue = row.工位号
this.form.maintenanceTypeValue = Number(row.保养类型代码)
this.form.serialNumber = Number(row.序号) // 序号
this.form.maintenanceContents = row.设备维护内容 // 维修内容
this.form.ID = row.维护计划流水号
this.form.maintenanceTypeValue = Number(row.点检表类型)
this.form.ID = row.ID
// this.form.MID = row.设备流水号
this.dialogFormVisible = true
},
@@ -542,13 +518,12 @@ export default {
this.$refs['form'].validate((valid) => {
if (valid) {
var param = []
param[0] = ['维护计划流水号', this.form.ID]
param[0] = ['ID', this.form.ID]
param[1] = ['工位号', this.form.stationNumberValue]
param[2] = ['保养类型代码', this.form.maintenanceTypeValue]
param[3] = ['号', this.form.serialNumber]
param[4] = ['设备维护内容', this.form.maintenanceContents]
param[5] = ['设备编号', this.form.orderNumber]
var Data = this.CreateData('12', '设备管理_设备维护内容_编辑', param)
param[3] = ['设备编号', this.form.orderNumber]
param[4] = ['设备名称', this.form.partName]
var Data = this.CreateData('12', '设备管理_设备维护内容_编辑新', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message({

View File

@@ -3,20 +3,20 @@
<el-card>
<div>
<span style="line-height: 25px">设备对应点检类型维护</span>
<div style="float: right;margin: 5px">
<el-select v-model="OPnameValue" filterable size="small" placeholder="工位号" style="width: 110px">
<el-option
v-for="item in OPname"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>选择月份</span>
<el-date-picker v-model="monthssss" size="small" type="month" value-format="yyyy-MM" format="yyyy-MM" style="width: 120px" placeholder="选择月"/>
<el-button v-positive="'loading'" :disabled="false" size="small" type="warning" style="margin-right: 50px" plain @click="exportOut()">导出日点检表</el-button>
</div>
<!-- <div style="float: right;margin: 5px">-->
<!-- <el-select v-model="OPnameValue" filterable size="small" placeholder="工位号" style="width: 110px">-->
<!-- <el-option-->
<!-- v-for="item in OPname"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"/>-->
<!-- </el-select>-->
<!-- <span>选择月份</span>-->
<!-- <el-date-picker v-model="monthssss" size="small" type="month" value-format="yyyy-MM" format="yyyy-MM" style="width: 120px" placeholder="选择月"/>-->
<!-- <el-button v-positive="'loading'" :disabled="false" size="small" type="warning" style="margin-right: 50px" plain @click="exportOut()">导出日点检表</el-button>-->
<!-- </div>-->
</div>
<el-table v-loading="loading1" :data="tableData1" stripe height="200" border>
<el-table v-loading="loading1" :data="tableData1" stripe height="420" border>
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column align="center" label="工位号" width="110">
<template slot-scope="scope">
@@ -473,19 +473,26 @@ export default {
created() {
this.getTableData1()
this.getTableData2()
this.getStationNumber()
},
methods: {
getTableData1() {
getStationNumber() {
this.OPname = []
this.tableData1 = []
this.loading1 = true
getTableData1().then(response => {
var param = []
var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.OPname.push({
label: response.data[i].工位号,
value: response.data[i].工位号
})
}
})
},
getTableData1() {
this.tableData1 = []
this.loading1 = true
getTableData1().then(response => {
this.tableData1 = response.data
this.loading1 = false
})

View File

@@ -0,0 +1,195 @@
<template>
<div class="routineCheckDiv">
<el-card class="routineCheckCard">
<div class="textDiv">
<el-select v-model="MachineValue" class="selectStation" filterable clearable size="small" placeholder="选择工位" @change="searchData">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span class="spanDatetime">查询时间</span>
<el-date-picker
v-model="dateRange"
size="small"
type="month"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM"
placeholder="选择月"
@change="searchData"/>
<el-button class="buttonSeach" type="primary" plain size="small" icon="el-icon-search" @click="searchData()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportExcel()">导出</el-button>
</div>
<el-table :data="tableData" class="tableDate" min-height="100px" highlight-current-row border>
<el-table-column label="项次" align="center" type="index" width="50px"/>
<el-table-column v-for="(item,index) of calenderTableHeader" :key="item.日期" :label="item.日期" :prop="prop[index]" :width="columnWidth(item.日期)" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="item.日期 === '日保养项目'">{{ scope.row[item.日期] }}</span>
<span v-else>{{ scope.row[ 'F' + item.日期] }}</span>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
dateRange: '', // 日期
MachineValue: '', // 工位号
Machine: [], // 工位号数组
tableData: [], // 数据
calenderTableHeader: [],
prop: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
}
},
// computed: {
// ...mapGetters([
// 'sidebar',
// 'avatar',
// 'name',
// 'id'
// ])
// },
created() {
this.searchDatetime()
},
mounted() {
this.fetchData()
this.dateRange = new Date() // 默认显示为当天时间
},
methods: {
// 查询工位信息
fetchData() {
var param = []
var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].工位号,
value: response.data[i].工位号
})
}
})
},
// 查询数据
searchData() {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['月份_check', dateRange_check]
param[1] = ['月份', this.dateRange]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('11', '点检日期_查询数据', param)
this.ExecDatabase(Data).then(response => {
this.tableData = response.data
// console.log(response.data)
})
},
exportExcel() {
if (this.tableData.length !== 0) {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['月份_check', dateRange_check]
param[1] = ['月份', this.dateRange]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('2001', '点检日期导出_查询数据', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
}
},
searchDatetime() {
this.calenderTableHeader = []
var param = []
var Data = this.CreateData('11', '点检日期_查询数据_表头', param)
this.ExecDatabase(Data).then(response => {
this.calenderTableHeader.push({
日期: '日保养项目'
})
for (let i = 0; i < response.data[0].日期; i++) {
this.calenderTableHeader.push({
日期: (i + 1).toString()
})
}
this.searchData()
})
},
// 设置列宽
columnWidth(item) {
let widthStr = ''
switch (item) {
case '日保养项目':
widthStr = '150'
break
default:
widthStr = '80'
}
return widthStr
}
}
}
</script>
<style scoped>
.routineCheckCard{
width: 100%;
height: 840px;
}
.selectStation{
width:160px;
}
.optionDiv1{
float: left
}
.optionDiv2{
float: right; color: #8492a6; font-size: 13px
}
.buttonSeach{
margin-left: 15px;
}
.spanDatetime{
font-size: 13px;
color: black;
}
.textDiv{
margin-top: 7px;
margin-bottom: 7px;
height: 100%;
}
.tableDate{
width: 100%;
}
/deep/ .tableDate{
border: 1px solid black!important;
}
/deep/ .tableDate td{
border: 1px solid black!important;
border-left: 0px!important;
border-top: 0px!important;
}
/deep/ .tableDate th.is-leaf{
border: 1px solid black!important;
border-top: 0px!important;
border-left: 0px!important;
}
</style>

View File

@@ -0,0 +1,199 @@
<template>
<div class="routineCheckDiv">
<el-card class="routineCheckCard">
<div class="textDiv">
<el-select v-model="MachineValue" class="selectStation" filterable clearable size="small" placeholder="选择工位" @change="searchData">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span class="spanDatetime">查询时间</span>
<el-date-picker
v-model="dateRange"
size="small"
type="year"
align="center"
value-format="yyyy-MM-dd"
format="yyyy"
placeholder="选择年"
@change="searchData"/>
<el-button class="buttonSeach" type="primary" plain size="small" icon="el-icon-search" @click="searchData()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportExcel()">导出</el-button>
</div>
<el-table :data="tableData" class="tableDate" min-height="100px" highlight-current-row border>
<el-table-column label="项次" align="center" type="index" width="50px"/>
<el-table-column label="月保养项目" width="150px" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.月保养项目 }}
</template>
</el-table-column>
<el-table-column v-for="(item,index) of calenderTableHeader" :key="item" :label="item" :prop="prop[index]" width="80px" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row[ 'F' + item] }}</span>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
dateRange: '', // 日期
MachineValue: '', // 工位号
Machine: [], // 工位号数组
tableData: [], // 数据
calenderTableHeader: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
prop: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
}
},
// computed: {
// ...mapGetters([
// 'sidebar',
// 'avatar',
// 'name',
// 'id'
// ])
// },
created() {
// this.searchDatetime()
},
mounted() {
this.fetchData()
this.dateRange = new Date() // 默认显示为当天时间
},
methods: {
// 查询工位信息
fetchData() {
var param = []
var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].工位号,
value: response.data[i].工位号
})
}
})
},
// 查询数据
searchData() {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['年份_check', dateRange_check]
param[1] = ['年份', this.dateRange]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('11', '点检日期月_查询数据', param)
this.ExecDatabase(Data).then(response => {
this.tableData = response.data
console.log(response.data, '月')
})
},
exportExcel() {
if (this.tableData.length !== 0) {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['月份_check', dateRange_check]
param[1] = ['月份', this.dateRange]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('2001', '点检日期月导出_查询数据', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
}
}
// searchDatetime() {
// this.calenderTableHeader = []
// var param = []
// var Data = this.CreateData('11', '点检日期_查询数据_表头', param)
// this.ExecDatabase(Data).then(response => {
// this.calenderTableHeader.push({
// 日期: '日保养项目'
// })
// for (let i = 0; i < response.data[0].日期; i++) {
// this.calenderTableHeader.push({
// 日期: (i + 1).toString()
// })
// }
// this.searchData()
// })
// },
// 设置列宽
// columnWidth(item) {
// let widthStr = ''
// switch (item) {
// case '日保养项目':
// widthStr = '150'
// break
// default:
// widthStr = '80'
// }
// return widthStr
// }
}
}
</script>
<style scoped>
.routineCheckCard{
width: 100%;
height: 840px;
}
.selectStation{
width:160px;
}
.optionDiv1{
float: left
}
.optionDiv2{
float: right; color: #8492a6; font-size: 13px
}
.buttonSeach{
margin-left: 15px;
}
.spanDatetime{
font-size: 13px;
color: black;
}
.textDiv{
margin-top: 7px;
margin-bottom: 7px;
height: 100%;
}
.tableDate{
width: 1162px;
}
/deep/ .tableDate{
border: 1px solid black!important;
}
/deep/ .tableDate td{
border: 1px solid black!important;
border-left: 0px!important;
border-top: 0px!important;
}
/deep/ .tableDate th.is-leaf{
border: 1px solid black!important;
border-top: 0px!important;
border-left: 0px!important;
}
</style>

View File

@@ -0,0 +1,199 @@
<template>
<div class="routineCheckDiv">
<el-card class="routineCheckCard">
<div class="textDiv">
<el-select v-model="MachineValue" class="selectStation" filterable clearable size="small" placeholder="选择工位" @change="searchData">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span class="spanDatetime">查询时间</span>
<el-date-picker
v-model="dateRange"
size="small"
type="year"
align="center"
value-format="yyyy-MM-dd"
format="yyyy"
placeholder="选择年"
@change="searchData"/>
<el-button class="buttonSeach" type="primary" plain size="small" icon="el-icon-search" @click="searchData()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportExcel()">导出</el-button>
</div>
<el-table :data="tableData" class="tableDate" min-height="100px" highlight-current-row border>
<el-table-column label="项次" align="center" type="index" width="50px"/>
<el-table-column label="季保养项目" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.季保养项目 }}
</template>
</el-table-column>
<el-table-column v-for="(item,index) of calenderTableHeader" :key="item" :label="item" :prop="prop[index]" width="80px" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row[ 'F' + item] }}</span>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
dateRange: '', // 日期
MachineValue: '', // 工位号
Machine: [], // 工位号数组
tableData: [], // 数据
calenderTableHeader: ['1', '2', '3', '4'],
prop: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
}
},
// computed: {
// ...mapGetters([
// 'sidebar',
// 'avatar',
// 'name',
// 'id'
// ])
// },
created() {
// this.searchDatetime()
},
mounted() {
this.fetchData()
this.dateRange = new Date() // 默认显示为当天时间
},
methods: {
// 查询工位信息
fetchData() {
var param = []
var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].工位号,
value: response.data[i].工位号
})
}
})
},
// 查询数据
searchData() {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['年份_check', dateRange_check]
param[1] = ['年份', this.dateRange]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('11', '点检日期季_查询数据', param)
this.ExecDatabase(Data).then(response => {
this.tableData = response.data
console.log(response.data, '季')
})
},
exportExcel() {
if (this.tableData.length !== 0) {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['月份_check', dateRange_check]
param[1] = ['月份', this.dateRange]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('2001', '点检日期季导出_查询数据', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
}
}
// searchDatetime() {
// this.calenderTableHeader = []
// var param = []
// var Data = this.CreateData('11', '点检日期_查询数据_表头', param)
// this.ExecDatabase(Data).then(response => {
// this.calenderTableHeader.push({
// 日期: '日保养项目'
// })
// for (let i = 0; i < response.data[0].日期; i++) {
// this.calenderTableHeader.push({
// 日期: (i + 1).toString()
// })
// }
// this.searchData()
// })
// },
// 设置列宽
// columnWidth(item) {
// let widthStr = ''
// switch (item) {
// case '日保养项目':
// widthStr = '150'
// break
// default:
// widthStr = '80'
// }
// return widthStr
// }
}
}
</script>
<style scoped>
.routineCheckCard{
width: 100%;
height: 840px;
}
.selectStation{
width:160px;
}
.optionDiv1{
float: left
}
.optionDiv2{
float: right; color: #8492a6; font-size: 13px
}
.buttonSeach{
margin-left: 15px;
}
.spanDatetime{
font-size: 13px;
color: black;
}
.textDiv{
margin-top: 7px;
margin-bottom: 7px;
height: 100%;
}
.tableDate{
width: 610px;
}
/deep/ .tableDate{
border: 1px solid black!important;
}
/deep/ .tableDate td{
border: 1px solid black!important;
border-left: 0px!important;
border-top: 0px!important;
}
/deep/ .tableDate th.is-leaf{
border: 1px solid black!important;
border-top: 0px!important;
border-left: 0px!important;
}
</style>

View File

@@ -0,0 +1,201 @@
<template>
<div class="routineCheckDiv">
<el-card class="routineCheckCard">
<div class="textDiv">
<el-select v-model="MachineValue" class="selectStation" filterable clearable size="small" placeholder="选择工位" @change="searchData">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span class="spanDatetime">查询时间</span>
<el-date-picker
v-model="dateRange1"
size="small"
type="year"
align="center"
value-format="yyyy-MM-dd"
format="yyyy"
placeholder="选择年"
@change="searchData"/>
<el-button class="buttonSeach" type="primary" plain size="small" icon="el-icon-search" @click="searchData()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportExcel()">导出</el-button>
</div>
<el-table :data="tableData" class="tableDate" min-height="100px" highlight-current-row border>
<el-table-column label="项次" align="center" type="index" width="50px"/>
<el-table-column label="周保养项目" width="150px" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.周保养项目 }}
</template>
</el-table-column>
<el-table-column v-for="(item,index) of calenderTableHeader" :key="item" :label="item" :prop="prop[index]" width="80px" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row[ 'F' + item] }}</span>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
dateRange1: '', // 日期
MachineValue: '', // 工位号
Machine: [], // 工位号数组
tableData: [], // 数据
calenderTableHeader: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15',
'16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34',
'35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52'],
prop: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
}
},
// computed: {
// ...mapGetters([
// 'sidebar',
// 'avatar',
// 'name',
// 'id'
// ])
// },
created() {
// this.searchDatetime()
},
mounted() {
this.fetchData()
this.dateRange1 = new Date() // 默认显示为当天时间
},
methods: {
// 查询工位信息
fetchData() {
var param = []
var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].工位号,
value: response.data[i].工位号
})
}
})
},
// 查询数据
searchData() {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['年份_check', dateRange_check]
param[1] = ['年份', this.dateRange1]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('11', '点检日期周_查询数据', param)
this.ExecDatabase(Data).then(response => {
this.tableData = response.data
console.log(response.data, '周')
})
},
exportExcel() {
if (this.tableData.length !== 0) {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['月份_check', dateRange_check]
param[1] = ['月份', this.dateRange]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('2001', '点检日期周导出_查询数据', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
}
},
// searchDatetime() {
// this.calenderTableHeader = []
// var param = []
// var Data = this.CreateData('11', '点检日期_查询数据_表头', param)
// this.ExecDatabase(Data).then(response => {
// this.calenderTableHeader.push({
// 日期: '日保养项目'
// })
// for (let i = 0; i < response.data[0].日期; i++) {
// this.calenderTableHeader.push({
// 日期: (i + 1).toString()
// })
// }
// this.searchData()
// })
// },
// 设置列宽
columnWidth(item) {
let widthStr = ''
switch (item) {
case '日保养项目':
widthStr = '150'
break
default:
widthStr = '80'
}
return widthStr
}
}
}
</script>
<style scoped>
.routineCheckCard{
width: 100%;
height: 840px;
}
.selectStation{
width:160px;
}
.optionDiv1{
float: left
}
.optionDiv2{
float: right; color: #8492a6; font-size: 13px
}
.buttonSeach{
margin-left: 15px;
}
.spanDatetime{
font-size: 13px;
color: black;
}
.textDiv{
margin-top: 7px;
margin-bottom: 7px;
height: 100%;
}
.tableDate{
width: 100%;
}
/deep/ .tableDate{
border: 1px solid black!important;
}
/deep/ .tableDate td{
border: 1px solid black!important;
border-left: 0px!important;
border-top: 0px!important;
}
/deep/ .tableDate th.is-leaf{
border: 1px solid black!important;
border-top: 0px!important;
border-left: 0px!important;
}
</style>

View File

@@ -0,0 +1,200 @@
<template>
<div class="routineCheckDiv">
<el-card class="routineCheckCard">
<div class="textDiv">
<el-select v-model="MachineValue" class="selectStation" filterable clearable size="small" placeholder="选择工位" @change="searchData">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span class="spanDatetime">查询时间</span>
<el-date-picker
v-model="dateRange"
size="small"
type="year"
align="center"
value-format="yyyy-MM-dd"
format="yyyy"
placeholder="选择年"
@change="searchData"/>
<el-button class="buttonSeach" type="primary" plain size="small" icon="el-icon-search" @click="searchData()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportExcel()">导出</el-button>
</div>
<el-table :data="tableData" class="tableDate" min-height="100px" highlight-current-row border>
<el-table-column label="项次" align="center" type="index" width="50px"/>
<el-table-column label="年保养项目" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.年保养项目 }}
</template>
</el-table-column>
<el-table-column label="项次" align="center" type="index" width="150px" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.F1 }}</span>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
dateRange: '', // 日期
MachineValue: '', // 工位号
Machine: [], // 工位号数组
tableData: [] // 数据
// calenderTableHeader: ['1', '2', '3', '4'],
// prop: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
}
},
// computed: {
// ...mapGetters([
// 'sidebar',
// 'avatar',
// 'name',
// 'id'
// ])
// },
created() {
// this.searchDatetime()
},
mounted() {
this.fetchData()
this.dateRange = new Date() // 默认显示为当天时间
},
methods: {
// 查询工位信息
fetchData() {
this.Machine = []
var param = []
var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].工位号,
value: response.data[i].工位号
})
}
})
},
// 查询数据
searchData() {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['年份_check', dateRange_check]
param[1] = ['年份', this.dateRange]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('11', '点检日期年_查询数据', param)
this.ExecDatabase(Data).then(response => {
this.tableData = response.data
console.log(response.data, '年')
})
},
exportExcel() {
if (this.tableData.length !== 0) {
let MachineValue_check, dateRange_check
this.MachineValue ? MachineValue_check = 1 : MachineValue_check = 0
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
var param = []
param[0] = ['月份_check', dateRange_check]
param[1] = ['月份', this.dateRange]
param[2] = ['工位号', this.MachineValue]
param[3] = ['工位号_check', MachineValue_check]
var Data = this.CreateData('2001', '点检日期年导出_查询数据', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')
}
}
// searchDatetime() {
// this.calenderTableHeader = []
// var param = []
// var Data = this.CreateData('11', '点检日期_查询数据_表头', param)
// this.ExecDatabase(Data).then(response => {
// this.calenderTableHeader.push({
// 日期: '日保养项目'
// })
// for (let i = 0; i < response.data[0].日期; i++) {
// this.calenderTableHeader.push({
// 日期: (i + 1).toString()
// })
// }
// this.searchData()
// })
// },
// 设置列宽
// columnWidth(item) {
// let widthStr = ''
// switch (item) {
// case '日保养项目':
// widthStr = '150'
// break
// default:
// widthStr = '80'
// }
// return widthStr
// }
}
}
</script>
<style scoped>
.routineCheckCard{
width: 100%;
height: 840px;
}
.selectStation{
width:160px;
}
.optionDiv1{
float: left
}
.optionDiv2{
float: right; color: #8492a6; font-size: 13px
}
.buttonSeach{
margin-left: 15px;
}
.spanDatetime{
font-size: 13px;
color: black;
}
.textDiv{
margin-top: 7px;
margin-bottom: 7px;
height: 100%;
}
.tableDate{
width: 610px;
}
/deep/ .tableDate{
border: 1px solid black!important;
}
/deep/ .tableDate td{
border: 1px solid black!important;
border-left: 0px!important;
border-top: 0px!important;
}
/deep/ .tableDate th.is-leaf{
border: 1px solid black!important;
border-top: 0px!important;
border-left: 0px!important;
}
</style>

View File

@@ -0,0 +1,37 @@
<template>
<div>
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="日点检" name="1"><DayCheck ref="fresh1"/></el-tab-pane>
<el-tab-pane label="周保养" name="2"><WeekCheck ref="fresh3"/></el-tab-pane>
<el-tab-pane label="月保养" name="3"><MoonCheck ref="fresh2"/></el-tab-pane>
<el-tab-pane label="季保养" name="4"><QuarterCheck ref="fresh4"/></el-tab-pane>
<el-tab-pane label="年保养" name="5"><YearCheck ref="fresh5"/></el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import DayCheck from '@/views/EquipmentOperationAnalysis/SpotCheckRecord/DayCheck.vue'
import MoonCheck from '@/views/EquipmentOperationAnalysis/SpotCheckRecord/MoonCheck.vue'
import WeekCheck from '@/views/EquipmentOperationAnalysis/SpotCheckRecord/WeekCheck.vue'
import QuarterCheck from '@/views/EquipmentOperationAnalysis/SpotCheckRecord/QuarterCheck.vue'
import YearCheck from '@/views/EquipmentOperationAnalysis/SpotCheckRecord/YearCheck.vue'
export default {
components: {
'DayCheck': DayCheck,
'MoonCheck': MoonCheck,
'WeekCheck': WeekCheck,
'QuarterCheck': QuarterCheck,
'YearCheck': YearCheck
},
data() {
return {
activeName: '1'
}
},
methods: {}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,294 @@
<template>
<div>
<el-card style="height: 867px">
<el-col :span="6">
<div style="width: 145px;display: inline-block">
<el-input v-model="processFileName" placeholder="请输入文件名称" clearable/>
</div>
<el-button :disabled="loading" type="success" plain icon="el-icon-search" style="margin-left: 10px" @click="searchTable()">查询文件</el-button>
<br>
<el-upload
ref="uploadStandFile"
:on-remove="handleRemove"
:before-upload="beforeAvatarUpload"
:file-list="fileList"
:auto-upload="false"
:action="action"
:data="Data"
:limit="1"
:on-success="stnFileSuccess"
:on-error="stnFileError"
class="upload-demo"
style="margin-top: 10px">
<el-button slot="trigger" plain type="primary" icon="el-icon-thumb">选取工艺文件</el-button>
<el-button style="margin-left: 10px;" plain type="warning" icon="el-icon-upload2" @click="uploadStandFile">上传文件</el-button>
</el-upload>
<div style="margin-top: 10px">
<el-table
v-loading="loading"
:data="tableData"
:header-cell-style="{background:'#F5F5F5'}"
element-loading-text="数据加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.2)"
tooltip-effect="dark"
style="width: 100%"
height="740"
border
highlight-current-row
stripe
size="mini">
<el-table-column
type="index"
width="50"/>
<el-table-column align="left" label="文件名称" min-width="100">
<template slot-scope="scope">
{{ scope.row.fileName + '.' + scope.row.fileType }}
</template>
</el-table-column>
<el-table-column align="center" label="编辑" width="100">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-view" @click="lookFile(scope.row)"/>
<el-button type="text" size="mini" icon="el-icon-download" style="color: #00893d" @click="downLoadFile(scope.row)"/>
<el-button type="text" size="mini" icon="el-icon-delete" style="color: red" @click="deleteFile(scope.row)"/>
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="18">
<span v-if="fileName !== ''" style="font-size: 18px;font-weight: bolder">{{ fileName + '.' + fileType }}</span>
<span v-else style="font-size: 18px;font-weight: bolder">请选择左侧文件进行预览</span>
<div style="height: 814px;border: 1px solid #a1a1a1">
<div v-show="fileContent !== ''">
<el-image v-if="isImageType" :src="fileContentImg" lazy fit="fill"/>
<div v-else-if="isPdfType">
<iframe
:src="fileContentPdf"
width="100%"
height="810px"/>
</div>
<div v-else class="noView">不支持的预览格式</div>
</div>
</div>
</el-col>
</el-card>
</div>
</template>
<script>
import { action } from '@/utils/request'
import $ from 'jquery'
export default {
// props: ['opname'],
data() {
return {
opname: '',
imageType: ['bmp', 'jpg', 'png', 'gif'],
pdfType: ['pdf'],
currentDownLoadUrl: '',
fileName: '',
fileType: '',
fileContent: '',
fileContentImg: null,
fileContentPdf: null,
isImageType: false,
isPdfType: false,
action: action,
fileList: [],
processFileName: '',
opnames: [],
opnameThis: '',
opnameThisName: '',
listOP: [],
loading: false,
tableData: [],
Data: {},
total: 0, // 总条数
pageSize: 50, // 每页显示条数
PageCurrent: 1 // 后台获取页
}
},
computed: {},
mounted() {
// this.opnameThis = this.opname
// this.searchTableOpName()
// this.searchTable()
},
created() {
},
methods: {
// 获取工位号
searchTableOpName() {
var param = []
this.machineInfo_state = {}
var Data = this.CreateData('11', '[AAA临工看板_主看板_查询数据]', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.opnames.push({
label: response.data[i].工位号 + '-' + response.data[i].工位名称,
value: response.data[i].工位号,
id: response.data[i].id
})
if (response.data[i].工位号 === this.opnameThis) {
this.opnameThisName = response.data[i].工位号 + '-' + response.data[i].工位名称
}
}
})
},
// 查询文件列表
searchTable() {
this.loading = true
this.tableData = []
var param = []
param[0] = ['opname', this.opnameThis]
param[1] = ['fileName', this.processFileName]
var Data = this.CreateData('11', 'LG_临工看板_工艺管理_工艺文件查询', param)
this.ExecDatabase(Data).then(response => {
if (response.data.length !== 0) {
this.tableData = response.data
}
this.loading = false
})
},
searchTable1() {
},
// 预览文件
lookFile(row) {
this.fileName = row.fileName
this.fileType = row.fileType.toLowerCase()
this.fileContent = row.fileContent
this.fileContentImg = ''
this.fileContentPdf = ''
if (this.imageType.indexOf(this.fileType) !== -1) {
this.isImageType = true
this.isPdfType = false
this.fileContentImg = 'data:image/png;base64,' + this.fileContent
} else if (this.pdfType.indexOf(this.fileType) !== -1) {
this.isImageType = false
this.isPdfType = true
this.fileContentPdf = this.solvePdfUrl(this.fileContent, this.fileType, this.fileName)
} else {
this.isImageType = false
this.isPdfType = false
}
},
// 处理pdf
solvePdfUrl(content, type, fileName) {
const bstr = atob(content)
let n = bstr.length
const u8arr = new Uint8Array(n)
while (n--) { u8arr[n] = bstr.charCodeAt(n) }
// 确定解析格式可能可以变成img没有深入研究
const blob = new Blob([u8arr], { type: 'application/pdf;chartset=UTF-8' })
return window.URL.createObjectURL(blob)
},
// 下载文件
downLoadFile(row) {
let contentUrl = ''
this.fileName = row.fileName
this.fileType = row.fileType.toLowerCase()
this.fileContent = row.fileContent
this.fileContentImg = ''
this.fileContentPdf = ''
if (this.imageType.indexOf(this.fileType) !== -1) {
this.isImageType = true
this.isPdfType = false
this.fileContentImg = 'data:image/png;base64,' + this.fileContent
contentUrl = 'data:image/png;base64,' + this.fileContent
} else if (this.pdfType.indexOf(this.fileType) !== -1) {
this.isImageType = false
this.isPdfType = true
this.fileContentPdf = this.solvePdfUrl(this.fileContent, this.fileType, this.fileName)
contentUrl = this.fileContentPdf
} else {
this.isImageType = false
this.isPdfType = false
this.$message.warning('不支持的下载格式!')
return
}
var a = document.createElement('a')
a.download = this.fileName + '.' + this.fileType
a.href = contentUrl
$('body').append(a)
a.click()
$(a).remove()
},
// 删除文件
deleteFile(row) {
this.$confirm('是否确认将文件进行删除' + '</div>', '提示', {
distinguishCancelAndClose: true,
center: true,
dangerouslyUseHTMLString: true,
confirmButtonText: '确认',
cancelButtonText: '取消'
}).then(() => {
var param = []
param[0] = ['ID', row.ID]
var Data = this.CreateData('11', 'LG_临工看板_工艺管理_工艺文件删除', param)
this.ExecDatabase(Data).then(response => {
this.$message.success('删除成功!')
this.searchTable()
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消删除!'
})
})
},
/**
* 移除上传文件
*/
handleRemove(file, fileList) {
this.fileList = []
},
/**
* 上传设备文件大小限制
*/
beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 10
if (!isLt2M) {
this.$message.error('上传工艺文档大小不能超过 10MB!')
}
return isLt2M
},
/**
* 上传标准文件
*/
uploadStandFile() {
if (this.$refs.uploadStandFile.uploadFiles.length === 0) {
this.$message.warning('请选择文件进行上传!')
return
}
var param = []
param[0] = ['opName', '']
param[1] = ['fileName', '']
param[2] = ['fileType', '']
param[3] = ['fileContent', null]
this.Data.param = this.CreateData('17', '', param)
this.$refs.uploadStandFile.submit()
},
/**
* 上传标准设备文件成功后
*/
stnFileSuccess(res, file) {
this.$message.success('上传成功!')
this.fileList = []
this.searchTable()
},
stnFileError(err, file, fileList) {
this.$message.success('上传失败,请重新上传!' + err.toString())
this.fileList = []
}
}
}
</script>
<style scoped>
.noView{
font-size: 20px;
text-align: center;
line-height: 800px;
color: #b8b5b5;
}
</style>

View File

@@ -0,0 +1,295 @@
<template>
<div>
<el-card style="height: 867px">
<el-col :span="6">
<div style="width: 145px;display: inline-block">
<el-input v-model="processFileName" placeholder="请输入文件名称" clearable/>
</div>
<el-button :disabled="loading" type="success" plain icon="el-icon-search" style="margin-left: 10px" @click="searchTable()">查询文件</el-button>
<br>
<el-upload
ref="uploadStandFile"
:on-remove="handleRemove"
:before-upload="beforeAvatarUpload"
:file-list="fileList"
:auto-upload="false"
:action="action"
:data="Data"
:limit="1"
:on-success="stnFileSuccess"
:on-error="stnFileError"
accept=".png,.jpg,.jpeg,.pdf,.gif"
class="upload-demo"
style="margin-top: 10px">
<el-button slot="trigger" plain type="primary" icon="el-icon-thumb">选取工艺文件</el-button>
<el-button style="margin-left: 10px;" plain type="warning" icon="el-icon-upload2" @click="uploadStandFile">上传文件</el-button>
</el-upload>
<div style="margin-top: 10px">
<el-table
v-loading="loading"
:data="tableData"
:header-cell-style="{background:'#F5F5F5'}"
element-loading-text="数据加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.2)"
tooltip-effect="dark"
style="width: 100%"
height="740"
border
highlight-current-row
stripe
size="mini">
<el-table-column
type="index"
width="50"/>
<el-table-column align="left" label="文件名称" min-width="100">
<template slot-scope="scope">
{{ scope.row.fileName + '.' + scope.row.fileType }}
</template>
</el-table-column>
<el-table-column align="center" label="编辑" width="100">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-view" @click="lookFile(scope.row)"/>
<el-button type="text" size="mini" icon="el-icon-download" style="color: #00893d" @click="downLoadFile(scope.row)"/>
<el-button type="text" size="mini" icon="el-icon-delete" style="color: red" @click="deleteFile(scope.row)"/>
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="18">
<span v-if="fileName !== ''" style="font-size: 18px;font-weight: bolder">{{ fileName + '.' + fileType }}</span>
<span v-else style="font-size: 18px;font-weight: bolder">请选择左侧文件进行预览</span>
<div style="height: 814px;border: 1px solid #a1a1a1">
<div v-show="fileContent !== ''">
<el-image v-if="isImageType" :src="fileContentImg" lazy fit="fill"/>
<div v-else-if="isPdfType">
<iframe
:src="fileContentPdf"
width="100%"
height="810px"/>
</div>
<div v-else class="noView">不支持的预览格式</div>
</div>
</div>
</el-col>
</el-card>
</div>
</template>
<script>
import { action } from '@/utils/request'
import $ from 'jquery'
export default {
// props: ['opname'],
data() {
return {
opname: '',
imageType: ['bmp', 'jpg', 'png', 'gif'],
pdfType: ['pdf'],
currentDownLoadUrl: '',
fileName: '',
fileType: '',
fileContent: '',
fileContentImg: null,
fileContentPdf: null,
isImageType: false,
isPdfType: false,
action: action,
fileList: [],
processFileName: '',
opnames: [],
opnameThis: '',
opnameThisName: '',
listOP: [],
loading: false,
tableData: [],
Data: {},
total: 0, // 总条数
pageSize: 50, // 每页显示条数
PageCurrent: 1 // 后台获取页
}
},
computed: {},
mounted() {
// this.opnameThis = this.opname
// this.searchTableOpName()
// this.searchTable()
},
created() {
},
methods: {
// 获取工位号
searchTableOpName() {
var param = []
this.machineInfo_state = {}
var Data = this.CreateData('11', '[AAA临工看板_主看板_查询数据]', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.opnames.push({
label: response.data[i].工位号 + '-' + response.data[i].工位名称,
value: response.data[i].工位号,
id: response.data[i].id
})
if (response.data[i].工位号 === this.opnameThis) {
this.opnameThisName = response.data[i].工位号 + '-' + response.data[i].工位名称
}
}
})
},
// 查询文件列表
searchTable() {
this.loading = true
this.tableData = []
var param = []
param[0] = ['opname', this.opnameThis]
param[1] = ['fileName', this.processFileName]
var Data = this.CreateData('11', 'LG_临工看板_工艺管理_工艺文件查询', param)
this.ExecDatabase(Data).then(response => {
if (response.data.length !== 0) {
this.tableData = response.data
}
this.loading = false
})
},
searchTable1() {
},
// 预览文件
lookFile(row) {
this.fileName = row.fileName
this.fileType = row.fileType.toLowerCase()
this.fileContent = row.fileContent
this.fileContentImg = ''
this.fileContentPdf = ''
if (this.imageType.indexOf(this.fileType) !== -1) {
this.isImageType = true
this.isPdfType = false
this.fileContentImg = 'data:image/png;base64,' + this.fileContent
} else if (this.pdfType.indexOf(this.fileType) !== -1) {
this.isImageType = false
this.isPdfType = true
this.fileContentPdf = this.solvePdfUrl(this.fileContent, this.fileType, this.fileName)
} else {
this.isImageType = false
this.isPdfType = false
}
},
// 处理pdf
solvePdfUrl(content, type, fileName) {
const bstr = atob(content)
let n = bstr.length
const u8arr = new Uint8Array(n)
while (n--) { u8arr[n] = bstr.charCodeAt(n) }
// 确定解析格式可能可以变成img没有深入研究
const blob = new Blob([u8arr], { type: 'application/pdf;chartset=UTF-8' })
return window.URL.createObjectURL(blob)
},
// 下载文件
downLoadFile(row) {
let contentUrl = ''
this.fileName = row.fileName
this.fileType = row.fileType.toLowerCase()
this.fileContent = row.fileContent
this.fileContentImg = ''
this.fileContentPdf = ''
if (this.imageType.indexOf(this.fileType) !== -1) {
this.isImageType = true
this.isPdfType = false
this.fileContentImg = 'data:image/png;base64,' + this.fileContent
contentUrl = 'data:image/png;base64,' + this.fileContent
} else if (this.pdfType.indexOf(this.fileType) !== -1) {
this.isImageType = false
this.isPdfType = true
this.fileContentPdf = this.solvePdfUrl(this.fileContent, this.fileType, this.fileName)
contentUrl = this.fileContentPdf
} else {
this.isImageType = false
this.isPdfType = false
this.$message.warning('不支持的下载格式!')
return
}
var a = document.createElement('a')
a.download = this.fileName + '.' + this.fileType
a.href = contentUrl
$('body').append(a)
a.click()
$(a).remove()
},
// 删除文件
deleteFile(row) {
this.$confirm('是否确认将文件进行删除' + '</div>', '提示', {
distinguishCancelAndClose: true,
center: true,
dangerouslyUseHTMLString: true,
confirmButtonText: '确认',
cancelButtonText: '取消'
}).then(() => {
var param = []
param[0] = ['ID', row.ID]
var Data = this.CreateData('11', 'LG_临工看板_工艺管理_工艺文件删除', param)
this.ExecDatabase(Data).then(response => {
this.$message.success('删除成功!')
this.searchTable()
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消删除!'
})
})
},
/**
* 移除上传文件
*/
handleRemove(file, fileList) {
this.fileList = []
},
/**
* 上传设备文件大小限制
*/
beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 10
if (!isLt2M) {
this.$message.error('上传工艺文档大小不能超过 10MB!')
}
return isLt2M
},
/**
* 上传标准文件
*/
uploadStandFile() {
if (this.$refs.uploadStandFile.uploadFiles.length === 0) {
this.$message.warning('请选择文件进行上传!')
return
}
var param = []
param[0] = ['opName', this.opnameThis]
param[1] = ['fileName', '']
param[2] = ['fileType', '']
param[3] = ['fileContent', null]
this.Data.param = this.CreateData('15', 'LG_临工看板_工艺管理_工艺文件上传', param)
this.$refs.uploadStandFile.submit()
},
/**
* 上传标准设备文件成功后
*/
stnFileSuccess(res, file) {
this.$message.success('上传成功!')
this.fileList = []
this.searchTable()
},
stnFileError(err, file, fileList) {
this.$message.success('上传失败,请重新上传!' + err.toString())
this.fileList = []
}
}
}
</script>
<style scoped>
.noView{
font-size: 20px;
text-align: center;
line-height: 800px;
color: #b8b5b5;
}
</style>

View File

@@ -515,7 +515,7 @@ export default {
param[14] = ['批次条码_ischeck', traceabilityCode_check]
param[15] = ['批次条码', this.traceabilityCode]
param[16] = ['合格标志', this.isQualifiedValue]
var Data = this.CreateData('2001', '质量数据查询_综合查询', param)
var Data = this.CreateData('2001', '质量数据查询_综合查询', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -336,7 +336,7 @@ export default {
param[7] = ['工位号', this.stationNumberValue]
param[8] = ['订单号_ischeck', orderNumberValue_check]
param[9] = ['订单号', this.orderNumberValue]
var Data = this.CreateData('2001', '质量数据查询_测量数据发动机在线状态_报表_NEW', param)
var Data = this.CreateData('2001', '质量数据查询_测量数据发动机在线状态_报表_NEW', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -458,7 +458,7 @@ export default {
param[11] = ['二维码', this.traceabilityCode]
param[12] = ['物料条码批次_ischeck', batchBarcodeValue_check]
param[13] = ['物料条码批次', this.batchBarcodeValue]
var Data = this.CreateData('2001', '物料数据分线查询_报表', param)
var Data = this.CreateData('2001', '物料数据分线查询_报表', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -508,7 +508,7 @@ export default {
param[14] = ['批次条码_ischeck', traceabilityCode_check]
param[15] = ['批次条码', this.traceabilityCode]
param[16] = ['合格标志', this.isQualifiedValue]
var Data = this.CreateData('2001', '质量数据分线_导出', param)
var Data = this.CreateData('2001', '质量数据分线_导出', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -462,7 +462,7 @@ export default {
param[11] = ['二维码', this.traceabilityCode]
param[12] = ['物料条码批次_ischeck', batchBarcodeValue_check]
param[13] = ['物料条码批次', this.batchBarcodeValue]
var Data = this.CreateData('2001', '物料数据查询_报表', param)
var Data = this.CreateData('2001', '物料数据查询_报表', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -397,7 +397,7 @@ export default {
param[5] = ['订单号', this.orderNumberValue]
param[6] = ['产品型号_ischeck', engineTypeValue_check]
param[7] = ['产品型号', this.engineTypeValue]
var Data = this.CreateData('2001', 'MES_计划BOM_发动机订单计划_订单完工_报表', param)
var Data = this.CreateData('2001', 'MES_计划BOM_发动机订单计划_订单完工_报表', param)
this.exportExcel_NPOI(Data)
} else {
this.$message.warning('暂无数据')

View File

@@ -42,12 +42,12 @@
{{ scope.row.总成物料号 }}
</template>
</el-table-column>
<el-table-column align="center" label="箱体标志">
<el-table-column align="center" label="规格(大机型)">
<template slot-scope="scope">
{{ scope.row.箱体名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="吨位标志">
<el-table-column align="center" label="型号(小机型)">
<template slot-scope="scope">
{{ scope.row.吨位名称 }}
</template>
@@ -108,7 +108,7 @@
size="small"
placeholder="总成物料号"/>
</el-form-item>
<el-form-item label="箱体标志" prop="boxSign" style="display: inline-block">
<el-form-item label="规格(大机型)" prop="boxSign" style="display: inline-block">
<el-select v-model="form.boxSign" placeholder="请选择" size="small" style="display: inline-block">
<el-option
v-for="item in boxSign"
@@ -118,7 +118,7 @@
size="mini"/>
</el-select>
</el-form-item>
<el-form-item label="吨位标志" prop="tonnageSign" style="display: inline-block">
<el-form-item label="型号(小机型)" prop="tonnageSign" style="display: inline-block">
<el-select v-model="form.tonnageSign" placeholder="请选择" size="small" style="display: inline-block">
<el-option
v-for="item in tonnageSign"
@@ -177,8 +177,8 @@ export default {
rules: { // 创建订单验证
equipmentSign: [{ required: true, message: '请输入', trigger: 'blur' }],
enDisable: [{ required: true, message: '请选择', trigger: 'change' }],
tonnageSign: [{ required: true, message: '请选择', trigger: 'change' }],
boxSign: [{ required: true, message: '请选择', trigger: 'change' }],
// tonnageSign: [{ required: true, message: '请选择', trigger: 'change' }],
// boxSign: [{ required: true, message: '请选择', trigger: 'change' }],
equipmentType: [{ required: true, message: '请输入', trigger: 'blur' }],
formula: [{ required: true, message: '请输入', trigger: 'blur' }]
},

View File

@@ -81,9 +81,11 @@
</el-table-column>
<el-table-column align="center" label="状态">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.订单状态) === 0" effect="plain" style="width: 70px" type="info">已结束</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 1" effect="plain" style="width: 70px" type="success">生产中</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 2" effect="plain" style="width: 70px" type="info">未上线</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 3" effect="plain" style="width: 70px" type="warning">完成</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 2" effect="plain" style="width: 70px" type="text">未上线</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 3" effect="plain" style="width: 70px" type="warning">完成</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 4" effect="plain" style="width: 70px" type="danger">已超额</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="计划开始时间">
@@ -99,19 +101,19 @@
<el-table-column align="center" label="操作" min-width="150">
<template slot-scope="scope">
<el-button
:disabled="parseInt(scope.row.订单状态) !== 0"
:disabled="parseInt(scope.row.订单状态) === 1 || parseInt(scope.row.订单状态) === 3 || parseInt(scope.row.订单状态) === 4"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleEdit(scope.row)">修改</el-button>
<el-button
:disabled="parseInt(scope.row.订单状态) !== 0"
:disabled="parseInt(scope.row.订单状态) !== ''"
size="mini"
type="text"
icon="el-icon-delete"
@click="deleteOrder(scope.row)">删除</el-button>
<el-button
:disabled="parseInt(scope.row.订单状态) !== 2"
:disabled="parseInt(scope.row.订单状态) === 1 || parseInt(scope.row.订单状态) === 3 || parseInt(scope.row.订单状态) === 4"
size="mini"
type="text"
icon="el-icon-success"

View File

@@ -93,9 +93,11 @@
</el-table-column>
<el-table-column align="center" label="状态">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.订单状态) === 0" effect="plain" style="width: 70px" type="info">已结束</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 1" effect="plain" style="width: 70px" type="success">生产中</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 2" effect="plain" style="width: 70px" type="info">未上线</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 3" effect="plain" style="width: 70px" type="warning">完成</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 2" effect="plain" style="width: 70px" type="text">未上线</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 3" effect="plain" style="width: 70px" type="warning">完成</el-tag>
<el-tag v-if="parseInt(scope.row.订单状态) === 3" effect="plain" style="width: 70px" type="danger">已超额</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="计划开始时间">