This commit is contained in:
liushuai
2019-12-05 17:24:16 +08:00
7 changed files with 353 additions and 375 deletions

View File

@@ -20,15 +20,14 @@ export function intPartState() {
} }
}) })
} }
export function searchmachine(num, check, pageCurrent, pageSize) { export function searchmachine(num, check) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: 'PDM_机床名称_查询数据', name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '&机床类型代码_check=0=int&机床类型代码=1=int&机床流水号_check=0', param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '&机床类型代码_check=0=int&机床类型代码=1=int&机床流水号_check=0'
Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }
@@ -39,30 +38,19 @@ export function searchgroup(num, pageCurrent, pageSize) {
data: { data: {
type: '1', type: '1',
name: 'PDM_组件名称_查询数据', name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num, param: '机床流水号=' + num
Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }
export function searchTable(check, entryNameValue, check1, machine, check2, groupNum, check3, partNumber, check4, partStateValue, check5, partTypeValue) { export function searchTable(check, entryNameValue, check1, machine, check2, groupNum, check3, partNumber, check4, partStateValue, check5, partTypeValue, pageCurrent, pageSize) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间生产管理工艺_零件工艺计划_查询数据_状态_新_MESWORK', name: '车间生产管理工艺_零件工艺计划_查询数据_状态_新_MESWORK',
param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&零件图号_check=' + check3 + '=int&零件图号=' + partNumber + '=string&考核状态_check=' + check4 + '=int&考核状态=' + partStateValue + '=int&单件是否外协_check=' + check5 + '=int&单件是否外协=' + partTypeValue + '=int' param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&零件图号_check=' + check3 + '=int&零件图号=' + partNumber + '=string&考核状态_check=' + check4 + '=int&考核状态=' + partStateValue + '=int&单件是否外协_check=' + check5 + '=int&单件是否外协=' + partTypeValue + '=int',
} Pagination: pageCurrent + '&' + pageSize
})
}
export function editData(num, state) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_考核状态',
param: '工艺计划流水号=' + num + '=int&考核状态=' + state + '=int'
} }
}) })
} }

View File

