| | |
| | | } |
| | | |
| | | state = { |
| | | BID: '', // 主表ID |
| | | config: null, // 图表配置信息 |
| | | loading: false, // 数据加载状态 |
| | | data: null, // 数据 |
| | | searchkey: null, // 过滤条件 |
| | | BID: '', |
| | | type: '', |
| | | config: null, |
| | | loading: false, |
| | | data: null, |
| | | searchkey: null, |
| | | disableAdd: true, |
| | | disableSave: true, |
| | | typeOptions: [] |
| | |
| | | this.setState({ |
| | | config: fromJS(config).toJS(), |
| | | BID: BID || '', |
| | | type: config.wrap.type |
| | | }, () => { |
| | | this.loadData() |
| | | }) |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { config, disableSave, disableAdd, typeOptions, data } = this.state |
| | | const { config, disableSave, disableAdd, typeOptions, data, type } = this.state |
| | | |
| | | return ( |
| | | <div className="menu-voucher-wrap" style={config.style}> |
| | |
| | | <Button className="system-background header-btn" disabled={disableAdd} onClick={this.triggeradd}>新增</Button> |
| | | <Button className="system-background header-btn" disabled={disableSave} onClick={this.triggersave}>保存</Button> |
| | | <Button className="system-background header-btn" disabled={disableSave} onClick={this.triggerprint}>打印</Button> |
| | | <Button className="system-background header-btn" disabled={disableSave} onClick={this.triggerprint}>导入</Button> |
| | | <Button className="system-background header-btn" disabled={disableSave} onClick={this.triggerprint}>导出</Button> |
| | | </div> |
| | | <div className="voucher-body"> |
| | | {type === 'edit' ? <div className="voucher-body"> |
| | | <div className="pre-wrap"> |
| | | <div className="voucher-code"> |
| | | <Select> |
| | |
| | | </div> |
| | | </div> |
| | | <VoucherTable config={config} data={data}/> |
| | | </div> |
| | | </div> : null} |
| | | {type === 'check' ? <div className="voucher-body"> |
| | | <div className="pre-wrap"> |
| | | <div className="voucher-code"> |
| | | 记 1 号 |
| | | </div> |
| | | <div className="voucher-date"> |
| | | 日期:2022-02-24 |
| | | </div> |
| | | <div className="voucher-affix"> |
| | | 附单据 2 张 |
| | | <Button type="link" className="" onClick={this.triggerprint}>附件</Button> |
| | | <Button type="link" className="" onClick={this.triggerprint}>备注</Button> |
| | | </div> |
| | | </div> |
| | | <VoucherTable config={config} data={data}/> |
| | | </div> : null} |
| | | </div> |
| | | ) |
| | | } |