Browse Source

整改

master
Yanko 3 months ago
parent
commit
f25d3eb85a
77 changed files with 2608 additions and 1900 deletions
  1. +7
    -1
      backend/BPA.MES.Base.Application/BPA.MES.Base.Application.csproj
  2. +342
    -0
      backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml
  3. +17
    -0
      backend/BPA.MES.Base.Application/Const/ModeEnum.cs
  4. +4
    -0
      backend/BPA.MES.Base.Application/Entitys/Base/FinalLineEntity.cs
  5. +6
    -1
      backend/BPA.MES.Base.Application/Entitys/Base/FinalMaterialEntity.cs
  6. +22
    -0
      backend/BPA.MES.Base.Application/Entitys/Base/GodownEntity.cs
  7. +19
    -0
      backend/BPA.MES.Base.Application/Entitys/Base/MaterialGodownEntity.cs
  8. +8
    -0
      backend/BPA.MES.Base.Application/Services/DeviceService/Dtos/DevicesInfoDto.cs
  9. +38
    -0
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalCraftStepsDto.cs
  10. +7
    -1
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalMaterialDto.cs
  11. +14
    -0
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalsInfoDto.cs
  12. +43
    -23
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalCraftStepsService.cs
  13. +1
    -0
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalMaterialService.cs
  14. +39
    -11
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalsInfoService.cs
  15. +6
    -0
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/IFinalCraftStepsService.cs
  16. +12
    -0
      backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/IFinalsInfoService.cs
  17. +80
    -0
      backend/BPA.MES.Base.Application/Services/GodownService/Dtos/GodownDto.cs
  18. +12
    -0
      backend/BPA.MES.Base.Application/Services/GodownService/Dtos/GodownMaterialDto.cs
  19. +119
    -0
      backend/BPA.MES.Base.Application/Services/GodownService/Services/GodownService.cs
  20. +48
    -0
      backend/BPA.MES.Base.Application/Services/GodownService/Services/IGodownService.cs
  21. +0
    -110
      backend/BPA.MES.Base.Application/Services/ProcessEntity/Services/ProcessService.cs
  22. +0
    -0
      backend/BPA.MES.Base.Application/Services/ProcessService/Dtos/ProcessDto.cs
  23. +0
    -0
      backend/BPA.MES.Base.Application/Services/ProcessService/Services/IProcessService.cs
  24. +110
    -0
      backend/BPA.MES.Base.Application/Services/ProcessService/Services/ProcessService.cs
  25. +6
    -0
      backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineStepsDto.cs
  26. +15
    -1
      backend/BPA.MES.Base.Application/Services/ProductLineService/Services/ProductLineStepsService.cs
  27. +2
    -0
      backend/BPA.MES.Base.Application/Services/StockInfoService/Services/StockInfoService.cs
  28. +3
    -1
      frontend/config/config.ts
  29. +6
    -4
      frontend/config/defaultSettings.ts
  30. +4
    -3
      frontend/config/routes.ts
  31. +0
    -519
      frontend/dist/550.cc113611.async.js
  32. +0
    -6
      frontend/dist/635.dbb47eab.async.js
  33. +0
    -82
      frontend/dist/865.ae9bc490.async.js
  34. +3
    -3
      frontend/dist/index.html
  35. +0
    -1
      frontend/dist/p__deviceInfo__index.ff2808b7.async.js
  36. +0
    -2
      frontend/dist/p__deviceProductInfo__index.9784ccc7.async.js
  37. +0
    -1
      frontend/dist/p__dict__index.3a14b6d6.async.js
  38. +0
    -1
      frontend/dist/p__final__index.6d9a57bd.async.js
  39. +0
    -1
      frontend/dist/p__final__index.f7556106.chunk.css
  40. +0
    -1
      frontend/dist/p__materials__index.9e28bf84.async.js
  41. +0
    -1
      frontend/dist/p__plantModel__process.e9f8524e.async.js
  42. +0
    -1
      frontend/dist/p__productLine__line.d126ca9b.async.js
  43. +0
    -1
      frontend/dist/p__system__module__index.4ef32e9c.async.js
  44. +0
    -1
      frontend/dist/p__system__role__index.6ae92abd.async.js
  45. +0
    -1
      frontend/dist/p__system__user__index.7a86743e.async.js
  46. +0
    -1
      frontend/dist/p__workInfo__index.73e1915b.async.js
  47. +0
    -1
      frontend/dist/p__workInfo__plan.dabb6134.async.js
  48. +0
    -1
      frontend/dist/preload_helper.2ccfcf55.js
  49. +0
    -1
      frontend/dist/t__plugin-layout__Layout.bb77edb1.async.js
  50. +0
    -301
      frontend/dist/umi.244e5279.js
  51. +0
    -1
      frontend/dist/umi.54f62417.css
  52. +1
    -1
      frontend/src/api/deviceInfo/dtos/deviceProduct.d.ts
  53. +8
    -2
      frontend/src/api/finalCraftSteps/service.ts
  54. +1
    -0
      frontend/src/api/finalMaterial/dto.d.ts
  55. +12
    -0
      frontend/src/api/finalService.ts
  56. +63
    -0
      frontend/src/api/godown/dto.d.ts
  57. +83
    -0
      frontend/src/api/godown/service.ts
  58. +2
    -1
      frontend/src/api/productlinesteps/dto.d.ts
  59. +40
    -30
      frontend/src/app.tsx
  60. +0
    -1
      frontend/src/components/HeaderRight/index.less
  61. +48
    -2
      frontend/src/global.less
  62. +1
    -1
      frontend/src/global.tsx
  63. +13
    -4
      frontend/src/pages/deviceInfo/index.tsx
  64. +69
    -33
      frontend/src/pages/deviceProductInfo/index.tsx
  65. +22
    -11
      frontend/src/pages/dict/index.tsx
  66. +73
    -7
      frontend/src/pages/final/index.less
  67. +650
    -460
      frontend/src/pages/final/index.tsx
  68. +198
    -0
      frontend/src/pages/godown/index.tsx
  69. +13
    -3
      frontend/src/pages/materials/index.tsx
  70. +132
    -129
      frontend/src/pages/plantModel/process.tsx
  71. +21
    -34
      frontend/src/pages/productLine/line.tsx
  72. +15
    -18
      frontend/src/pages/stock/index.tsx
  73. +10
    -0
      frontend/src/pages/system/module/index.tsx
  74. +10
    -0
      frontend/src/pages/system/role/index.tsx
  75. +124
    -78
      frontend/src/pages/system/user/index.tsx
  76. +2
    -0
      frontend/src/types/Crafts.d.ts
  77. +4
    -1
      frontend/src/types/FinalInfo.d.ts

+ 7
- 1
backend/BPA.MES.Base.Application/BPA.MES.Base.Application.csproj View File

@@ -9,6 +9,13 @@
</PropertyGroup>


<ItemGroup>
<Compile Remove="Services\CustomCodeService\**" />
<EmbeddedResource Remove="Services\CustomCodeService\**" />
<None Remove="Services\CustomCodeService\**" />
</ItemGroup>


<ItemGroup>
<None Remove="applicationsettings.json" />
<None Remove="BPA.MES.Base.Application.xml" />
@@ -29,7 +36,6 @@
<Folder Include="Services\DeviceService\" />
<Folder Include="Services\MaterialService\" />
<Folder Include="Services\RecipesService\" />
<Folder Include="Services\CustomCodeService\" />
</ItemGroup>

<ItemGroup>


+ 342
- 0
backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml View File

@@ -130,6 +130,21 @@
工艺状态
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Const.ModeEnum">
<summary>
配料方式
</summary>
</member>
<member name="F:BPA.MES.Base.Application.Const.ModeEnum.Device">
<summary>
设备
</summary>
</member>
<member name="F:BPA.MES.Base.Application.Const.ModeEnum.Other">
<summary>
其他
</summary>
</member>
<member name="F:BPA.MES.Base.Application.Const.OrderStatusEnum.NotStarted">
<summary>
未开始
@@ -973,6 +988,11 @@
产线Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.FinalLineEntity.Status">
<summary>
状态 0:未设置,1:已设置
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Entitys.FinalMaterialEntity">
<summary>
成品配方
@@ -983,6 +1003,11 @@
物料Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.FinalMaterialEntity.Mode">
<summary>
操作方式
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.FinalMaterialEntity.FinalId">
<summary>
配方Id
@@ -1003,6 +1028,26 @@
误差
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Entitys.GodownEntity">
<summary>
料仓管理
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.GodownEntity.Name">
<summary>
料仓名称
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.GodownEntity.Code">
<summary>
料仓编码
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.GodownEntity.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Entitys.GroupInfoEntity">
<summary>
名 称 :分组信息
@@ -1021,6 +1066,21 @@
介绍
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Entitys.MaterialGodownEntity">
<summary>
料仓物料管理
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.MaterialGodownEntity.Code">
<summary>
料仓编码
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.MaterialGodownEntity.MaterialId">
<summary>
物料
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Entitys.MQTTInfoEntity">
<summary>
名 称 :
@@ -4188,6 +4248,16 @@
主键
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.DevicesInfoOutput.DeviceId">
<summary>
设备Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.DevicesInfoOutput.Status">
<summary>
配置
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.DeviceRecipeService">
<summary>
名 称 :设备服务
@@ -4961,6 +5031,51 @@
产线工序名称
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.FinalCraftStepsOutput.ParamsValue">
<summary>
参数预览
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.FinalCraftStepsOutput.DeviceFunParams">
<summary>
设备参数
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.FinalCraftStepsOutput.DeviceStepParms">
<summary>
设备设置参数
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.CopyFinalCraftStepsInput">
<summary>
复制输入参数
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.CopyFinalCraftStepsInput.FinalId">
<summary>
成品Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.CopyFinalCraftStepsInput.LineId">
<summary>
工艺Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.CopyFinalCraftStepsInput.CopyDeviceId">
<summary>
设备Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.CopyFinalCraftStepsInput.ProductLineStepsId">
<summary>
步骤Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.CopyFinalCraftStepsInput.ToDeviceId">
<summary>
复制到新的设备
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.FinalMaterialDto">
<summary>
名 称 :配方物料Dto类
@@ -4989,6 +5104,11 @@
描述
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.FinalMaterialDto.Mode">
<summary>
配料方式
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.FinalMaterialDto.ErrorWeight">
<summary>
误差
@@ -5162,6 +5282,21 @@
产线Id
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.SaveFinalConfigStatusInput">
<summary>
保存成品状态
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.SaveFinalConfigStatusInput.FinalId">
<summary>
保存成品Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.SaveFinalConfigStatusInput.LineId">
<summary>
保存
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.FinalCraftStepsService">
<summary>
名 称 :工艺路线服务
@@ -5229,6 +5364,13 @@
<param name="inputs"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.FinalCraftStepsService.CopyFinalCraftSteps(BPA.MES.Base.Application.Services.CopyFinalCraftStepsInput)">
<summary>
复制设备的工艺步骤信息
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:BPA.MES.Base.Application.Services.FinalMaterialService">
<summary>
名 称 :配方物料服务
@@ -5364,6 +5506,20 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.FinalsInfoService.SaveConfigStatus(BPA.MES.Base.Application.Services.SaveFinalConfigStatusInput)">
<summary>
保存产线配置
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.FinalsInfoService.CancelConfigStatus(BPA.MES.Base.Application.Services.SaveFinalConfigStatusInput)">
<summary>
保存产线配置
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:BPA.MES.Base.Application.Services.IFinalCraftStepsService">
<summary>
名 称 :产线管理
@@ -5422,6 +5578,13 @@
<param name="Id"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IFinalCraftStepsService.CopyFinalCraftSteps(BPA.MES.Base.Application.Services.CopyFinalCraftStepsInput)">
<summary>
复制设备的工艺步骤信息
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:BPA.MES.Base.Application.Services.IFinalMaterialService">
<summary>
名 称 :成品配方物料服务
@@ -5539,6 +5702,180 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IFinalsInfoService.SaveConfigStatus(BPA.MES.Base.Application.Services.SaveFinalConfigStatusInput)">
<summary>
保存配置状态
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IFinalsInfoService.CancelConfigStatus(BPA.MES.Base.Application.Services.SaveFinalConfigStatusInput)">
<summary>
取消配置状态
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="P:BPA.MES.Base.Application.Services.GodownDto.Name">
<summary>
料仓名称
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.GodownDto.Code">
<summary>
料仓编码
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.GodownAddInput">
<summary>
增加
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.GodownUpdateInput">
<summary>
更新
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.GodownUpdateInput.Id">
<summary>
主键
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.GodownDelInput">
<summary>
删除
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.GodownDelInput.Id">
<summary>
主键
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.GodownQueryInput">
<summary>
不分页
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.GodownQueryPageInput">
<summary>
分页
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.GodownQueryPageInput.Name">
<summary>
名称
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.GodownQueryPageInput.Code">
<summary>
编码
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.GodownOutput">
<summary>
输出
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.GodownOutput.Id">
<summary>
主键
</summary>
</member>
<!-- Badly formed XML comment ignored for member "T:BPA.MES.Base.Application.Services.GodownService" -->
<member name="M:BPA.MES.Base.Application.Services.GodownService.Add(BPA.MES.Base.Application.Services.GodownAddInput)">
<summary>
增加
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.GodownService.Del(BPA.MES.Base.Application.Services.GodownDelInput)">
<summary>
删除
</summary>
<param name="input"></param>
<returns></returns>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:BPA.MES.Base.Application.Services.GodownService.Detail(System.String)">
<summary>
详情
</summary>
<param name="Id"></param>
<returns></returns>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:BPA.MES.Base.Application.Services.GodownService.List(BPA.MES.Base.Application.Services.GodownQueryInput)">
<summary>
列表
</summary>
<returns></returns>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:BPA.MES.Base.Application.Services.GodownService.PagedList(BPA.MES.Base.Application.Services.GodownQueryPageInput)">
<summary>
分页
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.GodownService.Update(BPA.MES.Base.Application.Services.GodownUpdateInput)">
<summary>
更新
</summary>
<param name="input"></param>
<returns></returns>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:BPA.MES.Base.Application.Services.GodownService.SelectList">
<summary>
下拉
</summary>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IGodownService.Add(BPA.MES.Base.Application.Services.GodownAddInput)">
<summary>
增加
</summary>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IGodownService.Del(BPA.MES.Base.Application.Services.GodownDelInput)">
<summary>
移除
</summary>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IGodownService.Update(BPA.MES.Base.Application.Services.GodownUpdateInput)">
<summary>
更新
</summary>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IGodownService.List(BPA.MES.Base.Application.Services.GodownQueryInput)">
<summary>
不分页列表
</summary>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IGodownService.PagedList(BPA.MES.Base.Application.Services.GodownQueryPageInput)">
<summary>
分页列表
</summary>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IGodownService.Detail(System.String)">
<summary>
查询单条
</summary>
<param name="Id"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.Services.IGodownService.SelectList">
<summary>
下拉列表
</summary>
<returns></returns>
</member>
<member name="T:BPA.MES.Base.Application.Services.ICRUDService">
<summary>
名 称 :
@@ -7322,6 +7659,11 @@
产线Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Services.ProductLineStepsQueryInput.FinalId">
<summary>
产品Id
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Services.ProductLineStepsOutput">
<summary>
输出


