Selaa lähdekoodia

优化消息提示功能,增加项目维护的厂家功能

hurugang 3 vuotta sitten
vanhempi
commit
7856d1d534

+ 7 - 4
src/main/java/cn/hnthyy/thmz/mapper/his/zd/ZdChargeItemMapper.java

@@ -101,7 +101,7 @@ public interface ZdChargeItemMapper {
             "rtrim(self_flag) self_flag,rtrim(separate_flag) separate_flag,rtrim(suppress_flag) suppress_flag,py_code,d_code wb_code,bill_item_zy,bill_item_mz," +
             "charge_unit,percent_group_zy,percent_group_mz,rtrim(case  when in_out_flag ='' then null else in_out_flag end) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag, " +
             "rtrim(yp_flag) yp_flag,bill_item_code,rtrim(xnh_flag) xnh_flag,add_date,hnsyb_code,hnsyb_name,xnh_code,xnh_name,xnh_ratio,xnh_quotamoney,rtrim(xnh_status) xnh_status," +
-            "yb_flag_new,yb_comment_new,yb_bl_new,e_code yb_code,cl_code,co,xl_code from zd_charge_item  WITH(NOLOCK)  where  code = #{code,jdbcType=VARCHAR} ")
+            "yb_flag_new,yb_comment_new,charge_amount_lwg,percent_group_1  percent_group1,yb_name,yb_comment,yb_bl_new,e_code yb_code,cl_code,co,xl_code from zd_charge_item  WITH(NOLOCK)  where  code = #{code,jdbcType=VARCHAR} ")
     //     " and (del_flag != 1 or del_flag is null) " )
     ZdChargeItem selectZdChargeItemByCode(@Param("code") String code);
 
@@ -118,7 +118,7 @@ public interface ZdChargeItemMapper {
             "charge_unit,percent_group_zy,percent_group_mz,rtrim(case  when in_out_flag ='' then null else in_out_flag end) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag, ",
             "rtrim(yp_flag) yp_flag,bill_item_code,rtrim(xnh_flag) xnh_flag,add_date,hnsyb_code,hnsyb_name,xnh_code,xnh_name,xnh_ratio,xnh_quotamoney,rtrim(xnh_status) xnh_status,",
             // "yb_flag_new,yb_comment_new,yb_bl_new from zd_charge_item where (del_flag != 1 or del_flag is null) ",
-            "yb_flag_new,yb_comment_new,yb_bl_new,e_code yb_code,cl_code,co,xl_code from zd_charge_item WITH(NOLOCK)  ",
+            "yb_flag_new,yb_comment_new,yb_bl_new,charge_amount_lwg,percent_group_1  percent_group1,yb_name,yb_comment,e_code yb_code,cl_code,co,xl_code from zd_charge_item WITH(NOLOCK)  ",
             "<when test='codes!=null'>",
             " where code in",
             "<foreach item='item' index='index' collection='codes' open='(' separator=',' close=')'>",
@@ -146,10 +146,10 @@ public interface ZdChargeItemMapper {
      */
     @Insert("INSERT INTO zd_charge_item ( code, name, charge_amount, percentag1, percentag2, percentag3, percentag4, percentag5, self_flag, separate_flag," +
             " suppress_flag, py_code, d_code, del_flag, charge_unit, percent_group_mz, class_code, e_code, s_code, add_date, xnh_code, xnh_name,audit_code," +
-            "bill_item_mz,bill_item_zy,exec_unit,discription,cl_code,co,oper_id,xl_code ) VALUES (" +
+            "bill_item_mz,bill_item_zy,exec_unit,discription,cl_code,co,oper_id,xl_code,yb_comment ) VALUES (" +
             " #{code}, #{name}, #{chargeAmount}, #{percentag1}, #{percentag2}, #{percentag3}, #{percentag4}, #{percentag5}, #{selfFlag}, #{separateFlag}, " +
             "#{suppressFlag}, #{pyCode}, #{wbCode}, #{delFlag}, #{chargeUnit}, #{percentGroupMz}, #{classCode}, #{ybCode}, #{bzCode}, #{addDate}, #{xnhCode}, #{xnhName}" +
-            ",#{auditCode},#{billItemMz},#{billItemZy},#{execUnit} ,#{discription}, #{clCode},#{co},#{operId},#{xlCode}  )")
+            ",#{auditCode},#{billItemMz},#{billItemZy},#{execUnit} ,#{discription}, #{clCode},#{co},#{operId},#{xlCode},#{ybComment}  )")
     int insertZdChargeItem(ZdChargeItem zdChargeItem);
 
 
@@ -237,6 +237,9 @@ public interface ZdChargeItemMapper {
             "<when test='operId!=null'>",
             ",oper_id =#{operId}",
             "</when>",
+            "<when test='ybComment!=null'>",
+            ",yb_comment =#{ybComment}",
+            "</when>",
             "</trim>",
             "</script>"})
     int updateZdChargeItem(ZdChargeItem zdChargeItem);

