123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
- <head>
- <th:block th:include="include :: header('处方登记信息详情')" />
- <th:block th:include="include :: select2-css" />
- <th:block th:include="include :: bootstrap-fileinput-css" />
- <th:block th:include="include :: layout-latest-css" />
- </head>
- <body class="gray-bg">
- <input type="hidden" id="id" name="id" th:value="${id}">
- <div class="col-sm-12 search-collapse">
- <h4 class="query-condition-title">患者信息</h4>
- <form id="dtp-form-newcfxxx" class="customize-search-form">
- <div class="customize-form-group-container">
- <div class="patient-info">
- <div class="info-item">
- <span class="label">患者姓名:</span>
- <span class="value" id="patientName"></span>
- </div>
- <!--<div class="info-item">
- <span class="label">手机号码:</span>
- <span class="value" id="phoneNumber"></span>
- </div>-->
- <div class="info-item">
- <span class="label">性别:</span>
- <span class="value" id="gender"></span>
- </div>
- <div class="info-item">
- <span class="label">年龄:</span>
- <span class="value" id="age"></span>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="col-sm-12 search-collapse">
- <form id="dtp-form-newcfxx" class="customize-search-form">
- <div class="customize-form-group-container">
- <div class="patient-info">
- <div class="customize-form-group">
- <label>医院:</label>
- <input name="hospital" placeholder="医院" id="hospital" class="styled-input" readonly type="text">
- </div>
- <div class="customize-form-group">
- <label>处方医生:</label>
- <input name="prescribingDoctor" id="prescribingDoctor" placeholder="处方医生" readonly class="styled-input" type="text">
- </div>
- <div class="customize-form-group">
- <label>科室:</label>
- <input name="department" id="department" placeholder="科室" class="styled-input" readonly type="text">
- </div>
- <div class="customize-form-group">
- <label class="is-required">处方诊断::</label>
- <input name="prescriptionDiagnosis" id="prescriptionDiagnosis" placeholder="处方诊断" readonly class="styled-input" type="text">
- </div>
- <div class="customize-form-group">
- <label class="is-required">主管医生:</label>
- <input name="attendingDoctor" id="attendingDoctor" placeholder="主管医生" readonly class="styled-input" type="text">
- </div>
- <div class="customize-form-group">
- <label class="is-required">临床诊断:</label>
- <input name="clinicalDiagnosis" id="clinicalDiagnosis" placeholder="临床诊断" readonly class="styled-input" type="text">
- </div>
- <!--<div class="customize-form-group">
- <label>处方图片:</label>
- <input name="prescriptionImageUrl" id="prescriptionImageUrl" placeholder="处方图片" class="styled-input" type="text">
- </div>-->
- <div class="customize-form-group select-time">
- <label>处方开具日期:</label>
- <input name="prescriptionIssueDate" id="prescriptionIssueDate" placeholder="处方开具日期" readonly class="styled-input" type="text" >
- </div>
- <div class="customize-form-group">
- <label>发票编码:</label>
- <input name="invoiceCode" id="invoiceCode" placeholder="发票编码" readonly class="styled-input" type="text">
- </div>
- <!--<div class="customize-form-group">
- <label>发票图片:</label>
- <input name="invoiceImageUrl" id="invoiceImageUrl" placeholder="发票图片" class="styled-input" type="text">
- </div>-->
- <div class="customize-form-group">
- <label class="is-required">登记药师姓名:</label>
- <input name="registerPharmacistName" id="registerPharmacistName" placeholder="登记药师姓名" readonly class="styled-input" type="text">
- </div>
- <div class="customize-form-group">
- <label class="is-required">登记人:</label>
- <input name="registrant" id="registrant" placeholder="登记人" readonly class="styled-input" type="text">
- </div>
- <div class="customize-form-group">
- <label>审核药师姓名:</label>
- <input name="reviewingName" id="reviewingName" placeholder="审核药师姓名" readonly class="styled-input" type="text">
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="col-sm-12 search-collapse">
- <h4 class="query-condition-title">新建处方登记</h4>
- <!-- 假设这是你的 HTML 结构class="table table-bordered" -->
- <div class="ibox" id="data-ibox" style="overflow: auto;">
- <div class="ibox-title" style="width: 100%;">药品登记列表</div>
- <table id="bootstrap-table" class="fixed-layout-table"></table>
- </div>
- </div>
- <div class="main-content">
- <div class="col-sm-offset-6 col-sm-10">
- <!--<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>提 交</button> -->
- <button type="button" class="btn btn-sm btn-danger" onclick="closeT()"><i class="fa fa-reply-all"></i>关 闭 </button>
- </div>
- </div>
- </div>
- <th:block th:include="include :: footer" />
- <th:block th:include="include :: select2-js" />
- <th:block th:include="include :: bootstrap-fileinput-js" />
- <th:block th:include="include :: bootstrap-table-fixed-columns-js" />
- <th:block th:include="include :: layout-latest-js" />
- <script th:inline="javascript">
- var editFlag = [[${@permission.hasPermi('dtp:RecipeRegister:edit')}]];
- var removeFlag = [[${@permission.hasPermi('dtp:RecipeRegister:remove')}]];
- var prefix_recipe = ctx + "dtp/recipe";
- var prefix_yppz= ctx + "yppz/drugConfig";
- var prefix_pmService = ctx + "dtp/pmService";
- var hzparam =[];
- var data;
- var shangcigyList=[];
- var dataList=[];
- $(document).ready(function() {
- var id = $('#id').val().trim();
- console.log("id----->"+id)
- var datas=[];
- var data = {
- "id":id,
- };
- $.ajax({
- cache : true,
- type : "POST",
- url : prefix_recipe + "/getLastRecipeInfo",
- data : data,
- async : false,
- error : function(request) {
- $.modal.alertError("系统错误");
- },
- success : function(data) {
- var shangciObj={};
- shangcigyList=data.data.recipeList;
- if(data.data.recipeList !=null || data.data.recipeList != undefined){
- initTabShow(datas=data.data.recipeList)
- }
- if(data.data.recipe!=null){
- shangciObj=data.data.recipe;
- // 动态填充表单字段
- $.each(shangciObj, function(key, value) {
- $('#' + key).val(value);
- // if (key=='prescriptionImageUrl'){
- // document.getElementById('prescriptionImageUrl').src == value;
- // }
- if (key=="patientName" || key=="patientPhone" || key=="gender" || key=="age"){
- if (key=="gender"){
- if (value==1){
- value="男";
- }else {
- value="女";
- }
- }
- $('#' + key).text(value);
- }
- });
- /* $('#hospital').val(shangciObj.hospital);
- $('#prescribingDoctor').val(shangciObj.prescribingDoctor);
- $('#department').val(shangciObj.department);
- $('#attendingDoctor').val(shangciObj.attendingDoctor);*/
- }else {
- shangciObj={};
- $('#hospital').val('');
- $('#prescribingDoctor').val('');
- $('#department').val('');
- $('#attendingDoctor').val('');
- }
- }
- });
- });
- function initTabShow(datas){
- var tableId = 'bootstrap-table';
- var tableElement = $('#' + tableId);
- tableElement.bootstrapTable({
- data: datas,
- columns : [
- {field: 'prescriptionNumber', title: '销售' , width:'250px'},
- { field: 'prescriptionDate', title: '处方日期' },
- { field: 'genericName', title: '药品通用名' },
- { field: 'productName', title: '商品名' },
- { field: 'medicationRoute', title: '用药途径' },
- { field: 'dosageFrequency', title: '用药频次' },
- { field: 'singleDoseUnit', title: '单次剂量' },
- { field: 'pharmacyName', title: '购药门店名称' }
- ]
- });
- }
- function closeT() {
- $.modal.close();
- }
- </script>
- <style>
- .patient-info {
- display: flex;
- flex-wrap: wrap;
- gap: 10px;
- }
- .info-item {
- display: flex;
- align-items: center;
- background-color: #f5f5f5;
- border-radius: 4px;
- padding: 8px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
- }
- .label {
- font-weight: bold;
- margin-right: 20px;
- color: #e7eaec;
- font-size: 15px;
- background-color: #337ab7;
- }
- .value {
- flex-grow: 1;
- color: #307cc2;
- }
- .ibox {
- width: auto;
- height: 500px;
- overflow: auto; /* 当内容超过指定尺寸时显示滚动条 */
- }
- .fixed-layout-table {
- width: 100%;
- border-collapse: collapse; /* 减少单元格间距 */
- }
- .fixed-layout-table thead th {
- position: sticky;
- top: 0;
- background-color: #f8f9fa; /* 表头背景颜色 */
- z-index: 1;
- }
- /* 隐藏列的样式 */
- .hidden-column {
- display: none;
- }
- .hidden {
- display: none;
- }
- /*.ibox {*/
- /* width: 700px;*/
- /* margin-bottom: 20px;*/
- /* border: 1px solid #e7eaec;*/
- /* border-radius: 4px;*/
- /*}*/
- .ibox-title {
- background-color: #f3f3f4;
- border-bottom: 1px solid #e7eaec;
- padding: 10px 15px;
- font-size: 16px;
- width: 1540px;
- }
- .ibox-content {
- padding: 15px;
- }
- .ibox-content h4 {
- margin-top: 0;
- }
- .form-horizontal .form-group {
- margin-right: 384px;
- margin-left: 3px;
- }
- input[type=file] {
- display: none;
- }
- .form-group {
- margin-bottom: -1px;
- }
- /* 添加一些基础样式 */
- body {
- font-family: Arial, sans-serif;
- }
- /*table {
- width: 500px;
- border-collapse: collapse;
- }
- th, td {
- text-align: left;
- padding: 5px;
- border-bottom: 1px solid #ddd;
- }
- tr:nth-child(even) {
- width: 13px;
- background-color: #f2f2f2;
- }*/
- .hidden-column {
- display: none;
- }
- .customize-table {
- width: 100%;
- border-collapse: collapse;
- }
- .customize-table th, .customize-table td {
- border: 1px solid #ddd;
- padding: 8px;
- }
- .customize-table th {
- background-color: #f2f2f2;
- text-align: left;
- }
- .customize-table tr:nth-child(even) {
- background-color: #f9f9f9;
- }
- .customize-table tr:hover {
- background-color: #ddd;
- }
- /* 新增:选中行的样式 */
- .customize-table tr.selected {
- background-color: #a9a9c5;
- color: white; /* 确保文字可见 */
- }
- </style>
- </body>
- </html>
|