Keine Beschreibung

bookingList.js 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /**
  2. * 随访管理
  3. * */
  4. $(document).ready(function() {
  5. //初始化时间
  6. laydate.render({
  7. elem: '#starttimeSearch',
  8. range: '~',
  9. theme: '#1ab394',
  10. calendar: true
  11. });
  12. laydate.render({
  13. elem: '#sftimeSearch',
  14. theme: '#1ab394',
  15. calendar: true
  16. });
  17. //搜索
  18. $("#sc_btns").click(function() {
  19. initTable();
  20. })
  21. initTable();
  22. });
  23. var datas = [{
  24. "F_AdmissionDept": "内科",
  25. "F_Age": "30",
  26. "F_Code": "HY001",
  27. "xingbie": "男",
  28. "judge": "急性肠胃炎",
  29. "F_FirstLevel": "一附院",
  30. "F_Id": 1,
  31. "F_InDate": "14:00~15:00",
  32. "F_Name": "测试人",
  33. "fangshi": "线上",
  34. "F_Phone": "123456789",
  35. "state": "处理",
  36. "F_TubeDoctor": "张医生",
  37. "IDcard":"4101545445454545",
  38. "id": 1,
  39. },
  40. {
  41. "F_AdmissionDept": "内科",
  42. "F_Age": "30",
  43. "F_Code": "HY002",
  44. "xingbie": "男",
  45. "judge": "急性肠胃炎",
  46. "F_FirstLevel": "一附院",
  47. "F_Id": 2,
  48. "F_InDate": "14:00~15:00",
  49. "F_Name": "王五",
  50. "fangshi": "线上",
  51. "F_Phone": "123456789",
  52. "state": "处理",
  53. "F_TubeDoctor": "张医生",
  54. "IDcard":"4101545445454545",
  55. "id": 2,
  56. },
  57. {
  58. "F_AdmissionDept": "内科",
  59. "F_Age": "30",
  60. "F_Code": "HY003",
  61. "xingbie": "男",
  62. "judge": "头疼",
  63. "F_FirstLevel": "一附院",
  64. "F_Id": 3,
  65. "F_InDate": "14:00~15:00",
  66. "F_Name": "张三",
  67. "fangshi": "线上",
  68. "F_Phone": "123456789",
  69. "state": "处理",
  70. "F_TubeDoctor": "李医生",
  71. "IDcard":"4101545445454545",
  72. "id": 3,
  73. }
  74. ]
  75. // 随访管理列表
  76. function initTable() {
  77. //先销毁表格
  78. $('#accessList').bootstrapTable('destroy');
  79. //初始化表格,动态从服务器加载数据
  80. $('#accessList').bootstrapTable({
  81. method: 'get',
  82. data: datas,
  83. queryParams: "queryParams",
  84. striped: true, //表格显示条纹
  85. pagination: true, //启动分页
  86. pageSize: 10, //每页显示的记录数
  87. pageNumber: 1, //当前第几页
  88. pageList: [10, 20, 50, 100], //记录数可选列表
  89. search: false, //是否启用查询
  90. showColumns: false, //显示下拉框勾选要显示的列
  91. showRefresh: false, //显示刷新按钮
  92. columns: [{
  93. field: 'F_Code',
  94. title: '预约码',
  95. align: 'center',
  96. },
  97. {
  98. field: 'F_Name',
  99. title: '姓名',
  100. align: 'center',
  101. },
  102. {
  103. field: 'F_Age',
  104. title: '年龄',
  105. align: 'center',
  106. },
  107. {
  108. field: 'xingbie',
  109. title: '性别',
  110. align: 'center',
  111. },
  112. {
  113. field: 'F_FirstLevel',
  114. title: '挂号院区',
  115. align: 'center',
  116. },
  117. {
  118. field: 'F_Phone',
  119. title: '联系电话',
  120. align: 'center',
  121. },
  122. {
  123. field: 'F_InDate',
  124. title: '预约时间',
  125. align: 'center',
  126. },
  127. {
  128. field: 'state',
  129. title: '状态',
  130. align: 'center',
  131. },
  132. {
  133. field: 'F_AdmissionDept',
  134. title: '科室',
  135. align: 'center',
  136. },
  137. {
  138. field: 'IDcard',
  139. title: '身份证号码',
  140. align: 'center',
  141. },
  142. {
  143. field: 'fangshi',
  144. title: '挂号方式',
  145. align: 'center',
  146. },
  147. {
  148. field: 'price',
  149. title: '操作',
  150. width: 120,
  151. align: 'center',
  152. valign: 'middle',
  153. formatter: actionFormatter,
  154. },
  155. ]
  156. });
  157. }
  158. //操作栏的格式化
  159. function actionFormatter(value, row, index) {
  160. var id = value;
  161. var result = "";
  162. result += "<span class='btn btn-xs green' onclick=\"removeById('" + id +
  163. "', view='view')\" >取消预约</span>";
  164. result += "<span class='btn btn-xs green' onclick=\"EditViewById('" + id +
  165. "', view='view')\" >查看</span>";
  166. return result;
  167. }
  168. //随访登记
  169. function btn_access(custelid, name, phone, address) {
  170. // var custelid = row.F_Id; //随访记录id
  171. // var name = row.F_Name; //姓名
  172. // var phone = row.F_Phone; //联系人电话
  173. // var address = row.F_Addr; //住址
  174. var name = encodeURI(name);
  175. var address = encodeURI(address);
  176. layer.open({
  177. type: 2,
  178. title: '随访登记',
  179. maxmin: true, //开启最大化最小化按钮
  180. area: ['90%', '90%'],
  181. content: "./template/accessRegister.html?custelid=" + custelid + "&name=" + name + "&phone=" + phone + "&address=" +
  182. address,
  183. })
  184. }
  185. //预约信息查看
  186. function EditViewById(val) {
  187. var id = val;
  188. layer.open({
  189. type: 2,
  190. title: '预约患者信息',
  191. maxmin: true, //开启最大化最小化按钮
  192. area: ['60%', '80%'],
  193. content: './bookingDetail.html?id=' + id
  194. })
  195. }