搜索弄成全局
This commit is contained in:
@ -10,14 +10,13 @@ import { connect } from 'umi';
|
||||
import SupplierViewModal from './components/SupplierViewModal';
|
||||
import SupplierDetailModal from './components/SupplierDetailModal';
|
||||
import CategorySelector from '@/components/CategorySelector';
|
||||
import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect'
|
||||
import AccessStatusSelect from '@/components/CommonSelect/AccessStatusSelect'
|
||||
//本地服务/接口
|
||||
import { getPageMy } from './services';
|
||||
//统一列表分页
|
||||
import tableProps from '@/utils/tableProps'
|
||||
|
||||
const { Option } = Select;
|
||||
//下拉数据接口
|
||||
type OptionType = { label: string; value: string };
|
||||
// 列表数据接口
|
||||
interface Data {
|
||||
id: number;
|
||||
@ -45,10 +44,6 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
const [detailVisible, setDetailVisible] = useState(false);
|
||||
//查看、准入明细 参数传递
|
||||
const [currentRecord, setCurrentRecord] = useState('');
|
||||
// 境内/境外下拉数据
|
||||
const [regionOptions, setRegionOptions] = useState<OptionType[]>([]);
|
||||
// 准入状态
|
||||
const [storeOptions, setStoreOptions] = useState<OptionType[]>([]);
|
||||
// 导出
|
||||
const handleExport = async () => {
|
||||
window.open(
|
||||
@ -85,20 +80,6 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
};
|
||||
// 初始化
|
||||
useEffect(() => {
|
||||
// 境内/境外 下拉
|
||||
setRegionOptions([
|
||||
{ label: '境内企业', value: 'dvs' },
|
||||
{ label: '境外企业', value: 'ovs' },
|
||||
{ label: '个人', value: 'pe' },
|
||||
])
|
||||
|
||||
// 准入状态下拉
|
||||
setStoreOptions([
|
||||
{ label: '未准入', value: '0' },
|
||||
{ label: '已准入', value: '1' },
|
||||
{ label: '退出', value: '2' },
|
||||
])
|
||||
|
||||
getList();
|
||||
}, []);
|
||||
|
||||
@ -205,18 +186,10 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
<CategorySelector multiple={false} style={{ width: 140 }} />
|
||||
</Form.Item>
|
||||
<Form.Item name="accessStatus" label="准入状态">
|
||||
<Select style={{ width: 140 }} allowClear placeholder="请选择准入状态">
|
||||
{storeOptions.map(opt => (
|
||||
<Option key={opt.value} value={opt.value}>{opt.label}</Option>
|
||||
))}
|
||||
</Select>
|
||||
<AccessStatusSelect/>
|
||||
</Form.Item>
|
||||
<Form.Item name="supplierType" label="境内/境外">
|
||||
<Select style={{ width: 140 }} allowClear placeholder="请选择境内/境外" >
|
||||
{regionOptions.map(opt => (
|
||||
<Option key={opt.value} value={opt.value}>{opt.label}</Option>
|
||||
))}
|
||||
</Select>
|
||||
<Form.Item name="supplierType" label="企业类型">
|
||||
<RegionTypeSelect />
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button className="buttonSubmit" type="primary" htmlType="submit" icon={<SearchOutlined />} onClick={handleSearch} >
|
||||
|
Reference in New Issue
Block a user