Pārlūkot izejas kodu

Merge branch 'dev-1.1.4' into 'dev-1.1.4'

药品退库优化

See merge request lihong/thmz_system!50
huangshuhua 1 gadu atpakaļ
vecāks
revīzija
0a7ddb978a

+ 3 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/yf/YfWardPrescriptionServiceImpl.java

@@ -683,6 +683,9 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
         Date now = new Date();
         Map<String, Object> resultMap = new HashMap<>();
         YzActOrderCy yzActOrderCy = yzActOrderCyMapper.selectYzActOrderCyByPageNo(pageNo);
+        if(yzActOrderCy != null && yzActOrderCy.getQuantity() == 0d){
+            throw new MzException("药单发药剂数为0,请检查!");
+        }
         Integer ledgerSn = zyLedgerFileMapper.selectMaxLedgerSn(yzActOrderCy.getInpatientNo(), yzActOrderCy.getAdmissTimes());
         List<YzActOrderCyDetail> yzActOrderCyDetails = yzActOrderCyDetailMapper.selectYzActOrderCyDetail(yzActOrderCy.getOrderNo());
         BigDecimal multiply = yzActOrderCy.getOrderJe().multiply(BigDecimal.valueOf(yzActOrderCy.getQuantity()));

+ 18 - 4
src/main/resources/static/js/yk/drug_return.js

@@ -253,6 +253,18 @@ function initTbTable() {
                 align: "center",
                 valign: 'middle'
             },
+            {
+                field: 'manuNo',
+                title: '批次号',
+                align: "center",
+                valign: 'middle'
+            },
+            {
+                field: 'supplyName',
+                title: '供应商',
+                align: "center",
+                valign: 'middle'
+            },
             {
                 field: 'nationalCode',
                 title: '药品国家医保编码',
@@ -351,7 +363,7 @@ function initAddDrugTable() {
                     var str = '<button type="button" class="registration-no-color-foot-button" title="选择" onclick="addData(\'' + row.outDate + '\',\''
                         + row.chargeCode + '\',\'' + row.name + '\',\'' + row.specification+ '\',\'' + row.groupNoOutName+ '\',\'' + row.outAmt+ '\',\''
                         + row.effDate+ '\',\'' + row.drawNo+ '\',\'' + row.inDrawNo+ '\',\'' + row.outSeri+ '\',\'' + row.inSeri+ '\',\''
-                        + row.packRetprice+ '\',\'' + row.nationalCode+ '\')"><i class="glyphicon glyphicon-plus"></i></button>';
+                        + row.packRetprice+ '\',\'' + row.manuNo+ '\',\'' + row.supplyName+ '\',\'' + row.nationalCode+ '\')"><i class="glyphicon glyphicon-plus"></i></button>';
                     return str;
                 }
             }, {
@@ -471,7 +483,7 @@ function initAddDrugTable() {
  * @param field
  * @param values
  */
-function addData(outDate,chargeCode,name,specification,groupNoOutName,outAmt,effDate,drawNo,inDrawNo,outSeri,inSeri,packRetprice,nationalCode) {
+function addData(outDate,chargeCode,name,specification,groupNoOutName,outAmt,effDate,drawNo,inDrawNo,outSeri,inSeri,packRetprice,manuNo,supplyName,nationalCode) {
     var tableData = $table.bootstrapTable('getData');
     for (let i = 0; i < tableData.length; i++) {
         let data = tableData[i];
@@ -490,10 +502,12 @@ function addData(outDate,chargeCode,name,specification,groupNoOutName,outAmt,eff
         outAmt: outAmt,
         effDate: effDate,
         drawNo: drawNo,
-        outSeri:outSeri,
-        inSeri:inSeri,
+        outSeri: outSeri,
+        inSeri: inSeri,
         inDrawNo: inDrawNo,
         packRetprice: packRetprice,
+        manuNo: manuNo,
+        supplyName: supplyName,
         nationalCode: nationalCode,
     };
     $table.bootstrapTable('prepend', row);