'打回零件'

This commit is contained in:
liushuai
2018-12-24 15:29:38 +08:00
parent 53262caac4
commit 50d5e90356
4 changed files with 150 additions and 65 deletions

View File

@@ -68,3 +68,14 @@ export function searchTable1(check, entryNameValue, check1, machine, check2, gro
}
})
}
export function processingStatus(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_成组配套加工进度_查询数据',
param: '工艺计划流水号=' + num
}
})
}

View File

@@ -36,7 +36,8 @@
v-loading="listLoading2"
:data="tableData2"
style="width: 100%;max-height: 400px;"
height="400"
size="mini"
height="300"
highlight-current-row
border
@row-click="searchSpareParts">
@@ -97,7 +98,8 @@
v-loading="listLoading"
:data="tableData"
style="width: 100%;max-height: 400px;"
height="400"
size="mini"
height="300"
highlight-current-row
border
@row-click="searchProcedure">
@@ -153,7 +155,8 @@
v-loading="listLoading1"
:data="tableData1"
style="width: 100%;max-height: 400px;"
height="400"
size="mini"
height="300"
highlight-current-row
border>
<el-table-column align="center" label="工序顺序" width="100">
@@ -361,7 +364,6 @@ export default {
this.check3 = 0
}
searchTable(this.entryNameValue, this.machineValue, this.check2, this.GroupNumValue, this.check3, this.PartDrawingNumber, this.pageCurrent, this.pageSize).then(response => {
console.log(response)
this.tableData = response.data.rows
this.total = response.data.total
this.listLoading = false

View File

@@ -91,6 +91,11 @@
{{ scope.row.入库时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="processingStatus(scope.row)">查看加工进度</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
@@ -339,11 +344,49 @@
<el-button type="primary" @click="submitGroup">提交</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible4" title="零件加工进度" center style="min-height: 300px">
<el-table
:data="tableData5"
style="width: 100%;max-height: 400px;"
size="mini"
height="300"
highlight-current-row
border>
<el-table-column align="center" label="工序顺序" width="100">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺名称" width="150">
<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="工艺是否完成" width="130">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.工序状态)===4" type="success" size="small">已完成</el-tag>
<el-tag v-if="parseInt(scope.row.工序状态)===5" type="warning" size="small">报废</el-tag>
<el-tag v-if="parseInt(scope.row.工序状态)!==4 && parseInt(scope.row.工序状态)!==5" type="primary" size="small">未完成</el-tag>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { initProject, searchTable, searchmachine, searchgroup, searchPurchaseTable, searchTable1 } from '@/api/ManufacturingCenter/GroupMatching'
import { initProject, searchTable, searchmachine, searchgroup, searchPurchaseTable, searchTable1, processingStatus } from '@/api/ManufacturingCenter/GroupMatching'
export default {
data() {
return {
@@ -371,6 +414,7 @@ export default {
tableData6: [],
tableData: [],
tableData1: [],
tableData5: [],
state: null,
listLoading1: false,
listLoading2: false,
@@ -382,6 +426,7 @@ export default {
title: '',
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
check: null,
check1: null,
check2: null,
@@ -511,6 +556,17 @@ export default {
}
})
},
processingStatus(row) {
this.dialogFormVisible4 = true
processingStatus(row.工艺计划流水号).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].计划日期 !== '' && response.data[i].计划日期 !== null) {
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
}
}
this.tableData5 = response.data
})
},
empty() {
this.machineToolNumber = ''
this.groupNumber = ''

View File

@@ -100,11 +100,6 @@
{{ 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.零件备注 }}
@@ -135,11 +130,6 @@
{{ 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.备注 }}
@@ -170,11 +160,6 @@
{{ 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.备注 }}
@@ -393,13 +378,13 @@
</el-dialog>
<el-dialog
:visible.sync="dialogFormVisible1"
:row-style="tableRowClassName"
title="基本件打回信息"
center
width="70%"
style="min-height: 400px">
<el-table
:data="tableData9"
:row-class-name="tableRowClassName"
size="mini"
style="width: 97%;max-height: 300px"
height="400"
@@ -432,7 +417,7 @@
</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="组号">
@@ -461,13 +446,13 @@
</el-dialog>
<el-dialog
:visible.sync="dialogFormVisible2"
:row-style="tableRowClassName"
title="外购件和标准件打回信息"
center
width="70%"
style="min-height: 400px">
<el-table
:data="tableData10"
:row-class-name="tableRowClassName"
size="mini"
style="width: 97%;max-height: 300px"
height="400"
@@ -500,7 +485,7 @@
</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="组号">
@@ -615,7 +600,7 @@ export default {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
if (response.data[i].是否确认 === 0) {
this.value += 1
}
}
@@ -626,7 +611,7 @@ export default {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
if (response.data[i].是否确认 === 0) {
this.value1 += 1
}
}
@@ -649,7 +634,7 @@ export default {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
if (response.data[i].是否确认 === 0) {
this.value += 1
}
}
@@ -670,7 +655,7 @@ export default {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
if (response.data[i].是否确认 === 0) {
this.value1 += 1
}
}
@@ -682,52 +667,75 @@ export default {
})
},
Delete(row) {
Delete(row.基本件流水号).then(response => {
this.value = 0
if (response.data[0].result === '1') {
this.$message.success('删除成功')
PartCallbackInformation().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
Delete(row.基本件流水号).then(response => {
this.value = 0
if (response.data[0].result === '1') {
this.$message.success('删除成功')
PartCallbackInformation().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === 0) {
this.value += 1
}
}
if (response.data[i].是否确认 === '0') {
this.value += 1
}
}
this.tableData9 = response.data
})
} else {
this.$message.error('删除失败')
}
this.tableData9 = response.data
})
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
Delete1(row) {
Delete1(row.标准件和外购件流水号).then(response => {
this.value1 = 0
if (response.data[0].result === '1') {
this.$message.success('删除成功')
PartCallbackInformation1().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
Delete1(row.标准件和外购件流水号).then(response => {
this.value1 = 0
if (response.data[0].result === '1') {
this.$message.success('删除成功')
PartCallbackInformation1().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === 0) {
this.value1 += 1
}
}
if (response.data[i].是否确认 === '0') {
this.value1 += 1
}
}
this.tableData10 = response.data
})
} else {
this.$message.error('删除失败')
}
this.tableData10 = response.data
})
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
tableRowClassName({ row }) {
if (row.是否确认 === '0') {
return 'background: #ffff66'
console.log(row.是否确认)
if (row.是否确认 === 0) {
return 'NotThrough'
} else {
return ''
return 'adopt'
}
},
projectChange() {
@@ -1197,3 +1205,11 @@ export default {
margin-right: 40px;
}
</style>
<style>
.el-table .NotThrough{
background: palevioletred;
}
.el-table .adopt{
background: limegreen;
}
</style>