This commit is contained in:
liushuai
2019-08-03 17:40:04 +08:00
5 changed files with 420 additions and 36 deletions

View File

@@ -0,0 +1,12 @@
import request from '@/utils/request'
// 初始化机床项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}

View File

@@ -47,6 +47,26 @@
{{ 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="调试开始时间" 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" width="460px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.装配状态===null || scope.row.装配状态===0" type="success" size="small" @click="handlestart_1(scope.row)">开始装配</el-button>
@@ -66,34 +86,44 @@
<el-card>
<h3 style="text-align: center;">部装</h3>
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
<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="组号" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="组件名称" align="center">
<el-table-column label="任务名称" align="center">
<template slot-scope="scope">
{{ scope.row.组件名称 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<el-table-column label="计划工时" align="center">
<template slot-scope="scope">
{{ scope.row.数量 }}
{{ scope.row.计划工时 }}
</template>
</el-table-column>
<el-table-column label="实际工时" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.实际工时" size="mini"/>
</template>
</el-table-column>
<el-table-column label="修补工时" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.修补工时" size="mini"/>
</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">
<el-input v-model="scope.row.备注" size="mini"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">

View File

@@ -0,0 +1,156 @@
<template>
<div class="app-container">
<el-card>
<div slot="header" class="clearfix">
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable()">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
</div>
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
<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="机床数量" align="center">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h3 style="margin: 0;text-align: center;">工作计划</h3>
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
<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="实际工时" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.实际工时" size="mini"/>
</template>
</el-table-column>
<el-table-column label="修补工时" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.修补工时" size="mini"/>
</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">
<el-input v-model="scope.row.备注" size="mini"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.buttonStatus === 1" type="success" size="small" @click="handlestart_3(scope.row)">开始工作</el-button>
<el-button v-if="scope.row.buttonStatus === 2" type="danger" size="small" @click="handleend_3(scope.row)">结束工作</el-button>
<el-button v-if="scope.row.buttonStatus === 3" type="info" size="small" >装配完成</el-button>
<el-button v-if="scope.row.buttonStatus === 2" plain size="small" @click="handleCancelStart_3(scope.row)">取消开始工作</el-button>
<el-button v-if="scope.row.buttonStatus === 3" plain size="small" @click="handleCancelEnd_3(scope.row)">取消结束工作</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { initProject } from '@/api/Assembly/PlanExecution'
export default {
name: 'ColdWorkPlanExecution',
data() {
return {
machineNumberValue: '',
machineNumber: [],
tableData1: [],
tableData2: []
}
},
mounted() {
this.initProject()
},
methods: {
// 初始化项目机床
initProject() {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
},
// 查询
searchTable() {
this.searchTable1()
this.searchTable2()
},
// 查表1
searchTable1() {},
// 查表2
searchTable2() {},
// 开始工作
handlestart_3(row) {
console.log(row)
},
// 结束工作
handleend_3(row) {
console.log(row)
},
// 取消开始工作
handleCancelStart_3(row) {
console.log(row)
},
// 取消结束工作
handleCancelEnd_3(row) {
console.log(row)
}
}
}
</script>
<style scoped>
</style>

View File

@@ -47,6 +47,26 @@
{{ 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="调试开始时间" 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" width="460px" fixed="right">-->
<!--<template slot-scope="scope">-->
<!--<el-button v-if="scope.row.装配状态===null || scope.row.装配状态===0" type="success" size="small" @click="handlestart_1(scope.row)">开始装配</el-button>-->
@@ -66,34 +86,44 @@
<el-card>
<h3 style="text-align: center;">部装</h3>
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
<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="组号" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="组件名称" align="center">
<el-table-column label="任务名称" align="center">
<template slot-scope="scope">
{{ scope.row.组件名称 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<el-table-column label="计划工时" align="center">
<template slot-scope="scope">
{{ scope.row.数量 }}
{{ scope.row.计划工时 }}
</template>
</el-table-column>
<el-table-column label="实际工时" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.实际工时" size="mini"/>
</template>
</el-table-column>
<el-table-column label="修补工时" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.修补工时" size="mini"/>
</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">
<el-input v-model="scope.row.备注" size="mini"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">

View File

@@ -0,0 +1,156 @@
<template>
<div class="app-container">
<el-card>
<div slot="header" class="clearfix">
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable()">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
</div>
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
<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="机床数量" align="center">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h3 style="margin: 0;text-align: center;">工作计划</h3>
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="380px">
<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="实际工时" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.实际工时" size="mini"/>
</template>
</el-table-column>
<el-table-column label="修补工时" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.修补工时" size="mini"/>
</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">
<el-input v-model="scope.row.备注" size="mini"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.buttonStatus === 1" type="success" size="small" @click="handlestart_3(scope.row)">开始工作</el-button>
<el-button v-if="scope.row.buttonStatus === 2" type="danger" size="small" @click="handleend_3(scope.row)">结束工作</el-button>
<el-button v-if="scope.row.buttonStatus === 3" type="info" size="small" >装配完成</el-button>
<el-button v-if="scope.row.buttonStatus === 2" plain size="small" @click="handleCancelStart_3(scope.row)">取消开始工作</el-button>
<el-button v-if="scope.row.buttonStatus === 3" plain size="small" @click="handleCancelEnd_3(scope.row)">取消结束工作</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { initProject } from '@/api/Assembly/PlanExecution'
export default {
name: 'PaintPlanExecution',
data() {
return {
machineNumberValue: '',
machineNumber: [],
tableData1: [],
tableData2: []
}
},
mounted() {
this.initProject()
},
methods: {
// 初始化项目机床
initProject() {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
},
// 查询
searchTable() {
this.searchTable1()
this.searchTable2()
},
// 查表1
searchTable1() {},
// 查表2
searchTable2() {},
// 开始工作
handlestart_3(row) {
console.log(row)
},
// 结束工作
handleend_3(row) {
console.log(row)
},
// 取消开始工作
handleCancelStart_3(row) {
console.log(row)
},
// 取消结束工作
handleCancelEnd_3(row) {
console.log(row)
}
}
}
</script>
<style scoped>
</style>