From b22fc95b319747ef4bdc7c633b18eaa297fc02c4 Mon Sep 17 00:00:00 2001 From: caoxinyu Date: Fri, 10 May 2019 11:34:11 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=A5=E5=BA=93=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Inventory/Inboundscanning.js | 2 +- src/views/Inventory/Inboundscanning/index.vue | 118 ++++++++++++------ 2 files changed, 84 insertions(+), 36 deletions(-) diff --git a/src/api/Inventory/Inboundscanning.js b/src/api/Inventory/Inboundscanning.js index b2e2d786..92e8ae6c 100644 --- a/src/api/Inventory/Inboundscanning.js +++ b/src/api/Inventory/Inboundscanning.js @@ -7,7 +7,7 @@ export function searchTable(partnumber) { data: { type: '1', name: 'MES_机加工MES_库存管理_入库模块_零件基础信息查询_根据零件图号', - param: '工艺计划流水号=' + partnumber + '=string' + param: '工艺计划流水号=' + partnumber } }) } diff --git a/src/views/Inventory/Inboundscanning/index.vue b/src/views/Inventory/Inboundscanning/index.vue index f4c43c7b..f1c3b6ca 100644 --- a/src/views/Inventory/Inboundscanning/index.vue +++ b/src/views/Inventory/Inboundscanning/index.vue @@ -92,7 +92,7 @@ export default { ace: 0, a: '', tableData: [], - partNumber: '', + partNumber: [], listLoading: false, craftplannumber: '', radio2: 3, @@ -153,10 +153,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 +168,96 @@ 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) { + 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[0].剩余数量, + innumber: response.data[0].入库数量, + capture: '', + note: '', + 工艺计划流水号: response.data[0].工艺计划流水号, + 项目名称: response.data[0].项目名称, + 机床图号: response.data[0].机床图号, + 零件图号: response.data[0].零件图号 + }) } } - 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('此件已在列表中') - } } + + // 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 + // } + // } + // 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 + // this.ace = 0 }) } }, From 9754debef34ae0ba85be5bc787289f75c86879cd Mon Sep 17 00:00:00 2001 From: caoxinyu Date: Sat, 11 May 2019 12:47:37 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BB=B6=E5=87=BA?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Inventory/Inboundscanning/index.vue | 81 ++++++++----------- 1 file changed, 33 insertions(+), 48 deletions(-) diff --git a/src/views/Inventory/Inboundscanning/index.vue b/src/views/Inventory/Inboundscanning/index.vue index f1c3b6ca..183499a8 100644 --- a/src/views/Inventory/Inboundscanning/index.vue +++ b/src/views/Inventory/Inboundscanning/index.vue @@ -9,7 +9,7 @@ - + @@ -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) }, // 获取人员编号 @@ -176,7 +178,7 @@ export default { }, // 根据流水号查询 getscantable() { - this.tableData = [] + // this.tableData = [] if (this.partNumber.length === 0) { this.$notify({ title: '警告', @@ -212,52 +214,34 @@ export default { } else if (response.data[i].考核状态 === 7) { this.listLoading = false this.tableData.push({ - plannumber: response.data[0].剩余数量, - innumber: response.data[0].入库数量, + plannumber: response.data[i].剩余数量, + innumber: response.data[i].入库数量, capture: '', note: '', - 工艺计划流水号: response.data[0].工艺计划流水号, - 项目名称: response.data[0].项目名称, - 机床图号: response.data[0].机床图号, - 零件图号: response.data[0].零件图号 + 工艺计划流水号: response.data[i].工艺计划流水号, + 项目名称: response.data[i].项目名称, + 机床图号: response.data[i].机床图号, + 零件图号: response.data[i].零件图号 }) + let 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 (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 - // } - // } - // 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 }) } }, @@ -271,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', @@ -305,6 +289,7 @@ export default { // 清空 Empty() { this.tableData = [] + this.tableDataNum = [] this.Partpaint = '' }, // 仓库查询 From fe0ba3d7bde1d5cfc6a4a87843e945deaff60a8d Mon Sep 17 00:00:00 2001 From: caoxinyu Date: Sat, 11 May 2019 17:10:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?Andon=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManufacturingCenter/AntonMonitoring.js | 25 +++ src/icons/svg/AntonMonitoring.svg | 1 + src/icons/svg/OutPartSelect.svg | 1 + src/icons/svg/machine.svg | 1 + src/icons/svg/machiningHoursStatistics.svg | 1 + src/utils/request.js | 1 + src/views/Inventory/Inboundscanning/index.vue | 14 +- .../AntonMonitoring/index.vue | 153 ++++++++++++++++++ 8 files changed, 190 insertions(+), 7 deletions(-) create mode 100644 src/api/ManufacturingCenter/AntonMonitoring.js create mode 100644 src/icons/svg/AntonMonitoring.svg create mode 100644 src/icons/svg/OutPartSelect.svg create mode 100644 src/icons/svg/machine.svg create mode 100644 src/icons/svg/machiningHoursStatistics.svg create mode 100644 src/views/ManufacturingCenter/AntonMonitoring/index.vue diff --git a/src/api/ManufacturingCenter/AntonMonitoring.js b/src/api/ManufacturingCenter/AntonMonitoring.js new file mode 100644 index 00000000..d5b48e32 --- /dev/null +++ b/src/api/ManufacturingCenter/AntonMonitoring.js @@ -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' + } + }) +} + diff --git a/src/icons/svg/AntonMonitoring.svg b/src/icons/svg/AntonMonitoring.svg new file mode 100644 index 00000000..9fc12cb7 --- /dev/null +++ b/src/icons/svg/AntonMonitoring.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/OutPartSelect.svg b/src/icons/svg/OutPartSelect.svg new file mode 100644 index 00000000..d599116b --- /dev/null +++ b/src/icons/svg/OutPartSelect.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/machine.svg b/src/icons/svg/machine.svg new file mode 100644 index 00000000..efcc00d2 --- /dev/null +++ b/src/icons/svg/machine.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/machiningHoursStatistics.svg b/src/icons/svg/machiningHoursStatistics.svg new file mode 100644 index 00000000..759825ae --- /dev/null +++ b/src/icons/svg/machiningHoursStatistics.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/utils/request.js b/src/utils/request.js index 0a45cef9..fc9ff291 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -5,6 +5,7 @@ import axios from 'axios' export const wsuri = `ws://192.168.1.232:61101//WebMoudule//websocket` export const name = `OP8888` +export const name1 = `OP1000` // 创建axios实例 export const readFile = `http://192.168.1.231:8411/webpage/file/` // invoice diff --git a/src/views/Inventory/Inboundscanning/index.vue b/src/views/Inventory/Inboundscanning/index.vue index 183499a8..c2502792 100644 --- a/src/views/Inventory/Inboundscanning/index.vue +++ b/src/views/Inventory/Inboundscanning/index.vue @@ -172,7 +172,7 @@ export default { this.Partpaint = response.data[0].零件图号 return this.Partpaint }).then(() => { - this. getCraftNumber() + this.getCraftNumber() }) // this.getscantable() }, @@ -188,27 +188,27 @@ export default { } else { this.listLoading = true searchTable(this.partNumber).then(response => { - if(response.data.length === 0) { + if (response.data.length === 0) { this.listLoading = false this.$notify({ title: '警告', message: '该零件未加工完成', type: 'warning' }) - }else { + } 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].工艺计划流水号 + '已入库', + message: 'P' + response.data[i].工艺计划流水号 + '已入库', type: 'warning' }) } else if (response.data[i].考核状态 === 9) { this.listLoading = false this.$notify({ title: '警告', - message: 'P' + response.data[i].工艺计划流水号 + '已出库', + message: 'P' + response.data[i].工艺计划流水号 + '已出库', type: 'warning' }) } else if (response.data[i].考核状态 === 7) { @@ -223,7 +223,7 @@ export default { 机床图号: response.data[i].机床图号, 零件图号: response.data[i].零件图号 }) - let hash = {}; // 一个新数组,data为你需要去重的数组,newData用于接收去重后的数组, curVal.去重条件 + const hash = {} // 一个新数组,data为你需要去重的数组,newData用于接收去重后的数组, curVal.去重条件 this.tableDataNum = this.tableData.reduce((preVal, curVal) => { hash[curVal.工艺计划流水号] ? '' : hash[curVal.工艺计划流水号] = true && preVal.push({ 工艺计划流水号: curVal.工艺计划流水号, @@ -234,7 +234,7 @@ export default { innumber: curVal.innumber, capture: '', note: '' - }); + }) return preVal }, []) } diff --git a/src/views/ManufacturingCenter/AntonMonitoring/index.vue b/src/views/ManufacturingCenter/AntonMonitoring/index.vue new file mode 100644 index 00000000..f3025d4f --- /dev/null +++ b/src/views/ManufacturingCenter/AntonMonitoring/index.vue @@ -0,0 +1,153 @@ + + + + + From dfd3fb5d7fd095e033ea109221a7a4f7b7be633d Mon Sep 17 00:00:00 2001 From: liushuai Date: Mon, 13 May 2019 15:51:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A4=96=E5=8D=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectPlanningManagement/index.vue | 18 +++++ .../ProjectPlanningQuery/index.vue | 67 +++++++++++++++++-- .../OutsourcingTaskExecution/index.vue | 2 +- .../Outsourcing/PreorderAssociation/index.vue | 56 ++++++++++++++++ .../ImportParts/specificationData.vue | 2 +- .../StockPreparation/index.vue | 2 +- 6 files changed, 138 insertions(+), 9 deletions(-) diff --git a/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue b/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue index 2a4deda7..fbd5794b 100644 --- a/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue +++ b/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue @@ -75,6 +75,16 @@ {{ scope.row.发货节点 }} + + + + + + + + + + + +