| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- import { Row, Col } from 'antd'
- import React from 'react'
- import EditableForm from '@/components/EditableForm'
- import ChangeCompanyInput, {
- ChangeCompMap
- } from '@/pages/customer/Contact/components/ChangeCompany'
- import ChangeStaff from '../ChangeStaff/index'
- import Step from './Step/index'
- const Form = props => {
- const { business } = props
- const changeCopInputData = {
- customerName: business.customerName,
- customerId: business.customerId,
- targetName: business.name,
- dataId: business.id,
- actionPayload: ChangeCompMap.BUSINESS.key,
- title: ChangeCompMap.BUSINESS.title
- }
- const changeStaffOpt = {
- responsibleId: business.responsibleId,
- dataId: business.id,
- actionPayload: ChangeCompMap.BUSINESS.key,
- text: business.responsible
- }
- const columns = [
- {
- dataIndex: 'name',
- label: '商机名称',
- span: 24
- },
- {
- dataIndex: 'customerId',
- label: '客户名称',
- editCellType: 'custom',
- customCell: <ChangeCompanyInput dataSource={changeCopInputData} />,
- span: 24
- },
- {
- dataIndex: 'price',
- label: '商机金额(元)',
- span: 12
- },
- {
- dataIndex: 'finalTime',
- label: '预计成交',
- editCellType: 'datePicker',
- span: 12
- },
- {
- dataIndex: 'responsibleId',
- label: '负责人',
- editCellType: 'custom',
- customCell: <ChangeStaff dataSource={changeStaffOpt} />,
- span: 24
- },
- {
- dataIndex: 'remark',
- label: '备注',
- span: 24,
- editCellType: 'textarea'
- }
- ]
- return (
- <div>
- <Row>
- <Col span={8}>
- <h2 className="text-gray-500">商机</h2>
- </Col>
- <Col span={16} className="text-right text-gray-500">
- {business.staffName} 创建于{business.createTime}
- </Col>
- <Col span={22}>
- <h2 className="text-2xl pb-4">{business.name}</h2>
- </Col>
- <Col span={2} />
- <Step />
- </Row>
- <EditableForm
- dataSource={business}
- columns={columns}
- tartgetUrl="/business/update"
- type="business"
- />
- </div>
- )
- }
- export default Form
|