Browse Source

修改sop配置页面和药品添加bug修复处方登记bug修复

bzd_wsp 3 months ago
parent
commit
04ad6a30ee

+ 1 - 1
health-admin/src/main/resources/templates/dtp/archives/archivesEdit.html

@@ -1137,7 +1137,7 @@
                     value: '',
                     text : '请选择疾病'
                 }).appendTo(options6);
-
+debugger;
                 // 回显数据
                 var dl = /*[[${dl}]]*/ '';
                 // 直接使用 dl 数据预填充下拉列表

+ 2 - 2
health-admin/src/main/resources/templates/dtp/followUp/followUpList.html

@@ -27,11 +27,11 @@
 						<div class="customize-form-group-container">
 							<div class="customize-form-group">
 								<label>患者信息:</label>
-								<input type="text" class="styled-input"  placeholder="请输入患者姓名或手机号" name="query"/>
+								<input type="text" class="styled-input"  placeholder="请输入患者姓名或患者ID" name="query"/>
 							</div>
 							<div class="customize-form-group">
 								<label>药品:</label>
-								<input type="text"  class="styled-input" placeholder="商品名,通用名或MDM编码"  name="product"/>
+								<input type="text"  class="styled-input" placeholder="请输入商品名或通用名"  name="product"/>
 							</div>
 							<div class="customize-form-group">
 								<label>预约日期:</label>

+ 55 - 44
health-admin/src/main/resources/templates/dtp/recipe/edit.html

@@ -46,13 +46,13 @@
                 <input name="age1" placeholder="年龄" id="age1" readonly  class="styled-input" type="text" th:value="${age}">
             </div>
             <div class="customize-form-group">
-                <label>医院:</label>
+                <label class="is-required">医院:</label>
                 <select id="hospital-select"  name="hospital" class="styled-input select2-multiple" placeholder="请选择或输入搜索">
                     <option value="">请选择医院</option>
                 </select>
             </div>
             <div class="customize-form-group">
-                <label>处方医生:</label>
+                <label class="is-required">处方医生:</label>
                 <input name="prescribingDoctor" id="prescribingDoctor" placeholder="处方医生"   class="styled-input" type="text">
             </div>
             <div class="customize-form-group">
@@ -64,7 +64,7 @@
                 <input name="prescriptionDiagnosis" id="prescriptionDiagnosis" placeholder="处方诊断"   class="styled-input" type="text">
             </div>
             <div class="customize-form-group">
-                <label class="is-required">主管医生:</label>
+                <label>主管医生:</label>
                 <input name="attendingDoctor" id="attendingDoctor" placeholder="主管医生"   class="styled-input" type="text">
             </div>
 <!--            <div class="customize-form-group">-->
@@ -76,7 +76,7 @@
                 <input name="prescriptionImageUrl" id="prescriptionImageUrl" placeholder="处方图片"  class="styled-input" type="text">
             </div>
             <div class="customize-form-group  select-time">
-                <label>处方开具日期:</label>
+                <label class="is-required">处方开具日期:</label>
                 <input name="prescriptionIssueDate" id="prescriptionIssueDate" placeholder="处方开具日期"   class="time-input time-input2" type="text">
             </div>
             <div class="customize-form-group">
@@ -90,11 +90,11 @@
 
 
             <div class="customize-form-group">
-                <label class="is-required">登记药师姓名:</label>
+                <label>登记药师姓名:</label>
                 <input name="registerPharmacistName" id="registerPharmacistName" placeholder="登记药师姓名"   class="styled-input" type="text">
             </div>
             <div class="customize-form-group">
-                <label class="is-required">登记人:</label>
+                <label>登记人:</label>
                 <input name="registrant" id="registrant" placeholder="登记人"  class="styled-input" type="text">
             </div>
             <div class="customize-form-group">
@@ -515,7 +515,7 @@
                 }
             }
         });
-        var reviewingName = $('#reviewingName').val().trim();
+        var reviewingName = $('#reviewingName').val();
         if($.common.isNotEmpty(reviewingName)){
             reviewFlag=true;
             $('#openCheckYSSid').hide();
@@ -537,11 +537,11 @@
         debugger;
         console.log("valuegender1====="+value);
         switch (value) {
-            case '0':
-                $('#gender1').val('男');
+            case 0:
+                $('#gender1').val(value);
                 break;
-            case '1':
-                $('#gender1').val('女');
+            case 1:
+                $('#gender1').val(value);
                 break;
             default:
                 $('#gender1').val('未知');
@@ -568,6 +568,7 @@
                 console.log("操作失败");
             },
             success: function (data) {
+                debugger;
                 console.log("检查患者是否存在data====="+data);
                 if(data.code==0){
                     patientFlag = true;
@@ -578,6 +579,7 @@
                     //性别格式化
                     console.log("gender====="+gender);
                     formatGender(gender);
+                    $('#gender1').val(data.data.gender);
                     $('#age1').val(data.data.age);
                     $('#patientPhone').val(data.data.phoneNumber);
                     $('#patientName').val(data.data.name);
@@ -722,20 +724,29 @@
                 // 快速建档
                 bookbuilding();
             });
-
             return;
         }
         // 创建一个 FormData 对象用于提交表单数据
         var formData = new FormData();
-        var prescribingDoctor = $('#prescribingDoctor').val();
-        if (prescribingDoctor == '' || prescribingDoctor == null || prescribingDoctor == undefined) {
-            $.modal.alertError("请输入处方医生");
-            return;
+        var hospital = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'hospital');
+        if (hospital.value === '') {
+            $.modal.alertWarning("请选择请选择医院!");
+            return null;
         }
