detailedList.jsx 14 KB

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