瀏覽代碼

处方回写处方分处方

hurugang 3 年之前
父節點
當前提交
cd095ff7fa

+ 1 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -1797,7 +1797,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                                 .append("用法:").append(detailMap.get("supplyName") == null ? "" : detailMap.get("supplyName"))
                                 .append(" ")
                                 .append(detailMap.get("drugQuan") == null ? "" : detailMap.get("drugQuan"))
-                                .append(detailMap.get("packUnit"))
+                                .append(detailMap.get("unitDesc"))
                                 .append(" 频次: ")
                                 .append(detailMap.get("frequency") == null ? "" : detailMap.get("frequency")).append(" ").append(detailMap.get("orderDays") == null ? "" : detailMap.get("orderDays")).append("天</br>");
                     }

+ 19 - 18
src/main/resources/static/js/mz/clinic.js

@@ -473,7 +473,7 @@ $(function () {
                         var tableData = $("#tb_table_western_medicine").bootstrapTable('getData');
                         if (tableData != null && tableData.length > 0 && dataIndex != null) {
                             var trData = tableData[dataIndex];
-                            checkYpInfo(trData.code, trData.serial, trData.ypType, true);
+                            checkYpInfo(trData.code, trData.serial, trData.ypType, true,null);
                             $("#western_medicine_name").click();
                         }
                     } else {
@@ -2489,7 +2489,7 @@ function editPrescription(jsonData, type) {
                 $("#groupId").selectpicker('val', groupOrder);
                 $('#groupId').selectpicker('refresh');
 
-                checkYpInfo(code, serial, groupNo, false);
+                checkYpInfo(code, serial, groupNo, false,mzChargeDetail.orderNo);
                 // 给药方式 同组药品给药方式相同
                 $("#supplyType").selectpicker('val', mzChargeDetail.supplyCode);
                 $('#supplyType').selectpicker('refresh');
@@ -4438,18 +4438,6 @@ function calculateTotalAmount() {
                         $(arrs[i]).html(res.data.amountList[i].toFixed(1));
                     }
                 }
-                // var arrs = $("#xyTabContent").find("span.cf_amount");
-                // for (var i = 0; i < arrs.length; i++) {
-                //     $(arrs[i]).html(res.data.xyAmount.toFixed(1));
-                // }
-                // $("#zyTabContent").find("span.cf_amount").html(res.data.zyAmount.toFixed(1));
-                // if (res.data.yjAmount != null) {
-                //     //如果
-                //     if ($("#zlTab").find("li") == null || $("#zlTab").find("li").length == 0) {
-                //         initNavTabs(2);
-                //     }
-                //     $("#zlTabContent").find("span.cf_amount").html(res.data.yjAmount.toFixed(1));
-                // }
             } else {
                 errorMesage(res);
             }
@@ -5510,7 +5498,7 @@ function loadYpList(index, event) {
         onClickRow: function (row, $element) {
             $('#' + MedicineName).webuiPopover('hide');
             if (index == 0) {
-                checkYpInfo(row.code, row.serial, row.ypType, true);
+                checkYpInfo(row.code, row.serial, row.ypType, true,null);
             }
             if (index == 1) {
                 checkZyInfo(row.code, row.serial, true);
@@ -5526,8 +5514,9 @@ function loadYpList(index, event) {
  * @param serial
  * @param groupNo
  * @param needNotice 是否需要提示 当用户操作的时候 true 需要提示, 范文和处方回写的时候false不需要提示
+ * @param orderNo 处方号,回写的时候需要用,因为有的处方没有满5个
  */
-function checkYpInfo(code, serial, groupNo, needNotice) {
+function checkYpInfo(code, serial, groupNo, needNotice,orderNo) {
     //判断是否有重复的项目  返回true 说明有重复的
     if (verifyRepeat(code, serial, null, 0)) {
         return;
@@ -5630,8 +5619,20 @@ function checkYpInfo(code, serial, groupNo, needNotice) {
                         }
                         //当前编辑的处方非普通西药处方
                     } else {
-                        $("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
-                        fitWesternMedicine(res, groupNo);
+                        //修改药品
+                        if(orderNo!=null){
+                            //西药处方数量
+                            var xyTabLiLength=$("#xyTab li").length;
+                            if(xyTabLiLength<orderNo){
+                                refreshNavTabs(0, groupNo);
+                            }else {
+                                $("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
+                            }
+                            fitWesternMedicine(res, groupNo);
+                        }else {
+                            $("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
+                            fitWesternMedicine(res, groupNo);
+                        }
                     }
                     // if (needNotice) {
                     //     //选中药品后,光标默认到用法