Commit d1228b67 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞fix: 修复选择会员搜索会员名称没效果的问题

parent a2be297f
......@@ -9,16 +9,13 @@ import React, { useEffect, useState, useRef } from 'react'
import { Card, Button, message } from 'antd'
import { PlusOutlined, SaveOutlined } from '@ant-design/icons'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import EyePreview from '@/components/EyePreview'
import { createFormActions, ISchema } from '@formily/antd'
import PayForm from '../components/PayForm'
import ModalTable from '@/components/ModalTable'
import Search from '@/components/NiceForm/components/Search'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'
import { useInitValue } from '@/formSchema/effects/useInitValue'
import { strategyDetailTab } from '../schema'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
......@@ -28,15 +25,9 @@ import { history } from 'umi'
import { findItemAndDelete } from '@/utils'
import { GlobalConfig } from '@/global/config'
import { PublicApi } from '@/services/api'
import style from './index.less'
import { Submit } from '@formily/antd'
import {
Input,
NumberPicker,
FormTab,
FormMegaLayout,
Select,
ArrayTable
} from '@formily/antd-components'
const payActions = createFormActions()
/**
......@@ -45,11 +36,9 @@ const payActions = createFormActions()
* @return {type}
*/
const fetchMemberList = async (params) => {
console.log(params, 10086)
return new Promise(resolve => {
PublicApi.getPayGetMembers(params).then(res => {
res.data.data.forEach((item:any) => {
item.name = item.memberName
})
resolve(res.data)
})
})
......@@ -235,85 +224,15 @@ const PaySetting: React.FC<{}> = () => {
roleId: [...a, ...roleList],
level: [...a, ...leverList]
}
// setfilterParams({...filterParams,roleList:[...a,...roleList],levelList:[...a,...leverList],memberTypeList: [...a,...memberTypeList] })
}
}
const formSearch: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
"x-component": 'Search',
"x-component-props": {
placeholder: '请输入会员名称'
}
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
memberTypeId: {
type: 'string',
enum: filterParams.memberTypeList,
"x-component-props": {
placeholder: '会员类型',
style: {
width: 160
}
}
},
roleId: {
type: 'string',
enum: filterParams.roleList,
"x-component-props": {
placeholder: '会员角色',
style: {
width: 160
}
}
},
level: {
type: 'string',
enum: filterParams.levelList,
"x-component-props": {
placeholder: '会员等级',
style: {
width: 160
}
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
// 会员弹框高级筛选
const formMember: ISchema = {
type: 'object',
properties: {
name: {
memberName: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
......@@ -480,7 +399,7 @@ const PaySetting: React.FC<{}> = () => {
columns={columnsSetMember}
rowSelection={memberRowSelection}
fetchTableData={params => fetchMemberList(params)}
// modalType='payStrategyFilter'
modalType='none'
formilyProps={
{
ctx: {
......@@ -490,7 +409,7 @@ const PaySetting: React.FC<{}> = () => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
'memberName',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment