import React, { PureComponent } from 'react'; import { connect } from 'dva'; import { routerRedux } from 'dva/router'; import { Card, Table, Form, Spin, Input, Button, Icon } from 'antd'; import PageHeaderLayout from '../../../layouts/PageHeaderLayout'; import ProductSelectModal from './product'; @Form.create() @connect(state => ({ comboDetail: state.comboDetail, product: state.product, })) export default class PackageProfile extends PureComponent { handleEditProuctClick = () => { this.props.dispatch({ type: 'comboDetail/showModal' }); this.props.dispatch({ type: 'product/query' }); } handleProductModalOk = () => { } handleProductModalCancel = () => { this.props.dispatch({ type: 'comboDetail/hideModal' }); } handleProductModalSearch = () => { } handleProductModalTableChange = () => { } render() { const { form, comboDetail, product } = this.props; const { modalShow, currentItem, itemLoading } = comboDetail; const { list, listLoading, pagination } = product; const { products } = currentItem; const { getFieldDecorator } = form; const formItemLayout = { labelCol: { span: 7 }, wrapperCol: { span: 12 }, }; const submitFormLayout = { wrapperCol: { xs: { span: 24, offset: 0 }, sm: { span: 10, offset: 7 }, }, }; const tableFormLayout = { wrapperCol: { offset: 7, span: 12 }, }; const columns = [{ title: '产品封面', dataIndex: 'coverUrl', key: 'coverUrl', render: (text, record) => {}, },{ title: '产品编号', dataIndex: 'code', key: 'code', },{ title: '产品名称', dataIndex: 'name', key: 'name', },{ title: '供应商', dataIndex: 'cpName', key: 'cpName', },{ title: '供应商价格', dataIndex: 'cpPrice', key: 'cpPrice', }]; return (
{getFieldDecorator('code', { rules: [{ required: true, type: 'string', message: '编号为必填项!' }], })()} {getFieldDecorator('name', { rules: [{ required: true, type: 'string', message: '名称为必填项!' }], })()} record.id} locale={{ emptyText:    该产品包内暂无相关产品,请选择! }} /> {/*产品选择模态框*/} ); } }