feat(shopDealerApply): 添加类型筛选功能
- 在 ShopDealerApplyParam 接口中添加 type 字段 - 在客户列表和交易列表中实现类型筛选 - 修改 API 调用,增加 type 参数以实现不同类型的查询
This commit is contained in:
@@ -45,6 +45,7 @@ export interface ShopDealerApply {
|
|||||||
*/
|
*/
|
||||||
export interface ShopDealerApplyParam extends PageParam {
|
export interface ShopDealerApplyParam extends PageParam {
|
||||||
applyId?: number;
|
applyId?: number;
|
||||||
|
type?: number;
|
||||||
mobile?: string;
|
mobile?: string;
|
||||||
userId?: number;
|
userId?: number;
|
||||||
keywords?: string;
|
keywords?: string;
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ const CustomerIndex = () => {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
// 构建API参数,根据状态筛选
|
// 构建API参数,根据状态筛选
|
||||||
const params: any = {};
|
const params: any = {
|
||||||
|
type: 0
|
||||||
|
};
|
||||||
const applyStatus = mapCustomerStatusToApplyStatus(statusFilter || activeTab);
|
const applyStatus = mapCustomerStatusToApplyStatus(statusFilter || activeTab);
|
||||||
if (applyStatus !== undefined) {
|
if (applyStatus !== undefined) {
|
||||||
params.applyStatus = applyStatus;
|
params.applyStatus = applyStatus;
|
||||||
@@ -91,10 +93,10 @@ const CustomerIndex = () => {
|
|||||||
try {
|
try {
|
||||||
// 并行获取各状态的数量
|
// 并行获取各状态的数量
|
||||||
const [allRes, pendingRes, signedRes, cancelledRes] = await Promise.all([
|
const [allRes, pendingRes, signedRes, cancelledRes] = await Promise.all([
|
||||||
pageShopDealerApply({}), // 全部
|
pageShopDealerApply({type:0}), // 全部
|
||||||
pageShopDealerApply({applyStatus: 10}), // 跟进中
|
pageShopDealerApply({applyStatus: 10,type:0}), // 跟进中
|
||||||
pageShopDealerApply({applyStatus: 20}), // 已签约
|
pageShopDealerApply({applyStatus: 20,type:0}), // 已签约
|
||||||
pageShopDealerApply({applyStatus: 30}) // 已取消
|
pageShopDealerApply({applyStatus: 30,type:0}) // 已取消
|
||||||
]);
|
]);
|
||||||
|
|
||||||
setStatusCounts({
|
setStatusCounts({
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ const CustomerTrading = () => {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
// 构建API参数,根据状态筛选
|
// 构建API参数,根据状态筛选
|
||||||
const params: any = {};
|
const params: any = {
|
||||||
|
type: 3
|
||||||
|
};
|
||||||
|
|
||||||
const res = await pageShopDealerApply(params);
|
const res = await pageShopDealerApply(params);
|
||||||
if (res?.list) {
|
if (res?.list) {
|
||||||
|
|||||||
Reference in New Issue
Block a user