From 7933a59b8b8a97a6e7ad96fee1e4eb55222cde16 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期三, 27 十一月 2024 10:17:20 +0800
Subject: [PATCH] -物料采集 加搜索

---
 billion-ui/src/views/main/da/materialCollection/index.vue                       |   29 +++++++++++++++++++++--------
 billion-main/src/main/java/com/billion/main/da/domain/DaMaterialCollection.java |    3 ++-
 billion-main/src/main/resources/mapper/da/DaMaterialCollectionMapper.xml        |    3 +++
 3 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/billion-main/src/main/java/com/billion/main/da/domain/DaMaterialCollection.java b/billion-main/src/main/java/com/billion/main/da/domain/DaMaterialCollection.java
index 62a1d9a..3162ea3 100644
--- a/billion-main/src/main/java/com/billion/main/da/domain/DaMaterialCollection.java
+++ b/billion-main/src/main/java/com/billion/main/da/domain/DaMaterialCollection.java
@@ -1,12 +1,13 @@
 package com.billion.main.da.domain;
 
 import java.util.Date;
+
+import com.billion.common.core.domain.BaseEntity;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.billion.common.annotation.Excel;
-import com.billion.main.common.BaseEntity;
 
 /**
  * 鐗╂枡閲囬泦瀵硅薄 da_material_collection
diff --git a/billion-main/src/main/resources/mapper/da/DaMaterialCollectionMapper.xml b/billion-main/src/main/resources/mapper/da/DaMaterialCollectionMapper.xml
index f07fe5c..d3ad241 100644
--- a/billion-main/src/main/resources/mapper/da/DaMaterialCollectionMapper.xml
+++ b/billion-main/src/main/resources/mapper/da/DaMaterialCollectionMapper.xml
@@ -25,6 +25,9 @@
             <if test="locationCode != null  and locationCode != ''"> and location_code like concat('%', #{locationCode}, '%')</if>
             <if test="paramCode != null  and paramCode != ''"> and param_code like concat('%', #{paramCode}, '%')</if>
             <if test="paramName != null  and paramName != ''"> and param_name like concat('%', #{paramName}, '%')</if>
+            <if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+                and collect_time BETWEEN #{params.beginTime} and #{params.endTime}
+            </if>
         </where>
     </select>
     
diff --git a/billion-ui/src/views/main/da/materialCollection/index.vue b/billion-ui/src/views/main/da/materialCollection/index.vue
index 7ab4717..fb4891a 100644
--- a/billion-ui/src/views/main/da/materialCollection/index.vue
+++ b/billion-ui/src/views/main/da/materialCollection/index.vue
@@ -9,14 +9,24 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="宸ヤ綅缂栫爜" prop="locationCode">
-        <el-input
-          v-model="queryParams.locationCode"
-          placeholder="璇疯緭鍏ュ伐浣嶇紪鐮�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+      <el-form-item label-width="120" label="閲囬泦鏃堕棿">
+        <el-date-picker
+          v-model="dateRange"
+          type="datetimerange"
+          range-separator="鑷�"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          start-placeholder="寮�濮嬫棩鏈�"
+          end-placeholder="缁撴潫鏃ユ湡">
+        </el-date-picker>
       </el-form-item>
+<!--      <el-form-item label="宸ヤ綅缂栫爜" prop="locationCode">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.locationCode"-->
+<!--          placeholder="璇疯緭鍏ュ伐浣嶇紪鐮�"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
 <!--      <el-form-item label="鍙傛暟缂栫爜" prop="paramCode">-->
 <!--        <el-input-->
 <!--          v-model="queryParams.paramCode"-->
@@ -138,6 +148,8 @@
   name: "MaterialCollection",
   data() {
     return {
+      // 鏃ユ湡鑼冨洿
+      dateRange: [],
       // 閬僵灞�
       loading: true,
       // 閫変腑鏁扮粍
@@ -179,7 +191,7 @@
     /** 鏌ヨ鐗╂枡閲囬泦鍒楄〃 */
     getList() {
       this.loading = true;
-      listMaterialCollection(this.queryParams).then(response => {
+      listMaterialCollection(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
         this.materialCollectionList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -205,6 +217,7 @@
     },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
+      this.dateRange = [];
       this.queryParams.pageNum = 1;
       this.getList();
     },

--
Gitblit v1.9.3