-        var prescriptionIssueDate = $('#prescriptionIssueDate').val();
-        if (prescriptionIssueDate == '' || prescriptionIssueDate == null || prescriptionIssueDate == undefined) {
-            $.modal.alertError("处方开具日期");
-            return;
+        var prescribingDoctor = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'prescribingDoctor');
+        if (prescribingDoctor.value === '') {
+            $.modal.alertWarning("请输入处方医生!");
+            return null;
+        }
+        var prescriptionDiagnosis = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'prescriptionDiagnosis');
+        if (prescriptionDiagnosis.value === '') {
+            $.modal.alertWarning("请填写处方诊断!");
+            return null;
+        }
+        var prescriptionIssueDate = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'prescriptionIssueDate');
+        if (prescriptionIssueDate.value === '') {
+            $.modal.alertWarning("请选择处方开具日期!");
+            return null;
         }
         // 收集表单中的其他字段,并将其添加到 FormData 中
         $('#dtp-form-newcfxx').find(':input').each(function () {
@@ -786,17 +797,17 @@
         $('#drugInfoTable tbody tr').each(function (index, row) {
             var rowData = {
                 productId: $(row).data('product-id'),
-                mdmCode: $(row).find('td:eq(1)').text().trim(),
-                productName: $(row).find('td:eq(2)').text().trim(),
-                genericName: $(row).find('td:eq(3)').text().trim(),
-                specification: $(row).find('td:eq(4)').text().trim(),
-                manufacturerShortName: $(row).find('td:eq(5)').text().trim(),
-                administrationMethod: $(row).find('td:eq(6)').text().trim(),
-                followUpItem: $(row).find('td:eq(7)').text().trim(),
-                coldChainItem: $(row).find('td:eq(8)').text().trim(),
-                registeredItem: $(row).find('td:eq(9)').text().trim(),
-                charityAidItem: $(row).find('td:eq(10)').text().trim(),
-                packaging: $(row).find('td:eq(11)').text().trim(),
+                mdmCode: $(row).find('td:eq(1)').text(),
+                productName: $(row).find('td:eq(2)').text(),
+                genericName: $(row).find('td:eq(3)').text(),
+                specification: $(row).find('td:eq(4)').text(),
+                manufacturerShortName: $(row).find('td:eq(5)').text(),
+                administrationMethod: $(row).find('td:eq(6)').text(),
+                followUpItem: $(row).find('td:eq(7)').text(),
+                coldChainItem: $(row).find('td:eq(8)').text(),
+                registeredItem: $(row).find('td:eq(9)').text(),
+                charityAidItem: $(row).find('td:eq(10)').text(),
+                packaging: $(row).find('td:eq(11)').text(),
                 packageQuantity: $(row).find('input[name="packageQuantity"]').val(),
                 singleDoseValue: $(row).find('input[name="singleDoseValue"]').val(),
                 singleDoseUnit: $(row).find('select[name="singleDoseUnit"]').val(),
@@ -869,10 +880,10 @@
             $.modal.alertError("请添加药品");
             return;
         }
-        var id = $('#id').val().trim();
-        var prescriptionNumber = $('#prescriptionNumber').val().trim();
-        var drugsLinkId = $('#drugsLinkId').val().trim();
-        var status = $('#status').val().trim();
+        var id = $('#id').val();
+        var prescriptionNumber = $('#prescriptionNumber').val();
+        var drugsLinkId = $('#drugsLinkId').val();
+        var status = $('#status').val();
         if (id != '') {
             formData.append('id', id);
             formData.append('status', status);
@@ -882,7 +893,7 @@
             $.modal.alertError("请联系管理员!");
             return;
         }
-        var reviewingNameInput = $('#reviewingName').val().trim();
+        var reviewingNameInput = $('#reviewingName').val();
         if($.common.isEmpty(reviewingNameInput) && !reviewFlag){
             reviewFlag=false;
             $.modal.alertError("请完成药师审核或选择不开启审核");
@@ -895,8 +906,8 @@
             formData.append('reviewFormData', reviewFormData);
 
         }
-        formData.append('age',  $('#age1').val().trim());
-        formData.append('gender',  $('#gender1').val().trim());
+        formData.append('age',  $('#age1').val());
+        formData.append('gender',  $('#gender1').val());
         $.ajax({
             cache: false, // 设置为 false 防止缓存
             type: "POST",
@@ -1250,7 +1261,7 @@
     }
 
     function search_hz() {
-        var query = $('#query').val().trim();
+        var query = $('#query').val();
         // 如果输入为空,清空 dValueId 输入框并停止进一步操作
         if (!query) {
             $('#query').val('');
@@ -1326,7 +1337,7 @@
 
     /* 这里是去查询 使用药的信息*/
     $(document).ready(function () {
-        var id = $('#id').val().trim();
+        var id = $('#id').val();
         var datas = [];
         var data = {
             "id": id,
@@ -1452,7 +1463,7 @@
                             <option value="5">每周2次</option>-->
                         </select>
                     </td>
-                    <td> <input name="dosageFrequencyDays" id="dosageFrequencyDays${columnsData.productId}" placeholder="购药包装单位" class="styled-input" style="width: 100px;" type="number"><span id="ycode${columnsData.productId}"></span></td>
+                    <td> <input name="dosageFrequencyDays" value="${columnsData.packingValue}" id="dosageFrequencyDays${columnsData.productId}" placeholder="购药包装单位" class="styled-input" style="width: 100px;" type="number"><span id="ycode${columnsData.productId}"></span></td>
                     <td> <input name="dvalueDays" id="dvalueDays${columnsData.productId}" placeholder="系统自动计算" class="styled-input" disabled="" style="width: 80px;" type="number"><span id="defaultNum${columnsData.productId}" style="color: red"></span></td>
                 </tr>
             `;
@@ -1615,9 +1626,9 @@
     // 示例使用
     function submitArchives() {
         debugger
-        var documentType= $("#documentType").val()
+        var documentType= $("#documentType").val();
         if(documentType=="居民身份证") {
-            var IDCard= $("#documentNumber").val()
+            var IDCard= $("#documentNumber").val();
             if (IDCard == null || IDCard == "" || IDCard == undefined){
                 $.modal.alert("请输入身份证号码")
                 return false
@@ -1632,7 +1643,7 @@
             $.modal.alert("请选择性别")
             return false
         }
-        var timeFirstDiagnosis= $("#timeFirstDiagnosis").val()
+        var timeFirstDiagnosis= $("#timeFirstDiagnosis").val();
         if (timeFirstDiagnosis==null || timeFirstDiagnosis=="" || timeFirstDiagnosis==undefined) {
             $.modal.alert("请选择首次确诊时间")
             return false

+ 64 - 38
health-admin/src/main/resources/templates/dtp/recipe/newRecipe.html

@@ -51,7 +51,7 @@
     <form id="dtp-form-newcfxx" class="customize-search-form">
                     <div class="customize-form-group-container">
                         <div class="customize-form-group">
-                            <label>医院:</label>
+                            <label class="is-required">医院:</label>
 <!--                            <input name="hospital" placeholder="医院" id="hospital" class="styled-input" type="text">-->
                             <select id="hospital-select"  name="hospital" class="styled-input form-control select2-multiple" placeholder="请选择或输入搜索">
                                 <option value="">请选择医院</option>
@@ -66,15 +66,14 @@
                             <input name="department" id="department" placeholder="科室"   class="styled-input" type="text">
                         </div>
                         <div class="customize-form-group">
-                            <label class="is-required">处方诊断:</label>
+                            <label class="is-required">处方诊断:</label>
                             <input name="prescriptionDiagnosis" id="prescriptionDiagnosis" placeholder="处方诊断"   class="styled-input" type="text">
                         </div>
                         <div class="customize-form-group">
-                            <label class="is-required">主管医生:</label>
+                            <label>主管医生:</label>
                             <input name="attendingDoctor" id="attendingDoctor" placeholder="主管医生"   class="styled-input" type="text">
                         </div>
                         <div class="customize-form-group-container">
-
                         </div>
 <!--                        <div class="customize-form-group">-->
 <!--                            <label class="is-required">临床诊断:</label>-->
@@ -252,7 +251,7 @@
     var selectdataList=[];
     var  prescriptionNumber;
     var  drugsLinkId;
-    var reviewFlag=false;
+    var reviewFlag=true;
     var reviewFormData = new FormData();
      $(document).ready(function() {
 
@@ -509,17 +508,17 @@ function initTab(datas){
         $('#drugInfoTable tbody tr').each(function(index, row) {
             var rowData = {
                 productId: $(row).data('product-id'),
-                mdmCode: $(row).find('td:eq(1)').text().trim(),
-                productName: $(row).find('td:eq(2)').text().trim(),
-                genericName: $(row).find('td:eq(3)').text().trim(),
-                specification: $(row).find('td:eq(4)').text().trim(),
-                manufacturerShortName: $(row).find('td:eq(5)').text().trim(),
-                administrationMethod: $(row).find('td:eq(6)').text().trim(),
-                followUpItem: $(row).find('td:eq(7)').text().trim(),
-                coldChainItem: $(row).find('td:eq(8)').text().trim(),
-                registeredItem: $(row).find('td:eq(9)').text().trim(),
-                charityAidItem: $(row).find('td:eq(10)').text().trim(),
-                packaging: $(row).find('td:eq(11)').text().trim(),
+                mdmCode: $(row).find('td:eq(1)').text(),
+                productName: $(row).find('td:eq(2)').text(),
+                genericName: $(row).find('td:eq(3)').text(),
+                specification: $(row).find('td:eq(4)').text(),
+                manufacturerShortName: $(row).find('td:eq(5)').text(),
+                administrationMethod: $(row).find('td:eq(6)').text(),
+                followUpItem: $(row).find('td:eq(7)').text(),
+                coldChainItem: $(row).find('td:eq(8)').text(),
+                registeredItem: $(row).find('td:eq(9)').text(),
+                charityAidItem: $(row).find('td:eq(10)').text(),
+                packaging: $(row).find('td:eq(11)').text(),
                 packageQuantity: $(row).find('input[name="packageQuantity"]').val(),
                 singleDoseValue: $(row).find('input[name="singleDoseValue"]').val(),
                 singleDoseUnit: $(row).find('select[name="singleDoseUnit"]').val(),
@@ -556,16 +555,28 @@ function initTab(datas){
     function submitHandler() {
         prescriptionNumber='';
         drugsLinkId='';
-        var prescribingDoctor = $('#prescribingDoctor').val();
-        if (prescribingDoctor == ''|| prescribingDoctor == null|| prescribingDoctor == undefined){
-            $.modal.alertError("请输入处方医生");
-            return;
+
+        var hospital = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'hospital');
+        if (hospital.value === '') {
+            $.modal.alertWarning("请选择请选择医院!");
+            return null;
         }
-        var prescriptionIssueDate = $('#prescriptionIssueDate').val();
-        if (prescriptionIssueDate == ''|| prescriptionIssueDate == null|| prescriptionIssueDate == undefined){
-            $.modal.alertError("处方开具日期");
-            return;
+        var prescribingDoctor = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'prescribingDoctor');
+        if (prescribingDoctor.value === '') {
+            $.modal.alertWarning("请输入处方医生!");
+            return null;
+        }
+        var prescriptionDiagnosis = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'prescriptionDiagnosis');
+        if (prescriptionDiagnosis.value === '') {
+            $.modal.alertWarning("请填写处方诊断!");
+            return null;
+        }
+        var prescriptionIssueDate = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'prescriptionIssueDate');
+        if (prescriptionIssueDate.value === '') {
+            $.modal.alertWarning("请选择处方开具日期!");
+            return null;
         }
+
         // 创建一个 FormData 对象用于提交表单数据
         var formData = new FormData();
         // 如果有文件上传,例如处方图片和发票图片
@@ -586,6 +597,7 @@ function initTab(datas){
             // 添加患者信息到 FormData
             formData.append('patientId', patientObj.id);
             formData.append('patientName', patientObj.name || '');
+            formData.append('patientPhone', patientObj.phoneNumber);
             let gender = patientObj.gender; // 获取表单中的性别值
             if (gender ===1) {
                 gender = 1; // 如果为空,则设置默认值为 '0'
@@ -627,11 +639,19 @@ function initTab(datas){
         //formData.append('xlname', XL);
         console.log("DL=" + DL);
         //console.log("XL=" + XL);
-        if(reviewFlag){
+        debugger
+        var reviewingNameInput = $('#pharmacistNameSelect option:selected');
+        if($.common.isEmpty(reviewingName) && reviewFlag){
+            reviewFlag=false;
+            $.modal.alertError("请完成药师审核或选择不开启审核");
+            return;
+        }
+        if(reviewFlag && $.common.isNotEmpty(reviewingName)){
             formData.append('remarks', remarks);
             formData.append('reviewingName', reviewingName);
             formData.append('reviewStatus', reviewStatus);
             formData.append('reviewFormData', reviewFormData);
+
         }
 
         var tableRows = [];
@@ -639,17 +659,17 @@ function initTab(datas){
         $('#drugInfoTable tbody tr').each(function(index, row) {
             var rowData = {
                 productId: $(row).data('product-id'),
-                mdmCode: $(row).find('td:eq(1)').text().trim(),
-                productName: $(row).find('td:eq(2)').text().trim(),
-                genericName: $(row).find('td:eq(3)').text().trim(),
-                specification: $(row).find('td:eq(4)').text().trim(),
-                manufacturerShortName: $(row).find('td:eq(5)').text().trim(),
-                administrationMethod: $(row).find('td:eq(6)').text().trim(),
-                followUpItem: $(row).find('td:eq(7)').text().trim(),
-                coldChainItem: $(row).find('td:eq(8)').text().trim(),
-                registeredItem: $(row).find('td:eq(9)').text().trim(),
-                charityAidItem: $(row).find('td:eq(10)').text().trim(),
-                packaging: $(row).find('td:eq(11)').text().trim(),
+                mdmCode: $(row).find('td:eq(1)').text(),
+                productName: $(row).find('td:eq(2)').text(),
+                genericName: $(row).find('td:eq(3)').text(),
+                specification: $(row).find('td:eq(4)').text(),
+                manufacturerShortName: $(row).find('td:eq(5)').text(),
+                administrationMethod: $(row).find('td:eq(6)').text(),
+                followUpItem: $(row).find('td:eq(7)').text(),
+                coldChainItem: $(row).find('td:eq(8)').text(),
+                registeredItem: $(row).find('td:eq(9)').text(),
+                charityAidItem: $(row).find('td:eq(10)').text(),
+                packaging: $(row).find('td:eq(11)').text(),
                 packageQuantity: $(row).find('input[name="packageQuantity"]').val(),
                 singleDoseValue: $(row).find('input[name="singleDoseValue"]').val(),
                 singleDoseUnit: $(row).find('select[name="singleDoseUnit"]').val(),
@@ -741,7 +761,9 @@ function initTab(datas){
                     prescriptionNumber = data.data.prescriptionNumber;
                     drugsLinkId = data.data.drugsLinkId;
                     $.modal.msg(data.msg);
-                    $.modal.closeTab();
+
+                    $.modal.close();
+                    $.modal.msgSuccessReload();
                 }else{
                     $.modal.alertError(data.data.msg);
                 }
@@ -1073,10 +1095,12 @@ function initTab(datas){
         $("#query").val("");
     }
     function search_hz() {
-        var query = $('#query').val().trim();
+        var query = $('#query').val();
         // 如果输入为空,清空 dValueId 输入框并停止进一步操作
         if (!query) {
             $('#query').val('');
+            var tbody = $('#patient-table tbody');
+            tbody.empty(); // 清空现有行
             return;
         }
 
@@ -1143,6 +1167,8 @@ function initTab(datas){
 
             },
             error: function(error) {
+                var tbody = $('#patient-table tbody');
+                tbody.empty(); // 清空现有行
                 // 清空 dValueId 输入框
                 $('#query').val('');
             }

+ 38 - 8
health-admin/src/main/resources/templates/dtp/recipe/newRecipeView.html

@@ -2,9 +2,9 @@
 <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" />
+    <th:block th:include="include :: select2-css" />
 </head>
 <body class="gray-bg">
 <input type="hidden" id="id" name="id" th:value="${id}">
@@ -50,16 +50,22 @@
                     <input name="department" id="department" placeholder="科室"   class="styled-input" readonly  type="text">
                 </div>
                 <div class="customize-form-group">
-                    <label class="is-required">处方诊断::</label>
+                    <label >处方诊断::</label>
                     <input name="prescriptionDiagnosis" id="prescriptionDiagnosis" placeholder="处方诊断" readonly  class="styled-input" type="text">
                 </div>
                 <div class="customize-form-group">
-                    <label class="is-required">主管医生:</label>
+                    <label >主管医生:</label>
                     <input name="attendingDoctor" id="attendingDoctor" placeholder="主管医生" readonly  class="styled-input" type="text">
                 </div>
+<!--                <div class="customize-form-group">-->
+<!--                    <label >临床诊断:</label>-->
+<!--                    <input name="clinicalDiagnosis" id="clinicalDiagnosis" 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">
+                    <label>临床诊断:</label>
+                    <select id="category-select"  disabled="true" class="styled-input" >
+
+                    </select>
                 </div>
                 <!--<div class="customize-form-group">
                     <label>处方图片:</label>
@@ -78,11 +84,11 @@
                     <input name="invoiceImageUrl" id="invoiceImageUrl" placeholder="发票图片"  class="styled-input" type="text">
                 </div>-->
                 <div class="customize-form-group">
-                    <label class="is-required">登记药师姓名:</label>
+                    <label >登记药师姓名:</label>
                     <input name="registerPharmacistName" id="registerPharmacistName" placeholder="登记药师姓名" readonly  class="styled-input" type="text">
                 </div>
                 <div class="customize-form-group">
-                    <label class="is-required">登记人:</label>
+                    <label >登记人:</label>
                     <input name="registrant" id="registrant" placeholder="登记人" readonly  class="styled-input" type="text">
                 </div>
                 <div class="customize-form-group">
@@ -110,10 +116,12 @@
     </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" />
+<th:block th:include="include :: select2-js" />
+
+
 <script th:inline="javascript">
     var editFlag = [[${@permission.hasPermi('dtp:RecipeRegister:edit')}]];
     var removeFlag = [[${@permission.hasPermi('dtp:RecipeRegister:remove')}]];
@@ -124,6 +132,9 @@
     var data;
     var shangcigyList=[];
     var dataList=[];
+    /*<![CDATA[*/
+    var dl = /*[[${dl}]]*/ '';
+    /*]]>*/
     $(document).ready(function() {
         var id = $('#id').val().trim();
         console.log("id----->"+id)
@@ -179,6 +190,25 @@
 
             }
         });
+
+        // 直接使用 dl 数据预填充下拉列表
+        var dlParsed = JSON.parse(dl);
+        if (Array.isArray(dlParsed)) {
+            var dlIds = dlParsed.map(function (item) {
+                return item.id;
+            }); // 转换为 ID 数组
+
+            // 添加 dl 中的选项到下拉列表
+            $.each(dlParsed, function (index, item) {
+                $('<option>', {
+                    value: item.id,
+                    text: item.name
+                }).appendTo($('#category-select'));
+            });
+
+            // 设置默认选中的 dl 选项
+            $('#category-select').val(dlIds).trigger('change');
+        }
     });
 
 function initTabShow(datas){

+ 0 - 1
health-admin/src/main/resources/templates/dtp/recipe/recipe.html

@@ -134,7 +134,6 @@
 				{ field: "productName", title: "商品名称" },
 				{ field: "genericName", title: "通用名称" },
 				{ field: "specification", title: "规格" },
-				{ field: "prescriptionNumber", title: "处方单号" },
 				{ field: "dvalueDays", title: "剂量天数" },
 				{ field: "prescriptionNumber", title: "处方单号" },
 				{ field: "salesOrderNumber", title: "销售单号" },

+ 2 - 2
health-admin/src/main/resources/templates/dtp/recipe/salesRegistration.html

@@ -153,8 +153,8 @@
 				{ field: "genericName", title: "通用名称" },
 				{ field: "specification", title: "规格" },
 				{ field: "drug_batch_number", title: "药品批号", visible: true },
-				{ field: "sales_storeName", title: "销售门店编码", visible: true },
-				{ field: "sales_storeCode", title: "销售门店名称", visible: true },
+				{ field: "sales_storeCode", title: "销售门店编码", visible: true },
+				{ field: "sales_storeName", title: "销售门店名称", visible: true },
 				{ field: "patientName", title: "患者姓名" },
 				{ field: "gender", title: "性别", formatter: function(value, row, index) {
 						switch (value) {

+ 126 - 88
health-admin/src/main/resources/templates/gxhpz/drugconfigAdd.html

@@ -51,103 +51,141 @@
                         <i class="fa fa-info-circle"></i> 以下是选择项的说明
                     </div>
                     <div class="panel-body">
-                        <p>1.是否随访管品说明</p>
-                        <p>2.分是否冷链管理品说明</p>
-                        <p>3.是否登记管理品说明</p>
-                        <p>4.是否慈善援助管理品说明</p>
+                        <p>1.是否随访管品:指的是药品是否需要进行用药后的跟踪随访。对于一些特定的药物,特别是那些可能有严重副作用或需要监测疗效的药物,医疗机构和药企可能会对使用这些药物的患者进行定期随访,以确保药物的安全性和有效性。</p>
+                        <p>2.分是否冷链管理品:冷链管理指的是在整个供应链过程中,从生产、储存到运输直至最终到达消费者手中的每一个环节都保持在规定的低温环境中。这适用于那些对温度敏感的药品,以保证其品质和效力不受影响。</p>
+                        <p>3.是否登记管理品:登记管理是指药品是否被列入了特定的监管名单中,要求对其销售、使用等情况进行详细记录。这类药品通常是因为它们具有较高的风险性或者特殊的管理需求。</p>
+                        <p>4.是否慈善援助管理品:慈善援助管理涉及药品是否作为慈善项目的一部分提供给经济困难或特定条件下的患者。企业或组织会为符合条件的人群免费提供药物支持,减轻他们的经济负担。</p>
                     </div>
-                </div>
-            <div class="customize-form-group">
-                <label class="is-required">是否随访管理品:</label>
-                <select name="isFollowUpManaged" id="isFollowUpManaged" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" required>
-                    <option value="">请选择</option>
-                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                </select>
-            </div>
-            <div class="customize-form-group" id="isColdChainManagedDiv">
-                <label class="is-required">是否冷链管理品:</label>
-                <select name="isColdChainManaged" id="isColdChainManaged" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" required>
-                    <option value="">请选择</option>
-                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                </select>
-            </div>
-            <div class="customize-form-group" id="isRegisteredManagedDiv">
-                <label>是否登记管理品:</label>
-                <select name="isRegisteredManaged" id="isRegisteredManaged" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
-                    <option value="">请选择</option>
-                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                </select>
-            </div>
-            <div class="customize-form-group">
-                <label>是否慈善援助管理品:</label>
-                <select name="isCharityAidManaged" id="isCharityAidManaged" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
-                    <option value="">请选择</option>
-                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                </select>
-            </div>
-            <div class="customize-form-group">
-                <label class="is-required">给药方式:</label>
-                <select name="administrationMethod" id="administrationMethod" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_yyff')}" required>
-                    <option value="">请选择</option>
-                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                </select>
-            </div>
-                <div class="customize-form-group">
-                    <label>企业流向管理方式:</label>
-                    <select name="enterpriseFlowManagement" id="enterpriseFlowManagement" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yppz_qylxglfs')}">
-                        <option value="">请选择</option>
-                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                    </select>
-                </div>
-            <div class="rule-info-section">
-                <hr /> 用药规则配置信息<hr />
-                <span>这里是规则用药规则配置信息:最大剂量数量=每天用药数量,最大剂量单位=例如: mg,g,ml。购药包装单位数值=关键信息-是指更据药品规格选取的值,提供给系统自动计算D值的必要参数</span>
-            </div>
                     <div class="customize-form-group">
-                            <label class="is-required">最大剂量数量:</label>
-                            <input type="number" name="dosage_max" id="dosage_max" placeholder="最大剂量数量" class="styled-input" required />
-                    </div>
-                    <div class="customize-form-group">
-                            <label class="is-required">最大剂量单位:</label>
-                            <select name="unit_max" class="styled-input"  id="unit_max" placeholder="最大剂量单位" th:with="type=${@dict.getType('sys_gxhpz_gg_unitall')}" required>
-                                <option value="">请选择</option>
-                                <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
-                            </select>
-                    </div>
+                        <label class="is-required">是否随访管理品:</label>
+                        <select name="isFollowUpManaged" id="isFollowUpManaged" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" required>
+                            <option value="">请选择</option>
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                        </select>
 
-                    <div class="customize-form-group">
-                            <label>常用剂量数量:</label>
-                            <input type="number" name="dosage_normal" id="dosage_normal"  placeholder="常用剂量数量" class="styled-input" />
-                    </div>
-                   <div class="customize-form-group">
-                        <label>常用剂量单位:</label>
-                        <select name="unit_normal" id="unit_normal" class="styled-input" style="height: auto" placeholder="常用剂量单位" th:with="type=${@dict.getType('sys_gxhpz_gg_unitall')}">
+                        <label class="is-required">是否冷链管理品:</label>
+                        <select name="isColdChainManaged" id="isColdChainManaged" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" required>
                             <option value="">请选择</option>
-                            <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                         </select>
                     </div>
-                    <div class="customize-form-group">
-                                <label class="is-required">最小剂量数量:</label>
-                                <input type="number" name="dosage_min"  id="dosage_min" placeholder="最小剂量数量" class="styled-input" required />
-                     </div>
-                    <div class="customize-form-group">
-                                <label class="is-required">最小剂量单位:</label>
-                                <select name="unit_min" class="styled-input"   style="height: auto" id="unit_min" placeholder="最小剂量单位" th:with="type=${@dict.getType('sys_gxhpz_gg_unitall')}" required>
-                                    <option value="">请选择</option>
-                                    <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
-                                </select>
-                    </div>
-                    <div class="customize-form-group">
-                                <label class="is-required">购药包装单位数值:</label>
-                                <input type="number" name="packing_value" id="packing_value" placeholder="购药包装单位数值" class="styled-input" required />
+                    <div class="customize-form-group" id="isRegisteredManagedDiv">
+                        <label>是否登记管理品:</label>
+                        <select name="isRegisteredManaged" id="isRegisteredManaged" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
+                            <option value="">请选择</option>
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                        </select>
+
+                        <label>是否慈善援助管理品:</label>
+                        <select name="isCharityAidManaged" id="isCharityAidManaged" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
+                            <option value="">请选择</option>
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                        </select>
                     </div>
                     <div class="customize-form-group">
-                                <label>包装单位:</label>
-                                <select name="packing_unit" id="packing_unit" style="height: auto" class="styled-input" placeholder="包装单位"  th:with="type=${@dict.getType('sys_gxhpz_gg_unitall')}">
-                                    <option value="">请选择</option>
-                                    <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
-                                </select>
+                        <label class="is-required">给药方式:</label>
+                        <select name="administrationMethod" id="administrationMethod" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_yyff')}" required>
+                            <option value="">请选择</option>
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                        </select>
+
+                        <label>企业流向管理方式:</label>
+                        <select name="enterpriseFlowManagement" id="enterpriseFlowManagement" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yppz_qylxglfs')}">
+                            <option value="">请选择</option>
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                        </select>
                     </div>
+                </div>
+
+            <div class=" panel panel-warning" style="width: 100%;margin-left: 8%">
+                <div class="panel-heading">
+                    <i class="fa fa-info-circle"></i> 用药规则配置信息
+                </div>
+                <div class="panel-body">
+                    <p>1:最大剂量数量与单位
+                        最大剂量数量:
+                        定义: 指定患者在一定时间内(通常为一天)可以使用的药物最高限量。
+                        用途: 用于设定安全用药上限,防止过量使用带来的风险。
+                        示例: 如果某种药物的最大日剂量是500毫克,则“最大剂量数量”应设置为500。
+                        最大剂量单位:
+                        定义: 配合“最大剂量数量”使用的计量单位,如毫克(mg)、克(g)或毫升(ml)。
+                        用途: 精确描述药物剂量,确保不同药物之间的比较和管理的一致性。
+                        选择: 根据具体药品的规格选择合适的单位。</p>
+                    <p>2:常用剂量数量与单位
+                        常用剂量数量:
+                        定义: 指的是医生通常推荐给患者的每日标准用药量。
+                        用途: 提供一个常规参考值,指导患者正确用药。
+                        示例: 对于某些药物,医生可能建议每天服用100毫克作为常规剂量。
+                        常用剂量单位:
+                        定义: 配合“常用剂量数量”使用的计量单位。
+                        用途: 和最大剂量单位一样,用于精确描述药物剂量。
+                        选择: 同样依据药品的具体规格来确定。</p>
+                    <p>3:最小剂量数量与单位
+                        最小剂量数量:
+                        定义: 指定患者在一定时间内(通常为一天)可以使用的药物最低限量。
+                        用途: 确保药物的有效性,避免因剂量不足而影响治疗效果。
+                        示例: 对于某些药物,最小日剂量可能是50毫克。
+                        最小剂量单位:
+                        定义: 配合“最小剂量数量”使用的计量单位。
+                        用途: 确保剂量描述的准确性。
+                        选择: 根据药品规格选择适当的单位。</p>
+                    <p>4:   购药包装单位数值与单位
+                        购药包装单位数值:
+                        定义: 表示每次购买时,药品的标准包装内含有的药物单元数。这是系统计算D值(例如,药品库存天数等指标)的关键参数之一。
+                        用途: 用于准确统计药品的销售和库存情况,帮助医疗机构和药店合理规划采购计划。
+                        示例: 如果一盒药品含有30片,则“购药包装单位数值”应设置为30。
+                        包装单位:
+                        定义: 描述“购药包装单位数值”的计数单位,如片、粒、瓶、支等。
+                        用途: 明确药品包装内的物品形式,便于用户理解。
+                        选择: 根据药品的实际包装形式来选择</p>
+                </div>
+                <div class="customize-form-group">
+                    <label class="is-required">最大剂量数量:</label>
+                    <input type="number" name="dosage_max" id="dosage_max" placeholder="最大剂量数量" class="styled-input" required />
+
+                    <label class="is-required">最大剂量单位:</label>
+                    <select name="unit_max" class="styled-input"  id="unit_max" placeholder="最大剂量单位" th:with="type=${@dict.getType('sys_gxhpz_gg_unitall')}" required>
+                        <option value="">请选择</option>
+                        <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
+                    </select>
+                </div>
+
+                <div class="customize-form-group">
+                    <label>常用剂量数量:</label>
+                    <input type="number" name="dosage_normal" id="dosage_normal"  placeholder="常用剂量数量" class="styled-input" />
+
+                    <label>常用剂量单位:</label>
+                    <select name="unit_normal" id="unit_normal" class="styled-input" style="height: auto" placeholder="常用剂量单位" th:with="type=${@dict.getType('sys_gxhpz_gg_unitall')}">
+                        <option value="">请选择</option>
+                        <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
+                    </select>
+                </div>
+                <div class="customize-form-group">
+                    <label class="is-required">最小剂量数量:</label>
+                    <input type="number" name="dosage_min"  id="dosage_min" placeholder="最小剂量数量" class="styled-input" required />
+
+                    <label class="is-required">最小剂量单位:</label>
+                    <select name="unit_min" class="styled-input"   style="height: auto" id="unit_min" placeholder="最小剂量单位" th:with="type=${@dict.getType('sys_gxhpz_gg_unitall')}" required>
+                        <option value="">请选择</option>
+                        <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
+                    </select>
+                </div>
+                <div class="customize-form-group">
+                    <label class="is-required">购药包装单位数值:</label>
+                    <input type="number" name="packing_value" id="packing_value" placeholder="购药包装单位数值" class="styled-input" required />
+
+                    <label>包装单位:</label>
+                    <select name="packing_unit" id="packing_unit" style="height: auto" class="styled-input" placeholder="包装单位"  th:with="type=${@dict.getType('sys_gxhpz_gg_unitall')}">
+                        <option value="">请选择</option>
+                        <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
+                    </select>
+                </div>
+            </div>
+<!--            <div class="rule-info-section">-->
+<!--                <hr /> 用药规则配置信息<hr />-->
+<!--                <span>这里是规则用药规则配置信息:最大剂量数量=每天用药数量,最大剂量单位=例如: mg,g,ml。购药包装单位数值=关键信息-是指更据药品规格选取的值,提供给系统自动计算D值的必要参数</span>-->
+<!--            </div>-->
+
 
                     <div class="customize-form-group">
                         <label>状态:</label>

+ 1 - 1
health-admin/src/main/resources/templates/gxhpz/drugconfigList.html

@@ -182,7 +182,7 @@
     });
 
     $("#button-open-2").click(function(){
-        $.modal.open('新增患者管理品', prefix + "/add", '900', '900');
+        $.modal.open('新增患者管理品', prefix + "/add", '980', '920');
     })
     function queryArchivesList() {
         var options = {

+ 10 - 10
health-admin/src/main/resources/templates/spgl/SPProductAdd.html

@@ -202,7 +202,7 @@
                         <!-- 进口/国产商品 -->
                         <div class="customize-form-group edit">
                             <label>进口/国产商品:</label>
-                            <select name="import_export_status" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}" >
+                            <select name="import_export_status" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" >
                                 <option value="">--  是(进口) / 否(国产)请选择  --</option>
                                 <option th:each="dict : ${type}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -247,7 +247,7 @@
                         <!-- DTP商品标识 -->
                         <div class="customize-form-group edit">
                             <label>DTP商品标识:</label>
-                            <select name="dtp_flag" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}" >
+                            <select name="dtp_flag" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" >
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -420,7 +420,7 @@
                     <form class="customize-search-form" id="form-server-edit12" >
                         <div class="customize-form-group edit">
                             <label>是否医保药品:</label>
-                            <select name="is_insurance_drug" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}">
+                            <select name="is_insurance_drug" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -441,7 +441,7 @@
 
                         <div class="customize-form-group edit">
                             <label class="is-required">是否凭处方销售:</label>
-                            <select name="prescription_required" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}" required>
+                            <select name="prescription_required" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" required>
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -450,7 +450,7 @@
 
                         <div class="customize-form-group edit">
                             <label>禁止请货:</label>
-                            <select name="prohibit_ordering" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}">
+                            <select name="prohibit_ordering" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -471,7 +471,7 @@
 
                         <div class="customize-form-group edit">
                             <label class="is-required">登记品:</label>
-                            <select name="registered_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}" required>
+                            <select name="registered_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" required>
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -480,7 +480,7 @@
 
                         <div class="customize-form-group edit">
                             <label class="is-required">随访品:</label>
-                            <select name="follow_up_item" id="follow_up_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}" required>
+                            <select name="follow_up_item" id="follow_up_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" required>
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -489,7 +489,7 @@
 
                         <div class="customize-form-group edit">
                             <label class="is-required">冷链品:</label>
-                            <select name="cold_chain_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}" required>
+                            <select name="cold_chain_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" required>
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -498,7 +498,7 @@
 
                         <div class="customize-form-group edit">
                             <label class="is-required">流向品:</label>
-                            <select name="flow_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}" required>
+                            <select name="flow_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}" required>
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -507,7 +507,7 @@
 
                         <div class="customize-form-group edit">
                             <label>慈善援助品:</label>
-                            <select name="charity_aid_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}">
+                            <select name="charity_aid_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
                             </select>

+ 5 - 5
health-admin/src/main/resources/templates/spgl/SPProductEdit.html

@@ -485,7 +485,7 @@
                         <!-- 登记品 -->
                         <div class="customize-form-group edit">
                             <label class="is-required">登记品:</label>
-                            <select name="registered_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}">
+                            <select name="registered_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:selected="${dict.dictValue}==${registered_item}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -495,7 +495,7 @@
                         <!-- 随访品 -->
                         <div class="customize-form-group edit">
                             <label class="is-required">随访品:</label>
-                            <select name="follow_up_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}">
+                            <select name="follow_up_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:selected="${dict.dictValue}==${follow_up_item}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -505,7 +505,7 @@
                         <!-- 冷链品 -->
                         <div class="customize-form-group edit">
                             <label class="is-required">冷链品:</label>
-                            <select name="cold_chain_item" class="styled-input edit_inputs"  th:with="type=${@dict.getType('sys_select_yes_no')}">
+                            <select name="cold_chain_item" class="styled-input edit_inputs"  th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:selected="${dict.dictValue}==${cold_chain_item}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -515,7 +515,7 @@
                         <!-- 流向品 -->
                         <div class="customize-form-group edit">
                             <label class="is-required">流向品:</label>
-                            <select name="flow_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}">
+                            <select name="flow_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:selected="${dict.dictValue}==${flow_item}" th:text="${dict.dictLabel}"></option>
                             </select>
@@ -525,7 +525,7 @@
                         <!-- 慈善援助品 -->
                         <div class="customize-form-group edit">
                             <label>慈善援助品:</label>
-                            <select name="charity_aid_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_yes_no')}">
+                            <select name="charity_aid_item" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_gxhpz_yes_no')}">
                                 <option value="">请选择</option>
                                 <option th:each="dict : ${type}" th:value="${dict.dictValue}" th:selected="${dict.dictValue}==${charity_aid_item}" th:text="${dict.dictLabel}"></option>
                             </select>

+ 27 - 9
health-system/src/main/java/com/bzd/system/service/DTPService.java

@@ -188,7 +188,7 @@ public class DTPService {
                 returnPageData.put("salesOrderNumber", salesOrderNumber);
                 return returnPageData;
             }else {
-                returnPageData.put("msg", "添加败");
+                returnPageData.put("msg", "添加败");
                 returnPageData.put("code", 300);
                 return returnPageData;
             }
@@ -551,6 +551,11 @@ public class DTPService {
     public PageData saveCFDJ(final PageData pd) throws Exception {
         PageData returnPageData = new PageData();
         Object drugList = pd.get("drugData");//获取药品信息列表
+        String reviewStatus= (String) pd.get("reviewStatus");//审核状态
+        String reviewingName= (String) pd.get("reviewingName");//审核人
+        String registerPharmacistName= (String) pd.get("registerPharmacistName");//登记药师
+
+        String remarks= (String) pd.get("remarks");//审核备注
         Integer drugsLinkId = IdUtils.get10randomNumber();//生成处方与药品关联的编号
         Integer prescriptionNumber = IdUtils.get10randomNumber();//生成处方单号
         String patientId=null;
@@ -637,15 +642,17 @@ public class DTPService {
             pd.put("registrationDate", DateUtils.getTime());
             pd.put("drugQuantity", drugQuantity);
 
-            if(StringUtils.isNotEmpty(pd.get("reviewStatus").toString())){
-                pd.put("reviewStatus", 1);
-            }
-            if(StringUtils.isNotEmpty(pd.get("reviewingName").toString())){
-                pd.put("reviewingName", "系统");
+            if (StringUtils.isNull(reviewingName) && StringUtils.isEmpty(reviewStatus)){
+                pd.put("reviewingName", "系统默认");
+                pd.put("reviewStatus", 1);//处方审核状态:0:审核不通过;1:审核通过;2: 待审核;默认 1: "审核通过";
             }
-            if(StringUtils.isNotEmpty(pd.get("remarks").toString())){
+            if(StringUtils.isEmpty(remarks)){
                 pd.put("remarks", "系统审核");
             }
+            if(StringUtils.isEmpty(registerPharmacistName)){
+                pd.put("registerPharmacistName", getSysUser().getLoginName());
+            }
+
             String registrant = (String) pd.get("registrant");
             if(StringUtils.isEmpty(registrant)){
                 pd.put("registrant", getSysUser().getLoginName());
@@ -675,6 +682,10 @@ public class DTPService {
     public int updateCFDJ(final PageData pd) throws Exception {
         PageData pd3=new PageData();
         try {
+            String reviewStatus= (String) pd.get("reviewStatus");//审核状态
+            String reviewingName= (String) pd.get("reviewingName");//审核人
+            String remarks= (String) pd.get("remarks");//审核备注
+            String registerPharmacistName= (String) pd.get("registerPharmacistName");//登记药师
             String patientId=null;
             String patientIdif = (String) pd.get("patientId");
             if(StringUtils.isNotEmpty(patientIdif)){
@@ -790,11 +801,18 @@ public class DTPService {
                 }
                 pd.put("drugQuantity", drugQuantity);
 
-            if (StringUtils.isNull(pd.get("reviewingName")) && StringUtils.isNull(pd.get("reviewStatus"))){
+            if (StringUtils.isNull(reviewingName) && StringUtils.isEmpty(reviewStatus)){
                 pd.put("reviewingName", "系统默认");
                 pd.put("reviewStatus", 1);//处方审核状态:0:审核不通过;1:审核通过;2: 待审核;默认 1: "审核通过";
             }
-                // 患者信息
+            if(StringUtils.isEmpty(remarks)){
+                pd.put("remarks", "系统审核");
+            }
+            if(StringUtils.isEmpty(registerPharmacistName)){
+                pd.put("registerPharmacistName", getSysUser().getLoginName());
+            }
+
+            // 患者信息
                 if (StringUtils.isNotNull(pd.get("gender"))){
                     String gender = pd.get("gender").toString();
                     if (gender.equals("男")){

+ 1 - 1
health-system/src/main/resources/mapper/mdyy/DTPCFDJMapper.xml

@@ -319,7 +319,7 @@
             <if test="status != null  and status != ''">
                 status,
             </if>
-            <if test="reviewStatus != null  and reviewStatus != ''">
+            <if test="reviewStatus != null">
                 reviewStatus,
             </if>
             <if test="prescriptionType != null  and prescriptionType != ''">

+ 15 - 2
health-system/src/main/resources/mapper/pmServiceMapper/PharmaceuticalServiceMapper.xml

@@ -79,6 +79,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		    h.archiveCreator,
 		    h.archiveCompleter,
 		    h.creator,
+		    h.dl,
+		    h.xl,
+		    h.timeFirstDiagnosis,
+            h.addr,
+            h.contactPhone,
+            h.contactName,
+
 		    h.followUpPerson,
 		    h.followUpStatus,
 		    h.acceptFollowUp,
@@ -603,8 +610,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="taskTheme != null and taskTheme != ''">
 			and taskTheme=#{taskTheme}
 		</if>
-		<if test="patientName != null and patientName != ''">
-			and patientName=#{patientName}
+		<if test="query != null and query != ''">
+			AND (patientName LIKE CONCAT('%', #{query}, '%')
+			OR patientId = #{query})
 		</if>
 		<if test="gender != null and gender != ''">
 			and gender=#{gender}
@@ -627,6 +635,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="productName != null and productName != ''">
 			and productName=#{productName}
 		</if>
+		<if test="product != null and product != ''">
+			AND (productName LIKE CONCAT('%', #{product}, '%')
+			OR  genericName LIKE CONCAT('%', #{product}, '%'))
+		</if>
+
 		<if test="taskFollower != null and taskFollower != ''">
 			and taskFollower=#{taskFollower}
 		</if>