ContanctForm.jsx 2.8 KB

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