提交 b7ad3789 作者: ZhangLingKun

功能:服务列表筛选

上级 7fbc6486
...@@ -367,3 +367,39 @@ export type listInspectionPriceUnitType = InterFunction< ...@@ -367,3 +367,39 @@ export type listInspectionPriceUnitType = InterFunction<
>; >;
// 删除单位服务 // 删除单位服务
export type companyInspectionRemoveType = InterFunction<{ id: number }, NonNullable<unknown>>; export type companyInspectionRemoveType = InterFunction<{ id: number }, NonNullable<unknown>>;
// 合作商家列表-根据合作标签id获取
export type listCompanyInfoByCoopIdType = InterListFunction<
{
coopId: number;
lat: number;
lon: number;
pageNo: number;
pageSize: number;
},
{
address: string;
brandLogo: string;
brandName: string;
companyName: string;
companyType: number;
companyUserName: string;
content: string;
creditCode: string;
fullName: string;
id: number;
lat: number;
leader: number;
licenseImg: string;
lon: number;
phoneNum: number;
remark: string;
score: string;
userAccountId: number;
backImg: string;
city: string;
distance: number;
district: string;
province: string;
backUserAccountId: number;
}
>;
...@@ -19,6 +19,7 @@ import { ...@@ -19,6 +19,7 @@ import {
getCompanyInspectionByIdType, getCompanyInspectionByIdType,
listInspectionPriceUnitType, listInspectionPriceUnitType,
companyInspectionRemoveType, companyInspectionRemoveType,
listCompanyInfoByCoopIdType,
} from '~/api/interface/mallManageType'; } from '~/api/interface/mallManageType';
export class MallManageAPI { export class MallManageAPI {
...@@ -80,4 +81,8 @@ export class MallManageAPI { ...@@ -80,4 +81,8 @@ export class MallManageAPI {
// 删除单位服务 // 删除单位服务
static companyInspectionRemove: companyInspectionRemoveType = (params) => static companyInspectionRemove: companyInspectionRemoveType = (params) =>
axios.get('/pms/company-inspection/remove', { params }); axios.get('/pms/company-inspection/remove', { params });
// 合作商家列表-根据合作标签id获取
static listCompanyInfoByCoopId: listCompanyInfoByCoopIdType = (params) =>
axios.get('/userapp/cooperation/listCompanyInfoByCoopId', { params });
} }
...@@ -144,10 +144,27 @@ const ServiceListView = () => { ...@@ -144,10 +144,27 @@ const ServiceListView = () => {
// 获取商品的价格单位 // 获取商品的价格单位
const getPriceUnitStr = (i: TableType[0]) => const getPriceUnitStr = (i: TableType[0]) =>
priceUnitList.find((j) => j.id === i?.inspectionPriceUnitId)?.unitName || ''; priceUnitList.find((j) => j.id === i?.inspectionPriceUnitId)?.unitName || '';
// 飞手团队列表
const [companyInfoList, setCompanyInfoList] = useState<{ label: string; value: number }[]>([]);
// 获取飞手团队列表
const getListCompanyInfoByCoopId = async () => {
const res = await MallManageAPI.listCompanyInfoByCoopId({
lat: 22,
lon: 113,
pageNo: 1,
pageSize: 9999,
coopId: 5,
});
if (res && res.code === '200') {
const list = res.result?.list?.map((i) => ({ label: i.companyName, value: i.id }));
setCompanyInfoList(list || []);
}
};
// 组件挂载 // 组件挂载
useEffect(() => { useEffect(() => {
getIndustryList().then(); getIndustryList().then();
getPriceUnit().then(); getPriceUnit().then();
getListCompanyInfoByCoopId().then();
getTableList().then(); getTableList().then();
}, []); }, []);
// 表格结构 // 表格结构
...@@ -283,6 +300,13 @@ const ServiceListView = () => { ...@@ -283,6 +300,13 @@ const ServiceListView = () => {
name: 'cascaderData', name: 'cascaderData',
options: industryList, options: industryList,
}, },
{
label: '作业团队',
placeholder: '请选择作业团队',
type: 'Select',
name: 'companyInfoId',
options: companyInfoList,
},
]} ]}
searchData={onFinish} searchData={onFinish}
/> />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论