计划执行

This commit is contained in:
chenjianan
2019-08-03 17:45:05 +08:00
parent 64ed7cdc03
commit 3c7e50ab56
4 changed files with 180 additions and 75 deletions

View File

@@ -34,18 +34,18 @@ export function searchTable1(machineNumberValue, check2) {
} }
}) })
} }
// 组件查询 // // 组件查询
export function searchTable2(machineNumberValue, check2, groupNumberValue, check3) { // export function searchTable2(machineNumberValue, check2, groupNumberValue, check3) {
return request({ // return request({
url: '', // url: '',
method: 'post', // method: 'post',
data: { // data: {
type: '1', // type: '1',
name: '车间管理_基本件采购_查询数据', // name: '车间管理_基本件采购_查询数据',
param: '机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue + '&组件流水号_check=' + check3 + '&组件流水号=' + groupNumberValue // param: '机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue + '&组件流水号_check=' + check3 + '&组件流水号=' + groupNumberValue
} // }
}) // })
} // }
// 机床名称_机床状态_修改数据 // 机床名称_机床状态_修改数据
export function MachineToolStateUpdate(machineNumberValue, check) { export function MachineToolStateUpdate(machineNumberValue, check) {
return request({ return request({
@@ -73,15 +73,39 @@ export function DebugStatusUpdate(machineNumberValue, check) {
} }
// 组件名称_组件状态_修改数据 // 组件名称_组件状态_修改数据
export function ComponentStateUpdate(machineNumberValue, check) { export function ComponentStateUpdate() {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: 'PDM_组件名称_组件状态_修改数据', name: '车间管理_工作计划_执行计划',
param: '组件流水号=' + machineNumberValue + '&组件是否完成=' + check param: '计划流水号=' + arguments[0] + '&是否工作=' + arguments[1]
}
})
}
// 车间管理_工作计划_查询
// 2019/8/3 16:40:23
export function searchTable2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间管理_工作计划_查询',
param: '机床流水号=' + arguments[0] + '&计划类型=' + arguments[1]
}
})
}
// 车间管理_工作计划_执行计划_编辑
export function submitTable2() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_工作计划_执行计划_编辑',
param: '备注=' + arguments[0] + '&计划流水号=' + arguments[1] + '&实际工时=' + arguments[2] + '&修补工时=' + arguments[3]
} }
}) })
} }

View File

@@ -35,26 +35,26 @@ export function searchTable1(machineNumberValue, check2) {
}) })
} }
// 组件查询 // 组件查询
export function searchTable2(machineNumberValue, check2, groupNumberValue, check3) { export function searchTable2() {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间管理_基本件采购_查询数据_电气', name: '车间管理_工作计划_查询',
param: '机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue + '&组件流水号_check=' + check3 + '&组件流水号=' + groupNumberValue param: '机床流水号=' + arguments[0] + '&计划类型=' + arguments[1]
} }
}) })
} }
// 机床名称_机床状态_修改数据 // 机床名称_机床状态_修改数据
export function MachineToolStateUpdate(machineNumberValue, check) { export function MachineToolStateUpdate() {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '2',
name: 'PDM_机床名称_机床状态_修改数据', name: 'PDM_机床名称_电气状态_修改数据',
param: '机床流水号=' + machineNumberValue + '&装配状态=' + check param: '机床流水号=' + arguments[0] + '&电气装配状态=' + arguments[1]
} }
}) })
} }
@@ -66,22 +66,33 @@ export function DebugStatusUpdate(machineNumberValue, check) {
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: 'PDM_机床名称_调试状态_修改数据', name: 'PDM_机床名称_电气调试状态_修改数据',
param: '机床流水号=' + machineNumberValue + '&调试状态=' + check param: '机床流水号=' + arguments[0] + '&电气调试状态=' + arguments[1]
} }
}) })
} }
// 组件名称_组件状态_修改数据 // 组件名称_组件状态_修改数据
export function ComponentStateUpdate(machineNumberValue, check) { export function ComponentStateUpdate() {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: 'PDM_组件名称_组件状态_修改数据', name: '车间管理_工作计划_执行计划',
param: '组件流水号=' + machineNumberValue + '&组件是否完成=' + check param: '计划流水号=' + arguments[0] + '&是否工作=' + arguments[1]
}
})
}
// 车间管理_工作计划_执行计划_编辑
export function submitTable2() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_工作计划_执行计划_编辑',
param: '备注=' + arguments[0] + '&计划流水号=' + arguments[1] + '&实际工时=' + arguments[2] + '&修补工时=' + arguments[3]
} }
}) })
} }

