From f1c18d2b12d664b2bbef59847e7d6562abf29db3 Mon Sep 17 00:00:00 2001 From: liushuai Date: Wed, 25 Sep 2019 20:12:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ManufacturingCenter/PartAssignment.js | 11 ++ .../ManufacturingCenter/ParseQuery/index.vue | 181 +++++++++++------- .../PartAssignment/index.vue | 28 ++- 3 files changed, 150 insertions(+), 70 deletions(-) diff --git a/src/api/ManufacturingCenter/PartAssignment.js b/src/api/ManufacturingCenter/PartAssignment.js index 891c63a9..518303d7 100644 --- a/src/api/ManufacturingCenter/PartAssignment.js +++ b/src/api/ManufacturingCenter/PartAssignment.js @@ -285,3 +285,14 @@ export function editNum(num, num1) { } }) } +export function OutPart(num) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '零件分配_移出数据', + param: '基本件流水号=' + num + } + }) +} diff --git a/src/views/ManufacturingCenter/ParseQuery/index.vue b/src/views/ManufacturingCenter/ParseQuery/index.vue index 73410eed..cf2d334a 100644 --- a/src/views/ManufacturingCenter/ParseQuery/index.vue +++ b/src/views/ManufacturingCenter/ParseQuery/index.vue @@ -5,133 +5,134 @@
-
角色:装配部
根据营销部门发出发货请求,
装配部进行发货
+
单击查看发货详情
发货
-
角色:质检部
对机床进行总装调试
- 总装调试 +
总装开始时间:{{ `${data2[0].总装调试}` }}
总装结束时间:{{ `${data2[0].机床装配实际完成时间}` }}
+ 总装调试
{{ `${data2[0].机床装配实际完成时间}` }}
+ 总装调试
{{ `${data2[0].总装调试}` }}
-
角色:质检部
对机床重要部件进行检测
+
装配质检合格率:{{ `${data2[0].装配质检}%` }}
装配质检
{{ `${data2[0].装配质检}%` }}
-
角色:电气部
电气部长制定装配计划,
并记录计划执行情况
+
电气装配计划完成率:{{ `${data2[0].电气装配}%` }}
电气装配
{{ `${data2[0].电气装配}%` }}
-

角色:装配部长
装配部长制定装配计划,
并记录计划执行情况
+
机械装配计划完成率:{{ `${data2[0].机械装配}%` }}
机械装配
{{ `${data2[0].机械装配}%` }}
-
角色:冷作车间主任
冷作车间主任制定冷作计划,
并记录计划执行情况
+
冷作计划完成率:{{ `${data2[0].冷作}%` }}
冷作
{{ `${data2[0].冷作}%` }}
-
角色:油漆车间主任
油漆车间主任制定装配计划,
并记录计划执行情况
+
油漆计划完成率:{{ `${data2[0].油漆}%` }}
油漆
{{ `${data2[0].油漆}%` }}
-
角色:装配部长
此模块用于查询某机床是否达到装配条件,
即采购件与自制件是否成组配套
+
成组配套率:{{ `${data2[0].成组配套}%` }}
成组配套
{{ `${data2[0].成组配套}%` }}
-
角色:质检部
对自制件进行检测
+
自制质检合格率:{{ `${data2[0].自制质检}%` }}
自制质检
{{ `${data2[0].自制质检}%` }}
-
角色:质检部
对采购件进行检测
- 采购质检
{{ `${data2[0].采购质检}%` }}
+
采购质检合格率:{{ `${data2[0].采购质检}%` }}
+ 采购质检
{{ `${data2[0].采购质检 === 0 ? data2[0].采购质检 : '-'}%` }}
-
角色:金工车间
接收加工任务并使用
MES工作站进行报工
+
车间加工计划完成率:{{ `${data2[0].车间加工}%` }}
车间加工
{{ `${data2[0].车间加工}%` }}
-
角色:外协员
进行外协加工
+
外协计划完成率:{{ `${data2[0].外协}%` }}
工序外协
{{ `${data2[0].外协}%` }}
-
角色:计划员
针对做完工艺定额的零件进行排查
+
能力平衡计划完成率:{{ `${data2[0].能力平衡}%` }}
能力平衡
{{ `${data2[0].能力平衡}%` }}
-
角色:工艺部
制定零件工艺定额
+
工艺定额计划完成率:{{ `${data2[0].工艺定额}%` }}
工艺定额
{{ `${data2[0].工艺定额}%` }}
-
角色:下料员
对于钢板等自家备料
下料员需要在系统确认备料
并通知金工领料
+
自家备料计划完成率:{{ `${data2[0].自家备料}%` }}
自家备料
{{ `${data2[0].自家备料}%` }}
- - - - 签订合同
{{ `${data2[0].签订合同}%` }}
+ +
回款进度:{{ `${data2[0].签订合同}%` }}
+ 签订合同
{{ `${data2[0].签订合同}%` }}
+
-
角色:技术员
负责导入三表(零件),
组件在项目启动会时提出,
由制造总监导入
+
产品设计计划完成率:{{ `${data2[0].产品设计}%` }}
产品设计
{{ `${data2[0].产品设计}%` }}
-
角色:下料员
外购物料到货后,由下料员确认备料,
并通知金工领料
+
外购备料计划完成率:{{ `${data2[0].外购备料}%` }}
外购备料
{{ `${data2[0].外购备料}%` }}
-
角色:计划员
计划员负责将三表中的零件按实际情况分配为:
自制件、采购部采购件、制造部采购件三类
+
零件分配计划完成率:{{ `${data2[0].零件分配}%` }}
零件分配
{{ `${data2[0].零件分配}%` }}
-
角色:计划员
计划员分配零件后,
在生产计划下达模块
可查看到自家加工的零件任务,
计划员需要将这些零件投产
- 自制件
{{ `${data2[0].自制件}%` }}
+
自制投产计划完成率:{{ `${data2[0].自制件}%` }}
+ 自制投产
{{ `${data2[0].自制件}%` }}
-
角色:制造部长
计划员分配零件后,
将分配到制造部的采购件进行采购
+
采购计划完成率:{{ `${data2[0].车间采购}%` }}
车间采购
{{ `${data2[0].车间采购}%` }}
-
角色:采购部
计划员分配零件后,
将分配到采购部的采购件进行采购
+
采购计划完成率:{{ `${data2[0].采购部采购}%` }}
采购部采购
{{ `${data2[0].采购部采购}%` }}
@@ -216,7 +217,8 @@
- +

