This commit is contained in:
chenjianan
2019-05-15 15:17:26 +08:00
15 changed files with 396 additions and 47 deletions

View File

@@ -7,7 +7,7 @@ export function searchTable(partnumber) {
data: { data: {
type: '1', type: '1',
name: 'MES_机加工MES_库存管理_入库模块_零件基础信息查询_根据零件图号', name: 'MES_机加工MES_库存管理_入库模块_零件基础信息查询_根据零件图号',
param: '工艺计划流水号=' + partnumber + '=string' param: '工艺计划流水号=' + partnumber
} }
}) })
} }

View File

@@ -0,0 +1,25 @@
import request from '@/utils/request'
// 电子看板_线体上下线数量统计_查询
export function ANDON_countselect() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'ANDON_大屏幕显示',
param: 'WorkShopType=A'
}
})
}
export function ANDON_opselect(opname) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'ANDON_办公室监控_消息通知',
param: 'WorkShopType=A' + '&工位号=' + opname + '=string'
}
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1557551342926" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2259" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 972.20608a460.22656 460.22656 0 1 1 460.8-460.22144 460.50816 460.50816 0 0 1-460.8 460.22144z m0-869.248a409.6 409.6 0 1 0 409.56416 409.6 409.6 409.6 0 0 0-409.56416-409.6z m317.47584 413.51168v-0.08192c0 0.3072-0.0512 0.58368-0.0512 0.85504-0.03072 0.1536-0.03072 0.30208-0.0512 0.42496 0 0.2048-0.05632 0.43008-0.0768 0.62976l-0.08192 0.73216v0.08192a27.45856 27.45856 0 0 1-6.69696 14.336c-6.72768 8.66304-14.06464 16.7936-21.4272 24.7808a558.592 558.592 0 0 1-135.74144 109.4656 347.96032 347.96032 0 0 1-101.71392 39.10144 277.43232 277.43232 0 0 1-116.88448-1.7664c-67.15904-15.52896-128-54.16448-181.17632-100.32128a510.62784 510.62784 0 0 1-69.39136-71.2448 28.55424 28.55424 0 0 1 0-36.72064c6.69696-8.66304 14.05952-16.8192 21.42208-24.7808a557.94688 557.94688 0 0 1 135.73632-109.41952 347.70432 347.70432 0 0 1 101.7088-39.1168 277.55008 277.55008 0 0 1 116.85376 1.7408c67.16416 15.5392 128 54.1952 181.17632 100.352a508.54912 508.54912 0 0 1 69.39648 71.2448 26.97216 26.97216 0 0 1 6.70208 14.336 0.09216 0.09216 0 0 0 0 0.0768l0.08192 0.73216 0.11264 0.65024v0.43008a7.89504 7.89504 0 0 1 0.05632 0.84992c0 0.45568 0.0512 0.88576 0.0512 1.31072l-0.00512 1.32608zM509.44 381.99808c-66.2784 0-120.00768 57.18528-120.00768 127.77472s53.76 127.75424 120.00768 127.75424 120.0384-57.1904 120.0384-127.75424S575.74912 381.99808 509.44 381.99808z m0 191.616c-33.12128 0-60.0064-28.61056-60.0064-63.86688s26.86976-63.86176 60.0064-63.86176 60.0064 28.60032 60.00128 63.88736-26.83904 63.86688-60.00128 63.86688z" p-id="2260" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1557551270940" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1394" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M767.142469 703.290721 447.538361 703.290721l0 191.763488 511.369643 0L958.908004 64.079434 447.538361 64.079434l0 191.763488 319.604108 0L767.142469 703.290721zM831.065338 767.212566 831.065338 191.922101 511.458159 191.922101l0-63.920822 383.528 0L894.986159 831.132364 511.458159 831.132364l0-63.920822L831.065338 767.211543z" p-id="1395" fill="#ffffff"></path><path d="M447.538361 447.606411 447.538361 319.763744 511.458159 319.763744 511.458159 383.685589 575.380004 383.685589 575.380004 447.606411 639.301849 447.606411 639.301849 511.527233 575.380004 511.527233 575.380004 575.448054 511.458159 575.448054 511.458159 639.369899 447.538361 639.369899 447.538361 511.527233 64.011384 511.527233 64.011384 447.606411Z" p-id="1396" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1557552071193" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2463" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M938.666667 810.666667V85.333333H106.666667v448h21.333333v64h64v85.333334h42.666667v-85.333334h64v-64h21.333333V298.666667h362.666667v512h-106.666667v-85.333334h-170.666667v85.333334h-106.666666v-85.333334H128v85.333334H42.666667v128h938.666666v-128zM256 554.666667H170.666667v-21.333334h85.333333z m21.333333-298.666667v234.666667H149.333333V128h746.666667v682.666667h-170.666667V256z m170.666667 512h85.333333v42.666667h-85.333333zM170.666667 768h85.333333v42.666667H170.666667z m768 128H85.333333v-42.666667h853.333334z" p-id="2464" fill="#1296db"></path><path d="M661.333333 192m-42.666666 0a42.666667 42.666667 0 1 0 85.333333 0 42.666667 42.666667 0 1 0-85.333333 0Z" p-id="2465" fill="#1296db"></path><path d="M277.333333 170.666667h298.666667v42.666666H277.333333zM789.333333 597.333333h42.666667v170.666667h-42.666667zM789.333333 469.333333h42.666667v85.333334h-42.666667zM789.333333 341.333333h42.666667v85.333334h-42.666667z" p-id="2466" fill="#1296db"></path></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1557551198088" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="569" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 964.608c-61.089792 0-120.367104-11.969536-176.183296-35.57888-53.900288-22.797312-102.300672-55.428096-143.858688-96.987136-41.55904-41.558016-74.189824-89.959424-96.987136-143.858688C71.361536 632.367104 59.392 573.089792 59.392 512s11.969536-120.367104 35.57888-176.183296c22.797312-53.900288 55.428096-102.300672 96.987136-143.858688 41.558016-41.55904 89.959424-74.189824 143.858688-96.987136C391.632896 71.361536 450.910208 59.392 512 59.392s120.367104 11.969536 176.183296 35.57888c53.900288 22.797312 102.300672 55.428096 143.858688 96.987136 41.55904 41.558016 74.189824 89.959424 96.987136 143.858688C952.638464 391.632896 964.608 450.910208 964.608 512c0 88.037376-25.302016 173.389824-73.16992 246.832128-7.719936 11.845632-23.5776 15.187968-35.426304 7.469056-11.843584-7.719936-15.187968-23.580672-7.468032-35.426304C890.978304 665.769984 913.408 590.084096 913.408 512c0-54.201344-10.609664-106.76736-31.53408-156.237824-20.215808-47.797248-49.163264-90.727424-86.03648-127.599616s-79.803392-65.819648-127.599616-86.03648C618.76736 121.201664 566.201344 110.592 512 110.592s-106.76736 10.609664-156.237824 31.53408c-47.797248 20.215808-90.727424 49.163264-127.599616 86.03648s-65.819648 79.803392-86.03648 127.599616C121.201664 405.23264 110.592 457.798656 110.592 512s10.609664 106.76736 31.53408 156.237824c20.215808 47.797248 49.163264 90.727424 86.03648 127.599616s79.803392 65.819648 127.599616 86.03648C405.23264 902.798336 457.798656 913.408 512 913.408c80.4864 0 158.12096-23.724032 224.514048-68.605952 11.711488-7.917568 27.626496-4.842496 35.545088 6.87104 7.918592 11.712512 4.842496 27.626496-6.87104 35.546112C690.296832 937.846784 602.745856 964.608 512 964.608z" p-id="570" fill="#ffffff"></path><path d="M674.051072 392.5504l-221.702144-128c-7.919616-4.574208-17.680384-4.574208-25.6 0-7.92064 4.573184-12.8 13.024256-12.8 22.1696l0 435.2-10.24 0c-14.139392 0-25.6 11.460608-25.6 25.6s11.460608 25.6 25.6 25.6l122.88 0c14.139392 0 25.6-11.460608 25.6-25.6s-11.460608-25.6-25.6-25.6l-61.44 0L465.148928 557.500416 674.051072 436.8896c7.92064-4.573184 12.8-13.024256 12.8-22.1696S681.971712 397.12256 674.051072 392.5504zM465.148928 498.378752 465.148928 331.061248 610.051072 414.72 465.148928 498.378752z" p-id="571" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -5,6 +5,7 @@ import axios from 'axios'
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`
export const name1 = `OP1000`
// 创建axios实例 // 创建axios实例
export const readFile = `http://192.168.1.231:8411/webpage/file/` // invoice export const readFile = `http://192.168.1.231:8411/webpage/file/` // invoice

