king
2022-08-16 cc836600db6b4adecaaeb383a09e6ff89a2f0553
2022-08-16
11个文件已修改
177 ■■■■ 已修改文件
public/options.json 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/timeline/normal-timeline/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,12 +1,12 @@
{
  "appId": "201912040924165801464FF1788654BC5AC73",
  "appkey": "20191106103859640976D6E924E464D029CF0",
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "false",
  "lineColor": "",
  "filter": "false",
  "defaultApp": "mk",
  "defaultApp": "mkindustry",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "WXminiAppID": "",
@@ -15,6 +15,6 @@
  "probation": "",
  "keepPassword": "true",
  "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
}
src/menu/components/card/data-card/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Modal, Pagination } from 'antd'
import { PlusOutlined, PlusCircleOutlined, PlusSquareOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import { PlusOutlined, PlusCircleOutlined, PlusSquareOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined, DownOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -799,6 +799,7 @@
        <div style={{clear: 'both'}}></div>
        {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' && appType !== 'mob' ? <Pagination total={85} size="small" showTotal={total => `共 ${total} 条`} pageSize={20} defaultCurrent={1}/> : null}
        {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' && appType === 'mob' ? <MobPagination /> : null}
        {card.wrap.pagestyle === 'more' && card.setting.laypage === 'true' ? <div className="mk-more">查看更多<DownOutlined/></div> : null}
        <div className="component-name">
          <div className="center">
            <div className="title">{card.name}</div>
src/menu/components/card/data-card/index.scss
@@ -118,6 +118,13 @@
      border-bottom: 2px solid transparent!important;
    }
  }
  .mk-more {
    text-align: center;
    line-height: 40px;
    .anticon-down {
      margin-left: 2px;
    }
  }
}
.menu-data-card-edit-box::-webkit-scrollbar {
src/menu/components/card/data-card/options.jsx
@@ -114,18 +114,19 @@
      field: 'pagestyle',
      label: '分页风格',
      initval: wrap.pagestyle || 'page',
      tooltip: '数据源选择分页时有效。注:滑动加载只有第一个有效',
      tooltip: '数据源选择分页时有效。注:弹性布局时固定为页码。',
      required: false,
      disabled: !laypage,
      options: [
        {value: 'page', label: '页码'},
        {value: 'switch', label: '左右切换', forbid: appType === 'mob'},
        {value: 'switch', label: '左右切换', forbid: appType === 'mob' || subtype === 'tablecard'},
        {value: 'slide', label: '滑动加载', forbid: appType !== 'mob'},
        {value: 'more', label: '查看更多'},
      ],
      controlFields: [
        {field: 'slidetip', values: ['slide']},
      ],
      forbid: !(subtype === 'datacard' || (subtype === 'tablecard' && appType === 'mob'))
      forbid: subtype === 'propcard'
    },
    {
      type: 'radio',
src/menu/components/card/table-card/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Modal, Pagination } from 'antd'
import { PlusOutlined, PlusCircleOutlined, PlusSquareOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import { PlusOutlined, PlusCircleOutlined, PlusSquareOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined, DownOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -611,8 +611,9 @@
        <div style={{minHeight: 'calc(100% - 90px)'}}>
          {card.subcards.map(subcard => (<CardSimpleComponent key={subcard.uuid} cards={card} card={subcard} updateElement={this.updateCard} move={this.move} deleteElement={this.deleteCard}/>))}
        </div>
        {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' && appType !== 'mob' ? <Pagination size="small" total={50} /> : null}
        {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' && appType === 'mob' ? <MobPagination /> : null}
        {card.setting.laypage === 'true' && card.wrap.pagestyle === 'page' && appType !== 'mob' ? <Pagination size="small" total={50} /> : null}
        {card.setting.laypage === 'true' && card.wrap.pagestyle === 'page' && appType === 'mob' ? <MobPagination /> : null}
        {card.setting.laypage === 'true' && card.wrap.pagestyle === 'more' ? <div className="mk-more">查看更多<DownOutlined/></div> : null}
        <div className="component-name">
          <div className="center">
            <div className="title">{card.name}</div>
src/menu/components/card/table-card/index.scss
@@ -84,6 +84,13 @@
  .ant-pagination {
    text-align: right;
  }
  .mk-more {
    text-align: center;
    line-height: 40px;
    .anticon-down {
      margin-left: 2px;
    }
  }
}
.menu-table-card-edit-box::after {
  display: block;
src/tabviews/custom/components/card/data-card/index.jsx
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Spin, Empty, notification, message, Row, Col, Pagination } from 'antd'
import { DownOutlined } from '@ant-design/icons'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -165,6 +166,7 @@
    }
    _config.wrap.selStyle = _config.wrap.selStyle || 'active'
    _config.wrap.pagestyle = _config.wrap.pagestyle || 'page'
    _config.wrap.scale = _config.wrap.scale === 'true' ? 'scale' : ''
    _config.wrap.layout = (_config.wrap.layout || 'grid') + '-layout float-' + (_config.wrap.cardFloat || 'left')
@@ -462,7 +464,7 @@
    })
  }
  async loadData (id) {
  async loadData (id, type) {
    const { mainSearch } = this.props
    const { config, arr_field, pageIndex, search, BID, BData, selected } = this.state
@@ -536,11 +538,26 @@
        }
      }
      this.setState({
        activeKey: '',
        selectKeys: [],
        selectedData: [],
        data: result.data.map((item, index) => {
      let data = []
      if (type === 'plus') {
        let _data = (this.state.data || []).concat(result.data || [])
        data = _data.map((item, index) => {
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          item.$$BID = BID || ''
          item.$$BData = BData || ''
          item.$Index = index + 1 + ''
          if (config.wrap.controlField) {
            if (config.wrap.controlVal.includes(item[config.wrap.controlField])) {
              item.$disabled = true
            }
          }
          return item
        })
      } else {
        data = result.data.map((item, index) => {
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          item.$$BID = BID || ''
@@ -552,9 +569,15 @@
              item.$disabled = true
            }
          }
          return item
        }),
        })
      }
      this.setState({
        activeKey: '',
        selectKeys: [],
        selectedData: [],
        data: data,
        total: result.total,
        loading: false
      })
