From c35b9241b0452c7a04035191a50c58085865a310 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 18 九月 2023 16:13:15 +0800
Subject: [PATCH] 搜索是过滤空格

---
 src/components/makepager/TableCommonView.vue |   45 +++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue
index e390ee3..08762f7 100644
--- a/src/components/makepager/TableCommonView.vue
+++ b/src/components/makepager/TableCommonView.vue
@@ -92,11 +92,21 @@
             </ul>
             <div v-else class="no-product">{{ "--" }}</div>
           </div>
-          <div v-else-if="item.isProductCommon" class="product-view">
+          <div v-else-if="item.isProductPrice" class="product-view">
             <ul v-if="scope.row.products && scope.row.products.length > 0">
               <li v-for="(item, index) in scope.row.products" :key="index">
                 <div :class="scope.row.products.length === 1 ? 'name-view no-bottom' : 'name-view'">
-                  {{ item.prop === "price" ? item.price : item.total }}
+                  {{ item.price }}
+                </div>
+              </li>
+            </ul>
+            <div v-else class="no-product">{{ "--" }}</div>
+          </div>
+          <div v-else-if="item.isProductTotal" class="product-view">
+            <ul v-if="scope.row.products && scope.row.products.length > 0">
+              <li v-for="(item, index) in scope.row.products" :key="index">
+                <div :class="scope.row.products.length === 1 ? 'name-view no-bottom' : 'name-view'">
+                  {{ item.total }}
                 </div>
               </li>
             </ul>
@@ -194,6 +204,37 @@
               }
             }, 0)
             sums[index + 1]
+            if (column.property === "taxUnitPrice") {
+              let sumPrice = 0
+              this.tableList.tableInfomation.map((item) => {
+                item.products.map((val) => {
+                  console.log(val.price)
+                  sumPrice += parseFloat(val.price)
+                })
+              })
+              console.log((sums[index + 1] = sumPrice))
+              console.log(sumPrice)
+            }
+            if (column.property === "priceTax") {
+              let sumPrice = 0
+              this.tableList.tableInfomation.map((item) => {
+                item.products.map((val) => {
+                  console.log(val.price)
+                  sumPrice += parseFloat(val.total)
+                })
+              })
+              sums[index + 1] = sumPrice
+            }
+            if (column.property === "productAmount") {
+              let sumPrice = 0
+              this.tableList.tableInfomation.map((item) => {
+                item.products.map((val) => {
+                  console.log(val.price)
+                  sumPrice += parseFloat(val.amount)
+                })
+              })
+              sums[index + 1] = sumPrice
+            }
           }
         })
         // console.log(sums)

--
Gitblit v1.8.0