注册地市
This commit is contained in:
@ -25,6 +25,7 @@ import { getRegionTree, getregionInternational } from '@/servers/api/register';
|
||||
import { getDictList } from '@/servers/api/dicts';
|
||||
import type { DictItem } from '@/servers/api/dicts';
|
||||
import FileUpload from '@/components/FileUpload/FileUpload';
|
||||
import DictRegionSelect from '@/components/CommonSelect/DictRegionSelect'
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
@ -407,12 +408,12 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form, su
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
if (supplierType) {
|
||||
const submitInterface = supplierType === 'dvs' ? getRegionTree : getregionInternational;
|
||||
submitInterface().then((res) => {
|
||||
if (res.code === 200) {
|
||||
setAddressOptions(convertToCascaderOptions(res.data));
|
||||
}
|
||||
});
|
||||
// const submitInterface = supplierType === 'dvs' ? getRegionTree : getregionInternational;
|
||||
// submitInterface({ pId: 0 }).then((res) => {
|
||||
// if (res.code === 200) {
|
||||
// setAddressOptions(convertToCascaderOptions(res.data));
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}, [supplierType]);
|
||||
|
||||
@ -592,7 +593,8 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form, su
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请选择地址' }]}
|
||||
>
|
||||
<Cascader
|
||||
<DictRegionSelect onChange={(value:any) => handleAddressChange(value as string[], record)} />
|
||||
{/* <Cascader
|
||||
options={addressOptions}
|
||||
placeholder="请选择地址"
|
||||
onChange={(value) => handleAddressChange(value, record)}
|
||||
@ -608,7 +610,7 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form, su
|
||||
});
|
||||
},
|
||||
}}
|
||||
/>
|
||||
/> */}
|
||||
</Form.Item>
|
||||
</>
|
||||
),
|
||||
|
@ -53,7 +53,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
|
||||
}
|
||||
});
|
||||
|
||||
getregionInternational().then((res) => {
|
||||
getregionInternational({ pId: 0 }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
setRegionOptions(res.data);
|
||||
}
|
||||
|
@ -28,11 +28,13 @@ export async function getRegionTree(){
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取全球
|
||||
export async function getregionInternational(){
|
||||
return request('/api/cosco/dictRegion/regionInternational', {
|
||||
interface getregionInternationalParams {
|
||||
pId: string | number;
|
||||
}
|
||||
export async function getregionInternational(params:getregionInternationalParams){
|
||||
return request('/api/v1/dictRegionInternational/getChild', {
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
}
|
||||
export async function getAllAreaList(){
|
||||
|
Reference in New Issue
Block a user