wuyouming666
2024-03-26 bf5c42b55da25fbcbb8f92bde539a8e27d800b40
Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

# Conflicts:
# TemperingGlassModule/src/main/java/com/mes/mapper/TemperingMapper.java
# TemperingGlassModule/target/classes/application.yml
# UI-Project/src/layout/MainErpView.vue
# UI-Project/src/router/index.js
# UI-Project/src/views/UnLoadGlass/Landingindication.vue
# UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
# UI-Project/src/views/UnLoadGlass/UnLoadGlass.vue
# UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
45个文件已修改
100个文件已添加
5个文件已删除
31174 ■■■■■ 已修改文件
.gitignore 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/.vs/CacheVerticalGlassModule/v16/.suo 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/.vs/ProjectSettings.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/.vs/VSWorkspaceState.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/.vs/slnx.sqlite 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/MES-Module.iml 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/effective-pom.xml 6646 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/pom.xml 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/MesApplication.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/config/AppRunnerConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/controller/OrderTestController.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/BigStorageCage.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/DownGlassInfo.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/DownStorageCage.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/DownStorageCagedetails.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/DownWorkstation.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCageDetails.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/Engineering.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/GlassFilms.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/GlassInfo.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/Tempered.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/Tempering.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/UpPattenUsage.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/entity/UpWorkstation.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/mapper/SelectInfo.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/mapper/userInfo/SysMenuItemMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/CacheGlassService/Logic.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/ModuleB.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/MqMessage.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils.java 264 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils33.java 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/pp/SelectdppService.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/userInfo/SysErrorService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/userInfo/SysMenuItemService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/userInfo/SysMenuService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/java/com/mes/service/userInfo/UserService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/src/main/resources/application.yml 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheGlassModule/target/classes/application.yml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/.vs/CacheVerticalGlassModule/v16/.suo 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/.vs/ProjectSettings.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/.vs/VSWorkspaceState.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/.vs/slnx.sqlite 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/src/main/java/com/mes/MesApplication.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/src/main/java/com/mes/common/PlcStorageCage.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/src/main/java/com/mes/config/AppRunnerConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/src/main/java/com/mes/entity/BigStorageCage.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/src/main/java/com/mes/mapper/BigStorageCageMapper.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/src/main/java/com/mes/service/BigStorageCageService.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCage.xml 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/target/classes/application.yml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CacheVerticalGlassModule/target/classes/mapper/BigStorageCage.xml 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/BigStorageCage.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/DownGlassInfo.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/DownStorageCage.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/DownStorageCagedetails.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/DownWorkstation.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/EdgStorageCageDetails.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/Engineering.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/GlassFilms.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/GlassInfo.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/Tempering.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/UpPattenUsage.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/entity/UpWorkstation.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/mapper/LoadGlassMapper.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/src/main/java/com/mes/service/LoadGlassService.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LoadGlassModule/target/classes/application.yml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TemperingGlassModule/src/main/java/com/mes/entity/BigStorageCage.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
TemperingGlassModule/src/main/java/com/mes/entity/DownStorageCage.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
TemperingGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
TemperingGlassModule/src/main/java/com/mes/mapper/TemperingMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TemperingGlassModule/src/main/java/com/mes/service/ModuleA.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TemperingGlassModule/src/main/java/com/mes/service/ModuleB.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TemperingGlassModule/src/main/java/com/mes/service/TemperingOverService.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TemperingGlassModule/src/main/java/com/mes/service/TemperingService.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TemperingGlassModule/target/classes/application.yml 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/1.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/11.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/2.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/3.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/88.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/9.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/background.jpg 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/bigcar01.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/dipan.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/emi.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/main.css 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/s.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/shangpianji .png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/shangpianji.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/sz.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/taimian.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/user.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/woshihuancun.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/xmjc.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/assets/xmjclzh.png 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/components/ComputedTest.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/components/basic/BasicTable.vue 675 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/components/basic/product/GlassType.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/components/sd/product/GlassType.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/layout/MainErpView.vue 210 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/router/index.js 331 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/LoginView.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/RegisterView.vue 188 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/TL/Temperedlayout/SelectLayout.vue 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/TL/Temperedlayout/Temperedlayout.vue 207 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass.rar 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/Landingindication.vue 150 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue 144 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/UnLoadGlass.vue 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue 338 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/caching/caching.vue 765 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/identify/Create.vue 724 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/identify/CreateHeader.vue 739 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/identify/Details.vue 453 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/identify/Payment.vue 354 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/identify/Return.vue 593 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/identify/Select.vue 917 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/identify/Storage.vue 603 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/identify/identify.vue 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/mainIngredient/CreateIngredients.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/mainIngredient/Ingredients.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/purchaseOrder/PurchaseOrder.vue 116 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/purchaseOrder/Select.vue 1393 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/purchaseReturn/PurchaseReturn.vue 195 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/purchaseReturn/Select.vue 250 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/purchaseStorage/PurchaseStorage.vue 196 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/purchaseStorage/Select.vue 388 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/slicecage/slicecage.vue 570 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/stockBasicData/Create.vue 724 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/stockBasicData/Details.vue 453 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/stockBasicData/Payment.vue 354 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/stockBasicData/Return.vue 593 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/stockBasicData/Select.vue 275 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/stockBasicData/StockBasicData.vue 486 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/mm/stockBasicData/Storage.vue 603 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/pp/workOrder/ReleaseWorkOrder.vue 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/sd/order/Order.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/sd/order/SelectOrder.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/sd/returns/Returns.vue 434 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/sd/returns/SelectReturns.vue 304 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/vite.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UnLoadGlassModule/effective-pom.xml 6646 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -13,3 +13,13 @@
# Ignore .idea files
**/.idea/
#忽略所有.svn目录
.svn/
#忽略所有target目录
target/
#忽略所有.idea目录
.idea/
#忽略所有.iml文件
*.iml
CacheGlassModule/.vs/CacheVerticalGlassModule/v16/.suo
Binary files differ
CacheGlassModule/.vs/ProjectSettings.json
New file
@@ -0,0 +1,3 @@
{
  "CurrentProjectSetting": null
}
CacheGlassModule/.vs/VSWorkspaceState.json
New file
@@ -0,0 +1,6 @@
{
  "ExpandedNodes": [
    ""
  ],
  "PreviewInSolutionExplorer": false
}
CacheGlassModule/.vs/slnx.sqlite
Binary files differ
CacheGlassModule/MES-Module.iml
@@ -1,133 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  <component name="FacetManager">
    <facet type="web" name="Web">
      <configuration>
        <webroots />
        <sourceRoots>
          <root url="file://$MODULE_DIR$/src/main/java" />
          <root url="file://$MODULE_DIR$/src/main/resources" />
        </sourceRoots>
      </configuration>
    </facet>
    <facet type="Spring" name="Spring">
      <configuration />
    </facet>
  </component>
  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
    <output url="file://$MODULE_DIR$/target/classes" />
    <output-test url="file://$MODULE_DIR$/target/test-classes" />
    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
      <excludeFolder url="file://$MODULE_DIR$/target" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.10" level="project" />
    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.10" level="project" />
    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.1" level="project" />
    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.1" level="project" />
    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.33" level="project" />
    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
    <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.28" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.6" level="project" />
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.6" level="project" />
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.12.6" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.56" level="project" />
    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.56" level="project" />
    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.56" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.1" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.3.1" level="project" />
    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.13" level="project" />
    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.1.1" level="project" />
    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.1.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.33" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.20" level="project" />
    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.22" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.5.9" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.5.9" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.5.9" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.5.0" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.4.7" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:2.4.7" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:9.1" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.7.2" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.2" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.2" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.7.2" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.2" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.2" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.9.0" level="project" />
    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.22" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.22" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.2" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.9.0" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.3.15" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.8.4" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter-test:2.3.1" level="project" />
    <orderEntry type="library" scope="TEST" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-test-autoconfigure:2.3.1" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: com.auth0:java-jwt:3.10.3" level="project" />
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.12.6" level="project" />
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.12.6" level="project" />
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.12.6" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-codec:commons-codec:1.15" level="project" />
    <orderEntry type="library" name="Maven: org.assertj:assertj-core:3.19.0" level="project" />
    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.0" level="project" />
    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.1" level="project" />
    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.1" level="project" />
    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.1" level="project" />
    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.1" level="project" />
    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.1" level="project" />
    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.3" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:3.5.1" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.7" level="project" />
    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
    <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
    <orderEntry type="library" name="Maven: com.github.xingshuangs:iot-communication:1.4.2" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.5.9" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.15" level="project" />
    <orderEntry type="library" name="Maven: io.netty:netty-all:4.1.36.Final" level="project" />
  </component>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  <component name="MavenCustomPomFilePath">
    <option name="mavenPomFileUrl" value="file://$MODULE_DIR$/effective-pom.xml" />
  </component>
  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
    <output url="file://$MODULE_DIR$/../../Code/HangZhouMes/CacheGlassModule/target/classes" />
    <output-test url="file://$MODULE_DIR$/../../Code/HangZhouMes/CacheGlassModule/target/test-classes" />
    <exclude-output />
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>
CacheGlassModule/effective-pom.xml
New file
Diff too large
CacheGlassModule/pom.xml
@@ -9,9 +9,9 @@
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.MES-Module</groupId>
    <artifactId>MES-Module</artifactId>
    <artifactId>MES-UnLoadGlassModule</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>MES-Module</name>
    <name>MES-UnLoadGlassModule</name>
    <description>project for Spring Boot</description>
    <properties>
        <java.version>1.8</java.version>
@@ -115,7 +115,72 @@
            <artifactId>spring-boot-starter-cache</artifactId>
        </dependency>
<!--websocket-->
        <!--  rabbitmq    -->
        <dependency>
            <groupId>com.rabbitmq</groupId>
            <artifactId>amqp-client</artifactId>
            <version>5.13.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-amqp</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.12.2</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.13.0</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.13.0</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>2.13.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.xingshuangs</groupId>
            <artifactId>iot-communication</artifactId>
            <version>1.4.2</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.9</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>5.2.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>5.2.4</version>
        </dependency>
        <!--websocket-->
<!--        <dependency>-->
<!--            <groupId>org.springframework.boot</groupId>-->
<!--            <artifactId>spring-boot-starter-websocket</artifactId>-->
@@ -126,6 +191,10 @@
            <artifactId>netty-all</artifactId>
            <version>4.1.36.Final</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
    </dependencies>
CacheGlassModule/src/main/java/com/mes/MesApplication.java
@@ -1,6 +1,9 @@
package com.mes;
import com.mes.common.PlcTools.S7object;
import com.mes.mapper.SelectInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
@@ -16,10 +19,10 @@
    public static void main(String[] args) {
        SpringApplication.run(MesApplication.class, args);
        try {
           // System.out.println(" [x] Sent 3");
            //new NettyServer(12345).start();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
CacheGlassModule/src/main/java/com/mes/config/AppRunnerConfig.java
@@ -16,7 +16,7 @@
    public void run(ApplicationArguments args) throws Exception {
        // TODO Auto-generated method stub
        //
        System.out.println("启动完成");
        System.out.println("启动完成1");
 
 
    }
CacheGlassModule/src/main/java/com/mes/controller/OrderTestController.java
@@ -1,22 +1,35 @@
package com.mes.controller;
import com.mes.mapper.OrderTestMapper;
import com.mes.mapper.SelectInfo;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.mes.common.Result;
import com.mes.entity.Tempered;
import com.mes.service.pp.SelectdppService;
//@CrossOrigin  //解决单个controller 跨域问题
@RestController
@RequestMapping("/order11111111")
@RequestMapping("/Temper")
public class OrderTestController {
    @Autowired
    private OrderTestMapper orderMapper;
    private SelectInfo SelectInfo;
//    @GetMapping //查询order表结果集
//    public Result index(){
//        return Result.seccess(orderMapper.findAll());
//
//    }
    @Autowired
    private SelectdppService SelectppService;
   @GetMapping("/Tindex") //查询order表结果集
   @ResponseBody
   public Result index(){
       System.out.println(1);
       List<Tempered> h=SelectppService.getSelectTempered("P24030707");
       System.out.println(h.size());
       return Result.seccess(h);
   }
//
//    @PostMapping  //插入
//    public Integer save(@RequestBody Order order) {
CacheGlassModule/src/main/java/com/mes/entity/BigStorageCage.java
New file
@@ -0,0 +1,18 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`big_storage_cage`")
public class BigStorageCage {
    @TableId(type = IdType.AUTO)
    private  Integer id;//大理片笼表id
    private  Integer device_id;//设备id
    private  String slot;//栅格号
    private  String enable_state;//启用状态
    private  Integer remain_width;//剩余宽度
}
CacheGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java
New file
@@ -0,0 +1,27 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`big_storage_cage_details`")
public class BigStorageCageDetails {
    @TableId(type = IdType.AUTO)
    private  Integer id;//大理片笼详情表id
    private  Integer deviceid;//设备id
    private  Integer slot;//栅格号
    private  Integer glassid;//玻璃id
    private  Integer sequence;//小片在格内的顺序
    private  String flowcardid;//流程卡号
    private  Integer glasstype;//玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer temperinglayoutid;//钢化版图id
    private  Integer temperingfeedsequence;//钢化版图片序
    private  Integer state;//状态
    private  Integer gap;//玻璃间隙
}
CacheGlassModule/src/main/java/com/mes/entity/DownGlassInfo.java
New file
@@ -0,0 +1,19 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`down_glass_info`")
public class DownGlassInfo {
    @TableId(type = IdType.AUTO)
    private  Integer id;//下片玻璃信息表id
    private  String flowcardid;//流程卡号
    private  Integer sequence;//顺序
    private  Integer width;//宽
    private  Integer height;//高
    private  Integer thickness;//厚度
}
CacheGlassModule/src/main/java/com/mes/entity/DownStorageCage.java
New file
@@ -0,0 +1,18 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`down_storage_cage`")
public class DownStorageCage {
    @TableId(type = IdType.AUTO)
    private  Integer id;//下片前理片笼表id
    private  Integer deviceid;//设备id
    private  String slot;//栅格号
    private  String enablestate;//启用状态
    private  Integer remainwidth;//剩余
}
CacheGlassModule/src/main/java/com/mes/entity/DownStorageCagedetails.java
New file
@@ -0,0 +1,27 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`down_storage_cage_details`")
public class DownStorageCagedetails {
    @TableId(type = IdType.AUTO)
    private  Integer id;//下片前理片笼明细表id
    private  Integer deviceid;//设备id
    private  Integer slot;//栅格号
    private  Integer glassid;//玻璃id
    private  Integer sequence;//小片在格内的顺序
    private  String flow_card_id;//流程卡号
    private  Integer glass_type;//玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer temperinglayoutid;//钢化版图id
    private  Integer tempering_feed_sequence;//钢化版图片序
    private  Integer state;//状态
    private  Integer gap;//玻璃间隙
}
CacheGlassModule/src/main/java/com/mes/entity/DownWorkstation.java
New file
@@ -0,0 +1,19 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`down_workstation`")
public class DownWorkstation {
    @TableId(type = IdType.AUTO)
    private  Integer id;//下片工位表id
    private  Integer flowcard_id;//工位id
    private  String glass_type;//流程卡号
    private  Integer width;//设备id
    private  Integer height;//启用状态
    private  Integer thickness;//工作状态
}
CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java
New file
@@ -0,0 +1,18 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`edg_storage_cage`")
public class EdgStorageCage {
    @TableId(type = IdType.AUTO)
    private  Integer id;//磨边前理片笼表id
    private  Integer flowcard_id;//设备id
    private  String glass_type;//栅格号
    private  String height;//启用状态
    private  Integer thickness;//剩余
}
CacheGlassModule/src/main/java/com/mes/entity/EdgStorageCageDetails.java
New file
@@ -0,0 +1,30 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`edg_storage_cage_details`")
public class EdgStorageCageDetails {
    @TableId(type = IdType.AUTO)
    private  Integer id;//磨边前理片笼详情表id
    private  Integer deviceid;//设备id
    private  Integer slot;//栅格号
    private  Integer glassid;//玻璃id
    private  Integer sequence;//小片在格内的顺序
    private  String flowcardid;//流程卡号
    private  Integer glasstype;//玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Double edgwidth;//磨前宽
    private  Double edgheight;//磨前高
    private  Integer temperinglayoutid;//钢化版图id
    private  Integer temperingfeedsequence;//钢化版图片序
    private  Integer patternsequence;//原片顺序
    private  Integer state;//状态
    private  Integer gap;//玻璃间隙
}
CacheGlassModule/src/main/java/com/mes/entity/Engineering.java
New file
@@ -0,0 +1,30 @@
package com.mes.entity;
import java.math.BigInteger;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`engineering`")
public class Engineering {
    @TableId(type = IdType.AUTO)
    private  BigInteger id;//工程表id
    private  Integer engineerid;//工程号
    private  String engineername;//工程名称
    private  Double avgavailability;//平均利用率
    private  Double validavailability;//有效利用率
    private  Double lastavailability;//尾片利用率
    private  Integer state;//状态
    private  Integer glasstotal;//小片总数
    private  Double glasstotalarea;//小片总面积
    private  Integer planpatterntotal;//计划原片总数
    private  Double planpatterntotalarea;//计划原片总面积
    private  Integer realitypatterntotal;//实际原片总数
    private  Double realitypatterntotalarea;//实际原片总面积
    private  Integer filmsid;//膜系id
    private  String notes;//备注
}
CacheGlassModule/src/main/java/com/mes/entity/GlassFilms.java
New file
@@ -0,0 +1,17 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`glass_films`")
public class GlassFilms {
    @TableId(type = IdType.AUTO)
    private  Integer id;//膜系表id
    private  Integer films_id;//膜系id
    private  String films_name;//膜系
}
CacheGlassModule/src/main/java/com/mes/entity/GlassInfo.java
New file
@@ -0,0 +1,34 @@
package com.mes.entity;
import java.math.BigInteger;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`glass_info`")
public class GlassInfo {
    @TableId(type = IdType.AUTO)
    private  BigInteger id;//玻璃信息表id
    private  String flowcardid;//流程卡
    private  Integer glasstype;//流程卡玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer filmsid;//膜系
    private  Double edgwidth;//磨前宽
    private  Double edgheight;//磨前高
    private  Integer ismultiple;//是否配片
    private  Double maxwidth;//配片最大宽
    private  Double maxheight;//配片最大高
    private  Integer ishorizontal;//钢化是否接受横放
    private  Integer patternsequence;//原片顺序
    private  Integer temperinglayoutid;//钢化版图id
    private  Integer temperingfeedsequence;//钢化版图片序
    private  Integer xcoordinate;//x坐标
    private  Integer ycoordinate;//y坐标
    private  Integer angle;//旋转角度(逆时针)
}
CacheGlassModule/src/main/java/com/mes/entity/Tempered.java
New file
@@ -0,0 +1,35 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("v_optimize_heat_layout")
public class Tempered {
    private  String projectno;//工程号
    private  String glassthickness;//厚度
    private  String glasstype;//类型
    private  String loadrate;//装载率
    private  String furnacesqty;//钢化炉数
    private  String glasstotal;//玻璃数量
    private  String glasstotalarea;//玻璃面积
    private  String layoutid;//版图ID
    private  String layoutrate;//当前版图装载率
    private  String glassqty;//当前版图玻璃数量
    private  String loadwidth;//炉宽
    private  String loadlength;//炉长
    private  String xspace;//X间隔
    private  String width;//宽
    private  String height;//高
    private  String yspace;//Y间隔
    private  String xaxis;//坐标
    private  String yaxis;//坐标
    private  String rotateangle;//旋转角度
    private  String processid;//流程卡
    private  String id;//版图优化玻璃ID
    private  String glassid;//玻璃ID
    private  String sort;//玻璃ID
}
CacheGlassModule/src/main/java/com/mes/entity/Tempering.java
New file
@@ -0,0 +1,27 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`tempering_glass_info`")
public class Tempering {
    @TableId(type = IdType.AUTO)
    private  Integer id;//钢化小片信息表id
    private  String flowcard_id;//流程卡
    private  Integer glass_type;//流程卡玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer filmsid;//膜系
    private  Integer ishorizontal;//钢化是否接受横放
    private  Integer tempering_layout_id;//钢化版图id
    private  Integer tempering_feed_sequence;//钢化版图片序
    private  Integer x_coordinate;//x坐标
    private  Integer y_coordinate;//y坐标
    private  Integer angle;//旋转角度(逆时针)
    private  Integer state;//状态
}
CacheGlassModule/src/main/java/com/mes/entity/UpPattenUsage.java
New file
@@ -0,0 +1,21 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`up_patten_usage`")
public class UpPattenUsage {
    @TableId(type = IdType.AUTO)
    private  Integer id;//原片使用情况表id
    private  Integer engineeringid;//工程号
    private  Integer filmsid;//膜系id
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer layoutsequence;//原片版图片序
    private  Integer state;//状态
}
CacheGlassModule/src/main/java/com/mes/entity/UpWorkstation.java
New file
@@ -0,0 +1,23 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`up_workstation`")
public class UpWorkstation {
    @TableId(type = IdType.AUTO)
    private  Integer id;//上片工位表id
    private  Integer workstationid;//工位号
    private  Integer deviceid;//设备id
    private  Integer enablestate;//启用状态
    private  Integer workstate;//工作状态
    private  Double patternwidth;//原片宽
    private  Double patternheigth;//原片高
    private  Double patternthickness;//原片厚度
    private  Integer filmsid;//膜系
    private  Integer number;//数量
}
CacheGlassModule/src/main/java/com/mes/mapper/SelectInfo.java
New file
@@ -0,0 +1,30 @@
package com.mes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mes.entity.GlassInfo;
import com.mes.entity.OrderTest;
import com.mes.entity.Tempered;
import java.util.List;
import org.apache.ibatis.annotations.*;
@Mapper
public interface SelectInfo {
    //玻璃信息  按ID查询
    @Select("select * from `glass_info` where id=#{id}")
    GlassInfo SelectGlassId(String id);
    //钢化按工程查询
    @Select("select * from `v_optimize_heat_layout` where project_no=#{projeceid} ")
    List<Tempered> SelectTempered(String projeceid);
//
//    @Insert("INSERT `order`(order_id)VALUES(#{order_id})")
//    Integer insert(Order order);
//
//    @Delete("delete from `order` where id=#{id}")
//    Integer deleteById(@Param("id") Integer id);
//
//    @Update("update `order` set order_id=#{order_id} where id=#{id}")
//    Integer update(@Param("id") Integer id,@Param("order_id") String order_id);
}
CacheGlassModule/src/main/java/com/mes/mapper/userInfo/SysMenuItemMapper.java
@@ -2,11 +2,15 @@
import com.mes.entity.userInfo.SysMenuItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface SysMenuItemMapper {
     @Select("select * from `sys_menu_item` as a where a.state=1 order by a.menuId,a.listSort;")
     List<SysMenuItem> findAll() ;
}
CacheGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java
@@ -15,7 +15,7 @@
    List<User> findAll();
    User findOne(Integer id);
    @Select("select user_name FROM `user` where login_name=#{LoginName}  ")
    User findOneLoginName(String LoginName);
CacheGlassModule/src/main/java/com/mes/service/CacheGlassService/Logic.java
New file
@@ -0,0 +1,77 @@
package com.mes.service.CacheGlassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mes.common.PlcTools.S7control;
import com.mes.entity.GlassInfo;
import com.mes.mapper.SelectInfo;
@Service
public class Logic {
    @Autowired
    private SelectInfo selectInfo;
    //识别逻辑
    public void identify(String Number){
        //查询任务
        // PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
        // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1);
        boolean isexist=isExist(Number);
        if (isexist) {
            //存在逻辑    1.添加信息 2.回复PLC存在
            //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1);
        }else {
            //不存在逻辑  1.回复PLC不存在
            //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 2);
        }
    }
    //理片 进
    public void process(String imagePath){
        //查询消息队列里的玻璃
        //返回结果
    }
    //理片 出
    public void processOut(String imagePath){
        //查询任务
        //返回结果
    }
    //磨边
    public void processMb(String imagePath){
        //查询任务
        //返回结果
    }
    //查询消息队列里此玻璃ID的数据
    public boolean SelectMessageId(String Number){
        //查询是否存在
        GlassInfo GlassInfo=selectInfo.SelectGlassId(Number);
        if(GlassInfo==null){
            return false;//返回 不存在
        }
        return true;//返回 存在
    }
    //删除消息队列里此玻璃ID的数据
    public boolean DeleteMessageId(String Number){
        //查询是否存在
        GlassInfo GlassInfo=selectInfo.SelectGlassId(Number);
        if(GlassInfo==null){
            return false;//返回 不存在
        }
        return true;//返回 存在
    }
    //是否存在此编号玻璃
    public boolean isExist(String Number){
        //查询是否存在
        GlassInfo GlassInfo=selectInfo.SelectGlassId(Number);
        if(GlassInfo==null){
            return false;//返回 不存在
        }
        return true;//返回 存在
    }
}
CacheGlassModule/src/main/java/com/mes/service/ModuleB.java
New file
@@ -0,0 +1,38 @@
package com.mes.service;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.DeliverCallback;
import java.util.HashMap;
import java.util.Map;
public class ModuleB {
    private final static String QUEUE_NAME = "hangzhou2";
    public static void main(String[] argv) throws Exception {
        // 创建连接工厂
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost("10.153.19.150");
        //factory.setHost("localhost");
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            Map<String, Object> args = new HashMap<>();
            args.put("x-max-length-bytes",20000);
//            args.put("x-max-length",5000);
            channel.queueDeclare(QUEUE_NAME, false, false, false, args);
            // 创建消费者
            DeliverCallback deliverCallback = (consumerTag, delivery) -> {
                String receivedMessage = new String(delivery.getBody(), "UTF-8");
                System.out.println(" [x] Received '" + receivedMessage + "'");
            };
            // 开始消费消息
          channel.basicConsume(QUEUE_NAME, true, deliverCallback, consumerTag -> {
           });
        }
    }
}
CacheGlassModule/src/main/java/com/mes/service/MqMessage.java
New file
@@ -0,0 +1,56 @@
package com.mes.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class MqMessage {
    @Autowired
    private RabbitMQUtils rabbitMQUtils;
    public boolean Add(String message, String queueName,String messageId){
        try {
            return rabbitMQUtils.sendMessageWithId(message, queueName,messageId);
        } catch (Exception e) {
            // TODO: handle exception
            return false;//异常时错误
        }
    }
    //根据ID查找消息
    public String SelectId(String queueName,boolean isDelete,String messageId){
        try {
            String content=rabbitMQUtils.consumeMessageById(messageId,queueName,isDelete);
            return content;
        } catch (Exception e) {
            // TODO: handle exception
            return null;//异常时错误
        }
    }
    public boolean Delete(String queueName,String messageId){
        try
        {
            rabbitMQUtils.consumeMessageById(messageId,queueName,false);
            return true;
        }catch(Exception e){
            return false;
        }
    }
    //无修改
    public void Update(){
    }
}
CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils.java
New file
@@ -0,0 +1,264 @@
package com.mes.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rabbitmq.client.*;
import java.util.*;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import org.springframework.stereotype.Repository;
@Repository
public class RabbitMQUtils {
    // ObjectMapper对象,用于序列化和反序列化JSON
    private static ObjectMapper objectMapper = new ObjectMapper();
    private static String host = "10.153.19.150"; // RabbitMQ 主机名
    private static Map<String, Object> args = new HashMap<>(); // 队列参数
    static {
        // 设置队列参数
        args.put("x-max-length-bytes", 1024 * 1024);
    }
    //    private static  Map<String, Object> args = new HashMap<>();
//     args.put("x-max-length-bytes",1024 * 1024);
    // 发送消息到 RabbitMQ 队列中
    public String sendMessage(String message, String queueName) throws Exception {
        // 创建连接工厂并设置主机名
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        // 使用 try-with-resources 语句创建连接和通道,并发送消息
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            channel.queueDeclare(queueName, false, false, false, args);
            // 发布消息到队列
            channel.basicPublish("", queueName, null, message.getBytes("UTF-8"));
            System.out.println(" [x] Sent '" + message + "' to queue '" + queueName + "'");
        }
        return message;
    }
    // 从 RabbitMQ 队列中接收消息
    public String receiveMessage(String queueName) throws Exception {
        // 创建连接工厂并设置主机名
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        // 创建阻塞队列
        BlockingQueue<String> messageQueue = new ArrayBlockingQueue<>(1);
        // 使用 try-with-resources 语句创建连接和通道,并接收消息
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            channel.queueDeclare(queueName, false, false, false, args);
            // 设置消息接收回调
            DeliverCallback deliverCallback = (consumerTag, delivery) -> {
                String receivedMessage = new String(delivery.getBody(), "UTF-8");
               // System.out.println(" [x] Received '" + receivedMessage + "'");
                // 将接收到的消息放入阻塞队列
                try {
                    messageQueue.put(receivedMessage);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            };
            // 消费队列中的消息
            channel.basicConsume(queueName, true, deliverCallback, consumerTag -> {
            });
            // 阻塞并等待获取消息
            return messageQueue.take();
        }
    }
    //获取消息  并消费?
    public List<String> readMessage(String queueName,boolean is) throws Exception {
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        List<String> messages = new ArrayList<>();
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            boolean autoAck = false;
            GetResponse response = channel.basicGet(queueName, autoAck);
            if (response != null) {
                String message = new String(response.getBody(), "UTF-8");
                messages.add(message);
                // 手动确认消息处理完成
                if(is){
                    long deliveryTag = response.getEnvelope().getDeliveryTag();
                    channel.basicAck(deliveryTag, false);
                }
            }
        }
        return messages;
    }
    private static Set<String> sentMessageIds = new HashSet<>();
//根据id发送消息
    public boolean sendMessageWithId(String queueName, String message, String messageId) throws Exception {
        if (sentMessageIds.contains(messageId)) {
            System.err.println("Message with ID " + messageId + " has already been sent.");
            return false; // 消息重复,发送失败
        }
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) {
            channel.queueDeclare(queueName, false, false, false, args);
            AMQP.BasicProperties properties = new AMQP.BasicProperties.Builder()
                    .messageId(messageId)
                    .build();
            channel.basicPublish("", queueName, properties, message.getBytes("UTF-8"));
            System.out.println("Sent message with ID: " + messageId);
            sentMessageIds.add(messageId); // 将 messageId 添加到已发送集合中
            return true; // 消息成功发送
        } catch (Exception e) {
            System.err.println("Failed to send message: " + e.getMessage());
            return false; // 消息发送失败
        }
    }
    //根据id查找消息   是否删除
    public String consumeMessageById(String messageId,String queueName,boolean isDelete) throws Exception {
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) {
            channel.queueDeclare(queueName, false, false, false, args);
            GetResponse response;
            while ((response = channel.basicGet(queueName, false)) != null) {
                String receivedMessage = new String(response.getBody(), "UTF-8");
                if (response.getProps().getMessageId().equals(messageId)) {
                    if(isDelete){
                        long deliveryTag = response.getEnvelope().getDeliveryTag();
                        channel.basicAck(deliveryTag, false);
                    }
                    System.out.println("Selected message: "+messageId+ receivedMessage);
                    return receivedMessage; // 返回选定的消息内容
                } else {
                    // 对于不符合条件的消息,进行 Nack 操作
//                    long deliveryTag = response.getEnvelope().getDeliveryTag();
//                    channel.basicNack(deliveryTag, false, true);
                    return "Specified message not found in the queue.";
                }
            }
            return "Specified message not found in the queue.";
        }
    }
