detailedList.jsx 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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. getLiquidationStatus,
  10. getNewOrderStatus,
  11. getProjectName
  12. } from "../../../../tools";
  13. class DetailedList extends Component{
  14. constructor(props) {
  15. super(props);
  16. this.state= {
  17. columns: [
  18. {
  19. title: "编号",
  20. dataIndex: "key",
  21. key: "key",
  22. width: 120,
  23. },
  24. {
  25. title: "催收部门",
  26. dataIndex: "depName",
  27. key: "depName",
  28. width: 320,
  29. },
  30. {
  31. title: "催款人",
  32. dataIndex: "aName",
  33. key: "aName",
  34. width: 220,
  35. },
  36. {
  37. title: "签单额(万元)",
  38. dataIndex: "totalAmount",
  39. key: "totalAmount",
  40. className: 'projectTable',
  41. width: 150,
  42. onCellClick: (record, event) => {
  43. event.stopPropagation();
  44. this.setState({
  45. visible1: true,
  46. aid: record.aid
  47. })
  48. },
  49. },
  50. {
  51. title: "应收款(万元)",
  52. dataIndex: "money",
  53. key: "money",
  54. className: 'projectTable',
  55. width: 150,
  56. onCellClick: (record, event) => {
  57. event.stopPropagation();
  58. this.setState({
  59. visible1: true,
  60. aid: record.aid
  61. })
  62. },
  63. },
  64. ],
  65. columns1: [
  66. {
  67. title: "序号",
  68. dataIndex: "key",
  69. key: "key"
  70. },
  71. {
  72. title: "合同编号",
  73. dataIndex: "contractNo",
  74. key: "contractNo"
  75. },
  76. {
  77. title: "订单编号",
  78. dataIndex: "orderNo",
  79. key: "orderNo"
  80. },
  81. {
  82. title: "客户名称",
  83. dataIndex: "userName",
  84. key: "userName",
  85. render: text => {
  86. return (
  87. <Tooltip title={text}>
  88. <div style={{
  89. maxWidth:'150px',
  90. overflow:'hidden',
  91. textOverflow: "ellipsis",
  92. whiteSpace:'nowrap',
  93. }}>{text}</div>
  94. </Tooltip>
  95. )
  96. }
  97. },
  98. {
  99. title: "订单负责人",
  100. dataIndex: "salesmanName",
  101. key: "salesmanName"
  102. },
  103. {
  104. title: "订单部门",
  105. dataIndex: "depName",
  106. key: "depName"
  107. },
  108. {
  109. title: "订单状态",
  110. dataIndex: "orderStatus",
  111. key: "orderStatus",
  112. render: text => {
  113. return getNewOrderStatus(text);
  114. }
  115. },
  116. {
  117. title: "项目状态",
  118. dataIndex: "projectStatus",
  119. key: "projectStatus",
  120. render: text => {
  121. return getProjectName(text);
  122. }
  123. },
  124. {
  125. title: "签单金额(万元)",
  126. dataIndex: "totalAmount",
  127. key: "totalAmount"
  128. },
  129. {
  130. title: "已收款(万元)",
  131. dataIndex: "settlementAmount",
  132. key: "settlementAmount"
  133. },
  134. {
  135. title: "未收款(万元)",
  136. dataIndex: "uncollectedAmount",
  137. key: "uncollectedAmount"
  138. },
  139. {
  140. title: "结算状态",
  141. dataIndex: "liquidationStatus",
  142. key: "liquidationStatus",
  143. render: text => {
  144. return getLiquidationStatus(text);
  145. }
  146. },
  147. {
  148. title: "催收科目",
  149. dataIndex: "dunSubject",
  150. key: "dunSubject"
  151. },
  152. {
  153. title: "应收款(万元)",
  154. dataIndex: "accountsReceivable",
  155. key: "accountsReceivable"
  156. },
  157. {
  158. title: "催款状态",
  159. dataIndex: "dunStatus",
  160. key: "dunStatus"
  161. },
  162. {
  163. title: "催款启动日期",
  164. dataIndex: "startDate",
  165. key: "startDate"
  166. },
  167. {
  168. title: "签单时间",
  169. dataIndex: "signDate",
  170. key: "signDate"
  171. }
  172. ],
  173. searchList:[
  174. {
  175. type:'departmentSelect',
  176. dataKey:'depId',
  177. placeholder:'请选择部门'
  178. },
  179. {
  180. type:'autoComplete',
  181. dataKey:'aid',
  182. api:'/api/admin/customer/listAdminByName',
  183. search:'adminName',
  184. placeholder:'请输入催款人'
  185. },
  186. {
  187. type:'select',
  188. dataKey:'sort',
  189. placeholder:'请选择排序',
  190. selectList:[
  191. {
  192. value:'0',
  193. label:'按改签单额排序'
  194. },
  195. {
  196. value:'1',
  197. label:'按应收款排序'
  198. },
  199. ]
  200. },
  201. {
  202. type:'times',
  203. title:'催收时间',
  204. dataKey:['startDate','endDate'],
  205. },
  206. ],
  207. searchList1:[
  208. {
  209. type:'text',
  210. dataKey:'name',
  211. placeholder:'请输入客户名称',
  212. },
  213. {
  214. type:'text',
  215. dataKey:'adminName',
  216. placeholder:'请输入营销员名称'
  217. },
  218. {
  219. type:'text',
  220. dataKey:'orderNo',
  221. placeholder:'请输入订单编号'
  222. },
  223. {
  224. type:'text',
  225. dataKey:'contractNo',
  226. placeholder:'请输入合同编号'
  227. },
  228. {
  229. type:'departmentSelect',
  230. dataKey:'depId',
  231. placeholder:'请选择订单部门'
  232. },
  233. {
  234. type:'times',
  235. title:'下单时间',
  236. dataKey:['starTime','endTime'],
  237. },
  238. ],
  239. searchConfig:{},
  240. }
  241. }
  242. render() {
  243. return (
  244. <div>
  245. <Modal
  246. maskClosable={false}
  247. visible={this.props.visible}
  248. onOk={this.props.onCancel}
  249. onCancel={this.props.onCancel}
  250. width='1200px'
  251. title={<span>
  252. {this.props.recordInfor.provinceName + '应收款详细'}
  253. <span style={{fontSize:'10px',color:'#0f2be5',marginLeft:'10px'}}>应收款:达到收款节点未收到的款</span>
  254. </span>}
  255. footer=''
  256. className="admin-desc-content">
  257. <div className="user-content">
  258. <TabelContent
  259. scroll={{ x: 0, y: 500}}
  260. searchList={this.state.searchList}
  261. columns={this.state.columns}
  262. searchConfig={this.props.searchConfig}
  263. searchOperation={(value)=>{
  264. for(let i of Object.keys(value)){
  265. if(i === 'sort' || i === 'pageNo' || i === 'pageSize'){
  266. delete value[i]
  267. }
  268. }
  269. this.setState({searchConfig:value})}
  270. }
  271. tabelApi={'/api/admin/newOrderDun/selectOrderDun'}
  272. exportApi={'/api/admin/newOrderDun/selectOrderDunExprot'}
  273. query={{
  274. province:this.props.recordInfor.province,
  275. }}
  276. dataProcessing={(data)=>{
  277. let theArr = [];
  278. for (let i = 0; i < data.data.length; i++) {
  279. let thisdata = data.data[i];
  280. thisdata.key=i + 1;
  281. theArr.push(thisdata);
  282. }
  283. return theArr;
  284. }}
  285. />
  286. </div>
  287. {this.state.visible1 && <Modal
  288. maskClosable={false}
  289. visible={this.state.visible1}
  290. onOk={()=>{
  291. this.setState({
  292. visible1:false
  293. })
  294. }}
  295. onCancel={()=>{
  296. this.setState({
  297. visible1:false
  298. })
  299. }}
  300. width='1600px'
  301. title='欠款催收列表'
  302. footer=''
  303. className="admin-desc-content">
  304. <div className="user-content">
  305. <TabelContent
  306. searchList={this.state.searchList1}
  307. columns={this.state.columns1}
  308. tabelApi={'/api/admin/newOrder/dunOrderNewList'}
  309. searchConfig={this.state.searchConfig}
  310. query={{
  311. specially:1,
  312. newStatus:1,
  313. aid:this.state.aid
  314. }}
  315. dataProcessing={(data)=>{
  316. let theArr = [];
  317. for (let i = 0; i < data.data.list.length; i++) {
  318. let thisdata = data.data.list[i];
  319. thisdata.key=(data.data.pageNo - 1) * data.data.pageSize + i + 1;
  320. theArr.push(thisdata);
  321. }
  322. return theArr;
  323. }}
  324. />
  325. </div>
  326. </Modal>}
  327. </Modal>
  328. </div>
  329. )
  330. }
  331. }
  332. export default DetailedList;