|
@@ -137,10 +137,14 @@ const getCustomerList = async (params = {}) => {
|
|
|
}
|
|
|
|
|
|
const { push } = useRouter()
|
|
|
-// 新建客户
|
|
|
+// 新建或编辑客户
|
|
|
const newCustomer = (isAdd: boolean, row?) => {
|
|
|
- const params = !isAdd ? `?id=${row.id}&edit=true` : row ? `?id=${row.id}` : ''
|
|
|
- push(`/newCustomer${params}`)
|
|
|
+ const params = !isAdd
|
|
|
+ ? `/editCustomer?id=${row.id}&edit=true`
|
|
|
+ : row
|
|
|
+ ? `/newCustomer?id=${row.id}`
|
|
|
+ : '/newCustomer'
|
|
|
+ push(params)
|
|
|
}
|
|
|
// 查看客户详情
|
|
|
const jumpToDetail = (row: any) => {
|