//     //消费指定消息
//     public String consumeSelectedMessage(int messageToConsume, String queueName) throws Exception {
//         ConnectionFactory factory = new ConnectionFactory();
//         factory.setHost(host);
//         try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) {
//             channel.queueDeclare(queueName, false, false, false, args);
//             for (int i = 0; i < messageToConsume; i++) {
//                 GetResponse response = channel.basicGet(queueName, false);
//                 if (response == null) {
//                     return "Queue does not have enough messages.";
//                 }
// //                long deliveryTag = response.getEnvelope().getDeliveryTag();
// //                channel.basicAck(deliveryTag, false);
//             }
//             GetResponse selectedResponse = channel.basicGet(queueName, false);
//             if (selectedResponse != null) {
//                 byte[] body = selectedResponse.getBody();
//                 String selectedMessage = new String(body, "UTF-8");
//                 long deliveryTag = selectedResponse.getEnvelope().getDeliveryTag();
//                 channel.basicAck(deliveryTag, false);
//                 return selectedMessage;
//             } else {
//                 return "Specified message not found in the queue.";
//             }
//         }
//     }
    // 发送 JSON 消息到队列
    public boolean sendJsonMessage(Object message, String queueName) throws Exception {
        // 创建连接工厂并设置主机名
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        // 使用 try-with-resources 语句创建连接和通道,并发送 JSON 消息
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            channel.queueDeclare(queueName, false, false, false, args);
            // 将对象转换为 JSON 字符串
            String jsonMessage = objectMapper.writeValueAsString(message);
            // 发布 JSON 消息到队列
            channel.basicPublish("", queueName, null, jsonMessage.getBytes());
            System.out.println(" [x] Sent JSON message: '" + jsonMessage + "' to queue '" + queueName + "'");
            return true; // 发送消息成功
        } catch (Exception e) {
            e.printStackTrace();
            return false; // 发送消息失败
        }
    }
    // 接收 JSON 消息并转换为对象
    public <T> T receiveJsonMessage(Class<T> valueType, String queueName) throws Exception {
        // 创建连接工厂并设置主机名
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        // 使用 try-with-resources 语句创建连接和通道,并接收 JSON 消息
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            channel.queueDeclare(queueName, false, false, false, args);
            // 获取队列中的消息
            GetResponse response = channel.basicGet(queueName, true);
            if (response != null) {
                byte[] body = response.getBody();
                String jsonMessage = new String(body, "UTF-8");
                System.out.println(" [x] Received JSON message: '" + jsonMessage + "' from queue '" + queueName + "'");
                // 将 JSON 消息转换为对象
                return objectMapper.readValue(jsonMessage, valueType);
            } else {
                return null;
            }
        } catch (Exception e) {
            e.printStackTrace();
            return null; // 接收消息失败
        }
    }
}
//    RabbitMQUtils.sendMessage("Hello, world!", "module_queue");
//RabbitMQUtils.receiveMessage("module_queue");
//RabbitMQUtils.sendJsonMessage(someObject, "another_queue");
//RabbitMQUtils.receiveJsonMessage(SomeClass.class, "another_queue");
// 需要将 someObject 替换为你要发送的对象,并将 SomeClass 替换为你要接收并转换的对象类型。
CacheGlassModule/src/main/java/com/mes/service/RabbitMQUtils33.java
New file
@@ -0,0 +1,178 @@
package com.mes.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rabbitmq.client.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
public class RabbitMQUtils33 {
    // ObjectMapper对象,用于序列化和反序列化JSON
    private static ObjectMapper objectMapper = new ObjectMapper();
    private static String host = "10.153.19.150"; // RabbitMQ 主机名
    private static Map<String, Object> args = new HashMap<>(); // 队列参数
    static {
        // 设置队列参数
        args.put("x-max-length-bytes", 1024 * 1024);
    }
    //    private static  Map<String, Object> args = new HashMap<>();
//     args.put("x-max-length-bytes",1024 * 1024);
    // 发送消息到 RabbitMQ 队列中
    public boolean sendMessage(String message, String queueName) throws Exception {
        // 创建连接工厂并设置主机名
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        // 使用 try-with-resources 语句创建连接和通道,并发送消息
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            channel.queueDeclare(queueName, false, false, false, args);
            // 发布消息到队列
            channel.basicPublish("", queueName, null, message.getBytes("UTF-8"));
            System.out.println(" [x] Sent '" + message + "' to queue '" + queueName + "'");
            return true;
        } catch (Exception e) {
            // TODO: handle exception
            return false;
        }
    }
    // 从 RabbitMQ 队列中接收消息
    public String receiveMessage(String queueName) throws Exception {
        // 创建连接工厂并设置主机名
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        // 创建阻塞队列
        BlockingQueue<String> messageQueue = new ArrayBlockingQueue<>(1);
        // 使用 try-with-resources 语句创建连接和通道,并接收消息
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            channel.queueDeclare(queueName, false, false, false, args);
            // 设置消息接收回调
            DeliverCallback deliverCallback = (consumerTag, delivery) -> {
                String receivedMessage = new String(delivery.getBody(), "UTF-8");
               // System.out.println(" [x] Received '" + receivedMessage + "'");
                // 将接收到的消息放入阻塞队列
                try {
                    messageQueue.put(receivedMessage);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            };
            // 消费队列中的消息
            channel.basicConsume(queueName, true, deliverCallback, consumerTag -> {
            });
            // 阻塞并等待获取消息
            return messageQueue.take();
        }
    }
    public List<String> readMessage(String queueName,boolean isDelete) throws Exception {
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        List<String> messages = new ArrayList<>();
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            boolean autoAck = false;
            GetResponse response = channel.basicGet(queueName, autoAck);
            if (response != null) {
                String message = new String(response.getBody(), "UTF-8");
                messages.add(message);
                // 手动确认消息处理完成
                if (isDelete) {
                    long deliveryTag = response.getEnvelope().getDeliveryTag();
                    channel.basicAck(deliveryTag, false);
                }
            }
        }
        return messages;
    }
    // 发送 JSON 消息到队列
    public static boolean sendJsonMessage(Object message, String queueName) throws Exception {
        // 创建连接工厂并设置主机名
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        // 使用 try-with-resources 语句创建连接和通道,并发送 JSON 消息
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            channel.queueDeclare(queueName, false, false, false, args);
            // 将对象转换为 JSON 字符串
            String jsonMessage = objectMapper.writeValueAsString(message);
            // 发布 JSON 消息到队列
            channel.basicPublish("", queueName, null, jsonMessage.getBytes());
            System.out.println(" [x] Sent JSON message: '" + jsonMessage + "' to queue '" + queueName + "'");
            return true; // 发送消息成功
        } catch (Exception e) {
            e.printStackTrace();
            return false; // 发送消息失败
        }
    }
    // 接收 JSON 消息并转换为对象
    public static <T> T receiveJsonMessage(Class<T> valueType, String queueName) throws Exception {
        // 创建连接工厂并设置主机名
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(host);
        // 使用 try-with-resources 语句创建连接和通道,并接收 JSON 消息
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            channel.queueDeclare(queueName, false, false, false, args);
            // 获取队列中的消息
            GetResponse response = channel.basicGet(queueName, true);
            if (response != null) {
                byte[] body = response.getBody();
                String jsonMessage = new String(body, "UTF-8");
                System.out.println(" [x] Received JSON message: '" + jsonMessage + "' from queue '" + queueName + "'");
                // 将 JSON 消息转换为对象
                return objectMapper.readValue(jsonMessage, valueType);
            } else {
                return null;
            }
        } catch (Exception e) {
            e.printStackTrace();
            return null; // 接收消息失败
        }
    }
}
//    RabbitMQUtils.sendMessage("Hello, world!", "module_queue");
//RabbitMQUtils.receiveMessage("module_queue");
//RabbitMQUtils.sendJsonMessage(someObject, "another_queue");
//RabbitMQUtils.receiveJsonMessage(SomeClass.class, "another_queue");
// 需要将 someObject 替换为你要发送的对象,并将 SomeClass 替换为你要接收并转换的对象类型。
CacheGlassModule/src/main/java/com/mes/service/pp/SelectdppService.java
New file
@@ -0,0 +1,40 @@
package com.mes.service.pp;
import cn.hutool.core.util.StrUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.mes.common.CacheUtil;
import com.mes.common.Result;
import com.mes.entity.GlassInfo;
import com.mes.entity.Tempered;
import com.mes.entity.userInfo.User;
import com.mes.mapper.SelectInfo;
import com.mes.mapper.userInfo.UserMapper;
import com.mes.controller.dto.UserDTO;
import com.mes.tools.TokenTools;
import org.apache.ibatis.jdbc.Null;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@DS("pp")
public class SelectdppService {
    @Autowired
    private SelectInfo SelectInfo;
    public GlassInfo getUserInfo(String process_id){
        return SelectInfo.SelectGlassId(process_id);
    }
    public List<Tempered> getSelectTempered(String process_id){
        return SelectInfo.SelectTempered(process_id);
    }
}
CacheGlassModule/src/main/java/com/mes/service/userInfo/SysErrorService.java
@@ -7,7 +7,7 @@
import org.springframework.stereotype.Service;
@Service
@DS("user_info")
@DS("hangzhoumes")
public class SysErrorService {
    private final SysErrorMapper sysErrorMapper;
CacheGlassModule/src/main/java/com/mes/service/userInfo/SysMenuItemService.java
@@ -9,7 +9,7 @@
import java.util.List;
@Service
@DS("user_info")
@DS("hangzhoumes")
public class SysMenuItemService {
    @Autowired
    SysMenuItemMapper sysMenuItemMapper;
CacheGlassModule/src/main/java/com/mes/service/userInfo/SysMenuService.java
@@ -9,7 +9,7 @@
import java.util.List;
@Service
@DS("user_info")
@DS("hangzhoumes")
public class SysMenuService {
    @Autowired
    private SysMenuMapper sysMenuMapper;
CacheGlassModule/src/main/java/com/mes/service/userInfo/UserService.java
@@ -18,7 +18,7 @@
import java.util.List;
@Service
@DS("user_info")
@DS("hangzhoumes")
public class UserService {
    @Autowired
CacheGlassModule/src/main/resources/application.yml
@@ -1,32 +1,17 @@
server:
  port: 8081
  port: 8080
  servlet:
   context-path: /mesModuleTools
spring:
  datasource:
    dynamic:
      primary: user_info #设置默认的数据源或者数据源组,默认值即为master
      primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master
      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
      datasource:
        user_info:
          url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        sd:
          url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        mm:
          url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        pp:
          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
        hangzhoumes:
          url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
CacheGlassModule/target/classes/application.yml
@@ -7,26 +7,11 @@
spring:
  datasource:
    dynamic:
      primary: user_info #设置默认的数据源或者数据源组,默认值即为master
      primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master
      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
      datasource:
        user_info:
          url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        sd:
          url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        mm:
          url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        pp:
          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
        hangzhoumes:
          url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
CacheVerticalGlassModule/.vs/CacheVerticalGlassModule/v16/.suo
Binary files differ
CacheVerticalGlassModule/.vs/ProjectSettings.json
New file
@@ -0,0 +1,3 @@
{
  "CurrentProjectSetting": null
}
CacheVerticalGlassModule/.vs/VSWorkspaceState.json
New file
@@ -0,0 +1,6 @@
{
  "ExpandedNodes": [
    ""
  ],
  "PreviewInSolutionExplorer": false
}
CacheVerticalGlassModule/.vs/slnx.sqlite
Binary files differ
CacheVerticalGlassModule/src/main/java/com/mes/MesApplication.java
@@ -21,4 +21,4 @@
            throw new RuntimeException(e);
        }
    }
}
}
CacheVerticalGlassModule/src/main/java/com/mes/common/PlcStorageCage.java
New file
@@ -0,0 +1,50 @@
package com.mes.common;
import com.mes.common.PlcTools.S7control;
import com.mes.entity.BigStorageCage;
import com.mes.entity.BigStorageCageDetails;
import com.mes.service.BigStorageCageService;
public class PlcStorageCage extends Thread {
    private BigStorageCageService bigStorageCageService;
    private S7control s7control;
    public void run() {
        try {
            Thread.sleep(1000);
            String glassid="11111";
            String tempering_layout_id="123";
            String tempering_feed_sequence="123";
            //识别台
            //获取识别台请求
            //根据请求的玻璃id从消息空间站获取玻璃信息
            //检测识别台是否有玻璃
                //有:允许清洗机出片信号关闭
                //无:允许清洗机出片信息开启
            //获取进片请求
                //有请求时
                    //获取请求的玻璃id
                    //根据玻璃id获取玻璃信息判断是否与消息队列一致
                    //不一致:标记玻璃为破损
                    //一致:
                        //获取笼内进片侧相同同钢化版图的玻璃片序+1等于当前玻璃id钢化片序的格子
                        //将消息队列的信息放入实例中
                        BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails();
                        bigStorageCageDetails.setGlassId("1111");
                        bigStorageCageDetails.setTemperingLayoutId(123);
                        bigStorageCageDetails.setTemperingFeedSequence(3);
                        BigStorageCageDetails SlotInfo=bigStorageCageService.FeedGlass(bigStorageCageDetails);
                        //发送给plc
            //出片请求
                //获取当前
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
CacheVerticalGlassModule/src/main/java/com/mes/config/AppRunnerConfig.java
@@ -16,7 +16,7 @@
    public void run(ApplicationArguments args) throws Exception {
        // TODO Auto-generated method stub
        //
        System.out.println("启动完成");
        System.out.println("启动完成2");
 
 
    }
CacheVerticalGlassModule/src/main/java/com/mes/entity/BigStorageCage.java
New file
@@ -0,0 +1,45 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
 * big_storage_cage大理片笼表实体类
 */
@Data  //lombok 简写java代码 实体类的get与set
@TableName("big_storage_cage")
public class BigStorageCage {
    /**
     * 主键,自动递增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 设备id
     */
    private Integer deviceId;
    /**
     * 栅格号
     */
    private String slot;
    /**
     * 启用状态
     */
    private String enableState;
    /**
     * 剩余宽度
     */
    private Integer remainWidth;
    /**
     * 理片笼详情
     */
    private BigStorageCageDetails bigStorageCageDetail;
}
CacheVerticalGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java
New file
@@ -0,0 +1,87 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
 * big_storage_cage_details大理片笼详情表实体类
 */
@Data  //lombok 简写java代码 实体类的get与set
@TableName("big_storage_cage_details")
public class BigStorageCageDetails {
    /**
     * 表主键,自动递增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 设备id
     */
    private Integer deviceId;
    /**
     * 栅格号
     */
    private Integer slot;
    /**
     * 玻璃id
     */
    private String glassId;
    /**
     * 小片在格内的顺序
     */
    private Integer sequence;
    /**
     * 流程卡号
     */
    private String flowCardId;
    /**
     * 玻璃类型
     */
    private Integer glassType;
    /**
     * 宽
     */
    private Double width;
    /**
     * 高
     */
    private Double height;
    /**
     * 厚度
     */
    private Double thickness;
    /**
     * 钢化版图id
     */
    private Integer temperingLayoutId;
    /**
     * 钢化版图片序
     */
    private Integer temperingFeedSequence;
    /**
     * 状态
     */
    private Integer state;
    /**
     * 玻璃间隙
     */
    private Integer gap;
}
CacheVerticalGlassModule/src/main/java/com/mes/mapper/BigStorageCageMapper.java
New file
@@ -0,0 +1,19 @@
package com.mes.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.repository.CrudRepository;
import com.mes.entity.BigStorageCage;
import com.mes.entity.BigStorageCageDetails;
@Mapper
public interface BigStorageCageMapper extends CrudRepository<BigStorageCage,Long>{
// public class BigStorageCageMapper {
    BigStorageCageDetails SelectTemperingFeedSlot(@Param("bigStorageCageDetails") BigStorageCageDetails bigStorageCageDetails);
    BigStorageCageDetails SelectEmptyFeedSlot();
}
CacheVerticalGlassModule/src/main/java/com/mes/mapper/userInfo/UserMapper.java
@@ -16,7 +16,9 @@
    User findOne(Integer id);
    @Select("select user_name FROM `user` where login_name=#{LoginName}  ")
    User findOneLoginName(String LoginName);
    @Select("select count(id) FROM `user` where login_name=#{userName} and password=#{password}  ")
    int  checkUser(@Param("userName") String userName,@Param("password") String password);
CacheVerticalGlassModule/src/main/java/com/mes/service/BigStorageCageService.java
New file
@@ -0,0 +1,48 @@
package com.mes.service;
import java.util.List;
import org.springframework.stereotype.Service;
import com.mes.entity.*;
import com.mes.mapper.BigStorageCageMapper;
@Service
public class BigStorageCageService {
    // private BigStorageCageMapper bigStorageCageMapper;
    // // 获取玻璃存放格子
    // public BigStorageCageDetails FeedGlass(BigStorageCageDetails bigStorageCageDetails) {
    //     //获取同钢化版图id可进片的格子
    //     BigStorageCageDetails LayoutSlotInfo=bigStorageCageMapper.SelectTemperingFeedSlot(bigStorageCageDetails);
    //     //有符合条件的格子时
    //     if (LayoutSlotInfo!=null) {
    //         //将玻璃信息填入理片笼详情表
    //         bigStorageCageDetails.setSlot(LayoutSlotInfo.getSlot());
    //     }else{
    //         //获取不到时:
    //         //获取可进片格子信息
    //         BigStorageCageDetails EmptySlotInfo=bigStorageCageMapper.SelectEmptyFeedSlot();
    //         bigStorageCageDetails.setSlot(EmptySlotInfo.getSlot());
    //         //获取其他笼格子
    //         //将玻璃信息放入该格子
    //     }
    //     UpdateRemainWidth(bigStorageCageDetails.getSlot());
    //     return bigStorageCageDetails;
    // }
    // //修改格子剩余宽度
    // private void UpdateRemainWidth(int Slot){
    //     //获取该格子内玻璃信息
    //     //修改格子剩余宽度
    //     BigStorageCageMapper.UpdateRemainWidth(Slot);
    // }
}
CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCage.xml
New file
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.mess.mapper.BigStorageCageMapper">
    <!-- <resultMap id="BigStorageCage" type="com.example.mes.entity.BigStorageCage" >
        <id column="id" property="id"/>
        <result column="device_id" property="deviceId"/>
        <result column="slot" property="slot"/>
        <result column="enable_state" property="enableState"/>
        <result column="remain_width" property="remainWidth"/>
        <result column="glass_id" property="bigStorageCageDetail.glassId"/>
        <result column="sequence" property="bigStorageCageDetail.sequence"/>
        <result column="flow_card_id" property="bigStorageCageDetail.flowCardId"/>
        <result column="glass_type" property="bigStorageCageDetail.glassType"/>
        <result column="width" property="bigStorageCageDetail.width"/>
        <result column="height" property="bigStorageCageDetail.height"/>
        <result column="thickness" property="bigStorageCageDetail.thickness"/>
        <result column="tempering_layout_id" property="bigStorageCageDetail.temperingLayoutId"/>
        <result column="tempering_feed_sequence" property="bigStorageCageDetail.temperingFeedSequence"/>
        <result column="state" property="bigStorageCageDetail.state"/>
        <result column="gap" property="bigStorageCageDetail.gap"/>
    </resultMap>
    <resultMap id="BigStorageCageDetails" type="com.example.mes.entity.BigStorageCageDetails" >
        <id column="id" property="id"/>
        <result column="device_id" property="deviceId"/>
        <result column="slot" property="slot"/>
        <result column="glass_id" property="glassId"/>
        <result column="sequence" property="sequence"/>
        <result column="flow_card_id" property="flowCardId"/>
        <result column="glass_type" property="glassType"/>
        <result column="width" property="width"/>
        <result column="height" property="height"/>
        <result column="thickness" property="thickness"/>
        <result column="tempering_layout_id" property="temperingLayoutId"/>
        <result column="tempering_feed_sequence" property="temperingFeedSequence"/>
        <result column="state" property="state"/>
        <result column="gap" property="gap"/>
    </resultMap>
    <select id="SelectTemperingFeedSlot" resultMap="BigStorageCageDetails">
        select * from big_storage_cage bsc inner join big_storage_cage_details as bscd on bsc.slot=bscd.slot
        <where>
            and bscd.id=(select id from big_storage_cage_details where slot=bscd.slot
            and tempering_feed_sequence=#{bigStorageCageDetails.temperingFeedSequence}-1
            and bsc.remain_width>#{bigStorageCageDetails.width}
            ORDER BY sequence desc LIMIT 1)
        </where>
    </select>
    <select id="SelectStorageCageSummary" resultMap="BigStorageCageDetails">
        select min(case when bsc.remain_width=5000 then bsc.id else null end ) as id,bsc.device_id,
        min(case when bsc.remain_width=5000 then bsc.slot else null end ) as slot,
        count(distinct bscd.tempering_layout_id) as tempering_layout_ids
        from big_storage_cage bsc left join big_storage_cage_details bscd on bsc.slot=bscd.slot
        <where>
            and bsc.enable_state=0
        </where>
        group by bsc.device_id
        order by tempering_layout_ids,bsc.device_id limit 1
    </select> -->
</mapper>
CacheVerticalGlassModule/target/classes/application.yml
New file
@@ -0,0 +1,32 @@
server:
  port: 8080
  servlet:
   context-path: /mesModuleTools
spring:
  datasource:
    dynamic:
      primary: user_info #设置默认的数据源或者数据源组,默认值即为master
      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
      datasource:
        user_info:
          url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        sd:
          url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        mm:
          url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        pp:
          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
CacheVerticalGlassModule/target/classes/mapper/BigStorageCage.xml
New file
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.mess.mapper.BigStorageCageMapper">
    <!-- <resultMap id="BigStorageCage" type="com.example.mes.entity.BigStorageCage" >
        <id column="id" property="id"/>
        <result column="device_id" property="deviceId"/>
        <result column="slot" property="slot"/>
        <result column="enable_state" property="enableState"/>
        <result column="remain_width" property="remainWidth"/>
        <result column="glass_id" property="bigStorageCageDetail.glassId"/>
        <result column="sequence" property="bigStorageCageDetail.sequence"/>
        <result column="flow_card_id" property="bigStorageCageDetail.flowCardId"/>
        <result column="glass_type" property="bigStorageCageDetail.glassType"/>
        <result column="width" property="bigStorageCageDetail.width"/>
        <result column="height" property="bigStorageCageDetail.height"/>
        <result column="thickness" property="bigStorageCageDetail.thickness"/>
        <result column="tempering_layout_id" property="bigStorageCageDetail.temperingLayoutId"/>
        <result column="tempering_feed_sequence" property="bigStorageCageDetail.temperingFeedSequence"/>
        <result column="state" property="bigStorageCageDetail.state"/>
        <result column="gap" property="bigStorageCageDetail.gap"/>
    </resultMap>
    <resultMap id="BigStorageCageDetails" type="com.example.mes.entity.BigStorageCageDetails" >
        <id column="id" property="id"/>
        <result column="device_id" property="deviceId"/>
        <result column="slot" property="slot"/>
        <result column="glass_id" property="glassId"/>
        <result column="sequence" property="sequence"/>
        <result column="flow_card_id" property="flowCardId"/>
        <result column="glass_type" property="glassType"/>
        <result column="width" property="width"/>
        <result column="height" property="height"/>
        <result column="thickness" property="thickness"/>
        <result column="tempering_layout_id" property="temperingLayoutId"/>
        <result column="tempering_feed_sequence" property="temperingFeedSequence"/>
        <result column="state" property="state"/>
        <result column="gap" property="gap"/>
    </resultMap>
    <select id="SelectTemperingFeedSlot" resultMap="BigStorageCageDetails">
        select * from big_storage_cage bsc inner join big_storage_cage_details as bscd on bsc.slot=bscd.slot
        <where>
            and bscd.id=(select id from big_storage_cage_details where slot=bscd.slot
            and tempering_feed_sequence=#{bigStorageCageDetails.temperingFeedSequence}-1
            and bsc.remain_width>#{bigStorageCageDetails.width}
            ORDER BY sequence desc LIMIT 1)
        </where>
    </select>
    <select id="SelectStorageCageSummary" resultMap="BigStorageCageDetails">
        select min(case when bsc.remain_width=5000 then bsc.id else null end ) as id,bsc.device_id,
        min(case when bsc.remain_width=5000 then bsc.slot else null end ) as slot,
        count(distinct bscd.tempering_layout_id) as tempering_layout_ids
        from big_storage_cage bsc left join big_storage_cage_details bscd on bsc.slot=bscd.slot
        <where>
            and bsc.enable_state=0
        </where>
        group by bsc.device_id
        order by tempering_layout_ids,bsc.device_id limit 1
    </select> -->
</mapper>
LoadGlassModule/src/main/java/com/mes/entity/BigStorageCage.java
New file
@@ -0,0 +1,18 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`big_storage_cage`")
public class BigStorageCage {
    @TableId(type = IdType.AUTO)
    private  Integer id;//大理片笼表id
    private  Integer device_id;//设备id
    private  Integer slot;//栅格号
    private  String enable_state;//启用状态
    private  Integer remain_width;//剩余宽度
}
LoadGlassModule/src/main/java/com/mes/entity/BigStorageCageDetails.java
New file
@@ -0,0 +1,27 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`big_storage_cage_details`")
public class BigStorageCageDetails {
    @TableId(type = IdType.AUTO)
    private  Integer id;//大理片笼详情表id
    private  Integer deviceid;//设备id
    private  Integer slot;//栅格号
    private  Integer glassid;//玻璃id
    private  Integer sequence;//小片在格内的顺序
    private  String flowcardid;//流程卡号
    private  Integer glasstype;//玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer temperinglayoutid;//钢化版图id
    private  Integer temperingfeedsequence;//钢化版图片序
    private  Integer state;//状态
    private  Integer gap;//玻璃间隙
}
LoadGlassModule/src/main/java/com/mes/entity/DownGlassInfo.java
New file
@@ -0,0 +1,19 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`down_glass_info`")
public class DownGlassInfo {
    @TableId(type = IdType.AUTO)
    private  Integer id;//下片玻璃信息表id
    private  String flowcardid;//流程卡号
    private  Integer sequence;//顺序
    private  Integer width;//宽
    private  Integer height;//高
    private  Integer thickness;//厚度
}
LoadGlassModule/src/main/java/com/mes/entity/DownStorageCage.java
New file
@@ -0,0 +1,18 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`down_storage_cage`")
public class DownStorageCage {
    @TableId(type = IdType.AUTO)
    private  Integer id;//下片前理片笼表id
    private  Integer deviceid;//设备id
    private  Integer slot;//栅格号
    private  String enablestate;//启用状态
    private  Integer remainwidth;//剩余
}
LoadGlassModule/src/main/java/com/mes/entity/DownStorageCagedetails.java
New file
@@ -0,0 +1,27 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`down_storage_cage_details`")
public class DownStorageCagedetails {
    @TableId(type = IdType.AUTO)
    private  Integer id;//下片前理片笼明细表id
    private  Integer deviceid;//设备id
    private  Integer slot;//栅格号
    private  Integer glassid;//玻璃id
    private  Integer sequence;//小片在格内的顺序
    private  String flow_card_id;//流程卡号
    private  Integer glass_type;//玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer temperinglayoutid;//钢化版图id
    private  Integer tempering_feed_sequence;//钢化版图片序
    private  Integer state;//状态
    private  Integer gap;//玻璃间隙
}
LoadGlassModule/src/main/java/com/mes/entity/DownWorkstation.java
New file
@@ -0,0 +1,19 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`down_workstation`")
public class DownWorkstation {
    @TableId(type = IdType.AUTO)
    private  Integer id;//下片工位表id
    private  Integer flowcard_id;//工位id
    private  String glass_type;//流程卡号
    private  Integer width;//设备id
    private  Integer height;//启用状态
    private  Integer thickness;//工作状态
}
LoadGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java
New file
@@ -0,0 +1,18 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`edg_storage_cage`")
public class EdgStorageCage {
    @TableId(type = IdType.AUTO)
    private  Integer id;//磨边前理片笼表id
    private  Integer flowcard_id;//设备id
    private  Integer glass_type;//栅格号
    private  String height;//启用状态
    private  Integer thickness;//剩余
}
LoadGlassModule/src/main/java/com/mes/entity/EdgStorageCageDetails.java
New file
@@ -0,0 +1,30 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`edg_storage_cage_details`")
public class EdgStorageCageDetails {
    @TableId(type = IdType.AUTO)
    private  Integer id;//磨边前理片笼详情表id
    private  Integer deviceid;//设备id
    private  Integer slot;//栅格号
    private  Integer glassid;//玻璃id
    private  Integer sequence;//小片在格内的顺序
    private  String flowcardid;//流程卡号
    private  Integer glasstype;//玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Double edgwidth;//磨前宽
    private  Double edgheight;//磨前高
    private  Integer temperinglayoutid;//钢化版图id
    private  Integer temperingfeedsequence;//钢化版图片序
    private  Integer patternsequence;//原片顺序
    private  Integer state;//状态
    private  Integer gap;//玻璃间隙
}
LoadGlassModule/src/main/java/com/mes/entity/Engineering.java
New file
@@ -0,0 +1,30 @@
package com.mes.entity;
import java.math.BigInteger;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`engineering`")
public class Engineering {
    @TableId(type = IdType.AUTO)
    private  BigInteger id;//工程表id
    private  Integer engineerid;//工程号
    private  String engineername;//工程名称
    private  Double avgavailability;//平均利用率
    private  Double validavailability;//有效利用率
    private  Double lastavailability;//尾片利用率
    private  Integer state;//状态
    private  Integer glasstotal;//小片总数
    private  Double glasstotalarea;//小片总面积
    private  Integer planpatterntotal;//计划原片总数
    private  Double planpatterntotalarea;//计划原片总面积
    private  Integer realitypatterntotal;//实际原片总数
    private  Double realitypatterntotalarea;//实际原片总面积
    private  Integer filmsid;//膜系id
    private  String notes;//备注
}
LoadGlassModule/src/main/java/com/mes/entity/GlassFilms.java
New file
@@ -0,0 +1,17 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`glass_films`")
public class GlassFilms {
    @TableId(type = IdType.AUTO)
    private  Integer id;//膜系表id
    private  Integer films_id;//膜系id
    private  String films_name;//膜系
}
LoadGlassModule/src/main/java/com/mes/entity/GlassInfo.java
New file
@@ -0,0 +1,34 @@
package com.mes.entity;
import java.math.BigInteger;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`glass_info`")
public class GlassInfo {
    @TableId(type = IdType.AUTO)
    private  BigInteger id;//玻璃信息表id
    private  String flowcardid;//流程卡
    private  Integer glasstype;//流程卡玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer filmsid;//膜系
    private  Double edgwidth;//磨前宽
    private  Double edgheight;//磨前高
    private  Integer ismultiple;//是否配片
    private  Double maxwidth;//配片最大宽
    private  Double maxheight;//配片最大高
    private  Integer ishorizontal;//钢化是否接受横放
    private  Integer patternsequence;//原片顺序
    private  Integer temperinglayoutid;//钢化版图id
    private  Integer temperingfeedsequence;//钢化版图片序
    private  Integer xcoordinate;//x坐标
    private  Integer ycoordinate;//y坐标
    private  Integer angle;//旋转角度(逆时针)
}
LoadGlassModule/src/main/java/com/mes/entity/Tempering.java
New file
@@ -0,0 +1,27 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`tempering_glass_info`")
public class Tempering {
    @TableId(type = IdType.AUTO)
    private  Integer id;//钢化小片信息表id
    private  String flowcard_id;//流程卡
    private  Integer glass_type;//流程卡玻璃类型
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer filmsid;//膜系
    private  Integer ishorizontal;//钢化是否接受横放
    private  Integer tempering_layout_id;//钢化版图id
    private  Integer tempering_feed_sequence;//钢化版图片序
    private  Integer x_coordinate;//x坐标
    private  Integer y_coordinate;//y坐标
    private  Integer angle;//旋转角度(逆时针)
    private  Integer state;//状态
}
LoadGlassModule/src/main/java/com/mes/entity/UpPattenUsage.java
New file
@@ -0,0 +1,21 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`up_patten_usage`")
public class UpPattenUsage {
    @TableId(type = IdType.AUTO)
    private  Integer id;//原片使用情况表id
    private  Integer engineeringid;//工程号
    private  Integer filmsid;//膜系id
    private  Double width;//宽
    private  Double height;//高
    private  Double thickness;//厚度
    private  Integer layoutsequence;//原片版图片序
    private  Integer state;//状态
}
LoadGlassModule/src/main/java/com/mes/entity/UpWorkstation.java
New file
@@ -0,0 +1,23 @@
package com.mes.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data  //lombok 简写java代码 实体类的get与set
@TableName("`up_workstation`")
public class UpWorkstation {
    @TableId(type = IdType.AUTO)
    private  Integer id;//上片工位表id
    private  Integer workstationid;//工位号
    private  Integer deviceid;//设备id
    private  Integer enablestate;//启用状态
    private  Integer workstate;//工作状态
    private  Double patternwidth;//原片宽
    private  Double patternheigth;//原片高
    private  Double patternthickness;//原片厚度
    private  Integer filmsid;//膜系
    private  Integer number;//数量
}
LoadGlassModule/src/main/java/com/mes/mapper/LoadGlassMapper.java
@@ -5,7 +5,14 @@
import org.apache.ibatis.annotations.*;
@Mapper
public interface OrderTestMapper extends BaseMapper<OrderTest> {
public interface LoadGlassMapper extends BaseMapper<UpWorkstation> {
    //显示目前工位玻璃信息
    @Select("SELECT * FROM up_workstation")
    UpWorkstation SelectALL();
    //删除工位的玻璃信息
    @Delete("DELETE FROM up_workstation where  workstation_id=#{id}")
    void DeleteALL(int id );
    //增加上片信息
    @Insert ("INSERT INTO up_workstation (pattern_width,pattern_heigth,pattern_thickness)value(#{patternwidth},#{patternheigth},#{patternthickness}where workstation_id=#{workstationid) ")
    void InsertALL(Double patternwidth,Double patternheigth,Double patternthickness,int workstationid);
}
LoadGlassModule/src/main/java/com/mes/service/LoadGlassService.java
@@ -1,30 +1,39 @@
package com.example.springboot.service;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.springboot.component.PLCAutoMes;
import com.example.springboot.component.S7control;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.entity.device.PlcParameterObject;
import com.example.springboot.mapper.SpianMapper;
import com.google.common.primitives.Bytes;
import com.mes.entity.GlassInfo;
import com.mes.entity.UpWorkstation;
import com.mes.mapper.LoadGlassMapper;
import com.mes.mapper.TemperingMapper;
@Service
public class LoadGlassService {
    @Autowired
    public Short selectAll(String glassid) {
    private com.mes.common.PlcTools.S7control s7control;
    private LoadGlassMapper LoadGlassMapper;
    //显示工位上的玻璃信息
    public GlassInfo selectAll() {
        GlassInfo glassInfo = LoadGlassMapper.SelectALL();
        return glassInfo;
    }
    //增加人工输入的工位玻璃信息
    public void insertGlass(UpWorkstation upwork) {
        LoadGlassMapper.insertGlass(upwork.Getpatternwidth(),upwork.getPatternheigth(),upwork.getPatternthickness(),1);
    }
    //删除人工搬走的玻璃信息
    public void deleteGlass(String id) {
        LoadGlassMapper.deleteGlass(id);
    }
    //判断是否可以吸片进行任务
    public boolean isCanLoadGlass() {
        boolean result=s7control.WriteWord("100.10", 1);
        return result;
    }
LoadGlassModule/target/classes/application.yml
New file
@@ -0,0 +1,32 @@
server:
  port: 8080
  servlet:
   context-path: /mesModuleTools
spring:
  datasource:
    dynamic:
      primary: user_info #设置默认的数据源或者数据源组,默认值即为master
      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
      datasource:
        user_info:
          url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        sd:
          url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        mm:
          url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        pp:
          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
TemperingGlassModule/src/main/java/com/mes/entity/BigStorageCage.java
@@ -11,7 +11,7 @@
    @TableId(type = IdType.AUTO)
    private  Integer id;//大理片笼表id
    private  Integer device_id;//设备id
    private  String slot;//栅格号
    private  Integer slot;//栅格号
    private  String enable_state;//启用状态
    private  Integer remain_width;//剩余宽度
TemperingGlassModule/src/main/java/com/mes/entity/DownStorageCage.java
@@ -11,7 +11,7 @@
    @TableId(type = IdType.AUTO)
    private  Integer id;//下片前理片笼表id
    private  Integer deviceid;//设备id
    private  String slot;//栅格号
    private  Integer slot;//栅格号
    private  String enablestate;//启用状态
    private  Integer remainwidth;//剩余
TemperingGlassModule/src/main/java/com/mes/entity/EdgStorageCage.java
@@ -11,7 +11,7 @@
    @TableId(type = IdType.AUTO)
    private  Integer id;//磨边前理片笼表id
    private  Integer flowcard_id;//设备id
    private  String glass_type;//栅格号
    private  Integer glass_type;//栅格号
    private  String height;//启用状态
    private  Integer thickness;//剩余
TemperingGlassModule/src/main/java/com/mes/mapper/TemperingMapper.java
New file
@@ -0,0 +1,20 @@
package com.mes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mes.entity.GlassInfo;
import com.mes.entity.Tempering;
import org.apache.ibatis.annotations.*;
@Mapper
public interface TemperingMapper extends BaseMapper<Tempering> {
//查询该玻璃的尺寸和坐标
@Select("select *from glass_info where id=#{glassid};")
GlassInfo SelectOutGlass(String glassid);
@Select("select *from glass_info where id=#{glassid};")
int SelectTempering(String glassid);
}
TemperingGlassModule/src/main/java/com/mes/service/ModuleA.java
New file
@@ -0,0 +1,58 @@
package com.mes.service;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import java.util.HashMap;
import java.util.Map;
public class ModuleA {
    private static String QUEUE_NAME = "hangzhou2";
    public ModuleA(String QUEUENAME){
        QUEUE_NAME=QUEUENAME;
    }
   public static void main(String[] argv) throws Exception {
        // 创建连接工厂
        ConnectionFactory factory = new ConnectionFactory();
      factory.setHost("10.153.19.150");
    //factory.setHost("localhost");
        try (Connection connection = factory.newConnection();
             //channel 是通过 connection 创建的一个 AMQP 信道对象
             Channel channel = connection.createChannel()) {
            // `channel.queueDeclare(QUEUE_NAME, false, false, false, null);` 是用来声明一个队列的方法
            //该方法有五个参数:
            //1. `QUEUE_NAME`:指定队列的名称,这里使用了之前声明的常量`"module_queue"`作为队列名称。
            //2. `false`:指定队列是否为持久化的。在这里设置为`false`,表示不将队列持久化到磁盘,一旦RabbitMQ服务停止或崩溃,队列将会丢失。
            //3. `false`:指定是否只允许当前连接声明此队列。在这里设置为`false`,表示可允许其他连接也声明同名的队列。
            //4. `false`:指定是否在不再使用时自动删除队列。在这里设置为`false`,表示当没有消费者或者所有消费者断开连接后,队列不会自动删除。
            //5. `null`:指定其他队列属性的参数。在这里设置为`null`,表示没有其他属性需要设置。
            //执行`channel.queueDeclare()`方法后,如果队列不存在,将会创建一个新的队列,如果队列已经存在,则不做任何操作。
            Map<String, Object> args = new HashMap<>();
            args.put("x-max-length-bytes",20000);
//            args.put("x-max-length",5000);
            channel.queueDeclare(QUEUE_NAME, false, false, false, args);
            String message = "你";
            for ( int i=1;i< 5000;i++)
            {
                message+="你";
            }
            message+="b";
            //  将消息发布到指定的队列中。空字符串""表示默认的交换机,QUEUE_NAME指定了目标队列名称,null表示没有指定其他属性,message.getBytes()将消息内容转换为字节数组进行传输。
            channel.basicPublish("", QUEUE_NAME, null, message.getBytes());
            System.out.println(" [x] Sent '" + message + "'");
        }
    }
}
TemperingGlassModule/src/main/java/com/mes/service/ModuleB.java
New file
@@ -0,0 +1,38 @@
package com.mes.service;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.DeliverCallback;
import java.util.HashMap;
import java.util.Map;
public class ModuleB {
    private final static String QUEUE_NAME = "hangzhou2";
    public static void main(String[] argv) throws Exception {
        // 创建连接工厂
        ConnectionFactory factory = new ConnectionFactory();
    factory.setHost("10.153.19.150");
        //factory.setHost("localhost");
        try (Connection connection = factory.newConnection();
             Channel channel = connection.createChannel()) {
            // 声明队列
            Map<String, Object> args = new HashMap<>();
            args.put("x-max-length-bytes",20000);
//            args.put("x-max-length",5000);
            channel.queueDeclare(QUEUE_NAME, false, false, false, args);
            // 创建消费者
            DeliverCallback deliverCallback = (consumerTag, delivery) -> {
                String receivedMessage = new String(delivery.getBody(), "UTF-8");
                System.out.println(" [x] Received '" + receivedMessage + "'");
            };
            // 开始消费消息
          channel.basicConsume(QUEUE_NAME, true, deliverCallback, consumerTag -> {
           });
        }
    }
}
TemperingGlassModule/src/main/java/com/mes/service/TemperingOverService.java
New file
@@ -0,0 +1,28 @@
package com.mes.service;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.mes.entity.GlassInfo;
import com.mes.entity.userInfo.SysError;
import com.mes.mapper.TemperingMapper;
import com.mes.mapper.userInfo.SysErrorMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
@DS("glass_info")
public class TemperingOverService {
    private final TemperingMapper temperingMapper;
    public TemperingOverService(TemperingMapper temperingMapper) {
        this.temperingMapper = temperingMapper;
    }
    //接收出炉信号和炉号
    public GlassInfo SelectOutGlass (String glassid) {
        GlassInfo GlassInfo = temperingMapper.SelectOutGlass(glassid);
        return GlassInfo;
    }
    //发送确认收到
}
TemperingGlassModule/src/main/java/com/mes/service/TemperingService.java
New file
@@ -0,0 +1,52 @@
package com.mes.service;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.mes.common.PlcTools.S7control;
import com.mes.entity.GlassInfo;
import com.mes.entity.userInfo.SysError;
import com.mes.mapper.TemperingMapper;
import com.mes.mapper.userInfo.SysErrorMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
@DS("glass_info")
public class TemperingService {
    private final TemperingMapper temperingMapper;
    private S7control s7control;
    public TemperingService(TemperingMapper temperingMapper) {
        this.temperingMapper = temperingMapper;
    }
    //接收id返回坐标和数据
    public GlassInfo SelectOutGlass (String glassid) {
        GlassInfo GlassInfo = temperingMapper.SelectOutGlass(glassid);
        return GlassInfo;
    }
    //发送坐标信息
    public void SendCoordinate (short glassX,short glassY) {
        s7control.WriteWord("DB100.10", glassX);
        s7control.WriteWord("DB100.10", glassY);
    }
    //判断是否可以发送进炉信号
    public int SelectTempering (String glassid) {
        int tempering = temperingMapper.SelectTempering(glassid);
        if (tempering == 1) {
            return 1;
        }
        else {
            return 0;
        }
    }
    //发送进炉信号
    public void SendIntoGlass (short start) {
        s7control.WriteWord("DB100.10", start);
    }
    //接受完成字回复确认字
    public void SendIntoGlass () {
        s7control.WriteWord("DB100.10", (short)1);
    }
}
TemperingGlassModule/target/classes/application.yml
@@ -2,17 +2,31 @@
server:
  port: 8080
  servlet:
    context-path: /mesModuleTools
   context-path: /mesModuleTools
spring:
  datasource:
    dynamic:
      primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master
      primary: user_info #设置默认的数据源或者数据源组,默认值即为master
      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
      datasource:
        hangzhoumes:
          url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8
        user_info:
          url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        sd:
          url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        mm:
          url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        pp:
          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
UI-Project/src/assets/1.png
UI-Project/src/assets/11.png
UI-Project/src/assets/2.png
UI-Project/src/assets/3.png
UI-Project/src/assets/88.png
UI-Project/src/assets/9.png
UI-Project/src/assets/background.jpg
UI-Project/src/assets/bigcar01.png
UI-Project/src/assets/dipan.png
UI-Project/src/assets/emi.png
UI-Project/src/assets/main.css
@@ -3,12 +3,13 @@
#app {
  margin: 0 auto;
  padding: 0;
  background-color: #D5EAFF;
  /* background-color: #D5EAFF; */
  font-weight: normal;
  height: 100%;
  width: 100%;
  min-width: 1536px;
  min-height: 730px;
  /* min-width: 1536px; */
  /* min-height: 730px; */
  /* background-image: url("../../src/assets/background.jpg"); */
}
a,
UI-Project/src/assets/s.png
UI-Project/src/assets/shangpianji .png
UI-Project/src/assets/shangpianji.png
UI-Project/src/assets/sz.png
UI-Project/src/assets/taimian.png
UI-Project/src/assets/user.png
UI-Project/src/assets/woshihuancun.png
UI-Project/src/assets/xmjc.png
UI-Project/src/assets/xmjclzh.png
UI-Project/src/components/ComputedTest.vue
File was deleted
UI-Project/src/components/basic/BasicTable.vue
File was deleted
UI-Project/src/components/basic/product/GlassType.vue
File was deleted
UI-Project/src/components/sd/product/GlassType.vue
File was deleted
UI-Project/src/layout/MainErpView.vue
@@ -8,7 +8,7 @@
import userInfo from '@/stores/userInfo'
import {Close, Grid, Histogram, MessageBox, SwitchButton} from "@element-plus/icons-vue";
const store=userInfo()
const router = useRouter()
const userStore = useUserInfoStore()
const user = userStore.user.userName
@@ -19,8 +19,8 @@
  })
  router.push("/login")
}
//提取模块列表
let menuList=$ref([])
request.get("/menu").then((res) => {
@@ -31,7 +31,7 @@
    router.push("/login")
  }
})
//获取菜单列表
let menuItemList=$ref([])
request.get("/menuItem").then((res) => {
@@ -42,7 +42,7 @@
    router.push("/login")
  }
})
const menu = ref(null)
let indexKey = ref(null)
function handleOpen(key) {
@@ -55,12 +55,12 @@
},
    {deep:true}
)
router.beforeEach((to, from) => {
  //return false
})
let openFlag = $ref(null)
//原始菜单打开
const openMenu = (menuID) => {
@@ -70,63 +70,38 @@
      openFlag = menuID
    }
}
</script>
<template>
  <div>
  <div id="all">
    <el-container>
      <el-header >
        <div style="height: 100%;width: 100%;display: flex">
        <div style="height: 100%;width: 100%;display: flex;background-color: #fff;">
          <img src="../assets/northGlass.ico" alt="" style="max-width: 100%;max-height: 100%">
          <h3 style="margin: 1rem  ;font-weight: bold;width: 20vw;"> 欢迎{{ user }}使用北玻ERP系统!</h3>
          <h3 style="margin: 1rem  ;font-weight: bold;width: 20vw;"> 欢迎{{ user }}使用北玻MES系统!</h3>
          <span style="height: 70%;width: 78vw;margin-top: 1rem;" >
            <el-button  class="sys-quit" @click="quit"  type="info" round>
            <el-button  class="sys-quit" @click="quit" round>
              <el-icon size="large"><SwitchButton  size=""/></el-icon>
            </el-button>
          </span>
        </div>
      </el-header>
      <div id="line"></div>
      <el-container >
        <el-aside width="160px" style="height: 97%; " >
