|
|
@@ -626,19 +626,10 @@
|
|
|
});
|
|
|
}
|
|
|
return list;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- data() {
|
|
|
- return {
|
|
|
- localPickDetails: [],
|
|
|
- localOutputDetails: [],
|
|
|
- // bom配置的 标准产出信息
|
|
|
- materialQuotaInfo: null,
|
|
|
- // 在制品信息
|
|
|
- categoryInfo: null,
|
|
|
- // 产出清单表头
|
|
|
- outputDetailsColumns: [
|
|
|
+ },
|
|
|
+ // 产出清单表头
|
|
|
+ outputDetailsColumns() {
|
|
|
+ return [
|
|
|
{
|
|
|
width: 45,
|
|
|
type: 'index',
|
|
|
@@ -711,8 +702,17 @@
|
|
|
label: '已报工数量',
|
|
|
prop: 'sumReportQuantity',
|
|
|
minWidth: 120,
|
|
|
- formatter(row) {
|
|
|
- return (row.sumReportQuantity || 0) + row.unit;
|
|
|
+ formatter: (row) => {
|
|
|
+ let count = row.sumReportQuantity || 0;
|
|
|
+
|
|
|
+ if (this.executeStatus === 2) {
|
|
|
+ // 已执行,处理重新一键报工时,sumReportQuantity包含了当前报工数量
|
|
|
+ count += row.reportQuantity - row.reportQuantityCopy;
|
|
|
+ } else {
|
|
|
+ count += row.reportQuantity;
|
|
|
+ }
|
|
|
+
|
|
|
+ return count + (row.unit || '');
|
|
|
},
|
|
|
headerSlot: 'sumReportQuantityHeader'
|
|
|
},
|
|
|
@@ -720,8 +720,32 @@
|
|
|
label: '合格总数',
|
|
|
prop: 'sumQualifiedQuantity',
|
|
|
minWidth: 120,
|
|
|
- formatter(row) {
|
|
|
- return (row.sumQualifiedQuantity || 0) + (row.unit || '');
|
|
|
+ formatter: (row) => {
|
|
|
+ // 已报工数量
|
|
|
+ let sumReportQuantity = row.sumReportQuantity || 0;
|
|
|
+
|
|
|
+ if (this.executeStatus === 2) {
|
|
|
+ // 已执行,处理重新一键报工时,sumReportQuantity包含了当前报工数量
|
|
|
+ sumReportQuantity +=
|
|
|
+ row.reportQuantity - row.reportQuantityCopy;
|
|
|
+ } else {
|
|
|
+ sumReportQuantity += row.reportQuantity;
|
|
|
+ }
|
|
|
+
|
|
|
+ let count = row.sumQualifiedQuantity || 0;
|
|
|
+
|
|
|
+ if (this.executeStatus === 2) {
|
|
|
+ // 已执行,处理重新一键报工时,sumQualifiedQuantity包含了当前报工数量
|
|
|
+ count += row.qualifiedQuantity - row.qualifiedQuantityCopy;
|
|
|
+ } else {
|
|
|
+ count += row.qualifiedQuantity;
|
|
|
+ }
|
|
|
+ // 处理缓存后,物料被其他工单报工超出已报工数量问题
|
|
|
+ if (count > sumReportQuantity) {
|
|
|
+ count = sumReportQuantity;
|
|
|
+ }
|
|
|
+
|
|
|
+ return count + (row.unit || '');
|
|
|
},
|
|
|
headerSlot: 'sumQualifiedQuantityHeader'
|
|
|
},
|
|
|
@@ -729,12 +753,47 @@
|
|
|
label: '不合格总数',
|
|
|
prop: 'sumNoQualifiedQuantity',
|
|
|
minWidth: 120,
|
|
|
- formatter(row) {
|
|
|
- return (row.sumNoQualifiedQuantity || 0) + (row.unit || '');
|
|
|
+ formatter: (row) => {
|
|
|
+ // 已报工数量
|
|
|
+ let sumReportQuantity = row.sumReportQuantity || 0;
|
|
|
+
|
|
|
+ if (this.executeStatus === 2) {
|
|
|
+ // 已执行,处理重新一键报工时,sumReportQuantity包含了当前报工数量
|
|
|
+ sumReportQuantity +=
|
|
|
+ row.reportQuantity - row.reportQuantityCopy;
|
|
|
+ } else {
|
|
|
+ sumReportQuantity += row.reportQuantity;
|
|
|
+ }
|
|
|
+
|
|
|
+ let count = row.sumNoQualifiedQuantity || 0;
|
|
|
+
|
|
|
+ if (this.executeStatus === 2) {
|
|
|
+ // 已执行,处理重新一键报工时,sumNoQualifiedQuantity包含了当前报工数量
|
|
|
+ count += row.noQualifiedQuantity - row.noQualifiedQuantityCopy;
|
|
|
+ } else {
|
|
|
+ count += row.noQualifiedQuantity;
|
|
|
+ }
|
|
|
+ // 处理缓存后,物料被其他工单报工超出已报工数量问题
|
|
|
+ if (count > sumReportQuantity) {
|
|
|
+ count = sumReportQuantity;
|
|
|
+ }
|
|
|
+
|
|
|
+ return count + (row.unit || '');
|
|
|
},
|
|
|
headerSlot: 'sumNoQualifiedQuantityHeader'
|
|
|
}
|
|
|
- ]
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ localPickDetails: [],
|
|
|
+ localOutputDetails: [],
|
|
|
+ // bom配置的 标准产出信息
|
|
|
+ materialQuotaInfo: null,
|
|
|
+ // 在制品信息
|
|
|
+ categoryInfo: null
|
|
|
};
|
|
|
},
|
|
|
methods: {
|