followup-prescription.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. var request = getRequest(),
  2. fv_id = request.fv_id,
  3. pro_id = request.pro_id,
  4. title = request.title,
  5. fv_class = request.fv_class,
  6. patiCode = request.patiCode;
  7. $(function(){
  8. var options = $.extend(followupAPI.getPrescriptionListTableAjaxObj, {
  9. queryParams: queryParams,
  10. queryParamsType: "limit",
  11. pagination: true,
  12. paginationLoop: true,
  13. sidePagination: 'server',
  14. pageNumber: 1,
  15. pageSize: 5,
  16. responseHandler: function (res) {
  17. return {
  18. rows: res.data.list,
  19. total: res.data.total
  20. }
  21. },
  22. columns: [{
  23. field: '',
  24. title:'',
  25. formatter: function(val, row, index){
  26. var html = template('prescription_tmp', row);
  27. return html;
  28. }
  29. }],
  30. onClickRow: function(row, $el){
  31. document.location.href = "../../jw-prescription-info.html?code="+row.code+"&patient="+patiCode+'&fv_id='+fv_id;
  32. }
  33. })
  34. $("#prescritionInfo").bootstrapTable(options);
  35. });
  36. function queryParams(params) {
  37. return {
  38. diagnosisCode: fv_class=='1,2' ? 3 : fv_class,
  39. patient: patiCode,
  40. page: params.offset/params.limit,
  41. size: params.limit,
  42. isRenewal: 2
  43. };
  44. }