Browse Source

提交

groupmealweb
gwbvipvip 10 months ago
parent
commit
b9c91eca5b
100 changed files with 1165 additions and 1490 deletions
  1. +8
    -0
      .gitignore
  2. BIN
     
  3. +9
    -2
      config/routes.js
  4. +1
    -1
      dist/3001.daa48d0a.chunk.css
  5. +2
    -0
      dist/3026.70bccc05.async.js
  6. +2
    -0
      dist/3026.db0157ab.chunk.css
  7. +0
    -0
      dist/4456.8c6992c5.chunk.css
  8. +1
    -0
      dist/534.688c2ff1.chunk.css
  9. +0
    -0
      dist/8093.8a47f1b8.chunk.css
  10. +1
    -1
      dist/8093.f14c3521.async.js
  11. +0
    -2
      dist/8798.4279e216.chunk.css
  12. +0
    -2
      dist/8798.86cc9305.async.js
  13. +24
    -22
      dist/asset-manifest.json
  14. +1
    -1
      dist/company/account/index.html
  15. +1
    -1
      dist/company/index.html
  16. +1
    -1
      dist/database/basic/batching/index.html
  17. +1
    -1
      dist/database/goods/goodsInfo/index.html
  18. +1
    -1
      dist/database/goods/goodsattribute/index.html
  19. +1
    -1
      dist/database/goods/goodstypemanage/index.html
  20. +1
    -1
      dist/database/goods/newgoods/index.html
  21. +1
    -1
      dist/database/index.html
  22. +1
    -1
      dist/device/deviceInfo/index.html
  23. +1
    -1
      dist/device/deviceVesion/index.html
  24. +1
    -1
      dist/device/index.html
  25. +1
    -1
      dist/device/product/index.html
  26. +226
    -0
      dist/device/productmanage/index.html
  27. +1
    -1
      dist/groupMeal/applet/appidmanager/appid/index.html
  28. +1
    -1
      dist/groupMeal/applet/appidmanager/index.html
  29. +1
    -1
      dist/groupMeal/applet/appidmanager/payment/index.html
  30. +1
    -1
      dist/groupMeal/applet/basicconfiguration/index.html
  31. +1
    -1
      dist/groupMeal/applet/index.html
  32. +1
    -1
      dist/groupMeal/applet/paytemplate/index.html
  33. +1
    -1
      dist/groupMeal/member/index.html
  34. +1
    -1
      dist/groupMeal/member/memberInfo/index.html
  35. +1
    -1
      dist/groupMeal/member/membertag/index.html
  36. +1
    -1
      dist/groupMeal/oneCard/ReportStatistics/dayConsumption/index.html
  37. +1
    -1
      dist/groupMeal/oneCard/ReportStatistics/index.html
  38. +1
    -1
      dist/groupMeal/oneCard/ReportStatistics/monthSummary/index.html
  39. +1
    -1
      dist/groupMeal/oneCard/ReportStatistics/monthTimeSlot/index.html
  40. +1
    -1
      dist/groupMeal/oneCard/ReportStatistics/reservation/index.html
  41. +1
    -1
      dist/groupMeal/oneCard/gate/index.html
  42. +1
    -1
      dist/groupMeal/oneCard/index.html
  43. +1
    -1
      dist/groupMeal/oneCard/machine/index.html
  44. +1
    -1
      dist/groupMeal/oneCard/memberAccount/index.html
  45. +1
    -1
      dist/groupMeal/oneCard/storedValueCard/index.html
  46. +1
    -1
      dist/groupMeal/shop/index.html
  47. +1
    -1
      dist/index.html
  48. +3
    -0
      dist/order/index.html
  49. +1
    -1
      dist/order/orderflow/index.html
  50. +1
    -1
      dist/order/thirdAuthorize/index.html
  51. +1
    -1
      dist/order/thirdOrder/index.html
  52. +1
    -1
      dist/org/index.html
  53. +1
    -1
      dist/org/orgamange/index.html
  54. +1
    -1
      dist/org/roles/index.html
  55. +1
    -1
      dist/org/users/index.html
  56. +0
    -1
      dist/p__database__basic__batching.17469643.async.js
  57. +1
    -0
      dist/p__database__basic__batching.c93e6b5c.async.js
  58. +1
    -1
      dist/p__database__goods__goodsInfo.7c595054.async.js
  59. +1
    -0
      dist/p__database__goods__goodsattribute.326bd497.async.js
  60. +0
    -1
      dist/p__database__goods__goodsattribute.4811267a.async.js
  61. +1
    -1
      dist/p__database__goods__newgoods.2f2adf53.async.js
  62. +0
    -1
      dist/p__device__deviceInfo.0c7484ea.async.js
  63. +1
    -0
      dist/p__device__deviceInfo.e1334d97.async.js
  64. +0
    -1
      dist/p__device__deviceType.ba884aee.async.js
  65. +1
    -0
      dist/p__device__deviceVesion.009937ac.async.js
  66. +0
    -1
      dist/p__device__deviceVesion.04d41368.async.js
  67. +1
    -0
      dist/p__device__product.bb6f9cfe.async.js
  68. +1
    -0
      dist/p__device__productmanage.e19199ac.async.js
  69. +0
    -1
      dist/p__groupMeal__applet__basicconfiguration.3dc9723f.async.js
  70. +1
    -0
      dist/p__groupMeal__applet__basicconfiguration.b3e72e0a.async.js
  71. +0
    -1
      dist/p__groupMeal__applet__paytemplate.863f9090.async.js
  72. +1
    -1
      dist/p__org__orgamange.73e8799c.async.js
  73. +1
    -1
      dist/sys/dictionary/dicttype/index.html
  74. +1
    -1
      dist/sys/index.html
  75. +1
    -1
      dist/sys/menus/index.html
  76. +287
    -0
      dist/umi.0f23e7b7.js
  77. +31
    -3
      dist/umi.67095e79.js
  78. +1
    -1
      dist/user/index.html
  79. +1
    -1
      dist/user/login/index.html
  80. +1
    -1
      dist/welcome/index.html
  81. +2
    -2
      src/app.jsx
  82. +48
    -45
      src/pages/database/goods/goodsattribute/index.jsx
  83. +0
    -239
      src/pages/database/goods/goodstechnology/components/ActionForm.jsx
  84. +0
    -245
      src/pages/database/goods/goodstechnology/components/CreateAction.jsx
  85. +0
    -57
      src/pages/database/goods/goodstechnology/components/CreateForm.jsx
  86. +0
    -292
      src/pages/database/goods/goodstechnology/index.jsx
  87. +8
    -26
      src/pages/device/deviceInfo/components/CreateForm.jsx
  88. +64
    -54
      src/pages/device/deviceInfo/index.jsx
  89. +5
    -5
      src/pages/device/deviceInfo/services.js
  90. +0
    -203
      src/pages/device/deviceType/index.jsx
  91. +0
    -43
      src/pages/device/deviceType/services.js
  92. +3
    -3
      src/pages/device/deviceVesion/components/CreateForm.jsx
  93. +31
    -19
      src/pages/device/deviceVesion/index.jsx
  94. +6
    -6
      src/pages/device/deviceVesion/services.js
  95. +0
    -89
      src/pages/device/devicetechnology/components/CreateForm.jsx
  96. +0
    -61
      src/pages/device/devicetechnology/services.js
  97. +7
    -2
      src/pages/device/product/components/CreateForm.jsx
  98. +286
    -0
      src/pages/device/product/index.jsx
  99. +44
    -0
      src/pages/device/product/services.js
  100. +10
    -10
      src/pages/device/productmanage/components/ActionForm.jsx

+ 8
- 0
.gitignore View File

@@ -4,3 +4,11 @@

/node_modules
/src/.umi
/.history
/.vs/BPA.SAAS.Web/v17
/.vs
/.history
*.vsidx
/.vs/slnx.sqlite
*.lock
/src/.umi-production/.cache/webpack/default-production

BIN
View File


+ 9
- 2
config/routes.js View File

