king
2022-08-16 b573a0dea9afc9b773d71fe3e3062be7150c830a
src/menu/components/card/prop-card/index.jsx
@@ -185,7 +185,7 @@
    }
    if (card.wrap.datatype === 'static') {
      let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
      // let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
      card.subcards.forEach((item, i) => {
        let linkbtn = item.setting.linkbtn || ''
@@ -194,12 +194,12 @@
            if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
              if (!cell.modal || cell.modal.fields.length === 0) {
                card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`})
              } else if (!supModule) {
                cell.modal.fields.forEach(m => {
                  if (m.type === 'linkMain') {
                    card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
                  }
                })
              // } else if (!supModule) {
              //   cell.modal.fields.forEach(m => {
              //     if (m.type === 'linkMain') {
              //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
              //     }
              //   })
              }
            }
            if (linkbtn && linkbtn === cell.uuid) {
@@ -216,12 +216,12 @@
              if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
                if (!cell.modal || cell.modal.fields.length === 0) {
                  card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`})
                } else if (!supModule) {
                  cell.modal.fields.forEach(m => {
                    if (m.type === 'linkMain') {
                      card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
                    }
                  })
                // } else if (!supModule) {
                //   cell.modal.fields.forEach(m => {
                //     if (m.type === 'linkMain') {
                //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
                //     }
                //   })
                }
              }
              if (linkbtn && linkbtn === cell.uuid) {
@@ -238,12 +238,12 @@
        }
      })
    } else {
      let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
      if (supModule === 'empty') {
        supModule = ''
      }
      // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
      // if (supModule === 'empty') {
      //   supModule = ''
      // }
      let columns = card.columns.map(c => c.field)
      let lowcols = card.columns.map(c => c.field.toLowerCase())
      // let lowcols = card.columns.map(c => c.field.toLowerCase())
      if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) {
        card.errors.push({ level: 0, detail: '未设置数据源!'})
@@ -264,14 +264,14 @@
            if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
              if (!cell.modal || cell.modal.fields.length === 0) {
                card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`})
              } else {
                cell.modal.fields.forEach(m => {
                  if (m.type === 'linkMain' && !supModule) {
                    card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
                  } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
                    card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`})
                  }
                })
              // } else {
              //   cell.modal.fields.forEach(m => {
              //     if (m.type === 'linkMain' && !supModule) {
              //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
              //     } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
              //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`})
              //     }
              //   })
              }
            }
            if (linkbtn && linkbtn === cell.uuid) {
@@ -288,14 +288,14 @@
              if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
                if (!cell.modal || cell.modal.fields.length === 0) {
                  card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`})
                } else {
                  cell.modal.fields.forEach(m => {
                    if (m.type === 'linkMain' && !supModule) {
                      card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
                    } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
                      card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`})
                    }
                  })
                // } else {
                //   cell.modal.fields.forEach(m => {
                //     if (m.type === 'linkMain' && !supModule) {
                //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
                //     } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
                //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`})
                //     }
                //   })
                }
              }
              if (linkbtn && linkbtn === cell.uuid) {