detailedList.jsx 8.9 KB

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