king
2023-04-25 9ecbd8f279f6e0a1037e282418e8f9bfc0250769
2023-04-25
8个文件已修改
53 ■■■■ 已修改文件
src/menu/components/table/edit-table/columns/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/options.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/account/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/index.jsx
@@ -695,8 +695,7 @@
        </DndProvider>
        <EditColumn column={card} columns={this.state.columns} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/>
        <Modal
          wrapClassName="model-table-action-verify-modal"
          title={'编辑'}
          wrapClassName="mk-pop-modal"
          visible={visible}
          width={'75vw'}
          maskClosable={false}
src/menu/components/table/edit-table/options.jsx
@@ -295,6 +295,18 @@
      ]
    },
    {
      type: 'radio',
      field: 'empty',
      label: '空值隐藏',
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
      ],
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
src/tabviews/custom/components/card/data-card/index.jsx
@@ -496,6 +496,7 @@
  checkAll = () => {
    const { config, data, selectedData } = this.state
    if (config.wrap.cardType !== 'checkbox') return
    if (!data || data.length === 0) return
    
    if (selectedData.length === 0 || selectedData.length < data.length) {
src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -392,6 +392,7 @@
  checkAll = () => {
    const { config, data, selectedData } = this.state
    if (config.wrap.cardType !== 'checkbox') return
    if (!data || data.length === 0) return
    
    if (selectedData.length === 0 || selectedData.length < data.length) {
src/tabviews/custom/components/module/account/index.jsx
@@ -25,6 +25,7 @@
  componentDidMount () {
    this.loadData()
    MKEmitter.addListener('reloadData', this.reloadData)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -37,6 +38,20 @@
  componentWillUnmount () {
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('reloadData', this.reloadData)
  }
  reloadData = (menuId) => {
    const { config } = this.props
    const { activeItem } = this.state
    if (config.uuid !== menuId) return
    if (activeItem) {
      MKEmitter.emit('resetSelectLine', config.uuid, activeItem.id, activeItem)
    } else {
      this.loadData()
    }
  }
@@ -181,11 +196,11 @@
          </div>
        )}>
          {books.map(item => (
            <Option disabled={!item.months} key={item.id}>{item.account_name}</Option>
            <Option disabled={!item.months} title={item.account_name} key={item.id}>{item.account_name}</Option>
          ))}
        </Select> : <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} disabled={config.wrap.readonly === 'true'} placeholder="请选择账套" onChange={this.changeBook}>
          {books.map(item => (
            <Option disabled={!item.months} key={item.id}>{item.account_name}</Option>
            <Option disabled={!item.months} title={item.account_name} key={item.id}>{item.account_name}</Option>
          ))}
        </Select>}
        {activeItem ? <span className="date">{activeItem.date}</span> : null}
src/tabviews/custom/components/table/edit-table/index.jsx
@@ -589,10 +589,15 @@
  }
  render() {
    const { BID, setting, actions, config, columns, BData, selectedData, lock } = this.state
    const { BID, setting, actions, config, columns, BData, data, selectedData, lock } = this.state
    let style = {...config.style}
    if (config.wrap.empty === 'hidden' && data.length === 0) {
      style.display = 'none'
    }
    return (
      <div className="custom-edit-table" id={'anchor' + config.uuid} style={config.style}>
      <div className="custom-edit-table" id={'anchor' + config.uuid} style={style}>
        <NormalHeader config={config}/>
        {config.search && config.search.length ?
          <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null
src/tabviews/custom/components/table/edit-table/normalTable/index.scss
@@ -426,6 +426,7 @@
  .main-pickup {
    position: relative;
    z-index: 2;
    margin-left: 10px;
  }
  .submit-table {
    position: relative;
src/utils/utils-custom.js
@@ -1296,6 +1296,13 @@
  if (card.$c_ac) {
    card.action.forEach(cell => {
      if (cell.hidden === 'true' || cell.origin) return
      // if (cell.OpenType === 'popview') {
      //   if (!cell.config) {
      //     errors.push({ level: 0, detail: `按钮“${cell.label}”中弹窗标签尚未设置`})
      //   } else if (!cell.config.enabled) {
      //     errors.push({ level: 0, detail: `按钮“${cell.label}”中弹窗标签未启用`})
      //   }
      // }
      if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
        if (!cell.modal || cell.modal.fields.length === 0) {
          errors.push({ level: 0, detail: `按钮“${cell.label}”中表单尚未添加`})