resultList.min.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. (function (d) {
  2. config.init();
  3. TabBlock.init();
  4. var a = Fx.getUrlParam("tab");
  5. if (!a) {
  6. a = 0
  7. }
  8. TabBlock.switchTab(d(".tabBlock-tab").eq(a));
  9. var f = Fx.getUrlParam("id") ? Fx.getUrlParam("id") : hzAPI.getToken().customerFamilyId;
  10. var c = {
  11. id: f,
  12. customerFamilyId: null,
  13. hospitalId: "1000",
  14. dateTime: Fx.getUrlParam("dateTime")
  15. };
  16. var e = true;
  17. var b = {
  18. addEvent: {
  19. doing: function () {
  20. d(".lists li a").on("tap",
  21. function () {
  22. icoNav.popWinLayer(d(this).attr("vhref"))
  23. });
  24. icoNav.ton(".lists li a")
  25. }
  26. },
  27. doing: function () {
  28. //执行了两次 2016年11月8日12:05:28
  29. b.getLastClinicDate.doing()
  30. },
  31. detail: {
  32. doing: function () {
  33. if (e) {
  34. e = !e
  35. }
  36. c.dateTime = d("#getDate i").text().trim();
  37. c.clinicCode = d("#getDate b").text().trim();
  38. hzAPI.getData(window.apiUrl+"?c=ReqHis&a=labTestList", c, "#lab ul", 2, true, null, false, "该次就诊没检验项目", b.addEvent);
  39. hzAPI.getData(window.apiUrl+"?c=ReqHis&a=examList", c, "#exam ul", 3, true, null, false, "该次就诊没检查项目", b.addEvent)
  40. }
  41. },
  42. getLastClinicDate: {
  43. doing: function () {
  44. c.customerFamilyId = JSON.parse(d("#familyList .selected a").attr("data")).id;
  45. hzAPI.getData(window.apiUrl+"?c=ReqHis&a=getLastClinicDate", c, "#getDate", 1, true, null, null, "近期无检验检查项目", b.detail, b.getLastClinicDate.err)
  46. },
  47. err: {
  48. doing: function () {
  49. d("#lab ul, #exam ul").css({
  50. display: "none"
  51. })
  52. }
  53. }
  54. }
  55. };
  56. window.reload = b;
  57. hzAPI.getData(window.apiUrl+"?c=Index&a=customerFamilyList", {
  58. idCk: Fx.getUrlParam("id")
  59. },
  60. "#familyList", 0, true, 4, true, null, b.getLastClinicDate)
  61. })(Zepto);