Browse Source

增加科室退库

WANGJIALIANG 2 years ago
parent
commit
9d21e659ca

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpOutDetlYfMapper.java

@@ -181,7 +181,7 @@ public interface YpOutDetlYfMapper {
             "SELECT distinct a.out_date,a.out_type,a.dept_code,a.draw_no,a.drawer,a.keeper,a.confirm_id," +
             "a.confirm_date,confirm_flag = isnull(a.confirm_flag,'0'),a.acct_id,a.acct_date " +
             "FROM yp_out_detl_yf a WITH(NOLOCK) " +
-            "where out_type in('0','1') " +
+            "where out_type in('0','1','2') " +
             "<when test='beginDate!=null'>",
             " and out_date &gt;=#{beginDate} ",
             "</when>",

+ 5 - 2
src/main/resources/static/js/yf/drug_delivery_dept.js

@@ -92,10 +92,13 @@ $(function () {
         let outDetlList = [];
         var data = $("#tb_table_detailed").jqGrid("getRowData");
         for (let i = 0; i < data.length; i++) {
-            if (parseFloat(data[i].outAmt === '' ? 0 : data[i].outAmt) > 0) {
+            if (parseFloat(data[i].outAmt === '' ? 0 : data[i].outAmt) != 0) {
                 outDetlList.push(data[i])
             }
         }
+        if(outDetlList.length === 0){
+            return errorMesageSimaple('没有需要保存的数据!');
+        }
         request({
             url: '/saveYpOutDetlYfList',
             method: 'POST',
@@ -341,7 +344,7 @@ function initDetailed() {
             {name: 'stockAmount', index: 'stockAmount', align: 'center'},
             {
                 name: 'outAmt', index: 'outAmt', align: 'center', width: 100, editable: true, edittype: 'text'
-                , editrules: {edithidden: true, number: true, minValue: 0},
+                , editrules: {edithidden: true, number: true},
                 formatter: function (cellvalue, options, rowObject) {
                     return isEmpty(cellvalue) ? 0 : cellvalue;
                 }