diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml
index 5321a160..7208b340 100644
--- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml
+++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml
@@ -261,6 +261,12 @@
+
+
+ 全查
+
+
+
增
diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/ERP/UnitController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/ERP/UnitController.cs
index ae3fccb5..c8180bab 100644
--- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/ERP/UnitController.cs
+++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/ERP/UnitController.cs
@@ -40,6 +40,17 @@ namespace Yi.Framework.ApiMicroservice.Controllers.ERP
return Result.Success().SetData(result);
}
+ ///
+ /// 全查
+ ///
+ ///
+ [HttpGet]
+ public async Task GetList()
+ {
+ var result = await _unitService.GetListAsync();
+ return Result.Success().SetData(result);
+ }
+
///
/// 增
///
diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db
index 340aacc0..86af01f9 100644
Binary files a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db differ
diff --git a/Yi.Framework.Net6/Yi.Framework.Interface/Base/Crud/IReadOnlyAppService.cs b/Yi.Framework.Net6/Yi.Framework.Interface/Base/Crud/IReadOnlyAppService.cs
index 3efb6568..b6aa1461 100644
--- a/Yi.Framework.Net6/Yi.Framework.Interface/Base/Crud/IReadOnlyAppService.cs
+++ b/Yi.Framework.Net6/Yi.Framework.Interface/Base/Crud/IReadOnlyAppService.cs
@@ -21,6 +21,11 @@ namespace Yi.Framework.Interface.Base.Crud
///
Task GetByIdAsync(TKey id);
+ ///
+ /// 获取全部
+ ///
+ ///
+ Task> GetListAsync();
///
/// 根据url参数查询
diff --git a/Yi.Framework.Net6/Yi.Framework.Service/Base/Crud/AbstractKeyReadOnlyAppService.cs b/Yi.Framework.Net6/Yi.Framework.Service/Base/Crud/AbstractKeyReadOnlyAppService.cs
index c1a06c8d..b97b0cfb 100644
--- a/Yi.Framework.Net6/Yi.Framework.Service/Base/Crud/AbstractKeyReadOnlyAppService.cs
+++ b/Yi.Framework.Net6/Yi.Framework.Service/Base/Crud/AbstractKeyReadOnlyAppService.cs
@@ -36,6 +36,13 @@ namespace Yi.Framework.Service.Base.Crud
protected IRepository Repository { get; set; }
+ public async Task> GetListAsync()
+ {
+ var entitys = await Repository.GetListAsync();
+ var entityDtos = await MapToGetListOutputDtosAsync(entitys);
+ return entityDtos;
+ }
+
public async Task GetByIdAsync(TKey id)
{
var entity = await GetEntityByIdAsync(id);
diff --git a/Yi.Vue3.x.RuoYi/src/api/erp/unitApi.js b/Yi.Vue3.x.RuoYi/src/api/erp/unitApi.js
index f0d14c0f..ca925c04 100644
--- a/Yi.Vue3.x.RuoYi/src/api/erp/unitApi.js
+++ b/Yi.Vue3.x.RuoYi/src/api/erp/unitApi.js
@@ -1,5 +1,13 @@
import request from '@/utils/request'
+// 全查询
+export function allData() {
+ return request({
+ url: '/unit/getList',
+ method: 'get'
+ })
+}
+
// 分页查询
export function listData(query) {
return request({
diff --git a/Yi.Vue3.x.RuoYi/src/views/ERP/material/index.vue b/Yi.Vue3.x.RuoYi/src/views/ERP/material/index.vue
index dc2d6c31..78b54705 100644
--- a/Yi.Vue3.x.RuoYi/src/views/ERP/material/index.vue
+++ b/Yi.Vue3.x.RuoYi/src/views/ERP/material/index.vue
@@ -122,8 +122,12 @@
-
-
+
+
+ {{ scope.row.unitName }}
+
+
+