Browse Source

导出时间修改

1178232204@qq.com 3 năm trước cách đây
mục cha
commit
f0fe983a82
2 tập tin đã thay đổi với 10 bổ sung6 xóa
  1. 6 4
      src/js/doctorQcAverageDetail.js
  2. 4 2
      src/js/doctorQuexianDetailControl.js

+ 6 - 4
src/js/doctorQcAverageDetail.js

@@ -362,8 +362,10 @@ $(function () {
         $(this).parent().find("input").focus()
     });
     $('.export').click(function () {
-        const start = new Date(startDateParam).getTime()
-        const end = new Date(endDateParam).getTime()
+        const dateStatrt = getPickerDate($("#datepicker"), 1)
+        const dateEnd = getPickerDate($("#datepicker2"), 2)
+        const start = new Date(dateStatrt).getTime()
+        const end = new Date(dateEnd).getTime()
         if (start > end) {
             $.alerModal({ "message": '开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
             return
@@ -376,9 +378,9 @@ $(function () {
             "deptName": deptName == "全院" ? "" : (deptName || ""),
             "deptId": deptId,
             /*"type": statisticsType||2,*/ //1-本月,2-本年
-            "startDate": startDateParam,
+            "startDate": start,
             "isPlacefile": isPlacefile,
-            "endDate": endDateParam
+            "endDate": end
         };
         const url = hospital == '台州市立' ? api.exportDeptFlawsTz : api.exportDeptFlaws;
         expJson(api.doctorAverageStatisticsExport, param).then(res => {

+ 4 - 2
src/js/doctorQuexianDetailControl.js

@@ -588,8 +588,10 @@ $(function () {
         $(this).parent().find("input").focus()
     })
     $('.exportData').click(function () {
-        const start = new Date(startDateParam).getTime()
-        const end = new Date(endDateParam).getTime()
+        const dateStatrt = getPickerDate($("#datepicker"), 1)
+        const dateEnd = getPickerDate($("#datepicker2"), 2)
+        const start = new Date(dateStatrt).getTime()
+        const end = new Date(dateEnd).getTime()
         if (start > end) {
             $.alerModal({ "message": '开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
             return