Browse Source

门诊医生系统改造

hurugang 4 years ago
parent
commit
9bfdfc31c0

+ 33 - 0
src/main/java/cn/hnthyy/thmz/controller/CommonController.java

@@ -4,6 +4,7 @@ import cn.hnthyy.thmz.comment.UserLoginToken;
 import cn.hnthyy.thmz.entity.his.mz.MzZyReq;
 import cn.hnthyy.thmz.enums.ClassCodeEnum;
 import cn.hnthyy.thmz.enums.OrderFrequencyEnum;
+import cn.hnthyy.thmz.enums.SupplyTypeEnum;
 import cn.hnthyy.thmz.service.his.mz.*;
 import cn.hnthyy.thmz.service.his.zd.ZdChargeItemService;
 import cn.hnthyy.thmz.service.his.zd.ZdMaritalStatusService;
@@ -476,4 +477,36 @@ public class CommonController {
             return resultMap;
         }
     }
+
+
+
+    /**
+     * 查询所有给药方式
+     *
+     * @return
+     */
+    @UserLoginToken
+    @RequestMapping(value = "/getSupplyTypes", method = {RequestMethod.GET})
+    public Map<String, Object> getSupplyTypes() {
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            resultMap.put("code", 0);
+            resultMap.put("message", "查询所有给药方式成功");
+            List<Map<String, Object>> data = new ArrayList<>();
+            Arrays.stream(SupplyTypeEnum.values()).forEach(supplyTypeEnum -> {
+                Map<String, Object> temp = new HashMap<>();
+                temp.put("code", supplyTypeEnum.code);
+                temp.put("name", supplyTypeEnum.name);
+                data.add(temp);
+            });
+            resultMap.put("data", data);
+            return resultMap;
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("查询所有给药方式失败,错误信息{}", e.getMessage());
+            resultMap.put("code", -1);
+            resultMap.put("message", "查询所有给药方式失败");
+            return resultMap;
+        }
+    }
 }

+ 3 - 4
src/main/java/cn/hnthyy/thmz/controller/mz/WindowsController.java

@@ -1,6 +1,5 @@
 package cn.hnthyy.thmz.controller.mz;
 
-import cn.hnthyy.thmz.Utils.HttpUtil;
 import cn.hnthyy.thmz.Utils.JsonUtil;
 import cn.hnthyy.thmz.Utils.MacAddressUtil;
 import cn.hnthyy.thmz.Utils.TokenUtil;
