You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

172 lines
7.8 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-05-18 11:08
  5. * 描 述:一卡通交易流水
  6. */
  7. var selectedRow;
  8. var refreshGirdData;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var startTime;
  12. var endTime;
  13. var page = {
  14. init: function () {
  15. page.initGird();
  16. page.bind();
  17. },
  18. bind: function () {
  19. // 时间搜索框
  20. $('#datesearch').lrdate({
  21. dfdata: [
  22. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  23. { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  24. { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  25. { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
  26. ],
  27. // 月
  28. mShow: false,
  29. premShow: false,
  30. // 季度
  31. jShow: false,
  32. prejShow: false,
  33. // 年
  34. ysShow: false,
  35. yxShow: false,
  36. preyShow: false,
  37. yShow: false,
  38. // 默认
  39. dfvalue: '3',
  40. selectfn: function (begin, end) {
  41. startTime = begin;
  42. endTime = end;
  43. page.search();
  44. }
  45. });
  46. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  47. page.search(queryJson);
  48. }, 250, 400);
  49. // 刷新
  50. $('#lr_refresh').on('click', function () {
  51. location.reload();
  52. });
  53. $('#depName').lrselect({
  54. width: '150px',
  55. placeholder: "请选择所属班级/部门",
  56. allowSearch: true,
  57. url: top.$.rootUrl + '/EducationalAdministration/MealCardRunTab/GetDept',
  58. value: 'Id',
  59. text: 'depName'
  60. });
  61. $('#identiName').lrselect({
  62. width: '150px',
  63. placeholder: "请选择身份类型",
  64. allowSearch: true,
  65. url: top.$.rootUrl + '/EducationalAdministration/MealCardRunTab/GetdentiName',
  66. value: 'Id',
  67. text: 'identiName'
  68. });
  69. $('#flowtype').lrselect({
  70. width: '150px',
  71. placeholder: "请选择流水类型",
  72. allowSearch: true,
  73. url: top.$.rootUrl + '/EducationalAdministration/MealCardRunTab/Getflowtype',
  74. value: 'Id',
  75. text: 'flowtype'
  76. });
  77. $('#seg').lrselect({
  78. width: '150px',
  79. placeholder: "请选择餐次",
  80. allowSearch: true,
  81. url: top.$.rootUrl + '/EducationalAdministration/MealCardRunTab/Getseg',
  82. value: 'Id',
  83. text: 'seg'
  84. });
  85. //// 新增
  86. //$('#lr_add').on('click', function () {
  87. // selectedRow = null;
  88. // learun.layerForm({
  89. // id: 'form',
  90. // title: '新增',
  91. // url: top.$.rootUrl + '/EducationalAdministration/MealCardRunTab/Form',
  92. // width: 700,
  93. // height: 400,
  94. // callBack: function (id) {
  95. // return top[id].acceptClick(refreshGirdData);
  96. // }
  97. // });
  98. //});
  99. //// 编辑
  100. //$('#lr_edit').on('click', function () {
  101. // var keyValue = $('#gridtable').jfGridValue('Id');
  102. // selectedRow = $('#gridtable').jfGridGet('rowdata');
  103. // if (learun.checkrow(keyValue)) {
  104. // learun.layerForm({
  105. // id: 'form',
  106. // title: '编辑',
  107. // url: top.$.rootUrl + '/EducationalAdministration/MealCardRunTab/Form?keyValue=' + keyValue,
  108. // width: 700,
  109. // height: 400,
  110. // callBack: function (id) {
  111. // return top[id].acceptClick(refreshGirdData);
  112. // }
  113. // });
  114. // }
  115. //});
  116. //// 删除
  117. //$('#lr_delete').on('click', function () {
  118. // var keyValue = $('#gridtable').jfGridValue('Id');
  119. // if (learun.checkrow(keyValue)) {
  120. // learun.layerConfirm('是否确认删除该项!', function (res) {
  121. // if (res) {
  122. // learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/MealCardRunTab/DeleteForm', { keyValue: keyValue}, function () {
  123. // });
  124. // }
  125. // });
  126. // }
  127. //});
  128. },
  129. initGird: function () {
  130. $('#gridtable').lrAuthorizeJfGridLei({
  131. url: top.$.rootUrl + '/EducationalAdministration/MealCardRunTab/GetPageList',
  132. headData: [
  133. { label: '学生卡账号', name: 'accountNo', width: 80, align: "left" },
  134. { label: '学生卡姓名', name: 'accountName', width: 80, align: "left" },
  135. { label: '部门名称', name: 'depName', width: 100, 100: "left" },
  136. { label: '身份证号', name: 'personId', width: 150, align: "left" },
  137. { label: '身份名称', name: 'identiName', width: 80, align: "left" },
  138. { label: '流水类型', name: 'flowtype', width: 100, align: "left" },
  139. { label: '交易金额', name: 'flowamount', width: 100, align: "left" },
  140. { label: '余额', name: 'balance', width: 100, align: "left" },
  141. { label: '卡号', name: 'cardNo', width: 100, align: "left" },
  142. { label: '中心时间', name: 'centralTm', width: 150, align: "left" },
  143. { label: '中心序号', name: 'centralNo', width: 100, align: "left" },
  144. { label: '发生时间', name: 'occurTime', width: 150, align: "left" },
  145. { label: '节点名称', name: 'node', width: 100, align: "left" },
  146. { label: '营业大组名称', name: 'bigGroup', width: 100, align: "left" },
  147. { label: '营业小组名称', name: 'smallGroup', width: 100, align: "left" },
  148. { label: '营业餐次', name: 'seg', width: 100, align: "left" },
  149. { label: 'Pos机序号', name: 'pos', width: 80, align: "left" },
  150. ],
  151. mainId: 'Id',
  152. isPage: true,
  153. rows: 100,
  154. sidx: 'occurTime',
  155. sord: 'desc'
  156. });
  157. page.search();
  158. },
  159. search: function (param) {
  160. param = param || {};
  161. param.StartTime = startTime;
  162. param.EndTime = endTime;
  163. param.accountName = learun.clientdata.get(['userinfo']).realName;
  164. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  165. }
  166. };
  167. refreshGirdData = function () {
  168. $('#gridtable').jfGridSet('reload');
  169. };
  170. page.init();
  171. }