| | |
| | | </DndProvider> |
| | | <EditColumn column={card} columns={this.state.columns} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/> |
| | | <Modal |
| | | wrapClassName="model-table-action-verify-modal" |
| | | title={'编辑'} |
| | | wrapClassName="mk-pop-modal" |
| | | visible={visible} |
| | | width={'75vw'} |
| | | maskClosable={false} |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'empty', |
| | | label: '空值隐藏', |
| | | initval: wrap.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | field: 'blacklist', |
| | | label: '黑名单', |
| | |
| | | checkAll = () => { |
| | | const { config, data, selectedData } = this.state |
| | | |
| | | if (config.wrap.cardType !== 'checkbox') return |
| | | if (!data || data.length === 0) return |
| | | |
| | | if (selectedData.length === 0 || selectedData.length < data.length) { |
| | |
| | | checkAll = () => { |
| | | const { config, data, selectedData } = this.state |
| | | |
| | | if (config.wrap.cardType !== 'checkbox') return |
| | | if (!data || data.length === 0) return |
| | | |
| | | if (selectedData.length === 0 || selectedData.length < data.length) { |
| | |
| | | |
| | | componentDidMount () { |
| | | this.loadData() |
| | | MKEmitter.addListener('reloadData', this.reloadData) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('reloadData', this.reloadData) |
| | | } |
| | | |
| | | reloadData = (menuId) => { |
| | | const { config } = this.props |
| | | const { activeItem } = this.state |
| | | |
| | | if (config.uuid !== menuId) return |
| | | |
| | | if (activeItem) { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, activeItem.id, activeItem) |
| | | } else { |
| | | this.loadData() |
| | | } |
| | | } |
| | | |
| | |
| | | </div> |
| | | )}> |
| | | {books.map(item => ( |
| | | <Option disabled={!item.months} key={item.id}>{item.account_name}</Option> |
| | | <Option disabled={!item.months} title={item.account_name} key={item.id}>{item.account_name}</Option> |
| | | ))} |
| | | </Select> : <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} disabled={config.wrap.readonly === 'true'} placeholder="请选择账套" onChange={this.changeBook}> |
| | | {books.map(item => ( |
| | | <Option disabled={!item.months} key={item.id}>{item.account_name}</Option> |
| | | <Option disabled={!item.months} title={item.account_name} key={item.id}>{item.account_name}</Option> |
| | | ))} |
| | | </Select>} |
| | | {activeItem ? <span className="date">{activeItem.date}</span> : null} |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { BID, setting, actions, config, columns, BData, selectedData, lock } = this.state |
| | | const { BID, setting, actions, config, columns, BData, data, selectedData, lock } = this.state |
| | | |
| | | let style = {...config.style} |
| | | if (config.wrap.empty === 'hidden' && data.length === 0) { |
| | | style.display = 'none' |
| | | } |
| | | |
| | | return ( |
| | | <div className="custom-edit-table" id={'anchor' + config.uuid} style={config.style}> |
| | | <div className="custom-edit-table" id={'anchor' + config.uuid} style={style}> |
| | | <NormalHeader config={config}/> |
| | | {config.search && config.search.length ? |
| | | <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null |
| | |
| | | .main-pickup { |
| | | position: relative; |
| | | z-index: 2; |
| | | margin-left: 10px; |
| | | } |
| | | .submit-table { |
| | | position: relative; |
| | |
| | | if (card.$c_ac) { |
| | | card.action.forEach(cell => { |
| | | if (cell.hidden === 'true' || cell.origin) return |
| | | // if (cell.OpenType === 'popview') { |
| | | // if (!cell.config) { |
| | | // errors.push({ level: 0, detail: `按钮“${cell.label}”中弹窗标签尚未设置`}) |
| | | // } else if (!cell.config.enabled) { |
| | | // errors.push({ level: 0, detail: `按钮“${cell.label}”中弹窗标签未启用`}) |
| | | // } |
| | | // } |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”中表单尚未添加`}) |