Pārlūkot izejas kodu

发药日期空格字符串处理

WANGJIALIANG 2 gadi atpakaļ
vecāks
revīzija
7de447748c
1 mainītis faili ar 12 papildinājumiem un 2 dzēšanām
  1. 12 2
      src/main/resources/static/js/yf/ward_prescription.js

+ 12 - 2
src/main/resources/static/js/yf/ward_prescription.js

@@ -736,7 +736,12 @@ function initSummarizingTable() {
                 index: 'confirmTime',
                 align: 'center',
                 width: 40,
-                formatter: "date", formatoptions: {srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s'},
+                formatter: function (cellvalue, options, rowObject) {
+                    if (!isEmpty(cellvalue)) {
+                        return format(cellvalue, "yyyy-MM-dd HH:mm:ss");
+                    }
+                    return "";
+                },
                 hidden: groupNo === '81' ? true : false
             },
             {name: 'serial', index: 'serial', align: 'center', width: 40, hidden: true},
@@ -937,7 +942,12 @@ function initDetailTable() {
                 index: 'confirmTime',
                 align: 'center',
                 width: 40,
-                formatter: "date", formatoptions: {srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s'}
+                formatter: function (cellvalue, options, rowObject) {
+                    if (!isEmpty(cellvalue)) {
+                        return format(cellvalue, "yyyy-MM-dd HH:mm:ss");
+                    }
+                    return "";
+                }
             },
             {name: 'frequCode', index: 'frequCode', align: 'center', width: 40, hidden: true},
             {name: 'dose', index: 'dose', align: 'center', width: 40, hidden: true},