注册地市

This commit is contained in:
孙景学
2025-07-24 09:27:14 +08:00
parent 2267ab2e6e
commit ae0bca7f7e
3 changed files with 17 additions and 13 deletions

View File

@ -25,6 +25,7 @@ import { getRegionTree, getregionInternational } from '@/servers/api/register';
import { getDictList } from '@/servers/api/dicts'; import { getDictList } from '@/servers/api/dicts';
import type { DictItem } from '@/servers/api/dicts'; import type { DictItem } from '@/servers/api/dicts';
import FileUpload from '@/components/FileUpload/FileUpload'; import FileUpload from '@/components/FileUpload/FileUpload';
import DictRegionSelect from '@/components/CommonSelect/DictRegionSelect'
const { Option } = Select; const { Option } = Select;
@ -407,12 +408,12 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form, su
}, []); }, []);
useEffect(() => { useEffect(() => {
if (supplierType) { if (supplierType) {
const submitInterface = supplierType === 'dvs' ? getRegionTree : getregionInternational; // const submitInterface = supplierType === 'dvs' ? getRegionTree : getregionInternational;
submitInterface().then((res) => { // submitInterface({ pId: 0 }).then((res) => {
if (res.code === 200) { // if (res.code === 200) {
setAddressOptions(convertToCascaderOptions(res.data)); // setAddressOptions(convertToCascaderOptions(res.data));
} // }
}); // });
} }
}, [supplierType]); }, [supplierType]);
@ -592,7 +593,8 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form, su
noStyle noStyle
rules={[{ required: true, message: '请选择地址' }]} rules={[{ required: true, message: '请选择地址' }]}
> >
<Cascader <DictRegionSelect onChange={(value:any) => handleAddressChange(value as string[], record)} />
{/* <Cascader
options={addressOptions} options={addressOptions}
placeholder="请选择地址" placeholder="请选择地址"
onChange={(value) => handleAddressChange(value, record)} onChange={(value) => handleAddressChange(value, record)}
@ -608,7 +610,7 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form, su
}); });
}, },
}} }}
/> /> */}
</Form.Item> </Form.Item>
</> </>
), ),

View File

@ -53,7 +53,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
} }
}); });
getregionInternational().then((res) => { getregionInternational({ pId: 0 }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
setRegionOptions(res.data); setRegionOptions(res.data);
} }

View File

@ -28,11 +28,13 @@ export async function getRegionTree(){
method: 'GET', method: 'GET',
}) })
} }
interface getregionInternationalParams {
// 获取全球 pId: string | number;
export async function getregionInternational(){ }
return request('/api/cosco/dictRegion/regionInternational', { export async function getregionInternational(params:getregionInternationalParams){
return request('/api/v1/dictRegionInternational/getChild', {
method: 'GET', method: 'GET',
params
}) })
} }
export async function getAllAreaList(){ export async function getAllAreaList(){