261024
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import request from "@/utils/request";
|
||||
import type { ApiResult, PageResult } from "@/api";
|
||||
import type { ThinkOrder, ThinkOrderParam } from "./model";
|
||||
import type {
|
||||
ThinkOrder,
|
||||
ThinkOrderParam,
|
||||
ThinkTrainingBusinessSection
|
||||
} from "./model";
|
||||
import { THINK_API_URL } from "@/config/setting";
|
||||
|
||||
/**
|
||||
@@ -76,6 +80,20 @@ export async function updateThinkOrder(data: ThinkOrder) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置已开票
|
||||
*/
|
||||
export async function setThinkOrderInvoice(ids: (number | undefined)[]) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + "/think/think-order/set-invoice",
|
||||
ids
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function updateBatchThinkOrder(data: ThinkOrder[]) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
THINK_API_URL + "/think/think-order/batch",
|
||||
@@ -168,3 +186,29 @@ export async function getThinkOrderExcelDataForCard(params?: ThinkOrderParam) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getThinkOrderTrainingBusinessData(
|
||||
params?: ThinkOrderParam
|
||||
) {
|
||||
const res = await request.post<ApiResult<ThinkTrainingBusinessSection[]>>(
|
||||
THINK_API_URL + "/think/think-order/training-business-data",
|
||||
params
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function exportThinkOrderTrainingBusiness(
|
||||
params?: ThinkOrderParam
|
||||
) {
|
||||
const res = await request.post<ApiResult<ThinkOrder>>(
|
||||
THINK_API_URL + "/think/think-order/training-business-export",
|
||||
params
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -98,4 +98,25 @@ export interface ThinkOrderParam extends PageParam {
|
||||
siteName?: string;
|
||||
keywords?: string;
|
||||
wechatOrder?: string;
|
||||
createTimeStart?: number | string;
|
||||
createTimeEnd?: number | string;
|
||||
}
|
||||
|
||||
export interface ThinkTrainingBusinessRow {
|
||||
trainingInstitutionName?: string;
|
||||
openCount?: number;
|
||||
openAmount?: number | string;
|
||||
verifyCount?: number;
|
||||
verifyAmount?: number | string;
|
||||
expiredCount?: number;
|
||||
expiredAmount?: number | string;
|
||||
unverifiedCount?: number;
|
||||
remainingAmount?: number | string;
|
||||
}
|
||||
|
||||
export interface ThinkTrainingBusinessSection {
|
||||
key?: string;
|
||||
title?: string;
|
||||
rows?: ThinkTrainingBusinessRow[];
|
||||
total?: ThinkTrainingBusinessRow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user