+ 17
- 0
backend/BPA.MES.Base.Application/Const/ModeEnum.cs View File

@@ -0,0 +1,17 @@
namespace BPA.MES.Base.Application.Const
{
/// <summary>
/// 配料方式
/// </summary>
public enum ModeEnum
{
/// <summary>
/// 设备
/// </summary>
Device = 0,
/// <summary>
/// 其他
/// </summary>
Other=1
}
}

+ 4
- 0
backend/BPA.MES.Base.Application/Entitys/Base/FinalLineEntity.cs View File

@@ -14,6 +14,10 @@
/// 产线Id
/// </summary>
public string LineId { get; set; }
/// <summary>
/// 状态 0:未设置,1:已设置
/// </summary>
public string Status { get; set; }

}
}

+ 6
- 1
backend/BPA.MES.Base.Application/Entitys/Base/FinalMaterialEntity.cs View File

@@ -1,4 +1,5 @@
using System;
using BPA.MES.Base.Application.Const;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -17,6 +18,10 @@ namespace BPA.MES.Base.Application.Entitys
/// </summary>
public string MaterialId { get; set; }
/// <summary>
/// 操作方式
/// </summary>
public ModeEnum Mode { get; set; }
/// <summary>
/// 配方Id
/// </summary>
public string FinalId { get; set; }


+ 22
- 0
backend/BPA.MES.Base.Application/Entitys/Base/GodownEntity.cs View File

@@ -0,0 +1,22 @@
namespace BPA.MES.Base.Application.Entitys
{
/// <summary>
/// 料仓管理
/// </summary>
[SugarTable("godown")]
public class GodownEntity : DEntityBase
{
/// <summary>
/// 料仓名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 料仓编码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}

+ 19
- 0
backend/BPA.MES.Base.Application/Entitys/Base/MaterialGodownEntity.cs View File

@@ -0,0 +1,19 @@
namespace BPA.MES.Base.Application.Entitys
{
/// <summary>
/// 料仓物料管理
/// </summary>
[SugarTable("godown_material")]
public class MaterialGodownEntity : DEntityBase
{
/// <summary>
/// 料仓编码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 物料
/// </summary>
public string MaterialId { get; set; }

}
}

+ 8
- 0
backend/BPA.MES.Base.Application/Services/DeviceService/Dtos/DevicesInfoDto.cs View File

@@ -84,5 +84,13 @@
/// 主键
/// </summary>
public string Id { get; set; }
/// <summary>
/// 设备Id
/// </summary>
public string DeviceId { get; set; }
/// <summary>
/// 配置
/// </summary>
public string Status { get; set; }
}
}

+ 38
- 0
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalCraftStepsDto.cs View File

@@ -139,5 +139,43 @@
/// 产线工序名称
/// </summary>
public string ProductLineStepsName { get; set; }
/// <summary>
/// 参数预览
/// </summary>
public string ParamsValue { get; set; }
/// <summary>
/// 设备参数
/// </summary>
public string DeviceFunParams { get; set; }
/// <summary>
/// 设备设置参数
/// </summary>
public string DeviceStepParms { get; set; }
}
/// <summary>
/// 复制输入参数
/// </summary>
public class CopyFinalCraftStepsInput
{
/// <summary>
/// 成品Id
/// </summary>
public string FinalId { get; set; }
/// <summary>
/// 工艺Id
/// </summary>
public string LineId { get; set; }
/// <summary>
/// 设备Id
/// </summary>
public string CopyDeviceId { get; set; }
/// <summary>
/// 步骤Id
/// </summary>
public string ProductLineStepsId { get; set; }
/// <summary>
/// 复制到新的设备
/// </summary>
public string ToDeviceId { get; set; }
}
}

+ 7
- 1
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalMaterialDto.cs View File

@@ -1,4 +1,6 @@
namespace BPA.MES.Base.Application.Services
using BPA.MES.Base.Application.Const;

namespace BPA.MES.Base.Application.Services
{
/// <summary>
/// 名 称 :配方物料Dto类
@@ -25,6 +27,10 @@
/// </summary>
public string Describe { get; set; }
/// <summary>
/// 配料方式
/// </summary>
public string Mode { get; set; }
/// <summary>
/// 误差
/// </summary>
public string ErrorWeight { get; set; }


+ 14
- 0
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Dtos/FinalsInfoDto.cs View File

@@ -100,4 +100,18 @@
/// </summary>
public string[] LineId { get; set; }
}
/// <summary>
/// 保存成品状态
/// </summary>
public class SaveFinalConfigStatusInput
{
/// <summary>
/// 保存成品Id
/// </summary>
public string FinalId { get; set; }
/// <summary>
/// 保存
/// </summary>
public string LineId { get; set; }
}
}

+ 43
- 23
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalCraftStepsService.cs View File

@@ -1,4 +1,5 @@
using ServiceStack;
using Yitter.IdGenerator;

namespace BPA.MES.Base.Application.Services
{
@@ -24,15 +25,16 @@ namespace BPA.MES.Base.Application.Services
[HttpPost]
public async Task<bool> Add(FinalCraftStepsAddInput input)
{
var step = await _dbContext.Queryable<FinalCraftStepsEntity>().Where(x=>x.FinalId==input.FinalId
&& x.ProductLineStepsId == input.ProductLineStepsId
&& x.DeviceId == input.DeviceId
&& x.LineId == input.LineId
).MaxAsync(x => x.Step);
var deviceInfo = await _dbContext.Queryable<Pztj_DevicesInfoEntity>().Where(x => x.Id==input.DeviceId).FirstAsync();
var LineInfo = await _dbContext.Queryable<ProductLineStepsEntity>().Where(x=>x.Id==input.ProductLineStepsId).FirstAsync();


var deviceInfo = await _dbContext.Queryable<Pztj_DevicesInfoEntity>().Where(x => x.Code==input.DeviceId).FirstAsync();
var LineInfo = await _dbContext.Queryable<ProductLineStepsEntity>().Where(x => x.Id==input.ProductLineStepsId).FirstAsync();
FinalCraftStepsEntity entity = input.Adapt<FinalCraftStepsEntity>();
var step = await _dbContext.Queryable<FinalCraftStepsEntity>().Where(x => x.FinalId==input.FinalId
&& x.ProductLineStepsId == input.ProductLineStepsId
&& x.DeviceId == input.DeviceId
&& x.LineId == LineInfo.LineId
).MaxAsync(x => x.Step);
entity.Step = step+1;
entity.LineId = LineInfo.LineId;
return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync();
@@ -46,13 +48,13 @@ namespace BPA.MES.Base.Application.Services
[HttpPost]
public async Task<bool> Del(FinalCraftStepsDelInput input)
{
var stepItem = await _dbContext.Queryable<FinalCraftStepsEntity>().Where(x => x.Id == input.Id).FirstAsync();
var stepItem = await _dbContext.Queryable<FinalCraftStepsEntity>().Where(x => x.Id == input.Id).FirstAsync();
string finalId = stepItem.FinalId;
int step = stepItem.Step;
var res = await _dbContext.Deleteable<FinalCraftStepsEntity>().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync();
if (res)
{
var stepList = await _dbContext.Queryable<FinalCraftStepsEntity>().Where(x => x.FinalId == finalId ).OrderBy(x=>x.Step).ToListAsync();
var stepList = await _dbContext.Queryable<FinalCraftStepsEntity>().Where(x => x.FinalId == finalId).OrderBy(x => x.Step).ToListAsync();
for (int i = 0; i < stepList.Count; i++)
{
stepList[i].Step = i + 1;
@@ -84,13 +86,13 @@ namespace BPA.MES.Base.Application.Services
{
var output = await _dbContext.Queryable<FinalCraftStepsEntity>()
.LeftJoin<DeviceProductFunctionEntity>((a, b) => a.DeviceProductFunctionId==b.Id)
.LeftJoin<Pztj_DevicesInfoEntity>((a, b, c) => a.DeviceId==c.Id)
.LeftJoin<Pztj_DevicesInfoEntity>((a, b, c) => a.DeviceId==c.Code)
.LeftJoin<DeviceProductEntity>((a, b, c, d) => c.DeviceType==d.Id)
.LeftJoin<ProductLineStepsEntity>((a,b,c,d,e)=>a.ProductLineStepsId==e.Id)
.LeftJoin<ProcessEntity>((a,b,c,d,e,f)=>e.ProcessId==f.Id)
.LeftJoin<ProductLineStepsEntity>((a, b, c, d, e) => a.ProductLineStepsId==e.Id)
.LeftJoin<ProcessEntity>((a, b, c, d, e, f) => e.ProcessId==f.Id)
.WhereIF(!string.IsNullOrEmpty(input.FinalId), (a, b, c, d) => a.FinalId == input.FinalId)
.WhereIF(!string.IsNullOrEmpty(input.LineId), (a, b, c, d) => a.LineId == input.LineId)
.WhereIF(!string.IsNullOrEmpty(input.DeviceId),(a,b,c,d)=>a.DeviceId == input.DeviceId)
.WhereIF(!string.IsNullOrEmpty(input.DeviceId), (a, b, c, d) => c.Code == input.DeviceId)
.WhereIF(!string.IsNullOrEmpty(input.ProductLineStepsId), (a, b, c, d) => a.ProductLineStepsId == input.ProductLineStepsId)
.OrderBy((a, b, c, d) => a.Step)
.Select((a, b, c, d, e, f) => new FinalCraftStepsOutput
@@ -102,9 +104,9 @@ namespace BPA.MES.Base.Application.Services
DeviceTypeName = d.Name,
DeviceName = c.Name,
ProductLineStepsName = f.Name,

DeviceFunParams = b.Params,
DeviceStepParms = a.Params
}).ToListAsync();

return output;
}
/// <summary>
@@ -116,15 +118,15 @@ namespace BPA.MES.Base.Application.Services
public async Task<SqlSugarPagedList<FinalCraftStepsOutput>> PagedList(FinalCraftStepsQueryPageInput input)
{
var output = await _dbContext.Queryable<FinalCraftStepsEntity>()
.LeftJoin<DeviceProductFunctionEntity>((a,b)=>a.DeviceProductFunctionId==b.Id)
.LeftJoin<DeviceProductFunctionEntity>((a, b) => a.DeviceProductFunctionId==b.Id)
.WhereIF(!string.IsNullOrEmpty(input.FinalId), (a, b) => a.FinalId == input.FinalId)
.OrderBy((a, b) => a.Step)
.Select((a,b)=>new FinalCraftStepsOutput
.Select((a, b) => new FinalCraftStepsOutput
{
Id = a.Id.SelectAll(),
DeviceProductFunctionName = b.Name,
DeviceProductFunctionId = a.DeviceProductFunctionId,
DeviceProductId = b.DeviceProductId
Id = a.Id.SelectAll(),
DeviceProductFunctionName = b.Name,
DeviceProductFunctionId = a.DeviceProductFunctionId,
DeviceProductId = b.DeviceProductId
})
.ToPagedListAsync(input.PageIndex, input.PageSize);
return output;
@@ -154,7 +156,7 @@ namespace BPA.MES.Base.Application.Services
public async Task<bool> Update(FinalCraftStepsUpdateInput input)
{
FinalCraftStepsEntity entity = input.Adapt<FinalCraftStepsEntity>();
var res = await _dbContext.Updateable(entity).IgnoreColumns(it => it.Step).IgnoreColumns(it=>it.DeviceId).IgnoreColumns(true).ExecuteCommandHasChangeAsync();
var res = await _dbContext.Updateable(entity).IgnoreColumns(it => it.Step).IgnoreColumns(it => it.DeviceId).IgnoreColumns(true).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>
@@ -169,6 +171,24 @@ namespace BPA.MES.Base.Application.Services
var res = await _dbContext.Updateable(entity).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>
/// 复制设备的工艺步骤信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<bool> CopyFinalCraftSteps(CopyFinalCraftStepsInput input)
{
var m_entity = await _dbContext.Queryable<FinalCraftStepsEntity>()
.Where(x => x.FinalId==input.FinalId && x.DeviceId==input.CopyDeviceId&&x.ProductLineStepsId==input.ProductLineStepsId&&x.LineId==input.LineId).ToListAsync();
foreach (var entity in m_entity)
{
entity.DeviceId = input.ToDeviceId;
entity.Id = YitIdHelper.NextId().ToString();
}
var res = await _dbContext.Insertable(m_entity).ExecuteCommandIdentityIntoEntityAsync();
return res;
}
}
}


+ 1
- 0
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalMaterialService.cs View File

@@ -95,6 +95,7 @@
MaterialId = b.Id,
FinalId = a.FinalId,
RecipesName = b.Name,
Mode = a.Mode.ToString(),
ErrorWeight = a.ErrorWeight,
Weight = a.Weight
})


+ 39
- 11
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/FinalsInfoService.cs View File

@@ -57,7 +57,7 @@ namespace BPA.MES.Base.Application.Services
FinalsInfoOutput output = entity.Adapt<FinalsInfoOutput>();
return output;
}
/// <summary>
/// 列表
/// </summary>
@@ -79,9 +79,9 @@ namespace BPA.MES.Base.Application.Services
public async Task<SqlSugarPagedList<FinalsInfoOutput>> PagedList(FinalsInfoQueryPageInput input)
{
var output = await _dbContext.Queryable<Pztj_FinalsInfoEntity>()
.WhereIF(!string.IsNullOrEmpty(input.Name),a=>a.Name.Contains(input.Name))
.WhereIF(!string.IsNullOrEmpty(input.Name), a => a.Name.Contains(input.Name))
.WhereIF(!string.IsNullOrEmpty(input.Code), a => a.Code.Contains(input.Code))
.Select((a)=> new FinalsInfoOutput
.Select((a) => new FinalsInfoOutput
{
Id = a.Id.SelectAll()
})
@@ -117,13 +117,14 @@ namespace BPA.MES.Base.Application.Services
public async Task<dynamic> LineList(string finalId)
{
var entity = await _dbContext.Queryable<FinalLineEntity>()
.LeftJoin<ProductLineEntity>((a,b)=>a.LineId==b.Id)
.Where((a,b)=>a.FinalId == finalId)
.LeftJoin<ProductLineEntity>((a, b) => a.LineId==b.Id)
.Where((a, b) => a.FinalId == finalId)
.Select((a, b) => new
{
key = a.LineId,
value = b.Name
}).ToListAsync();
{
key = a.LineId,
value = b.Name,
status = a.Status
}).ToListAsync();
return entity;
}
/// <summary>
@@ -135,8 +136,13 @@ namespace BPA.MES.Base.Application.Services
[HttpPost]
public async Task<bool> Update(FinalsInfoUpdateInput input)
{
Pztj_FinalsInfoEntity entity = input.Adapt<Pztj_FinalsInfoEntity>();
var res = await _dbContext.Updateable(entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync();
var entity = await _dbContext.Queryable<Pztj_FinalsInfoEntity>().FirstAsync(x => x.Id != input.Id && x.Name == input.Name);
if (entity != null)
{
throw Oops.Bah("名称已存在!");
}
Pztj_FinalsInfoEntity r_entity = input.Adapt<Pztj_FinalsInfoEntity>();
var res = await _dbContext.Updateable(r_entity).IgnoreColumns(true).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>
@@ -171,6 +177,28 @@ namespace BPA.MES.Base.Application.Services
}
return result;
}
/// <summary>
/// 保存产线配置
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<bool> SaveConfigStatus(SaveFinalConfigStatusInput input)
{
var result = await _dbContext.Updateable<FinalLineEntity>().SetColumns(x=>x.Status=="1").Where(x => x.FinalId == input.FinalId && x.LineId==input.LineId).ExecuteCommandHasChangeAsync();
return result;
}
/// <summary>
/// 保存产线配置
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<bool> CancelConfigStatus(SaveFinalConfigStatusInput input)
{
var result = await _dbContext.Updateable<FinalLineEntity>().SetColumns(x => x.Status=="0").Where(x => x.FinalId == input.FinalId && x.LineId==input.LineId).ExecuteCommandHasChangeAsync();
return result;
}
}
}


+ 6
- 0
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/IFinalCraftStepsService.cs View File

@@ -50,5 +50,11 @@
/// <param name="Id"></param>
/// <returns></returns>
Task<FinalCraftStepsOutput> Detail(string Id);
/// <summary>
/// 复制设备的工艺步骤信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<bool> CopyFinalCraftSteps(CopyFinalCraftStepsInput input);
}
}

