king
2022-04-26 5046d0d13dc6a8563b8e54e31913bc44cfa1072f
src/views/menudesign/index.jsx
@@ -917,7 +917,7 @@
  }
  verifyConfig = (show) => {
    const { config } = this.state
    const { config, MenuType } = this.state
    let error = ''
    let check = (components) => {
@@ -936,6 +936,7 @@
          return
        }
        
        if (['voucher'].includes(item.subtype)) return
        if (['propcard', 'brafteditor', 'sandbox', 'stepform', 'tabform'].includes(item.subtype) && item.wrap.datatype === 'static') return
        if (['balcony'].includes(item.type) && item.wrap.datatype === 'static') return
  
@@ -983,6 +984,39 @@
      })
    }
    if (MenuType === 'billPrint' && !error) {
      let forbid = {
        tabs: '标签页',
        search: '搜索条件',
        form: '表单',
        carousel: '轮播',
        tree: '树形列表',
        chart: '自定义图表',
        editor: '富文本',
        group: '分组'
      }
      let subforbid = {
        editable: '可编辑表格',
        voucher: '凭证'
      }
      config.components.forEach(item => {
        if (!error && forbid[item.type]) {
          error = '打印模板中不可使用' + forbid[item.type]
        } else if (!error && subforbid[item.type]) {
          error = '打印模板中不可使用' + subforbid[item.type]
        }
      })
      if (show && error) {
        notification.warning({
          top: 92,
          message: error,
          duration: 5
        })
      }
    }
    return error
  }