king
2023-06-14 08cce3334a2dc81d690b518136b0aaea64e48b0b
src/tabviews/basetable/index.jsx
@@ -316,6 +316,8 @@
            return false
          } else if (col.Hide === 'true') {
            return false
          } else if (col.type === 'action') {
            col.type = 'custom'
          }
          
          if (col.type === 'number') {
@@ -334,8 +336,58 @@
              return false
            }
          } else if (col.type === 'custom') {
            col.elements = col.elements.map(cell => {
              if (['text', 'number', 'formula'].includes(cell.eleType)) {
            col.elements = col.elements.filter(cell => {
              if (cell.eleType === 'button') {
                if (cell.hidden === 'true') return false
                cell.logLabel = item.$menuname + '-' + cell.label
                cell.Ot = cell.Ot || 'requiredSgl'
                cell.ContainerId = this.state.ContainerId
                cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
                cell.$menuId = item.uuid
                cell.$MenuID = this.props.MenuID
                cell.$view = 'popview'
                if (cell.syncComponentId) {
                  if (cell.syncComponentId === item.setting.supModule) {
                    cell.syncComponentId = ''
                    if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                      cell.execSuccess = 'mainline'
                    }
                  } else if (cell.syncComponentId === 'multiComponent') {
                    let ids = cell.syncComponents.map(m => {
                      return m.syncComId.pop() || ''
                    })
                    if (item.setting.supModule && ids.includes(item.setting.supModule)) {
                      if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                        cell.execSuccess = 'mainline'
                      }
                      ids = ids.filter(id => id !== item.setting.supModule)
                    }
                    if (ids.length === 0) {
                      cell.syncComponentId = ''
                    } else {
                      cell.syncComponentIds = ids
                    }
                  }
                }
                if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
                  cell = this.getPrinter(cell, item.uuid)
                }
                if (cell.controlField) {
                  if (/,/ig.test(cell.controlVal)) {
                    cell.controlVals = cell.controlVal.split(',')
                  } else {
                    cell.controlVals = [(cell.controlVal || '')]
                  }
                }
                return skip || permAction[cell.uuid]
              } else if (['text', 'number', 'formula'].includes(cell.eleType)) {
                if (!cell.height) {
                  cell.innerHeight = 'auto'
                }
@@ -346,8 +398,12 @@
                  }
                }
              }
              return cell
              return true
            })
            if (col.elements.length === 0) {
              return false
            }
          }
    
          if (col.linkmenu && col.linkmenu.length > 0) {
@@ -377,10 +433,29 @@
          cell.$view = 'popview'
          cell.$toolbtn = true
          if (cell.syncComponentId === item.setting.supModule) {
            cell.syncComponentId = ''
            if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
              cell.execSuccess = 'mainline'
          if (cell.syncComponentId) {
            if (cell.syncComponentId === item.setting.supModule) {
              cell.syncComponentId = ''
              if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                cell.execSuccess = 'mainline'
              }
            } else if (cell.syncComponentId === 'multiComponent') {
              let ids = cell.syncComponents.map(m => {
                return m.syncComId.pop() || ''
              })
              if (item.setting.supModule && ids.includes(item.setting.supModule)) {
                if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                  cell.execSuccess = 'mainline'
                }
                ids = ids.filter(id => id !== item.setting.supModule)
              }
              if (ids.length === 0) {
                cell.syncComponentId = ''
              } else {
                cell.syncComponentIds = ids
              }
            }
          }
@@ -399,43 +474,6 @@
          return skip || permAction[cell.uuid]
        })
      }
      item.cols = item.cols.filter(col => {
        if (col.type !== 'action') return true
        col.elements = col.elements.filter(cell => {
          if (cell.hidden === 'true') return false
          cell.logLabel = item.$menuname + '-' + cell.label
          cell.Ot = cell.Ot || 'requiredSgl'
          cell.ContainerId = this.state.ContainerId
          cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
          cell.$menuId = item.uuid
          cell.$MenuID = this.props.MenuID
          cell.$view = 'popview'
          if (cell.syncComponentId === item.setting.supModule) {
            cell.syncComponentId = ''
            if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
              cell.execSuccess = 'mainline'
            }
          }
          if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
            cell = this.getPrinter(cell, item.uuid)
          }
          if (cell.controlField) {
            if (/,/ig.test(cell.controlVal)) {
              cell.controlVals = cell.controlVal.split(',')
            } else {
              cell.controlVals = [(cell.controlVal || '')]
            }
          }
          return skip || permAction[cell.uuid]
        })
        return col.elements.length !== 0
      })
      
      return true
    })