feat: 项目管理列表搜索、新增/编辑

This commit is contained in:
Zzz1zz
2025-08-06 23:26:38 +08:00
parent 40a28f38cb
commit 52102d2e72
17 changed files with 843 additions and 68 deletions
+74
View File
@@ -0,0 +1,74 @@
import axios from 'axios';
import {
CommonProvinceRes,
CommonCityRes,
CommonDistrictRes,
AllProjectIdNameListRes,
AllBuildingIdNameListRes,
AllFloorIdNameListRes,
AllInvoiceTypeIdNameListRes,
AllFilingTypeIdNameListRes,
UploadParam,
BankListRes,
} from '@/types/comm';
import { HttpResponse } from './interceptor';
export interface ProjectRecord {
id: string;
name: string;
type: string;
}
// 省份列表
export function getProvinceList(): Promise<CommonProvinceRes> {
return axios.get(`common/getProvinceList`);
}
// 城市列表
export function getCityListByProvinceId(id: number): Promise<CommonCityRes> {
return axios.get(`common/getCityList?province_id=${id}`);
}
// 区域列表
export function getDistrictListByCityId(
id: number
): Promise<CommonDistrictRes> {
return axios.get(`common/getDistrictList?city_id=${id}`);
}
// 全部项目(id,名称)列表
export function getAllProjectIdNameList(): Promise<AllProjectIdNameListRes> {
return axios.get(`common/getAllProjectList`);
}
// 全部楼栋(id,名称)列表(根据项目id查询)
export function getAllBuildingIdNameList(
id: number
): Promise<AllBuildingIdNameListRes> {
return axios.get(`common/getAllBuildingList?project_id=${id}`);
}
// 全部楼层(id,名称)列表(根据楼栋id查询)
export function getAllFloorIdNameList(
id: number
): Promise<AllFloorIdNameListRes> {
return axios.get(`common/getAllFloorList?building_id=${id}`);
}
// 发票类型列表
export function getInvoiceTypeList(): Promise<AllInvoiceTypeIdNameListRes> {
return axios.get(`common/getInvoiceTypeList`);
}
// 租客归档类型列表
export function getFilingTypeList(): Promise<AllFilingTypeIdNameListRes> {
return axios.get(`common/getFilingTypeList`);
}
// 上传文档
export function ossUpload(
params: UploadParam | FormData
): Promise<HttpResponse> {
return axios.post('common/ossUpload', params);
}
// 下载文档
export function ossDownload(key: string): Promise<HttpResponse> {
return axios.get(`common/ossDownload?key=${key}`);
}
// 银行列表
export function getBanksList(keyword: string): Promise<BankListRes> {
return axios.post('common/getBanksList', { keyword });
}