/src/container/history/historying/historying.js

https://github.com/ibisTime/xn-wzcd-oss · JavaScript · 143 lines · 141 code · 2 blank · 0 comment · 0 complexity · dc7ba7e0679e2c1c9262a146892ab38f 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/historying';
  12. import {
  13. listWrapper
  14. } from 'common/js/build-list';
  15. import {
  16. showWarnMsg,
  17. showSucMsg
  18. } from 'common/js/util';
  19. import {
  20. Button,
  21. Upload,
  22. Modal
  23. } from 'antd';
  24. import {
  25. sendMsg
  26. } from 'api/biz';
  27. @listWrapper(state => ({
  28. ...state.historyHistorying,
  29. parentCode: state.menu.subMenuCode
  30. }), {
  31. setTableData,
  32. clearSearchParam,
  33. doFetching,
  34. setBtnList,
  35. cancelFetching,
  36. setPagination,
  37. setSearchParam,
  38. setSearchData
  39. })
  40. class Historying extends React.Component {
  41. render() {
  42. const fields = [{
  43. title: '业务编号',
  44. field: 'code',
  45. search: true
  46. }, {
  47. title: '业务公司',
  48. field: 'companyName',
  49. required: true
  50. }, {
  51. title: '汽车经销商',
  52. field: 'carDealerName'
  53. }, {
  54. title: '客户姓名',
  55. field: 'customerName',
  56. search: true
  57. }, {
  58. title: '贷款银行',
  59. field: 'loanBankName',
  60. search: true
  61. }, {
  62. title: '贷款金额',
  63. field: 'loanAmount',
  64. amount: true
  65. }, {
  66. field: 'shopWay',
  67. title: '购车途径',
  68. type: 'select',
  69. key: 'budget_orde_biz_typer'
  70. }, {
  71. field: 'carModel',
  72. title: '车辆型号'
  73. }, {
  74. title: '车辆价格',
  75. field: 'originalPrice',
  76. amount: true
  77. }, {
  78. title: '是否垫资',
  79. field: 'isAdvanceFund',
  80. type: 'select',
  81. data: [{
  82. key: '0',
  83. value: '是'
  84. }, {
  85. key: '1',
  86. value: '否'
  87. }],
  88. keyName: 'key',
  89. valueName: 'value',
  90. required: true
  91. }, {
  92. title: '总期数',
  93. field: 'loanPeriods'
  94. }, {
  95. title: '放款日期',
  96. field: 'bankFkDatetime',
  97. type: 'date'
  98. }, {
  99. title: '当前节点',
  100. field: 'curNodeCode',
  101. type: 'select',
  102. listCode: 630147,
  103. keyName: 'code',
  104. valueName: 'name',
  105. search: true
  106. }];
  107. return this.props.buildList({
  108. fields,
  109. pageCode: 632145,
  110. searchParams: {
  111. curNodeCodeList: [
  112. '002_01',
  113. '002_02',
  114. '002_03',
  115. '002_04',
  116. '002_05',
  117. '002_06',
  118. '007_01',
  119. '007_02',
  120. '007_03',
  121. '007_04',
  122. '007_05',
  123. '008_01',
  124. '008_02',
  125. '008_03',
  126. '008_04',
  127. '008_05',
  128. '009_01',
  129. '009_02',
  130. '009_03',
  131. '009_04',
  132. '009_05',
  133. '009_06',
  134. '010_01',
  135. '010_02'
  136. ]
  137. }
  138. });
  139. }
  140. }
  141. export default Historying;