Browse Source

修改bug

master_hella_20240701
zhaoyiran 7 months ago
parent
commit
7e03efc100
  1. 13
      src/views/qms/basicDataManage/dynamicRule/index.vue

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

@ -287,6 +287,12 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
const flag = validateNotRepetition(tableData.value);
const emptyFlag = validateDetailEmpty(tableData.value);
if(!emptyFlag){
message.alertWarning('明细不能为空')
basicFormRef.value.formLoading = false
return
}
if(!flag){
message.alertWarning('动态规则阶段不能重复')
basicFormRef.value.formLoading = false
@ -335,6 +341,13 @@ const validateIfRepeat = (type,data) => {
return stageSet.size === mergedArray.length;
}
const validateDetailEmpty = (data) => {
const codes = data.map(item => item.stage);
if(codes.length == 0){
return false;
}
return true;
}
const validateNotRepetition = (data) => {
// dictionaryTypeAndCode
const codes = data.map(item => item.stage);

Loading…
Cancel
Save