getPrescriptionStatus.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. //续方各状态返回值
  2. //(-3 支付过期 -2 患者自己取消 )续方取消,
  3. //-1 审核不通过 ,
  4. //(0 待审核, 2调整中,3调整成功, 4调整失败 ,10 医生审核(CA)通过)审核中,
  5. //20药师审核中,
  6. //21.药师审核失败,
  7. //30 开方中/药师审核成功,
  8. //31.开方失败,
  9. //(40开方完成/待支付 ,41 支付失败 )待支付,
  10. // 50 支付成功/待配药,
  11. //(60配药成功/待配送)等待领药,
  12. //(61配送失败62分配健管师 65配送中,69配送到服务站)配送中,
  13. //(100配送到患者手中/已完成)已完成
  14. //根据状态获得相关信息
  15. function getStatusInfoAndImg(status){
  16. var name = "",
  17. img = "";
  18. status = status + '';
  19. switch (status){
  20. case '-5': //线下取消
  21. case '-4': //线下退费
  22. case '-3':
  23. name = '支付过期';
  24. img = '../images/yiquxiao_icon.png';
  25. break;
  26. case '-2':
  27. name = '患者自己取消';
  28. img = '../images/yiquxiao_icon.png';
  29. break;
  30. case '-1':
  31. case '21':
  32. name = '审核不通过';
  33. img = '../images/shenhebutongguo_icon.png';
  34. break;
  35. case '0':
  36. case '2':
  37. case '3':
  38. case '4':
  39. case '10':
  40. case '20':
  41. case '30':
  42. case '31':
  43. name = '审核中';
  44. img = '../images/shenhezhong_icon.png';
  45. break;
  46. case '40':
  47. case '41':
  48. name = '待支付';
  49. img = '../images/daizhifu_icon.png';
  50. break;
  51. case '50':
  52. name = '配药中';
  53. img = '../images/peiyaozhong_icon.png';
  54. break;
  55. case '60':
  56. name = '等待领药';
  57. img = '../images/dengdailingyao_icon.png';
  58. break;
  59. case '61':
  60. case '62':
  61. case '65':
  62. case '69':
  63. name = '配送中';
  64. img = '../images/peisongzhong_icon.png';
  65. break;
  66. case '100':
  67. name = '已完成';
  68. img = '../images/yiwancheng_icon.png';
  69. break;
  70. default:
  71. break;
  72. }
  73. return {name: name, img: img};
  74. }
  75. function getStatusName(status){
  76. var name = "",
  77. img = "";
  78. status = status + '';
  79. switch (status){
  80. case '-5':
  81. name = "线下取消";
  82. break;
  83. case '-4':
  84. name = "线下退费";
  85. break;
  86. case '-3':
  87. name = '支付过期';
  88. break;
  89. case '-2':
  90. name = '患者自己取消';
  91. break;
  92. case '-1':
  93. name = '审核不通过';
  94. break;
  95. case '0':
  96. case '2':
  97. case '3':
  98. case '4':
  99. case '10':
  100. name = '审核中';
  101. break;
  102. case '20':
  103. name = '药师审核中';
  104. break;
  105. case '21':
  106. name = '药师审核失败';
  107. break;
  108. case '30':
  109. name = '开方中';
  110. break;
  111. case '31':
  112. name = '开方失败';
  113. break;
  114. case '40':
  115. name = '待支付';
  116. break;
  117. case '41':
  118. name = '支付失败';
  119. break;
  120. case '50':
  121. name = '配药中';
  122. break;
  123. case '60':
  124. name = '等待领药';
  125. break;
  126. case '61':
  127. case '62':
  128. case '65':
  129. case '69':
  130. name = '配送中';
  131. break;
  132. case '100':
  133. name = '已完成';
  134. break;
  135. default:
  136. break;
  137. }
  138. return name;
  139. }
  140. function getStatusColor(status){
  141. var name = "",
  142. color = "";
  143. status = status + '';
  144. switch (status){
  145. case '-5': //线下取消
  146. case '-4': //线下退费
  147. case '-3': //'支付过期'
  148. case '-2': //'患者自己取消'
  149. case '-1': //'审核不通过'
  150. case '21': //'药师审核失败'
  151. case '31': //'开方失败'
  152. case '41': //'支付失败'
  153. color = 'c-error';
  154. break;
  155. case '0':
  156. case '2':
  157. case '3':
  158. case '4':
  159. case '10':
  160. case '20':
  161. case '30':
  162. case '40':
  163. case '50':
  164. case '60':
  165. case '61':
  166. case '62':
  167. case '65':
  168. case '69':
  169. color = 'c-waiting';
  170. break;
  171. case '100':
  172. color = 'c-success';
  173. break;
  174. default:
  175. break;
  176. }
  177. return color;
  178. }