| | |
| | | { |
| | | "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": "", |
| | |
| | | "probation": "", |
| | | "keepPassword": "true", |
| | | "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | "host": "http://demo.mk9h.cn", |
| | | "service": "erp_new/" |
| | | } |
| | |
| | | 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' |
| | |
| | | <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> |
| | |
| | | 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 { |
| | |
| | | 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', |
| | |
| | | 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' |
| | |
| | | <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> |
| | |
| | | .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; |
| | |
| | | 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' |
| | |
| | | } |
| | | |
| | | _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') |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | async loadData (id) { |
| | | async loadData (id, type) { |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, pageIndex, search, BID, BData, selected } = this.state |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | 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 || '' |
| | |
| | | item.$disabled = true |
| | | } |
| | | } |
| | | |
| | | return item |
| | | }), |
| | | }) |
| | | } |
| | | |
| | | this.setState({ |
| | | activeKey: '', |
| | | selectKeys: [], |
| | | selectedData: [], |
| | | data: data, |
| | | total: result.total, |
| | | loading: false |
| | | }) |
| | |
| | | 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 = () => { |
| | |
| | | {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> |
| | | ) |
| | | } |
| | |
| | | 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; |
| | |
| | | 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' |
| | |
| | | return item |
| | | }) |
| | | }) |
| | | |
| | | _config.wrap.pagestyle = _config.wrap.pagestyle || 'page' |
| | | |
| | | this.setState({ |
| | | sync: _sync, |
| | |
| | | }) |
| | | } |
| | | |
| | | async loadData () { |
| | | async loadData (type) { |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, pageIndex, search, BID, BData } = this.state |
| | | |
| | |
| | | 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 |
| | | }) |
| | |
| | | }) |
| | | } |
| | | |
| | | 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 |
| | | |
| | |
| | | {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> |
| | | ) |
| | | } |
| | |
| | | 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 { |
| | |
| | | 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 |
| | | } |
| | | |
| | |
| | | |
| | | 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 |
| | | } |
| | | |