Bladeren bron

修改营销

Fan 1 maand geleden
bovenliggende
commit
febbc126df
1 gewijzigde bestanden met toevoegingen van 7 en 5 verwijderingen
  1. 7 5
      ui/smarttrade-platform/src/components/marketing/customerDetail.vue

+ 7 - 5
ui/smarttrade-platform/src/components/marketing/customerDetail.vue

@@ -118,6 +118,7 @@
     const showCustomerPreview = ref(false)
     const modalType = ref('')
     const allData = ref([])
+    const filterData = ref()
     const open = (type, data) => {
         customers.value = []
         total.value = 0
@@ -134,6 +135,7 @@
             liaisonName: ''
         }
         if(type == 'detail'){
+            filterData.value = data
             allData.value = data
             customers.value = data.slice(0, 10)
             total.value = data.length
@@ -169,7 +171,7 @@
         if(modalType.value == 'add'){
             getCustomerData()
         }else{
-            customers.value = allData.value.slice((page - 1) * customerParams.value.pageSize, page * customerParams.value.pageSize)
+            customers.value = filterData.value.slice((page - 1) * customerParams.value.pageSize, page * customerParams.value.pageSize)
         }
     }
 
@@ -178,8 +180,8 @@
             customerParams.value.pageIndex = 1
             getCustomerData()
         }else{
-            const filterData = allData.value.filter(item => {
-                const blurryMatch = customerParams.value.blurry ? (item.customerName.includes(customerParams.value.blurry) || item.company.includes(customerParams.value.blurry) || item.email.includes(customerParams.value.blurry)) : true
+            filterData.value = allData.value.filter(item => {
+                const blurryMatch = customerParams.value.blurry ? (item.customerName.includes(customerParams.value.blurry)) : true
                 const liaisonMatch = customerParams.value.liaisonName ? (item.liaisonName && item.liaisonName.includes(customerParams.value.liaisonName)) : true
                 const statusMatch = customerParams.value.customerStatusDictValue ? (item.customerStatusDictValue == customerParams.value.customerStatusDictValue) : true
                 const typeMatch = customerParams.value.customerTypeDictValue ? (item.customerTypeDictValue == customerParams.value.customerTypeDictValue) : true
@@ -187,8 +189,8 @@
                 const countryMatch = customerParams.value.country ? (item.country == customerParams.value.country) : true
                 return blurryMatch && liaisonMatch && statusMatch && typeMatch && levelMatch && countryMatch
             })
-            customers.value = filterData.slice(0, 10)
-            total.value = filterData.length
+            customers.value = filterData.value.slice(0, 10)
+            total.value = filterData.value.length
         }
     }