浏览代码

发药日期空格字符串处理

WANGJIALIANG 2 年之前
父节点
当前提交
7de447748c
共有 1 个文件被更改,包括 12 次插入2 次删除
  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},