{{ Machine }} : 签订合同

+
@@ -308,7 +310,8 @@
- +

{{ Machine }} : 产品设计

+
@@ -353,17 +356,17 @@ {{ scope.row.任务名称 ? scope.row.任务名称 : '--' }} - + - + - + @@ -382,7 +385,8 @@
- +

{{ Machine }} : 零件分配

+
@@ -458,7 +462,8 @@
- +

{{ Machine }} : 自制投产

+
@@ -522,7 +527,8 @@
- +

{{ Machine }} : 机械装配

+
@@ -590,7 +596,8 @@
- +

{{ Machine }} : 电气装配

+
@@ -658,7 +665,8 @@
- +

{{ Machine }} : 冷作

+
@@ -726,7 +734,8 @@
- +

{{ Machine }} : 油漆

+
@@ -794,7 +803,8 @@
- +

{{ Machine }} : 成组配套

+
- +

{{ Machine }} : 车间加工

+
@@ -999,7 +1010,8 @@
- +

{{ Machine }} : 自家备料

+
@@ -1055,7 +1067,8 @@
- +

{{ Machine }} : 自制件质检

+
@@ -1106,10 +1119,11 @@
- +
- +

{{ Machine }} : 工艺定额

+
@@ -1222,7 +1236,8 @@
- +

{{ Machine }} : 能力平衡

+
@@ -1278,7 +1293,8 @@
-
+

{{ Machine }} : 发货

+
- +

{{ Machine }} : 采购部采购

+
- +

{{ Machine }} : 车间采购

+
- +

{{ Machine }} : 工序外协

+
@@ -1630,7 +1649,8 @@
- +

{{ Machine }} : 采购质检

+
@@ -1684,7 +1704,8 @@
- +

{{ Machine }} : 外购备料

+
- +

{{ Machine }} : 装配质检

+ @@ -1809,7 +1831,8 @@
- +

{{ Machine }} : 总装调试

