first version
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import createAxios from '@/utils/request';
|
||||
import type ICustomerLevel from '@/domain/iCustomerLevel.ts';
|
||||
|
||||
/** 客户等级下拉选项(门店表单 / 价格矩阵用) */
|
||||
export async function getLevelOptions() {
|
||||
return createAxios<ICustomerLevel[]>({
|
||||
url: '/customer/level/options',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import createAxios from '@/utils/request';
|
||||
|
||||
export interface MiniUserBindParams {
|
||||
/** 1门店 2供应商 */
|
||||
type: number;
|
||||
store_id?: number;
|
||||
supplier_id?: number;
|
||||
}
|
||||
|
||||
/** 绑定门店/供应商 */
|
||||
export async function bindMiniUser(id: number, data: MiniUserBindParams) {
|
||||
return createAxios({
|
||||
url: `/customer/miniUser/${id}/bind`,
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 启用/停用小程序用户 */
|
||||
export async function toggleMiniUserStatus(id: number, status: number) {
|
||||
return createAxios({
|
||||
url: `/customer/miniUser/${id}/status`,
|
||||
method: 'put',
|
||||
data: { status },
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import createAxios from '@/utils/request';
|
||||
import type IStore from '@/domain/iStore.ts';
|
||||
|
||||
/** 门店下拉选项(小程序用户绑定、订单筛选用) */
|
||||
export async function getStoreOptions() {
|
||||
return createAxios<IStore[]>({
|
||||
url: '/customer/store/options',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import createAxios from '@/utils/request';
|
||||
import type ISupplier from '@/domain/iSupplier.ts';
|
||||
|
||||
/** 供应商下拉选项 */
|
||||
export async function getSupplierOptions() {
|
||||
return createAxios<ISupplier[]>({
|
||||
url: '/customer/supplier/options',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user