Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -1,7 +1,4 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
// import { Message, MessageBox } from 'element-ui'
|
|
||||||
// import store from '../store'
|
|
||||||
// import { getToken } from '@/utils/auth'
|
|
||||||
|
|
||||||
export const wsuri = `ws://192.168.1.232:61101//WebMoudule//websocket`
|
export const wsuri = `ws://192.168.1.232:61101//WebMoudule//websocket`
|
||||||
export const name = `OP8888`
|
export const name = `OP8888`
|
||||||
|
|||||||
@@ -47,14 +47,18 @@
|
|||||||
{{ scope.row.机床数量 }}
|
{{ scope.row.机床数量 }}
|
||||||
</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="460px" fixed="right">
|
||||||
<template slot-scope="scope">
|
<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.装配状态===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-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.装配状态===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.调试状态===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-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.调试状态===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>
|
</el-table>
|
||||||
@@ -95,8 +99,10 @@
|
|||||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||||
<template slot-scope="scope">
|
<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 === 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-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 === 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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -125,6 +131,50 @@ export default {
|
|||||||
this.initProject()
|
this.initProject()
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
||||||
initProject().then(response => {
|
initProject().then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
@@ -157,7 +207,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
searchTable1(this.machineNumberValue, this.check2).then(response => {
|
||||||
this.tableData1 = response.data
|
this.tableData1 = response.data
|
||||||
console.log(response.data, 1111)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -166,7 +215,6 @@ export default {
|
|||||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
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 }
|
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||||
searchTable2(this.machineNumberValue, this.check2).then(response => {
|
searchTable2(this.machineNumberValue, this.check2).then(response => {
|
||||||
console.log(response.data, 222)
|
|
||||||
this.tableData2 = response.data
|
this.tableData2 = response.data
|
||||||
this.tableData2.map(v => {
|
this.tableData2.map(v => {
|
||||||
if (v.组件是否完成 === null || v.组件是否完成 === 0) {
|
if (v.组件是否完成 === null || v.组件是否完成 === 0) {
|
||||||
@@ -182,45 +230,35 @@ export default {
|
|||||||
},
|
},
|
||||||
// 总装开始装配
|
// 总装开始装配
|
||||||
handlestart_1(row) { // 弹出单据编辑
|
handlestart_1(row) { // 弹出单据编辑
|
||||||
console.log(row)
|
|
||||||
MachineToolStateUpdate(row.机床流水号, 1).then(response => {
|
MachineToolStateUpdate(row.机床流水号, 1).then(response => {
|
||||||
console.log(response.data)
|
|
||||||
this.searchTable1()
|
this.searchTable1()
|
||||||
this.searchTable2()
|
this.searchTable2()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 总装结束装配
|
// 总装结束装配
|
||||||
handleend_1(row) { // 弹出单据编辑
|
handleend_1(row) { // 弹出单据编辑
|
||||||
console.log(row)
|
|
||||||
MachineToolStateUpdate(row.机床流水号, 2).then(response => {
|
MachineToolStateUpdate(row.机床流水号, 2).then(response => {
|
||||||
console.log(response.data)
|
|
||||||
this.searchTable1()
|
this.searchTable1()
|
||||||
this.searchTable2()
|
this.searchTable2()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 总装开始调试
|
// 总装开始调试
|
||||||
handlestart_2(row) { // 弹出单据编辑
|
handlestart_2(row) { // 弹出单据编辑
|
||||||
console.log(row)
|
|
||||||
DebugStatusUpdate(row.机床流水号, 1).then(response => {
|
DebugStatusUpdate(row.机床流水号, 1).then(response => {
|
||||||
console.log(response.data)
|
|
||||||
this.searchTable1()
|
this.searchTable1()
|
||||||
this.searchTable2()
|
this.searchTable2()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 总装结束调试
|
// 总装结束调试
|
||||||
handleend_2(row) { // 弹出单据编辑
|
handleend_2(row) { // 弹出单据编辑
|
||||||
console.log(row)
|
|
||||||
DebugStatusUpdate(row.机床流水号, 2).then(response => {
|
DebugStatusUpdate(row.机床流水号, 2).then(response => {
|
||||||
console.log(response.data)
|
|
||||||
this.searchTable1()
|
this.searchTable1()
|
||||||
this.searchTable2()
|
this.searchTable2()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 部装开始装配
|
// 部装开始装配
|
||||||
handlestart_3(row) { // 弹出单据编辑
|
handlestart_3(row) { // 弹出单据编辑
|
||||||
console.log(row)
|
|
||||||
ComponentStateUpdate(row.组件流水号, 1).then(response => {
|
ComponentStateUpdate(row.组件流水号, 1).then(response => {
|
||||||
console.log(response.data)
|
|
||||||
this.searchTable1()
|
this.searchTable1()
|
||||||
row.buttonStatus = 2
|
row.buttonStatus = 2
|
||||||
// this.searchTable2()
|
// this.searchTable2()
|
||||||
@@ -228,9 +266,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 部装结束装配
|
// 部装结束装配
|
||||||
handleend_3(row) { // 弹出单据编辑
|
handleend_3(row) { // 弹出单据编辑
|
||||||
console.log(row)
|
|
||||||
ComponentStateUpdate(row.组件流水号, 2).then(response => {
|
ComponentStateUpdate(row.组件流水号, 2).then(response => {
|
||||||
console.log(response.data)
|
|
||||||
this.searchTable1()
|
this.searchTable1()
|
||||||
row.buttonStatus = 3
|
row.buttonStatus = 3
|
||||||
// this.searchTable2()
|
// this.searchTable2()
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ export default {
|
|||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
sums[index] = '总价'
|
sums[index] = '总价'
|
||||||
} else if (index === 3) {
|
} else if (index === 3) {
|
||||||
const values = data.map(item => Number(item['批次数量']))
|
const values = data.map(item => Number(item['批次数量']) || 0)
|
||||||
if (!values.every(value => isNaN(value))) {
|
if (!values.every(value => isNaN(value))) {
|
||||||
sums[index] = values.reduce((prev, curr) => {
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
const value = Number(curr)
|
const value = Number(curr)
|
||||||
@@ -195,7 +195,7 @@ export default {
|
|||||||
sums[index] = 'N/A'
|
sums[index] = 'N/A'
|
||||||
}
|
}
|
||||||
} else if (index === 4) {
|
} else if (index === 4) {
|
||||||
const values = data.map(item => Number(item['检验数量']))
|
const values = data.map(item => Number(item['检验数量']) || 0)
|
||||||
if (!values.every(value => isNaN(value))) {
|
if (!values.every(value => isNaN(value))) {
|
||||||
sums[index] = values.reduce((prev, curr) => {
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
const value = Number(curr)
|
const value = Number(curr)
|
||||||
@@ -210,7 +210,7 @@ export default {
|
|||||||
sums[index] = 'N/A'
|
sums[index] = 'N/A'
|
||||||
}
|
}
|
||||||
} else if (index === 5) {
|
} else if (index === 5) {
|
||||||
const values = data.map(item => Number(item['不合格数量']))
|
const values = data.map(item => Number(item['不合格数量']) || 0)
|
||||||
if (!values.every(value => isNaN(value))) {
|
if (!values.every(value => isNaN(value))) {
|
||||||
sums[index] = values.reduce((prev, curr) => {
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
const value = Number(curr)
|
const value = Number(curr)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<span>外协厂家:</span>
|
<span>外协厂家:</span>
|
||||||
<el-input v-model="manufacturers" size="small" placeholder="外协厂家" style="width:200px" clearable/>
|
<el-input v-model="manufacturers" size="small" placeholder="外协厂家" style="width:200px" clearable/>
|
||||||
<span>下达任务日期:</span>
|
<span>下达任务日期:</span>
|
||||||
<el-date-picker0
|
<el-date-picker
|
||||||
type="date"
|
type="date"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="选择日期"/>
|
placeholder="选择日期"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user