|
|
|
@ -21,11 +21,11 @@
|
|
|
|
|
<el-option v-for="dict in qc_result" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="检验类别" prop="inspectionType" v-if='inspectionTypeVisible'>
|
|
|
|
|
<el-select v-model="queryParams.inspectionType" placeholder="请选择检验类别" >
|
|
|
|
|
<el-option v-for="dict in qc_inspection_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="检测类别" prop="inspectionType" v-if='inspectionTypeVisible'>-->
|
|
|
|
|
<!-- <el-select v-model="queryParams.qcInspectionType" placeholder="请选择检测类别" >-->
|
|
|
|
|
<!-- <el-option v-for="dict in qc_inspection_type" :key="dict.value" :label="dict.label" :value="dict.value"/>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-form-item label="单据状态" prop="status">
|
|
|
|
|
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable >
|
|
|
|
|
<el-option v-for="dict in qc_status" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
|
|
|
@ -103,11 +103,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="车间" align="center" prop="workshop" v-if="columns[12].visible"/>
|
|
|
|
|
<el-table-column label="检验类别" align="center" prop="inspectionType" v-if="columns[13].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="qc_inspection_type" :value="scope.row.inspectionType"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="检测类别" align="center" prop="typeName" v-if="columns[13].visible" />
|
|
|
|
|
<el-table-column label="单据状态" align="center" prop="status" v-if="columns[14].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="qc_status" :value="scope.row.status"/>
|
|
|
|
@ -297,7 +293,7 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="不合格数" prop="unqualifiedQty">
|
|
|
|
|
<el-form-item label="不合格数" prop="unqualifiedQty" v-if="form.result == 1">
|
|
|
|
|
<el-input v-model="form.unqualifiedQty" placeholder="请输入不合格数" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -308,7 +304,7 @@
|
|
|
|
|
v-for="dict in qc_result"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="parseInt(dict.value)"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -322,13 +318,13 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="检验类别" prop="inspectionType">
|
|
|
|
|
<el-select v-model="form.inspectionType" placeholder="请选择检验类别">
|
|
|
|
|
<el-form-item label="检测类别" prop="inspectionType">
|
|
|
|
|
<el-select v-model="form.inspectionType" placeholder="请选择检测类别">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in qc_inspection_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="parseInt(dict.value)"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -339,7 +335,7 @@
|
|
|
|
|
<el-radio
|
|
|
|
|
v-for="dict in qc_status"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:value="parseInt(dict.value)"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
>{{dict.label}}</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -466,7 +462,7 @@
|
|
|
|
|
<el-form-item label="检测方式" prop="detectType">
|
|
|
|
|
<el-tooltip content="此字段由关联检测项自动填充,不可编辑" placement="top">
|
|
|
|
|
<el-select v-model="inspectionResultForm.detectType" placeholder="检测方式" style="width: 100%;" :disabled="true">
|
|
|
|
|
<el-option v-for="dict in detect_type" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"></el-option>
|
|
|
|
|
<el-option v-for="dict in detect_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -475,7 +471,7 @@
|
|
|
|
|
<el-form-item label="控制类型" prop="controlType">
|
|
|
|
|
<el-tooltip content="此字段由关联检测项自动填充,不可编辑" placement="top">
|
|
|
|
|
<el-select v-model="inspectionResultForm.controlType" placeholder="控制类型" style="width: 100%;" :disabled="true">
|
|
|
|
|
<el-option v-for="dict in control_type" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"></el-option>
|
|
|
|
|
<el-option v-for="dict in control_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -529,7 +525,7 @@
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="检测结果" prop="detectResult">
|
|
|
|
|
<el-select v-model="inspectionResultForm.detectResult" placeholder="请选择检测结果">
|
|
|
|
|
<el-option v-for="dict in qc_result" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"></el-option>
|
|
|
|
|
<el-option v-for="dict in qc_result" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -571,7 +567,7 @@
|
|
|
|
|
|
|
|
|
|
<!-- 添加物料信息对话框 -->
|
|
|
|
|
<el-dialog title="选择物料信息" v-model="materialOpen" width="1200px" append-to-body>
|
|
|
|
|
<MaterialSelect @selection="handleSelection" ref="materialSelectRef" v-if="materialOpen"></MaterialSelect>
|
|
|
|
|
<MaterialSelect ref="materialSelectRef" v-if="materialOpen"></MaterialSelect>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitMaterialForm">确 定</el-button>
|
|
|
|
@ -593,7 +589,7 @@ import { getProcessInfoList } from '@/api/qms/baseProcessInfo';
|
|
|
|
|
import { getStationInfoList } from '@/api/qms/baseStationInfo';
|
|
|
|
|
|
|
|
|
|
import MaterialSelect from "@/views/mes/baseMaterialInfo/addMaterialInQMS.vue";
|
|
|
|
|
import { useRouter } from 'vue-router';
|
|
|
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const { qc_inspection_type, qc_result, qc_status, material_type, detect_type, control_type } = toRefs<any>(proxy?.useDict('qc_inspection_type', 'qc_result', 'qc_status', 'material_type', 'detect_type', 'control_type'));
|
|
|
|
@ -638,20 +634,18 @@ const inspectionResultDialog = reactive<DialogOption>({
|
|
|
|
|
title: ''
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//0首检 1专检 2自检 3互检 4原材料检 5抽检 6成品检 7入库检
|
|
|
|
|
|
|
|
|
|
//路由:inspectionType = 1产品检 2原材料检 3入库检
|
|
|
|
|
const inspectionType = ref();
|
|
|
|
|
const inspectionTypeVisible = ref(false);
|
|
|
|
|
const getInspectionType = async () => {
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
inspectionType.value = router.currentRoute._rawValue.query && router.currentRoute._rawValue.query.inspectionType;
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
inspectionType.value = route.query.inspectionType;
|
|
|
|
|
if (inspectionType.value == 2){
|
|
|
|
|
queryParams.value.inspectionType = '4';
|
|
|
|
|
queryParams.value.inspectionType = '2';
|
|
|
|
|
} else if (inspectionType.value == 3){
|
|
|
|
|
queryParams.value.inspectionType = '7';
|
|
|
|
|
queryParams.value.inspectionType = '3';
|
|
|
|
|
} else {
|
|
|
|
|
queryParams.value.inspectionType = '6';
|
|
|
|
|
inspectionTypeVisible.value = true;
|
|
|
|
|
queryParams.value.inspectionType = '1';
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -670,7 +664,7 @@ const columns = ref<FieldOption[]>([
|
|
|
|
|
{ key: 10, label: `不合格数`, visible: true },
|
|
|
|
|
{ key: 11, label: `质检结果`, visible: true },
|
|
|
|
|
{ key: 12, label: `车间`, visible: true },
|
|
|
|
|
{ key: 13, label: `检验类别`, visible: true },
|
|
|
|
|
{ key: 13, label: `检测类别`, visible: true },
|
|
|
|
|
{ key: 14, label: `单据状态`, visible: true },
|
|
|
|
|
{ key: 15, label: `检测人员`, visible: true },
|
|
|
|
|
{ key: 16, label: `班次`, visible: true },
|
|
|
|
@ -991,6 +985,7 @@ const handleDeleteInspectionResult = async (row?: QcInspectionResultVO) => {
|
|
|
|
|
await delQcInspectionResult(_resultIds);
|
|
|
|
|
proxy?.$modal.msgSuccess("删除成功");
|
|
|
|
|
await getInspectionResultList();
|
|
|
|
|
await getList(); // 新增
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
@ -1023,6 +1018,7 @@ const submitInspectionResultForm = () => {
|
|
|
|
|
proxy?.$modal.msgSuccess("操作成功");
|
|
|
|
|
inspectionResultDialog.visible = false;
|
|
|
|
|
await getInspectionResultList();
|
|
|
|
|
await getList(); // 新增
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|