This commit is contained in:
liushuai
2020-05-14 18:17:03 +08:00
parent e1d611f964
commit 990052a70e
17 changed files with 200 additions and 45 deletions

View File

@@ -1586,19 +1586,19 @@
{{ scope.row.组件名称 ? scope.row.组件名称 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="总基本件数" width="120px">
<el-table-column align="center" label="总外购件数" width="120px">
<template slot-scope="scope">
{{ scope.row.基本件数 ? scope.row.基本件数: '0' }}
{{ scope.row.外购件数 ? scope.row.外购件数: '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="已采购基本件数" width="120px">
<el-table-column align="center" label="已采购外购件数" width="120px">
<template slot-scope="scope">
{{ scope.row.已采购基本件数 ? scope.row.已采购基本件数 : 0 }}
{{ scope.row.已采购外购件数 ? scope.row.已采购外购件数 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="总到货数基本件数" width="120px">
<el-table-column align="center" label="总到货数外购件数" width="120px">
<template slot-scope="scope">
{{ scope.row.总到货数基本件数 ? scope.row.总到货数基本件数 : 0 }}
{{ scope.row.总到货数外购件数 ? scope.row.总到货数外购件数 : 0 }}
</template>
</el-table-column>
</el-table>
@@ -3777,14 +3777,14 @@ export default {
type: '3',
name: `
select 组号,组件名称
,SUM(基本件数) as 总基本件数
,SUM(已采购基本件数) as 已采购基本件数
,SUM(已到货基本件数 ) as 总到货数基本件数
,SUM(外购件数) as 总外购件数
,SUM(已采购外购件数) as 已采购外购件数
,SUM(已到货外购件数 ) as 总到货数外购件数
from (
select 组号,组件名称,
(select COUNT(*) where 机床流水号 =${this.machineValue1} and 标准件和外购件流水号 is not null) as 基本件数,
(select COUNT(*) where 机床流水号 =${this.machineValue1} and 标准件和外购件流水号 is not null and 采购合同明细流水号 is not null) as 已采购基本件数,
(select COUNT(*) where 机床流水号 =${this.machineValue1} and 标准件和外购件流水号 is not null and isnull(零件数量,0) = isnull(已到货数量,0)) as 已到货基本件数
(select COUNT(*) where 机床流水号 =${this.machineValue1} and 标准件和外购件流水号 is not null) as 外购件数,
(select COUNT(*) where 机床流水号 =${this.machineValue1} and 标准件和外购件流水号 is not null and 采购合同明细流水号 is not null) as 已采购外购件数,
(select COUNT(*) where 机床流水号 =${this.machineValue1} and 标准件和外购件流水号 is not null and isnull(零件数量,0) = isnull(已到货数量,0)) as 已到货外购件数
from 车间采购_综合查询视图 where 机床流水号 =${this.machineValue1}
) as a
group by a.组号,a.组件名称 order by 组号`