king
2024-03-21 a9b02f6862522b54d0824152017bf2acfec2af7b
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -752,6 +752,10 @@
        } else if (content === config.closeVal) {
          content = config.closeText
        }
      } else if (col.editType === 'popSelect') {
        if (col.showField) {
          content = record[col.showField] || content
        }
      }
      if (content !== '') {
@@ -761,6 +765,10 @@
          content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}`
        } else if (col.textFormat === 'encryption') {
          content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span>
        }
        if (col.noValue === 'hide' && content < '1949-10-02') {
          content = ''
        }
        if (col.textFormat !== 'encryption') {
@@ -809,8 +817,13 @@
              <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
            </td>)
          } else if (col.editType === 'popSelect') {
            let showValue = ''
            if (col.showField) {
              showValue = record[col.showField] || ''
            }
            return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
              <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
              <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
            </td>)
          } else {
            return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
@@ -1056,8 +1069,13 @@
            <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={false} onChange={this.onColChange}/>
          )
        } else if (col.editType === 'popSelect') {
          let showValue = ''
          if (col.showField) {
            showValue = record[col.showField] || ''
          }
          children = (
            <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/>
            <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/>
          )
        } else {
          children = (
@@ -1078,6 +1096,10 @@
          } else if (content === config.closeVal) {
            content = config.closeText
          }
        } else if (col.editType === 'popSelect') {
          if (col.showField) {
            content = record[col.showField] || content
          }
        }
        if (content !== '') {
@@ -1087,6 +1109,10 @@
            content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}`
          } else if (col.textFormat === 'encryption') {
            content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span>
          }
          if (col.noValue === 'hide' && content < '1949-10-02') {
            content = ''
          }
          if (col.textFormat !== 'encryption') {
@@ -1682,6 +1708,9 @@
        result = originVal === contrastVal
      } else if (item.match === '!=') {
        result = originVal !== contrastVal
      } else if (item.match === 'regexp') {
        let reg = new RegExp(item.contrastValue, 'ig')
        result = reg.test(originVal)
      } else {
        originVal = isNaN(originVal) ? originVal : +originVal
        contrastVal = isNaN(contrastVal) ? contrastVal : +contrastVal
@@ -2623,7 +2652,7 @@
        {setting.hasSubmit && edData.length > 0 ? <div className="edit-custom-table-btn-wrap" style={submit.wrapStyle}>
          <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-table" type="link">提交</Button>
        </div> : null}
        <div className={`edit-custom-table ${setting.tableHeader || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'}`} style={style}>
        <div className={`edit-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'}`} style={style}>
          <Table
            rowKey="$$uuid"
            components={components}