@@ -122,11 +121,11 @@ public class WindowsController {
         DecodedJWT decodedJWT=TokenUtil.parseJWT(token);
         User tokenUser=(User)JsonUtil.jsontoObject(decodedJWT.getSubject(),User.class);
         try {
-            String ipAddress=MacAddressUtil.getIpAddr(httpServletRequest);
-            windows.setIpAddress(ipAddress);
+//            String ipAddress=MacAddressUtil.getIpAddr(httpServletRequest);
+//            windows.setIpAddress(ipAddress);
             windows.setUserIdCode(tokenUser.getUserIdCode());
             windows.setCreateDate(new Date());
-            Windows windowsDb=windowsService.queryLastWindowsByUserIdCode(tokenUser.getUserIdCode(),ipAddress);
+            Windows windowsDb=windowsService.queryLastWindowsByUserIdCode(tokenUser.getUserIdCode(),null);
             if(windowsDb!=null){
                 windows.setId(windowsDb.getId());
             }

+ 151 - 0
src/main/java/cn/hnthyy/thmz/enums/SupplyTypeEnum.java

@@ -0,0 +1,151 @@
+package cn.hnthyy.thmz.enums;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 给药方式枚举
+ */
+public enum SupplyTypeEnum {
+    KF("001","口服"),
+    JZ("002","肌注"),
+    JMZSBZ20("003","静脉注射"),
+    TWSJMZS("155","弹丸式静脉注射"),
+    JMSY("005","静脉输液"),
+    //XEJMSYY6("006","小儿静脉输液(6岁以下儿童)"),
+    PS("007","皮试"),
+    PXZS("008","皮下注射"),
+    PNZS("009","皮内注射"),
+    XETPJMSY("011","小儿头皮静脉输液"),
+    QNZS("014","鞘内注射"),
+    QJMXZS("015","球结膜下注射"),
+    TDZS("016","痛点注射"),
+    GJZS("017","宫颈注射"),
+    TMZS("018","脱敏注射"),
+    QJMZS("020","脐静脉注射"),
+    XWZS("021","穴位注射"),
+    XQNZS("022","胸腔内注射"),
+    XNZS("023","心内注射"),
+    QHZS("024","球后注射"),
+    PGGZ("028","膀胱灌注"),
+    PGCX("029","膀胱冲洗"),
+    YDGZ("030","阴道灌注"),
+    ZY("038","坐浴"),
+    CG("039","冲管"),
+    HYMX("040","会阴抹洗"),
+    WHXR("041","雾化吸入"),
+    CSWH("042","超声雾化"),
+    WY("043","外用"),
+    FY("044","副药"),
+    CYDY("045","出院带药"),
+    PY("047","喷用"),
+    JM("049","局麻"),
+    SG("050","塞肛"),
+    SXHF("051","舌下含服"),
+    CTY("052","CT用"),
+    ZQGJY("053","支气管镜用"),
+    SKY("054","漱口用"),
+    LY("055","领药"),
+    ASMFHZYZ("056","按说明服(或遵医嘱)"),
+    WGBS("057","胃管鼻饲"),
+    CCY("059","穿刺用"),
+    DYY("060","滴眼用"),
+    ZYY("061","造影用"),
+    GCY("062","灌肠用"),
+    CXY("063","冲洗用"),
+    TXY("064","透析用"),
+    SRF("065","湿热敷"),
+    GQZS("067","宫腔注射"),
+    TYK("068","退药(款)"),
+    DEY("069","滴耳用"),
+    DBY("070","滴鼻用"),
+    SXFY("071","舌下服用"),
+    WT("072","外贴"),
+    XWY("073","洗胃用"),
+    XTY("074","吸痰用"),
+    XYY("075","吸氧用"),
+    FQGZ("076","腹腔灌注"),
+    SX("078","输血"),
+    SZY("082","术中用"),
+    JF("084","嚼服"),
+    JBFB("085","局部封闭"),
+    XY ("090","吸氧"),
+    XDJH("091","心电监护"),
+    KQHL("093","口腔护理"),
+    JZSZ("101","肌注(术中)"),
+    SYSZ("102","输液(术中)"),
+    SXSZ("103","输血(术中)"),
+    PXZZ("104","皮下自注"),
+    JMZS("105","静注"),
+    JF107("107","煎服"),
+    GJQZS("111","关节腔注射"),
+    DH("112","带回"),
+    XWZS113("113","穴位注射"),
+    CXPGCX("116","持续膀胱冲洗"),
+    GC("117","灌肠"),
+    QJGC("118","清洁灌肠"),
+    ZQWHXR("119","蒸汽雾化吸入"),
+    YLGCX("120","引流管冲洗"),
+    JMCX("121","静脉采血"),
+    CXGJCX("123","持续关节冲洗"),
+    CXHYY("124","拆线换药用"),
+    ZYZY("125","遵医嘱用"),
+    JYLGZY("126","经引流管注药"),
+    XSEQJMTZ("127","新生儿脐静脉推注或注射"),
+    CQLGY("128","侧穹窿给药"),
+    FY129("129","副药"),
+    ZYYJFYGB("130","坐浴(仅发药给病人)"),
+    MZJMSY("131","门诊静脉输液"),
+    PSSBHFYY("139","皮试(不含费用)"),
+    PNZSBHFY("143","皮内注射(不含费用)"),
+    MZJMSYYM("144","门诊静脉输液(免费)"),
+    WHXRMF("195","雾化吸入(免费)"),
+    YHWH("148","氧化雾化"),
+    TYJY("149","涂眼睑用"),
+    XRYFJ("150","吸入用(粉剂)"),
+    YDGY("151","阴道给药"),
+    JMZSBHFY("152","静脉注射(不含费用)"),
+    TMZSMF("153","脱敏注射(免费)"),
+    JMMMFF("154","局麻(免费)"),
+    JBZS("156","局部注射"),
+    DDYL("157","胆道引流"),
+    DDYLLFYY("158","胆道引流(副药)"),
+//    GYBWHXRR("160","高压泵雾化吸入(7岁以下儿童)"),
+//    JRZSS7SY("162","肌肉注射(7岁以下儿童)"),
+    GYBWHXR("159","高压泵雾化吸入"),
+    JMSX("114","静脉输血"),
+    BYSY("115","必要时用"),
+    YDGZZZDD("140","阴道灌注(自带)"),
+    JMSYBHFY("141","静脉输液(不含费用)"),
+    JZBHFY("142","肌注(不含费用)"),
+    DJ("145","代煎"),
+    DJJYSS("146","代煎(延时)"),
+    DJJMFF("147","代煎(免费)");
+//    PXZS7SYX("163","皮下注射-7岁以下儿童"),
+//    PNZS7SYX("164","皮内注射-7岁以下儿童"),
+//    JMCX7SYX ("165","静脉采血-7岁以下儿童"),
+//    JMCX7SYX("166","静脉采血-7岁以下儿童");
+
+    public String code;
+    public String name;
+
+    SupplyTypeEnum(String code, String name){
+        this.code=code;
+        this.name=name;
+    }
+
+    /**
+     * 根据编码查询对应的类型
+     * @param code
+     * @return
+     */
+    public static SupplyTypeEnum getSupplyTypeByCode(String code){
+        List<SupplyTypeEnum> gongnksEnums= Arrays.asList(values());
+        for (SupplyTypeEnum gongnksEnum:gongnksEnums){
+            if(gongnksEnum.code.equals(code)){
+                return gongnksEnum;
+            }
+        }
+        return SupplyTypeEnum.KF;
+    }
+}

+ 3 - 3
src/main/java/cn/hnthyy/thmz/mapper/his/YpZdDictMapper.java

@@ -13,7 +13,7 @@ public interface YpZdDictMapper {
      * @param code
      * @return
      */
-    @Select("select code,name,specification,mz_restrict,bill_item_mz,pack_retprice,country_flag,supply_type,pack_unit,weight,volum,weigh_unit,vol_unit,pack_size,manu_code from yp_zd_dict where code = #{code,jdbcType=VARCHAR} and serial = #{serial}")
+    @Select("select code,name,specification,mz_restrict,bill_item_mz,pack_retprice,country_flag,supply_type,pack_unit,weight,volum,weigh_unit,vol_unit,pack_size,manu_code,frequency from yp_zd_dict where code = #{code,jdbcType=VARCHAR} and serial = #{serial}")
     YpZdDict selectYpZdDictByCodeAndSerial(@Param("code") String code,@Param("serial") String serial);
 
     /**
@@ -23,7 +23,7 @@ public interface YpZdDictMapper {
      * @return
      */
     @Select({"<script>",
-            "select code,name,specification,mz_restrict,bill_item_mz,pack_retprice,country_flag,supply_type,pack_unit,weight,volum,weigh_unit,vol_unit,pack_size,manu_code from yp_zd_dict",
+            "select code,name,specification,mz_restrict,bill_item_mz,pack_retprice,country_flag,supply_type,pack_unit,weight,volum,weigh_unit,vol_unit,pack_size,manu_code,frequency from yp_zd_dict",
             "<when test='codes!=null'>",
             " where code in",
             "<foreach item='item' index='index' collection='codes' open='(' separator=',' close=')'>",
@@ -41,6 +41,6 @@ public interface YpZdDictMapper {
      * @param code
      * @return
      */
-    @Select("select code,name,specification,mz_restrict,bill_item_mz,pack_retprice,country_flag,supply_type,pack_unit,weight,volum,weigh_unit,vol_unit,pack_size,manu_code from yp_zd_dict where code = #{code,jdbcType=VARCHAR} ")
+    @Select("select code,name,specification,mz_restrict,bill_item_mz,pack_retprice,country_flag,supply_type,pack_unit,weight,volum,weigh_unit,vol_unit,pack_size,manu_code,frequency from yp_zd_dict where code = #{code,jdbcType=VARCHAR} ")
     List<YpZdDict> selectYpZdDictByCode(@Param("code") String code);
 }

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

@@ -20,7 +20,7 @@ public class YpZdDictServiceImpl implements YpZdDictService {
             return ypZdDict;
         }
         ypZdDict.setWeighUnitDesc(UnitTypeEnum.getUnitTypeByCode(ypZdDict.getWeighUnit()).name);
-        ypZdDict.setVolUnitDesc(UnitTypeEnum.getUnitTypeByCode(ypZdDict.getVolUnitDesc()).name);
+        ypZdDict.setVolUnitDesc(UnitTypeEnum.getUnitTypeByCode(ypZdDict.getVolUnit()).name);
         ypZdDict.setPackUnitDesc(UnitTypeEnum.getUnitTypeByCode(ypZdDict.getPackUnit()).name);
         return ypZdDict;
     }

+ 1 - 1
src/main/resources/static/js/common/socket-com.js

@@ -71,7 +71,7 @@ function dispensingMessage(data) {
             initTable();
         }
         if ($("#aotuPrint").is(':checked')) {//自动打印
-            for (let i = 0; i < data.orderNos.length; i++) {
+            for (var i = 0; i < data.orderNos.length; i++) {
                 printPrescription(data.patient_id, data.times,data.orderNos[i]);
             }
         }

+ 61 - 0
src/main/resources/static/js/common/string-util.js

@@ -72,3 +72,64 @@ function isChinese(val) {
 
 
 
+/*检测次数 --》自动添加*/
+var needToAddJccs="";
+/*阿拉伯数字  转  汉字   */
+var chnNumChar = ["零","一","二","三","四","五","六","七","八","九"];
+var chnUnitSection = ["","万","亿","万亿","亿亿"];
+var chnUnitChar = ["","十","百","千"];
+// 节内转换算法
+function SectionToChinese(section){
+    var strIns = '', chnStr = '';
+    var unitPos = 0;
+    var zero = true;
+    while(section > 0){
+        var v = section % 10;
+        if(v === 0){
+            if(!zero){
+                zero = true;
+                chnStr = chnNumChar[v] + chnStr;
+            }
+        }else{
+            zero = false;
+            strIns = chnNumChar[v];
+            strIns += chnUnitChar[unitPos];
+            chnStr = strIns + chnStr;
+        }
+        unitPos++;
+        section = Math.floor(section / 10);
+    }
+    return chnStr;
+}
+// 转换算法主函数
+function numToChineseNum(num){
+    var unitPos = 0;
+    var strIns = '', chnStr = '';
+    var needZero = false;
+
+    if(num === 0){
+        return chnNumChar[0];
+    }
+    while(num > 0){
+        var section = num % 10000;
+        if(needZero){
+            chnStr = chnNumChar[0] + chnStr;
+        }
+        strIns = SectionToChinese(section);
+        strIns += (section !== 0) ? chnUnitSection[unitPos] : chnUnitSection[0];
+        chnStr = strIns + chnStr;
+        needZero = (section < 1000) && (section > 0);
+        num = Math.floor(num / 10000);
+        unitPos++;
+    }
+    if(chnStr=="一十一"||chnStr=="一十二"||chnStr=="一十三"||chnStr=="一十四"||chnStr=="一十五"||chnStr=="一十六"||chnStr=="一十七"||chnStr=="一十八"||chnStr=="一十九"){
+        chnStr=chnStr.substring(1,3);
+    }
+    if(chnStr=="一十"){
+        chnStr="十";
+    }
+    if(chnStr!=null && chnStr!=''){
+        chnStr="第"+chnStr+"次";
+    }
+    return chnStr;
+}

+ 351 - 72
src/main/resources/static/js/mz/clinic.js

@@ -3,7 +3,55 @@
 var msg_list_loading = false;
 //挂号卡片列表页面下标
 var pageIndex = 0;
+var nthTabs=null;
 $(function () {
+    // nthTabs = $("#ypListTables").nthTabs();
+    //
+    // nthTabs.addTab({
+    //     id:'a',
+    //     title:'孙悟空',
+    //     content:'看我七十二变',
+    // }).addTab({
+    //     /*换个姿势*/
+    //     id:'b',
+    //     title:'猪八戒-关不掉',
+    //     content:'高老庄娶媳妇',
+    //     active:true,
+    //     allowClose:false,
+    // }).addTab({
+    //     id:'c',
+    //     title:'沙和尚',
+    //     content:'请叫我大叔',
+    // }).addTab({
+    //     id:'d',
+    //     title:'唐僧',
+    //     content:'光头一个',
+    // }).addTab({
+    //     id:'e',
+    //     title:'武松',
+    //     content:'打虎猛汉',
+    // }).addTab({
+    //     id:'f',
+    //     title:'潘金莲',
+    //     content:'求爱爱',
+    // }).addTab({
+    //     id:'g',
+    //     title:'来个标题长一点的的的来个标题长一点的的的',
+    //     content:'你赢了',
+    // }).addTab({
+    //     id:'h',
+    //     title:'支持连贯操作',
+    //     content:'没错就是这么爽',
+    // }).addTab({
+    //     id:'i',
+    //     title:'欢迎提意见',
+    //     content:'一定一定',
+    // }).addTab({
+    //     id:'j',
+    //     title:'熬夜写的啊',
+    //     content:'码农苦逼~',
+    // }).setActTab("#c");
+
     initGenderSelect();
     initResponceTypeSelect();
     $('#editUserBirthDayGroup').datetimepicker({
@@ -22,6 +70,8 @@ $(function () {
     initMzWorkTime();
     //初始频次下拉选
     initOrderFrequencys();
+    //初始用药方式下拉选
+    initSupplyTypes();
 
     /**
      * 清空
@@ -94,8 +144,7 @@ $(function () {
             b.toggleClass("fa-chevron-up fa-chevron-down")
     });
 
-    initSmartWizard("wizard0");
-    $(".actionBar").append("<div style='float: left'>金额:<span id='amount0'>61.92元</span></div>");
+
 
 
     /**
@@ -120,6 +169,28 @@ $(function () {
     initGroupOrder();
     // 初始化用药天数下拉选
     initDayNum();
+
+
+    /**
+     * 给药方式设置最高的下拉选高度
+     */
+    $("#supplyType").on('shown.bs.select', function (e) {
+        $("#supplyType").siblings('.dropdown-menu').css("max-height", "360px");
+        $('#supplyType').parent().find("input").keydown(function () {
+            $("#supplyType").siblings.css("max-height", "360px");
+        })
+    });
+    /**
+     * 用药频率设置最高的下拉选高度
+     */
+    $("#orderFrequency").on('shown.bs.select', function (e) {
+        $("#orderFrequency").siblings('.dropdown-menu').css("max-height", "360px");
+        $('#orderFrequency').parent().find("input").keydown(function () {
+            $("#orderFrequency").siblings('.dropdown-menu').css("max-height", "360px");
+        })
+    });
+
+
 });
 
 /**
@@ -959,8 +1030,8 @@ function fitAppeal(appeal, paramsType) {
         text = "诊断项已经录入,是否覆盖?";
     }
     var symptom = $("#" + inputId).val();
-    if(paramsType == 13 && (symptom==",," || symptom==",")){
-        symptom=null;
+    if (paramsType == 13 && (symptom == ",," || symptom == ",")) {
+        symptom = null;
     }
     if (symptom != null && symptom != "") {
         $("#messageModal").modal();
@@ -978,27 +1049,7 @@ function fitAppeal(appeal, paramsType) {
     }
 }
 
-/**
- * 实例化处方分页
- * @param id
- */
-function initSmartWizard(id) {
-    if (typeof ($.fn.smartWizard) === 'undefined') {
-        return;
-    }
-    console.log('init_SmartWizard');
-    $('#' + id).smartWizard();
-    $('.buttonNext').addClass('btn btn-success');
-    $('.buttonPrevious').addClass('btn btn-primary');
-    $('.buttonFinish').addClass('btn btn-default');
-    $(".stepContainer").css("height", "270px");
-    $(".buttonFinish").css("display", "none");
-    $(".buttonNext").html("下一个");
-    $(".buttonPrevious").html("上一个");
-    //动态设置微元素的高度
-    $('<style>#' + id + ' a:before{top:10px; } </style>').appendTo('head')//这里写body也可以
-    //$('<style> #wizard0 a:before,#wizard1 a:before,#wizard2 a:before{top:10px; } </style>').appendTo('head')//这里写body也可以
-};
+
 
 /**
  * 初始化性别下拉选
@@ -1241,7 +1292,7 @@ function initOrderFrequencys() {
             }
             var html = '';
             $.each(res.data, function (commentIndex, comment) {
-                html += '<option value="' + comment.code + '" desc="'+comment.times+'">' + comment.name + '</option>';
+                html += '<option value="' + comment.code + '" desc="' + comment.times + '">' + comment.name + '(' + comment.code + ')' + '</option>';
             });
             $('#orderFrequency').empty();
             $('#orderFrequency').html(html);
@@ -1251,6 +1302,31 @@ function initOrderFrequencys() {
 }
 
 
+/**
+ * 初始用药方式下拉选
+ */
+function initSupplyTypes() {
+    $.ajax({
+        type: "GET",
+        url: '/thmz/getSupplyTypes',
+        dataType: "json",
+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+        success: function (res) {
+            if (res == '401' || res == 401) {
+                window.location.href = '/thmz/login/view'
+                return;
+            }
+            var html = '';
+            $.each(res.data, function (commentIndex, comment) {
+                html += '<option value="' + comment.code + '">' + comment.name + '</option>';
+            });
+            $('#supplyType').empty();
+            $('#supplyType').html(html);
+            $('#supplyType').selectpicker('refresh');
+        }
+    });
+}
+
 /**
  * 日期值改变修改年龄字段
  * @param ev
@@ -1293,11 +1369,106 @@ function listTypeChange(object) {
 
 
 /**
- * 打开编辑挂号信息窗口
- * @param data
- */
-function editRegistration(data) {
-    $("#editRegiModal").modal();
+ * 保存当前药品到右边处方区域  西药
+ */
+function saveWesternMedicine() {
+    $("#xyTab").append('<li><a href="#test" role="tab" data-toggle="pill">test</a></li>');
+    $("#xyTabContent").append('<div class="tab-pane fade" id="test">规则内容面板sdfdfasdfasdfd</div>');
+    //组号
+    var groupId = $("#groupId").val();
+    //药品名称
+    var westernMedicineNamme = $("#western_medicine_namme").val();
+    //当前药品编码
+    var currentCode = $("#current_code").val();
+    //当前药品规格
+    var currentSerial = $("#current_serial").val();
+    //用法编码
+    var supplyType = $("#supplyType").val();
+    //用法描述
+    var supplyTypeText = $('#supplyType option:selected').text();
+    //药品默认单次使用剂量
+    var drugWinDb = $("#drugWinDb").val();
+    //处方实际单次使用剂量
+    var drugWin = $("#drugWin").val();
+    //剂量单位
+    var drugWinUnit = $("#drugWinUnit").val();
+    //天数
+    var dayNum = $("#dayNum").val();
+    //频次编码
+    var orderFrequency = $("#orderFrequency").val();
+    //频次描述
+    var orderFrequencyText = $('#orderFrequency option:selected').text();
+    //总量
+    var gross = $("#gross").val();
+    //包装单位
+    var packUnit = $("#packUnit").val();
+    //医嘱
+    var medicalAdvice = $("#medicalAdvice").val();
+    var html = '<div class="form-group">';
+    html += groupId + '.&nbsp;&nbsp;';
+    html += westernMedicineNamme + ' ';
+    html += drugWinDb + drugWinUnit + ' ';
+    html += drugWin + drugWinUnit + ' 共';
+    html += gross + packUnit + '<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
+    html += '用法:' + supplyTypeText + ' ';
+    html += '频次:' + orderFrequencyText + ' ';
+    html += dayNum + '天 ';
+    if (medicalAdvice != null && medicalAdvice != '') {
+        html += '医嘱:' + medicalAdvice;
+    }
+    html += ' <i class="fa fa-long-arrow-left" style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>';
+    html += '<i class="fa fa-remove" style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>';
+    html += '</div>';
+    $("div.rb_item_0").each(function () {
+        if ($(this).css("display") === "block") {
+            $(this).find("div:eq(1)").append(html);
+        }
+    });
+    var groupIdLast = $("#groupId option:last-child").text();
+    if (groupId === groupIdLast) {
+        appendGroupOrder();
+    }
+    //  clearWesternMedicine();
+}
+
+
+/**
+ * 清空西药
+ */
+function clearWesternMedicine() {
+    //药品名称
+    $("#western_medicine_namme").val(null);
+    //当前药品编码
+    $("#current_code").val(null);
+    //当前药品规格
+    $("#current_serial").val(null);
+    //用法编码
+    $("#supplyType").selectpicker('val', null);
+    $('#supplyType').selectpicker('refresh');
+    //药品默认单次使用剂量
+    $("#drugWinDb").val(null);
+    //处方实际单次使用剂量
+    $("#drugWin").val(null);
+    //剂量单位
+    $("#drugWinUnit").selectpicker('val', null);
+    $('#drugWinUnit').selectpicker('refresh');
+    //天数
+    $("#dayNum").selectpicker('val', null);
+    $('#dayNum').selectpicker('refresh');
+    //频次编码
+    $("#orderFrequency").selectpicker('val', null);
+    $('#orderFrequency').selectpicker('refresh');
+    //总量
+    $("#gross").val(null);
+    //包装单位
+    $("#packUnit").selectpicker('val', null);
+    $('#packUnit').selectpicker('refresh');
+    //单价
+    $("#packRetprice").val(null);
+    //金额
+    $("#totalRetprice").val(null);
+    //医嘱
+    $("#medicalAdvice").val(null);
 }
 
 
@@ -1343,17 +1514,9 @@ function billItemButtonChange(object, objectIndex) {
             $(element).removeClass("btn-primary").addClass("btn-default");
         }
         if (index == objectIndex) {
-            var id = "wizard" + index;
-            $("#" + id).removeClass("hide").addClass("show");
-            initSmartWizard(id);
-            var amountId = "amount" + index;
-            if ($("#" + amountId).length <= 0) {
-                $($(".actionBar")[index]).append("<div style='float: left'>金额:<span id='" + amountId + "'>61.92元</span></div>");
-            }
-            $("#rp_form" + index).removeClass("hide").addClass("show");
+
         } else {
-            $("#wizard" + index).removeClass("show").addClass("hide");
-            $("#rp_form" + index).removeClass("show").addClass("hide");
+
         }
     });
     $(object).removeClass("btn-default").addClass("btn-primary");
@@ -2178,7 +2341,7 @@ function loadYpList() {
                 valign: 'middle',
                 //  sortable: true
             }, {
-                field: 'packUnitDesc',
+                field: 'miniUnitName',
                 title: '单位',
                 align: "center",
                 valign: 'middle',
@@ -2230,7 +2393,7 @@ function loadYpList() {
         },
         onClickRow: function (row, $element) {
             $('#western_medicine_namme').webuiPopover('hide');
-            checkYpInfo(row.code,row.serial);
+            checkYpInfo(row.code, row.serial);
         }
     });
 }
@@ -2240,10 +2403,10 @@ function loadYpList() {
  * @param code
  * @param serial
  */
-function checkYpInfo(code,serial){
+function checkYpInfo(code, serial) {
     $.ajax({
         type: "GET",
-        url: '/thmz/getYpZdDictByCodeAndSerial?code='+code+"&serial="+serial,
+        url: '/thmz/getYpZdDictByCodeAndSerial?code=' + code + "&serial=" + serial,
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
@@ -2254,34 +2417,24 @@ function checkYpInfo(code,serial){
             }
             if (res.code == 0) {
                 if (res.data != null) {
-                    $("#western_medicine_namme").val(res.data.name);
-                    $("#western_medicine_namme").blur();
-                    var drugWinHtml ='';
-                    var index = null;
-                    if(res.data.weight!=null){
-                        var weightDesc = res.data.weight+res.data.weighUnitDesc;
-                        drugWinHtml='<option value="'+res.data.weight+'" desc="'+weightDesc+'">'+weightDesc+'</option>';
-                        index = res.data.weight;
-                    }
-                    if(res.data.volum!=null){
-                        var volumDesc = res.data.volum+res.data.volUnitDesc;
-                        drugWinHtml+='<option value="'+res.data.volum+'" desc="'+volumDesc+'">'+volumDesc+'</option>';
-                        if(index==null){
-                            index = res.data.volum;
+                    //每个处方不能超过5个药品
+                    $("div.rb_item_0").each(function () {
+                        if ($(this).css("display") === "block") {
+                            var stepId = $(this).attr("id");
+                            var childrens = $(this).find("div:eq(1)").children().length;
+                            if (childrens === 5) {
+                                $("#messageModal").modal();
+                                $("#messageContent").html("单张处方最多只能开具5个药品,是否需要新增处方?");
+                                $("#messageButton").on("click", function (t) {
+                                    $("#messageModal").modal("hide");
+                                    refreshWizard("wizard0", "wizard_steps-0", stepId, "rb_item_0");
+                                    fitWesternMedicine(res);
+                                });
+                            } else {
+                                fitWesternMedicine(res);
+                            }
                         }
-                    }
-                    $('#drugWin').html(drugWinHtml);
-                    $('#drugWin').selectpicker('refresh');
-                    $("#drugWin").selectpicker('val', index);
-                    $('#drugWin').selectpicker('refresh');
-                    if(res.data.packUnitDesc!=null && res.data.packUnitDesc!=""){
-                        var html='<option value="'+res.data.packUnitDesc+'" >'+res.data.packUnitDesc+'</option>';
-                        $('#packUnit').html(html);
-                        $('#packUnit').selectpicker('refresh');
-                        $("#packUnit").selectpicker('val', res.data.packUnitDesc);
-                        $('#packUnit').selectpicker('refresh');
-                    }
-
+                    });
                 }
             } else {
                 errorMesage(res);
@@ -2290,6 +2443,132 @@ function checkYpInfo(code,serial){
     });
 }
 
+/**
+ * 添加处方分页
+ * @param wizardId
+ * @param wizardStepId
+ * @param stepId
+ * @param rbItemClass
+ */
+function refreshWizard(wizardId, wizardStepId, stepId, rbItemClass) {
+    var index = parseInt(stepId.split("-")[1]);
+    index++;
+    var newStepId = "step-" + index;
+    var wizardStepHtml = '<li><a href="#' + newStepId + '"><span class="step_no" style="width: 20px;height: 20px;line-height: 20px;">' + index + '</span><span class="step_descr">';
+    wizardStepHtml += '<small>处方' + numToChineseNum(index) + '</small></span></a></li>';
+
+    var wizardHtml = '<div id="' + newStepId + '" class="rb_item ' + rbItemClass + '">';
+    wizardHtml += '                                    <form class="form-horizontal form-label-left">';
+    wizardHtml += '                                        <div class="form-group">';
+    wizardHtml += '                                            <img src="/thmz/images/prescription.png">';
+    wizardHtml += '                                        </div>';
+    wizardHtml += '                                        <div style="height: 200px;" class="wizard_content">';
+    wizardHtml += '                                        </div>';
+    wizardHtml += '                                    </form>';
+    wizardHtml += '                                </div>';
+    $("#" + wizardStepId).append(wizardStepHtml);
+    $("#" + wizardId).append(wizardHtml);
+    initSmartWizard(wizardId);
+}
+
+
+/**
+ * 填充西药选中的内容
+ */
+function fitWesternMedicine(res) {
+    $("#western_medicine_namme").val(res.data.name);
+    $("#western_medicine_namme").blur();
+    var drugWinHtml = '';
+    var index = null;
+    if (res.data.weight != null) {
+        $("#drugWin").val(res.data.weight);
+        $("#drugWinDb").val(res.data.weight);
+        drugWinHtml = '<option value="' + res.data.weighUnitDesc + '" desc="' + res.data.weight + '">' + res.data.weighUnitDesc + '</option>';
+        index = res.data.weighUnitDesc;
+    }
+    if (res.data.volum != null) {
+        if ($("#drugWin").val() == null || $("#drugWin").val() == '') {
+            $("#drugWin").val(res.data.volum);
+            $("#drugWinDb").val(res.data.volum);
+        }
+        drugWinHtml += '<option value="' + res.data.volUnitDesc + '" desc="' + res.data.volum + '">' + res.data.volUnitDesc + '</option>';
+        if (index == null) {
+            index = res.data.volUnitDesc;
+        }
+    }
+    $('#drugWinUnit').html(drugWinHtml);
+    $('#drugWinUnit').selectpicker('refresh');
+    $("#drugWinUnit").selectpicker('val', index);
+    $('#drugWinUnit').selectpicker('refresh');
+    if (res.data.packUnitDesc != null && res.data.packUnitDesc != "") {
+        var html = '<option value="' + res.data.packUnitDesc + '" >' + res.data.packUnitDesc + '</option>';
+        $('#packUnit').html(html);
+        $('#packUnit').selectpicker('refresh');
+        $("#packUnit").selectpicker('val', res.data.packUnitDesc);
+        $('#packUnit').selectpicker('refresh');
+    }
+    if (res.data.supplyType != null) {
+        $("#supplyType").selectpicker('val', res.data.supplyType);
+        $('#supplyType').selectpicker('refresh');
+    }
+    if (res.data.frequency != null) {
+        $("#orderFrequency").selectpicker('val', res.data.frequency);
+        $('#orderFrequency').selectpicker('refresh');
+    }
+    $("#packRetprice").val(res.data.packRetprice);
+    $("#packSize").val(res.data.packSize);
+    $("#current_code").val(res.data.code);
+    $("#current_serial").val(res.data.serial);
+}
+
+/**
+ * 剂量单位改变事件
+ */
+function drugWinUnitChange() {
+    var desc = $('#drugWinUnit').find("option:selected").attr('desc');
+    $("#drugWin").val(desc);
+    $("#drugWinDb").val(desc);
+    calculate();
+}
+
+/**
+ * 根据选择的内容计算总的用药量
+ */
+function calculate() {
+    //最小规格剂量
+    var drugWinDb = $("#drugWinDb").val();
+    //天数
+    var dayNum = $("#dayNum").val();
+    //当前使用的最小剂量
+    var drugWin = $("#drugWin").val();
+    //频率
+    var times = $('#orderFrequency').find("option:selected").attr('desc');
+    //包装规格数量
+    var packSize = $("#packSize").val();
+    //单价
+    var packRetprice = $("#packRetprice").val();
+    if (drugWinDb == null || drugWinDb === "") {
+        return;
+    }
+    if (dayNum == null || dayNum === "") {
+        return;
+    }
+    if (drugWin == null || drugWin === "") {
+        return;
+    }
+    if (times == null || times === "") {
+        return;
+    }
+    if (packSize == null || packSize === "") {
+        return;
+    }
+    //拆零总量
+    var scatteredTotalNum = Multiply(Multiply(dayNum, drugWin), times);
+    //整包装的数量
+    var totalNum = Division(scatteredTotalNum, Multiply(packSize, drugWinDb));
+    $("#gross").val(totalNum);
+    $("#totalRetprice").val(Multiply(totalNum, packRetprice));
+}
 
 function getByPatientId(patientId) {
     $.ajax({

+ 65 - 268
src/main/resources/templates/mz/clinic.html

@@ -10,6 +10,7 @@
 <script src="/thmz/js/dependent/jquery.webui-popover.min.js"></script>
 <script src="/thmz/js/dependent/jquery.smartWizard.js"></script>
 <script src="/thmz/js/dependent/validator.js"></script>
+<script src="/thmz/js/common/map-util.js"></script>
 <script src="/thmz/js/mz/clinic.js"></script>
 <title>就诊</title>
 <style>
@@ -406,6 +407,10 @@
                         </div>
                     </div>
                     <div class="item form-group">
+                        <!--当前选中药品规格-->
+                        <input id="current_serial" type="hidden"/>
+                        <!-- 当前选中药品编码-->
+                        <input id="current_code" type="hidden"/>
                         <div style="margin-top: 5px;width: 386px;float: left;" class="thmz_alert" id="rp_form0">
                             <form class="form-horizontal form-label-left mz-fixed-form" novalidate autocomplete="off">
                                 <div class="item form-group">
@@ -433,30 +438,39 @@
                                 </div>
                                 <div class="item form-group">
                                     <div style="width: 130px;float: left;">
-                                        <label class="my_label_2">剂量:</label>
+                                        <label class="my_label_2">用法:</label>
                                         <div style="width: 85px;float: left;">
                                             <select class="form-control selectpicker show-tick"
-                                                    title="请选择"
-                                                    id="drugWin">
+                                                    title="请选择" data-live-search="true"
+                                                    id="supplyType">
                                             </select>
                                         </div>
                                     </div>
                                     <div style="width: 256px;float: left;">
-                                        <label class="my_label">用法:</label>
-                                        <div class="form-group has-feedback" style="float: right;width: 190px;">
-                                            <input type="text" class="form-control has-feedback-left" id="symptom7"
-                                                   placeholder="请输入" style="padding-left: 10px;width: 95%">
-                                            <span class="fa fa-search form-control-feedback right"
-                                                  aria-hidden="true"></span>
+                                        <label class="my_label">剂量:</label>
+                                        <div style="float: left;width: 85px"><input type="text"
+                                                                                    class="form-control my_label_input_2"
+                                                                                    id="drugWin" onchange="calculate()">
+                                            <!--最小剂量-->
+                                            <input type="hidden" id="drugWinDb"/>
+                                            <!--包装数量-->
+                                            <input type="hidden" id="packSize"/>
+                                        </div>
+                                        <div style="width: 85px;float: left;margin-left: 13px;">
+                                            <select class="form-control selectpicker show-tick"
+                                                    title="请选择" onchange="drugWinUnitChange()"
+                                                    id="drugWinUnit">
+                                            </select>
                                         </div>
                                     </div>
                                 </div>
                                 <div class="item form-group">
                                     <div style="width: 130px;float: left;">
-                                        <label class="my_label_2">天数:</label>
+                                        <label class="my_label_2">天数<span
+                                                class="required">*</span>:</label>
                                         <div style="width: 85px;float: left;">
                                             <select class="form-control selectpicker show-tick"
-                                                    title="请选择"
+                                                    title="请选择" onchange="calculate()"
                                                     id="dayNum">
                                             </select>
                                         </div>
@@ -465,7 +479,7 @@
                                         <label class="my_label">频次:</label>
                                         <div style="width: 85px;float: left;">
                                             <select class="form-control selectpicker show-tick"
-                                                    title="请选择"
+                                                    title="请选择" data-live-search="true" onchange="calculate()"
                                                     id="orderFrequency">
                                             </select>
                                         </div>
@@ -473,10 +487,9 @@
                                 </div>
                                 <div class="item form-group">
                                     <div style="width: 130px;float: left;">
-                                        <label class="my_label_2">总量<span
-                                                class="required">*</span>:</label>
-                                        <input type="text" class="form-control my_label_input_2" id="symptom10"
-                                               placeholder="请输入" style="padding-left: 10px;" required="required">
+                                        <label class="my_label_2">总量:</label>
+                                        <input type="text" class="form-control my_label_input_2" id="gross"
+                                               style="padding-left: 10px;" readonly>
                                     </div>
                                     <div style="width: 256px;float: left;">
                                         <label class="my_label">单位:</label>
@@ -491,33 +504,32 @@
                                 <div class="item form-group">
                                     <div style="width: 130px;float: left;">
                                         <label class="my_label_2">单价:</label>
-                                        <input type="text" class="form-control my_label_input_2" id="symptom11"
+                                        <input type="text" class="form-control my_label_input_2" id="packRetprice"
                                                style="padding-left: 10px;" readonly>
                                     </div>
                                     <div style="width: 256px;float: left;">
                                         <label class="my_label">金额:</label>
-                                        <input type="text" class="form-control my_label_input_2" id="symptom12"
+                                        <input type="text" class="form-control my_label_input_2" id="totalRetprice"
                                                style="padding-left: 10px;" readonly>
                                     </div>
                                 </div>
                                 <div class="item form-group">
                                     <div style="width: 100%">
                                         <label class="my_label_2">医嘱:</label>
-                                        <input type="text" class="form-control " id="symptom13"
+                                        <input type="text" class="form-control " id="medicalAdvice"
                                                style="padding-left: 10px;width: 340px;" placeholder="请输入">
                                     </div>
                                 </div>
                                 <div style="width: 100%;height: 22px;line-height: 22px;">
-                                    <div style="float: left;display: inline-block;"><a id="clearRegistration44"
+                                    <div style="float: left;display: inline-block;"><a onclick="clearWesternMedicine()"
                                                                                        style="cursor: pointer;font-size: 14px;color: #2e69eb!important;"><i
                                             class="fa fa-trash">&nbsp;&nbsp;清空</i></a></div>
 
                                     <div style="float: right;display: inline-block;"><a id="clearRegistration"
-                                                                                        style="cursor: pointer;font-size: 14px;color: #333333;">&nbsp;&nbsp;保存到右侧<i
+                                                                                        style="cursor: pointer;font-size: 14px;color: #333333;" onclick="saveWesternMedicine()">&nbsp;&nbsp;保存到右侧<i
                                             class="fa fa-long-arrow-right"
                                             style="font-size: 20px;vertical-align: middle;width: 30px;height: 20px;text-align: center;background-color: #337AB7;color: white;margin-left: 10px"></i></a>
                                     </div>
-
                                 </div>
                             </form>
                         </div>
@@ -661,12 +673,11 @@
                                     </div>
                                 </div>
                                 <div style="width: 100%;height: 22px;line-height: 22px;">
-                                    <div style="float: left;display: inline-block;"><a id="clearRegistration4"
+                                    <div style="float: left;display: inline-block;"><a onclick="clearWesternMedicine()"
                                                                                        style="cursor: pointer;font-size: 14px;color: #2e69eb!important;"><i
                                             class="fa fa-trash">&nbsp;&nbsp;清空</i></a></div>
 
-                                    <div style="float: right;display: inline-block;"><a id="clearRegistration5"
-                                                                                        style="cursor: pointer;font-size: 14px;color: #333333;">&nbsp;&nbsp;保存到右侧<i
+                                    <div style="float: right;display: inline-block;"><a id="clearRegistration5"  style="cursor: pointer;font-size: 14px;color: #333333;"  onclick="saveYpDict()">&nbsp;&nbsp;保存到右侧<i
                                             class="fa fa-long-arrow-right"
                                             style="font-size: 20px;vertical-align: middle;width: 30px;height: 20px;text-align: center;background-color: #337AB7;color: white;margin-left: 10px"></i></a>
                                     </div>
@@ -675,256 +686,42 @@
                             </form>
                         </div>
                         <div style="width: calc(100% - 396px);float: right;border-left: 1px solid #ddd;padding-left: 10px;min-height: 360px;">
-                            <!-- 西成药的处方开始 -->
-                            <div id="wizard0" class="form_wizard wizard_horizontal">
-                                <ul class="wizard_steps">
-                                    <li>
-                                        <a href="#step-1">
-                                        <span class="step_no"
-                                              style="width: 20px;height: 20px;line-height: 20px;">1</span>
-                                            <span class="step_descr">
-                                              <small>处方一</small>
-                                          </span>
-                                        </a>
-                                    </li>
-                                    <li>
-                                        <a href="#step-2">
-                                        <span class="step_no"
-                                              style="width: 20px;height: 20px;line-height: 20px;">2</span>
-                                            <span class="step_descr">
-                                           <small>处方二</small>
-                                          </span>
-                                        </a>
-                                    </li>
-                                    <li>
-                                        <a href="#step-3">
-                                        <span class="step_no"
-                                              style="width: 20px;height: 20px;line-height: 20px;">3</span>
-                                            <span class="step_descr">
-                                     <small>处方三</small>
-                                          </span>
-                                        </a>
-                                    </li>
-                                    <li>
-                                        <a href="#step-4">
-                                        <span class="step_no"
-                                              style="width: 20px;height: 20px;line-height: 20px;">4</span>
-                                            <span class="step_descr">
-                                     <small>处方四</small>
-                                          </span>
-                                        </a>
-                                    </li>
-                                </ul>
-                                <div id="step-1" class="rb_item">
-                                    <form class="form-horizontal form-label-left">
-                                        <div class="form-group">
-                                            <img src="/thmz/images/prescription.png">
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                    </form>
-
-                                </div>
-                                <div id="step-2" class="rb_item">
-                                    <form class="form-horizontal form-label-left">
-                                        <div class="form-group">
-                                            <img src="/thmz/images/prescription.png">
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                    </form>
-
-                                </div>
-                                <div id="step-3" class="rb_item">
-                                    <form class="form-horizontal form-label-left">
-                                        <div class="form-group">
-                                            <img src="/thmz/images/prescription.png">
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                    </form>
+                            <!-- 选项卡菜单-->
+                            <ul id="xyTab" class="nav nav-tabs" role="tablist">
+                                <li class="active"><a href="#bulletin" role="tab" data-toggle="tab">公告</a></li>
+                                <li><a href="#rule" role="tab" data-toggle="pill">规则</a></li>
 
+                            </ul>
+                            <!-- 选项卡面板 -->
+                            <div id="xyTabContent" class="tab-content" style="height: calc(100% - 75px);min-height: 285px;">
+                                <div class="tab-pane fade in active" id="bulletin" style="height: 100%;min-height: 285px;position: relative;">公告内容面板
+                                    <div style='height: 30px;border-top: 1px solid #ddd;width: 100%;position: absolute;bottom:0;'>金额:<span id='amount0'>61.92元</span></div>
                                 </div>
-                                <div id="step-4" class="rb_item">
-                                    <form class="form-horizontal form-label-left">
-                                        <div class="form-group">
-                                            <img src="/thmz/images/prescription.png">
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                    </form>
-
-                                </div>
-
+                                <div class="tab-pane fade" id="rule">规则内容面板</div>
                             </div>
-                            <!-- 西成药的处方结束 -->
-                            <!-- 中草药的处方开始 -->
-                            <div id="wizard1" class="form_wizard wizard_horizontal hide">
-                                <ul class="wizard_steps">
-                                    <li>
-                                        <a href="#step1-1">
-                                        <span class="step_no"
-                                              style="width: 20px;height: 20px;line-height: 20px;">1</span>
-                                            <span class="step_descr">
-                                              <small>处方一</small>
-                                          </span>
-                                        </a>
-                                    </li>
-                                </ul>
-                                <div id="step1-1" class="rb_item">
-                                    <form class="form-horizontal form-label-left">
-                                        <div class="form-group">
-                                            <img src="/thmz/images/prescription.png">
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                    </form>
-                                </div>
-                            </div>
-                            <!-- 中草药的处方结束 -->
-                            <!-- 诊疗与医技的处方开始 -->
-                            <div id="wizard2" class="form_wizard wizard_horizontal hide">
-                                <ul class="wizard_steps">
-                                    <li>
-                                        <a href="#step2-1">
-                                        <span class="step_no"
-                                              style="width: 20px;height: 20px;line-height: 20px;">1</span>
-                                            <span class="step_descr">
-                                              <small>处方一</small>
-                                          </span>
-                                        </a>
-                                    </li>
-                                    <li>
-                                        <a href="#step2-2">
-                                        <span class="step_no"
-                                              style="width: 20px;height: 20px;line-height: 20px;">2</span>
-                                            <span class="step_descr">
-                                           <small>处方二</small>
-                                          </span>
-                                        </a>
-                                    </li>
-                                </ul>
-                                <div id="step2-1" class="rb_item">
-                                    <form class="form-horizontal form-label-left">
-                                        <div class="form-group">
-                                            <img src="/thmz/images/prescription.png">
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                    </form>
+                            <!-- 选项卡菜单-->
+                            <ul id="zyTab" class="nav nav-tabs hide" role="tablist">
+                                <li class="active"><a href="#bulletin" role="forum" data-toggle="tab">论坛</a></li>
 
+                            </ul>
+                            <!-- 选项卡面板 -->
+                            <div id="zyTabContent" class="tab-content hide" style="height: calc(100% - 75px);min-height: 285px;">
+                                <div class="tab-pane fade in active" id="forum" style="height: 100%;min-height: 285px;position: relative;">公告内容面板
+                                    <div style='height: 30px;border-top: 1px solid #ddd;width: 100%;position: absolute;bottom:0;'>金额:<span id='amount1'>61.92元</span></div>
                                 </div>
-                                <div id="step2-2" class="rb_item">
-                                    <form class="form-horizontal form-label-left">
-                                        <div class="form-group">
-                                            <img src="/thmz/images/prescription.png">
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                        <div class="form-group">
-                                            1.&nbsp;&nbsp;抗骨增生片 1片 4片 共12片<br/>
-                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用法:口服 频次:每周三次(tiw) 1天 <i
-                                                class="fa fa-long-arrow-left"
-                                                style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                            <i class="fa fa-remove"
-                                               style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>
-                                        </div>
-                                    </form>
+                            </div>
+                            <!-- 选项卡菜单-->
+                            <ul id="zlTab" class="nav nav-tabs hide" role="tablist">
+                                <li class="active"><a href="#security" role="tab" data-toggle="tab">安全</a></li>
+                                <li><a href="#welfare" role="tab" data-toggle="pill">公益</a></li>
+                            </ul>
+                            <!-- 选项卡面板 -->
+                            <div id="zlTabContent" class="tab-content hide" style="height: calc(100% - 75px);min-height: 285px;">
+                                <div class="tab-pane fade in active" id="security" style="height: 100%;min-height: 285px;position: relative;">公告内容面板
+                                    <div style='height: 30px;border-top: 1px solid #ddd;width: 100%;position: absolute;bottom:0;'>金额:<span id='amount2'>61.92元</span></div>
                                 </div>
-
+                                <div class="tab-pane fade" id="welfare">公益内容面板</div>
                             </div>
-                            <!-- 诊疗与医技的处方结束 -->
-
                         </div>
                     </div>
                 </form>