ContanctForm.jsx 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. import { Row, Col } from 'antd'
  2. import React, { useEffect } from 'react'
  3. import EditableForm from '@/components/EditableForm'
  4. // import '../Contacts/index.scss'
  5. const ContanctForm = props => {
  6. const { client } = props
  7. const columns = [
  8. {
  9. dataIndex: 'clientName',
  10. label: '姓名',
  11. span: 24
  12. },
  13. {
  14. dataIndex: 'companyName',
  15. label: '客户名称',
  16. span: 24
  17. },
  18. {
  19. dataIndex: 'district',
  20. label: '联系人地区',
  21. editCellType: 'cascader',
  22. span: 24
  23. },
  24. {
  25. dataIndex: 'gender',
  26. label: '性别',
  27. editCellType: 'select',
  28. span: 12
  29. },
  30. {
  31. dataIndex: 'niceName',
  32. label: '昵称',
  33. span: 12
  34. },
  35. {
  36. dataIndex: 'telephone',
  37. label: '手机',
  38. span: 12
  39. },
  40. {
  41. dataIndex: 'qq',
  42. label: 'QQ',
  43. span: 12
  44. },
  45. {
  46. dataIndex: 'phone',
  47. label: '电话',
  48. span: 12
  49. },
  50. {
  51. dataIndex: 'email',
  52. label: '邮箱',
  53. span: 12
  54. },
  55. {
  56. dataIndex: 'fax',
  57. label: '传真',
  58. span: 12
  59. },
  60. {
  61. dataIndex: 'department',
  62. label: '部门',
  63. span: 12
  64. },
  65. {
  66. dataIndex: 'position',
  67. label: '职务',
  68. span: 12
  69. },
  70. {
  71. dataIndex: 'office',
  72. label: '办公室',
  73. span: 24
  74. },
  75. {
  76. dataIndex: 'address',
  77. label: '联系人地址',
  78. span: 24
  79. },
  80. {
  81. dataIndex: 'ride',
  82. label: '联系人乘车',
  83. span: 24
  84. },
  85. {
  86. dataIndex: 'landmarks',
  87. label: '联系人地标',
  88. span: 24
  89. },
  90. {
  91. dataIndex: 'stay',
  92. label: '联系人住宿',
  93. span: 24
  94. },
  95. {
  96. dataIndex: 'mark',
  97. label: '备注',
  98. span: 24
  99. },
  100. {
  101. dataIndex: 'gerenbiaoqian',
  102. label: '个人标签',
  103. span: 24
  104. },
  105. {
  106. dataIndex: 'xiezuobiaoqian',
  107. label: '协作标签',
  108. span: 24
  109. }
  110. ]
  111. return (
  112. <div>
  113. <Row>
  114. <Col span={16}>
  115. <h2>{client.clientName}</h2>
  116. </Col>
  117. {/* className={[ 'text-right', styles.textMuted ]} */}
  118. <Col span={8} className="zh-text-right zh-gray">
  119. {client.staffName} 创建于{client.createTime}
  120. </Col>
  121. </Row>
  122. <EditableForm dataSource={client} columns={columns} tartgetUrl="/api/client/update" />
  123. </div>
  124. )
  125. }
  126. export default ContanctForm