detailedList.jsx 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  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 style={{
  114. maxWidth:'150px',
  115. overflow:'hidden',
  116. textOverflow: "ellipsis",
  117. whiteSpace:'nowrap',
  118. }}>{text}</div>
  119. </Tooltip>
  120. )
  121. }
  122. },
  123. {
  124. title: "订单部门",
  125. dataIndex: "depName",
  126. key: "depName",
  127. },
  128. {
  129. title: "下单时间",
  130. dataIndex: "createDate",
  131. key: "createTime",
  132. },
  133. {
  134. title: "合同签订时间",
  135. dataIndex: "signDate",
  136. key: "signDate",
  137. },
  138. {
  139. title: "流程状态",
  140. dataIndex: "processStatus",
  141. key: "processStatus",
  142. render: (text) => {
  143. return getProcessStatus(text);
  144. },
  145. },
  146. {
  147. title: "签单金额(万元)",
  148. dataIndex: "totalAmount",
  149. key: "totalAmount",
  150. },
  151. {
  152. title: "开票金额(万元)",
  153. dataIndex: "invoiceAmount",
  154. key: "invoiceAmount",
  155. },
  156. {
  157. title: "已收款(万元)",
  158. dataIndex: "settlementAmount",
  159. key: "settlementAmount",
  160. },
  161. {
  162. title: "结算状态",
  163. dataIndex: "liquidationStatus",
  164. key: "liquidationStatus",
  165. render: (text) => {
  166. return getLiquidationStatus(text);
  167. },
  168. },
  169. {
  170. title: "是否特批",
  171. dataIndex: "approval",
  172. key: "approval",
  173. render: (text) => {
  174. return getApprovedState(text);
  175. },
  176. },
  177. {
  178. title: "订单状态",
  179. dataIndex: "orderStatus",
  180. key: "orderStatus",
  181. render: (text) => {
  182. return getNewOrderStatus(text);
  183. },
  184. },
  185. {
  186. title: "财务负责人",
  187. dataIndex: "financeName",
  188. key: "financeName",
  189. },
  190. ],
  191. searchList:[
  192. {
  193. type:'departmentSelect',
  194. dataKey:'depId',
  195. placeholder:'请选择部门'
  196. },
  197. {
  198. type:'autoComplete',
  199. dataTitle:'aName',
  200. dataKey:'aid',
  201. api:'/api/admin/customer/listAdminByName',
  202. search:'adminName',
  203. placeholder:'请输入跟进人'
  204. },
  205. {
  206. type:'select',
  207. dataKey:'sort',
  208. placeholder:'请选择排序',
  209. selectList:[
  210. {
  211. value:'0',
  212. label:'按总金额排序'
  213. },
  214. {
  215. value:'1',
  216. label:'按数量排序'
  217. },
  218. ]
  219. },
  220. {
  221. type:'times',
  222. title:'时间',
  223. dataKey:['startDate','endDate'],
  224. },
  225. ],
  226. searchList1:[
  227. {
  228. type:'text',
  229. placeholder:'请输入订单编号',
  230. dataKey:'orderNo',
  231. },
  232. {
  233. type:'text',
  234. placeholder:'请输入客户名称',
  235. dataKey:'name',
  236. },
  237. {
  238. type:'text',
  239. placeholder:'请输入合同编号',
  240. dataKey:'contractNo',
  241. },
  242. {
  243. type:'select',
  244. dataKey:'liquidationStatus',
  245. placeholder:'请选择结算状态',
  246. selectList:[
  247. {
  248. value:'0',
  249. label:'首付待付请'
  250. },
  251. {
  252. value:'1',
  253. label:'尾款待付清'
  254. },
  255. {
  256. value:'2',
  257. label:'已付清'
  258. },
  259. ]
  260. },
  261. {
  262. type:'select',
  263. dataKey:'approval',
  264. placeholder:'请选择特批状态',
  265. selectList:[
  266. {
  267. value:'0',
  268. label:'非特批'
  269. },
  270. {
  271. value:'1',
  272. label:'特批'
  273. },
  274. ]
  275. },
  276. {
  277. type:'select',
  278. dataKey:'amountStatus',
  279. placeholder:'请选择签单金额',
  280. selectList:[
  281. {
  282. value:'0',
  283. label:'10万元以下'
  284. },
  285. {
  286. value:'1',
  287. label:'10~20万元'
  288. },
  289. {
  290. value:'2',
  291. label:'20~30万元'
  292. },
  293. {
  294. value:'3',
  295. label:'30~40万元'
  296. },
  297. {
  298. value:'4',
  299. label:'40万元以上'
  300. },
  301. ]
  302. },
  303. ],
  304. searchConfig:{},
  305. }
  306. }
  307. render() {
  308. return (
  309. <div>
  310. <Modal
  311. maskClosable={false}
  312. visible={this.props.visible}
  313. onOk={this.props.onCancel}
  314. onCancel={this.props.onCancel}
  315. width='1200px'
  316. title={this.props.recordInfor.provinceName + '需复审详细'}
  317. footer=''
  318. className="admin-desc-content">
  319. <div className="user-content">
  320. <TabelContent
  321. scroll={{ x: 0, y: 500}}
  322. searchList={this.state.searchList}
  323. columns={this.state.columns}
  324. searchConfig={this.props.searchConfig}
  325. onRowClick={()=>{}}
  326. searchOperation={(value)=>{
  327. for(let i of Object.keys(value)){
  328. if(i === 'sort' || i === 'pageNo' || i === 'pageSize'){
  329. delete value[i]
  330. }
  331. }
  332. this.setState({searchConfig:value})}
  333. }
  334. tabelApi={'/api/admin/orderProject/highNewRetrialList'}
  335. exportApi={'/api/admin/orderProject/highNewRetrialList/export'}
  336. query={{
  337. province:this.props.recordInfor.province,
  338. }}
  339. dataProcessing={(data)=>{
  340. let theArr = [];
  341. for (let i = 0; i < data.data.length; i++) {
  342. let thisdata = data.data[i];
  343. thisdata.key=i + 1;
  344. theArr.push(thisdata);
  345. }
  346. return theArr;
  347. }}
  348. />
  349. </div>
  350. {this.state.visible1 && <Modal
  351. maskClosable={false}
  352. visible={this.state.visible1}
  353. onOk={()=>{
  354. this.setState({
  355. visible1:false,
  356. aid:'',
  357. })
  358. }}
  359. onCancel={()=>{
  360. this.setState({
  361. visible1:false,
  362. aid:'',
  363. })
  364. }}
  365. width='1600px'
  366. title='客户订单列表'
  367. footer=''
  368. className="admin-desc-content">
  369. <div className="user-content">
  370. <TabelContent
  371. scroll={{ x: 1200 }}
  372. searchConfig={this.state.searchConfig}
  373. searchList={this.state.searchList1}
  374. columns={this.state.columns1}
  375. tabelApi={'/api/admin/newOrder/orderNewList'}
  376. query={{
  377. aid:this.state.aid,
  378. specially: 9,
  379. }}
  380. onRowClick={(obj)=>{
  381. this.setState({
  382. detailsVisible:true,
  383. orderNo:obj.orderNo
  384. })
  385. }}
  386. dataProcessing={(data)=>{
  387. let theArr = [];
  388. for (let i = 0; i < data.data.list.length; i++) {
  389. let thisdata = data.data.list[i];
  390. thisdata.key=(data.data.pageNo - 1) * data.data.pageSize + i + 1;
  391. theArr.push(thisdata);
  392. }
  393. return theArr;
  394. }}
  395. />
  396. </div>
  397. </Modal>}
  398. </Modal>
  399. {this.state.detailsVisible && <Details
  400. orderNo={this.state.orderNo}
  401. visible={this.state.detailsVisible}
  402. onCancel={()=>{
  403. this.setState({
  404. detailsVisible:false,
  405. orderNo:''
  406. })
  407. }}
  408. />}
  409. </div>
  410. )
  411. }
  412. }
  413. export default DetailedList;