Merge remote-tracking branch 'yudao/dev' into dev
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 40 KiB |
@@ -332,22 +332,22 @@ setupVbenVxeTable({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// add by 星语:数量格式化,例如说:金额
|
// add by 星语:数量格式化,保留 3 位
|
||||||
vxeUI.formats.add('formatNumber', {
|
vxeUI.formats.add('formatAmount3', {
|
||||||
tableCellFormatMethod({ cellValue }) {
|
tableCellFormatMethod({ cellValue }) {
|
||||||
return erpCountInputFormatter(cellValue);
|
return erpCountInputFormatter(cellValue);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// add by 星语:数量格式化,保留 2 位
|
||||||
vxeUI.formats.add('formatAmount2', {
|
vxeUI.formats.add('formatAmount2', {
|
||||||
tableCellFormatMethod({ cellValue }, digits = 2) {
|
tableCellFormatMethod({ cellValue }, digits = 2) {
|
||||||
return `${erpNumberFormatter(cellValue, digits)}元`;
|
return `${erpNumberFormatter(cellValue, digits)}`;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
vxeUI.formats.add('formatFenToYuanAmount', {
|
vxeUI.formats.add('formatFenToYuanAmount', {
|
||||||
tableCellFormatMethod({ cellValue }, digits = 2) {
|
tableCellFormatMethod({ cellValue }, digits = 2) {
|
||||||
return `${erpNumberFormatter(fenToYuan(cellValue), digits)}元`;
|
return `${erpNumberFormatter(fenToYuan(cellValue), digits)}`;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export namespace CrmContractApi {
|
|||||||
creatorName: string;
|
creatorName: string;
|
||||||
updateTime?: Date;
|
updateTime?: Date;
|
||||||
products?: ContractProduct[];
|
products?: ContractProduct[];
|
||||||
|
contactName?: string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ export namespace CrmCustomerApi {
|
|||||||
updateTime: Date; // 更新时间
|
updateTime: Date; // 更新时间
|
||||||
poolDay?: number; // 距离进入公海天数
|
poolDay?: number; // 距离进入公海天数
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CustomerImport {
|
export interface CustomerImport {
|
||||||
ownerUserId: number;
|
ownerUserId: number;
|
||||||
file: File;
|
file: File;
|
||||||
|
|||||||
@@ -2,35 +2,58 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
namespace ErpFinancePaymentApi {
|
export namespace ErpFinancePaymentApi {
|
||||||
|
/** 付款单项 */
|
||||||
|
export interface FinancePaymentItem {
|
||||||
|
id?: number;
|
||||||
|
row_id?: number; // 前端使用的临时ID
|
||||||
|
bizId: number; // 业务ID
|
||||||
|
bizType: number; // 业务类型
|
||||||
|
bizNo: string; // 业务编号
|
||||||
|
totalPrice: number; // 应付金额
|
||||||
|
paidPrice: number; // 已付金额
|
||||||
|
paymentPrice: number; // 本次付款
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
|
||||||
/** 付款单信息 */
|
/** 付款单信息 */
|
||||||
export interface FinancePayment {
|
export interface FinancePayment {
|
||||||
id?: number; // 付款单编号
|
id?: number; // 付款单编号
|
||||||
no: string; // 付款单号
|
no: string; // 付款单号
|
||||||
supplierId: number; // 供应商编号
|
supplierId: number; // 供应商编号
|
||||||
|
supplierName?: string; // 供应商名称
|
||||||
paymentTime: Date; // 付款时间
|
paymentTime: Date; // 付款时间
|
||||||
totalPrice: number; // 合计金额,单位:元
|
totalPrice: number; // 合计金额,单位:元
|
||||||
|
discountPrice: number; // 优惠金额
|
||||||
|
paymentPrice: number; // 实际付款金额
|
||||||
status: number; // 状态
|
status: number; // 状态
|
||||||
remark: string; // 备注
|
remark: string; // 备注
|
||||||
|
fileUrl?: string; // 附件
|
||||||
|
accountId?: number; // 付款账户
|
||||||
|
accountName?: string; // 账户名称
|
||||||
|
financeUserId?: number; // 财务人员
|
||||||
|
financeUserName?: string; // 财务人员姓名
|
||||||
|
creator?: string; // 创建人
|
||||||
|
creatorName?: string; // 创建人姓名
|
||||||
|
items?: FinancePaymentItem[]; // 付款明细
|
||||||
|
bizNo?: string; // 业务单号
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 付款单分页查询参数 */
|
/** 付款单分页查询参数 */
|
||||||
export interface FinancePaymentPageParams extends PageParam {
|
export interface FinancePaymentPageParams extends PageParam {
|
||||||
no?: string;
|
no?: string;
|
||||||
|
paymentTime?: [string, string];
|
||||||
supplierId?: number;
|
supplierId?: number;
|
||||||
|
creator?: string;
|
||||||
|
financeUserId?: number;
|
||||||
|
accountId?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
remark?: string;
|
||||||
|
bizNo?: string;
|
||||||
/** 付款单状态更新参数 */
|
|
||||||
export interface FinancePaymentStatusParams {
|
|
||||||
id: number;
|
|
||||||
status: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 查询付款单分页 */
|
||||||
* 查询付款单分页
|
|
||||||
*/
|
|
||||||
export function getFinancePaymentPage(
|
export function getFinancePaymentPage(
|
||||||
params: ErpFinancePaymentApi.FinancePaymentPageParams,
|
params: ErpFinancePaymentApi.FinancePaymentPageParams,
|
||||||
) {
|
) {
|
||||||
@@ -42,47 +65,35 @@ export function getFinancePaymentPage(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 查询付款单详情 */
|
||||||
* 查询付款单详情
|
|
||||||
*/
|
|
||||||
export function getFinancePayment(id: number) {
|
export function getFinancePayment(id: number) {
|
||||||
return requestClient.get<ErpFinancePaymentApi.FinancePayment>(
|
return requestClient.get<ErpFinancePaymentApi.FinancePayment>(
|
||||||
`/erp/finance-payment/get?id=${id}`,
|
`/erp/finance-payment/get?id=${id}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 新增付款单 */
|
||||||
* 新增付款单
|
|
||||||
*/
|
|
||||||
export function createFinancePayment(
|
export function createFinancePayment(
|
||||||
data: ErpFinancePaymentApi.FinancePayment,
|
data: ErpFinancePaymentApi.FinancePayment,
|
||||||
) {
|
) {
|
||||||
return requestClient.post('/erp/finance-payment/create', data);
|
return requestClient.post('/erp/finance-payment/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 修改付款单 */
|
||||||
* 修改付款单
|
|
||||||
*/
|
|
||||||
export function updateFinancePayment(
|
export function updateFinancePayment(
|
||||||
data: ErpFinancePaymentApi.FinancePayment,
|
data: ErpFinancePaymentApi.FinancePayment,
|
||||||
) {
|
) {
|
||||||
return requestClient.put('/erp/finance-payment/update', data);
|
return requestClient.put('/erp/finance-payment/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 更新付款单的状态 */
|
||||||
* 更新付款单的状态
|
export function updateFinancePaymentStatus(id: number, status: number) {
|
||||||
*/
|
|
||||||
export function updateFinancePaymentStatus(
|
|
||||||
params: ErpFinancePaymentApi.FinancePaymentStatusParams,
|
|
||||||
) {
|
|
||||||
return requestClient.put('/erp/finance-payment/update-status', null, {
|
return requestClient.put('/erp/finance-payment/update-status', null, {
|
||||||
params,
|
params: { id, status },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除付款单 */
|
||||||
* 删除付款单
|
|
||||||
*/
|
|
||||||
export function deleteFinancePayment(ids: number[]) {
|
export function deleteFinancePayment(ids: number[]) {
|
||||||
return requestClient.delete('/erp/finance-payment/delete', {
|
return requestClient.delete('/erp/finance-payment/delete', {
|
||||||
params: {
|
params: {
|
||||||
@@ -91,9 +102,7 @@ export function deleteFinancePayment(ids: number[]) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 导出付款单 Excel */
|
||||||
* 导出付款单 Excel
|
|
||||||
*/
|
|
||||||
export function exportFinancePayment(
|
export function exportFinancePayment(
|
||||||
params: ErpFinancePaymentApi.FinancePaymentPageParams,
|
params: ErpFinancePaymentApi.FinancePaymentPageParams,
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -3,34 +3,57 @@ import type { PageParam, PageResult } from '@vben/request';
|
|||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
namespace ErpFinanceReceiptApi {
|
namespace ErpFinanceReceiptApi {
|
||||||
|
/** 收款单项 */
|
||||||
|
export interface FinanceReceiptItem {
|
||||||
|
id?: number;
|
||||||
|
row_id?: number; // 前端使用的临时ID
|
||||||
|
bizId: number; // 业务ID
|
||||||
|
bizType: number; // 业务类型
|
||||||
|
bizNo: string; // 业务编号
|
||||||
|
totalPrice: number; // 应收金额
|
||||||
|
receiptedPrice: number; // 已收金额
|
||||||
|
receiptPrice: number; // 本次收款
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
|
||||||
/** 收款单信息 */
|
/** 收款单信息 */
|
||||||
export interface FinanceReceipt {
|
export interface FinanceReceipt {
|
||||||
id?: number; // 收款单编号
|
id?: number; // 收款单编号
|
||||||
no: string; // 收款单号
|
no: string; // 收款单号
|
||||||
customerId: number; // 客户编号
|
customerId: number; // 客户编号
|
||||||
|
customerName?: string; // 客户名称
|
||||||
receiptTime: Date; // 收款时间
|
receiptTime: Date; // 收款时间
|
||||||
totalPrice: number; // 合计金额,单位:元
|
totalPrice: number; // 合计金额,单位:元
|
||||||
|
discountPrice: number; // 优惠金额
|
||||||
|
receiptPrice: number; // 实际收款金额
|
||||||
status: number; // 状态
|
status: number; // 状态
|
||||||
remark: string; // 备注
|
remark: string; // 备注
|
||||||
|
fileUrl?: string; // 附件
|
||||||
|
accountId?: number; // 收款账户
|
||||||
|
accountName?: string; // 账户名称
|
||||||
|
financeUserId?: number; // 财务人员
|
||||||
|
financeUserName?: string; // 财务人员姓名
|
||||||
|
creator?: string; // 创建人
|
||||||
|
creatorName?: string; // 创建人姓名
|
||||||
|
items?: FinanceReceiptItem[]; // 收款明细
|
||||||
|
bizNo?: string; // 业务单号
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 收款单分页查询参数 */
|
/** 收款单分页查询参数 */
|
||||||
export interface FinanceReceiptPageParams extends PageParam {
|
export interface FinanceReceiptPageParams extends PageParam {
|
||||||
no?: string;
|
no?: string;
|
||||||
|
receiptTime?: [string, string];
|
||||||
customerId?: number;
|
customerId?: number;
|
||||||
|
creator?: string;
|
||||||
|
financeUserId?: number;
|
||||||
|
accountId?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
remark?: string;
|
||||||
|
bizNo?: string;
|
||||||
/** 收款单状态更新参数 */
|
|
||||||
export interface FinanceReceiptStatusParams {
|
|
||||||
id: number;
|
|
||||||
status: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 查询收款单分页 */
|
||||||
* 查询收款单分页
|
|
||||||
*/
|
|
||||||
export function getFinanceReceiptPage(
|
export function getFinanceReceiptPage(
|
||||||
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
|
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
|
||||||
) {
|
) {
|
||||||
@@ -42,47 +65,35 @@ export function getFinanceReceiptPage(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 查询收款单详情 */
|
||||||
* 查询收款单详情
|
|
||||||
*/
|
|
||||||
export function getFinanceReceipt(id: number) {
|
export function getFinanceReceipt(id: number) {
|
||||||
return requestClient.get<ErpFinanceReceiptApi.FinanceReceipt>(
|
return requestClient.get<ErpFinanceReceiptApi.FinanceReceipt>(
|
||||||
`/erp/finance-receipt/get?id=${id}`,
|
`/erp/finance-receipt/get?id=${id}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 新增收款单 */
|
||||||
* 新增收款单
|
|
||||||
*/
|
|
||||||
export function createFinanceReceipt(
|
export function createFinanceReceipt(
|
||||||
data: ErpFinanceReceiptApi.FinanceReceipt,
|
data: ErpFinanceReceiptApi.FinanceReceipt,
|
||||||
) {
|
) {
|
||||||
return requestClient.post('/erp/finance-receipt/create', data);
|
return requestClient.post('/erp/finance-receipt/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 修改收款单 */
|
||||||
* 修改收款单
|
|
||||||
*/
|
|
||||||
export function updateFinanceReceipt(
|
export function updateFinanceReceipt(
|
||||||
data: ErpFinanceReceiptApi.FinanceReceipt,
|
data: ErpFinanceReceiptApi.FinanceReceipt,
|
||||||
) {
|
) {
|
||||||
return requestClient.put('/erp/finance-receipt/update', data);
|
return requestClient.put('/erp/finance-receipt/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 更新收款单的状态 */
|
||||||
* 更新收款单的状态
|
export function updateFinanceReceiptStatus(id: number, status: number) {
|
||||||
*/
|
|
||||||
export function updateFinanceReceiptStatus(
|
|
||||||
params: ErpFinanceReceiptApi.FinanceReceiptStatusParams,
|
|
||||||
) {
|
|
||||||
return requestClient.put('/erp/finance-receipt/update-status', null, {
|
return requestClient.put('/erp/finance-receipt/update-status', null, {
|
||||||
params,
|
params: { id, status },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除收款单 */
|
||||||
* 删除收款单
|
|
||||||
*/
|
|
||||||
export function deleteFinanceReceipt(ids: number[]) {
|
export function deleteFinanceReceipt(ids: number[]) {
|
||||||
return requestClient.delete('/erp/finance-receipt/delete', {
|
return requestClient.delete('/erp/finance-receipt/delete', {
|
||||||
params: {
|
params: {
|
||||||
@@ -91,9 +102,7 @@ export function deleteFinanceReceipt(ids: number[]) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 导出收款单 Excel */
|
||||||
* 导出收款单 Excel
|
|
||||||
*/
|
|
||||||
export function exportFinanceReceipt(
|
export function exportFinanceReceipt(
|
||||||
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
|
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ export namespace ErpProductCategoryApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 查询产品分类列表 */
|
/** 查询产品分类列表 */
|
||||||
export function getProductCategoryList() {
|
export function getProductCategoryList(params?: any) {
|
||||||
return requestClient.get<ErpProductCategoryApi.ProductCategory[]>(
|
return requestClient.get<ErpProductCategoryApi.ProductCategory[]>(
|
||||||
'/erp/product-category/list',
|
'/erp/product-category/list',
|
||||||
|
{ params },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,13 +49,6 @@ export namespace ErpPurchaseInApi {
|
|||||||
supplierId?: number;
|
supplierId?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @nehc:updatePurchaseInStatus 是不是需要?
|
|
||||||
/** 采购入库状态更新参数 */
|
|
||||||
export interface PurchaseInStatusParams {
|
|
||||||
id: number;
|
|
||||||
status: number;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -100,12 +100,7 @@ export function updatePurchaseOrderStatus(id: number, status: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 删除采购订单 */
|
/** 删除采购订单 */
|
||||||
export function deletePurchaseOrder(id: number) {
|
export function deletePurchaseOrder(ids: number[]) {
|
||||||
return requestClient.delete(`/erp/purchase-order/delete?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 批量删除采购订单 */
|
|
||||||
export function deletePurchaseOrderList(ids: number[]) {
|
|
||||||
return requestClient.delete('/erp/purchase-order/delete', {
|
return requestClient.delete('/erp/purchase-order/delete', {
|
||||||
params: { ids: ids.join(',') },
|
params: { ids: ids.join(',') },
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -96,11 +96,9 @@ export function updatePurchaseReturn(
|
|||||||
/**
|
/**
|
||||||
* 更新采购退货的状态
|
* 更新采购退货的状态
|
||||||
*/
|
*/
|
||||||
export function updatePurchaseReturnStatus(
|
export function updatePurchaseReturnStatus(id: number, status: number) {
|
||||||
params: ErpPurchaseReturnApi.PurchaseReturnStatusParams,
|
|
||||||
) {
|
|
||||||
return requestClient.put('/erp/purchase-return/update-status', null, {
|
return requestClient.put('/erp/purchase-return/update-status', null, {
|
||||||
params,
|
params: { id, status },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export namespace ErpSaleOrderApi {
|
|||||||
depositPrice?: number; // 定金金额,单位:元
|
depositPrice?: number; // 定金金额,单位:元
|
||||||
items?: SaleOrderItem[]; // 销售订单产品明细列表
|
items?: SaleOrderItem[]; // 销售订单产品明细列表
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SaleOrderItem {
|
export interface SaleOrderItem {
|
||||||
id?: number; // 订单项编号
|
id?: number; // 订单项编号
|
||||||
orderId?: number; // 采购订单编号
|
orderId?: number; // 采购订单编号
|
||||||
@@ -66,6 +67,13 @@ export function getSaleOrder(id: number) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 查询销售订单项列表 */
|
||||||
|
export function getSaleOrderItemListByOrderId(orderId: number) {
|
||||||
|
return requestClient.get<ErpSaleOrderApi.SaleOrderItem[]>(
|
||||||
|
`/erp/sale-order/item/list-by-order-id?orderId=${orderId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** 新增销售订单 */
|
/** 新增销售订单 */
|
||||||
export function createSaleOrder(data: ErpSaleOrderApi.SaleOrder) {
|
export function createSaleOrder(data: ErpSaleOrderApi.SaleOrder) {
|
||||||
return requestClient.post('/erp/sale-order/create', data);
|
return requestClient.post('/erp/sale-order/create', data);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export namespace ErpSaleOutApi {
|
|||||||
fileUrl?: string; // 附件地址
|
fileUrl?: string; // 附件地址
|
||||||
items?: SaleOutItem[];
|
items?: SaleOutItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SaleOutItem {
|
export interface SaleOutItem {
|
||||||
count?: number;
|
count?: number;
|
||||||
id?: number;
|
id?: number;
|
||||||
@@ -49,17 +50,9 @@ export namespace ErpSaleOutApi {
|
|||||||
customerId?: number;
|
customerId?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 销售出库状态更新参数 */
|
|
||||||
export interface SaleOutStatusParams {
|
|
||||||
id: number;
|
|
||||||
status: number;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 查询销售出库分页 */
|
||||||
* 查询销售出库分页
|
|
||||||
*/
|
|
||||||
export function getSaleOutPage(params: ErpSaleOutApi.SaleOutPageParams) {
|
export function getSaleOutPage(params: ErpSaleOutApi.SaleOutPageParams) {
|
||||||
return requestClient.get<PageResult<ErpSaleOutApi.SaleOut>>(
|
return requestClient.get<PageResult<ErpSaleOutApi.SaleOut>>(
|
||||||
'/erp/sale-out/page',
|
'/erp/sale-out/page',
|
||||||
@@ -69,39 +62,29 @@ export function getSaleOutPage(params: ErpSaleOutApi.SaleOutPageParams) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 查询销售出库详情 */
|
||||||
* 查询销售出库详情
|
|
||||||
*/
|
|
||||||
export function getSaleOut(id: number) {
|
export function getSaleOut(id: number) {
|
||||||
return requestClient.get<ErpSaleOutApi.SaleOut>(`/erp/sale-out/get?id=${id}`);
|
return requestClient.get<ErpSaleOutApi.SaleOut>(`/erp/sale-out/get?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 新增销售出库 */
|
||||||
* 新增销售出库
|
|
||||||
*/
|
|
||||||
export function createSaleOut(data: ErpSaleOutApi.SaleOut) {
|
export function createSaleOut(data: ErpSaleOutApi.SaleOut) {
|
||||||
return requestClient.post('/erp/sale-out/create', data);
|
return requestClient.post('/erp/sale-out/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 修改销售出库 */
|
||||||
* 修改销售出库
|
|
||||||
*/
|
|
||||||
export function updateSaleOut(data: ErpSaleOutApi.SaleOut) {
|
export function updateSaleOut(data: ErpSaleOutApi.SaleOut) {
|
||||||
return requestClient.put('/erp/sale-out/update', data);
|
return requestClient.put('/erp/sale-out/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 更新销售出库的状态 */
|
||||||
* 更新销售出库的状态
|
export function updateSaleOutStatus(id: number, status: number) {
|
||||||
*/
|
|
||||||
export function updateSaleOutStatus(params: ErpSaleOutApi.SaleOutStatusParams) {
|
|
||||||
return requestClient.put('/erp/sale-out/update-status', null, {
|
return requestClient.put('/erp/sale-out/update-status', null, {
|
||||||
params,
|
params: { id, status },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除销售出库 */
|
||||||
* 删除销售出库
|
|
||||||
*/
|
|
||||||
export function deleteSaleOut(ids: number[]) {
|
export function deleteSaleOut(ids: number[]) {
|
||||||
return requestClient.delete('/erp/sale-out/delete', {
|
return requestClient.delete('/erp/sale-out/delete', {
|
||||||
params: {
|
params: {
|
||||||
@@ -110,9 +93,7 @@ export function deleteSaleOut(ids: number[]) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 导出销售出库 Excel */
|
||||||
* 导出销售出库 Excel
|
|
||||||
*/
|
|
||||||
export function exportSaleOut(params: ErpSaleOutApi.SaleOutPageParams) {
|
export function exportSaleOut(params: ErpSaleOutApi.SaleOutPageParams) {
|
||||||
return requestClient.download('/erp/sale-out/export-excel', {
|
return requestClient.download('/erp/sale-out/export-excel', {
|
||||||
params,
|
params,
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export namespace ErpSaleReturnApi {
|
|||||||
fileUrl?: string; // 附件地址
|
fileUrl?: string; // 附件地址
|
||||||
items?: SaleReturnItem[];
|
items?: SaleReturnItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SaleReturnItem {
|
export interface SaleReturnItem {
|
||||||
count?: number;
|
count?: number;
|
||||||
id?: number;
|
id?: number;
|
||||||
@@ -48,12 +49,6 @@ export namespace ErpSaleReturnApi {
|
|||||||
customerId?: number;
|
customerId?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 销售退货状态更新参数 */
|
|
||||||
export interface SaleReturnStatusParams {
|
|
||||||
id: number;
|
|
||||||
status: number;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -96,11 +91,9 @@ export function updateSaleReturn(data: ErpSaleReturnApi.SaleReturn) {
|
|||||||
/**
|
/**
|
||||||
* 更新销售退货的状态
|
* 更新销售退货的状态
|
||||||
*/
|
*/
|
||||||
export function updateSaleReturnStatus(
|
export function updateSaleReturnStatus(id: number, status: number) {
|
||||||
params: ErpSaleReturnApi.SaleReturnStatusParams,
|
|
||||||
) {
|
|
||||||
return requestClient.put('/erp/sale-return/update-status', null, {
|
return requestClient.put('/erp/sale-return/update-status', null, {
|
||||||
params,
|
params: { id, status },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export namespace ErpStockCheckApi {
|
|||||||
creatorName?: string; // 创建人
|
creatorName?: string; // 创建人
|
||||||
items?: StockCheckItem[]; // 盘点产品清单
|
items?: StockCheckItem[]; // 盘点产品清单
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StockCheckItem {
|
export interface StockCheckItem {
|
||||||
id?: number; // 编号
|
id?: number; // 编号
|
||||||
warehouseId?: number; // 仓库编号
|
warehouseId?: number; // 仓库编号
|
||||||
@@ -38,12 +39,6 @@ export namespace ErpStockCheckApi {
|
|||||||
no?: string;
|
no?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 库存盘点单状态更新参数 */
|
|
||||||
export interface StockCheckStatusParams {
|
|
||||||
id: number;
|
|
||||||
status: number;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,11 +81,9 @@ export function updateStockCheck(data: ErpStockCheckApi.StockCheck) {
|
|||||||
/**
|
/**
|
||||||
* 更新库存盘点单的状态
|
* 更新库存盘点单的状态
|
||||||
*/
|
*/
|
||||||
export function updateStockCheckStatus(
|
export function updateStockCheckStatus(id: number, status: number) {
|
||||||
params: ErpStockCheckApi.StockCheckStatusParams,
|
|
||||||
) {
|
|
||||||
return requestClient.put('/erp/stock-check/update-status', null, {
|
return requestClient.put('/erp/stock-check/update-status', null, {
|
||||||
params,
|
params: { id, status },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,12 +42,6 @@ export namespace ErpStockInApi {
|
|||||||
supplierId?: number;
|
supplierId?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 其它入库单状态更新参数 */
|
|
||||||
export interface StockInStatusParams {
|
|
||||||
id: number;
|
|
||||||
status: number;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,9 +80,9 @@ export function updateStockIn(data: ErpStockInApi.StockIn) {
|
|||||||
/**
|
/**
|
||||||
* 更新其它入库单的状态
|
* 更新其它入库单的状态
|
||||||
*/
|
*/
|
||||||
export function updateStockInStatus(params: ErpStockInApi.StockInStatusParams) {
|
export function updateStockInStatus(id: number, status: number) {
|
||||||
return requestClient.put('/erp/stock-in/update-status', null, {
|
return requestClient.put('/erp/stock-in/update-status', null, {
|
||||||
params,
|
params: { id, status },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,12 +42,6 @@ export namespace ErpStockMoveApi {
|
|||||||
no?: string;
|
no?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 库存调拨单状态更新参数 */
|
|
||||||
export interface StockMoveStatusParams {
|
|
||||||
id: number;
|
|
||||||
status: number;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,11 +82,9 @@ export function updateStockMove(data: ErpStockMoveApi.StockMove) {
|
|||||||
/**
|
/**
|
||||||
* 更新库存调拨单的状态
|
* 更新库存调拨单的状态
|
||||||
*/
|
*/
|
||||||
export function updateStockMoveStatus(
|
export function updateStockMoveStatus(id: number, status: number) {
|
||||||
params: ErpStockMoveApi.StockMoveStatusParams,
|
|
||||||
) {
|
|
||||||
return requestClient.put('/erp/stock-move/update-status', null, {
|
return requestClient.put('/erp/stock-move/update-status', null, {
|
||||||
params,
|
params: { id, status },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,7 +103,5 @@ export function deleteStockMove(ids: number[]) {
|
|||||||
* 导出库存调拨单 Excel
|
* 导出库存调拨单 Excel
|
||||||
*/
|
*/
|
||||||
export function exportStockMove(params: ErpStockMoveApi.StockMovePageParams) {
|
export function exportStockMove(params: ErpStockMoveApi.StockMovePageParams) {
|
||||||
return requestClient.download('/erp/stock-move/export-excel', {
|
return requestClient.download('/erp/stock-move/export-excel', { params });
|
||||||
params,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,12 +39,6 @@ export namespace ErpStockOutApi {
|
|||||||
customerId?: number;
|
customerId?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 其它出库单状态更新参数 */
|
|
||||||
export interface StockOutStatusParams {
|
|
||||||
id: number;
|
|
||||||
status: number;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -85,11 +79,9 @@ export function updateStockOut(data: ErpStockOutApi.StockOut) {
|
|||||||
/**
|
/**
|
||||||
* 更新其它出库单的状态
|
* 更新其它出库单的状态
|
||||||
*/
|
*/
|
||||||
export function updateStockOutStatus(
|
export function updateStockOutStatus(id: number, status: number) {
|
||||||
params: ErpStockOutApi.StockOutStatusParams,
|
|
||||||
) {
|
|
||||||
return requestClient.put('/erp/stock-out/update-status', null, {
|
return requestClient.put('/erp/stock-out/update-status', null, {
|
||||||
params,
|
params: { id, status },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
94
apps/web-antd/src/api/iot/alert/config/index.ts
Normal file
94
apps/web-antd/src/api/iot/alert/config/index.ts
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace AlertConfigApi {
|
||||||
|
/** IoT 告警配置 VO */
|
||||||
|
export interface AlertConfig {
|
||||||
|
id?: number;
|
||||||
|
name: string;
|
||||||
|
description?: string;
|
||||||
|
level?: number;
|
||||||
|
status?: number;
|
||||||
|
sceneRuleIds?: number[];
|
||||||
|
receiveUserIds?: number[];
|
||||||
|
receiveUserNames?: string;
|
||||||
|
receiveTypes?: number[];
|
||||||
|
createTime?: Date;
|
||||||
|
updateTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 告警配置 */
|
||||||
|
export interface AlertConfig {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
description?: string;
|
||||||
|
level?: number;
|
||||||
|
status?: number;
|
||||||
|
sceneRuleIds?: number[];
|
||||||
|
receiveUserIds?: number[];
|
||||||
|
receiveUserNames?: string;
|
||||||
|
receiveTypes?: number[];
|
||||||
|
createTime?: Date;
|
||||||
|
updateTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询告警配置分页 */
|
||||||
|
export function getAlertConfigPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<AlertConfigApi.AlertConfig>>(
|
||||||
|
'/iot/alert-config/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询告警配置详情 */
|
||||||
|
export function getAlertConfig(id: number) {
|
||||||
|
return requestClient.get<AlertConfigApi.AlertConfig>(
|
||||||
|
`/iot/alert-config/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询所有告警配置列表 */
|
||||||
|
export function getAlertConfigList() {
|
||||||
|
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
||||||
|
'/iot/alert-config/list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增告警配置 */
|
||||||
|
export function createAlertConfig(data: AlertConfig) {
|
||||||
|
return requestClient.post('/iot/alert-config/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改告警配置 */
|
||||||
|
export function updateAlertConfig(data: AlertConfig) {
|
||||||
|
return requestClient.put('/iot/alert-config/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除告警配置 */
|
||||||
|
export function deleteAlertConfig(id: number) {
|
||||||
|
return requestClient.delete(`/iot/alert-config/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 批量删除告警配置 */
|
||||||
|
export function deleteAlertConfigList(ids: number[]) {
|
||||||
|
return requestClient.delete('/iot/alert-config/delete-list', {
|
||||||
|
params: { ids: ids.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 启用/禁用告警配置 */
|
||||||
|
export function toggleAlertConfig(id: number, enabled: boolean) {
|
||||||
|
return requestClient.put(`/iot/alert-config/toggle`, {
|
||||||
|
id,
|
||||||
|
enabled,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取告警配置简单列表 */
|
||||||
|
export function getSimpleAlertConfigList() {
|
||||||
|
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
||||||
|
'/iot/alert-config/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
82
apps/web-antd/src/api/iot/alert/record/index.ts
Normal file
82
apps/web-antd/src/api/iot/alert/record/index.ts
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace AlertRecordApi {
|
||||||
|
/** IoT 告警记录 VO */
|
||||||
|
export interface AlertRecord {
|
||||||
|
id?: number;
|
||||||
|
configId?: number;
|
||||||
|
configName?: string;
|
||||||
|
configLevel?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
deviceName?: string;
|
||||||
|
productId?: number;
|
||||||
|
productName?: string;
|
||||||
|
deviceMessage?: string;
|
||||||
|
processStatus?: boolean;
|
||||||
|
processRemark?: string;
|
||||||
|
processTime?: Date;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 告警记录 */
|
||||||
|
export interface AlertRecord {
|
||||||
|
id?: number;
|
||||||
|
configId?: number;
|
||||||
|
configName?: string;
|
||||||
|
configLevel?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
deviceName?: string;
|
||||||
|
productId?: number;
|
||||||
|
productName?: string;
|
||||||
|
deviceMessage?: string;
|
||||||
|
processStatus?: boolean;
|
||||||
|
processRemark?: string;
|
||||||
|
processTime?: Date;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询告警记录分页 */
|
||||||
|
export function getAlertRecordPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<AlertRecordApi.AlertRecord>>(
|
||||||
|
'/iot/alert-record/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询告警记录详情 */
|
||||||
|
export function getAlertRecord(id: number) {
|
||||||
|
return requestClient.get<AlertRecordApi.AlertRecord>(
|
||||||
|
`/iot/alert-record/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 处理告警记录 */
|
||||||
|
export function processAlertRecord(id: number, remark?: string) {
|
||||||
|
return requestClient.put('/iot/alert-record/process', {
|
||||||
|
id,
|
||||||
|
remark,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 批量处理告警记录 */
|
||||||
|
export function batchProcessAlertRecord(ids: number[], remark?: string) {
|
||||||
|
return requestClient.put('/iot/alert-record/batch-process', {
|
||||||
|
ids,
|
||||||
|
remark,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除告警记录 */
|
||||||
|
export function deleteAlertRecord(id: number) {
|
||||||
|
return requestClient.delete(`/iot/alert-record/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 批量删除告警记录 */
|
||||||
|
export function deleteAlertRecordList(ids: number[]) {
|
||||||
|
return requestClient.delete('/iot/alert-record/delete-list', {
|
||||||
|
params: { ids: ids.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
196
apps/web-antd/src/api/iot/device/device/index.ts
Normal file
196
apps/web-antd/src/api/iot/device/device/index.ts
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace IotDeviceApi {
|
||||||
|
/** IoT 设备 VO */
|
||||||
|
export interface Device {
|
||||||
|
id?: number; // 设备 ID,主键,自增
|
||||||
|
deviceName: string; // 设备名称
|
||||||
|
productId: number; // 产品编号
|
||||||
|
productKey?: string; // 产品标识
|
||||||
|
deviceType?: number; // 设备类型
|
||||||
|
nickname?: string; // 设备备注名称
|
||||||
|
gatewayId?: number; // 网关设备 ID
|
||||||
|
state?: number; // 设备状态
|
||||||
|
status?: number; // 设备状态(兼容字段)
|
||||||
|
onlineTime?: Date; // 最后上线时间
|
||||||
|
offlineTime?: Date; // 最后离线时间
|
||||||
|
activeTime?: Date; // 设备激活时间
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
ip?: string; // 设备的 IP 地址
|
||||||
|
firmwareVersion?: string; // 设备的固件版本
|
||||||
|
deviceSecret?: string; // 设备密钥,用于设备认证,需安全存储
|
||||||
|
mqttClientId?: string; // MQTT 客户端 ID
|
||||||
|
mqttUsername?: string; // MQTT 用户名
|
||||||
|
mqttPassword?: string; // MQTT 密码
|
||||||
|
authType?: string; // 认证类型
|
||||||
|
locationType?: number; // 定位类型
|
||||||
|
latitude?: number; // 设备位置的纬度
|
||||||
|
longitude?: number; // 设备位置的经度
|
||||||
|
areaId?: number; // 地区编码
|
||||||
|
address?: string; // 设备详细地址
|
||||||
|
serialNumber?: string; // 设备序列号
|
||||||
|
config?: string; // 设备配置
|
||||||
|
groupIds?: number[]; // 添加分组 ID
|
||||||
|
picUrl?: string; // 设备图片
|
||||||
|
location?: string; // 位置信息(格式:经度,纬度)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 设备属性详细 VO */
|
||||||
|
export interface DevicePropertyDetail {
|
||||||
|
identifier: string; // 属性标识符
|
||||||
|
value: string; // 最新值
|
||||||
|
updateTime: Date; // 更新时间
|
||||||
|
name: string; // 属性名称
|
||||||
|
dataType: string; // 数据类型
|
||||||
|
dataSpecs: any; // 数据定义
|
||||||
|
dataSpecsList: any[]; // 数据定义列表
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 设备属性 VO */
|
||||||
|
export interface DeviceProperty {
|
||||||
|
identifier: string; // 属性标识符
|
||||||
|
value: string; // 最新值
|
||||||
|
updateTime: Date; // 更新时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 设备认证参数 VO */
|
||||||
|
export interface DeviceAuthInfo {
|
||||||
|
clientId: string; // 客户端 ID
|
||||||
|
username: string; // 用户名
|
||||||
|
password: string; // 密码
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 设备发送消息 Request VO */
|
||||||
|
export interface DeviceMessageSendReq {
|
||||||
|
deviceId: number; // 设备编号
|
||||||
|
method: string; // 请求方法
|
||||||
|
params?: any; // 请求参数
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 设备分组更新请求 */
|
||||||
|
export interface DeviceGroupUpdateReq {
|
||||||
|
ids: number[]; // 设备 ID 列表
|
||||||
|
groupIds: number[]; // 分组 ID 列表
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 设备状态枚举 */
|
||||||
|
export enum DeviceStateEnum {
|
||||||
|
INACTIVE = 0, // 未激活
|
||||||
|
OFFLINE = 2, // 离线
|
||||||
|
ONLINE = 1, // 在线
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备分页 */
|
||||||
|
export function getDevicePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<IotDeviceApi.Device>>(
|
||||||
|
'/iot/device/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备详情 */
|
||||||
|
export function getDevice(id: number) {
|
||||||
|
return requestClient.get<IotDeviceApi.Device>(`/iot/device/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备 */
|
||||||
|
export function createDevice(data: IotDeviceApi.Device) {
|
||||||
|
return requestClient.post('/iot/device/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备 */
|
||||||
|
export function updateDevice(data: IotDeviceApi.Device) {
|
||||||
|
return requestClient.put('/iot/device/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备分组 */
|
||||||
|
export function updateDeviceGroup(data: IotDeviceApi.DeviceGroupUpdateReq) {
|
||||||
|
return requestClient.put('/iot/device/update-group', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除单个设备 */
|
||||||
|
export function deleteDevice(id: number) {
|
||||||
|
return requestClient.delete(`/iot/device/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除多个设备 */
|
||||||
|
export function deleteDeviceList(ids: number[]) {
|
||||||
|
return requestClient.delete('/iot/device/delete-list', {
|
||||||
|
params: { ids: ids.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出设备 */
|
||||||
|
export function exportDeviceExcel(params: any) {
|
||||||
|
return requestClient.download('/iot/device/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取设备数量 */
|
||||||
|
export function getDeviceCount(productId: number) {
|
||||||
|
return requestClient.get<number>(`/iot/device/count?productId=${productId}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取设备的精简信息列表 */
|
||||||
|
export function getSimpleDeviceList(deviceType?: number, productId?: number) {
|
||||||
|
return requestClient.get<IotDeviceApi.Device[]>('/iot/device/simple-list', {
|
||||||
|
params: { deviceType, productId },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据产品编号,获取设备的精简信息列表 */
|
||||||
|
export function getDeviceListByProductId(productId: number) {
|
||||||
|
return requestClient.get<IotDeviceApi.Device[]>('/iot/device/simple-list', {
|
||||||
|
params: { productId },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取导入模板 */
|
||||||
|
export function importDeviceTemplate() {
|
||||||
|
return requestClient.download('/iot/device/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取设备属性最新数据 */
|
||||||
|
export function getLatestDeviceProperties(params: any) {
|
||||||
|
return requestClient.get<IotDeviceApi.DevicePropertyDetail[]>(
|
||||||
|
'/iot/device/property/get-latest',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取设备属性历史数据 */
|
||||||
|
export function getHistoryDevicePropertyList(params: any) {
|
||||||
|
return requestClient.get<PageResult<IotDeviceApi.DeviceProperty>>(
|
||||||
|
'/iot/device/property/history-list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取设备认证信息 */
|
||||||
|
export function getDeviceAuthInfo(id: number) {
|
||||||
|
return requestClient.get<IotDeviceApi.DeviceAuthInfo>(
|
||||||
|
'/iot/device/get-auth-info',
|
||||||
|
{ params: { id } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备消息分页 */
|
||||||
|
export function getDeviceMessagePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<any>>('/iot/device/message/page', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备消息配对分页 */
|
||||||
|
export function getDeviceMessagePairPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<any>>('/iot/device/message/pair-page', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 发送设备消息 */
|
||||||
|
export function sendDeviceMessage(params: IotDeviceApi.DeviceMessageSendReq) {
|
||||||
|
return requestClient.post('/iot/device/message/send', params);
|
||||||
|
}
|
||||||
51
apps/web-antd/src/api/iot/device/group/index.ts
Normal file
51
apps/web-antd/src/api/iot/device/group/index.ts
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace IotDeviceGroupApi {
|
||||||
|
/** IoT 设备分组 VO */
|
||||||
|
export interface DeviceGroup {
|
||||||
|
id?: number; // 分组 ID
|
||||||
|
name: string; // 分组名字
|
||||||
|
status?: number; // 分组状态
|
||||||
|
description?: string; // 分组描述
|
||||||
|
deviceCount?: number; // 设备数量
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备分组分页 */
|
||||||
|
export function getDeviceGroupPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<IotDeviceGroupApi.DeviceGroup>>(
|
||||||
|
'/iot/device-group/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备分组详情 */
|
||||||
|
export function getDeviceGroup(id: number) {
|
||||||
|
return requestClient.get<IotDeviceGroupApi.DeviceGroup>(
|
||||||
|
`/iot/device-group/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备分组 */
|
||||||
|
export function createDeviceGroup(data: IotDeviceGroupApi.DeviceGroup) {
|
||||||
|
return requestClient.post('/iot/device-group/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备分组 */
|
||||||
|
export function updateDeviceGroup(data: IotDeviceGroupApi.DeviceGroup) {
|
||||||
|
return requestClient.put('/iot/device-group/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备分组 */
|
||||||
|
export function deleteDeviceGroup(id: number) {
|
||||||
|
return requestClient.delete(`/iot/device-group/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取设备分组的精简信息列表 */
|
||||||
|
export function getSimpleDeviceGroupList() {
|
||||||
|
return requestClient.get<IotDeviceGroupApi.DeviceGroup[]>(
|
||||||
|
'/iot/device-group/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
90
apps/web-antd/src/api/iot/ota/firmware/index.ts
Normal file
90
apps/web-antd/src/api/iot/ota/firmware/index.ts
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace IoTOtaFirmwareApi {
|
||||||
|
/** IoT OTA 固件 VO */
|
||||||
|
export interface Firmware {
|
||||||
|
id?: number;
|
||||||
|
name: string;
|
||||||
|
version: string;
|
||||||
|
productId: number;
|
||||||
|
productName?: string;
|
||||||
|
description?: string;
|
||||||
|
fileUrl?: string;
|
||||||
|
fileMd5?: string;
|
||||||
|
fileSize?: number;
|
||||||
|
status?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
updateTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT OTA 固件 */
|
||||||
|
export interface IoTOtaFirmware {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
version?: string;
|
||||||
|
productId?: number;
|
||||||
|
productName?: string;
|
||||||
|
description?: string;
|
||||||
|
fileUrl?: string;
|
||||||
|
fileMd5?: string;
|
||||||
|
fileSize?: number;
|
||||||
|
status?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
updateTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询 OTA 固件分页 */
|
||||||
|
export function getOtaFirmwarePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<IoTOtaFirmwareApi.Firmware>>(
|
||||||
|
'/iot/ota/firmware/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询 OTA 固件详情 */
|
||||||
|
export function getOtaFirmware(id: number) {
|
||||||
|
return requestClient.get<IoTOtaFirmwareApi.Firmware>(
|
||||||
|
`/iot/ota/firmware/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增 OTA 固件 */
|
||||||
|
export function createOtaFirmware(data: IoTOtaFirmware) {
|
||||||
|
return requestClient.post('/iot/ota/firmware/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改 OTA 固件 */
|
||||||
|
export function updateOtaFirmware(data: IoTOtaFirmware) {
|
||||||
|
return requestClient.put('/iot/ota/firmware/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除 OTA 固件 */
|
||||||
|
export function deleteOtaFirmware(id: number) {
|
||||||
|
return requestClient.delete(`/iot/ota/firmware/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 批量删除 OTA 固件 */
|
||||||
|
export function deleteOtaFirmwareList(ids: number[]) {
|
||||||
|
return requestClient.delete('/iot/ota/firmware/delete-list', {
|
||||||
|
params: { ids: ids.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 更新 OTA 固件状态 */
|
||||||
|
export function updateOtaFirmwareStatus(id: number, status: number) {
|
||||||
|
return requestClient.put(`/iot/ota/firmware/update-status`, {
|
||||||
|
id,
|
||||||
|
status,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据产品 ID 查询固件列表 */
|
||||||
|
export function getOtaFirmwareListByProductId(productId: number) {
|
||||||
|
return requestClient.get<IoTOtaFirmwareApi.Firmware[]>(
|
||||||
|
'/iot/ota/firmware/list-by-product-id',
|
||||||
|
{ params: { productId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
98
apps/web-antd/src/api/iot/ota/task/index.ts
Normal file
98
apps/web-antd/src/api/iot/ota/task/index.ts
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace IoTOtaTaskApi {
|
||||||
|
/** IoT OTA 升级任务 VO */
|
||||||
|
export interface Task {
|
||||||
|
id?: number;
|
||||||
|
name: string;
|
||||||
|
description?: string;
|
||||||
|
firmwareId: number;
|
||||||
|
firmwareName?: string;
|
||||||
|
productId?: number;
|
||||||
|
productName?: string;
|
||||||
|
deviceScope?: number;
|
||||||
|
deviceIds?: number[];
|
||||||
|
status?: number;
|
||||||
|
successCount?: number;
|
||||||
|
failureCount?: number;
|
||||||
|
pendingCount?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
updateTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT OTA 升级任务 */
|
||||||
|
export interface OtaTask {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
description?: string;
|
||||||
|
firmwareId?: number;
|
||||||
|
firmwareName?: string;
|
||||||
|
productId?: number;
|
||||||
|
productName?: string;
|
||||||
|
deviceScope?: number;
|
||||||
|
deviceIds?: number[];
|
||||||
|
status?: number;
|
||||||
|
successCount?: number;
|
||||||
|
failureCount?: number;
|
||||||
|
pendingCount?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
updateTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询 OTA 升级任务分页 */
|
||||||
|
export function getOtaTaskPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<IoTOtaTaskApi.Task>>(
|
||||||
|
'/iot/ota/task/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询 OTA 升级任务详情 */
|
||||||
|
export function getOtaTask(id: number) {
|
||||||
|
return requestClient.get<IoTOtaTaskApi.Task>(`/iot/ota/task/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增 OTA 升级任务 */
|
||||||
|
export function createOtaTask(data: OtaTask) {
|
||||||
|
return requestClient.post('/iot/ota/task/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改 OTA 升级任务 */
|
||||||
|
export function updateOtaTask(data: OtaTask) {
|
||||||
|
return requestClient.put('/iot/ota/task/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除 OTA 升级任务 */
|
||||||
|
export function deleteOtaTask(id: number) {
|
||||||
|
return requestClient.delete(`/iot/ota/task/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 批量删除 OTA 升级任务 */
|
||||||
|
export function deleteOtaTaskList(ids: number[]) {
|
||||||
|
return requestClient.delete('/iot/ota/task/delete-list', {
|
||||||
|
params: { ids: ids.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消 OTA 升级任务 */
|
||||||
|
export function cancelOtaTask(id: number) {
|
||||||
|
return requestClient.put(`/iot/ota/task/cancel?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 启动 OTA 升级任务 */
|
||||||
|
export function startOtaTask(id: number) {
|
||||||
|
return requestClient.put(`/iot/ota/task/start?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 暂停 OTA 升级任务 */
|
||||||
|
export function pauseOtaTask(id: number) {
|
||||||
|
return requestClient.put(`/iot/ota/task/pause?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 恢复 OTA 升级任务 */
|
||||||
|
export function resumeOtaTask(id: number) {
|
||||||
|
return requestClient.put(`/iot/ota/task/resume?id=${id}`);
|
||||||
|
}
|
||||||
101
apps/web-antd/src/api/iot/ota/task/record/index.ts
Normal file
101
apps/web-antd/src/api/iot/ota/task/record/index.ts
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace IoTOtaTaskRecordApi {
|
||||||
|
/** IoT OTA 升级任务记录 VO */
|
||||||
|
export interface TaskRecord {
|
||||||
|
id?: number;
|
||||||
|
taskId: number;
|
||||||
|
taskName?: string;
|
||||||
|
deviceId: number;
|
||||||
|
deviceName?: string;
|
||||||
|
firmwareId?: number;
|
||||||
|
firmwareName?: string;
|
||||||
|
firmwareVersion?: string;
|
||||||
|
status?: number;
|
||||||
|
progress?: number;
|
||||||
|
errorMessage?: string;
|
||||||
|
startTime?: Date;
|
||||||
|
endTime?: Date;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT OTA 升级任务记录 */
|
||||||
|
export interface OtaTaskRecord {
|
||||||
|
id?: number;
|
||||||
|
taskId?: number;
|
||||||
|
taskName?: string;
|
||||||
|
deviceId?: number;
|
||||||
|
deviceName?: string;
|
||||||
|
firmwareId?: number;
|
||||||
|
firmwareName?: string;
|
||||||
|
firmwareVersion?: string;
|
||||||
|
status?: number;
|
||||||
|
progress?: number;
|
||||||
|
errorMessage?: string;
|
||||||
|
startTime?: Date;
|
||||||
|
endTime?: Date;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询 OTA 升级任务记录分页 */
|
||||||
|
export function getOtaTaskRecordPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<IoTOtaTaskRecordApi.TaskRecord>>(
|
||||||
|
'/iot/ota/task/record/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询 OTA 升级任务记录详情 */
|
||||||
|
export function getOtaTaskRecord(id: number) {
|
||||||
|
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord>(
|
||||||
|
`/iot/ota/task/record/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据任务 ID 查询记录列表 */
|
||||||
|
export function getOtaTaskRecordListByTaskId(taskId: number) {
|
||||||
|
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
|
||||||
|
'/iot/ota/task/record/list-by-task-id',
|
||||||
|
{ params: { taskId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据设备 ID 查询记录列表 */
|
||||||
|
export function getOtaTaskRecordListByDeviceId(deviceId: number) {
|
||||||
|
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
|
||||||
|
'/iot/ota/task/record/list-by-device-id',
|
||||||
|
{ params: { deviceId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据固件 ID 查询记录列表 */
|
||||||
|
export function getOtaTaskRecordListByFirmwareId(firmwareId: number) {
|
||||||
|
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
|
||||||
|
'/iot/ota/task/record/list-by-firmware-id',
|
||||||
|
{ params: { firmwareId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重试升级任务记录 */
|
||||||
|
export function retryOtaTaskRecord(id: number) {
|
||||||
|
return requestClient.put(`/iot/ota/task/record/retry?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消升级任务记录 */
|
||||||
|
export function cancelOtaTaskRecord(id: number) {
|
||||||
|
return requestClient.put(`/iot/ota/task/record/cancel?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取升级任务记录状态统计 */
|
||||||
|
export function getOtaTaskRecordStatusStatistics(
|
||||||
|
firmwareId?: number,
|
||||||
|
taskId?: number,
|
||||||
|
) {
|
||||||
|
return requestClient.get<Record<string, number>>(
|
||||||
|
'/iot/ota/task/record/status-statistics',
|
||||||
|
{ params: { firmwareId, taskId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
57
apps/web-antd/src/api/iot/product/category/index.ts
Normal file
57
apps/web-antd/src/api/iot/product/category/index.ts
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace IotProductCategoryApi {
|
||||||
|
/** IoT 產品分類 VO */
|
||||||
|
export interface ProductCategory {
|
||||||
|
id?: number; // 分類 ID
|
||||||
|
name: string; // 分類名稱
|
||||||
|
parentId?: number; // 父级分類 ID
|
||||||
|
sort?: number; // 分類排序
|
||||||
|
status?: number; // 分類狀態
|
||||||
|
description?: string; // 分類描述
|
||||||
|
createTime?: string; // 創建時間
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查詢產品分類分頁 */
|
||||||
|
export function getProductCategoryPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<IotProductCategoryApi.ProductCategory>>(
|
||||||
|
'/iot/product-category/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查詢產品分類詳情 */
|
||||||
|
export function getProductCategory(id: number) {
|
||||||
|
return requestClient.get<IotProductCategoryApi.ProductCategory>(
|
||||||
|
`/iot/product-category/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增產品分類 */
|
||||||
|
export function createProductCategory(
|
||||||
|
data: IotProductCategoryApi.ProductCategory,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/iot/product-category/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改產品分類 */
|
||||||
|
export function updateProductCategory(
|
||||||
|
data: IotProductCategoryApi.ProductCategory,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/iot/product-category/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 刪除產品分類 */
|
||||||
|
export function deleteProductCategory(id: number) {
|
||||||
|
return requestClient.delete(`/iot/product-category/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 獲取產品分類精簡列表 */
|
||||||
|
export function getSimpleProductCategoryList() {
|
||||||
|
return requestClient.get<IotProductCategoryApi.ProductCategory[]>(
|
||||||
|
'/iot/product-category/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
99
apps/web-antd/src/api/iot/product/product/index.ts
Normal file
99
apps/web-antd/src/api/iot/product/product/index.ts
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace IotProductApi {
|
||||||
|
/** IoT 产品 VO */
|
||||||
|
export interface Product {
|
||||||
|
id?: number; // 产品编号
|
||||||
|
name: string; // 产品名称
|
||||||
|
productKey?: string; // 产品标识
|
||||||
|
protocolId?: number; // 协议编号
|
||||||
|
protocolType?: number; // 接入协议类型
|
||||||
|
categoryId?: number; // 产品所属品类标识符
|
||||||
|
categoryName?: string; // 产品所属品类名称
|
||||||
|
icon?: string; // 产品图标
|
||||||
|
picUrl?: string; // 产品图片
|
||||||
|
description?: string; // 产品描述
|
||||||
|
status?: number; // 产品状态
|
||||||
|
deviceType?: number; // 设备类型
|
||||||
|
locationType?: number; // 定位类型
|
||||||
|
netType?: number; // 联网方式
|
||||||
|
codecType?: string; // 数据格式(编解码器类型)
|
||||||
|
dataFormat?: number; // 数据格式
|
||||||
|
validateType?: number; // 认证方式
|
||||||
|
deviceCount?: number; // 设备数量
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IOT 产品设备类型枚举类 */
|
||||||
|
export enum DeviceTypeEnum {
|
||||||
|
DEVICE = 0, // 直连设备
|
||||||
|
GATEWAY = 2, // 网关设备
|
||||||
|
GATEWAY_SUB = 1, // 网关子设备
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IOT 产品定位类型枚举类 */
|
||||||
|
export enum LocationTypeEnum {
|
||||||
|
IP = 1, // IP 定位
|
||||||
|
MANUAL = 3, // 手动定位
|
||||||
|
MODULE = 2, // 设备定位
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IOT 数据格式(编解码器类型)枚举类 */
|
||||||
|
export enum CodecTypeEnum {
|
||||||
|
ALINK = 'Alink', // 阿里云 Alink 协议
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品分页 */
|
||||||
|
export function getProductPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<IotProductApi.Product>>(
|
||||||
|
'/iot/product/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品详情 */
|
||||||
|
export function getProduct(id: number) {
|
||||||
|
return requestClient.get<IotProductApi.Product>(`/iot/product/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增产品 */
|
||||||
|
export function createProduct(data: IotProductApi.Product) {
|
||||||
|
return requestClient.post('/iot/product/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改产品 */
|
||||||
|
export function updateProduct(data: IotProductApi.Product) {
|
||||||
|
return requestClient.put('/iot/product/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除产品 */
|
||||||
|
export function deleteProduct(id: number) {
|
||||||
|
return requestClient.delete(`/iot/product/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出产品 Excel */
|
||||||
|
export function exportProduct(params: any) {
|
||||||
|
return requestClient.download('/iot/product/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 更新产品状态 */
|
||||||
|
export function updateProductStatus(id: number, status: number) {
|
||||||
|
return requestClient.put(
|
||||||
|
`/iot/product/update-status?id=${id}&status=${status}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品(精简)列表 */
|
||||||
|
export function getSimpleProductList() {
|
||||||
|
return requestClient.get<IotProductApi.Product[]>('/iot/product/simple-list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据 ProductKey 获取产品信息 */
|
||||||
|
export function getProductByKey(productKey: string) {
|
||||||
|
return requestClient.get<IotProductApi.Product>('/iot/product/get-by-key', {
|
||||||
|
params: { productKey },
|
||||||
|
});
|
||||||
|
}
|
||||||
83
apps/web-antd/src/api/iot/rule/data/rule/index.ts
Normal file
83
apps/web-antd/src/api/iot/rule/data/rule/index.ts
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace DataRuleApi {
|
||||||
|
/** IoT 数据流转规则 VO */
|
||||||
|
export interface Rule {
|
||||||
|
id?: number;
|
||||||
|
name: string;
|
||||||
|
description?: string;
|
||||||
|
status?: number;
|
||||||
|
productId?: number;
|
||||||
|
productKey?: string;
|
||||||
|
sourceConfigs?: SourceConfig[];
|
||||||
|
sinkIds?: number[];
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 数据源配置 */
|
||||||
|
export interface SourceConfig {
|
||||||
|
productId?: number;
|
||||||
|
productKey?: string;
|
||||||
|
deviceId?: number;
|
||||||
|
type?: string;
|
||||||
|
topic?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 数据流转规则 */
|
||||||
|
export interface DataRule {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
description?: string;
|
||||||
|
status?: number;
|
||||||
|
productId?: number;
|
||||||
|
productKey?: string;
|
||||||
|
sourceConfigs?: any[];
|
||||||
|
sinkIds?: number[];
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询数据流转规则分页 */
|
||||||
|
export function getDataRulePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<DataRuleApi.Rule>>(
|
||||||
|
'/iot/data-rule/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询数据流转规则详情 */
|
||||||
|
export function getDataRule(id: number) {
|
||||||
|
return requestClient.get<DataRuleApi.Rule>(`/iot/data-rule/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增数据流转规则 */
|
||||||
|
export function createDataRule(data: DataRule) {
|
||||||
|
return requestClient.post('/iot/data-rule/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改数据流转规则 */
|
||||||
|
export function updateDataRule(data: DataRule) {
|
||||||
|
return requestClient.put('/iot/data-rule/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除数据流转规则 */
|
||||||
|
export function deleteDataRule(id: number) {
|
||||||
|
return requestClient.delete(`/iot/data-rule/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 批量删除数据流转规则 */
|
||||||
|
export function deleteDataRuleList(ids: number[]) {
|
||||||
|
return requestClient.delete('/iot/data-rule/delete-list', {
|
||||||
|
params: { ids: ids.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 更新数据流转规则状态 */
|
||||||
|
export function updateDataRuleStatus(id: number, status: number) {
|
||||||
|
return requestClient.put(`/iot/data-rule/update-status`, {
|
||||||
|
id,
|
||||||
|
status,
|
||||||
|
});
|
||||||
|
}
|
||||||
148
apps/web-antd/src/api/iot/rule/data/sink/index.ts
Normal file
148
apps/web-antd/src/api/iot/rule/data/sink/index.ts
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace DataSinkApi {
|
||||||
|
/** IoT 数据流转目的 VO */
|
||||||
|
export interface Sink {
|
||||||
|
id?: number;
|
||||||
|
name: string;
|
||||||
|
description?: string;
|
||||||
|
status?: number;
|
||||||
|
type: string;
|
||||||
|
config?: any;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 数据流转目的 */
|
||||||
|
export interface DataSinkVO {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
description?: string;
|
||||||
|
status?: number;
|
||||||
|
type?: string;
|
||||||
|
config?: any;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 数据目的类型枚举 */
|
||||||
|
export enum IotDataSinkTypeEnum {
|
||||||
|
HTTP = 'HTTP',
|
||||||
|
KAFKA = 'KAFKA',
|
||||||
|
MQTT = 'MQTT',
|
||||||
|
RABBITMQ = 'RABBITMQ',
|
||||||
|
REDIS_STREAM = 'REDIS_STREAM',
|
||||||
|
ROCKETMQ = 'ROCKETMQ',
|
||||||
|
}
|
||||||
|
|
||||||
|
/** HTTP 配置 */
|
||||||
|
export interface HttpConfig {
|
||||||
|
url?: string;
|
||||||
|
method?: string;
|
||||||
|
headers?: Record<string, string>;
|
||||||
|
timeout?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MQTT 配置 */
|
||||||
|
export interface MqttConfig {
|
||||||
|
broker?: string;
|
||||||
|
port?: number;
|
||||||
|
topic?: string;
|
||||||
|
username?: string;
|
||||||
|
password?: string;
|
||||||
|
clientId?: string;
|
||||||
|
qos?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Kafka 配置 */
|
||||||
|
export interface KafkaMQConfig {
|
||||||
|
bootstrapServers?: string;
|
||||||
|
topic?: string;
|
||||||
|
acks?: string;
|
||||||
|
retries?: number;
|
||||||
|
batchSize?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** RabbitMQ 配置 */
|
||||||
|
export interface RabbitMQConfig {
|
||||||
|
host?: string;
|
||||||
|
port?: number;
|
||||||
|
virtualHost?: string;
|
||||||
|
username?: string;
|
||||||
|
password?: string;
|
||||||
|
exchange?: string;
|
||||||
|
routingKey?: string;
|
||||||
|
queue?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** RocketMQ 配置 */
|
||||||
|
export interface RocketMQConfig {
|
||||||
|
nameServer?: string;
|
||||||
|
topic?: string;
|
||||||
|
tag?: string;
|
||||||
|
producerGroup?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Redis Stream 配置 */
|
||||||
|
export interface RedisStreamMQConfig {
|
||||||
|
host?: string;
|
||||||
|
port?: number;
|
||||||
|
password?: string;
|
||||||
|
database?: number;
|
||||||
|
streamKey?: string;
|
||||||
|
maxLen?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询数据流转目的分页 */
|
||||||
|
export function getDataSinkPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<DataSinkApi.Sink>>(
|
||||||
|
'/iot/data-sink/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询数据流转目的详情 */
|
||||||
|
export function getDataSink(id: number) {
|
||||||
|
return requestClient.get<DataSinkApi.Sink>(`/iot/data-sink/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询所有数据流转目的列表 */
|
||||||
|
export function getDataSinkList() {
|
||||||
|
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询数据流转目的简单列表 */
|
||||||
|
export function getDataSinkSimpleList() {
|
||||||
|
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/simple-list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增数据流转目的 */
|
||||||
|
export function createDataSink(data: DataSinkVO) {
|
||||||
|
return requestClient.post('/iot/data-sink/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改数据流转目的 */
|
||||||
|
export function updateDataSink(data: DataSinkVO) {
|
||||||
|
return requestClient.put('/iot/data-sink/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除数据流转目的 */
|
||||||
|
export function deleteDataSink(id: number) {
|
||||||
|
return requestClient.delete(`/iot/data-sink/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 批量删除数据流转目的 */
|
||||||
|
export function deleteDataSinkList(ids: number[]) {
|
||||||
|
return requestClient.delete('/iot/data-sink/delete-list', {
|
||||||
|
params: { ids: ids.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 更新数据流转目的状态 */
|
||||||
|
export function updateDataSinkStatus(id: number, status: number) {
|
||||||
|
return requestClient.put(`/iot/data-sink/update-status`, {
|
||||||
|
id,
|
||||||
|
status,
|
||||||
|
});
|
||||||
|
}
|
||||||
155
apps/web-antd/src/api/iot/rule/scene/index.ts
Normal file
155
apps/web-antd/src/api/iot/rule/scene/index.ts
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace RuleSceneApi {
|
||||||
|
/** IoT 场景联动规则 VO */
|
||||||
|
export interface SceneRule {
|
||||||
|
id?: number;
|
||||||
|
name: string;
|
||||||
|
description?: string;
|
||||||
|
status?: number;
|
||||||
|
triggers?: Trigger[];
|
||||||
|
actions?: Action[];
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 场景联动规则触发器 */
|
||||||
|
export interface Trigger {
|
||||||
|
type?: string;
|
||||||
|
productId?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
identifier?: string;
|
||||||
|
operator?: string;
|
||||||
|
value?: any;
|
||||||
|
cronExpression?: string;
|
||||||
|
conditionGroups?: TriggerConditionGroup[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 场景联动规则触发条件组 */
|
||||||
|
export interface TriggerConditionGroup {
|
||||||
|
conditions?: TriggerCondition[];
|
||||||
|
operator?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 场景联动规则触发条件 */
|
||||||
|
export interface TriggerCondition {
|
||||||
|
productId?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
identifier?: string;
|
||||||
|
operator?: string;
|
||||||
|
value?: any;
|
||||||
|
type?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 场景联动规则动作 */
|
||||||
|
export interface Action {
|
||||||
|
type?: string;
|
||||||
|
productId?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
identifier?: string;
|
||||||
|
value?: any;
|
||||||
|
alertConfigId?: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 场景联动规则 */
|
||||||
|
export interface IotSceneRule {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
description?: string;
|
||||||
|
status?: number;
|
||||||
|
triggers?: Trigger[];
|
||||||
|
actions?: Action[];
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 场景联动规则触发器 */
|
||||||
|
export interface Trigger {
|
||||||
|
type?: string;
|
||||||
|
productId?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
identifier?: string;
|
||||||
|
operator?: string;
|
||||||
|
value?: any;
|
||||||
|
cronExpression?: string;
|
||||||
|
conditionGroups?: TriggerConditionGroup[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 场景联动规则触发条件组 */
|
||||||
|
export interface TriggerConditionGroup {
|
||||||
|
conditions?: TriggerCondition[];
|
||||||
|
operator?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 场景联动规则触发条件 */
|
||||||
|
export interface TriggerCondition {
|
||||||
|
productId?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
identifier?: string;
|
||||||
|
operator?: string;
|
||||||
|
value?: any;
|
||||||
|
type?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 场景联动规则动作 */
|
||||||
|
export interface Action {
|
||||||
|
type?: string;
|
||||||
|
productId?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
identifier?: string;
|
||||||
|
value?: any;
|
||||||
|
alertConfigId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询场景联动规则分页 */
|
||||||
|
export function getSceneRulePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<RuleSceneApi.SceneRule>>(
|
||||||
|
'/iot/scene-rule/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询场景联动规则详情 */
|
||||||
|
export function getSceneRule(id: number) {
|
||||||
|
return requestClient.get<RuleSceneApi.SceneRule>(
|
||||||
|
`/iot/scene-rule/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增场景联动规则 */
|
||||||
|
export function createSceneRule(data: IotSceneRule) {
|
||||||
|
return requestClient.post('/iot/scene-rule/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改场景联动规则 */
|
||||||
|
export function updateSceneRule(data: IotSceneRule) {
|
||||||
|
return requestClient.put('/iot/scene-rule/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除场景联动规则 */
|
||||||
|
export function deleteSceneRule(id: number) {
|
||||||
|
return requestClient.delete(`/iot/scene-rule/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 批量删除场景联动规则 */
|
||||||
|
export function deleteSceneRuleList(ids: number[]) {
|
||||||
|
return requestClient.delete('/iot/scene-rule/delete-list', {
|
||||||
|
params: { ids: ids.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 更新场景联动规则状态 */
|
||||||
|
export function updateSceneRuleStatus(id: number, status: number) {
|
||||||
|
return requestClient.put(`/iot/scene-rule/update-status`, {
|
||||||
|
id,
|
||||||
|
status,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取场景联动规则简单列表 */
|
||||||
|
export function getSimpleRuleSceneList() {
|
||||||
|
return requestClient.get<RuleSceneApi.SceneRule[]>(
|
||||||
|
'/iot/scene-rule/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
69
apps/web-antd/src/api/iot/statistics/index.ts
Normal file
69
apps/web-antd/src/api/iot/statistics/index.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace IotStatisticsApi {
|
||||||
|
/** IoT 统计摘要数据 */
|
||||||
|
export interface StatisticsSummary {
|
||||||
|
productCategoryCount: number;
|
||||||
|
productCount: number;
|
||||||
|
deviceCount: number;
|
||||||
|
deviceMessageCount: number;
|
||||||
|
productCategoryTodayCount: number;
|
||||||
|
productTodayCount: number;
|
||||||
|
deviceTodayCount: number;
|
||||||
|
deviceMessageTodayCount: number;
|
||||||
|
deviceOnlineCount: number;
|
||||||
|
deviceOfflineCount: number;
|
||||||
|
deviceInactiveCount: number;
|
||||||
|
productCategoryDeviceCounts: Record<string, number>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 时间戳-数值的键值对类型 */
|
||||||
|
export interface TimeValueItem {
|
||||||
|
[key: string]: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 消息统计数据类型 */
|
||||||
|
export interface DeviceMessageSummary {
|
||||||
|
statType: number;
|
||||||
|
upstreamCounts: TimeValueItem[];
|
||||||
|
downstreamCounts: TimeValueItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息统计数据项(按日期) */
|
||||||
|
export interface DeviceMessageSummaryByDate {
|
||||||
|
time: string;
|
||||||
|
upstreamCount: number;
|
||||||
|
downstreamCount: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息统计接口参数 */
|
||||||
|
export interface DeviceMessageReq {
|
||||||
|
interval: number;
|
||||||
|
times?: string[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取 IoT 统计摘要数据 */
|
||||||
|
export function getStatisticsSummary() {
|
||||||
|
return requestClient.get<IotStatisticsApi.StatisticsSummary>(
|
||||||
|
'/iot/statistics/get-summary',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取设备消息的数据统计(按日期) */
|
||||||
|
export function getDeviceMessageSummaryByDate(
|
||||||
|
params: IotStatisticsApi.DeviceMessageReq,
|
||||||
|
) {
|
||||||
|
return requestClient.get<IotStatisticsApi.DeviceMessageSummaryByDate[]>(
|
||||||
|
'/iot/statistics/get-device-message-summary-by-date',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取设备消息统计摘要 */
|
||||||
|
export function getDeviceMessageSummary(statType: number) {
|
||||||
|
return requestClient.get<IotStatisticsApi.DeviceMessageSummary>(
|
||||||
|
'/iot/statistics/get-device-message-summary',
|
||||||
|
{ params: { statType } },
|
||||||
|
);
|
||||||
|
}
|
||||||
191
apps/web-antd/src/api/iot/thingmodel/index.ts
Normal file
191
apps/web-antd/src/api/iot/thingmodel/index.ts
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace ThingModelApi {
|
||||||
|
/** IoT 物模型数据 VO */
|
||||||
|
export interface ThingModel {
|
||||||
|
id?: number;
|
||||||
|
productId?: number;
|
||||||
|
productKey?: string;
|
||||||
|
identifier: string;
|
||||||
|
name: string;
|
||||||
|
desc?: string;
|
||||||
|
type: string;
|
||||||
|
property?: ThingModelProperty;
|
||||||
|
event?: ThingModelEvent;
|
||||||
|
service?: ThingModelService;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型属性 */
|
||||||
|
export interface Property {
|
||||||
|
identifier: string;
|
||||||
|
name: string;
|
||||||
|
accessMode: string;
|
||||||
|
dataType: string;
|
||||||
|
dataSpecs?: any;
|
||||||
|
dataSpecsList?: any[];
|
||||||
|
desc?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型服务 */
|
||||||
|
export interface Service {
|
||||||
|
identifier: string;
|
||||||
|
name: string;
|
||||||
|
callType: string;
|
||||||
|
inputData?: any[];
|
||||||
|
outputData?: any[];
|
||||||
|
desc?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型事件 */
|
||||||
|
export interface Event {
|
||||||
|
identifier: string;
|
||||||
|
name: string;
|
||||||
|
type: string;
|
||||||
|
outputData?: any[];
|
||||||
|
desc?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型数据 */
|
||||||
|
export interface ThingModelData {
|
||||||
|
id?: number;
|
||||||
|
productId?: number;
|
||||||
|
productKey?: string;
|
||||||
|
identifier?: string;
|
||||||
|
name?: string;
|
||||||
|
desc?: string;
|
||||||
|
type?: string;
|
||||||
|
dataType?: string;
|
||||||
|
property?: ThingModelProperty;
|
||||||
|
event?: ThingModelEvent;
|
||||||
|
service?: ThingModelService;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型属性 */
|
||||||
|
export interface ThingModelProperty {
|
||||||
|
identifier?: string;
|
||||||
|
name?: string;
|
||||||
|
accessMode?: string;
|
||||||
|
dataType?: string;
|
||||||
|
dataSpecs?: any;
|
||||||
|
dataSpecsList?: any[];
|
||||||
|
desc?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型服务 */
|
||||||
|
export interface ThingModelService {
|
||||||
|
identifier?: string;
|
||||||
|
name?: string;
|
||||||
|
callType?: string;
|
||||||
|
inputData?: any[];
|
||||||
|
outputData?: any[];
|
||||||
|
desc?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型事件 */
|
||||||
|
export interface ThingModelEvent {
|
||||||
|
identifier?: string;
|
||||||
|
name?: string;
|
||||||
|
type?: string;
|
||||||
|
outputData?: any[];
|
||||||
|
desc?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 数据定义(数值型) */
|
||||||
|
export interface DataSpecsNumberData {
|
||||||
|
min?: number | string;
|
||||||
|
max?: number | string;
|
||||||
|
step?: number | string;
|
||||||
|
unit?: string;
|
||||||
|
unitName?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 数据定义(枚举/布尔型) */
|
||||||
|
export interface DataSpecsEnumOrBoolData {
|
||||||
|
value: number | string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型表单校验规则 */
|
||||||
|
export interface ThingModelFormRules {
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 验证布尔型名称 */
|
||||||
|
export const validateBoolName = (_rule: any, value: any, callback: any) => {
|
||||||
|
if (value) {
|
||||||
|
callback();
|
||||||
|
} else {
|
||||||
|
callback(new Error('枚举描述不能为空'));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 查询产品物模型分页 */
|
||||||
|
export function getThingModelPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<ThingModelApi.ThingModel>>(
|
||||||
|
'/iot/thing-model/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品物模型详情 */
|
||||||
|
export function getThingModel(id: number) {
|
||||||
|
return requestClient.get<ThingModelApi.ThingModel>(
|
||||||
|
`/iot/thing-model/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据产品 ID 查询物模型列表 */
|
||||||
|
export function getThingModelListByProductId(productId: number) {
|
||||||
|
return requestClient.get<ThingModelApi.ThingModel[]>(
|
||||||
|
'/iot/thing-model/list-by-product-id',
|
||||||
|
{ params: { productId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据产品标识查询物模型列表 */
|
||||||
|
export function getThingModelListByProductKey(productKey: string) {
|
||||||
|
return requestClient.get<ThingModelApi.ThingModel[]>(
|
||||||
|
'/iot/thing-model/list-by-product-key',
|
||||||
|
{ params: { productKey } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增物模型 */
|
||||||
|
export function createThingModel(data: ThingModelData) {
|
||||||
|
return requestClient.post('/iot/thing-model/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改物模型 */
|
||||||
|
export function updateThingModel(data: ThingModelData) {
|
||||||
|
return requestClient.put('/iot/thing-model/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除物模型 */
|
||||||
|
export function deleteThingModel(id: number) {
|
||||||
|
return requestClient.delete(`/iot/thing-model/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 批量删除物模型 */
|
||||||
|
export function deleteThingModelList(ids: number[]) {
|
||||||
|
return requestClient.delete('/iot/thing-model/delete-list', {
|
||||||
|
params: { ids: ids.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入物模型 TSL */
|
||||||
|
export function importThingModelTSL(productId: number, tslData: any) {
|
||||||
|
return requestClient.post('/iot/thing-model/import-tsl', {
|
||||||
|
productId,
|
||||||
|
tslData,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出物模型 TSL */
|
||||||
|
export function exportThingModelTSL(productId: number) {
|
||||||
|
return requestClient.get<any>('/iot/thing-model/export-tsl', {
|
||||||
|
params: { productId },
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -5,18 +5,18 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallBannerApi {
|
export namespace MallBannerApi {
|
||||||
/** Banner 信息 */
|
/** Banner 信息 */
|
||||||
export interface Banner {
|
export interface Banner {
|
||||||
id: number;
|
id: number; // Banner 编号
|
||||||
title: string;
|
title: string; // Banner 标题
|
||||||
picUrl: string;
|
picUrl: string; // Banner 图片
|
||||||
status: number;
|
status: number; // 状态
|
||||||
url: string;
|
url: string; // 链接地址
|
||||||
position: number;
|
position: number; // Banner 位置
|
||||||
sort: number;
|
sort: number; // 排序
|
||||||
memo: string;
|
memo: string; // 备注
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询Banner管理列表 */
|
/** 查询 Banner 管理列表 */
|
||||||
export function getBannerPage(params: PageParam) {
|
export function getBannerPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<MallBannerApi.Banner>>(
|
return requestClient.get<PageResult<MallBannerApi.Banner>>(
|
||||||
'/promotion/banner/page',
|
'/promotion/banner/page',
|
||||||
@@ -24,24 +24,24 @@ export function getBannerPage(params: PageParam) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询Banner管理详情 */
|
/** 查询 Banner 管理详情 */
|
||||||
export function getBanner(id: number) {
|
export function getBanner(id: number) {
|
||||||
return requestClient.get<MallBannerApi.Banner>(
|
return requestClient.get<MallBannerApi.Banner>(
|
||||||
`/promotion/banner/get?id=${id}`,
|
`/promotion/banner/get?id=${id}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增Banner管理 */
|
/** 新增 Banner 管理 */
|
||||||
export function createBanner(data: MallBannerApi.Banner) {
|
export function createBanner(data: MallBannerApi.Banner) {
|
||||||
return requestClient.post('/promotion/banner/create', data);
|
return requestClient.post('/promotion/banner/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改Banner管理 */
|
/** 修改 Banner 管理 */
|
||||||
export function updateBanner(data: MallBannerApi.Banner) {
|
export function updateBanner(data: MallBannerApi.Banner) {
|
||||||
return requestClient.put('/promotion/banner/update', data);
|
return requestClient.put('/promotion/banner/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除Banner管理 */
|
/** 删除 Banner 管理 */
|
||||||
export function deleteBanner(id: number) {
|
export function deleteBanner(id: number) {
|
||||||
return requestClient.delete(`/promotion/banner/delete?id=${id}`);
|
return requestClient.delete(`/promotion/banner/delete?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,18 +5,12 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallBrandApi {
|
export namespace MallBrandApi {
|
||||||
/** 商品品牌 */
|
/** 商品品牌 */
|
||||||
export interface Brand {
|
export interface Brand {
|
||||||
/** 品牌编号 */
|
id?: number; // 品牌编号
|
||||||
id?: number;
|
name: string; // 品牌名称
|
||||||
/** 品牌名称 */
|
picUrl: string; // 品牌图片
|
||||||
name: string;
|
sort?: number; // 品牌排序
|
||||||
/** 品牌图片 */
|
description?: string; // 品牌描述
|
||||||
picUrl: string;
|
status: number; // 开启状态
|
||||||
/** 品牌排序 */
|
|
||||||
sort?: number;
|
|
||||||
/** 品牌描述 */
|
|
||||||
description?: string;
|
|
||||||
/** 开启状态 */
|
|
||||||
status: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,18 +3,12 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallCategoryApi {
|
export namespace MallCategoryApi {
|
||||||
/** 产品分类 */
|
/** 产品分类 */
|
||||||
export interface Category {
|
export interface Category {
|
||||||
/** 分类编号 */
|
id?: number; // 分类编号
|
||||||
id?: number;
|
parentId?: number; // 父分类编号
|
||||||
/** 父分类编号 */
|
name: string; // 分类名称
|
||||||
parentId?: number;
|
picUrl: string; // 移动端分类图
|
||||||
/** 分类名称 */
|
sort: number; // 分类排序
|
||||||
name: string;
|
status: number; // 开启状态
|
||||||
/** 移动端分类图 */
|
|
||||||
picUrl: string;
|
|
||||||
/** 分类排序 */
|
|
||||||
sort: number;
|
|
||||||
/** 开启状态 */
|
|
||||||
status: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,47 +4,47 @@ import { requestClient } from '#/api/request';
|
|||||||
|
|
||||||
export namespace MallCommentApi {
|
export namespace MallCommentApi {
|
||||||
export interface Property {
|
export interface Property {
|
||||||
propertyId: number;
|
propertyId: number; // 属性 ID
|
||||||
propertyName: string;
|
propertyName: string; // 属性名称
|
||||||
valueId: number;
|
valueId: number; // 属性值 ID
|
||||||
valueName: string;
|
valueName: string; // 属性值名称
|
||||||
}
|
}
|
||||||
/** 商品评论 */
|
/** 商品评论 */
|
||||||
export interface Comment {
|
export interface Comment {
|
||||||
id: number;
|
id: number; // 评论编号
|
||||||
userId: number;
|
userId: number; // 用户编号
|
||||||
userNickname: string;
|
userNickname: string; // 用户昵称
|
||||||
userAvatar: string;
|
userAvatar: string; // 用户头像
|
||||||
anonymous: boolean;
|
anonymous: boolean; // 是否匿名
|
||||||
orderId: number;
|
orderId: number; // 订单编号
|
||||||
orderItemId: number;
|
orderItemId: number; // 订单项编号
|
||||||
spuId: number;
|
spuId: number; // 商品SPU编号
|
||||||
spuName: string;
|
spuName: string; // 商品名称
|
||||||
skuId: number;
|
skuId: number; // 商品SKU编号
|
||||||
visible: boolean;
|
visible: boolean; // 是否可见
|
||||||
scores: number;
|
scores: number; // 总评分
|
||||||
descriptionScores: number;
|
descriptionScores: number; // 描述评分
|
||||||
benefitScores: number;
|
benefitScores: number; // 服务评分
|
||||||
content: string;
|
content: string; // 评论内容
|
||||||
picUrls: string[];
|
picUrls: string[]; // 评论图片
|
||||||
replyStatus: boolean;
|
replyStatus: boolean; // 是否回复
|
||||||
replyUserId: number;
|
replyUserId: number; // 回复人编号
|
||||||
replyContent: string;
|
replyContent: string; // 回复内容
|
||||||
replyTime: Date;
|
replyTime: Date; // 回复时间
|
||||||
createTime: Date;
|
createTime: Date; // 创建时间
|
||||||
skuProperties: Property[];
|
skuProperties: Property[]; // SKU 属性数组
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 评论可见性更新 */
|
/** 评论可见性更新 */
|
||||||
export interface CommentVisibleUpdate {
|
export interface CommentVisibleUpdate {
|
||||||
id: number;
|
id: number; // 评论编号
|
||||||
visible: boolean;
|
visible: boolean; // 是否可见
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 评论回复 */
|
/** 评论回复 */
|
||||||
export interface CommentReply {
|
export interface CommentReply {
|
||||||
id: number;
|
id: number; // 评论编号
|
||||||
replyContent: string;
|
replyContent: string; // 回复内容
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,9 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallFavoriteApi {
|
export namespace MallFavoriteApi {
|
||||||
/** 商品收藏 */
|
/** 商品收藏 */
|
||||||
export interface Favorite {
|
export interface Favorite {
|
||||||
/** 收藏编号 */
|
id?: number; // 收藏编号
|
||||||
id?: number;
|
userId?: string; // 用户编号
|
||||||
/** 用户编号 */
|
spuId?: number; // 商品 SPU 编号
|
||||||
userId?: string;
|
|
||||||
/** 商品 SPU 编号 */
|
|
||||||
spuId?: null | number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,21 +5,15 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallHistoryApi {
|
export namespace MallHistoryApi {
|
||||||
/** 商品浏览记录 */
|
/** 商品浏览记录 */
|
||||||
export interface BrowseHistory {
|
export interface BrowseHistory {
|
||||||
/** 记录编号 */
|
id?: number; // 记录编号
|
||||||
id?: number;
|
userId?: number; // 用户编号
|
||||||
/** 用户编号 */
|
spuId?: number; // 商品 SPU 编号
|
||||||
userId?: number;
|
createTime?: Date; // 浏览时间
|
||||||
/** 商品 SPU 编号 */
|
|
||||||
spuId?: number;
|
|
||||||
/** 浏览时间 */
|
|
||||||
createTime?: Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得商品浏览记录分页
|
* 获得商品浏览记录分页
|
||||||
*
|
|
||||||
* @param params 请求参数
|
|
||||||
*/
|
*/
|
||||||
export function getBrowseHistoryPage(params: PageParam) {
|
export function getBrowseHistoryPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<MallHistoryApi.BrowseHistory>>(
|
return requestClient.get<PageResult<MallHistoryApi.BrowseHistory>>(
|
||||||
|
|||||||
@@ -5,29 +5,22 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallPropertyApi {
|
export namespace MallPropertyApi {
|
||||||
/** 商品属性 */
|
/** 商品属性 */
|
||||||
export interface Property {
|
export interface Property {
|
||||||
/** 属性编号 */
|
id?: number; // 属性编号
|
||||||
id?: number;
|
name: string; // 名称
|
||||||
/** 名称 */
|
remark?: string; // 备注
|
||||||
name: string;
|
|
||||||
/** 备注 */
|
|
||||||
remark?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 属性值 */
|
/** 属性值 */
|
||||||
export interface PropertyValue {
|
export interface PropertyValue {
|
||||||
/** 属性值编号 */
|
id?: number; // 属性值编号
|
||||||
id?: number;
|
propertyId?: number; // 属性项的编号
|
||||||
/** 属性项的编号 */
|
name: string; // 名称
|
||||||
propertyId?: number;
|
remark?: string; // 备注
|
||||||
/** 名称 */
|
|
||||||
name: string;
|
|
||||||
/** 备注 */
|
|
||||||
remark?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 属性值查询参数 */
|
/** 属性值查询参数 */
|
||||||
export interface PropertyValueQuery extends PageParam {
|
export interface PropertyValueQuery extends PageParam {
|
||||||
propertyId?: number;
|
propertyId?: number; // 属性编号
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,124 +5,73 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallSpuApi {
|
export namespace MallSpuApi {
|
||||||
/** 商品属性 */
|
/** 商品属性 */
|
||||||
export interface Property {
|
export interface Property {
|
||||||
/** 属性编号 */
|
propertyId?: number; // 属性编号
|
||||||
propertyId?: number;
|
propertyName?: string; // 属性名称
|
||||||
/** 属性名称 */
|
valueId?: number; // 属性值编号
|
||||||
propertyName?: string;
|
valueName?: string; // 属性值名称
|
||||||
/** 属性值编号 */
|
|
||||||
valueId?: number;
|
|
||||||
/** 属性值名称 */
|
|
||||||
valueName?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 商品 SKU */
|
/** 商品 SKU */
|
||||||
export interface Sku {
|
export interface Sku {
|
||||||
/** 商品 SKU 编号 */
|
id?: number; // 商品 SKU 编号
|
||||||
id?: number;
|
name?: string; // 商品 SKU 名称
|
||||||
/** 商品 SKU 名称 */
|
spuId?: number; // SPU 编号
|
||||||
name?: string;
|
properties?: Property[]; // 属性数组
|
||||||
/** SPU 编号 */
|
price?: number | string; // 商品价格
|
||||||
spuId?: number;
|
marketPrice?: number | string; // 市场价
|
||||||
/** 属性数组 */
|
costPrice?: number | string; // 成本价
|
||||||
properties?: Property[];
|
barCode?: string; // 商品条码
|
||||||
/** 商品价格 */
|
picUrl?: string; // 图片地址
|
||||||
price?: number | string;
|
stock?: number; // 库存
|
||||||
/** 市场价 */
|
weight?: number; // 商品重量,单位:kg 千克
|
||||||
marketPrice?: number | string;
|
volume?: number; // 商品体积,单位:m^3 平米
|
||||||
/** 成本价 */
|
firstBrokeragePrice?: number | string; // 一级分销的佣金
|
||||||
costPrice?: number | string;
|
secondBrokeragePrice?: number | string; // 二级分销的佣金
|
||||||
/** 商品条码 */
|
salesCount?: number; // 商品销量
|
||||||
barCode?: string;
|
|
||||||
/** 图片地址 */
|
|
||||||
picUrl?: string;
|
|
||||||
/** 库存 */
|
|
||||||
stock?: number;
|
|
||||||
/** 商品重量,单位:kg 千克 */
|
|
||||||
weight?: number;
|
|
||||||
/** 商品体积,单位:m^3 平米 */
|
|
||||||
volume?: number;
|
|
||||||
/** 一级分销的佣金 */
|
|
||||||
firstBrokeragePrice?: number | string;
|
|
||||||
/** 二级分销的佣金 */
|
|
||||||
secondBrokeragePrice?: number | string;
|
|
||||||
/** 商品销量 */
|
|
||||||
salesCount?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 优惠券模板 */
|
/** 优惠券模板 */
|
||||||
export interface GiveCouponTemplate {
|
export interface GiveCouponTemplate {
|
||||||
/** 优惠券编号 */
|
id?: number; // 优惠券编号
|
||||||
id?: number;
|
name?: string; // 优惠券名称
|
||||||
/** 优惠券名称 */
|
|
||||||
name?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 商品 SPU */
|
/** 商品 SPU */
|
||||||
export interface Spu {
|
export interface Spu {
|
||||||
/** 商品编号 */
|
id?: number; // 商品编号
|
||||||
id?: number;
|
name?: string; // 商品名称
|
||||||
/** 商品名称 */
|
categoryId?: number; // 商品分类
|
||||||
name?: string;
|
keyword?: string; // 关键字
|
||||||
/** 商品分类 */
|
unit?: number; // 单位
|
||||||
categoryId?: number;
|
picUrl?: string; // 商品封面图
|
||||||
/** 关键字 */
|
sliderPicUrls?: string[]; // 商品轮播图
|
||||||
keyword?: string;
|
introduction?: string; // 商品简介
|
||||||
/** 单位 */
|
deliveryTypes?: number[]; // 配送方式
|
||||||
unit?: number | undefined;
|
deliveryTemplateId?: number; // 运费模版
|
||||||
/** 商品封面图 */
|
brandId?: number; // 商品品牌编号
|
||||||
picUrl?: string;
|
specType?: boolean; // 商品规格
|
||||||
/** 商品轮播图 */
|
subCommissionType?: boolean; // 分销类型
|
||||||
sliderPicUrls?: string[];
|
skus?: Sku[]; // sku数组
|
||||||
/** 商品简介 */
|
description?: string; // 商品详情
|
||||||
introduction?: string;
|
sort?: number; // 商品排序
|
||||||
/** 配送方式 */
|
giveIntegral?: number; // 赠送积分
|
||||||
deliveryTypes?: number[];
|
virtualSalesCount?: number; // 虚拟销量
|
||||||
/** 运费模版 */
|
price?: number; // 商品价格
|
||||||
deliveryTemplateId?: number | undefined;
|
combinationPrice?: number; // 商品拼团价格
|
||||||
/** 商品品牌编号 */
|
seckillPrice?: number; // 商品秒杀价格
|
||||||
brandId?: number;
|
salesCount?: number; // 商品销量
|
||||||
/** 商品规格 */
|
marketPrice?: number; // 市场价
|
||||||
specType?: boolean;
|
costPrice?: number; // 成本价
|
||||||
/** 分销类型 */
|
stock?: number; // 商品库存
|
||||||
subCommissionType?: boolean;
|
createTime?: Date; // 商品创建时间
|
||||||
/** sku数组 */
|
status?: number; // 商品状态
|
||||||
skus?: Sku[];
|
browseCount?: number; // 浏览量
|
||||||
/** 商品详情 */
|
|
||||||
description?: string;
|
|
||||||
/** 商品排序 */
|
|
||||||
sort?: number;
|
|
||||||
/** 赠送积分 */
|
|
||||||
giveIntegral?: number;
|
|
||||||
/** 虚拟销量 */
|
|
||||||
virtualSalesCount?: number;
|
|
||||||
/** 商品价格 */
|
|
||||||
price?: number;
|
|
||||||
/** 商品拼团价格 */
|
|
||||||
combinationPrice?: number;
|
|
||||||
/** 商品秒杀价格 */
|
|
||||||
seckillPrice?: number;
|
|
||||||
/** 商品销量 */
|
|
||||||
salesCount?: number;
|
|
||||||
/** 市场价 */
|
|
||||||
marketPrice?: number;
|
|
||||||
/** 成本价 */
|
|
||||||
costPrice?: number;
|
|
||||||
/** 商品库存 */
|
|
||||||
stock?: number;
|
|
||||||
/** 商品创建时间 */
|
|
||||||
createTime?: Date;
|
|
||||||
/** 商品状态 */
|
|
||||||
status?: number;
|
|
||||||
/** 浏览量 */
|
|
||||||
browseCount?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 商品状态更新 */
|
/** 商品状态更新 */
|
||||||
export interface StatusUpdate {
|
export interface StatusUpdate {
|
||||||
/** 商品编号 */
|
id: number; // 商品编号
|
||||||
id: number;
|
status: number; // 商品状态
|
||||||
/** 商品状态 */
|
|
||||||
status: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,32 +5,19 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallArticleApi {
|
export namespace MallArticleApi {
|
||||||
/** 文章管理 */
|
/** 文章管理 */
|
||||||
export interface Article {
|
export interface Article {
|
||||||
/** 文章编号 */
|
id: number; // 文章编号
|
||||||
id: number;
|
categoryId: number; // 分类编号
|
||||||
/** 分类编号 */
|
title: string; // 文章标题
|
||||||
categoryId: number;
|
author: string; // 作者
|
||||||
/** 文章标题 */
|
picUrl: string; // 封面图
|
||||||
title: string;
|
introduction: string; // 文章简介
|
||||||
/** 作者 */
|
browseCount: string; // 浏览数量
|
||||||
author: string;
|
sort: number; // 排序
|
||||||
/** 封面图 */
|
status: number; // 状态
|
||||||
picUrl: string;
|
spuId: number; // 商品编号
|
||||||
/** 文章简介 */
|
recommendHot: boolean; // 是否热门
|
||||||
introduction: string;
|
recommendBanner: boolean; // 是否轮播图
|
||||||
/** 浏览数量 */
|
content: string; // 文章内容
|
||||||
browseCount: string;
|
|
||||||
/** 排序 */
|
|
||||||
sort: number;
|
|
||||||
/** 状态 */
|
|
||||||
status: number;
|
|
||||||
/** 商品编号 */
|
|
||||||
spuId: number;
|
|
||||||
/** 是否热门 */
|
|
||||||
recommendHot: boolean;
|
|
||||||
/** 是否轮播图 */
|
|
||||||
recommendBanner: boolean;
|
|
||||||
/** 文章内容 */
|
|
||||||
content: string;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,16 +5,11 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallArticleCategoryApi {
|
export namespace MallArticleCategoryApi {
|
||||||
/** 文章分类 */
|
/** 文章分类 */
|
||||||
export interface ArticleCategory {
|
export interface ArticleCategory {
|
||||||
/** 分类编号 */
|
id: number; // 分类编号
|
||||||
id: number;
|
name: string; // 分类名称
|
||||||
/** 分类名称 */
|
picUrl: string; // 分类图片
|
||||||
name: string;
|
status: number; // 状态
|
||||||
/** 分类图片 */
|
sort: number; // 排序
|
||||||
picUrl: string;
|
|
||||||
/** 状态 */
|
|
||||||
status: number;
|
|
||||||
/** 排序 */
|
|
||||||
sort: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,62 +7,40 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallBargainActivityApi {
|
export namespace MallBargainActivityApi {
|
||||||
/** 砍价活动 */
|
/** 砍价活动 */
|
||||||
export interface BargainActivity {
|
export interface BargainActivity {
|
||||||
/** 活动编号 */
|
id?: number; // 活动编号
|
||||||
id?: number;
|
name?: string; // 活动名称
|
||||||
/** 活动名称 */
|
startTime?: Date; // 开始时间
|
||||||
name?: string;
|
endTime?: Date; // 结束时间
|
||||||
/** 开始时间 */
|
status?: number; // 状态
|
||||||
startTime?: Date;
|
helpMaxCount?: number; // 达到该人数,才能砍到低价
|
||||||
/** 结束时间 */
|
bargainCount?: number; // 最大帮砍次数
|
||||||
endTime?: Date;
|
totalLimitCount?: number; // 最大购买次数
|
||||||
/** 状态 */
|
spuId: number; // 商品 SPU 编号
|
||||||
status?: number;
|
skuId: number; // 商品 SKU 编号
|
||||||
/** 达到该人数,才能砍到低价 */
|
bargainFirstPrice: number; // 砍价起始价格,单位分
|
||||||
helpMaxCount?: number;
|
bargainMinPrice: number; // 砍价底价
|
||||||
/** 最大帮砍次数 */
|
stock: number; // 活动库存
|
||||||
bargainCount?: number;
|
randomMinPrice?: number; // 用户每次砍价的最小金额,单位:分
|
||||||
/** 最大购买次数 */
|
randomMaxPrice?: number; // 用户每次砍价的最大金额,单位:分
|
||||||
totalLimitCount?: number;
|
|
||||||
/** 商品 SPU 编号 */
|
|
||||||
spuId: number;
|
|
||||||
/** 商品 SKU 编号 */
|
|
||||||
skuId: number;
|
|
||||||
/** 砍价起始价格,单位分 */
|
|
||||||
bargainFirstPrice: number;
|
|
||||||
/** 砍价底价 */
|
|
||||||
bargainMinPrice: number;
|
|
||||||
/** 活动库存 */
|
|
||||||
stock: number;
|
|
||||||
/** 用户每次砍价的最小金额,单位:分 */
|
|
||||||
randomMinPrice?: number;
|
|
||||||
/** 用户每次砍价的最大金额,单位:分 */
|
|
||||||
randomMaxPrice?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 砍价活动所需属性。选择的商品和属性的时候使用方便使用活动的通用封装 */
|
/** 砍价活动所需属性。选择的商品和属性的时候使用方便使用活动的通用封装 */
|
||||||
export interface BargainProduct {
|
export interface BargainProduct {
|
||||||
/** 商品 SPU 编号 */
|
spuId: number; // 商品 SPU 编号
|
||||||
spuId: number;
|
skuId: number; // 商品 SKU 编号
|
||||||
/** 商品 SKU 编号 */
|
bargainFirstPrice: number; // 砍价起始价格,单位分
|
||||||
skuId: number;
|
bargainMinPrice: number; // 砍价底价
|
||||||
/** 砍价起始价格,单位分 */
|
stock: number; // 活动库存
|
||||||
bargainFirstPrice: number;
|
|
||||||
/** 砍价底价 */
|
|
||||||
bargainMinPrice: number;
|
|
||||||
/** 活动库存 */
|
|
||||||
stock: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 扩展 SKU 配置 */
|
/** 扩展 SKU 配置 */
|
||||||
export type SkuExtension = {
|
export type SkuExtension = {
|
||||||
/** 砍价活动配置 */
|
productConfig: BargainProduct; // 砍价活动配置
|
||||||
productConfig: BargainProduct;
|
|
||||||
} & MallSpuApi.Sku;
|
} & MallSpuApi.Sku;
|
||||||
|
|
||||||
/** 扩展 SPU 配置 */
|
/** 扩展 SPU 配置 */
|
||||||
export interface SpuExtension extends MallSpuApi.Spu {
|
export interface SpuExtension extends MallSpuApi.Spu {
|
||||||
/** SKU 列表 */
|
skus: SkuExtension[]; // SKU 列表
|
||||||
skus: SkuExtension[];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,16 +5,11 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallBargainHelpApi {
|
export namespace MallBargainHelpApi {
|
||||||
/** 砍价记录 */
|
/** 砍价记录 */
|
||||||
export interface BargainHelp {
|
export interface BargainHelp {
|
||||||
/** 记录编号 */
|
id: number; // 记录编号
|
||||||
id: number;
|
record: number; // 砍价记录编号
|
||||||
/** 砍价记录编号 */
|
userId: number; // 用户编号
|
||||||
record: number;
|
reducePrice: number; // 砍掉金额
|
||||||
/** 用户编号 */
|
endTime: Date; // 结束时间
|
||||||
userId: number;
|
|
||||||
/** 砍掉金额 */
|
|
||||||
reducePrice: number;
|
|
||||||
/** 结束时间 */
|
|
||||||
endTime: Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,26 +5,16 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallBargainRecordApi {
|
export namespace MallBargainRecordApi {
|
||||||
/** 砍价记录 */
|
/** 砍价记录 */
|
||||||
export interface BargainRecord {
|
export interface BargainRecord {
|
||||||
/** 记录编号 */
|
id: number; // 记录编号
|
||||||
id: number;
|
activityId: number; // 活动编号
|
||||||
/** 活动编号 */
|
userId: number; // 用户编号
|
||||||
activityId: number;
|
spuId: number; // 商品 SPU 编号
|
||||||
/** 用户编号 */
|
skuId: number; // 商品 SKU 编号
|
||||||
userId: number;
|
bargainFirstPrice: number; // 砍价起始价格
|
||||||
/** 商品 SPU 编号 */
|
bargainPrice: number; // 砍价价格
|
||||||
spuId: number;
|
status: number; // 状态
|
||||||
/** 商品 SKU 编号 */
|
orderId: number; // 订单编号
|
||||||
skuId: number;
|
endTime: Date; // 结束时间
|
||||||
/** 砍价起始价格 */
|
|
||||||
bargainFirstPrice: number;
|
|
||||||
/** 砍价价格 */
|
|
||||||
bargainPrice: number;
|
|
||||||
/** 状态 */
|
|
||||||
status: number;
|
|
||||||
/** 订单编号 */
|
|
||||||
orderId: number;
|
|
||||||
/** 结束时间 */
|
|
||||||
endTime: Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,59 +7,38 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallCombinationActivityApi {
|
export namespace MallCombinationActivityApi {
|
||||||
/** 拼团活动所需属性 */
|
/** 拼团活动所需属性 */
|
||||||
export interface CombinationProduct {
|
export interface CombinationProduct {
|
||||||
/** 商品 SPU 编号 */
|
spuId: number; // 商品 SPU 编号
|
||||||
spuId: number;
|
skuId: number; // 商品 SKU 编号
|
||||||
/** 商品 SKU 编号 */
|
combinationPrice: number; // 拼团价格
|
||||||
skuId: number;
|
|
||||||
/** 拼团价格 */
|
|
||||||
combinationPrice: number;
|
|
||||||
}
|
}
|
||||||
/** 拼团活动 */
|
/** 拼团活动 */
|
||||||
export interface CombinationActivity {
|
export interface CombinationActivity {
|
||||||
/** 活动编号 */
|
id?: number; // 活动编号
|
||||||
id?: number;
|
name?: string; // 活动名称
|
||||||
/** 活动名称 */
|
spuId?: number; // 商品 SPU 编号
|
||||||
name?: string;
|
totalLimitCount?: number; // 总限购数量
|
||||||
/** 商品 SPU 编号 */
|
singleLimitCount?: number; // 单次限购数量
|
||||||
spuId?: number;
|
startTime?: Date; // 开始时间
|
||||||
/** 总限购数量 */
|
endTime?: Date; // 结束时间
|
||||||
totalLimitCount?: number;
|
userSize?: number; // 用户数量
|
||||||
/** 单次限购数量 */
|
totalCount?: number; // 总数量
|
||||||
singleLimitCount?: number;
|
successCount?: number; // 成功数量
|
||||||
/** 开始时间 */
|
orderUserCount?: number; // 订单用户数量
|
||||||
startTime?: Date;
|
virtualGroup?: number; // 虚拟成团
|
||||||
/** 结束时间 */
|
status?: number; // 状态
|
||||||
endTime?: Date;
|
limitDuration?: number; // 限制时长
|
||||||
/** 用户数量 */
|
combinationPrice?: number; // 拼团价格
|
||||||
userSize?: number;
|
products: CombinationProduct[]; // 商品列表
|
||||||
/** 总数量 */
|
|
||||||
totalCount?: number;
|
|
||||||
/** 成功数量 */
|
|
||||||
successCount?: number;
|
|
||||||
/** 订单用户数量 */
|
|
||||||
orderUserCount?: number;
|
|
||||||
/** 虚拟成团 */
|
|
||||||
virtualGroup?: number;
|
|
||||||
/** 状态 */
|
|
||||||
status?: number;
|
|
||||||
/** 限制时长 */
|
|
||||||
limitDuration?: number;
|
|
||||||
/** 拼团价格 */
|
|
||||||
combinationPrice?: number;
|
|
||||||
/** 商品列表 */
|
|
||||||
products: CombinationProduct[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 扩展 SKU 配置 */
|
/** 扩展 SKU 配置 */
|
||||||
export type SkuExtension = {
|
export type SkuExtension = {
|
||||||
/** 拼团活动配置 */
|
productConfig: CombinationProduct; // 拼团活动配置
|
||||||
productConfig: CombinationProduct;
|
|
||||||
} & MallSpuApi.Sku;
|
} & MallSpuApi.Sku;
|
||||||
|
|
||||||
/** 扩展 SPU 配置 */
|
/** 扩展 SPU 配置 */
|
||||||
export interface SpuExtension extends MallSpuApi.Spu {
|
export interface SpuExtension extends MallSpuApi.Spu {
|
||||||
/** SKU 列表 */
|
skus: SkuExtension[]; // SKU 列表
|
||||||
skus: SkuExtension[];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,44 +5,27 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallCombinationRecordApi {
|
export namespace MallCombinationRecordApi {
|
||||||
/** 拼团记录 */
|
/** 拼团记录 */
|
||||||
export interface CombinationRecord {
|
export interface CombinationRecord {
|
||||||
/** 拼团记录编号 */
|
id: number; // 拼团记录编号
|
||||||
id: number;
|
activityId: number; // 拼团活动编号
|
||||||
/** 拼团活动编号 */
|
nickname: string; // 用户昵称
|
||||||
activityId: number;
|
avatar: string; // 用户头像
|
||||||
/** 用户昵称 */
|
headId: number; // 团长编号
|
||||||
nickname: string;
|
expireTime: string; // 过期时间
|
||||||
/** 用户头像 */
|
userSize: number; // 可参团人数
|
||||||
avatar: string;
|
userCount: number; // 已参团人数
|
||||||
/** 团长编号 */
|
status: number; // 拼团状态
|
||||||
headId: number;
|
spuName: string; // 商品名字
|
||||||
/** 过期时间 */
|
picUrl: string; // 商品图片
|
||||||
expireTime: string;
|
virtualGroup: boolean; // 是否虚拟成团
|
||||||
/** 可参团人数 */
|
startTime: string; // 开始时间 (订单付款后开始的时间)
|
||||||
userSize: number;
|
endTime: string; // 结束时间(成团时间/失败时间)
|
||||||
/** 已参团人数 */
|
|
||||||
userCount: number;
|
|
||||||
/** 拼团状态 */
|
|
||||||
status: number;
|
|
||||||
/** 商品名字 */
|
|
||||||
spuName: string;
|
|
||||||
/** 商品图片 */
|
|
||||||
picUrl: string;
|
|
||||||
/** 是否虚拟成团 */
|
|
||||||
virtualGroup: boolean;
|
|
||||||
/** 开始时间 (订单付款后开始的时间) */
|
|
||||||
startTime: string;
|
|
||||||
/** 结束时间(成团时间/失败时间) */
|
|
||||||
endTime: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 拼团记录概要信息 */
|
/** 拼团记录概要信息 */
|
||||||
export interface RecordSummary {
|
export interface RecordSummary {
|
||||||
/** 待成团数量 */
|
pendingCount: number; // 待成团数量
|
||||||
pendingCount: number;
|
successCount: number; // 已成团数量
|
||||||
/** 已成团数量 */
|
failCount: number; // 已失败数量
|
||||||
successCount: number;
|
|
||||||
/** 已失败数量 */
|
|
||||||
failCount: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,46 +5,28 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallCouponApi {
|
export namespace MallCouponApi {
|
||||||
/** 优惠券 */
|
/** 优惠券 */
|
||||||
export interface Coupon {
|
export interface Coupon {
|
||||||
/** 优惠券编号 */
|
id: number; // 优惠券编号
|
||||||
id: number;
|
name: string; // 优惠券名称
|
||||||
/** 优惠券名称 */
|
status: number; // 优惠券状态
|
||||||
name: string;
|
type: number; // 优惠券类型
|
||||||
/** 优惠券状态 */
|
price: number; // 优惠券金额
|
||||||
status: number;
|
usePrice: number; // 使用门槛
|
||||||
/** 优惠券类型 */
|
productScope: number; // 商品范围
|
||||||
type: number;
|
productSpuIds: number[]; // 商品编号数组
|
||||||
/** 优惠券金额 */
|
validityType: number; // 有效期类型
|
||||||
price: number;
|
validStartTime: Date; // 固定日期-生效开始时间
|
||||||
/** 使用门槛 */
|
validEndTime: Date; // 固定日期-生效结束时间
|
||||||
usePrice: number;
|
fixedStartTerm: number; // 领取日期-开始天数
|
||||||
/** 商品范围 */
|
fixedEndTerm: number; // 领取日期-结束天数
|
||||||
productScope: number;
|
takeLimitCount: number; // 每人限领个数
|
||||||
/** 商品编号数组 */
|
usePriceEnabled: boolean; // 是否设置满多少金额可用
|
||||||
productSpuIds: number[];
|
productCategoryIds: number[]; // 商品分类编号数组
|
||||||
/** 有效期类型 */
|
|
||||||
validityType: number;
|
|
||||||
/** 固定日期-生效开始时间 */
|
|
||||||
validStartTime: Date;
|
|
||||||
/** 固定日期-生效结束时间 */
|
|
||||||
validEndTime: Date;
|
|
||||||
/** 领取日期-开始天数 */
|
|
||||||
fixedStartTerm: number;
|
|
||||||
/** 领取日期-结束天数 */
|
|
||||||
fixedEndTerm: number;
|
|
||||||
/** 每人限领个数 */
|
|
||||||
takeLimitCount: number;
|
|
||||||
/** 是否设置满多少金额可用 */
|
|
||||||
usePriceEnabled: boolean;
|
|
||||||
/** 商品分类编号数组 */
|
|
||||||
productCategoryIds: number[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 发送优惠券 */
|
/** 发送优惠券 */
|
||||||
export interface SendCoupon {
|
export interface CouponSendReqVO {
|
||||||
/** 优惠券编号 */
|
templateId: number; // 优惠券编号
|
||||||
couponId: number;
|
userIds: number[]; // 用户编号数组
|
||||||
/** 用户编号数组 */
|
|
||||||
userIds: number[];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,6 +44,6 @@ export function getCouponPage(params: PageParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 发送优惠券 */
|
/** 发送优惠券 */
|
||||||
export function sendCoupon(data: MallCouponApi.SendCoupon) {
|
export function sendCoupon(data: MallCouponApi.CouponSendReqVO) {
|
||||||
return requestClient.post('/promotion/coupon/send', data);
|
return requestClient.post('/promotion/coupon/send', data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,54 +5,32 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallCouponTemplateApi {
|
export namespace MallCouponTemplateApi {
|
||||||
/** 优惠券模板 */
|
/** 优惠券模板 */
|
||||||
export interface CouponTemplate {
|
export interface CouponTemplate {
|
||||||
/** 模板编号 */
|
id: number; // 模板编号
|
||||||
id: number;
|
name: string; // 模板名称
|
||||||
/** 模板名称 */
|
status: number; // 状态
|
||||||
name: string;
|
totalCount: number; // 发放数量
|
||||||
/** 状态 */
|
takeLimitCount: number; // 每人限领个数
|
||||||
status: number;
|
takeType: number; // 领取方式
|
||||||
/** 发放数量 */
|
usePrice: number; // 使用门槛
|
||||||
totalCount: number;
|
productScope: number; // 商品范围
|
||||||
/** 每人限领个数 */
|
productScopeValues: number[]; // 商品范围值
|
||||||
takeLimitCount: number;
|
validityType: number; // 有效期类型
|
||||||
/** 领取方式 */
|
validStartTime: Date; // 固定日期-生效开始时间
|
||||||
takeType: number;
|
validEndTime: Date; // 固定日期-生效结束时间
|
||||||
/** 使用门槛 */
|
fixedStartTerm: number; // 领取日期-开始天数
|
||||||
usePrice: number;
|
fixedEndTerm: number; // 领取日期-结束天数
|
||||||
/** 商品范围 */
|
discountType: number; // 优惠类型
|
||||||
productScope: number;
|
discountPercent: number; // 折扣百分比
|
||||||
/** 商品范围值 */
|
discountPrice: number; // 优惠金额
|
||||||
productScopeValues: number[];
|
discountLimitPrice: number; // 折扣上限
|
||||||
/** 有效期类型 */
|
takeCount: number; // 已领取数量
|
||||||
validityType: number;
|
useCount: number; // 已使用数量
|
||||||
/** 固定日期-生效开始时间 */
|
|
||||||
validStartTime: Date;
|
|
||||||
/** 固定日期-生效结束时间 */
|
|
||||||
validEndTime: Date;
|
|
||||||
/** 领取日期-开始天数 */
|
|
||||||
fixedStartTerm: number;
|
|
||||||
/** 领取日期-结束天数 */
|
|
||||||
fixedEndTerm: number;
|
|
||||||
/** 优惠类型 */
|
|
||||||
discountType: number;
|
|
||||||
/** 折扣百分比 */
|
|
||||||
discountPercent: number;
|
|
||||||
/** 优惠金额 */
|
|
||||||
discountPrice: number;
|
|
||||||
/** 折扣上限 */
|
|
||||||
discountLimitPrice: number;
|
|
||||||
/** 已领取数量 */
|
|
||||||
takeCount: number;
|
|
||||||
/** 已使用数量 */
|
|
||||||
useCount: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 优惠券模板状态更新 */
|
/** 优惠券模板状态更新 */
|
||||||
export interface StatusUpdate {
|
export interface StatusUpdate {
|
||||||
/** 模板编号 */
|
id: number; // 模板编号
|
||||||
id: number;
|
status: 0 | 1; // 状态
|
||||||
/** 状态 */
|
|
||||||
status: 0 | 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,48 +7,33 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallDiscountActivityApi {
|
export namespace MallDiscountActivityApi {
|
||||||
/** 限时折扣相关属性 */
|
/** 限时折扣相关属性 */
|
||||||
export interface DiscountProduct {
|
export interface DiscountProduct {
|
||||||
/** 商品 SPU 编号 */
|
spuId: number; // 商品 SPU 编号
|
||||||
spuId: number;
|
skuId: number; // 商品 SKU 编号
|
||||||
/** 商品 SKU 编号 */
|
discountType: number; // 折扣类型
|
||||||
skuId: number;
|
discountPercent: number; // 折扣百分比
|
||||||
/** 折扣类型 */
|
discountPrice: number; // 折扣价格
|
||||||
discountType: number;
|
|
||||||
/** 折扣百分比 */
|
|
||||||
discountPercent: number;
|
|
||||||
/** 折扣价格 */
|
|
||||||
discountPrice: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 限时折扣活动 */
|
/** 限时折扣活动 */
|
||||||
export interface DiscountActivity {
|
export interface DiscountActivity {
|
||||||
/** 活动编号 */
|
id?: number; // 活动编号
|
||||||
id?: number;
|
spuId?: number; // 商品 SPU 编号
|
||||||
/** 商品 SPU 编号 */
|
name?: string; // 活动名称
|
||||||
spuId?: number;
|
status?: number; // 状态
|
||||||
/** 活动名称 */
|
remark?: string; // 备注
|
||||||
name?: string;
|
startTime?: Date; // 开始时间
|
||||||
/** 状态 */
|
endTime?: Date; // 结束时间
|
||||||
status?: number;
|
products?: DiscountProduct[]; // 商品列表
|
||||||
/** 备注 */
|
|
||||||
remark?: string;
|
|
||||||
/** 开始时间 */
|
|
||||||
startTime?: Date;
|
|
||||||
/** 结束时间 */
|
|
||||||
endTime?: Date;
|
|
||||||
/** 商品列表 */
|
|
||||||
products?: DiscountProduct[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 扩展 SKU 配置 */
|
/** 扩展 SKU 配置 */
|
||||||
export type SkuExtension = {
|
export type SkuExtension = {
|
||||||
/** 限时折扣配置 */
|
productConfig: DiscountProduct; // 限时折扣配置
|
||||||
productConfig: DiscountProduct;
|
|
||||||
} & MallSpuApi.Sku;
|
} & MallSpuApi.Sku;
|
||||||
|
|
||||||
/** 扩展 SPU 配置 */
|
/** 扩展 SPU 配置 */
|
||||||
export interface SpuExtension extends MallSpuApi.Spu {
|
export interface SpuExtension extends MallSpuApi.Spu {
|
||||||
/** SKU 列表 */
|
skus: SkuExtension[]; // SKU 列表
|
||||||
skus: SkuExtension[];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,18 +5,12 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallDiyPageApi {
|
export namespace MallDiyPageApi {
|
||||||
/** 装修页面 */
|
/** 装修页面 */
|
||||||
export interface DiyPage {
|
export interface DiyPage {
|
||||||
/** 页面编号 */
|
id?: number; // 页面编号
|
||||||
id?: number;
|
templateId?: number; // 模板编号
|
||||||
/** 模板编号 */
|
name: string; // 页面名称
|
||||||
templateId?: number;
|
remark: string; // 备注
|
||||||
/** 页面名称 */
|
previewPicUrls: string[]; // 预览图片地址数组
|
||||||
name: string;
|
property: string; // 页面属性
|
||||||
/** 备注 */
|
|
||||||
remark: string;
|
|
||||||
/** 预览图片地址数组 */
|
|
||||||
previewPicUrls: string[];
|
|
||||||
/** 页面属性 */
|
|
||||||
property: string;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,26 +7,18 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallDiyTemplateApi {
|
export namespace MallDiyTemplateApi {
|
||||||
/** 装修模板 */
|
/** 装修模板 */
|
||||||
export interface DiyTemplate {
|
export interface DiyTemplate {
|
||||||
/** 模板编号 */
|
id?: number; // 模板编号
|
||||||
id?: number;
|
name: string; // 模板名称
|
||||||
/** 模板名称 */
|
used: boolean; // 是否使用
|
||||||
name: string;
|
usedTime?: Date; // 使用时间
|
||||||
/** 是否使用 */
|
remark: string; // 备注
|
||||||
used: boolean;
|
previewPicUrls: string[]; // 预览图片地址数组
|
||||||
/** 使用时间 */
|
property: string; // 模板属性
|
||||||
usedTime?: Date;
|
|
||||||
/** 备注 */
|
|
||||||
remark: string;
|
|
||||||
/** 预览图片地址数组 */
|
|
||||||
previewPicUrls: string[];
|
|
||||||
/** 模板属性 */
|
|
||||||
property: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 装修模板属性(包含页面列表) */
|
/** 装修模板属性(包含页面列表) */
|
||||||
export interface DiyTemplateProperty extends DiyTemplate {
|
export interface DiyTemplateProperty extends DiyTemplate {
|
||||||
/** 页面列表 */
|
pages: MallDiyPageApi.DiyPage[]; // 页面列表
|
||||||
pages: MallDiyPageApi.DiyPage[];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,38 +5,24 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallKefuConversationApi {
|
export namespace MallKefuConversationApi {
|
||||||
/** 客服会话 */
|
/** 客服会话 */
|
||||||
export interface Conversation {
|
export interface Conversation {
|
||||||
/** 编号 */
|
id: number; // 编号
|
||||||
id: number;
|
userId: number; // 会话所属用户
|
||||||
/** 会话所属用户 */
|
userAvatar: string; // 会话所属用户头像
|
||||||
userId: number;
|
userNickname: string; // 会话所属用户昵称
|
||||||
/** 会话所属用户头像 */
|
lastMessageTime: Date; // 最后聊天时间
|
||||||
userAvatar: string;
|
lastMessageContent: string; // 最后聊天内容
|
||||||
/** 会话所属用户昵称 */
|
lastMessageContentType: number; // 最后发送的消息类型
|
||||||
userNickname: string;
|
adminPinned: boolean; // 管理端置顶
|
||||||
/** 最后聊天时间 */
|
userDeleted: boolean; // 用户是否可见
|
||||||
lastMessageTime: Date;
|
adminDeleted: boolean; // 管理员是否可见
|
||||||
/** 最后聊天内容 */
|
adminUnreadMessageCount: number; // 管理员未读消息数
|
||||||
lastMessageContent: string;
|
createTime?: string; // 创建时间
|
||||||
/** 最后发送的消息类型 */
|
|
||||||
lastMessageContentType: number;
|
|
||||||
/** 管理端置顶 */
|
|
||||||
adminPinned: boolean;
|
|
||||||
/** 用户是否可见 */
|
|
||||||
userDeleted: boolean;
|
|
||||||
/** 管理员是否可见 */
|
|
||||||
adminDeleted: boolean;
|
|
||||||
/** 管理员未读消息数 */
|
|
||||||
adminUnreadMessageCount: number;
|
|
||||||
/** 创建时间 */
|
|
||||||
createTime?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会话置顶请求 */
|
/** 会话置顶请求 */
|
||||||
export interface ConversationPinnedUpdate {
|
export interface ConversationPinnedUpdate {
|
||||||
/** 会话编号 */
|
id: number; // 会话编号
|
||||||
id: number;
|
pinned: boolean; // 是否置顶
|
||||||
/** 是否置顶 */
|
|
||||||
pinned: boolean;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,44 +5,29 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallKefuMessageApi {
|
export namespace MallKefuMessageApi {
|
||||||
/** 客服消息 */
|
/** 客服消息 */
|
||||||
export interface Message {
|
export interface Message {
|
||||||
/** 编号 */
|
id: number; // 编号
|
||||||
id: number;
|
conversationId: number; // 会话编号
|
||||||
/** 会话编号 */
|
senderId: number; // 发送人编号
|
||||||
conversationId: number;
|
senderAvatar: string; // 发送人头像
|
||||||
/** 发送人编号 */
|
senderType: number; // 发送人类型
|
||||||
senderId: number;
|
receiverId: number; // 接收人编号
|
||||||
/** 发送人头像 */
|
receiverType: number; // 接收人类型
|
||||||
senderAvatar: string;
|
contentType: number; // 消息类型
|
||||||
/** 发送人类型 */
|
content: string; // 消息内容
|
||||||
senderType: number;
|
readStatus: boolean; // 是否已读
|
||||||
/** 接收人编号 */
|
createTime: Date; // 创建时间
|
||||||
receiverId: number;
|
|
||||||
/** 接收人类型 */
|
|
||||||
receiverType: number;
|
|
||||||
/** 消息类型 */
|
|
||||||
contentType: number;
|
|
||||||
/** 消息内容 */
|
|
||||||
content: string;
|
|
||||||
/** 是否已读 */
|
|
||||||
readStatus: boolean;
|
|
||||||
/** 创建时间 */
|
|
||||||
createTime: Date;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 发送消息请求 */
|
/** 发送消息请求 */
|
||||||
export interface MessageSend {
|
export interface MessageSend {
|
||||||
/** 会话编号 */
|
conversationId: number; // 会话编号
|
||||||
conversationId: number;
|
contentType: number; // 消息类型
|
||||||
/** 消息类型 */
|
content: string; // 消息内容
|
||||||
contentType: number;
|
|
||||||
/** 消息内容 */
|
|
||||||
content: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 消息列表查询参数 */
|
/** 消息列表查询参数 */
|
||||||
export interface MessageQuery extends PageParam {
|
export interface MessageQuery extends PageParam {
|
||||||
/** 会话编号 */
|
conversationId: number; // 会话编号
|
||||||
conversationId: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,80 +7,51 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallPointActivityApi {
|
export namespace MallPointActivityApi {
|
||||||
/** 积分商城商品 */
|
/** 积分商城商品 */
|
||||||
export interface PointProduct {
|
export interface PointProduct {
|
||||||
/** 积分商城商品编号 */
|
id?: number; // 积分商城商品编号
|
||||||
id?: number;
|
activityId?: number; // 积分商城活动 id
|
||||||
/** 积分商城活动 id */
|
spuId?: number; // 商品 SPU 编号
|
||||||
activityId?: number;
|
skuId: number; // 商品 SKU 编号
|
||||||
/** 商品 SPU 编号 */
|
count: number; // 可兑换数量
|
||||||
spuId?: number;
|
point: number; // 兑换积分
|
||||||
/** 商品 SKU 编号 */
|
price: number; // 兑换金额,单位:分
|
||||||
skuId: number;
|
stock: number; // 积分商城商品库存
|
||||||
/** 可兑换数量 */
|
activityStatus?: number; // 积分商城商品状态
|
||||||
count: number;
|
|
||||||
/** 兑换积分 */
|
|
||||||
point: number;
|
|
||||||
/** 兑换金额,单位:分 */
|
|
||||||
price: number;
|
|
||||||
/** 积分商城商品库存 */
|
|
||||||
stock: number;
|
|
||||||
/** 积分商城商品状态 */
|
|
||||||
activityStatus?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 积分商城活动 */
|
/** 积分商城活动 */
|
||||||
export interface PointActivity {
|
export interface PointActivity {
|
||||||
/** 积分商城活动编号 */
|
id: number; // 积分商城活动编号
|
||||||
id: number;
|
spuId: number; // 积分商城活动商品
|
||||||
/** 积分商城活动商品 */
|
status: number; // 活动状态
|
||||||
spuId: number;
|
stock: number; // 积分商城活动库存
|
||||||
/** 活动状态 */
|
totalStock: number; // 积分商城活动总库存
|
||||||
status: number;
|
remark?: string; // 备注
|
||||||
/** 积分商城活动库存 */
|
sort: number; // 排序
|
||||||
stock: number;
|
createTime: string; // 创建时间
|
||||||
/** 积分商城活动总库存 */
|
products: PointProduct[]; // 积分商城商品
|
||||||
totalStock: number;
|
spuName: string; // 商品名称
|
||||||
/** 备注 */
|
picUrl: string; // 商品主图
|
||||||
remark?: string;
|
marketPrice: number; // 商品市场价,单位:分
|
||||||
/** 排序 */
|
point: number; // 兑换积分
|
||||||
sort: number;
|
price: number; // 兑换金额,单位:分
|
||||||
/** 创建时间 */
|
|
||||||
createTime: string;
|
|
||||||
/** 积分商城商品 */
|
|
||||||
products: PointProduct[];
|
|
||||||
/** 商品名称 */
|
|
||||||
spuName: string;
|
|
||||||
/** 商品主图 */
|
|
||||||
picUrl: string;
|
|
||||||
/** 商品市场价,单位:分 */
|
|
||||||
marketPrice: number;
|
|
||||||
/** 兑换积分 */
|
|
||||||
point: number;
|
|
||||||
/** 兑换金额,单位:分 */
|
|
||||||
price: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 扩展 SKU 配置 */
|
/** 扩展 SKU 配置 */
|
||||||
export type SkuExtension = {
|
export type SkuExtension = {
|
||||||
/** 积分商城商品配置 */
|
productConfig: PointProduct; // 积分商城商品配置
|
||||||
productConfig: PointProduct;
|
|
||||||
} & MallSpuApi.Sku;
|
} & MallSpuApi.Sku;
|
||||||
|
|
||||||
/** 扩展 SPU 配置 */
|
/** 扩展 SPU 配置 */
|
||||||
export interface SpuExtension extends MallSpuApi.Spu {
|
export interface SpuExtension extends MallSpuApi.Spu {
|
||||||
/** SKU 列表 */
|
skus: SkuExtension[]; // SKU 列表
|
||||||
skus: SkuExtension[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 扩展 SPU 配置(带积分信息) */
|
/** 扩展 SPU 配置(带积分信息) */
|
||||||
export interface SpuExtensionWithPoint extends MallSpuApi.Spu {
|
export interface SpuExtensionWithPoint extends MallSpuApi.Spu {
|
||||||
/** 积分商城活动库存 */
|
pointStock: number; // 积分商城活动库存
|
||||||
pointStock: number;
|
pointTotalStock: number; // 积分商城活动总库存
|
||||||
/** 积分商城活动总库存 */
|
point: number; // 兑换积分
|
||||||
pointTotalStock: number;
|
pointPrice: number; // 兑换金额,单位:分
|
||||||
/** 兑换积分 */
|
|
||||||
point: number;
|
|
||||||
/** 兑换金额,单位:分 */
|
|
||||||
pointPrice: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,46 +5,29 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallRewardActivityApi {
|
export namespace MallRewardActivityApi {
|
||||||
/** 优惠规则 */
|
/** 优惠规则 */
|
||||||
export interface RewardRule {
|
export interface RewardRule {
|
||||||
/** 满足金额 */
|
limit?: number; // 满足金额
|
||||||
limit?: number;
|
discountPrice?: number; // 优惠金额
|
||||||
/** 优惠金额 */
|
freeDelivery?: boolean; // 是否包邮
|
||||||
discountPrice?: number;
|
point: number; // 赠送积分
|
||||||
/** 是否包邮 */
|
|
||||||
freeDelivery?: boolean;
|
|
||||||
/** 赠送积分 */
|
|
||||||
point: number;
|
|
||||||
/** 赠送优惠券数量 */
|
|
||||||
giveCouponTemplateCounts?: {
|
giveCouponTemplateCounts?: {
|
||||||
[key: number]: number;
|
[key: number]: number;
|
||||||
};
|
}; // 赠送优惠券数量
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 满减送活动 */
|
/** 满减送活动 */
|
||||||
export interface RewardActivity {
|
export interface RewardActivity {
|
||||||
/** 活动编号 */
|
id?: number; // 活动编号
|
||||||
id?: number;
|
name?: string; // 活动名称
|
||||||
/** 活动名称 */
|
startTime?: Date; // 开始时间
|
||||||
name?: string;
|
endTime?: Date; // 结束时间
|
||||||
/** 开始时间 */
|
startAndEndTime?: Date[]; // 开始和结束时间(仅前端使用)
|
||||||
startTime?: Date;
|
remark?: string; // 备注
|
||||||
/** 结束时间 */
|
conditionType?: number; // 条件类型
|
||||||
endTime?: Date;
|
productScope?: number; // 商品范围
|
||||||
/** 开始和结束时间(仅前端使用) */
|
rules: RewardRule[]; // 优惠规则列表
|
||||||
startAndEndTime?: Date[];
|
productScopeValues?: number[]; // 商品范围值(仅表单使用):值为品类编号列表、商品编号列表
|
||||||
/** 备注 */
|
productCategoryIds?: number[]; // 商品分类编号列表(仅表单使用)
|
||||||
remark?: string;
|
productSpuIds?: number[]; // 商品 SPU 编号列表(仅表单使用)
|
||||||
/** 条件类型 */
|
|
||||||
conditionType?: number;
|
|
||||||
/** 商品范围 */
|
|
||||||
productScope?: number;
|
|
||||||
/** 优惠规则列表 */
|
|
||||||
rules: RewardRule[];
|
|
||||||
/** 商品范围值(仅表单使用):值为品类编号列表、商品编号列表 */
|
|
||||||
productScopeValues?: number[];
|
|
||||||
/** 商品分类编号列表(仅表单使用) */
|
|
||||||
productCategoryIds?: number[];
|
|
||||||
/** 商品 SPU 编号列表(仅表单使用) */
|
|
||||||
productSpuIds?: number[];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,66 +7,42 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallSeckillActivityApi {
|
export namespace MallSeckillActivityApi {
|
||||||
/** 秒杀商品 */
|
/** 秒杀商品 */
|
||||||
export interface SeckillProduct {
|
export interface SeckillProduct {
|
||||||
/** 商品 SKU 编号 */
|
skuId: number; // 商品 SKU 编号
|
||||||
skuId: number;
|
spuId: number; // 商品 SPU 编号
|
||||||
/** 商品 SPU 编号 */
|
seckillPrice: number; // 秒杀价格
|
||||||
spuId: number;
|
stock: number; // 秒杀库存
|
||||||
/** 秒杀价格 */
|
|
||||||
seckillPrice: number;
|
|
||||||
/** 秒杀库存 */
|
|
||||||
stock: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 秒杀活动 */
|
/** 秒杀活动 */
|
||||||
export interface SeckillActivity {
|
export interface SeckillActivity {
|
||||||
/** 活动编号 */
|
id?: number; // 活动编号
|
||||||
id?: number;
|
spuId?: number; // 商品 SPU 编号
|
||||||
/** 商品 SPU 编号 */
|
name?: string; // 活动名称
|
||||||
spuId?: number;
|
status?: number; // 活动状态
|
||||||
/** 活动名称 */
|
remark?: string; // 备注
|
||||||
name?: string;
|
startTime?: Date; // 开始时间
|
||||||
/** 活动状态 */
|
endTime?: Date; // 结束时间
|
||||||
status?: number;
|
sort?: number; // 排序
|
||||||
/** 备注 */
|
configIds?: string; // 配置编号
|
||||||
remark?: string;
|
orderCount?: number; // 订单数量
|
||||||
/** 开始时间 */
|
userCount?: number; // 用户数量
|
||||||
startTime?: Date;
|
totalPrice?: number; // 总金额
|
||||||
/** 结束时间 */
|
totalLimitCount?: number; // 总限购数量
|
||||||
endTime?: Date;
|
singleLimitCount?: number; // 单次限购数量
|
||||||
/** 排序 */
|
stock?: number; // 秒杀库存
|
||||||
sort?: number;
|
totalStock?: number; // 秒杀总库存
|
||||||
/** 配置编号 */
|
seckillPrice?: number; // 秒杀价格
|
||||||
configIds?: string;
|
products?: SeckillProduct[]; // 秒杀商品列表
|
||||||
/** 订单数量 */
|
|
||||||
orderCount?: number;
|
|
||||||
/** 用户数量 */
|
|
||||||
userCount?: number;
|
|
||||||
/** 总金额 */
|
|
||||||
totalPrice?: number;
|
|
||||||
/** 总限购数量 */
|
|
||||||
totalLimitCount?: number;
|
|
||||||
/** 单次限购数量 */
|
|
||||||
singleLimitCount?: number;
|
|
||||||
/** 秒杀库存 */
|
|
||||||
stock?: number;
|
|
||||||
/** 秒杀总库存 */
|
|
||||||
totalStock?: number;
|
|
||||||
/** 秒杀价格 */
|
|
||||||
seckillPrice?: number;
|
|
||||||
/** 秒杀商品列表 */
|
|
||||||
products?: SeckillProduct[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 扩展 SKU 配置 */
|
/** 扩展 SKU 配置 */
|
||||||
export type SkuExtension = {
|
export type SkuExtension = {
|
||||||
/** 秒杀商品配置 */
|
productConfig: SeckillProduct; // 秒杀商品配置
|
||||||
productConfig: SeckillProduct;
|
|
||||||
} & MallSpuApi.Sku;
|
} & MallSpuApi.Sku;
|
||||||
|
|
||||||
/** 扩展 SPU 配置 */
|
/** 扩展 SPU 配置 */
|
||||||
export interface SpuExtension extends MallSpuApi.Spu {
|
export interface SpuExtension extends MallSpuApi.Spu {
|
||||||
/** SKU 列表 */
|
skus: SkuExtension[]; // SKU 列表
|
||||||
skus: SkuExtension[];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,26 +5,18 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallSeckillConfigApi {
|
export namespace MallSeckillConfigApi {
|
||||||
/** 秒杀时段 */
|
/** 秒杀时段 */
|
||||||
export interface SeckillConfig {
|
export interface SeckillConfig {
|
||||||
/** 编号 */
|
id: number; // 编号
|
||||||
id: number;
|
name: string; // 秒杀时段名称
|
||||||
/** 秒杀时段名称 */
|
startTime: string; // 开始时间点
|
||||||
name: string;
|
endTime: string; // 结束时间点
|
||||||
/** 开始时间点 */
|
sliderPicUrls: string[]; // 秒杀轮播图
|
||||||
startTime: string;
|
status: number; // 活动状态
|
||||||
/** 结束时间点 */
|
|
||||||
endTime: string;
|
|
||||||
/** 秒杀轮播图 */
|
|
||||||
sliderPicUrls: string[];
|
|
||||||
/** 活动状态 */
|
|
||||||
status: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 时段配置状态更新 */
|
/** 时段配置状态更新 */
|
||||||
export interface StatusUpdate {
|
export interface StatusUpdate {
|
||||||
/** 编号 */
|
id: number; // 编号
|
||||||
id: number;
|
status: number; // 状态
|
||||||
/** 状态 */
|
|
||||||
status: number;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,67 +7,65 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallMemberStatisticsApi {
|
export namespace MallMemberStatisticsApi {
|
||||||
/** 会员分析 Request */
|
/** 会员分析 Request */
|
||||||
export interface AnalyseReq {
|
export interface AnalyseReq {
|
||||||
times: Date[];
|
times: Date[]; // 时间范围
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员分析对照数据 Response */
|
/** 会员分析对照数据 Response */
|
||||||
export interface AnalyseComparison {
|
export interface AnalyseComparison {
|
||||||
registerUserCount: number;
|
registerUserCount: number; // 注册用户数
|
||||||
visitUserCount: number;
|
visitUserCount: number; // 访问用户数
|
||||||
rechargeUserCount: number;
|
rechargeUserCount: number; // 充值用户数
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员分析 Response */
|
/** 会员分析 Response */
|
||||||
export interface Analyse {
|
export interface Analyse {
|
||||||
visitUserCount: number;
|
visitUserCount: number; // 访问用户数
|
||||||
orderUserCount: number;
|
orderUserCount: number; // 下单用户数
|
||||||
payUserCount: number;
|
payUserCount: number; // 支付用户数
|
||||||
atv: number;
|
atv: number; // 平均客单价
|
||||||
comparison: MallDataComparisonResp<AnalyseComparison>;
|
comparison: MallDataComparisonResp<AnalyseComparison>; // 对照数据
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员地区统计 Response */
|
/** 会员地区统计 Response */
|
||||||
export interface AreaStatistics {
|
export interface AreaStatistics {
|
||||||
areaId: number;
|
areaId: number; // 地区ID
|
||||||
areaName: string;
|
areaName: string; // 地区名称
|
||||||
userCount: number;
|
userCount: number; // 用户数
|
||||||
orderCreateUserCount: number;
|
orderCreateUserCount: number; // 下单用户数
|
||||||
orderPayUserCount: number;
|
orderPayUserCount: number; // 支付用户数
|
||||||
orderPayPrice: number;
|
orderPayPrice: number; // 支付金额
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员性别统计 Response */
|
/** 会员性别统计 Response */
|
||||||
export interface SexStatistics {
|
export interface SexStatistics {
|
||||||
sex: number;
|
sex: number; // 性别
|
||||||
userCount: number;
|
userCount: number; // 用户数
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员统计 Response */
|
/** 会员统计 Response */
|
||||||
export interface Summary {
|
export interface Summary {
|
||||||
userCount: number;
|
userCount: number; // 用户数
|
||||||
rechargeUserCount: number;
|
rechargeUserCount: number; // 充值用户数
|
||||||
rechargePrice: number;
|
rechargePrice: number; // 充值金额
|
||||||
expensePrice: number;
|
expensePrice: number; // 消费金额
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员终端统计 Response */
|
/** 会员终端统计 Response */
|
||||||
export interface TerminalStatistics {
|
export interface TerminalStatistics {
|
||||||
terminal: number;
|
terminal: number; // 终端
|
||||||
userCount: number;
|
userCount: number; // 用户数
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员数量统计 Response */
|
/** 会员数量统计 Response */
|
||||||
export interface Count {
|
export interface Count {
|
||||||
/** 用户访问量 */
|
visitUserCount: string; // 用户访问量
|
||||||
visitUserCount: string;
|
registerUserCount: number; // 注册用户数量
|
||||||
/** 注册用户数量 */
|
|
||||||
registerUserCount: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员注册数量 Response */
|
/** 会员注册数量 Response */
|
||||||
export interface RegisterCount {
|
export interface RegisterCount {
|
||||||
date: string;
|
date: string; // 日期
|
||||||
count: number;
|
count: number; // 数量
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,28 +5,17 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallBrokerageRecordApi {
|
export namespace MallBrokerageRecordApi {
|
||||||
/** 佣金记录 */
|
/** 佣金记录 */
|
||||||
export interface BrokerageRecord {
|
export interface BrokerageRecord {
|
||||||
/** 编号 */
|
id: number; // 编号
|
||||||
id: number;
|
userId: number; // 用户编号
|
||||||
/** 用户编号 */
|
userNickname: string; // 用户昵称
|
||||||
userId: number;
|
userAvatar: string; // 用户头像
|
||||||
/** 用户昵称 */
|
price: number; // 佣金金额,单位:分
|
||||||
userNickname: string;
|
type: number; // 佣金类型
|
||||||
/** 用户头像 */
|
orderId: number; // 关联订单编号
|
||||||
userAvatar: string;
|
orderNo: string; // 关联订单号
|
||||||
/** 佣金金额,单位:分 */
|
createTime: Date; // 创建时间
|
||||||
price: number;
|
status: number; // 状态
|
||||||
/** 佣金类型 */
|
settlementTime: Date; // 结算时间
|
||||||
type: number;
|
|
||||||
/** 关联订单编号 */
|
|
||||||
orderId: number;
|
|
||||||
/** 关联订单号 */
|
|
||||||
orderNo: string;
|
|
||||||
/** 创建时间 */
|
|
||||||
createTime: Date;
|
|
||||||
/** 状态 */
|
|
||||||
status: number;
|
|
||||||
/** 结算时间 */
|
|
||||||
settlementTime: Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,59 +5,45 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallBrokerageUserApi {
|
export namespace MallBrokerageUserApi {
|
||||||
/** 分销用户 */
|
/** 分销用户 */
|
||||||
export interface BrokerageUser {
|
export interface BrokerageUser {
|
||||||
/** 编号 */
|
id: number; // 编号
|
||||||
id: number;
|
bindUserId: number; // 推广员编号
|
||||||
/** 推广员编号 */
|
bindUserTime: Date; // 推广员绑定时间
|
||||||
bindUserId: number;
|
brokerageEnabled: boolean; // 是否启用分销
|
||||||
/** 推广员绑定时间 */
|
brokerageTime: Date; // 分销资格时间
|
||||||
bindUserTime: Date;
|
price: number; // 可提现金额,单位:分
|
||||||
/** 是否启用分销 */
|
frozenPrice: number; // 冻结金额,单位:分
|
||||||
brokerageEnabled: boolean;
|
nickname: string; // 用户昵称
|
||||||
/** 分销资格时间 */
|
avatar: string; // 用户头像
|
||||||
brokerageTime: Date;
|
|
||||||
/** 可提现金额,单位:分 */
|
|
||||||
price: number;
|
|
||||||
/** 冻结金额,单位:分 */
|
|
||||||
frozenPrice: number;
|
|
||||||
/** 用户昵称 */
|
|
||||||
nickname: string;
|
|
||||||
/** 用户头像 */
|
|
||||||
avatar: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 创建分销用户请求 */
|
/** 创建分销用户请求 */
|
||||||
export interface CreateRequest {
|
export interface BrokerageUserCreateReqVO {
|
||||||
/** 用户编号 */
|
userId: number; // 用户编号
|
||||||
userId: number;
|
bindUserId: number; // 推广员编号
|
||||||
/** 推广员编号 */
|
|
||||||
bindUserId: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改推广员请求 */
|
/** 修改推广员请求 */
|
||||||
export interface UpdateBindUserRequest {
|
export interface BrokerageUserUpdateReqVO {
|
||||||
/** 用户编号 */
|
id: number; // 用户编号
|
||||||
id: number;
|
bindUserId: number; // 推广员编号
|
||||||
/** 推广员编号 */
|
|
||||||
bindUserId: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 清除推广员请求 */
|
/** 清除推广员请求 */
|
||||||
export interface ClearBindUserRequest {
|
export interface BrokerageUserClearBrokerageUserReqVO {
|
||||||
/** 用户编号 */
|
id: number; // 用户编号
|
||||||
id: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改推广资格请求 */
|
/** 修改推广资格请求 */
|
||||||
export interface UpdateBrokerageEnabledRequest {
|
export interface BrokerageUserUpdateBrokerageEnabledReqVO {
|
||||||
/** 用户编号 */
|
id: number; // 用户编号
|
||||||
id: number;
|
enabled: boolean; // 是否启用分销
|
||||||
/** 是否启用分销 */
|
|
||||||
enabled: boolean;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 创建分销用户 */
|
/** 创建分销用户 */
|
||||||
export function createBrokerageUser(data: MallBrokerageUserApi.CreateRequest) {
|
export function createBrokerageUser(
|
||||||
|
data: MallBrokerageUserApi.BrokerageUserCreateReqVO,
|
||||||
|
) {
|
||||||
return requestClient.post('/trade/brokerage-user/create', data);
|
return requestClient.post('/trade/brokerage-user/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,19 +64,21 @@ export function getBrokerageUser(id: number) {
|
|||||||
|
|
||||||
/** 修改推广员 */
|
/** 修改推广员 */
|
||||||
export function updateBindUser(
|
export function updateBindUser(
|
||||||
data: MallBrokerageUserApi.UpdateBindUserRequest,
|
data: MallBrokerageUserApi.BrokerageUserUpdateReqVO,
|
||||||
) {
|
) {
|
||||||
return requestClient.put('/trade/brokerage-user/update-bind-user', data);
|
return requestClient.put('/trade/brokerage-user/update-bind-user', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 清除推广员 */
|
/** 清除推广员 */
|
||||||
export function clearBindUser(data: MallBrokerageUserApi.ClearBindUserRequest) {
|
export function clearBindUser(
|
||||||
|
data: MallBrokerageUserApi.BrokerageUserClearBrokerageUserReqVO,
|
||||||
|
) {
|
||||||
return requestClient.put('/trade/brokerage-user/clear-bind-user', data);
|
return requestClient.put('/trade/brokerage-user/clear-bind-user', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改推广资格 */
|
/** 修改推广资格 */
|
||||||
export function updateBrokerageEnabled(
|
export function updateBrokerageEnabled(
|
||||||
data: MallBrokerageUserApi.UpdateBrokerageEnabledRequest,
|
data: MallBrokerageUserApi.BrokerageUserUpdateBrokerageEnabledReqVO,
|
||||||
) {
|
) {
|
||||||
return requestClient.put(
|
return requestClient.put(
|
||||||
'/trade/brokerage-user/update-brokerage-enable',
|
'/trade/brokerage-user/update-brokerage-enable',
|
||||||
|
|||||||
@@ -5,52 +5,31 @@ import { requestClient } from '#/api/request';
|
|||||||
export namespace MallBrokerageWithdrawApi {
|
export namespace MallBrokerageWithdrawApi {
|
||||||
/** 佣金提现 */
|
/** 佣金提现 */
|
||||||
export interface BrokerageWithdraw {
|
export interface BrokerageWithdraw {
|
||||||
/** 编号 */
|
id: number; // 编号
|
||||||
id: number;
|
userId: number; // 用户编号
|
||||||
/** 用户编号 */
|
price: number; // 提现金额,单位:分
|
||||||
userId: number;
|
feePrice: number; // 手续费,单位:分
|
||||||
/** 提现金额,单位:分 */
|
totalPrice: number; // 总金额,单位:分
|
||||||
price: number;
|
type: number; // 提现类型
|
||||||
/** 手续费,单位:分 */
|
userName: string; // 用户名称
|
||||||
feePrice: number;
|
userAccount: string; // 用户账号
|
||||||
/** 总金额,单位:分 */
|
bankName: string; // 银行名称
|
||||||
totalPrice: number;
|
bankAddress: string; // 银行地址
|
||||||
/** 提现类型 */
|
qrCodeUrl: string; // 收款码地址
|
||||||
type: number;
|
status: number; // 状态
|
||||||
/** 用户名称 */
|
auditReason: string; // 审核备注
|
||||||
userName: string;
|
auditTime: Date; // 审核时间
|
||||||
/** 用户账号 */
|
remark: string; // 备注
|
||||||
userAccount: string;
|
payTransferId?: number; // 支付转账编号
|
||||||
/** 银行名称 */
|
transferChannelCode?: string; // 转账渠道编码
|
||||||
bankName: string;
|
transferTime?: Date; // 转账时间
|
||||||
/** 银行地址 */
|
transferErrorMsg?: string; // 转账错误信息
|
||||||
bankAddress: string;
|
|
||||||
/** 收款码地址 */
|
|
||||||
qrCodeUrl: string;
|
|
||||||
/** 状态 */
|
|
||||||
status: number;
|
|
||||||
/** 审核备注 */
|
|
||||||
auditReason: string;
|
|
||||||
/** 审核时间 */
|
|
||||||
auditTime: Date;
|
|
||||||
/** 备注 */
|
|
||||||
remark: string;
|
|
||||||
/** 支付转账编号 */
|
|
||||||
payTransferId?: number;
|
|
||||||
/** 转账渠道编码 */
|
|
||||||
transferChannelCode?: string;
|
|
||||||
/** 转账时间 */
|
|
||||||
transferTime?: Date;
|
|
||||||
/** 转账错误信息 */
|
|
||||||
transferErrorMsg?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 驳回申请请求 */
|
/** 驳回申请请求 */
|
||||||
export interface RejectRequest {
|
export interface RejectRequest {
|
||||||
/** 编号 */
|
id: number; // 编号
|
||||||
id: number;
|
auditReason: string; // 驳回原因
|
||||||
/** 驳回原因 */
|
|
||||||
auditReason: string;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ export namespace MallDeliveryExpressTemplateApi {
|
|||||||
/** 排序 */
|
/** 排序 */
|
||||||
sort: number;
|
sort: number;
|
||||||
/** 计费区域列表 */
|
/** 计费区域列表 */
|
||||||
templateCharge: TemplateCharge[];
|
charges: TemplateCharge[];
|
||||||
/** 包邮区域列表 */
|
/** 包邮区域列表 */
|
||||||
templateFree: TemplateFree[];
|
frees: TemplateFree[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 运费模板精简信息 */
|
/** 运费模板精简信息 */
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export namespace MemberLevelApi {
|
|||||||
icon: string;
|
icon: string;
|
||||||
bgUrl: string;
|
bgUrl: string;
|
||||||
status: number;
|
status: number;
|
||||||
|
createTime?: Date;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,20 +20,20 @@ export namespace MemberUserApi {
|
|||||||
status: number;
|
status: number;
|
||||||
areaId?: number;
|
areaId?: number;
|
||||||
areaName?: string;
|
areaName?: string;
|
||||||
levelName: null | string;
|
levelName: string;
|
||||||
point?: null | number;
|
point?: number;
|
||||||
totalPoint?: null | number;
|
totalPoint?: number;
|
||||||
experience?: null | number;
|
experience?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员用户等级更新信息 */
|
/** 会员用户等级更新信息 */
|
||||||
export interface UserLevelUpdate {
|
export interface UserUpdateLevelReqVO {
|
||||||
id: number;
|
id: number;
|
||||||
levelId: number;
|
levelId: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 会员用户积分更新信息 */
|
/** 会员用户积分更新信息 */
|
||||||
export interface UserPointUpdate {
|
export interface UserPointUpdateReqVO {
|
||||||
id: number;
|
id: number;
|
||||||
point: number;
|
point: number;
|
||||||
}
|
}
|
||||||
@@ -60,11 +60,11 @@ export function updateUser(data: MemberUserApi.User) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 修改会员用户等级 */
|
/** 修改会员用户等级 */
|
||||||
export function updateUserLevel(data: MemberUserApi.UserLevelUpdate) {
|
export function updateUserLevel(data: MemberUserApi.UserUpdateLevelReqVO) {
|
||||||
return requestClient.put('/member/user/update-level', data);
|
return requestClient.put('/member/user/update-level', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改会员用户积分 */
|
/** 修改会员用户积分 */
|
||||||
export function updateUserPoint(data: MemberUserApi.UserPointUpdate) {
|
export function updateUserPoint(data: MemberUserApi.UserPointUpdateReqVO) {
|
||||||
return requestClient.put('/member/user/update-point', data);
|
return requestClient.put('/member/user/update-point', data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export namespace PayAppApi {
|
|||||||
merchantId: number;
|
merchantId: number;
|
||||||
merchantName: string;
|
merchantName: string;
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
channelCodes: string[];
|
channelCodes?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 更新状态请求 */
|
/** 更新状态请求 */
|
||||||
@@ -25,20 +25,16 @@ export namespace PayAppApi {
|
|||||||
status: number;
|
status: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AppPageReq extends PageParam {
|
export interface AppPageReqVO extends PageParam {
|
||||||
name?: string;
|
name?: string;
|
||||||
|
appKey?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
remark?: string;
|
|
||||||
payNotifyUrl?: string;
|
|
||||||
refundNotifyUrl?: string;
|
|
||||||
transferNotifyUrl?: string;
|
|
||||||
merchantName?: string;
|
|
||||||
createTime?: Date[];
|
createTime?: Date[];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询支付应用列表 */
|
/** 查询支付应用列表 */
|
||||||
export function getAppPage(params: PayAppApi.AppPageReq) {
|
export function getAppPage(params: PayAppApi.AppPageReqVO) {
|
||||||
return requestClient.get<PageResult<PayAppApi.App>>('/pay/app/page', {
|
return requestClient.get<PageResult<PayAppApi.App>>('/pay/app/page', {
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
@@ -60,7 +56,7 @@ export function updateApp(data: PayAppApi.App) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 修改支付应用状态 */
|
/** 修改支付应用状态 */
|
||||||
export function changeAppStatus(data: PayAppApi.UpdateStatusReq) {
|
export function updateAppStatus(data: PayAppApi.UpdateStatusReq) {
|
||||||
return requestClient.put('/pay/app/update-status', data);
|
return requestClient.put('/pay/app/update-status', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export namespace DemoOrderApi {
|
|||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OrderPageReq extends PageParam {
|
export interface OrderPageReqVO extends PageParam {
|
||||||
spuId?: number;
|
spuId?: number;
|
||||||
createTime?: Date[];
|
createTime?: Date[];
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,7 @@ export function createDemoOrder(data: DemoOrderApi.Order) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获得示例订单分页 */
|
/** 获得示例订单分页 */
|
||||||
export function getDemoOrderPage(params: DemoOrderApi.OrderPageReq) {
|
export function getDemoOrderPage(params: DemoOrderApi.OrderPageReqVO) {
|
||||||
return requestClient.get<PageResult<DemoOrderApi.Order>>(
|
return requestClient.get<PageResult<DemoOrderApi.Order>>(
|
||||||
'/pay/demo-order/page',
|
'/pay/demo-order/page',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,15 +1,52 @@
|
|||||||
import type { PageParam } from '@vben/request';
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace PayNotifyApi {
|
||||||
|
/** 支付通知任务 */
|
||||||
|
export interface NotifyTask {
|
||||||
|
id: number;
|
||||||
|
appId: number;
|
||||||
|
appName: string;
|
||||||
|
type: number;
|
||||||
|
dataId: number;
|
||||||
|
status: number;
|
||||||
|
merchantOrderId: string;
|
||||||
|
merchantRefundId?: string;
|
||||||
|
merchantTransferId?: string;
|
||||||
|
lastExecuteTime: Date;
|
||||||
|
nextNotifyTime: Date;
|
||||||
|
notifyTimes: number;
|
||||||
|
maxNotifyTimes: number;
|
||||||
|
createTime: Date;
|
||||||
|
updateTime: Date;
|
||||||
|
logs?: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 支付通知任务分页请求 */
|
||||||
|
export interface NotifyTaskPageReqVO extends PageParam {
|
||||||
|
appId?: number;
|
||||||
|
type?: number;
|
||||||
|
dataId?: number;
|
||||||
|
status?: number;
|
||||||
|
merchantOrderId?: string;
|
||||||
|
merchantRefundId?: string;
|
||||||
|
merchantTransferId?: string;
|
||||||
|
createTime?: Date[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** 获得支付通知明细 */
|
/** 获得支付通知明细 */
|
||||||
export function getNotifyTaskDetail(id: number) {
|
export function getNotifyTaskDetail(id: number) {
|
||||||
return requestClient.get(`/pay/notify/get-detail?id=${id}`);
|
return requestClient.get(`/pay/notify/get-detail?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获得支付通知分页 */
|
/** 获得支付通知分页 */
|
||||||
export function getNotifyTaskPage(params: PageParam) {
|
export function getNotifyTaskPage(params: PayNotifyApi.NotifyTaskPageReqVO) {
|
||||||
return requestClient.get('/pay/notify/page', {
|
return requestClient.get<PageResult<PayNotifyApi.NotifyTask>>(
|
||||||
params,
|
'/pay/notify/page',
|
||||||
});
|
{
|
||||||
|
params,
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,60 +40,19 @@ export namespace PayOrderApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 支付订单分页请求 */
|
/** 支付订单分页请求 */
|
||||||
export interface OrderPageReq extends PageParam {
|
export interface OrderPageReqVO extends PageParam {
|
||||||
merchantId?: number;
|
|
||||||
appId?: number;
|
appId?: number;
|
||||||
channelId?: number;
|
|
||||||
channelCode?: string;
|
channelCode?: string;
|
||||||
merchantOrderId?: string;
|
merchantOrderId?: string;
|
||||||
subject?: string;
|
|
||||||
body?: string;
|
|
||||||
notifyUrl?: string;
|
|
||||||
notifyStatus?: number;
|
|
||||||
amount?: number;
|
|
||||||
channelFeeRate?: number;
|
|
||||||
channelFeeAmount?: number;
|
|
||||||
status?: number;
|
|
||||||
expireTime?: Date[];
|
|
||||||
successTime?: Date[];
|
|
||||||
notifyTime?: Date[];
|
|
||||||
successExtensionId?: number;
|
|
||||||
refundStatus?: number;
|
|
||||||
refundTimes?: number;
|
|
||||||
channelUserId?: string;
|
|
||||||
channelOrderNo?: string;
|
channelOrderNo?: string;
|
||||||
createTime?: Date[];
|
no?: string;
|
||||||
}
|
|
||||||
|
|
||||||
/** 支付订单导出请求 */
|
|
||||||
export interface OrderExportReq {
|
|
||||||
merchantId?: number;
|
|
||||||
appId?: number;
|
|
||||||
channelId?: number;
|
|
||||||
channelCode?: string;
|
|
||||||
merchantOrderId?: string;
|
|
||||||
subject?: string;
|
|
||||||
body?: string;
|
|
||||||
notifyUrl?: string;
|
|
||||||
notifyStatus?: number;
|
|
||||||
amount?: number;
|
|
||||||
channelFeeRate?: number;
|
|
||||||
channelFeeAmount?: number;
|
|
||||||
status?: number;
|
status?: number;
|
||||||
expireTime?: Date[];
|
|
||||||
successTime?: Date[];
|
|
||||||
notifyTime?: Date[];
|
|
||||||
successExtensionId?: number;
|
|
||||||
refundStatus?: number;
|
|
||||||
refundTimes?: number;
|
|
||||||
channelUserId?: string;
|
|
||||||
channelOrderNo?: string;
|
|
||||||
createTime?: Date[];
|
createTime?: Date[];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询支付订单列表 */
|
/** 查询支付订单列表 */
|
||||||
export function getOrderPage(params: PayOrderApi.OrderPageReq) {
|
export function getOrderPage(params: PayOrderApi.OrderPageReqVO) {
|
||||||
return requestClient.get<PageResult<PayOrderApi.Order>>('/pay/order/page', {
|
return requestClient.get<PageResult<PayOrderApi.Order>>('/pay/order/page', {
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
@@ -120,6 +79,6 @@ export function submitOrder(data: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 导出支付订单 */
|
/** 导出支付订单 */
|
||||||
export function exportOrder(params: PayOrderApi.OrderExportReq) {
|
export function exportOrder(params: any) {
|
||||||
return requestClient.download('/pay/order/export-excel', { params });
|
return requestClient.download('/pay/order/export-excel', { params });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,12 @@ export namespace PayRefundApi {
|
|||||||
tradeNo: string;
|
tradeNo: string;
|
||||||
merchantOrderId: string;
|
merchantOrderId: string;
|
||||||
merchantRefundNo: string;
|
merchantRefundNo: string;
|
||||||
|
merchantRefundId: string;
|
||||||
notifyUrl: string;
|
notifyUrl: string;
|
||||||
notifyStatus: number;
|
notifyStatus: number;
|
||||||
status: number;
|
status: number;
|
||||||
|
payPrice: number;
|
||||||
|
refundPrice: number;
|
||||||
type: number;
|
type: number;
|
||||||
payAmount: number;
|
payAmount: number;
|
||||||
refundAmount: number;
|
refundAmount: number;
|
||||||
@@ -35,36 +38,7 @@ export namespace PayRefundApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 退款订单分页请求 */
|
/** 退款订单分页请求 */
|
||||||
export interface RefundPageReq extends PageParam {
|
export interface RefundPageReqVO extends PageParam {
|
||||||
merchantId?: number;
|
|
||||||
appId?: number;
|
|
||||||
channelId?: number;
|
|
||||||
channelCode?: string;
|
|
||||||
orderId?: string;
|
|
||||||
tradeNo?: string;
|
|
||||||
merchantOrderId?: string;
|
|
||||||
merchantRefundNo?: string;
|
|
||||||
notifyUrl?: string;
|
|
||||||
notifyStatus?: number;
|
|
||||||
status?: number;
|
|
||||||
type?: number;
|
|
||||||
payAmount?: number;
|
|
||||||
refundAmount?: number;
|
|
||||||
reason?: string;
|
|
||||||
userIp?: string;
|
|
||||||
channelOrderNo?: string;
|
|
||||||
channelRefundNo?: string;
|
|
||||||
channelErrorCode?: string;
|
|
||||||
channelErrorMsg?: string;
|
|
||||||
channelExtras?: string;
|
|
||||||
expireTime?: Date[];
|
|
||||||
successTime?: Date[];
|
|
||||||
notifyTime?: Date[];
|
|
||||||
createTime?: Date[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 退款订单导出请求 */
|
|
||||||
export interface RefundExportReq {
|
|
||||||
merchantId?: number;
|
merchantId?: number;
|
||||||
appId?: number;
|
appId?: number;
|
||||||
channelId?: number;
|
channelId?: number;
|
||||||
@@ -94,7 +68,7 @@ export namespace PayRefundApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 查询退款订单列表 */
|
/** 查询退款订单列表 */
|
||||||
export function getRefundPage(params: PayRefundApi.RefundPageReq) {
|
export function getRefundPage(params: PayRefundApi.RefundPageReqVO) {
|
||||||
return requestClient.get<PageResult<PayRefundApi.Refund>>(
|
return requestClient.get<PageResult<PayRefundApi.Refund>>(
|
||||||
'/pay/refund/page',
|
'/pay/refund/page',
|
||||||
{
|
{
|
||||||
@@ -108,22 +82,7 @@ export function getRefund(id: number) {
|
|||||||
return requestClient.get<PayRefundApi.Refund>(`/pay/refund/get?id=${id}`);
|
return requestClient.get<PayRefundApi.Refund>(`/pay/refund/get?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 创建退款订单 */
|
|
||||||
export function createRefund(data: PayRefundApi.Refund) {
|
|
||||||
return requestClient.post('/pay/refund/create', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 更新退款订单 */
|
|
||||||
export function updateRefund(data: PayRefundApi.Refund) {
|
|
||||||
return requestClient.put('/pay/refund/update', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除退款订单 */
|
|
||||||
export function deleteRefund(id: number) {
|
|
||||||
return requestClient.delete(`/pay/refund/delete?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 导出退款订单 */
|
/** 导出退款订单 */
|
||||||
export function exportRefund(params: PayRefundApi.RefundExportReq) {
|
export function exportRefund(params: any) {
|
||||||
return requestClient.download('/pay/refund/export-excel', { params });
|
return requestClient.download('/pay/refund/export-excel', { params });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,37 +6,42 @@ export namespace PayTransferApi {
|
|||||||
/** 转账单信息 */
|
/** 转账单信息 */
|
||||||
export interface Transfer {
|
export interface Transfer {
|
||||||
id: number;
|
id: number;
|
||||||
|
no: string;
|
||||||
appId: number;
|
appId: number;
|
||||||
|
appName: string;
|
||||||
channelId: number;
|
channelId: number;
|
||||||
channelCode: string;
|
channelCode: string;
|
||||||
merchantTransferId: string;
|
merchantTransferId: string;
|
||||||
type: number;
|
channelTransferNo: string;
|
||||||
price: number;
|
price: number;
|
||||||
subject: string;
|
subject: string;
|
||||||
userName: string;
|
userName: string;
|
||||||
alipayLogonId: string;
|
userAccount: string;
|
||||||
openid: string;
|
userIp: string;
|
||||||
status: number;
|
status: number;
|
||||||
|
successTime: Date;
|
||||||
createTime: Date;
|
createTime: Date;
|
||||||
|
updateTime: Date;
|
||||||
|
notifyUrl: string;
|
||||||
|
channelNotifyData: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 转账单分页请求 */
|
/** 转账单分页请求 */
|
||||||
export interface TransferPageReq extends PageParam {
|
export interface TransferPageReqVO extends PageParam {
|
||||||
|
no?: string;
|
||||||
appId?: number;
|
appId?: number;
|
||||||
channelId?: number;
|
|
||||||
channelCode?: string;
|
channelCode?: string;
|
||||||
merchantTransferId?: string;
|
merchantOrderId?: string;
|
||||||
type?: number;
|
|
||||||
price?: number;
|
|
||||||
subject?: string;
|
|
||||||
userName?: string;
|
|
||||||
status?: number;
|
status?: number;
|
||||||
|
userName?: string;
|
||||||
|
userAccount?: string;
|
||||||
|
channelTransferNo?: string;
|
||||||
createTime?: Date[];
|
createTime?: Date[];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询转账单列表 */
|
/** 查询转账单列表 */
|
||||||
export function getTransferPage(params: PayTransferApi.TransferPageReq) {
|
export function getTransferPage(params: PayTransferApi.TransferPageReqVO) {
|
||||||
return requestClient.get<PageResult<PayTransferApi.Transfer>>(
|
return requestClient.get<PageResult<PayTransferApi.Transfer>>(
|
||||||
'/pay/transfer/page',
|
'/pay/transfer/page',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export namespace PayWalletApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 钱包分页请求 */
|
/** 钱包分页请求 */
|
||||||
export interface WalletPageReq extends PageParam {
|
export interface WalletPageReqVO extends PageParam {
|
||||||
userId?: number;
|
userId?: number;
|
||||||
userType?: number;
|
userType?: number;
|
||||||
balance?: number;
|
balance?: number;
|
||||||
@@ -28,6 +28,12 @@ export namespace PayWalletApi {
|
|||||||
totalRecharge?: number;
|
totalRecharge?: number;
|
||||||
freezePrice?: number;
|
freezePrice?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 钱包修改余额 */
|
||||||
|
export interface PayWalletUpdateBalanceReqVO {
|
||||||
|
userId: number;
|
||||||
|
balance: number;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询用户钱包详情 */
|
/** 查询用户钱包详情 */
|
||||||
@@ -38,7 +44,7 @@ export function getWallet(params: PayWalletApi.PayWalletUserReq) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 查询会员钱包列表 */
|
/** 查询会员钱包列表 */
|
||||||
export function getWalletPage(params: PayWalletApi.WalletPageReq) {
|
export function getWalletPage(params: PayWalletApi.WalletPageReqVO) {
|
||||||
return requestClient.get<PageResult<PayWalletApi.Wallet>>(
|
return requestClient.get<PageResult<PayWalletApi.Wallet>>(
|
||||||
'/pay/wallet/page',
|
'/pay/wallet/page',
|
||||||
{
|
{
|
||||||
@@ -48,6 +54,8 @@ export function getWalletPage(params: PayWalletApi.WalletPageReq) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 修改会员钱包余额 */
|
/** 修改会员钱包余额 */
|
||||||
export function updateWalletBalance(data: PayWalletApi.Wallet) {
|
export function updateWalletBalance(
|
||||||
|
data: PayWalletApi.PayWalletUpdateBalanceReqVO,
|
||||||
|
) {
|
||||||
return requestClient.put('/pay/wallet/update-balance', data);
|
return requestClient.put('/pay/wallet/update-balance', data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
|||||||
|
|
||||||
export namespace WalletRechargePackageApi {
|
export namespace WalletRechargePackageApi {
|
||||||
/** 充值套餐信息 */
|
/** 充值套餐信息 */
|
||||||
export interface Package {
|
export interface WalletRechargePackage {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name: string;
|
||||||
payPrice: number;
|
payPrice: number;
|
||||||
@@ -14,33 +14,36 @@ export namespace WalletRechargePackageApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 查询充值套餐列表 */
|
/** 查询充值套餐列表 */
|
||||||
export function getPackagePage(params: PageParam) {
|
export function getWalletRechargePackagePage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<WalletRechargePackageApi.Package>>(
|
return requestClient.get<
|
||||||
'/pay/wallet-recharge-package/page',
|
PageResult<WalletRechargePackageApi.WalletRechargePackage>
|
||||||
{
|
>('/pay/wallet-recharge-package/page', {
|
||||||
params,
|
params,
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询充值套餐详情 */
|
/** 查询充值套餐详情 */
|
||||||
export function getPackage(id: number) {
|
export function getWalletRechargePackage(id: number) {
|
||||||
return requestClient.get<WalletRechargePackageApi.Package>(
|
return requestClient.get<WalletRechargePackageApi.WalletRechargePackage>(
|
||||||
`/pay/wallet-recharge-package/get?id=${id}`,
|
`/pay/wallet-recharge-package/get?id=${id}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增充值套餐 */
|
/** 新增充值套餐 */
|
||||||
export function createPackage(data: WalletRechargePackageApi.Package) {
|
export function createWalletRechargePackage(
|
||||||
|
data: WalletRechargePackageApi.WalletRechargePackage,
|
||||||
|
) {
|
||||||
return requestClient.post('/pay/wallet-recharge-package/create', data);
|
return requestClient.post('/pay/wallet-recharge-package/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改充值套餐 */
|
/** 修改充值套餐 */
|
||||||
export function updatePackage(data: WalletRechargePackageApi.Package) {
|
export function updateWalletRechargePackage(
|
||||||
|
data: WalletRechargePackageApi.WalletRechargePackage,
|
||||||
|
) {
|
||||||
return requestClient.put('/pay/wallet-recharge-package/update', data);
|
return requestClient.put('/pay/wallet-recharge-package/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除充值套餐 */
|
/** 删除充值套餐 */
|
||||||
export function deletePackage(id: number) {
|
export function deleteWalletRechargePackage(id: number) {
|
||||||
return requestClient.delete(`/pay/wallet-recharge-package/delete?id=${id}`);
|
return requestClient.delete(`/pay/wallet-recharge-package/delete?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { PageParam } from '@vben/request';
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
@@ -20,17 +20,24 @@ export namespace SystemDictDataApi {
|
|||||||
|
|
||||||
// 查询字典数据(精简)列表
|
// 查询字典数据(精简)列表
|
||||||
export function getSimpleDictDataList() {
|
export function getSimpleDictDataList() {
|
||||||
return requestClient.get('/system/dict-data/simple-list');
|
return requestClient.get<SystemDictDataApi.DictData[]>(
|
||||||
|
'/system/dict-data/simple-list',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询字典数据列表
|
// 查询字典数据列表
|
||||||
export function getDictDataPage(params: PageParam) {
|
export function getDictDataPage(params: PageParam) {
|
||||||
return requestClient.get('/system/dict-data/page', { params });
|
return requestClient.get<PageResult<SystemDictDataApi.DictData>>(
|
||||||
|
'/system/dict-data/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询字典数据详情
|
// 查询字典数据详情
|
||||||
export function getDictData(id: number) {
|
export function getDictData(id: number) {
|
||||||
return requestClient.get(`/system/dict-data/get?id=${id}`);
|
return requestClient.get<SystemDictDataApi.DictData>(
|
||||||
|
`/system/dict-data/get?id=${id}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增字典数据
|
// 新增字典数据
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace SystemDictTypeApi {
|
export namespace SystemDictTypeApi {
|
||||||
@@ -14,17 +16,24 @@ export namespace SystemDictTypeApi {
|
|||||||
|
|
||||||
// 查询字典(精简)列表
|
// 查询字典(精简)列表
|
||||||
export function getSimpleDictTypeList() {
|
export function getSimpleDictTypeList() {
|
||||||
return requestClient.get('/system/dict-type/list-all-simple');
|
return requestClient.get<SystemDictTypeApi.DictType[]>(
|
||||||
|
'/system/dict-type/list-all-simple',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询字典列表
|
// 查询字典列表
|
||||||
export function getDictTypePage(params: any) {
|
export function getDictTypePage(params: PageParam) {
|
||||||
return requestClient.get('/system/dict-type/page', { params });
|
return requestClient.get<PageResult<SystemDictTypeApi.DictType>>(
|
||||||
|
'/system/dict-type/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询字典详情
|
// 查询字典详情
|
||||||
export function getDictType(id: number) {
|
export function getDictType(id: number) {
|
||||||
return requestClient.get(`/system/dict-type/get?id=${id}`);
|
return requestClient.get<SystemDictTypeApi.DictType>(
|
||||||
|
`/system/dict-type/get?id=${id}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增字典
|
// 新增字典
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { h, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|||||||
|
|
||||||
import { BpmProcessInstanceStatus, DICT_TYPE } from '@vben/constants';
|
import { BpmProcessInstanceStatus, DICT_TYPE } from '@vben/constants';
|
||||||
import { UndoOutlined, ZoomInOutlined, ZoomOutOutlined } from '@vben/icons';
|
import { UndoOutlined, ZoomInOutlined, ZoomOutOutlined } from '@vben/icons';
|
||||||
import { dateFormatter, formatPast2 } from '@vben/utils';
|
import { formatDate, formatPast2 } from '@vben/utils';
|
||||||
|
|
||||||
import { Button, ButtonGroup, Modal, Row, Table } from 'ant-design-vue';
|
import { Button, ButtonGroup, Modal, Row, Table } from 'ant-design-vue';
|
||||||
import BpmnViewer from 'bpmn-js/lib/Viewer';
|
import BpmnViewer from 'bpmn-js/lib/Viewer';
|
||||||
@@ -345,14 +345,14 @@ onBeforeUnmount(() => {
|
|||||||
</template>
|
</template>
|
||||||
</Table.Column>
|
</Table.Column>
|
||||||
<Table.Column
|
<Table.Column
|
||||||
:custom-render="({ text }) => dateFormatter(text)"
|
:custom-render="({ text }) => formatDate(text)"
|
||||||
align="center"
|
align="center"
|
||||||
title="开始时间"
|
title="开始时间"
|
||||||
data-index="createTime"
|
data-index="createTime"
|
||||||
width="140"
|
width="140"
|
||||||
/>
|
/>
|
||||||
<Table.Column
|
<Table.Column
|
||||||
:custom-render="({ text }) => dateFormatter(text)"
|
:custom-render="({ text }) => formatDate(text)"
|
||||||
align="center"
|
align="center"
|
||||||
title="结束时间"
|
title="结束时间"
|
||||||
data-index="endTime"
|
data-index="endTime"
|
||||||
|
|||||||
@@ -18,23 +18,23 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 36px;
|
min-height: 36px;
|
||||||
|
|
||||||
.el-button {
|
.ant-button {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-button-group {
|
.ant-button-group {
|
||||||
margin: 4px;
|
margin: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tooltip__popper {
|
.ant-tooltip__popper {
|
||||||
.el-button {
|
.ant-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-button:hover {
|
.ant-button:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: rgb(64 158 255 / 80%);
|
background: rgb(64 158 255 / 80%);
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,6 @@ pre {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hljs {
|
.hljs {
|
||||||
word-break: break-word;
|
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item {
|
.ant-form-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-bottom: 18px;
|
padding-bottom: 18px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -106,22 +106,22 @@
|
|||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.element-drawer__button > .el-button {
|
.element-drawer__button > .ant-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-collapse-item__content {
|
.ant-collapse-item__content {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input.is-disabled .el-input__inner {
|
.ant-input.is-disabled .ant-input__inner {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item.el-form-item--mini {
|
.ant-form-item.ant-form-item--mini {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
& + .el-form-item {
|
& + .ant-form-item {
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export const useDictSelectRule = () => {
|
|||||||
title: label,
|
title: label,
|
||||||
info: '',
|
info: '',
|
||||||
$required: false,
|
$required: false,
|
||||||
|
modelField: 'value',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props(_: any, { t }: any) {
|
props(_: any, { t }: any) {
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
import { defineAsyncComponent } from 'vue';
|
|
||||||
|
|
||||||
// TODO @xingyu:我直接引入,貌似没问题呀。
|
|
||||||
// TODO @xingyu:apps/web-antd/src/views/crm/followup/index.ts 走的异步组件,不过名字是 FollowUp 没 Async。可能要一起讨论怎么保持相对的一致性
|
|
||||||
export const AsyncOperateLog = defineAsyncComponent(
|
|
||||||
() => import('./operate-log.vue'),
|
|
||||||
);
|
|
||||||
|
|
||||||
export { default as OperateLog } from './operate-log.vue';
|
export { default as OperateLog } from './operate-log.vue';
|
||||||
|
|
||||||
export type { OperateLogProps } from './typing';
|
export type { OperateLogProps } from './typing';
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ function getUserTypeColor(userType: number) {
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<!-- TODO @xingyu:有没可能美化下? -->
|
||||||
<Timeline>
|
<Timeline>
|
||||||
<Timeline.Item
|
<Timeline.Item
|
||||||
v-for="log in logList"
|
v-for="log in logList"
|
||||||
|
|||||||
@@ -314,11 +314,11 @@ function getValue() {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.upload-drag-area {
|
.upload-drag-area {
|
||||||
border: 2px dashed #d9d9d9;
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
|
border: 2px dashed #d9d9d9;
|
||||||
|
border-radius: 8px;
|
||||||
transition: border-color 0.3s;
|
transition: border-color 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -327,15 +327,15 @@ function getValue() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ant-upload-drag-icon {
|
.ant-upload-drag-icon {
|
||||||
|
margin-bottom: 16px;
|
||||||
font-size: 48px;
|
font-size: 48px;
|
||||||
color: #d9d9d9;
|
color: #d9d9d9;
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-upload-text {
|
.ant-upload-text {
|
||||||
|
margin-bottom: 8px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #666;
|
color: #666;
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-upload-hint {
|
.ant-upload-hint {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// TODO @xingyu:这个组件,只有 pay 在用,和现有的 file-upload 和 image-upload 有点不一致。是不是可以考虑移除,只在 pay 那搞个复用的组件;
|
|
||||||
import type { InputProps, TextAreaProps } from 'ant-design-vue';
|
import type { InputProps, TextAreaProps } from 'ant-design-vue';
|
||||||
|
|
||||||
import type { FileUploadProps } from './typing';
|
import type { FileUploadProps } from './typing';
|
||||||
@@ -61,8 +60,8 @@ const fileUploadProps = computed(() => {
|
|||||||
<template>
|
<template>
|
||||||
<Row>
|
<Row>
|
||||||
<Col :span="18">
|
<Col :span="18">
|
||||||
<Input v-if="inputType === 'input'" v-bind="inputProps" />
|
<Input readonly v-if="inputType === 'input'" v-bind="inputProps" />
|
||||||
<Textarea v-else :row="4" v-bind="textareaProps" />
|
<Textarea readonly v-else :row="4" v-bind="textareaProps" />
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="6">
|
<Col :span="6">
|
||||||
<FileUpload
|
<FileUpload
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
AntdProfileOutlined,
|
AntdProfileOutlined,
|
||||||
BookOpenText,
|
BookOpenText,
|
||||||
CircleHelp,
|
CircleHelp,
|
||||||
MdiGithub,
|
SvgGithubIcon,
|
||||||
} from '@vben/icons';
|
} from '@vben/icons';
|
||||||
import {
|
import {
|
||||||
BasicLayout,
|
BasicLayout,
|
||||||
@@ -79,7 +79,7 @@ const menus = computed(() => [
|
|||||||
target: '_blank',
|
target: '_blank',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
icon: MdiGithub,
|
icon: SvgGithubIcon,
|
||||||
text: 'GitHub',
|
text: 'GitHub',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -202,11 +202,16 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => preferences.app.watermark,
|
() => ({
|
||||||
async (enable) => {
|
enable: preferences.app.watermark,
|
||||||
|
content: preferences.app.watermarkContent,
|
||||||
|
}),
|
||||||
|
async ({ enable, content }) => {
|
||||||
if (enable) {
|
if (enable) {
|
||||||
await updateWatermark({
|
await updateWatermark({
|
||||||
content: `${userStore.userInfo?.id} - ${userStore.userInfo?.nickname}`,
|
content:
|
||||||
|
content ||
|
||||||
|
`${userStore.userInfo?.id} - ${userStore.userInfo?.nickname}`,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
destroyWatermark();
|
destroyWatermark();
|
||||||
|
|||||||
37
apps/web-antd/src/router/routes/modules/iot.ts
Normal file
37
apps/web-antd/src/router/routes/modules/iot.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import type { RouteRecordRaw } from 'vue-router';
|
||||||
|
|
||||||
|
const routes: RouteRecordRaw[] = [
|
||||||
|
{
|
||||||
|
path: '/iot',
|
||||||
|
name: 'IoTCenter',
|
||||||
|
meta: {
|
||||||
|
title: 'IoT 物联网',
|
||||||
|
icon: 'lucide:cpu',
|
||||||
|
keepAlive: true,
|
||||||
|
hideInMenu: true,
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'product/detail/:id',
|
||||||
|
name: 'IoTProductDetail',
|
||||||
|
meta: {
|
||||||
|
title: '产品详情',
|
||||||
|
activePath: '/iot/device/product',
|
||||||
|
},
|
||||||
|
component: () => import('#/views/iot/product/product/modules/detail/index.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'device/detail/:id',
|
||||||
|
name: 'IoTDeviceDetail',
|
||||||
|
meta: {
|
||||||
|
title: '设备详情',
|
||||||
|
activePath: '/iot/device/device',
|
||||||
|
},
|
||||||
|
component: () => import('#/views/iot/device/device/modules/detail/index.vue'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default routes;
|
||||||
|
|
||||||
@@ -3,11 +3,12 @@ import type { RouteRecordRaw } from 'vue-router';
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/member/user/detail',
|
path: '/member/user/detail',
|
||||||
component: () => import('#/views/member/user/modules/detail.vue'),
|
component: () => import('#/views/member/user/detail/index.vue'),
|
||||||
name: 'MemberUserDetail',
|
name: 'MemberUserDetail',
|
||||||
meta: {
|
meta: {
|
||||||
title: '会员详情',
|
title: '会员详情',
|
||||||
icon: 'lucide:user',
|
icon: 'lucide:user',
|
||||||
|
activePath: '/member/user',
|
||||||
hideInMenu: true,
|
hideInMenu: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '温度参数',
|
label: '温度参数',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入温度参数',
|
placeholder: '请输入温度参数',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
@@ -55,7 +54,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '回复数 Token 数',
|
label: '回复数 Token 数',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入回复数 Token 数',
|
placeholder: '请输入回复数 Token 数',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -68,7 +66,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '上下文数量',
|
label: '上下文数量',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入上下文数量',
|
placeholder: '请输入上下文数量',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '检索 topK',
|
label: '检索 topK',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入检索 topK',
|
placeholder: '请输入检索 topK',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -63,7 +62,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '检索相似度阈值',
|
label: '检索相似度阈值',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入检索相似度阈值',
|
placeholder: '请输入检索相似度阈值',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '检索 topK',
|
label: '检索 topK',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入检索 topK',
|
placeholder: '请输入检索 topK',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -65,7 +64,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '检索相似度阈值',
|
label: '检索相似度阈值',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入检索相似度阈值',
|
placeholder: '请输入检索相似度阈值',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|||||||
@@ -136,7 +136,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '角色排序',
|
label: '角色排序',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入角色排序',
|
placeholder: '请输入角色排序',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '模型排序',
|
label: '模型排序',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入模型排序',
|
placeholder: '请输入模型排序',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
},
|
},
|
||||||
@@ -94,7 +93,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '温度参数',
|
label: '温度参数',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入温度参数',
|
placeholder: '请输入温度参数',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -115,7 +113,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 8192,
|
max: 8192,
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入回复数 Token 数',
|
placeholder: '请输入回复数 Token 数',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
},
|
},
|
||||||
@@ -134,7 +131,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 20,
|
max: 20,
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入上下文数量',
|
placeholder: '请输入上下文数量',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
min: 0,
|
min: 0,
|
||||||
controlsPosition: 'right',
|
|
||||||
placeholder: '请输入分类排序',
|
placeholder: '请输入分类排序',
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
import type { BpmProcessInstanceApi } from '#/api/bpm/processInstance';
|
import type { BpmProcessInstanceApi } from '#/api/bpm/processInstance';
|
||||||
import type { SystemUserApi } from '#/api/system/user';
|
import type { SystemUserApi } from '#/api/system/user';
|
||||||
|
|
||||||
// TODO @jason:业务表单审批时,读取不到界面,参见 https://t.zsxq.com/eif2e
|
|
||||||
import { nextTick, onMounted, ref, shallowRef, watch } from 'vue';
|
import { nextTick, onMounted, ref, shallowRef, watch } from 'vue';
|
||||||
|
|
||||||
import { Page } from '@vben/common-ui';
|
import { Page } from '@vben/common-ui';
|
||||||
@@ -156,7 +155,6 @@ async function getApprovalDetail() {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 注意:data.processDefinition.formCustomViewPath 是组件的全路径,例如说:/crm/contract/detail/index.vue
|
// 注意:data.processDefinition.formCustomViewPath 是组件的全路径,例如说:/crm/contract/detail/index.vue
|
||||||
|
|
||||||
BusinessFormComponent.value = registerComponent(
|
BusinessFormComponent.value = registerComponent(
|
||||||
data?.processDefinition?.formCustomViewPath || '',
|
data?.processDefinition?.formCustomViewPath || '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -42,14 +42,11 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'status',
|
fieldName: 'status',
|
||||||
label: '流程状态',
|
label: '审批状态',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(
|
options: getDictOptions(DICT_TYPE.BPM_TASK_STATUS, 'number'),
|
||||||
DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS,
|
placeholder: '请选择审批状态',
|
||||||
'number',
|
|
||||||
),
|
|
||||||
placeholder: '请选择流程状态',
|
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ export const CONTRACT_EXPIRY_TYPE = [
|
|||||||
{ label: '已过期', value: 2 },
|
{ label: '已过期', value: 2 },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/** 左侧菜单 */
|
||||||
export const useLeftSides = (
|
export const useLeftSides = (
|
||||||
customerTodayContactCount: Ref<number>,
|
customerTodayContactCount: Ref<number>,
|
||||||
clueFollowCount: Ref<number>,
|
clueFollowCount: Ref<number>,
|
||||||
|
|||||||
@@ -78,12 +78,12 @@ async function getCount() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 激活时 */
|
/** 激活时 */
|
||||||
onActivated(async () => {
|
onActivated(() => {
|
||||||
getCount();
|
getCount();
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
onMounted(async () => {
|
onMounted(() => {
|
||||||
getCount();
|
getCount();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -104,9 +104,9 @@ onMounted(async () => {
|
|||||||
</List.Item.Meta>
|
</List.Item.Meta>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<Badge
|
<Badge
|
||||||
|
v-if="item.count.value > 0"
|
||||||
:color="item.menu === leftMenu ? 'blue' : 'red'"
|
:color="item.menu === leftMenu ? 'blue' : 'red'"
|
||||||
:count="item.count.value"
|
:count="item.count.value"
|
||||||
:show-zero="true"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</List.Item>
|
</List.Item>
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
},
|
},
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
|
isHover: true,
|
||||||
},
|
},
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
refresh: true,
|
refresh: true,
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
allowClear: true,
|
allowClear: true,
|
||||||
options: AUDIT_STATUS,
|
options: AUDIT_STATUS,
|
||||||
},
|
},
|
||||||
defaultValue: 10,
|
defaultValue: AUDIT_STATUS[0]!.value,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -75,6 +75,7 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
},
|
},
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
|
isHover: true,
|
||||||
},
|
},
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
refresh: true,
|
refresh: true,
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ function handleProcessDetail(row: CrmContractApi.Contract) {
|
|||||||
function handleContractDetail(row: CrmContractApi.Contract) {
|
function handleContractDetail(row: CrmContractApi.Contract) {
|
||||||
push({ name: 'CrmContractDetail', params: { id: row.id } });
|
push({ name: 'CrmContractDetail', params: { id: row.id } });
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 打开客户详情 */
|
/** 打开客户详情 */
|
||||||
function handleCustomerDetail(row: CrmContractApi.Contract) {
|
function handleCustomerDetail(row: CrmContractApi.Contract) {
|
||||||
push({ name: 'CrmCustomerDetail', params: { id: row.id } });
|
push({ name: 'CrmCustomerDetail', params: { id: row.id } });
|
||||||
@@ -53,7 +54,7 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
allowClear: true,
|
allowClear: true,
|
||||||
options: CONTRACT_EXPIRY_TYPE,
|
options: CONTRACT_EXPIRY_TYPE,
|
||||||
},
|
},
|
||||||
defaultValue: 1,
|
defaultValue: CONTRACT_EXPIRY_TYPE[0]!.value,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -75,6 +76,7 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
},
|
},
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
|
isHover: true,
|
||||||
},
|
},
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
refresh: true,
|
refresh: true,
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
},
|
},
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
|
isHover: true,
|
||||||
},
|
},
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
refresh: true,
|
refresh: true,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
allowClear: true,
|
allowClear: true,
|
||||||
options: SCENE_TYPES,
|
options: SCENE_TYPES,
|
||||||
},
|
},
|
||||||
defaultValue: 1,
|
defaultValue: SCENE_TYPES[0]!.value,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -53,6 +53,7 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
},
|
},
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
|
isHover: true,
|
||||||
},
|
},
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
refresh: true,
|
refresh: true,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user