Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="listLoading" :data="tableData" border size="mini" style="width: 100%" height="650px">
|
||||
<el-table v-loading="listLoading" :data="tableDataNum" border size="mini" style="width: 100%" height="650px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
@@ -32,12 +32,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" align="center" min-width="100">
|
||||
<template slot-scope="scope" align="center">
|
||||
{{ tableData[scope.$index].plannumber }}
|
||||
{{ tableDataNum[scope.$index].plannumber }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].innumber" clearable size="mini"/>
|
||||
<el-input v-model="tableDataNum[scope.$index].innumber" clearable size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" min-width="100">
|
||||
@@ -92,7 +92,7 @@ export default {
|
||||
ace: 0,
|
||||
a: '',
|
||||
tableData: [],
|
||||
partNumber: '',
|
||||
partNumber: [],
|
||||
listLoading: false,
|
||||
craftplannumber: '',
|
||||
radio2: 3,
|
||||
@@ -101,7 +101,8 @@ export default {
|
||||
inventoryNumber: '',
|
||||
locateName: [], // 货位名称下拉框
|
||||
locateNumber: '',
|
||||
Partpaint: ''
|
||||
Partpaint: '',
|
||||
tableDataNum: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -118,6 +119,7 @@ export default {
|
||||
methods: {
|
||||
// 移除
|
||||
handleDelete(index, row) {
|
||||
this.tableDataNum.splice(index, 1)
|
||||
this.tableData.splice(index, 1)
|
||||
},
|
||||
// 获取人员编号
|
||||
@@ -153,10 +155,12 @@ export default {
|
||||
},
|
||||
// 根据图号查流水号并查表1
|
||||
getCraftNumber() {
|
||||
this.partNumber = ''
|
||||
this.partNumber = []
|
||||
CraftNumber(this.Partpaint).then(response => {
|
||||
if (response.data.length > 0 && response.data[0].工艺计划流水号) {
|
||||
this.partNumber = response.data[0].工艺计划流水号
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.partNumber.push(
|
||||
response.data[i].工艺计划流水号
|
||||
)
|
||||
}
|
||||
}).then(() => {
|
||||
this.getscantable()
|
||||
@@ -166,50 +170,78 @@ export default {
|
||||
getPaint() {
|
||||
searchPartNumber(this.partNumber).then(response => {
|
||||
this.Partpaint = response.data[0].零件图号
|
||||
return this.Partpaint
|
||||
}).then(() => {
|
||||
this.getCraftNumber()
|
||||
})
|
||||
this.getscantable()
|
||||
// this.getscantable()
|
||||
},
|
||||
// 根据流水号查询
|
||||
getscantable() {
|
||||
if (this.partNumber === '' || this.partNumber === null) {
|
||||
this.$message.error('请输入正确零件号')
|
||||
// this.tableData = []
|
||||
if (this.partNumber.length === 0) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '请输入正确的零件图号',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
this.listLoading = true
|
||||
searchTable(this.partNumber).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.length === 0) {
|
||||
this.listLoading = false
|
||||
this.$message.warning('该零件未加工完成')
|
||||
} else if (response.data[0].考核状态 === 8) {
|
||||
this.listLoading = false
|
||||
this.$message.warning('该零件已入库')
|
||||
} else if (response.data[0].考核状态 === 9) {
|
||||
this.listLoading = false
|
||||
this.$message.warning('该零件已出库')
|
||||
} else if (response.data[0].考核状态 === 7) {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {
|
||||
this.ace = this.ace + 1
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '该零件未加工完成',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].考核状态 === 8) {
|
||||
this.listLoading = false
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: 'P' + response.data[i].工艺计划流水号 + '已入库',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (response.data[i].考核状态 === 9) {
|
||||
this.listLoading = false
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: 'P' + response.data[i].工艺计划流水号 + '已出库',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (response.data[i].考核状态 === 7) {
|
||||
this.listLoading = false
|
||||
this.tableData.push({
|
||||
plannumber: response.data[i].剩余数量,
|
||||
innumber: response.data[i].入库数量,
|
||||
capture: '',
|
||||
note: '',
|
||||
工艺计划流水号: response.data[i].工艺计划流水号,
|
||||
项目名称: response.data[i].项目名称,
|
||||
机床图号: response.data[i].机床图号,
|
||||
零件图号: response.data[i].零件图号
|
||||
})
|
||||
const hash = {} // 一个新数组,data为你需要去重的数组,newData用于接收去重后的数组, curVal.去重条件
|
||||
this.tableDataNum = this.tableData.reduce((preVal, curVal) => {
|
||||
hash[curVal.工艺计划流水号] ? '' : hash[curVal.工艺计划流水号] = true && preVal.push({
|
||||
工艺计划流水号: curVal.工艺计划流水号,
|
||||
项目名称: curVal.项目名称,
|
||||
机床图号: curVal.机床图号,
|
||||
零件图号: curVal.零件图号,
|
||||
plannumber: curVal.plannumber,
|
||||
innumber: curVal.innumber,
|
||||
capture: '',
|
||||
note: ''
|
||||
})
|
||||
return preVal
|
||||
}, [])
|
||||
}
|
||||
}
|
||||
if (this.ace === 0) {
|
||||
this.tableData.push({
|
||||
plannumber: response.data[0].剩余数量,
|
||||
innumber: response.data[0].入库数量,
|
||||
capture: '',
|
||||
note: '',
|
||||
工艺计划流水号: response.data[0].工艺计划流水号,
|
||||
项目名称: response.data[0].项目名称,
|
||||
机床图号: response.data[0].机床图号,
|
||||
零件图号: response.data[0].零件图号
|
||||
})
|
||||
} else {
|
||||
this.$message.error('此件已在列表中')
|
||||
}
|
||||
}
|
||||
}).then(() => {
|
||||
this.listLoading = false
|
||||
this.ace = 0
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -223,14 +255,14 @@ export default {
|
||||
if (this.locateNumber === '') {
|
||||
this.$message.error('请选择货位')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (Number(this.tableData[i].innumber) === 0) {
|
||||
for (let i = 0; i < this.tableDataNum.length; i++) {
|
||||
if (Number(this.tableDataNum[i].innumber) === 0) {
|
||||
this.$message.error('请输入正确数量')
|
||||
} else {
|
||||
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
|
||||
this.tableData[i].innumber = this.tableData[i].plannumber
|
||||
if (this.tableDataNum[i].innumber > this.tableDataNum[i].plannumber) {
|
||||
this.tableDataNum[i].innumber = this.tableDataNum[i].plannumber
|
||||
}
|
||||
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
|
||||
insertOne(this.tableDataNum[i].工艺计划流水号, this.tableDataNum[i].innumber, this.PeopleNumber, this.tableDataNum[i].capture, this.inventoryNumber, this.locateNumber, this.tableDataNum[i].note).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
@@ -257,6 +289,7 @@ export default {
|
||||
// 清空
|
||||
Empty() {
|
||||
this.tableData = []
|
||||
this.tableDataNum = []
|
||||
this.Partpaint = ''
|
||||
},
|
||||
// 仓库查询
|
||||
|
||||
153
src/views/ManufacturingCenter/AntonMonitoring/index.vue
Normal file
153
src/views/ManufacturingCenter/AntonMonitoring/index.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-badge :value="value" class="item" style="margin-bottom: 10px; float: right">
|
||||
<el-button size="small" @click="openWindow">Andon信息</el-button>
|
||||
</el-badge>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
height="800"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="工位号">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text">{{ scope.row.工位号 }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="登陆人">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.姓名===''||scope.row.姓名===null" slot="reference" size="small" style="width: 80px" type="warning">未登录</el-tag>
|
||||
<el-tag v-else slot="reference" type="success" size="small" style="width: 80px"> {{ scope.row.姓名 }} </el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="呼叫类型">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.呼叫备注===''|| scope.row.呼叫备注===null"><div style="width: 12px;height: 12px;border-radius: 50%;background-color: rgb(103, 194, 58);display: inline-block;margin:0px 5px 0 0"/>正常工作</div>
|
||||
<div v-else ><div style="width: 12px;height: 12px;border-radius: 50%;background-color: red;display: inline-block;margin:0px 5px 0 0"/>{{ scope.row.呼叫备注 }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%">
|
||||
<el-table
|
||||
:data="tableDataMassage"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
height="500"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="工位号">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text">{{ scope.row.工位号 }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="登陆人">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.姓名===''||scope.row.姓名===null" slot="reference" size="small" style="width: 80px" type="warning">未登录</el-tag>
|
||||
<el-tag v-else slot="reference" type="success" size="small" style="width: 80px"> {{ scope.row.姓名 }} </el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="呼叫类型">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.呼叫备注===''|| scope.row.呼叫备注===null"><div style="width: 12px;height: 12px;border-radius: 50%;background-color: rgb(103, 194, 58);display: inline-block;margin:0px 5px 0 0"/>正常工作</div>
|
||||
<div v-else ><div style="width: 12px;height: 12px;border-radius: 50%;background-color: red;display: inline-block;margin:0px 5px 0 0"/>{{ scope.row.呼叫备注 }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ANDON_countselect } from '@/api/ManufacturingCenter/AntonMonitoring'
|
||||
import { wsuri, name1 } from '@/utils/request'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
timer_ANDON: '',
|
||||
andonMsg: '',
|
||||
Name: '',
|
||||
massage: [],
|
||||
dialogVisible: false,
|
||||
tableDataMassage: [],
|
||||
value: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.ANDON_countselect()
|
||||
this.timer_ANDON = setInterval(this.search(), 60 * 1000 * 5) // ANDON看板 5 分钟一刷新
|
||||
},
|
||||
created() {
|
||||
this.initWebpack()
|
||||
},
|
||||
methods: {
|
||||
ANDON_countselect() {
|
||||
ANDON_countselect().then(response => {
|
||||
this.tableData = response.data
|
||||
})
|
||||
},
|
||||
// 初始化websocket
|
||||
initWebpack() {
|
||||
this.websock = new WebSocket(wsuri)// 这里面的this都指向vue
|
||||
this.websock.onopen = this.websocketopen
|
||||
this.websock.onmessage = this.websocketonmessage
|
||||
this.websock.onclose = this.websocketclose
|
||||
this.websock.onerror = this.websocketerror
|
||||
},
|
||||
// 打开
|
||||
websocketopen() {
|
||||
console.log('WebSocket连接成功')
|
||||
this.websock.send('{<' + name1 + '>}')
|
||||
},
|
||||
// 数据接收
|
||||
websocketonmessage(msg) {
|
||||
console.log(msg)
|
||||
this.andonMsg = msg.data.split('|')[3]
|
||||
this.Name = msg.data.split('|')[2]
|
||||
if (this.andonMsg === '1') {
|
||||
this.search()
|
||||
}
|
||||
},
|
||||
// 关闭
|
||||
websocketclose() {
|
||||
console.log('WebSocket关闭')
|
||||
},
|
||||
// 失败
|
||||
websocketerror() {
|
||||
console.log('WebSocket连接失败')
|
||||
},
|
||||
search() {
|
||||
this.tableDataMassage = []
|
||||
ANDON_countselect().then(response => {
|
||||
this.tableData = response.data
|
||||
return response.data
|
||||
}).then(data => {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].呼叫备注 !== null) {
|
||||
this.tableDataMassage.push(data[i])
|
||||
}
|
||||
}
|
||||
this.value = this.tableDataMassage.length
|
||||
})
|
||||
},
|
||||
openWindow() {
|
||||
this.dialogVisible = true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-left: 2px;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -75,6 +75,16 @@
|
||||
{{ scope.row.发货节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备预验节点" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备预验收节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安装调试节点" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安装调试节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户名称" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
@@ -455,6 +465,12 @@ export default {
|
||||
if (response.data.rows[i].发货节点 !== '' && response.data.rows[i].发货节点 !== null) {
|
||||
response.data.rows[i].发货节点 = response.data.rows[i].发货节点.split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].设备预验收节点 !== '' && response.data.rows[i].设备预验收节点 !== null) {
|
||||
response.data.rows[i].设备预验收节点 = response.data.rows[i].设备预验收节点.split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].安装调试节点 !== '' && response.data.rows[i].安装调试节点 !== null) {
|
||||
response.data.rows[i].安装调试节点 = response.data.rows[i].安装调试节点.split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].机床设计完成时间 !== '' && response.data.rows[i].机床设计完成时间 !== null) {
|
||||
response.data.rows[i].机床设计完成时间 = response.data.rows[i].机床设计完成时间.split(' ')[0]
|
||||
}
|
||||
@@ -503,6 +519,8 @@ export default {
|
||||
机床数量: response.data.rows[i].机床数量,
|
||||
合同签订日期: response.data.rows[i].合同签订日期,
|
||||
发货节点: response.data.rows[i].发货节点,
|
||||
设备预验收节点: response.data.rows[i].设备预验收节点,
|
||||
安装调试节点: response.data.rows[i].安装调试节点,
|
||||
客户名称: response.data.rows[i].客户名称,
|
||||
机床设计者: response.data.rows[i].机床设计者,
|
||||
机床设计完成时间: response.data.rows[i].机床设计完成时间,
|
||||
|
||||
@@ -89,6 +89,16 @@
|
||||
<span :class="colorJudge(scope.row.发货节点)">{{ scope.row.发货节点 === '1900-01-01 00:00:00' ? '' : scope.row.发货节点 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备预验节点" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备预验收节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安装调试节点" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安装调试节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审图(计划开始)" align="center" min-width="170px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审图计划开始时间 === '1900-01-01 00:00:00' ? '' : scope.row.审图计划开始时间 }}
|
||||
@@ -455,9 +465,54 @@ export default {
|
||||
if (response.data[i].发货节点 !== '' && response.data[i].发货节点 !== null) {
|
||||
response.data[i].发货节点 = response.data[i].发货节点.split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].设备预验收节点 !== '' && response.data.rows[i].设备预验收节点 !== null) {
|
||||
response.data.rows[i].设备预验收节点 = response.data.rows[i].设备预验收节点.split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].安装调试节点 !== '' && response.data.rows[i].安装调试节点 !== null) {
|
||||
response.data.rows[i].安装调试节点 = response.data.rows[i].安装调试节点.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].审图计划开始时间 !== '' && response.data[i].审图计划开始时间 !== null) {
|
||||
response.data[i].审图计划开始时间 = response.data[i].审图计划开始时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].审图计划完成时间 !== '' && response.data[i].审图计划完成时间 !== null) {
|
||||
response.data[i].审图计划完成时间 = response.data[i].审图计划完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].审图实际完成时间 !== '' && response.data[i].审图实际完成时间 !== null) {
|
||||
response.data[i].审图实际完成时间 = response.data[i].审图实际完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].机床设计完成时间 !== '' && response.data[i].机床设计完成时间 !== null) {
|
||||
response.data[i].机床设计完成时间 = response.data[i].机床设计完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].机床设计实际完成时间 !== '' && response.data[i].机床设计实际完成时间 !== null) {
|
||||
response.data[i].机床设计实际完成时间 = response.data[i].机床设计实际完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].采购完成时间 !== '' && response.data[i].采购完成时间 !== null) {
|
||||
response.data[i].采购完成时间 = response.data[i].采购完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].采购实际完成时间 !== '' && response.data[i].采购实际完成时间 !== null) {
|
||||
response.data[i].采购实际完成时间 = response.data[i].采购实际完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].备料完成时间 !== '' && response.data[i].备料完成时间 !== null) {
|
||||
response.data[i].备料完成时间 = response.data[i].备料完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].备料实际完成时间 !== '' && response.data[i].备料实际完成时间 !== null) {
|
||||
response.data[i].备料实际完成时间 = response.data[i].备料实际完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].机床生产完成时间 !== '' && response.data[i].机床生产完成时间 !== null) {
|
||||
response.data[i].机床生产完成时间 = response.data[i].机床生产完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].机床生产实际完成时间 !== '' && response.data[i].机床生产实际完成时间 !== null) {
|
||||
response.data[i].机床生产实际完成时间 = response.data[i].机床生产实际完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].机床装配完成时间 !== '' && response.data[i].机床装配完成时间 !== null) {
|
||||
response.data[i].机床装配完成时间 = response.data[i].机床装配完成时间.split(' ')[0]
|
||||
}
|
||||
if (response.data[i].机床装配实际完成时间 !== '' && response.data[i].机床装配实际完成时间 !== null) {
|
||||
response.data[i].机床装配实际完成时间 = response.data[i].机床装配实际完成时间.split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
console.log(response.data)
|
||||
console.log(response.data, 222222)
|
||||
this.tableData = response.data
|
||||
}).then(() => {
|
||||
searchtable2(this.machineValue, 1).then(response => {
|
||||
|
||||
@@ -275,7 +275,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="成交" align="center" width="130px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="加工价格_成交[scope.$index]"/>
|
||||
<el-input v-model="加工价格_成交[scope.$index]" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
@@ -297,12 +297,68 @@ export default {
|
||||
edit(row.工序流水号, this.InOut).then(response => {
|
||||
edit2(row.工序流水号, row.工艺计划流水号, 1).then(response => {
|
||||
this.$message.success('工序外协状态更改成功')
|
||||
this.loading2 = true
|
||||
this.checkBox = []
|
||||
this.tableData2 = []
|
||||
searchTable2(this.num1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
console.log(response.data[i].工序顺序)
|
||||
}
|
||||
console.log(response.data, 1111111)
|
||||
if (response.data.length === 0) {
|
||||
this.loading0 = false
|
||||
} else {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].工序间是否外协 === 1) {
|
||||
this.checkBox.push(false)
|
||||
} else {
|
||||
this.checkBox.push(true)
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
|
||||
response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
|
||||
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.InOut = 1
|
||||
edit(row.工序流水号, this.InOut).then(response => {
|
||||
this.$message.success('工序外协状态更改成功')
|
||||
this.loading2 = true
|
||||
this.checkBox = []
|
||||
this.tableData2 = []
|
||||
searchTable2(this.num1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
console.log(response.data[i].工序顺序)
|
||||
}
|
||||
console.log(response.data, 1111111)
|
||||
if (response.data.length === 0) {
|
||||
this.loading0 = false
|
||||
} else {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].工序间是否外协 === 1) {
|
||||
this.checkBox.push(false)
|
||||
} else {
|
||||
this.checkBox.push(true)
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
|
||||
response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
|
||||
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -640,7 +640,11 @@ export default {
|
||||
|
||||
<style>
|
||||
.el-table .warning-row {
|
||||
<<<<<<< HEAD
|
||||
background: yellowgreen;
|
||||
=======
|
||||
background: red;
|
||||
>>>>>>> fe0ba3d7bde1d5cfc6a4a87843e945deaff60a8d
|
||||
}
|
||||
.rgb196{
|
||||
background: palevioletred;
|
||||
|
||||
@@ -379,7 +379,7 @@ export default {
|
||||
sums[index] = '总重量'
|
||||
return
|
||||
} else if (index === 7) {
|
||||
const values = data.map(item => Number(item['重量1']))
|
||||
const values = data.map(item => Number(item['重量1'] * item['批次数量']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
|
||||
Reference in New Issue
Block a user