@@ -164,8 +164,8 @@ export default [
{
name: '产品管理',
icon: 'smile',
path: '/device/deviceType',
component: './device/deviceType',
path: '/device/product',
component: './device/product',
access: 'k12',
},
{
@@ -182,6 +182,13 @@ export default [
component: './device/deviceVesion',
access: 'k14',
},
{
name: '产品功能',
icon: 'smile',
path: '/device/productmanage',
component: './device/productmanage',
access: 'k14',
},
// {
// name: '设备工艺信息',
// icon: 'smile',


dist/3001.daa48d0a.chunk.css
File diff suppressed because it is too large
View File


+ 2
- 0
dist/3026.70bccc05.async.js
File diff suppressed because it is too large
View File


+ 2
- 0
dist/3026.db0157ab.chunk.css
File diff suppressed because it is too large
View File


dist/5977.8c6992c5.chunk.css → dist/4456.8c6992c5.chunk.css View File


+ 1
- 0
dist/534.688c2ff1.chunk.css
File diff suppressed because it is too large
View File


dist/6953.8a47f1b8.chunk.css → dist/8093.8a47f1b8.chunk.css View File


dist/8093.f14c3521.async.js
File diff suppressed because it is too large
View File


+ 0
- 2
dist/8798.4279e216.chunk.css
File diff suppressed because it is too large
View File


+ 0
- 2
dist/8798.86cc9305.async.js
File diff suppressed because it is too large
View File


+ 24
- 22
dist/asset-manifest.json View File

@@ -1,6 +1,6 @@
{
"/umi.css": "/umi.2d7db433.css",
"/umi.js": "/umi.67095e79.js",
"/umi.js": "/umi.0f23e7b7.js",
"/t__plugin-layout__Layout.css": "/t__plugin-layout__Layout.e1129705.chunk.css",
"/t__plugin-layout__Layout.js": "/t__plugin-layout__Layout.cbd27cb5.async.js",
"/p__user__login.css": "/p__user__login.2f84d6a8.chunk.css",
@@ -11,24 +11,25 @@
"/p__company__account.css": "/p__company__account.f6838307.chunk.css",
"/p__company__account.js": "/p__company__account.b60cfec9.async.js",
"/p__org__orgamange.css": "/p__org__orgamange.5d1001bb.chunk.css",
"/p__org__orgamange.js": "/p__org__orgamange.2a1ec583.async.js",
"/p__org__orgamange.js": "/p__org__orgamange.73e8799c.async.js",
"/p__org__roles.js": "/p__org__roles.1f1ff1a5.async.js",
"/p__org__users.js": "/p__org__users.742ace03.async.js",
"/p__database__basic__batching.css": "/p__database__basic__batching.5b012b67.chunk.css",
"/p__database__basic__batching.js": "/p__database__basic__batching.17469643.async.js",
"/p__database__basic__batching.js": "/p__database__basic__batching.c93e6b5c.async.js",
"/p__database__goods__goodstypemanage.css": "/p__database__goods__goodstypemanage.f6838307.chunk.css",
"/p__database__goods__goodstypemanage.js": "/p__database__goods__goodstypemanage.af758cbf.async.js",
"/p__database__goods__goodsattribute.js": "/p__database__goods__goodsattribute.4811267a.async.js",
"/p__database__goods__goodsattribute.js": "/p__database__goods__goodsattribute.326bd497.async.js",
"/p__database__goods__newgoods.css": "/p__database__goods__newgoods.f3ef09c5.chunk.css",
"/p__database__goods__newgoods.js": "/p__database__goods__newgoods.5acfdb51.async.js",
"/p__database__goods__newgoods.js": "/p__database__goods__newgoods.2f2adf53.async.js",
"/p__database__goods__goodsInfo.css": "/p__database__goods__goodsInfo.67f6136b.chunk.css",
"/p__database__goods__goodsInfo.js": "/p__database__goods__goodsInfo.a90f1fcb.async.js",
"/p__device__deviceType.js": "/p__device__deviceType.ba884aee.async.js",
"/p__device__deviceInfo.js": "/p__device__deviceInfo.0c7484ea.async.js",
"/p__database__goods__goodsInfo.js": "/p__database__goods__goodsInfo.7c595054.async.js",
"/p__device__product.js": "/p__device__product.bb6f9cfe.async.js",
"/p__device__deviceInfo.js": "/p__device__deviceInfo.e1334d97.async.js",
"/p__device__deviceVesion.css": "/p__device__deviceVesion.63cc2960.chunk.css",
"/p__device__deviceVesion.js": "/p__device__deviceVesion.04d41368.async.js",
"/p__groupMeal__shop.js": "/p__groupMeal__shop.4ce44015.async.js",
"/p__groupMeal__member__memberInfo.js": "/p__groupMeal__member__memberInfo.ee9a88b6.async.js",
"/p__device__deviceVesion.js": "/p__device__deviceVesion.009937ac.async.js",
"/p__device__productmanage.js": "/p__device__productmanage.e19199ac.async.js",
"/p__groupMeal__shop.js": "/p__groupMeal__shop.c77ade2d.async.js",
"/p__groupMeal__member__memberInfo.js": "/p__groupMeal__member__memberInfo.c1b15978.async.js",
"/p__groupMeal__member__membertag.css": "/p__groupMeal__member__membertag.f6838307.chunk.css",
"/p__groupMeal__member__membertag.js": "/p__groupMeal__member__membertag.ab065c6c.async.js",
"/p__groupMeal__oneCard__gate.css": "/p__groupMeal__oneCard__gate.014f4d93.chunk.css",
@@ -45,11 +46,11 @@
"/p__groupMeal__oneCard__ReportStatistics__monthSummary.js": "/p__groupMeal__oneCard__ReportStatistics__monthSummary.d9050fad.async.js",
"/p__groupMeal__oneCard__ReportStatistics__monthTimeSlot.js": "/p__groupMeal__oneCard__ReportStatistics__monthTimeSlot.68e01cac.async.js",
"/p__groupMeal__applet__paytemplate.css": "/p__groupMeal__applet__paytemplate.367ff6f3.chunk.css",
"/p__groupMeal__applet__paytemplate.js": "/p__groupMeal__applet__paytemplate.863f9090.async.js",
"/p__groupMeal__applet__paytemplate.js": "/p__groupMeal__applet__paytemplate.659ec5d2.async.js",
"/p__groupMeal__applet__basicconfiguration.css": "/p__groupMeal__applet__basicconfiguration.b80e5b22.chunk.css",
"/p__groupMeal__applet__basicconfiguration.js": "/p__groupMeal__applet__basicconfiguration.3dc9723f.async.js",
"/p__groupMeal__applet__appidmanager__payment.js": "/p__groupMeal__applet__appidmanager__payment.eebbb7bc.async.js",
"/p__groupMeal__applet__appidmanager__appid.js": "/p__groupMeal__applet__appidmanager__appid.dd47c5d4.async.js",
"/p__groupMeal__applet__basicconfiguration.js": "/p__groupMeal__applet__basicconfiguration.b3e72e0a.async.js",
"/p__groupMeal__applet__appidmanager__payment.js": "/p__groupMeal__applet__appidmanager__payment.18768af5.async.js",
"/p__groupMeal__applet__appidmanager__appid.js": "/p__groupMeal__applet__appidmanager__appid.fb9afe65.async.js",
"/p__order__orderflow.css": "/p__order__orderflow.f6838307.chunk.css",
"/p__order__orderflow.js": "/p__order__orderflow.7a525a11.async.js",
"/p__order__thirdOrder.js": "/p__order__thirdOrder.571da653.async.js",
@@ -63,25 +64,26 @@
"/4060.96d23d65.chunk.css": "/4060.96d23d65.chunk.css",
"/4060.cbd6a188.async.js": "/4060.cbd6a188.async.js",
"/8790.67a4f36e.async.js": "/8790.67a4f36e.async.js",
"/6953.8a47f1b8.chunk.css": "/6953.8a47f1b8.chunk.css",
"/6953.309e0b52.async.js": "/6953.309e0b52.async.js",
"/8093.8a47f1b8.chunk.css": "/8093.8a47f1b8.chunk.css",
"/8093.f14c3521.async.js": "/8093.f14c3521.async.js",
"/237.39f13aa0.async.js": "/237.39f13aa0.async.js",
"/8151.e344b23c.async.js": "/8151.e344b23c.async.js",
"/3001.1fa56cdd.chunk.css": "/3001.1fa56cdd.chunk.css",
"/3001.daa48d0a.chunk.css": "/3001.daa48d0a.chunk.css",
"/3001.2d63684e.async.js": "/3001.2d63684e.async.js",
"/3537.6923ec17.async.js": "/3537.6923ec17.async.js",
"/8798.4279e216.chunk.css": "/8798.4279e216.chunk.css",
"/8798.86cc9305.async.js": "/8798.86cc9305.async.js",
"/3026.db0157ab.chunk.css": "/3026.db0157ab.chunk.css",
"/3026.70bccc05.async.js": "/3026.70bccc05.async.js",
"/9396.3fe14a67.async.js": "/9396.3fe14a67.async.js",
"/2826.eb3e0255.async.js": "/2826.eb3e0255.async.js",
"/3059.b3e40214.async.js": "/3059.b3e40214.async.js",
"/7973.006892df.async.js": "/7973.006892df.async.js",
"/2255.a25b6bb8.async.js": "/2255.a25b6bb8.async.js",
"/9669.75110ec8.async.js": "/9669.75110ec8.async.js",
"/7973.006892df.async.js": "/7973.006892df.async.js",
"/5977.8c6992c5.chunk.css": "/5977.8c6992c5.chunk.css",
"/4456.8c6992c5.chunk.css": "/4456.8c6992c5.chunk.css",
"/9215.80966678.async.js": "/9215.80966678.async.js",
"/731.69af3e10.async.js": "/731.69af3e10.async.js",
"/4276.4ae26a2d.async.js": "/4276.4ae26a2d.async.js",
"/534.688c2ff1.chunk.css": "/534.688c2ff1.chunk.css",
"/6486.837492aa.async.js": "/6486.837492aa.async.js",
"/3667.a51bb1c9.async.js": "/3667.a51bb1c9.async.js",
"/public/logo.png": "/logo.png",


+ 1
- 1
dist/company/account/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/company/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/database/basic/batching/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/database/goods/goodsInfo/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/database/goods/goodsattribute/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/database/goods/goodstypemanage/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/database/goods/newgoods/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/database/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/device/deviceInfo/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/device/deviceVesion/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/device/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

dist/device/deviceType/index.html → dist/device/product/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 226
- 0
dist/device/productmanage/index.html View File

@@ -0,0 +1,226 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="keywords"
content="antd,umi,umijs,ant design,Scaffolding, layout, Ant Design, project, Pro, admin, console, homepage, out-of-the-box, middle and back office, solution, component library"
/>
<meta
name="description"
content="
An out-of-box UI solution for enterprise applications as a React boilerplate."
/>
<meta
name="description"
content="
Out-of-the-box mid-stage front-end/design solution."
/>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<title>Ant Design Pro</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<!-- <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=Rvf71uBzNi7rWo1bhCvzbmLTFbPihNur"></script> -->
<link rel="stylesheet" href="/umi.2d7db433.css" />
<script>
window.routerBase = "/";
</script>
<script>
//! umi version: 3.5.39
</script>
</head>
<body>
<noscript>Out-of-the-box mid-stage front/design solution!</noscript>
<div id="root">
<style>
html,
body,
#root {
height: 100%;
margin: 0;
padding: 0;
}
#root {
background-repeat: no-repeat;
background-size: 100% auto;
}
.page-loading-warp {
display: flex;
align-items: center;
justify-content: center;
padding: 98px;
}
.ant-spin {
position: absolute;
display: none;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
color: #1890ff;
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5;
text-align: center;
list-style: none;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s
cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: -webkit-transform 0.3s
cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
-webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
-webkit-font-feature-settings: "tnum";
font-feature-settings: "tnum";
}

.ant-spin-spinning {
position: static;
display: inline-block;
opacity: 1;
}

.ant-spin-dot {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
font-size: 20px;
}

.ant-spin-dot-item {
position: absolute;
display: block;
width: 9px;
height: 9px;
background-color: #1890ff;
border-radius: 100%;
-webkit-transform: scale(0.75);
-ms-transform: scale(0.75);
transform: scale(0.75);
-webkit-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
transform-origin: 50% 50%;
opacity: 0.3;
-webkit-animation: antspinmove 1s infinite linear alternate;
animation: antSpinMove 1s infinite linear alternate;
}

.ant-spin-dot-item:nth-child(1) {
top: 0;
left: 0;
}

.ant-spin-dot-item:nth-child(2) {
top: 0;
right: 0;
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}

.ant-spin-dot-item:nth-child(3) {
right: 0;
bottom: 0;
-webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}

.ant-spin-dot-item:nth-child(4) {
bottom: 0;
left: 0;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}

.ant-spin-dot-spin {
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-animation: antrotate 1.2s infinite linear;
animation: antRotate 1.2s infinite linear;
}

.ant-spin-lg .ant-spin-dot {
width: 32px;
height: 32px;
font-size: 32px;
}

.ant-spin-lg .ant-spin-dot i {
width: 14px;
height: 14px;
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.ant-spin-blur {
background: #fff;
opacity: 0.5;
}
}

@-webkit-keyframes antSpinMove {
to {
opacity: 1;
}
}

@keyframes antSpinMove {
to {
opacity: 1;
}
}

@-webkit-keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}

@keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
</style>
<div
style="
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
min-height: 420px;
"
>
<img src="/pro_icon.svg" alt="logo" width="256" />
<div class="page-loading-warp">
<div class="ant-spin ant-spin-lg ant-spin-spinning">
<span class="ant-spin-dot ant-spin-dot-spin"
><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i
><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i
></span>
</div>
</div>
<div
style="display: flex; align-items: center; justify-content: center"
>
<img
src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"
width="32"
style="margin-right: 8px"
/>
Ant Design
</div>
</div>
</div>

<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/applet/appidmanager/appid/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/applet/appidmanager/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/applet/appidmanager/payment/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/applet/basicconfiguration/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/applet/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/applet/paytemplate/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/member/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/member/memberInfo/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/member/membertag/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/ReportStatistics/dayConsumption/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/ReportStatistics/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/ReportStatistics/monthSummary/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/ReportStatistics/monthTimeSlot/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/ReportStatistics/reservation/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/gate/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/machine/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/memberAccount/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/oneCard/storedValueCard/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/groupMeal/shop/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 3
- 0
dist/order/index.html View File

@@ -222,5 +222,8 @@
</div>

<script src="/umi.67095e79.js"></script>
========
<script src="/umi.0f23e7b7.js"></script>
>>>>>>>> da38594ed376a2f2a3a0c2a866571fee95975dcd:dist/order/index.html
</body>
</html>

+ 1
- 1
dist/order/orderflow/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/order/thirdAuthorize/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/order/thirdOrder/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/org/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/org/orgamange/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/org/roles/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/org/users/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 0
- 1
dist/p__database__basic__batching.17469643.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/p__database__basic__batching.c93e6b5c.async.js
File diff suppressed because it is too large
View File


dist/p__database__goods__goodsInfo.7c595054.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/p__database__goods__goodsattribute.326bd497.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
dist/p__database__goods__goodsattribute.4811267a.async.js
File diff suppressed because it is too large
View File


dist/p__database__goods__newgoods.2f2adf53.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
dist/p__device__deviceInfo.0c7484ea.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/p__device__deviceInfo.e1334d97.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
dist/p__device__deviceType.ba884aee.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/p__device__deviceVesion.009937ac.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
dist/p__device__deviceVesion.04d41368.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/p__device__product.bb6f9cfe.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/p__device__productmanage.e19199ac.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
dist/p__groupMeal__applet__basicconfiguration.3dc9723f.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/p__groupMeal__applet__basicconfiguration.b3e72e0a.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
dist/p__groupMeal__applet__paytemplate.863f9090.async.js
File diff suppressed because it is too large
View File


dist/p__org__orgamange.73e8799c.async.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/sys/dictionary/dicttype/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/sys/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/sys/menus/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 287
- 0
dist/umi.0f23e7b7.js
File diff suppressed because it is too large
View File


+ 31
- 3
dist/umi.67095e79.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/user/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/user/login/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 1
- 1
dist/welcome/index.html View File

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.67095e79.js"></script>
<script src="/umi.0f23e7b7.js"></script>
</body>
</html>

+ 2
- 2
src/app.jsx View File

@@ -152,8 +152,8 @@ export async function getInitialState() {
code: 'deviceType',
name: '产品管理',
icon: 'smile',
path: '/device/deviceType',
component: './device/deviceType',
path: '/device/product',
component: './device/product',
access: 'k12',
},
{


+ 48
- 45
src/pages/database/goods/goodsattribute/index.jsx View File

@@ -16,7 +16,52 @@ import {
} from './service';

/**


const goodsattribute = () => {
/** 新建/更新窗口的弹窗 */
const [createModalVisible, handleModalVisible] = useState(false);
const [createattrModalVisible, handleMattrodalVisible] = useState(false);
/** 分布更新窗口的弹窗 */

const [goodstypeData, setGoodstypeData] = useState([]);
const [attributeid, setAttributeid] = useState('');
const actionRef = useRef();
const [currentRow, setCurrentRow] = useState();
const [selectedRowsState, setSelectedRows] = useState([]);
const [treeData, setTreeData] = useState();
/** 国际化修改 */
useEffect(() => {

intDicData();
}, []);
function intDicData() {
gettree().then((r) => {
setTreeData(r.data);
});
}

/**
* 批量删除
*
* @param selectedRows
*/

const handleRemove = async (selectedRows) => {
const hide = message.loading('正在删除');
if (!selectedRows) return true;
await deletegoodsattribute(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
} else {
message.error(r.errors);
}
});
hide();
return true;
};
/**
* 添加节点
*
* @param fields
@@ -28,6 +73,7 @@ const handleAdd = async (fields) => {
await addgoodsattribute(JSON.stringify(fields)).then((r) => {
if (r.succeeded) {
message.success('添加成功');
actionRef.current.reload();
} else {
message.error(r.errors);
}
@@ -57,6 +103,7 @@ const handleUpdate = async (fields) => {
}).then((r) => {
if (r.succeeded) {
message.success('修改成功');
actionRef.current.reload();
} else {
message.error(r.errors);
}
@@ -69,50 +116,6 @@ const handleUpdate = async (fields) => {
return false;
}
};

const goodsattribute = () => {
/** 新建/更新窗口的弹窗 */
const [createModalVisible, handleModalVisible] = useState(false);
const [createattrModalVisible, handleMattrodalVisible] = useState(false);
/** 分布更新窗口的弹窗 */

const [goodstypeData, setGoodstypeData] = useState([]);
const [attributeid, setAttributeid] = useState('');
const actionRef = useRef();
const [currentRow, setCurrentRow] = useState();
const [selectedRowsState, setSelectedRows] = useState([]);
const [treeData, setTreeData] = useState();
/** 国际化修改 */
useEffect(() => {

intDicData();
}, []);
function intDicData() {
gettree().then((r) => {
setTreeData(r.data);
});
}

/**
* 批量删除
*
* @param selectedRows
*/

