update qms质检任务路由:产品检、原材料检、入库检

master
yinq 3 weeks ago
parent b5f6c201cf
commit 532b4922df

@ -335,7 +335,7 @@ export interface QcInspectionMainQuery extends PageQuery {
/**
* /
*/
inspectionType?: number;
inspectionType?: number | string;
/**
* 0/1

@ -21,8 +21,8 @@
<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">
<el-select v-model="queryParams.inspectionType" placeholder="请选择检验类别" clearable >
<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>
@ -593,6 +593,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';
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'));
@ -637,6 +638,23 @@ 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;
if (inspectionType.value == 2){
queryParams.value.inspectionType = '4';
} else if (inspectionType.value == 3){
queryParams.value.inspectionType = '7';
} else {
queryParams.value.inspectionType = '6';
inspectionTypeVisible.value = true;
}
};
//
const columns = ref<FieldOption[]>([
{ key: 0, label: `序号`, visible: true },
@ -1113,8 +1131,9 @@ const submitMaterialForm = () => {
};
onMounted(() => {
getList();
getInspectionType();
getInspectionTemplateList();
getInspectionItemList();
getList();
});
</script>

Loading…
Cancel
Save