+ 12
- 0
backend/BPA.MES.Base.Application/Services/FinalsInfoService/Services/IFinalsInfoService.cs View File

@@ -56,6 +56,18 @@
/// <param name="input"></param>
/// <returns></returns>
Task<bool> BindLine(BindLineInput input);
/// <summary>
/// 保存配置状态
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<bool> SaveConfigStatus(SaveFinalConfigStatusInput input);
/// <summary>
/// 取消配置状态
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<bool> CancelConfigStatus(SaveFinalConfigStatusInput input);
}
}


+ 80
- 0
backend/BPA.MES.Base.Application/Services/GodownService/Dtos/GodownDto.cs View File

@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.MES.Base.Application.Services
{
public class GodownDto
{
/// <summary>
/// 料仓名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 料仓编码
/// </summary>
public string Code { get; set; }

}
/// <summary>
/// 增加
/// </summary>
public class GodownAddInput : GodownDto
{

}
/// <summary>
/// 更新
/// </summary>
public class GodownUpdateInput : GodownDto
{
/// <summary>
/// 主键
/// </summary>
public string Id { get; set; }
}
/// <summary>
/// 删除
/// </summary>
public class GodownDelInput
{
/// <summary>
/// 主键
/// </summary>
public string Id { get; set; }
}
/// <summary>
/// 不分页
/// </summary>
public class GodownQueryInput
{

}
/// <summary>
/// 分页
/// </summary>
public class GodownQueryPageInput : RequestPage
{
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 编码
/// </summary>
public string Code { get; set; }
}
/// <summary>
/// 输出
/// </summary>
public class GodownOutput : GodownDto
{
/// <summary>
/// 主键
/// </summary>
public string Id { get; set; }

}
}

+ 12
- 0
backend/BPA.MES.Base.Application/Services/GodownService/Dtos/GodownMaterialDto.cs View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.MES.Base.Application.Services
{
internal class GodownMaterialDto
{
}
}

+ 119
- 0
backend/BPA.MES.Base.Application/Services/GodownService/Services/GodownService.cs View File

@@ -0,0 +1,119 @@
namespace BPA.MES.Base.Application.Services
{
/// <summary>
/// 名 称 :料仓
/// 创 建 人 :yangxiao
/// 创建时间 :2023/8/21 11:02:36
/// 描 述 :
[ApiDescriptionSettings("料仓管理", Name = "Godown", Tag = "料仓管理", KeepName = true, SplitCamelCase = true, KeepVerb = true)]
public class GodownService : IGodownService, ITransient, IDynamicApiController
{
private readonly ISqlSugarClient _dbContext;
public GodownService(ISqlSugarClient db)
{
_dbContext = db;
}
/// <summary>
/// 增加
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<bool> Add(GodownAddInput input)
{
var r_entity = await _dbContext.Queryable<GodownEntity>().FirstAsync(x => x.Code == input.Code);
if (r_entity != null)
{
throw Oops.Bah("编码已存在!");
}
GodownEntity entity = input.Adapt<GodownEntity>();
return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync();
}
/// <summary>
/// 删除
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<bool> Del(GodownDelInput input)
{
var res = await _dbContext.Deleteable<GodownEntity>().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpGet]
public async Task<GodownOutput> Detail(string Id)
{
var entity = await _dbContext.Queryable<GodownEntity>().FirstAsync(x => x.Id == Id);
GodownOutput output = entity.Adapt<GodownOutput>();
return output;
}
/// <summary>
/// 列表
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<List<GodownOutput>> List(GodownQueryInput input)
{
var entity = await _dbContext.Queryable<GodownEntity>().ToListAsync();
List<GodownOutput> output = entity.Adapt<List<GodownOutput>>();
return output;
}
/// <summary>
/// 分页
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<SqlSugarPagedList<GodownOutput>> PagedList(GodownQueryPageInput input)
{
var entity = await _dbContext.Queryable<GodownEntity>()
.WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name))
.WhereIF(!string.IsNullOrEmpty(input.Code), x => x.Code.Contains(input.Code))
.OrderByDescending(x => x.CreateTime)
.ToPagedListAsync(input.PageIndex, input.PageSize);
SqlSugarPagedList<GodownOutput> output = entity.Adapt<SqlSugarPagedList<GodownOutput>>();
return output;
}
/// <summary>
/// 更新
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<bool> Update(GodownUpdateInput input)
{
var entity = await _dbContext.Queryable<GodownEntity>().FirstAsync(x => x.Id != input.Id && x.Code == input.Code);
if (entity != null)
{
throw Oops.Bah("编码已存在!");
}
var r_entity = await _dbContext.Queryable<GodownEntity>().Where(x => x.Id == input.Id).FirstAsync();
r_entity = input.Adapt<GodownEntity>();
var res = await _dbContext.Updateable(r_entity).IgnoreColumns(true).IgnoreColumns(x => x.CreateTime).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>
/// 下拉
/// </summary>
/// <returns></returns>
[HttpGet]
public async Task<dynamic> SelectList()
{
var entity = await _dbContext.Queryable<GodownEntity>().Select(x => new
{
key = x.Id,
value = x.Name
}).ToListAsync();
return entity;
}
}
}

+ 48
- 0
backend/BPA.MES.Base.Application/Services/GodownService/Services/IGodownService.cs View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.MES.Base.Application.Services
{
public interface IGodownService
{
/// <summary>
/// 增加
/// </summary>
/// <returns></returns>
Task<bool> Add(GodownAddInput input);
/// <summary>
/// 移除
/// </summary>
/// <returns></returns>
Task<bool> Del(GodownDelInput input);
/// <summary>
/// 更新
/// </summary>
/// <returns></returns>
Task<bool> Update(GodownUpdateInput input);
/// <summary>
/// 不分页列表
/// </summary>
/// <returns></returns>
Task<List<GodownOutput>> List(GodownQueryInput input);
/// <summary>
/// 分页列表
/// </summary>
/// <returns></returns>
Task<SqlSugarPagedList<GodownOutput>> PagedList(GodownQueryPageInput input);
/// <summary>
/// 查询单条
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
Task<GodownOutput> Detail(string Id);
/// <summary>
/// 下拉列表
/// </summary>
/// <returns></returns>
Task<dynamic> SelectList();
}
}

+ 0
- 110
backend/BPA.MES.Base.Application/Services/ProcessEntity/Services/ProcessService.cs View File

