Browse Source

选定集改造补充

master_hella_20240701
ljlong_2630 6 months ago
parent
commit
526d5d7882
  1. 3
      src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts
  2. 27
      src/views/qms/basicDataManage/selectedSet/index.vue

3
src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts

@ -10,6 +10,7 @@ export const SelectedProjectRules = reactive({
// dictionaryTypeAndCode: [required],
estimateCode: [required],
defectLevel: [required],
dictionaryValue: [required]
})
export const SelectedProject = useCrudSchemas(reactive<CrudSchema[]>([
@ -28,7 +29,7 @@ export const SelectedProject = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '选定集',
label: '字典项',
field: 'dictionaryValue',
sort: 'custom',
isSearch: true,

27
src/views/qms/basicDataManage/selectedSet/index.vue

@ -108,6 +108,7 @@ const tableData = ref([])
const routeName = ref()
const selectDictType = ref()
const optionsList = ref()
const existValue = ref([])
routeName.value = route.name
const tableColumns = ref(SelectedSet.allSchemas.tableColumns)
@ -377,16 +378,37 @@ const validateNotRepetition = (data) => {
};
const detailValidate = (data) => {
const detailValidate = (formType,data) => {
let tag = true;
existValue.value.forEach(item=>{
if(data.dictionaryValue == item.dictionaryValue){
message.warning("选定集字典项不能重复!")
tag = false;
}
})
return tag
}
const detailOpenForm = (type, row, masterParmas) => {
let param = {
masterId : masterParmas.masterId
}
if(type == 'create'){
SelectedProjectApi.getSelectedProjectNoPage(param).then(res => {
if(res.length > 0){
existValue.value = res
}
})
}else if('update'){
SelectedProjectApi.getSelectedProjectNoPage(param).then(res => {
if(res.length > 0){
existValue.value = res.filter(item=>{
return item?.id != row.id
})
}
})
}
}
@ -396,6 +418,7 @@ const detailBasiFormOnChange = (field,val,detailFormRef) => {
}
const formSelectChange = (a,b,c,d) => {
}
/** 初始化 **/

Loading…
Cancel
Save