<!--          <el-menu
              style=" border-radius:0.5rem;border: 0.01rem solid #409EFF;margin-bottom: 0.5rem"
              @open="handleOpen"
              ref="menu"
              active-color="#ffd04b"
              background-color="#409EFF"
              default-active="2"
              text-color="#fff">
            <el-sub-menu
                v-for="items in menuList"
                :index="items.id"
                :key="items.id">
              <template #title>
                <el-icon v-if="items.id==1"><Grid/></el-icon>
                <el-icon v-if="items.id==2"><Histogram/></el-icon>
                <el-icon v-if="items.id==3"><MessageBox/></el-icon>
                <span style="font-weight: bold;">{{items.menuName}}</span>
              </template>
              <router-link
                  v-show="items.id==menuItem.menuID"
                  v-for="menuItem in menuItemList"
                  :to="{path:menuItem.url}">
                <el-menu-item  >
                  {{ menuItem.itemName}}
                </el-menu-item>
              </router-link>
            </el-sub-menu>
          </el-menu>-->
        <el-aside width="160px" style="height: 99%; background-color: #fff;" >
          <div class="menu"  >
              <div v-for="items in menuList">
                <div class='menu_title' @click="openMenu(items.id)"  >{{items.menuName}}<span class='indicator' >▼</span></div>
             <div v-for="items in menuList">
                <div class='menu_title' @click="openMenu(items.id)"  >
              <!-- <span class='indicator' >⌵</span> -->
              <!-- <span class='indicator' >≡</span> -->
              <!-- <img src="../assets/9.png" alt="" style="max-width: 50%;max-height: 50%;"> -->
                  <span>☰</span>
              {{items.menuName}}
                </div>
                <ul class='enter-x-left' v-show="openFlag==items.id">
                  <li v-for="menuItem in menuItemList"
                      v-show="items.id==menuItem.menuID"
                      style="margin-bottom: 2px"
@@ -135,30 +110,34 @@
                        :to="{path:menuItem.url}">
                      {{ menuItem.itemName}}
                    </router-link>
                  </li>
                </ul>
              </div>
          </div>
        </el-aside>
        <el-main>
          <div id="main">
            <router-view></router-view>
          </div>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<style scoped>
#all{
  background-color: #eee;
  height: 100%;
}
.el-container{
  height: 100vh;
  width: 100vw
  width: 99vw
}
*{
  padding: 0;
  margin: 0;
@@ -167,11 +146,21 @@
  float: right;
  margin-right: 1rem;
  width: 5rem;
}
/* 横线 */
#line{
float:right;
width: 100%;
height: 1px;
/* margin-top: 0.5em; */
margin-bottom: 0.5em;
background:#d4c4c4;
position: relative;
text-align: center;
}
:deep(span){
  margin-right: 0;
}
.el-collapse{
  font-size: 16px;
@@ -181,18 +170,12 @@
  width: 99%;
  float: right;
  height: 99%;
  background-color: #fff;
}
/*------------*/
.menu div div{
/* .menu div div{
  width: 138px;
  height: 35px;
  line-height: 35px;
@@ -208,69 +191,65 @@
  border-bottom: 12px ;
  margin-bottom:4px;
  text-align: left;
  cursor: pointer;
  border-radius:8px;
  cursor: pointer; */
  /* border-radius:8px; */
  /*   outline: none; */
  background-color:#5CADFE;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19);
}
  /* background-color:#5CADFE; */
  /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */
/* } */
.menu {
  width: 138px;
  height: 33px;
  line-height: 25px;
  color: #000000;
  font-size: 16px;
  padding-left: 15px;
  padding-right: 2px;
}
ul {
  height: auto;
  margin: 1px auto;
  text-align: center;
}
ul li {
  height: 28px;
  line-height: 30px;
  background: rgb(128, 128, 128);
  /* background: rgb(128, 128, 128); */
  color: #000000;
  padding-left: 36px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  border-radius:8px;
  /* border-radius:8px; */
  /*   outline: none; */
  background: #5CADFE;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19);
  /* background: #5CADFE; */
  /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */
}
ul li:hover {
  background:#5CADFE ;
  /* background:#5CADFE ; */
  color: #ffffff;
}
ul li a {
  text-decoration: none;
  color: #000000;
  font-size: 14px;
}
ul li a:hover {
  color: #ffffff;
  color: #1087ff;
}
.item_divider {
  width: 118px;
  height: 0px;
@@ -282,36 +261,37 @@
  width: 138px;
  height: 35px;
  display: block;
  /* text-align: justify; */
  text-decoration: none;
  color: white;
  font-size: 14px;
  text-decoration: none;
}
.menu_title {
  width: 138px;
  height: 35px;
  line-height: 35px;
  background: #fafafa;
  color: rgb(128, 128, 128);
  font-size: 16px;
  width: 140px;
  height: 45px;
  line-height: 55px;
  /* background: #fafafa; */
  color: rgb(43, 42, 42);
  font-size: 17px;
  padding-left: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  font-weight: bold;
  overflow: hidden;
}
.menu_title:hover {
  /* background: #dedede; */
  color: #ffffff;
  color: #3b9af9;
}
.indicator {
  display: block;
  width: 50px;
  width: 40px;
  height: 35px;
  font-weight: bold;
  position: absolute;
@@ -320,9 +300,9 @@
  transition: all 0.3s ease;
  text-align: center;
}
/* 动画效果 */
.enter-x-left {
  z-index: 9;
@@ -344,14 +324,12 @@
.enter-x-left:nth-child(4){
  animation-delay: 0.4s;
}
@keyframes enter-x-left {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
</style>
UI-Project/src/router/index.js
@@ -15,12 +15,25 @@
      name: 'login',
      component: () => import('../views/LoginView.vue')
    },
    {
      path: '/main',
      name: 'main',
      component: () => import('../layout/MainErpView.vue'),
      children:[
        {
          path: 'Temperedlayout',
          name: 'Temperedlayout',
          component: () => import('../views/TL/Temperedlayout/Temperedlayout.vue'),
          children:[
            {
             path: 'selectLayout',
              name: 'selectLayout',
              component: () => import('../views/TL/Temperedlayout/SelectLayout.vue'),
            }
         ]
        },
          //sd模块
        {
          path: 'product',//产品
@@ -178,6 +191,33 @@
            }
          ]
        },
        // {
        //   path:'appMenu',
        //   name:'appMenu',
        //   component: () => import('../layout/component/appMpenu.vue'),
        //   children:[
        //     {
        //       path: 'appMenu',
        //       name: 'appMenu',
        //       component:()=>import('../layout/component/appMpenu.vue')
        //     },
        //     {
        //       path: 'appView',
        //       name: 'appView',
        //       component:()=>import('../layout/component/appView.vue')
        //     },
        //     {
        //       path: 'logoHeader',
        //       name: 'logoHeader',
        //       component:()=>import('../layout/component/logoHeader.vue')
        //     },
        //     {
        //       path: 'routerHeader',
        //       name: 'routerHeader',
        //       component:()=>import('../layout/component/routerHeader.vue')
        //     },
        //   ]
        // },
          //pp模块
        {
@@ -192,11 +232,11 @@
              name: 'selectAddWorkOrder',
              component: () => import('../views/pp/workOrder/SelectAddWorkOrder.vue'),
            },
            {
              path: 'releaseWorkOrder',
              name: 'releaseWorkOrder',
              component: () => import('../views/pp/workOrder/ReleaseWorkOrder.vue'),
            },
            // {
            //   path: 'releaseWorkOrder',
            //   name: 'releaseWorkOrder',
            //   component: () => import('../views/pp/workOrder/ReleaseWorkOrder.vue'),
            // },
            {
              path: 'addWorkOrder',
              name: 'addWorkOrder',
@@ -532,11 +572,103 @@
            // }
          ]
        },
          //mm模块
        {
          path: 'productStock',
          name: 'productStock',
          component: () => import('../views/mm/mainProductStock/ProductStock.vue'),
          children:[
            {
              // 成品库存
              path: 'productStockList',
              name: 'productStockList',
              component: () => import('../views/mm/mainProductStock/ProductStockList.vue'),
            },
            {
              // 成品入库
              path: 'createProductStock',
              name: 'createProductStock',
              component:()=>   import('../views/mm/mainProductStock/CreateProductStock.vue'),
            },
            {
              // 成品出库
              path: 'finishedProductOut',
              name: 'finishedProductOut',
              component:()=>import('../views/mm/mainProductStock/FinishedProductOut.vue')
            },
            {
              // 成品出库
              path: 'finishedProductReturn',
              name: 'finishedProductReturn',
              component:()=>import('../views/mm/mainProductStock/FinishedProductReturn.vue')
            },
            {
              // 订单调拨
              path: 'orderAllocation',
              name: 'orderAllocation',
              component:()=>import('../views/mm/mainProductStock/OrderAllocation.vue'),
            },
            {
              // 成品领出
              path: 'finishedGoodsIssue',
              name: 'finishedGoodsIssue',
              component:()=>import('../views/mm/mainProductStock/FinishedGoodsIssue.vue'),
            },
            {
              // 成品返工
              path: 'finishedProductRework',
              name: 'finishedProductRework',
              component:()=>import('../views/mm/mainProductStock/FinishedProductRework.vue'),
            },
            {
              // 调拨记录
              path: 'transferRecord',
              name: 'transferRecord',
              component:()=>import('../views/mm/mainProductStock/TransferRecord.vue'),
            },
            {
              // 领出记录
              path: 'takeOutRecord',
              name: 'takeOutRecord',
              component:()=>import('../views/mm/mainProductStock/TakeOutRecord.vue'),
            },
            {
              // 返工记录
              path: 'reworkRecord',
              name: 'reworkRecord',
              component:()=>import('../views/mm/mainProductStock/ReworkRecord.vue'),
            },
            {
              path: '',
              redirect:'/main/productStock/ProductStockList'
            }
          ]
        },
        {
          // 物料资料
          path:'ingredients',
          name:'ingredients',
          component: () => import('../views/mm/mainIngredient/Ingredients.vue'),
          children:[
            {
              path: 'selectIngredients',
              name: 'selectIngredients',
              component:()=>import('../views/mm/mainIngredient/SelectIngredients.vue')
            },
            {
              path: 'createIngredients',
              name: 'createIngredients',
              component:()=>import('../views/mm/mainIngredient/CreateIngredients.vue')
            },
            {
              path: '',
              redirect:'/main/ingredients/SelectIngredients'
            }
          ]
        },
        {
          path: 'UnLoadGlass',
          name: 'UnLoadGlass',
@@ -559,7 +691,184 @@
            }
          ]
        },
        {
          /*----------- 采购订单 ----------------*/
          path: 'purchaseOrder',
          name: 'purchaseOrder',
          component: () => import('../views/mm/purchaseOrder/PurchaseOrder.vue'),
          children: [
            {
              path: 'SelectPurchaseOrder',
              name: 'SelectPurchaseOrder',
              component: () => import('../views/mm/purchaseOrder/Select.vue'),
            }, {
              path: 'CreatePurchaseOrder',
              name: 'CreatePurchaseOrder',
              component: () => import('../views/mm/purchaseOrder/Create.vue')
            },
            /*----------- 新增 ----------------*/
            {
              path: 'PaymentPurchaseOrder',
              name: 'PaymentPurchaseOrder',
              component: () => import('../views/mm/purchaseOrder/Payment.vue')
            },
            /*----------- 退货 ----------------*/
            {
              path: 'ReturnPurchaseOrder',
              name: 'ReturnPurchaseOrder',
              component: () => import('../views/mm/purchaseOrder/Return.vue')
            },
            /*----------- 入库 ----------------*/
            {
              path: 'StoragePurchaseOrder',
              name: 'StoragePurchaseOrder',
              component: () => import('../views/mm/purchaseOrder/Storage.vue')
            },
            {
              path: '',
              redirect: '/main/purchaseOrder/SelectPurchaseOrder'
            }
          ]
        },
        {
          /*----------- 掰片/识别 ----------------*/
          path: 'identify',
          name: 'identify',
          component: () => import('../views/mm/identify/Identify.vue'),
          children: [
            {
              path: 'SelectIdentify',
              name: 'SelectIdentify',
              component: () => import('../views/mm/identify/Select.vue'),
            }
          ]
        },
        {
          /*----------- 卧式缓存----------------*/
          path: 'caching',
          name: 'caching',
          component: () => import('../views/mm/caching/Caching.vue'),
          children: [
            {
              path: 'SelectCaching',
              name: 'SelectCaching',
              component: () => import('../views/mm/caching/caching.vue'),
            }
          ]
        },
        {
          /*----------- 大理片笼----------------*/
          path: 'slicecage',
          name: 'slicecage',
          component: () => import('../views/mm/slicecage/Slicecage.vue'),
          children: [
            {
              path: 'SelectSlicecage',
              name: 'SelectSlicecage',
              component: () => import('../views/mm/slicecage/slicecage.vue'),
            }
          ]
        },
        {
          // 供应商管理!!!
          path:'trader',
          name:'trader',
          component: () => import('../views/mm/mainTrader/Trader.vue'),
          children:[
            {
              path: 'selectTrader',
              name: 'selectTrader',
              component:()=>import('../views/mm/mainTrader/SelectTrader.vue')
            },
            {
              path: 'createTrader',
              name: 'createTrader',
              component:()=>import('../views/mm/mainTrader/CreateTrader.vue')
            },
            {
              path: '',
              redirect:'/main/trader/SelectTrader'
            }
          ]
        },
        /*------------- sunshiqiang Add --*/
        {
          /*----------- 仓储报表 ----------------*/
          path: 'stockReport',
          name: 'stockReport',
          component: () => import('../views/mm/stockReport/stockReport.vue'),
          children:[
            {
              path: 'WarehouseReport',
              name: 'WarehouseReport',
              component: () => import('../views/mm/stockReport/WarehouseReport.vue'),
            }, {
              path: 'StockMonthReport',
              name: 'StockMonthReport',
              component: () => import('../views/mm/stockReport/StockMonthReport.vue'),
            }, {
              path: 'SubsidiaryMonthReport',
              name: 'SubsidiaryMonthReport',
              component: () => import('../views/mm/stockReport/SubsidiaryMonthReport.vue'),
            },
            /*----------- 新增 ----------------*/
            {
              path: 'StockWarehouseReport',
              name: 'StockWarehouseReport',
              component: () => import('../views/mm/stockReport/StockWarehouseReport.vue'),
            }, {
              path: '',
              redirect: '/main/stockReport/WarehouseReport'
            }
          ]
        },
        {
          /*-----------  ----------------*/
          path: 'stockBasicData',
          name: 'stockBasicData',
          component: () => import('../views/mm/stockBasicData/StockBasicData.vue'),
          children: [
            {
              path: 'SelectStockBasicData',
              name: 'SelectStockBasicData',
              component: () => import('../views/mm/stockBasicData/Select.vue'),
            },
          ]
        },
        {
          /*----------- 采购入库 ----------------*/
          path: 'purchaseStorage',
          name: 'purchaseStorage',
          component: () => import('../views/mm/purchaseStorage/PurchaseStorage.vue'),
          children: [
            {
              path: 'SelectPurchaseStorage',
              name: 'SelectPurchaseStorage',
              component: () => import('../views/mm/purchaseStorage/Select.vue'),
            },
            {
              path: '',
              redirect: '/main/purchaseStorage/SelectPurchaseStorage'
            }
          ]
        },
        {
          /*----------- 采购退货 ----------------*/
          path: 'purchaseReturn',
          name: 'purchaseReturn',
          component: () => import('../views/mm/purchaseReturn/PurchaseReturn.vue'),
          children: [
            {
              path: 'SelectPurchaseReturn',
              name: 'SelectPurchaseReturn',
              component: () => import('../views/mm/purchaseReturn/Select.vue'),
            },
            {
              path: '',
              redirect: '/main/purchaseReturn/SelectPurchaseReturn'
            }
          ]
        },
        {
          path: '',
          redirect:'/main/order'
UI-Project/src/views/LoginView.vue
@@ -98,11 +98,19 @@
<template>
  <div class="mainDiv" >
    <div id="main-login">
      <div id="img-div">
        <img id="img-pic" src="@/assets/img.png" alt="">
      <!-- <img
        style="width: 100%; height: 99vh"
        src="../../src/assets/background.jpg"
      /> -->
      <div>
      <div style="position: absolute; left: 8vw; top: 6vw; ">
        <img src="../../src/assets/3.png">
      </div>
       <div style="position: absolute; left: 15vw; top: 22vw; font-size: 55px;color: rgba(29, 33, 41, 1);">
        北玻MES系统
      </div>
    </div>
      <div id="div-login">
        <h2>北玻自动化ERP管理系统</h2>
        <el-form
            @submit.native.prevent
            ref="ruleFormRef"
@@ -110,41 +118,50 @@
            status-icon
            :rules="rules"
        >
          <el-form-item label="用户:" prop="userId">
        <div id="center">
            <div style="color: rgba(78, 89, 105, 1);margin-bottom: 10px;">账号</div>
          <el-form-item prop="userId">
            <el-input
            style="width: 340px;"
                v-model="userForm.userId"
                type="text"
                autocomplete="off"
                :prefix-icon="Avatar"
                placeholder="请输入你的账号"
                placeholder="请输入账号"
            />
          </el-form-item>
          <el-form-item label="密码:" prop="pass">
            <div style="color: rgba(78, 89, 105, 1);margin-bottom: 10px;">密码</div>
          <el-form-item prop="pass">
            <el-input
            style="width: 340px;"
                v-model="userForm.pass"
                type="password"
                autocomplete="off"
                :prefix-icon="Lock"
                placeholder="请输入你的密码"
                show-password
                placeholder="请输入密码"
            />
          </el-form-item>
          <el-form-item id="submitForm">
            <el-button
                :loading="registerLoadings"
                type="primary"
                @click="register"
            >注册
            </el-button>
            <el-button
                :loading="loginLoadings"
                type="primary"
                native-type="submit"
                @click="submitForm(ruleFormRef)"
                @keyup.enter.native="keyDown(e)"
                plain
            >登录
            </el-button>
            <el-button
                :loading="registerLoadings"
                type="primary"
                @click="register"
                plain
            >注册
            </el-button>
          </el-form-item>
        </div>
        </el-form>
      </div>
    </div>
@@ -154,16 +171,15 @@
<style scoped>
.mainDiv{
  //background-color: #1890FF;
  overflow: hidden;
  min-width: 718px;
  background-image: url("../../src/assets/background.jpg");
}
#main-login{
  margin: 150px auto 0 auto;
  height: 60vh;
  width: 70vw;
  //background-color: #f2f2f2;
  height: 70vh;
  width: 80vw;
}
#img-div{
  width: 55%;
@@ -179,23 +195,22 @@
}
#div-login{
  margin-top: 5%;
  /* margin-top: 20%; */
  /* margin-left: 650px; */
  background-color: #fff;
  float: right;
  width: 40%;
  height: 80%;
  border-radius: 12px;
  height: 60%;
  min-width: 318px;
  border-radius: 4px;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19);
}
h2{
  color: #1890FF;
  width: 100%;
  text-align: center;
  margin-top: 20%;
#center{
  margin-top: -30px;
}
.el-form{
  width: 50%;
  margin: 5% auto auto;
  width: 60%;
  margin: 20% auto auto;
}
#submitForm {
  display: flex;
UI-Project/src/views/RegisterView.vue
@@ -4,7 +4,8 @@
  import type { FormProps,FormInstance, FormRules } from 'element-plus'
  import {ElMessage,ElMessageBox} from "element-plus";
  import request from "@/utils/request";
  import {Avatar, UserFilled} from "@element-plus/icons-vue";
import { Lock,Avatar } from '@element-plus/icons-vue'
  // import {Avatar, UserFilled} from "@element-plus/icons-vue";
  const router = useRouter()
  const route = useRoute()
@@ -101,6 +102,12 @@
      }
    })
  }
  const toLogin = () => {
              router.push({
                path:'/login',
              })
  }
@@ -108,76 +115,141 @@
</script>
<template>
  <h2 style="color: #1890FF">
    <span>
      <el-icon><UserFilled /></el-icon>
      <p>北玻ERP用户注册</p>
    </span>
  </h2>
  <div id="main-div">
    <div id="register">
      <el-form
          :label-position="labelPosition"
          label-width="100px"
          :model="register"
          ref="ruleFormRef"
          status-icon
          :rules="rules"
      >
        <el-form-item label="姓名:" prop="userName">
          <el-input v-model="register.userName" />
        </el-form-item>
<!--        <el-form-item label="登陆名:" prop="loginName">-->
<!--          <el-input v-model="register.loginName" />-->
<!--        </el-form-item>-->
        <el-form-item label="密码:" prop="passWord">
          <el-input type="password" v-model="register.passWord" />
        </el-form-item>
        <el-form-item label="确认密码:" prop="confirmPassword">
          <el-input type="password" v-model="register.confirmPassword" />
        </el-form-item>
        <el-form-item >
          <el-button
              :loading="loginLoadings"
              type="primary"
              @click="submitForm(ruleFormRef)"
          >注册
          </el-button>
        </el-form-item>
      </el-form>
  <div class="mainDiv" >
    <div id="main-login">
     <div>
      <div style="position: absolute; left: 8vw; top: 6vw; ">
        <img src="../../src/assets/3.png">
      </div>
       <div style="position: absolute; left: 15vw; top: 22vw; font-size: 55px;color: rgba(29, 33, 41, 1);">
        北玻MES系统
      </div>
    </div>
  </div>
    <div id="div-login">
        <el-form
            @submit.native.prevent
            ref="ruleFormRef"
            :model="register"
            status-icon
            :rules="rules"
            label-width="75px"
        >
          <div id="title">注册新用户</div>
        <div id="center">
            <!-- <div style="color: rgba(78, 89, 105, 1);margin-bottom: 10px;">姓名</div> -->
          <el-form-item prop="userName" label="姓名:">
            <el-input
            style="width: 200px;"
                v-model="register.userName"
                type="text"
                autocomplete="off"
                :prefix-icon="Avatar"
                placeholder="请输入姓名"
            />
          </el-form-item>
            <!-- <div style="color: rgba(78, 89, 105, 1);margin-bottom: 10px;">密码</div> -->
          <el-form-item prop="passWord" label="密码:">
            <el-input
            style="width: 200px;"
                v-model="register.passWord"
                type="password"
                autocomplete="off"
                :prefix-icon="Lock"
                placeholder="请输入密码"
                show-password
            />
          </el-form-item>
            <!-- <div style="color: rgba(78, 89, 105, 1);margin-bottom: 10px;">确认密码</div> -->
          <el-form-item prop="confirmPassword" label="确认密码:">
            <el-input
            style="width: 200px;"
                v-model="register.confirmPassword"
                type="password"
                :prefix-icon="Lock"
                autocomplete="off"
                show-password
                placeholder="请确认密码"
            />
          </el-form-item>
          <el-form-item id="submitForm">
            <el-button
            :loading="loginLoadings"
                type="primary"
                @click="submitForm(ruleFormRef)"
                plain
            >确认注册
            </el-button>
            <el-button
                type="primary"
                @click="toLogin"
                plain
            >取消
            </el-button>
          </el-form-item>
        </div>
        </el-form>
      </div>
</div>
</div>
</template>
<style scoped>
#main-div{
  //overflow: hidden;
/* #main-div{
  position: absolute;
  left:50%;
  top:50%;
  left:75%;
  top:45%;
  transform: translate(-50%, -50%);
}
h2{
  text-align: center;
  width: 100vw;
  margin-top: 10vh;
}
#register{
  background-color: #FAFAFA;
  width: 50vw;
  height: 50vh;
  border-radius: 12px;
} */
/* #register{
  background-color: #fff;
  width: 32vw;
  height: 35vh;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19);
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 280px;
}
.el-form{
} */
/* .el-form{
  max-width: 300px;
} */
#div-login{
  margin-top: 5%;
  /* margin-top: 20%; */
  /* margin-left: 650px; */
  background-color: #fff;
  border-radius: 4px;
  float: right;
  width: 40%;
  height: 60%;
  min-width: 318px;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19);
}
#center{
  margin-top: 45px;
  margin-left: 100px;
}
.mainDiv{
  overflow: hidden;
  min-width: 718px;
  background-image: url("../../src/assets/background.jpg");
}
#main-login{
  margin: 150px auto 0 auto;
  height: 70vh;
  width: 80vw;
}
#submitForm{
  margin-top: 30px;
  margin-left: -10px;
}
#title{
  font-size: 25px;
  text-align: center;
  margin-top: 10px;
}
</style>
UI-Project/src/views/TL/Temperedlayout/SelectLayout.vue
New file
@@ -0,0 +1,176 @@
<script setup>
import {reactive} from "vue";
import {useRouter} from  'vue-router'
let router=useRouter()
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/ingredients/CreateIngredients', query: { id: row.id }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
//子组件接收参数
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },//表头参数
  columns:[
    {type:'expand',fixed:"left",slots: { content:'content' },width: '50'},
    // { type: 'checkbox',fixed:"left", title: '选择', width: '80' },
    {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"},
    { type: 'seq',fixed:"left", title: '自序', width: '80' },
    {field: 'materialCode', width:'150', title: '物料编码', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } },
    {field: 'materialName', width: '150',title: '物料名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'origin', width: '120',title: '产地', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'width', width: '100',title: '宽度', sortable: true},
    {field: 'height',width: '100', title: '高度', sortable: true,showOverflow:"ellipsis"},
    {field: 'thickness', width: '80',title: '厚度', sortable: true},
    {field: 'model',width: '100', title: '型号', sortable: true},
    {field: 'conversionRate', width: '100',title: '换算率', sortable: true},
    {field: 'unit',width: '100', title: '单位', sortable: true},
    {field: 'conversionUnit', width: '80',title: '换算单位', sortable: true},
    {field: 'shelfLife',width: '100', title: '保质期', sortable: true},
    {field: 'weight', width: '100',title: ' 重量', sortable: true},
    {field: 'quantity',width: '110', title: '数量', sortable: true},
    {field: 'inventoryOrganization',width: '100', title: '库存组织', sortable: true},
    {field: 'remark',width: '80', title: '备注', sortable: true},
  ],//表头按钮
  toolbarConfig: {
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true
  },
  data:  [
    {
      "materialCode": 700900000000941,
      "materialName": "丝袜防晒手套套袖",
      "origin": "00",
      "width": "00",
      "height": "00",
      "thickness":'00',
      "model": "服饰",
      "conversionRate": "1000",
      "unit": "双",
      "conversionUnit": "1",
      "shelfLife": "12个月",
      "weight": "0.0000",
      "quantity": "10000",
      "inventoryOrganization": "人工库",
      "remark": "测试",
    },
    {
      "materialCode": 700900000000941,
      "materialName": "丝袜防晒手套套袖",
      "origin": "00",
      "width": "00",
      "height": "00",
      "thickness":'00',
      "model": "服饰",
      "conversionRate": "1000",
      "unit": "双",
      "conversionUnit": "1",
      "shelfLife": "12个月",
      "weight": "0.0000",
      "quantity": "10000",
      "inventoryOrganization": "人工库",
      "remark": "测试",
    },
  ],//table body实际数据
  footerMethod ({ columns, data }) {//页脚函数
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        return ''
      })
    ]
  }
})
</script>
<template>
  <div class="main-div-customer">
    <vxe-grid
        max-height="100%"
        @filter-change="filterChanged"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
        <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>
      </template>
      <!--      下拉详情循环显示中文   -->
      <template #num1_filter="{ column, $panel }">
        <div>
          <div v-for="(option, index) in column.filters" :key="index">
            <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
          </div>
        </div>
      </template>
    </vxe-grid>
  </div>
</template>
<style scoped>
.main-div-customer{
  width: 99%;
  height: 100%;
}
</style>
UI-Project/src/views/TL/Temperedlayout/Temperedlayout.vue
New file
@@ -0,0 +1,207 @@
<!--  物料资料  -->
<script setup>
import { ref } from "vue";
import { ArrowLeftBold, ArrowRight, Search } from "@element-plus/icons-vue";
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
import GlassType from '@/components/basic/product/GlassType.vue'
const router = useRouter()
let indexFlag = $ref(1)
function changeRouter(index) {
  indexFlag = index
}
</script>
<script>
export default {
  mounted() {
    //获取数据
    request.get("/Temper/Tindex").then((res) => {
      if (res.code == 200) {
        var StoveCount=0;
        var temperid;
        for(var i=0;i<res.data.length;i++){
          if (temperid != res.data[i].layoutid) {
            StoveCount++;
            temperid=res.data[i].layoutid;
          }
        }
        // console.log(res.data);
        this.CanvaDraws("mycanvas",res.data,StoveCount);
      } else {
        ElMessage.warning(res.msg)
        router.push("/login")
      }
    });
  },
  methods: {
    //Canva(id,基础数据,页面长:实际长,显示行内版图数, )
    //基础数据:实际炉长,实际炉宽, 小片X轴, 小片y轴, 小片长, 小片宽,显示数据(尺寸,ID,流程卡号,版图号)
    CanvaDraws(id,Datas,StoveCount) {
        //var StoveCount=43;//炉数
        var ArrangementMode='linefeed';//排布方式:linefeed(换行) /Wholeline  整行
        var RowMaxCount=4;//每行最多显示的图数
        var StoveWidth=3000; //实际炉宽 2850
        var StoveLength=5500;//实际炉长 5000
        var StoveColor='#CFC8C5';//炉子背景颜色
        var StoveIntervalX=30; //页面每一炉之间的间距X  px
        var StoveIntervalY=50; //页面每一炉之间的间距Y  px
        var HtmlWidth=1800;   //页面横向
        //var actualWidth=12000;//页面横向所对应的实际长度
        var actualWidth=StoveWidth*RowMaxCount;//页面横向所对应的实际长度
        var Bli = actualWidth / (HtmlWidth-StoveIntervalX*RowMaxCount);//比例:实际长度mm/页面长度px
        var StoveCross=StoveWidth/Bli;   //页面炉子横向 像素
        var StoveVertical=StoveLength/Bli;//页面炉子纵向 像素
        var Font1=(StoveCross*0.05);
        var Font2=(StoveCross*0.028);
        // var TerritoryWidth=dataTempered.loadwidth; //实际版图宽
        //   var TerritoryLength=dataTempered.loadlength;//实际版图长
        //   var TerritoryColor='#0DB637';//版图背景颜色
        //   var TerritoryCross=TerritoryWidth/Bli;   //页面版图横向 像素
        //   var TerritoryVertical=TerritoryLength/Bli;//页面版图纵向 像素
        console.log(Font1);
        var canva = this.$refs[id];
        var content = canva.getContext('2d');
        canva.width = HtmlWidth;
        canva.height = StoveCount%RowMaxCount==0?((StoveVertical+StoveIntervalY)*(StoveCount/RowMaxCount)):((StoveVertical+StoveIntervalY)*(StoveCount/RowMaxCount+1));
        //console.log(StoveCount%RowMaxCount==0?((StoveVertical+StoveIntervalY)*(StoveCount/RowMaxCount)):((StoveVertical+StoveIntervalY)*(StoveCount/RowMaxCount+1)) );
        var temperid;//初始版图
        var Xlayout = 0; //炉子X轴起点
        var Ylayout = StoveIntervalY; //炉子Y轴起点
        var layoutCount = 0;//版图数
        var row=0;
        for (var i = 0; i < Datas.length; i++) {
          var dataTempered = Datas[i];
          var TerritoryWidth=dataTempered.loadwidth; //实际版图宽
          var TerritoryLength=dataTempered.loadlength;//实际版图长
          var TerritoryColor='#0DB637';//版图背景颜色
          var TerritoryCross=TerritoryWidth/Bli;   //页面版图横向 像素
          var TerritoryVertical=TerritoryLength/Bli;//页面版图纵向 像素
          if (temperid != dataTempered.layoutid) {
            //画版图  更改基础倍数
            if(layoutCount>0){
              Xlayout += StoveCross + StoveIntervalX;
              if (layoutCount %RowMaxCount== 0) {
                //换行
                Ylayout += StoveVertical+StoveIntervalY;
                Xlayout=0;
                row++;
              }
            }
            temperid=dataTempered.layoutid;
            layoutCount++;
            content.font ='bold '+Font1+'px Arial' ; //文字样式:加粗 16像素 字体Arial
            content.fillStyle = '#000000'; //字体颜色
            content.textAlign = 'center'; //文字居中
            content.fillText((dataTempered.layoutid), (StoveCross / 2+ Xlayout), 50/2+(StoveVertical+50)*row+10);
            //炉子
            content.fillStyle = StoveColor;
            content.fillRect(Xlayout, Ylayout, StoveCross, StoveVertical);
            //版图
            content.fillStyle = TerritoryColor;
            content.fillRect(Xlayout, Ylayout, TerritoryCross, TerritoryVertical);
          }
          var Rx = dataTempered.xaxis / Bli + Xlayout;
          var Ry = dataTempered.yaxis / Bli + Ylayout;
          var Rwidth = dataTempered.width / Bli;
          var Rheight = dataTempered.height / Bli;
          var Xwidth;
          var Xheight;
          content.fillStyle = '#5CADFE';
          if (dataTempered.rotateangle != 0) {
            Xwidth = Rwidth;
            Xheight = Rheight;
          } else {
            Xwidth = Rheight;
            Xheight = Rwidth;
          }
          content.fillRect(Rx, Ry, Xwidth, Xheight);
          content.font = 'bold '+Font2+'px Arial' ; //文字样式:加粗 16像素 字体Arial
          content.fillStyle = '#000000'; //字体颜色
          content.textAlign = 'center'; //文字居中
          content.fillText(('版图:'+dataTempered.layoutid+'-'+dataTempered.sort), (Xwidth / 2) + Rx, (Xheight) / 2 + Ry-Font2);
          content.fillText((dataTempered.width + '  *  ' + dataTempered.height), (Xwidth / 2) + Rx, (Xheight) / 2 + Ry); //fillText里面的可填写的值(文本内容, x坐标, y坐标, 文本最大宽度)
          content.fillText((dataTempered.processid), (Xwidth / 2) + Rx, (Xheight) / 2 + Ry+Font2);
          //content.rotate(30*Math.PI/180);
          content.stroke();
        }
    }
  }
}
</script>
<template>
  <div ref="content">
  </div>
  <canvas ref="mycanvas" >
  </canvas>
