Reconciliation.cshtml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. @{
  2. ViewBag.Title = "对账报表";
  3. Layout = "~/Views/Shared/_ReportIndex.cshtml";
  4. }
  5. <script src="~/Content/scripts/plugins/echarts/charts_comm.js"></script>
  6. <script src="~/Content/scripts/plugins/echarts/charts_helper.js"></script>
  7. <script src="~/Content/scripts/plugins/echarts/china.js" type="text/javascript"></script>
  8. <script src="~/Content/scripts/plugins/echarts/echarts.min.js" type="text/javascript"></script>
  9. <script>
  10. $(function () {
  11. GetGrid();
  12. loadmain();
  13. loadmain1();
  14. });
  15. function loadmain() {
  16. var myChart = echarts.init(document.getElementById('main'));
  17. option = {
  18. title: {
  19. text: '各项支出分析图',
  20. x: 'center'
  21. },
  22. tooltip: {
  23. trigger: 'item',
  24. formatter: "{a} <br/>{b} : {c} ({d}%)"
  25. },
  26. legend: {
  27. orient: 'vertical',
  28. left: 'left',
  29. data: ['代发工资', '代扣水电费', '贷款利息', '客户贷款']
  30. },
  31. series: [
  32. {
  33. name: '访问来源',
  34. type: 'pie',
  35. radius: '55%',
  36. center: ['50%', '60%'],
  37. data: [
  38. { value: 335, name: '代发工资' },
  39. { value: 310, name: '代扣水电费' },
  40. { value: 234, name: '贷款利息' },
  41. { value: 135, name: '客户贷款' }
  42. ],
  43. itemStyle: {
  44. emphasis: {
  45. shadowBlur: 10,
  46. shadowOffsetX: 0,
  47. shadowColor: 'rgba(0, 0, 0, 0.5)'
  48. }
  49. }
  50. }
  51. ]
  52. };
  53. myChart.setOption(option);
  54. }
  55. function loadmain1() {
  56. var myChart = echarts.init(document.getElementById('main1'));
  57. option = {
  58. title: {
  59. text: '公司收支趋势图',
  60. x: 'center'
  61. },
  62. tooltip: {
  63. trigger: 'axis'
  64. },
  65. grid: {
  66. left: '3%',
  67. right: '4%',
  68. bottom: '3%',
  69. containLabel: true
  70. },
  71. xAxis: {
  72. type: 'category',
  73. boundaryGap: false,
  74. data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
  75. },
  76. yAxis: {
  77. type: 'value'
  78. },
  79. series: [
  80. {
  81. name: '收入',
  82. type: 'line',
  83. stack: '总量',
  84. data: [120, 132, 101, 134, 90, 230, 210]
  85. },
  86. {
  87. name: '支付',
  88. type: 'line',
  89. stack: '总量',
  90. data: [220, 182, 191, 234, 290, 330, 310]
  91. }
  92. ]
  93. };
  94. myChart.setOption(option);
  95. }
  96. function GetGrid() {
  97. var $gridTable = $('#gridTable');
  98. $gridTable.jqGrid({
  99. url: "../../ReportManage/ReportDemo/GetReconciliationJson",
  100. datatype: "json",
  101. height: "100%",
  102. autowidth: false,
  103. colModel: [
  104. { name: "month", label: "月份", width: 120, align: "center" },
  105. { name: "business", label: "业务摘要", width: 200, align: "left" },
  106. { name: "tradedate", label: "交易日期", width: 120, align: "center", formatter: "date", formatoptions: { newformat: 'Y-m-d' } },
  107. { name: "incomeMoney", label: "收入金额", width: 120, align: "left", formatter: 'number', formatoptions: { thousandsSeparator: "", decimalPlaces: 2 } },
  108. { name: "expenditureMoney", label: "支出金额", width: 120, align: "left", formatter: 'number', formatoptions: { thousandsSeparator: "", decimalPlaces: 2 } },
  109. { name: "balance", label: "余额", width: 120, align: "left", formatter: 'number', formatoptions: { thousandsSeparator: "", decimalPlaces: 2 } },
  110. { name: "description", label: "备注", width: 180, align: "left" }
  111. ],
  112. viewrecords: true,
  113. rowNum: 1000,
  114. footerrow: true,
  115. gridComplete: function () {
  116. var totalincomeMoney = $(this).getCol("incomeMoney", false, "sum");
  117. var totalexpenditureMoney = $(this).getCol("expenditureMoney", false, "sum");
  118. //合计
  119. $(this).footerData("set", {
  120. "tradedate": "合计:",
  121. "incomeMoney": totalincomeMoney,
  122. "expenditureMoney": totalexpenditureMoney,
  123. });
  124. $('table.ui-jqgrid-ftable td').prevUntil().css("border-right-color", "#fff");
  125. }
  126. });
  127. //查询条件
  128. $("#queryCondition .dropdown-menu li").click(function () {
  129. var text = $(this).find('a').html();
  130. var value = $(this).find('a').attr('data-value');
  131. $("#queryCondition .dropdown-text").html(text).attr('data-value', value)
  132. });
  133. //查询事件
  134. $("#btn_Search").click(function () {
  135. var queryJson = {
  136. condition: $("#queryCondition").find('.dropdown-text').attr('data-value'),
  137. keyword: $("#txt_Keyword").val()
  138. }
  139. $gridTable.jqGrid('setGridParam', {
  140. postData: { queryJson: JSON.stringify(queryJson) },
  141. page: 1
  142. }).trigger('reloadGrid');
  143. });
  144. //查询回车
  145. $('#txt_Keyword').bind('keypress', function (event) {
  146. if (event.keyCode == "13") {
  147. $('#btn_Search').trigger("click");
  148. }
  149. });
  150. }
  151. </script>
  152. <div class="ui-report">
  153. <div class="titlePanel">
  154. <div class="title-search">
  155. <table>
  156. <tr>
  157. <td>查询条件</td>
  158. <td style="padding-left: 10px;">
  159. <div class="ui-filter" style="width: 200px;">
  160. <div class="ui-filter-text">
  161. <strong id="SelectedStartTime">@DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd")</strong> 至 <strong id="SelectedEndTime">@DateTime.Now.ToString("yyyy-MM-dd")</strong>
  162. </div>
  163. <div class="ui-filter-list" style="width: 350px;">
  164. <table class="form" id="filter-form">
  165. <tr>
  166. <th class="formTitle">交易日期:</th>
  167. <td class="formValue">
  168. <input id="Category" type="hidden" value="1" />
  169. <div style="float: left; width: 45%;">
  170. <input id="StartTime" readonly type="text" value="@LeaRun.Util.Time.GetDate(-7)" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%y-%M-%d'})">
  171. </div>
  172. <div style="float: left; width: 10%; text-align: center;">至</div>
  173. <div style="float: left; width: 45%;">
  174. <input id="EndTime" readonly type="text" value="@LeaRun.Util.Time.GetToday()" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%y-%M-%d'})">
  175. </div>
  176. </td>
  177. </tr>
  178. <tr>
  179. <td class="formTitle">业务摘要:</td>
  180. <td class="formValue">
  181. <input id="CustomerName" type="text" class="form-control">
  182. </td>
  183. </tr>
  184. </table>
  185. <div class="ui-filter-list-bottom">
  186. <a id="btn_Reset" class="btn btn-default">&nbsp;重&nbsp;&nbsp;置</a>
  187. <a id="btn_Search" class="btn btn-primary">&nbsp;查&nbsp;&nbsp;询</a>
  188. </div>
  189. </div>
  190. </div>
  191. </td>
  192. <td style="padding-left: 10px;">
  193. <div id="time_horizon" class="btn-group">
  194. <a class="btn btn-default" data-value="1">今天</a>
  195. <a class="btn btn-default active" data-value="2">近7天</a>
  196. <a class="btn btn-default" data-value="3">近1个月</a>
  197. <a class="btn btn-default" data-value="4">近3个月</a>
  198. </div>
  199. </td>
  200. </tr>
  201. </table>
  202. </div>
  203. <div class="toolbar">
  204. <div class="btn-group">
  205. <a id="lr-replace" class="btn btn-default" onclick="reload();"><i class="fa fa-refresh"></i>&nbsp;刷新</a>
  206. </div>
  207. <script>$('.toolbar').authorizeButton()</script>
  208. </div>
  209. </div>
  210. <div class="gridPanel">
  211. <div class="printArea">
  212. <div class="grid-title">
  213. <div style="overflow: hidden; padding-bottom: 20px; text-align: center; margin-left: auto; margin-right: auto;">
  214. <div id="main" class="border" style="float: left; margin-right: 20px; width: 500px; height: 350px;">
  215. </div>
  216. <div id="main1" class="border" style="float: left; margin-right: 20px; width: 500px; height: 350px;">
  217. </div>
  218. </div>
  219. </div>
  220. <div id="gridPanel">
  221. <table id="gridTable"></table>
  222. </div>
  223. </div>
  224. </div>
  225. </div>