newRecipeView.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
  3. <head>
  4. <th:block th:include="include :: header('处方登记信息详情')" />
  5. <th:block th:include="include :: select2-css" />
  6. <th:block th:include="include :: bootstrap-fileinput-css" />
  7. <th:block th:include="include :: layout-latest-css" />
  8. </head>
  9. <body class="gray-bg">
  10. <input type="hidden" id="id" name="id" th:value="${id}">
  11. <div class="col-sm-12 search-collapse">
  12. <h4 class="query-condition-title">患者信息</h4>
  13. <form id="dtp-form-newcfxxx" class="customize-search-form">
  14. <div class="customize-form-group-container">
  15. <div class="patient-info">
  16. <div class="info-item">
  17. <span class="label">患者姓名:</span>
  18. <span class="value" id="patientName"></span>
  19. </div>
  20. <!--<div class="info-item">
  21. <span class="label">手机号码:</span>
  22. <span class="value" id="phoneNumber"></span>
  23. </div>-->
  24. <div class="info-item">
  25. <span class="label">性别:</span>
  26. <span class="value" id="gender"></span>
  27. </div>
  28. <div class="info-item">
  29. <span class="label">年龄:</span>
  30. <span class="value" id="age"></span>
  31. </div>
  32. </div>
  33. </div>
  34. </form>
  35. </div>
  36. <div class="col-sm-12 search-collapse">
  37. <form id="dtp-form-newcfxx" class="customize-search-form">
  38. <div class="customize-form-group-container">
  39. <div class="patient-info">
  40. <div class="customize-form-group">
  41. <label>医院:</label>
  42. <input name="hospital" placeholder="医院" id="hospital" class="styled-input" readonly type="text">
  43. </div>
  44. <div class="customize-form-group">
  45. <label>处方医生:</label>
  46. <input name="prescribingDoctor" id="prescribingDoctor" placeholder="处方医生" readonly class="styled-input" type="text">
  47. </div>
  48. <div class="customize-form-group">
  49. <label>科室:</label>
  50. <input name="department" id="department" placeholder="科室" class="styled-input" readonly type="text">
  51. </div>
  52. <div class="customize-form-group">
  53. <label class="is-required">处方诊断::</label>
  54. <input name="prescriptionDiagnosis" id="prescriptionDiagnosis" placeholder="处方诊断" readonly class="styled-input" type="text">
  55. </div>
  56. <div class="customize-form-group">
  57. <label class="is-required">主管医生:</label>
  58. <input name="attendingDoctor" id="attendingDoctor" placeholder="主管医生" readonly class="styled-input" type="text">
  59. </div>
  60. <div class="customize-form-group">
  61. <label class="is-required">临床诊断:</label>
  62. <input name="clinicalDiagnosis" id="clinicalDiagnosis" placeholder="临床诊断" readonly class="styled-input" type="text">
  63. </div>
  64. <!--<div class="customize-form-group">
  65. <label>处方图片:</label>
  66. <input name="prescriptionImageUrl" id="prescriptionImageUrl" placeholder="处方图片" class="styled-input" type="text">
  67. </div>-->
  68. <div class="customize-form-group select-time">
  69. <label>处方开具日期:</label>
  70. <input name="prescriptionIssueDate" id="prescriptionIssueDate" placeholder="处方开具日期" readonly class="styled-input" type="text" >
  71. </div>
  72. <div class="customize-form-group">
  73. <label>发票编码:</label>
  74. <input name="invoiceCode" id="invoiceCode" placeholder="发票编码" readonly class="styled-input" type="text">
  75. </div>
  76. <!--<div class="customize-form-group">
  77. <label>发票图片:</label>
  78. <input name="invoiceImageUrl" id="invoiceImageUrl" placeholder="发票图片" class="styled-input" type="text">
  79. </div>-->
  80. <div class="customize-form-group">
  81. <label class="is-required">登记药师姓名:</label>
  82. <input name="registerPharmacistName" id="registerPharmacistName" placeholder="登记药师姓名" readonly class="styled-input" type="text">
  83. </div>
  84. <div class="customize-form-group">
  85. <label class="is-required">登记人:</label>
  86. <input name="registrant" id="registrant" placeholder="登记人" readonly class="styled-input" type="text">
  87. </div>
  88. <div class="customize-form-group">
  89. <label>审核药师姓名:</label>
  90. <input name="reviewingName" id="reviewingName" placeholder="审核药师姓名" readonly class="styled-input" type="text">
  91. </div>
  92. </div>
  93. </div>
  94. </form>
  95. </div>
  96. <div class="col-sm-12 search-collapse">
  97. <h4 class="query-condition-title">新建处方登记</h4>
  98. <!-- 假设这是你的 HTML 结构class="table table-bordered" -->
  99. <div class="ibox" id="data-ibox" style="overflow: auto;">
  100. <div class="ibox-title" style="width: 100%;">药品登记列表</div>
  101. <table id="bootstrap-table" class="fixed-layout-table"></table>
  102. </div>
  103. </div>
  104. <div class="main-content">
  105. <div class="col-sm-offset-6 col-sm-10">
  106. <!--<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>提 交</button>&nbsp;-->
  107. <button type="button" class="btn btn-sm btn-danger" onclick="closeT()"><i class="fa fa-reply-all"></i>关 闭 </button>
  108. </div>
  109. </div>
  110. </div>
  111. <th:block th:include="include :: footer" />
  112. <th:block th:include="include :: select2-js" />
  113. <th:block th:include="include :: bootstrap-fileinput-js" />
  114. <th:block th:include="include :: bootstrap-table-fixed-columns-js" />
  115. <th:block th:include="include :: layout-latest-js" />
  116. <script th:inline="javascript">
  117. var editFlag = [[${@permission.hasPermi('dtp:RecipeRegister:edit')}]];
  118. var removeFlag = [[${@permission.hasPermi('dtp:RecipeRegister:remove')}]];
  119. var prefix_recipe = ctx + "dtp/recipe";
  120. var prefix_yppz= ctx + "yppz/drugConfig";
  121. var prefix_pmService = ctx + "dtp/pmService";
  122. var hzparam =[];
  123. var data;
  124. var shangcigyList=[];
  125. var dataList=[];
  126. $(document).ready(function() {
  127. var id = $('#id').val().trim();
  128. console.log("id----->"+id)
  129. var datas=[];
  130. var data = {
  131. "id":id,
  132. };
  133. $.ajax({
  134. cache : true,
  135. type : "POST",
  136. url : prefix_recipe + "/getLastRecipeInfo",
  137. data : data,
  138. async : false,
  139. error : function(request) {
  140. $.modal.alertError("系统错误");
  141. },
  142. success : function(data) {
  143. var shangciObj={};
  144. shangcigyList=data.data.recipeList;
  145. if(data.data.recipeList !=null || data.data.recipeList != undefined){
  146. initTabShow(datas=data.data.recipeList)
  147. }
  148. if(data.data.recipe!=null){
  149. shangciObj=data.data.recipe;
  150. // 动态填充表单字段
  151. $.each(shangciObj, function(key, value) {
  152. $('#' + key).val(value);
  153. // if (key=='prescriptionImageUrl'){
  154. // document.getElementById('prescriptionImageUrl').src == value;
  155. // }
  156. if (key=="patientName" || key=="patientPhone" || key=="gender" || key=="age"){
  157. if (key=="gender"){
  158. if (value==1){
  159. value="男";
  160. }else {
  161. value="女";
  162. }
  163. }
  164. $('#' + key).text(value);
  165. }
  166. });
  167. /* $('#hospital').val(shangciObj.hospital);
  168. $('#prescribingDoctor').val(shangciObj.prescribingDoctor);
  169. $('#department').val(shangciObj.department);
  170. $('#attendingDoctor').val(shangciObj.attendingDoctor);*/
  171. }else {
  172. shangciObj={};
  173. $('#hospital').val('');
  174. $('#prescribingDoctor').val('');
  175. $('#department').val('');
  176. $('#attendingDoctor').val('');
  177. }
  178. }
  179. });
  180. });
  181. function initTabShow(datas){
  182. var tableId = 'bootstrap-table';
  183. var tableElement = $('#' + tableId);
  184. tableElement.bootstrapTable({
  185. data: datas,
  186. columns : [
  187. {field: 'prescriptionNumber', title: '销售' , width:'250px'},
  188. { field: 'prescriptionDate', title: '处方日期' },
  189. { field: 'genericName', title: '药品通用名' },
  190. { field: 'productName', title: '商品名' },
  191. { field: 'medicationRoute', title: '用药途径' },
  192. { field: 'dosageFrequency', title: '用药频次' },
  193. { field: 'singleDoseUnit', title: '单次剂量' },
  194. { field: 'pharmacyName', title: '购药门店名称' }
  195. ]
  196. });
  197. }
  198. function closeT() {
  199. $.modal.close();
  200. }
  201. </script>
  202. <style>
  203. .patient-info {
  204. display: flex;
  205. flex-wrap: wrap;
  206. gap: 10px;
  207. }
  208. .info-item {
  209. display: flex;
  210. align-items: center;
  211. background-color: #f5f5f5;
  212. border-radius: 4px;
  213. padding: 8px;
  214. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  215. }
  216. .label {
  217. font-weight: bold;
  218. margin-right: 20px;
  219. color: #e7eaec;
  220. font-size: 15px;
  221. background-color: #337ab7;
  222. }
  223. .value {
  224. flex-grow: 1;
  225. color: #307cc2;
  226. }
  227. .ibox {
  228. width: auto;
  229. height: 500px;
  230. overflow: auto; /* 当内容超过指定尺寸时显示滚动条 */
  231. }
  232. .fixed-layout-table {
  233. width: 100%;
  234. border-collapse: collapse; /* 减少单元格间距 */
  235. }
  236. .fixed-layout-table thead th {
  237. position: sticky;
  238. top: 0;
  239. background-color: #f8f9fa; /* 表头背景颜色 */
  240. z-index: 1;
  241. }
  242. /* 隐藏列的样式 */
  243. .hidden-column {
  244. display: none;
  245. }
  246. .hidden {
  247. display: none;
  248. }
  249. /*.ibox {*/
  250. /* width: 700px;*/
  251. /* margin-bottom: 20px;*/
  252. /* border: 1px solid #e7eaec;*/
  253. /* border-radius: 4px;*/
  254. /*}*/
  255. .ibox-title {
  256. background-color: #f3f3f4;
  257. border-bottom: 1px solid #e7eaec;
  258. padding: 10px 15px;
  259. font-size: 16px;
  260. width: 1540px;
  261. }
  262. .ibox-content {
  263. padding: 15px;
  264. }
  265. .ibox-content h4 {
  266. margin-top: 0;
  267. }
  268. .form-horizontal .form-group {
  269. margin-right: 384px;
  270. margin-left: 3px;
  271. }
  272. input[type=file] {
  273. display: none;
  274. }
  275. .form-group {
  276. margin-bottom: -1px;
  277. }
  278. /* 添加一些基础样式 */
  279. body {
  280. font-family: Arial, sans-serif;
  281. }
  282. /*table {
  283. width: 500px;
  284. border-collapse: collapse;
  285. }
  286. th, td {
  287. text-align: left;
  288. padding: 5px;
  289. border-bottom: 1px solid #ddd;
  290. }
  291. tr:nth-child(even) {
  292. width: 13px;
  293. background-color: #f2f2f2;
  294. }*/
  295. .hidden-column {
  296. display: none;
  297. }
  298. .customize-table {
  299. width: 100%;
  300. border-collapse: collapse;
  301. }
  302. .customize-table th, .customize-table td {
  303. border: 1px solid #ddd;
  304. padding: 8px;
  305. }
  306. .customize-table th {
  307. background-color: #f2f2f2;
  308. text-align: left;
  309. }
  310. .customize-table tr:nth-child(even) {
  311. background-color: #f9f9f9;
  312. }
  313. .customize-table tr:hover {
  314. background-color: #ddd;
  315. }
  316. /* 新增:选中行的样式 */
  317. .customize-table tr.selected {
  318. background-color: #a9a9c5;
  319. color: white; /* 确保文字可见 */
  320. }
  321. </style>
  322. </body>
  323. </html>