</template>
<style scoped>
#main {
  width: 100%;
  height: 100%;
}
#div-title {
  height: 5%;
  width: 100%;
}
#searchButton {
  margin-top: -5px;
  margin-left: 1rem;
}
#searchButton1 {
  /* margin-left: 10rem; */
}
/*main-body样式*/
#main-body {
  width: 99%;
  height: 92%;
  margin-top: 1%;
}
#select {
  margin-left: 0.5rem;
}
:deep(.indexTag .el-breadcrumb__inner) {
  color: #5CADFE !important;
}
</style>
UI-Project/src/views/UnLoadGlass.rar
Binary files differ
UI-Project/src/views/UnLoadGlass/Landingindication.vue
@@ -1,74 +1,76 @@
<template>
  <div class="glass-rack">
    <div style="background:#eeeeee">
      <svg width="300" height="500" xmlns="http://www.w3.org/2000/svg">
        <g stroke="null" id="Layer_1">
          <!-- 使用 v-for 循环渲染数据 -->
          <g v-for="(rack, index) in racks" :key="index">
            <rect
              :x="rack.x"
              :y="rack.y"
              :width="rack.width"
              :height="rack.height"
              :fill="rack.fillColor"
            />
            <rect
              :x="calculateItemXPosition(rack, rack.item, index)"
              :y="calculateItemYPosition(rack, rack.item, index)"
              :width="rack.item.width"
              :height="rack.item.height"
              :fill="rack.item.fillColor"
            />
            <text :x="rack.x + rack.width / 2" :y="rack.y - 10" text-anchor="middle">{{ index + 1 }}号工位</text>
            <text :x="rack.x + rack.width / 2" :y="rack.y + rack.height + 20" text-anchor="middle">{{ rack.item.content }}</text>
          </g>
        </g>
      </svg>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      racks: [
        { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } },
        { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } },
        { x: 190, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } },
        { x: 190, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } },
        { x: 95, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } }
      ]
    };
  },
  methods: {
    // 计算内部物品的 x 坐标位置
    calculateItemXPosition(rack, item, index) {
      if (index === 0 || index === 1) {  // 如果是第一或第二个物品
        return rack.x;  // 返回左边界 x 坐标
      } else if (index === 2 || index === 3) {  // 如果是第三或第四个物品
        return rack.x + rack.width - item.width;  // 返回右边界 x 坐标
      } else {
        return rack.x + (rack.width - item.width) / 2;  // 返回水平居中的 x 坐标
      }
    },
    // 计算内部物品的 y 坐标位置
    calculateItemYPosition(rack, item, index) {
      if (index === 0 || index === 1) {  // 如果是第一或第二个物品
        return rack.y + (rack.height - item.height) / 2;  // 返回垂直居中的 y 坐标
      } else if (index === 2 || index === 3) {  // 如果是第三或第四个物品
        return rack.y + (rack.height - item.height) / 2;  // 返回垂直居中的 y 坐标
      } else {
        return rack.y + rack.height - item.height;  // 返回底部对齐的 y 坐标
      }
    }
  }
};
</script>
<style scoped>
.glass-rack {
  margin-left: 20px;
  width: 300px;
}
</style>
<template>
  <div class="glass-rack">
    <div >
      <svg width="300" height="500" xmlns="http://www.w3.org/2000/svg">
        <g stroke="null" id="Layer_1">
          <!-- 使用 v-for 循环渲染数据 -->
          <g v-for="(rack, index) in racks" :key="index">
            <rect
              :x="rack.x"
              :y="rack.y"
              :width="rack.width"
              :height="rack.height"
              :fill="rack.fillColor"
            />
            <rect
              :x="calculateItemXPosition(rack, rack.item, index)"
              :y="calculateItemYPosition(rack, rack.item, index)"
              :width="rack.item.width"
              :height="rack.item.height"
              :fill="rack.item.fillColor"
            />
            <text :x="rack.x + rack.width / 2" :y="rack.y - 10" text-anchor="middle">{{ index + 1 }}号工位</text>
            <text :x="rack.x + rack.width / 2" :y="rack.y + rack.height + 20" text-anchor="middle">{{ rack.item.content }}</text>
          </g>
        </g>
      </svg>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      racks: [
        { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } },
        { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } },
        { x: 190, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } },
        { x: 190, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } },
        { x: 95, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } }
      ]
    };
  },
  methods: {
    // 计算内部物品的 x 坐标位置
    calculateItemXPosition(rack, item, index) {
      if (index === 0 || index === 1) {  // 如果是第一或第二个物品
        return rack.x;  // 返回左边界 x 坐标
      } else if (index === 2 || index === 3) {  // 如果是第三或第四个物品
        return rack.x + rack.width - item.width;  // 返回右边界 x 坐标
      } else {
        return rack.x + (rack.width - item.width) / 2;  // 返回水平居中的 x 坐标
      }
    },
    // 计算内部物品的 y 坐标位置
    calculateItemYPosition(rack, item, index) {
      if (index === 0 || index === 1) {  // 如果是第一或第二个物品
        return rack.y + (rack.height - item.height) / 2;  // 返回垂直居中的 y 坐标
      } else if (index === 2 || index === 3) {  // 如果是第三或第四个物品
        return rack.y + (rack.height - item.height) / 2;  // 返回垂直居中的 y 坐标
      } else {
        return rack.y + rack.height - item.height;  // 返回底部对齐的 y 坐标
      }
    }
  }
};
</script>
<style scoped>
.glass-rack {
  margin-left: 20px;
  width: 300px;
  margin-top: 10px;
}
</style>
UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
@@ -1,72 +1,72 @@
<template>
  <div class="glass-rack">
    <div style="background:#eeeeee">
      <svg width="300" height="500" xmlns="http://www.w3.org/2000/svg">
        <g stroke="null" id="Layer_1">
          <!-- 使用 v-for 循环渲染数据 -->
          <g v-for="(rack, index) in racks" :key="index">
            <rect
              :x="rack.x"
              :y="rack.y"
              :width="rack.width"
              :height="rack.height"
              :fill="rack.fillColor"
            />
            <rect
              :x="calculateItemXPosition(rack, rack.item, index)"
              :y="calculateItemYPosition(rack, rack.item, index)"
              :width="rack.item.width"
              :height="rack.item.height"
              :fill="rack.item.fillColor"
            />
            <text :x="rack.x + rack.width / 2" :y="rack.y - 10" text-anchor="middle">{{ index + 6 }}号工位</text>
            <text :x="rack.x + rack.width / 2" :y="rack.y + rack.height + 20" text-anchor="middle">{{ rack.item.content }}</text>
          </g>
        </g>
      </svg>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      racks: [
        { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } },
        { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } },
        { x: 190, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } },
        { x: 190, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } },
        { x: 95, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } }
      ]
    };
  },
  methods: {
    calculateItemXPosition(rack, item, index) {
      if (index === 0 || index === 1) {
        return rack.x;
      } else if (index === 2 || index === 3) {
        return rack.x + rack.width - item.width;
      } else {
        return rack.x + (rack.width - item.width) / 2;
      }
    },
    calculateItemYPosition(rack, item, index) {
      if (index === 0 || index === 1) {
        return rack.y + (rack.height - item.height) / 2;
      } else if (index === 2 || index === 3) {
        return rack.y + (rack.height - item.height) / 2;
      } else {
        return rack.y + rack.height - item.height;
      }
    }
  }
};
</script>
<style scoped>
.glass-rack {
  margin-left: 20px;
  width: 300px;
}
</style>
<template>
  <div class="glass-rack">
    <div>
      <svg width="300" height="500" xmlns="http://www.w3.org/2000/svg">
        <g stroke="null" id="Layer_1">
          <!-- 使用 v-for 循环渲染数据 -->
          <g v-for="(rack, index) in racks" :key="index">
            <rect
              :x="rack.x"
              :y="rack.y"
              :width="rack.width"
              :height="rack.height"
              :fill="rack.fillColor"
            />
            <rect
              :x="calculateItemXPosition(rack, rack.item, index)"
              :y="calculateItemYPosition(rack, rack.item, index)"
              :width="rack.item.width"
              :height="rack.item.height"
              :fill="rack.item.fillColor"
            />
            <text :x="rack.x + rack.width / 2" :y="rack.y - 10" text-anchor="middle">{{ index + 6 }}号工位</text>
            <text :x="rack.x + rack.width / 2" :y="rack.y + rack.height + 20" text-anchor="middle">{{ rack.item.content }}</text>
          </g>
        </g>
      </svg>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      racks: [
        { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } },
        { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } },
        { x: 190, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } },
        { x: 190, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } },
        { x: 95, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } }
      ]
    };
  },
  methods: {
    calculateItemXPosition(rack, item, index) {
      if (index === 0 || index === 1) {
        return rack.x;
      } else if (index === 2 || index === 3) {
        return rack.x + rack.width - item.width;
      } else {
        return rack.x + (rack.width - item.width) / 2;
      }
    },
    calculateItemYPosition(rack, item, index) {
      if (index === 0 || index === 1) {
        return rack.y + (rack.height - item.height) / 2;
      } else if (index === 2 || index === 3) {
        return rack.y + (rack.height - item.height) / 2;
      } else {
        return rack.y + rack.height - item.height;
      }
    }
  }
};
</script>
<style scoped>
.glass-rack {
  margin-left: 20px;
  width: 300px;
}
</style>
UI-Project/src/views/UnLoadGlass/UnLoadGlass.vue
@@ -1,55 +1,55 @@
<script setup>
import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue"
import {useRouter} from "vue-router";
let indexFlag=$ref(1)
function changeRouter(index){
  indexFlag=index
}
</script>
<template>
  <div id="main-div">
    <!-- <div id="div-title">
      <el-breadcrumb :separator-icon="ArrowRight">
        <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/UnLoadGlass/loadmachinerack' }">下片管理</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/UnLoadGlass/loadmachinerack' }">下片信息</el-breadcrumb-item>
        <el-breadcrumb-item v-show="false" :to="{ path: '/main/product/test1' }">测试</el-breadcrumb-item>
      </el-breadcrumb>
    </div> -->
    <div id="main-body">
      <router-view  />
    </div>
  </div>
</template>
<style scoped>
#main-div{
  width: 100%;
  height: 100%;
}
#div-title{
  height: 2%;
  width: 100%;
}
#searchButton{
  margin-top: -5px;
  margin-left: 1rem;
}
/* #searchButton1{
//margin-left: 10rem;
} */
/*main-body样式*/
#main-body{
  width: 100%;
  height: 95%;
  /* margin-top: 1%; */
}
#select{
  margin-left:0.5rem;
}
:deep(.indexTag .el-breadcrumb__inner){
  color: #5CADFE !important;
}
<script setup>
import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue"
import {useRouter} from "vue-router";
let indexFlag=$ref(1)
function changeRouter(index){
  indexFlag=index
}
</script>
<template>
  <div id="main-div">
    <!-- <div id="div-title">
      <el-breadcrumb :separator-icon="ArrowRight">
        <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/UnLoadGlass/loadmachinerack' }">下片管理</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/UnLoadGlass/loadmachinerack' }">下片信息</el-breadcrumb-item>
        <el-breadcrumb-item v-show="false" :to="{ path: '/main/product/test1' }">测试</el-breadcrumb-item>
      </el-breadcrumb>
    </div> -->
    <div id="main-body">
      <router-view  />
    </div>
  </div>
</template>
<style scoped>
#main-div{
  width: 100%;
  height: 100%;
}
#div-title{
  height: 2%;
  width: 100%;
}
#searchButton{
  margin-top: -5px;
  margin-left: 1rem;
}
/* #searchButton1{
//margin-left: 10rem;
} */
/*main-body样式*/
#main-body{
  width: 100%;
  height: 95%;
  /* margin-top: 1%; */
}
#select{
  margin-left:0.5rem;
}
:deep(.indexTag .el-breadcrumb__inner){
  color: #5CADFE !important;
}
</style>
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -1,164 +1,176 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const tableData = [
  {
    id: '1',
    long: '1005',
    wide: '183.6',
    thick: '1991',
    type: '待识别',
    typea: '1',
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
]
const open = () => {
  ElMessageBox.confirm(
    '是否删除该条信息?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '删除成功!',
      })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '删除失败',
      })
    })
}
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
  ],
})
</script>
<template>
  <div>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="id" align="center" label="下片位" min-width="80" />
          <el-table-column prop="long" align="center" label="架号" min-width="120" />
          <el-table-column prop="wide" align="center" label="流程卡号" min-width="120" />
          <el-table-column prop="type" align="center" label="状态" min-width="120" />
          <el-table-column prop="type" align="center" label="设备号" min-width="120" />
          <el-table-column prop="type" align="center" label="启用状态" min-width="120" />
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default>
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">绑定架子</el-button>
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">清空</el-button>
            </template>
        </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
  <div id="main-body">
      <router-view  />
    </div>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
#message{
  text-align: center;
  align-items: center;
  color: black;
   width: 200px;
   height: 100px;
   background-color: #337ecc;
   margin-left: 28%;
}
#awatch{
  height: 450px;
}
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import Landingindication from "./Landingindication.vue";
import Landingindicationtwo from "./Landingindicationtwo.vue";
const tableData = [
  {
    id: '1',
    long: '1005',
    wide: '183.6',
    thick: '1991',
    type: '待识别',
    typea: '1',
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
]
const open = () => {
  ElMessageBox.confirm(
    '是否删除该条信息?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '删除成功!',
      })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '删除失败',
      })
    })
}
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
  ],
})
</script>
<template>
  <div>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="id" align="center" label="下片位" min-width="80" />
          <el-table-column prop="long" align="center" label="架号" min-width="120" />
          <el-table-column prop="wide" align="center" label="流程卡号" min-width="120" />
          <el-table-column prop="type" align="center" label="状态" min-width="120" />
          <el-table-column prop="type" align="center" label="设备号" min-width="120" />
          <el-table-column prop="type" align="center" label="启用状态" min-width="120" />
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default>
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">绑定架子</el-button>
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">清空</el-button>
            </template>
        </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
  <div style="display: flex;">
  <div id="main-body">
      <Landingindication></Landingindication>
    </div>
  <div id="main-bodya">
    <Landingindicationtwo></Landingindicationtwo>
    </div></div>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
#message{
  text-align: center;
  align-items: center;
  color: black;
   width: 200px;
   height: 100px;
   background-color: #337ecc;
   margin-left: 28%;
}
#awatch{
  height: 450px;
}
#main-body{
  margin-top: -20px;
  margin-left: 300px;
}
#main-bodya{
  margin-top: -10px;
  margin-left: 100px;
}
</style>
UI-Project/src/views/mm/caching/caching.vue
New file
@@ -0,0 +1,765 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const tableData = [
  {
    id: '1',
    long: '1005',
    wide: '183.6',
    thick: '1991',
    type: '待识别',
    typea: '1',
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  }
]
const tableDataa = [
  {
    ida: '3',
    longa: '1005',
    widea: '183.6',
    thicka: '1991',
  },
  {
    ida: '4',
    longa: '105',
    widea: '183',
    thicka: '191',
  }
]
const open = () => {
  ElMessageBox.confirm(
    '是否删除该条信息?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '删除成功!',
      })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '删除失败',
      })
    })
}
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
  ],
})
</script>
<template>
  <div>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 240px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="id" align="center" label="玻璃ID" min-width="80" />
          <el-table-column prop="long" align="center" label="位置" min-width="120" />
          <el-table-column prop="wide" align="center" label="宽" min-width="120" />
          <el-table-column prop="type" align="center" label="长" min-width="120" />
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default>
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">报缺</el-button>
            </template>
        </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
  <div id="awatch">
    <img src="../../../assets/woshihuancun.png" alt="" style="width: 70%;height: 100%;margin-left: 160px;">
</div>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
#message{
  text-align: center;
  align-items: center;
  color: black;
   width: 200px;
   height: 100px;
   background-color: #337ecc;
   margin-left: 28%;
}
#awatch{
  height: 450px;
}
</style>
UI-Project/src/views/mm/identify/Create.vue
New file
@@ -0,0 +1,724 @@
<template>
  <el-header height="auto">
    <el-descriptions
        class="margin-top"
        title=""
        :column="4"
        :size="'default'"
        border
        :rules="rules"
        :model="ruleForm"
    >
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy" prop="name">
        <template #label>
          <span style="color:red">*</span>
          采购类型
        </template>
<!--        <el-select v-model="form.buyType" class="m-2" placeholder="选择采购类型" clearable>-->
        <el-select v-model="ruleForm.name" class="m-2" placeholder="选择采购类型" clearable>
          <el-option
              v-for="item in CGTypeOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
          />
        </el-select>
      </el-descriptions-item >
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          <span style="color:red">*</span>
          采购组织
        </template>
        <el-input v-model="ruleForm.name" placeholder="采购组织" clearable prop="name"></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          <span style="color:red">*</span>
          供应商
        </template>
        <el-cascader
            placeholder="选择供应商"
            :options="buyerOptions"
            filterable
            clearable
            empty-text="empty-text"
            :v-model="form.supplier"
        >
        </el-cascader>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          <span style="color:red">*</span>
          采购部门
        </template>
        <el-select v-model="cgBuMen" class="m-2" placeholder="选择采购部门" clearable>
          <el-option
              v-for="item in CGBuMenOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
          />
        </el-select>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          <span style="color:red">*</span>
          采购员
        </template>
        <el-select v-model="form.buyer" class="m-2" placeholder="选择采购员" clearable>
          <el-option
              v-for="item in BuyerOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
          />
        </el-select>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy"
      >
        <template #label>
          <span style="color:red">*</span>
          制表日期
        </template>
        <el-date-picker
            v-model="form.date"
            type="date"
            placeholder="选择制表日期"
        />
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy"></el-descriptions-item>
    </el-descriptions>
  </el-header>
  <el-main style="padding-top: 5px;height:100%">
    <!--    <el-button class="mt-4" style="width: 10%" @click="onAddItem"
        >添加
        </el-button>-->
    <vxe-grid
        max-height="500"
        @filter-change="filterChanged"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
        @="gridEvents"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row}">
        <ul class="expand-wrapper">
          <li v-for="(item,key,index) in row">
            <span style="font-weight: bold">{{ key + ':  ' }}</span>
            <span>{{ item }}</span>
          </li>
        </ul>
      </template>
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
        <!--          <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>-->
        <!--          <el-button @click="cellClickEvent" link type="primary" size="small">详情</el-button>-->
      </template>
      <template #num1_filter="{ column, $panel }">
        <div>
          <div v-for="(option, index) in column.filters" :key="index">
            <el-input v-model="option.data" @input="changeFilterEvent($event, option, $panel)" />
          </div>
        </div>
      </template>
    </vxe-grid>
  </el-main>
</template>
<script lang="ts" setup>
import {ref, reactive} from 'vue'
import {useRouter} from "vue-router";
import {ElMessage, ElMessageBox} from "element-plus";
let router = useRouter()
//组件接收参数
const gridOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY: {enabled: true},//开启虚拟滚动
  showOverflow: true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  columns: [
    //{title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
    {type: 'seq', fixed: "left", title: ' ', width: 50},
    {type: 'checkbox', fixed: "left", title: '', width: 50},
    //{type: 'expand', title: '详情', fixed: "left", slots: {content: 'content'}, width: 50},
    {
      field: 'cgdh',
      width: '10%',
      title: '物料编码',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'cgzt',
      width: '10%',
      title: '物料名称',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'gys',
      width: '10%',
      title: '产地',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'w',
      width: '8%',
      title: '宽度', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'g',
      width: '8%',
      title: '高度', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true,
      type: 'number'
    },
    {
      field: 'h',
      width: '8%',
      title: '厚度', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'xh',
      width: '8%',
      title: '型号',/*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'dw',
      width: '8%',
      title: '单位', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '数量', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '操作数量', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}}
    },
    {
      field: 'sl',
      width: '12%',
      title: '箱数',    /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'je',
      width: '8%',
      title: '单片面积', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'je',
      width: '12%',
      title: '单价',   /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: '6',
      width: '8%',
      title: '总数量',   /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '总面积', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'yl',
      width: '10%',
      title: '总金额',/*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'yl',
      width: '10%',
      title: '备注', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    }
  ],//表头参数
  toolbarConfig: {
    buttons: [
      {type: 'text'},
      {
        'name': '新增',
        'code': 'Add',
      },
      {
        'name': '移除',
        'code': 'Remove'
      },
      {
        'name': '保存订单',
        status: 'primary',
        'code': 'Save'
      }, {
        'name': '入库',
        status: 'primary',
        'code': 'Storage'
      }/*,
      {
        'name': '退货',
        status: 'primary',
        'code': 'Return'
      },
      {
        'name': '返回查询',
        'code':'GoSelect'
      }*/],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    tools: [],
  },//表头按钮
  /*data: [{},{},{},{},{},{}],//table body实际数据*/
  data: [{}, {}, {}],//table body实际数据
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 3}
  ],//合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
//新增
        case 'Add': {
          const record = {
            checked: false
          }
          $grid.insertAt(record, 0).then(({row}) => {
            $grid.setEditRow(row)
          })
          break
        }
//移除
        case 'Remove': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据','warning');
            return
          } else {
            MessageConfirmShow('移除','是否确认移除选中的' + $grid.getCheckboxRecords().length + '条数据!');
          }
          break
        }
//保存
        case 'Save': {
          /*if (form.buyItem === null || form.buyItem === '') {
            MessageShow('采购组织不可为空','warning');
            return;
          }
*/
          //选中数据
          /* const $table = this.$refs.xTable
           const selectRecords = $table.getCheckboxRecords()*/
//+$grid.rows.number
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据','warning');
            return
          } else {
            MessageConfirmShow('保存订单','是否确定保存当前订单信息');
          }
          break
        }
//入库
        case 'Storage': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据','warning');
            return
          } else {
            MessageConfirmShow('入库','您选择了' + $grid.getCheckboxRecords().length + '条数据!,是否确认入库?')
          }
          break
        }
//退库
        case 'Return': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据','warning');
            return
          } else {
          }
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
import type { FormInstance, FormRules } from 'element-plus'
interface RuleForm {
  name: string
  region: string
  count: string
  date1: string
  date2: string
  delivery: boolean
  type: string[]
  resource: string
  desc: string
}
const ruleFormRef = ref<FormInstance>()
const ruleForm = reactive<RuleForm>({
  name: '',
  region: '',
  count: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
})
const rules = reactive<FormRules<RuleForm>>({
  name: [
    { required: true, message: 'Please input Activity name', trigger: 'blur' },
    { min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'blur' },
  ],
  region: [
    {
      required: true,
      message: 'Please select Activity zone',
      trigger: 'change',
    },
  ],
  count: [
    {
      required: true,
      message: 'Please select Activity count',
      trigger: 'change',
    },
  ],
  date1: [
    {
      type: 'date',
      required: true,
      message: 'Please pick a date',
      trigger: 'change',
    },
  ],
  date2: [
    {
      type: 'date',
      required: true,
      message: 'Please pick a time',
      trigger: 'change',
    },
  ],
  type: [
    {
      type: 'array',
      required: true,
      message: 'Please select at least one activity type',
      trigger: 'change',
    },
  ],
  resource: [
    {
      required: true,
      message: 'Please select activity resource',
      trigger: 'change',
    },
  ],
  desc: [
    { required: true, message: 'Please input activity form', trigger: 'blur' },
  ],
})
const form = reactive({
  name: '',
  region: '',
  date: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
  supplier: '',
  buyer: '',
  buyItem: '',
  buyType: ''
})
//供应商
const buyerOptions = [
  {value: '0', label: '供应商1'},
  {value: '1', label: '供应商2'},
  {value: '2', label: '供应商3'},
  {value: '3', label: '供应商4'},
  {value: '4', label: '供应商5'},
  {value: '5', label: '供应商6'},
]
const value = ref('')
const cgBuMen = ref('')
//采购类型
const CGTypeOptions = [
  {
    value: '1',
    label: '标准类型',
  },
  {
    value: '2',
    label: '非标准类型',
  },
  {
    value: '3',
    label: '追加采购',
  },
]
//采购部门
const CGBuMenOptions = [
  {
    value: '0',
    label: '采购华北部',
  },
  {
    value: '1',
    label: '采购东南部',
  },
  {
    value: '2',
    label: '采购西北部',
  },
  {
    value: '3',
    label: '采购中原部',
  },
  {
    value: '4',
    label: '采购外国部',
  },
]
//采购人
const BuyerOptions = [
  {
    value: '0',
    label: '采购员1',
  },
  {
    value: '1',
    label: '采购员2',
  },
  {
    value: '2',
    label: '采购员3',
  },
  {
    value: '3',
    label: '采购员4',
  },
  {
    value: '4',
    label: '采购员5',
  },
]
//页面逻辑代码执行
function logicExecute(type){
  const $grid = xGrid.value
  switch (type) {
    case '入库':
      //入库逻辑代码TODO
      MessageShow('入库成功!', 'success');
      break;
    case '退货':
      //退货逻辑代码TODO
      MessageShow('退货成功!', 'success');
      break;
    case '保存订单':
      //保存订单逻辑代码TODO
      const submitForm = async (formEl: FormInstance | undefined) => {
        if (!formEl) return
        await formEl.validate((valid, fields) => {
          if (valid) {
            console.log('submit!')
          } else {
            console.log('error submit!', fields)
          }
        })
      }
      MessageShow('订单保存成功!', 'success');
      break;
    case '移除':
      $grid.removeCheckboxRow();
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
const MessageShow = (content, type ) => {
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title='操作确认提示', type='warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        return logicExecute(czType);
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
</script>
<style scoped>
:deep(.el-descriptions__table .label-diy) {
  text-align: center;
  width: 100px;
  /*font-size: large;*/
}
</style>
UI-Project/src/views/mm/identify/CreateHeader.vue
New file
@@ -0,0 +1,739 @@
<template>
  <el-header height="auto">
  </el-header>
  <el-main style="padding-top: 5px;height:100%">
    <!--    创建表头模拟样式一-->
    <div>创建表头类一</div>
    <el-form label-width="100px" :inline="true" :model="formInline" class="demo-form-inline">
      <div class="order-primary" style="background-color: white; border: #181818 1px solid">
        <el-row>
          <el-col class="elcolStyle" :span="2">
            <el-text>*项目名称:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-input/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>*客户选择:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-select clearable placeholder=" ">
              <el-option/>
            </el-select>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>*订单类型:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-select clearable placeholder=" ">
              <el-option/>
            </el-select>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>订单分类:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-select clearable placeholder=" ">
              <el-option/>
            </el-select>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>商标选项:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-select clearable placeholder=" ">
              <el-option/>
            </el-select>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>包装方式:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-select clearable placeholder=" ">
              <el-option/>
            </el-select>
          </el-col>
          <!--      <el-col :span="2"><el-text  /></el-col>-->
        </el-row>
        <el-row>
          <el-col class="elcolStyle" :span="2">
            <el-text>销售单号:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>交货日期:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-date-picker
                type="week"
                format="[Week] ww"
                placeholder="选择日期" style="width: 100%"/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>批次:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-input/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>计算方式:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-select clearable placeholder=" ">
              <el-option/>
            </el-select>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>*业务员:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-select clearable placeholder=" ">
              <el-option/>
            </el-select>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>铝条方式:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-select clearable placeholder=" ">
              <el-option/>
            </el-select>
          </el-col>
        </el-row>
        <el-row>
          <el-col class="elcolStyle" :span="2">
            <el-text>总金额:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>合同编号:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-input/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>客户批次:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>联系人:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-input/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>联系电话:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-input/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>送货地址:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-input/>
          </el-col>
        </el-row>
        <el-row>
          <el-col class="elcolStyle" :span="2">
            <el-text>其他金额:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text/>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text>其他金额备注:</el-text>
          </el-col>
          <el-col class="elcolStyle" :span="2">
            <el-text/>
          </el-col>
        </el-row>
      </div>
    </el-form>
    <br/>
    <div>创建表头类二</div>
    <!--    创建表头模拟样式二-->
    <!--    <el-form label-width="80px" :inline="true" :model="formInline2" class="demo-form-inline">-->
    <div class="header2">
      <el-row :gutter="10" style="height: 35px">
        <el-col :span="4">
          <el-form-item label="项目名称" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="客户选择" class="item-style" prop="name">
            <el-select v-model="cgBuMen" class="m-2" placeholder="选择采购部门" clearable>
              <el-option
                  v-for="item in CGBuMenOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="订单类型" class="item-style">
            <el-cascader
                placeholder="订单类型"
                :options="buyerOptions"
                filterable
                clearable
                empty-text="empty-text"
                :v-model="form.supplier"
            >
            </el-cascader>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="订单分类" class="item-style">
            <el-select v-model="form.buyer" class="m-2" placeholder="订单分类" clearable>
              <el-option
                  v-for="item in BuyerOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="商品选项" class="item-style">
            <el-select v-model="form.buyer" class="m-2" placeholder="商品选项" clearable>
              <el-option
                  v-for="item in BuyerOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="包装方式" class="item-style">
            <el-select v-model="form.buyer" class="m-2" placeholder="包装方式" clearable>
              <el-option
                  v-for="item in BuyerOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10" style="height: 35px">
        <el-col :span="4">
          <el-form-item label="销售单号" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="交货日期" class="item-style">
            <el-date-picker
                type="week"
                format="[Week] ww"
                placeholder="选择日期" style="width: 100%"/>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="订单批次" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="计算方式" class="item-style">
            <el-select v-model="form.buyer" class="m-2" placeholder="计算方式" clearable>
              <el-option
                  v-for="item in BuyerOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="业务员" class="item-style">
            <el-select v-model="form.buyer" class="m-2" placeholder="业务员" clearable>
              <el-option
                  v-for="item in BuyerOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="铝条方式" class="item-style">
            <el-select v-model="form.buyer" class="m-2" placeholder="铝条方式" clearable>
              <el-option
                  v-for="item in BuyerOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10" style="height: 35px">
        <el-col :span="4">
          <el-form-item label="总金额" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="合同编号" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="客户批次" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="联系人" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="联系电话" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="送货地址" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="10" style="height: 35px">
        <el-col :span="4">
          <el-form-item label="其他金额" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
        <!--          <el-col :span="4">
                    <span>其他金额备注</span>
                    <el-input ></el-input>
                  </el-col>-->
        <el-col :span="4">
          <el-form-item label="其他金额备注" class="item-style">
            <el-input></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </div>
    <!--    </el-form>-->
    <!--    创建表头模拟样式三-->
    <br/>
    <div>创建表头类三</div>
    <!--    <el-form label-width="100px" :inline="true" :model="formInline3" class="demo-form-inline">-->
    <el-descriptions
        class="margin-top"
        title=""
        :column="6"
        :size="'small'"
        border
    >
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          项目名称
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          客户选择
        </template>
        <el-select></el-select>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          订单类型
        </template>
        <el-select></el-select>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          订单分类
        </template>
        <el-select></el-select>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          商标选项
        </template>
        <el-select></el-select>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          包装方式
        </template>
        <el-select></el-select>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          销售单号
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          交货日期
        </template>
        <el-date-picker
            type="week"
            format="[Week] ww"
            placeholder="选择日期" style="width: 100%"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          批次
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          计算方式
        </template>
        <el-select></el-select>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <span style="color:red">*</span>
          业务员
        </template>
        <el-select></el-select>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          铝条方式
        </template>
        <el-select></el-select>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          总金额
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          合同编号
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          客户批次
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          联系人
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          联系电话
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          送货地址
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          其他金额
        </template>
        <el-input></el-input>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          其他金额备注
        </template>
       <el-input />
      </el-descriptions-item>
      <el-descriptions-item></el-descriptions-item>
<!--      <el-descriptions-item></el-descriptions-item>
      <el-descriptions-item></el-descriptions-item>
      <el-descriptions-item></el-descriptions-item>
      <el-descriptions-item></el-descriptions-item>-->
    </el-descriptions>
    <!--    </el-form>-->
  </el-main>
</template>
<script setup>
import {ref, reactive} from 'vue'
let router = useRouter()
const openAlert = (options) => {
  if (options.type === 'message') {
    VXETable.modal.message(options)
  } else {
    VXETable.modal.alert(options)
  }
}
const form = reactive({
  name: '',
  region: '',
  date: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
  supplier: '',
  buyer: '',
  buyItem: '',
  buyType: ''
})
const onSubmit = () => {
  console.log('submit!')
}
//供应商
const buyerOptions = [
  {value: '0', label: '供应商1'},
  {value: '1', label: '供应商2'},
  {value: '2', label: '供应商3'},
  {value: '3', label: '供应商4'},
  {value: '4', label: '供应商5'},
  {value: '5', label: '供应商6'},
]
const value = ref('')
const cgBuMen = ref('')
//采购类型
const CGTypeOptions = [
  {
    value: '1',
    label: '标准类型',
  },
  {
    value: '2',
    label: '非标准类型',
  },
  {
    value: '3',
    label: '追加采购',
  },
]
//采购部门
const CGBuMenOptions = [
  {
    value: '0',
    label: '采购华北部',
  },
  {
    value: '1',
    label: '采购东南部',
  },
  {
    value: '2',
    label: '采购西北部',
  },
  {
    value: '3',
    label: '采购中原部',
  },
  {
    value: '4',
    label: '采购外国部',
  },
]
//采购人
const BuyerOptions = [
  {
    value: '0',
    label: '采购员1',
  },
  {
    value: '1',
    label: '采购员2',
  },
  {
    value: '2',
    label: '采购员3',
  },
  {
    value: '3',
    label: '采购员4',
  },
  {
    value: '4',
    label: '采购员5',
  },
]
import dayjs from 'dayjs'
import {VXETable} from "vxe-table";
import {useRouter} from "vue-router";
import {User} from "@element-plus/icons-vue";
const now = new Date()
const tableData = ref([
  {
    wlcode: '202312205101',
    wlname: '这是一个物料名称',
    cd: '产地12',
    hd: '8',
    gd: '2440',
    kd: '3660',
    xh: 'CN10P'
  },
  {
    wlcode: '202312305101',
    wlname: '这是一个物料名称',
    cd: '产地1',
    gd: '2440',
    kd: '3660',
    hd: '5',
    xh: 'CN10P'
  },
  {
    wlcode: '202312405101',
    wlname: '这是一个物料名称',
    cd: '产地13',
    hd: '12',
    gd: '2440',
    kd: '3660',
    xh: 'CN10P'
  },
])
const onAddItem = () => {
  now.setDate(now.getDate() + 1)
  tableData.value.push({
    wlcode: dayjs(now).format('YYYYMMDDss') + '01',
    wlname: '这是一个物料名称',
    cd: '产地1',
    hd: '6',
    xh: 'CN10P',
    gd: '2440',
    kd: '3660',
  })
}
</script>
<style scoped>
.custom-header {
  .el-checkbox {
    display: flex;
    height: unset;
  }
}
.item-style {
  width: 92%;
}
.main-div {
  width: 100%;
  height: 100%;
  text-align: center;
}
/*.el-col{
  border: #181818 1px solid;
}*/
.elcolStyle {
  border: #181818 1px solid;
}
header2 :deep(.el-col) {
  padding: 0;
  margin: 0;
//height: 35px; color: red;
}
order-primary :deep(.el-input__wrapper) {
  box-shadow: 0 0 0 0 var(--el-input-border-color, var(--el-border-color)) inset;
  cursor: default;
  border: none !important;
  background-color: transparent;
}
.order-primary {
  width: 100%;
}
.order-detail {
  width: 100%;
  height: 80%;
}
/*.cell-item {
  display: flex;
  align-items: center;
}*/
:deep(.el-descriptions__label) {
  width: 90px;
  text-align: center;
}
</style>
UI-Project/src/views/mm/identify/Details.vue
New file
@@ -0,0 +1,453 @@
<template>
  <el-header height="auto">
    <el-descriptions
        class="margin-top"
        title=""
        :column="4"
        :size="'default'"
        border
    >
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          操作单号
        </template>
        <el-input v-model="form.buyItem" placeholder="单号" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          采购类型
        </template>
        <el-input v-model="form.buyItem" placeholder="采购类型" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          采购部门
        </template>
        <el-input v-model="form.buyItem" placeholder="采购部门" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          供应商
        </template>
        <el-input v-model="form.buyItem" placeholder="供应商" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          采购员
        </template>
        <el-input v-model="form.buyItem" placeholder="采购员" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          采购组织
        </template>
        <el-input v-model="form.buyItem" placeholder="采购组织" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          制表日期
        </template>
        <el-date-picker
            v-model="form.date"
            type="date"
            placeholder="选择制表日期"
        />
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy"></el-descriptions-item>
    </el-descriptions>
  </el-header>
  <el-main style="padding-top: 5px;height:100%">
    <vxe-grid
        max-height="500"
        @filter-change="filterChanged"
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row}">
        <ul class="expand-wrapper">
          <li v-for="(item,key,index) in row">
            <span style="font-weight: bold">{{ key + ':  ' }}</span>
            <span>{{ item }}</span>
          </li>
        </ul>
      </template>
    </vxe-grid>
  </el-main>
</template>
<script setup>
import {ref, reactive} from 'vue'
let router = useRouter()
import {useRouter} from "vue-router";
import { ElMessage, ElMessageBox} from "element-plus";
const value = ref('')
//组件接收参数
const gridOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  //开启虚拟滚动
  scrollY: {enabled: true},
  showOverflow: true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  //筛选配置项
  filterConfig: {
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  //表头参数、列名
  columns: [
    {type: 'seq', fixed: "left", title: ' ', width: 50},
    {type: 'checkbox', fixed: "left", title: '', width: 50},
    {
      field: 'cgdh',
      width: '10%',
      title: '物料编码',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'cgzt',
      width: '10%',
      title: '物料名称',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'gys',
      width: '10%',
      title: '产地',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'w',
      width: '8%',
      title: '宽度',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'g',
      width: '8%',
      title: '高度',
      filters: [{data: ''}],
      sortable: true,
    },
    {
      field: 'h',
      width: '8%',
      title: '厚度',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'xh',
      width: '8%',
      title: '型号',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'dw',
      width: '8%',
      title: '单位',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '数量',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'czsl',
      width: '8%',
      title: '操作数量',
      type: 'number',
      editRender: {name: 'input', type: 'number', attrs: {placeholder: ''}}
    },
    {
      field: 'sl',
      width: '12%',
      title: '箱数',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'je',
      width: '8%',
      title: '单片面积',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'je',
      width: '12%',
      title: '单价',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '总面积',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'yl',
      width: '10%',
      title: '总金额',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'yl',
      width: '10%',
      title: '备注',
      filters: [{data: ''}],
      sortable: true
    }
  ],
  //表头按钮
  toolbarConfig: {
    buttons: [
      {type: 'text'},
      {
        'name': '保存订单',
        status: 'primary',
        'code': 'Save'
      }, {
        'name': '入库',
        status: 'primary',
        'code': 'Storage'
      },
      {
        'name': '退货',
        status: 'primary',
        'code': 'Return'
      },
      {
        'name': '取消',
        status: '',
        'code': 'Cancel'
      }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    tools: [],
  },
  //table body实际数据
  data: [{}, {}, {}],
  //脚合并
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 3}
  ],
  //合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
//保存
        case 'Save': {
          MessageAlertShow('点击了保存订单','操作提示');
          //MessageShow('点击了保存订单!', 'error');
          break;
        }
//取消,返回查询页面
        case 'Cancel': {
          router.push({path: '/main/purchaseOrder/StoragePurchaseOrder'})
          break
        }
//入库
        case 'Storage': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据!', 'warning');
            return
          } else {
            MessageConfirmShow('入库', '是否确认对选中的' + $grid.getCheckboxRecords().length + '物料进行入库操作!');
          }
          break
        }
