|
@@ -1,10 +1,10 @@
|
|
|
-import React,{ useEffect } from 'react'
|
|
|
|
|
|
|
+import React, { useEffect } from 'react'
|
|
|
import { Row, Col } from 'antd'
|
|
import { Row, Col } from 'antd'
|
|
|
import EditableForm from '@/components/EditableForm'
|
|
import EditableForm from '@/components/EditableForm'
|
|
|
|
|
|
|
|
const CompanyForm = props => {
|
|
const CompanyForm = props => {
|
|
|
const { customer } = props
|
|
const { customer } = props
|
|
|
- const columns =[
|
|
|
|
|
|
|
+ const columns = [
|
|
|
{
|
|
{
|
|
|
dataIndex: 'companyName',
|
|
dataIndex: 'companyName',
|
|
|
label: '公司全称',
|
|
label: '公司全称',
|
|
@@ -61,10 +61,6 @@ const CompanyForm = props => {
|
|
|
editCellType: 'textarea'
|
|
editCellType: 'textarea'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
- useEffect(() => {
|
|
|
|
|
- // console.log(client)
|
|
|
|
|
- // form.setFieldsValue(client)
|
|
|
|
|
- }, [customer])
|
|
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
<Row>
|
|
<Row>
|
|
@@ -72,10 +68,15 @@ const CompanyForm = props => {
|
|
|
<h2>{customer.companyName}</h2>
|
|
<h2>{customer.companyName}</h2>
|
|
|
</Col>
|
|
</Col>
|
|
|
<Col span={8} className="zh-text-right zh-gray">
|
|
<Col span={8} className="zh-text-right zh-gray">
|
|
|
- {customer.staffName} 创建于 {customer.createTime}
|
|
|
|
|
|
|
+ {customer.staffName} 创建于 {customer.createTime}
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
|
- <EditableForm dataSource={customer} columns={columns} tartgetUrl="/api/customer/update"/>
|
|
|
|
|
|
|
+ <EditableForm
|
|
|
|
|
+ dataSource={customer}
|
|
|
|
|
+ columns={columns}
|
|
|
|
|
+ tartgetUrl="/api/customer/update"
|
|
|
|
|
+ type="company"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|