From 31871ca836e6fcbea9b1c54e2ec15f49667bf093 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 23 十二月 2022 14:14:04 +0800 Subject: [PATCH] 2022-12-23 --- public/options.json | 12 ++-- src/menu/components/search/main-search/index.jsx | 10 --- src/tabviews/zshare/actionList/index.scss | 31 ++++++++++ src/menu/components/module/voucher/index.jsx | 7 - src/tabviews/zshare/actionList/index.jsx | 32 +++++++++- src/tabviews/custom/components/module/voucher/index.jsx | 10 ++- src/menu/components/table/normal-table/options.jsx | 12 ++++ src/menu/components/table/base-table/options.jsx | 11 +++ src/menu/components/share/searchcomponent/index.jsx | 10 --- src/menu/modulesource/option.jsx | 4 src/assets/css/main.scss | 6 +- src/templates/sharecomponent/searchcomponent/index.jsx | 10 --- 12 files changed, 103 insertions(+), 52 deletions(-) diff --git a/public/options.json b/public/options.json index ea0061e..bedcbee 100644 --- a/public/options.json +++ b/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", + "externalDatabase": "", "lineColor": "", "filter": "false", - "defaultApp": "mk", + "defaultApp": "mkindustry", "defaultLang": "zh-CN", "WXAppID": "", "WXminiAppID": "", @@ -17,6 +17,6 @@ "transfer": "false", "keepPassword": "true", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], - "host": "http://qingqiumarket.cn", - "service": "MKWMS/" + "host": "http://demo.mk9h.cn", + "service": "erp_new/" } \ No newline at end of file diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index 3e21319..035f750 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -180,9 +180,9 @@ z-index: 1090!important; } -.ant-dropdown { - z-index: 1090!important; -} +// .ant-dropdown { +// z-index: 1090!important; +// } .mk-normal-dropdown { .ant-dropdown-menu { diff --git a/src/menu/components/module/voucher/index.jsx b/src/menu/components/module/voucher/index.jsx index 5f13cd1..d07e207 100644 --- a/src/menu/components/module/voucher/index.jsx +++ b/src/menu/components/module/voucher/index.jsx @@ -4,7 +4,6 @@ import { Popover } from 'antd' import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' -// import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' import MKEmitter from '@/utils/events.js' import getWrapForm from './options' @@ -12,7 +11,6 @@ import './index.scss' const NormalForm = asyncIconComponent(() => import('@/components/normalform')) -// const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader')) class Voucher extends Component { static propTpyes = { @@ -39,7 +37,7 @@ width: card.width || 12, name: '鍑瘉', subtype: card.subtype, - setting: { interType: 'system' }, + // setting: { interType: 'system' }, wrap: { name: '鍑瘉', title: '', width: card.width || 12, type: 'edit' }, style: { marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px' }, headerStyle: {}, @@ -112,7 +110,6 @@ return ( <div className="menu-voucher-box" style={card.style} id={card.uuid}> - {/* <NormalHeader config={card} updateComponent={this.updateComponent}/> */} <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <NormalForm title="鍩烘湰璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> @@ -125,7 +122,7 @@ <ToolOutlined /> </Popover> <div className="voucher-box"> - jjj + 鍑瘉 </div> </div> ) diff --git a/src/menu/components/search/main-search/index.jsx b/src/menu/components/search/main-search/index.jsx index 8741554..8407229 100644 --- a/src/menu/components/search/main-search/index.jsx +++ b/src/menu/components/search/main-search/index.jsx @@ -207,7 +207,6 @@ this.searchFormRef.handleConfirm().then(res => { let fieldrepet = false // 瀛楁閲嶅 - let labelrepet = false // 鎻愮ず鏂囧瓧閲嶅 card.search = card.search.map(item => { // 鏁版嵁鏇存柊鍙婇噸澶嶆娴� if (item.uuid !== res.uuid && res.field && item.field) { @@ -233,8 +232,6 @@ if (setFields.length < itemFields.length + resFields.length && (res.type !== 'date' || item.type !== 'date')) { fieldrepet = true - } else if (item.label === res.label) { - labelrepet = true } } @@ -249,13 +246,6 @@ notification.warning({ top: 92, message: '瀛楁宸插瓨鍦�!', - duration: 5 - }) - return - } else if (labelrepet) { - notification.warning({ - top: 92, - message: '鍚嶇О宸插瓨鍦�!', duration: 5 }) return diff --git a/src/menu/components/share/searchcomponent/index.jsx b/src/menu/components/share/searchcomponent/index.jsx index 80730a4..3d94abe 100644 --- a/src/menu/components/share/searchcomponent/index.jsx +++ b/src/menu/components/share/searchcomponent/index.jsx @@ -153,7 +153,6 @@ this.searchFormRef.handleConfirm().then(res => { let fieldrepet = false // 瀛楁閲嶅 - let labelrepet = false // 鎻愮ず鏂囧瓧閲嶅 _searchlist = _searchlist.filter(item => !item.origin || item.uuid === res.uuid) // 鍘婚櫎绯荤粺椤� @@ -181,8 +180,6 @@ if (setFields.length < itemFields.length + resFields.length && (res.type !== 'date' || item.type !== 'date')) { fieldrepet = true - } else if (item.label === res.label) { - labelrepet = true } } @@ -197,13 +194,6 @@ notification.warning({ top: 92, message: '瀛楁宸插瓨鍦�!', - duration: 5 - }) - return - } else if (labelrepet) { - notification.warning({ - top: 92, - message: '鍚嶇О宸插瓨鍦�!', duration: 5 }) return diff --git a/src/menu/components/table/base-table/options.jsx b/src/menu/components/table/base-table/options.jsx index 6a9c6c7..fb8b61e 100644 --- a/src/menu/components/table/base-table/options.jsx +++ b/src/menu/components/table/base-table/options.jsx @@ -101,6 +101,17 @@ }, { type: 'number', + field: 'btnlimit', + label: '鎸夐挳闄愬埗', + initval: wrap.btnlimit || '', + tooltip: '鎸夐挳鏁伴噺闄愬埗锛岃秴鍑虹殑鎸夐挳浼氬湪鏇村涓笅鎷夋樉绀猴紝娉細鏇村涓殑鎸夐挳涓嶈缁戝畾鍙屽嚮浜嬩欢銆�', + min: 3, + max: 3000, + precision: 0, + required: false + }, + { + type: 'number', field: 'height', label: '琛ㄦ牸楂樺害', initval: wrap.height || '', diff --git a/src/menu/components/table/normal-table/options.jsx b/src/menu/components/table/normal-table/options.jsx index c6caecc..594af13 100644 --- a/src/menu/components/table/normal-table/options.jsx +++ b/src/menu/components/table/normal-table/options.jsx @@ -192,6 +192,18 @@ // forbid: appType === 'mob' // }, { + type: 'number', + field: 'btnlimit', + label: '鎸夐挳闄愬埗', + initval: wrap.btnlimit || '', + tooltip: '鎸夐挳鏁伴噺闄愬埗锛岃秴鍑虹殑鎸夐挳浼氬湪鏇村涓笅鎷夋樉绀猴紝娉細鏇村涓殑鎸夐挳涓嶈缁戝畾鍙屽嚮浜嬩欢銆�', + min: 3, + max: 3000, + precision: 0, + required: false, + forbid: appType !== '' + }, + { type: 'select', field: 'doubleClick', label: '鍙屽嚮浜嬩欢', diff --git a/src/menu/modulesource/option.jsx b/src/menu/modulesource/option.jsx index 4c97918..ad80395 100644 --- a/src/menu/modulesource/option.jsx +++ b/src/menu/modulesource/option.jsx @@ -30,7 +30,7 @@ import mindmap from '@/assets/mobimg/mindmap.png' import indent from '@/assets/mobimg/indent.jfif' import kapmap from '@/assets/mobimg/kapmap.jfif' -// import Voucher from '@/assets/mobimg/voucher.jpg' +import Voucher from '@/assets/mobimg/voucher.jpg' // 缁勪欢閰嶇疆淇℃伅 export const menuOptions = [ @@ -68,5 +68,5 @@ { type: 'menu', url: SandBox, component: 'code', subtype: 'sandbox', title: '鑷畾涔�', width: 24 }, { type: 'menu', url: group, component: 'group', subtype: 'normalgroup', title: '鍒嗙粍', width: 24, forbid: ['billPrint'] }, { type: 'menu', url: Iframe, component: 'iframe', subtype: 'iframe', title: 'iframe', width: 24, forbid: ['billPrint'] }, - // { type: 'menu', url: Voucher, component: 'module', subtype: 'voucher', title: '鍑瘉', width: 24, forbid: ['billPrint'] }, + { type: 'menu', url: Voucher, component: 'module', subtype: 'voucher', title: '鍑瘉', width: 24, forbid: ['billPrint'] }, ] diff --git a/src/tabviews/custom/components/module/voucher/index.jsx b/src/tabviews/custom/components/module/voucher/index.jsx index bd053ab..2fafcd4 100644 --- a/src/tabviews/custom/components/module/voucher/index.jsx +++ b/src/tabviews/custom/components/module/voucher/index.jsx @@ -4,6 +4,7 @@ import { Button, Select, Input, DatePicker } from 'antd' // import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons' +import Api from '@/api' import asyncComponent from '@/utils/asyncComponent' // import MKEmitter from '@/utils/events.js' import './index.scss' @@ -33,8 +34,8 @@ let BID = '' let BData = '' - if (config.setting.supModule) { - BData = window.GLOB.CacheData.get(config.setting.supModule) + if (config.wrap.supModule) { + BData = window.GLOB.CacheData.get(config.wrap.supModule) } else { BData = window.GLOB.CacheData.get(config.$pageId) } @@ -69,7 +70,10 @@ } loadData = () => { - + let param = { + func: 's_get_fcc_account_data' + } + Api.genericInterface(param) } triggeradd = () => { diff --git a/src/tabviews/zshare/actionList/index.jsx b/src/tabviews/zshare/actionList/index.jsx index dca525f..911e141 100644 --- a/src/tabviews/zshare/actionList/index.jsx +++ b/src/tabviews/zshare/actionList/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Affix } from 'antd' +import { Affix, Dropdown } from 'antd' +import { DownOutlined } from '@ant-design/icons' import asyncComponent from './asyncButtonComponent' import './index.scss' @@ -29,7 +30,25 @@ setting: PropTypes.any, // 椤甸潰閫氱敤璁剧疆 } - state = {} + state = { + actions: [], + mores: null + } + + UNSAFE_componentWillMount() { + const { setting, actions } = this.props + + if (!setting.btnlimit || setting.btnlimit >= actions.length) { + this.setState({actions: actions}) + } else { + let mores = fromJS(actions).toJS() + + this.setState({ + actions: mores.splice(0, setting.btnlimit), + mores + }) + } + } shouldComponentUpdate (nextProps, nextState) { return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) @@ -174,7 +193,8 @@ } render() { - const { setting, MenuID, actions } = this.props + const { setting, MenuID } = this.props + const { actions, mores } = this.state let fixed = setting.actionfixed && setting.tabType === 'main' // 鎸夐挳鏄惁鍥哄畾鍦ㄥご閮� if (fixed && MenuID) { @@ -182,6 +202,9 @@ <Affix offsetTop={48}> <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}> {this.getButtonList(actions)} + {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> + <div className="mk-more">鏇村<DownOutlined/></div> + </Dropdown> : null} </div> </Affix> ) @@ -189,6 +212,9 @@ return ( <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}> {this.getButtonList(actions)} + {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> + <div className="mk-more">鏇村<DownOutlined/></div> + </Dropdown> : null} </div> ) } diff --git a/src/tabviews/zshare/actionList/index.scss b/src/tabviews/zshare/actionList/index.scss index cd544eb..69b5302 100644 --- a/src/tabviews/zshare/actionList/index.scss +++ b/src/tabviews/zshare/actionList/index.scss @@ -26,3 +26,34 @@ display: none; } } +.mk-more { + display: inline-block; + height: 28px; + border: 1px solid #d8d8d8; + line-height: 28px; + padding: 0 10px 0px 20px; + border-radius: 4px; + cursor: pointer; + .anticon-down { + margin-left: 3px; + } +} +.mk-button-dropdown-wrap { + box-shadow: 0 0 2px #bcbcbc; + background: #ffffff; + min-width: 85px; + button { + display: block; + margin: 0!important; + width: 100%; + height: 34px; + border-radius: 0px; + padding-left: 15px!important; + .anticon { + display: none; + } + .anticon + span { + margin-left: 0px; + } + } +} diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx index 88b50ab..2951024 100644 --- a/src/templates/sharecomponent/searchcomponent/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/index.jsx @@ -160,7 +160,6 @@ this.searchFormRef.handleConfirm().then(res => { let fieldrepet = false // 瀛楁閲嶅 - let labelrepet = false // 鎻愮ず鏂囧瓧閲嶅 _searchlist = _searchlist.filter(item => !item.origin || item.uuid === res.uuid) // 鍘婚櫎绯荤粺椤� @@ -188,8 +187,6 @@ if (setFields.length < itemFields.length + resFields.length && (res.type !== 'date' || item.type !== 'date')) { fieldrepet = true - } else if (item.label === res.label) { - labelrepet = true } } @@ -204,13 +201,6 @@ notification.warning({ top: 92, message: '瀛楁宸插瓨鍦�!', - duration: 5 - }) - return - } else if (labelrepet) { - notification.warning({ - top: 92, - message: '鍚嶇О宸插瓨鍦�!', duration: 5 }) return -- Gitblit v1.8.0