Merge remote-tracking branch 'yudao/dev' into dev

pull/191/head
jason 2025-08-05 23:01:03 +08:00
commit 07d15f5c88
732 changed files with 45651 additions and 1151 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@vben/web-antd",
"version": "5.5.7",
"version": "5.5.8",
"homepage": "https://vben.pro",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@ -7,12 +7,14 @@ import { IconifyIcon } from '@vben/icons';
import { $te } from '@vben/locales';
import {
AsyncComponents,
createRequiredValidation,
setupVbenVxeTable,
useVbenVxeGrid,
} from '@vben/plugins/vxe-table';
import {
erpCountInputFormatter,
erpNumberFormatter,
fenToYuan,
formatPast2,
isFunction,
isString,
@ -343,11 +345,17 @@ setupVbenVxeTable({
return `${erpNumberFormatter(cellValue, digits)}`;
},
});
vxeUI.formats.add('formatFenToYuanAmount', {
tableCellFormatMethod({ cellValue }, digits = 2) {
return `${erpNumberFormatter(fenToYuan(cellValue), digits)}`;
},
});
},
useVbenForm,
});
export { useVbenVxeGrid };
export { createRequiredValidation, useVbenVxeGrid };
const [VxeTable, VxeColumn, VxeToolbar] = AsyncComponents;
export { VxeColumn, VxeTable, VxeToolbar };

View File

@ -40,6 +40,7 @@ export namespace BpmProcessInstanceApi {
nodeType: BpmNodeTypeEnum;
startTime?: Date;
status: number;
processInstanceId?: string;
tasks: ApprovalTaskInfo[];
}

View File

@ -130,3 +130,8 @@ export const getChildrenTaskList = async (id: string) => {
`/bpm/task/list-by-parent-task-id?parentTaskId=${id}`,
);
};
// 撤回任务
export const withdrawTask = async (taskId: string) => {
return await requestClient.put('/bpm/task/withdraw', null, { params: { taskId } });
};

View File

@ -0,0 +1,68 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpAccountApi {
/** ERP 结算账户信息 */
export interface Account {
id?: number; // 结算账户编号
no: string; // 账户编码
remark: string; // 备注
status: number; // 开启状态
sort: number; // 排序
defaultStatus: boolean; // 是否默认
name: string; // 账户名称
}
/** 结算账户分页查询参数 */
export interface AccountPageParam extends PageParam {
name?: string;
no?: string;
status?: number;
}
}
/** 查询结算账户分页 */
export function getAccountPage(params: ErpAccountApi.AccountPageParam) {
return requestClient.get<PageResult<ErpAccountApi.Account>>(
'/erp/account/page',
{ params },
);
}
/** 查询结算账户精简列表 */
export function getAccountSimpleList() {
return requestClient.get<ErpAccountApi.Account[]>('/erp/account/simple-list');
}
/** 查询结算账户详情 */
export function getAccount(id: number) {
return requestClient.get<ErpAccountApi.Account>(`/erp/account/get?id=${id}`);
}
/** 新增结算账户 */
export function createAccount(data: ErpAccountApi.Account) {
return requestClient.post('/erp/account/create', data);
}
/** 修改结算账户 */
export function updateAccount(data: ErpAccountApi.Account) {
return requestClient.put('/erp/account/update', data);
}
/** 修改结算账户默认状态 */
export function updateAccountDefaultStatus(id: number, defaultStatus: boolean) {
return requestClient.put('/erp/account/update-default-status', null, {
params: { id, defaultStatus },
});
}
/** 删除结算账户 */
export function deleteAccount(id: number) {
return requestClient.delete(`/erp/account/delete?id=${id}`);
}
/** 导出结算账户 Excel */
export function exportAccount(params: any) {
return requestClient.download('/erp/account/export-excel', { params });
}

View File

