From 09d02a6009c4de04fede010afa912ecdfdc6e039 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期二, 03 六月 2025 14:00:51 +0800
Subject: [PATCH] 1

---
 src/views/reservation/reservations/index.vue |  250 ++++++++++++++++++++++++++++++++++---------------
 1 files changed, 173 insertions(+), 77 deletions(-)

diff --git a/src/views/reservation/reservations/index.vue b/src/views/reservation/reservations/index.vue
index a9cb9a9..c887aac 100644
--- a/src/views/reservation/reservations/index.vue
+++ b/src/views/reservation/reservations/index.vue
@@ -99,81 +99,105 @@
       v-show="showSearch"
       label-width="68px"
     >
-      <el-form-item label="濮撳悕" prop="name">
-        <el-input
-          style="width: 120px"
-          v-model="queryParams.name"
-          placeholder="璇疯緭鍏ュ鍚�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="韬唤璇佸彿" prop="idCard">
-        <el-input
-          v-model="queryParams.idCard"
-          placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="鑱旂郴鐢佃瘽" prop="phoe">
-        <el-input
-          v-model="queryParams.phoe"
-          placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
-          clearable
-          @keyup.enter.native="handleQuery"
-          style="width: 140px"
-        />
-      </el-form-item>
-      <el-form-item label="鍗曚綅鍚嶇О" prop="company">
-        <el-select
-          :remote-method="getRemoteData"
-          v-model="queryParams.company"
-          remote
-          default-first-option
-          allow-create
-          filterable
-          style="width: 200px"
-          placeholder="璇烽�夋嫨鍗曚綅鍚嶇О"
-          clearable
-          @change="idFn1"
-        >
-          <el-option
-            v-for="dict in CompanyList"
-            :key="dict.cnName"
-            :label="dict.cnName"
-            :value="dict.drugManufacturerId"
-          />
-        </el-select>
-        <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i>
-      </el-form-item>
-      <el-form-item label="棰勭害瓒呮湡" prop="isExpire">
-        <el-select
-          v-model="queryParams.isExpire"
-          placeholder="璇烽�夋嫨鏄惁瓒呮湡"
-          clearable
-          style="width: 140px"
-        >
-          <el-option
-            v-for="dict in options"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button
-          type="primary"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
-          >鎼滅储</el-button
-        >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >閲嶇疆</el-button
-        >
-      </el-form-item>
+      <el-row>
+        <el-col>
+          <el-form-item label="濮撳悕" prop="name">
+            <el-input
+              style="width: 120px"
+              v-model="queryParams.name"
+              placeholder="璇疯緭鍏ュ鍚�"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="韬唤璇佸彿" prop="idCard">
+            <el-input
+              v-model="queryParams.idCard"
+              placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+
+          <el-form-item label="鍗曚綅鍚嶇О" prop="company">
+            <el-select
+              :remote-method="getRemoteData"
+              v-model="queryParams.company"
+              remote
+              default-first-option
+              allow-create
+              filterable
+              style="width: 200px"
+              placeholder="璇烽�夋嫨鍗曚綅鍚嶇О"
+              clearable
+              @change="idFn1"
+            >
+              <el-option
+                v-for="dict in CompanyList"
+                :key="dict.cnName"
+                :label="dict.cnName"
+                :value="dict.drugManufacturerId"
+              />
+            </el-select>
+            <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i>
+          </el-form-item>
+
+          <el-form-item label="棰勭害鏃堕棿">
+            <el-date-picker
+              clearable
+              v-model="createTimeList"
+              @change="dateChangebirthday2"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="寮�濮嬫棩鏈�"
+              end-placeholder="缁撴潫鏃ユ湡"
+              :picker-options="pickerOptions"
+              value-format="yyyy-MM-dd"
+              placeholder="璇烽�夋嫨鍑洪绾︽椂闂�"
+              style="width: 300px"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col>
+          <el-form-item label="鑱旂郴鐢佃瘽" prop="phoe">
+            <el-input
+              v-model="queryParams.phoe"
+              placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
+              clearable
+              @keyup.enter.native="handleQuery"
+              style="width: 140px"
+            />
+          </el-form-item>
+          <el-form-item label="棰勭害瓒呮湡" prop="isExpire">
+            <el-select
+              v-model="queryParams.isExpire"
+              placeholder="璇烽�夋嫨鏄惁瓒呮湡"
+              clearable
+              style="width: 140px"
+            >
+              <el-option
+                v-for="dict in options"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              size="mini"
+              @click="handleQuery"
+              >鎼滅储</el-button
+            >
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+              >閲嶇疆</el-button
+            >
+          </el-form-item>
+        </el-col>
+      </el-row>
     </el-form>
     <el-row :gutter="10" style="margin: 10px 15px">
       <el-col :span="1.5">