//退货
        case 'Return': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据!', 'warning');
            return
          } else {
            MessageConfirmShow('退货', '是否确认对选中的' + $grid.getCheckboxRecords().length + '物料进行退货操作!');
          }
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
//表单数据
const form = reactive({
  name: '',
  region: '',
  date: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
  supplier: '',
  buyer: '',
  buyItem: '',
  buyType: ''
})
//页面逻辑代码执行
function logicExecute(type){
  const $grid = xGrid.value
  switch (type) {
    case '入库':
      //入库逻辑代码TODO
      MessageShow('入库成功!', 'success');
      break;
    case '退货':
      //退货逻辑代码TODO
      MessageShow('退货成功!', 'success');
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
//信息内容,显示方式,显示标题,类型
const MessageShow = (content,type='success') => {
    ElMessage({
      message: content,
      type: type,
      showClose: true,
    })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title='操作确认提示', type='warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        return logicExecute(czType);
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
//弹窗信息
const MessageAlertShow=(content,title,type='info')=>{
  ElMessageBox.alert(content, title, {
    // 禁止自动对焦
    //autofocus: false,
    confirmButtonText: 'OK',
    /*callback: (action: Action) => {
      MessageShow(`action: ${action}`,type)
    },*/
  })
}
</script>
<style scoped>
:deep(.el-descriptions__table .label-diy) {
  text-align: center;
  width: 100px;
  /*  font-size: large;*/
}
</style>
UI-Project/src/views/mm/identify/Payment.vue
New file
@@ -0,0 +1,354 @@
<template>
  <el-container>
    <el-header class="m-header" style="height: auto">
      <el-row :gutter="10" style="margin-bottom: 5px">
        <el-col :span="7">
          <el-date-picker
              v-model="datevalue"
              type="daterange"
              unlink-panels
              range-separator="到"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :shortcuts="shortcuts"
              :size="size"
              format="YYYY/MM/DD"
              value-format="YYYY-MM-DD"
          />
        </el-col>
        <el-col :span="2">
          <el-button
              id="select"
              type="primary"
              :icon="Search"
              @click="autoAddRow">查询
          </el-button>
        </el-col>
      </el-row>
    </el-header>
    <el-main style="padding-top: 5px">
      <vxe-grid
          max-height="600"
          @filter-change="filterChanged"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="PayOptions"
          @="gridEvents"
      >
        <!--      下拉显示所有信息插槽-->
        <template #content="{ row }">
          <ul class="expand-wrapper">
            <li  v-for="(item,index) in gridOptions.columns" v-show="item.field!==undefined ">
              <span style="font-weight: bold">{{item.title+':  '}}</span>
              <span>{{ row[item.field] }}</span>
            </li>
          </ul>
        </template>
        <!--左边固定显示的插槽-->
        <template #button_slot="{ row }">
          <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
          <!--          <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>-->
          <!--          <el-button @click="cellClickEvent" link type="primary" size="small">详情</el-button>-->
        </template>
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
      </vxe-grid>
    </el-main>
  </el-container>
</template>
<script setup>
import {ref} from 'vue'
import {Search} from "@element-plus/icons-vue";
import 'dayjs/locale/zh-cn'
import {VXETable} from "vxe-table";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
import {ElMessage, ElMessageBox} from "element-plus";
const datevalue = ref('')//时间
//组件接收参数
const PayOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY: {enabled: true},//开启虚拟滚动
  showOverflow: true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  columns: [
    /* {title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},*/
    {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: '5%'},//详情
    {type: 'checkbox', fixed: "left", title: '', width: '5%'},
    {type: 'seq', fixed: "left", title: ' ', width: '5%'},
    {
      field: 'cgdh',
      width: '10%',
      title: '采购单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'cgzt', width: '10%', title: '月份', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'gys',
      width: '10%',
      title: '供应商',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlbh',
      width: '10%',
      title: '期初金额',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlmc',
      width: '10%',
      title: '本期应付',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'w',
      width: '10%',
      title: '本期已付',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'g',
      width: '10%',
      title: '期末余额',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'h', width: '9%', title: '税率', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: '6', width: '10%', title: '备注', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
  ],//表头参数
  toolbarConfig: {
    buttons: [{type: 'text'}, {
      'name': '应付确认',
      status: 'primary',
      'code': 'Sure',
    }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    style: 'paddling-left:10px'
  },//表头按钮
  data: [{}, {}, {}, {}],//table body实际数据
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 3}
  ],//合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
          //应付确认
        case 'Sure': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow("请选择至少一条数据!", 'warning');
            return
          } else {
            MessageConfirmShow("确认应付", '您选择了' + $grid.getCheckboxRecords().length + '条数据!,是否确认应付?')
          }
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
const shortcuts = [
  {
    text: '近一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
  },
  {
    text: '近一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  },
  {
    text: '近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  },
]
//页面逻辑代码执行
function logicExecute(type){
  const $grid = xGrid.value
  switch (type) {
    case '确认应付':
      //入库逻辑代码TODO
      MessageShow('操作成功!', 'success');
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
//信息内容,显示方式,显示标题,类型
const MessageShow = (content, type = 'success') => {
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title = '操作确认提示', type = 'warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        return  logicExecute(czType);
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
//弹窗信息
const MessageAlertShow = (content, title, type = 'info') => {
  ElMessageBox.alert(content, title, {
    // 禁止自动对焦
    //autofocus: false,
    confirmButtonText: 'OK',
    /*callback: (action: Action) => {
      MessageShow(`action: ${action}`,type)
    },*/
  })
}
</script>
<style scoped>
.el-row {
  margin-bottom: 20px;
}
.el-row:last-child {
  margin-bottom: 0;
}
.el-col {
  border-radius: 4px;
}
.m-header {
  height: 32px;
}
</style>
UI-Project/src/views/mm/identify/Return.vue
New file
@@ -0,0 +1,593 @@
<template>
  <el-container>
    <el-header class="m-header" style="height: auto">
      <el-row :gutter="10" style="margin-bottom: 5px">
        <el-col :span="7">
          <el-date-picker
              v-model="datevalue"
              type="daterange"
              unlink-panels
              range-separator="到"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :shortcuts="shortcuts"
              :size="size"
              format="YYYY/MM/DD"
              value-format="YYYY-MM-DD"
          />
        </el-col>
        <el-col :span="2">
          <el-button
              id="select"
              type="primary"
              :icon="Search"
              @click="BtnSearchPurchaseOrder">查询
          </el-button>
        </el-col>
      </el-row>
    </el-header>
    <el-main style="padding-top: 5px;height:100%">
      <vxe-grid
          max-height="600"
          @filter-change="filterChanged"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          @cell-dblclick="cellClickEvent"
      >
        <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
        <!--      下拉显示所有信息插槽-->
        <template #content="{ row }">
          <ul class="expand-wrapper">
            <li v-for="(item,index) in gridOptions.columns" v-show="item.field!==undefined ">
              <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
              <span>{{ row[item.field] }}</span>
            </li>
          </ul>
        </template>
        <!--左边固定显示的插槽-->
        <template #button_slot="{ row }">
          <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
          <!--          <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>-->
          <!--          <el-button @click="cellClickEvent" link type="primary" size="small">详情</el-button>-->
        </template>
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
      </vxe-grid>
      <!--      详情框 部分1-->
      <vxe-modal v-model="showDetails" title="查看详情" width="600" height="80%" :mask="false" :lock-view="false"
                 resize>
        <el-container>
          <el-header height="35px"
                     style="margin: 0;padding: 0">
            <el-input v-model="showCGDH" placeholder="采购单号" disabled>
              <template #prepend>采购单号:</template>
            </el-input>
          </el-header>
          <el-main>
            <template #default>
              <vxe-table
                  border="default"
                  auto-resize
                  show-overflow
                  max-height="400"
                  :row-config="{isHover: true}"
                  :show-header="false"
                  :sync-resize="showDetails"
                  :data="detailData"
              >
                <vxe-column field="label" width="30%" class-name="v-column-label"></vxe-column>
                <vxe-column field="value"></vxe-column>
              </vxe-table>
            </template>
          </el-main>
          <el-footer height="40px">
            <el-row>
              <el-col :offset="20" :span="4">
                <el-button
                    id="Sure"
                    type="primary"
                    @click="SureReturn"
                >确认退货
                </el-button>
              </el-col>
            </el-row>
          </el-footer>
        </el-container>
      </vxe-modal>
      <!--      详情框 部分1 结束-->
    </el-main>
  </el-container>
</template>
<script setup>
import {ref} from "vue";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
import {Search} from "@element-plus/icons-vue";
import dayjs from "dayjs";
import {ElMessage, ElMessageBox} from "element-plus";
let router = useRouter()
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/purchaseOrder/DetailsPurchaseOrder', query: {id: row.id}})
      break
    }
    case 'delete': {
      alert('我接收到子组件传送的删除信息' + row.id)
      break
    }
  }
}
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'Sure': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据!', 'warning');
            return
          } else {
            MessageConfirmShow('确定', '您选择了' + $grid.getCheckboxRecords().length + '条数据!,是否确认退货?')
          }
          break
        }
        case 'Log': {
          MessageAlertShow('点击了退货记录!', '操作提示');
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
//查询按钮方法
const BtnSearchPurchaseOrder = () => {
  //开始时间,结束时间获取
  //MessageShow("开始时间"+datevalue._rawValue[0]+"\r\n结束时间\r\n"+datevalue._rawValue[1]);
  for (let i = 1; i < 6; i++) {
    const randomInt = Math.floor(Math.random() * 999) + 1000;//4位数随机数
    const randomSumInt = Math.floor(Math.random() * 99) + 10;//2位数随机数
    const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3位数随机数
    const t = i % 2 === 0 ? 5 : 6;
    const s = i % 2 === 0 ? '入库' : i % 3 === 0 ? '退货' : '部分入库';
    const thdh = i % 2 === 0 ? '' : i % 3 === 0 ? 'THID' + randomOrderInt : '';
    const CGNo = 'NGCG231200' + randomOrderInt;//采购编号
    const wlNo = 'NGWL1000' + randomInt;
    const xh = 'NGXH' + randomSumInt;
    const wlmc = 'WLMC' + randomInt;
    const gys = '供应商' + randomSumInt;
    const xhdh = 'NG231200' + randomOrderInt;
    const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
    const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
    const dw = i % 2 === 0 ? '片' : i % 3 === 0 ? '平米' : i % 4 === 0 ? '包' : '吨';
    now.setDate(now.getDate() + 1);
    gridOptions.data.push({
      cgdh: CGNo,
      thdh: thdh,
      h: t,
      xh: xh,
      wlbh: wlNo,
      wlmc: wlmc,
      gys: gys,
      w: w,
      g: h,
      dw: dw,
      cgzt: s,
      rq: dayjs(now).format('YYYY-MM-DD'),
      yl: randomSumInt,
      sl: randomOrderInt,
      xsdh: xhdh,
      je: randomInt,
      6: '139xxxxxxxx',
    })
  }
}
//组件接收参数
const gridOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY: {enabled: true},//开启虚拟滚动
  showOverflow: true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  columns: [
    {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: 50},//详情
    {title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
    {type: 'checkbox', fixed: "left", title: '', width: 50},
    {type: 'seq', fixed: "left", title: ' ', width: 50},
    {
      field: 'thdh',
      width: '10%',
      title: '退货单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'cgdh',
      width: '10%',
      title: '采购单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'cgzt', width: '10%', title: '状态', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'gys',
      width: '10%',
      title: '供应商',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlbh',
      width: '10%',
      title: '物料编号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlmc',
      width: '10%',
      title: '物料名称',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'w', width: '8%', title: '宽度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'g', width: '8%', title: '高度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'h', width: '8%', title: '厚度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'xh', width: '8%', title: '型号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'dw', width: '8%', title: '单位', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '12%',
      title: '不含税单价',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'sl', width: '8%', title: '数量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'sl',
      width: '12%',
      title: '已采购数量',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'je', width: '8%', title: '金额', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'je',
      width: '12%',
      title: '不含税金额',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '8%', title: '税率', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'sl', width: '8%', title: '库存', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '周用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '月用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'cgzt',
      width: '10%',
      title: '单据状态',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'xsdh',
      width: '10%',
      title: '销售单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'rq',
      width: '10%',
      title: '制单日期',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '10%', title: '制单人', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '10%',
      title: '采购部门',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: '6',
      width: '10%',
      title: '采购组织',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '10%', title: '备注', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
  ],//表头参数
  toolbarConfig: {
    buttons: [{type: 'text'}, {
      'name': '退货记录',
      'code': 'Log'
    },
      {
        'name': '确认退货',
        status: 'primary',
        'code': 'Sure'
      }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    style: 'paddling-left:10px'
  },//表头按钮
  data: [],//table body实际数据
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 4}
  ],//合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
//详情框 部分2
const showCGDH = ref();
const showDetails = ref(false);
let detailData = [];
const cellClickEvent = ({row}) => {
  if (isQueryColumnId === false) {
    queryColumnId();
  }
  detailData = list.map(field => {
    return {label: queryColumnsTitle(field), value: row[field]}
  })
  showDetails.value = true;
  showCGDH.value = row['cgdh'];
}
//获取表列
let list = [];
let columnIndex = 4;//列标头从第几列开始的
let isQueryColumnId = false;
const queryColumnId = () => {
  while (columnIndex < gridOptions.columns.length) {
    list.push(gridOptions.columns[columnIndex].field);
    columnIndex++;
  }
  isQueryColumnId = true;
  return list;
}
//获取表列名
function queryColumnsTitle(cn) {
  let i = 0;
  while (i < gridOptions.columns.length + 1) {
    if (gridOptions.columns[i].field === cn) {
      return gridOptions.columns[i].title;
    }
    i++;
  }
}
// 详情框部分2 结束
const SureReturn = () => {
  MessageConfirmShow('退货', '是否确认退货?')
}
//详情框 部分2 结束
const now = new Date()
//时间快捷选择
const datevalue = ref('')
const shortcuts = [
  {
    text: '近一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
  },
  {
    text: '近一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  },
  {
    text: '近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  },
]
//页面逻辑代码执行
function logicExecute(type) {
  const $grid = xGrid.value
  switch (type) {
    case '确定':
      //多选退货逻辑代码TODO
      MessageShow('操作成功!', 'success');
      break;
    case '退货':
      //单退货逻辑代码TODO
      MessageShow('操作成功!', 'success');
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
//信息内容,显示方式,显示标题,类型
const MessageShow = (content, type = 'success') => {
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title = '操作确认提示', type = 'warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        logicExecute(czType);
        return true;
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
//弹窗信息
const MessageAlertShow = (content, title, type = 'info') => {
  ElMessageBox.alert(content, title, {
    // 禁止自动对焦
    //autofocus: false,
    confirmButtonText: 'OK',
    /*callback: (action: Action) => {
      MessageShow(`action: ${action}`,type)
    },*/
  })
}
</script>
<style scoped>
:deep(.v-column-label div span) {
  font-weight: bold;
}
</style>
UI-Project/src/views/mm/identify/Select.vue
New file
@@ -0,0 +1,917 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(false)
const box = ref(true)
const boxa = ref(false)
const boxb = ref(false)
const tableData = [
  {
    id: '1',
    long: '1005',
    wide: '183.6',
    thick: '1991',
    type: '待识别',
    typea: '1',
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  }
]
const tableDataa = [
  {
    ida: '3',
    longa: '1005',
    widea: '183.6',
    thicka: '1991',
  },
  {
    ida: '4',
    longa: '105',
    widea: '183',
    thicka: '191',
  }
]
const open = () => {
  ElMessageBox.confirm(
    '是否删除该条信息?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '删除成功!',
      })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '删除失败',
      })
    })
}
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const dialogForm = () => {
  ElMessageBox.confirm(
    '是否切换版图?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
  .then(() => {
    // this.boxa = true
    // this.box = false
    })
}
const selectedRows = ref([]);
const handleSelectionChange = (selection) => {
  selectedRows.value = selection;
};
const showMessage = () => {
  if (selectedRows.value.length === 0) {
    ElMessage('请至少选择一个选项')
  } else{
    ElMessage({
    message: '重新识别成功!',
    type: 'success',
  })
  }
};
const pick = () => {
  if (selectedRows.value.length === 0) {
    ElMessage('请至少选择一个选项')
  } else{
    ElMessage({
    message: '人工匹配成功!',
    type: 'success',
  })
  }
};
const remove = () => {
  if (selectedRows.value.length === 0) {
    ElMessage('请至少选择一个选项')
  } else{
    ElMessage({
    message: '操作成功!',
    type: 'success',
  })
  }
};
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
  ],
})
</script>
<template>
  <div>
     <el-button style="margin-top: 5px;margin-left: 5px;"   id="searchButton" type="primary" @click="showMessage">重新识别</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" type="primary" @click="pick">人工匹配</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" type="primary" @click="remove">人工拿走</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" type="primary" >破损</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" @click="boxb = true;box = false" >合并</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" @click="box = true;boxb = false" >单片</el-button>
    <el-button style="margin-top: 5px;float: right;margin-right: 50px;"  id="searchButton" type="text"  @click="dialogForm">版图号</el-button>
    <div v-if="box">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 450px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column type="selection" width="55"  />
          <el-table-column prop="id" align="center" label="id" min-width="80" />
          <el-table-column prop="long" align="center" label="长" min-width="120" />
          <el-table-column prop="wide" align="center" label="宽" min-width="120" />
          <el-table-column prop="type" align="center" label="状态" min-width="120" />
          <el-table-column prop="thick" align="center" label="其他" min-width="120" />
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default>
              <!-- <el-button size="mini" type="text" plain  @click="dialogFormVisible = true">详情</el-button> -->
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">设置</el-button>
            </template>
        </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
    <div v-if="boxb">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 450px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column type="selection" width="55"  />
          <el-table-column prop="id" align="center" label="类型序号" min-width="80" />
          <el-table-column prop="long" align="center" label="长" min-width="120" />
          <el-table-column prop="wide" align="center" label="宽" min-width="120" />
          <el-table-column prop="typea" align="center" label="数量" min-width="120" />
          <el-table-column prop="thick" align="center" label="其他" min-width="120" />
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default>
              <!-- <el-button size="mini" type="text" plain  @click="dialogFormVisible = true">详情</el-button> -->
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">设置</el-button>
            </template>
        </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
    <!-- <div v-if="boxa">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableDataa" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column type="selection" width="55"  />
          <el-table-column prop="ida" align="center" label="id" min-width="80" />
          <el-table-column prop="longa" align="center" label="长" min-width="120" />
          <el-table-column prop="widea" align="center" label="宽" min-width="120" />
          <el-table-column prop="thicka" align="center" label="其他" min-width="120" />
        </el-table>
      </div>
    </el-card>
  </div> -->
  </div>
  <!-- <el-dialog v-model="dialogFormVisible" top="21vh" width="30%" title="小片图" >
        <div id="message">
          200*100
        </div>
    <template #footer>
      <div id="dialog-footer">
        <el-button @click="dialogFormVisible = false">关闭</el-button>
      </div>
    </template>
  </el-dialog> -->
  <el-dialog v-model="dialogFormVisiblea" top="21vh" width="30%" title="测量设置" >
            <el-form  size="mini" label-width="150px">
      <el-form style="margin-left: 80px;">
        <el-form-item label="误差长:" :required="true" style="width: 16vw;margin-bottom: 30px;">
            <div style="display: flex;"><el-input  autocomplete="off" /><div style="margin-left: 10px;">mm</div> </div>
              </el-form-item>
              <el-form-item label="误差宽:" :required="true" style="width: 16vw">
            <div style="display: flex;"><el-input  autocomplete="off" /><div style="margin-left: 10px;">mm</div> </div>
              </el-form-item>
        </el-form>
            </el-form>
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="dialogFormVisiblea = false">
          确认
        </el-button>
        <el-button @click="dialogFormVisiblea = false">取消</el-button>
      </div>
    </template>
  </el-dialog>
  <div id="awatch">小片图:
<div id="watch">200*100</div>
</div>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
#message{
  text-align: center;
  align-items: center;
  color: black;
   width: 200px;
   height: 100px;
   background-color: #337ecc;
   margin-left: 28%;
}
#awatch{
  display: flex;
  margin-top: 20px;
  font-size: 20px;
  margin-left: 50px;
}
#watch{
  text-align: center;
  align-items: center;
  color: black;
   width: 300px;
   height: 150px;
   background-color: #337ecc;
   margin-left: 2%;
   margin-top: 10px;
}
</style>
UI-Project/src/views/mm/identify/Storage.vue
New file
@@ -0,0 +1,603 @@
<template>
  <el-container>
    <el-header class="m-header" style="height: auto">
      <el-row :gutter="10" style="margin-bottom: 5px">
        <el-col :span="7">
          <el-date-picker
              v-model="datevalue"
              type="daterange"
              unlink-panels
              range-separator="到"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :shortcuts="shortcuts"
              format="YYYY/MM/DD"
              value-format="YYYY-MM-DD"
          />
        </el-col>
        <el-col :span="2">
          <el-button
              id="select"
              type="primary"
              :icon="Search"
              @click="BtnSearchPurchaseOrder">查询
          </el-button>
        </el-col>
      </el-row>
    </el-header>
    <el-main style="padding-top: 5px;height:100%">
      <vxe-grid
          max-height="600"
          @filter-change="filterChanged"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          @cell-dblclick="cellClickEvent"
      >
        <!--      下拉显示所有信息插槽-->
        <template #content="{ row }">
          <ul class="expand-wrapper">
            <li v-for="(item,index) in gridOptions.columns" v-show="item.field!==undefined ">
              <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
              <span>{{ row[item.field] }}</span>
            </li>
          </ul>
        </template>
        <!--左边固定显示的插槽-->
        <template #button_slot="{ row }">
          <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
          <el-button @click="getTableRow(row,'look')" link type="primary" size="small">查看</el-button>
          <!--          <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>-->
          <!--          <el-button @click="cellClickEvent" link type="primary" size="small">详情</el-button>-->
        </template>
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
      </vxe-grid>
      <!--      详情框 部分1-->
      <vxe-modal v-model="showDetails" title="查看详情" width="600" height="80%" :mask="false" :lock-view="false"
                 resize>
        <el-container>
          <el-header height="35px"
                     style="margin: 0;padding: 0">
            <el-input v-model="showCGDH" placeholder="采购单号" disabled>
              <template #prepend>采购单号:</template>
            </el-input>
          </el-header>
          <el-main>
            <template #default>
              <vxe-table
                  border="inner"
                  auto-resize
                  show-overflow
                  max-height="400"
                  :row-config="{isHover: true}"
                  :show-header="false"
                  :sync-resize="showDetails"
                  :data="detailData">
                <vxe-column field="label" width="30%" class-name="v-column-label"></vxe-column>
                <vxe-column field="value"></vxe-column>
              </vxe-table>
            </template>
          </el-main>
          <el-footer height="40px">
            <el-row>
              <el-col :offset="20" :span="4">
                <el-button
                    id="Sure"
                    type="primary"
                    @click="SureStorage"
                >确认入库
                </el-button>
              </el-col>
            </el-row>
          </el-footer>
        </el-container>
      </vxe-modal>
      <!--      详情框 部分1 结束-->
    </el-main>
  </el-container>
</template>
<script setup>
import {ref} from "vue";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
import {Search} from "@element-plus/icons-vue";
import dayjs from "dayjs";
import {VXETable} from "vxe-table";
import {ElMessage, ElMessageBox} from "element-plus";
let router = useRouter()
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/purchaseOrder/DetailsPurchaseOrder', query: {id: row.id}});
      break
    }
    case 'look': {
      /*this.detailData = ['name', 'nickname', 'role', 'sex', 'age', 'amount', 'address'].map(field => {
        return { label: field, value: row[field] }
      })*/
      //this.showDetails = true
      break
    }
    case 'delete': {
      alert('我接收到子组件传送的删除信息' + row.id)
      break
    }
  }
}
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'Sure': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据', 'warning');
            //openAlert({type: 'message', content: '请选择至少一条数据', status: 'warning'})
            //VXETable.modal.message( '请选择一条数据!')
            return
          } else {
            const type = VXETable.modal.confirm('您选择了' + $grid.getCheckboxRecords().length + '条数据!,是否确认入库?');
            //openAlert({type:'alert', content: '成功入库'+$grid.getCheckboxRecords().length+'条数据!', status: 'success' })
            //VXETable.modal.message( '请选择一条数据!')
            return
          }
          break
        }
        case 'Log': {
          //openAlert({type: 'alert', content: '点击了退货记录', status: 'success'})
          MessageConfirmShow("退货记录", "点击了退货记录", "", 'success')
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
const openAlert = (options) => {
  if (options.type === 'message') {
    VXETable.modal.message(options)
  } else {
    VXETable.modal.alert(options)
  }
}
const closeAlert = (id) => {
  VXETable.modal.close(id)
}
//查询调用事件
const BtnSearchPurchaseOrder = () => {
  //开始时间,结束时间获取
  //MessageShow(datevalue._rawValue[0]+"\r\n时间2\r\n"+datevalue._rawValue[1]);
  for (let i = 1; i < 6; i++) {
    const randomInt = Math.floor(Math.random() * 999) + 1000;//4位数随机数
    const randomSumInt = Math.floor(Math.random() * 99) + 10;//2位数随机数
    const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3位数随机数
    const t = i % 2 === 0 ? 5 : 6;
    const s = i % 2 === 0 ? '入库' : i % 3 === 0 ? '待审核' : '已采购';
    const rkdh = i % 2 === 0 ? 'RKID' + randomOrderInt : i % 3 === 0 ? '' : '';
    const CGNo = 'NGCG231200' + randomOrderInt;//采购编号
    const wlNo = 'NGWL1000' + randomInt;
    const xh = 'NGXH' + randomSumInt;
    const wlmc = 'WLMC' + randomInt;
    const gys = '供应商' + randomSumInt;
    const xhdh = 'NG231200' + randomOrderInt;
    const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
    const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
    const dw = i % 2 === 0 ? '片' : i % 3 === 0 ? '平米' : i % 4 === 0 ? '包' : '吨';
    now.setDate(now.getDate() + 1);
    gridOptions.data.push({
      cgdh: CGNo,
      rkdh: rkdh,
      h: t,
      xh: xh,
      wlbh: wlNo,
      wlmc: wlmc,
      gys: gys,
      w: w,
      g: h,
      dw: dw,
      cgzt: s,
      rq: dayjs(now).format('YYYY-MM-DD'),
      yl: randomSumInt,
      sl: randomOrderInt,
      xsdh: xhdh,
      je: randomInt,
      6: '139xxxxxxxx',
    })
  }
}
//组件接收参数
const gridOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY: {enabled: true},//开启虚拟滚动
  showOverflow: true,
  //showDetails: false,//弹窗 是否显示
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  columns: [
    {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: 50},//详情
    {title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
    {type: 'checkbox', fixed: "left", title: '', width: 50},
    {type: 'seq', fixed: "left", title: ' ', width: 50},
    {
      field: 'rkdh',
      width: '10%',
      title: '入库单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'cgdh',
      width: '10%',
      title: '采购单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'cgzt', width: '10%', title: '状态', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'gys',
      width: '10%',
      title: '供应商',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlbh',
      width: '10%',
      title: '物料编号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlmc',
      width: '10%',
      title: '物料名称',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'w', width: '8%', title: '宽度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'g', width: '8%', title: '高度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'h', width: '8%', title: '厚度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'xh', width: '8%', title: '型号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'dw', width: '8%', title: '单位', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '12%',
      title: '不含税单价',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'sl', width: '8%', title: '数量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'sl',
      width: '12%',
      title: '已采购数量',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'je', width: '8%', title: '金额', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'je',
      width: '12%',
      title: '不含税金额',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '8%', title: '税率', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'sl', width: '8%', title: '库存', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '周用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '月用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'cgzt',
      width: '10%',
      title: '单据状态',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'xsdh',
      width: '10%',
      title: '销售单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'rq',
      width: '10%',
      title: '制单日期',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '10%', title: '制单人', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '10%',
      title: '采购部门',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: '7',
      width: '10%',
      title: '采购组织',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '8', width: '10%', title: '备注', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
  ],//表头参数
  toolbarConfig: {
    buttons: [{type: 'text'/*,name:'订单入库'*/}, {
      'name': '入库记录',
      'code': 'Log'
    },
      {
        'name': '确认入库',
        status: 'primary',
        'code': 'Sure'
      }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    style: 'paddling-left:10px'
  },//表头按钮
  data: [],//table body实际数据
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 4}
  ],//合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
//详情框 部分2
const showCGDH = ref();
const showDetails = ref(false);
let detailData = [];
const cellClickEvent = ({row}) => {
  if(isQueryColumnId===false){
    queryColumnId();
  }
  detailData = list.map(field => {
    return {label: queryColumnsTitle(field), value: row[field]}
  })
  showDetails.value = true;
  showCGDH.value = row['cgdh'];
}
//获取表列
let list = [];
let columnIndex = 4;//列标头从第几列开始的
let isQueryColumnId = false;
const queryColumnId = () => {
  while (columnIndex < gridOptions.columns.length) {
    list.push(gridOptions.columns[columnIndex].field);
    columnIndex++;
  }
  isQueryColumnId = true;
  return list;
}
//获取表列名
function queryColumnsTitle(cn) {
  let i = 0;
  while (i < gridOptions.columns.length + 1) {
    if (gridOptions.columns[i].field === cn) {
      return gridOptions.columns[i].title;
    }
    i++;
  }
}
//详情框 部分2 结束
const SureStorage = () => {
  MessageShow('确认入库成功');
}
const now = new Date()
//时间快捷选择
const datevalue = ref('')
const shortcuts = [
  {
    text: '近一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
  },
  {
    text: '近一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  },
  {
    text: '近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  },
]
//页面逻辑代码执行
function logicExecute(type) {
  const $grid = xGrid.value
  switch (type) {
    case '入库':
      //入库逻辑代码TODO
      MessageShow('入库成功!', 'success');
      break;
    case '退货':
      //退货逻辑代码TODO
      MessageShow('退货成功!', 'success');
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
const MessageShow = (content, type = 'success') => {
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title = '操作确认提示', type = 'warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        return logicExecute(czType);
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
</script>
<style scoped>
:deep(.v-column-label div span) {
  font-weight: bold;
}
</style>
UI-Project/src/views/mm/identify/identify.vue
New file
@@ -0,0 +1,74 @@
<template>
  <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
    <div style="display: flex;">
      <div style="margin-left: 400px;font-size: 20px;">工程号:P20240305001 </div>
      <div style="margin-left: 150px;font-size: 20px;">版图编号:1</div>
    </div>
      <svg width="100%" height="650" xmlns="http://www.w3.org/2000/svg">
        <g stroke="null" id="Layer_1">
          <title stroke="null">Layer 1</title>
          <image x="100" y="50" width="100" xlink:href="${pageContext.request.contextPath}/static/images/log2.png"/>
          <!-- <text stroke="#000" xml:space="preserve" font-family="'Catamaran'" font-size="25" class="font1" y="105" x="740">1号线玻璃落架指导</text> -->
          <!-- 使用 v-for 循环渲染数据 -->
          <g v-for="(rack, index) in racks" :key="index">
            <rect :x="rack.x" :y="rack.y" :width="rack.width" :height="rack.height" :fill="rack.fillColor"/>
            <rect
              :x="calculateItemXPosition(rack, rack.item, index)"
              :y="calculateItemYPosition(rack, rack.item, index)"
              :width="rack.item.width"
              :height="rack.item.height"
              :fill="rack.item.fillColor"
            />
            <!-- <text :x="rack.x" :y="rack.y-10"  text-anchor="middle">{{ index + 1 }}号工位</text> -->
            <!-- <text :x="rack.x" :y="rack.y-30"  text-anchor="middle">{{rack.item.content}}</text> -->
          </g>
          <!-- 其他元素 -->
          <!-- <text id="glass_size" font-size="30px" font-weight="bold" x="100" y="600" text-anchor="middle" alignment-baseline="middle"></text> -->
          <!-- <text id="glass_pos" font-size="30px" font-weight="bold" x="100" y="600" text-anchor="middle" alignment-baseline="middle"></text> -->
        </g>
      </svg>
  </el-card>
</template>
<script>
export default {
  data() {
    return {
      racks: [
        { x: 70, y: 126, width: 600, height: 240, fillColor: '#79bbff', item: { width: 40, height: 30, top:5, fillColor: '#911005' ,content:'NG123456'} },
        { x: 675, y: 126, width: 600, height: 240, fillColor: '#a0cfff', item: { width: 40, height: 30, fillColor: 'yellow' ,content:'NG1234567'} },
        { x: 70, y: 370, width: 1100, height: 260, fillColor: '#529b2e', item: { width: 40, height: 30, fillColor: 'yellow' ,content:'NG12345678'} },
        { x: 1175, y: 370, width: 200, height: 300, fillColor: '#529b2e', item: { width: 40, height: 30, fillColor: 'yellow' ,content:'NG123456910'} },
      ]
    };
  },
  methods: {
    calculateItemXPosition(rack, item, index) {
  if (index === 4) {
    // 第五个矩形,确保不超出架子右边界
    return Math.min(rack.x + rack.width - item.width, rack.x + rack.width);
  } else {
    return Math.max(rack.x, Math.min(rack.x + rack.width / 2 - item.width / 2, rack.x + rack.width - item.width));
  }
},
calculateItemYPosition(rack, item, index) {
  if (index === 0 || index === 2) {
    // 第一个和第三个矩形,贴近架子顶部
    return Math.min(rack.y, rack.y + rack.height);
  } else if (index === 1 || index === 3) {
    // 第二个和第四个矩形,贴近架子底部
    return Math.max(rack.y, Math.min(rack.y + rack.height - item.height, rack.y + rack.height));
  }
}
  }
};
</script>
<style scoped>
.glass-rack {
  width: 100%;
  height: 80vh;
}
</style>
UI-Project/src/views/mm/mainIngredient/CreateIngredients.vue
@@ -17,6 +17,7 @@
<template>
 <div class="center-box">
   <el-card class="form-card">
   <el-form  size="medium" >
<div>
UI-Project/src/views/mm/mainIngredient/Ingredients.vue
@@ -49,7 +49,7 @@
  margin-left: 1rem;
}
#searchButton1{
//margin-left: 10rem;
  /* margin-left: 10rem; */
}
/*main-body样式*/
#main-body{
UI-Project/src/views/mm/purchaseOrder/PurchaseOrder.vue
@@ -1,121 +1,39 @@
<template>
  <div class="common-layout">
    <el-container>
      <el-header style="height: 30px">
        <el-breadcrumb :separator-icon="ArrowRight">
          <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''"
                              :to="{path:'/main/purchaseOrder/SelectPurchaseOrder'}">查询采购订单
      <!-- <el-header style="height: 30px"> -->
        <!-- <el-breadcrumb :separator-icon="ArrowRight">
          <el-breadcrumb-item>采购与物资</el-breadcrumb-item>
          <el-breadcrumb-item> 采购退货
          </el-breadcrumb-item>
          <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''"
                              :to="{path:'/main/purchaseOrder/CreatePurchaseOrder'}">创建采购订单
          <el-breadcrumb-item :to="{path:'/main/purchaseReturn/SelectPurchaseReturn'}"> 查询
          </el-breadcrumb-item>
          <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''"
                              :to="{path:'/main/purchaseOrder/StoragePurchaseOrder'}">采购入库
          <el-breadcrumb-item >
          </el-breadcrumb-item>
          <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''"
                              :to="{path:'/main/purchaseOrder/ReturnPurchaseOrder'}">采购退货
          </el-breadcrumb-item>
          <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''"
                              :to="{path:'/main/purchaseOrder/PaymentPurchaseOrder'}">应付采购订单
          </el-breadcrumb-item>
          <el-breadcrumb-item @click="changeRouter(6)" :class="indexFlag===6?'indexTag':''"
                              :to="{path:'/main/purchaseOrder/CreateHeader'}">创建头模拟
          </el-breadcrumb-item>
          <el-breadcrumb-item style="display: none"></el-breadcrumb-item>
        </el-breadcrumb>
      </el-header>
      <el-main style="padding: 0">
        </el-breadcrumb> -->
      <!-- </el-header> -->
      <el-main style="padding: 0;width: 99%;height: 100%;">
        <router-view/>
      </el-main>
      <!--     <el-footer>Footer</el-footer>-->
      <!--      <el-footer>Footer</el-footer>-->
    </el-container>
  </div>
</template>
<script setup>
import {nextTick, ref} from 'vue'
import {ArrowRight, Search} from "@element-plus/icons-vue";
import {ElMessage, ElMessageBox} from "element-plus";
let indexFlag = $ref(1)
import {ArrowRight} from "@element-plus/icons-vue";
function changeRouter(index) {
  indexFlag = index
}
/*
//提示信息
//信息内容,显示方式,显示标题,类型
const MessageShow = (content, type = 'success') =>{
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title = '操作确认提示', type = 'warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        switch (czType) {
          case '确定':
            //多选退货逻辑代码TODO
            MessageShow('操作成功!', 'success');
            break;
          case '退货':
            //单退货逻辑代码TODO
            MessageShow('操作成功!', 'success');
            break;
          default:
            MessageShow('未知操作!', 'error');
            break;
        }
        return true;
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
//弹窗信息
const MessageAlertShow = (content, title, type = 'info') => {
  ElMessageBox.alert(content, title, {
    // 禁止自动对焦
    //autofocus: false,
    confirmButtonText: 'OK',
    /!*callback: (action: Action) => {
      MessageShow(`action: ${action}`,type)
    },*!/
  })
}
*/
</script>
<style scoped>
:deep(.indexTag .el-breadcrumb__inner) {
  color: #5CADFE !important;
  font-weight: 900;
}
</style>
UI-Project/src/views/mm/purchaseOrder/Select.vue
@@ -1,257 +1,753 @@
<template>
  <el-container>
    <el-header class="m-header" style="height: auto">
      <el-row :gutter="10" style="margin-bottom: 5px">
        <el-col :span="7">
          <el-date-picker
              v-model="datevalue"
              type="daterange"
              unlink-panels
              range-separator="到"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :shortcuts="shortcuts"
              :size="size"
              format="YYYY/MM/DD"
              value-format="YYYY-MM-DD"
          />
        </el-col>
        <el-col :span="2">
          <el-button
              id="select"
              type="primary"
              :icon="Search"
              @click="BtnSearchPurchaseOrder">查询
          </el-button>
        </el-col>
      </el-row>
    </el-header>
    <el-main style="padding-top: 5px;height:100%">
      <vxe-grid
          max-height="600"
          @filter-change="filterChanged"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          @cell-dblclick="cellClickEvent"
      >
        <!--      下拉显示所有信息插槽-->
        <template #content="{ row }">
          <ul class="expand-wrapper">
            <li  v-for="(item,index) in gridOptions.columns" v-show="item.field!==undefined ">
              <span style="font-weight: bold">{{item.title+':  '}}</span>
              <span>{{ row[item.field] }}</span>
            </li>
          </ul>
        </template>
        <!--左边固定显示的插槽-->
        <template #button_slot="{ row }">
          <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
          <!--          <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>-->
          <!--          <el-button @click="cellClickEvent" link type="primary" size="small">详情</el-button>-->
        </template>
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
      </vxe-grid>
      <!--      详情框 部分1-->
      <vxe-modal v-model="showDetails" title="查看详情" width="600" height="80%" :mask="false" :lock-view="false"
                 resize>
        <el-container>
          <el-header height="35px"
                     style="margin: 0;padding: 0">
            <el-input v-model="showCGDH" placeholder="采购单号" disabled>
              <template #prepend>采购单号:</template>
            </el-input>
          </el-header>
          <el-main>
            <template #default>
              <vxe-table
                  border="inner"
                  auto-resize
                  show-overflow
                  max-height="400"
                  :row-config="{isHover: true}"
                  :show-header="false"
                  :sync-resize="showDetails"
                  :data="detailData">
                <vxe-column field="label" width="30%" class-name="v-column-label"></vxe-column>
                <vxe-column field="value"></vxe-column>
              </vxe-table>
            </template>
          </el-main>
          <el-footer height="40px">
            <el-row>
              <el-col :offset="20" :span="4">
                <el-button
                    id="Sure"
                    type="primary"
                    @click="logicExecute('编辑')"
                >编辑
                </el-button>
              </el-col>
            </el-row>
          </el-footer>
        </el-container>
      </vxe-modal>
      <!--      详情框 部分1 结束-->
    </el-main>
  </el-container>
</template>
<script setup>
import {ref} from "vue";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
import {Search} from "@element-plus/icons-vue";
import dayjs from "dayjs";
import {ElMessage} from "element-plus";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
let router = useRouter()
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/purchaseOrder/CreatePurchaseOrder', query: {id: row.id}})
      break
    }
    case 'delete': {
      alert('我接收到子组件传送的删除信息' + row.id)
      break
    }
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(false)
const box = ref(true)
const boxa = ref(false)
const boxb = ref(false)
const tableData = [
  {
    id: '1',
    long: '1005',
    wide: '183.6',
    thick: '1991',
    type: '待识别',
    typea: '1',
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    type: '待识别'
  }
}
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'Add': {//新增
          router.push({path: '/main/purchaseOrder/CreatePurchaseOrder'})
          break
        }
        case 'AddNo': {//无单新增
          MessageShow('点击了无单新增', 'success');
          break
        }
      }
    }
]
const tableDataa = [
  {
    ida: '3',
    longa: '1005',
    widea: '183.6',
    thicka: '1991',
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
  {
    ida: '4',
    longa: '105',
    widea: '183',
    thicka: '191',
  }
]
const open = () => {
  ElMessageBox.confirm(
    '是否删除该条信息?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  },
}
const BtnSearchPurchaseOrder = () => {
  for (let i = 1; i < 6; i++) {
    const randomInt = Math.floor(Math.random() * 999) + 1000;//4位数随机数
    const randomSumInt = Math.floor(Math.random() * 99) + 10;//2位数随机数
    const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3位数随机数
    const t = i % 2 === 0 ? 5 : 6;
    const s = i % 2 === 0 ? '入库' : i % 3 === 0 ? '待审核' : i % 5 === 0 ? '已采购' : '退库';
    const CGNo = 'NGCG231200' + randomOrderInt;//采购编号
    const wlNo = 'NGWL1000' + randomInt;
    const xh = 'NGXH' + randomSumInt;
    const wlmc = 'WLMC' + randomInt;
    const gys = '供应商' + randomSumInt;
    const xhdh = 'NG231200' + randomOrderInt;
    const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
    const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
    const dw = i % 2 === 0 ? '片' : i % 3 === 0 ? '平米' : i % 4 === 0 ? '包' : '吨';
    now.setDate(now.getDate() + 1);
    gridOptions.data.push({
      cgdh: CGNo,
      h: t,
      xh: xh,
      wlbh: wlNo,
      wlmc: wlmc,
      gys: gys,
      w: w,
      g: h,
      dw: dw,
      cgzt: s,
      rq: dayjs(now).format('YYYY-MM-DD'),
      yl: randomSumInt,
      sl: randomOrderInt,
      xsdh: xhdh,
      je: randomInt,
      6: '139xxxxxxxx',
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '删除成功!',
      })
    })
  }
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '删除失败',
      })
    })
}
//页面逻辑代码执行
function logicExecute(type) {
  const $grid = xGrid.value
const getTableRow = (row,type) =>{
  switch (type) {
    case '编辑':
      //MessageShow('操作成功!', 'success');
      //编辑逻辑代码TODO
      router.push({path: '/main/purchaseOrder/CreatePurchaseOrder'})
      break;
    case '退货':
      //单退货逻辑代码TODO
      MessageShow('操作成功!', 'success');
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
  return true;
}
//组件接收参数
const dialogForm = () => {
  ElMessageBox.confirm(
    '是否切换版图?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
  .then(() => {
    // this.boxa = true
    // this.box = false
    })
}
const selectedRows = ref([]);
const handleSelectionChange = (selection) => {
  selectedRows.value = selection;
};
const showMessage = () => {
  if (selectedRows.value.length === 0) {
    ElMessage('请至少选择一个选项')
  } else{
    ElMessage({
    message: '重新识别成功!',
    type: 'success',
  })
  }
};
const pick = () => {
  if (selectedRows.value.length === 0) {
    ElMessage('请至少选择一个选项')
  } else{
    ElMessage({
    message: '人工匹配成功!',
    type: 'success',
  })
  }
};
const remove = () => {
  if (selectedRows.value.length === 0) {
    ElMessage('请至少选择一个选项')
  } else{
    ElMessage({
    message: '操作成功!',
    type: 'success',
  })
  }
};
const gridOptions = reactive({
  border: "full",//表格加边框
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY: {enabled: true},//开启虚拟滚动
  showOverflow: true,
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
@@ -267,296 +763,155 @@
    mode: 'row',
    showStatus: true
  },
  columns: [
    {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: 50},//详情
    {title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
    /* {type: 'checkbox',fixed:"left", title: '', width: 50 },*/
    {type: 'seq', fixed: "left", title: ' ', width: 50},
  data:  [
    {
      field: 'cgdh',
      width: '10%',
      title: '采购单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'cgzt', width: '10%', title: '状态', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'gys',
      width: '10%',
      title: '供应商',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlbh',
      width: '10%',
      title: '物料编号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlmc',
      width: '10%',
      title: '物料名称',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'w', width: '8%', title: '宽度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'g', width: '8%', title: '高度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'h', width: '8%', title: '厚度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'xh', width: '8%', title: '型号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'dw', width: '8%', title: '单位', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '12%',
      title: '不含税单价',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'sl', width: '8%', title: '数量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'sl',
      width: '12%',
      title: '已采购数量',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'je', width: '8%', title: '金额', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'je',
      width: '12%',
      title: '不含税金额',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '8%', title: '税率', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'sl', width: '8%', title: '库存', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '周用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '月用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'cgzt',
      width: '10%',
      title: '单据状态',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'xsdh',
      width: '10%',
      title: '销售单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'rq',
      width: '10%',
      title: '制单日期',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '10%', title: '制单人', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '10%',
      title: '采购部门',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: '6',
      width: '10%',
      title: '采购组织',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '10%', title: '备注', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
  ],//表头参数
  toolbarConfig: {
    buttons: [/*{type:'text'},
      {
      'name': '创建订单',
      'code':'Add',
    },
      {
        'name': '无单新增',
        'code':'AddNo'
      }*/
    ],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    style: 'paddling-left:10px'
  },//表头按钮
  data: [],//table body实际数据
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 4}
  ],//合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
//详情框 部分2
const showCGDH = ref();
const showDetails = ref(false);
let detailData = [];
const cellClickEvent = ({row}) => {
  if(isQueryColumnId===false){
    queryColumnId();
  }
  detailData = list.map(field => {
    return {label: queryColumnsTitle(field), value: row[field]}
  })
  showDetails.value = true;
  showCGDH.value = row['cgdh'];
}
//获取表列
let list = [];
let columnIndex = 3;//列标头从第几列开始的
let isQueryColumnId = false;
const queryColumnId = () => {
  while (columnIndex < gridOptions.columns.length) {
    list.push(gridOptions.columns[columnIndex].field);
    columnIndex++;
  }
  isQueryColumnId = true;
  return list;
}
//获取表列名
function queryColumnsTitle(cn) {
  let i = 0;
  while (i < gridOptions.columns.length + 1) {
    if (gridOptions.columns[i].field === cn) {
      return gridOptions.columns[i].title;
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
    i++;
  }
}
//详情框 部分2 结束
const now = new Date()
//时间快捷选择
const datevalue = ref('')
const shortcuts = [
  {
    text: '近一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
  },
  {
    text: '近一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  },
  {
    text: '近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  },
]
//提示信息
//信息内容,显示方式,显示标题,类型
const MessageShow = (content, type = 'success') => {
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title = '操作确认提示', type = 'warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        logicExecute(czType);
        return true;
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
//弹窗信息
const MessageAlertShow = (content, title, type = 'info') => {
  ElMessageBox.alert(content, title, {
    // 禁止自动对焦
    //autofocus: false,
    confirmButtonText: 'OK',
    /*callback: (action: Action) => {
      MessageShow(`action: ${action}`,type)
    },*/
  })
}
  ],
})
</script>
<template>
  <div>
     <el-button style="margin-top: 5px;margin-left: 5px;"   id="searchButton" type="primary" @click="showMessage">重新识别</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" type="primary" @click="pick">人工匹配</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" type="primary" @click="remove">人工拿走</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" type="primary" >破损</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" @click="boxb = true;box = false" >合并</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" @click="box = true;boxb = false" >单片</el-button>
    <el-button style="margin-top: 5px;float: right;margin-right: 50px;"  id="searchButton" type="text"  @click="dialogForm">版图号</el-button>
    <div v-if="box">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 450px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column type="selection" width="55"  />
          <el-table-column prop="id" align="center" label="id" min-width="80" />
          <el-table-column prop="long" align="center" label="长" min-width="120" />
          <el-table-column prop="wide" align="center" label="宽" min-width="120" />
          <el-table-column prop="type" align="center" label="状态" min-width="120" />
          <el-table-column prop="thick" align="center" label="其他" min-width="120" />
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default>
              <!-- <el-button size="mini" type="text" plain  @click="dialogFormVisible = true">详情</el-button> -->
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">设置</el-button>
            </template>
        </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
    <div v-if="boxb">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 450px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column type="selection" width="55"  />
          <el-table-column prop="id" align="center" label="类型序号" min-width="80" />
          <el-table-column prop="long" align="center" label="长" min-width="120" />
          <el-table-column prop="wide" align="center" label="宽" min-width="120" />
          <el-table-column prop="typea" align="center" label="数量" min-width="120" />
          <el-table-column prop="thick" align="center" label="其他" min-width="120" />
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default>
              <!-- <el-button size="mini" type="text" plain  @click="dialogFormVisible = true">详情</el-button> -->
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">设置</el-button>
            </template>
        </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
    <!-- <div v-if="boxa">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableDataa" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column type="selection" width="55"  />
          <el-table-column prop="ida" align="center" label="id" min-width="80" />
          <el-table-column prop="longa" align="center" label="长" min-width="120" />
          <el-table-column prop="widea" align="center" label="宽" min-width="120" />
          <el-table-column prop="thicka" align="center" label="其他" min-width="120" />
        </el-table>
      </div>
    </el-card>
  </div> -->
  </div>
  <!-- <el-dialog v-model="dialogFormVisible" top="21vh" width="30%" title="小片图" >
        <div id="message">
          200*100
        </div>
    <template #footer>
      <div id="dialog-footer">
        <el-button @click="dialogFormVisible = false">关闭</el-button>
      </div>
    </template>
  </el-dialog> -->
  <el-dialog v-model="dialogFormVisiblea" top="21vh" width="30%" title="测量设置" >
            <el-form  size="mini" label-width="150px">
      <el-form style="margin-left: 80px;">
        <el-form-item label="误差长:" :required="true" style="width: 16vw;margin-bottom: 30px;">
            <div style="display: flex;"><el-input  autocomplete="off" /><div style="margin-left: 10px;">mm</div> </div>
              </el-form-item>
              <el-form-item label="误差宽:" :required="true" style="width: 16vw">
            <div style="display: flex;"><el-input  autocomplete="off" /><div style="margin-left: 10px;">mm</div> </div>
              </el-form-item>
        </el-form>
            </el-form>
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="dialogFormVisiblea = false">
          确认
        </el-button>
        <el-button @click="dialogFormVisiblea = false">取消</el-button>
      </div>
    </template>
  </el-dialog>
  <div id="awatch">小片图:
<div id="watch">200*100</div>
</div>
</template>
<style scoped>
:deep(.v-column-label div span) {
  font-weight: bold;
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
#message{
  text-align: center;
  align-items: center;
  color: black;
   width: 200px;
   height: 100px;
   background-color: #337ecc;
   margin-left: 28%;
}
#awatch{
  display: flex;
  margin-top: 20px;
  font-size: 20px;
  margin-left: 50px;
}
#watch{
  text-align: center;
  align-items: center;
  color: black;
   width: 300px;
   height: 150px;
   background-color: #337ecc;
   margin-left: 2%;
   margin-top: 10px;
}
</style>
UI-Project/src/views/mm/purchaseReturn/PurchaseReturn.vue
@@ -1,39 +1,174 @@
<template>
  <div class="common-layout">
    <el-container>
      <el-header style="height: 30px">
        <el-breadcrumb :separator-icon="ArrowRight">
          <el-breadcrumb-item>采购与物资</el-breadcrumb-item>
          <el-breadcrumb-item> 采购退货
          </el-breadcrumb-item>
          <el-breadcrumb-item :to="{path:'/main/purchaseReturn/SelectPurchaseReturn'}"> 查询
          </el-breadcrumb-item>
          <el-breadcrumb-item >
          </el-breadcrumb-item>
        </el-breadcrumb>
      </el-header>
      <el-main style="padding: 0;width: 99%;height: 100%;">
        <router-view/>
      </el-main>
      <!--      <el-footer>Footer</el-footer>-->
    </el-container>
  </div>
</template>
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
import {ArrowRight} from "@element-plus/icons-vue";
import { ref } from 'vue'
const dialogFormVisible = ref(true)
const dialogFormVisiblea = ref(false)
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
    }
  ],
})
</script>
<template>
  <div style="margin-top: 10px;">
     <el-button style="margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false">摆片版图</el-button>
    <el-button  id="searchButton" type="success" @click="dialogFormVisiblea = true;dialogFormVisible = false">已出炉玻璃</el-button>
