@@ -1809,7 +1831,8 @@
-
+ {{ Machine }} : 总装调试
+
@@ -1839,7 +1862,7 @@
{{ scope.row.机床名称 ? scope.row.机床名称 : '--' }}
-
+
{{ 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 @@