king
2023-10-27 6555f1f63a5389d49fbb98b5b2dca16a61239c64
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -15,6 +15,7 @@
const { Paragraph } = Typography
const MkIcon = asyncComponent(() => import('@/components/mk-icon'))
const MKPopSelect = asyncComponent(() => import('./mkPopSelect'))
const CardCellComponent = asyncComponent(() => import('@/tabviews/custom/components/card/cardcellList'))
class CusSwitch extends Component {
@@ -370,6 +371,10 @@
    }, 10)
  }
  onPopChange = () => {
  }
  render() {
    let { col, config, record, style, className, ...resProps } = this.props
    const { editing, value, err } = this.state
@@ -445,6 +450,12 @@
            return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
              <CusSwitch config={col} defaultValue={_value} autoFocus={true} onChange={this.onSwitchChange} onBlur={this.switchBlur}/>
            </td>)
          } else if (col.editType === 'popSelect') {
            let _value = record[col.field] !== undefined ? record[col.field] : ''
            return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
              <MKPopSelect defaultValue={_value} config={col} BID={record.$$BID} ID={record.$$uuid} onChange={this.onPopChange} onSubmit={() => {}}/>
            </td>)
          } else {
            let _value = record[col.field] !== undefined ? record[col.field] : ''
@@ -833,6 +844,10 @@
    MKEmitter.emit('changeRecord', col.tableId, {...record, [col.field]: _val})
  }
  onPopChange = () => {
  }
  render() {
    let { col, config, record, style, className, ...resProps } = this.props
    const { err } = this.state
@@ -863,6 +878,10 @@
          children = (
            <CusDatePicker config={col} value={record[col.field] || null} onChange={this.onDateChange} blur={() => {}}/>
          )
        } else if (col.editType === 'popSelect') {
          children = (
            <MKPopSelect config={col} defaultValue={record[col.field] || ''} BID={record.$$BID} ID={record.$$uuid} onChange={this.onPopChange} onSubmit={() => {}}/>
          )
        } else {
          children = (<>
            <Select