Browse Source

Merge branch 'master' of http://192.168.1.41:3000/outaozhen/cldV2react

outaozhen 5 years atrás
parent
commit
a28752a910

+ 2 - 0
src/pages/Customer/Company/index.jsx

@@ -111,9 +111,11 @@ const Company = props => {
     }
   }, [])
   const handleSearch = value => {
+    tRef.current.reset()
     setState({ ...state, params: { ...state.params, search: value } })
   }
   const onDistrictChange = value => {
+    tRef.current.reset()
     const [province = '', city = '', area = ''] = value
     setState({ ...state, params: { ...state.params, province, city, area } })
   }

+ 4 - 0
src/pages/Customer/Contact/components/ContactDetail/ContanctTabList.jsx

@@ -89,6 +89,10 @@ const ContanctTabList = ({ clientId, software }) => {
                 //   } = await apiContactDetail({ ...params, ...sort, ...filter })
                 //   return {
                 //     data: longle,
+                //     data: { software = {}, total = 0 }
+                //   } = await apiContactDetail({ ...params, ...sort, ...filter })
+                //   return {
+                //     data: software.longle,
                 //     success: code === consts.RET_CODE.SUCCESS,
                 //     total
                 //   }

+ 2 - 0
src/pages/Customer/Contact/index.jsx

@@ -410,6 +410,7 @@ const Contact = props => {
   }, [])
 
   const handleSearch = value => {
+    tRef.current.reset()
     setState({ ...state, params: { ...state.params, search: value } })
   }
 
@@ -422,6 +423,7 @@ const Contact = props => {
   // const { run: handleSearchInputChange } = useDebounceFn(searchOnchange)
 
   const onDistrictChange = value => {
+    tRef.current.reset()
     const [province = '', city = '', area = ''] = value
     setState({ ...state, params: { ...state.params, province, city, area } })
     // initData({ province, city, area })

+ 1 - 1
src/services/contact.js

@@ -6,7 +6,7 @@ import request from '@/basic/utils/request'
  */
 export async function queryContact(payload) {
   const data = await request.post('/api/client/list', {
-    data: { current: 1, ...payload }
+    data: payload
   })
   return data
 }

+ 1 - 4
src/services/customer.js

@@ -1,6 +1,4 @@
 import request from '@/basic/utils/request'
-import consts from '@/consts'
-import { LabelChangeType } from '@/pages/customer/Company/components/PersonLabel'
 
 /**
  * 获取客户列表
@@ -8,9 +6,8 @@ import { LabelChangeType } from '@/pages/customer/Company/components/PersonLabel
  * @returns 结果集
  */
 export async function queryCustomers(payload) {
-  const params = { page: 1, size: consts.PAGE_SIZE, ...payload }
   const data = await request.post('/api/customer/list', {
-    data: { ...params }
+    data: payload
   })
   return data
 }