@@ -1,110 +0,0 @@
namespace BPA.MES.Base.Application.Services
{
/// <summary>
/// 名 称 :报警日志
/// 创 建 人 :yangxiao
/// 创建时间 :2023/8/21 11:02:36
/// 描 述 :
/// </summary>
[ApiDescriptionSettings("工艺流程", Name = "Process", Tag = "工艺流程", KeepName = true, SplitCamelCase = true, KeepVerb = true)]
public class ProcessService : IProcessService, ITransient, IDynamicApiController
{
private readonly ISqlSugarClient _dbContext;
public ProcessService(ISqlSugarClient db)
{
_dbContext = db;
}
/// <summary>
/// 增加
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<bool> Add(ProcessAddInput input)
{
ProcessEntity entity = input.Adapt<ProcessEntity>();
return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync();
}
/// <summary>
/// 删除
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<bool> Del(ProcessDelInput input)
{
var res = await _dbContext.Deleteable<ProcessEntity>().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpGet]
public async Task<ProcessOutput> Detail(string Id)
{
var entity = await _dbContext.Queryable<ProcessEntity>().FirstAsync(x => x.Id == Id);
ProcessOutput output = entity.Adapt<ProcessOutput>();
return output;
}
/// <summary>
/// 列表
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<List<ProcessOutput>> List(ProcessQueryInput input)
{
var entity = await _dbContext.Queryable<ProcessEntity>().ToListAsync();
List<ProcessOutput> output = entity.Adapt<List<ProcessOutput>>();
return output;
}
/// <summary>
/// 分页
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<SqlSugarPagedList<ProcessOutput>> PagedList(ProcessQueryPageInput input)
{
var entity = await _dbContext.Queryable<ProcessEntity>()
.WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name))
.OrderByDescending(x=>x.CreateTime)
.ToPagedListAsync(input.PageIndex, input.PageSize);
SqlSugarPagedList<ProcessOutput> output = entity.Adapt<SqlSugarPagedList<ProcessOutput>>();
return output;
}
/// <summary>
/// 更新
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<bool> Update(ProcessUpdateInput input)
{
var entity = await _dbContext.Queryable<ProcessEntity>().Where(x => x.Id == input.Id).FirstAsync();
entity = input.Adapt<ProcessEntity>();
var res = await _dbContext.Updateable(entity).IgnoreColumns(true).IgnoreColumns(x=>x.CreateTime).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>
/// 下拉
/// </summary>
/// <returns></returns>
[HttpGet]
public async Task<dynamic> SelectList()
{
var entity = await _dbContext.Queryable<ProcessEntity>().Select(x => new
{
key = x.Id,
value = x.Name
}).ToListAsync();
return entity;
}
}
}

backend/BPA.MES.Base.Application/Services/ProcessEntity/Dtos/ProcessDto.cs → backend/BPA.MES.Base.Application/Services/ProcessService/Dtos/ProcessDto.cs View File


backend/BPA.MES.Base.Application/Services/ProcessEntity/Services/IProcessService.cs → backend/BPA.MES.Base.Application/Services/ProcessService/Services/IProcessService.cs View File


+ 110
- 0
backend/BPA.MES.Base.Application/Services/ProcessService/Services/ProcessService.cs View File

@@ -0,0 +1,110 @@
namespace BPA.MES.Base.Application.Services
{
/// <summary>
/// 名 称 :报警日志
/// 创 建 人 :yangxiao
/// 创建时间 :2023/8/21 11:02:36
/// 描 述 :
/// </summary>
[ApiDescriptionSettings("工艺流程", Name = "Process", Tag = "工艺流程", KeepName = true, SplitCamelCase = true, KeepVerb = true)]
public class ProcessService : IProcessService, ITransient, IDynamicApiController
{
private readonly ISqlSugarClient _dbContext;
public ProcessService(ISqlSugarClient db)
{
_dbContext = db;
}
/// <summary>
/// 增加
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<bool> Add(ProcessAddInput input)
{
ProcessEntity entity = input.Adapt<ProcessEntity>();
return await _dbContext.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandIdentityIntoEntityAsync();
}
/// <summary>
/// 删除
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<bool> Del(ProcessDelInput input)
{
var res = await _dbContext.Deleteable<ProcessEntity>().Where(x => x.Id == input.Id).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpGet]
public async Task<ProcessOutput> Detail(string Id)
{
var entity = await _dbContext.Queryable<ProcessEntity>().FirstAsync(x => x.Id == Id);
ProcessOutput output = entity.Adapt<ProcessOutput>();
return output;
}
/// <summary>
/// 列表
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<List<ProcessOutput>> List(ProcessQueryInput input)
{
var entity = await _dbContext.Queryable<ProcessEntity>().ToListAsync();
List<ProcessOutput> output = entity.Adapt<List<ProcessOutput>>();
return output;
}
/// <summary>
/// 分页
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<SqlSugarPagedList<ProcessOutput>> PagedList(ProcessQueryPageInput input)
{
var entity = await _dbContext.Queryable<ProcessEntity>()
.WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name))
.OrderByDescending(x=>x.CreateTime)
.ToPagedListAsync(input.PageIndex, input.PageSize);
SqlSugarPagedList<ProcessOutput> output = entity.Adapt<SqlSugarPagedList<ProcessOutput>>();
return output;
}
/// <summary>
/// 更新
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<bool> Update(ProcessUpdateInput input)
{
var entity = await _dbContext.Queryable<ProcessEntity>().Where(x => x.Id == input.Id).FirstAsync();
entity = input.Adapt<ProcessEntity>();
var res = await _dbContext.Updateable(entity).IgnoreColumns(true).IgnoreColumns(x=>x.CreateTime).ExecuteCommandHasChangeAsync();
return res;
}
/// <summary>
/// 下拉
/// </summary>
/// <returns></returns>
[HttpGet]
public async Task<dynamic> SelectList()
{
var entity = await _dbContext.Queryable<ProcessEntity>().Select(x => new
{
key = x.Id,
value = x.Name
}).ToListAsync();
return entity;
}
}
}

+ 6
- 0
backend/BPA.MES.Base.Application/Services/ProductLineService/Dtos/ProductLineStepsDto.cs View File

@@ -82,6 +82,10 @@
/// 产线Id
/// </summary>
public string LineId { get; set; }
/// <summary>
/// 产品Id
/// </summary>
public string FinalId { get; set; }
}

/// <summary>
@@ -97,6 +101,8 @@
/// 设备
/// </summary>
public string[] DeviceId { get; set; }

public List<DevicesInfoOutput> DevicesInfo { get; set; }
}

}

+ 15
- 1
backend/BPA.MES.Base.Application/Services/ProductLineService/Services/ProductLineStepsService.cs View File

@@ -84,8 +84,22 @@ namespace BPA.MES.Base.Application.Services
.ToListAsync();
foreach (var item in output)
{
var devicelist = await _dbContext.Queryable<Pztj_LineDevicesEntity>().Where(x => x.StepId==item.Id).ToListAsync();
var devicelist = await _dbContext.Queryable<Pztj_LineDevicesEntity>()
.LeftJoin<Pztj_DevicesInfoEntity>((a, b) => a.DeviceId==b.Id)
.Where((a, b) => a.StepId==item.Id)
.Select((a, b) => new DevicesInfoOutput()
{
Code=b.Code,
Id = a.Id,
DeviceType = b.DeviceType,
Name = b.Name,
DeviceId= b.Id,
Status = SqlFunc.Subqueryable<FinalCraftStepsEntity>().Where(x=>x.DeviceId==b.Code && x.FinalId == input.FinalId && x.LineId==input.LineId && x.ProductLineStepsId==item.Id).Any()? "1" : "0",
})
.ToListAsync();
item.DeviceId = devicelist.Select(e => e.DeviceId).ToArray();
item.DevicesInfo = devicelist;
}
return output;
}


+ 2
- 0
backend/BPA.MES.Base.Application/Services/StockInfoService/Services/StockInfoService.cs View File

