From dcd1bfa18415d5623df59d6df00c1918359e63ba Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期日, 07 十二月 2025 14:44:01 +0800
Subject: [PATCH] 页面优化

---
 src/views/sell/sellOutBill/index.vue |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/views/sell/sellOutBill/index.vue b/src/views/sell/sellOutBill/index.vue
index be1bc43..2a02ae5 100644
--- a/src/views/sell/sellOutBill/index.vue
+++ b/src/views/sell/sellOutBill/index.vue
@@ -167,7 +167,7 @@
         </template>
       </el-table>
       <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes"
-        @pagination="getList" />
+        @pagination="handleQuery" />
       <el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
         <RowSettings :colName="btResList" HModName="Kf_SellOutBillList" @rowEditClose="rowSetClose"
           v-if="rowHideShow" />
@@ -294,7 +294,7 @@
   created() {
     // this.fetchData()
     this.riqiChange()
-    this.getList();
+    this.handleQuery();
   },
 
   methods: {
@@ -338,7 +338,7 @@
       this.rowHideShow = false
       this.tableShow = true
       this.openRowHide = val
-      this.getList()
+      this.handleQuery()
     },
     riqiChange() {
       const end = new Date();
@@ -358,10 +358,7 @@
     getList() {
       this.tableShow = false
       this.loading = true
-      if (this.dateRange.length > 0) {
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.dateRange[0] + "'"
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.dateRange[1] + "'"
-      }
+     
       if (this.pageSize == 0) {
         this.pageSize = 50
       }
@@ -688,6 +685,11 @@
       if (this.queryParams.HMaterName) {
         this.sWhere += " and 鐗╂枡鍚嶇О like '%" + this.queryParams.HMaterName + "%'";
       }
+
+      if (this.dateRange.length > 0) {
+        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.dateRange[0] + "'"
+        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.dateRange[1] + "'"
+      }
       this.getList()
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -713,7 +715,7 @@
       }
       this.riqiChange()
       this.resetForm("queryForm")
-      this.getList()
+      this.handleQuery()
     },
 
     //閫�鍑�
@@ -722,7 +724,7 @@
       this.tableShow = true
       this.openEdit = false
       this.editShow= false
-      this.getList()
+      this.handleQuery()
     },
     //鎵撳紑鏂板缁勪欢寮圭獥
     handleAddEdit() {
@@ -741,7 +743,7 @@
       this.open = val
       this.editShow = false
       this.openEdit = val
-      this.getList()
+      this.handleQuery()
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
@@ -751,7 +753,7 @@
             params: { 'HInterID': this.rowForm.hmainid.toString(), 'user': sessionStorage["HUserName"] }
           }).then(response => {
             if (response.data.count == 1) {
-              this.getList()
+              this.handleQuery()
               this.$modal.msgSuccess("鍒犻櫎鎴愬姛")
             } else {
               this.$modal.msgError("閿欒:" + result.code + result.Message);
@@ -774,7 +776,7 @@
         let result = response.data
         if (result.code == 1) {
           this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
-          this.getList();
+          this.handleQuery();
         }
         else {
           this.$modal.msgError("閿欒:" + result.code + result.Message,);

--
Gitblit v1.9.1