@ -0,0 +1,103 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
namespace ErpFinancePaymentApi {
/** 付款单信息 */
export interface FinancePayment {
id?: number; // 付款单编号
no: string; // 付款单号
supplierId: number; // 供应商编号
paymentTime: Date; // 付款时间
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
}
/** 付款单分页查询参数 */
export interface FinancePaymentPageParams extends PageParam {
no?: string;
supplierId?: number;
status?: number;
}
/** 付款单状态更新参数 */
export interface FinancePaymentStatusParams {
id: number;
status: number;
}
}
/**
*
*/
export function getFinancePaymentPage(
params: ErpFinancePaymentApi.FinancePaymentPageParams,
) {
return requestClient.get<PageResult<ErpFinancePaymentApi.FinancePayment>>(
'/erp/finance-payment/page',
{
params,
},
);
}
/**
*
*/
export function getFinancePayment(id: number) {
return requestClient.get<ErpFinancePaymentApi.FinancePayment>(
`/erp/finance-payment/get?id=${id}`,
);
}
/**
*
*/
export function createFinancePayment(
data: ErpFinancePaymentApi.FinancePayment,
) {
return requestClient.post('/erp/finance-payment/create', data);
}
/**
*
*/
export function updateFinancePayment(
data: ErpFinancePaymentApi.FinancePayment,
) {
return requestClient.put('/erp/finance-payment/update', data);
}
/**
*
*/
export function updateFinancePaymentStatus(
params: ErpFinancePaymentApi.FinancePaymentStatusParams,
) {
return requestClient.put('/erp/finance-payment/update-status', null, {
params,
});
}
/**
*
*/
export function deleteFinancePayment(ids: number[]) {
return requestClient.delete('/erp/finance-payment/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* Excel
*/
export function exportFinancePayment(
params: ErpFinancePaymentApi.FinancePaymentPageParams,
) {
return requestClient.download('/erp/finance-payment/export-excel', {
params,
});
}

View File

@ -0,0 +1,103 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
namespace ErpFinanceReceiptApi {
/** 收款单信息 */
export interface FinanceReceipt {
id?: number; // 收款单编号
no: string; // 收款单号
customerId: number; // 客户编号
receiptTime: Date; // 收款时间
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
}
/** 收款单分页查询参数 */
export interface FinanceReceiptPageParams extends PageParam {
no?: string;
customerId?: number;
status?: number;
}
/** 收款单状态更新参数 */
export interface FinanceReceiptStatusParams {
id: number;
status: number;
}
}
/**
*
*/
export function getFinanceReceiptPage(
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
) {
return requestClient.get<PageResult<ErpFinanceReceiptApi.FinanceReceipt>>(
'/erp/finance-receipt/page',
{
params,
},
);
}
/**
*
*/
export function getFinanceReceipt(id: number) {
return requestClient.get<ErpFinanceReceiptApi.FinanceReceipt>(
`/erp/finance-receipt/get?id=${id}`,
);
}
/**
*
*/
export function createFinanceReceipt(
data: ErpFinanceReceiptApi.FinanceReceipt,
) {
return requestClient.post('/erp/finance-receipt/create', data);
}
/**
*
*/
export function updateFinanceReceipt(
data: ErpFinanceReceiptApi.FinanceReceipt,
) {
return requestClient.put('/erp/finance-receipt/update', data);
}
/**
*
*/
export function updateFinanceReceiptStatus(
params: ErpFinanceReceiptApi.FinanceReceiptStatusParams,
) {
return requestClient.put('/erp/finance-receipt/update-status', null, {
params,
});
}
/**
*
*/
export function deleteFinanceReceipt(ids: number[]) {
return requestClient.delete('/erp/finance-receipt/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* Excel
*/
export function exportFinanceReceipt(
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
) {
return requestClient.download('/erp/finance-receipt/export-excel', {
params,
});
}

View File

@ -0,0 +1,60 @@
import { requestClient } from '#/api/request';
export namespace ErpProductCategoryApi {
/** ERP 产品分类信息 */
export interface ProductCategory {
id?: number; // 分类编号
parentId: number; // 父分类编号
name: string; // 分类名称
code: string; // 分类编码
sort: number; // 分类排序
status: number; // 开启状态
}
}
/** 查询产品分类列表 */
export function getProductCategoryList() {
return requestClient.get<ErpProductCategoryApi.ProductCategory[]>(
'/erp/product-category/list',
);
}
/** 查询产品分类精简列表 */
export function getProductCategorySimpleList() {
return requestClient.get<ErpProductCategoryApi.ProductCategory[]>(
'/erp/product-category/simple-list',
);
}
/** 查询产品分类详情 */
export function getProductCategory(id: number) {
return requestClient.get<ErpProductCategoryApi.ProductCategory>(
`/erp/product-category/get?id=${id}`,
);
}
/** 新增产品分类 */
export function createProductCategory(
data: ErpProductCategoryApi.ProductCategory,
) {
return requestClient.post('/erp/product-category/create', data);
}
/** 修改产品分类 */
export function updateProductCategory(
data: ErpProductCategoryApi.ProductCategory,
) {
return requestClient.put('/erp/product-category/update', data);
}
/** 删除产品分类 */
export function deleteProductCategory(id: number) {
return requestClient.delete(`/erp/product-category/delete?id=${id}`);
}
/** 导出产品分类 Excel */
export function exportProductCategory(params: any) {
return requestClient.download('/erp/product-category/export-excel', {
params,
});
}

View File

@ -0,0 +1,61 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpProductApi {
/** ERP 产品信息 */
export interface Product {
id?: number; // 产品编号
name: string; // 产品名称
barCode: string; // 产品条码
categoryId: number; // 产品类型编号
unitId: number; // 单位编号
unitName?: string; // 单位名字
status: number; // 产品状态
standard: string; // 产品规格
remark: string; // 产品备注
expiryDay: number; // 保质期天数
weight: number; // 重量kg
purchasePrice: number; // 采购价格,单位:元
salePrice: number; // 销售价格,单位:元
minPrice: number; // 最低价格,单位:元
}
}
/** 查询产品分页 */
export function getProductPage(params: PageParam) {
return requestClient.get<PageResult<ErpProductApi.Product>>(
'/erp/product/page',
{ params },
);
}
/** 查询产品精简列表 */
export function getProductSimpleList() {
return requestClient.get<ErpProductApi.Product[]>('/erp/product/simple-list');
}
/** 查询产品详情 */
export function getProduct(id: number) {
return requestClient.get<ErpProductApi.Product>(`/erp/product/get?id=${id}`);
}
/** 新增产品 */
export function createProduct(data: ErpProductApi.Product) {
return requestClient.post('/erp/product/create', data);
}
/** 修改产品 */
export function updateProduct(data: ErpProductApi.Product) {
return requestClient.put('/erp/product/update', data);
}
/** 删除产品 */
export function deleteProduct(id: number) {
return requestClient.delete(`/erp/product/delete?id=${id}`);
}
/** 导出产品 Excel */
export function exportProduct(params: any) {
return requestClient.download('/erp/product/export-excel', { params });
}

View File

@ -0,0 +1,62 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpProductUnitApi {
/** ERP 产品单位信息 */
export interface ProductUnit {
id?: number; // 单位编号
name: string; // 单位名字
status: number; // 单位状态
}
/** 产品单位分页查询参数 */
export interface ProductUnitPageParam extends PageParam {
name?: string;
status?: number;
}
}
/** 查询产品单位分页 */
export function getProductUnitPage(
params: ErpProductUnitApi.ProductUnitPageParam,
) {
return requestClient.get<PageResult<ErpProductUnitApi.ProductUnit>>(
'/erp/product-unit/page',
{ params },
);
}
/** 查询产品单位精简列表 */
export function getProductUnitSimpleList() {
return requestClient.get<ErpProductUnitApi.ProductUnit[]>(
'/erp/product-unit/simple-list',
);
}
/** 查询产品单位详情 */
export function getProductUnit(id: number) {
return requestClient.get<ErpProductUnitApi.ProductUnit>(
`/erp/product-unit/get?id=${id}`,
);
}
/** 新增产品单位 */
export function createProductUnit(data: ErpProductUnitApi.ProductUnit) {
return requestClient.post('/erp/product-unit/create', data);
}
/** 修改产品单位 */
export function updateProductUnit(data: ErpProductUnitApi.ProductUnit) {
return requestClient.put('/erp/product-unit/update', data);
}
/** 删除产品单位 */
export function deleteProductUnit(id: number) {
return requestClient.delete(`/erp/product-unit/delete?id=${id}`);
}
/** 导出产品单位 Excel */
export function exportProductUnit(params: any) {
return requestClient.download('/erp/product-unit/export-excel', { params });
}

View File

@ -0,0 +1,102 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
namespace ErpPurchaseInApi {
/** 采购入库信息 */
export interface PurchaseIn {
id?: number; // 入库工单编号
no: string; // 采购入库号
supplierId: number; // 供应商编号
inTime: Date; // 入库时间
totalCount: number; // 合计数量
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
outCount: number; // 采购出库数量
returnCount: number; // 采购退货数量
}
/** 采购入库分页查询参数 */
export interface PurchaseInPageParams extends PageParam {
no?: string;
supplierId?: number;
status?: number;
}
/** 采购入库状态更新参数 */
export interface PurchaseInStatusParams {
id: number;
status: number;
}
}
/**
*
*/
export function getPurchaseInPage(
params: ErpPurchaseInApi.PurchaseInPageParams,
) {
return requestClient.get<PageResult<ErpPurchaseInApi.PurchaseIn>>(
'/erp/purchase-in/page',
{
params,
},
);
}
/**
*
*/
export function getPurchaseIn(id: number) {
return requestClient.get<ErpPurchaseInApi.PurchaseIn>(
`/erp/purchase-in/get?id=${id}`,
);
}
/**
*
*/
export function createPurchaseIn(data: ErpPurchaseInApi.PurchaseIn) {
return requestClient.post('/erp/purchase-in/create', data);
}
/**
*
*/
export function updatePurchaseIn(data: ErpPurchaseInApi.PurchaseIn) {
return requestClient.put('/erp/purchase-in/update', data);
}
/**
*
*/
export function updatePurchaseInStatus(
params: ErpPurchaseInApi.PurchaseInStatusParams,
) {
return requestClient.put('/erp/purchase-in/update-status', null, {
params,
});
}
/**
*
*/
export function deletePurchaseIn(ids: number[]) {
return requestClient.delete('/erp/purchase-in/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* Excel
*/
export function exportPurchaseIn(
params: ErpPurchaseInApi.PurchaseInPageParams,
) {
return requestClient.download('/erp/purchase-in/export-excel', {
params,
});
}

View File

@ -0,0 +1,116 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpPurchaseOrderApi {
/** ERP 采购订单项信息 */
export interface PurchaseOrderItem {
id?: number; // 订单项编号
orderId?: number; // 采购订单编号
productId?: number; // 产品编号
productName?: string; // 产品名称
productBarCode?: string; // 产品条码
productUnitId?: number; // 产品单位编号
productUnitName?: string; // 产品单位名称
productPrice?: number; // 产品单价,单位:元
totalProductPrice?: number; // 产品总价,单位:元
count?: number; // 数量
totalPrice?: number; // 总价,单位:元
taxPercent?: number; // 税率,百分比
taxPrice?: number; // 税额,单位:元
totalTaxPrice?: number; // 含税总价,单位:元
remark?: string; // 备注
stockCount?: number; // 库存数量(显示字段)
}
/** ERP 采购订单信息 */
export interface PurchaseOrder {
id?: number; // 订单工单编号
no?: string; // 采购订单号
supplierId?: number; // 供应商编号
supplierName?: string; // 供应商名称
orderTime?: Date | string; // 订单时间
totalCount?: number; // 合计数量
totalPrice?: number; // 合计金额,单位:元
totalProductPrice?: number; // 产品金额,单位:元
discountPercent?: number; // 优惠率,百分比
discountPrice?: number; // 优惠金额,单位:元
depositPrice?: number; // 定金金额,单位:元
accountId?: number; // 结算账户编号
status?: number; // 状态
remark?: string; // 备注
fileUrl?: string; // 附件地址
inCount?: number; // 采购入库数量
returnCount?: number; // 采购退货数量
inStatus?: number; // 入库状态
returnStatus?: number; // 退货状态
productNames?: string; // 产品名称列表
creatorName?: string; // 创建人名称
createTime?: Date; // 创建时间
items?: PurchaseOrderItem[]; // 订单项列表
}
/** 采购订单分页查询参数 */
export interface PurchaseOrderPageParam extends PageParam {
no?: string;
supplierId?: number;
productId?: number;
orderTime?: string[];
status?: number;
remark?: string;
creator?: string;
inStatus?: number;
returnStatus?: number;
}
}
/** 查询采购订单分页 */
export function getPurchaseOrderPage(
params: ErpPurchaseOrderApi.PurchaseOrderPageParam,
) {
return requestClient.get<PageResult<ErpPurchaseOrderApi.PurchaseOrder>>(
'/erp/purchase-order/page',
{ params },
);
}
/** 查询采购订单详情 */
export function getPurchaseOrder(id: number) {
return requestClient.get<ErpPurchaseOrderApi.PurchaseOrder>(
`/erp/purchase-order/get?id=${id}`,
);
}
/** 新增采购订单 */
export function createPurchaseOrder(data: ErpPurchaseOrderApi.PurchaseOrder) {
return requestClient.post('/erp/purchase-order/create', data);
}
/** 修改采购订单 */
export function updatePurchaseOrder(data: ErpPurchaseOrderApi.PurchaseOrder) {
return requestClient.put('/erp/purchase-order/update', data);
}
/** 更新采购订单的状态 */
export function updatePurchaseOrderStatus(id: number, status: number) {
return requestClient.put('/erp/purchase-order/update-status', null, {
params: { id, status },
});
}
/** 删除采购订单 */
export function deletePurchaseOrder(id: number) {
return requestClient.delete(`/erp/purchase-order/delete?id=${id}`);
}
/** 批量删除采购订单 */
export function deletePurchaseOrderList(ids: number[]) {
return requestClient.delete('/erp/purchase-order/delete', {
params: { ids: ids.join(',') },
});
}
/** 导出采购订单 Excel */
export function exportPurchaseOrder(params: any) {
return requestClient.download('/erp/purchase-order/export-excel', { params });
}

View File

@ -0,0 +1,104 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
namespace ErpPurchaseReturnApi {
/** 采购退货信息 */
export interface PurchaseReturn {
id?: number; // 采购退货编号
no: string; // 采购退货号
supplierId: number; // 供应商编号
returnTime: Date; // 退货时间
totalCount: number; // 合计数量
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
}
/** 采购退货分页查询参数 */
export interface PurchaseReturnPageParams extends PageParam {
no?: string;
supplierId?: number;
status?: number;
}
/** 采购退货状态更新参数 */
export interface PurchaseReturnStatusParams {
id: number;
status: number;
}
}
/**
* 退
*/
export function getPurchaseReturnPage(
params: ErpPurchaseReturnApi.PurchaseReturnPageParams,
) {
return requestClient.get<PageResult<ErpPurchaseReturnApi.PurchaseReturn>>(
'/erp/purchase-return/page',
{
params,
},
);
}
/**
* 退
*/
export function getPurchaseReturn(id: number) {
return requestClient.get<ErpPurchaseReturnApi.PurchaseReturn>(
`/erp/purchase-return/get?id=${id}`,
);
}
/**
* 退
*/
export function createPurchaseReturn(
data: ErpPurchaseReturnApi.PurchaseReturn,
) {
return requestClient.post('/erp/purchase-return/create', data);
}
/**
* 退
*/
export function updatePurchaseReturn(
data: ErpPurchaseReturnApi.PurchaseReturn,
) {
return requestClient.put('/erp/purchase-return/update', data);
}
/**
* 退
*/
export function updatePurchaseReturnStatus(
params: ErpPurchaseReturnApi.PurchaseReturnStatusParams,
) {
return requestClient.put('/erp/purchase-return/update-status', null, {
params,
});
}
/**
* 退
*/
export function deletePurchaseReturn(ids: number[]) {
return requestClient.delete('/erp/purchase-return/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* 退 Excel
*/
export function exportPurchaseReturn(
params: ErpPurchaseReturnApi.PurchaseReturnPageParams,
) {
return requestClient.download('/erp/purchase-return/export-excel', {
params,
});
}

View File

@ -0,0 +1,73 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpSupplierApi {
/** ERP 供应商信息 */
export interface Supplier {
id?: number; // 供应商编号
name: string; // 供应商名称
contact: string; // 联系人
mobile: string; // 手机号码
telephone: string; // 联系电话
email: string; // 电子邮箱
fax: string; // 传真
remark: string; // 备注
status: number; // 开启状态
sort: number; // 排序
taxNo: string; // 纳税人识别号
taxPercent: number; // 税率
bankName: string; // 开户行
bankAccount: string; // 开户账号
bankAddress: string; // 开户地址
}
/** 供应商分页查询参数 */
export interface SupplierPageParam extends PageParam {
name?: string;
mobile?: string;
status?: number;
}
}
/** 查询供应商分页 */
export function getSupplierPage(params: ErpSupplierApi.SupplierPageParam) {
return requestClient.get<PageResult<ErpSupplierApi.Supplier>>(
'/erp/supplier/page',
{ params },
);
}
/** 获得供应商精简列表 */
export function getSupplierSimpleList() {
return requestClient.get<ErpSupplierApi.Supplier[]>(
'/erp/supplier/simple-list',
);
}
/** 查询供应商详情 */
export function getSupplier(id: number) {
return requestClient.get<ErpSupplierApi.Supplier>(
`/erp/supplier/get?id=${id}`,
);
}
/** 新增供应商 */
export function createSupplier(data: ErpSupplierApi.Supplier) {
return requestClient.post('/erp/supplier/create', data);
}
/** 修改供应商 */
export function updateSupplier(data: ErpSupplierApi.Supplier) {
return requestClient.put('/erp/supplier/update', data);
}
/** 删除供应商 */
export function deleteSupplier(id: number) {
return requestClient.delete(`/erp/supplier/delete?id=${id}`);
}
/** 导出供应商 Excel */
export function exportSupplier(params: any) {
return requestClient.download('/erp/supplier/export-excel', { params });
}

View File

@ -0,0 +1,73 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpCustomerApi {
/** ERP 客户信息 */
export interface Customer {
id?: number; // 客户编号
name: string; // 客户名称
contact: string; // 联系人
mobile: string; // 手机号码
telephone: string; // 联系电话
email: string; // 电子邮箱
fax: string; // 传真
remark: string; // 备注
status: number; // 开启状态
sort: number; // 排序
taxNo: string; // 纳税人识别号
taxPercent: number; // 税率
bankName: string; // 开户行
bankAccount: string; // 开户账号
bankAddress: string; // 开户地址
}
/** 客户分页查询参数 */
export interface CustomerPageParam extends PageParam {
name?: string;
mobile?: string;
status?: number;
}
}
/** 查询客户分页 */
export function getCustomerPage(params: ErpCustomerApi.CustomerPageParam) {
return requestClient.get<PageResult<ErpCustomerApi.Customer>>(
'/erp/customer/page',
{ params },
);
}
/** 查询客户精简列表 */
export function getCustomerSimpleList() {
return requestClient.get<ErpCustomerApi.Customer[]>(
'/erp/customer/simple-list',
);
}
/** 查询客户详情 */
export function getCustomer(id: number) {
return requestClient.get<ErpCustomerApi.Customer>(
`/erp/customer/get?id=${id}`,
);
}
/** 新增客户 */
export function createCustomer(data: ErpCustomerApi.Customer) {
return requestClient.post('/erp/customer/create', data);
}
/** 修改客户 */
export function updateCustomer(data: ErpCustomerApi.Customer) {
return requestClient.put('/erp/customer/update', data);
}
/** 删除客户 */
export function deleteCustomer(id: number) {
return requestClient.delete(`/erp/customer/delete?id=${id}`);
}
/** 导出客户 Excel */
export function exportCustomer(params: any) {
return requestClient.download('/erp/customer/export-excel', { params });
}

View File

@ -0,0 +1,70 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpSaleOrderApi {
/** ERP 销售订单信息 */
export interface SaleOrder {
id?: number; // 订单工单编号
no: string; // 销售订单号
customerId: number; // 客户编号
orderTime: Date; // 订单时间
totalCount: number; // 合计数量
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
outCount: number; // 销售出库数量
returnCount: number; // 销售退货数量
}
/** 销售订单分页查询参数 */
export interface SaleOrderPageParam extends PageParam {
no?: string;
customerId?: number;
status?: number;
}
}
/** 查询销售订单分页 */
export function getSaleOrderPage(params: ErpSaleOrderApi.SaleOrderPageParam) {
return requestClient.get<PageResult<ErpSaleOrderApi.SaleOrder>>(
'/erp/sale-order/page',
{ params },
);
}
/** 查询销售订单详情 */
export function getSaleOrder(id: number) {
return requestClient.get<ErpSaleOrderApi.SaleOrder>(
`/erp/sale-order/get?id=${id}`,
);
}
/** 新增销售订单 */
export function createSaleOrder(data: ErpSaleOrderApi.SaleOrder) {
return requestClient.post('/erp/sale-order/create', data);
}
/** 修改销售订单 */
export function updateSaleOrder(data: ErpSaleOrderApi.SaleOrder) {
return requestClient.put('/erp/sale-order/update', data);
}
/** 更新销售订单的状态 */
export function updateSaleOrderStatus(id: number, status: number) {
return requestClient.put('/erp/sale-order/update-status', null, {
params: { id, status },
});
}
/** 删除销售订单 */
export function deleteSaleOrder(ids: number[]) {
return requestClient.delete('/erp/sale-order/delete', {
params: { ids: ids.join(',') },
});
}
/** 导出销售订单 Excel */
export function exportSaleOrder(params: any) {
return requestClient.download('/erp/sale-order/export-excel', { params });
}

View File

@ -0,0 +1,92 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
namespace ErpSaleOutApi {
/** 销售出库信息 */
export interface SaleOut {
id?: number; // 销售出库编号
no: string; // 销售出库号
customerId: number; // 客户编号
outTime: Date; // 出库时间
totalCount: number; // 合计数量
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
}
/** 销售出库分页查询参数 */
export interface SaleOutPageParams extends PageParam {
no?: string;
customerId?: number;
status?: number;
}
/** 销售出库状态更新参数 */
export interface SaleOutStatusParams {
id: number;
status: number;
}
}
/**
*
*/
export function getSaleOutPage(params: ErpSaleOutApi.SaleOutPageParams) {
return requestClient.get<PageResult<ErpSaleOutApi.SaleOut>>(
'/erp/sale-out/page',
{
params,
},
);
}
/**
*
*/
export function getSaleOut(id: number) {
return requestClient.get<ErpSaleOutApi.SaleOut>(`/erp/sale-out/get?id=${id}`);
}
/**
*
*/
export function createSaleOut(data: ErpSaleOutApi.SaleOut) {
return requestClient.post('/erp/sale-out/create', data);
}
/**
*
*/
export function updateSaleOut(data: ErpSaleOutApi.SaleOut) {
return requestClient.put('/erp/sale-out/update', data);
}
/**
*
*/
export function updateSaleOutStatus(params: ErpSaleOutApi.SaleOutStatusParams) {
return requestClient.put('/erp/sale-out/update-status', null, {
params,
});
}
/**
*
*/
export function deleteSaleOut(ids: number[]) {
return requestClient.delete('/erp/sale-out/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* Excel
*/
export function exportSaleOut(params: ErpSaleOutApi.SaleOutPageParams) {
return requestClient.download('/erp/sale-out/export-excel', {
params,
});
}

View File

@ -0,0 +1,100 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
namespace ErpSaleReturnApi {
/** 销售退货信息 */
export interface SaleReturn {
id?: number; // 销售退货编号
no: string; // 销售退货号
customerId: number; // 客户编号
returnTime: Date; // 退货时间
totalCount: number; // 合计数量
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
}
/** 销售退货分页查询参数 */
export interface SaleReturnPageParams extends PageParam {
no?: string;
customerId?: number;
status?: number;
}
/** 销售退货状态更新参数 */
export interface SaleReturnStatusParams {
id: number;
status: number;
}
}
/**
* 退
*/
export function getSaleReturnPage(
params: ErpSaleReturnApi.SaleReturnPageParams,
) {
return requestClient.get<PageResult<ErpSaleReturnApi.SaleReturn>>(
'/erp/sale-return/page',
{
params,
},
);
}
/**
* 退
*/
export function getSaleReturn(id: number) {
return requestClient.get<ErpSaleReturnApi.SaleReturn>(
`/erp/sale-return/get?id=${id}`,
);
}
/**
* 退
*/
export function createSaleReturn(data: ErpSaleReturnApi.SaleReturn) {
return requestClient.post('/erp/sale-return/create', data);
}
/**
* 退
*/
export function updateSaleReturn(data: ErpSaleReturnApi.SaleReturn) {
return requestClient.put('/erp/sale-return/update', data);
}
/**
* 退
*/
export function updateSaleReturnStatus(
params: ErpSaleReturnApi.SaleReturnStatusParams,
) {
return requestClient.put('/erp/sale-return/update-status', null, {
params,
});
}
/**
* 退
*/
export function deleteSaleReturn(ids: number[]) {
return requestClient.delete('/erp/sale-return/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* 退 Excel
*/
export function exportSaleReturn(
params: ErpSaleReturnApi.SaleReturnPageParams,
) {
return requestClient.download('/erp/sale-return/export-excel', {
params,
});
}

View File

@ -0,0 +1,31 @@
import { requestClient } from '#/api/request';
export namespace ErpPurchaseStatisticsApi {
/** ERP 采购全局统计 */
export interface PurchaseSummary {
todayPrice: number; // 今日采购金额
yesterdayPrice: number; // 昨日采购金额
monthPrice: number; // 本月采购金额
yearPrice: number; // 今年采购金额
}
/** ERP 采购时间段统计 */
export interface PurchaseTimeSummary {
time: string; // 时间
price: number; // 采购金额
}
}
/** 获得采购统计 */
export function getPurchaseSummary() {
return requestClient.get<ErpPurchaseStatisticsApi.PurchaseSummary>(
'/erp/purchase-statistics/summary',
);
}
/** 获得采购时间段统计 */
export function getPurchaseTimeSummary() {
return requestClient.get<ErpPurchaseStatisticsApi.PurchaseTimeSummary[]>(
'/erp/purchase-statistics/time-summary',
);
}

View File

@ -0,0 +1,31 @@
import { requestClient } from '#/api/request';
export namespace ErpSaleStatisticsApi {
/** ERP 销售全局统计 */
export interface SaleSummary {
todayPrice: number; // 今日销售金额
yesterdayPrice: number; // 昨日销售金额
monthPrice: number; // 本月销售金额
yearPrice: number; // 今年销售金额
}
/** ERP 销售时间段统计 */
export interface SaleTimeSummary {
time: string; // 时间
price: number; // 销售金额
}
}
/** 获得销售统计 */
export function getSaleSummary() {
return requestClient.get<ErpSaleStatisticsApi.SaleSummary>(
'/erp/sale-statistics/summary',
);
}
/** 获得销售时间段统计 */
export function getSaleTimeSummary() {
return requestClient.get<ErpSaleStatisticsApi.SaleTimeSummary[]>(
'/erp/sale-statistics/time-summary',
);
}

View File

@ -0,0 +1,98 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
namespace ErpStockCheckApi {
/** 库存盘点单信息 */
export interface StockCheck {
id?: number; // 盘点编号
no: string; // 盘点单号
checkTime: Date; // 盘点时间
totalCount: number; // 合计数量
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
}
/** 库存盘点单分页查询参数 */
export interface StockCheckPageParams extends PageParam {
no?: string;
status?: number;
}
/** 库存盘点单状态更新参数 */
export interface StockCheckStatusParams {
id: number;
status: number;
}
}
/**
*
*/
export function getStockCheckPage(
params: ErpStockCheckApi.StockCheckPageParams,
) {
return requestClient.get<PageResult<ErpStockCheckApi.StockCheck>>(
'/erp/stock-check/page',
{
params,
},
);
}
/**
*
*/
export function getStockCheck(id: number) {
return requestClient.get<ErpStockCheckApi.StockCheck>(
`/erp/stock-check/get?id=${id}`,
);
}
/**
*
*/
export function createStockCheck(data: ErpStockCheckApi.StockCheck) {
return requestClient.post('/erp/stock-check/create', data);
}
/**
*
*/
export function updateStockCheck(data: ErpStockCheckApi.StockCheck) {
return requestClient.put('/erp/stock-check/update', data);
}
/**
*
*/
export function updateStockCheckStatus(
params: ErpStockCheckApi.StockCheckStatusParams,
) {
return requestClient.put('/erp/stock-check/update-status', null, {
params,
});
}
/**
*
*/
export function deleteStockCheck(ids: number[]) {
return requestClient.delete('/erp/stock-check/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* Excel
*/
export function exportStockCheck(
params: ErpStockCheckApi.StockCheckPageParams,
) {
return requestClient.download('/erp/stock-check/export-excel', {
params,
});
}

View File

@ -0,0 +1,113 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpStockInApi {
/** 其它入库单信息 */
export interface StockIn {
id?: number; // 入库编号
no: string; // 入库单号
supplierId: number; // 供应商编号
supplierName?: string; // 供应商名称
inTime: Date; // 入库时间
totalCount: number; // 合计数量
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
fileUrl?: string; // 附件
productNames?: string; // 产品信息
creatorName?: string; // 创建人
items?: StockInItem[]; // 入库产品清单
}
/** 其它入库单产品信息 */
export interface StockInItem {
id?: number; // 编号
warehouseId: number; // 仓库编号
productId: number; // 产品编号
productName?: string; // 产品名称
productUnitId?: number; // 产品单位编号
productUnitName?: string; // 产品单位名称
productBarCode?: string; // 产品条码
count: number; // 数量
productPrice: number; // 产品单价
totalPrice: number; // 总价
stockCount?: number; // 库存数量
remark?: string; // 备注
}
/** 其它入库单分页查询参数 */
export interface StockInPageParams extends PageParam {
no?: string;
supplierId?: number;
status?: number;
}
/** 其它入库单状态更新参数 */
export interface StockInStatusParams {
id: number;
status: number;
}
}
/**
*
*/
export function getStockInPage(params: ErpStockInApi.StockInPageParams) {
return requestClient.get<PageResult<ErpStockInApi.StockIn>>(
'/erp/stock-in/page',
{
params,
},
);
}
/**
*
*/
export function getStockIn(id: number) {
return requestClient.get<ErpStockInApi.StockIn>(`/erp/stock-in/get?id=${id}`);
}
/**
*
*/
export function createStockIn(data: ErpStockInApi.StockIn) {
return requestClient.post('/erp/stock-in/create', data);
}
/**
*
*/
export function updateStockIn(data: ErpStockInApi.StockIn) {
return requestClient.put('/erp/stock-in/update', data);
}
/**
*
*/
export function updateStockInStatus(params: ErpStockInApi.StockInStatusParams) {
return requestClient.put('/erp/stock-in/update-status', null, {
params,
});
}
/**
*
*/
export function deleteStockIn(ids: number[]) {
return requestClient.delete('/erp/stock-in/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* Excel
*/
export function exportStockIn(params: ErpStockInApi.StockInPageParams) {
return requestClient.download('/erp/stock-in/export-excel', {
params,
});
}

View File

@ -0,0 +1,94 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
namespace ErpStockMoveApi {
/** 库存调拨单信息 */
export interface StockMove {
id?: number; // 调拨编号
no: string; // 调拨单号
outTime: Date; // 调拨时间
totalCount: number; // 合计数量
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
}
/** 库存调拨单分页查询参数 */
export interface StockMovePageParams extends PageParam {
no?: string;
status?: number;
}
/** 库存调拨单状态更新参数 */
export interface StockMoveStatusParams {
id: number;
status: number;
}
}
/**
*
*/
export function getStockMovePage(params: ErpStockMoveApi.StockMovePageParams) {
return requestClient.get<PageResult<ErpStockMoveApi.StockMove>>(
'/erp/stock-move/page',
{
params,
},
);
}
/**
*
*/
export function getStockMove(id: number) {
return requestClient.get<ErpStockMoveApi.StockMove>(
`/erp/stock-move/get?id=${id}`,
);
}
/**
*
*/
export function createStockMove(data: ErpStockMoveApi.StockMove) {
return requestClient.post('/erp/stock-move/create', data);
}
/**
*
*/
export function updateStockMove(data: ErpStockMoveApi.StockMove) {
return requestClient.put('/erp/stock-move/update', data);
}
/**
*
*/
export function updateStockMoveStatus(
params: ErpStockMoveApi.StockMoveStatusParams,
) {
return requestClient.put('/erp/stock-move/update-status', null, {
params,
});
}
/**
*
*/
export function deleteStockMove(ids: number[]) {
return requestClient.delete('/erp/stock-move/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* Excel
*/
export function exportStockMove(params: ErpStockMoveApi.StockMovePageParams) {
return requestClient.download('/erp/stock-move/export-excel', {
params,
});
}

View File

@ -0,0 +1,96 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
namespace ErpStockOutApi {
/** 其它出库单信息 */
export interface StockOut {
id?: number; // 出库编号
no: string; // 出库单号
customerId: number; // 客户编号
outTime: Date; // 出库时间
totalCount: number; // 合计数量
totalPrice: number; // 合计金额,单位:元
status: number; // 状态
remark: string; // 备注
}
/** 其它出库单分页查询参数 */
export interface StockOutPageParams extends PageParam {
no?: string;
customerId?: number;
status?: number;
}
/** 其它出库单状态更新参数 */
export interface StockOutStatusParams {
id: number;
status: number;
}
}
/**
*
*/
export function getStockOutPage(params: ErpStockOutApi.StockOutPageParams) {
return requestClient.get<PageResult<ErpStockOutApi.StockOut>>(
'/erp/stock-out/page',
{
params,
},
);
}
/**
*
*/
export function getStockOut(id: number) {
return requestClient.get<ErpStockOutApi.StockOut>(
`/erp/stock-out/get?id=${id}`,
);
}
/**
*
*/
export function createStockOut(data: ErpStockOutApi.StockOut) {
return requestClient.post('/erp/stock-out/create', data);
}
/**
*
*/
export function updateStockOut(data: ErpStockOutApi.StockOut) {
return requestClient.put('/erp/stock-out/update', data);
}
/**
*
*/
export function updateStockOutStatus(
params: ErpStockOutApi.StockOutStatusParams,
) {
return requestClient.put('/erp/stock-out/update-status', null, {
params,
});
}
/**
*
*/
export function deleteStockOut(ids: number[]) {
return requestClient.delete('/erp/stock-out/delete', {
params: {
ids: ids.join(','),
},
});
}
/**
* Excel
*/
export function exportStockOut(params: ErpStockOutApi.StockOutPageParams) {
return requestClient.download('/erp/stock-out/export-excel', {
params,
});
}

View File

@ -0,0 +1,47 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpStockRecordApi {
/** ERP 产品库存明细 */
export interface StockRecord {
id?: number; // 编号
productId: number; // 产品编号
warehouseId: number; // 仓库编号
count: number; // 出入库数量
totalCount: number; // 总库存量
bizType: number; // 业务类型
bizId: number; // 业务编号
bizItemId: number; // 业务项编号
bizNo: string; // 业务单号
}
/** 库存记录分页查询参数 */
export interface StockRecordPageParam extends PageParam {
productId?: number;
warehouseId?: number;
bizType?: number;
}
}
/** 查询产品库存明细分页 */
export function getStockRecordPage(
params: ErpStockRecordApi.StockRecordPageParam,
) {
return requestClient.get<PageResult<ErpStockRecordApi.StockRecord>>(
'/erp/stock-record/page',
{ params },
);
}
/** 查询产品库存明细详情 */
export function getStockRecord(id: number) {
return requestClient.get<ErpStockRecordApi.StockRecord>(
`/erp/stock-record/get?id=${id}`,
);
}
/** 导出产品库存明细 Excel */
export function exportStockRecord(params: any) {
return requestClient.download('/erp/stock-record/export-excel', { params });
}

View File

@ -0,0 +1,74 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpStockApi {
/** 产品库存信息 */
export interface Stock {
id?: number; // 编号
productId: number; // 产品编号
warehouseId: number; // 仓库编号
count: number; // 库存数量
}
/** 产品库存分页查询参数 */
export interface StockPageParams extends PageParam {
productId?: number;
warehouseId?: number;
}
/** 产品库存查询参数 */
export interface StockQueryParams {
productId: number;
warehouseId: number;
}
}
/**
*
*/
export function getStockPage(params: ErpStockApi.StockPageParams) {
return requestClient.get<PageResult<ErpStockApi.Stock>>('/erp/stock/page', {
params,
});
}
/**
*
*/
export function getStock(id: number) {
return requestClient.get<ErpStockApi.Stock>(`/erp/stock/get?id=${id}`);
}
/**
*
*/
export function getStockByProductAndWarehouse(
params: ErpStockApi.StockQueryParams,
) {
return requestClient.get<ErpStockApi.Stock>('/erp/stock/get', {
params,
});
}
/**
*
*/
export function getStockCount(productId: number, warehouseId?: number) {
const params: any = { productId };
if (warehouseId !== undefined) {
params.warehouseId = warehouseId;
}
return requestClient.get<number>('/erp/stock/get-count', {
params,
});
}
/**
* Excel
*/
export function exportStock(params: ErpStockApi.StockPageParams) {
return requestClient.download('/erp/stock/export-excel', {
params,
});
}

View File

@ -0,0 +1,77 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpWarehouseApi {
/** ERP 仓库信息 */
export interface Warehouse {
id?: number; // 仓库编号
name: string; // 仓库名称
address: string; // 仓库地址
sort: number; // 排序
remark: string; // 备注
principal: string; // 负责人
warehousePrice: number; // 仓储费,单位:元
truckagePrice: number; // 搬运费,单位:元
status: number; // 开启状态
defaultStatus: boolean; // 是否默认
}
/** 仓库分页查询参数 */
export interface WarehousePageParam extends PageParam {
name?: string;
status?: number;
}
}
/** 查询仓库分页 */
export function getWarehousePage(params: ErpWarehouseApi.WarehousePageParam) {
return requestClient.get<PageResult<ErpWarehouseApi.Warehouse>>(
'/erp/warehouse/page',
{ params },
);
}
/** 查询仓库精简列表 */
export function getWarehouseSimpleList() {
return requestClient.get<ErpWarehouseApi.Warehouse[]>(
'/erp/warehouse/simple-list',
);
}
/** 查询仓库详情 */
export function getWarehouse(id: number) {
return requestClient.get<ErpWarehouseApi.Warehouse>(
`/erp/warehouse/get?id=${id}`,
);
}
/** 新增仓库 */
export function createWarehouse(data: ErpWarehouseApi.Warehouse) {
return requestClient.post('/erp/warehouse/create', data);
}
/** 修改仓库 */
export function updateWarehouse(data: ErpWarehouseApi.Warehouse) {
return requestClient.put('/erp/warehouse/update', data);
}
/** 修改仓库默认状态 */
export function updateWarehouseDefaultStatus(
id: number,
defaultStatus: boolean,
) {
return requestClient.put('/erp/warehouse/update-default-status', null, {
params: { id, defaultStatus },
});
}
/** 删除仓库 */
export function deleteWarehouse(id: number) {
return requestClient.delete(`/erp/warehouse/delete?id=${id}`);
}
/** 导出仓库 Excel */
export function exportWarehouse(params: any) {
return requestClient.download('/erp/warehouse/export-excel', { params });
}

View File

@ -8,7 +8,9 @@ export namespace SystemMailLogApi {
id: number;
userId: number;
userType: number;
toMail: string;
toMails: string[];
ccMails?: string[];
bccMails?: string[];
accountId: number;
fromMail: string;
templateId: number;
@ -32,15 +34,3 @@ export function getMailLogPage(params: PageParam) {
{ params },
);
}
/** 查询邮件日志详情 */
export function getMailLog(id: number) {
return requestClient.get<SystemMailLogApi.MailLog>(
`/system/mail-log/get?id=${id}`,
);
}
/** 重新发送邮件 */
export function resendMail(id: number) {
return requestClient.put(`/system/mail-log/resend?id=${id}`);
}

View File

@ -20,7 +20,9 @@ export namespace SystemMailTemplateApi {
/** 邮件发送信息 */
export interface MailSendReq {
mail: string;
toMails: string[];
ccMails?: string[];
bccMails?: string[];
templateCode: string;
templateParams: Record<string, any>;
}

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ import type { PropType } from 'vue';
import type { ActionItem, PopConfirm } from './typing';
import { computed, unref } from 'vue';
import { computed, unref, watch } from 'vue';
import { useAccess } from '@vben/access';
import { IconifyIcon } from '@vben/icons';
@ -60,21 +60,20 @@ function isIfShow(action: ActionItem): boolean {
/** 处理按钮 actions */
const getActions = computed(() => {
return (props.actions || []).filter((action: ActionItem) => isIfShow(action));
const actions = props.actions || [];
return actions.filter((action: ActionItem) => isIfShow(action));
});
/** 处理下拉菜单 actions */
const getDropdownList = computed(() => {
return (props.dropDownActions || []).filter((action: ActionItem) =>
isIfShow(action),
);
const dropDownActions = props.dropDownActions || [];
return dropDownActions.filter((action: ActionItem) => isIfShow(action));
});
/** Space 组件的 size */
const spaceSize = computed(() => {
return unref(getActions)?.some((item: ActionItem) => item.type === 'link')
? 0
: 8;
const actions = unref(getActions);
return actions?.some((item: ActionItem) => item.type === 'link') ? 0 : 8;
});
/** 获取 PopConfirm 属性 */
@ -137,6 +136,15 @@ function handleButtonClick(action: ActionItem) {
action.onClick();
}
}
/** 监听props变化强制重新计算 */
watch(
() => [props.actions, props.dropDownActions],
() => {
// computed
},
{ deep: true },
);
</script>
<template>

View File

@ -44,16 +44,26 @@ export const useAuthStore = defineStore('auth', () => {
// 异步处理用户登录操作并获取 accessToken
let userInfo: null | UserInfo = null;
try {
let loginResult: AuthApi.LoginResult;
loginLoading.value = true;
const { accessToken, refreshToken } =
type === 'mobile'
? await smsLogin(params as AuthApi.SmsLoginParams)
: type === 'register'
? await register(params as AuthApi.RegisterParams)
: // eslint-disable-next-line unicorn/no-nested-ternary
type === 'social'
? await socialLogin(params as AuthApi.SocialLoginParams)
: await loginApi(params);
switch (type) {
case 'mobile': {
loginResult = await smsLogin(params as AuthApi.SmsLoginParams);
break;
}
case 'register': {
loginResult = await register(params as AuthApi.RegisterParams);
break;
}
case 'social': {
loginResult = await socialLogin(params as AuthApi.SocialLoginParams);
break;
}
default: {
loginResult = await loginApi(params);
}
}
const { accessToken, refreshToken } = loginResult;
// 如果成功获取到 accessToken
if (accessToken) {

View File

@ -1,4 +1,5 @@
<script lang="ts" setup>
// TODO @gjdhttps://t.zsxq.com/pmNb1 AI
import type { AiChatConversationApi } from '#/api/ai/chat/conversation';
import type { AiChatMessageApi } from '#/api/ai/chat/message';
@ -23,6 +24,7 @@ import MessageList from './components/message/MessageList.vue';
import MessageListEmpty from './components/message/MessageListEmpty.vue';
import MessageLoading from './components/message/MessageLoading.vue';
import MessageNewConversation from './components/message/MessageNewConversation.vue';
/** AI 聊天对话 列表 */
defineOptions({ name: 'AiChat' });

View File

@ -69,7 +69,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiChatConversationApi.ChatConversation>,

View File

@ -66,7 +66,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiChatConversationApi.ChatConversation>,

View File

@ -79,7 +79,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiImageApi.Image>,
@ -104,7 +104,10 @@ onMounted(async () => {
</template>
<template #userId="{ row }">
<span>
{{ userList.find((item) => item.id === row.userId)?.nickname }}
{{
userList.find((item: SystemUserApi.User) => item.id === row.userId)
?.nickname
}}
</span>
</template>
<template #publicStatus="{ row }">

View File

@ -117,7 +117,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiKnowledgeDocumentApi.KnowledgeDocument>,

View File

@ -95,7 +95,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiKnowledgeKnowledgeApi.Knowledge>,

View File

@ -86,7 +86,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiKnowledgeKnowledgeApi.Knowledge>,

View File

@ -70,7 +70,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiMindmapApi.MindMap>,
@ -108,7 +108,10 @@ onMounted(async () => {
</template>
<template #userId="{ row }">
<span>
{{ userList.find((item) => item.id === row.userId)?.nickname }}
{{
userList.find((item: SystemUserApi.User) => item.id === row.userId)
?.nickname
}}
</span>
</template>
<template #actions="{ row }">

View File

@ -74,7 +74,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiModelApiKeyApi.ApiKey>,

View File

@ -74,7 +74,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiModelChatRoleApi.ChatRole>,

View File

@ -79,7 +79,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiModelModelApi.Model>,
@ -112,7 +112,11 @@ onMounted(async () => {
</template>
<template #keyId="{ row }">
<span>
{{ apiKeyList.find((item) => item.id === row.keyId)?.name }}
{{
apiKeyList.find(
(item: AiModelApiKeyApi.ApiKey) => item.id === row.keyId,
)?.name
}}
</span>
</template>
<template #actions="{ row }">

View File

@ -74,7 +74,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiModelToolApi.Tool>,

View File

@ -79,7 +79,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiMusicApi.Music>,

View File

@ -76,7 +76,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<any>,

View File

@ -62,7 +62,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiWriteApi.AiWritePageReq>,

View File

@ -114,7 +114,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
isHover: true,
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<ProductUnitApi.ProductUnit>,

View File

@ -118,7 +118,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
isHover: true,
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<ProductUnitGroupApi.ProductUnitGroup>,

View File

@ -74,7 +74,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<BpmCategoryApi.Category>,

View File

@ -109,7 +109,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
cellConfig: {

View File

@ -85,7 +85,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<BpmUserGroupApi.UserGroup>,

View File

@ -76,7 +76,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
},
} as VxeTableGridOptions,
});

View File

@ -123,6 +123,7 @@ const formData: any = ref({
enable: false,
summary: [],
},
allowWithdrawTask: false,
});
//
@ -178,6 +179,16 @@ async function initData() {
//
if (route.params.type === 'copy') {
delete formData.value.id;
if (formData.value.bpmnXml) {
formData.value.bpmnXml = formData.value.bpmnXml.replaceAll(
formData.value.name,
`${formData.value.name}副本`,
);
formData.value.bpmnXml = formData.value.bpmnXml.replaceAll(
formData.value.key,
`${formData.value.key}_copy`,
);
}
formData.value.name += '副本';
formData.value.key += '_copy';
}

View File

@ -69,7 +69,27 @@ const selectedUsers = ref<number[]>();
const rules: Record<string, Rule[]> = {
name: [{ required: true, message: '流程名称不能为空', trigger: 'blur' }],
key: [{ required: true, message: '流程标识不能为空', trigger: 'blur' }],
key: [
{ required: true, message: '流程标识不能为空', trigger: 'blur' },
{
validator: (_rule: any, value: string, callback: any) => {
if (!value) {
callback();
return;
}
if (!/^[a-z_][\-\w.$]*$/i.test(value)) {
callback(
new Error(
'只能包含字母、数字、下划线、连字符和点号,且必须以字母或下划线开头',
),
);
return;
}
callback();
},
trigger: 'blur',
},
],
category: [{ required: true, message: '流程分类不能为空', trigger: 'blur' }],
type: [{ required: true, message: '流程类型不能为空', trigger: 'blur' }],
visible: [{ required: true, message: '是否可见不能为空', trigger: 'blur' }],

View File

@ -220,6 +220,9 @@ function initData() {
if (modelData.value.taskAfterTriggerSetting) {
taskAfterTriggerEnable.value = true;
}
if (modelData.value.allowWithdrawTask === undefined) {
modelData.value.allowWithdrawTask = false;
}
}
/** 监听表单 ID 变化,加载表单数据 */
@ -272,6 +275,18 @@ defineExpose({ initData, validate });
</div>
</div>
</FormItem>
<FormItem class="mb-5" label="审批人权限">
<div class="mt-1 flex flex-col">
<Checkbox v-model:checked="modelData.allowWithdrawTask">
允许审批人撤回任务
</Checkbox>
<div class="ml-6">
<TypographyText type="secondary">
审批人可撤回正在审批节点的前一节点
</TypographyText>
</div>
</div>
</FormItem>
<FormItem v-if="modelData.processIdRule" class="mb-5" label="流程编码">
<Row :gutter="8" align="middle">
<Col :span="1">

View File

@ -415,6 +415,7 @@ const handleRenameSuccess = () => {
>
<div class="flex h-12 items-center">
<!-- 头部分类名 -->
<!-- TODO @jason1无法拖动排序2拖动后直接请求排序不用有个保存排序模型分类和排序分类里的模型交互有点不同哈 -->
<div class="flex items-center">
<Tooltip v-if="isCategorySorting" title="拖动排序">
<span

View File

@ -38,7 +38,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<BpmOALeaveApi.Leave>,

View File

@ -77,7 +77,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<BpmProcessExpressionApi.ProcessExpression>,

View File

@ -2,6 +2,8 @@
import type { BpmProcessInstanceApi } from '#/api/bpm/processInstance';
import type { SystemUserApi } from '#/api/system/user';
// TODO @jason https://t.zsxq.com/eif2e
import { nextTick, onMounted, ref, shallowRef, watch } from 'vue';
import { Page } from '@vben/common-ui';

View File

@ -4,7 +4,7 @@ import type { Rule } from 'ant-design-vue/es/form';
import type { BpmProcessInstanceApi } from '#/api/bpm/processInstance';
import { computed, reactive, ref, watch } from 'vue';
import { computed, nextTick, reactive, ref, watch } from 'vue';
import { useRouter } from 'vue-router';
import { useVbenModal } from '@vben/common-ui';
@ -102,6 +102,7 @@ const approveSignFormRef = ref();
const nextAssigneesActivityNode = ref<BpmProcessInstanceApi.ApprovalNodeInfo[]>(
[],
); //
const nextAssigneesTimelineRef = ref(); // 线
const approveReasonForm: any = reactive({
reason: '',
signPicUrl: '',
@ -278,6 +279,10 @@ function closePopover(type: string, formRef: any | FormInstance) {
}
if (popOverVisible.value[type]) popOverVisible.value[type] = false;
nextAssigneesActivityNode.value = [];
// Timeline
if (nextAssigneesTimelineRef.value) {
nextAssigneesTimelineRef.value.batchSetCustomApproveUsers({});
}
}
/** 流程通过时,根据表单变量查询新的流程节点,判断下一个节点类型是否为自选审批人 */
@ -290,6 +295,7 @@ async function initNextAssigneesFormField() {
processVariablesStr: JSON.stringify(variables),
});
if (data && data.length > 0) {
const customApproveUsersData: Record<string, any[]> = {}; // Timeline
data.forEach((node: BpmProcessInstanceApi.ApprovalNodeInfo) => {
if (
//
@ -302,7 +308,23 @@ async function initNextAssigneesFormField() {
) {
nextAssigneesActivityNode.value.push(node);
}
// candidateUsers customApproveUsers
if (node.candidateUsers && node.candidateUsers.length > 0) {
customApproveUsersData[node.id] = node.candidateUsers;
}
});
// candidateUsers Timeline
await nextTick(); // tick Timeline
if (
nextAssigneesTimelineRef.value &&
Object.keys(customApproveUsersData).length > 0
) {
nextAssigneesTimelineRef.value.batchSetCustomApproveUsers(
customApproveUsersData,
);
}
}
}
@ -364,6 +386,10 @@ async function handleAudit(pass: boolean, formRef: FormInstance | undefined) {
await TaskApi.approveTask(data);
popOverVisible.value.approve = false;
nextAssigneesActivityNode.value = [];
// Timeline
if (nextAssigneesTimelineRef.value) {
nextAssigneesTimelineRef.value.batchSetCustomApproveUsers({});
}
message.success('审批通过成功');
} else {
//
@ -733,9 +759,10 @@ defineExpose({ loadTodoTask });
>
<div class="-mb-8 -mt-3.5 ml-2.5">
<ProcessInstanceTimeline
ref="nextAssigneesTimelineRef"
:activity-nodes="nextAssigneesActivityNode"
:show-status-icon="false"
:use-next-assignees="true"
:enable-approve-user-select="true"
@select-user-confirm="selectNextAssigneesConfirm"
/>
</div>

View File

@ -23,12 +23,12 @@ defineOptions({ name: 'BpmProcessInstanceTimeline' });
const props = withDefaults(
defineProps<{
activityNodes: BpmProcessInstanceApi.ApprovalNodeInfo[]; //
enableApproveUserSelect?: boolean; //
showStatusIcon?: boolean; //
useNextAssignees?: boolean; //
}>(),
{
showStatusIcon: true, // true
useNextAssignees: false, // false
enableApproveUserSelect: false, // false
},
);
@ -183,6 +183,9 @@ function handleUserSelectConfirm(userList: any[]) {
/** 跳转子流程 */
function handleChildProcess(activity: any) {
if (!activity.processInstanceId) {
return;
}
push({
name: 'BpmProcessInstanceDetail',
query: {
@ -197,12 +200,12 @@ function shouldShowCustomUserSelect(
) {
return (
isEmpty(activity.tasks) &&
isEmpty(activity.candidateUsers) &&
(BpmCandidateStrategyEnum.START_USER_SELECT ===
activity.candidateStrategy ||
(BpmCandidateStrategyEnum.APPROVE_USER_SELECT ===
activity.candidateStrategy &&
props.useNextAssignees))
((BpmCandidateStrategyEnum.START_USER_SELECT ===
activity.candidateStrategy &&
isEmpty(activity.candidateUsers)) ||
(props.enableApproveUserSelect &&
BpmCandidateStrategyEnum.APPROVE_USER_SELECT ===
activity.candidateStrategy))
);
}
@ -225,6 +228,21 @@ function handleUserSelectClosed() {
function handleUserSelectCancel() {
selectedUsers.value = [];
}
/** 设置自定义审批人 */
const setCustomApproveUsers = (activityId: string, users: any[]) => {
customApproveUsers.value[activityId] = users || [];
};
/** 批量设置多个节点的自定义审批人 */
const batchSetCustomApproveUsers = (data: Record<string, any[]>) => {
Object.keys(data).forEach((activityId) => {
customApproveUsers.value[activityId] = data[activityId] || [];
});
};
//
defineExpose({ setCustomApproveUsers, batchSetCustomApproveUsers });
</script>
<template>
@ -291,6 +309,7 @@ function handleUserSelectCancel() {
ghost
size="small"
@click="handleChildProcess(activity)"
:disabled="!activity.processInstanceId"
>
查看子流程
</Button>

View File

@ -90,7 +90,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
cellConfig: {

View File

@ -99,7 +99,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<BpmProcessInstanceApi.ProcessInstance>,

View File

@ -115,7 +115,7 @@ const createGrid = () => {
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
proxyConfig: {

View File

@ -77,7 +77,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<BpmProcessListenerApi.ProcessListener>,

View File

@ -48,7 +48,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
cellConfig: {

View File

@ -4,8 +4,10 @@ import type { BpmTaskApi } from '#/api/bpm/task';
import { DocAlert, Page } from '@vben/common-ui';
import { message } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getTaskDonePage } from '#/api/bpm/task';
import { getTaskDonePage, withdrawTask } from '#/api/bpm/task';
import { router } from '#/router';
import { useGridColumns, useGridFormSchema } from './data';
@ -23,7 +25,15 @@ function handleHistory(row: BpmTaskApi.TaskManager) {
});
}
const [Grid] = useVbenVxeGrid({
/** 撤回任务 */
async function handleWithdraw(row: BpmTaskApi.TaskManager) {
await withdrawTask(row.id);
message.success('撤回成功');
//
await gridApi.query();
}
const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: useGridFormSchema(),
},
@ -46,13 +56,13 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
cellConfig: {
height: 64,
},
} as VxeTableGridOptions<BpmTaskApi.Task>,
} as VxeTableGridOptions<BpmTaskApi.TaskManager>,
});
</script>
@ -75,6 +85,13 @@ const [Grid] = useVbenVxeGrid({
<template #actions="{ row }">
<TableAction
:actions="[
{
label: '撤回',
type: 'link',
icon: ACTION_ICON.EDIT,
color: 'warning',
onClick: handleWithdraw.bind(null, row),
},
{
label: '历史',
type: 'link',

View File

@ -45,7 +45,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
cellConfig: {

View File

@ -47,7 +47,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
cellConfig: {

View File

@ -55,7 +55,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmClueApi.Clue>,

View File

@ -77,7 +77,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmContractApi.Contract>,

View File

@ -77,7 +77,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmContractApi.Contract>,

View File

@ -55,7 +55,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmCustomerApi.Customer>,

View File

@ -55,7 +55,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmCustomerApi.Customer>,

View File

@ -65,7 +65,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmCustomerApi.Customer>,

View File

@ -72,7 +72,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmReceivableApi.Receivable>,

View File

@ -72,7 +72,7 @@ const [Grid] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmReceivablePlanApi.Plan>,

View File

@ -97,7 +97,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmBusinessApi.Business>,

View File

@ -120,7 +120,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmBusinessApi.Business>,

View File

@ -146,7 +146,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmBusinessApi.Business>,

View File

@ -72,7 +72,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmBusinessStatusApi.BusinessStatus>,

View File

@ -90,7 +90,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmClueApi.Clue>,

View File

@ -102,7 +102,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmContactApi.Contact>,

View File

@ -120,7 +120,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmContactApi.Contact>,

View File

@ -143,7 +143,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmContactApi.Contact>,

View File

@ -139,7 +139,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmContractApi.Contract>,

View File

@ -93,7 +93,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmBusinessApi.Business>,

View File

@ -108,7 +108,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmCustomerApi.Customer>,

View File

@ -85,7 +85,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmCustomerLimitConfigApi.CustomerLimitConfig>,

View File

@ -52,7 +52,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmCustomerApi.Customer>,

View File

@ -132,7 +132,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
},
} as VxeTableGridOptions<CrmFollowUpApi.FollowUpRecord>,
});

View File

@ -169,7 +169,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
isHover: true,
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmPermissionApi.Permission>,

View File

@ -90,7 +90,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
},
treeConfig: {
parentField: 'parentId',

View File

@ -94,7 +94,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmProductApi.Product>,

View File

@ -42,7 +42,7 @@ const [Grid] = useVbenVxeGrid({
},
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
keepSource: true,

View File

@ -66,7 +66,7 @@ function handleUpdateValue(row: any) {
} else {
tableData.value[index] = row;
}
emit('update:products', tableData.value);
emit('update:products', [...tableData.value]);
}
/** 表格配置 */

View File

@ -134,7 +134,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmReceivableApi.Receivable>,

View File

@ -91,7 +91,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmReceivableApi.Receivable>,

View File

@ -113,7 +113,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
keyField: 'id',
},
toolbarConfig: {
refresh: { code: 'query' },
refresh: true,
search: true,
},
} as VxeTableGridOptions<CrmReceivablePlanApi.Plan>,

Some files were not shown because too many files have changed in this diff Show More