<div v-if="dialogFormVisible" >
    <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
      <div style="display: flex;margin-bottom: 20px;">
      <div style="margin-left: 400px;font-size: 20px;">工程号:P20240305001 </div>
      <div style="margin-left: 150px;font-size: 20px;">版图编号:1</div>
    </div>
    <div>
            <div id="boxa" style="width: 400px;height: 120px;margin-left: 260px;">
              <div style="margin-top: 35px;"> NG202405060798A01-1</div>
            <div> 500×1500</div>
          </div>
            <div id="boxa" style="width: 400px;height: 120px;">
              <div style="margin-top: 35px;"> NG202405060798A01-1</div>
            <div> 500×1500</div>
          </div>
    </div>
    <div style="margin-top: 20px;">
            <div id="boxa" style="width: 400px;height: 120px;margin-left: 260px;">
              <div style="margin-top: 35px;"> NG202405060798A01-1</div>
            <div> 500×1500</div>
          </div>
            <div id="boxb" style="width: 400px;height: 120px;">
              <div style="margin-top: 35px;"> NG202405060798A01-1</div>
            <div> 500×1500</div>
          </div>
    </div>
    </el-card>
    </div>
<div v-if="dialogFormVisiblea">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
      <el-scrollbar height="630px">
      <div id="home-card">
      <div id="home-item" v-for="n in 20" :key="n">
            <div id="box" style="width: 100px;height: 165px;">100*65</div>
            <div id="box" style="width: 107px;height: 150px;">107*60</div>
            <div id="box" style="width: 107px;height: 155px;">109*60</div>
      </div>
    </div>
  </el-scrollbar>
    </el-card>
</div>
  </div>
</template>
<style scoped>
#boxa{
  border: 1px solid rgb(119, 116, 116);
  background-color:  #529b2e;
  text-align: center;
  display: inline-block;
    /* align-items:center; */
    /* justify-content:center; */
  margin-left: 20px;
}
#boxb{
  border: 1px solid rgb(119, 116, 116);
  background-color:  #a0cfff;
  /* display:flex; */
  text-align: center;
  display: inline-block;
    align-items:center;
    justify-content:center;
  margin-left: 20px;
}
#box{
  border: 1px solid black;
  background-color:  #337ecc;
  display:flex;
    align-items:center;
    justify-content:center;
}
#home-card {
    width: 100%;
    overflow: hidden;
    padding: 10px 0px;
    display: flex;
    flex-wrap: wrap;
    #home-item {
      border-style: solid;
      border-width: 1px;
      border-color: #E4E4E4;
      width: calc(34% - 20px);
      padding: 20px 0px 20px 20px;
      margin-right: 10px;
      margin-bottom: 10px;
      display: flex;
      justify-content: center;
      /* align-items: center; */
      background: #fff;
      #home-img {
        display: inline-block;
        width: 160px;
        height: 60px;
        margin: 0;
        padding: 0;
      }
      #home-right {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        margin-left: 10px;
        #home-num {
          font-size: 40px;
          margin: 5px 0;
        }
      }
    }
  }
</style>
UI-Project/src/views/mm/purchaseReturn/Select.vue
@@ -1,255 +1,9 @@
<template>
  <el-container>
    <el-header class="m-header" style="height: auto">
      <el-row :gutter="10" style="margin-bottom: 5px">
        <el-col :span="7">
          <el-date-picker
              v-model="datevalue"
              type="daterange"
              unlink-panels
              range-separator="到"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :shortcuts="shortcuts"
              :size="size"
              format="YYYY/MM/DD"
              value-format="YYYY-MM-DD"
          />
        </el-col>
        <el-col :span="2">
          <el-button
              id="select"
              type="primary"
              :icon="Search"
              @click="autoAddRow">查询
          </el-button>
        </el-col>
      </el-row>
    </el-header>
    <el-main style="padding-top: 5px">
      <div @scroll="handleTableScroll">
        <el-table :data="tableData" empty-text="暂无数据" style="width: 100%" max-height="550px" border
                  show-summary
                  sum-text=" ">
          <el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
          <el-table-column fixed="left" label="操作" width="120">
            <template #default="scope">
              <el-button
                  link
                  type="primary"
                  size="small"
                  @click.prevent="deleteRow(scope.$index)"
              >
                编辑
              </el-button>
              <el-button
                  link
                  type="primary"
                  size="small"
                  @click.prevent="deleteRow(scope.$index)"
              >
                删除
              </el-button>
            </template>
          </el-table-column>
          <el-table-column prop="ordernumber" label="采购单号" width="150"/>
          <el-table-column prop="name" label="供应商" width="120"/>
          <el-table-column prop="strockNumber" label="物料编号" width="200"/>
          <el-table-column prop="city" label="物料名称" width="120"/>
          <el-table-column prop="width" sortable label="宽度" width="120"/>
          <el-table-column prop="height" sortable label="高度" width="120"/>
          <el-table-column prop="thick" sortable label="厚度" width="120"/>
          <el-table-column prop="zip" label="型号" width="120"/>
          <el-table-column prop="number" label="单位" width="120"/>
          <el-table-column prop="number" sortable label="不含税单价" width="120"/>
          <el-table-column prop="number" label="数量" width="120" show-summary="ture"/>
          <el-table-column prop="number" label="已采购数量" width="120"/>
          <el-table-column prop="zip" sortable label="金额" width="120"/>
          <el-table-column prop="zip" label="不含税金额" width="120"/>
          <el-table-column prop="date" label="税率" width="120"/>
          <el-table-column prop="date" label="库存" width="120"/>
          <el-table-column prop="zip" label="周用量" width="120"/>
          <el-table-column prop="zip" label="月用量" width="120"/>
          <el-table-column prop="state" label="单据状态" width="120"/>
          <el-table-column prop="ordernumber" label="销售单号" width="200"/>
          <el-table-column prop="date" label="制单日期" width="120"/>
          <el-table-column prop="zip" label="制单人" width="120"/>
          <el-table-column prop="zip" label="采购部门" width="120"/>
          <el-table-column prop="zip" label="采购组织" width="120"/>
          <el-table-column prop="zip" label="备注" width="200"/>
        </el-table>
      </div>
    </el-main>
  </el-container>
</template>
<script setup>
import {nextTick, ref} from 'vue'
import {Search} from "@element-plus/icons-vue";
const s_wuliaomingcheng = ref('')
const s_buyOrderNumber = ref('')
const s_width = ref('')
const s_height = ref('')
const s_thick = ref('')
const options = [
  {
    value: '0',
    label: '全部'
  },
  {
    value: '1',
    label: '原片'
  },
  {
    value: '2',
    label: '化学品'
  },
  {
    value: '3',
    label: '工具'
  },
  {
    value: '4',
    label: '木箱'
  },
  {
    value: '5',
    label: '白玻'
  },
]
const buyerOptions = [
  {
    value: '0',
    label: '全部'
  },
  {
    value: '1',
    label: '采购甲'
  },
  {
    value: '2',
    label: '采购乙'
  },
]
const stateOptions = [
  {
    value: '0',
    label: '待审核'
  },
  {
    value: '1',
    label: '待采购'
  },
  {
    value: '2',
    label: '已采购'
  },
]
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
const now = new Date()
const tableData = ref([])
const autoAddRow = () => {
  for (let i = 0; i < 10; i++) {
    now.setDate(now.getDate() + 1)
    const randomInt = Math.floor(Math.random() * 999) + 1000;
    const randomOrderInt = Math.floor(Math.random() * 99) + 100;
    const randomSumInt = Math.floor(Math.random() * 99) + 10;
    var t = i % 2 === 0 ? 5 : 6;
    var s = i % 3 === 0 ? '' : i % 4 === 0 ? '已采购' : '待审核';
    var oNo = 'NGNO100000' + randomOrderInt;//订单编号
    var wlNo = 'NGWL100000' + randomInt
    tableData.value.push({
      date: dayjs(now).format('YYYY-MM-DD'),
      name: '供应商' + randomSumInt,
      state: s,
      city: 'Los Angeles',
      address: 'No. 189, Grove St, Los Angeles',
      zip: 'CA 90036',
      number: randomInt,
      width: '3660',
      height: '2440',
      rIndex: tableData.value.length + 1,
      ordernumber: oNo,
      strockNumber: wlNo,
      thick: t
    })
  }
}
const datevalue = ref('')
const shortcuts = [
  {
    text: '近一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
  },
  {
    text: '近一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  },
  {
    text: '近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  },
]
</script>
<template>
</template>
<style scoped>
.el-row {
  margin-bottom: 20px;
}
.el-row:last-child {
  margin-bottom: 0;
}
.el-col {
  border-radius: 4px;
}
.m-header {
  height: 32px;
}
</style>
UI-Project/src/views/mm/purchaseStorage/PurchaseStorage.vue
@@ -1,36 +1,174 @@
<template>
  <div class="common-layout">
    <el-container >
      <el-header style="height: 30px">
        <el-breadcrumb :separator-icon="ArrowRight">
          <el-breadcrumb-item>采购与物资</el-breadcrumb-item>
          <el-breadcrumb-item>采购入库
          </el-breadcrumb-item>
          <el-breadcrumb-item :to="{path:'/main/purchaseStorage/SelectPurchaseStorage'}">查询
          </el-breadcrumb-item>
          <el-breadcrumb-item></el-breadcrumb-item>
        </el-breadcrumb>
      </el-header>
      <el-main style="padding: 0">
        <router-view/>
      </el-main>
      <!--      <el-footer>Footer</el-footer>-->
    </el-container>
  </div>
</template>
<script setup>
import {useRouter} from "vue-router";
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter();
import {ArrowRight} from "@element-plus/icons-vue";
import { ref } from 'vue'
const dialogFormVisible = ref(true)
const dialogFormVisiblea = ref(false)
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
    }
  ],
})
</script>
<template>
  <div style="margin-top: 10px;">
     <el-button style="margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false">摆片版图</el-button>
    <el-button  id="searchButton" type="success" @click="dialogFormVisiblea = true;dialogFormVisible = false">已出炉玻璃</el-button>
<div v-if="dialogFormVisible" >
    <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
      <div style="display: flex;margin-bottom: 20px;">
      <div style="margin-left: 400px;font-size: 20px;">工程号:P20240305001 </div>
      <div style="margin-left: 150px;font-size: 20px;">版图编号:1</div>
    </div>
    <div>
            <div id="boxa" style="width: 400px;height: 120px;margin-left: 260px;">
              <div style="margin-top: 35px;"> NG202405060798A01-1</div>
            <div> 500×1500</div>
          </div>
            <div id="boxa" style="width: 400px;height: 120px;">
              <div style="margin-top: 35px;"> NG202405060798A01-1</div>
            <div> 500×1500</div>
          </div>
    </div>
    <div style="margin-top: 20px;">
            <div id="boxa" style="width: 400px;height: 120px;margin-left: 260px;">
              <div style="margin-top: 35px;"> NG202405060798A01-1</div>
            <div> 500×1500</div>
          </div>
            <div id="boxb" style="width: 400px;height: 120px;">
              <div style="margin-top: 35px;"> NG202405060798A01-1</div>
            <div> 500×1500</div>
          </div>
    </div>
    </el-card>
    </div>
<div v-if="dialogFormVisiblea">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
      <el-scrollbar height="630px">
      <div id="home-card">
      <div id="home-item" v-for="n in 20" :key="n">
            <div id="box" style="width: 100px;height: 165px;">100*65</div>
            <div id="box" style="width: 107px;height: 150px;">107*60</div>
            <div id="box" style="width: 107px;height: 155px;">109*60</div>
      </div>
    </div>
  </el-scrollbar>
    </el-card>
</div>
  </div>
</template>
<style scoped>
#boxa{
  border: 1px solid rgb(119, 116, 116);
  background-color:  #529b2e;
  text-align: center;
  display: inline-block;
    /* align-items:center; */
    /* justify-content:center; */
  margin-left: 20px;
}
#boxb{
  border: 1px solid rgb(119, 116, 116);
  background-color:  #a0cfff;
  /* display:flex; */
  text-align: center;
  display: inline-block;
    align-items:center;
    justify-content:center;
  margin-left: 20px;
}
#box{
  border: 1px solid black;
  background-color:  #337ecc;
  display:flex;
    align-items:center;
    justify-content:center;
}
#home-card {
    width: 100%;
    overflow: hidden;
    padding: 10px 0px;
    display: flex;
    flex-wrap: wrap;
    #home-item {
      border-style: solid;
      border-width: 1px;
      border-color: #E4E4E4;
      width: calc(34% - 20px);
      padding: 20px 0px 20px 20px;
      margin-right: 10px;
      margin-bottom: 10px;
      display: flex;
      justify-content: center;
      /* align-items: center; */
      background: #fff;
      #home-img {
        display: inline-block;
        width: 160px;
        height: 60px;
        margin: 0;
        padding: 0;
      }
      #home-right {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        margin-left: 10px;
        #home-num {
          font-size: 40px;
          margin: 5px 0;
        }
      }
    }
  }
</style>
UI-Project/src/views/mm/purchaseStorage/Select.vue
@@ -1,276 +1,144 @@
<template>
  <el-container>
    <el-header class="m-header" style="height: auto">
      <!-- -->
      <el-row :gutter="10" style="margin-bottom: 5px">
        <el-col :span="7">
          <el-date-picker
              v-model="datevalue"
              type="daterange"
              unlink-panels
              range-separator="到"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :shortcuts="shortcuts"
              :size="size"
              format="YYYY/MM/DD"
              value-format="YYYY-MM-DD"
          />
        </el-col>
        <el-col :span="3">
          <el-button
              id="select"
              type="primary"
              :icon="Search"
              @click="autoAddRow">查询
          </el-button>
        </el-col>
      </el-row>
    </el-header>
    <el-main style="padding-top: 5px">
      <el-table :data="tableData" empty-text="暂无数据" style="width: 100%" max-height="550px"  border show-summary
                sum-text=" ">
        <el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
        <el-table-column fixed="left" label="操作" width="120">
          <template #default="scope">
            <el-button
                link
                type="primary"
                size="small"
                @click.prevent="deleteRow(scope.$index)"
            >
              编辑
            </el-button>
            <el-button
                link
                type="primary"
                size="small"
                @click.prevent="deleteRow(scope.$index)"
            >
              删除
            </el-button>
          </template>
        </el-table-column>
        <el-table-column prop="stockItem" label="库存组织" width="150"/>
        <el-table-column prop="wuliaoCode" label="物料编号" width="220"/>
        <el-table-column prop="rukuCode" label="入库单号" width="120"/>
        <el-table-column prop="storageType" label="入库类型" width="120"/>
        <el-table-column prop="buyerCode" label="采购单号" width="150"/>
        <el-table-column prop="wuliaoName" label="物料名称" width="120"/>
        <el-table-column prop="state" label="单据状态" width="120"/>
        <el-table-column prop="shname" label="审核员" width="120"/>
        <el-table-column prop="date" sortable label="审核日期" width="120"/>
        <el-table-column prop="date" sortable label="入库日期" width="120"/>
        <el-table-column prop="buyerName" label="采购员" width="120"/>
        <el-table-column prop="cgName" sortable label="仓管员" width="120"/>
        <el-table-column prop="zip" label="制单人" width="120"/>
        <el-table-column prop="address" label="产地" width="120"/>
        <el-table-column prop="number" sortable label="宽度" width="120"/>
        <el-table-column prop="number" sortable label="厚度" width="120"/>
        <el-table-column prop="kcCode" label="库存编号" width="150"/>
        <el-table-column prop="number" sortable label="箱数" width="120"/>
        <el-table-column prop="number" sortable label="单箱片数" width="200"/>
        <el-table-column prop="oneArea" sortable label="单片面积" width="120"/>
        <el-table-column prop="number" sortable label="总面积" width="120"/>
        <el-table-column prop="number" sortable label="总数量" width="120"/>
        <el-table-column prop="number" sortable label="总金额" width="120"/>
        <el-table-column prop="date" sortable label="生产日期" width="120"/>
        <el-table-column prop="zip" label="库区" width="120"/>
        <el-table-column prop="zip" label="备注" width="200"/>
      </el-table>
    </el-main>
  </el-container>
</template>
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
import {ref} from 'vue'
import {ArrowRight, Search} from "@element-plus/icons-vue";
import { ref } from 'vue'
const dialogFormVisible = ref(true)
const dialogFormVisiblea = ref(false)
const s_wuliaomingcheng = ref('')
const s_buyOrderNumber = ref('')
const s_width = ref('')
const s_height = ref('')
const s_thick = ref('')
const options = [
  {
    value: '0',
    label: '全部'
  },
  {
    value: '1',
    label: '原片'
  },
  {
    value: '2',
    label: '化学品'
  },
  {
    value: '3',
    label: '工具'
  },
  {
    value: '4',
    label: '木箱'
  },
  {
    value: '5',
    label: '白玻'
  },
]
const buyerOptions = [
  {
    value: '0',
    label: '全部'
  },
  {
    value: '1',
    label: '采购甲'
  },
  {
    value: '2',
    label: '采购乙'
  },
]
const stateOptions = [
  {
    value: '0',
    label: '待审核'
  },
  {
    value: '1',
    label: '待采购'
  },
  {
    value: '2',
    label: '已采购'
  },
]
const stockItemOptions = [
  {
    value: 0,
    label: '人工库'
  }, {
    value: 1,
    label: '计划库'
  }, {
    value: 2,
    label: '自动化库'
  }, {
    value: 3,
    label: '余片库'
  }, {
    value: 4,
    label: '残片库'
  }, {
    value: 5,
    label: '辅料库'
  },
]
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
const now = new Date()
const tableData = ref([])
const autoAddRow = () => {
  for (let i = 0; i < 10; i++) {
    now.setDate(now.getDate() + 1)
    const randomWLInt = Math.floor(Math.random() * 99999) + 100000;
    const randomInt = Math.floor(Math.random() * 999) + 1000;
    const randomSumInt = Math.floor(Math.random() * 99) + 10;
    const randomErInt = Math.floor(Math.random() * 9);
    const randomErInt2 = Math.floor(Math.random() * 9);
    const randomErInt3 = Math.floor(Math.random() * 9);
    const t = i % 3 === 0 ? 5 : i % 4 === 0 ? 6 : i % 5 === 0 ? 8 : i % 7 === 0 ? 10 : 12;
    const sItem = i % 3 === 0 ? '计划库' : i % 4 === 0 ? '人工库' : i % 5 === 0 ? '自动化库' : i % 7 === 0 ? '余片库' : '辅料库';
    tableData.value.push({
      date: dayjs(now).format('YYYY-MM-DD'),
      name: '供应商' + randomSumInt,
      state: '未审核',
      stockItem: sItem,
      wuliaoCode: 'WL9000000000' + randomWLInt,
      rukuCode: 'RK2312' + randomInt,
      storageType: '标准采购',
      buyerCode: 'CG2312000' + randomInt,
      zip: 'CA 90036',
      number: randomInt,
      shname: '审核' + randomErInt,
      buyerName: '采购' + randomErInt2,
      cgName: '仓管' + randomErInt3,
      address: '这是物料产地',
      kcCode: 'KC2312999' + randomInt,
      oneArea: randomSumInt / 10,
      rIndex: tableData.value.length + 1,
      thick: t
    })
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const datevalue = ref('')
const shortcuts = [
  {
    text: '近一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  {
    text: '近一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  filterConfig: {   //筛选配置项
    remote: true
  },
  {
    text: '近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  customConfig: {
    storage: true
  },
]
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
    }
  ],
})
</script>
<template>
  <div>
     <el-button style="margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false">摆片版图</el-button>
    <el-button  id="searchButton" type="success" @click="dialogFormVisiblea = true;dialogFormVisible = false">已出炉玻璃</el-button>
<div v-if="dialogFormVisible" >
    <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
            <div id="boxa" style="width: 100px;height: 165px;">100*65</div>
            <div id="boxa" style="width: 107px;height: 150px;">107*60</div>
            <div id="boxa" style="width: 107px;height: 150px;">107*60</div>
    </el-card>
    </div>
<div v-if="dialogFormVisiblea">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
      <el-scrollbar height="630px">
      <div id="home-card">
      <div id="home-item" v-for="n in 20" :key="n">
            <div id="box" style="width: 100px;height: 165px;">100*65</div>
            <div id="box" style="width: 107px;height: 150px;">107*60</div>
            <div id="box" style="width: 107px;height: 155px;">109*60</div>
      </div>
    </div>
  </el-scrollbar>
    </el-card>
</div>
  </div>
</template>
<style scoped>
.el-row {
  margin-bottom: 20px;
#boxa{
  border: 1px solid black;
  background-color:  #337ecc;
  /* display:flex; */
  text-align: center;
  display: inline-block;
    align-items:center;
    justify-content:center;
}
.el-row:last-child {
  margin-bottom: 0;
#box{
  border: 1px solid black;
  background-color:  #337ecc;
  display:flex;
    align-items:center;
    justify-content:center;
}
.el-col {
  border-radius: 4px;
}
.m-header {
  height: 64px;
}
#home-card {
    width: 100%;
    overflow: hidden;
    padding: 10px 0px;
    display: flex;
    flex-wrap: wrap;
    #home-item {
      border-style: solid;
      border-width: 1px;
      border-color: #E4E4E4;
      width: calc(34% - 20px);
      padding: 20px 0px 20px 20px;
      margin-right: 10px;
      margin-bottom: 10px;
      display: flex;
      justify-content: center;
      /* align-items: center; */
      background: #fff;
      #home-img {
        display: inline-block;
        width: 160px;
        height: 60px;
        margin: 0;
        padding: 0;
      }
      #home-right {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        margin-left: 10px;
        #home-num {
          font-size: 40px;
          margin: 5px 0;
        }
      }
    }
  }
</style>
UI-Project/src/views/mm/slicecage/slicecage.vue
New file
@@ -0,0 +1,570 @@
<script lang="ts" setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(false)
const dialogFormVisibleb = ref(false)
const currentPage4 = ref(4)
const pageSize4 = ref(100)
// const tableData = [
//   {
//     id: '1',
//     long: '1005',
//     wide: '183.6',
//     thick: '1991',
//     type: '1234567',
//     typea: '1',
//   },
// ]
// const tableDatab = [
//   {
//     idb: '2',
//     longb: '105',
//     wideb: '183',
//     typeb: '123456',
//   }
// ]
const tableDataa = [
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
  {
    ida: '3',
    typea: '1991',
  },
]
const dialogForm = () => {
  ElMessageBox.confirm(
    '确定要急停吗?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '否',
      type: 'warning',
    }
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '急停成功!',
      })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '急停失败',
      })
    })
}
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
  ],
})
</script>
<template>
  <div style="height: 700px;">
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="primary" @click="dialogFormVisible = true">手动进片</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="primary" @click="dialogFormVisiblea = true">订单信息</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="success" @click="dialogFormVisibleb = true">出片队列</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="danger">终止进片</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="danger">终止出片</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="danger"  @click="dialogForm">软急停</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="id" align="center" label="出片玻璃ID" min-width="80" />
          <el-table-column prop="long" align="center" label="笼子" min-width="120" />
          <el-table-column prop="wide" align="center" label="格子" min-width="120" />
          <el-table-column prop="type" align="center" label="订单编号" min-width="120" />
          <el-table-column prop="type" align="center" label="列表编号" min-width="120" />
          <el-table-column prop="type" align="center" label="箱子编号" min-width="120" />
          <el-table-column prop="type" align="center" label="尺寸" min-width="120" />
          <el-table-column prop="type" align="center" label="结束任务" min-width="120" />
        </el-table>
      </div>
    </el-card>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 3px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="idb" align="center" label="进片玻璃ID" min-width="80" />
          <el-table-column prop="longb" align="center" label="笼子" min-width="120" />
          <el-table-column prop="wideb" align="center" label="格子" min-width="120" />
          <el-table-column prop="typeb" align="center" label="订单编号" min-width="120" />
          <el-table-column prop="typeb" align="center" label="列表编号" min-width="120" />
          <el-table-column prop="typeb" align="center" label="箱子编号" min-width="120" />
          <el-table-column prop="typeb" align="center" label="尺寸" min-width="120" />
          <el-table-column prop="typeb" align="center" label="结束任务" min-width="120" />
        </el-table>
      </div>
    </el-card>
    <div style="padding: 10px;display: flex;height:110px;">
                <div v-for="n in 9" :key="n" id="occupy">
                    <el-col style="text-align:left;font-weight: bold;">#1</el-col>
                    <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
                        <span id="biao">使用率</span><span id="zhi">33%</span>
                    </el-col>
                    <hr style="width:80%;margin: 0 auto;" />
                    <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
                        <span id="biao">空间(片数)</span><span id="zhi">555</span>
                    </el-col>
                </div>
    </div>
    <div id="awatch">
  <img src="../../../assets/xmjc.png" alt="" style="width: 70%;height: 100%;margin-left: 160px;">
</div>
  </div>
