/src/container/history/historyRecords/historyRecords.js

https://github.com/ibisTime/xn-wzcd-oss · JavaScript · 148 lines · 146 code · 2 blank · 0 comment · 2 complexity · f05e86894ec1dee6dafd584ebdd3890d MD5 · raw file

  1. import React from 'react';
  2. import {
  3. setTableData,
  4. setPagination,
  5. setBtnList,
  6. setSearchParam,
  7. clearSearchParam,
  8. doFetching,
  9. cancelFetching,
  10. setSearchData
  11. } from '@redux/history/historyRecords';
  12. import {
  13. listWrapper
  14. } from 'common/js/build-list';
  15. import {
  16. showWarnMsg,
  17. showSucMsg,
  18. formatDate
  19. } from 'common/js/util';
  20. import {
  21. Button,
  22. Upload,
  23. Modal
  24. } from 'antd';
  25. import {
  26. sendMsg
  27. } from 'api/biz';
  28. @listWrapper(state => ({
  29. ...state.historyHistoryRecords,
  30. parentCode: state.menu.subMenuCode
  31. }), {
  32. setTableData,
  33. clearSearchParam,
  34. doFetching,
  35. setBtnList,
  36. cancelFetching,
  37. setPagination,
  38. setSearchParam,
  39. setSearchData
  40. })
  41. class HistoryBusiness extends React.Component {
  42. render() {
  43. const fields = [{
  44. title: '银行',
  45. field: 'loanBankName',
  46. type: 'select',
  47. listCode: 632057,
  48. keyName: 'code',
  49. valueName: '{{bankName.DATA}}-{{fullName.DATA}}',
  50. search: true
  51. }, {
  52. title: '业务编号',
  53. field: 'code',
  54. search: true
  55. }, {
  56. title: '业务公司',
  57. field: 'companyCode',
  58. listCode: 630106,
  59. params: {
  60. typeList: [1]
  61. },
  62. type: 'select',
  63. keyName: 'code',
  64. valueName: 'name',
  65. search: true
  66. }, {
  67. title: '客户姓名',
  68. field: 'customerName',
  69. search: true
  70. }, {
  71. title: '身份证号',
  72. field: 'idNo',
  73. search: true,
  74. nowrap: true
  75. }, {
  76. title: '购车途径',
  77. field: 'shopWay',
  78. type: 'select',
  79. key: 'budget_orde_biz_typer',
  80. search: true
  81. }, {
  82. title: '汽车经销商',
  83. field: 'carDealerCode',
  84. type: 'select',
  85. pageCode: 632065,
  86. params: {
  87. curNodeCode: '006_02'
  88. },
  89. keyName: 'code',
  90. valueName: '{{parentGroup.DATA}}-{{abbrName.DATA}}',
  91. search: true
  92. }, {
  93. title: '车辆型号',
  94. field: 'carModel'
  95. }, {
  96. title: '车辆价格',
  97. field: 'invoicePrice',
  98. amount: true
  99. }, {
  100. title: '贷款金额',
  101. field: 'loanAmount',
  102. amount: true
  103. }, {
  104. title: '总期数',
  105. field: 'periods'
  106. }, {
  107. title: '剩余期数',
  108. field: 'restPeriods'
  109. }, {
  110. title: '是否垫资',
  111. field: 'isAdvanceFund'
  112. }, {
  113. title: '放款日期',
  114. field: 'updater',
  115. render: (v, d) => {
  116. if(d.loanOrder !== undefined) {
  117. return formatDate(d.loanOrder.fkDatetime);
  118. }
  119. }
  120. }, {
  121. title: '垫资日期',
  122. field: 'updater',
  123. render: (v, d) => {
  124. if(d.loanOrder !== undefined) {
  125. return formatDate(d.loanOrder.fkDatetime);
  126. }
  127. }
  128. }, {
  129. title: '当前节点',
  130. field: 'curNodeCode',
  131. type: 'select',
  132. listCode: 630147,
  133. keyName: 'code',
  134. valueName: 'name'
  135. }];
  136. return this.props.buildList({
  137. fields,
  138. pageCode: 632145,
  139. searchParams: {
  140. enterFileStatus: '2',
  141. curNodeCodeList: ['021_24']
  142. }
  143. });
  144. }
  145. }
  146. export default HistoryBusiness;