const handleRemove = async (selectedRows) => {
const hide = message.loading('正在删除');
if (!selectedRows) return true;
await deletegoodsattribute(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
message.success('删除成功');
actionRef.current.reload();
} else {
message.error(r.errors);
}
});
hide();
return true;
};
const columns = [
{
title: '主键',


+ 0
- 239
src/pages/database/goods/goodstechnology/components/ActionForm.jsx View File

@@ -1,239 +0,0 @@
import ProTable from '@ant-design/pro-table';
import { Modal,Space, Form,Button,Select,message,Popconfirm} from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import React, { useState,useRef } from 'react';
import CreateAction from './CreateAction';
import {
gettechnologyactionList,
addtechnologyaction,
updatetechnologyaction,
deletetechnologyaction
} from '../services';
const { Option, OptGroup } = Select;

const ActionForm = (props) => {
const [currentRow , setcurrentRow ] = useState([]);;
const [dataSource, setDataSource] = useState([]);
const actionRef = useRef();
const [form] = Form.useForm();
const [actionValueName,setactionValueName]=useState();
const [createModalVisible, handleModalVisible] = useState(false);
const options = {
text:{value:'text',text: `文本框`},
select:{ value: `select`, text: `下拉框`},
// money:{ value: `money`, text: `金额输入`},
textarea:{ value: `textarea`, text: `文本域`},
// date:{ value: `date`, text: `日期`},
// dateTime:{ value: `dateTime`, text: `日期时间`},
// radio:{ value: `radio`, text: `单选框`},
// radioButton:{ value: `radioButton`, text: `按钮单选框`},
digit:{ value: `digit`, text: `数字输入框`},
switch:{ value: `switch`, text: `开关`},
}
const columns= [
{
title: '模型名称',
dataIndex: 'actionName',
width: '15%',
},
{
title: '输入类型',
key: 'actionType',
dataIndex: 'actionType',
valueType: 'select',
width: '15%',
valueEnum:options,
},
// {
// title: '类型值',
// dataIndex: 'actionValue',
// width: '15%',
// valueType:'select',
// valueEnum: {
// text:{
// text: '文本框',
// status: 'text',
// },
// select:{
// text: '下拉框',
// status: 'select',
// }
// }
// },
// {
// title: '单位',
// dataIndex: 'unit',
// width: '8%',
// },
// {
// title: '是否绑定物料',
// dataIndex: 'isBatch',
// width: '15%',
// valueEnum: {
// true:{
// text: '是',
// status: 'Success',
// },
// false:{
// text: '否',
// status: 'Processing',
// }
// }
// },
{
title: '排序',
dataIndex: 'sort',
valueType:'digit',
width: '8%',
},
{
title: '操作',
valueType: 'option',
width: 200,
render: (text, record, _, action) => [
<a
key="editable"
onClick={() => {
handleModalVisible(true);
setcurrentRow(record);
}}
>
编辑
</a>,
<Popconfirm
type="primary"
key="primary"
title="确认删除吗?"
okText="是"
cancelText="否"
onConfirm={() => {
handleRemove([record.id]);
actionRef.current?.reloadAndRest();
}}
onCancel={() => { }}
>
<a href="#">删除</a>
</Popconfirm>,,
],
},
]
const onFinish= async (fields) => {
console.log(fields)
await addtechnologyaction(JSON.stringify(fields)).then((r) => {
if (r.data) {
message.success('添加成功');
} else {
message.error(r.errors);
}
});
return true;
}
const handleUpdate=async (fields) => {
await updatetechnologyaction(JSON.stringify(fields)).then((r) => {
if (r.data) {
message.success('修改成功');
} else {
message.error(r.errors);
}
});
return true;
}
const handleRemove = async (ids) => {

try {
deletetechnologyaction(ids).then((r) => {
if (r.data) {
message.success('删除成功');
actionRef.current.reload();
} else {
message.error(r.errors);
}
});
return true;
} catch (error) {
message.error('删除失败,请重试');
}
}
return (
<>
<Modal
title={'模型配置'}
width={1140}
visible={props?.actionFormModalVisible}
bodyStyle={{ padding: '32px 40px 1px 48px' }}
footer={null}
onCancel={() => {
props?.onCancel();
}}
destroyOnClose
maskClosable={false}
>
<ProTable rowKey="id"
headerTitle="模型配置列表"
actionRef={actionRef}
pagination={false}
search={false}
toolBarRender={() => [
<Button
type="primary"
key="primary"
onClick={() => {
handleModalVisible(true);
setcurrentRow({});
}}
>
<PlusOutlined /> 新建
</Button>,
]}
columns={columns}
request={async () => {
var data = [];
console.log(props.values.id)
await gettechnologyactionList(props.values.id).then((r) => {
data = r.data;
});
return {
data: data,
success: true,
};
}}
>
</ProTable>
<CreateAction
onFinish={async (value) => {
var success = false;
console.log(value)
console.log(value.actionValue)
value.goodstechnologyId=props.values.id;
if (value.id) {
success = await handleUpdate(value);
} else {
success = await onFinish(value);
}
if (success) {
handleModalVisible(false);
if (actionRef.current) {
actionRef.current.reload();
}
}
}}
onCancel={() => {
setcurrentRow(undefined);
handleModalVisible(false);
}}
createModalVisible={createModalVisible}
actionValueName={actionValueName}
values={currentRow || {}}
/>
</Modal>
</>
);
};
export default ActionForm;

+ 0
- 245
src/pages/database/goods/goodstechnology/components/CreateAction.jsx View File

@@ -1,245 +0,0 @@
import { Modal,Input, Form,Button,Select,message,Switch,Divider,Space,progress,percent} from 'antd';
import { BetaSchemaForm, ProFormSelect,ProFormDependency } from '@ant-design/pro-form';
import React, { useState,useEffect } from 'react';
import { PlusOutlined } from '@ant-design/icons';
const CreateAction = (props) => {
const [form] = Form.useForm();
const formRef = React.useRef(null);
const [valueType, setValueType] = useState('text');
const [layoutType, setLayoutType] = useState('Form');
const [optionitem,setoptionitem]=useState([])
const [modalVisit, setModalVisit] = useState(false);
const [shuUpdate, setshuUpdate] = useState(false);
useEffect(() => {
formRef.current?.setFieldsValue(props.values);
if(props.createModalVisible){
if(props.values.actionType==null){
formRef.current?.setFieldsValue({
actionType: 'text',
});
props.values.actionType="text";
setValueType("text");
setLayoutType('Form');
setoptionitem([]);
}else{
formRef.current?.setFieldsValue({
actionType: props.values.actionType,
});
setValueType(props.values.actionType)
if(props.values.actionType=="select"){
setLayoutType('ModalForm');
let ary=[];
let op=JSON.parse(props.values.actionValue)
for (let t = 0; t < op.length; t++) {
ary.push({actionValueName:op[t].actionValueName})
}
setoptionitem(ary);
}else{
setValueType(props.values.actionType);
setLayoutType('Form');
setoptionitem([]);
}
}
}
}, [props.createModalVisible]);
const handleChange=(value)=>{
console.log(JSON.stringify(value))
if(value){
formRef.current?.setFieldsValue({
actionValue:JSON.stringify(value)
})
}
setModalVisit(false);
message.success("保存成功")
}
const options = [
{value:'text',label: `文本框`},
{ value: `select`, label: `下拉框`},
// { value: `money`, label: `金额输入`},
{ value: `textarea`, label: `文本域`},
// { value: `date`, label: `日期`},
// { value: `dateTime`, label: `日期时间`},
// { value: `radio`, label: `单选框`},
// { value: `radioButton`, label: `按钮单选框`},
{ value: `digit`, label: `数字输入框`},
{ value: `switch`, label: `开关`},
]
const columns=[
{
dataIndex: 'actionValue',
valueType:'dependency',
name: ['valueType'],
columns: ({ actionType }) => {
console.log(valueType)
switch(valueType)
{
case 'select':
return [
{
dataIndex: 'list',
valueType: 'formList',
initialValue:optionitem,
columns: [
{
valueType: 'group',
columns: [
{
title: '选项名称',
dataIndex: 'actionValueName',
width: 'md',
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
}
]
}
],
},
{
renderFormItem: (schema,config,form) => {
return [
<div style={{float:'right'}}>
<Button
type="primary"
style={{'margin-left':'5px'}}
onClick={() => {
handleChange(form?.formRef?.current?.getFieldValue("list"));
return true;
}}>
保存
</Button>
</div>
];
},
}
];
case 'text':
return [
{
dataIndex: 'actionValue',
valueType: 'text',
renderFormItem: () => <Input placeholder="输入类型值" disabled />
},
];
default:
return [{
dataIndex: 'actionValue',
valueType: valueType,
fieldProps:{
disabled:true
}
}];
}
}
},
]
// const handleChange=(value)=>{

// }
// const onNameChange = (event) => {
// settypename(event.target.value);
// };
// const addItem = async (e) => {
// e.preventDefault();
// setItems([...items, {label:typename,value:index++} || `New item ${index++}`]);
// settypename('');
// setTimeout(() => {
// inputRef.current?.focus();
// }, 0);
// console.log(items)
// }
return (
<>
<Modal
title={'动作配置'}
width={640}
ref={formRef}
visible={props?.createModalVisible}
bodyStyle={{ padding: '32px 40px 1px 48px' }}
footer={null}
onCancel={() => {
props?.onCancel();
}}
destroyOnClose
maskClosable={false}
>
<Form
layout="vertical"
preserve={false}
// form={form}
initialValues={props?.values}
onFinish={props?.onFinish}
ref={formRef}
>
<Form.Item name="id" hidden={true}>
<Input />
</Form.Item>
<Form.Item>
<Form.Item name="actionName" label="模型名称" rules={[{ required: true, max: 64, whitespace: true }]}>
<Input placeholder="请输入模型名称" />
</Form.Item>
<Form.Item name="actionType" label="输入类型" rules={[{ required: true, max: 64, whitespace: true }]}>
<ProFormSelect options={options} fieldProps={{
value: valueType,
onChange: (e) => {
if(e=='select'){
setLayoutType('ModalForm');
}else{
setLayoutType('Form')
}
setValueType(e);
},
}}/>
</Form.Item>
<Form.Item name="actionValue" label="输入类型控件">
<BetaSchemaForm
trigger={<a onClick={()=>setModalVisit(true)}>添加选项</a>}
columns={columns}
layoutType={layoutType}
visible={modalVisit}
modalProps={{
forceRender: true,//切换显示模式后强制渲染其他模式表单
onCancel:()=>setModalVisit(false)
}}
onVisibleChange={(vis)=>{
setshuUpdate(vis)
}}
width={420}
shouldUpdate={shuUpdate}
submitter={false}
style={{padding:'40px 10px 1px 10px;' }}
/>
</Form.Item>
{/* <Form.Item name="unit" label="单位">
<Input placeholder="请输入单位" />
</Form.Item>
<Form.Item name="isBatch" label="是否绑定物料" valuePropName="checked">
<Switch checkedChildren="是" unCheckedChildren="否"/>
</Form.Item> */}
<Form.Item name="sort" label="排序">
<Input placeholder="请输入排序" />
</Form.Item>
<Button htmlType="button" style={{float:'right',left:10}} onClick={props.onCancel} >
取消
</Button>
<Button type="primary" htmlType="submit" style={{float:'right'}} >
保存
</Button>
</Form.Item>
</Form>
</Modal>
</>
)
}
export default CreateAction;

+ 0
- 57
src/pages/database/goods/goodstechnology/components/CreateForm.jsx View File

@@ -1,57 +0,0 @@
import React, { useState } from 'react';
import { Modal, Form, Input, Button, Select } from 'antd';
const CreateForm = (props) => {
const { Option, OptGroup } = Select;
return (
<Modal
title={props?.values?.id ? '编辑' : '新建'}
width={640}
visible={props?.createModalVisible}
bodyStyle={{ padding: '32px 40px 48px' }}
footer={null}
onCancel={() => {
props?.onCancel();
}}
destroyOnClose
maskClosable={false}
>
<Form
layout="vertical"
preserve={false}
initialValues={props?.values}
onFinish={props?.onFinish}
>
<Form.Item name="id" hidden={true}>
<Input />
</Form.Item>
<Form.Item name="name" label="工艺名称" rules={[{ required: true, max: 64, whitespace: true }]}>
<Input placeholder="请输入工艺名称" />
</Form.Item>
<Form.Item name="foreignKeyRe" label="关联外键" rules={[{ required: false }]}>
<Input placeholder="请输入关联外键" />
</Form.Item>
<Form.Item
name="status"
label="状态"
defaultValue={props?.values?.status}
rules={[{ required: true, message: '请选择状态' }]}
>
<Select placeholder="请选择状态">
<Option value="0">正常</Option>
<Option value="1">停用</Option>
</Select>
</Form.Item>
<Form.Item>
<Button htmlType="button" style={{float:'right',left:10}} onClick={props.onCancel} >
取消
</Button>
<Button type="primary" htmlType="submit" style={{float:'right'}} >
保存
</Button>
</Form.Item>
</Form>
</Modal>
);
};

export default CreateForm;

+ 0
- 292
src/pages/database/goods/goodstechnology/index.jsx View File

@@ -1,292 +0,0 @@
import { DropboxOutlined, PlusOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Modal, Popconfirm } from 'antd';
import React, { useState, useRef, useEffect } from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import CreateForm from './components/CreateForm';
import ActionForm from './components/ActionForm';
import {
getGoodstechnologypage,
addgoodstechnology,
updategoodstechnology,
deletegoodstechnology,
} from './services';

//页面 相当于 class
/**
* 添加节点
*
* @param fields
*/
const handleAdd = async (fields) => {
try {
await addgoodstechnology(JSON.stringify(fields)).then((r) => {
if (r.data) {
message.success('添加成功');
} else {
message.error(r.errors);
}
});
return true;
} catch (error) {
message.error('添加失败请重试!');
return false;
}
};
/**
* 批量删除节点
*
* @param selectedRows
*/
const handleRemove = async (ids) => {
try {
deletegoodstechnology(ids).then((r) => {
if (r.data) {
message.success('删除成功');
} else {
message.error(r.errors);
}
});
return true;
} catch (error) {
message.error('删除失败,请重试');
}
};

/**
* 更新节点
*
* @param fields
*/

const handleUpdate = async (fields) => {
try {
updategoodstechnology(fields).then((r) => {
if (r.data) {
message.success('修改成功');
} else {
message.error(r.errors);
}
});
return true;
} catch (error) {
message.error('修改失败请重试!');
return false;
}
};
//页面 相当于 class
const bomtechnology = () => {
/** 新建/更新窗口的弹窗 */
const [createModalVisible, handleModalVisible] = useState(false);
/** 分布更新窗口的弹窗 */
const [actionFormModalVisible, setactionFormModalVisible] = useState(false);
const [showDetail, setShowDetail] = useState(false);
//绑定
const actionRef = useRef();
const [currentRow, setCurrentRow] = useState();
//选中的行
const [selectedRowsState, setSelectedRows] = useState([]);

/** 国际化配置 */

const columns = [
{
title: '主键',
dataIndex: 'id',
tip: '规则名称是唯一的 key',
hideInSearch: true,
hideInTable: true,
render: (dom, entity) => {
return (
<a
onClick={() => {
setCurrentRow(entity);
setShowDetail(true);
}}
>
{dom}
</a>
);
},
},
{
title: '名称',
dataIndex: 'name',
valueType: 'textarea',
ellipsis: true,
search: true,
},
{
title: '关联外键',
dataIndex: 'foreignKeyRe',
valueType: 'textarea',
ellipsis: true,
search: true,
},
{
title: '状态',
dataIndex: 'status',
hideInForm: true,
search: true,
valueEnum: {
0: {
text: '正常',
status: 'Processing',
},
1: {
text: '停用',
status: 'Success',
},
},
},
{
title: '创建时间',
dataIndex: 'createAt',
valueType: 'date',
hideInSearch: true,
},
{
title: '操作',
dataIndex: 'option',
valueType: 'option',
render: (_, record) => [
<a
key="state"
onClick={async () => {
let a = 0;
if (record.status == 0) {
a = 1;
}
setCurrentRow((record.status = a));

await handleUpdate(record).then((r) => {
if (r) {
actionRef.current.reload();
} else {
message.error('配置失败请重试!');
}
});
}}
>
{record.status == 0 ? '停用' : '使用'}
</a>,
<a
key="config"
onClick={() => {
handleModalVisible(true);
setCurrentRow(record);
actionRef.current?.reloadAndRest?.();
}}
>
更新
</a>,
<a
key="config"
onClick={() => {
setactionFormModalVisible(true);
setCurrentRow(record);
actionRef.current?.reloadAndRest?.();
}}
>
模型配置
</a>,
<Popconfirm
type="primary"
key="primary"
title="确认删除吗?"
okText="是"
cancelText="否"
onConfirm={() => {
handleRemove([record.id]);
actionRef.current?.reloadAndRest();
}}
onCancel={() => {}}
>
<a href="#">删除</a>
</Popconfirm>,
],
},
];

return (
<PageContainer>
<ProTable
headerTitle="工艺"
actionRef={actionRef}
rowKey="id"
search={{
labelWidth: 120,
}}
columns={columns}
toolBarRender={() => [
<Button
type="primary"
key="primary"
onClick={() => {
handleModalVisible(true);
setCurrentRow({});
}}
>
<PlusOutlined /> 新建
</Button>,
]}
//数据绑定
request={async (params) => {
var data = [];
var total = 0;
await getGoodstechnologypage(params).then((r) => {
data = r.data.data;
data.forEach((x) => {
x.status = x.status.toString();
});
total = r.data.total;
});
return {
data: data,
success: true,
total: total,
};
}}
// 每行选择点击事件
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
></ProTable>
<CreateForm
onFinish={async (value) => {
var success = false;
if (value.id) {
success = await handleUpdate(value);
} else {
success = await handleAdd(value);
}
if (success) {
handleModalVisible(false);
if (actionRef.current) {
actionRef.current.reload();
}
}
}}
onCancel={() => {
setCurrentRow(undefined);
handleModalVisible(false);
}}
createModalVisible={createModalVisible}
values={currentRow || {}}
/>
<ActionForm actionFormModalVisible={actionFormModalVisible}
values={currentRow || {} }
onCancel={() => {
setCurrentRow(undefined);
setactionFormModalVisible(false);
}}
/>
</PageContainer>
);
};

export default bomtechnology;

+ 8
- 26
src/pages/device/deviceInfo/components/CreateForm.jsx View File

@@ -13,7 +13,7 @@ const CreateForm = (props) => {
useEffect(() => {
console.log(props.values)
if(Object.keys(props.values).length>0){
GetDeviceVesion(props.values.deviceTypeKey).then((res)=>{
GetDeviceVesion(props.values.productId).then((res)=>{
setDeviceVesionData(res.data)
})
}
@@ -70,18 +70,18 @@ const CreateForm = (props) => {
<Input />
</Form.Item>

<Form.Item label={'设备类型'} name="deviceTypeKey" rules={[{ required: true }]}>
<Select onChange={handleChange}>
<Form.Item label={'所属产品'} name="productId" rules={[{ required: true }]}>
<Select onChange={handleChange}>
{props.dicData.map((item, index) => {
return (
<Select.Option index={index} value={item.code} key={item.code}>
{item.value}
<Select.Option index={index} value={item.id} key={item.id}>
{item.label}
</Select.Option>
);
})}
</Select>
</Form.Item>
<Form.Item label={'设备版本'} name="deviceVersionKey" rules={[{ required: true }]}>
<Form.Item label={'产品版本'} name="productVersionId" rules={[{ required: true }]}>
<Select>
{DeviceVesionData.map((item, index) => {
return (
@@ -92,25 +92,7 @@ const CreateForm = (props) => {
})}
</Select>
</Form.Item>
{/* <Form.Item name="orgId" label="归属门店" rules={[{ required: true }]}>
<TreeSelect
style={{ width: '100%' }}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
treeData={props.OrgData}
placeholder="归属门店"
treeDefaultExpandAll
/>
</Form.Item> */}
<Form.Item label={'设备标签'} name="deviceTypeId" rules={[{ required: true }]}>
{/* <Select>
{props.storeType.map((item, index) => {
return (
<Select.Option index={index} value={item.id} key={item.id}>
{item.text}
</Select.Option>
);
})}
</Select> */}
<Form.Item label={'设备标签'} name="deviceTypeId" rules={[{ required: false }]}>
<Select
style={{width: '100%'}}
placeholder="请选设备标签"
@@ -135,7 +117,7 @@ const CreateForm = (props) => {
)}
/>
</Form.Item>
<Form.Item label={'数据支持'} name="technologyOrBom" rules={[{ required: true }]}>
<Form.Item label={'支持功能'} name="technologyOrBom" rules={[{ required: true }]}>
<Radio.Group onChange={onChange} value={value}>
<Radio value={0}>工艺</Radio>
<Radio value={1}>配方</Radio>


+ 64
- 54
src/pages/device/deviceInfo/index.jsx View File

@@ -6,7 +6,7 @@ import ProTable from '@ant-design/pro-table';
import CreateForm from './components/CreateForm';
import {
GetDeviceInfoPage,
GetDicList,
GetProductList,
AddDeviceInfo,
UpdateDeviceInfo,
DelDeviceInfo,
@@ -136,22 +136,23 @@ const GoodsTypeManage = () => {
initOrgList();
initDeviceType();
function intDicData() {
// GetDicList('DeviceClientType').then((r) => {
// var arr = r.data;
// let data = {};
// if (r.succeeded) {
// var list = [];
// arr.forEach((item) => {
// data[item.code] = { text: item.code };
// list.push({
// code: item.code,
// value: item.code,
// });
// });
// setDicDataAny(data);
// setDicData(list);
// }
// });
GetProductList().then((r) => {
var arr = r.data;
let data = {};
if (r.succeeded) {
var list = [];
arr.forEach((item) => {
data[item.name] = { text: item.name };
list.push({
id: item.id,
label: item.name,
text:item.name,
});
});
setDicDataAny(data);
setDicData(list);
}
});
}
intDicData();
initDeviceVersion();
@@ -163,8 +164,8 @@ const GoodsTypeManage = () => {
data.data.forEach((item) => {
list2.push({
label: item.name,
text:item,
id: item.id,
text:item.name,
value: item.id,
});
list[item.id] = { text: item.name };
});
@@ -203,22 +204,31 @@ const GoodsTypeManage = () => {
valueType: 'textarea',
},
{
title: '设备类型',
dataIndex: 'deviceTypeKey',
title: '所属产品',
dataIndex: 'productName',
valueEnum: dicDataAny,
hideInSearch: true,
},
{
title: '设备版本',
dataIndex: 'deviceVersionName',
title: '产品版本',
dataIndex: 'productVersionName',
search: false,
},
{
title: '归属门店',
dataIndex: 'orgId',
title: '支持功能',
dataIndex: 'technologyOrBom',
search: false,
valueEnum: OrgListArray,
valueEnum: {
0: { text: '工艺', },
1: { text: '配方',},
},
},
// {
// title: '归属门店',
// dataIndex: 'orgId',
// search: false,
// valueEnum: OrgListArray,
// },
{
title: '设备标签',
dataIndex: 'deviceTypeId',
@@ -229,8 +239,8 @@ const GoodsTypeManage = () => {
title: '状态',
dataIndex: 'status',
valueEnum: {
0: { text: '正常', status: 'Processing' },
1: { text: '用', status: 'Success' },
0: { text: '启用', status: 'Processing' },
1: { text: '用', status: 'Success' },
},
hideInSearch: true,
},
@@ -239,11 +249,11 @@ const GoodsTypeManage = () => {
dataIndex: 'autoKey',
search: false,
},
{
title: '归属门店唯一key',
dataIndex: 'orgKey',
search: false,
},
// {
// title: '归属门店唯一key',
// dataIndex: 'orgKey',
// search: false,
// },
{
title: '操作',
dataIndex: 'option',
@@ -277,27 +287,27 @@ const GoodsTypeManage = () => {
>
{record.status == 0 ? '停用' : '正常'}
</a>,
<a
key="copy"
onClick={() => {
CopyDevice({ id: record.id }).then((r) => {
if (r.data) {
actionRef.current.reload();
}
});
}}
>
复制
</a>,
<a
key="upload-goods"
onClick={() => {
setCurrentRow(record);
setDeviceFoodModal(true);
}}
>
绑定商品
</a>,
// <a
// key="copy"
// onClick={() => {
// CopyDevice({ id: record.id }).then((r) => {
// if (r.data) {
// actionRef.current.reload();
// }
// });
// }}
// >
// 复制
// </a>,
// <a
// key="upload-goods"
// onClick={() => {
// setCurrentRow(record);
// setDeviceFoodModal(true);
// }}
// >
// 绑定商品
// </a>,
<a
key="add"
onClick={() => {


+ 5
- 5
src/pages/device/deviceInfo/services.js View File

@@ -7,9 +7,9 @@ export async function GetDeviceInfoPage(data) {
data: data,
});
}
/**获取设备类型 */
export async function GetDicList(TypeCode) {
return request(`/saasbase/api/dict-data/dic-list/${TypeCode}`, {
/**获取产品 */
export async function GetProductList() {
return request(`/saasbase/api/product/list`, {
method: 'Get',
});
}
@@ -202,13 +202,13 @@ export async function CheckStockAdjust(data) {
});
}
export async function GetDeviceVesion(TypeCode) {
return request(`/saasbase/api/DeviceVesion/GetDeviceVesion?Code=${TypeCode}`, {
return request(`/saasbase/api/DeviceVesion/GetDeviceVesion?productId=${TypeCode}`, {
method: 'Get',
});
}

export async function TechnologyTemplateExport(data) {
return request(`/saasbase/api/goodes/TechnologyTemplateExport?deviceId=${data}`, {
return request(`/saasbase/api/goods/TechnologyTemplateExport?deviceId=${data}`, {
method: 'post',
// responseType: 'blob'
});


+ 0
- 203
src/pages/device/deviceType/index.jsx View File

@@ -1,203 +0,0 @@

import { Modal,Button, message, } from 'antd';
import React, { useState, useRef } from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import { PlusOutlined } from '@ant-design/icons';
import ProTable from '@ant-design/pro-table';
import CreateForm from './components/CreateForm';
import { GetDeviceTypePage, AddDeviceType, DelDeviceType, UpdateDeviceType, } from "./services"

const key = 'message';

//添加
const handleAdd = async (fields) => {
try {
message.loading('正在添加', key);
await AddDeviceType(JSON.stringify(fields)).then((r) => {
message.destroy(key);
if (r.data) {
message.success('添加成功');
return true;
} else {
message.error('添加失败');
return false;
}
});
} catch (error) {
message.error('添加失败请重试!');
return false;
}
};


//修改
const handleUpdate = async (fields) => {
try {
message.loading('正在修改', key);
message.destroy(key);
await UpdateDeviceType(JSON.stringify(fields)).then((r) => {
message.destroy(key);
if (r.data) {
message.success('修改成功',);
return true;
} else {
message.success('修改失败');
return false;
}
});
} catch (error) {
message.error('修改失败请重试!');
return false;
}
};


//删除
const handleRemove = async (selectedRows) => {
try {
message.loading('正在删除');
let ids = [];
selectedRows.forEach((item) => {
ids.push(item.id);
});
await DelDeviceType(ids).then((r) => {
if (r.data) {
message.success('删除成功');
return true;
} else {
message.error(r.errors);
return false;
}
});
} catch (error) {
message.error('删除失败请重试!');
return false;
}
};

const GoodsTypeManage = () => {
const [createModalVisible, handleModalVisible] = useState(false);
const actionRef = useRef();
const [currentRow, setCurrentRow] = useState();
const [selectedRowsState, setSelectedRows] = useState([]);
const columns = [
{
title: '主键',
dataIndex: 'id',
hideInSearch: true,
hideInTable: true,
tip: '规则名称是唯一的 key'
},
{
title: '类型名称',
dataIndex: 'name',
valueType: 'textarea',
},
{
title: '操作',
dataIndex: 'option',
valueType: 'option',
render: (_, record) => [
<a
key="config"
onClick={() => {
handleModalVisible(true);
setCurrentRow(record);
}} > 更新</a>
],
},
];

return (
<PageContainer>
<ProTable
headerTitle="设备分类"
actionRef={actionRef}
rowKey="id"
search={{
labelWidth: 120,
}}
toolBarRender={() => [
<Button
type="primary"
key="primary"
onClick={() => {
handleModalVisible(true);
}} >
<PlusOutlined /> 新建
</Button>,
]}
request={async (params) => {
var data = [];
var total = 0;
await GetDeviceTypePage(params).then((r) => {
data = r.data.data;
total = r.data.total;
});
return {
data: data,
success: true,
total: total,
};
}}
columns={columns}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
/>
{selectedRowsState?.length > 0 && (
<FooterToolbar
extra={
<div>
已选择{' '}
<a
style={{
fontWeight: 600,
}}
>
{selectedRowsState.length}
</a>{' '}
项 &nbsp;&nbsp;
</div>
}
>
<Button
onClick={async () => {
await handleRemove(selectedRowsState);
setSelectedRows([]);
actionRef.current?.reloadAndRest?.();
}}
>
删除
</Button>
</FooterToolbar>
)}

<CreateForm
onFinish={async (value) => {
var success = false;
if (value.id) {
success = handleUpdate(value);
} else {
success = handleAdd(value);
}
if (success) {
handleModalVisible(false);
setCurrentRow(undefined);
}
actionRef.current.reload();
}}
onCancel={() => {
handleModalVisible(false);
setCurrentRow(undefined);
}}
createModalVisible={createModalVisible}
values={currentRow || {}}
/>
</PageContainer>
);
};

export default GoodsTypeManage;

+ 0
- 43
src/pages/device/deviceType/services.js View File

@@ -1,43 +0,0 @@
import { request } from 'umi';

/** 设备类型列表 */
export async function GetDeviceTypePage(data) {
return request(`/saasbase/api/Device/GetDeviceTypePage`, {
method: 'POST',
data: data,
});
}

/** 添加设备类型 */
export async function AddDeviceType(data) {
return request(`/saasbase/api/Device/AddDeviceType`, {
method: 'POST',
data: data,
// params: { ...params },
// ...(options || {}),
});
}

/** 删除设备类型 */
export async function DelDeviceType(data) {
return request(`​/saasbase/api/Device/DelDeviceType`, {
method: 'POST',
data: data,
});
}

/** 修改设备类型 */
export async function UpdateDeviceType(data) {
return request(`​/saasbase/api/Device/UpdateDeviceType`, {
method: 'POST',
data: data,
});
}

/** 获取所有设备类型 */
export async function GetDeviceType(data) {
return request(`​/saasbase/api/Device/GetDeviceType`, {
method: 'GET',
});
}


+ 3
- 3
src/pages/device/deviceVesion/components/CreateForm.jsx View File

@@ -93,12 +93,12 @@ const CreateForm = (props) => {
<Form.Item label={"版本号"} name="vesion" rules={[{ required: true,max:50}]} >
<Input />
</Form.Item>
<Form.Item label={"设备类型"} name="deviceTypeKey" rules={[{ required: true,max:50}]} >
<Form.Item label={"所属产品"} name="productId" rules={[{ required: true,max:50}]} >
<Select>
{props.dicData.map((item, index) => {
return (
<Select.Option index={index} value={item.code} key={item.code}>
{item.value}
<Select.Option index={index} value={item.id} key={item.id}>
{item.label}
</Select.Option>
);
})}


+ 31
- 19
src/pages/device/deviceVesion/index.jsx View File

@@ -5,7 +5,7 @@ import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import { PlusOutlined } from '@ant-design/icons';
import ProTable from '@ant-design/pro-table';
import CreateForm from './components/CreateForm';
import { GetDeviceVesionPage, AddDeviceVesion, DelDeviceVesion, UpdateDeviceVesion, GetDicList,UpdateStatus } from "./services"
import { GetDeviceVesionPage, AddDeviceVesion, DelDeviceVesion, UpdateDeviceVesion, GetProductList,UpdateStatus } from "./services"

const key = 'message';

@@ -132,10 +132,19 @@ const GoodsTypeManage = () => {
valueType: 'textarea',
},
{
title: '设备类型',
dataIndex: 'deviceTypeKey',
title: '所属产品',
dataIndex: 'productName',
valueType: 'textarea',
},
{
title: '状态',
dataIndex: 'status',
valueEnum: {
0: { text: '启用', status: 'Processing' },
1: { text: '禁用', status: 'Success' },
},
hideInSearch: true,
},
{
title: '是否存在模板',
dataIndex: 'templatePath',
@@ -150,6 +159,8 @@ const GoodsTypeManage = () => {
title: '操作',
dataIndex: 'option',
valueType: 'option',
fixed: 'right',
width: 700,
render: (_, record) => [
<a
key="config"
@@ -199,22 +210,23 @@ const GoodsTypeManage = () => {
},
];
useEffect(() => {
// GetDicList('DeviceClientType').then((r) => {
// var arr = r.data;
// let data = {};
// if (r.succeeded) {
// var list = [];
// arr.forEach((item) => {
// data[item.code] = { text: item.code };
// list.push({
// code: item.code,
// value: item.code,
// });
// });
// //setDicDataAny(data);
// setDictData(list);
// }
// });
GetProductList().then((r) => {
var arr = r.data;
let data = {};
if (r.succeeded) {
var list = [];
arr.forEach((item) => {
data[item.code] = { text: item.code };
list.push({
label: item.name,
text:item.name,
id: item.id,
});
});
//setDicDataAny(data);
setDictData(list);
}
});
}, [])
return (
<PageContainer host header={{


+ 6
- 6
src/pages/device/deviceVesion/services.js View File

@@ -38,12 +38,12 @@ export async function UpdateDeviceVesion(data) {
data: data,
});
}
/**获取设备类型 */
export async function GetDicList(TypeCode) {
return request(`/saasbase/api/dict-data/dic-list/${TypeCode}`, {
method: 'Get',
});
}
/**获取产品 */
export async function GetProductList() {
return request(`/saasbase/api/product/list`, {
method: 'Get',
});
}

export async function GetCosRequestURL(data) {
return request(`/saasbase/api/systemconfig/GetCosRequestSignURL`, {


+ 0
- 89
src/pages/device/devicetechnology/components/CreateForm.jsx View File

@@ -1,89 +0,0 @@
import React, { useState } from 'react';
import { Modal, Form, Input, Button, Select } from 'antd';
import {
GetDeviceVesion
} from '../services';
const CreateForm = (props) => {
const { Option, OptGroup } = Select;
const [DeviceVesionData, setDeviceVesionData] = useState([]);
const handleChange=(value)=>{
GetDeviceVesion(value).then((res)=>{
setDeviceVesionData(res.data)
})
}
return (
<Modal
title={props?.values?.id ? '编辑' : '新建'}
width={640}
visible={props?.createModalVisible}
bodyStyle={{ padding: '32px 40px 48px' }}
footer={null}
onCancel={() => {
props?.onCancel();
}}
destroyOnClose
maskClosable={false}
>
<Form
layout="vertical"
preserve={false}
initialValues={props?.values}
onFinish={props?.onFinish}
>
<Form.Item name="id" hidden={true}>
<Input />
</Form.Item>
<Form.Item name="name" label="工艺名称" rules={[{ required: true, max: 64, whitespace: true }]}>
<Input placeholder="请输入工艺名称" />
</Form.Item>
<Form.Item label={"设备类型"} name="deviceType" rules={[{ required: true,max:50}]} >
<Select onChange={handleChange}>
{props.dicData.map((item, index) => {
return (
<Select.Option index={index} value={item.code} key={item.code}>
{item.value}
</Select.Option>
);
})}
</Select>
</Form.Item>
<Form.Item label={'设备版本'} name="deviceVersionKey" rules={[{ required: true }]}>
<Select>
{DeviceVesionData.map((item, index) => {
return (
<Select.Option index={index} value={item.id} key={item.id}>
{item.vesion}
</Select.Option>
);
})}
</Select>
</Form.Item>
<Form.Item
name="status"
label="状态"
defaultValue={props?.values?.status}
rules={[{ required: true, message: '请选择状态' }]}
>
<Select placeholder="请选择状态">
<Option value="0">正常</Option>
<Option value="1">停用</Option>
</Select>
</Form.Item>
<Form.Item name="foreignKeyRe" label="关联外键" rules={[{ required: false }]}>
<Input placeholder="请输入关联外键" />
</Form.Item>
<Form.Item>
<Button htmlType="button" style={{float:'right',left:10}} onClick={props.onCancel} >
取消
</Button>
<Button type="primary" htmlType="submit" style={{float:'right'}} >
保存
</Button>
</Form.Item>
</Form>
</Modal>
);
};

export default CreateForm;

+ 0
- 61
src/pages/device/devicetechnology/services.js View File

@@ -1,61 +0,0 @@
import { request } from 'umi';

//获取分页数据
export async function getGoodstechnologypage(data) {
return request(`/saasbase/api/goodstechnology/getGoodstechnologypage`, {
method: 'Post',
data: data,
});
}
export async function addgoodstechnology(data) {
return request(`/saasbase/api/goodstechnology/addgoodstechnology`, {
method: 'Post',
data: data,
});
}
export async function updategoodstechnology(data) {
return request(`/saasbase/api/goodstechnology/updategoodstechnology`, {
method: 'Post',
data: data,
});
}
export async function deletegoodstechnology(data) {
return request(`/saasbase/api/goodstechnology/deletegoodstechnology`, {
method: 'Post',
data: data,
});
}
export async function gettechnologyactionList(data) {
return request(`/saasbase/api/goodstechnology/gettechnologyactionList?GoodstechnologyId=`+data, {
method: 'Get',
});
}
export async function addtechnologyaction(data) {
return request(`/saasbase/api/goodstechnology/addtechnologyaction`, {
method: 'Post',
data: data,
});
}
export async function updatetechnologyaction(data) {
return request(`/saasbase/api/goodstechnology/updatetechnologyaction`, {
method: 'Post',
data: data,
});
}
export async function deletetechnologyaction(data) {
return request(`/saasbase/api/goodstechnology/deletetechnologyaction`, {
method: 'Post',
data: data,
});
}
/**获取设备类型 */
export async function GetDicList(TypeCode) {
return request(`/saasbase/api/dict-data/dic-list/${TypeCode}`, {
method: 'Get',
});
}
export async function GetDeviceVesion(TypeCode) {
return request(`/saasbase/api/DeviceVesion/GetDeviceVesion?Code=${TypeCode}`, {
method: 'Get',
});
}

src/pages/device/deviceType/components/CreateForm.jsx → src/pages/device/product/components/CreateForm.jsx View File

@@ -23,10 +23,15 @@ const CreateForm = (props) => {
<Form.Item name="id" hidden={true}>
<Input />
</Form.Item>
<Form.Item label={"类型名称"} name="name" rules={[{ required: true,max:50}]} >
<Form.Item label={"产品名称"} name="name" rules={[{ required: true,max:50}]} >
<Input />
</Form.Item>
<Form.Item label={"产品标签"} name="code" rules={[{ required: true,max:50}]} >
<Input />
</Form.Item>
<Form.Item label={"备注"} name="remark" rules={[{ required: false,max:50}]} >
<Input />
</Form.Item>

<Form.Item>
<Button type="primary" htmlType="submit">
保存

+ 286
- 0
src/pages/device/product/index.jsx View File

@@ -0,0 +1,286 @@

import { Modal,Button, message,Popconfirm } from 'antd';
import React, { useState, useRef } from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import { PlusOutlined } from '@ant-design/icons';
import ProTable from '@ant-design/pro-table';
import CreateForm from './components/CreateForm';
import { GetProductPage, AddProduct, DelProduct, UpdateProduct,UpdateStatus } from "./services"
import { history } from 'umi';
const key = 'message';
const GoodsTypeManage = () => {
const [createModalVisible, handleModalVisible] = useState(false);
const actionRef = useRef();
const [currentRow, setCurrentRow] = useState();
const [selectedRowsState, setSelectedRows] = useState([]);
const columns = [
{
title: '主键',
dataIndex: 'id',
hideInSearch: true,
hideInTable: true,
tip: '规则名称是唯一的 key'
},
{
title: '产品名称',
dataIndex: 'name',
valueType: 'textarea',
},
{
title: '产品标签',
dataIndex: 'code',
valueType: 'textarea',
},
{
title: '产品key',
dataIndex: 'key',
valueType: 'textarea',
},
{
title: '备注',
dataIndex: 'remark',
valueType: 'textarea',
width: 450,
},
{
title: '状态',
dataIndex: 'status',
hideInForm: true,
search: true,
valueEnum: {
0: {
text: '启用',
status: 'Processing',
},
1: {
text: '禁用',
status: 'Success',
},
},
},
{
title: '操作',
dataIndex: 'option',
valueType: 'option',
fixed: 'right',
width: 450,
render: (_, record) => [
<a
key="config"
onClick={() => {
handleModalVisible(true);
setCurrentRow(record);
}} > 更新</a>,
<a
key="status"
onClick={async () => {
actionRef.current.reload();
record.status = record.status ? 0 : 1;

await UpdateStatus(record).then((r) => {
if (r.succeeded) {
message.success('配置成功');
} else {
message.error('配置失败请重试!');
}
});
}}
>
{record.status == 0 ? '禁用' : '启用'}
</a>,
<Popconfirm
type="primary"
key="primary"
title="确认删除吗?"
okText="是"
cancelText="否"
onConfirm={() => {
DelProduct([record.id]).then((r) => {
message.success('删除成功,即将刷新');
actionRef.current.reload();
});
}}
onCancel={() => { }}
>
<a href="#">删除</a>
</Popconfirm>,
<a
key="config"
onClick={() => {
history.push({
pathname: '/device/productmanage',
query: {
isAdd: false,
values: record,
tabStatus: 'basis'
},
});
}} > 管理</a>,
],
},
];
//添加
const handleAdd = async (fields) => {
try {
message.loading('正在添加', key);
await AddProduct(JSON.stringify(fields)).then((r) => {
message.destroy(key);
if (r.succeeded) {
message.success('添加成功');
actionRef.current.reload();
return true;
} else {
message.error(r.errors);
return false;
}
});
} catch (error) {
message.error('添加失败请重试!');
return false;
}
};
//修改
const handleUpdate = async (fields) => {
try {
message.loading('正在修改', key);
message.destroy(key);
await UpdateProduct(JSON.stringify(fields)).then((r) => {
message.destroy(key);
if (r.succeeded) {
message.success('修改成功',);
actionRef.current.reload();
return true;
} else {
message.error(r.errors);
return false;
}
});
} catch (error) {
message.error('修改失败请重试!');
return false;
}
};
//删除
const handleRemove = async (selectedRows) => {
try {
message.loading('正在删除');
let ids = [];
selectedRows.forEach((item) => {
ids.push(item.id);
});
await DelProduct(ids).then((r) => {
if (r.data) {
message.success('删除成功');
actionRef.current.reload();
return true;
} else {
message.error(r.errors);
return false;
}
});
} catch (error) {
message.error('删除失败请重试!');
return false;
}
};
return (
<PageContainer host header={{
title: '',
breadcrumb: {},
}}>
<ProTable
rowKey="id"
pagination={{ defaultPageSize: 10 }}
search={{
labelWidth: 120,
}}
toolBarRender={() => [
<Button
type="primary"
key="primary"
onClick={() => {
handleModalVisible(true);
}} >
<PlusOutlined /> 新建
</Button>,
]}
request={async (params) => {
var data = [];
var total = 0;
await GetProductPage(params).then((r) => {
data = r.data.data;
total = r.data.total;
});
return {
data: data,
success: true,
total: total,
};
}}
columns={columns}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
/>
{selectedRowsState?.length > 0 && (
<FooterToolbar
extra={
<div>
已选择{' '}
<a
style={{
fontWeight: 600,
}}
>
{selectedRowsState.length}
</a>{' '}
项 &nbsp;&nbsp;
</div>
}
>
<Button
onClick={async () => {
await handleRemove(selectedRowsState);
setSelectedRows([]);
actionRef.current?.reloadAndRest?.();
}}
>
删除
</Button>
</FooterToolbar>
)}

<CreateForm
onFinish={async (value) => {
var success = false;
if (value.id) {
success = handleUpdate(value);
} else {
success = handleAdd(value);
}
if (success) {
handleModalVisible(false);
setCurrentRow(undefined);
}
actionRef.current.reload();
}}
onCancel={() => {
handleModalVisible(false);
setCurrentRow(undefined);
}}
createModalVisible={createModalVisible}
values={currentRow || {}}
/>
</PageContainer>
);
};

export default GoodsTypeManage;

+ 44
- 0
src/pages/device/product/services.js View File

@@ -0,0 +1,44 @@
import { request } from 'umi';

/** 产品列表 */
export async function GetProductPage(data) {
return request(`/saasbase/api/product/page`, {
method: 'POST',
data: data,
});
}

/** 添加产品 */
export async function AddProduct(data) {
return request(`/saasbase/api/product/add`, {
method: 'POST',
data: data,
// params: { ...params },
// ...(options || {}),
});
}

/** 删除产品 */
export async function DelProduct(data) {
return request(`​/saasbase/api/product/delete`, {
method: 'POST',
data: data,
});
}

/** 修改产品 */
export async function UpdateProduct(data) {
return request(`​/saasbase/api/product/update`, {
method: 'POST',
data: data,
});
}

/** 更新产品状态 */
export async function UpdateStatus(data) {
return request(`​/saasbase/api/product/updatestatus`, {
method: 'POST',
data: data,
});
}


src/pages/device/devicetechnology/components/ActionForm.jsx → src/pages/device/productmanage/components/ActionForm.jsx View File

@@ -20,26 +20,26 @@ const ActionForm = (props) => {
const [actionValueName,setactionValueName]=useState();
const [createModalVisible, handleModalVisible] = useState(false);
const options = {
text:{value:'text',text: `文本框`},
select:{ value: `select`, text: `下拉框`},
text:{value:'text',text: `text(字符串)`},
select:{ value: `select`, text: `enum(枚举)`},
// money:{ value: `money`, text: `金额输入`},
textarea:{ value: `textarea`, text: `文本域`},
textarea:{ value: `textarea`, text: `text(文本域)`},
// date:{ value: `date`, text: `日期`},
// dateTime:{ value: `dateTime`, text: `日期时间`},
// radio:{ value: `radio`, text: `单选框`},
// radioButton:{ value: `radioButton`, text: `按钮单选框`},
digit:{ value: `digit`, text: `数字输入框`},
switch:{ value: `switch`, text: `开关`},
digit:{ value: `digit`, text: `int32(整型)`},
switch:{ value: `switch`, text: `bool(布尔型)`},
}
const columns= [
{
title: '模型名称',
title: '参数名称',
dataIndex: 'actionName',
width: '15%',
},
{
title: '输入类型',
title: '数据类型',
key: 'actionType',
dataIndex: 'actionType',
valueType: 'select',
@@ -162,7 +162,7 @@ const ActionForm = (props) => {
return (
<>
<Modal
title={'模型配置'}
title={'参数配置'}
width={1140}
visible={props?.actionFormModalVisible}
bodyStyle={{ padding: '32px 40px 1px 48px' }}
@@ -174,7 +174,7 @@ const ActionForm = (props) => {
maskClosable={false}
>
<ProTable rowKey="id"
headerTitle="模型配置列表"
headerTitle="参数配置列表"
actionRef={actionRef}
pagination={false}
search={false}
@@ -210,7 +210,7 @@ const ActionForm = (props) => {
var success = false;
console.log(value)
console.log(value.actionValue)
value.goodstechnologyId=props.values.id;
value.productFunctionId=props.values.id;
if (value.id) {
success = await handleUpdate(value);

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

Loading…
Cancel
Save