From 00212ed8e808fc7b76c04389224e65f27f074fb2 Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期五, 26 四月 2024 15:30:04 +0800
Subject: [PATCH] su

---
 src/views/system/Checkout/index.vue |   47 ++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/src/views/system/Checkout/index.vue b/src/views/system/Checkout/index.vue
index a2adf35..46b4bf8 100644
--- a/src/views/system/Checkout/index.vue
+++ b/src/views/system/Checkout/index.vue
@@ -33,8 +33,9 @@
           clearable
           v-model="createTimeList"
           @change="dateChangebirthday1"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
+          :default-time="['00:00:00', '23:59:00']"
+          format="yyyy-MM-dd HH:mm"
+          value-format="yyyy-MM-dd HH:mm"
           type="daterange"
           range-separator="-"
           start-placeholder="寮�濮嬫棩鏈�"
@@ -390,7 +391,9 @@
   goOut,
   getPdf,
   goabandon,
+  getNewDateList,
 } from "@/api/hosp/order";
+import moment from "moment";
 import { getwater } from "@/api/hosp/customer";
 import ViewPdf from "@/components/ViewPdf";
 import { projectGetList, getaddtTransition } from "@/api/system/tijian";
@@ -406,7 +409,7 @@
       leave: false,
       checked: false,
       radioId1: false,
-      createTimeList: "",
+      createTimeList: [],
       cusId: "",
       payType: "0",
       dialogVisible: false,
@@ -519,8 +522,9 @@
     };
   },
   created() {
-    this.getNowTime();
-    this.getList();
+    // this.getNowTime();
+  
+    this.getdate();
   },
   mounted() {
     this.$nextTick(() => {
@@ -528,6 +532,15 @@
     });
   },
   methods: {
+    getdate() {
+      getNewDateList().then((res) => {
+        this.createTimeList = [
+          moment(res.data).format("YYYY-MM-DD 00:00:00"),
+          moment(res.data).format("YYYY-MM-DD 23:59:00"),
+        ];
+        this.getList();
+      });
+    },
     // / 澶勭悊榛樿閫変腑褰撳墠鏃ユ湡
     getNowTime() {
       var curDate = new Date().getTime();
@@ -552,8 +565,18 @@
     },
     /** 鏌ヨ浣撴璁板綍鍒楄〃 */
     getList() {
-      this.queryParams.djbeginTime = this.startTime[0];
-      this.queryParams.djendTime = this.startTime[1];
+      if (this.startTime) {
+        this.queryParams.djbeginTime = this.startTime[0];
+        this.queryParams.djendTime = this.startTime[1];
+      } else if(this.createTimeList){
+        this.queryParams.djbeginTime = this.createTimeList[0];
+        this.queryParams.djendTime = this.createTimeList[1];
+      } else if(this.createTimeList == null){
+        this.queryParams.djbeginTime = null;
+        this.queryParams.djendTime = null;
+      }
+      
+
       this.loading = true;
       getQianLiList(this.queryParams).then((response) => {
         this.orderList = response.data.list;
@@ -637,18 +660,20 @@
       };
       this.resetForm("form");
     },
-    hb(){
-       if (this.queryParams.tjNum != undefined) {
+    hb() {
+      if (this.queryParams.tjNum != undefined) {
         this.handleQuery();
       }
     },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
+      this.queryParams.pageNum = 1;
+      this.getList();
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {
+      this.createTimeList = []
+      this.startTime= []
       this.resetForm("queryForm");
       this.handleQuery();
     },

--
Gitblit v1.8.0