<el-dialog v-model="dialogFormVisible" top="12vh" width="85%" title="请确认玻璃信息" >
  <div style="margin-left: 50px;margin-bottom: 10px;">
    <div style="display: flex;">
    <p style="margin-top: 4px;">确认状态:</p>
    <el-button style="margin-left: 10px;size: mini;" type="success">允许</el-button>
    <el-button style="margin-left: 10px;size: mini;" type="danger">不允许</el-button>
    <p style="margin-left: 60px;margin-top: 4px;">当前状态:</p>
    <div style="margin-top: 4px; margin-left: 10px;">手动</div>
    <el-button style="margin-left: 10px;size: mini;" type="primary">切换</el-button>
    <el-input  placeholder="请输入玻璃id" style="width: 180px;size: mini;margin-left: 60px;"></el-input>
    <el-button style="margin-left: 10px;size: mini;" type="primary">添加</el-button>
    <p style="margin-left: 60px;margin-top: 4px;">玻璃id:</p>
    <el-input  style="width: 180px;size: mini;margin-left: 30px;"></el-input>
  </div>
    <div style="display: flex;">
      <p style="margin-left: 290px;margin-top: 20px;font-weight: bold;">上片位</p>
      <p style="margin-left: 630px;margin-top: 20px;font-weight: bold;">扫码位</p>
    </div>
    <div style="display: flex;">
    <div style="margin-top: 20px;">
      <p style="margin-top: 10px;margin-left: 100px;margin-bottom: 20px;">当前信息</p>
      <el-form label-position="right" label-width="90px">
      <el-form-item style="width: 20vw" label="玻璃id:">
      <el-input style="width: 180px" size="mini" placeholder="请输入玻璃id"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="订单编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入订单编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="列表编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入列表编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="箱子编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入箱子编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="长:">
      <el-input style="width: 180px" size="mini" placeholder="请输入长"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="宽:">
      <el-input style="width: 180px" size="mini" placeholder="请输入宽"></el-input>
       </el-form-item>
      </el-form>
      </div>
    <div style="margin-top: 20px;">
      <p style="margin-top: 10px;margin-left: 100px;margin-bottom: 20px;">修改信息</p>
      <el-form label-position="right" label-width="90px">
      <el-form-item style="width: 20vw" label="玻璃id:">
      <el-input style="width: 180px" size="mini" placeholder="请输入玻璃id"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="订单编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入订单编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="列表编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入列表编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="箱子编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入箱子编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="长:">
      <el-input style="width: 180px" size="mini" placeholder="请输入长"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="宽:">
      <el-input style="width: 180px" size="mini" placeholder="请输入宽"></el-input>
       </el-form-item>
      </el-form>
      </div>
    <div style="margin-top: 20px;">
      <p style="margin-top: 10px;margin-left: 100px;margin-bottom: 20px;">修改信息</p>
      <el-form label-position="right" label-width="90px">
      <el-form-item style="width: 20vw" label="玻璃id:">
      <el-input style="width: 180px" size="mini" placeholder="请输入玻璃id"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="订单编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入订单编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="列表编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入列表编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="箱子编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入箱子编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="长:">
      <el-input style="width: 180px" size="mini" placeholder="请输入长"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="宽:">
      <el-input style="width: 180px" size="mini" placeholder="请输入宽"></el-input>
       </el-form-item>
      </el-form>
      </div>
    <div style="margin-top: 20px;">
      <p style="margin-top: 10px;margin-left: 100px;margin-bottom: 20px;">当前信息</p>
      <el-form label-position="right" label-width="90px">
      <el-form-item style="width: 20vw" label="玻璃id:">
      <el-input style="width: 180px" size="mini" placeholder="请输入玻璃id"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="订单编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入订单编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="列表编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入列表编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="箱子编号:">
      <el-input style="width: 180px" size="mini" placeholder="请输入箱子编号"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="长:">
      <el-input style="width: 180px" size="mini" placeholder="请输入长"></el-input>
       </el-form-item>
      <el-form-item style="width: 20vw" label="宽:">
      <el-input style="width: 180px" size="mini" placeholder="请输入宽"></el-input>
       </el-form-item>
      </el-form>
      </div>
    </div>
        </div>
  <template #footer>
    <div id="dialog-footer">
      <el-button type="primary" @click="dialogFormVisible = false">
        确认
      </el-button>
      <el-button @click="dialogFormVisible = false">取消</el-button>
    </div>
  </template>
</el-dialog>
<el-dialog v-model="dialogFormVisiblea" top="10vh" width="85%" title="订单信息" >
  <el-input  placeholder="请输入订单id" style="width: 180px;size: mini;"></el-input>
    <el-button style="margin-left: 10px;size: mini;" type="primary">查询</el-button>
    <el-table  ref="table" style="margin-top: 20px;height: 500px;"
        @selection-change="handleSelectionChange"
        :data="tableDataa" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="ida" align="center" label="玻璃id" min-width="80" />
          <el-table-column prop="typea" align="center" label="订单编号" min-width="120" />
          <el-table-column prop="typea" align="center" label="列表编号" min-width="120" />
          <el-table-column prop="typea" align="center" label="箱子编号" min-width="120" />
          <el-table-column prop="ida" align="center" label="铝框id" min-width="120" />
          <el-table-column prop="typea" align="center" label="长" min-width="120" />
          <el-table-column prop="typea" align="center" label="宽" min-width="120" />
        </el-table>
        <div id="demo-pagination-block">
    <el-pagination
    style="margin-left: 850px;"
      v-model:current-page="currentPage4"
      v-model:page-size="pageSize4"
      :page-sizes="[100, 200, 300, 400]"
      :small="small"
      :disabled="disabled"
      :background="background"
      layout="total, sizes, prev, pager, next, jumper"
      :total="400"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</el-dialog>
<el-dialog v-model="dialogFormVisibleb" top="10vh" width="85%" title="订单信息" >
  <div style="display: flex;">
  <p style="margin-top: 4px;">队列状态:</p>
  <p style="margin-top: 4px;">开始</p>
    <el-button style="margin-left: 10px;size: mini;" type="danger">停止</el-button>
    <el-button style="margin-left: 10px;size: mini;" type="primary">添加</el-button>
  </div>
    <el-table  ref="table" style="margin-top: 20px;height: 500px;"
        @selection-change="handleSelectionChange"
        :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="id" align="center" label="铝框id" min-width="80" />
          <el-table-column prop="type" align="center" label="玻璃id" min-width="120" />
          <el-table-column prop="type" align="center" label="订单编号" min-width="120" />
          <el-table-column prop="type" align="center" label="列表编号" min-width="120" />
          <el-table-column prop="type" align="center" label="箱子编号" min-width="120" />
          <el-table-column prop="type" align="center" label="长" min-width="120" />
          <el-table-column prop="type" align="center" label="宽" min-width="120" />
          <el-table-column prop="type" align="center" label="玻璃状态" min-width="120" />
          <el-table-column prop="type" align="center" label="顺序" min-width="120" />
          <el-table-column prop="type" align="center" label="完成" min-width="120" />
          <el-table-column prop="type" align="center" label="操作" min-width="120" />
        </el-table>
</el-dialog>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
#message{
  text-align: center;
  align-items: center;
  color: black;
   width: 200px;
   height: 100px;
   background-color: #337ecc;
   margin-left: 28%;
}
#awatch{
  height: 450px;
}
#occupy {
    height: 100%;
    width: 10%;
    background-color: white;
    margin: 0px 8px 0px 8px;
    border: 1px #EBEEF5 solid;
    text-align: center;
    padding: 5px;
}
#biao {
    font-size: 12px;
}
#zhi {
    font-size: 18px;
    font-weight: bold;
}
#demo-pagination-block + #demo-pagination-block {
  margin-top: 10px;
}
#demo-pagination-block #demonstration {
  margin-bottom: 16px;
}
::-webkit-scrollbar {
     width: 0 !important;
   }
   ::-webkit-scrollbar {
     width: 0 !important;height: 0;
   }
</style>
UI-Project/src/views/mm/stockBasicData/Create.vue
New file
@@ -0,0 +1,724 @@
<template>
  <el-header height="auto">
    <el-descriptions
        class="margin-top"
        title=""
        :column="4"
        :size="'default'"
        border
        :rules="rules"
        :model="ruleForm"
    >
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy" prop="name">
        <template #label>
          <span style="color:red">*</span>
          采购类型
        </template>
<!--        <el-select v-model="form.buyType" class="m-2" placeholder="选择采购类型" clearable>-->
        <el-select v-model="ruleForm.name" class="m-2" placeholder="选择采购类型" clearable>
          <el-option
              v-for="item in CGTypeOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
          />
        </el-select>
      </el-descriptions-item >
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          <span style="color:red">*</span>
          采购组织
        </template>
        <el-input v-model="ruleForm.name" placeholder="采购组织" clearable prop="name"></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          <span style="color:red">*</span>
          供应商
        </template>
        <el-cascader
            placeholder="选择供应商"
            :options="buyerOptions"
            filterable
            clearable
            empty-text="empty-text"
            :v-model="form.supplier"
        >
        </el-cascader>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          <span style="color:red">*</span>
          采购部门
        </template>
        <el-select v-model="cgBuMen" class="m-2" placeholder="选择采购部门" clearable>
          <el-option
              v-for="item in CGBuMenOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
          />
        </el-select>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          <span style="color:red">*</span>
          采购员
        </template>
        <el-select v-model="form.buyer" class="m-2" placeholder="选择采购员" clearable>
          <el-option
              v-for="item in BuyerOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
          />
        </el-select>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy"
      >
        <template #label>
          <span style="color:red">*</span>
          制表日期
        </template>
        <el-date-picker
            v-model="form.date"
            type="date"
            placeholder="选择制表日期"
        />
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy"></el-descriptions-item>
    </el-descriptions>
  </el-header>
  <el-main style="padding-top: 5px;height:100%">
    <!--    <el-button class="mt-4" style="width: 10%" @click="onAddItem"
        >添加
        </el-button>-->
    <vxe-grid
        max-height="500"
        @filter-change="filterChanged"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
        @="gridEvents"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row}">
        <ul class="expand-wrapper">
          <li v-for="(item,key,index) in row">
            <span style="font-weight: bold">{{ key + ':  ' }}</span>
            <span>{{ item }}</span>
          </li>
        </ul>
      </template>
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
        <!--          <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>-->
        <!--          <el-button @click="cellClickEvent" link type="primary" size="small">详情</el-button>-->
      </template>
      <template #num1_filter="{ column, $panel }">
        <div>
          <div v-for="(option, index) in column.filters" :key="index">
            <el-input v-model="option.data" @input="changeFilterEvent($event, option, $panel)" />
          </div>
        </div>
      </template>
    </vxe-grid>
  </el-main>
</template>
<script lang="ts" setup>
import {ref, reactive} from 'vue'
import {useRouter} from "vue-router";
import {ElMessage, ElMessageBox} from "element-plus";
let router = useRouter()
//组件接收参数
const gridOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY: {enabled: true},//开启虚拟滚动
  showOverflow: true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  columns: [
    //{title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
    {type: 'seq', fixed: "left", title: ' ', width: 50},
    {type: 'checkbox', fixed: "left", title: '', width: 50},
    //{type: 'expand', title: '详情', fixed: "left", slots: {content: 'content'}, width: 50},
    {
      field: 'cgdh',
      width: '10%',
      title: '物料编码',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'cgzt',
      width: '10%',
      title: '物料名称',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'gys',
      width: '10%',
      title: '产地',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'w',
      width: '8%',
      title: '宽度', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'g',
      width: '8%',
      title: '高度', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true,
      type: 'number'
    },
    {
      field: 'h',
      width: '8%',
      title: '厚度', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'xh',
      width: '8%',
      title: '型号',/*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'dw',
      width: '8%',
      title: '单位', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '数量', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '操作数量', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}}
    },
    {
      field: 'sl',
      width: '12%',
      title: '箱数',    /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'je',
      width: '8%',
      title: '单片面积', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'je',
      width: '12%',
      title: '单价',   /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: '6',
      width: '8%',
      title: '总数量',   /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '总面积', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'yl',
      width: '10%',
      title: '总金额',/*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    },
    {
      field: 'yl',
      width: '10%',
      title: '备注', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/
      editRender: {name: 'input', attrs: {placeholder: ''}},
      sortable: true
    }
  ],//表头参数
  toolbarConfig: {
    buttons: [
      {type: 'text'},
      {
        'name': '新增',
        'code': 'Add',
      },
      {
        'name': '移除',
        'code': 'Remove'
      },
      {
        'name': '保存订单',
        status: 'primary',
        'code': 'Save'
      }, {
        'name': '入库',
        status: 'primary',
        'code': 'Storage'
      }/*,
      {
        'name': '退货',
        status: 'primary',
        'code': 'Return'
      },
      {
        'name': '返回查询',
        'code':'GoSelect'
      }*/],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    tools: [],
  },//表头按钮
  /*data: [{},{},{},{},{},{}],//table body实际数据*/
  data: [{}, {}, {}],//table body实际数据
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 3}
  ],//合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
//新增
        case 'Add': {
          const record = {
            checked: false
          }
          $grid.insertAt(record, 0).then(({row}) => {
            $grid.setEditRow(row)
          })
          break
        }
//移除
        case 'Remove': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据','warning');
            return
          } else {
            MessageConfirmShow('移除','是否确认移除选中的' + $grid.getCheckboxRecords().length + '条数据!');
          }
          break
        }
//保存
        case 'Save': {
          /*if (form.buyItem === null || form.buyItem === '') {
            MessageShow('采购组织不可为空','warning');
            return;
          }
*/
          //选中数据
          /* const $table = this.$refs.xTable
           const selectRecords = $table.getCheckboxRecords()*/
//+$grid.rows.number
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据','warning');
            return
          } else {
            MessageConfirmShow('保存订单','是否确定保存当前订单信息');
          }
          break
        }
//入库
        case 'Storage': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据','warning');
            return
          } else {
            MessageConfirmShow('入库','您选择了' + $grid.getCheckboxRecords().length + '条数据!,是否确认入库?')
          }
          break
        }
//退库
        case 'Return': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据','warning');
            return
          } else {
          }
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
import type { FormInstance, FormRules } from 'element-plus'
interface RuleForm {
  name: string
  region: string
  count: string
  date1: string
  date2: string
  delivery: boolean
  type: string[]
  resource: string
  desc: string
}
const ruleFormRef = ref<FormInstance>()
const ruleForm = reactive<RuleForm>({
  name: '',
  region: '',
  count: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
})
const rules = reactive<FormRules<RuleForm>>({
  name: [
    { required: true, message: 'Please input Activity name', trigger: 'blur' },
    { min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'blur' },
  ],
  region: [
    {
      required: true,
      message: 'Please select Activity zone',
      trigger: 'change',
    },
  ],
  count: [
    {
      required: true,
      message: 'Please select Activity count',
      trigger: 'change',
    },
  ],
  date1: [
    {
      type: 'date',
      required: true,
      message: 'Please pick a date',
      trigger: 'change',
    },
  ],
  date2: [
    {
      type: 'date',
      required: true,
      message: 'Please pick a time',
      trigger: 'change',
    },
  ],
  type: [
    {
      type: 'array',
      required: true,
      message: 'Please select at least one activity type',
      trigger: 'change',
    },
  ],
  resource: [
    {
      required: true,
      message: 'Please select activity resource',
      trigger: 'change',
    },
  ],
  desc: [
    { required: true, message: 'Please input activity form', trigger: 'blur' },
  ],
})
const form = reactive({
  name: '',
  region: '',
  date: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
  supplier: '',
  buyer: '',
  buyItem: '',
  buyType: ''
})
//供应商
const buyerOptions = [
  {value: '0', label: '供应商1'},
  {value: '1', label: '供应商2'},
  {value: '2', label: '供应商3'},
  {value: '3', label: '供应商4'},
  {value: '4', label: '供应商5'},
  {value: '5', label: '供应商6'},
]
const value = ref('')
const cgBuMen = ref('')
//采购类型
const CGTypeOptions = [
  {
    value: '1',
    label: '标准类型',
  },
  {
    value: '2',
    label: '非标准类型',
  },
  {
    value: '3',
    label: '追加采购',
  },
]
//采购部门
const CGBuMenOptions = [
  {
    value: '0',
    label: '采购华北部',
  },
  {
    value: '1',
    label: '采购东南部',
  },
  {
    value: '2',
    label: '采购西北部',
  },
  {
    value: '3',
    label: '采购中原部',
  },
  {
    value: '4',
    label: '采购外国部',
  },
]
//采购人
const BuyerOptions = [
  {
    value: '0',
    label: '采购员1',
  },
  {
    value: '1',
    label: '采购员2',
  },
  {
    value: '2',
    label: '采购员3',
  },
  {
    value: '3',
    label: '采购员4',
  },
  {
    value: '4',
    label: '采购员5',
  },
]
//页面逻辑代码执行
function logicExecute(type){
  const $grid = xGrid.value
  switch (type) {
    case '入库':
      //入库逻辑代码TODO
      MessageShow('入库成功!', 'success');
      break;
    case '退货':
      //退货逻辑代码TODO
      MessageShow('退货成功!', 'success');
      break;
    case '保存订单':
      //保存订单逻辑代码TODO
      const submitForm = async (formEl: FormInstance | undefined) => {
        if (!formEl) return
        await formEl.validate((valid, fields) => {
          if (valid) {
            console.log('submit!')
          } else {
            console.log('error submit!', fields)
          }
        })
      }
      MessageShow('订单保存成功!', 'success');
      break;
    case '移除':
      $grid.removeCheckboxRow();
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
const MessageShow = (content, type ) => {
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title='操作确认提示', type='warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        return logicExecute(czType);
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
</script>
<style scoped>
:deep(.el-descriptions__table .label-diy) {
  text-align: center;
  width: 100px;
  /*font-size: large;*/
}
</style>
UI-Project/src/views/mm/stockBasicData/Details.vue
New file
@@ -0,0 +1,453 @@
<template>
  <el-header height="auto">
    <el-descriptions
        class="margin-top"
        title=""
        :column="4"
        :size="'default'"
        border
    >
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          操作单号
        </template>
        <el-input v-model="form.buyItem" placeholder="单号" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          采购类型
        </template>
        <el-input v-model="form.buyItem" placeholder="采购类型" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          采购部门
        </template>
        <el-input v-model="form.buyItem" placeholder="采购部门" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          供应商
        </template>
        <el-input v-model="form.buyItem" placeholder="供应商" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          采购员
        </template>
        <el-input v-model="form.buyItem" placeholder="采购员" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          采购组织
        </template>
        <el-input v-model="form.buyItem" placeholder="采购组织" disabled></el-input>
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy">
        <template #label>
          制表日期
        </template>
        <el-date-picker
            v-model="form.date"
            type="date"
            placeholder="选择制表日期"
        />
      </el-descriptions-item>
      <el-descriptions-item label-class-name="label-diy" class-name="content-diy"></el-descriptions-item>
    </el-descriptions>
  </el-header>
  <el-main style="padding-top: 5px;height:100%">
    <vxe-grid
        max-height="500"
        @filter-change="filterChanged"
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row}">
        <ul class="expand-wrapper">
          <li v-for="(item,key,index) in row">
            <span style="font-weight: bold">{{ key + ':  ' }}</span>
            <span>{{ item }}</span>
          </li>
        </ul>
      </template>
    </vxe-grid>
  </el-main>
</template>
<script setup>
import {ref, reactive} from 'vue'
let router = useRouter()
import {useRouter} from "vue-router";
import { ElMessage, ElMessageBox} from "element-plus";
const value = ref('')
//组件接收参数
const gridOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  //开启虚拟滚动
  scrollY: {enabled: true},
  showOverflow: true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  //筛选配置项
  filterConfig: {
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  //表头参数、列名
  columns: [
    {type: 'seq', fixed: "left", title: ' ', width: 50},
    {type: 'checkbox', fixed: "left", title: '', width: 50},
    {
      field: 'cgdh',
      width: '10%',
      title: '物料编码',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'cgzt',
      width: '10%',
      title: '物料名称',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'gys',
      width: '10%',
      title: '产地',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'w',
      width: '8%',
      title: '宽度',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'g',
      width: '8%',
      title: '高度',
      filters: [{data: ''}],
      sortable: true,
    },
    {
      field: 'h',
      width: '8%',
      title: '厚度',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'xh',
      width: '8%',
      title: '型号',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'dw',
      width: '8%',
      title: '单位',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '数量',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'czsl',
      width: '8%',
      title: '操作数量',
      type: 'number',
      editRender: {name: 'input', type: 'number', attrs: {placeholder: ''}}
    },
    {
      field: 'sl',
      width: '12%',
      title: '箱数',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'je',
      width: '8%',
      title: '单片面积',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'je',
      width: '12%',
      title: '单价',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'sl',
      width: '8%',
      title: '总面积',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'yl',
      width: '10%',
      title: '总金额',
      filters: [{data: ''}],
      sortable: true
    },
    {
      field: 'yl',
      width: '10%',
      title: '备注',
      filters: [{data: ''}],
      sortable: true
    }
  ],
  //表头按钮
  toolbarConfig: {
    buttons: [
      {type: 'text'},
      {
        'name': '保存订单',
        status: 'primary',
        'code': 'Save'
      }, {
        'name': '入库',
        status: 'primary',
        'code': 'Storage'
      },
      {
        'name': '退货',
        status: 'primary',
        'code': 'Return'
      },
      {
        'name': '取消',
        status: '',
        'code': 'Cancel'
      }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    tools: [],
  },
  //table body实际数据
  data: [{}, {}, {}],
  //脚合并
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 3}
  ],
  //合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
//保存
        case 'Save': {
          MessageAlertShow('点击了保存订单','操作提示');
          //MessageShow('点击了保存订单!', 'error');
          break;
        }
//取消,返回查询页面
        case 'Cancel': {
          // router.push({path: '/main/purchaseOrder/StoragePurchaseOrder'})
          break
        }
//入库
        case 'Storage': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据!', 'warning');
            return
          } else {
            MessageConfirmShow('入库', '是否确认对选中的' + $grid.getCheckboxRecords().length + '物料进行入库操作!');
          }
          break
        }
//退货
        case 'Return': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据!', 'warning');
            return
          } else {
            MessageConfirmShow('退货', '是否确认对选中的' + $grid.getCheckboxRecords().length + '物料进行退货操作!');
          }
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
//表单数据
const form = reactive({
  name: '',
  region: '',
  date: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
  supplier: '',
  buyer: '',
  buyItem: '',
  buyType: ''
})
//页面逻辑代码执行
function logicExecute(type){
  const $grid = xGrid.value
  switch (type) {
    case '入库':
      //入库逻辑代码TODO
      MessageShow('入库成功!', 'success');
      break;
    case '退货':
      //退货逻辑代码TODO
      MessageShow('退货成功!', 'success');
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
//信息内容,显示方式,显示标题,类型
const MessageShow = (content,type='success') => {
    ElMessage({
      message: content,
      type: type,
      showClose: true,
    })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title='操作确认提示', type='warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        return logicExecute(czType);
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
//弹窗信息
const MessageAlertShow=(content,title,type='info')=>{
  ElMessageBox.alert(content, title, {
    // 禁止自动对焦
    //autofocus: false,
    confirmButtonText: 'OK',
    /*callback: (action: Action) => {
      MessageShow(`action: ${action}`,type)
    },*/
  })
}
</script>
<style scoped>
:deep(.el-descriptions__table .label-diy) {
  text-align: center;
  width: 100px;
  /*  font-size: large;*/
}
</style>
UI-Project/src/views/mm/stockBasicData/Payment.vue
New file
@@ -0,0 +1,354 @@
<template>
  <el-container>
    <el-header class="m-header" style="height: auto">
      <el-row :gutter="10" style="margin-bottom: 5px">
        <el-col :span="7">
          <el-date-picker
              v-model="datevalue"
              type="daterange"
              unlink-panels
              range-separator="到"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :shortcuts="shortcuts"
              :size="size"
              format="YYYY/MM/DD"
              value-format="YYYY-MM-DD"
          />
        </el-col>
        <el-col :span="2">
          <el-button
              id="select"
              type="primary"
              :icon="Search"
              @click="autoAddRow">查询
          </el-button>
        </el-col>
      </el-row>
    </el-header>
    <el-main style="padding-top: 5px">
      <vxe-grid
          max-height="600"
          @filter-change="filterChanged"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="PayOptions"
          @="gridEvents"
      >
        <!--      下拉显示所有信息插槽-->
        <template #content="{ row }">
          <ul class="expand-wrapper">
            <li  v-for="(item,index) in gridOptions.columns" v-show="item.field!==undefined ">
              <span style="font-weight: bold">{{item.title+':  '}}</span>
              <span>{{ row[item.field] }}</span>
            </li>
          </ul>
        </template>
        <!--左边固定显示的插槽-->
        <template #button_slot="{ row }">
          <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
          <!--          <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>-->
          <!--          <el-button @click="cellClickEvent" link type="primary" size="small">详情</el-button>-->
        </template>
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
      </vxe-grid>
    </el-main>
  </el-container>
</template>
<script setup>
import {ref} from 'vue'
import {Search} from "@element-plus/icons-vue";
import 'dayjs/locale/zh-cn'
import {VXETable} from "vxe-table";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
import {ElMessage, ElMessageBox} from "element-plus";
const datevalue = ref('')//时间
//组件接收参数
const PayOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY: {enabled: true},//开启虚拟滚动
  showOverflow: true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  columns: [
    /* {title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},*/
    {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: '5%'},//详情
    {type: 'checkbox', fixed: "left", title: '', width: '5%'},
    {type: 'seq', fixed: "left", title: ' ', width: '5%'},
    {
      field: 'cgdh',
      width: '10%',
      title: '采购单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'cgzt', width: '10%', title: '月份', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'gys',
      width: '10%',
      title: '供应商',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlbh',
      width: '10%',
      title: '期初金额',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlmc',
      width: '10%',
      title: '本期应付',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'w',
      width: '10%',
      title: '本期已付',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'g',
      width: '10%',
      title: '期末余额',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'h', width: '9%', title: '税率', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: '6', width: '10%', title: '备注', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
  ],//表头参数
  toolbarConfig: {
    buttons: [{type: 'text'}, {
      'name': '应付确认',
      status: 'primary',
      'code': 'Sure',
    }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    style: 'paddling-left:10px'
  },//表头按钮
  data: [{}, {}, {}, {}],//table body实际数据
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 3}
  ],//合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
          //应付确认
        case 'Sure': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow("请选择至少一条数据!", 'warning');
            return
          } else {
            MessageConfirmShow("确认应付", '您选择了' + $grid.getCheckboxRecords().length + '条数据!,是否确认应付?')
          }
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
const shortcuts = [
  {
    text: '近一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
  },
  {
    text: '近一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  },
  {
    text: '近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  },
]
//页面逻辑代码执行
function logicExecute(type){
  const $grid = xGrid.value
  switch (type) {
    case '确认应付':
      //入库逻辑代码TODO
      MessageShow('操作成功!', 'success');
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
//信息内容,显示方式,显示标题,类型
const MessageShow = (content, type = 'success') => {
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title = '操作确认提示', type = 'warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        return  logicExecute(czType);
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
//弹窗信息
const MessageAlertShow = (content, title, type = 'info') => {
  ElMessageBox.alert(content, title, {
    // 禁止自动对焦
    //autofocus: false,
    confirmButtonText: 'OK',
    /*callback: (action: Action) => {
      MessageShow(`action: ${action}`,type)
    },*/
  })
}
</script>
<style scoped>
.el-row {
  margin-bottom: 20px;
}
.el-row:last-child {
  margin-bottom: 0;
}
.el-col {
  border-radius: 4px;
}
.m-header {
  height: 32px;
}
</style>
UI-Project/src/views/mm/stockBasicData/Return.vue
New file
@@ -0,0 +1,593 @@
<template>
  <el-container>
    <el-header class="m-header" style="height: auto">
      <el-row :gutter="10" style="margin-bottom: 5px">
        <el-col :span="7">
          <el-date-picker
              v-model="datevalue"
              type="daterange"
              unlink-panels
              range-separator="到"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :shortcuts="shortcuts"
              :size="size"
              format="YYYY/MM/DD"
              value-format="YYYY-MM-DD"
          />
        </el-col>
        <el-col :span="2">
          <el-button
              id="select"
              type="primary"
              :icon="Search"
              @click="BtnSearchPurchaseOrder">查询
          </el-button>
        </el-col>
      </el-row>
    </el-header>
    <el-main style="padding-top: 5px;height:100%">
      <vxe-grid
          max-height="600"
          @filter-change="filterChanged"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          @cell-dblclick="cellClickEvent"
      >
        <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
        <!--      下拉显示所有信息插槽-->
        <template #content="{ row }">
          <ul class="expand-wrapper">
            <li v-for="(item,index) in gridOptions.columns" v-show="item.field!==undefined ">
              <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
              <span>{{ row[item.field] }}</span>
            </li>
          </ul>
        </template>
        <!--左边固定显示的插槽-->
        <template #button_slot="{ row }">
          <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
          <!--          <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>-->
          <!--          <el-button @click="cellClickEvent" link type="primary" size="small">详情</el-button>-->
        </template>
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
      </vxe-grid>
      <!--      详情框 部分1-->
      <vxe-modal v-model="showDetails" title="查看详情" width="600" height="80%" :mask="false" :lock-view="false"
                 resize>
        <el-container>
          <el-header height="35px"
                     style="margin: 0;padding: 0">
            <el-input v-model="showCGDH" placeholder="采购单号" disabled>
              <template #prepend>采购单号:</template>
            </el-input>
          </el-header>
          <el-main>
            <template #default>
              <vxe-table
                  border="default"
                  auto-resize
                  show-overflow
                  max-height="400"
                  :row-config="{isHover: true}"
                  :show-header="false"
                  :sync-resize="showDetails"
                  :data="detailData"
              >
                <vxe-column field="label" width="30%" class-name="v-column-label"></vxe-column>
                <vxe-column field="value"></vxe-column>
              </vxe-table>
            </template>
          </el-main>
          <el-footer height="40px">
            <el-row>
              <el-col :offset="20" :span="4">
                <el-button
                    id="Sure"
                    type="primary"
                    @click="SureReturn"
                >确认退货
                </el-button>
              </el-col>
            </el-row>
          </el-footer>
        </el-container>
      </vxe-modal>
      <!--      详情框 部分1 结束-->
    </el-main>
  </el-container>
</template>
<script setup>
import {ref} from "vue";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
import {Search} from "@element-plus/icons-vue";
import dayjs from "dayjs";
import {ElMessage, ElMessageBox} from "element-plus";
let router = useRouter()
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
      //alert('我接收到子组件传送的编辑信息')
      // router.push({path: '/main/purchaseOrder/DetailsPurchaseOrder', query: {id: row.id}})
      break
    }
    case 'delete': {
      alert('我接收到子组件传送的删除信息' + row.id)
      break
    }
  }
}
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'Sure': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据!', 'warning');
            return
          } else {
            MessageConfirmShow('确定', '您选择了' + $grid.getCheckboxRecords().length + '条数据!,是否确认退货?')
          }
          break
        }
        case 'Log': {
          MessageAlertShow('点击了退货记录!', '操作提示');
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
//查询按钮方法
const BtnSearchPurchaseOrder = () => {
  //开始时间,结束时间获取
  //MessageShow("开始时间"+datevalue._rawValue[0]+"\r\n结束时间\r\n"+datevalue._rawValue[1]);
  for (let i = 1; i < 6; i++) {
    const randomInt = Math.floor(Math.random() * 999) + 1000;//4位数随机数
    const randomSumInt = Math.floor(Math.random() * 99) + 10;//2位数随机数
    const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3位数随机数
    const t = i % 2 === 0 ? 5 : 6;
    const s = i % 2 === 0 ? '入库' : i % 3 === 0 ? '退货' : '部分入库';
    const thdh = i % 2 === 0 ? '' : i % 3 === 0 ? 'THID' + randomOrderInt : '';
    const CGNo = 'NGCG231200' + randomOrderInt;//采购编号
    const wlNo = 'NGWL1000' + randomInt;
    const xh = 'NGXH' + randomSumInt;
    const wlmc = 'WLMC' + randomInt;
    const gys = '供应商' + randomSumInt;
    const xhdh = 'NG231200' + randomOrderInt;
    const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
    const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
    const dw = i % 2 === 0 ? '片' : i % 3 === 0 ? '平米' : i % 4 === 0 ? '包' : '吨';
    now.setDate(now.getDate() + 1);
    gridOptions.data.push({
      cgdh: CGNo,
      thdh: thdh,
      h: t,
      xh: xh,
      wlbh: wlNo,
      wlmc: wlmc,
      gys: gys,
      w: w,
      g: h,
      dw: dw,
      cgzt: s,
      rq: dayjs(now).format('YYYY-MM-DD'),
      yl: randomSumInt,
      sl: randomOrderInt,
      xsdh: xhdh,
      je: randomInt,
      6: '139xxxxxxxx',
    })
  }
}
//组件接收参数
const gridOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY: {enabled: true},//开启虚拟滚动
  showOverflow: true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  columns: [
    {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: 50},//详情
    {title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
    {type: 'checkbox', fixed: "left", title: '', width: 50},
    {type: 'seq', fixed: "left", title: ' ', width: 50},
    {
      field: 'thdh',
      width: '10%',
      title: '退货单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'cgdh',
      width: '10%',
      title: '采购单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'cgzt', width: '10%', title: '状态', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'gys',
      width: '10%',
      title: '供应商',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlbh',
      width: '10%',
      title: '物料编号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlmc',
      width: '10%',
      title: '物料名称',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'w', width: '8%', title: '宽度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'g', width: '8%', title: '高度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'h', width: '8%', title: '厚度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'xh', width: '8%', title: '型号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'dw', width: '8%', title: '单位', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '12%',
      title: '不含税单价',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'sl', width: '8%', title: '数量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'sl',
      width: '12%',
      title: '已采购数量',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'je', width: '8%', title: '金额', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'je',
      width: '12%',
      title: '不含税金额',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '8%', title: '税率', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'sl', width: '8%', title: '库存', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '周用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '月用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'cgzt',
      width: '10%',
      title: '单据状态',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'xsdh',
      width: '10%',
      title: '销售单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'rq',
      width: '10%',
      title: '制单日期',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '10%', title: '制单人', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '10%',
      title: '采购部门',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: '6',
      width: '10%',
      title: '采购组织',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '10%', title: '备注', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
  ],//表头参数
  toolbarConfig: {
    buttons: [{type: 'text'}, {
      'name': '退货记录',
      'code': 'Log'
    },
      {
        'name': '确认退货',
        status: 'primary',
        'code': 'Sure'
      }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    style: 'paddling-left:10px'
  },//表头按钮
  data: [],//table body实际数据
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 4}
  ],//合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
//详情框 部分2
const showCGDH = ref();
const showDetails = ref(false);
let detailData = [];
const cellClickEvent = ({row}) => {
  if (isQueryColumnId === false) {
    queryColumnId();
  }
  detailData = list.map(field => {
    return {label: queryColumnsTitle(field), value: row[field]}
  })
  showDetails.value = true;
  showCGDH.value = row['cgdh'];
}
//获取表列
let list = [];
let columnIndex = 4;//列标头从第几列开始的
let isQueryColumnId = false;
const queryColumnId = () => {
  while (columnIndex < gridOptions.columns.length) {
    list.push(gridOptions.columns[columnIndex].field);
    columnIndex++;
  }
  isQueryColumnId = true;
  return list;
}
//获取表列名
function queryColumnsTitle(cn) {
  let i = 0;
  while (i < gridOptions.columns.length + 1) {
    if (gridOptions.columns[i].field === cn) {
      return gridOptions.columns[i].title;
    }
    i++;
  }
}
// 详情框部分2 结束
const SureReturn = () => {
  MessageConfirmShow('退货', '是否确认退货?')
}
//详情框 部分2 结束
const now = new Date()
//时间快捷选择
const datevalue = ref('')
const shortcuts = [
  {
    text: '近一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
  },
  {
    text: '近一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  },
  {
    text: '近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  },
]
//页面逻辑代码执行
function logicExecute(type) {
  const $grid = xGrid.value
  switch (type) {
    case '确定':
      //多选退货逻辑代码TODO
      MessageShow('操作成功!', 'success');
      break;
    case '退货':
      //单退货逻辑代码TODO
      MessageShow('操作成功!', 'success');
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
//信息内容,显示方式,显示标题,类型
const MessageShow = (content, type = 'success') => {
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title = '操作确认提示', type = 'warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        logicExecute(czType);
        return true;
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
//弹窗信息
const MessageAlertShow = (content, title, type = 'info') => {
  ElMessageBox.alert(content, title, {
    // 禁止自动对焦
    //autofocus: false,
    confirmButtonText: 'OK',
    /*callback: (action: Action) => {
      MessageShow(`action: ${action}`,type)
    },*/
  })
}
</script>
<style scoped>
:deep(.v-column-label div span) {
  font-weight: bold;
}
</style>
UI-Project/src/views/mm/stockBasicData/Select.vue
New file
@@ -0,0 +1,275 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(false)
const tableData = [
  {
    id: '1',
    long: '1005',
    wide: '183.6',
    thick: '1991'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191'
  }
]
const tableDataa = [
  {
    long: '1005',
    wide: '183.6',
    thick: '1991',
    station: '1'
  },
  {
    long: '105',
    wide: '183',
    thick: '191',
    station: '2'
  }
]
const open = () => {
  ElMessageBox.confirm(
    '是否删除该条信息?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '删除成功!',
      })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '删除失败',
      })
    })
}
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },//表头参数
  // columns:[
  //   {type:'expand',slots: { content:'content' },width: 50},
  //   // {title: '操作', width: 110, slots: { default: 'button_slot' }},
  //   {type: 'seq', title: '自序', width: 80 },
  //   // {title: '审核', width: 40, slots: { default: 'state' }},
  //   {title: 'id', width: 140, slots: { default: 'state' }},
  //   {title: '长', width: 160, slots: { default: 'state' }},
  //   {title: '宽', width: 160, slots: { default: 'state' }},
  //   {title: '厚', width: 160, slots: { default: 'state' }},
  //   // {field: '3',width:120,  title: '退货单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
  // ],
  //表头按钮
  // toolbarConfig: {
  //   buttons: [],
  //   import: false,
  //   export: true,
  //   print: true,
  //   zoom: true,
  //   custom: true
  // },
  data:  [
    {
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
  ],
  //table body实际数据
  // footerMethod ({ columns, data }) {//页脚函数
  //   return[
  //     columns.map((column, columnIndex) => {
  //       if (columnIndex === 0) {
  //         return '合计:'
  //       }
  //       // if (props.tableProp.footList.includes(column.field)) {
  //       //   return sumNum(data, column.field)
  //       // }
  //       return ''
  //     })
  //   ]
  // }
})
</script>
<template>
  <div>
    <!-- <el-date-picker
        v-model="value1"
        type="daterange"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
    /> -->
    <!-- <el-button style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button> -->
    <el-button style="margin-left: 5px;"   id="searchButton" type="primary" @click="dialogFormVisible = true">重新识别</el-button>
    <el-button id="searchButton" type="primary" @click="dialogFormVisiblea = true">人工匹配</el-button>
    <el-button id="searchButton" type="primary" @click="dialogFormVisiblea = true">人工拿走</el-button>
    <el-button id="searchButton" type="primary" @click="dialogFormVisiblea = true">破损</el-button>
    <el-button id="searchButton" type="primary" @click="dialogFormVisiblea = true">合并/单片</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto">
        <el-table height="100%" ref="table" :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="id" align="center" label="id" min-width="80" />
          <el-table-column prop="long" align="center" label="长" min-width="120" />
          <el-table-column prop="wide" align="center" label="宽" min-width="120" />
          <el-table-column prop="thick" align="center" label="其他" min-width="120" />
          <!-- <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default>
              <el-button size="mini" type="text" plain @click="open">人工拿走</el-button>
            </template>
        </el-table-column> -->
        </el-table>
      </div>
    </el-card>
  </div>
  <el-dialog v-model="dialogFormVisible" top="21vh" width="40%" title="上片输入" >
    <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
            <el-form  size="mini" label-width="150px">
      <el-form >
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="工位:" :required="true" style="width: 14vw">
                <el-input  autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="长:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div>
              </div>
          </el-col>
        </el-row>
        <el-row style="margin-top: 10px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="宽:" :required="true" style="width: 13.2vw;margin-left: 14px;">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="厚:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
        </el-row>
        </el-form>
            </el-form>
          </div>
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="dialogFormVisible = false">
          确认
        </el-button>
        <el-button @click="dialogFormVisible = false">取消</el-button>
      </div>
    </template>
  </el-dialog>
  <el-dialog v-model="dialogFormVisiblea" top="21vh" width="40%" title="原片信息">
    <el-table height="100%" ref="table" :data="tableDataa" @row-click="handle">
      <el-table-column
        prop="long"
        align="center"
        label="长"
        min-width="120"
      />
      <el-table-column
        prop="wide"
        align="center"
        label="宽"
        min-width="120"
      />
      <el-table-column
        prop="thick"
        align="center"
        label="厚"
        min-width="120"
      />
      <el-table-column
        prop="station"
        align="center"
        label="工位"
        min-width="120"
      />
    </el-table>
    <div style="text-align: center; height: 22px; margin-top: 30px;">
        <el-button @click="dialogFormVisiblea = false">关闭</el-button>
      </div>
  </el-dialog>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
</style>
UI-Project/src/views/mm/stockBasicData/StockBasicData.vue
New file
@@ -0,0 +1,486 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(false)
const box = ref(true)
const boxa = ref(false)
const boxb = ref(false)
// const tableData = [
//   {
//     id: '1',
//     long: '1005',
//     wide: '183.6',
//     thick: '1991',
//     type: '5',
//     typea: '1',
//   },
//   {
//     id: '2',
//     long: '105',
//     wide: '183',
//     thick: '191',
//     typea: '1',
//     type: '5'
//   },
//   {
//     id: '2',
//     long: '105',
//     wide: '183',
//     thick: '191',
//     typea: '1',
//     type: '5'
//   },
// ]
const tableData = ref([
{
    id: '2',
    ida: '2',
    long: '105',
    wide: '183',
    thick: '191',
    typea: '1',
    typeb: '1',
    typec: '1',
    type: '5'
  },
  {
    id: '12',
    ida: '12',
    long: '1105',
    wide: '1183',
    thick: '1911',
    typea: '11',
    typeb: '11',
    typec: '11',
    type: '15'
  },
])
// 新增一行
const addTableData = ()=>{
  const newRow = {
    id: null,
    id: null,
    long: null,
    wide: null,
    thick: null,
    typea: null,
    type: null,
    typeb: null,
    typec: null,
  }
  tableData.value.push(newRow)
}
// 删除
const deleteTableData = (row) =>{
  const index = tableData.value.indexOf(row);
  if (index !== -1) {
    tableData.value.splice(index, 1);
  }
}
const tableDataa = [
  {
    ida: '3',
    longa: '1005',
    widea: '183.6',
    thicka: '1991',
  },
  {
    ida: '4',
    longa: '105',
    widea: '183',
    thicka: '191',
  }
]
const open = () => {
  ElMessageBox.confirm(
    '是否删除该条信息?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '删除成功!',
      })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '删除失败',
      })
    })
}
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const selectedRows = ref([]);
const handleSelectionChange = (selection) => {
  selectedRows.value = selection;
};
const showMessage = () => {
  if (selectedRows.value.length === 0) {
    ElMessage('请至少选择一个选项')
  } else{
    ElMessage({
    message: '出片成功!',
    type: 'success',
  })
  }
};
const pick = () => {
  if (selectedRows.value.length === 0) {
    ElMessage('请至少选择一个选项')
  } else{
    ElMessage({
    message: '破损成功!',
    type: 'success',
  })
  }
};
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
  ],
})
</script>
<template>
  <div>
     <el-button style="margin-top: 5px;margin-left: 5px;"   id="searchButton" type="primary" @click="showMessage">出片</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" type="primary" @click="pick">破损</el-button>
    <!-- <el-button style="margin-top: 5px"  id="searchButton" type="primary" @click="dialogFormVisible = true">添加</el-button> -->
    <el-button style="margin-top: 5px"  id="searchButton" type="primary"  @click="addTableData" >添加</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" @click="boxb = true;box = false" >合并</el-button>
    <el-button style="margin-top: 5px"  id="searchButton" @click="box = true;boxb = false" >单片</el-button>
    <div v-if="box">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 450px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
    <el-table-column type="selection" width="55"  />
    <el-table-column prop="id" align="center" label="栅格号" min-width="80" >
      <template #default="scope">
        <el-input v-model="scope.row.id" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="ida" align="center" label="id" min-width="80">
            <template #default="scope">
        <el-input v-model="scope.row.ida" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="long" align="center" label="长" min-width="100" >
            <template #default="scope">
        <el-input v-model="scope.row.long" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="wide" align="center" label="宽" min-width="100">
            <template #default="scope">
        <el-input v-model="scope.row.wide" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="type" align="center" label="厚度" min-width="100">
            <template #default="scope">
        <el-input v-model="scope.row.type" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="typea" align="center" label="膜系" min-width="100" >
            <template #default="scope">
        <el-input v-model="scope.row.typea" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="typeb" align="center" label="出片顺序" min-width="120" >
            <template #default="scope">
        <el-input v-model="scope.row.typeb" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="typec" align="center" label="流程卡号" min-width="150">
            <template #default="scope">
        <el-input v-model="scope.row.typec" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="thick" align="center" label="其他" min-width="120" >
            <template #default="scope">
        <el-input v-model="scope.row.thick" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default="scope">
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">详情</el-button>
        <el-button @click="deleteTableData(scope.row)" link icon="Delete" type="primary">删除</el-button>
            </template>
        </el-table-column>
  </el-table>
