|
|
@@ -1,8 +1,16 @@
|
|
|
-const qualityResultList = { 1: '合格', 2: '不合格' };
|
|
|
+const qualityResultList = { 1: '合格', 2: '不合格', 3: '让步接收' };
|
|
|
const disposalStatustList = { 0: '待处置', 1: '处置中', 2: '处置完成' };
|
|
|
+import { inspectionProjectStatus } from '@/enum/dict.js';
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ keyArr: [
|
|
|
+ 'lossNumber',
|
|
|
+ 'lossNumberUnqualified',
|
|
|
+ 'retainedSampleQuantity',
|
|
|
+ 'retainedSampleUnqualified'
|
|
|
+ ],
|
|
|
infoList: [
|
|
|
{
|
|
|
label: '编码',
|
|
|
@@ -44,13 +52,9 @@ export default {
|
|
|
prop: 'inspectionStandardsName',
|
|
|
span: 6
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- label: '质检部门',
|
|
|
- prop: 'groupName',
|
|
|
- span: 6
|
|
|
- },
|
|
|
- {
|
|
|
- label: '质检人',
|
|
|
+ label: '接收人',
|
|
|
prop: 'qualityName',
|
|
|
span: 6
|
|
|
},
|
|
|
@@ -60,16 +64,6 @@ export default {
|
|
|
prop: 'qualityTime',
|
|
|
span: 6
|
|
|
},
|
|
|
- {
|
|
|
- prop: 'executeJobName',
|
|
|
- span: 6,
|
|
|
- label: '执行班组',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'executeUserName',
|
|
|
- span: 6,
|
|
|
- label: '执行人'
|
|
|
- },
|
|
|
{
|
|
|
label: '工时(h)',
|
|
|
prop: 'hours',
|
|
|
@@ -105,6 +99,60 @@ export default {
|
|
|
label: '总数量',
|
|
|
prop: 'total',
|
|
|
span: 6
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '记录方法',
|
|
|
+ prop: 'recordingMethod',
|
|
|
+ span: 6
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 140,
|
|
|
+ prop: 'lossNumber',
|
|
|
+ slot: 'lossNumber',
|
|
|
+ align: 'center',
|
|
|
+ label: '损耗数(合格品)',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 150,
|
|
|
+ prop: 'lossNumberUnqualified',
|
|
|
+ slot: 'lossNumberUnqualified',
|
|
|
+ align: 'center',
|
|
|
+ label: '损耗数(不合格品)',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 140,
|
|
|
+ prop: 'retainedSampleQuantity',
|
|
|
+ slot: 'retainedSampleQuantity',
|
|
|
+ align: 'center',
|
|
|
+ label: '留样数(合格品)',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 150,
|
|
|
+ prop: 'retainedSampleUnqualified',
|
|
|
+ slot: 'retainedSampleUnqualified',
|
|
|
+ align: 'center',
|
|
|
+ label: '留样数(不合格品)',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'executeJobName',
|
|
|
+ label: '执行班组'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'executeUserName',
|
|
|
+ label: '执行人'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'executeDeptName',
|
|
|
+ label: '执行部门'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'groupName',
|
|
|
+ label: '接收人部门'
|
|
|
}
|
|
|
],
|
|
|
disposeTypeMap: {
|
|
|
@@ -194,6 +242,18 @@ export default {
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{ label: '刻码', prop: 'engrave', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '机型',
|
|
|
+ prop: 'modelKey',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '颜色',
|
|
|
+ prop: 'colorKey',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
{ label: '重量', prop: 'weight', align: 'center' },
|
|
|
{ label: '重量单位', prop: 'weightUnit', align: 'center' },
|
|
|
{
|
|
|
@@ -221,459 +281,767 @@ export default {
|
|
|
showOverflowTooltip: true
|
|
|
}
|
|
|
],
|
|
|
- tableColumns2: [
|
|
|
+
|
|
|
+ tableColumns4: [
|
|
|
{
|
|
|
+ type: 'index',
|
|
|
columnKey: 'index',
|
|
|
+ align: 'center',
|
|
|
label: '序号',
|
|
|
- type: 'index',
|
|
|
width: 55,
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
label: '样品编码',
|
|
|
prop: 'sampleCode',
|
|
|
- width: '200',
|
|
|
+ minWidth: '150',
|
|
|
align: 'center',
|
|
|
- fixed: 'left',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '编码',
|
|
|
+ label: '物品编码',
|
|
|
prop: 'categoryCode',
|
|
|
+ minWidth: '150',
|
|
|
align: 'center',
|
|
|
- fixed: 'left',
|
|
|
- width: '150',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '名称',
|
|
|
+ label: '物品名称',
|
|
|
prop: 'categoryName',
|
|
|
+ minWidth: '180',
|
|
|
align: 'center',
|
|
|
- width: '150',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '批次号',
|
|
|
prop: 'batchNo',
|
|
|
+ label: '批次号',
|
|
|
align: 'center',
|
|
|
+ minWidth: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '发货条码',
|
|
|
- prop: 'barcodes',
|
|
|
+ label: '规格',
|
|
|
+ prop: 'specification',
|
|
|
+ width: '120',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '包装编码',
|
|
|
- prop: 'packageNo',
|
|
|
+ label: '牌号',
|
|
|
+ prop: 'brandNum',
|
|
|
+ width: '120',
|
|
|
align: 'center',
|
|
|
- width: '170',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
- { label: '包装数量', prop: 'packingQuantity', align: 'center' },
|
|
|
- { label: '包装单位', prop: 'packingUnit', align: 'center' },
|
|
|
- { label: '计量数量', prop: 'measureQuantity', align: 'center' },
|
|
|
- { label: '计量单位', prop: 'measureUnit', align: 'center' },
|
|
|
{
|
|
|
- label: '供应商名称',
|
|
|
- prop: 'supplierName',
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '型号',
|
|
|
align: 'center',
|
|
|
width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '供应商代号',
|
|
|
- prop: 'supplierCode',
|
|
|
+ label: '机型',
|
|
|
+ prop: 'modelKey',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '物料代号',
|
|
|
- prop: 'materielDesignation',
|
|
|
+ label: '颜色',
|
|
|
+ prop: 'colorKey',
|
|
|
align: 'center',
|
|
|
- slot: 'materielDesignation',
|
|
|
- width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '客户代号',
|
|
|
- prop: 'clientCode',
|
|
|
+ prop: 'measureQuantity',
|
|
|
+ label: '计量数量',
|
|
|
align: 'center',
|
|
|
- slot: 'clientCode',
|
|
|
width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '刻码',
|
|
|
- prop: 'engrave',
|
|
|
+ prop: 'measureUnit',
|
|
|
+ label: '计量单位',
|
|
|
align: 'center',
|
|
|
- slot: 'engrave',
|
|
|
width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- label: '重量',
|
|
|
prop: 'weight',
|
|
|
+ label: '重量',
|
|
|
align: 'center',
|
|
|
- slot: 'weight',
|
|
|
- width: '120'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '重量单位',
|
|
|
- prop: 'weightUnit',
|
|
|
- align: 'center',
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- label: '仓库',
|
|
|
- prop: 'warehouseName',
|
|
|
- align: 'center',
|
|
|
- width: 150,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '货区',
|
|
|
- prop: 'areaName',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- { label: '货架', prop: 'goodsShelfName', align: 'center' },
|
|
|
- { label: '货位', prop: 'goodsAllocationName', align: 'center' },
|
|
|
- {
|
|
|
- label: '生产日期',
|
|
|
- prop: 'productionDate',
|
|
|
- align: 'center',
|
|
|
- width: 150,
|
|
|
+ width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '采购日期',
|
|
|
- prop: 'purchaseDate',
|
|
|
+ prop: 'weightUnit',
|
|
|
+ label: '重量单位',
|
|
|
align: 'center',
|
|
|
- width: 150,
|
|
|
+ width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
+ prop: 'disposalStatus',
|
|
|
label: '处置状态',
|
|
|
- prop: 'disposeType',
|
|
|
align: 'center',
|
|
|
- formatter: (_row) => {
|
|
|
- return this.disposeTypeMap[_row.disposeType] || '';
|
|
|
+ width: '120',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return disposalStatustList[cellValue ? cellValue : 0];
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- label: '处置时间',
|
|
|
- prop: 'disposeTime',
|
|
|
+ prop: 'disposeType',
|
|
|
+ label: '处置类型',
|
|
|
align: 'center',
|
|
|
+ width: '120',
|
|
|
showOverflowTooltip: true,
|
|
|
- width: 150
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return this.disposeTypeMap[cellValue];
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- label: '质检状态',
|
|
|
- prop: 'qualityStatus',
|
|
|
+ prop: 'qualityResults',
|
|
|
+ label: '质检结果',
|
|
|
align: 'center',
|
|
|
- formatter: (row) => {
|
|
|
- if (row.qualityStatus == 0) {
|
|
|
- return '未检';
|
|
|
- }
|
|
|
- if (row.qualityStatus == 1) {
|
|
|
- return '已检';
|
|
|
- }
|
|
|
- if (row.qualityStatus == 2) {
|
|
|
- return '待检';
|
|
|
- }
|
|
|
+ width: '120',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return qualityResultList[cellValue];
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
- tableColumns3: [
|
|
|
+ tableColumns5: [
|
|
|
{
|
|
|
columnKey: 'index',
|
|
|
label: '序号',
|
|
|
type: 'index',
|
|
|
width: 55,
|
|
|
align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
{
|
|
|
- label: '质检方案编码',
|
|
|
- prop: 'qualitySchemeTemplateCode',
|
|
|
+ label: '样品编码',
|
|
|
+ prop: 'sampleCode',
|
|
|
+ width: '150',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '质检方案名称',
|
|
|
- prop: 'qualitySchemeTemplateName',
|
|
|
+ prop: 'categoryCode',
|
|
|
+ label: '物品编码',
|
|
|
+ width: '150',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '质检类型',
|
|
|
- prop: 'categoryLevelClassName',
|
|
|
+ prop: 'categoryName',
|
|
|
+ label: '物品名称',
|
|
|
+ width: '150',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '质检项编码',
|
|
|
- prop: 'inspectionCode',
|
|
|
+ label: '规格',
|
|
|
+ prop: 'specification',
|
|
|
+ width: '120',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '质检项名称',
|
|
|
- prop: 'inspectionName',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
+ prop: 'brandNum',
|
|
|
+ label: '牌号',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- label: '工艺参数',
|
|
|
- prop: 'defaultValue',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- slot: 'defaultValue'
|
|
|
- }
|
|
|
- ],
|
|
|
- tableColumns4: [
|
|
|
- {
|
|
|
- type: 'index',
|
|
|
- columnKey: 'index',
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '型号',
|
|
|
align: 'center',
|
|
|
- label: '序号',
|
|
|
- width: 55,
|
|
|
+ width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '样品编码',
|
|
|
- prop: 'sampleCode',
|
|
|
- minWidth: '150',
|
|
|
+ label: '机型',
|
|
|
+ prop: 'modelKey',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '物品编码',
|
|
|
- prop: 'categoryCode',
|
|
|
- minWidth: '150',
|
|
|
+ label: '颜色',
|
|
|
+ prop: 'colorKey',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '物品名称',
|
|
|
- prop: 'categoryName',
|
|
|
- minWidth: '180',
|
|
|
+ prop: 'batchNo',
|
|
|
+ label: '批次号',
|
|
|
align: 'center',
|
|
|
+ width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'batchNo',
|
|
|
- label: '批次号',
|
|
|
+ prop: 'weight',
|
|
|
+ label: '重量',
|
|
|
align: 'center',
|
|
|
- minWidth: '120',
|
|
|
+ width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '规格',
|
|
|
- prop: 'specification',
|
|
|
- width: '120',
|
|
|
+ prop: 'weightUnit',
|
|
|
+ label: '重量单位',
|
|
|
align: 'center',
|
|
|
+ width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '牌号',
|
|
|
- prop: 'brandNum',
|
|
|
- width: '120',
|
|
|
+ prop: 'engrave',
|
|
|
+ label: '刻码',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ { label: '计量数量', prop: 'measureQuantity', align: 'center' },
|
|
|
+ { label: '计量单位', prop: 'measureUnit', align: 'center' },
|
|
|
+ {
|
|
|
+ prop: 'produceRoutingName',
|
|
|
+ label: '工艺路线',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'produceTaskName',
|
|
|
+ label: '工序',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'unqualifiedReason',
|
|
|
+ label: '原因',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'disposeTime',
|
|
|
+ label: '处置时间',
|
|
|
align: 'center',
|
|
|
+ width: '180',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'modelType',
|
|
|
- label: '型号',
|
|
|
+ prop: 'disposalStatus',
|
|
|
+ label: '处置状态',
|
|
|
+ align: 'center',
|
|
|
+ width: '120',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return disposalStatustList[cellValue ? cellValue : 0];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'disposeType',
|
|
|
+ label: '处置类型',
|
|
|
align: 'center',
|
|
|
width: '120',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (_row) => {
|
|
|
+ return this.disposeTypeMap[_row.disposeType];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ tableColumns2() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '样品编码',
|
|
|
+ prop: 'sampleCode',
|
|
|
+ width: '200',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'measureQuantity',
|
|
|
- label: '计量数量',
|
|
|
+ label: '编码',
|
|
|
+ prop: 'categoryCode',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'categoryCode',
|
|
|
+ fixed: 'left',
|
|
|
+ width: '150',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '名称',
|
|
|
+ prop: 'categoryName',
|
|
|
+ align: 'center',
|
|
|
+ width: '150',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '批次号',
|
|
|
+ prop: 'batchNo',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '发货条码',
|
|
|
+ prop: 'barcodes',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '包装编码',
|
|
|
+ prop: 'packageNo',
|
|
|
+ align: 'center',
|
|
|
+ width: '170',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ { label: '包装数量', prop: 'packingQuantity', align: 'center' },
|
|
|
+ { label: '包装单位', prop: 'packingUnit', align: 'center' },
|
|
|
+ { label: '计量数量', prop: 'measureQuantity', align: 'center' },
|
|
|
+ { label: '计量单位', prop: 'measureUnit', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '供应商名称',
|
|
|
+ prop: 'supplierName',
|
|
|
align: 'center',
|
|
|
width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'measureUnit',
|
|
|
- label: '计量单位',
|
|
|
+ label: '供应商代号',
|
|
|
+ prop: 'supplierCode',
|
|
|
align: 'center',
|
|
|
width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
- prop: 'weight',
|
|
|
- label: '重量',
|
|
|
+ label: '物料代号',
|
|
|
+ prop: 'materielDesignation',
|
|
|
align: 'center',
|
|
|
+ slot: 'materielDesignation',
|
|
|
width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'weightUnit',
|
|
|
- label: '重量单位',
|
|
|
+ label: '客户代号',
|
|
|
+ prop: 'clientCode',
|
|
|
align: 'center',
|
|
|
+ slot: 'clientCode',
|
|
|
width: '120',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'disposalStatus',
|
|
|
- label: '处置状态',
|
|
|
+ label: '刻码',
|
|
|
+ prop: 'engrave',
|
|
|
align: 'center',
|
|
|
+ slot: 'engrave',
|
|
|
width: '120',
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return disposalStatustList[cellValue ? cellValue : 0];
|
|
|
- }
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '机型',
|
|
|
+ prop: 'modelKey',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '颜色',
|
|
|
+ prop: 'colorKey',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '重量',
|
|
|
+ prop: 'weight',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'weight',
|
|
|
+ width: '120'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '重量单位',
|
|
|
+ prop: 'weightUnit',
|
|
|
+ align: 'center',
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '仓库',
|
|
|
+ prop: 'warehouseName',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '货区',
|
|
|
+ prop: 'areaName',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ { label: '货架', prop: 'goodsShelfName', align: 'center' },
|
|
|
+ { label: '货位', prop: 'goodsAllocationName', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '生产日期',
|
|
|
+ prop: 'productionDate',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
+ label: '采购日期',
|
|
|
+ prop: 'purchaseDate',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '处置状态',
|
|
|
prop: 'disposeType',
|
|
|
- label: '处置类型',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return this.disposeTypeMap[cellValue];
|
|
|
+ formatter: (_row) => {
|
|
|
+ return this.disposeTypeMap[_row.disposeType] || '';
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- prop: 'qualityResults',
|
|
|
- label: '质检结果',
|
|
|
+ label: '处置时间',
|
|
|
+ prop: 'disposeTime',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
showOverflowTooltip: true,
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return qualityResultList[cellValue];
|
|
|
+ width: 150
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'badTypeName',
|
|
|
+ label: '不良类型',
|
|
|
+ width: '180',
|
|
|
+ align: 'center',
|
|
|
+ show: this.form.recordingMethod != 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'badNameName',
|
|
|
+ label: '不良名称',
|
|
|
+ width: '180',
|
|
|
+ align: 'center',
|
|
|
+ show: this.form.recordingMethod != 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '质检状态',
|
|
|
+ prop: 'qualityStatus',
|
|
|
+ align: 'center',
|
|
|
+ show: this.form.recordingMethod != 1,
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.qualityStatus == 0) {
|
|
|
+ return '未检';
|
|
|
+ }
|
|
|
+ if (row.qualityStatus == 1) {
|
|
|
+ return '已检';
|
|
|
+ }
|
|
|
+ if (row.qualityStatus == 2) {
|
|
|
+ return '待检';
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- ],
|
|
|
- tableColumns5: [
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ tableColumns3() {
|
|
|
+ return [
|
|
|
{
|
|
|
columnKey: 'index',
|
|
|
label: '序号',
|
|
|
type: 'index',
|
|
|
width: 55,
|
|
|
align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
{
|
|
|
- label: '样品编码',
|
|
|
- prop: 'sampleCode',
|
|
|
- width: '150',
|
|
|
+ label: '质检方案编码',
|
|
|
+ prop: 'qualitySchemeTemplateCode',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'categoryCode',
|
|
|
- label: '物品编码',
|
|
|
- width: '150',
|
|
|
+ label: '质检方案名称',
|
|
|
+ prop: 'qualitySchemeTemplateName',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'categoryName',
|
|
|
- label: '物品名称',
|
|
|
- width: '150',
|
|
|
+ label: '质检类型',
|
|
|
+ prop: 'categoryLevelClassName',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- label: '规格',
|
|
|
- prop: 'specification',
|
|
|
- width: '120',
|
|
|
+ label: '质检项编码',
|
|
|
+ prop: 'inspectionCode',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'brandNum',
|
|
|
- label: '牌号',
|
|
|
- align: 'center'
|
|
|
+ label: '质检项名称',
|
|
|
+ prop: 'inspectionName',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'modelType',
|
|
|
- label: '型号',
|
|
|
+ label: '工艺参数',
|
|
|
+ prop: 'defaultValue',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'defaultValue'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '执行方法',
|
|
|
+ prop: 'executionMethod',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ show: this.form.recordingMethod == 1,
|
|
|
+ formatter: (row) => {
|
|
|
+ return row.executionMethod == 1 ? '常规检验' : '实验';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 200,
|
|
|
+ prop: 'qualityResultContent',
|
|
|
+ align: 'center',
|
|
|
+ headerSlot: 'isRequired',
|
|
|
+ label: '质检内容',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'batchNo',
|
|
|
- label: '批次号',
|
|
|
+ minWidth: 120,
|
|
|
+ prop: 'sampleQuantity',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
+ label: '样品数',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.sampleQuantity) {
|
|
|
+ return (
|
|
|
+ row.sampleQuantity + this.sourceData2[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'weight',
|
|
|
- label: '重量',
|
|
|
+ minWidth: 120,
|
|
|
+ prop: 'qualifiedQuantity',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
+ label: '合格数',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.qualifiedQuantity) {
|
|
|
+ return (
|
|
|
+ row.qualifiedQuantity + this.sourceData2[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'weightUnit',
|
|
|
- label: '重量单位',
|
|
|
+ minWidth: 130,
|
|
|
+ prop: 'noQualifiedQuantity',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
+ label: '不合格数',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.noQualifiedQuantity) {
|
|
|
+ return (
|
|
|
+ row.noQualifiedQuantity + this.sourceData2[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'engrave',
|
|
|
- label: '刻码',
|
|
|
- align: 'center'
|
|
|
+ minWidth: 140,
|
|
|
+ prop: 'lossNumber',
|
|
|
+ align: 'center',
|
|
|
+ label: '损耗数(合格品)',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.lossNumber) {
|
|
|
+ return row.lossNumber + this.sourceData2[0]?.measureUnit || '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
- { label: '计量数量', prop: 'measureQuantity', align: 'center' },
|
|
|
- { label: '计量单位', prop: 'measureUnit', align: 'center' },
|
|
|
{
|
|
|
- prop: 'produceRoutingName',
|
|
|
- label: '工艺路线',
|
|
|
- align: 'center'
|
|
|
+ minWidth: 150,
|
|
|
+ prop: 'lossNumberUnqualified',
|
|
|
+ align: 'center',
|
|
|
+ label: '损耗数(不合格品)',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.lossNumberUnqualified) {
|
|
|
+ return (
|
|
|
+ row.lossNumberUnqualified + this.sourceData2[0]?.measureUnit ||
|
|
|
+ ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'produceTaskName',
|
|
|
- label: '工序',
|
|
|
- align: 'center'
|
|
|
+ minWidth: 140,
|
|
|
+ prop: 'retainedSampleQuantity',
|
|
|
+ align: 'center',
|
|
|
+ label: '留样数(合格品)',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.retainedSampleQuantity) {
|
|
|
+ return (
|
|
|
+ row.retainedSampleQuantity + this.sourceData2[0]?.measureUnit ||
|
|
|
+ ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'unqualifiedReason',
|
|
|
- label: '原因',
|
|
|
- align: 'center'
|
|
|
+ minWidth: 150,
|
|
|
+ prop: 'retainedSampleUnqualified',
|
|
|
+ align: 'center',
|
|
|
+ label: '留样数(不合格品)',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.retainedSampleUnqualified) {
|
|
|
+ return (
|
|
|
+ row.retainedSampleUnqualified +
|
|
|
+ this.sourceData2[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'disposeTime',
|
|
|
- label: '处置时间',
|
|
|
+ minWidth: 150,
|
|
|
+ prop: 'experimentCode',
|
|
|
+ slot: 'experimentCode',
|
|
|
align: 'center',
|
|
|
- width: '180',
|
|
|
+ label: '实验编号',
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'disposalStatus',
|
|
|
- label: '处置状态',
|
|
|
+ label: '质检状态',
|
|
|
+ prop: 'status',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
showOverflowTooltip: true,
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return disposalStatustList[cellValue ? cellValue : 0];
|
|
|
+ show: this.form.recordingMethod == 1,
|
|
|
+ formatter: (row) => {
|
|
|
+ return inspectionProjectStatus.find(
|
|
|
+ (item) => item.value == row.status
|
|
|
+ )?.label;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- prop: 'disposeType',
|
|
|
- label: '处置类型',
|
|
|
+ label: '质检结果',
|
|
|
+ prop: 'qualityResults',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
+ show: this.form.recordingMethod == 1,
|
|
|
showOverflowTooltip: true,
|
|
|
- formatter: (_row) => {
|
|
|
- return this.disposeTypeMap[_row.disposeType];
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return qualityResultList[cellValue];
|
|
|
}
|
|
|
}
|
|
|
- ]
|
|
|
- };
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //样品数操作
|
|
|
+ isSampleQuantity(item, index) {
|
|
|
+ // this.resetData(item, index, ['qualifiedQuantity', 'noQualifiedQuantity']);
|
|
|
+ if (Number(item.sampleQuantity) > this.getSampleQuantityCount) {
|
|
|
+ this.$message.error('样品数量不能大于当前质检剩余样品数');
|
|
|
+ this.$set(
|
|
|
+ this.tableData[index],
|
|
|
+ 'sampleQuantity',
|
|
|
+ this.getSampleQuantityCount
|
|
|
+ );
|
|
|
+ }
|
|
|
+ this.$set(
|
|
|
+ this.tableData[index],
|
|
|
+ 'qualifiedQuantity',
|
|
|
+ item.sampleQuantity
|
|
|
+ );
|
|
|
+ this.isQualifiedQuantity(item, index, 'qualifiedQuantity');
|
|
|
+ },
|
|
|
+ //合格/不合格数操作
|
|
|
+ isQualifiedQuantity(item, index, key) {
|
|
|
+ if (Number(item[key]) > Number(item.sampleQuantity)) {
|
|
|
+ this.$message.error(
|
|
|
+ (key == 'qualifiedQuantity' ? '合格' : '不合格') +
|
|
|
+ '数量不能大于样品数'
|
|
|
+ );
|
|
|
+ this.$set(this.tableData[index], key, item.sampleQuantity);
|
|
|
+ }
|
|
|
+ this.$set(
|
|
|
+ this.tableData[index],
|
|
|
+ key == 'qualifiedQuantity'
|
|
|
+ ? 'noQualifiedQuantity'
|
|
|
+ : 'qualifiedQuantity',
|
|
|
+ item.sampleQuantity - item[key]
|
|
|
+ );
|
|
|
+
|
|
|
+ this.resetData(item, index);
|
|
|
+ },
|
|
|
+
|
|
|
+ //留样、损耗逻辑
|
|
|
+ setNumber(item, index, key, title, keyName) {
|
|
|
+ let keyObj = {
|
|
|
+ key: key == keyName ? 'qualifiedQuantity' : 'noQualifiedQuantity',
|
|
|
+ title: key == keyName ? '合格数' : '不合格数',
|
|
|
+ title1: title == '留样' ? '损耗' : '留样',
|
|
|
+ numTotal:
|
|
|
+ key == keyName
|
|
|
+ ? Number(item.lossNumber) + Number(item.retainedSampleQuantity)
|
|
|
+ : Number(item.lossNumberUnqualified) +
|
|
|
+ Number(item.retainedSampleUnqualified)
|
|
|
+ };
|
|
|
+
|
|
|
+ if (Number(item[key]) > Number(item[keyObj.key])) {
|
|
|
+ this.$message.error(
|
|
|
+ title + keyObj.title + '不能大于样品' + keyObj.title
|
|
|
+ );
|
|
|
+ this.$set(this.tableData[index], key, 0);
|
|
|
+ }
|
|
|
+ if (keyObj.numTotal > item[keyObj.key]) {
|
|
|
+ this.$message.error(
|
|
|
+ title +
|
|
|
+ keyObj.title +
|
|
|
+ '与' +
|
|
|
+ keyObj.title1 +
|
|
|
+ keyObj.title +
|
|
|
+ '之和' +
|
|
|
+ '不能大于样品' +
|
|
|
+ keyObj.title
|
|
|
+ );
|
|
|
+ this.$set(this.tableData[index], key, 0);
|
|
|
+ }
|
|
|
+ if (item[key] - (this.curretNum || 0) > this.getSampleQuantityCount) {
|
|
|
+ this.$message.error(
|
|
|
+ title + keyObj.title + '不能大于当前质检剩余样品数'
|
|
|
+ );
|
|
|
+ this.$set(this.tableData[index], key, 0);
|
|
|
+ }
|
|
|
+ this.curretNum = this.tableData[index][key];
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
+
|
|
|
+ //重置数据
|
|
|
+ resetData(item, index, addResetData = []) {
|
|
|
+ [...this.keyArr, ...addResetData].forEach((key) => {
|
|
|
+ this.$set(this.tableData[index], key, 0);
|
|
|
+ });
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
+ initData() {
|
|
|
+ this.keyArr.forEach((key) => {
|
|
|
+ this.$set(this.form, key, 0);
|
|
|
+ });
|
|
|
+ this.tableData.forEach((item, index) => {
|
|
|
+ this.keyArr.forEach((key) => {
|
|
|
+ this.form[key] = this.form[key] * 100;
|
|
|
+ this.form[key] += Number(item[key] * 100) || 0;
|
|
|
+ this.form[key] = this.form[key] / 100;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|