Browse Source

修改bug

master_hella_20240701
zhaoyiran 8 months ago
parent
commit
7d37cdc9a4
  1. 12
      src/views/qms/basicDataManage/dynamicRule/index.vue

12
src/views/qms/basicDataManage/dynamicRule/index.vue

@ -213,9 +213,6 @@ const formsSuccess = async (formType,data) => {
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailMasterId.value = row.id
InspectionStageApi.getInspectionStageNoPage({masterId:row.id}).then(res=>{
detailList.value = res
})
detailRef.value.openDetail(row, titleName, titleValue, 'basicDynamicRule')
}
@ -323,15 +320,16 @@ const detailValidate = (type,data) => {
}
const detailOpenForm = (type, row, masterParmas) => {
detailMasterId.value = masterParmas.masterId
InspectionStageApi.getInspectionStageNoPage({masterId:masterParmas.masterId}).then(res=>{
detailList.value = res
})
}
const validateIfRepeat = (type,data) => {
let mergedArray: any[] = [];
if(type == 'create'){
if(type == 'create' || type == 'update'){
mergedArray = [data, ...detailList.value];
}else if(type == 'update'){
mergedArray = [...detailList.value];
}
const stageSet = new Set(mergedArray.map(item => item.stage));
return stageSet.size === mergedArray.length;

Loading…
Cancel
Save