View File

@@ -9,7 +9,7 @@
</el-card> </el-card>
<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 <el-table-column
label="序号" label="序号"
align="center" align="center"
@@ -32,12 +32,12 @@
</el-table-column> </el-table-column>
<el-table-column label="计划数量" align="center" min-width="100"> <el-table-column label="计划数量" align="center" min-width="100">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
{{ tableData[scope.$index].plannumber }} {{ tableDataNum[scope.$index].plannumber }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入库数量" align="center" min-width="100"> <el-table-column label="入库数量" align="center" min-width="100">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="仓库" align="center" min-width="100"> <el-table-column label="仓库" align="center" min-width="100">
@@ -92,7 +92,7 @@ export default {
ace: 0, ace: 0,
a: '', a: '',
tableData: [], tableData: [],
partNumber: '', partNumber: [],
listLoading: false, listLoading: false,
craftplannumber: '', craftplannumber: '',
radio2: 3, radio2: 3,
@@ -101,7 +101,8 @@ export default {
inventoryNumber: '', inventoryNumber: '',
locateName: [], // 货位名称下拉框 locateName: [], // 货位名称下拉框
locateNumber: '', locateNumber: '',
Partpaint: '' Partpaint: '',
tableDataNum: []
} }
}, },
computed: { computed: {
@@ -118,6 +119,7 @@ export default {
methods: { methods: {
// 移除 // 移除
handleDelete(index, row) { handleDelete(index, row) {
this.tableDataNum.splice(index, 1)
this.tableData.splice(index, 1) this.tableData.splice(index, 1)
}, },
// 获取人员编号 // 获取人员编号
@@ -153,10 +155,12 @@ export default {
}, },
// 根据图号查流水号并查表1 // 根据图号查流水号并查表1
getCraftNumber() { getCraftNumber() {
this.partNumber = '' this.partNumber = []
CraftNumber(this.Partpaint).then(response => { CraftNumber(this.Partpaint).then(response => {
if (response.data.length > 0 && response.data[0].工艺计划流水号) { for (let i = 0; i < response.data.length; i++) {
this.partNumber = response.data[0].工艺计划流水号 this.partNumber.push(
response.data[i].工艺计划流水号
)
} }
}).then(() => { }).then(() => {
this.getscantable() this.getscantable()
@@ -166,50 +170,78 @@ export default {
getPaint() { getPaint() {
searchPartNumber(this.partNumber).then(response => { searchPartNumber(this.partNumber).then(response => {
this.Partpaint = response.data[0].零件图号 this.Partpaint = response.data[0].零件图号
return this.Partpaint
}).then(() => {
this.getCraftNumber()
}) })
this.getscantable() // this.getscantable()
}, },
// 根据流水号查询 // 根据流水号查询
getscantable() { getscantable() {
if (this.partNumber === '' || this.partNumber === null) { // this.tableData = []
this.$message.error('请输入正确零件号') if (this.partNumber.length === 0) {
this.$notify({
title: '警告',
message: '请输入正确的零件图号',
type: 'warning'
})
} else { } else {
this.listLoading = true this.listLoading = true
searchTable(this.partNumber).then(response => { searchTable(this.partNumber).then(response => {
console.log(response.data)
if (response.data.length === 0) { if (response.data.length === 0) {
this.listLoading = false this.listLoading = false
this.$message.warning('该零件未加工完成') this.$notify({
} else if (response.data[0].考核状态 === 8) { title: '警告',
this.listLoading = false message: '该零件未加工完成',
this.$message.warning('该零件已入库') type: '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
}
}
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 { } else {
this.$message.error('此件已在列表中') 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
}, [])
}
} }
} }
}).then(() => { }).then(() => {
this.listLoading = false this.listLoading = false
this.ace = 0
}) })
} }
}, },
@@ -223,14 +255,14 @@ export default {
if (this.locateNumber === '') { if (this.locateNumber === '') {
this.$message.error('请选择货位') this.$message.error('请选择货位')
} else { } else {
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableDataNum.length; i++) {
if (Number(this.tableData[i].innumber) === 0) { if (Number(this.tableDataNum[i].innumber) === 0) {
this.$message.error('请输入正确数量') this.$message.error('请输入正确数量')
} else { } else {
if (this.tableData[i].innumber > this.tableData[i].plannumber) { if (this.tableDataNum[i].innumber > this.tableDataNum[i].plannumber) {
this.tableData[i].innumber = this.tableData[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') { if (response.data[0].result === '1') {
this.$message({ this.$message({
type: 'success', type: 'success',
@@ -257,6 +289,7 @@ export default {
// 清空 // 清空
Empty() { Empty() {
this.tableData = [] this.tableData = []
this.tableDataNum = []
this.Partpaint = '' this.Partpaint = ''
}, },
// 仓库查询 // 仓库查询

View 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>

View File

@@ -75,6 +75,16 @@
{{ scope.row.发货节点 }} {{ scope.row.发货节点 }}
</template> </template>
</el-table-column> </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"> <el-table-column label="客户名称" align="center" width="280px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.客户名称 }} {{ scope.row.客户名称 }}
@@ -455,6 +465,12 @@ export default {
if (response.data.rows[i].发货节点 !== '' && response.data.rows[i].发货节点 !== null) { if (response.data.rows[i].发货节点 !== '' && response.data.rows[i].发货节点 !== null) {
response.data.rows[i].发货节点 = response.data.rows[i].发货节点.split(' ')[0] 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) { if (response.data.rows[i].机床设计完成时间 !== '' && response.data.rows[i].机床设计完成时间 !== null) {
response.data.rows[i].机床设计完成时间 = response.data.rows[i].机床设计完成时间.split(' ')[0] 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].安装调试节点,
客户名称: response.data.rows[i].客户名称, 客户名称: response.data.rows[i].客户名称,
机床设计者: response.data.rows[i].机床设计者, 机床设计者: response.data.rows[i].机床设计者,
机床设计完成时间: response.data.rows[i].机床设计完成时间, 机床设计完成时间: response.data.rows[i].机床设计完成时间,

View File

@@ -89,6 +89,16 @@
<span :class="colorJudge(scope.row.发货节点)">{{ scope.row.发货节点 === '1900-01-01 00:00:00' ? '' : scope.row.发货节点 }}</span> <span :class="colorJudge(scope.row.发货节点)">{{ scope.row.发货节点 === '1900-01-01 00:00:00' ? '' : scope.row.发货节点 }}</span>
</template> </template>
</el-table-column> </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"> <el-table-column label="审图(计划开始)" align="center" min-width="170px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审图计划开始时间 === '1900-01-01 00:00:00' ? '' : scope.row.审图计划开始时间 }} {{ scope.row.审图计划开始时间 === '1900-01-01 00:00:00' ? '' : scope.row.审图计划开始时间 }}
@@ -455,9 +465,54 @@ export default {
if (response.data[i].发货节点 !== '' && response.data[i].发货节点 !== null) { if (response.data[i].发货节点 !== '' && response.data[i].发货节点 !== null) {
response.data[i].发货节点 = response.data[i].发货节点.split(' ')[0] 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 this.loading = false
console.log(response.data) console.log(response.data, 222222)
this.tableData = response.data this.tableData = response.data
}).then(() => { }).then(() => {
searchtable2(this.machineValue, 1).then(response => { searchtable2(this.machineValue, 1).then(response => {

View File

@@ -275,7 +275,7 @@
</el-table-column> </el-table-column>
<el-table-column label="成交" align="center" width="130px"> <el-table-column label="成交" align="center" width="130px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="加工价格_成交[scope.$index]"/> <el-input v-model="加工价格_成交[scope.$index]" readonly/>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>

View File

@@ -297,12 +297,68 @@ export default {
edit(row.工序流水号, this.InOut).then(response => { edit(row.工序流水号, this.InOut).then(response => {
edit2(row.工序流水号, row.工艺计划流水号, 1).then(response => { edit2(row.工序流水号, row.工艺计划流水号, 1).then(response => {
this.$message.success('工序外协状态更改成功') 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 { } else {
this.InOut = 1 this.InOut = 1
edit(row.工序流水号, this.InOut).then(response => { edit(row.工序流水号, this.InOut).then(response => {
this.$message.success('工序外协状态更改成功') 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
})
}) })
} }
}, },

View File

@@ -640,7 +640,11 @@ export default {
<style> <style>
.el-table .warning-row { .el-table .warning-row {
<<<<<<< HEAD
background: yellowgreen;
=======
background: red; background: red;
>>>>>>> fe0ba3d7bde1d5cfc6a4a87843e945deaff60a8d
} }
.rgb196{ .rgb196{
background: palevioletred; background: palevioletred;

View File

@@ -379,7 +379,7 @@ export default {
sums[index] = '总重量' sums[index] = '总重量'
return return
} else if (index === 7) { } 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))) { 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)