</div>
    </el-card>
  </div>
  <div v-if="boxb">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 450px;">
        <el-table height="100%" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
    <el-table-column type="selection" width="55"  />
    <el-table-column prop="id" align="center" label="栅格" min-width="80">
      <template #default="scope">
        <el-input v-model="scope.row.id" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="ida" align="center" label="id" min-width="80">
            <template #default="scope">
        <el-input v-model="scope.row.ida" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="long" align="center" label="长" min-width="120" >
            <template #default="scope">
        <el-input v-model="scope.row.long" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="wide" align="center" label="宽" min-width="120">
            <template #default="scope">
        <el-input v-model="scope.row.wide" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="type" align="center" label="厚度" min-width="120">
            <template #default="scope">
        <el-input v-model="scope.row.type" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="typea" align="center" label="膜系" min-width="120" >
            <template #default="scope">
        <el-input v-model="scope.row.typea" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="typeb" align="center" label="出片顺序" min-width="120" >
            <template #default="scope">
        <el-input v-model="scope.row.typeb" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="typec" align="center" label="流程卡号" min-width="120">
            <template #default="scope">
        <el-input v-model="scope.row.typec" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column prop="thick" align="center" label="其他" min-width="120" >
            <template #default="scope">
        <el-input v-model="scope.row.thick" size="small"></el-input>
      </template>
      </el-table-column>
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default="scope">
              <el-button size="mini" type="text" plain  @click="dialogFormVisiblea = true">详情</el-button>
        <el-button @click="deleteTableData(scope.row)" link icon="Delete" type="primary">删除</el-button>
            </template>
        </el-table-column>
  </el-table>
      </div>
    </el-card>
  </div>
  </div>
  <el-dialog v-model="dialogFormVisible" top="21vh" width="40%" title="添加" >
    <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
            <el-form  size="mini" label-width="150px">
      <el-form >
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="栅格号:" :required="true" style="width: 14vw">
                <el-input  autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="id:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div>
              </div>
          </el-col>
        </el-row>
        <el-row style="margin-top: 10px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="长:" :required="true" style="width: 13.2vw;margin-left: 14px;">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="宽:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
        </el-row>
        <el-row style="margin-top: 10px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="厚度:" :required="true" style="width: 13.2vw;margin-left: 14px;">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="膜系:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
        </el-row>
        <el-row style="margin-top: 10px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="出片顺序:" :required="true" style="width: 13.2vw;margin-left: 14px;">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="流程卡号" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
        </el-row>
        <el-row style="margin-top: 10px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="其他:" :required="true" style="width: 13.2vw;margin-left: 14px;">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
        </el-row>
        </el-form>
            </el-form>
          </div>
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="dialogFormVisible = false">
          确认
        </el-button>
        <el-button @click="dialogFormVisible = false">取消</el-button>
      </div>
    </template>
  </el-dialog>
    <el-dialog v-model="dialogFormVisiblea" top="21vh" width="40%" title="原片信息">
    <el-table height="100%" ref="table" :data="tableDataa" @row-click="handle">
      <el-table-column
        prop="long"
        align="center"
        label="长"
        min-width="120"
      />
      <el-table-column
        prop="wide"
        align="center"
        label="宽"
        min-width="120"
      />
      <el-table-column
        prop="thick"
        align="center"
        label="厚"
        min-width="120"
      />
      <el-table-column
        prop="station"
        align="center"
        label="工位"
        min-width="120"
      />
    </el-table>
    <div style="text-align: center; height: 22px; margin-top: 30px;">
        <el-button @click="dialogFormVisiblea = false">关闭</el-button>
      </div>
  </el-dialog>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
#message{
  text-align: center;
  align-items: center;
  color: black;
   width: 200px;
   height: 100px;
   background-color: #337ecc;
   margin-left: 28%;
}
#box{
  position: relative;
  #icon{
    position: absolute;
    bottom:10px;
    right: 19px;
  }
}
</style>
UI-Project/src/views/mm/stockBasicData/Storage.vue
New file
@@ -0,0 +1,603 @@
<template>
  <el-container>
    <el-header class="m-header" style="height: auto">
      <el-row :gutter="10" style="margin-bottom: 5px">
        <el-col :span="7">
          <el-date-picker
              v-model="datevalue"
              type="daterange"
              unlink-panels
              range-separator="到"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :shortcuts="shortcuts"
              format="YYYY/MM/DD"
              value-format="YYYY-MM-DD"
          />
        </el-col>
        <el-col :span="2">
          <el-button
              id="select"
              type="primary"
              :icon="Search"
              @click="BtnSearchPurchaseOrder">查询
          </el-button>
        </el-col>
      </el-row>
    </el-header>
    <el-main style="padding-top: 5px;height:100%">
      <vxe-grid
          max-height="600"
          @filter-change="filterChanged"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          @cell-dblclick="cellClickEvent"
      >
        <!--      下拉显示所有信息插槽-->
        <template #content="{ row }">
          <ul class="expand-wrapper">
            <li v-for="(item,index) in gridOptions.columns" v-show="item.field!==undefined ">
              <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
              <span>{{ row[item.field] }}</span>
            </li>
          </ul>
        </template>
        <!--左边固定显示的插槽-->
        <template #button_slot="{ row }">
          <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
          <el-button @click="getTableRow(row,'look')" link type="primary" size="small">查看</el-button>
          <!--          <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>-->
          <!--          <el-button @click="cellClickEvent" link type="primary" size="small">详情</el-button>-->
        </template>
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
      </vxe-grid>
      <!--      详情框 部分1-->
      <vxe-modal v-model="showDetails" title="查看详情" width="600" height="80%" :mask="false" :lock-view="false"
                 resize>
        <el-container>
          <el-header height="35px"
                     style="margin: 0;padding: 0">
            <el-input v-model="showCGDH" placeholder="采购单号" disabled>
              <template #prepend>采购单号:</template>
            </el-input>
          </el-header>
          <el-main>
            <template #default>
              <vxe-table
                  border="inner"
                  auto-resize
                  show-overflow
                  max-height="400"
                  :row-config="{isHover: true}"
                  :show-header="false"
                  :sync-resize="showDetails"
                  :data="detailData">
                <vxe-column field="label" width="30%" class-name="v-column-label"></vxe-column>
                <vxe-column field="value"></vxe-column>
              </vxe-table>
            </template>
          </el-main>
          <el-footer height="40px">
            <el-row>
              <el-col :offset="20" :span="4">
                <el-button
                    id="Sure"
                    type="primary"
                    @click="SureStorage"
                >确认入库
                </el-button>
              </el-col>
            </el-row>
          </el-footer>
        </el-container>
      </vxe-modal>
      <!--      详情框 部分1 结束-->
    </el-main>
  </el-container>
</template>
<script setup>
import {ref} from "vue";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
import {Search} from "@element-plus/icons-vue";
import dayjs from "dayjs";
import {VXETable} from "vxe-table";
import {ElMessage, ElMessageBox} from "element-plus";
let router = useRouter()
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/purchaseOrder/DetailsPurchaseOrder', query: {id: row.id}});
      break
    }
    case 'look': {
      /*this.detailData = ['name', 'nickname', 'role', 'sex', 'age', 'amount', 'address'].map(field => {
        return { label: field, value: row[field] }
      })*/
      //this.showDetails = true
      break
    }
    case 'delete': {
      alert('我接收到子组件传送的删除信息' + row.id)
      break
    }
  }
}
const xGrid = ref()
const gridEvents = {
  toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'Sure': {
          if ($grid.getCheckboxRecords().length === 0) {
            MessageShow('请选择至少一条数据', 'warning');
            //openAlert({type: 'message', content: '请选择至少一条数据', status: 'warning'})
            //VXETable.modal.message( '请选择一条数据!')
            return
          } else {
            const type = VXETable.modal.confirm('您选择了' + $grid.getCheckboxRecords().length + '条数据!,是否确认入库?');
            //openAlert({type:'alert', content: '成功入库'+$grid.getCheckboxRecords().length+'条数据!', status: 'success' })
            //VXETable.modal.message( '请选择一条数据!')
            return
          }
          break
        }
        case 'Log': {
          //openAlert({type: 'alert', content: '点击了退货记录', status: 'success'})
          MessageConfirmShow("退货记录", "点击了退货记录", "", 'success')
          break
        }
      }
    }
  },
  toolbarToolClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'myPrint': {
          $grid.print()
          break
        }
      }
    }
  },
}
const openAlert = (options) => {
  if (options.type === 'message') {
    VXETable.modal.message(options)
  } else {
    VXETable.modal.alert(options)
  }
}
const closeAlert = (id) => {
  VXETable.modal.close(id)
}
//查询调用事件
const BtnSearchPurchaseOrder = () => {
  //开始时间,结束时间获取
  //MessageShow(datevalue._rawValue[0]+"\r\n时间2\r\n"+datevalue._rawValue[1]);
  for (let i = 1; i < 6; i++) {
    const randomInt = Math.floor(Math.random() * 999) + 1000;//4位数随机数
    const randomSumInt = Math.floor(Math.random() * 99) + 10;//2位数随机数
    const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3位数随机数
    const t = i % 2 === 0 ? 5 : 6;
    const s = i % 2 === 0 ? '入库' : i % 3 === 0 ? '待审核' : '已采购';
    const rkdh = i % 2 === 0 ? 'RKID' + randomOrderInt : i % 3 === 0 ? '' : '';
    const CGNo = 'NGCG231200' + randomOrderInt;//采购编号
    const wlNo = 'NGWL1000' + randomInt;
    const xh = 'NGXH' + randomSumInt;
    const wlmc = 'WLMC' + randomInt;
    const gys = '供应商' + randomSumInt;
    const xhdh = 'NG231200' + randomOrderInt;
    const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
    const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
    const dw = i % 2 === 0 ? '片' : i % 3 === 0 ? '平米' : i % 4 === 0 ? '包' : '吨';
    now.setDate(now.getDate() + 1);
    gridOptions.data.push({
      cgdh: CGNo,
      rkdh: rkdh,
      h: t,
      xh: xh,
      wlbh: wlNo,
      wlmc: wlmc,
      gys: gys,
      w: w,
      g: h,
      dw: dw,
      cgzt: s,
      rq: dayjs(now).format('YYYY-MM-DD'),
      yl: randomSumInt,
      sl: randomOrderInt,
      xsdh: xhdh,
      je: randomInt,
      6: '139xxxxxxxx',
    })
  }
}
//组件接收参数
const gridOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY: {enabled: true},//开启虚拟滚动
  showOverflow: true,
  //showDetails: false,//弹窗 是否显示
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  columns: [
    {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: 50},//详情
    {title: '操作', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
    {type: 'checkbox', fixed: "left", title: '', width: 50},
    {type: 'seq', fixed: "left", title: ' ', width: 50},
    {
      field: 'rkdh',
      width: '10%',
      title: '入库单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'cgdh',
      width: '10%',
      title: '采购单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'cgzt', width: '10%', title: '状态', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'gys',
      width: '10%',
      title: '供应商',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlbh',
      width: '10%',
      title: '物料编号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'wlmc',
      width: '10%',
      title: '物料名称',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'w', width: '8%', title: '宽度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'g', width: '8%', title: '高度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'h', width: '8%', title: '厚度', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'xh', width: '8%', title: '型号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'dw', width: '8%', title: '单位', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '12%',
      title: '不含税单价',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'sl', width: '8%', title: '数量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'sl',
      width: '12%',
      title: '已采购数量',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: 'je', width: '8%', title: '金额', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'je',
      width: '12%',
      title: '不含税金额',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '8%', title: '税率', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'sl', width: '8%', title: '库存', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '周用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {field: 'yl', width: '10%', title: '月用量', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: 'cgzt',
      width: '10%',
      title: '单据状态',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'xsdh',
      width: '10%',
      title: '销售单号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: 'rq',
      width: '10%',
      title: '制单日期',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '6', width: '10%', title: '制单人', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
    {
      field: '6',
      width: '10%',
      title: '采购部门',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {
      field: '7',
      width: '10%',
      title: '采购组织',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      sortable: true
    },
    {field: '8', width: '10%', title: '备注', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
  ],//表头参数
  toolbarConfig: {
    buttons: [{type: 'text'/*,name:'订单入库'*/}, {
      'name': '入库记录',
      'code': 'Log'
    },
      {
        'name': '确认入库',
        status: 'primary',
        'code': 'Sure'
      }],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true,
    style: 'paddling-left:10px'
  },//表头按钮
  data: [],//table body实际数据
  mergeFooterItems: [
    {row: 0, col: 0, rowspan: 1, colspan: 4}
  ],//合并脚
  footerMethod({columns, data}) {//页脚函数
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        /* if (props.tableProp.footList.includes(column.field)) {
           return sumNum(data, column.field)
         }*/
        return ''
      })
    ]
  },
})
//详情框 部分2
const showCGDH = ref();
const showDetails = ref(false);
let detailData = [];
const cellClickEvent = ({row}) => {
  if(isQueryColumnId===false){
    queryColumnId();
  }
  detailData = list.map(field => {
    return {label: queryColumnsTitle(field), value: row[field]}
  })
  showDetails.value = true;
  showCGDH.value = row['cgdh'];
}
//获取表列
let list = [];
let columnIndex = 4;//列标头从第几列开始的
let isQueryColumnId = false;
const queryColumnId = () => {
  while (columnIndex < gridOptions.columns.length) {
    list.push(gridOptions.columns[columnIndex].field);
    columnIndex++;
  }
  isQueryColumnId = true;
  return list;
}
//获取表列名
function queryColumnsTitle(cn) {
  let i = 0;
  while (i < gridOptions.columns.length + 1) {
    if (gridOptions.columns[i].field === cn) {
      return gridOptions.columns[i].title;
    }
    i++;
  }
}
//详情框 部分2 结束
const SureStorage = () => {
  MessageShow('确认入库成功');
}
const now = new Date()
//时间快捷选择
const datevalue = ref('')
const shortcuts = [
  {
    text: '近一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
  },
  {
    text: '近一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  },
  {
    text: '近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  },
]
//页面逻辑代码执行
function logicExecute(type) {
  const $grid = xGrid.value
  switch (type) {
    case '入库':
      //入库逻辑代码TODO
      MessageShow('入库成功!', 'success');
      break;
    case '退货':
      //退货逻辑代码TODO
      MessageShow('退货成功!', 'success');
      break;
    default:
      MessageShow('未知操作!', 'error');
      break;
  }
  return true;
}
//提示信息
const MessageShow = (content, type = 'success') => {
  ElMessage({
    message: content,
    type: type,
    showClose: true,
  })
}
//操作确认类信息:操作类型,提示内容,提示标头,提示类型
const MessageConfirmShow = (czType, content, title = '操作确认提示', type = 'warning') => {
  ElMessageBox.confirm(
      content,
      title,
      {
        cancelButtonText: '取消',
        confirmButtonText: '确定',
        type: type,
        center: true,
      }
  )
      //点击了确定
      .then(() => {
        return logicExecute(czType);
      })
      //点击了取消
      .catch(() => {
        return false;
      })
}
</script>
<style scoped>
:deep(.v-column-label div span) {
  font-weight: bold;
}
</style>
UI-Project/src/views/pp/workOrder/ReleaseWorkOrder.vue
File was deleted
UI-Project/src/views/sd/order/Order.vue
@@ -29,7 +29,9 @@
<style scoped>
#main-div{
  width: 99%;
  height: 100%;
  height: 99%;
  margin-top: 10px;
  margin-left: 10px;
}
#div-title{
  height: 2%;
UI-Project/src/views/sd/order/SelectOrder.vue
@@ -157,7 +157,7 @@
        start-placeholder="开始时间"
        end-placeholder="结束时间"
    />
    <el-button style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button>
    <el-button style="margin-left: 10px;  margin-top: -5px"  id="searchButton" type="primary " :icon="Search">查询</el-button>
    <vxe-grid
        @cell-dblclick="cellClickEvent"
        max-height="97%"
UI-Project/src/views/sd/returns/Returns.vue
@@ -1,55 +1,407 @@
<script setup>
import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue"
import {useRouter} from "vue-router";
let indexFlag=$ref(1)
function changeRouter(index){
  indexFlag=index
<script lang="ts" setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import type { TableColumnCtx } from 'element-plus'
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const dialogFormVisible = ref(false)
const add = ref(false)
const adda = ref(false)
const value = ref('')
interface User {
  id: string
  name: string
  amount1: string
  amount2: string
  amount3: number
}
interface SpanMethodProps {
  row: User
  column: TableColumnCtx<User>
  rowIndex: number
  columnIndex: number
}
const objectSpanMethod = ({
  row,
  column,
  rowIndex,
  columnIndex,
}: SpanMethodProps) => {
  if (columnIndex === 0) {
    if (rowIndex % 2 === 0) {
      return {
        rowspan: 2,
        colspan: 1,
      }
    } else {
      return {
        rowspan: 0,
        colspan: 0,
      }
    }
  }
}
const options = [
  {
    value: 'Option1',
    label: 'P202561456',
  },
  {
    value: 'Option2',
    label: 'P202561456',
  },
  {
    value: 'Option3',
    label: 'P202561456',
  },
  {
    value: 'Option4',
    label: 'P202561456',
  },
  {
    value: 'Option5',
    label: 'P202561456',
  },
]
const tableData: User[] = [
  {
    id: 'P202561456',
    long: '1005',
    wide: '183.6',
    thick: '1991',
  },
  {
    id: 'P202561456',
    long: '105',
    wide: '183',
    thick: '191',
  }
]
const tableDataa = [
  {
    long: '1005',
    wide: '183.6',
    thick: '1991',
    station: '1'
  },
  {
    long: '105',
    wide: '183',
    thick: '191',
    station: '1'
  }
]
const open = () => {
  ElMessageBox.confirm(
    '是否删除该条信息?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '删除成功!',
      })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '删除失败',
      })
    })
}
const getTableRow = (type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      // router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
      break
      state: true
    }
    case 'delete':{
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  data:  [
    {
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
  ],
})
</script>
<template>
  <div id="main-div">
    <div id="div-title">
      <el-breadcrumb :separator-icon="ArrowRight">
        <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/returns/selectReturns' }">退货首页</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/returns/selectDeliveryList' }">发货退货</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/returns/returnsReport' }">报表</el-breadcrumb-item>
        <el-breadcrumb-item v-show="false" :to="{ path: '/main/product/test1' }">测试</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
  <div>
    <div id="dotClass">
      <div>打标机就绪状态:</div>
      <i style="margin-top: 2px; background-color: green;width:18px;  height:18px;  border-radius: 50%;  display: block"></i>
    <el-button style="margin-left: 30px;margin-top: -3px;">手动确认</el-button>
    <div style="margin-left: 70px;">切割机就绪状态:</div>
     <i style="margin-top: 2px; background-color: #911005 ;width:18px;  height:18px;  border-radius: 50%;  display: block"></i>
    <el-button style="margin-left: 30px;margin-top: -3px;" >手动确认</el-button>
   </div>
    <el-button style="margin-top: 5px;margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisible = true">选择工程</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="primary">开始上片</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="warning" >暂停</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="danger" >停止任务</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto">
        <!-- <el-table height="100%" ref="table" :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="id" align="center" label="工程号" min-width="80" />
          <el-table-column prop="long" align="center" label="原片宽" min-width="120" />
          <el-table-column prop="wide" align="center" label="原片长" min-width="120" />
          <el-table-column prop="thick" align="center" label="膜系" min-width="120" />
          <el-table-column prop="thick" align="center" label="数量" min-width="120" />
          <el-table-column
            align="center"
            label="状态"
            min-width="80"
          >
          <el-tag type="success">就绪</el-tag>
          </el-table-column>
        </el-table> -->
    <el-table
    height="100%"
     ref="table"
     :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
      :data="tableData"
      :span-method="objectSpanMethod"
    >
      <el-table-column prop="id" label="工程号" width="200" align="center"/>
      <el-table-column prop="long" label="原片宽" align="center"/>
      <el-table-column prop="wide" label="原片长" align="center"/>
      <el-table-column prop="thick" label="膜系" align="center"/>
      <el-table-column prop="thick" label="数量" align="center"/>
      <el-table-column
            align="center"
            label="状态"
            min-width="80"
          >
          <el-tag type="success">就绪</el-tag>
          <!-- <el-tag type="danger">未就绪</el-tag> -->
          </el-table-column>
    </el-table>
      </div>
    </el-card>
      <div id="parent">
        <img src="../../../assets/shangpianji .png" alt="" style="max-width: 20%;max-height: 20%;margin-top: 20px;margin-left: 130px;">
        <el-button style="margin-top: -830px;margin-left: -40px;"  size="mini" id="searchButton" @click="add = true">添加原片</el-button>
        <el-button style="margin-top: -10px;margin-left: -80px;"  size="mini" id="searchButton"  @click="adda = true">添加原片</el-button>
        <div id="overlay" v-show="state"></div>
        <div id="overlaya" v-show="statea"></div>
      </div>
        </div>
    <div id="main-body">
      <router-view  />
    </div>
  </div>
  <el-dialog v-model="dialogFormVisible" top="24vh" width="30%" title="工程" >
    <div style="margin-left: 50px;margin-bottom: 10px;">
      <el-form-item label="工程号:" :required="true">
        <el-select
    v-model="value"
    clearable
    placeholder="请选择工程"
    style="width: 300px"
  >
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value"
    />
  </el-select>
              </el-form-item>
          </div>
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="dialogFormVisible = false">
          确认
        </el-button>
        <el-button @click="dialogFormVisible = false">取消</el-button>
      </div>
    </template>
  </el-dialog>
  <el-dialog v-model="add" top="23vh" width="40%" title="添加原片" >
    <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
            <el-form  size="mini" label-width="150px">
      <el-form >
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="宽:" :required="true" style="width: 14vw">
                <el-input  autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="长:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div>
              </div>
          </el-col>
        </el-row>
        <el-row style="margin-top: 10px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="膜系:" :required="true" style="width: 14vw;">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="数量:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
        </el-row>
        </el-form>
            </el-form>
          </div>
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="getTableRow('edit')">
          确认
        </el-button>
        <el-button @click="add = false">取消</el-button>
      </div>
    </template>
  </el-dialog>
  <el-dialog v-model="adda" top="23vh" width="40%" title="添加原片" >
    <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
            <el-form  size="mini" label-width="150px">
      <el-form >
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="宽:" :required="true" style="width: 14vw">
                <el-input  autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="长:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div>
              </div>
          </el-col>
        </el-row>
        <el-row style="margin-top: 10px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="膜系:" :required="true" style="width: 14vw;">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="数量:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
        </el-row>
        </el-form>
            </el-form>
          </div>
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="adda = false">
          确认
        </el-button>
        <el-button @click="adda = false">取消</el-button>
      </div>
    </template>
  </el-dialog>
</template>
<style scoped>
#main-div{
  width: 100%;
  height: 100%;
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
#div-title{
  height: 2%;
  width: 100%;
#dotClass {
  display: flex;
  margin-left: 20px;
  size: 50px;
  margin-top: 20px;
  margin-bottom: 20px;
}
#searchButton{
  margin-top: -5px;
  margin-left: 1rem;
#parent{
  position: relative;
}
#searchButton1{
//margin-left: 10rem;
#overlay{
  position: absolute;
  z-index: 1;
  width: 212px;
  height: 15px;
  background-color: #529b2e;
  margin-top: -407px;
  margin-left: 171px;
}
/*main-body样式*/
#main-body{
  width: 99%;
  height: 95%;
  margin-top: 1%;
}
#select{
  margin-left:0.5rem;
}
:deep(.indexTag .el-breadcrumb__inner){
  color: #5CADFE !important;
#overlaya{
  position: absolute;
  z-index: 1;
  width: 212px;
  height: 15px;
  background-color: #529b2e;
  margin-top: -40px;
  margin-left: 167px;
}
</style>
UI-Project/src/views/sd/returns/SelectReturns.vue
@@ -4,9 +4,62 @@
import {useRouter} from "vue-router"
const router = useRouter()
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(false)
const tableData = [
  {
    id: '1',
    long: '1005',
    wide: '183.6',
    thick: '1991'
  },
  {
    id: '2',
    long: '105',
    wide: '183',
    thick: '191'
  }
]
const tableDataa = [
  {
    long: '1005',
    wide: '183.6',
    thick: '1991',
    station: '1'
  },
  {
    long: '105',
    wide: '183',
    thick: '191',
    station: '2'
  }
]
const open = () => {
  ElMessageBox.confirm(
    '是否删除该条信息?',
    '提示',
    {
      confirmButtonText: '是',
      cancelButtonText: '取消',
      type: 'warning',
    }
  )
    .then(() => {
      ElMessage({
        type: 'success',
        message: '删除成功!',
      })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: '删除失败',
      })
    })
}
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
@@ -49,123 +102,172 @@
    mode: 'row',
    showStatus: true
  },//表头参数
  columns:[
    {type:'expand',slots: { content:'content' },width: 50},
    {title: '操作', width: 110, slots: { default: 'button_slot' }},
    {type: 'seq', title: '自序', width: 80 },
  // columns:[
  //   {type:'expand',slots: { content:'content' },width: 50},
  //   // {title: '操作', width: 110, slots: { default: 'button_slot' }},
  //   {type: 'seq', title: '自序', width: 80 },
    {title: '审核', width: 40, slots: { default: 'state' }},
    {title: '入库', width: 40, slots: { default: 'state' }},
  //   // {title: '审核', width: 40, slots: { default: 'state' }},
  //   {title: 'id', width: 140, slots: { default: 'state' }},
  //   {title: '长', width: 160, slots: { default: 'state' }},
  //   {title: '宽', width: 160, slots: { default: 'state' }},
  //   {title: '厚', width: 160, slots: { default: 'state' }},
    {field: '3',width:120,  title: '退货单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '4',width:120,  title: '退货员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '5',width:120,  title: '退货日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '6',width:120,  title: '客户编码',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '7',width:120,  title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '8',width:120,  title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '9',width:120,  title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '10',width:120,   title: '发货单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '11',width:120,  title: '退货方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '12',width:120,  title: '总数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '13',width:120,  title: '总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '14',width:120,  title: '总金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '15',width:120,  title: '报表日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: '16',width:120,  title: '业务员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
  ],//表头按钮
  toolbarConfig: {
    buttons: [],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true
  },
  //   // {field: '3',width:120,  title: '退货单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
  // ],
  //表头按钮
  // toolbarConfig: {
  //   buttons: [],
  //   import: false,
  //   export: true,
  //   print: true,
  //   zoom: true,
  //   custom: true
  // },
  data:  [
    {
      '0': '1',
      '1': '',
      '2': '',
      '3': 'TH23120801',
      '4': '郑珊珊',
      '5': '2023-12-08',
      '6': '310',
      '7': '上海里诺建筑工程有限公司',
      '8': '补1-2',
      '9': '宿迁某某项目',
      '10': 'JG23112304',
      '11': '实物退货',
      '12': '8',
      '13': '15.68',
      '14': '11912.05',
      '15': '2023-11-24',
      '16': '王龙'
      'id': '1',
      'long': '5',
      'wide': '1005',
      'thick': '183.6',
    }
  ],//table body实际数据
  footerMethod ({ columns, data }) {//页脚函数
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        return ''
      })
    ]
  }
  ],
  //table body实际数据
  // footerMethod ({ columns, data }) {//页脚函数
  //   return[
  //     columns.map((column, columnIndex) => {
  //       if (columnIndex === 0) {
  //         return '合计:'
  //       }
  //       // if (props.tableProp.footList.includes(column.field)) {
  //       //   return sumNum(data, column.field)
  //       // }
  //       return ''
  //     })
  //   ]
  // }
})
</script>
<template>
  <div>
    <el-date-picker
    <!-- <el-date-picker
        v-model="value1"
        type="daterange"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
    />
    <el-button style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button>
    /> -->
    <!-- <el-button style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">查询</el-button> -->
    <el-button style="margin-top: -5px;margin-left: 5px;"   id="searchButton" type="primary" @click="dialogFormVisible = true">上片输入</el-button>
    <el-button style="margin-top: -5px"  id="searchButton" type="primary" @click="dialogFormVisiblea = true">原片信息</el-button>
    <!-- <el-button style="margin-top: -5px"  id="searchButton" type="danger">人工拿走</el-button> -->
    <vxe-grid
        max-height="97%"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
    >
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row }">
        <ul class="expand-wrapper">
          <li  v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
            <span style="font-weight: bold">{{item.title+':  '}}</span>
            <span>{{ row[item.field] }}</span>
          </li>
        </ul>
      </template>
      <template #state="{ row}">
        <el-checkbox checked/>
      </template>
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button>
        <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>
      </template>
      <template #num1_filter="{ column, $panel }">
        <div>
          <div v-for="(option, index) in column.filters" :key="index">
            <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
          </div>
        </div>
      </template>
    </vxe-grid>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto">
        <el-table height="100%" ref="table" :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="id" align="center" label="id" min-width="80" />
          <el-table-column prop="long" align="center" label="长" min-width="120" />
          <el-table-column prop="wide" align="center" label="宽" min-width="120" />
          <el-table-column prop="thick" align="center" label="厚" min-width="120" />
          <el-table-column fixed="right" label="操作" align="center" width="200">
            <template #default>
              <el-button size="mini" type="text" plain @click="open">人工拿走</el-button>
            </template>
        </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
  <el-dialog v-model="dialogFormVisible" top="21vh" width="40%" title="上片输入" >
    <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
            <el-form  size="mini" label-width="150px">
      <el-form >
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="工位:" :required="true" style="width: 14vw">
                <el-input  autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="长:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div>
              </div>
          </el-col>
        </el-row>
        <el-row style="margin-top: 10px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="宽:" :required="true" style="width: 13.2vw;margin-left: 14px;">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
              <el-form-item label="厚:" :required="true" style="width: 14vw">
                <el-input autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
        </el-row>
        </el-form>
            </el-form>
          </div>
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="dialogFormVisible = false">
          确认
        </el-button>
        <el-button @click="dialogFormVisible = false">取消</el-button>
      </div>
    </template>
  </el-dialog>
  <el-dialog v-model="dialogFormVisiblea" top="21vh" width="40%" title="原片信息">
    <el-table height="100%" ref="table" :data="tableDataa" @row-click="handle">
      <el-table-column
        prop="long"
        align="center"
        label="长"
        min-width="120"
      />
      <el-table-column
        prop="wide"
        align="center"
        label="宽"
        min-width="120"
      />
      <el-table-column
        prop="thick"
        align="center"
        label="厚"
        min-width="120"
      />
      <el-table-column
        prop="station"
        align="center"
        label="工位"
        min-width="120"
      />
    </el-table>
    <div style="text-align: center; height: 22px; margin-top: 30px;">
        <el-button @click="dialogFormVisiblea = false">关闭</el-button>
      </div>
  </el-dialog>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
  text-align: center;
  margin-top: -15px;
}
</style>
UI-Project/vite.config.js
@@ -31,7 +31,7 @@
        // rewrite: (path) => path.replace(/^\/api/, "/mesModuleTools"), //重写真实路径,替换/api
      },
      '/api2': {
        target: 'localhost:8081/mesModuleTools',
        target: 'localhost:8080/mesModuleTools',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api2/, "mesModuleTools"),
      },
UnLoadGlassModule/effective-pom.xml
New file
Diff too large
pom.xml
New file
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>groupId</groupId>
    <artifactId>HangZhouMes</artifactId>
    <version>1.0-SNAPSHOT</version>
</project>