View File

@@ -49,12 +49,12 @@
</el-table-column> </el-table-column>
<el-table-column label="装配开始时间" align="center"> <el-table-column label="装配开始时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.装配开始时间 }} {{ scope.row.机床装配开始时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="装配结束时间" align="center"> <el-table-column label="装配结束时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.装配结束时间 }} {{ scope.row.机床装配实际完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="调试开始时间" align="center"> <el-table-column label="调试开始时间" align="center">
@@ -93,7 +93,7 @@
</el-table-column> </el-table-column>
<el-table-column label="任务名称" align="center"> <el-table-column label="任务名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组件名称 }} {{ scope.row.任务名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划工时" align="center"> <el-table-column label="计划工时" align="center">
@@ -103,12 +103,14 @@
</el-table-column> </el-table-column>
<el-table-column label="实际工时" align="center"> <el-table-column label="实际工时" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.实际工时" size="mini"/> <el-input v-if="scope.row.isEditing" v-model="scope.row.实际工时" size="mini"/>
<span v-if="!scope.row.isEditing">{{ scope.row.实际工时 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="修补工时" align="center"> <el-table-column label="修补工时" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.修补工时" size="mini"/> <el-input v-if="scope.row.isEditing" v-model="scope.row.修补工时" size="mini"/>
<span v-if="!scope.row.isEditing">{{ scope.row.修补工时 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始时间" align="center"> <el-table-column label="开始时间" align="center">
@@ -123,11 +125,15 @@
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.备注" size="mini"/> <el-input v-if="scope.row.isEditing" v-model="scope.row.备注" size="mini"/>
<span v-if="!scope.row.isEditing">{{ scope.row.备注 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right"> <el-table-column label="操作" align="center" width="300px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="!scope.row.isEditing" type="primary" size="small" @click="editTable2(scope.row)">编辑</el-button>
<el-button v-if="scope.row.isEditing" type="primary" size="small" @click="submitTable2(scope.row)">确定</el-button>
<el-button v-if="scope.row.isEditing" size="small" @click="cancelTable2(scope.row)">取消</el-button>
<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 === 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 === 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 === 3" type="info" size="small" >装配完成</el-button>
@@ -141,7 +147,7 @@
</template> </template>
<script> <script>
import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate } from '@/api/Assembly/AssemblyExecution' import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate, submitTable2 } from '@/api/Assembly/AssemblyExecution'
// import { mapGetters } from 'vuex' // import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
@@ -161,6 +167,31 @@ export default {
this.initProject() this.initProject()
}, },
methods: { methods: {
submitTable2(row) {
submitTable2(row.备注, row.计划流水号, row.实际工时, row.修补工时).then(res => {
if (res.data[0].result === '1') {
this.$message.success('编辑成功')
row.isEditing = !row.isEditing
} else {
this.$message.error('编辑失败')
}
})
console.log(row)
},
cancelTable2(row) {
row.isEditing = !row.isEditing
row.实际工时 = row.原实际工时
row.修补工时 = row.原修补工时
row.备注 = row.原备注
console.log(row)
},
editTable2(row) {
row.isEditing = !row.isEditing
row.原实际工时 = row.实际工时
row.原修补工时 = row.修补工时
row.原备注 = row.备注
console.log(row)
},
// 取消开始总装 // 取消开始总装
handleCancelStart_1(row) { handleCancelStart_1(row) {
MachineToolStateUpdate(row.机床流水号, 3).then(response => { MachineToolStateUpdate(row.机床流水号, 3).then(response => {
@@ -191,7 +222,7 @@ export default {
}, },
// 取消开始部装 // 取消开始部装
handleCancelStart_3(row) { handleCancelStart_3(row) {
ComponentStateUpdate(row.组件流水号, 3).then(response => { ComponentStateUpdate(row.计划流水号, 3).then(response => {
this.searchTable1() this.searchTable1()
row.buttonStatus = 1 row.buttonStatus = 1
// this.searchTable2() // this.searchTable2()
@@ -199,7 +230,7 @@ export default {
}, },
// 取消结束部装 // 取消结束部装
handleCancelEnd_3(row) { handleCancelEnd_3(row) {
ComponentStateUpdate(row.组件流水号, 4).then(response => { ComponentStateUpdate(row.计划流水号, 4).then(response => {
this.searchTable1() this.searchTable1()
row.buttonStatus = 2 row.buttonStatus = 2
// this.searchTable2() // this.searchTable2()
@@ -246,13 +277,17 @@ export default {
this.tableData2 = [] this.tableData2 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
this.check2 = 1 this.check2 = 1
searchTable2(this.machineNumberValue, this.check2).then(response => { searchTable2(this.machineNumberValue, 1).then(response => {
console.log(response.data, 111) console.log(response.data, 111)
this.tableData2 = response.data this.tableData2 = response.data
this.tableData2.map(v => { this.tableData2.map(v => {
if (v.组件是否完成 === null || v.组件是否完成 === 0) { this.$set(v, 'isEditing', false)
this.$set(v, '原实际工时', '')
this.$set(v, '原修补工时', '')
this.$set(v, '原备注', '')
if (v.是否工作 === null || v.是否工作 === 0) {
this.$set(v, 'buttonStatus', 1) this.$set(v, 'buttonStatus', 1)
} else if (v.组件是否完成 === 1) { } else if (v.是否工作 === 1) {
this.$set(v, 'buttonStatus', 2) this.$set(v, 'buttonStatus', 2)
} else { } else {
this.$set(v, 'buttonStatus', 3) this.$set(v, 'buttonStatus', 3)
@@ -292,7 +327,7 @@ export default {
}, },
// 部装开始装配 // 部装开始装配
handlestart_3(row) { // 弹出单据编辑 handlestart_3(row) { // 弹出单据编辑
ComponentStateUpdate(row.组件流水号, 1).then(response => { ComponentStateUpdate(row.计划流水号, 1).then(response => {
this.searchTable1() this.searchTable1()
row.buttonStatus = 2 row.buttonStatus = 2
// this.searchTable2() // this.searchTable2()
@@ -300,7 +335,7 @@ export default {
}, },
// 部装结束装配 // 部装结束装配
handleend_3(row) { // 弹出单据编辑 handleend_3(row) { // 弹出单据编辑
ComponentStateUpdate(row.组件流水号, 2).then(response => { ComponentStateUpdate(row.计划流水号, 2).then(response => {
this.searchTable1() this.searchTable1()
row.buttonStatus = 3 row.buttonStatus = 3
// this.searchTable2() // this.searchTable2()

View File

@@ -49,38 +49,38 @@
</el-table-column> </el-table-column>
<el-table-column label="装配开始时间" align="center"> <el-table-column label="装配开始时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.装配开始时间 }} {{ scope.row.电气开始装配时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="装配结束时间" align="center"> <el-table-column label="装配结束时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.装配结束时间 }} {{ scope.row.电气结束装配时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="调试开始时间" align="center"> <el-table-column label="调试开始时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.调试开始时间 }} {{ scope.row.电气开始调试时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="调试结束时间" align="center"> <el-table-column label="调试结束时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.调试结束时间 }} {{ 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>
<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-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> </template>
</el-table-column> </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>-->
<!--<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-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> </el-table>
</el-card> </el-card>
<el-card> <el-card>
@@ -93,7 +93,7 @@
</el-table-column> </el-table-column>
<el-table-column label="任务名称" align="center"> <el-table-column label="任务名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组件名称 }} {{ scope.row.任务名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划工时" align="center"> <el-table-column label="计划工时" align="center">
@@ -103,12 +103,14 @@
</el-table-column> </el-table-column>
<el-table-column label="实际工时" align="center"> <el-table-column label="实际工时" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.实际工时" size="mini"/> <el-input v-if="scope.row.isEditing" v-model="scope.row.实际工时" size="mini"/>
<span v-if="!scope.row.isEditing">{{ scope.row.实际工时 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="修补工时" align="center"> <el-table-column label="修补工时" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.修补工时" size="mini"/> <el-input v-if="scope.row.isEditing" v-model="scope.row.修补工时" size="mini"/>
<span v-if="!scope.row.isEditing">{{ scope.row.修补工时 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始时间" align="center"> <el-table-column label="开始时间" align="center">
@@ -123,11 +125,15 @@
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.备注" size="mini"/> <el-input v-if="scope.row.isEditing" v-model="scope.row.备注" size="mini"/>
<span v-if="!scope.row.isEditing">{{ scope.row.备注 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right"> <el-table-column label="操作" align="center" width="300px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="!scope.row.isEditing" type="primary" size="small" @click="editTable2(scope.row)">编辑</el-button>
<el-button v-if="scope.row.isEditing" type="primary" size="small" @click="submitTable2(scope.row)">确定</el-button>
<el-button v-if="scope.row.isEditing" size="small" @click="cancelTable2(scope.row)">取消</el-button>
<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 === 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 === 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 === 3" type="info" size="small" >装配完成</el-button>
@@ -140,7 +146,7 @@
</div> </div>
</template> </template>
<script>import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate } from '@/api/Assembly/ElectricalAssembly' <script>import { initProject, searchgroup, searchTable1, searchTable2, MachineToolStateUpdate, DebugStatusUpdate, ComponentStateUpdate, submitTable2 } from '@/api/Assembly/ElectricalAssembly'
// import { mapGetters } from 'vuex' // import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
@@ -159,6 +165,31 @@ export default {
this.initProject() this.initProject()
}, },
methods: { methods: {
submitTable2(row) {
submitTable2(row.备注, row.计划流水号, row.实际工时, row.修补工时).then(res => {
if (res.data[0].result === '1') {
this.$message.success('编辑成功')
row.isEditing = !row.isEditing
} else {
this.$message.error('编辑失败')
}
})
console.log(row)
},
cancelTable2(row) {
row.isEditing = !row.isEditing
row.实际工时 = row.原实际工时
row.修补工时 = row.原修补工时
row.备注 = row.原备注
console.log(row)
},
editTable2(row) {
row.isEditing = !row.isEditing
row.原实际工时 = row.实际工时
row.原修补工时 = row.修补工时
row.原备注 = row.备注
console.log(row)
},
// 取消开始总装 // 取消开始总装
handleCancelStart_1(row) { handleCancelStart_1(row) {
MachineToolStateUpdate(row.机床流水号, 3).then(response => { MachineToolStateUpdate(row.机床流水号, 3).then(response => {
@@ -189,7 +220,7 @@ export default {
}, },
// 取消开始部装 // 取消开始部装
handleCancelStart_3(row) { handleCancelStart_3(row) {
ComponentStateUpdate(row.组件流水号, 3).then(response => { ComponentStateUpdate(row.计划流水号, 3).then(response => {
this.searchTable1() this.searchTable1()
row.buttonStatus = 1 row.buttonStatus = 1
// this.searchTable2() // this.searchTable2()
@@ -197,7 +228,7 @@ export default {
}, },
// 取消结束部装 // 取消结束部装
handleCancelEnd_3(row) { handleCancelEnd_3(row) {
ComponentStateUpdate(row.组件流水号, 4).then(response => { ComponentStateUpdate(row.计划流水号, 4).then(response => {
this.searchTable1() this.searchTable1()
row.buttonStatus = 2 row.buttonStatus = 2
// this.searchTable2() // this.searchTable2()
@@ -244,13 +275,17 @@ export default {
this.tableData2 = [] this.tableData2 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { if (this.machineNumberValue !== '' && this.machineNumberValue !== null) {
this.check2 = 1 this.check2 = 1
searchTable2(this.machineNumberValue, this.check2).then(response => { searchTable2(this.machineNumberValue, 2).then(response => {
console.log(response.data, 111) console.log(response.data, 111)
this.tableData2 = response.data this.tableData2 = response.data
this.tableData2.map(v => { this.tableData2.map(v => {
if (v.组件是否完成 === null || v.组件是否完成 === 0) { this.$set(v, 'isEditing', false)
this.$set(v, '原实际工时', '')
this.$set(v, '原修补工时', '')
this.$set(v, '原备注', '')
if (v.是否工作 === null || v.是否工作 === 0) {
this.$set(v, 'buttonStatus', 1) this.$set(v, 'buttonStatus', 1)
} else if (v.组件是否完成 === 1) { } else if (v.是否工作 === 1) {
this.$set(v, 'buttonStatus', 2) this.$set(v, 'buttonStatus', 2)
} else { } else {
this.$set(v, 'buttonStatus', 3) this.$set(v, 'buttonStatus', 3)
@@ -290,7 +325,7 @@ export default {
}, },
// 部装开始装配 // 部装开始装配
handlestart_3(row) { // 弹出单据编辑 handlestart_3(row) { // 弹出单据编辑
ComponentStateUpdate(row.组件流水号, 1).then(response => { ComponentStateUpdate(row.计划流水号, 1).then(response => {
this.searchTable1() this.searchTable1()
row.buttonStatus = 2 row.buttonStatus = 2
// this.searchTable2() // this.searchTable2()
@@ -298,7 +333,7 @@ export default {
}, },
// 部装结束装配 // 部装结束装配
handleend_3(row) { // 弹出单据编辑 handleend_3(row) { // 弹出单据编辑
ComponentStateUpdate(row.组件流水号, 2).then(response => { ComponentStateUpdate(row.计划流水号, 2).then(response => {
this.searchTable1() this.searchTable1()
row.buttonStatus = 3 row.buttonStatus = 3
// this.searchTable2() // this.searchTable2()