装配退回
This commit is contained in:
@@ -47,14 +47,18 @@
|
||||
{{ scope.row.机床数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||
<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>
|
||||
<el-button v-else-if="scope.row.装配状态===1" type="danger" size="small" @click="handleend_1(scope.row)">结束装配</el-button>
|
||||
<el-button v-else type="info" size="small" >装配完成</el-button>
|
||||
<el-button v-if="scope.row.装配状态===1" type="danger" size="small" @click="handleend_1(scope.row)">结束装配</el-button>
|
||||
<el-button v-if="scope.row.装配状态===2" type="info" size="small" >装配完成</el-button>
|
||||
<el-button v-if="scope.row.装配状态===1" plain size="small" @click="handleCancelStart_1(scope.row)">取消开始装配</el-button>
|
||||
<el-button v-if="scope.row.装配状态===2" plain size="small" @click="handleCancelEnd_1(scope.row)">取消结束装配</el-button>
|
||||
<el-button v-if="scope.row.调试状态===null || scope.row.调试状态===0" type="success" size="small" @click="handlestart_2(scope.row)">开始调试</el-button>
|
||||
<el-button v-else-if="scope.row.调试状态==1" type="danger" size="small" @click="handleend_2(scope.row)">结束调试</el-button>
|
||||
<el-button v-else type="info" size="small" >调试完成</el-button>
|
||||
<el-button v-if="scope.row.调试状态===1" type="danger" size="small" @click="handleend_2(scope.row)">结束调试</el-button>
|
||||
<el-button v-if="scope.row.调试状态===2" type="info" size="small" >调试完成</el-button>
|
||||
<el-button v-if="scope.row.调试状态===1" plain size="small" @click="handleCancelStart_2(scope.row)">取消开始调试</el-button>
|
||||
<el-button v-if="scope.row.调试状态===2" plain size="small" @click="handleCancelEnd_2(scope.row)">取消结束调试</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -95,8 +99,10 @@
|
||||
<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-else-if="scope.row.buttonStatus === 2" type="danger" size="small" @click="handleend_3(scope.row)">结束装配</el-button>
|
||||
<el-button v-else type="info" size="small" >装配完成</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>
|
||||
@@ -125,6 +131,50 @@ export default {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
// 取消开始总装
|
||||
handleCancelStart_1(row) {
|
||||
MachineToolStateUpdate(row.机床流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束总装
|
||||
handleCancelEnd_1(row) {
|
||||
MachineToolStateUpdate(row.机床流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消开始调试
|
||||
handleCancelStart_2(row) {
|
||||
DebugStatusUpdate(row.机床流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束调试
|
||||
handleCancelEnd_2(row) {
|
||||
DebugStatusUpdate(row.机床流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消开始部装
|
||||
handleCancelStart_3(row) {
|
||||
ComponentStateUpdate(row.组件流水号, 3).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 1
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 取消结束部装
|
||||
handleCancelEnd_3(row) {
|
||||
ComponentStateUpdate(row.组件流水号, 4).then(response => {
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
})
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -153,7 +203,6 @@ export default {
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||
this.tableData1 = response.data
|
||||
console.log(response.data, 1111)
|
||||
})
|
||||
},
|
||||
searchTable2() {
|
||||
@@ -161,7 +210,6 @@ export default {
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
searchTable2(this.machineNumberValue, this.check2).then(response => {
|
||||
console.log(response.data, 222)
|
||||
this.tableData2 = response.data
|
||||
this.tableData2.map(v => {
|
||||
if (v.组件是否完成 === null || v.组件是否完成 === 0) {
|
||||
@@ -177,45 +225,35 @@ export default {
|
||||
},
|
||||
// 总装开始装配
|
||||
handlestart_1(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
MachineToolStateUpdate(row.机床流水号, 1).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束装配
|
||||
handleend_1(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
MachineToolStateUpdate(row.机床流水号, 2).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装开始调试
|
||||
handlestart_2(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
DebugStatusUpdate(row.机床流水号, 1).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 总装结束调试
|
||||
handleend_2(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
DebugStatusUpdate(row.机床流水号, 2).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
})
|
||||
},
|
||||
// 部装开始装配
|
||||
handlestart_3(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
ComponentStateUpdate(row.组件流水号, 1).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 2
|
||||
// this.searchTable2()
|
||||
@@ -223,9 +261,7 @@ export default {
|
||||
},
|
||||
// 部装结束装配
|
||||
handleend_3(row) { // 弹出单据编辑
|
||||
console.log(row)
|
||||
ComponentStateUpdate(row.组件流水号, 2).then(response => {
|
||||
console.log(response.data)
|
||||
this.searchTable1()
|
||||
row.buttonStatus = 3
|
||||
// this.searchTable2()
|
||||
|
||||
Reference in New Issue
Block a user