+ 26 - 15
src/main/resources/static/js/common/message.js

@@ -3,16 +3,22 @@
  * @param result
  */
 function errorMesage(result) {
-    if(result.code == -2){
+    if (result.code == -2) {
         return;
     }
-    new PNotify({
-        title: '错误提示',
-        text: result.message,
-        type: 'error',
-        hide: true,
-        styling: 'bootstrap3'
-    });
+    var length = $("div.ui-pnotify").length;
+    if (length > 0) {
+        $("div.ui-pnotify-text").html(result.message);
+    } else {
+        new PNotify({
+            title: '错误提示',
+            text: result.message,
+            type: 'error',
+            hide: true,
+            styling: 'bootstrap3'
+        });
+    }
+
 }
 
 /**
@@ -34,13 +40,18 @@ function successMesage(result) {
  * @param result
  */
 function errorMesageSimaple(message) {
-    new PNotify({
-        title: '错误提示',
-        text: message,
-        type: 'error',
-        hide: true,
-        styling: 'bootstrap3'
-    });
+    var length = $("div.ui-pnotify").length;
+    if (length > 0) {
+        $("div.ui-pnotify-text").html(message);
+    } else {
+        new PNotify({
+            title: '错误提示',
+            text: message,
+            type: 'error',
+            hide: true,
+            styling: 'bootstrap3'
+        });
+    }
 }
 
 /**

+ 8 - 1
src/main/resources/static/js/mz/charge_detail.js

@@ -294,6 +294,11 @@ function initZdChargeItemList() {
                     }
                     return format(value, "yyyy-MM-dd HH:mm:ss");
                 }
+            }, {
+                field: 'ybComment',
+                title: '生产厂家',
+                align: "center",
+                valign: 'middle'
             }, {
                 field: 'clCode',
                 title: '耗材院内编码',
@@ -574,6 +579,7 @@ function updateZdChargeItem(code) {
                 $('#execUnitParams').selectpicker('refresh');
                 $("#bzCodeParams").val(res.data.bzCode);
                 $("#discriptionParams").val(res.data.discription);
+                $("#ybCommentParams").val(res.data.ybComment);
                 $("#clCodeParams").val(res.data.clCode);
                 $('#coParams').selectpicker('val', res.data.co);
                 if(res.data.co==null || res.data.co==""){
@@ -648,7 +654,7 @@ $('#save').click(function () {
             "auditCode": $("#auditCodeParams").val(),"billItemMz": $("#billItemMzParams").val(),
             "billItemZy": $("#billItemZyParams").val(),"execUnit": $("#execUnitParams").val(),"bzCode": $("#bzCodeParams").val(),
             "discription": $("#discriptionParams").val(),"clCode": $("#clCodeParams").val(),"co": $("#coParams").val(),"xlCode": $("#xlCodeParams").val(),
-            "code": $("#code").val()}),
+            "code": $("#code").val(),"ybComment": $("#ybCommentParams").val()}),
         success: function (res) {
             if (res == '401' || res == 401) {
                 window.location.href = '/thmz/login/view'
@@ -688,6 +694,7 @@ function clearInput() {
     // $('#execUnitParams').selectpicker('refresh');
     $("#bzCodeParams").val(null);
     $("#discriptionParams").val(null);
+    $("#ybCommentParams").val(null);
     $("#clCodeParams").val(null);
     $('#coParams').selectpicker('val', 0);
     $('#coParams').selectpicker('refresh');

+ 8 - 0
src/main/resources/templates/mz/charge_detail.html

@@ -298,6 +298,14 @@
                                            class="form-control col-md-7 col-xs-12">
                                 </div>
                             </div>
+                            <div class="item form-group">
+                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="ybCommentParams">生产厂家
+                                </label>
+                                <div class="col-md-6 col-sm-6 col-xs-12">
+                                    <input type="text" id="ybCommentParams"
+                                           class="form-control col-md-7 col-xs-12">
+                                </div>
+                            </div>
                             <div class="item form-group">
                                 <label class="control-label col-md-3 col-sm-3 col-xs-12" for="clCodeParams">耗材院内编码
                                 </label>