Commit 4a4cd802 authored by XieZhiXiong's avatar XieZhiXiong

该更 SelectSearch组件

parent 8050f861
......@@ -97,28 +97,6 @@ const BillsForm: React.FC<BillsFormProps> = ({
},
]
// 获取品牌
const fetchBrand = async () => {
const res = await PublicApi.getProductSelectGetSelectBrand({
name: '',
});
if (res.code === 1000) {
return res.data;
}
return [];
}
// 获取会员品类
const fetchCustomerCategory = async () => {
const res = await PublicApi.getProductSelectGetSelectCustomerCategory({
name: '',
});
if (res.code === 1000) {
return res.data;
}
return [];
}
// 获取单据详情
const getBillInfo = () => {
if (!id) {
......@@ -904,8 +882,6 @@ const BillsForm: React.FC<BillsFormProps> = ({
'name',
FORM_FILTER_PATH,
);
useAsyncSelect('brandId', fetchBrand, ['name', 'id']);
useAsyncSelect('customerCategoryId', fetchCustomerCategory, ['name', 'id']);
},
inline: false,
}
......
......@@ -18,6 +18,7 @@ import {
DEPENDENT_DOC_INTERNAL,
} from '@/constants';
import { PATTERN_MAPS } from '@/constants/regExp';
import { PublicApi } from '@/services/api';
const orderDetailSchema: ISchema = {
type: 'object',
......@@ -777,18 +778,25 @@ export const goodsSearchSchema: ISchema = {
},
},
customerCategoryId: {
type: 'string',
type: 'string',
'x-component': 'SearchSelect',
'x-component-props': {
placeholder: '品类',
allowClear: true,
fetchSearch: PublicApi.getProductSelectGetSelectCustomerCategory,
style: {
width: '100%',
}
},
},
brandId: {
type: 'string',
enum: [],
'x-component': 'SearchSelect',
'x-component-props': {
placeholder: '品牌',
allowClear: true,
fetchSearch: PublicApi.getProductSelectGetSelectBrand,
style: {
width: '100%',
}
},
},
submit: {
......
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