detailedList.jsx 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. import React, { Component } from 'react';
  2. import {
  3. Modal,
  4. Tooltip,
  5. } from "antd";
  6. import './index.less';
  7. import TabelContent from "../../../../common/tabelContent";
  8. import {
  9. getApprovedState,
  10. getLiquidationStatus,
  11. getNewOrderStatus,
  12. getProcessStatus,
  13. } from "../../../../tools";
  14. import Details from './details';
  15. class DetailedList extends Component {
  16. constructor(props) {
  17. super(props);
  18. this.state = {
  19. columns: [
  20. {
  21. title: "编号",
  22. dataIndex: "key",
  23. key: "key",
  24. width: 120,
  25. },
  26. {
  27. title: "省份",
  28. dataIndex: "provinceName",
  29. key: "provinceName",
  30. width: 120,
  31. },
  32. {
  33. title: "跟进人",
  34. dataIndex: "name",
  35. key: "name",
  36. width: 320,
  37. },
  38. {
  39. title: "高新总数",
  40. dataIndex: "quantity",
  41. key: "quantity",
  42. width: 120,
  43. className: 'projectTable',
  44. onCellClick: (record, event) => {
  45. event.stopPropagation();
  46. this.setState({
  47. visible1: true,
  48. aid: record.aid
  49. })
  50. }
  51. },
  52. {
  53. title: "已通过高新数",
  54. dataIndex: "pass",
  55. key: "pass",
  56. width: 120,
  57. className: 'projectTable',
  58. onCellClick: (record, event) => {
  59. event.stopPropagation();
  60. this.setState({
  61. visible1: true,
  62. aid: record.aid
  63. })
  64. }
  65. },
  66. {
  67. title: "已签回",
  68. dataIndex: "signBacks",
  69. key: "signBacks",
  70. width: 120,
  71. className: 'projectTable',
  72. onCellClick: (record, event) => {
  73. event.stopPropagation();
  74. this.setState({
  75. visible1: true,
  76. aid: record.aid
  77. })
  78. }
  79. },
  80. {
  81. title: "未通过高新数",
  82. dataIndex: "notPass",
  83. key: "notPass",
  84. width: 120,
  85. className: 'projectTable',
  86. onCellClick: (record, event) => {
  87. event.stopPropagation();
  88. this.setState({
  89. visible1: true,
  90. aid: record.aid
  91. })
  92. }
  93. },
  94. ],
  95. columns1: [
  96. {
  97. title: "合同编号",
  98. dataIndex: "contractNo",
  99. key: "contractNo",
  100. },
  101. {
  102. title: "订单编号",
  103. dataIndex: "orderNo",
  104. key: "orderNo",
  105. },
  106. {
  107. title: "客户名称",
  108. dataIndex: "userName",
  109. key: "userName",
  110. render: text => {
  111. return (
  112. <Tooltip title={text}>
  113. <div
  114. // style={{
  115. // maxWidth: '150px',
  116. // overflow: 'hidden',
  117. // textOverflow: "ellipsis",
  118. // whiteSpace: 'nowrap',
  119. // }}
  120. >{text}</div>
  121. </Tooltip>
  122. )
  123. }
  124. },
  125. {
  126. title: "订单部门",
  127. dataIndex: "depName",
  128. key: "depName",
  129. },
  130. {
  131. title: "下单时间",
  132. dataIndex: "createDate",
  133. key: "createTime",
  134. },
  135. {
  136. title: "合同签订时间",
  137. dataIndex: "signDate",
  138. key: "signDate",
  139. },
  140. {
  141. title: "流程状态",
  142. dataIndex: "processStatus",
  143. key: "processStatus",
  144. render: (text, record) => {
  145. return getProcessStatus(text, record.examineName, record.approval);
  146. },
  147. },
  148. {
  149. title: "签单金额(万元)",
  150. dataIndex: "totalAmount",
  151. key: "totalAmount",
  152. },
  153. {
  154. title: "开票金额(万元)",
  155. dataIndex: "invoiceAmount",
  156. key: "invoiceAmount",
  157. },
  158. {
  159. title: "已收款(万元)",
  160. dataIndex: "settlementAmount",
  161. key: "settlementAmount",
  162. },
  163. {
  164. title: "结算状态",
  165. dataIndex: "liquidationStatus",
  166. key: "liquidationStatus",
  167. render: (text) => {
  168. return getLiquidationStatus(text);
  169. },
  170. },
  171. {
  172. title: "是否特批",
  173. dataIndex: "approval",
  174. key: "approval",
  175. render: (text) => {
  176. return getApprovedState(text);
  177. },
  178. },
  179. {
  180. title: "订单状态",
  181. dataIndex: "orderStatus",
  182. key: "orderStatus",
  183. render: (text) => {
  184. return getNewOrderStatus(text);
  185. },
  186. },
  187. {
  188. title: "财务负责人",
  189. dataIndex: "financeName",
  190. key: "financeName",
  191. },
  192. ],
  193. searchList: [
  194. {
  195. type: 'newDepartmentSelect',
  196. dataKey: 'deps',
  197. placeholder: '请选择部门'
  198. },
  199. {
  200. type: 'autoComplete',
  201. dataTitle: 'aName',
  202. dataKey: 'aid',
  203. api: '/api/admin/customer/listAdminByName',
  204. search: 'adminName',
  205. placeholder: '请输入跟进人'
  206. },
  207. {
  208. type: 'select',
  209. dataKey: 'sort',
  210. placeholder: '请选择排序',
  211. selectList: [
  212. {
  213. value: '0',
  214. label: '按总金额排序'
  215. },
  216. {
  217. value: '1',
  218. label: '按数量排序'
  219. },
  220. ]
  221. },
  222. {
  223. type: 'times',
  224. title: '时间',
  225. dataKey: ['startDate', 'endDate'],
  226. },
  227. ],
  228. searchList1: [
  229. {
  230. type: 'text',
  231. placeholder: '请输入订单编号',
  232. dataKey: 'orderNo',
  233. },
  234. {
  235. type: 'text',
  236. placeholder: '请输入客户名称',
  237. dataKey: 'name',
  238. },
  239. {
  240. type: 'text',
  241. placeholder: '请输入合同编号',
  242. dataKey: 'contractNo',
  243. },
  244. {
  245. type: 'select',
  246. dataKey: 'liquidationStatus',
  247. placeholder: '请选择结算状态',
  248. selectList: [
  249. {
  250. value: '0',
  251. label: '首付待付请'
  252. },
  253. {
  254. value: '1',
  255. label: '尾款待付清'
  256. },
  257. {
  258. value: '2',
  259. label: '已付清'
  260. },
  261. ]
  262. },
  263. {
  264. type: 'select',
  265. dataKey: 'approval',
  266. placeholder: '请选择特批状态',
  267. selectList: [
  268. {
  269. value: '0',
  270. label: '非特批'
  271. },
  272. {
  273. value: '1',
  274. label: '特批'
  275. },
  276. ]
  277. },
  278. {
  279. type: 'select',
  280. dataKey: 'amountStatus',
  281. placeholder: '请选择签单金额',
  282. selectList: [
  283. {
  284. value: '0',
  285. label: '10万元以下'
  286. },
  287. {
  288. value: '1',
  289. label: '10~20万元'
  290. },
  291. {
  292. value: '2',
  293. label: '20~30万元'
  294. },
  295. {
  296. value: '3',
  297. label: '30~40万元'
  298. },
  299. {
  300. value: '4',
  301. label: '40万元以上'
  302. },
  303. ]
  304. },
  305. ],
  306. searchConfig: {},
  307. }
  308. }
  309. render() {
  310. return (
  311. <div>
  312. <Modal
  313. maskClosable={false}
  314. visible={this.props.visible}
  315. onOk={this.props.onCancel}
  316. onCancel={this.props.onCancel}
  317. width='1200px'
  318. title={this.props.recordInfor.provinceName + '需复审详细'}
  319. footer=''
  320. className="admin-desc-content">
  321. <div className="user-content">
  322. <TabelContent
  323. scroll={{ x: 0, y: 500 }}
  324. searchList={this.state.searchList}
  325. columns={this.state.columns}
  326. searchConfig={this.props.searchConfig}
  327. onRowClick={() => { }}
  328. searchOperation={(value) => {
  329. for (let i of Object.keys(value)) {
  330. if (i === 'sort' || i === 'pageNo' || i === 'pageSize') {
  331. delete value[i]
  332. }
  333. }
  334. this.setState({ searchConfig: value })
  335. }
  336. }
  337. tabelApi={'/api/admin/orderProject/highNewRetrialList'}
  338. exportApi={'/api/admin/orderProject/highNewRetrialList/export'}
  339. query={{
  340. province: this.props.recordInfor.province,
  341. }}
  342. dataProcessing={(data) => {
  343. let theArr = [];
  344. for (let i = 0; i < data.data.length; i++) {
  345. let thisdata = data.data[i];
  346. thisdata.key = i + 1;
  347. theArr.push(thisdata);
  348. }
  349. return theArr;
  350. }}
  351. />
  352. </div>
  353. {this.state.visible1 && <Modal
  354. maskClosable={false}
  355. visible={this.state.visible1}
  356. onOk={() => {
  357. this.setState({
  358. visible1: false,
  359. aid: '',
  360. })
  361. }}
  362. onCancel={() => {
  363. this.setState({
  364. visible1: false,
  365. aid: '',
  366. })
  367. }}
  368. width='1600px'
  369. title='客户订单列表'
  370. footer=''
  371. className="admin-desc-content">
  372. <div className="user-content">
  373. <TabelContent
  374. scroll={{ x: 1200 }}
  375. searchConfig={JSON.parse(JSON.stringify(this.state.searchConfig))}
  376. searchList={this.state.searchList1}
  377. columns={this.state.columns1}
  378. tabelApi={'/api/admin/newOrder/orderNewList'}
  379. query={{
  380. aid: this.state.aid,
  381. specially: 9,
  382. }}
  383. onRowClick={(obj) => {
  384. this.setState({
  385. detailsVisible: true,
  386. orderNo: obj.orderNo
  387. })
  388. }}
  389. dataProcessing={(data) => {
  390. let theArr = [];
  391. for (let i = 0; i < data.data.list.length; i++) {
  392. let thisdata = data.data.list[i];
  393. thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
  394. theArr.push(thisdata);
  395. }
  396. return theArr;
  397. }}
  398. />
  399. </div>
  400. </Modal>}
  401. </Modal>
  402. {this.state.detailsVisible && <Details
  403. orderNo={this.state.orderNo}
  404. visible={this.state.detailsVisible}
  405. onCancel={() => {
  406. this.setState({
  407. detailsVisible: false,
  408. orderNo: ''
  409. })
  410. }}
  411. />}
  412. </div>
  413. )
  414. }
  415. }
  416. export default DetailedList;