@@ -77,6 +77,8 @@
{
var entity = await _dbContext.Queryable<Pztj_StockInfoEntity>()
.LeftJoin<Pztj_MaterialsInfoEntity>((a,b)=>a.MaterialId==b.Id)
.WhereIF(!string.IsNullOrEmpty(input.Name),(a,b)=>a.Name.Contains(input.Name))
.WhereIF(!string.IsNullOrEmpty(input.Code), (a, b) => a.Code.Contains(input.Code))
.Select((a,b)=>new StockInfoOutput
{
Id=a.Id.SelectAll(),


+ 3
- 1
frontend/config/config.ts View File

@@ -19,6 +19,7 @@ export default defineConfig({
// history:{type:'browser'}
hash: true,
esbuildMinifyIIFE: true,

/**
* @name 兼容性设置
* @description 设置 ie11 不一定完美兼容,需要检查自己使用的所有依赖
@@ -44,6 +45,7 @@ export default defineConfig({
// 如果不想要 configProvide 动态设置主题需要把这个设置为 default
// 只有设置为 variable, 才能使用 configProvide 动态设置主色调
'root-entry-name': 'variable',
enableDarkTheme:false,
},
/**
* @name moment 的国际化配置
@@ -124,7 +126,7 @@ export default defineConfig({
//================ pro 插件配置 =================
presets: ['umi-presets-pro'],
keepalive: [/./],
tabsLayout: { hasFixedHeader: false },
tabsLayout: { hasFixedHeader: true,hasDropdown:true },
mfsu: {
strategy: 'normal',
},


+ 6
- 4
frontend/config/defaultSettings.ts View File

@@ -8,9 +8,9 @@ const Settings: LayoutSettings & {
logo?: string;
title?:any
} = {
navTheme: 'light',
colorPrimary: '#13C2C2',
layout: 'mix',
layout: 'side',
colorPrimary:'#0960bd',
contentWidth: 'Fluid',
fixedHeader: false,
fixSiderbar: true,
@@ -18,10 +18,12 @@ const Settings: LayoutSettings & {
title: "中控管理系统",
menu: {
locale: false, // 禁用多语言功能
hideMenuWhenCollapsed:false,
},

pwa: false,
splitMenus:false,
iconfontUrl: '',
};



+ 4
- 3
frontend/config/routes.ts View File

@@ -26,14 +26,15 @@
path: '/factory', icon: 'SettingOutlined', name: '工厂数据管理',
routes: [
{ path: '/factory/process', name: '工流程', component: './plantModel/process' },
{ path: '/factory/process', name: '工流程', component: './plantModel/process' },
{ path: '/factory/line', name: '产线管理', component: './productLine/line' },
]
},
{
path: '/production', icon: 'SettingOutlined', name: '生产资料管理',
path: '/production', icon: 'SettingOutlined', name: '生产资料管理', hideInBreadcrumb:false,
routes: [
{ path: '/production/materials', name: '原料管理', component: './materials/index' },
{ path: '/production/materials', name: '物料管理', component: './materials/index' },
{ path: '/production/godown', name: '料仓管理', component: './stock/index' },
{ path: '/production/final', name: '成品管理', component: './final/index' },
]
},


+ 0
- 519
frontend/dist/550.cc113611.async.js
File diff suppressed because it is too large
View File


+ 0
- 6
frontend/dist/635.dbb47eab.async.js
File diff suppressed because it is too large
View File


+ 0
- 82
frontend/dist/865.ae9bc490.async.js
File diff suppressed because it is too large
View File


+ 3
- 3
frontend/dist/index.html View File

@@ -4,11 +4,11 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="/umi.54f62417.css">
<script src="/preload_helper.2ccfcf55.js"></script>
<link rel="stylesheet" href="/umi.22bc53e6.css">
<script src="/preload_helper.dc318c67.js"></script>
</head>
<body>
<div id="root"></div>
<script src="/umi.244e5279.js"></script>
<script src="/umi.787e45ca.js"></script>
</body>
</html>

+ 0
- 1
frontend/dist/p__deviceInfo__index.ff2808b7.async.js
File diff suppressed because it is too large
View File


+ 0
- 2
frontend/dist/p__deviceProductInfo__index.9784ccc7.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__dict__index.3a14b6d6.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__final__index.6d9a57bd.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__final__index.f7556106.chunk.css View File

@@ -1 +0,0 @@
*{margin:0;padding:0}.tag___VXJuq{height:100%;width:100%}.tag_item___PSkFw{padding:0 5px 0 20px;height:72px;position:relative;cursor:pointer;display:flex;align-items:center}.tag_item_active___T4sW7{position:absolute;width:3px;height:72px;left:0;top:0;background-color:#13c2c2}.tag_item_activeItem___l1ogu{background-color:#f7f8fa}.tag_item_editicon___c9Zjn{position:absolute;right:0;top:0;bottom:0;display:flex;align-items:center}

+ 0
- 1
frontend/dist/p__materials__index.9e28bf84.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__plantModel__process.e9f8524e.async.js View File

@@ -1 +0,0 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[988],{24493:function(R,f,e){var M=e(97857),o=e.n(M),a=e(56002);f.Z={Add:function(r){return(0,a.request)("/api/process/add",{method:"POST",data:o()({},r)})},Del:function(r){return(0,a.request)("/api/process/del",{method:"POST",data:o()({},r)})},Update:function(r){return(0,a.request)("/api/process/update",{method:"POST",data:o()({},r)})},Detail:function(r){return(0,a.request)("/api/process/detail?id=".concat(r),{method:"GET"})},List:function(r){return(0,a.request)("/api/process/list",{method:"POST",data:o()({},r)})},PagedList:function(r){return(0,a.request)("/api/process/pagedlist",{method:"POST",data:o()({},r)})},Selectlist:function(){return(0,a.request)("/api/process/selectlist",{method:"GET"})}}},60744:function(R,f,e){e.r(f);var M=e(15009),o=e.n(M),a=e(99289),u=e.n(a),r=e(5574),A=e.n(r),C=e(51042),B=e(86550),L=e(78957),S=e(86738),i=e(45360),b=e(14726),E=e(67294),g=e(27484),F=e.n(g),P=e(24493),_=e(85893);f.default=function(){var U=(0,E.useState)("table"),T=A()(U,2),p=T[0],c=T[1],D=(0,E.useRef)(),I=(0,E.useRef)(),K=(0,E.useState)(),j=A()(K,2),h=j[0],v=j[1],O=function(){var t,n;(t=D.current)===null||t===void 0||t.resetFields(),(n=I.current)===null||n===void 0||n.reload()},W=[{title:"\u4E3B\u952E",dataIndex:"id",width:160,hideInForm:!0,hideInSearch:!0},{title:"\u540D\u79F0",dataIndex:"name",ellipsis:!0,width:120,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}]}},{title:"\u7C7B\u578B",hideInDescriptions:!0,dataIndex:"processType",width:120,search:!1,valueEnum:{0:{text:"\u4EBA\u5DE5"},1:{text:"\u8BBE\u5907"}},formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}]}},{title:"\u63CF\u8FF0",dataIndex:"des",search:!1},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createTime",render:function(t,n){return(0,_.jsx)(_.Fragment,{children:F()(n.createTime).format("YYYY-MM-DD HH:mm:ss")})},search:!1,hideInForm:!0},{title:"\u64CD\u4F5C",valueType:"option",dataIndex:"id",render:function(t,n){return[(0,_.jsxs)(L.Z,{children:[(0,_.jsx)("a",{onClick:function(){var s;c("form"),v(n),(s=D.current)===null||s===void 0||s.setFieldsValue(n)},target:"_blank",rel:"noopener noreferrer",children:"\u7F16\u8F91"},+new Date+Math.random()),(0,_.jsx)(S.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){P.Z.Del(n).then(function(s){s.statusCode===200?(i.ZP.info("\u5220\u9664\u6210\u529F!"),O()):i.ZP.error(s.errors)})},onCancel:function(){i.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,_.jsx)("a",{children:"\u5220\u9664"})},"del")]},+new Date+Math.random())]}}];return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(B.Z,{columns:W,type:p,formRef:D,actionRef:I,onSubmit:function(t){t.id=h==null?void 0:h.id,console.log(t),p==="form"&&(t.id?P.Z.Update(t).then(function(n){n.statusCode===200?(i.ZP.info("\u66F4\u65B0\u6210\u529F!"),c("table"),O()):i.ZP.error(n.errors)}):P.Z.Add(t).then(function(n){n.statusCode===200?(i.ZP.info("\u65B0\u589E\u6210\u529F!"),c("table"),O()):i.ZP.error(n.errors)}))},form:{ignoreRules:!0,submitter:{onReset:function(){var t;(t=D.current)===null||t===void 0||t.resetFields(),c("table")},searchConfig:{resetText:p==="form"?"\u8FD4\u56DE":"\u91CD\u7F6E"}}},request:u()(o()().mark(function l(){var t,n,m,s=arguments;return o()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return t=s.length>0&&s[0]!==void 0?s[0]:{},n={pageIndex:t.current||1,pageSize:t.pageSize||10,name:t.name||""},d.next=4,P.Z.PagedList(n);case 4:if(m=d.sent,m.statusCode!==200){d.next=9;break}return d.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return d.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return d.stop()}},l)})),pagination:{pageSize:10,showSizeChanger:!1},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:function(){return[(0,_.jsxs)(b.ZP,{type:"primary",onClick:function(){c("form"),v({id:"",createTime:new Date})},children:[(0,_.jsx)(C.Z,{}),"\u65B0\u5EFA"]},"3")]}})})}}}]);

+ 0
- 1
frontend/dist/p__productLine__line.d126ca9b.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__system__module__index.4ef32e9c.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__system__role__index.6ae92abd.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__system__user__index.7a86743e.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__workInfo__index.73e1915b.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__workInfo__plan.dabb6134.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/preload_helper.2ccfcf55.js View File

@@ -1 +0,0 @@
!function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"ant-design-pro","b":"webpack","f":[["p__system__role__index.6ae92abd.async.js",24],["p__deviceInfo__index.ff2808b7.async.js",36],["p__user__login__index.26100c69.chunk.css",37],["p__user__login__index.b934e735.async.js",37],["p__workInfo__plan.dabb6134.async.js",43],["119.4e6a5656.async.js",119],["222.4d9ce06a.async.js",222],["p__system__module__index.ef46db37.chunk.css",257],["p__system__module__index.4ef32e9c.async.js",257],["p__materials__index.9e28bf84.async.js",262],["t__plugin-layout__Layout.5012e1ab.chunk.css",301],["t__plugin-layout__Layout.bb77edb1.async.js",301],["390.c53868f3.async.js",390],["393.e127e60f.async.js",393],["p__deviceProductInfo__index.835c0c6c.chunk.css",402],["p__deviceProductInfo__index.9784ccc7.async.js",402],["p__workInfo__index.73e1915b.async.js",420],["p__welcome__index.dde73410.async.js",446],["p__final__index.f7556106.chunk.css",460],["p__final__index.6d9a57bd.async.js",460],["p__system__user__index.695d982e.chunk.css",472],["p__system__user__index.7a86743e.async.js",472],["550.cc113611.async.js",550],["t__plugin-maxtabs__Layout.b832af3b.async.js",558],["565.b1a57ede.async.js",565],["p__404.a52587bb.async.js",571],["635.dbb47eab.async.js",635],["821.b970c16a.async.js",821],["865.ae9bc490.async.js",865],["p__dict__index.3a14b6d6.async.js",918],["p__plantModel__process.e9f8524e.async.js",988],["p__productLine__line.d126ca9b.async.js",990]],"r":{"/*":[25,27],"/":[13,17,23,5,10,11,27,28],"/user/login":[2,3],"/system/user":[5,20,21,22,27,23,10,11,28],"/system/role":[0,5,22,27,23,10,11,28],"/system/module":[5,7,8,22,27,23,10,11,28],"/system/dict":[5,22,27,29,23,10,11,28],"/wmx/deviceProduct":[5,14,15,22,27,23,10,11,28],"/wmx/deviceinfo":[1,5,22,27,23,10,11,28],"/factory/process":[5,22,27,30,23,10,11,28],"/factory/line":[5,22,24,26,27,31,23,10,11,28],"/production/materials":[5,9,22,27,23,10,11,28],"/production/final":[5,13,18,19,22,26,27,23,10,11,28],"/work/workPlan":[4,5,22,27,23,10,11,28],"/work/workInfo":[5,6,13,16,22,27,23,10,11,28]}},{publicPath:"/"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}();

+ 0
- 1
frontend/dist/t__plugin-layout__Layout.bb77edb1.async.js
File diff suppressed because it is too large
View File


+ 0
- 301
frontend/dist/umi.244e5279.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/umi.54f62417.css View File

@@ -1 +0,0 @@
html,body,#root{height:100%;margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.colorWeak{filter:invert(80%)}.ant-layout{min-height:100vh}.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed{left:unset}canvas{display:block}.ant-pro-global-header-logo img{height:53px}body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ul,ol{list-style:none}@media (max-width: 768px){.ant-table{width:100%;overflow-x:auto}.ant-table-thead>tr>th,.ant-table-tbody>tr>th,.ant-table-thead>tr>td,.ant-table-tbody>tr>td{white-space:pre}.ant-table-thead>tr>th>span,.ant-table-tbody>tr>th>span,.ant-table-thead>tr>td>span,.ant-table-tbody>tr>td>span{display:block}}html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}.login_user_info___eVsKL{width:200px;text-align:center;cursor:pointer}.login_user_name___mWfUx{font-size:16px;margin-left:10px;color:#fff}

+ 1
- 1
frontend/src/api/deviceInfo/dtos/deviceProduct.d.ts View File

@@ -14,7 +14,7 @@ declare namespace deviceProduct {
/**
* 名称
*/
deviceName: string;
name: string;

params:string;
}


+ 8
- 2
frontend/src/api/finalCraftSteps/service.ts View File

@@ -84,7 +84,13 @@ export default {
method: 'POST',
data: parms
})
}

},
//根据批量更新步骤
Copyfinalcraftsteps(parms :finalCraftStepsTypes.CopyFinalCraftStepsInput){
return request('/api/finalcraftsteps/copyfinalcraftsteps',{
method: 'POST',
data: parms
})
},
}


+ 1
- 0
frontend/src/api/finalMaterial/dto.d.ts View File

@@ -6,6 +6,7 @@ declare namespace finalMaterialTypes {
materialId: string,
finalId: string,
weight: string,
mode:string
}
/**
* 增加输入参数


+ 12
- 0
frontend/src/api/finalService.ts View File

@@ -140,5 +140,17 @@ export default {
deviceId: id
}
});
},
/**
* 更新状态
* @param parms
* @returns
*/
Saveconfigstatus(parms:FinalTypes.Saveconfigstatus){
return request(' /api/finalsinfo/saveconfigstatus', {
method: 'POST',
data: parms
});
}
}

+ 63
- 0
frontend/src/api/godown/dto.d.ts View File

@@ -0,0 +1,63 @@
declare namespace godownTypes {
/**
* 基类
*/
type base_dto = {
/**
* 编码
*/
code?: null | string;
/**
* 名称
*/
name?: null | string;
}
/**
* 增加输入参数
*/
type addInput = base_dto
/**
* 更新输入参数
*/
interface updateInput extends base_dto {
/**
* 主键
*/
id: string
}
/**
* 删除输入参数
*/
interface delInput {
/**
* 主键
*/
id: string
}
/**
* 查询输入参数
*/
interface queryParms {
/**
* 名称
*/
name?: null | string;
}
/**
* 查询分页输入参数
*/
interface queryPage {
pageIndex: number,
pageSize: number,
name:string
}
/**
* 查询输出参数
*/
interface output extends base_dto {
/**
* 主键
*/
id: string
}
}

+ 83
- 0
frontend/src/api/godown/service.ts View File

@@ -0,0 +1,83 @@

import { request } from '@umijs/max';


export default {
/**
* 新增
* @param parms
* @returns
*/
Add(parms: godownTypes.addInput) {
return request('/api/godown/add', {
method: 'POST',
data: {
...parms,
},
});
},
/**
* 删除
* @param parms
* @returns
*/
Del(parms: godownTypes.delInput) {
return request(`/api/godown/del`, {
method: 'POST',
data: {
...parms,
},
});
},
/**
* 修改
* @param parms
* @returns
*/
Update(parms: godownTypes.updateInput) {
return request('/api/godown/update', {
method: 'POST',
data: {
...parms,
},
});
},
/**
* 详情
* @param parms
* @returns
*/
Detail(id: string) {
return request(`/api/godown/detail?id=${id}`, {
method: 'GET'
});
},
/**
* 获取列表
* @param parms
* @returns
*/
List(parms: godownTypes.queryParms) {
return request('/api/godown/list', {
method: 'POST',
data: {
...parms,
},
});
},
/**
* 分页查询
* @param parms
* @returns
*/
PagedList(parms: godownTypes.queryPage) {
return request('/api/godown/pagedlist', {
method: 'POST',
data: {
...parms,
},
});
},

}


+ 2
- 1
frontend/src/api/productlinesteps/dto.d.ts View File

