From a23217515d6de95d8b64c534ec1c5c4c5dc2256b Mon Sep 17 00:00:00 2001 From: liushuai Date: Tue, 9 Apr 2019 09:25:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectPlanningManagement.js | 2 +- src/api/TechnologyCenter/ImportParts.js | 8 +- src/api/WorkshopProcurement/costStatistics.js | 2 +- .../ProjectPlanningManagement/index.vue | 2 + .../ProjectPlanningQuery/index.vue | 137 +++++++++++++++--- .../ImportParts/specificationData.vue | 4 +- .../TechnologyCenter/QueryParts/index.vue | 10 ++ .../costStatistics/index.vue | 68 +++++++-- 8 files changed, 189 insertions(+), 44 deletions(-) diff --git a/src/api/ManufacturingCenter/ProjectPlanningManagement.js b/src/api/ManufacturingCenter/ProjectPlanningManagement.js index 0da69aef..3ef4db21 100644 --- a/src/api/ManufacturingCenter/ProjectPlanningManagement.js +++ b/src/api/ManufacturingCenter/ProjectPlanningManagement.js @@ -6,7 +6,7 @@ export function getProject() { method: 'post', data: { type: '1', - name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改' + name: 'PDM_项目名称_查询数据' } }) } diff --git a/src/api/TechnologyCenter/ImportParts.js b/src/api/TechnologyCenter/ImportParts.js index 6fbc0f6b..cf30cebf 100644 --- a/src/api/TechnologyCenter/ImportParts.js +++ b/src/api/TechnologyCenter/ImportParts.js @@ -279,14 +279,14 @@ export function allDelete(project, machine, group) { }) } // 传递零件 -export function transferMX(num1, name, num2, remark, mark, num3, num4, num5, num7, type, transmit, num6, id, Num) { +export function transferMX(num1, name, num2, remark, mark, num3, num4, num5, num7, type, transmit, num6, id, Num, Num1) { return request({ url: '', method: 'post', data: { type: '2', name: 'PDM_零件明细表_基本件_大量导入', - param: '图号或者型号=' + num1 + '&零件名称=' + name + '&零件数量=' + num2 + '&零件备注\\=' + remark + '&标记=' + mark + '&设计者编号=' + num3 + '&组件流水号=' + num4 + '&材料流水号=' + num5 + '&规格\\=' + num7 + '&数据类型=' + type + '&是否传递=' + transmit + '&序号=' + num6 + '&id=' + id + '&备件数量=' + Num + param: '图号或者型号=' + num1 + '&零件名称=' + name + '&零件数量=' + num2 + '&零件备注\\=' + remark + '&标记=' + mark + '&设计者编号=' + num3 + '&组件流水号=' + num4 + '&材料流水号=' + num5 + '&规格\\=' + num7 + '&数据类型=' + type + '&是否传递=' + transmit + '&序号=' + num6 + '&id=' + id + '&备件数量=' + Num + '&部件数量=' + Num1 } }) } @@ -302,14 +302,14 @@ export function transferMX1(num1, name, num2, remark, mark, num3, num4, num5, nu } }) } -export function transferWG(groupNum, materialNum, totalNum, remarks, mark, designNum, isTransfer, dataType, No, id, Num) { +export function transferWG(groupNum, materialNum, totalNum, remarks, mark, designNum, isTransfer, dataType, No, id, Num, Num1) { return request({ url: '', method: 'post', data: { type: '2', name: 'PDM_零件明细表_标准件和外购件_大量导入', - param: `组件流水号=${groupNum}&物料流水号=${materialNum}&零件数量=${totalNum}&备注\\=${remarks}&标记=${mark}&设计者编号=${designNum}&是否传递=${isTransfer}&数据类型=${dataType}&序号=${No}&id=${id}&备件数量=${Num}` + param: `组件流水号=${groupNum}&物料流水号=${materialNum}&零件数量=${totalNum}&备注\\=${remarks}&标记=${mark}&设计者编号=${designNum}&是否传递=${isTransfer}&数据类型=${dataType}&序号=${No}&id=${id}&备件数量=${Num}&部件数量=${Num1}` } }) } diff --git a/src/api/WorkshopProcurement/costStatistics.js b/src/api/WorkshopProcurement/costStatistics.js index cb5b293f..dd3a241c 100644 --- a/src/api/WorkshopProcurement/costStatistics.js +++ b/src/api/WorkshopProcurement/costStatistics.js @@ -16,7 +16,7 @@ export function searchPurchase(num) { method: 'post', data: { type: '1', - name: 'PDM_项目名称_查询数据_成本分析', + name: '采购管理_项目采购总价_成本分析_查询数据', param: '项目流水号=' + num } }) diff --git a/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue b/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue index 5044af69..8e9a9397 100644 --- a/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue +++ b/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue @@ -486,6 +486,7 @@ export default { 接收任务时间: response.data[i].接收任务时间, 任务开始时间: response.data[i].任务开始时间, 计划完成时间: response.data[i].计划完成时间, + 货期: response.data[i].货期, 实际完成时间: response.data[i].实际完成时间, 备注: response.data[i].备注 }) @@ -539,6 +540,7 @@ export default { 接收任务时间: response.data[i].接收任务时间, 任务开始时间: response.data[i].任务开始时间, 计划完成时间: response.data[i].计划完成时间, + 货期: response.data[i].货期, 实际完成时间: response.data[i].实际完成时间, 备注: response.data[i].备注 }) diff --git a/src/views/ManufacturingCenter/ProjectPlanningQuery/index.vue b/src/views/ManufacturingCenter/ProjectPlanningQuery/index.vue index 83562e30..8bcd4ea6 100644 --- a/src/views/ManufacturingCenter/ProjectPlanningQuery/index.vue +++ b/src/views/ManufacturingCenter/ProjectPlanningQuery/index.vue @@ -52,7 +52,9 @@ - + + + 查询 @@ -108,17 +110,22 @@ - + + + + @@ -143,17 +150,22 @@ - + + + + @@ -178,17 +190,22 @@ - + + + + @@ -213,17 +230,22 @@ - + + + + @@ -248,17 +270,22 @@ - + + + + @@ -282,6 +309,18 @@ export default { machine: [], loading: false, loading1: false, + now: '', + arrival: [], + judge: [], + arrival1: [], + judge1: [], + arrival2: [], + judge2: [], + arrival3: [], + judge3: [], + arrival4: [], + judge4: [], + warningValue: '', tableData: [], // 表格数据 tableData1: [], // 表格数据 tableData2: [], // 表格数据 @@ -318,6 +357,7 @@ export default { this.tableData3 = [] this.tableData4 = [] this.tableData5 = [] + this.now = new Date() if (this.projectValue !== '') { if (this.machineValue !== '') { searchtable(this.projectValue, this.machineValue).then(response => { @@ -334,12 +374,23 @@ export default { }).then(() => { searchtable2(this.machineValue, 1).then(response => { for (let i = 0; i < response.data.length; i++) { + // this.arrival.push(new Date(response.data[i].计划完成时间)) + // if ((this.arrival[i] - this.now) > 0 && (this.arrival[i] - this.now) < (86400000 * this.warningValue)) { + // this.judge[i] = 1 // 即将拖期 + // } else if ((this.arrival[i] - this.now) < 0) { + // this.judge[i] = 2 // 已拖期 + // } else if ((this.arrival[i] - this.now) > (86400000 * this.warningValue)) { + // this.judge[i] = 3 // 进度正常 + // } 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.loading1 = false console.log(response.data, 2) @@ -347,12 +398,23 @@ export default { }) searchtable2(this.machineValue, 2).then(response => { for (let i = 0; i < response.data.length; i++) { + // this.arrival1.push(new Date(response.data[i].计划完成时间)) + // if ((this.arrival1[i] - this.now) > 0 && (this.arrival1[i] - this.now) < (86400000 * this.warningValue)) { + // this.judge1[i] = 1 // 即将拖期 + // } else if ((this.arrival1[i] - this.now) < 0) { + // this.judge1[i] = 2 // 已拖期 + // } else if ((this.arrival1[i] - this.now) > (86400000 * this.warningValue)) { + // this.judge1[i] = 3 // 进度正常 + // } 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.loading1 = false console.log(response.data, 3) @@ -360,12 +422,23 @@ export default { }) searchtable2(this.machineValue, 3).then(response => { for (let i = 0; i < response.data.length; i++) { + // this.arrival2.push(new Date(response.data[i].计划完成时间)) + // if ((this.arrival2[i] - this.now) > 0 && (this.arrival2[i] - this.now) < (86400000 * this.warningValue)) { + // this.judge2[i] = 1 // 即将拖期 + // } else if ((this.arrival2[i] - this.now) < 0) { + // this.judge2[i] = 2 // 已拖期 + // } else if ((this.arrival[i] - this.now) > (86400000 * this.warningValue)) { + // this.judge2[i] = 3 // 进度正常 + // } 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.loading1 = false console.log(response.data, 4) @@ -373,12 +446,23 @@ export default { }) searchtable2(this.machineValue, 4).then(response => { for (let i = 0; i < response.data.length; i++) { + // this.arrival3.push(new Date(response.data[i].计划完成时间)) + // if ((this.arrival3[i] - this.now) > 0 && (this.arrival3[i] - this.now) < (86400000 * this.warningValue)) { + // this.judge3[i] = 1 // 即将拖期 + // } else if ((this.arrival3[i] - this.now) < 0) { + // this.judge3[i] = 2 // 已拖期 + // } else if ((this.arrival3[i] - this.now) > (86400000 * this.warningValue)) { + // this.judge3[i] = 3 // 进度正常 + // } 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.loading1 = false console.log(response.data, 5) @@ -386,12 +470,23 @@ export default { }) searchtable2(this.machineValue, 5).then(response => { for (let i = 0; i < response.data.length; i++) { + // this.arrival4.push(new Date(response.data[i].计划完成时间)) + // if ((this.arrival4[i] - this.now) > 0 && (this.arrival4[i] - this.now) < (86400000 * this.warningValue)) { + // this.judge4[i] = 1 // 即将拖期 + // } else if ((this.arrival3[i] - this.now) < 0) { + // this.judge4[i] = 2 // 已拖期 + // } else if ((this.arrival3[i] - this.now) > (86400000 * this.warningValue)) { + // this.judge4[i] = 3 // 进度正常 + // } 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.loading1 = false console.log(response.data, 6) diff --git a/src/views/TechnologyCenter/ImportParts/specificationData.vue b/src/views/TechnologyCenter/ImportParts/specificationData.vue index d5204623..23914e1c 100644 --- a/src/views/TechnologyCenter/ImportParts/specificationData.vue +++ b/src/views/TechnologyCenter/ImportParts/specificationData.vue @@ -542,7 +542,7 @@ export default { const data = this.tableDataAll[i] console.log(data) const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量) - const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.规格, 1, data.是否传递, data.序号, data.id, data.备件数量) + const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.规格, 1, data.是否传递, data.序号, data.id, data.备件数量, data.部件数量) await sleep(10) if (resp.data[0].result === '0') { this.err++ @@ -558,7 +558,7 @@ export default { } else { dataType = 1 } - const resp = await transferWG(data.组件流水号, data.物料流水号, total, data.备注, data.标记, data.设计者编号, data.是否传递, dataType, data.序号, data.id, data.备件数量) + const resp = await transferWG(data.组件流水号, data.物料流水号, total, data.备注, data.标记, data.设计者编号, data.是否传递, dataType, data.序号, data.id, data.备件数量, data.部件数量) await sleep(10) if (resp.data[0].result === '0') { this.err++ diff --git a/src/views/TechnologyCenter/QueryParts/index.vue b/src/views/TechnologyCenter/QueryParts/index.vue index beae4984..8b8946d9 100644 --- a/src/views/TechnologyCenter/QueryParts/index.vue +++ b/src/views/TechnologyCenter/QueryParts/index.vue @@ -73,6 +73,11 @@ align="center"> + + + + + + -