detailedList.jsx 11 KB

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