@@ -57,7 +57,8 @@ declare namespace productlinestepsTypes {
/**
* 名称
*/
lineId:string
lineId:string,
finalId:string
}
/**
* 查询分页输入参数


+ 40
- 30
frontend/src/app.tsx View File

@@ -1,5 +1,5 @@
import Footer from '@/components/Footer';
import type { MenuDataItem, Settings as LayoutSettings } from '@ant-design/pro-components';
import { type MenuDataItem, type Settings as LayoutSettings, PageContainer, ProBreadcrumb, ProCard } from '@ant-design/pro-components';
import type { RunTimeLayoutConfig } from '@umijs/max';
import defaultSettings from '../config/defaultSettings';
import { errorConfig } from './requestErrorConfig';
@@ -40,10 +40,10 @@ export async function getInitialState(): Promise<{
currentUser: any;
}> {
const fetchUserInfo = async () => {
const response:MyResponse.Content = await userApi.GetUserInfo();
if (response.statusCode===200) {
console.log('response',response);
const response: MyResponse.Content = await userApi.GetUserInfo();
if (response.statusCode === 200) {
console.log('response', response);
return response.data;
}
return null;
@@ -74,37 +74,46 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
content: '黑菠萝科技研发部',
},
token: {
colorBgAppListIconHover: 'rgba(0,0,0,0.06)',
colorTextAppListIconHover: 'rgba(255,255,255,0.95)',
colorTextAppListIcon: 'rgba(255,255,255,0.85)',
layout:{
bgLayout:'#001529'
},
// colorBgAppListIconHover: '#fff',
// colorTextAppListIconHover: 'rgba(255,255,255,0.95)',
// colorTextAppListIcon: 'rgba(255,255,255,0.85)',
sider: {
colorBgCollapsedButton: '#13C2C2',
colorTextCollapsedButtonHover: 'rgba(0,0,0,0.65)',
colorTextCollapsedButton: 'rgba(0,0,0,0.45)',
colorMenuBackground: '#000',
colorBgMenuItemCollapsedHover: 'rgba(0,0,0,0.06)',
colorBgMenuItemCollapsedSelected: '#13C2C2',
// colorBgCollapsedButton: '#0960bd',
// colorTextCollapsedButtonHover: '#fff',
// colorTextCollapsedButton: '#fff',
colorMenuBackground: '#001529',//菜单背景色
//colorBgMenuItemCollapsedHover: '#fff',
colorBgMenuItemCollapsedElevated:'#001529',
colorBgMenuItemCollapsedSelected: '#0960bd',
colorMenuItemDivider: 'rgba(255,255,255,0.15)',
colorBgMenuItemHover: '#13C2C2',
colorBgMenuItemSelected: '#13C2C2',
colorTextMenuSelected: '#fff',
colorTextMenuItemHover: 'rgba(255,255,255,0.75)',
colorTextMenu: 'rgba(255,255,255,0.75)',
colorTextMenuSecondary: 'rgba(255,255,255,0.65)',
colorTextMenuTitle: 'rgba(255,255,255,0.95)',
colorTextMenuActive: 'rgba(255,255,255,0.95)',
colorBgMenuItemHover: '#0960bd',
colorBgMenuItemSelected: '#0960bd',
colorTextMenuSelected: '#ffffff',
colorTextMenuItemHover: '#fff',
colorTextMenu: '#fff',
colorTextMenuSecondary: '#fff',
colorTextMenuTitle: '#fff',//系统名称
// colorTextMenuActive: '#fff',
colorTextSubMenuSelected: '#fff',
// },
header: {
colorBgHeader: '#ffffff',
colorMenuBackground: '#000',
colorHeaderTitle: '#ffffff',
},
// pageContainer:{
// paddingInlinePageContainerContent: 20,
// paddingBlockPageContainerContent:10
},
header: {
colorBgHeader: '#000',
colorMenuBackground: '#000',
colorHeaderTitle: '#ffffff',
pageContainer: {
colorBgPageContainer: '#f5f5f5',
colorBgPageContainerFixed: '#0960bd'
},
pageContainer:{
paddingInlinePageContainerContent: 20,
paddingBlockPageContainerContent:10
}
},
headerContentRender: () => <ProBreadcrumb />,
footerRender: () => <Footer />,
onPageChange: () => {
const userToken = localStorage.getItem('USER_TOKEN');
@@ -118,6 +127,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
history.push('/user/login');
}
},

menuDataRender: () => loopMenuItem(initialState?.menuData as any[]),
childrenRender: (children: any) => {
// children.pathname = history.location.pathname;


+ 0
- 1
frontend/src/components/HeaderRight/index.less View File

@@ -7,5 +7,4 @@
.login_user_name {
font-size: 16px;
margin-left: 10px;
color: #fff;
}

+ 48
- 2
frontend/src/global.less View File

@@ -1,4 +1,3 @@
@primary-color: #F5222D;
html,
body,
#root {
@@ -9,18 +8,65 @@ body,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
}
.ant-modal-content{
border-radius: 0px !important
}
.ant-btn {
border-radius: 0px !important
}
.ant-tabs-tab{
border-radius: 5px 5px 0px 0px !important;
padding: 4px 4px !important;

}
.ant-tabs-tab-with-remove {
//background: #0960bd !important;/* 修改为你想要的颜色 */
border-bottom:1px solid #0960bd;
}
// .ant-tabs-tab-btn:active{
// color: white !important;
// }
.ant-tabs-tab-active{
//background: #0960bd !important;
border-bottom: 2px solid #0960bd !important;
// div{
// color: white !important;
// }
// span{
// color: white !important;
// }
}
.ant-input-affix-wrapper{
border-radius: 0px !important
}
.colorWeak {
filter: invert(80%);
}

.even-row-background {
background-color: #fafafa; /* 偶数行的背景色 */
}
.odd-row-background {
background-color: #f5f5f5; /* 奇数行的背景色 */
}
.ant-select-selector{
border-radius: 0px !important;
}
.runtime-keep-alive-tabs-layout{
height: 30px !important;
margin-bottom: 10px !important;
margin-top: -12px;
}
.ant-layout {
min-height: 100vh;
}
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
left: unset;
}

.ant-pro-layout .ant-pro-layout-content{
padding-block: 16px;
padding-inline: 16px;
}
canvas {
display: block;
}


+ 1
- 1
frontend/src/global.tsx View File