@@ -634,6 +657,20 @@
        duration: 10
      })
    }
  }
  loadMore = () => {
    const { total, pageIndex, loading, config } = this.state
    if (loading || config.setting.pageSize * pageIndex >= total) {
      return
    }
    this.setState({
      pageIndex: pageIndex + 1
    }, () => {
      this.loadData('', 'plus')
    })
  }
  prevPage = () => {
@@ -793,7 +830,8 @@
          {switchable ? <div className={'prev-page ' + (total <= _total ? 'disabled' : '')} onClick={this.nextPage}><div><div><img src={nextImg} alt=""/></div></div></div> : null}
          {precards.length === 0 && nextcards.length === 0 && (!data || data.length === 0) ? <Empty description={false}/> : null}
        </div>
        {config.wrap.pagestyle !== 'switch' && config.setting.laypage && data ? <Pagination size="small" total={total} showTotal={t => `共 ${t} 条`} pageSize={config.setting.pageSize} onChange={this.changePageIndex} current={pageIndex}/> : null}
        {config.wrap.pagestyle === 'page' && config.setting.laypage && data ? <Pagination size="small" total={total} showTotal={t => `共 ${t} 条`} pageSize={config.setting.pageSize} onChange={this.changePageIndex} current={pageIndex}/> : null}
        {config.wrap.pagestyle === 'more' && config.setting.laypage && data && data.length > 0 ? <div className={'mk-more' + (config.setting.pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>查看更多<DownOutlined/></div> : null}
      </div>
    )
  }
src/tabviews/custom/components/card/data-card/index.scss
@@ -145,6 +145,18 @@
    padding: 10px;
    text-align: right;
  }
  .mk-more {
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    .anticon-down {
      margin-left: 2px;
    }
  }
  .mk-more.disabled {
    cursor: not-allowed;
    color: #bcbcbc;
  }
}
.custom-data-card-box::-webkit-scrollbar {
  width: 7px;
src/tabviews/custom/components/card/table-card/index.jsx
@@ -3,6 +3,7 @@
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { Spin, notification, Row, Col, Empty, Pagination } from 'antd'
import { DownOutlined } from '@ant-design/icons'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -100,6 +101,8 @@
        return item
      })
    })
    _config.wrap.pagestyle = _config.wrap.pagestyle || 'page'
    this.setState({
      sync: _sync,
@@ -236,7 +239,7 @@
    })
  }
  async loadData () {
  async loadData (type) {
    const { mainSearch } = this.props
    const { config, arr_field, pageIndex, search, BID, BData } = this.state
@@ -277,15 +280,31 @@
        start = config.setting.pageSize * (pageIndex - 1) + 1
      }
      this.setState({
        data: result.data.map((item, index) => {
      let data = []
      if (type === 'plus') {
        let _data = (this.state.data || []).concat(result.data || [])
        data = _data.map((item, index) => {
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          item.$$BID = BID || ''
          item.$$BData = BData || ''
          item.$Index = index + 1 + ''
          return item
        })
      } else {
        data = result.data.map((item, index) => {
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          item.$$BID = BID || ''
          item.$$BData = BData || ''
          item.$Index = index + start + ''
          return item
        }),
        })
      }
      this.setState({
        data: data,
        total: result.total,
        loading: false
      })
@@ -416,6 +435,20 @@
    })
  }
  loadMore = () => {
    const { total, pageIndex, loading, config } = this.state
    if (loading || config.setting.pageSize * pageIndex >= total) {
      return
    }
    this.setState({
      pageIndex: pageIndex + 1
    }, () => {
      this.loadData('plus')
    })
  }
  render() {
    const { config, loading, data, BID, pageIndex, total } = this.state
@@ -436,7 +469,8 @@
        {data && data.length === 0 ? <div className="card-row-list" style={{height: config.wrap.contentHeight}}>
          <Empty description={false}/>
        </div> : null}
        {config.setting.laypage ? <Pagination size="small" current={pageIndex} total={total} onChange={this.changePageIndex} /> : null}
        {config.setting.laypage && config.wrap.pagestyle === 'page' ? <Pagination size="small" current={pageIndex} total={total} onChange={this.changePageIndex} /> : null}
        {config.setting.laypage && config.wrap.pagestyle === 'more' && data && data.length > 0 ? <div className={'mk-more' + (config.setting.pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>查看更多<DownOutlined/></div> : null}
      </div>
    )
  }
src/tabviews/custom/components/card/table-card/index.scss
@@ -86,6 +86,18 @@
      background: #ffffff;
    }
  }
  .mk-more {
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    .anticon-down {
      margin-left: 2px;
    }
  }
  .mk-more.disabled {
    cursor: not-allowed;
    color: #bcbcbc;
  }
}
.custom-card-box::after {
src/tabviews/custom/components/timeline/normal-timeline/index.jsx
@@ -229,11 +229,16 @@
  async loadData () {
    const { mainSearch } = this.props
    const { config, arr_field, BID, BData } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
        data: [],
      })
      return
    }
    if (config.setting.interType === 'inner' && config.setting.innerFunc === 'z_mk_express') {
      this.getExpress()
      return
    }
@@ -249,11 +254,6 @@
    let requireFields = searches.filter(item => item.required && item.value === '')
    if (requireFields.length > 0) {
      return
    }
    if (config.setting.interType === 'inner' && config.setting.innerFunc === 'z_mk_express') {
      this.getExpress()
      return
    }