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/invoice/index.vue |   36 ++++++++++++++++++++++++++++++++----
 1 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/src/views/system/invoice/index.vue b/src/views/system/invoice/index.vue
index 8df4abc..3a925c8 100644
--- a/src/views/system/invoice/index.vue
+++ b/src/views/system/invoice/index.vue
@@ -10,14 +10,16 @@
         </el-col>
         <el-col :span="6">
           <el-form-item label="浣撴鍙�" prop="tjNum" style="display: flex;">
-            <el-input ref="inputName"  v-model="queryParams.tjNum" placeholder="璇疯緭鍏ヤ綋妫�鍙�" @keyup.enter.native="handleQuery"
+            <el-input ref="inputName"  v-model="queryParams.tjNum" placeholder="璇疯緭鍏ヤ綋妫�鍙�" @keyup.enter.native="handleQuery" @blur="hb"
               clearable />
           </el-form-item>
         </el-col>
         <el-col :span="10">
           <el-form-item label="鐧昏鏃堕棿" prop="createTimeList" style="display: flex;" label-width="116px">
             <el-date-picker clearable style="width:100%" v-model="createTimeList" @change="dateChangebirthday1"
-              value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�"
+               :default-time="['00:00:00', '23:00:00']"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss" type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�"
               end-placeholder="缁撴潫鏃ユ湡" :picker-options="pickerOptions"></el-date-picker>
           </el-form-item>
         </el-col>
@@ -77,6 +79,7 @@
           <template slot-scope="scope">
             <span v-if="scope.row.tjCustomerSex == '0'">鐢�</span>
             <span v-if="scope.row.tjCustomerSex == '1'">濂�</span>
+            <span v-if="scope.row.tjCustomerSex == '2'">鏈煡</span>
           </template>
         </el-table-column>
         <el-table-column label="骞撮緞" align="center" prop="tjCustomerAge" width="55px" :show-overflow-tooltip="true" />
@@ -198,6 +201,10 @@
 </template>
   
 <script>
+import {
+  getNewDateList,
+} from "@/api/hosp/order";
+import moment from "moment";
 import { getPrintOrderList, addOrder } from "@/api/system/invoice";
 import { getwater } from "@/api/hosp/customer";
 import ViewPdf from "@/components/ViewPdf";
@@ -328,8 +335,9 @@
   },
   created() {
     this.queryParams.name = this.$route.query.paramName
-    this.getNowTime();
+    // this.getNowTime();
     this.getList();
+    this.getdate();
   },
   mounted() {
     this.$nextTick(() => {
@@ -337,6 +345,14 @@
     });
   },
   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")
+          ];
+      });
+    },
     // / 澶勭悊榛樿閫変腑褰撳墠鏃ユ湡
     getNowTime() {
       var curDate = new Date().getTime();
@@ -361,8 +377,14 @@
     },
     /** 鏌ヨ浣撴璁板綍鍒楄〃 */
     getList() {
-      this.queryParams.djbeginTime = this.startTime[0];
+      if (this.startTime) {
+        this.queryParams.djbeginTime = this.startTime[0];
       this.queryParams.djendTime = this.startTime[1];
+      }else{
+         this.queryParams.djbeginTime = this.createTimeList[0];
+        this.queryParams.djendTime = this.createTimeList[1];
+      }
+      
       this.queryParams.type = 0;
       this.loading = true;
       getPrintOrderList(this.queryParams).then((response) => {
@@ -423,6 +445,12 @@
       };
       this.resetForm("form");
     },
+    hb(){
+      console.log(this.queryParams.tjNum);
+       if (this.queryParams.tjNum != null) {
+        this.handleQuery();
+      }
+    },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
       this.queryParams.pageNum = 1;

--
Gitblit v1.8.0