contract.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echarts-theme', 'template','form'],
  2. function ($, undefined, Backend, Datatable, Table, Echarts, undefined, Template,Form) {
  3. var Controller = {
  4. //合同数量统计分析
  5. newadd: function () {
  6. var myChart2=Echarts.init(document.getElementById('echart'), 'walden');
  7. var option2 = {
  8. title: {
  9. text: Orderdata.data.title
  10. },
  11. color:['#c23531'],
  12. tooltip: {
  13. trigger: 'axis',
  14. axisPointer: {
  15. type: 'shadow'
  16. }
  17. },
  18. grid: {
  19. left: '3%',
  20. right: '4%',
  21. bottom: '3%',
  22. containLabel: true
  23. },
  24. toolbox: {
  25. show: true,
  26. feature: {
  27. dataZoom: {
  28. yAxisIndex: 'none'
  29. },
  30. dataView: { readOnly: false },
  31. magicType: { type: ['line', 'bar'] },
  32. restore: {},
  33. saveAsImage: {}
  34. }
  35. },
  36. legend: {
  37. data: [ '2021年度','2022年度']
  38. },
  39. xAxis: {
  40. type: 'category',
  41. boundaryGap: false,
  42. data: Orderdata.data.date,
  43. },
  44. yAxis: {
  45. type: 'value'
  46. },
  47. series: [
  48. {
  49. name: '2021年度',
  50. type: 'line',
  51. stack: 'Total',
  52. data: Orderdata.data.last_number
  53. },
  54. {
  55. name: '2022年度',
  56. type: 'line',
  57. stack: 'Total',
  58. data: Orderdata.data.number
  59. },
  60. ]
  61. };
  62. // 使用刚指定的配置项和数据显示图表。
  63. myChart2.setOption(option2);
  64. Form.events.selectpage($("form"));
  65. Form.events.daterangepicker($("form"));
  66. },
  67. //合同金额统计分析
  68. money: function () {
  69. var myChart2=Echarts.init(document.getElementById('echart'), 'walden');
  70. var option2 = {
  71. title: {
  72. text: Orderdata.data.title
  73. },
  74. color:['#c23531'],
  75. tooltip: {
  76. trigger: 'axis',
  77. axisPointer: {
  78. type: 'shadow'
  79. }
  80. },
  81. grid: {
  82. left: '3%',
  83. right: '4%',
  84. bottom: '3%',
  85. containLabel: true
  86. },
  87. toolbox: {
  88. show: true,
  89. feature: {
  90. dataZoom: {
  91. yAxisIndex: 'none'
  92. },
  93. dataView: { readOnly: false },
  94. magicType: { type: ['line', 'bar'] },
  95. restore: {},
  96. saveAsImage: {}
  97. }
  98. },
  99. legend: {
  100. data: [ '2021年度','2022年度']
  101. },
  102. xAxis: {
  103. type: 'category',
  104. boundaryGap: false,
  105. data: Orderdata.data.date,
  106. },
  107. yAxis: {
  108. type: 'value'
  109. },
  110. series: [
  111. {
  112. name: '2021年度',
  113. type: 'line',
  114. stack: 'Total',
  115. data: Orderdata.data.last_number
  116. },
  117. {
  118. name: '2022年度',
  119. type: 'line',
  120. stack: 'Total',
  121. data: Orderdata.data.number
  122. },
  123. ]
  124. };
  125. // 使用刚指定的配置项和数据显示图表。
  126. myChart2.setOption(option2);
  127. Form.events.selectpage($("form"));
  128. Form.events.daterangepicker($("form"));
  129. },
  130. //回款金额统计分析
  131. receivables: function () {
  132. var myChart2=Echarts.init(document.getElementById('echart'), 'walden');
  133. var option2 = {
  134. title: {
  135. text: Orderdata.data.title
  136. },
  137. color:['#c23531'],
  138. tooltip: {
  139. trigger: 'axis',
  140. axisPointer: {
  141. type: 'shadow'
  142. }
  143. },
  144. grid: {
  145. left: '3%',
  146. right: '4%',
  147. bottom: '3%',
  148. containLabel: true
  149. },
  150. toolbox: {
  151. show: true,
  152. feature: {
  153. dataZoom: {
  154. yAxisIndex: 'none'
  155. },
  156. dataView: { readOnly: false },
  157. magicType: { type: ['line', 'bar'] },
  158. restore: {},
  159. saveAsImage: {}
  160. }
  161. },
  162. legend: {
  163. data: [ '2021年度','2022年度']
  164. },
  165. xAxis: {
  166. type: 'category',
  167. boundaryGap: false,
  168. data: Orderdata.data.date,
  169. },
  170. yAxis: {
  171. type: 'value'
  172. },
  173. series: [
  174. {
  175. name: '2021年度',
  176. type: 'line',
  177. stack: 'Total',
  178. data: Orderdata.data.last_number
  179. },
  180. {
  181. name: '2022年度',
  182. type: 'line',
  183. stack: 'Total',
  184. data: Orderdata.data.number
  185. },
  186. ]
  187. };
  188. // 使用刚指定的配置项和数据显示图表。
  189. myChart2.setOption(option2);
  190. Form.events.selectpage($("form"));
  191. Form.events.daterangepicker($("form"));
  192. },
  193. };
  194. return Controller;
  195. });