@@ -0,0 +1,35 @@
import request from '@/utils/request'
// 获取工位 表1
export function getTableData1() {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: 'SELECT *FROM [基础数据_设备工位点检表]inner join dbo.基础数据_点检类型名称 on [基础数据_设备工位点检表].点检表类型 = 基础数据_点检类型名称.点检表类型流水号'
}
})
}
// 点检类型 表2
export function getTableData2() {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: 'select * from 基础数据_点检类型名称'
}
})
}
// 点检内容 表3
export function getTableData3(num) {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 基础数据_点检内容 where 点检表类型 = ${num}`
}
})
}

View File

@@ -0,0 +1,12 @@
import request from '@/utils/request'
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同信息管理_项目名称_总_查询'
}
})
}

View File

@@ -40,7 +40,8 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="工序状态" show-overflow-tooltip min-width="90"> <el-table-column align="center" label="工序状态" show-overflow-tooltip min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工序状态 === 4 ? '已完成' : '未完成' }} <span v-if="scope.row.工序状态 >= 4">已完成</span>
<span v-else>未完成</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -48,7 +49,7 @@
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-card> <el-card>
<span style="background-color: rgb(126,172,237);font-size: 20px">{{ 机床图号 }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ 机床名称 }}</span> <div style="background-color: rgb(126,172,237);color: white;margin-top: 5px">{{ 机床图号 }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ 机床名称 }}</div>
<div style="margin: 10px 0 0 20px;height: 650px;overflow: auto"> <div style="margin: 10px 0 0 20px;height: 650px;overflow: auto">
<el-tree <el-tree
:data="departmentData" :data="departmentData"
@@ -163,7 +164,7 @@ export default {
firstLevel.children = [] firstLevel.children = []
for (let j = 0; j < response.data.length; j++) { for (let j = 0; j < response.data.length; j++) {
firstLevel.children.push({ firstLevel.children.push({
label: (response.data[j].零件图号 ? response.data[j].零件图号 : '无零件图号') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].规格 ? response.data[j].规格 : '') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].投产总数量 ? response.data[j].投产总数量 : '') + '..........' + (response.data[j].零件名称 ? response.data[j].零件名称 : '无零件名称') + (response.data[j].零件类型 === 1 ? '' : '\xa0\xa0\xa0\xa0\xa0\xa0外购'), label: (response.data[j].零件图号 ? response.data[j].零件图号 : '无零件图号') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].规格 ? response.data[j].规格 : '') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].投产总数量 ? response.data[j].投产总数量 : '') + '..........' + (response.data[j].零件名称 ? response.data[j].零件名称 : '无零件名称') + (response.data[j].零件类型 === 1 ? '' : '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0外购'),
value: response.data[j].工艺计划流水号, value: response.data[j].工艺计划流水号,
考核状态: response.data[j].考核状态, 考核状态: response.data[j].考核状态,
采购状态: response.data[j].采购状态, 采购状态: response.data[j].采购状态,
@@ -223,7 +224,7 @@ export default {
}) })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (row.工序状态 === 4) { if (row.工序状态 >= 4) {
return 'cjzuwcqk_complet' return 'cjzuwcqk_complet'
} }
} }

View File

@@ -2,79 +2,57 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<el-row> <el-row>
<!-- <span>项目名称:</span>--> <el-select v-model="entryNameValue" placeholder="项目名称" style="width:150px;margin: 10px 10px 0px 10px" size="small" clearable filterable @change="SearchMachine">
<el-select
v-model="entryNameValue"
placeholder="项目名称"
style="width:200px;margin: 10px 10px 0px 10px"
size="small"
clearable
filterable
@change="empty">
<el-option <el-option
v-for="item in entryName" v-for="item in entryName"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<!-- <span>机床图号:</span>--> <el-select v-model="machineToolValue" placeholder="机床号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px" @change="searchGroupList">
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" readonly clearable style="width:200px;margin: 10px 10px 0px 10px" @change="empty1"> <el-option
<el-button slot="append" icon="el-icon-search" @click="SearchMachine" /> v-for="item in machineTool"
</el-input> :key="item.value"
<!-- <span>组号:</span>--> :label="item.label"
<el-input v-model="groupNumber" placeholder="组号" size="small" readonly clearable style="width:200px;margin: 10px 10px 0px 10px"> :value="item.value"/>
<el-button slot="append" icon="el-icon-search" @click="searchGroupList" /> </el-select>
</el-input> <el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable style="width: 100px;margin: 10px 10px 0px 10px">
<!-- <span>零件图号:</span>--> <el-option
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width:200px;margin: 10px 10px 0px 10px"/> v-for="item in groupNumber"
<!-- <span>零件状态:</span>--> :key="item.value"
<el-select v-model="partStateValue" placeholder="零件状态" size="small" clearable style="width:200px;margin: 10px 10px 0px 10px"> :label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="partStateValue" placeholder="零件状态" size="small" clearable style="width: 120px;margin: 10px 10px 0px 10px">
<el-option <el-option
v-for="item in partState" v-for="item in partState"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<!--<span>零件类型:</span>--> <el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px"/>
<!--<el-select v-model="partTypeValue" placeholder="零件类型" size="small" clearable style="margin-top: 15px;width: 200px">-->
<!--<el-option-->
<!--v-for="item in partType"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<el-button type="success" icon="el-icon-search" size="small" style="margin: 15px 0 0 10px" @click="pageCurrent=1;pageSize=20;total=0;searchData()">查询</el-button> <el-button type="success" icon="el-icon-search" size="small" style="margin: 15px 0 0 10px" @click="pageCurrent=1;pageSize=20;total=0;searchData()">查询</el-button>
</el-row> </el-row>
<!-- <el-row>-->
<!-- </el-row>-->
</el-card> </el-card>
<el-card> <el-card>
<el-table <el-table v-loading="loading0" :data="tableData" style="width: 100%" height="550" stripe size="mini" border>
v-loading="loading0"
:data="tableData"
style="width: 100%"
height="820"
stripe
size="mini"
highlight-current-row
border>
<el-table-column align="center" label="序号" type="index" width="55px"/> <el-table-column align="center" label="序号" type="index" width="55px"/>
<el-table-column align="center" label="机床图号" width="110px"> <el-table-column align="center" label="机床图号" width="110px">
<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="50px"> <el-table-column align="center" label="组号" width="100px">
<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="100px" show-overflow-tooltip> <el-table-column align="center" label="零件图号" min-width="180px" show-overflow-tooltip>
<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="80px" show-overflow-tooltip> <el-table-column align="center" label="零件名称" min-width="110px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件名称 }} {{ scope.row.零件名称 }}
</template> </template>
@@ -84,12 +62,12 @@
{{ scope.row.批次数量 }} {{ scope.row.批次数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="投产时间" width="80px"> <el-table-column align="center" label="投产时间" width="100px">
<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="零件状态" min-width="400px"> <el-table-column align="center" label="零件状态" width="650px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-steps :active="scope.row.考核状态" finish-status="success" simple> <el-steps :active="scope.row.考核状态" finish-status="success" simple>
<el-step title="投产" /> <el-step title="投产" />
@@ -102,200 +80,49 @@
</el-steps> </el-steps>
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column label="操作" fixed="right" align="center" width="120px">-->
<!--<template slot-scope="scope">-->
<!--<el-button-->
<!--size="mini"-->
<!--type="primary"-->
<!--icon="el-icon-edit"-->
<!--@click="handleEdit(scope.row)">编辑</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table> </el-table>
<!-- <div class="block" style="margin-top: 10px;">--> <div class="block" style="margin-top: 10px;">
<!-- <el-pagination--> <el-pagination
<!-- :current-page="pageCurrent"--> :current-page="pageCurrent"
<!-- :page-sizes="[10, 20, 30, 40, 50]"--> :page-sizes="[10, 20, 30, 40, 50]"
<!-- :page-size="pageSize"--> :page-size="pageSize"
<!-- :total="total"--> :total="total"
<!-- layout="total, sizes, prev, pager, next, jumper"--> layout="total, sizes, prev, pager, next, jumper"
<!-- @size-change="handleSizeChange"--> @size-change="handleSizeChange"
<!-- @current-change="handleCurrentChange"/>--> @current-change="handleCurrentChange"/>
<!-- </div>--> </div>
</el-card> </el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center style="min-height: 300px" width="400px">
<el-form label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="零件状态">
<el-select v-model="partStateValue1" placeholder="零件状态" size="small">
<el-option
v-for="item in partState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel()">取消</el-button>
<el-button type="primary" @click="submitEdit()">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="选择机床" center style="min-height: 300px">
<el-table
:data="tableData6"
style="width:100%;max-height: 300px;display: inline-block"
height="300"
highlight-current-row
border
@row-click="selectMachine">
<el-table-column align="center" label="机床图号">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床名称">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床开始时间">
<template slot-scope="scope">
{{ scope.row.机床开始时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床结束时间">
<template slot-scope="scope">
{{ scope.row.机床结束时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="工位属性">
<template slot-scope="scope">
{{ scope.row.工位属性 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床主管">
<template slot-scope="scope">
{{ scope.row.机床主管 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize1"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitName">提交</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible3" title="选择组号" center style="min-height: 300px">
<el-table
:data="tableData7"
style="width:100%;max-height: 300px;display: inline-block"
height="300"
highlight-current-row
border
@row-click="selectGroup">
<el-table-column align="center" label="机床图号">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床名称">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组件名称">
<template slot-scope="scope">
{{ scope.row.组件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="组件介绍">
<template slot-scope="scope">
{{ scope.row.组件介绍 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize2"
:total="total2"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitGroup">提交</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { initProject, intPartState, searchTable, searchmachine, searchgroup, editData } from '@/api/ManufacturingCenter/StatusQuery' import { initProject, intPartState, searchTable, searchmachine, searchgroup } from '@/api/ManufacturingCenter/StatusQuery'
import elInput from 'element-ui/packages/input'
export default { export default {
components: {
elInput
},
data() { data() {
return { return {
loading0: false, loading0: false,
entryNameValue: '', // 项目流水号 entryNameValue: '', // 项目流水号
entryName: [], // 项目数组 entryName: [], // 项目数组
machineToolNumber: '', // 机床图号 machineToolValue: '', // 机床图号
machineNumber: '', machineTool: [],
machine: null, // 机床流水 groupNumberValue: '', //
groupNumber: '', // 组号 groupNumber: [],
groupNumber1: '',
groupNum: null, // 组件流水号
partNumber: '', // 零件号 partNumber: '', // 零件号
partStateValue: null, // 零件状态 partStateValue: null, // 零件状态
partStateValue1: null, partStateValue1: null,
partState: [], // 零件状态数组 partState: [], // 零件状态数组
partTypeValue: null, // 零件类型 partTypeValue: null, // 零件类型
num: null, num: null,
// pageCurrent: 1, pageCurrent: 1,
// pageSize: 20, pageSize: 20,
pageCurrent1: 1,
pageSize1: 20,
pageCurrent2: 1,
pageSize2: 20,
tableData7: [], tableData7: [],
tableData6: [], tableData6: [],
tableData: [], tableData: [],
state: null, state: null,
// total: null, total: null,
total1: null,
total2: null,
title: '', title: '',
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
List: [], List: [],
check: null,
check1: null,
check2: null,
check3: null,
check4: null,
check5: null,
partType: [{ partType: [{
value: 1, value: 1,
label: '自家生产' label: '自家生产'
@@ -307,7 +134,7 @@ export default {
}, },
created() { created() {
this.fetchData() this.fetchData()
this.getList() this.searchData()
}, },
methods: { methods: {
fetchData() { fetchData() {
@@ -319,51 +146,6 @@ export default {
}) })
} }
}) })
},
searchData() {
if (this.entryNameValue !== null && this.entryNameValue !== '') {
this.check = 1
} else {
this.check = 0
}
if (this.machineToolNumber !== '') {
this.check1 = 1
} else {
this.check1 = 0
}
if (this.groupNumber !== '') {
this.check2 = 1
} else {
this.check2 = 0
}
if (this.partNumber !== '') {
this.check3 = 1
} else {
this.check3 = 0
}
if (this.partStateValue !== null && this.partStateValue !== '') {
this.check4 = 1
} else {
this.check4 = 0
}
if (this.partTypeValue !== null && this.partTypeValue !== '') {
this.check5 = 1
} else {
this.check5 = 0
}
this.loading0 = true
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.partNumber, this.check4, this.partStateValue, this.check5, this.partTypeValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
response.data[i].考核状态 = parseInt(response.data[i].考核状态) - 2
if (response.data[i].传递时间 !== undefined || response.data[i].hasOwnProperty('传递时间')) {
response.data[i].传递时间 = response.data[i].传递时间.split(' ', 2)[0]
}
}
this.loading0 = false
this.tableData = response.data
})
},
getList() { // 初始化项目名称
initProject().then(response => { initProject().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.entryName.push({ this.entryName.push({
@@ -373,109 +155,66 @@ export default {
} }
}) })
}, },
empty() { // 查询机床
this.machineToolNumber = '' SearchMachine() {
this.groupNumber = '' this.machineToolValue = ''
}, this.machineTool = []
SearchMachine() { // 查询机床 this.groupNumberValue = ''
if (this.entryNameValue !== null && this.entryNameValue !== '') { this.groupNumber = []
this.dialogFormVisible2 = true if (this.entryNameValue) {
this.check6 = 1 searchmachine(this.entryNameValue, 1).then(response => {
searchmachine(this.entryNameValue, this.check6, this.pageCurrent1, this.pageSize1).then(response => { for (let i = 0; i < response.data.length; i++) {
for (let i = 0; i < response.data.total; i++) { this.machineTool.push({
if (response.data.rows[i].机床开始时间 !== '') { label: response.data[i].机床图号,
response.data.rows[i].机床开始时间 = response.data.rows[i].机床开始时间.substr(0, 10) value: response.data[i].机床流水号
} })
if (response.data.rows[i].机床结束时间 !== '') {
response.data.rows[i].机床结束时间 = response.data.rows[i].机床结束时间.substr(0, 10)
}
if (response.data.rows[i].工位属性 === '请选择') {
response.data.rows[i].工位属性 = ''
}
if (response.data.rows[i].机床主管 === '请选择') {
response.data.rows[i].机床主管 = ''
}
} }
this.tableData6 = response.data.rows
this.total1 = parseInt(response.data.total)
}) })
} else {
this.$message.warning('请先选择项目')
} }
}, },
selectMachine(row) { // 选择机床 // 查询组
this.machine = row.机床流水号 searchGroupList() {
this.machineNumber = row.机床图号 this.groupNumberValue = ''
}, this.groupNumber = []
submitName() { // 提交机床号 if (this.machineToolValue) {
this.machineToolNumber = this.machineNumber searchgroup(this.machineToolValue).then(response => {
this.dialogFormVisible2 = false for (let i = 0; i < response.data.length; i++) {
}, this.groupNumber.push({
empty1() { label: response.data[i].组号,
this.groupNumber = '' value: response.data[i].组件流水号
}, })
searchGroupList() { // 查询组号 }
if (this.machineToolNumber !== '') {
this.tableData7 = []
this.dialogFormVisible3 = true
searchgroup(this.machine, this.pageCurrent2, this.pageSize2).then(response => {
this.tableData7 = response.data.rows
this.total2 = parseInt(response.data.total)
}) })
} else {
this.$message.warning('请先选择机床')
} }
}, },
selectGroup(row) { // 选择组号 searchData() {
this.groupNumber1 = row.组号 var check, check1, check2, check3, check4, check5
this.groupNum = row.组件流水号 if (this.entryNameValue) { check = 1 } else { check = 0 }
}, if (this.machineToolValue) { check1 = 1 } else { check1 = 0 }
submitGroup() { // 提交组号 if (this.groupNumberValue) { check2 = 1 } else { check2 = 0 }
this.groupNumber = this.groupNumber1 if (this.partNumber) { check3 = 1 } else { check3 = 0 }
this.dialogFormVisible3 = false if (this.partStateValue) { check4 = 1 } else { check4 = 0 }
}, if (this.partTypeValue) { check5 = 1 } else { check5 = 0 }
handleEdit(row) { this.loading0 = true
this.title = '编辑' searchTable(check, this.entryNameValue, check1, this.machineToolValue, check2, this.groupNumberValue, check3, this.partNumber, check4, this.partStateValue, check5, this.partTypeValue, this.pageCurrent, this.pageSize).then(response => {
this.partStateValue1 = parseInt(row.考核状态) + 2 for (let i = 0; i < response.data.rows.length; i++) {
this.dialogFormVisible4 = true response.data.rows[i].考核状态 = parseInt(response.data.rows[i].考核状态) - 2
this.num = row.工艺计划流水号 if (response.data.rows[i].传递时间 !== undefined || response.data.rows[i].hasOwnProperty('传递时间')) {
}, response.data.rows[i].传递时间 = response.data.rows[i].传递时间.split(' ', 2)[0]
submitEdit() { // 提交编辑 }
editData(this.num, this.partStateValue1).then(response => { }
if (response.data[0].result === '1') { this.loading0 = false
this.$message.success('编辑成功') this.total = response.data.total
this.dialogFormVisible4 = false this.tableData = response.data.rows
this.pageCurrent = 1
this.searchData()
} else { this.$message.error('编辑失败') }
}) })
}, },
cancel() { // 取消 handleSizeChange(val) {
this.dialogFormVisible4 = false this.pageSize = val
this.searchData()
}, },
// handleSizeChange(val) { handleCurrentChange(val) {
// this.pageSize = val this.pageCurrent = val
// this.searchData() this.searchData()
// },
// handleCurrentChange(val) {
// this.pageCurrent = val
// this.searchData()
// },
handleSizeChange1(val) {
this.pageSize1 = val
this.SearchMachine()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.SearchMachine()
},
handleSizeChange3(val) {
this.pageSize2 = val
this.searchGroupList()
},
handleCurrentChange3(val) {
this.pageCurrent2 = val
this.searchGroupList()
} }
} }
} }

View File

@@ -0,0 +1,127 @@
<template>
<div class="app-container">
<el-card>
<div>设备对应点检类型维护</div>
<el-table v-loading="loading1" :data="tableData1" height="200" highlight-current-row border>
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column align="center" label="工位号" width="110">
<template slot-scope="scope">
{{ scope.row.工位号 }}
</template>
</el-table-column>
<el-table-column align="center" label="设备名称" min-width="150">
<template slot-scope="scope">
{{ scope.row.设备名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="设备编号" show-overflow-tooltip min-width="200">
<template slot-scope="scope">
{{ scope.row.设备编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="点检表类型" min-width="150">
<template slot-scope="scope">
<el-select v-model="tableData1[scope.$index].点检表类型流水号" filterable size="small" placeholder="点检表类型" style="margin:3px 10px;width: 150px" @change="editType">
<el-option
v-for="item in 点检表类型"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<div>点检类型点检内容维护</div>
<el-col :span="6">
<el-table v-loading="loading2" :data="tableData2" height="300" highlight-current-row border @row-click="getTableData3">
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column align="center" label="点检类型名称" min-width="150">
<template slot-scope="scope">
{{ scope.row.点检表类型名称 }}
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="18">
<el-table v-loading="loading3" :data="tableData3" height="300" highlight-current-row border>
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column align="center" label="保养周期" min-width="110">
<template slot-scope="scope">
<span v-if="scope.row.保养周期 === 1"></span>
<span v-if="scope.row.保养周期 === 7"></span>
<span v-if="scope.row.保养周期 === 30"></span>
<span v-if="scope.row.保养周期 === 90"></span>
<span v-if="scope.row.保养周期 === 365"></span>
</template>
</el-table-column>
<el-table-column align="center" label="保养项目" min-width="250">
<template slot-scope="scope">
{{ scope.row.保养项目 }}
</template>
</el-table-column>
</el-table>
</el-col>
</el-card>
</div>
</template>
<script>
import { getTableData1, getTableData2, getTableData3 } from '@/api/ManufacturingCenter/maintainInformation'
export default {
data() {
return {
点检表类型: [],
tableData1: [],
loading1: false,
tableData2: [],
loading2: false,
tableData3: [],
loading3: false
}
},
created() {
this.getTableData1()
this.getTableData2()
},
methods: {
getTableData1() {
this.loading1 = true
getTableData1().then(response => {
this.tableData1 = response.data
this.loading1 = false
})
},
getTableData2() {
this.点检表类型 = []
this.loading2 = true
getTableData2().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.点检表类型.push({
label: response.data[i].点检表类型名称,
value: response.data[i].点检表类型流水号
})
}
this.tableData2 = response.data
this.loading2 = false
})
},
getTableData3(row) {
this.loading3 = true
getTableData3(row.点检表类型流水号).then(response => {
this.tableData3 = response.data
this.loading3 = false
})
},
editType() {
console.log(1)
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,76 @@
<template>
<div class="app-container">
<el-card v-loading="loading">
<div id="myChart" :style="{width: '100%', height: '570px', margin: 'auto'}"/>
</el-card>
</div>
</template>
<script>
import { initProject } from '@/api/MarketingCenter/ProjectProgress'
import echarts from 'echarts'
export default {
data() {
return {
loading: false
}
},
mounted() {
this.search()
},
methods: {
search() {
this.loading = true
var myChart = echarts.init(document.getElementById('myChart'))
myChart.clear()
initProject().then(response => {
this.loading = false
this.drawLine(response.data)
})
},
drawLine(data) {
this.dataX = []
for (let i = 0; i < data.length; i++) {
this.dataX.push(data[i].项目名称)
}
var myChart = echarts.init(document.getElementById('myChart'))
myChart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
dataZoom: { // 实现缩放功能
show: true,
realtime: true,
start: 0,
end: 100
},
xAxis: {
type: 'category',
name: '项目名称',
data: this.dataX,
axisLabel: {
interval: 0,
rotate: 0,
margin: 10
}
},
yAxis: {
type: 'value',
name: '工时',
min: 0,
scale: 'true'
}
})
this.loading = false
}
}
}
</script>
<style>
</style>