+ @@ -1839,7 +1862,7 @@ {{ scope.row.机床名称 ? scope.row.机床名称 : '--' }} - + @@ -1877,6 +1900,7 @@ export default { data() { return { Purchase: '', + Machine: '', WorkPurchase: '', Outsourcing: '', Home: '', @@ -2282,6 +2306,7 @@ export default { async handleSelect(row) { // 在此方法中可以把下拉框选中值中的内容赋值给其他变量使用 this.machineValue1 = row.机床流水号 + this.Machine = row.机床图号 this.machineValue1 ? this.disabled = false : this.disabled = true this.showDiv1 = false this.showDiv2 = false @@ -2307,6 +2332,26 @@ export default { this.showDiv0 = true await searchAll(this.machineValue1).then(response => { this.isActive = true + if (response.data[0].自制质检 === '') { + response.data[0].自制质检 = '-' + } + if (response.data[0].采购质检 === '') { + response.data[0].采购质检 = '-' + } + if (response.data[0].装配质检 === '') { + response.data[0].装配质检 = '-' + } + if (response.data[0].总装调试 === '1900-01-01 00:00:00.000') { + response.data[0].总装调试 = '-' + } else { + response.data[0].总装调试 = response.data[0].总装调试.split(' ')[0] + } + console.log(response.data[0].机床装配实际完成时间, 123) + if (response.data[0].机床装配实际完成时间 === '1900-01-01 00:00:00') { + response.data[0].机床装配实际完成时间 = '-' + } else { + response.data[0].机床装配实际完成时间 = response.data[0].机床装配实际完成时间.split(' ')[0] + } this.data2 = response.data if (response.data[0].签订合同 === 0) { this.color[0] = 'weikaishi' } else if (response.data[0].签订合同 !== 0 && response.data[0].签订合同 !== 100) { this.color[0] = 'jixingzhong' } else if (response.data[0].签订合同 === 100) { this.color[0] = 'yiwancheng' } if (response.data[0].产品设计 === 0) { this.color[1] = 'weikaishi' } else if (response.data[0].产品设计 !== 0 && response.data[0].产品设计 !== 100) { this.color[1] = 'jixingzhong' } else if (response.data[0].产品设计 === 100) { this.color[1] = 'yiwancheng' } @@ -2320,16 +2365,16 @@ export default { if (response.data[0].能力平衡 === 0) { this.color[10] = 'weikaishi' } else if (response.data[0].能力平衡 !== 0 && response.data[0].能力平衡 !== 100) { this.color[10] = 'jixingzhong' } else if (response.data[0].能力平衡 === 100) { this.color[10] = 'yiwancheng' } if (response.data[0].外协 === 0) { this.color[11] = 'weikaishi' } else if (response.data[0].外协 !== 0 && response.data[0].外协 !== 100) { this.color[11] = 'jixingzhong' } else if (response.data[0].外协 === 100) { this.color[11] = 'yiwancheng' } if (response.data[0].车间加工 === 0) { this.color[12] = 'weikaishi' } else if (response.data[0].车间加工 !== 0 && response.data[0].车间加工 !== 100) { this.color[12] = 'jixingzhong' } else if (response.data[0].车间加工 === 100) { this.color[12] = 'yiwancheng' } - if (response.data[0].采购质检 === 0) { this.color[13] = 'weikaishi' } else if (response.data[0].采购质检 !== 0 && response.data[0].采购质检 !== 100) { this.color[13] = 'jixingzhong' } else if (response.data[0].采购质检 === 100) { this.color[13] = 'yiwancheng' } - if (response.data[0].自制质检 === 0) { this.color[14] = 'weikaishi' } else if (response.data[0].自制质检 !== 0 && response.data[0].自制质检 !== 100) { this.color[14] = 'jixingzhong' } else if (response.data[0].自制质检 === 100) { this.color[14] = 'yiwancheng' } + if (response.data[0].采购质检 === '-') { this.color[13] = 'weikaishi' } else { this.color[13] = 'jixingzhong' } + if (response.data[0].自制质检 === '-') { this.color[14] = 'weikaishi' } else { this.color[14] = 'jixingzhong' } if (response.data[0].成组配套 === 0) { this.color[15] = 'weikaishi' } else if (response.data[0].成组配套 !== 0 && response.data[0].成组配套 !== 100) { this.color[15] = 'jixingzhong' } else if (response.data[0].成组配套 === 100) { this.color[15] = 'yiwancheng' } if (response.data[0].油漆 === 0) { this.color[16] = 'weikaishi' } else if (response.data[0].油漆 !== 0 && response.data[0].油漆 !== 100) { this.color[16] = 'jixingzhong' } else if (response.data[0].油漆 === 100) { this.color[16] = 'yiwancheng' } if (response.data[0].冷作 === 0) { this.color[17] = 'weikaishi' } else if (response.data[0].冷作 !== 0 && response.data[0].冷作 !== 100) { this.color[17] = 'jixingzhong' } else if (response.data[0].冷作 === 100) { this.color[17] = 'yiwancheng' } if (response.data[0].机械装配 === 0) { this.color[18] = 'weikaishi' } else if (response.data[0].机械装配 !== 0 && response.data[0].机械装配 !== 100) { this.color[18] = 'jixingzhong' } else if (response.data[0].机械装配 === 100) { this.color[18] = 'yiwancheng' } if (response.data[0].电气装配 === 0) { this.color[19] = 'weikaishi' } else if (response.data[0].电气装配 !== 0 && response.data[0].电气装配 !== 100) { this.color[19] = 'jixingzhong' } else if (response.data[0].电气装配 === 100) { this.color[19] = 'yiwancheng' } - if (response.data[0].装配质检 === 0) { this.color[20] = 'weikaishi' } else if (response.data[0].装配质检 !== 0 && response.data[0].装配质检 !== 100) { this.color[20] = 'jixingzhong' } else if (response.data[0].装配质检 === 100) { this.color[20] = 'yiwancheng' } - if (response.data[0].总装调试 === 0) { this.color[21] = 'weikaishi' } else if (response.data[0].总装调试 !== 0 && response.data[0].总装调试 !== 100) { this.color[21] = 'jixingzhong' } else if (response.data[0].总装调试 === 100) { this.color[21] = 'yiwancheng' } - if (response.data[0].发货 === 0) { this.color[22] = 'weikaishi' } else if (response.data[0].发货 !== 0 && response.data[0].发货 !== 100) { this.color[22] = 'jixingzhong' } else if (response.data[0].发货 === 100) { this.color[22] = 'yiwancheng' } + if (response.data[0].装配质检 === '-') { this.color[20] = 'weikaishi' } else { this.color[20] = 'jixingzhong' } + if (response.data[0].总装调试状态 === 0) { this.color[21] = 'weikaishi' } else if (response.data[0].总装调试状态 === 1) { this.color[21] = 'jixingzhong' } else if (response.data[0].总装调试状态 === 2) { this.color[21] = 'yiwancheng' } + if (response.data[0].发货状态 === 0) { this.color[22] = 'weikaishi' } else if (response.data[0].发货状态 === 1) { this.color[22] = 'jixingzhong' } else if (response.data[0].发货状态 === 2) { this.color[22] = 'yiwancheng' } }) }, // 查询签订合同div数据 @@ -2442,7 +2487,7 @@ export default { method: 'post', data: { type: '3', - name: `select count(*) from PDM_组件名称 where 机床流水号=${this.machineValue1}` + name: `select count(*) from PDM_组件名称 where 机床流水号=${this.machineValue1} and 组号 <> '00组'` } }).then(res => { this.dataDiv2.组件总数 = res.data[0].Column1 @@ -2580,7 +2625,7 @@ export default { left join (select 组件流水号,count(*) as 外购件个数 from PDM_零件明细表_标准件和外购件 group by 组件流水号) as b on 综合查询_零件分配模块信息视图.组件流水号 = b.组件流水号 left join (select 组件流水号,count(*) as 基本件未分配个数 - from PDM_零件明细表_基本件 where 是否采购 = 0 and 是否传递 = 0 group by 组件流水号) as c on 综合查询_零件分配模块信息视图.组件流水号 = c.组件流水号 + from PDM_零件明细表_基本件 where 是否采购 = 0 and 是否传递 = 0 and 是否启用 = 0 group by 组件流水号) as c on 综合查询_零件分配模块信息视图.组件流水号 = c.组件流水号 left join (select 组件流水号,count(*) as 外购件未分配个数 from PDM_零件明细表_标准件和外购件 where 是否车间采购 = 0 group by 组件流水号) as d on 综合查询_零件分配模块信息视图.组件流水号 = d.组件流水号 where 机床流水号 = ${this.machineValue1} and 组号 <> '00组' order by 组号` @@ -3564,8 +3609,7 @@ export default { ,sum([数量]) as 检测总数量 ,sum([不合格数量]) as 不合格总数量 ,sum([批次数量]) as 零件总数量 - ,isnull(sum([不合格数量])/sum([数量]), 0) as 不合格率 - ,1 - isNull(sum([不合格数量])/sum([数量]), 0) as 合格率 + ,Convert(decimal(18,2),100 * (sum(isNull([数量],0))-sum(isNull([不合格数量],0)))/sum(isNull([数量],0))) as 合格率 FROM [质检管理_基本件数据_查询视图] where 机床流水号 = ${this.machineValue1} group by 组号, 组件名称 order by 组号` } @@ -3869,8 +3913,7 @@ export default { ,sum([数量]) as 检测总数量 ,sum([不合格数量]) as 不合格总数量 ,sum([零件数量]) as 零件总数量 - ,isnull(sum([不合格数量])/sum([数量]), 0) as 不合格率 - ,1 - isNull(sum([不合格数量])/sum([数量]), 0) as 合格率 + ,Convert(decimal(18,2),100*(sum(isNull([数量],0))-sum(isNull([不合格数量],0)))/sum(isNull([数量],0))) as 合格率 FROM ( select 组号,组件名称,数量,不合格数量,零件数量 from 质检管理_外购件制造部数据_查询视图 where 机床流水号 = ${this.machineValue1} union @@ -4444,7 +4487,7 @@ export default { margin: 0; } .showDiv{ - height: 380px; + height: 420px; } .el-button{ padding-top: 5px; diff --git a/src/views/ManufacturingCenter/PartAssignment/index.vue b/src/views/ManufacturingCenter/PartAssignment/index.vue index 72867631..4fa96189 100644 --- a/src/views/ManufacturingCenter/PartAssignment/index.vue +++ b/src/views/ManufacturingCenter/PartAssignment/index.vue @@ -99,6 +99,11 @@ {{ scope.row.零件备注 }} + + + @@ -584,7 +589,7 @@