Selaa lähdekoodia

优化药师处方审核时间查询条件

cgp 3 viikkoa sitten
vanhempi
commit
cc155f1541
1 muutettua tiedostoa jossa 15 lisäystä ja 11 poistoa
  1. 15 11
      src/views/doctor/prescribeAudit/index.vue

+ 15 - 11
src/views/doctor/prescribeAudit/index.vue

@@ -14,11 +14,11 @@
       <el-form-item label="创建时间" prop="dateRange">
         <el-date-picker
           v-model="dateRange"
-          type="daterange"
+          type="datetimerange"
           range-separator="至"
           start-placeholder="开始日期"
           end-placeholder="结束日期"
-          value-format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm"
           style="width: 350px" />
       </el-form-item>
 
@@ -151,8 +151,8 @@ export default {
         pageSize: 10,
         patientName: undefined,
         auditStatus: 0,
-        beginCreateTime: undefined,
-        endCreateTime: undefined,
+        beginTime: undefined,
+        endTime: undefined,
         type: 2
       },
       auditDialog: { open: false },
@@ -193,14 +193,18 @@ export default {
     handleQuery() {
       this.queryParams.pageNum = 1;
       this.queryParams.type = 2;
+
+      // 清空旧时间
+      this.queryParams.beginTime = undefined;
+      this.queryParams.endTime = undefined;
+
+      // 如果选择了时间范围,赋值(精确到分)
       if (this.dateRange && this.dateRange.length === 2) {
-        this.queryParams.beginCreateTime = this.dateRange[0]
-        this.queryParams.endCreateTime = this.dateRange[1]
-      } else {
-        this.queryParams.beginCreateTime = undefined
-        this.queryParams.endCreateTime = undefined
+        this.queryParams.beginTime = this.dateRange[0]; // 格式: "2026-01-14 13:05"
+        this.queryParams.endTime = this.dateRange[1];   // 格式: "2026-01-14 15:30"
       }
-      this.getList()
+
+      this.getList();
     },
     resetQuery() {
       this.dateRange = []
@@ -281,4 +285,4 @@ export default {
 .app-container {
   padding: 20px;
 }
-</style>
+</style>