| | |
| | | import Api from '@/api' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import Utils from '@/utils/utils.js' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | // } |
| | | resolve() |
| | | }).then(() => { |
| | | let reload = _config.isAdd |
| | | |
| | | // 保存时删除配置类型,system 、user |
| | | delete _config.type |
| | | delete _config.isAdd |
| | |
| | | config: _config, |
| | | openEdition: response.open_edition || '', |
| | | originMenu: fromJS(_config).toJS() |
| | | }, () => { |
| | | reload && MKEmitter.emit('revert') |
| | | }) |
| | | |
| | | this.props.reloadmenu() |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import { updateCommonTable } from '@/utils/utils-update.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | |
| | | }) |
| | | } |
| | | |
| | | let _LongParam = '' |
| | | let reload = _config.isAdd |
| | | |
| | | // 保存时删除配置类型,system 、user |
| | | delete _config.type |
| | | delete _config.isAdd |
| | | |
| | | let _LongParam = '' |
| | | |
| | | try { |
| | | _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config))) |
| | |
| | | config: _config, |
| | | openEdition: response.open_edition || '', |
| | | originMenu: fromJS(_config).toJS() |
| | | }, () => { |
| | | reload && MKEmitter.emit('revert') |
| | | }) |
| | | |
| | | localParam.func = 'sPC_TrdMenu_AddUpt_For_Local' |
| | |
| | | |
| | | componentDidMount () { |
| | | this.getBillPrintTemp() |
| | | MKEmitter.addListener('revert', this.revert) |
| | | MKEmitter.addListener('pasteButton', this.pasteButton) |
| | | } |
| | | |
| | | revert = () => { |
| | | this.setState({ |
| | | actionlist: fromJS(this.props.config.action).toJS() |
| | | }) |
| | | } |
| | | |
| | | pasteButton = (MenuId, btn) => { |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('revert', this.revert) |
| | | MKEmitter.removeListener('pasteButton', this.pasteButton) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | revert = () => { |
| | | this.setState({ |
| | | columnlist: fromJS(this.props.config.columns).toJS() |
| | | }) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('revert', this.revert) |
| | | MKEmitter.addListener('plusColumns', this.plusColumns) |
| | | } |
| | | |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('revert', this.revert) |
| | | MKEmitter.removeListener('plusColumns', this.plusColumns) |
| | | } |
| | | |
| | |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('plusSearch', this.plusSearch) |
| | | MKEmitter.addListener('revert', this.revert) |
| | | } |
| | | |
| | | revert = () => { |
| | | this.setState({searchlist: fromJS(this.props.config.search).toJS()}) |
| | | } |
| | | |
| | | plusSearch = (MenuId, item, type) => { |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('revert', this.revert) |
| | | MKEmitter.removeListener('plusSearch', this.plusSearch) |
| | | } |
| | | |
| | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import { updateSubTable } from '@/utils/utils-update.js' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | }) |
| | | } |
| | | |
| | | let _LongParam = '' |
| | | let reload = _config.isAdd |
| | | |
| | | // 保存时删除配置类型,system 、user |
| | | delete _config.type |
| | | delete _config.isAdd |
| | | |
| | | let _LongParam = '' |
| | | |
| | | try { |
| | | _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_config))) |
| | |
| | | config: _config, |
| | | originConfig: fromJS(_config).toJS() |
| | | }, () => { |
| | | reload && MKEmitter.emit('revert') |
| | | this.setState({ |
| | | menuloading: false, |
| | | menucloseloading: false |