@@ -2038,6 +2062,8 @@
       cusIds: [],
       // 缁撴灉
       result: "",
+      createTimeList: "",
+      startTime: "",
       proIds: [],
       // 鏄剧ず鎼滅储鏉′欢
       showSearch: true,
@@ -2069,6 +2095,8 @@
         cusBrithday: null,
         cusAddr: null,
         cusPhone: null,
+        yykssj: "", // 棰勭害寮�濮嬫椂闂�
+        yyjssj: "", // 棰勭害缁撴潫鏃堕棿
         cusPostcode: null,
         cusEmail: null,
         indexCard: null,
@@ -2180,6 +2208,7 @@
         orderByColumn: "reservationTime",
         isAsc: "desc",
         name: null,
+        reservationTime: null,
         idCard: null,
         phoe: null,
         email: null,
@@ -2221,6 +2250,37 @@
         //   },
         // ],
       },
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: "鏈�杩戜竴鍛�",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date(new Date().setHours(0, 0, 0, 0));
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "鏈�杩戜竴涓湀",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date(new Date().setHours(0, 0, 0, 0));
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "鏈�杩戜笁涓湀",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date(new Date().setHours(0, 0, 0, 0));
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
     };
   },
   created() {
@@ -2252,6 +2312,10 @@
 
       this.discount =
         (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10;
+    },
+
+    dateChangebirthday2(val) {
+      this.startTime = val;
     },
 
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
@@ -2341,6 +2405,16 @@
     /** 鏌ヨ浣撴棰勭害鍒楄〃 */
     getList() {
       this.loading = true;
+      if (this.startTime) {
+        this.queryParams.yykssj = this.startTime[0];
+        this.queryParams.yyjssj = this.startTime[1];
+      } else if (this.createTimeList) {
+        this.queryParams.yykssj = this.createTimeList[0];
+        this.queryParams.yyjssj = this.createTimeList[1];
+      } else if (this.createTimeList == null) {
+        this.queryParams.yykssj = null;
+        this.queryParams.yyjssj = null;
+      }
       listReservation(this.queryParams).then((response) => {
         this.reservationList = response.rows;
         //  response.rows.forEach((item, index) =>
@@ -2416,7 +2490,29 @@
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {
+      this.startTime = [];
+      this.createTimeList = [];
       this.resetForm("queryForm");
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        cusName: null,
+        cusSex: null,
+        cusBrithday: null,
+        cusAddr: null,
+        cusPhone: null,
+        yykssj: "", // 棰勭害寮�濮嬫椂闂�
+        yyjssj: "", // 棰勭害缁撴潫鏃堕棿
+        cusPostcode: null,
+        cusEmail: null,
+        indexCard: null,
+        cusNational: null,
+        cusMarryStatus: null,
+        cusIdcard: null,
+        cusIntroduce: null,
+        cusNumber: null,
+        cusIsvip: null,
+      };
       this.handleQuery();
     },
     // 澶氶�夋閫変腑鏁版嵁
@@ -2774,8 +2870,8 @@
               alert("11111");
             }
             websocket.onopen = function () {
-              console.log('res',res);
-              
+              console.log("res", res);
+
               try {
                 // 杩炴帴璁惧
                 var jsonObjs = {

--
Gitblit v1.8.0