Explorar o código

Merge branch 'dev-1.0.9' into dev-1.1.0

hurugang %!s(int64=4) %!d(string=hai) anos
pai
achega
34d5d9dda5

+ 3 - 0
src/main/java/cn/hnthyy/thmz/controller/UnitCodeController.java

@@ -232,6 +232,9 @@ public class UnitCodeController {
             resultMap.put("message", "保存科室失败,用户Token不存在");
             return resultMap;
         }
+        if("-1".equals(zdUnitCode.getMzClass())){
+            zdUnitCode.setMzClass("");
+        }
         DecodedJWT decodedJWT=TokenUtil.parseJWT(token);
         User tokenUser=(User)JsonUtil.jsontoObject(decodedJWT.getSubject(),User.class);
         zdUnitCode.setOpDate(new Date());

+ 2 - 1
src/main/resources/static/js/unit_code.js

@@ -335,7 +335,7 @@ function initSelect() {
                 window.location.href = '/thmz/login/view'
                 return;
             }
-            var html = '';
+            var html = '<option value="-1">无</option>';
             $.each(res.data, function (commentIndex, comment) {
                 html += '<option value="' + comment.code + '">' + comment.name + '</option>';
             });
@@ -557,6 +557,7 @@ $(function () {
         "<i class='glyphicon glyphicon glyphicon-plus icon-plus'></i></button>");
     //为新增按钮增加事件
     $("button[name='plus']").on("click", function (t) {
+        $("#originalCode").val(null);
         clearModel();
         if ($('#parentCodePlus').find("option").length == 1) {
             initParentCodePlus();