| | |
| | | this.updateComponent(_card) |
| | | } |
| | | |
| | | addSearch = (copy) => { |
| | | addSearch = (copy, type = '') => { |
| | | const { card } = this.state |
| | | |
| | | let newcard = {} |
| | |
| | | } |
| | | |
| | | // 注册事件-添加搜索 |
| | | MKEmitter.emit('addSearch', card.uuid, newcard) |
| | | MKEmitter.emit('addSearch', card.uuid, newcard, type) |
| | | } |
| | | |
| | | addButton = (copy) => { |
| | |
| | | } |
| | | |
| | | if (res.field && keys.includes(res.field.toLowerCase())) { |
| | | resolve({status: false, message: '搜索字段已存在!'}) |
| | | return |
| | | resolve({status: false}) |
| | | const that = this |
| | | confirm({ |
| | | title: '搜索字段已存在!', |
| | | okText: '知道了', |
| | | cancelText: '替换', |
| | | onOk() {}, |
| | | onCancel() { |
| | | that.addSearch(res, 'replace') |
| | | } |
| | | |
| | | }) |
| | | } else { |
| | | resolve({status: true}) |
| | | |
| | | this.addSearch(res) |
| | | } |
| | | } |
| | | } else if (type === 'action') { |
| | | if (res.style) { |
| | | delete res.style.width |
| | |
| | | this.updateComponent(_card) |
| | | } |
| | | |
| | | addSearch = (copy) => { |
| | | addSearch = (copy, type = '') => { |
| | | const { card } = this.state |
| | | |
| | | let newcard = {} |
| | |
| | | } |
| | | |
| | | // 注册事件-添加搜索 |
| | | MKEmitter.emit('addSearch', card.uuid, newcard) |
| | | MKEmitter.emit('addSearch', card.uuid, newcard, type) |
| | | } |
| | | |
| | | addButton = (copy) => { |
| | |
| | | } |
| | | |
| | | if (res.field && keys.includes(res.field.toLowerCase())) { |
| | | resolve({status: false, message: '搜索字段已存在!'}) |
| | | return |
| | | resolve({status: false}) |
| | | const that = this |
| | | confirm({ |
| | | title: '搜索字段已存在!', |
| | | okText: '知道了', |
| | | cancelText: '替换', |
| | | onOk() {}, |
| | | onCancel() { |
| | | that.addSearch(res, 'replace') |
| | | } |
| | | |
| | | }) |
| | | } else { |
| | | resolve({status: true}) |
| | | |
| | | this.addSearch(res) |
| | | } |
| | | } |
| | | } else if (type === 'action') { |
| | | if (appType === 'mob' && !['pop', 'prompt', 'exec', 'innerpage'].includes(res.OpenType)) { |
| | | resolve({status: false, message: '移动端不支持此类型的按钮。'}) |
| | |
| | | this.updateComponent(card) |
| | | } |
| | | |
| | | addSearch = (copy) => { |
| | | addSearch = (copy, type = '') => { |
| | | const { card } = this.state |
| | | |
| | | let newcard = {} |
| | |
| | | } |
| | | |
| | | // 注册事件-添加搜索 |
| | | MKEmitter.emit('addSearch', card.uuid, newcard) |
| | | MKEmitter.emit('addSearch', card.uuid, newcard, type) |
| | | } |
| | | |
| | | move = (item, direction) => { |
| | |
| | | } |
| | | |
| | | if (res.field && keys.includes(res.field.toLowerCase())) { |
| | | resolve({status: false, message: '搜索字段已存在!'}) |
| | | return |
| | | resolve({status: false}) |
| | | const that = this |
| | | confirm({ |
| | | title: '搜索字段已存在!', |
| | | okText: '知道了', |
| | | cancelText: '替换', |
| | | onOk() {}, |
| | | onCancel() { |
| | | that.addSearch(res, 'replace') |
| | | } |
| | | |
| | | }) |
| | | } else { |
| | | resolve({status: true}) |
| | | |
| | | this.addSearch(res) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | addButton = (copy) => { |
| | | const { card } = this.state |
| | |
| | | |
| | | plusSearch = (uuid, search, type) => { |
| | | const { card } = this.state |
| | | if (card.uuid !== uuid || type !== 'simple') return |
| | | if (card.uuid !== uuid || (type !== 'simple' && type !== 'replace')) return |
| | | |
| | | search.uuid = Utils.getuuid() |
| | | search.focus = true |
| | | |
| | | MKEmitter.emit('addSearch', card.uuid, search) |
| | | MKEmitter.emit('addSearch', card.uuid, search, type === 'replace' ? 'replace' : '') |
| | | } |
| | | |
| | | addButton = () => { |
| | |
| | | |
| | | plusSearch = (uuid, search, type) => { |
| | | const { card } = this.state |
| | | if (card.uuid !== uuid || type !== 'simple') return |
| | | if (card.uuid !== uuid || (type !== 'simple' && type !== 'replace')) return |
| | | |
| | | search.uuid = Utils.getuuid() |
| | | search.focus = true |
| | | |
| | | MKEmitter.emit('addSearch', card.uuid, search) |
| | | MKEmitter.emit('addSearch', card.uuid, search, type === 'replace' ? 'replace' : '') |
| | | } |
| | | |
| | | addButton = () => { |
| | |
| | | |
| | | this.updateComponent(_card) |
| | | this.handleSearch(item) |
| | | } else if (type === 'replace') { |
| | | delete item.focus |
| | | _card.search = _card.search.map(cell => { |
| | | if (cell.field && cell.field.toLowerCase() === item.field.toLowerCase()) { |
| | | return item |
| | | } |
| | | return cell |
| | | }) |
| | | |
| | | this.updateComponent(_card) |
| | | this.handleSearch(item) |
| | | } else if (type === 'multil') { |
| | | _card.search.push(...item) |
| | | |
| | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | // import './index.scss' |
| | | |
| | | const { confirm } = Modal |
| | | const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform')) |
| | | |
| | | class PasteController extends Component { |
| | |
| | | } |
| | | } |
| | | |
| | | if (res.field && keys.includes(res.field.toLowerCase())) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '搜索字段已存在!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | MKEmitter.emit('plusSearch', config.uuid, res, 'simple') |
| | | this.setState({visible: false}) |
| | | if (res.field && keys.includes(res.field.toLowerCase())) { |
| | | confirm({ |
| | | title: '搜索字段已存在!', |
| | | okText: '知道了', |
| | | cancelText: '替换', |
| | | onOk() {}, |
| | | onCancel() { |
| | | MKEmitter.emit('plusSearch', config.uuid, res, 'replace') |
| | | } |
| | | }) |
| | | } else { |
| | | MKEmitter.emit('plusSearch', config.uuid, res, 'simple') |
| | | } |
| | | return |
| | | } else if (type === 'cardcell') { |
| | | config.subcards.push(res) |
| | |
| | | MKEmitter.removeListener('addSearch', this.addSearch) |
| | | } |
| | | |
| | | addSearch = (cardId, element) => { |
| | | addSearch = (cardId, element, type) => { |
| | | if (cardId !== this.props.config.uuid) return |
| | | |
| | | const { searchlist } = this.state |
| | | |
| | | if (type === 'replace') { |
| | | delete element.focus |
| | | this.setState({ |
| | | searchlist: searchlist.map(cell => { |
| | | if (cell.field && cell.field.toLowerCase() === element.field.toLowerCase()) { |
| | | return element |
| | | } |
| | | return cell |
| | | }), |
| | | }) |
| | | } else { |
| | | this.setState({searchlist: [...searchlist, element]}) |
| | | } |
| | | this.handleSearch(element) |
| | | } |
| | | |
| | |
| | | }, () => { |
| | | this.handleSearch(item) |
| | | }) |
| | | } else if (type === 'replace') { |
| | | delete item.focus |
| | | this.setState({ |
| | | searchlist: searchlist.map(cell => { |
| | | if (cell.field && cell.field.toLowerCase() === item.field.toLowerCase()) { |
| | | return item |
| | | } |
| | | return cell |
| | | }), |
| | | }, () => { |
| | | this.handleSearch(item) |
| | | }) |
| | | } else if (type === 'multil') { |
| | | let list = [...searchlist, ...item] |
| | | list = list.filter(item => !item.origin) // 去除系统项 |
| | |
| | | _lpline = `set @ModularDetailCode= right('${record.ModularDetailCode}',50)` |
| | | } |
| | | |
| | | let sql = `select @BillCode='', @${record.field}='', @ModularDetailCode='' |
| | | let sql = `Declare @BillCode nvarchar(50),@ModularDetailCode nvarchar(50) |
| | | select @BillCode='', @${record.field}='', @ModularDetailCode='' |
| | | ${_lpline} |
| | | exec s_get_BillCode |
| | | @ModularDetailCode=@ModularDetailCode, |