dialogVaccine.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. define(function (require) {
  2. return function (context) {
  3. var $dlg, $grid;
  4. function queryGrid1() {
  5. $grid.reload({
  6. mtype: 'GET',
  7. url: api('/sweepCode/selectVaccineByUserId'),
  8. queryParams: {userId: context.userId}
  9. }, true);
  10. }
  11. return {
  12. xtype: 'dialog',
  13. dialogId: 'dialogDetail',
  14. title: '疫苗接种记录 >> ' + context.linkman,
  15. width: '45%',
  16. height: '50%',
  17. onOpen: function () {
  18. $dlg = $(this);
  19. },
  20. center: {
  21. items: {
  22. onRender: function () {
  23. $grid = $(this);
  24. queryGrid1();
  25. },
  26. toolbar: {
  27. xtype: 'toolbar',
  28. title: '疫苗接种',
  29. },
  30. xtype: 'grid',
  31. idField: "reportDate",
  32. pagination: false,
  33. columns: [[
  34. {field: 'num', title: 'num', hidden: true},
  35. {field: 'times', title: '剂次', maxWidth: 150, align: 'right',},
  36. {field: 'time', title: '接种日期', align: 'left', formatter: 'tsymd'},
  37. {field: 'hospital', title: '接种医院', maxWidth: 200, align: 'right',},
  38. {field: 'unit', title: '接种单位', maxWidth: 200, align: 'right',},
  39. ]],
  40. }
  41. },
  42. buttons: [
  43. {
  44. text: "关闭", iconCls: "fa fa-times", onClick: function () {
  45. // $dlg.dialog('close');
  46. $dlg.window('close');
  47. }
  48. }
  49. ]
  50. };
  51. };
  52. });