@@ -57,7 +57,7 @@ if (pwa) {
<Button
type="primary"
onClick={() => {
notification.close(key);
notification.destroy(key);
reloadSW();
}}
>


+ 13
- 4
frontend/src/pages/deviceInfo/index.tsx View File

@@ -27,7 +27,7 @@ export default () => {
{
title: 'id',
dataIndex: 'id',
tip: '规则名称是唯一的 key',
tooltip: '规则名称是唯一的 key',
hideInSearch: true,
hideInTable: true,
},
@@ -70,10 +70,11 @@ export default () => {
title: '操作',
valueType: 'option',
key: 'option',
fixed:'right',
render: (_, record) => [
<Button
key="edit"
type="primary" ghost
type="primary" size='small'
onClick={async () => {
setIsModalOpen(true);
setModelTitle('编辑信息');
@@ -96,7 +97,7 @@ export default () => {
DeviceInfoAPI.Del(EnablejsonData).then((r) => {
if (r.statusCode === 200) {
message.success(r.statusCode === 200 ? '删除成功' : r.message);
actionRef.current?.reload();
actionRef.current?.reloadAndRest?.();
}
});
}}
@@ -106,7 +107,7 @@ export default () => {
okText="确认"
cancelText="关闭"
>
<Button type="primary" danger ghost>删除</Button>
<Button type="primary" size='small' danger >删除</Button>
</Popconfirm>,
],
},
@@ -153,6 +154,14 @@ export default () => {
columns={columns}
actionRef={actionRef}
cardBordered
bordered
rowClassName={(record:any , index: number, indent: number)=>{
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
request={async (params = {}) => {
const jsonData: DeviceTypes.Page = {
pageIndex: params.current || 1,


+ 69
- 33
frontend/src/pages/deviceProductInfo/index.tsx View File

@@ -71,41 +71,44 @@ export default () => {
{
title: '主键',
dataIndex: 'id',
hideInForm: true,
formItemProps:{
hidden:true
},
search: false,

},
{
title: '名称',
dataIndex: 'name',
ellipsis: true,
formItemProps:{
rules:[{ required: true, message: '此项为必填项!' }]
},
},
{
title: '编码',
hideInTable: true,
hideInDescriptions: true,
dataIndex: 'code',
formItemProps:{
rules:[{ required: true, message: '此项为必填项!' }]
},
search: false,
},
{
title: '描述',
dataIndex: 'description',
width: 120,
search: false,
},
{
title: '操作',
valueType: 'option',
dataIndex: 'id',
fixed:'right',
render: (text, row) => [
<Space key={+new Date() + Math.random()}>
<a onClick={() => {
<Button type='primary' size='small' onClick={() => {
setFromType('form')
ref.current?.setFieldsValue(row)
}} key={+new Date() + Math.random()} target="_blank" rel="noopener noreferrer">
编辑
</a>
<a onClick={() => {
</Button>
<Button type='primary' size='small' onClick={() => {
setIsfunc(true)
setSelectRow(row)
setFuncParams([])
@@ -113,7 +116,7 @@ export default () => {

设置功能

</a>
</Button>

<Popconfirm
key="del"
@@ -135,9 +138,9 @@ export default () => {
okText="确认"
cancelText="关闭"
>
<a>
<Button type='primary' size='small' danger>
删除
</a>
</Button>
</Popconfirm>
</Space>
],
@@ -147,16 +150,23 @@ export default () => {
return (
<>
{!isfunc ?
<ProCard>
{fromType === 'form' ? <Button icon={<ArrowLeftOutlined color='black' />} type='link' onClick={() => {
ref.current?.resetFields();
setFromType("table")
}}>返回</Button> : ""}
<>

<ProTable<deviceProduct.output>
columns={columns}
type={fromType as 'table'}
formRef={ref}
actionRef={actionRef}
cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
onSubmit={(params: any) => {
console.log(params);
if (fromType === 'form') {
@@ -206,7 +216,7 @@ export default () => {
}}
pagination={{
pageSize: 5,
showSizeChanger:false
showSizeChanger: false
}}
rowKey="id"
dateFormatter="string"
@@ -219,30 +229,42 @@ export default () => {
新建
</Button>,
]}
form={{
ignoreRules: true,// 自定义提交按钮的属性
submitter: {
onReset: () => {
ref.current?.resetFields()
setFromType("table")
},
searchConfig: { resetText: fromType === 'form' ? '返回' : '重置', submitText: fromType === 'form' ? '提交' : '查询' },
}
}}
/>
</ProCard>
</>
:
<>
<ProCard bordered>
{isfunc ? <Button icon={<ArrowLeftOutlined />} type="link" size='large' onClick={() => {
{isfunc ? <Button icon={<LeftCircleOutlined />} type='primary' size='middle' onClick={() => {
setIsfunc(false)
}}>返回产品列表</Button> : ""}
}}>{"返回产品列表"}</Button> : ""}
</ProCard>
<ProCard bordered>
<div>产品名称:{selectRow?.name}</div>
<div>产品描述:{selectRow?.description}</div>
</ProCard>
<ProCard >
<Space direction='vertical'>

{funcfromType === 'form' ? <Button type='primary' icon={<LeftCircleOutlined />} onClick={() => {
funcRef.current?.resetFields();
setFuncFromType("table")
}}>返回功能列表</Button> : ""}
</Space>
<ProTable<deviceProduct.output>
type={funcfromType as 'table'}

cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
headerTitle="列表"
formRef={funcRef}
actionRef={funcActionRef}
@@ -252,6 +274,9 @@ export default () => {
title: '功能主键',
dataIndex: 'id',
search: false,
formItemProps: {
hidden: true
},
readonly: true,
},
{
@@ -365,6 +390,7 @@ export default () => {
title: '操作',
valueType: 'option',
dataIndex: 'id',
fixed:'right',
render: (text, row) => [
<Space key={+new Date() + Math.random()}>
<a onClick={() => {
@@ -461,9 +487,19 @@ export default () => {
};
}
}}
form={{
ignoreRules: true,// 自定义提交按钮的属性
submitter: {
onReset: () => {
funcRef.current?.resetFields();
setFuncFromType("table")
},
searchConfig: { resetText: funcfromType === 'form' ? '返回' : '重置', submitText: funcfromType === 'form' ? '提交' : '查询' },
}
}}
pagination={{
pageSize: 5,
showSizeChanger:false
showSizeChanger: false
}}
rowKey="id"
dateFormatter="string"
@@ -478,7 +514,7 @@ export default () => {
</Button>,
]}
/>
</ProCard>
</>
}
</>


+ 22
- 11
frontend/src/pages/dict/index.tsx View File

@@ -29,7 +29,7 @@ export default () => {
const [isModalOpen, setIsModalOpen] = useState(false);

// // 拿到当前子项id
const [thisitem, setthisitem] = useState({});
const [thisitem, setthisitem] = useState<any>();
;

// 设置新增子项的弹窗
@@ -72,7 +72,7 @@ export default () => {
{
title: '操作',
valueType: 'option',
dataIndex: 'id',
fixed:'right',
render: (text, row) => [
<Space key={+new Date() + Math.random()}>
<a onClick={() => {
@@ -218,9 +218,6 @@ export default () => {

const EnablejsonData: dictData.delInput = {
id: record.id,
name: '',
code: '',

};

dictDataApi.Del(EnablejsonData).then((r: MyResponse.Content) => {
@@ -286,16 +283,31 @@ export default () => {

return (
<>
<ProCard>
{fromType === 'form' ? <Button type='link' onClick={() => {
ref.current?.resetFields();
setFromType("table")
}}>返回</Button> : ""}
<ProTable<dictType.output>
columns={columns}
cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
type={fromType as 'table'}
formRef={ref}
actionRef={actionRef}
form={{
ignoreRules: true,// 自定义提交按钮的属性
submitter: {
onReset: () => {
ref.current?.resetFields()
setFromType("table")
},
searchConfig: { resetText: fromType === 'form' ? '返回' : '重置', submitText: fromType === 'form' ? '提交' : '查询' },
}
}}
onSubmit={(params: any) => {
console.log(params);
params.id = selectDataRow?.id
@@ -362,7 +374,6 @@ export default () => {
</Button>,
]}
/>
</ProCard>
<Modal
maskClosable={false} title="设置子项" open={isModalOpen} footer={false} onCancel={() => {



+ 73
- 7
frontend/src/pages/final/index.less View File

@@ -2,30 +2,96 @@
margin: 0;
padding: 0;
}
@primary-color: '#13C2C2';
.tag {
height: 100%;
width: 100%;
display: flex;
flex-direction: row;
&_device{
padding: 25px ;
}
&_item {
padding: 0 5px 0 20px;
height: 72px;
box-shadow:6px 5px 1px 1px rgb(237 236 236 / 50%);
border: 1px solid #edecec;
padding: 25px ;
height: 38px;
width: 200px;
position: relative;
cursor: pointer;
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
margin: 10px;
&_active {
// position: absolute;
// width: 3px;
// height: 72px;
// left: 0;
// top: 0;
// background-color: #13C2C2;
border-bottom: 1px solid @primary-color;

}
&_activeItem{
background-color: #f7f8fa;;
border: 2px solid @primary-color;

}
&_editicon{
position: absolute;
width: 3px;
height: 72px;
left: 0;
right: 0;
top: 0;
background-color: #13C2C2;
bottom: 0;
display: flex;
align-items: center;
}
}
}

.gongyi_tag {
height: 100%;
width: 100%;
display: flex;
flex-direction: row;
box-shadow:6px 5px 1px 1px rgb(237 236 236 / 50%);
&_box{
margin: 5px;
}
&_item {
padding: 25px ;
height: 38px;
width: 200px;
position: relative;
cursor: pointer;
display: -ms-flexbox;
box-shadow:6px 5px 1px 1px rgb(237 236 236 / 50%);
border: 1px solid #edecec;
display: flex;
-ms-flex-align: center;
align-items: center;
margin: 10px;
&_active {
// position: absolute;
// width: 3px;
// height: 72px;
// left: 0;
// top: 0;
// background-color: #13C2C2;
border-bottom: 1px solid @primary-color;

}
&_activeItem{
background-color: #f7f8fa;;
border: 2px solid @primary-color;

}
&_editicon{
position: absolute;


+ 650
- 460
frontend/src/pages/final/index.tsx
File diff suppressed because it is too large
View File


+ 198
- 0
frontend/src/pages/godown/index.tsx View File

@@ -0,0 +1,198 @@
import { PlusOutlined } from '@ant-design/icons';
import type {
ActionType,
ProColumns,
ProFormInstance,
} from '@ant-design/pro-components';
import {
ProCard,
ProTable,
} from '@ant-design/pro-components';
import { Button, message, Modal, Popconfirm, Space } from 'antd';
import { useState, useRef } from 'react';
//引入接口
import godownApi from '@/api/godown/service'

export default () => {
const [fromType, setFromType] = useState<any>('table')
const ref = useRef<ProFormInstance>();
const actionRef = useRef<ActionType>();
const [isModalOpen,setIsModalOpen] = useState<boolean>(false)
const Reolod = () => {
ref.current?.resetFields()
actionRef.current?.reload()
}
const columns: ProColumns<godownTypes.output>[] = [
{
title: '主键',
dataIndex: 'id',
search: false,
formItemProps: {
hidden: true
}
},
{
title: '名称',
dataIndex: 'name',
search: true
},
{
title: '编码',
dataIndex: 'code',
search: true
},
{
title: '操作',
valueType: 'option',
fixed: 'right',
render: (text, row) => [
<Space key={+new Date() + Math.random()}>
<Button type='primary' size='small'
onClick={() => {
setFromType('form')
ref.current?.setFieldsValue(row)
}} key={+new Date() + Math.random()} target="_blank" rel="noopener noreferrer">
设置物料
</Button>
<Button type='primary' size='small'
onClick={() => {
setFromType('form')
ref.current?.setFieldsValue(row)
}} key={+new Date() + Math.random()} target="_blank" rel="noopener noreferrer">
编辑
</Button>
<Popconfirm
key="del"
title="确定要删除此条数据吗?"
onConfirm={() => {

godownApi.Del(row).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.info("删除成功!");
Reolod()
} else {
message.error(res.errors);
}
})
}}
onCancel={() => {
message.info('已取消删除');
}}
okText="确认"
cancelText="关闭"
>
<Button type='primary' danger size='small'>
删除
</Button>
</Popconfirm>
</Space>
],
},
];

return (
<>
<ProTable<godownTypes.output>
columns={columns}
type={fromType as 'table'}
formRef={ref}
actionRef={actionRef}
onSubmit={(params: any) => {
console.log(params);
if (fromType === 'form') {
if (params.id) {
godownApi.Update(params).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.info("更新成功!");
setFromType('table')
Reolod()
} else {
message.error(res.errors);
}
})
} else {
godownApi.Add(params).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.info("新增成功!");
setFromType('table')
Reolod()
} else {
message.error(res.errors);
}
})
}
}
}}
form={{
ignoreRules: true,// 自定义提交按钮的属性
submitter: {
onReset: () => {
ref.current?.resetFields()
setFromType("table")
},
searchConfig: { resetText: fromType === 'form' ? '返回' : '重置', submitText: fromType === 'form' ? '提交' : '查询' },
}
}}
request={async (params = {}) => {
const jsonData: godownTypes.queryPage = {
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
name: params.name || '',
};
const response = await godownApi.PagedList(jsonData);
if (response.statusCode === 200) {
return {
data: response.data.items,
success: true,
total: response.data.total,
};
} else {
return {
data: [],
success: false,
total: 0,
};
}
}}
pagination={{
pageSize: 5,
showSizeChanger: false
}}
rowKey="id"
dateFormatter="string"
headerTitle="列表"
toolBarRender={() => [
<Button key="3" type="primary" onClick={() => {
setFromType('form');
}}>
<PlusOutlined />
新建
</Button>,
]}
/>
<Modal
maskClosable={false}
key="01"
width={800}
title={'设置物料'}
open={isModalOpen}
onCancel={() => {
setIsModalOpen(false);
}}
footer={[
<Button
key="back"
onClick={() => {
setIsModalOpen(false);
}}
>
返回
</Button>,
<Button key="submit" form="materialsForm" type="primary" htmlType="submit">
提交
</Button>,
]}
></Modal>
</>
);
};

+ 13
- 3
frontend/src/pages/materials/index.tsx View File

@@ -60,7 +60,7 @@ const Index = () => {
{
title: 'id',
dataIndex: 'id',
tip: '规则名称是唯一的 key',
tooltip: '规则名称是唯一的 key',
hideInSearch: true,
hideInTable: true,
},
@@ -95,11 +95,12 @@ const Index = () => {
title: '操作',
valueType: 'option',
key: 'option',
fixed:'right',
render: (_, record) => [
<Button
key="edit"
type="primary"
ghost
size='small'
onClick={async () => {
GetMaterialType();
setIsModalOpen(true)
@@ -131,7 +132,7 @@ const Index = () => {
okText="确认"
cancelText="关闭"
>
<Button type="primary" danger ghost>删除</Button>
<Button type="primary" size='small' danger >删除</Button>
</Popconfirm>,
],
},
@@ -143,6 +144,15 @@ const Index = () => {
columns={columns}
actionRef={actionRef}
cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
request={async (params = {}) => {
const jsonData: MaterialsTypes.Page = {
pageIndex: params.current || 1,


+ 132
- 129
frontend/src/pages/plantModel/process.tsx View File

@@ -18,9 +18,9 @@ export default () => {
const [fromType, setFromType] = useState<any>('table')
const ref = useRef<ProFormInstance>();
const actionRef = useRef<ActionType>();
const [selectRow,setSelectRow] = useState<processType.output>();
const [selectRow, setSelectRow] = useState<processType.output>();

const Reolod = () =>{
const Reolod = () => {
ref.current?.resetFields()
actionRef.current?.reload()
}
@@ -28,43 +28,40 @@ export default () => {
{
title: '主键',
dataIndex: 'id',
width: 160,
hideInForm: true,
hideInSearch:true
hideInSearch: true
},
{
title: '名称',
dataIndex: 'name',
ellipsis: true,
width: 120,
formItemProps:{
rules:[{ required: true, message: '此项为必填项!' }]
formItemProps: {
rules: [{ required: true, message: '此项为必填项!' }]
}
},
{
title: '类型',
hideInDescriptions: true,
dataIndex: 'processType',
width: 120,
search: false,
valueEnum:{
valueEnum: {
0: {
text: '人工',
},
1: {
},
1: {
text: '设备',
},
},
},
formItemProps:{
rules:[{ required: true, message: '此项为必填项!' }]
formItemProps: {
rules: [{ required: true, message: '此项为必填项!' }]
}
},
{
title: '描述',
dataIndex: 'des',
search: false,
},
{
@@ -74,44 +71,44 @@ export default () => {
return <>{dayjs(record.createTime).format("YYYY-MM-DD HH:mm:ss")}</>
},
search: false,
hideInForm:true
hideInForm: true
},
{
title: '操作',
valueType: 'option',
dataIndex: 'id',
fixed: 'right',
render: (text, row) => [
<Space key={+new Date() + Math.random()}>
<a onClick={() => {
setFromType('form')
setSelectRow(row)
<Button type='primary' size='small' onClick={() => {
setFromType('form')
setSelectRow(row)
ref.current?.setFieldsValue(row)
}} key={+new Date() + Math.random()} target="_blank" rel="noopener noreferrer">
编辑
</a>
</Button>
<Popconfirm
key="del"
title="确定要删除此条数据吗?"
onConfirm={() => {
processApi.Del(row).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.info("删除成功!");
Reolod()
} else {
message.error(res.errors);
}
})
}}
onCancel={() => {
message.info('已取消删除');
}}
okText="确认"
cancelText="关闭"
>
<a>
删除
</a>
key="del"
title="确定要删除此条数据吗?"
onConfirm={() => {
processApi.Del(row).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.info("删除成功!");
Reolod()
} else {
message.error(res.errors);
}
})
}}
onCancel={() => {
message.info('已取消删除');
}}
okText="确认"
cancelText="关闭"
>
<Button type='primary' danger size='small'>
删除
</Button>
</Popconfirm>
</Space>
],
@@ -120,92 +117,98 @@ export default () => {

return (
<>
{/* {fromType === 'form' ? <Button type='primary' onClick={() =>{
ref.current?.resetFields();
setFromType("table")}}>返回</Button> : ""} */}
<ProTable<processType.output>
columns={columns}
type={fromType as 'table'}
formRef={ref}
actionRef={actionRef}
onSubmit={(params: any) => {
params.id = selectRow?.id
console.log(params);
if (fromType === 'form') {
if (params.id) {
processApi.Update(params).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.info("更新成功!");
setFromType('table')
Reolod()
} else {
message.error(res.errors);
}
})
} else {
processApi.Add(params).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.info("新增成功!");
setFromType('table')
Reolod()
} else {
message.error(res.errors);
}
})
}
}
}}
form={{ignoreRules:true,// 自定义提交按钮的属性
submitter: {
onReset:()=>{
ref.current?.resetFields()
setFromType("table")
},
searchConfig: { resetText: fromType === 'form' ? '返回': '重置'}, }
}}
request={async (params = {}) => {
const jsonData: processType.queryPage = {
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
name: params.name || '',
};
const response = await processApi.PagedList(jsonData);
if (response.statusCode === 200) {
return {
data: response.data.items,
success: true,
total: response.data.total,
};
<ProTable<processType.output>
columns={columns}
type={fromType as 'table'}
formRef={ref}
actionRef={actionRef}
cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
onSubmit={(params: any) => {
params.id = selectRow?.id
console.log(params);
if (fromType === 'form') {
if (params.id) {
processApi.Update(params).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.info("更新成功!");
setFromType('table')
Reolod()
} else {
message.error(res.errors);
}
})
} else {
return {
data: [],
success: false,
total: 0,
};
processApi.Add(params).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.info("新增成功!");
setFromType('table')
Reolod()
} else {
message.error(res.errors);
}
})
}
}}
pagination={{
pageSize: 10,
showSizeChanger:false
}}
rowKey="id"
dateFormatter="string"
headerTitle="列表"
toolBarRender={() => [
<Button key="3" type="primary" onClick={() => {
setFromType('form');
setSelectRow({id:'',createTime:new Date()})
}}>
<PlusOutlined />
新建
</Button>,
]}
/>
}
}}

form={{
ignoreRules: true,// 自定义提交按钮的属性
submitter: {
onReset: () => {
ref.current?.resetFields()
setFromType("table")
},
searchConfig: { resetText: fromType === 'form' ? '返回' : '重置', submitText: fromType === 'form' ? '提交' : '查询' },
}
}}
request={async (params = {}) => {
const jsonData: processType.queryPage = {
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
name: params.name || '',
};
const response = await processApi.PagedList(jsonData);
if (response.statusCode === 200) {
return {
data: response.data.items,
success: true,
total: response.data.total,
};
} else {
return {
data: [],
success: false,
total: 0,
};
}
}}
pagination={{
pageSize: 10,
showSizeChanger: false
}}
rowKey="id"
dateFormatter="string"
headerTitle="列表"
toolBarRender={() => [
<Button key="3" type="primary" onClick={() => {
setFromType('form');
setSelectRow({ id: '', createTime: new Date() })
}}>
<PlusOutlined />
新建
</Button>,
]}
/>

</>
);
};

+ 21
- 34
frontend/src/pages/productLine/line.tsx View File

@@ -44,8 +44,6 @@ export default () => {
{
title: '主键',
dataIndex: 'id',
width: 160,

formItemProps: {
hidden: true
},
@@ -55,31 +53,10 @@ export default () => {
title: '名称',
dataIndex: 'name',
ellipsis: true,
width: 120,
formItemProps: {
rules: [{ required: true, message: '此项为必填项!' }]
}
},
// {
// title: '类型',
// hideInDescriptions: true,
// dataIndex: 'productlinestepsTypes',
// width: 120,
// search: false,
// valueEnum:{
// 0: {
// text: '人工',

// },
// 1: {
// text: '设备',

// },
// },
// formItemProps:{
// rules:[{ required: true, message: '此项为必填项!' }]
// }
// },
{
title: '描述',
dataIndex: 'describe',
@@ -98,21 +75,21 @@ export default () => {
{
title: '操作',
valueType: 'option',
fixed:'right',
render: (text, row) => [
<Space key={+new Date() + Math.random()}>
<a onClick={() => {
<Button type='primary' size='small' onClick={() => {
setFlowOpen(true)
setStepparams({ lineId: row.id })
}} key={+new Date() + Math.random()} target="_blank" rel="noopener noreferrer">
配置工序与设备
</Button>
<Button type='primary' size='small' onClick={() => {
setFromType('form')
ref.current?.setFieldsValue(row)
}} key={+new Date() + Math.random()} target="_blank" rel="noopener noreferrer">
编辑
</a>
<a onClick={() => {
setFlowOpen(true)
setStepparams({ lineId: row.id })
}} key={+new Date() + Math.random()} target="_blank" rel="noopener noreferrer">
配置工艺流程与设备
</a>
</Button>
<Popconfirm
key="del"
title="确定要删除此条数据吗?"
@@ -133,9 +110,9 @@ export default () => {
okText="确认"
cancelText="关闭"
>
<a>
<Button type='primary' danger size='small'>
删除
</a>
</Button>
</Popconfirm>
</Space>
],
@@ -185,6 +162,16 @@ export default () => {
columns={columns}
type={fromType as 'table'}
formRef={ref}
cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
actionRef={actionRef}
onSubmit={(params: any) => {
console.log(params);


+ 15
- 18
frontend/src/pages/stock/index.tsx View File

@@ -37,7 +37,7 @@ export default () => {
{
title: 'id',
dataIndex: 'id',
tip: '规则名称是唯一的 key',
tooltip: '规则名称是唯一的 key',
hideInSearch: true,
hideInTable: true,
},
@@ -51,9 +51,6 @@ export default () => {
dataIndex: 'materialName',
ellipsis: true,
hideInSearch: true
// render:() =>{

// },
},
{
title: '料仓编号',
@@ -61,27 +58,22 @@ export default () => {
// hideInSearch: true,
ellipsis: true,
},
{
title: '剩余',
dataIndex: 'des',
ellipsis: true,
hideInSearch: true,
},
{
title: '料仓容积',
dataIndex: 'volume',
ellipsis: true,
hideInSearch: true,
},
{
title: '操作',
valueType: 'option',
key: 'option',
fixed:'right',
render: (_, record) => [
<Button
key="edit"
type="primary" ghost
type="primary" size='small'
onClick={async () => {
setIsModalOpen(true);
setModelTitle('编辑信息');
@@ -121,7 +113,7 @@ export default () => {
okText="确认"
cancelText="关闭"
>
<Button type="primary" danger ghost>删除</Button>
<Button type="primary" danger size='small'>删除</Button>
</Popconfirm>,
],
},
@@ -176,13 +168,22 @@ export default () => {
columns={columns}
actionRef={actionRef}
cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
request={async (params = {}) => {
const jsonData: StockTypes.Page = {
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
name: params.name || '',
id: '',
code: ''
code: params.code
};
const response = await StockInfoAPI.PagedList(jsonData);
console.log(response);
@@ -280,10 +281,6 @@ export default () => {
<Form.Item label="料仓编号" name="code" rules={[{ required: true, message: '此项为必填项!' }]} >
<Input />
</Form.Item>

<Form.Item label="剩余" name="des" rules={[{ required: true, message: '此项为必填项!' }]}>
<Input />
</Form.Item>
<Form.Item label="料仓容积" name="volume" rules={[{ required: true, message: '此项为必填项!' }]} >
<Input />
</Form.Item>


+ 10
- 0
frontend/src/pages/system/module/index.tsx View File

@@ -90,6 +90,7 @@ const SystemManagement: React.FC = () => {
title: '操作',
valueType: 'option',
key: 'option',
fixed:'right',
render: (_, record) => [
<a key="edit" onClick={() => {
setCurrentMenu(record);
@@ -216,6 +217,15 @@ const SystemManagement: React.FC = () => {
actionRef={tableRef}
columns={menuColumns}
cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
request={async (values) => {
const params = JSON.parse(JSON.stringify(values));
delete params.current;


+ 10
- 0
frontend/src/pages/system/role/index.tsx View File

@@ -44,6 +44,7 @@ const Role: React.FC = () => {
title: '操作',
search: false,
key: 'action',
fixed:'right',
render: (_: any, record: any) => (
<Space size="middle">
<a onClick={() => onEditRole(record)}>编辑</a>
@@ -186,6 +187,15 @@ const Role: React.FC = () => {
columns={roleColumns}
actionRef={actionRef}
cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
request={async (params = {}) => {
const response = await roleApi.GetRolePagedList({
keyword: params.name,


+ 124
- 78
frontend/src/pages/system/user/index.tsx View File

@@ -3,7 +3,7 @@ import { Space, Modal, Form, Input, Button, message, Select, Popconfirm } from '
import { userApi, roleApi } from '@/api/sys/service';
import { PlusOutlined } from '@ant-design/icons';
import type { ActionType, ProColumns } from '@ant-design/pro-components';
import { ProTable } from '@ant-design/pro-components';
import { ProTable, TableDropdown } from '@ant-design/pro-components';
import styles from './index.less';

const User: React.FC = () => {
@@ -36,14 +36,14 @@ const User: React.FC = () => {
title: '登录账号',
dataIndex: 'account',
key: 'account',
hideInSearch:true,
hideInSearch: true,
},
{
title: '性别',
dataIndex: 'gender',
key: 'gender',
valueType: 'select',
hideInSearch:false,
hideInSearch: false,
valueEnum: {
0: {
text: '男'
@@ -70,7 +70,7 @@ const User: React.FC = () => {
{
title: '角色',
search: false,
hideInSearch:true,
hideInSearch: true,
dataIndex: 'roleId',
key: 'roleId',
render: (_, record) => (
@@ -93,7 +93,7 @@ const User: React.FC = () => {
dataIndex: 'status',
key: 'status',
valueType: 'select',
hideInSearch:false,
hideInSearch: false,
valueEnum: {
0: {
text: '在职'
@@ -127,64 +127,76 @@ const User: React.FC = () => {
title: '操作',
search: false,
key: 'action',
render: (_, record) => (
<Space size="middle" >
{
fixed: 'right',
valueType: 'option',

<a onClick={() => {
setIsAccountVisible(true);
formAccount.setFieldValue('tB_Employee_Id', record.id);
formAccount.setFieldValue('account', record.account!);
}}>设置登录账号</a>
render: (_, record) => [
<Popconfirm
key="del"
title="确定要删除此条数据吗?"
onConfirm={async () => {
const response = await userApi.RemoveUser(record.id!);
if (response.data === true) {
message.success('删除成功!');
actionRef.current?.reload();
} else {
message.error(response.msg || '删除失败');
}
}}
onCancel={() => {
message.info('已取消删除');
}}
okText="确认"
cancelText="关闭"
>
<a >删除员工</a>
</Popconfirm>,
<Popconfirm
key="reset"
title="确定要重置密码吗?"
onConfirm={async () => {
const response = await userApi.RestoreAccount(record.id!);
if (response.data === true) {
message.success('成功!');
} else {
message.error(response.msg || '重置失败');
}
}}
onCancel={() => {
message.info('已取消');
}}
okText="确认"
cancelText="关闭"
>
<a >重置密码</a>
</Popconfirm>,
<TableDropdown key="actionGroup"
onSelect={(key: any) => {
switch (key) {
case 'edit':
setIsPersonDetailVisible(true);
setCurrentPerson(record);
const tempRecord = JSON.parse(JSON.stringify(record));
form.setFieldsValue(tempRecord);
break;
case 'shezhi':
setIsAccountVisible(true);
formAccount.setFieldValue('tB_Employee_Id', record.id);
formAccount.setFieldValue('account', record.account!);
break;
default:
break;
}
}}

}
<Popconfirm
key="reset"
title="确定要重置密码吗?"
onConfirm={async () => {
const response = await userApi.RestoreAccount(record.id!);
if (response.data === true) {
message.success('成功!');
} else {
message.error(response.msg || '重置失败');
}
}}
onCancel={() => {
message.info('已取消');
}}
okText="确认"
cancelText="关闭"
>
<a >重置密码</a>
</Popconfirm>
<a onClick={() => {
setIsPersonDetailVisible(true);
setCurrentPerson(record);
const tempRecord = JSON.parse(JSON.stringify(record));
form.setFieldsValue(tempRecord);
}}>编辑</a>
<Popconfirm
key="del"
title="确定要删除此条数据吗?"
onConfirm={async () => {
const response = await userApi.RemoveUser(record.id!);
if (response.data === true) {
message.success('删除成功!');
actionRef.current?.reload();
} else {
message.error(response.msg || '删除失败');
}
}}
onCancel={() => {
message.info('已取消删除');
}}
okText="确认"
cancelText="关闭"
>
<Button type="primary" danger ghost>删除员工</Button>
</Popconfirm>
</Space>
),
menus={[
{ key: 'edit', name: '编辑' },
{ key: 'shezhi', name: '设置登录账号' },
]}

/>

],
},
];

@@ -269,11 +281,20 @@ const User: React.FC = () => {
columns={personelColumns}
actionRef={actionRef}
cardBordered
bordered
scroll={{ x: true }}
rowClassName={(record: any, index: number, indent: number) => {
if (index % 2 === 0) {
return ''; // 偶数行的类名
} else {
return 'even-row-background'; // 奇数行的类名
}
}}
request={async (params = {}) => {
const response = await userApi.GetUserPagedList({
name: params.name,
status: params.status,
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
gender: params.gender
@@ -296,10 +317,10 @@ const User: React.FC = () => {
rowKey="id"
pagination={{
pageSize: 10,
showSizeChanger:false
showSizeChanger: false
}}
dateFormatter="string"
headerTitle="员列表"
headerTitle="员列表"
toolBarRender={() => [
<Button key="button" icon={<PlusOutlined />} type="primary" onClick={() => onAddPerson()}>
添加
@@ -307,10 +328,30 @@ const User: React.FC = () => {
]}
/>
<Modal
maskClosable={false} footer={null} width={500} title={currentPerson.id === '' ? '新增人员' : '编辑人员'} open={isPersonDetailVisible} onOk={() => setIsPersonDetailVisible(false)} onCancel={() => setIsPersonDetailVisible(false)}>
maskClosable={false} width={500} title={currentPerson.id === '' ? '新增人员' : '编辑人员'} open={isPersonDetailVisible}
onOk={(e) => {
setIsPersonDetailVisible(false)
}
}
onCancel={() => setIsPersonDetailVisible(false)}
footer={[
<Button
key="back"
onClick={() => {
setIsPersonDetailVisible(false)
}}
>
返回
</Button>,
<Button key="submit" form="userForm" type="primary" htmlType="submit">
提交
</Button>,
]}
>
<Form
form={form}
name="basic"
id='userForm'
onFinish={onFinishPerson}
>
<Form.Item
@@ -365,16 +406,10 @@ const User: React.FC = () => {
<Select.Option value={2}>离职</Select.Option>
</Select>
</Form.Item>

<Form.Item >
<Button type="primary" htmlType="submit">
确定
</Button>
</Form.Item>
</Form>
</Modal>
<Modal
maskClosable={false} footer={null} width={500} title='用户账户' open={isAccountVisible}
maskClosable={false} width={500} title='用户账户' open={isAccountVisible}
onOk={() => {
formAccount?.resetFields();
setIsAccountVisible(false)
@@ -384,10 +419,26 @@ const User: React.FC = () => {
formAccount?.resetFields();
setIsAccountVisible(false)
}
}>
}
footer={[
<Button
key="back"
onClick={() => {
formAccount?.resetFields();
setIsAccountVisible(false)
}}
>
返回
</Button>,
<Button key="submit" form="setupUserForm" type="primary" htmlType="submit">
提交
</Button>,
]}
>
<Form
form={formAccount}
name="basic"
id='setupUserForm'
onFinish={onBindAcction}
>
<Form.Item
@@ -405,11 +456,6 @@ const User: React.FC = () => {
>
<Input placeholder='请输入自定义账号名' />
</Form.Item>
<Form.Item >
<Button type="primary" htmlType="submit">
确定
</Button>
</Form.Item>
</Form>
</Modal>
</div >


+ 2
- 0
frontend/src/types/Crafts.d.ts View File

@@ -93,6 +93,8 @@ declare namespace CraftsTypes {
*/
export interface craftsInfoOutput extends Info {
id:string,
deviceFunParams:string,
deviceStepParms:string,
}
/**
* 分页查询入参


+ 4
- 1
frontend/src/types/FinalInfo.d.ts View File

@@ -28,7 +28,10 @@ declare namespace FinalTypes {
finalId:string,
LineId:string[]
}
interface Saveconfigstatus {
finalId:string,
LineId:string
}

/**
* 删除入参


Loading…
Cancel
Save