Browse Source

Merge branch 'deploy' of chelingzhu-web/zxyj-admin-html into master

lilei 4 years ago
parent
commit
5d9c9641d4
98 changed files with 9964 additions and 5522 deletions
  1. 2 2
      .env
  2. 1 1
      .env.development
  3. 2 2
      .env.preview
  4. 210 28
      package-lock.json
  5. 5 3
      package.json
  6. 1 1
      public/index.html
  7. 2 2
      src/App.vue
  8. 37 0
      src/api/address.js
  9. 15 5
      src/api/bannerSetting.js
  10. 50 0
      src/api/boxSetting.js
  11. 54 0
      src/api/businessManage.js
  12. 60 0
      src/api/device.js
  13. 50 0
      src/api/exchangeSetting.js
  14. 68 0
      src/api/goods.js
  15. 43 0
      src/api/goodsType.js
  16. 50 0
      src/api/openTimeSetting.js
  17. 53 0
      src/api/order.js
  18. 2 2
      src/api/power-user.js
  19. 32 0
      src/api/releaseRecord.js
  20. 89 0
      src/api/shopSetting.js
  21. 59 0
      src/api/station.js
  22. 43 0
      src/api/supplier.js
  23. 3 3
      src/api/tenants.js
  24. 73 0
      src/api/userInfo.js
  25. 76 0
      src/api/userManage.js
  26. 8 1
      src/components/UploadFile/index.vue
  27. 1 1
      src/components/global.less
  28. 322 180
      src/config/router.config.js
  29. 71 61
      src/libs/getDate.js
  30. 3 0
      src/main.js
  31. 41 43
      src/permission.js
  32. 1 0
      src/store/getters.js
  33. 10 10
      src/store/modules/permission.js
  34. 6 0
      src/store/modules/user.js
  35. 1 1
      src/utils/domUtil.js
  36. 1 1
      src/utils/request.js
  37. 16 1
      src/utils/util.js
  38. 36 5
      src/views/Home.vue
  39. 0 266
      src/views/appSetting/addEditionSetting.vue
  40. 0 386
      src/views/appSetting/bannerSetting.vue
  41. 0 140
      src/views/appSetting/editionSetting.vue
  42. 0 468
      src/views/bnSetting/menu/adminMenus.vue
  43. 0 344
      src/views/bnSetting/menu/childModal.vue
  44. 0 505
      src/views/bnSetting/menu/storeMenus.vue
  45. 0 156
      src/views/bnSetting/menusAuth.vue
  46. 0 41
      src/views/bnSetting/menusAuthTab.vue
  47. 149 0
      src/views/businessManage/partnerManage/addPartnerModal.vue
  48. 287 0
      src/views/businessManage/partnerManage/partnerManage.vue
  49. 344 0
      src/views/businessManage/userManage/userManage.vue
  50. 369 0
      src/views/businessManage/userManage/userModal.vue
  51. 263 0
      src/views/equipmentManage/boxSetting/AddBoxModal.vue
  52. 282 0
      src/views/equipmentManage/boxSetting/boxSetting.vue
  53. 172 0
      src/views/equipmentManage/equipment/equipment.vue
  54. 165 0
      src/views/equipmentManage/equipment/logModal.vue
  55. 318 0
      src/views/equipmentManage/exchangeSetting/AddSetModal.vue
  56. 310 0
      src/views/equipmentManage/exchangeSetting/ExchangeSetting.vue
  57. 212 0
      src/views/equipmentManage/network/detailsModal.vue
  58. 270 0
      src/views/equipmentManage/network/editModal.vue
  59. 340 0
      src/views/equipmentManage/network/equipmentModal.vue
  60. 248 0
      src/views/equipmentManage/network/network.vue
  61. 248 0
      src/views/equipmentManage/openTimeSetting/AddTimeModal.vue
  62. 202 0
      src/views/equipmentManage/openTimeSetting/OpenTimeSetting.vue
  63. 0 173
      src/views/evaluation/evaluationItem/AddEvaIndexModal.vue
  64. 0 213
      src/views/evaluation/evaluationItem/AddEvaItemModal.vue
  65. 0 265
      src/views/evaluation/evaluationItem/EvaluationItem.vue
  66. 0 172
      src/views/evaluation/evaluationItem/SetEvaItemModal.vue
  67. 0 253
      src/views/evaluation/evaluationPlan/AddEvaModal.vue
  68. 0 317
      src/views/evaluation/evaluationPlan/EvaluationPlan.vue
  69. 0 244
      src/views/evaluation/evaluationPlan/SetEvaDefaultModal.vue
  70. 0 393
      src/views/evaluation/evaluationPlan/SetEvaModal.vue
  71. 18 12
      src/views/power/OperateJournal/OperateJournal.vue
  72. 25 6
      src/views/power/menu/menu.vue
  73. 15 7
      src/views/power/role/roleList.vue
  74. 18 10
      src/views/power/user/userList.vue
  75. 312 0
      src/views/releaseRecord/releaseRecordList.vue
  76. 121 0
      src/views/shop/GoodsLogistics.vue
  77. 145 0
      src/views/shop/GoodsOrder.vue
  78. 489 0
      src/views/shop/bannerSetting.vue
  79. 278 0
      src/views/shop/goodsEdit.vue
  80. 238 0
      src/views/shop/goodsList.vue
  81. 189 0
      src/views/shop/goodsShelves.vue
  82. 177 0
      src/views/shop/orderDetail.vue
  83. 242 0
      src/views/shop/shopOrder.vue
  84. 183 0
      src/views/shopSetting/addGoodsClassModal.vue
  85. 172 0
      src/views/shopSetting/addSupplierModal.vue
  86. 253 0
      src/views/shopSetting/goodsClass.vue
  87. 231 0
      src/views/shopSetting/supplier.vue
  88. 0 253
      src/views/tenants/tenantsList.vue
  89. 0 397
      src/views/tenants/tenantsModal.vue
  90. 8 145
      src/views/user/ChangePwd.vue
  91. 1 1
      src/views/user/Login.vue
  92. 155 0
      src/views/user/ResetPwd.vue
  93. 177 0
      src/views/userInfo/LdDetails.vue
  94. 157 0
      src/views/userInfo/editLdNumModal.vue
  95. 95 0
      src/views/userInfo/editUserPhoneModal.vue
  96. 132 0
      src/views/userInfo/userDetails.vue
  97. 355 0
      src/views/userInfo/userManageList.vue
  98. 2 2
      vue.config.js

+ 2 - 2
.env

@@ -1,5 +1,5 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=false
-VUE_APP_API_BASE_URL=https://aitour-it.zyucgj.com/at-it
+VUE_APP_API_BASE_URL=https://lese.sxzxyj.net/gc-admin
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=智能巡店IT后台
+VUE_APP_PRO_NAME=智享亿家后台

+ 1 - 1
.env.development

@@ -2,4 +2,4 @@ NODE_ENV=development
 VUE_APP_PREVIEW=true
 VUE_APP_API_BASE_URL=/api
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=智能巡店IT后台-dev
+VUE_APP_PRO_NAME=智享亿家后台-dev

+ 2 - 2
.env.preview

@@ -1,5 +1,5 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=true
-VUE_APP_API_BASE_URL=https://aitour-it.test.zyucgj.com/at-it
+VUE_APP_API_BASE_URL=https://lese.test.sxzxyj.net/gc-admin
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=智能巡店IT后台-pro
+VUE_APP_PRO_NAME=智享亿家后台-pro

+ 210 - 28
package-lock.json

@@ -1,6 +1,6 @@
 {
-  "name": "chelingzhu",
-  "version": "2.0.0",
+  "name": "zxyj",
+  "version": "1.0.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -2329,9 +2329,9 @@
       "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
     },
     "ant-design-vue": {
-      "version": "1.6.5",
-      "resolved": "https://registry.npmjs.org/ant-design-vue/-/ant-design-vue-1.6.5.tgz",
-      "integrity": "sha512-FzLrK+JuJUq+g4vd+UjFFi13ZdSsb11EZFapisFXilJxpc1LxqyunZu5AP4nr9vFLs3J4UX2A6q+Rp/Fi6JrLg==",
+      "version": "1.7.1",
+      "resolved": "https://registry.npmjs.org/ant-design-vue/-/ant-design-vue-1.7.1.tgz",
+      "integrity": "sha512-oJizjG2qzt7yKDm9Jnm9DzNWW76+WHDUsy0bgpHnydv21aZW4DBGWE669XR7+w3XHGRV7BQlYKkvqWo97uyHZQ==",
       "requires": {
         "@ant-design/icons": "^2.1.1",
         "@ant-design/icons-vue": "^2.0.0",
@@ -3147,8 +3147,7 @@
     "base64-js": {
       "version": "1.3.1",
       "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
-      "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==",
-      "dev": true
+      "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
     },
     "batch": {
       "version": "0.6.1",
@@ -3441,11 +3440,29 @@
         }
       }
     },
+    "buffer-alloc": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
+      "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
+      "requires": {
+        "buffer-alloc-unsafe": "^1.1.0",
+        "buffer-fill": "^1.0.0"
+      }
+    },
+    "buffer-alloc-unsafe": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
+      "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
+    },
+    "buffer-fill": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
+      "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
+    },
     "buffer-from": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
-      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
-      "dev": true
+      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
     },
     "buffer-indexof": {
       "version": "1.1.1",
@@ -3656,6 +3673,11 @@
       "integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==",
       "dev": true
     },
+    "china-division": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/china-division/-/china-division-2.3.1.tgz",
+      "integrity": "sha512-mOfLagVRZ+lRmbIIZ0sci0+9Sr+uGyPCp9an4Orov2KxLf3DGSB/4qyao/jy3pegW4Weppvh0yzGfs+dAPJA7A=="
+    },
     "chokidar": {
       "version": "2.1.8",
       "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
@@ -4074,7 +4096,6 @@
       "version": "1.9.3",
       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
       "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
-      "dev": true,
       "requires": {
         "color-name": "1.1.3"
       }
@@ -4082,8 +4103,7 @@
     "color-name": {
       "version": "1.1.3",
       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
-      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
-      "dev": true
+      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
     },
     "color-string": {
       "version": "1.5.3",
@@ -5478,6 +5498,11 @@
         "randombytes": "^2.0.0"
       }
     },
+    "dijkstrajs": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.1.tgz",
+      "integrity": "sha1-082BIh4+pAdCz83lVtTpnpjdxxs="
+    },
     "dir-glob": {
       "version": "2.2.2",
       "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
@@ -5739,8 +5764,7 @@
     "emoji-regex": {
       "version": "7.0.3",
       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
-      "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
-      "dev": true
+      "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
     },
     "emojis-list": {
       "version": "2.1.0",
@@ -8566,8 +8590,7 @@
     "ieee754": {
       "version": "1.1.13",
       "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
-      "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
-      "dev": true
+      "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
     },
     "iferr": {
       "version": "0.1.5",
@@ -8975,8 +8998,7 @@
     "is-fullwidth-code-point": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
-      "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
-      "dev": true
+      "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
     },
     "is-generator-fn": {
       "version": "1.0.0",
@@ -12717,8 +12739,7 @@
     "path-exists": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
-      "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
-      "dev": true
+      "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
     },
     "path-is-absolute": {
       "version": "1.0.1",
@@ -12880,6 +12901,11 @@
       "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==",
       "dev": true
     },
+    "pngjs": {
+      "version": "3.4.0",
+      "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
+      "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w=="
+    },
     "point-at-length": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/point-at-length/-/point-at-length-1.0.2.tgz",
@@ -13807,6 +13833,166 @@
       "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
       "dev": true
     },
+    "qrcode": {
+      "version": "1.4.4",
+      "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.4.4.tgz",
+      "integrity": "sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==",
+      "requires": {
+        "buffer": "^5.4.3",
+        "buffer-alloc": "^1.2.0",
+        "buffer-from": "^1.1.1",
+        "dijkstrajs": "^1.0.1",
+        "isarray": "^2.0.1",
+        "pngjs": "^3.3.0",
+        "yargs": "^13.2.4"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
+        },
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "buffer": {
+          "version": "5.7.1",
+          "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+          "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+          "requires": {
+            "base64-js": "^1.3.1",
+            "ieee754": "^1.1.13"
+          }
+        },
+        "camelcase": {
+          "version": "5.3.1",
+          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+          "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
+        },
+        "cliui": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
+          "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
+          "requires": {
+            "string-width": "^3.1.0",
+            "strip-ansi": "^5.2.0",
+            "wrap-ansi": "^5.1.0"
+          }
+        },
+        "find-up": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+          "requires": {
+            "locate-path": "^3.0.0"
+          }
+        },
+        "get-caller-file": {
+          "version": "2.0.5",
+          "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+          "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
+        },
+        "isarray": {
+          "version": "2.0.5",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+          "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="
+        },
+        "locate-path": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+          "requires": {
+            "p-locate": "^3.0.0",
+            "path-exists": "^3.0.0"
+          }
+        },
+        "p-limit": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+          "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+          "requires": {
+            "p-try": "^2.0.0"
+          }
+        },
+        "p-locate": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+          "requires": {
+            "p-limit": "^2.0.0"
+          }
+        },
+        "p-try": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+          "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
+        },
+        "require-main-filename": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+          "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
+        },
+        "string-width": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+          "requires": {
+            "emoji-regex": "^7.0.1",
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^5.1.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+          "requires": {
+            "ansi-regex": "^4.1.0"
+          }
+        },
+        "wrap-ansi": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
+          "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
+          "requires": {
+            "ansi-styles": "^3.2.0",
+            "string-width": "^3.0.0",
+            "strip-ansi": "^5.0.0"
+          }
+        },
+        "yargs": {
+          "version": "13.3.2",
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
+          "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
+          "requires": {
+            "cliui": "^5.0.0",
+            "find-up": "^3.0.0",
+            "get-caller-file": "^2.0.1",
+            "require-directory": "^2.1.1",
+            "require-main-filename": "^2.0.0",
+            "set-blocking": "^2.0.0",
+            "string-width": "^3.0.0",
+            "which-module": "^2.0.0",
+            "y18n": "^4.0.0",
+            "yargs-parser": "^13.1.2"
+          }
+        },
+        "yargs-parser": {
+          "version": "13.1.2",
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
+          "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
+          "requires": {
+            "camelcase": "^5.0.0",
+            "decamelize": "^1.2.0"
+          }
+        }
+      }
+    },
     "qs": {
       "version": "6.5.2",
       "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
@@ -14255,8 +14441,7 @@
     "require-directory": {
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
-      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
-      "dev": true
+      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
     },
     "require-main-filename": {
       "version": "1.0.1",
@@ -14673,8 +14858,7 @@
     "set-blocking": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
-      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
-      "dev": true
+      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
     },
     "set-value": {
       "version": "2.0.1",
@@ -17167,8 +17351,7 @@
     "which-module": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
-      "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
-      "dev": true
+      "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
     },
     "window-size": {
       "version": "0.1.0",
@@ -17276,8 +17459,7 @@
     "y18n": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
-      "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
-      "dev": true
+      "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
     },
     "yallist": {
       "version": "3.1.1",

+ 5 - 3
package.json

@@ -1,6 +1,6 @@
 {
-  "name": "chelingzhu",
-  "version": "2.0.0",
+  "name": "zxyj",
+  "version": "1.0.0",
   "private": true,
   "scripts": {
     "serve": "vue-cli-service serve",
@@ -15,8 +15,9 @@
   },
   "dependencies": {
     "@antv/data-set": "^0.10.2",
-    "ant-design-vue": "^1.6.5",
+    "ant-design-vue": "^1.7.1",
     "axios": "^0.19.0",
+    "china-division": "^2.3.1",
     "core-js": "2.6.9",
     "enquire.js": "^2.1.6",
     "lodash.get": "^4.4.2",
@@ -25,6 +26,7 @@
     "mockjs2": "1.0.7",
     "moment": "^2.24.0",
     "nprogress": "^0.2.0",
+    "qrcode": "^1.4.4",
     "v-runtime-template": "^1.10.0",
     "viser-vue": "^2.4.6",
     "vue": "^2.6.10",

+ 1 - 1
public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>logo.png">
-    <title>智能巡店IT后台</title>
+    <title>智享亿家运营后台</title>
     <style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style>
     <!-- require cdn assets css -->
     <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>

+ 2 - 2
src/App.vue

@@ -1,9 +1,9 @@
 <template>
-  <a-locale-provider :locale="locale">
+  <a-config-provider :locale="locale">
     <div id="app">
       <router-view/>
     </div>
-  </a-locale-provider>
+  </a-config-provider>
 </template>
 
 <script>

+ 37 - 0
src/api/address.js

@@ -0,0 +1,37 @@
+import provinces from 'china-division/dist/provinces.json'
+import cities from 'china-division/dist/cities.json'
+import areas from 'china-division/dist/areas.json'
+
+areas.forEach((area) => {
+  const matchCity = cities.filter(city => city.code === area.cityCode)[0]
+  if (matchCity) {
+    matchCity.children = matchCity.children || []
+    matchCity.children.push({
+      label: area.name,
+      value: area.code
+    })
+  }
+})
+
+cities.forEach((city) => {
+  const matchProvince = provinces.filter(province => province.code === city.provinceCode)[0]
+  if (matchProvince) {
+    matchProvince.children = matchProvince.children || []
+    matchProvince.children.push({
+      label: city.name,
+      value: city.code,
+      children: city.children
+    })
+  }
+})
+
+const options = provinces.map(province => ({
+  label: province.name,
+  value: province.code,
+  children: province.children
+}))
+export const province = provinces
+export const city = cities
+export const area = areas
+
+export default options

+ 15 - 5
src/api/bannerSetting.js

@@ -1,8 +1,8 @@
 import { axios } from '@/utils/request'
 
 // 列表查询
-export const getBannerSettingList = (params) => {
-  const url = `banner/query`
+export const getadvertSettingList = (params) => {
+  const url = `advert/query/${params.pageNo}/${params.pageSize}`
   return axios({
     url: url,
     data: params,
@@ -10,9 +10,19 @@ export const getBannerSettingList = (params) => {
   })
 }
 
+// 上移下移
+export const changeSort = (params) => {
+  const url = `/advert/setSort/${params.id}/${params.sortId}`
+  return axios({
+    url: url,
+    data: {},
+    method: 'get'
+  })
+}
+
 // 更改状态
 export const changeStatus = (params) => {
-  const url = `banner/enable/${params.id}/${params.flag}`
+  const url = `advert/enable/${params.id}/${params.flag}`
   return axios({
     url: url,
     data: {},
@@ -22,7 +32,7 @@ export const changeStatus = (params) => {
 
 // 确认保存
 export const saveItem = (params) => {
-  const url = `banner/save`
+  const url = `advert/save`
   return axios({
     url: url,
     data: params,
@@ -32,7 +42,7 @@ export const saveItem = (params) => {
 
 // 删除
 export const deleteItem = (params) => {
-  const url = `banner/del/${params.id}`
+  const url = `advert/delete/${params.id}`
   return axios({
     url: url,
     data: {},

+ 50 - 0
src/api/boxSetting.js

@@ -0,0 +1,50 @@
+import { axios } from '@/utils/request'
+
+// 列表查询
+export const getBoxList = (params) => {
+  const url = `deviceType/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 查箱体类型列表  不分页
+export const deviceTypeListQuery = (params) => {
+  return axios.request({
+    url: `/deviceType/queryList`,
+    method: 'post',
+    data: params
+  })
+}
+// 确认保存
+export const saveBoxSetting = (params) => {
+  const url = `deviceType/save`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 查详情
+export const viewBoxSetting = (params) => {
+  const url = `deviceType/findById/${params.id}`
+  return axios({
+    url: url,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 删除
+export const deleteBoxSetting = (params) => {
+  const url = `deviceType/delete/${params.id}`
+  return axios({
+    url: url,
+    data: {},
+    method: 'get'
+  })
+}

+ 54 - 0
src/api/businessManage.js

@@ -0,0 +1,54 @@
+import { axios } from '@/utils/request'
+
+/* 商品分类 */
+
+// 列表
+export const getSellerList = (params) => {
+  const url = `seller/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 启用禁用
+export const changeSellerStatus = (params) => {
+  const url = `seller/enable/${params.id}/${params.flag}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}
+
+// 查看编辑
+export const SellerDetails = (params) => {
+  const url = `seller/findById/${params.id}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}
+
+// 编辑/保存
+export const saveSeller = (params) => {
+  const url = `seller/save`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 获取网点小程序码
+export const sellerQrCode = params => {
+  const url = `seller/qrCode/${params.officialPartnerNo}`
+  return axios.request({
+    url: url,
+    method: 'get'
+  })
+}

+ 60 - 0
src/api/device.js

@@ -0,0 +1,60 @@
+import { axios } from '@/utils/request'
+
+// 设备列表
+export const deviceList = (params) => {
+  const url = `/device/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 查设备列表  不分页
+export const deviceListQuery = (params) => {
+  return axios.request({
+    url: `/device/query`,
+    method: 'post',
+    data: params
+  })
+}
+// 设备启禁用   0禁用   1启用
+export const deviceEnable = (params) => {
+  return axios.request({
+    url: `/device/enable/${params.id}/${params.state}`,
+    method: 'get'
+  })
+}
+// 设备更换箱体类型
+export const deviceTypeUpdate = (params) => {
+  return axios.request({
+    url: `/device/enable/${params.id}/${params.deviceTypeNo}`,
+    method: 'get'
+  })
+}
+// 根据设备编号查询设备
+export const deviceFindDevice = (params) => {
+  return axios.request({
+    url: `/device/findBySrcDeviceNo/${params.srcDeviceCode}`,
+    method: 'get'
+  })
+}
+// 设备更换箱体类型
+export const deviceUpdateDeviceType = (params) => {
+  return axios.request({
+    url: `/device/updateDeviceType/${params.id}/${params.deviceTypeNo}`,
+    method: 'get'
+  })
+}
+// 设备日志列表
+export const deviceLogList = (params) => {
+  const url = `/deviceLog/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 50 - 0
src/api/exchangeSetting.js

@@ -0,0 +1,50 @@
+import { axios } from '@/utils/request'
+
+// 列表查询
+export const getList = (params) => {
+  const url = `goldEx/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 查兑换列表  不分页
+export const goldExListQuery = (params) => {
+  return axios.request({
+    url: `/goldEx/queryList`,
+    method: 'post',
+    data: params
+  })
+}
+// 确认保存
+export const saveExchangeSetting = (params) => {
+  const url = `goldEx/save`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 查详情
+export const viewExchangeSetting = (params) => {
+  const url = `goldEx/findById/${params.id}`
+  return axios({
+    url: url,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 删除
+export const deleteExchangeSetting = (params) => {
+  const url = `goldEx/delete/${params.id}`
+  return axios({
+    url: url,
+    data: {},
+    method: 'get'
+  })
+}

+ 68 - 0
src/api/goods.js

@@ -0,0 +1,68 @@
+import { axios } from '@/utils/request'
+
+// 商品列表
+export const goodsList = (params) => {
+  const url = `/goods/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 查分类商品列表  不分页
+export const goodsListQuery = (params) => {
+  const url = `/goods/queryList`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 保存商品
+export const goodsSave = (params) => {
+  return axios.request({
+    url: '/goods/save',
+    data: params,
+    method: 'post'
+  })
+}
+// 商品排序
+export const goodsUpdateSort = (params) => {
+  return axios.request({
+    url: '/goods/updateSort',
+    data: params,
+    method: 'post'
+  })
+}
+// 商品详情
+export const goodsFind = (params) => {
+  return axios.request({
+    url: `/goods/findById/${params.id}`,
+    method: 'get'
+  })
+}
+// 商品删除
+export const goodsDel = (params) => {
+  return axios.request({
+    url: `/goods/delete/${params.id}`,
+    method: 'get'
+  })
+}
+// 商品上下架
+export const goodsState = (params) => {
+  return axios.request({
+    url: `/goods/updateState/${params.id}/${params.state}`,
+    method: 'get'
+  })
+}
+
+// 查询商品分类(不分页)
+export const goodsType = (params) => {
+  return axios.request({
+    url: `/goodsType/queryList`,
+    method: 'post',
+    data: params
+  })
+}

+ 43 - 0
src/api/goodsType.js

@@ -0,0 +1,43 @@
+import { axios } from '@/utils/request'
+
+// 商品分类列表
+export const goodsTypeList = (params) => {
+  const url = `/goodsType/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 商品分类列表 - 不分页
+export const goodsTypeQueryList = (params) => {
+  return axios.request({
+    url: '/goodsType/queryList',
+    data: params,
+    method: 'post'
+  })
+}
+// 保存商品分类
+export const goodsTypeSave = (params) => {
+  return axios.request({
+    url: '/goodsType/save',
+    data: params,
+    method: 'post'
+  })
+}
+// 商品分类详情
+export const goodsTypeFind = (params) => {
+  return axios.request({
+    url: `/goodsType/findById/${params.id}`,
+    method: 'get'
+  })
+}
+// 商品分类启禁用
+export const goodsTypeEnable = (params) => {
+  return axios.request({
+    url: `/goodsType/enable/${params.id}/${params.flag}`,
+    method: 'get'
+  })
+}

+ 50 - 0
src/api/openTimeSetting.js

@@ -0,0 +1,50 @@
+import { axios } from '@/utils/request'
+
+// 列表查询
+export const getList = (params) => {
+  const url = `deliveryTime/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 查投放时间规则列表  不分页
+export const deliveryTimeListQuery = (params) => {
+  return axios.request({
+    url: `/deliveryTime/queryList`,
+    method: 'post',
+    data: params
+  })
+}
+// 确认保存
+export const saveTimeSetting = (params) => {
+  const url = `deliveryTime/save`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 查详情
+export const viewTimeSetting = (params) => {
+  const url = `deliveryTime/findById/${params.id}`
+  return axios({
+    url: url,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 删除
+export const deleteTimeSetting = (params) => {
+  const url = `deliveryTime/delete/${params.id}`
+  return axios({
+    url: url,
+    data: {},
+    method: 'get'
+  })
+}

+ 53 - 0
src/api/order.js

@@ -0,0 +1,53 @@
+import { axios } from '@/utils/request'
+
+// 订单列表
+export const orderList = (params) => {
+  const url = `/order/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 订单详情
+export const orderFind = (params) => {
+  return axios.request({
+    url: `/order/findById/${params.id}`,
+    method: 'get'
+  })
+}
+//  根据供应商查订单
+export const offPartnerOrderFind = (params) => {
+  return axios.request({
+    url: '/offPartnerOrder/findByGroupExpress',
+    data: params,
+    method: 'post'
+  })
+}
+//  填写物流信息
+export const orderExpressSend = (params) => {
+  return axios.request({
+    url: '/orderExpress/sendExpress',
+    data: params,
+    method: 'post'
+  })
+}
+//  快递公司
+export const expressCompanyQuery = (params) => {
+  return axios.request({
+    url: '/expressCompany/query',
+    data: params,
+    method: 'post'
+  })
+}
+//  导出
+export const orderExport = (params) => {
+  return axios.request({
+    url: '/order/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 2 - 2
src/api/power-user.js

@@ -3,7 +3,7 @@ import { axios } from '@/utils/request'
 // 重置密码
 export const resetPSD = params => {
   return axios({
-    url: '/user/resetPwd',
+    url: `/zxyj/user/resetPwd`,
     data: params,
     method: 'POST'
   })
@@ -55,4 +55,4 @@ export const getRoleList = params => {
     data: params,
     method: 'POST'
   })
-}
+}

+ 32 - 0
src/api/releaseRecord.js

@@ -0,0 +1,32 @@
+import { axios } from '@/utils/request'
+
+// 列表
+export const getDeliveryLogList = (params) => {
+  const url = `deliveryLog/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 合计
+export const getDeliveryLogTotal = (params) => {
+  const url = `deliveryLog/total`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 网点名称
+export const stationList = params => {
+  return axios.request({
+    url: `/station/queryList`,
+    method: 'post',
+    data: {}
+  })
+}

+ 89 - 0
src/api/shopSetting.js

@@ -0,0 +1,89 @@
+import { axios } from '@/utils/request'
+
+/* 商品分类 */
+
+// 列表
+export const getGoodsClassList = (params) => {
+  const url = `goodsType/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 启用禁用
+export const changeGoodsStatus = (params) => {
+  const url = `goodsType/enable/${params.id}/${params.flag}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}
+
+// 详情
+export const goodsClassDetails = (params) => {
+  const url = `goodsType/findById/${params.id}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}
+
+// 编辑/保存
+export const saveGoodsClass = (params) => {
+  const url = `goodsType/save`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+/* 供货商管理 */
+
+// 列表
+export const getSupplierList = (params) => {
+  const url = `supplier/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 启用禁用
+export const changeSupplierStatus = (params) => {
+  const url = `supplier/enable/${params.id}/${params.flag}`
+  return axios({
+    url: url,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 详情
+export const supplierDetails = (params) => {
+  const url = `supplier/findById/${params.id}`
+  return axios({
+    url: url,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 编辑/保存
+export const saveSupplier = (params) => {
+  const url = `supplier/save`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 59 - 0
src/api/station.js

@@ -0,0 +1,59 @@
+import { axios } from '@/utils/request'
+
+// 网点列表
+export const stationList = (params) => {
+  const url = `/station/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 查网点列表  不分页
+export const stationListQuery = (params) => {
+  return axios.request({
+    url: `/station/queryList`,
+    method: 'post',
+    data: params
+  })
+}
+// 网点详情
+export const stationFind = (params) => {
+  return axios.request({
+    url: `/station/findById/${params.id}`,
+    method: 'get'
+  })
+}
+// 网点保存
+export const stationSave = (params) => {
+  return axios.request({
+    url: '/station/save',
+    data: params,
+    method: 'post'
+  })
+}
+// 网点删除
+export const stationDel = (params) => {
+  return axios.request({
+    url: `/station/delete/${params.id}`,
+    method: 'get'
+  })
+}
+// 设备绑定
+export const stationBind = (params) => {
+  return axios.request({
+    url: `/station/binding`,
+    method: 'post',
+    data: params
+  })
+}
+// 设备解绑
+export const stationUnBind = (params) => {
+  return axios.request({
+    url: `/station/remBinding`,
+    method: 'post',
+    data: params
+  })
+}

+ 43 - 0
src/api/supplier.js

@@ -0,0 +1,43 @@
+import { axios } from '@/utils/request'
+
+// 供应商列表
+export const supplierList = (params) => {
+  const url = `/supplier/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 供应商列表 - 不分页
+export const supplierQueryList = (params) => {
+  return axios.request({
+    url: '/supplier/queryList',
+    data: params,
+    method: 'post'
+  })
+}
+// 保存供应商
+export const supplierSave = (params) => {
+  return axios.request({
+    url: '/supplier/save',
+    data: params,
+    method: 'post'
+  })
+}
+// 供应商详情
+export const supplierFind = (params) => {
+  return axios.request({
+    url: `/supplier/findById/${params.id}`,
+    method: 'get'
+  })
+}
+// 供应商启禁用
+export const supplierEnable = (params) => {
+  return axios.request({
+    url: `/supplier/enable/${params.id}/${params.flag}`,
+    method: 'get'
+  })
+}

+ 3 - 3
src/api/tenants.js

@@ -43,7 +43,7 @@ export const getProvince = () => {
     url: `/area/PROVINCE`,
     headers: {
       'USER-TERM-TYPE': 'pc',
-      'App-Type': 2
+      'App-Type': 9
     },
     method: 'get'
   })
@@ -54,7 +54,7 @@ export const getCityByPro = params => {
     url: `/area/CITY/${params.id}`,
     headers: {
       'USER-TERM-TYPE': 'pc',
-      'App-Type': 2
+      'App-Type': 9
     },
     method: 'get'
   })
@@ -65,7 +65,7 @@ export const getDistrictByCity = params => {
     url: `/area/DISTRICT/${params.id}`,
     headers: {
       'USER-TERM-TYPE': 'pc',
-      'App-Type': 2
+      'App-Type': 9
     },
     method: 'get'
   })

+ 73 - 0
src/api/userInfo.js

@@ -0,0 +1,73 @@
+import { axios } from '@/utils/request'
+
+/* 用户管理 */
+
+// 用户列表
+export const customerList = (params) => {
+  const url = `customer/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 启用禁用
+export const changeStatus = (params) => {
+  const url = `customer/enable/${params.id}/${params.state}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}
+
+// 用户详情
+export const customerDetails = (params) => {
+  const url = `customer/findById/${params.id}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}
+
+// 导出
+export const customeExport = (params) => {
+  return axios({
+    url: `customer/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 乐豆详情
+export const customerGoldLogDetail = (params) => {
+  const url = `customerGoldLog/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 修改乐豆余额
+export const updateGold = (params) => {
+  return axios({
+    url: `customer/updateGold`,
+    data: params,
+    method: 'post'
+  })
+}
+// 修改手机号码
+export const updateMobile = (params) => {
+  return axios({
+    url: `customer/updateMobile`,
+    data: params,
+    method: 'post'
+  })
+}

+ 76 - 0
src/api/userManage.js

@@ -0,0 +1,76 @@
+import { axios } from '@/utils/request'
+
+// 合作商
+export const sellerList = params => {
+  return axios.request({
+    url: `/seller/queryList`,
+    method: 'post',
+    data: {}
+  })
+}
+// 重置密码
+export const resetPSD = params => {
+  return axios({
+    url: 'sleler/user/resetPwd',
+    data: params,
+    method: 'POST'
+  })
+}
+
+// 获取列表数据
+export const getPowerUserList = params => {
+  const url = `sleler/user/queryLike/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+
+// 改变权限状态接口
+export const updateEnableStatus = params => {
+  return axios({
+    url: `sleler/user/enable/${params.id}/${params.flag}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 删除用户接口
+export const delectUserPower = params => {
+  return axios({
+    url: `sleler/user/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 新增/编辑保存接口
+export const saveUserPower = params => {
+  return axios({
+    url: 'sleler/user/save',
+    data: params,
+    method: 'POST'
+  })
+}
+
+// 获取角色列表接口
+// export const getRoleList = params => {
+//   return axios({
+//     url: 'sleler/role/findAll',
+//     data: params,
+//     method: 'POST'
+//   })
+// }
+
+// 编辑查详情
+export const slelerDetails = (params) => {
+  const url = `sleler/user/findById/${params.id}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}

+ 8 - 1
src/components/UploadFile/index.vue

@@ -56,7 +56,7 @@ export default {
     },
     upText: {
       type: String,
-      default: '上传'
+      default: ''
     },
     value: {
       type: String
@@ -191,10 +191,12 @@ export default {
   .upload-file{
     float: left;
     overflow: hidden;
+    height: 80px;
     /* you can make up upload button and sample style by using stylesheets */
     .ant-upload-select-picture-card i {
       font-size: 32px;
       color: #999;
+      margin-top: 9px;
     }
     .ant-upload-select-picture-card .ant-upload-text {
       margin-top: 8px;
@@ -206,11 +208,16 @@ export default {
         padding: 4px 0;
       }
     }
+    .ant-upload-list-picture-card-container{
+      height: 80px;
+      width: 80px;
+    }
     .ant-upload.ant-upload-select-picture-card,
     .ant-upload-list-picture-card .ant-upload-list-item{
       width:80px;
       height:80px;
       padding: 4px;
+      margin: 0;
     }
     .ant-upload-list-item-info{
       padding: 0 22px 0 4px;

+ 1 - 1
src/components/global.less

@@ -508,7 +508,7 @@ body {
     padding: 0 10px;
   }
   td .icon-blues {
-  	color: #1890FF;
+  	color: #1891FF;
   }
   td .icon-green {
   	color: #16b50e;

+ 322 - 180
src/config/router.config.js

@@ -3,7 +3,8 @@ import {
   UserLayout,
   BasicLayout,
   RouteView,
-  PageView
+  PageView,
+  BlankLayout
 } from '@/layouts'
 
 export const asyncRouterMap = [{
@@ -11,7 +12,7 @@ export const asyncRouterMap = [{
   name: 'index',
   component: BasicLayout,
   meta: {
-    title: 'IT后台'
+    title: '运营后台'
   },
   redirect: '/home',
   children: [{
@@ -33,8 +34,7 @@ export const asyncRouterMap = [{
         icon: 'home',
         hiddenHeaderContent: true
       }
-    }
-    ]
+    }]
   },
   {
     path: '/changePwd',
@@ -47,217 +47,379 @@ export const asyncRouterMap = [{
     }
   },
   {
-    path: '/tenants',
-    redirect: '/tenants/list',
+    path: '/shop',
+    redirect: '/shop/goods',
     component: PageView,
     meta: {
-      title: '租户管理',
-      icon: 'team',
-      permission: 'M_tenants_list'
+      title: '商品',
+      icon: 'shop',
+      permission: 'M_shop'
     },
-    children: [{
-      path: '/tenants/list',
-      name: 'tenantsList',
-      component: () => import(/* webpackChunkName: "tenants" */ '@/views/tenants/tenantsList.vue'),
-      meta: {
-        title: '租户列表',
-        icon: 'team',
-        permission: 'M_tenants_list'
+    children: [
+      {
+        path: '/shop/goods',
+        redirect: '/shop/goods/list',
+        name: 'goodsList',
+        component: RouteView,
+        meta: {
+          title: '商品管理',
+          icon: 'shopping',
+          permission: 'M_goodsManage_list'
+        },
+        hideChildrenInMenu: true,
+        children: [{
+          path: '/shop/goods/list',
+          name: 'goodsListList',
+          component: () => import(/* webpackChunkName: "shop" */ '@/views/shop/goodsList.vue'),
+          meta: {
+            title: '商品列表',
+            icon: 'shopping',
+            hidden: true,
+            permission: 'M_goodsManage_list'
+          }
+        },
+        {
+          path: '/shop/goods/add',
+          name: 'goodsListAdd',
+          component: () => import(/* webpackChunkName: "shop" */ '@/views/shop/goodsEdit.vue'),
+          meta: {
+            title: '新增商品',
+            icon: 'shopping',
+            hidden: true,
+            permission: 'B_goodsManage_add'
+          }
+        },
+        {
+          path: '/shop/goods/edit/:id',
+          name: 'goodsListEdit',
+          component: () => import(/* webpackChunkName: "shop" */ '@/views/shop/goodsEdit.vue'),
+          meta: {
+            title: '编辑商品',
+            icon: 'shopping',
+            hidden: true,
+            permission: 'B_goodsManage_edit'
+          }
+        }
+        ]
+      },
+      {
+        path: '/shop/goodsShelves',
+        name: 'goodsShelves',
+        component: () => import(/* webpackChunkName: "shop" */ '@/views/shop/goodsShelves.vue'),
+        meta: {
+          title: '商品排序',
+          icon: 'flag',
+          permission: 'M_goodsShelves_0'
+        }
+      },
+      {
+        path: '/shopSetting/goodsClass',
+        name: 'goodsClass',
+        component: () => import(/* webpackChunkName: "shop" */ '@/views/shopSetting/goodsClass.vue'),
+        meta: {
+          title: '商品分类管理',
+          icon: 'folder',
+          permission: 'M_goodsClass_list'
+        }
       }
-    }]
+    ]
   },
-  // 考评管理
   {
-    path: '/evaluation',
-    redirect: '/evaluation/evaluationItem',
+    path: '/order',
+    redirect: '/order/orderManage',
     component: PageView,
     meta: {
-      title: '考评管理',
-      icon: 'block',
-      permission: 'M_evaluation_0'
+      title: '订单',
+      icon: 'profile',
+      permission: 'M_orderManage_list'
     },
-    children: [{
-      path: '/evaluation/evaluationItem',
-      name: 'EvaluationItem',
-      component: () => import(/* webpackChunkName: "evaluation" */
-        '@/views/evaluation/evaluationItem/EvaluationItem.vue'),
-      meta: {
-        title: '考评项目',
-        icon: 'save',
-        permission: 'M_evaluationItem_list'
-      }
-    }, {
-      path: '/evaluation/evaluationPlan',
-      name: 'EvaluationPlan',
-      component: () => import(/* webpackChunkName: "evaluation" */
-        '@/views/evaluation/evaluationPlan/EvaluationPlan.vue'),
-      meta: {
-        title: '考评方案',
-        icon: 'switcher',
-        permission: 'M_evaluationPlan_list'
+    children: [
+      {
+        path: '/order/orderManage',
+        redirect: '/order/orderManage/list',
+        name: 'orderManage',
+        component: RouteView,
+        meta: {
+          title: '订单管理',
+          icon: 'profile',
+          permission: 'M_orderManage_list'
+        },
+        hideChildrenInMenu: true,
+        children: [
+          {
+            path: '/order/orderManage/list',
+            name: 'orderManageList',
+            component: () => import(/* webpackChunkName: "order" */ '@/views/shop/shopOrder.vue'),
+            meta: {
+              title: '订单列表',
+              icon: 'shopping',
+              hidden: true,
+              permission: 'M_orderManage_list'
+            }
+          },
+          {
+            path: '/order/orderManage/detail/:id',
+            name: 'orderManageDetail',
+            component: () => import(/* webpackChunkName: "order" */ '@/views/shop/orderDetail.vue'),
+            meta: {
+              title: '订单详情',
+              icon: 'profile',
+              hidden: true,
+              permission: 'B_orderManage_detail'
+            }
+          }
+        ]
       }
-    }]
+    ]
   },
-  // 业务 设置setting
+  // 用户
   {
-    path: '/bnSetting',
-    redirect: '/bnSetting/menusAuth',
+    path: '/userInfo',
+    redirect: '/userInfo/userManage',
     component: PageView,
     meta: {
-      title: '平台设置',
-      icon: 'security-scan',
-      permission: 'M_bnSetting_0'
+      title: '用户',
+      icon: 'user',
+      permission: 'M_user'
     },
-    children: [{
-      path: '/bnSetting/menusAuth',
-      name: 'menusAuth',
-      component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menusAuthTab.vue'),
-      meta: {
-        title: '菜单授权',
-        icon: 'property-safety',
-        permission: 'M_bnSetting_0'
+    children: [
+      {
+        path: '/userInfo/userManage',
+        redirect: '/userInfo/userManageList/list',
+        name: 'userManageS',
+        component: RouteView,
+        meta: {
+          title: '用户管理',
+          icon: 'profile',
+          permission: 'M_user_userManage_list'
+        },
+        hideChildrenInMenu: true,
+        children: [{
+          path: '/userInfo/userManageList/list',
+          name: 'userManageList',
+          component: () => import(/* webpackChunkName: "userManageList" */ '@/views/userInfo/userManageList.vue'),
+          meta: {
+            title: '用户列表',
+            icon: 'team',
+            hidden: true,
+            permission: 'M_user_userManage_list'
+          }
+        },
+        {
+          path: '/userInfo/userManageList_user/detail/:id',
+          name: 'userManageDetail',
+          component: () => import(/* webpackChunkName: "userManageDetail" */ '@/views/userInfo/userDetails.vue'),
+          meta: {
+            title: '用户详情',
+            icon: 'profile',
+            hidden: true,
+            permission: 'B_user_userManage_userDetails'
+          }
+        },
+        {
+          path: '/userInfo/userManageList_Ld/detail/:id',
+          name: 'ledouDetail',
+          component: () => import(/* webpackChunkName: "LdDetails" */ '@/views/userInfo/LdDetails.vue'),
+          meta: {
+            title: '乐豆明细',
+            icon: 'profile',
+            hidden: true,
+            permission: 'B_user_userManage_LdDetails'
+          }
+        }
+        ]
+      },
+      {
+        path: '/userInfo/releaseRecord/list',
+        name: 'releaseRecordList',
+        component: () => import(/* webpackChunkName: "releaseRecord" */ '@/views/releaseRecord/releaseRecordList.vue'),
+        meta: {
+          title: '投放记录',
+          icon: 'container',
+          permission: 'M_user_releaseRecord'
+        }
       }
-    }]
+    ]
   },
   {
-    path: '/appSetting',
-    redirect: '/appSetting/bannerSetting',
+    path: '/shopSetting',
+    redirect: '/shopSetting/bannerSetting',
     component: PageView,
     meta: {
-      title: 'APP设置',
+      title: '商城设置',
       icon: 'appstore',
-      permission: 'M_appSetting'
-    },
-    children: [{
-      path: '/appSetting/bannerSetting',
-      name: 'bannerSetting',
-      component: () => import(/* webpackChunkName: "appSetting" */ '@/views/appSetting/bannerSetting.vue'),
-      meta: {
-        title: '营销图设置',
-        icon: 'file-image',
-        permission: 'M_banner'
-      }
+      permission: 'M_AdBanner_list'
     },
-    {
-      path: '/editionSetting',
-      redirect: '/editionSetting/list',
-      name: 'editionSetting',
-      component: RouteView,
-      meta: {
-        title: '版本设置',
-        icon: 'info-circle',
-        permission: 'M_banben'
-      },
-      hideChildrenInMenu: true,
-      children: [{
-        path: '/editionSetting/list',
-        name: 'editionSetting_list',
-        component: () => import(/* webpackChunkName: "appSetting" */
-          '@/views/appSetting/editionSetting.vue'),
-        meta: {
-          title: '列表',
-          icon: 'interaction',
-          permission: 'M_banben'
-        }
-      },
-      {
-        path: '/editionSetting/add',
-        name: 'editionSetting_add',
-        component: () => import(/* webpackChunkName: "appSetting" */
-          '@/views/appSetting/addEditionSetting.vue'),
-        meta: {
-          title: '新增',
-          icon: 'crown',
-          hidden: true
-        }
-      },
+    children: [
       {
-        path: '/editionSetting/add',
-        name: 'editionSetting_edit',
-        component: () => import(/* webpackChunkName: "appSetting" */
-          '@/views/appSetting/addEditionSetting.vue'),
+        path: '/shopSetting/bannerSetting',
+        name: 'bannerSetting',
+        component: () => import(/* webpackChunkName: "shopSetting" */ '@/views/shop/bannerSetting.vue'),
         meta: {
-          title: '编辑',
-          icon: 'crown',
-          hidden: true
+          title: '推广位设置',
+          icon: 'picture',
+          permission: 'M_AdBanner_list'
         }
       }
-      ]
-    }
     ]
-
   },
   {
-    path: '/menusAuth',
-    redirect: '/bnSetting/menusAuth',
+    path: '/equipmentManage',
+    redirect: '/equipmentManage/network',
     component: PageView,
     meta: {
-      title: '菜单管理',
-      icon: 'bars',
-      permission: 'M_menusAuth_0'
+      title: '网点/设备',
+      icon: 'apartment',
+      permission: 'M_networkEquipment'
     },
     children: [{
-      path: '/menusAuth/storeMenus',
-      name: 'storeMenus',
-      component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/storeMenus.vue'),
+      path: '/equipmentManage/network',
+      name: 'network',
+      component: () => import(/* webpackChunkName: "equipmentManage" */ '@/views/equipmentManage/network/network.vue'),
       meta: {
-        title: '巡店菜单管理',
-        icon: 'shop',
-        permission: 'M_menusAuth_storeMenus'
+        title: '网点管理',
+        icon: 'cluster',
+        permission: 'M_network_list'
       }
     },
     {
-      path: '/menusAuth/adminMenus',
-      name: 'adminMenus',
-      component: () => import(/* webpackChunkName: "bnSetting" */ '@/views/bnSetting/menu/adminMenus.vue'),
+      path: '/equipmentManage/equipment',
+      name: 'equipment',
+      component: () => import(/* webpackChunkName: "equipmentManage" */ '@/views/equipmentManage/equipment/equipment.vue'),
       meta: {
-        title: '运营菜单管理',
-        icon: 'appstore',
-        permission: 'M_menusAuth_adminMenus'
+        title: '设备管理',
+        icon: 'usb',
+        permission: 'M_equipment_list'
       }
     },
     {
-      path: '/menusAuth/menu',
-      name: 'powerMenu',
-      component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menu/menu.vue'),
+      path: '/equipmentManage/boxSetting',
+      name: 'boxSetting',
+      component: () => import(/* webpackChunkName: "equipmentManage" */ '@/views/equipmentManage/boxSetting/boxSetting.vue'),
       meta: {
-        title: 'IT菜单管理',
-        icon: 'profile',
-        permission: 'M_menusAuth_menu'
+        title: '箱体类型设置',
+        icon: 'block',
+        permission: 'M_boxSetting_list'
+      }
+    },
+    {
+      path: '/equipmentManage/exchangeSetting',
+      name: 'exchangeSetting',
+      component: () => import(/* webpackChunkName: "equipmentManage" */
+        '@/views/equipmentManage/exchangeSetting/ExchangeSetting.vue'),
+      meta: {
+        title: '兑换规则设置',
+        icon: 'build',
+        permission: 'M_exchangeSetting_list'
+      }
+    },
+    {
+      path: '/equipmentManage/openTimeSetting',
+      name: 'openTimeSetting',
+      component: () => import(/* webpackChunkName: "equipmentManage" */ '@/views/equipmentManage/openTimeSetting/OpenTimeSetting.vue'),
+      meta: {
+        title: '投放时间设置',
+        icon: 'dashboard',
+        permission: 'M_openTimeSetting_list'
       }
     }
     ]
   },
+  {
+    path: '/businessManage',
+    redirect: '/businessManage/partnerManage',
+    component: PageView,
+    meta: {
+      title: '乐享亭',
+      icon: 'bank',
+      permission: 'M_businessManage'
+    },
+    children: [
+      {
+        path: '/businessManage/partnerManage',
+        name: 'partnerManage',
+        component: () => import(/* webpackChunkName: "businessManage" */ '@/views/businessManage/partnerManage/partnerManage.vue'),
+        meta: {
+          title: '商户管理',
+          icon: 'solution',
+          permission: 'M_partnerManage_list'
+        }
+      },
+      {
+        path: '/businessManage/userManage',
+        name: 'userManage',
+        component: () => import(/* webpackChunkName: "businessManage" */ '@/views/businessManage/userManage/userManage.vue'),
+        meta: {
+          title: '用户管理',
+          icon: 'folder',
+          permission: 'M_userManage_list'
+        }
+      }
+    ]
+  },
+  {
+    path: '/supplier',
+    redirect: '/supplier/list',
+    component: PageView,
+    meta: {
+      title: '供货商',
+      icon: 'user-add',
+      permission: 'M_supplier_list'
+    },
+    children: [
+      {
+        path: '/supplier/list',
+        name: 'supplier',
+        component: () => import(/* webpackChunkName: "supplier" */ '@/views/shopSetting/supplier.vue'),
+        meta: {
+          title: '供货商管理',
+          icon: 'solution',
+          permission: 'M_supplier_list'
+        }
+      }
+    ]
+  },
   // auth
   {
     path: '/auth',
     redirect: '/auth/userList',
     component: PageView,
     meta: {
-      title: 'IT权限管理',
+      title: '权限管理',
       icon: 'lock',
       permission: 'M_auth_0'
     },
-    children: [{
-      path: '/auth/userList',
-      name: 'powerUserList',
-      component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
-      meta: {
-        title: '用户管理',
-        icon: 'user',
-        permission: 'M_auth_userList'
-      }
-    },
-    {
-      path: '/auth/roleList',
-      name: 'powerRoleList',
-      component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
-      meta: {
-        title: '角色管理',
-        icon: 'solution',
-        permission: 'M_auth_roleList'
+    children: [
+      {
+        path: '/auth/userList',
+        name: 'powerUserList',
+        component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
+        meta: {
+          title: '用户管理',
+          icon: 'user',
+          permission: 'M_power_user_list'
+        }
+      },
+      {
+        path: '/auth/roleList',
+        name: 'powerRoleList',
+        component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
+        meta: {
+          title: '角色管理',
+          icon: 'solution',
+          permission: 'M_power_role_list'
+        }
+      },
+      {
+        path: '/menusAuth/menu',
+        name: 'powerMenu',
+        component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menu/menu.vue'),
+        meta: {
+          title: '菜单管理',
+          icon: 'profile',
+          permission: 'M_power_menu_list'
+        }
       }
-    }
     ]
   },
   {
@@ -280,26 +442,6 @@ export const asyncRouterMap = [{
         permission: 'M_sys_dataDictionary'
       }
     },
-    // {
-    //   path: '/setting/register',
-    //   name: 'powerRegister',
-    //   component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
-    //   meta: {
-    //     title: '参数管理',
-    //     icon: 'key'
-    //     // permission: 'M_sys_register'
-    //   }
-    // },
-    // {
-    //   path: '/setting/jobs',
-    //   name: 'powerJobs',
-    //   component: () => import(/* webpackChunkName: "setting" */ '@/views/power/job/jobs.vue'),
-    //   meta: {
-    //     title: '定时器',
-    //     icon: 'alert',
-    //     permission: 'M_sys_job'
-    //   }
-    // },
     {
       path: '/setting/OperateJournal',
       name: 'powerOperateJournal',
@@ -308,7 +450,7 @@ export const asyncRouterMap = [{
       meta: {
         title: '操作日志',
         icon: 'read',
-        permission: 'M_operateJournal'
+        permission: 'M_OperateJournal'
       }
     }
     ]

+ 71 - 61
src/libs/getDate.js

@@ -1,65 +1,75 @@
 // 引入 moment 时间插件
-import moment from "moment";
-//获取今日/昨日/本周/上周/本月/上月 时间
+import moment from 'moment'
+// 获取今日/昨日/本周/上周/本月/上月 时间
 export default {
-    // 获取今日的开始结束时间
-    getToday() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().startOf("day").valueOf()).format("YYYY-MM-DD HH:mm:ss");
-        obj.endtime = moment(moment().valueOf()).format("YYYY-MM-DD HH:mm:ss");
-        return obj
-    },
-    // 获取昨日的开始结束时间
-    getYesterday() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().add(-1, 'days').startOf("day").valueOf()).format("YYYY-MM-DD");
-        obj.endtime = moment(moment().add(-1, 'days').endOf('day').valueOf()).format('YYYY-MM-DD');
-        return obj
-    },
-    // 获取当前周的开始结束时间
-    getCurrWeekDays() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().week(moment().week()).startOf('week').add(1, 'days').valueOf()).format('YYYY-MM-DD')
-        obj.endtime = moment(moment().week(moment().week()).endOf('week').add(1, 'days').valueOf()).format('YYYY-MM-DD');
-        return obj
-    },
-    // 获取上一周的开始结束时间
-    getLastWeekDays() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().week(moment().week() - 1).startOf('week').add(1, 'days').valueOf()).format('YYYY-MM-DD')
-        obj.endtime = moment(moment().week(moment().week() - 1).endOf('week').add(1, 'days').valueOf()).format('YYYY-MM-DD');
-        return obj
-    },
-    // 获取当前月的开始结束时间
-    getCurrMonthDays() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().month(moment().month()).startOf('month').valueOf()).format('YYYY-MM-DD');
-        obj.endtime = moment(moment().month(moment().month()).endOf('month').valueOf()).format('YYYY-MM-DD');
-        return obj
-    },
-    // 获取上一个月的开始结束时间
-    getLastMonthDays() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format('YYYY-MM-DD');
-        obj.endtime = moment(moment().month(moment().month() - 1).endOf('month').valueOf()).format('YYYY-MM-DD');
-        return obj
+  // 获取今日的开始结束时间
+  getToday () {
+    const obj = {
+      starttime: '',
+      endtime: ''
     }
+    obj.starttime = moment(moment().startOf('day').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  //  近7天
+  getRecentday () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment().subtract('days', 6).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取昨日的开始结束时间
+  getYesterday () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().add(-1, 'days').startOf('day').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().add(-1, 'days').endOf('day').valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取当前周的开始到当天结束时间
+  getCurrWeekDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().week(moment().week()).startOf('week').add('days').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取上一周的开始结束时间
+  getLastWeekDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().week(moment().week() - 1).startOf('week').add('days').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().week(moment().week() - 1).endOf('week').add('days').valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取当前月的开始到当天结束时间
+  getCurrMonthDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().month(moment().month()).startOf('month').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取上一个月的开始结束时间
+  getLastMonthDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().month(moment().month() - 1).endOf('month').valueOf()).format('YYYY-MM-DD')
+    return obj
+  }
 }

+ 3 - 0
src/main.js

@@ -6,6 +6,8 @@ import App from './App.vue'
 import router from './router'
 import store from './store/'
 import { VueAxios } from './utils/request'
+//  复制内容到粘贴板
+import VueClipboard from 'vue-clipboard2'
 
 // mock
 // import './mock'
@@ -23,6 +25,7 @@ Vue.config.productionTip = false
 Vue.use(VueAxios)
 Vue.use(VueCookies)
 Vue.$cookies.config('7d')
+Vue.use(VueClipboard)
 /**
  * 权限检查
  */

+ 41 - 43
src/permission.js

@@ -10,8 +10,7 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
 
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
-// const whiteList = ['login', 'register', 'registerResult', 'EvaluationPlan', 'EvaluationItem', 'tenantsList'] // no redirect whitelist
-const whiteList = ['login', 'register', 'registerResult'] // no redirect whitelist
+const whiteList = ['login'] // no redirect whitelist
 const defaultRoutePath = '/home'
 
 router.beforeEach((to, from, next) => {
@@ -19,7 +18,7 @@ router.beforeEach((to, from, next) => {
   to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))
   let token = store.state.user.token || sessionStorage.getItem(ACCESS_TOKEN)
   token = token != 'undefined' ? token : ''
-  // console.log(token)
+  console.log(token == 'null')
   // 已登录
   if (token) {
     /* has token */
@@ -31,51 +30,50 @@ router.beforeEach((to, from, next) => {
       console.log(userInfo)
       if (userInfo) {
         store.dispatch('SetInfo', userInfo)
-      } else {
-        store.dispatch('Logout').then(() => {
-          next({ path: '/user/login', query: { redirect: to.fullPath } })
-        })
-      }
-      console.log(store.getters.roles)
-      if (store.getters.roles.permissionList.length === 0) {
-        store
-          .dispatch('GetInfo', token)
-          .then(res => {
-            const roles = res
-            console.log(roles, 'roles')
-            if (roles.permissionList.length == 0 || !roles) {
-              store.dispatch('Logout').then(() => {
-                store.dispatch('ResetRoutes').then(() => {
-                  next({ path: '/user/login', query: { redirect: to.fullPath } })
+        if (store.getters.roles.permissionList.length === 0 && (token != 'null')) {
+          store
+            .dispatch('GetInfo', token)
+            .then(res => {
+              const roles = res
+              console.log(roles, 'roles')
+              if (roles.permissionList.length == 0 || !roles) {
+                store.dispatch('Logout').then(() => {
+                  store.dispatch('ResetRoutes').then(() => {
+                    next({ path: '/user/login', query: { redirect: to.fullPath } })
+                  })
+                })
+              } else {
+                store.dispatch('GenerateRoutes', { roles }).then(() => {
+                  // 根据roles权限生成可访问的路由表
+                  // 动态添加可访问路由表
+                  // router.addRoutes(store.getters.addRouters)
+                  const redirect = decodeURIComponent(from.query.redirect || to.path)
+                  if (to.path === redirect) {
+                    // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
+                    next({ ...to, replace: true })
+                  } else {
+                    // 跳转到目的路由
+                    next({ path: redirect })
+                  }
                 })
+              }
+            })
+            .catch(() => {
+              notification.error({
+                message: '错误',
+                description: '请求用户信息失败,请重试'
               })
-            } else {
-              store.dispatch('GenerateRoutes', { roles }).then(() => {
-                // 根据roles权限生成可访问的路由表
-                // 动态添加可访问路由表
-                // router.addRoutes(store.getters.addRouters)
-                const redirect = decodeURIComponent(from.query.redirect || to.path)
-                if (to.path === redirect) {
-                  // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
-                  next({ ...to, replace: true })
-                } else {
-                  // 跳转到目的路由
-                  next({ path: redirect })
-                }
+              store.dispatch('Logout').then(() => {
+                next({ path: '/user/login', query: { redirect: to.fullPath } })
               })
-            }
-          })
-          .catch(() => {
-            notification.error({
-              message: '错误',
-              description: '请求用户信息失败,请重试'
-            })
-            store.dispatch('Logout').then(() => {
-              next({ path: '/user/login', query: { redirect: to.fullPath } })
             })
-          })
+        } else {
+          next()
+        }
       } else {
-        next()
+        store.dispatch('Logout').then(() => {
+          next({ path: '/user/login', query: { redirect: to.fullPath } })
+        })
       }
     }
   } else {

+ 1 - 0
src/store/getters.js

@@ -5,6 +5,7 @@ const getters = {
   token: state => state.user.token,
   avatar: state => state.user.avatar,
   nickname: state => state.user.name,
+  mustChangePwd: state => state.user.mustChangePwd,
   welcome: state => state.user.welcome,
   roles: state => state.user.roles,
   userInfo: state => state.user.info,

+ 10 - 10
src/store/modules/permission.js

@@ -9,16 +9,16 @@ import { asyncRouterMap, constantRouterMap } from '@/config/router.config'
  */
 function hasPermission (permission, route) {
   if (route.meta && route.meta.permission) {
-    // let flag = permission.find(item => {
-    //   return item&&item == route.meta.permission
-    // })
-    let flag = false
-    for (let i = 0, len = permission.length; i < len; i++) {
-      flag = route.meta.permission.includes(permission[i])
-      if (flag) {
-        return true
-      }
-    }
+    const flag = permission.find(item => {
+      return item && item == route.meta.permission
+    })
+    // let flag = false
+    // for (let i = 0, len = permission.length; i < len; i++) {
+    //   flag = route.meta.permission.includes(permission[i])
+    //   if (flag) {
+    //     return true
+    //   }
+    // }
     return flag
   }
   return true

+ 6 - 0
src/store/modules/user.js

@@ -7,6 +7,7 @@ const user = {
   state: {
     token: '',
     name: '',
+    mustChangePwd: null,
     welcome: '',
     avatar: '',
     roles: { permissionList: [] },
@@ -31,6 +32,9 @@ const user = {
     },
     SET_INFO: (state, info) => {
       state.info = info
+    },
+    SET_MUSTCHANGEPWD: (state, status) => {
+      state.mustChangePwd = status
     }
   },
 
@@ -48,6 +52,7 @@ const user = {
               Vue.ls.set('hasError', 0)
               commit('SET_TOKEN', res.access_token)
               commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
+              commit('SET_MUSTCHANGEPWD', users.mustChangePwd)
               Vue.ls.set('rolesAccess', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
               commit('SET_AVATAR', res.avatar ? res.avatar : '')
               // 记住密码
@@ -88,6 +93,7 @@ const user = {
           resolve(error)
         }).finally(() => {
           commit('SET_NAME', { name: '', welcome: '' })
+          commit('SET_MUSTCHANGEPWD', '')
           commit('SET_AVATAR', '')
           commit('SET_TOKEN', '')
           commit('SET_ROLES', { permissionList: [] })

+ 1 - 1
src/utils/domUtil.js

@@ -16,4 +16,4 @@ export const setDocumentTitle = function (title) {
   }
 }
 
-export const domTitle = '智能巡店IT后台'
+export const domTitle = '智享亿家运营后台'

+ 1 - 1
src/utils/request.js

@@ -57,7 +57,7 @@ service.interceptors.response.use((response) => {
       })
     }
     const et = sessionStorage.getItem('errorTips')
-    if (response.data.status.length == 4 && !et) {
+    if (response.data.status && response.data.status.length == 4 && !et) {
       sessionStorage.setItem('errorTips', 1)
       modal.destroyAll()
       modal.error({

+ 16 - 1
src/utils/util.js

@@ -70,4 +70,19 @@ export function oneOf (value, validList) {
     }
   }
   return false
-}
+}
+// 数字校验 val:文本框值 num:保留位数 max:最大值
+export const numberToFixed = function (val, num, max) {
+  const maxNums = max || 999999
+  let _value = val
+  _value = _value.replace(/[^\d.]/g, '')// 清楚数字和.以外的字数
+  _value = _value.replace(/^\./g, '')
+  _value = _value.replace(/\.{2,}/g, '')// 保留第一个,清楚多余的
+  if (num == 1)_value = _value.replace(/^(\-)*(\d+)\.(\d).*$/, '$1$2.$3')
+  else if (num == 3)_value = _value.replace(/^(\-)*(\d+)\.(\d\d\d).*$/, '$1$2.$3')
+  else if (num == 4)_value = _value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, '$1$2.$3')
+  else if (num == 5)_value = _value.replace(/^(\-)*(\d+)\.(\d\d\d\d\d).*$/, '$1$2.$3')
+  else if (num == 0)_value = _value.indexOf('.') >= 0 ? _value.split('.')[0] : _value
+  else _value = _value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
+  return Number(_value > maxNums ? maxNums : _value)
+}

+ 36 - 5
src/views/Home.vue

@@ -1,21 +1,52 @@
 <template>
   <div class="home">
-    <a-alert message="欢迎登录智能巡店IT后台系统" type="info" showIcon />
+    <a-alert message="欢迎登录智享亿家运营系统" type="info" showIcon />
+    <!-- 重置密码 -->
+    <a-modal
+      class="resetPwdModal"
+      title="重置密码"
+      width="60%"
+      centered
+      :footer="null"
+      :closable="false"
+      :maskClosable="false"
+      :destroyOnClose="true"
+      @cancel="openResetPwd=false"
+      v-model="openResetPwd">
+      <ResetPwd />
+    </a-modal>
  </div>
 </template>
 
 <script>
+  import { mapGetters } from 'vuex'
+  import ResetPwd from '@/views/user/ResetPwd.vue'
 export default {
   name: 'Home',
-  components: { 
-  },
+  components: { ResetPwd },
   data () {
-    return {}
+    return {
+      openResetPwd: false //  重置密码是否显示
+    }
+  },
+  computed: {
+    ...mapGetters(['mustChangePwd'])
   },
   created () {
   },
   methods: { 
-  }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      //  判断登录用户是否重置过密码(首次登陆需强制重置密码)
+      if (vm.mustChangePwd == 0) {
+        vm.openResetPwd = false
+      } else {
+        vm.openResetPwd = true
+      }
+      console.log(vm.mustChangePwd, '-------是否需要重置密码')
+    })
+  },
 }
 </script>
 <style scoped>

+ 0 - 266
src/views/appSetting/addEditionSetting.vue

@@ -1,266 +0,0 @@
-<template>
-  <div class="addPage">
-    <div class="formBox">
-      <a-form :form="form" @submit="handleSubmit">
-        <a-row>
-          <a-col :span="24">
-            <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="版本号">
-              <a-input
-                v-decorator="[
-                  'formData.version',
-                  { initialValue: formData.version,getValueFromEvent: $filterEmpty,
-                    rules: [{ required: true, message: '请输入(0~999999)之间的版本号' }]
-                  },
-                ]"
-                oninput="if(value.length>6)value=value.slice(0,6);if(value<0)value=0"
-                id="addEditionSetting-version"
-                placeholder="请输入(0~999999)之间的版本号"
-                allowClear
-                type="number" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="请选择更新时间">
-              <a-date-picker
-                show-time
-                id="addEditionSetting-publicDate"
-                placeholder="年/月/日 时/分/秒"
-                :disabled-date="disabledDate"
-                v-decorator="['formData.publicDate', { initialValue: formData.publicDate, rules: [{ required: true, message: '请选择更新时间!' }] }]" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="强制升级">
-              <a-radio-group
-                name="radioGroup"
-                id="addEditionSetting-forceUpgrade"
-                @change="onChange"
-                v-decorator="[
-                  'formData.forceUpgrade',
-                  {
-                    initialValue: formData.forceUpgrade,
-                    rules: [{ required: true, type: 'number', message: '请选择是否强制升级!' }] },
-                ]">
-                <a-radio :value="1">是</a-radio>
-                <a-radio :value="0">否</a-radio>
-              </a-radio-group>
-            </a-form-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="下载链接">
-              <a-textarea
-                :maxLength="300"
-                v-decorator="[
-                  'formData.downloadUrl',
-                  { initialValue: formData.downloadUrl,getValueFromEvent: $filterEmpty,
-                    rules: [{ message: '请输入下载链接(最长为300字符)' }]
-                  },
-                ]"
-                id="addEditionSetting-downloadUrl"
-                placeholder="请输入下载链接(最长为300字符)"
-                allowClear />
-            </a-form-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="升级内容">
-              <a-textarea
-                placeholder="请输入升级内容(最多500个字符)"
-                :maxLength="500"
-                id="addEditionSetting-upgradeContent"
-                auto-size
-                v-decorator="[
-                  'formData.upgradeContent',
-                  { initialValue: formData.upgradeContent,getValueFromEvent: $filterEmpty,
-                    rules: [{ required: true, message: '请输入升级内容(最多500个字符)' }]
-                  },
-                ]" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row>
-          <a-col :span="24">
-            <a-form-item label="附件" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <div style="display: block;">
-                <Upload
-                  ref="upfile"
-                  id="addEditionSetting-attachment"
-                  :maxNums="1"
-                  :fileSize="100"
-                  v-decorator="[
-                    'formData.attachment',
-                    { initialValue: formData.attachment,
-                      rules: [{ required: true, message: '请上传app安装文件' }]
-                    },
-                  ]"
-                  fileType="application/vnd.android.package-archive"
-                  upText="附件上传">
-                </Upload>
-              </div>
-              <div style="line-height: 16px;clear: both;padding-top: 10px;color: #999;">(上传apk格式文件)</div>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-form-item :label-col="formTailLayout.labelCol" :wrapper-col="formTailLayout.wrapperCol">
-          <a-button htmlType="submit" type="primary" id="addEditionSetting-submit">
-            保存
-          </a-button>
-          <a-button style="margin-left: 20px;" @click="cansel" id="addEditionSetting-cansel">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-    </div>
-  </div>
-</template>
-
-<script>
-import {
-  Upload
-} from '@/components'
-import {
-  saveItem,
-  editItem
-} from '@/api/editionSetting.js'
-import moment from 'moment'
-
-const formItemLayout = {
-  labelCol: {
-    span: 3
-  },
-  wrapperCol: {
-    span: 6
-  }
-}
-const formTailLayout = {
-  wrapperCol: {
-    offset: 5
-  }
-}
-export default {
-  name: 'AddeditionSetting',
-  components: {
-    Upload
-  },
-
-  data () {
-    return {
-      formItemLayout,
-      formTailLayout,
-      form: this.$form.createForm(this),
-      formData: {
-        version: '',
-        publicDate: null,
-        downloadUrl: '',
-        forceUpgrade: '0',
-        upgradeContent: '',
-        attachment: ''
-      },
-      applyName: 'IT后台',
-      applyCode: 'atit',
-      mode1: 'time'
-    }
-  },
-  methods: {
-    moment,
-    // 禁止当前之前的日期选择
-    range (start, end) {
-      const result = []
-      for (let i = start; i < end; i++) {
-        result.push(i)
-      }
-      return result
-    },
-
-    disabledDate (current) {
-      // Can not select days before today and today
-      return current && current < moment().subtract(1, 'days')
-    },
-    // disabledDateTime () {
-    //   return {
-    //     disabledHours: () => this.range(0, moment().hour()),
-    //     disabledMinutes: () => this.range(0, moment().minute()),
-    //     disabledSeconds: () => this.range(0, moment().second())
-    //   }
-    // },
-    // 保存
-    handleSubmit (e) {
-      e.preventDefault()
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          const query = this.$route.query
-          const formData = Object.assign({}, this.formData, values.formData, {
-            applyName: 'IT后台'
-          }, {
-            applyCode: 'atit'
-          })
-          formData.publicDate = formData.publicDate.format('YYYY-MM-DD HH:mm:ss')
-          saveItem(formData).then(res => {
-            // console.log(res, 'rrrrrrrrr')
-            if (res.status == 200) {
-              _this.$message.success(res.message ? res.message : '保存成功')
-              _this.$router.push({
-                name: 'editionSetting_list'
-              })
-            } else {
-              _this.$message.error(res.message)
-            }
-          })
-        }
-      })
-    },
-    // 返回列表
-    cansel () {
-      this.$router.push({
-        name: 'editionSetting_list'
-      })
-    },
-    // 选择时间
-    handleOpenChange1 (open) {
-      console.log(open)
-      if (open) {
-        this.mode1 = 'time'
-      }
-    },
-    // 改变默认选项
-    onChange (e) {
-      console.log('radio checked', e.target.value)
-    }
-  },
-
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      console.log(111)
-      // vm.loading = false
-      const params = vm.$route.query
-      console.log(params.id)
-      if (params.id) {
-        editItem({
-          id: params.id
-        }).then(res => {
-          console.log(res)
-          if (res.status == 200) {
-            const page = res.data
-            vm.formData = Object.assign(vm.formData, page)
-            vm.formData.forceUpgrade = Number(vm.formData.forceUpgrade)
-            vm.formData.publicDate = moment(vm.formData.publicDate)
-            vm.$refs.upfile.setFileList(vm.formData.attachment)
-          }
-        })
-      }
-    })
-  }
-}
-</script>
-
-<style lang="less">
-	.addPage {
-		.formBox {
-			padding: 34px 0 10px;
-			flex-grow: 1;
-			background: #fff;
-			border-radius: 5px;
-
-		}
-	}
-</style>

+ 0 - 386
src/views/appSetting/bannerSetting.vue

@@ -1,386 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <div class="add"><a-button type="primary" icon="plus" class="addBtn" @click="showModal" id="bannerSetting-showModal">新增</a-button></div>
-    <v-select ref="position" style="display: none;" code="ADVERT_POSITION"></v-select>
-    <!-- table列表 -->
-    <s-table
-      ref="table"
-      size="default"
-      :rowKey="row => row.id"
-      :showPagination="false"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-      <!-- 广告图位置 -->
-      <span slot="position" slot-scope="text">{{ $refs.position.getNameByCode(text) }}</span>
-      <span slot="action" slot-scope="text, record">
-        <a-icon
-          type="eye"
-          id="bannerSetting-handleView"
-          title="查看"
-          class="actionBtn icon-green"
-          @click="handleEdit(record, 1)" />
-        <a-icon
-          type="edit"
-          id="bannerSetting-handleEdit"
-          v-if="record.status == '0'"
-          title="编辑"
-          class="actionBtn icon-blues"
-          @click="handleEdit(record, 0)" />
-        <a-icon
-          type="delete"
-          id="bannerSetting-delect"
-          v-if="record.status == '0'"
-          title="删除"
-          class="actionBtn icon-red"
-          @click="delect(record)" />
-      </span>
-      <span slot="status" slot-scope="text, record">
-        <a-switch
-          checkedChildren="启用"
-          unCheckedChildren="禁用"
-          id="bannerSetting-changeFlagHandle"
-          v-model="record.status == 1 ? true : false"
-          @change="changeFlagHandle(text, record)"
-        />
-      </span>
-    </s-table>
-    <!-- 弹窗 -->
-    <a-modal
-      :title="title"
-      :visible="visible"
-      :footer="null"
-      :closable="closable"
-      :centered="true"
-      @cancel="close"
-      width="45%">
-      <a-form
-        id="components-form-demo-validate-other"
-        :form="form"
-        ref="form"
-        v-bind="formItemLayout"
-        @submit="handleSubmit"
-        :hideRequiredMark="hideRequiredMark">
-        <a-form-item label="名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-          <a-input
-            id="bannerSetting-title"
-            :maxLength="30"
-            v-decorator="['formData.title', { initialValue: formData.title,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入轮播图名称(最多30个字符)!' }] }]"
-            :disabled="disabled"
-            placeholder="请输入轮播图名称(最多30个字符)"
-            allowClear
-          />
-        </a-form-item>
-        <a-form-item label="广告图位置" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-          <v-select
-            ref="position"
-            code="ADVERT_POSITION"
-            allowClear
-            id="bannerSetting-position"
-            placeholder="请选择广告图位置"
-            :disabled="disabled"
-            v-decorator="['formData.position', { initialValue: formData.position, rules: [{ required: true, message: '请选择广告图位置!' }] }]"
-          ></v-select>
-        </a-form-item>
-        <a-form-item label="跳转链接" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-          <a-textarea
-            :maxLength="300"
-            v-decorator="['formData.url', { initialValue: formData.url, rules: [{ required: false, message: '请输入跳转链接(最多300字符)!' }] }]"
-            :disabled="disabled"
-            id="bannerSetting-url"
-            placeholder="请输入跳转链接(最多300字符)"
-            allowClear
-          />
-        </a-form-item>
-        <a-form-item label="排序" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-          <a-input
-            type="number"
-            oninput="if(value.length>6)value=value.slice(0,6);if(value<0)value=0"
-            v-decorator="['formData.sort', { initialValue: formData.sort,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入(0~999999)之间的序号值!' }] }]"
-            :disabled="disabled"
-            id="bannerSetting-sort"
-            placeholder="请输入(0~999999)之间的序号值"
-            allowClear
-          />
-        </a-form-item>
-        <a-form-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-          <a-radio-group
-            :disabled="disabled"
-            id="bannerSetting-status"
-            v-decorator="['formData.status', { initialValue: formData.status, rules: [{ required: true, message: '请选择状态!' }] }]"
-          >
-            <a-radio value="1">启用</a-radio>
-            <a-radio value="0">禁用</a-radio>
-          </a-radio-group>
-        </a-form-item>
-        <a-form-item label="上传图片" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-          <Upload
-            v-if="title != '查看详情'"
-            id="bannerSetting-photoPath"
-            v-decorator="[
-              'formData.photoPath',
-              {
-                initialValue: formData.photoPath,
-                rules: [{ required: true, message: '请上传轮播图!' }]
-              }
-            ]"
-            ref="bannerImage"
-            :fileSize="0.25"
-            :disabled="disabled"
-            @change="getbannerImage"
-            listType="picture-card"
-            upText="上传"
-          ></Upload>
-          <img v-else :src="formData.photoPath" style="width:100px ;height: auto;" />
-        </a-form-item>
-        <a-form-item :wrapper-col="{ span: 12, offset: 6}" style="text-align: center;">
-          <a-button type="primary" html-type="submit" v-if="!disabled" id="bannerSetting-submit" style="margin-right: 15px">保存</a-button>
-          <a-button @click="close()" v-if="!disabled" style="margin-left: 15px" id="bannerSetting-close">取消</a-button>
-        </a-form-item>
-      </a-form>
-    </a-modal>
-  </a-card>
-</template>
-
-<script>
-import { Upload, STable, VSelect } from '@/components'
-import { getBannerSettingList, changeStatus, deleteItem, saveItem } from '@/api/bannerSetting.js'
-
-export default {
-  components: {
-    STable,
-    Upload,
-    VSelect
-  },
-  data () {
-    return {
-      // 表头
-      columns: [
-        {
-          title: '序号',
-          dataIndex: 'no',
-          width: 60,
-          align: 'center'
-        },
-        {
-          title: '广告图位置',
-          width: 200,
-          dataIndex: 'position',
-          align: 'center',
-          scopedSlots: {
-            customRender: 'position'
-          }
-        },
-        {
-          title: '名称',
-          width: 100,
-          dataIndex: 'title',
-          align: 'center'
-        },
-        {
-          title: '排序',
-          width: 100,
-          dataIndex: 'sort',
-          align: 'center'
-        },
-        {
-          title: '跳转链接',
-          width: 100,
-          dataIndex: 'url',
-          align: 'center',
-          customRender: (text) => {
-            return text || '--'
-          }
-        },
-        {
-          title: '状态',
-          width: 100,
-          dataIndex: 'status',
-          align: 'center',
-          scopedSlots: {
-            customRender: 'status'
-          }
-        },
-        {
-          title: '操作',
-          align: 'center',
-          width: 200,
-          scopedSlots: {
-            customRender: 'action'
-          }
-        }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        return getBannerSettingList({
-          bannerType: 'app'
-        }).then(res => {
-          // console.log(res, '1111')
-          const no = 0
-          for (let i = 0; i < res.data.length; i++) {
-            const _item = res.data[i]
-            _item.no = no + i + 1
-          }
-          return res.data
-        })
-      },
-
-      title: '编辑',
-      closable: true,
-      visible: false,
-      confirmLoading: false,
-      formLayout: 'horizontal',
-      hideRequiredMark: false, // 是否显示必填的* 默认显示
-      form: this.$form.createForm(this),
-      formItemLayout: {
-        labelCol: {
-          span: 6
-        },
-        wrapperCol: {
-          span: 14
-        }
-      },
-      formData: {
-        title: '', // 标题
-        url: '', // 图片路径
-        status: '', // 状态
-        sort: '', // 排序
-        position: '', // 广告图位置
-        photoPath: '', // banner地址
-        createDate: ''
-      },
-      bannerType: 'app',
-      disabled: false,
-      value: '',
-      id: '',
-      isShow: true
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'validate_other'
-    })
-  },
-  methods: {
-    showModal () {
-      this.disabled = false
-      delete this.formData.id
-      delete this.formData.createDate
-      this.visible = true
-      this.title = '新增'
-      this.hideRequiredMark = false
-    },
-    // 轮播图change
-    getbannerImage (data) {
-      this.formData.photoPath = data
-    },
-    // 点击保存;
-    handleSubmit (e) {
-      e.preventDefault()
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          console.log('Received values of form: ', values, this.formData)
-          const formData = Object.assign({}, this.formData, values.formData, {
-            bannerType: 'app'
-          })
-          console.log(formData, _this.radioGroup)
-          saveItem(formData, _this.radioGroup).then(res => {
-            console.log(res, 'rrrrrrrrr')
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.close()
-            }
-          })
-        }
-      })
-    },
-    close () {
-      this.visible = false
-      this.formData.title = ''
-      this.photo = ''
-      this.formData.url = ''
-      this.formData.status = ''
-      this.formData.sort = ''
-      this.formData.position = ''
-      this.formData.photoBasePath = ''
-      this.formData.photoPath = ''
-      this.title = '新增'
-      this.$refs.bannerImage.setFileList('')
-      this.form.resetFields()
-    },
-    // 赋值
-    assignment (row) {
-      this.formData.id = row.id
-      this.formData.title = row.title
-      this.formData.photoPath = row.photoPath
-      this.formData.url = row.url
-      this.formData.status = row.status
-      this.formData.sort = row.sort
-      this.formData.position = row.position
-      this.formData.createDate = row.createDate
-    },
-    // 0 修改,1 查看详情
-    handleEdit (row, type) {
-      const _this = this
-      console.log(row)
-      if (type == 1) {
-        this.title = '查看详情'
-        this.hideRequiredMark = true
-      } else if (type == 0) {
-        this.title = '编辑'
-        this.hideRequiredMark = false
-      }
-      this.assignment(row)
-      this.disabled = type == 1
-      this.visible = true
-      setTimeout(() => {
-        _this.$refs.bannerImage.setFileList(this.formData.photoPath)
-      }, 500)
-    },
-    // 删除
-    delect (row) {
-      const _this = this
-      this.$confirm({
-        title: '警告',
-        centered: true,
-        content: '删除后无法恢复,确认删除?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          deleteItem({
-            id: row.id
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-            }
-          })
-        }
-      })
-    },
-    // 更改启用禁用状态
-    changeFlagHandle (text, record) {
-      const _data = {
-        id: record.id,
-        flag: record.status == 1 ? '0' : '1'
-      }
-      changeStatus(_data).then(res => {
-        if (res.status == '200') {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-        } else {
-          record.status = !record.status
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style scoped>
-.addBtn {
-  margin-bottom: 20px;
-}
-</style>

+ 0 - 140
src/views/appSetting/editionSetting.vue

@@ -1,140 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <!-- 新建 -->
-    <div class="add">
-      <a-button type="primary" icon="plus" class="addBtn" @click="openModal()" id="editionSetting-openModal">新增</a-button>
-    </div>
-    <!-- table列表 -->
-    <s-table
-      ref="table"
-      size="default"
-      :rowKey="(row)=> row.id"
-      :columns="columns"
-      :data="loadData"
-      bordered
-    >
-      <!-- 操作 -->
-      <span slot="action" slot-scope="text, record">
-        <template>
-          <a-icon v-if="currentDate < new Date(record.publicDate).getTime()" type="edit" id="editionSetting-handleEdit" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="handleEdit(record)" />
-          <span v-if="currentDate > new Date(record.publicDate).getTime()">--</span>
-        </template>
-      </span>
-      <template slot="upgradeContent" slot-scope="text, record">
-        <span :title="record.upgradeContent" style="display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{ record.upgradeContent }}</span>
-
-      </template>
-      <span slot="forceUpgrade" slot-scope="text">
-        <template>
-          <span v-if=" text == '1'">是</span>
-          <span v-if=" text == '0'">否</span>
-        </template>
-      </span>
-    </s-table>
-  </a-card>
-</template>
-
-<script>
-import { STable } from '@/components'
-import { getEditionSettingList } from '@/api/editionSetting.js'
-export default {
-  name: 'EditionSetting',
-  components: { STable },
-  data () {
-    return {
-      columns: [
-        {
-          title: '序号',
-          dataIndex: 'no',
-          width: 60,
-          align: 'center'
-        },
-        {
-          title: '创建时间',
-          width: 100,
-          dataIndex: 'createDate',
-          align: 'center'
-        },
-        {
-          title: '版本号',
-          width: 100,
-          dataIndex: 'version',
-          align: 'center'
-        },
-        {
-          title: '强制升级',
-          width: 100,
-          dataIndex: 'forceUpgrade',
-          align: 'center',
-          scopedSlots: { customRender: 'forceUpgrade' }
-        },
-        {
-          title: '升级内容',
-          width: 100,
-          dataIndex: 'upgradeContent',
-          align: 'center',
-          ellipsis: true, // 内容超过宽度 自动出现省略号
-          scopedSlots: { customRender: 'upgradeContent' }
-
-        },
-        {
-          title: '下载地址',
-          width: 100,
-          dataIndex: 'downloadUrl',
-          align: 'center',
-          customRender: (text) => {
-            return text || '--'
-          }
-        },
-        {
-          title: '更新时间',
-          width: 100,
-          dataIndex: 'publicDate',
-          align: 'center'
-        },
-        {
-          title: '操作',
-          // dataIndex: 'action',
-          width: 100,
-          align: 'center',
-          scopedSlots: { customRender: 'action' }
-        }
-      ],
-      applyCode: 'atit',
-      applyName: 'IT后台',
-      currentDate: new Date().getTime(),	// 当前时间
-      // 获取列表数据
-      loadData: parameter => {
-        return getEditionSettingList(Object.assign(parameter))
-          .then(res => {
-            const no = (res.data.pageNo - 1) * res.data.pageSize
-            for (let i = 0; i < res.data.list.length; i++) {
-              const _item = res.data.list[i]
-              _item.no = no + i + 1
-            }
-            return res.data
-          })
-      },
-      id: ''
-    }
-  },
-  methods: {
-	 // 新增
-    openModal () {
-      this.$router.push({ name: 'editionSetting_add' })
-    },
-    // 编辑
-    handleEdit (row) {
-      console.log(row)
-      this.$router.push({ name: 'editionSetting_edit', query: { id: row.id } })
-    }
-  }
-}
-</script>
-
-<style scoped>
-  .addBtn{
-    margin-bottom: 20px;
-  }
-
-</style>

+ 0 - 468
src/views/bnSetting/menu/adminMenus.vue

@@ -1,468 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <a-row :gutter="24">
-      <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild" id="adminMenus-addChild">新增子菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTitle" id="adminMenus-addTitle">新增顶部菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="delect()" id="adminMenus-delect">删除</a-button>
-
-    </a-row>
-    <a-row :gutter="24">
-      <!-- 左侧菜单树列表 -->
-      <a-col :span="8">
-        <a-row :gutter="24" class="textCount">
-          <a-icon type="info-circle" style="color: #1890FF;margin-right: 10px;" />
-          <span>当前选择:<span style="color: #40a9ff;font-weight: 600;">{{ selectedMenu }}</span><span v-if="selectedKeys.length" class="imgSize" @click="cancelSel">取消选择</span></span>
-        </a-row>
-
-        <a-row :gutter="24" >
-          <a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" id="adminMenus-onChange"/>
-          <a-tree
-            @expand="onExpand"
-            :treeData="getMenus"
-            :expandedKeys="expandedKeys"
-            :autoExpandParent="autoExpandParent"
-            @select="onSelect"
-            :selectedKeys="selectedKeys"
-            showIcon
-          >
-            <template slot="title" slot-scope="{title}">
-              <span v-if="title.indexOf(searchValue) > -1">
-                {{ title.substr(0, title.indexOf(searchValue)) }}
-                <span style="color: #f50">{{ searchValue }}</span>
-                {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
-              </span>
-              <span v-else>{{ title }}</span>
-            </template>
-            <a-icon slot="file" type="file" />
-            <a-icon slot="pushpin" type="pushpin" />
-          </a-tree>
-        </a-row>
-      </a-col>
-      <!-- 右侧 -->
-      <a-col :span="16" >
-        <a-form :form="form" @submit="handleSubmit">
-          <!-- 类型 -->
-          <a-form-item label="类型" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <div v-if="!formData.type||formData.type=='0'">
-              <a-icon type="file" style="margin-right: 10px;" /><span >页面菜单</span>
-            </div>
-            <div v-if="formData.type=='1'">
-              <a-icon type="pushpin" style="margin-right: 10px;" /><span >操作按钮</span>
-            </div>
-          </a-form-item>
-
-          <!-- 名称 -->
-          <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              id="adminMenus-name"
-              allowClear
-              :maxLength="30"
-              placeholder="请输入名称30个字以内"
-              v-decorator="['formData.name', {
-                initialValue: formData.name,getValueFromEvent: $filterEmpty,
-                rules: [{ required: true, message: '请输入名称30个字以内!' },{pattern:'^[^<|>]{1,30}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
-            />
-          </a-form-item>
-          <!-- 路由英文名 -->
-          <!-- <a-form-item v-if="!formData.type||formData.type=='0'" label="路由英文名" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入路由英文名"
-              v-decorator="['formData.routeName', {
-                initialValue: formData.routeName,
-                rules: [{ required: true, message: '请输入路由英文名!' }] }]"
-            />
-          </a-form-item> -->
-          <!-- 路径 -->
-          <!-- <a-form-item v-if="!formData.type||formData.type=='0'" label="路径" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入路径"
-              v-decorator="['formData.routePath', {
-                initialValue: formData.routePath,
-                rules: [{ required: true, message: '请输入路径!' }] }]"
-            />
-          </a-form-item> -->
-          <!-- 请求路径 -->
-          <!-- <a-form-item v-if="formData.type==1" label="请求路径" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入请求路径"
-              v-decorator="['formData.urlPath', {
-                initialValue: formData.urlPath,
-                rules: [{ required: true, message: '请输入请求路径!' }] }]"
-            />
-          </a-form-item> -->
-          <!-- 前端权限编码 -->
-          <a-form-item label="前端权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              id="adminMenus-code"
-              allowClear
-              placeholder="请输入前端权限编码"
-              v-decorator="[
-                'formData.code',
-                {
-                  initialValue: formData.code,getValueFromEvent: $filterEmpty,
-                  rules: [{ required: true, message: '请输入前端权限编码!' }] },
-              ]"
-            />
-          </a-form-item>
-          <!-- 后台权限编码 -->
-          <a-form-item label="后台权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              id="adminMenus-permission"
-              allowClear
-              placeholder="请输入后台权限编码"
-              v-decorator="[
-                'formData.permission',
-                {
-                  initialValue: formData.permission,getValueFromEvent: $filterEmpty,
-                  rules: [{ required: formData.isLeaf, message: '请输入后台权限编码!' }] },
-              ]"
-            />
-          </a-form-item>
-          <!-- 图标 -->
-          <!-- <a-form-item v-if="!formData.type ||formData.type=='0' " label="图标" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入图标名称"
-              v-decorator="['formData.icon', {
-                initialValue: formData.icon,
-                rules: [] }]"
-            />
-          </a-form-item> -->
-          <!-- 前端组件 -->
-          <!-- <a-form-item v-if="!formData.type ||formData.type=='0'" label="前端组件" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入前端组件路径"
-              v-decorator="['formData.componentPath', {
-                initialValue: formData.componentPath,
-                rules: [{ required: true, message: '请输入前端组件路径!' }] }]"
-            />
-          </a-form-item> -->
-
-          <!-- 第三方链接 -->
-          <!-- <a-form-item v-if="!formData.type ||formData.type=='0'" label="第三方链接" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入第三方链接地址"
-              v-decorator="['formData.urlPath', {
-                initialValue: formData.urlPath,
-                rules: [] }]"
-            />
-          </a-form-item> -->
-
-          <!-- 排序值 -->
-          <a-form-item label="排序值" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              id="adminMenus-sort"
-              allowClear
-              type="number"
-              oninput="if(value.length>6)value=value.slice(0,6);if(value<0)value=0"
-              placeholder="请输入(0~999999)之间的排序值"
-              v-decorator="['formData.sort', {
-                initialValue: formData.sort,getValueFromEvent: $filterEmpty,
-                rules: [] }]"
-            />
-          </a-form-item>
-          <!-- 状态 -->
-          <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-radio-group
-              id="adminMenus-status"
-              name="radioGroup"
-              v-decorator="[
-                'formData.status',
-                {
-                  initialValue: formData.status,
-                  rules: [{ required: true, message: '请选择状态!' }] },
-              ]"
-            >
-              <a-radio :value="1">是</a-radio>
-              <a-radio :value="0">否</a-radio>
-            </a-radio-group>
-          </a-form-item>
-
-          <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-            <a-button type="primary" @click="handleSubmit()" id="adminMenus-handleSubmit">
-              保存
-            </a-button>
-            <a-button :style="{ marginLeft: '8px' }" @click="clear" id="adminMenus-clear">
-              重置
-            </a-button>
-          </a-form-item>
-        </a-form>
-
-      </a-col>
-    </a-row>
-    <childModal parentType="admin" :visible="showChildModal" @refresh="getYyMenuList" :data="parentData" @close="showChildModal = false"></childModal>
-  </a-card>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import childModal from './childModal.vue'
-import { getYyMenuList, saveYyMenu, deleteYyMenu } from '@/api/menu.js'
-
-export default {
-  name: 'Menu',
-  components: {
-    STable, VSelect, childModal
-  },
-  props: {},
-  data () {
-    return {
-      treeData: [],
-      dataList: [],
-      searchValue: '',
-      expandedKeys: [],
-      autoExpandParent: true,
-      selectedKeys: [],
-      selectedMenu: '', // 选择的树节点名
-      formLayout: 'horizontal',
-      form: this.$form.createForm(this, { name: 'menu' }),
-      showChildModal: false,
-      parentData: {}, // 父级菜单
-      formData: {
-        id: '',
-        name: '',
-        routePath: '',
-        icon: '',
-        routeName: '',
-        componentPath: '',
-        urlPath: '',
-        code: '',
-        permission: '',
-        sort: '',
-        type: '0',
-        isLeaf: true,
-        status: '' // 活动状态
-      }
-    }
-  },
-  computed: {
-    getMenus () {
-      this.generateList(this.treeData)
-      return this.treeData
-    }
-  },
-  methods: {
-    onExpand (expandedKeys) {
-      // console.log('onExpand', expandedKeys)
-      this.expandedKeys = expandedKeys
-      this.autoExpandParent = false
-    },
-
-    onSelect (selectedKeys, info) {
-      console.log('onSelect', info)
-      this.selectedKeys = selectedKeys
-      if (info.selected) {
-        const data = info.selectedNodes[0].data.props
-        const isLeaf = data.dataRef.children
-        // this.formData = Object.assign({}, this.formData, info.selectedNodes[0].data.props)
-        this.formData = {
-          id: data.id,
-          name: data.name,
-          routePath: data.routePath,
-          icon: data.icon,
-          routeName: data.routeName,
-          componentPath: data.componentPath,
-          urlPath: data.urlPath,
-          code: data.code,
-          permission: data.permission,
-          sort: data.sort,
-          type: data.type,
-          status: data.status,
-          isLeaf: !(isLeaf && isLeaf.length)
-        }
-
-        this.selectedMenu = this.formData.name
-        this.formData.status = Number(this.formData.status)
-      } else {
-        this.selectedMenu = ''
-        this.clear()
-      }
-    },
-    generateList (data) {
-      for (let i = 0; i < data.length; i++) {
-        const node = data[i]
-        const key = node.title
-        this.dataList.push({ key, title: key })
-        node.scopedSlots = { title: 'title' }
-        node.slots = { icon: node.type == '0' ? 'file' : 'pushpin' }
-
-        if (node.children) {
-          this.generateList(node.children)
-        }
-      }
-    },
-    getParentKey (key, tree) {
-      let parentKey
-      for (let i = 0; i < tree.length; i++) {
-        const node = tree[i]
-        if (node.children) {
-          if (node.children.some(item => item.title == key)) {
-            parentKey = node.key
-          } else if (this.getParentKey(key, node.children)) {
-            parentKey = this.getParentKey(key, node.children)
-          }
-        }
-      }
-      return parentKey
-    },
-    onChange (e) {
-      const value = e.target.value
-      const expandedKeys = this.dataList
-        .map(item => {
-          if (item.title.indexOf(value) > -1) {
-            return this.getParentKey(item.title, this.treeData)
-          }
-          return null
-        })
-        .filter((item, i, self) => item && self.indexOf(item) === i)
-      Object.assign(this, {
-        expandedKeys,
-        searchValue: value,
-        autoExpandParent: true
-      })
-    },
-    // 获取菜单树列表
-    getYyMenuList () {
-      getYyMenuList().then(res => {
-        console.log(res, 'res1111111')
-        if (res.status == 200) {
-          this.treeData = res.data
-          console.log(this.treeData, 'this.treeData')
-        }
-      })
-    },
-    // 添加子节点
-    addChild () {
-      if (!this.selectedMenu) {
-        return this.$message.warning('请先选择一个父级菜单')
-      } else if (this.formData.type == '1') {
-        return this.$message.warning('请选择一个页面级菜单')
-      }
-      this.showChildModal = true
-      this.parentData = this.formData
-    },
-    // 添加顶部菜单
-    addTitle () {
-      this.showChildModal = true
-      this.parentData = {}
-    },
-
-    //  取消选择
-    cancelSel () {
-      this.selectedKeys = []
-      this.selectedMenu = ''
-      this.clear()
-    },
-    // 清空列表
-    clear () {
-      this.form.resetFields()
-      this.formData.id = ''
-      this.formData.name = ''
-      this.formData.routePath = ''
-      this.formData.icon = ''
-      this.formData.routeName = ''
-      this.formData.componentPath = ''
-      this.formData.urlPath = ''
-      this.formData.sort = ''
-      this.formData.type = ''
-      this.formData.status = ''
-      this.formData.code = ''
-      this.formData.permission = ''
-      this.formData.isLeaf = true
-    },
-
-    // 删除数据
-    delect () {
-      if (!this.selectedKeys.length) {
-        return this.$message.warning('您还未选择要删除的数据')
-      }
-      const _this = this
-      console.log(_this.formData.id, '_this.formData.id')
-      this.$confirm({
-        title: '警告',
-        content: `确定要删除您选择的 ${_this.formData.name} 的数据吗?`,
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          deleteYyMenu({
-            id: _this.formData.id
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success('删除成功')
-              _this.getYyMenuList()
-            }
-          }).catch(() => {
-            _this.$message.success('删除失败, 请稍后重试')
-          })
-        }
-      })
-    },
-
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          console.log(values.formData, ' formData.type222222222')
-          saveYyMenu(Object.assign({ id: this.formData.id }, values.formData)).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              _this.getYyMenuList()
-              _this.clear()
-            } else {
-              // this.$message.warning(res.message)
-            }
-          })
-        }
-      })
-    },
-    handleCancel () {
-      this.clear()
-    }
-
-  },
-  mounted () {
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, { name: 'menu' })
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getYyMenuList()
-    })
-  },
-  watch: {
-
-  }
-}
-</script>
-
-<style>
-  .menu-box::-webkit-scrollbar{
-    width: 6px;
-    height: 6px ;
-  }
-
-  .menu-box::-webkit-scrollbar-thumb{
-    width: 6px;
-    height: 6px ;
-    border-radius: 4px;
-    -webkit-box-shadow: inset 0 0 2px #d1d1d1;
-    background: #e4e4e4;
-  }
-
-  .textCount{
-    border: 1px solid #91d5ff;
-    background-color: #e6f7ff;
-    border-radius: 5px;
-    padding: 5px 10px 5px 20px;
-    margin: 10px 0;
-    color: rgba(0, 0, 0, 0.85);
-  }
-  .imgSize{
-    color: #2d8cf0;
-    margin-left: 10px;
-    font-size: 14px;
-  }
-
-</style>

+ 0 - 344
src/views/bnSetting/menu/childModal.vue

@@ -1,344 +0,0 @@
-<template>
-  <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel" :centered="true">
-      <a-form :form="form" @submit="handleSubmit">
-        <!-- 上级菜单 -->
-        <a-form-item label="上级菜单" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <div >
-            <span >{{ parentTitle }}</span>
-          </div>
-
-        </a-form-item>
-        <!-- 类型 -->
-        <a-form-item label="类型" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-select
-            id="childModal-type"
-            allowClear
-            @change="selectChange"
-            :disabled="disabled"
-            v-decorator="[
-              'formData.type',
-              {
-                initialValue: formData.type,
-                rules: [{ required: true, message: '请选择状态!' }] },
-            ]"
-            style="width: 100%"
-            placeholder="请选择菜单类型"
-          >
-            <a-select-option :value="0">页面类型</a-select-option>
-            <a-select-option :value="1">按钮类型</a-select-option>
-          </a-select>
-        </a-form-item>
-
-        <!-- 名称 -->
-        <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入名称(最多30个字符)"
-            :maxLength="30"
-            id="childModal-name"
-            allowClear
-            v-decorator="['formData.name', {
-              initialValue: formData.name,getValueFromEvent: $filterEmpty,
-              rules: [{ required: true, message: '请输入名称(最多30个字符)!' },{pattern:'^[^<|>]{1,30}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
-          />
-        </a-form-item>
-        <!-- 路由英文名 -->
-        <!-- <a-form-item v-if="!formData.type" label="路由英文名" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入路由英文名"
-            v-decorator="['formData.routeName', {
-              initialValue: formData.routeName,
-              rules: [{ required: true, message: '请输入路由英文名!' }] }]"
-          />
-        </a-form-item> -->
-        <!-- 路径 -->
-        <!-- <a-form-item v-if="!formData.type" label="路径" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-             <a-input placeholder="请输入路径"
-                      v-decorator="['formData.routePath', {
-                        initialValue: formData.routePath,
-                        rules: [{ required: true, message: '请输入路径!' }] }]"
-             />
-           </a-form-item> -->
-        <!-- 请求路径 -->
-        <!-- <a-form-item v-if="formData.type==1" label="请求路径" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-             <a-input placeholder="请输入请求路径"
-                      v-decorator="['formData.urlPath', {
-                        initialValue: formData.urlPath,
-                        rules: [{ required: true, message: '请输入请求路径!' }] }]"
-             />
-           </a-form-item> -->
-        <!-- 前端权限编码 -->
-        <a-form-item label="前端权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入前端权限编码"
-            allowClear
-            id="childModal-code"
-            v-decorator="[
-              'formData.code',
-              {
-                initialValue: formData.code,getValueFromEvent: $filterEmpty,
-                rules: [{ required: true, message: '请输入前端权限编码!' }] },
-            ]"
-          />
-
-        </a-form-item>
-        <!-- 后台权限编码 -->
-        <a-form-item label="后台权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入后台权限编码"
-            allowClear
-            id="childModal-permission"
-            v-decorator="[
-              'formData.permission',
-              {initialValue: formData.permission,getValueFromEvent: $filterEmpty,},
-            ]"
-          />
-
-        </a-form-item>
-
-        <!-- 图标 -->
-        <!-- <a-form-item v-if="!formData.type" label="图标" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入图标名称"
-            v-decorator="['formData.icon', {
-              initialValue: formData.icon,
-              rules: [] }]"
-          />
-        </a-form-item> -->
-        <!-- 前端组件 -->
-        <!-- <a-form-item v-if="!formData.type" label="前端组件" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入前端组件路径"
-            v-decorator="['formData.componentPath', {
-              initialValue: formData.componentPath,
-              rules: [{ required: true, message: '请输入前端组件路径!' }] }]"
-          />
-        </a-form-item> -->
-
-        <!-- 第三方链接 -->
-        <!-- <a-form-item v-if="!formData.type" label="第三方链接" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入第三方链接地址"
-            v-decorator="['formData.urlPath', {
-              initialValue: formData.urlPath,
-              rules: [] }]"
-          />
-        </a-form-item> -->
-
-        <!-- 排序值 -->
-        <a-form-item label="排序值" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            type="number"
-			oninput="if(value.length>6)value=value.slice(0,6);if(value<0)value=0"
-            placeholder="请输入(0~999999)之间的排序值"
-            allowClear
-            id="childModal-sort"
-            v-decorator="['formData.sort', {
-              initialValue: formData.sort,getValueFromEvent: $filterEmpty,
-              rules: [] }]"
-          />
-        </a-form-item>
-        <!-- 连锁可用 -->
-        <!-- <a-form-item v-if="parentType=='store'" label="连锁可用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-radio-group
-            name="radioGroup"
-            v-decorator="[
-              'formData.chainOrgUse',
-              {
-                initialValue: formData.chainOrgUse,
-                rules: [{ required: true, message: '请选择!' }] },
-            ]"
-          >
-            <a-radio :value="1">是</a-radio>
-            <a-radio :value="0">否</a-radio>
-          </a-radio-group>
-        </a-form-item> -->
-        <!-- 单店可用 -->
-        <!-- <a-form-item v-if="parentType=='store'" label="单店可用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-radio-group
-            name="radioGroup"
-            v-decorator="[
-              'formData.singleOrgUse',
-              {
-                initialValue: formData.singleOrgUse,
-                rules: [{ required: true, message: '请选择!' }] },
-            ]"
-          >
-            <a-radio :value="1">是</a-radio>
-            <a-radio :value="0">否</a-radio>
-          </a-radio-group>
-        </a-form-item> -->
-        <!-- 状态 -->
-        <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-radio-group
-            name="radioGroup"
-            id="childModal-status"
-            v-decorator="[
-              'formData.status',
-              {
-                initialValue: formData.status,
-                rules: [{ required: true, message: '请选择状态!' }] },
-            ]"
-          >
-            <a-radio :value="1">是</a-radio>
-            <a-radio :value="0">否</a-radio>
-          </a-radio-group>
-        </a-form-item>
-
-        <a-form-item :wrapper-col="{ span: 12, offset: 6 }">
-          <a-button type="primary" @click="handleSubmit()" id="childModal-handleSubmit">
-            保存
-          </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()" id="childModal-handleCancel">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import { saveYyMenu, saveMdMenu } from '@/api/menu.js'
-export default {
-  name: 'ChildModal',
-  components: {
-    STable, VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    parentType: {
-      type: String,
-      default: ''
-    },
-    data: {
-      type: Object,
-      default: function () {
-        return {}
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible,
-      titleText: '',
-      disabled: false,
-      parentTitle: '',
-      formLayout: 'horizontal',
-      form: this.$form.createForm(this, { name: 'childModal' }),
-      formData: {
-        parentId: '',
-        name: '',
-        routePath: '',
-        icon: '',
-        routeName: '',
-        code: '',
-        permission: '',
-        componentPath: '',
-        urlPath: '',
-        sort: '',
-        type: undefined,
-        // chainOrgUse: 1,
-        // singleOrgUse: 1,
-        status: 1 // 活动状态
-      }
-    }
-  },
-  methods: {
-    cancel (e) {
-      this.clear()
-      this.$emit('close')
-    },
-
-    selectChange (val) {
-      this.formData.type = val
-      console.log(val)
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          console.log(values.formData, ' formData.type222222222')
-          const saveRequest = this.parentType == 'store' ? saveMdMenu : saveYyMenu
-          saveRequest(Object.assign(this.formData, values.formData)).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-          })
-        }
-      })
-    },
-    // 取消
-    handleCancel () {
-      this.cancel()
-    },
-    clear () {
-      this.form.resetFields()
-      this.parentTitle = ''
-      this.formData.parentId = ''
-      this.formData.name = ''
-      this.formData.routePath = ''
-      this.formData.icon = ''
-      this.formData.routeName = ''
-      this.formData.componentPath = ''
-      this.formData.urlPath = ''
-      this.formData.sort = ''
-      this.formData.type = ''
-      this.formData.status = 1
-      // this.formData.chainOrgUse = 1
-      // this.formData.singleOrgUse = 1
-      this.formData.code = ''
-      this.formData.permission = ''
-    }
-
-  },
-  mounted () {
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, { name: 'childModal' })
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        if (this.data.id) { // 添加子菜单
-          this.titleText = '新增子菜单'
-          this.disabled = false
-          console.log(this.data, 'this.data')
-          this.formData.parentId = this.data.id
-          this.parentTitle = this.data.name
-        } else { // 添加顶菜单
-          this.titleText = '新增顶菜单'
-          this.formData.type = 0
-          this.disabled = true
-        }
-      } else {
-        this.cancel()
-      }
-    }
-  }
-}
-</script>
-
-<style >
-  .modalBox{
-  }
-  .ant-modal-footer {
-    display: none;
-  }
-</style>

+ 0 - 505
src/views/bnSetting/menu/storeMenus.vue

@@ -1,505 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <a-row :gutter="24">
-      <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild" id="storeMenus-addChild">新增子菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTitle" id="storeMenus-addTitle">新增顶部菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="delect()" id="storeMenus-delect">删除</a-button>
-
-    </a-row>
-    <a-row :gutter="24">
-      <!-- 左侧菜单树列表 -->
-      <a-col :span="8">
-        <a-row :gutter="24" class="textCount">
-          <a-icon type="info-circle" style="color: #1890FF;margin-right: 10px;" />
-          <span>当前选择:<span style="color: #40a9ff;font-weight: 600;">{{ selectedMenu }}</span><span v-if="selectedKeys.length" class="imgSize" @click="cancelSel">取消选择</span></span>
-        </a-row>
-
-        <a-row :gutter="24" >
-          <a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" id="storeMenus-onChange"/>
-          <a-tree
-            @expand="onExpand"
-            :treeData="getMenus"
-            :expandedKeys="expandedKeys"
-            :autoExpandParent="autoExpandParent"
-            @select="onSelect"
-            :selectedKeys="selectedKeys"
-            showIcon
-          >
-            <template slot="title" slot-scope="{title}">
-              <span v-if="title.indexOf(searchValue) > -1">
-                {{ title.substr(0, title.indexOf(searchValue)) }}
-                <span style="color: #f50">{{ searchValue }}</span>
-                {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
-              </span>
-              <span v-else>{{ title }}</span>
-            </template>
-            <a-icon slot="file" type="file" />
-            <a-icon slot="pushpin" type="pushpin" />
-          </a-tree>
-        </a-row>
-      </a-col>
-      <!-- 右侧 -->
-      <a-col :span="16" >
-        <a-form :form="form" @submit="handleSubmit">
-          <!-- 类型 -->
-          <a-form-item label="类型" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <div v-if="!formData.type||formData.type=='0'">
-              <a-icon type="file" style="margin-right: 10px;" /><span >页面菜单</span>
-            </div>
-            <div v-if="formData.type=='1'">
-              <a-icon type="pushpin" style="margin-right: 10px;" /><span >操作按钮</span>
-            </div>
-          </a-form-item>
-
-          <!-- 名称 -->
-          <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              id="storeMenus-name"
-              allowClear
-              :maxLength="30"
-              placeholder="请输入名称30个字以内"
-              v-decorator="['formData.name', {
-                initialValue: formData.name,getValueFromEvent: $filterEmpty,
-                rules: [{ required: true, message: '请输入名称30个字以内!' },{pattern:'^[^<|>]{1,30}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
-            />
-          </a-form-item>
-          <!-- 路由英文名 -->
-          <!-- <a-form-item v-if="!formData.type||formData.type=='0'" label="路由英文名" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入路由英文名"
-              v-decorator="['formData.routeName', {
-                initialValue: formData.routeName,
-                rules: [{ required: true, message: '请输入路由英文名!' }] }]"
-            />
-          </a-form-item> -->
-          <!-- 路径 -->
-          <!-- <a-form-item v-if="!formData.type||formData.type=='0'" label="路径" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入路径"
-              v-decorator="['formData.routePath', {
-                initialValue: formData.routePath,
-                rules: [{ required: true, message: '请输入路径!' }] }]"
-            />
-          </a-form-item> -->
-          <!-- 请求路径 -->
-          <!-- <a-form-item v-if="formData.type==1" label="请求路径" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入请求路径"
-              v-decorator="['formData.urlPath', {
-                initialValue: formData.urlPath,
-                rules: [{ required: true, message: '请输入请求路径!' }] }]"
-            />
-          </a-form-item> -->
-          <!-- 前端权限编码 -->
-          <a-form-item label="前端权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              id="storeMenus-code"
-              allowClear
-              placeholder="请输入前端权限编码"
-              v-decorator="[
-                'formData.code',
-                {
-                  initialValue: formData.code,getValueFromEvent: $filterEmpty,
-                  rules: [{ required: true, message: '请输入前端权限编码!' }] },
-              ]"
-            />
-          </a-form-item>
-          <!-- 后台权限编码 -->
-          <a-form-item label="后台权限编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              id="storeMenus-permission"
-              allowClear
-              placeholder="请输入后台权限编码"
-              v-decorator="[
-                'formData.permission',
-                {
-                  initialValue: formData.permission,getValueFromEvent: $filterEmpty,
-                  rules: [{ required: formData.isLeaf, message: '请输入后台权限编码!' }] },
-              ]"
-            />
-          </a-form-item>
-          <!-- 图标 -->
-          <!-- <a-form-item v-if="!formData.type ||formData.type=='0' " label="图标" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入图标名称"
-              v-decorator="['formData.icon', {
-                initialValue: formData.icon,
-                rules: [] }]"
-            />
-          </a-form-item> -->
-          <!-- 前端组件 -->
-          <!-- <a-form-item v-if="!formData.type ||formData.type=='0'" label="前端组件" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入前端组件路径"
-              v-decorator="['formData.componentPath', {
-                initialValue: formData.componentPath,
-                rules: [{ required: true, message: '请输入前端组件路径!' }] }]"
-            />
-          </a-form-item> -->
-
-          <!-- 第三方链接 -->
-          <!-- <a-form-item v-if="!formData.type ||formData.type=='0'" label="第三方链接" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              placeholder="请输入第三方链接地址"
-              v-decorator="['formData.urlPath', {
-                initialValue: formData.urlPath,
-                rules: [] }]"
-            />
-          </a-form-item> -->
-
-          <!-- 排序值 -->
-          <a-form-item label="排序值" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-input
-              type="number"
-              oninput="if(value.length>6)value=value.slice(0,6);if(value<0)value=0"
-              allowClear
-              id="storeMenus-sort"
-              placeholder="请输入(0~999999)之间的排序值"
-              v-decorator="['formData.sort', {
-                initialValue: formData.sort,getValueFromEvent: $filterEmpty,
-                rules: [] }]"
-            />
-          </a-form-item>
-          <!-- 连锁可用 -->
-          <!-- <a-form-item label="连锁可用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-radio-group
-              name="radioGroup"
-              v-decorator="[
-                'formData.chainOrgUse',
-                {
-                  initialValue: formData.chainOrgUse,
-                  rules: [{ required: true, message: '请选择!' }] },
-              ]"
-            >
-              <a-radio :value="1">是</a-radio>
-              <a-radio :value="0">否</a-radio>
-            </a-radio-group>
-          </a-form-item> -->
-          <!-- 单店可用 -->
-          <!-- <a-form-item label="单店可用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-radio-group
-              name="radioGroup"
-              v-decorator="[
-                'formData.singleOrgUse',
-                {
-                  initialValue: formData.singleOrgUse,
-                  rules: [{ required: true, message: '请选择!' }] },
-              ]"
-            >
-              <a-radio :value="1">是</a-radio>
-              <a-radio :value="0">否</a-radio>
-            </a-radio-group>
-          </a-form-item> -->
-          <!-- 状态 -->
-          <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-            <a-radio-group
-              id="storeMenus-status"
-              name="radioGroup"
-              v-decorator="[
-                'formData.status',
-                {
-                  initialValue: formData.status,
-                  rules: [{ required: true, message: '请选择状态!' }] },
-              ]"
-            >
-              <a-radio :value="1">是</a-radio>
-              <a-radio :value="0">否</a-radio>
-            </a-radio-group>
-          </a-form-item>
-
-          <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-            <a-button type="primary" @click="handleSubmit()" id="storeMenus-handleSubmit">
-              保存
-            </a-button>
-            <a-button :style="{ marginLeft: '8px' }" @click="clear" id="storeMenus-clear">
-              重置
-            </a-button>
-          </a-form-item>
-        </a-form>
-
-      </a-col>
-    </a-row>
-    <childModal parentType="store" :visible="showChildModal" @refresh="getMdMenuList" :data="parentData" @close="showChildModal = false"></childModal>
-  </a-card>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import childModal from './childModal.vue'
-import { getMdMenuList, saveMdMenu, deleteMdMenu } from '@/api/menu.js'
-
-export default {
-  name: 'Menu',
-  components: {
-    STable, VSelect, childModal
-  },
-  props: {},
-  data () {
-    return {
-      treeData: [],
-      dataList: [],
-      searchValue: '',
-      expandedKeys: [],
-      autoExpandParent: true,
-      selectedKeys: [],
-      selectedMenu: '', // 选择的树节点名
-      formLayout: 'horizontal',
-      form: this.$form.createForm(this, { name: 'menu' }),
-      showChildModal: false,
-      parentData: {}, // 父级菜单
-      formData: {
-        id: '',
-        name: '',
-        routePath: '',
-        icon: '',
-        routeName: '',
-        componentPath: '',
-        urlPath: '',
-        code: '',
-        permission: '',
-        sort: '',
-        type: '0',
-        isLeaf: true,
-        // chainOrgUse: '',
-        // singleOrgUse: '',
-        status: '' // 活动状态
-      }
-    }
-  },
-  computed: {
-    getMenus () {
-      this.generateList(this.treeData)
-      return this.treeData
-    }
-  },
-  methods: {
-    onExpand (expandedKeys) {
-      // console.log('onExpand', expandedKeys)
-      this.expandedKeys = expandedKeys
-      this.autoExpandParent = false
-    },
-
-    onSelect (selectedKeys, info) {
-      console.log('onSelect', info)
-      this.selectedKeys = selectedKeys
-      if (info.selected) {
-        const data = info.selectedNodes[0].data.props
-        const isLeaf = data.dataRef.children
-        // this.formData = Object.assign({}, this.formData, info.selectedNodes[0].data.props)
-        this.formData = {
-          id: data.id,
-          name: data.name,
-          routePath: data.routePath,
-          icon: data.icon,
-          routeName: data.routeName,
-          componentPath: data.componentPath,
-          urlPath: data.urlPath,
-          code: data.code,
-          permission: data.permission,
-          sort: data.sort,
-          type: data.type,
-          // chainOrgUse: data.chainOrgUse,
-          // singleOrgUse: data.singleOrgUse,
-          status: data.status,
-          isLeaf: !(isLeaf && isLeaf.length)
-        }
-
-        this.selectedMenu = this.formData.name
-        this.formData.status = Number(this.formData.status)
-        // this.formData.chainOrgUse = Number(this.formData.chainOrgUse)
-        // this.formData.singleOrgUse = Number(this.formData.singleOrgUse)
-      } else {
-        this.selectedMenu = ''
-        this.clear()
-      }
-    },
-    generateList (data) {
-      for (let i = 0; i < data.length; i++) {
-        const node = data[i]
-        const key = node.title
-        this.dataList.push({ key, title: key })
-        node.scopedSlots = { title: 'title' }
-        node.slots = { icon: node.type == '0' ? 'file' : 'pushpin' }
-
-        if (node.children) {
-          this.generateList(node.children)
-        }
-      }
-    },
-    getParentKey (key, tree) {
-      let parentKey
-      for (let i = 0; i < tree.length; i++) {
-        const node = tree[i]
-        if (node.children) {
-          if (node.children.some(item => item.title == key)) {
-            parentKey = node.key
-          } else if (this.getParentKey(key, node.children)) {
-            parentKey = this.getParentKey(key, node.children)
-          }
-        }
-      }
-      return parentKey
-    },
-    onChange (e) {
-      const value = e.target.value
-      const expandedKeys = this.dataList
-        .map(item => {
-          if (item.title.indexOf(value) > -1) {
-            return this.getParentKey(item.title, this.treeData)
-          }
-          return null
-        })
-        .filter((item, i, self) => item && self.indexOf(item) === i)
-      Object.assign(this, {
-        expandedKeys,
-        searchValue: value,
-        autoExpandParent: true
-      })
-    },
-    // 获取菜单树列表
-    getMdMenuList () {
-      getMdMenuList().then(res => {
-        console.log(res, 'res1111111')
-        if (res.status == 200) {
-          this.treeData = res.data
-          console.log(this.treeData, 'this.treeData')
-        }
-      })
-    },
-    // 添加子节点
-    addChild () {
-      if (!this.selectedMenu) {
-        return this.$message.warning('请先选择一个父级菜单')
-      } else if (this.formData.type == '1') {
-        return this.$message.warning('请选择一个页面级菜单')
-      }
-      this.showChildModal = true
-      this.parentData = this.formData
-    },
-    // 添加顶部菜单
-    addTitle () {
-      this.showChildModal = true
-      this.parentData = {}
-    },
-    //  取消选择
-    cancelSel () {
-      this.selectedKeys = []
-      this.selectedMenu = ''
-      this.clear()
-    },
-    // 清空列表
-    clear () {
-      this.form.resetFields()
-      this.formData.id = ''
-      this.formData.name = ''
-      this.formData.routePath = ''
-      this.formData.icon = ''
-      this.formData.routeName = ''
-      this.formData.componentPath = ''
-      this.formData.urlPath = ''
-      this.formData.sort = ''
-      this.formData.type = ''
-	    // this.formData.chainOrgUse = ''
-	    // this.formData.singleOrgUse = ''
-      this.formData.status = ''
-      this.formData.code = ''
-      this.formData.permission = ''
-      this.formData.isLeaf = true
-    },
-
-    // 删除数据
-    delect () {
-      if (!this.selectedKeys.length) {
-        return this.$message.warning('您还未选择要删除的数据')
-      }
-      const _this = this
-      console.log(_this.formData.id, '_this.formData.id')
-      this.$confirm({
-        title: '警告',
-        content: `确定要删除您选择的 ${_this.formData.name} 的数据吗?`,
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          deleteMdMenu({
-            id: _this.formData.id
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success('删除成功')
-              _this.getMdMenuList()
-            }
-          }).catch(() => {
-            _this.$message.success('删除失败, 请稍后重试')
-          })
-        }
-      })
-    },
-
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          console.log(values.formData, ' formData.type222222222')
-          saveMdMenu(Object.assign({ id: this.formData.id }, values.formData)).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              _this.getMdMenuList()
-              _this.clear()
-            } else {
-              // this.$message.warning(res.message)
-            }
-          })
-        }
-      })
-    },
-    handleCancel () {
-      this.clear()
-    }
-
-  },
-  mounted () {
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, { name: 'menu' })
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getMdMenuList()
-    })
-  },
-  watch: {
-
-  }
-}
-</script>
-
-<style>
-  .menu-box::-webkit-scrollbar{
-    width: 6px;
-    height: 6px ;
-  }
-
-  .menu-box::-webkit-scrollbar-thumb{
-    width: 6px;
-    height: 6px ;
-    border-radius: 4px;
-    -webkit-box-shadow: inset 0 0 2px #d1d1d1;
-    background: #e4e4e4;
-  }
-
-  .textCount{
-    border: 1px solid #91d5ff;
-    background-color: #e6f7ff;
-    border-radius: 5px;
-    padding: 5px 10px 5px 20px;
-    margin: 10px 0;
-    color: rgba(0, 0, 0, 0.85);
-  }
-  .imgSize{
-    color: #2d8cf0;
-    margin-left: 10px;
-    font-size: 14px;
-  }
-
-</style>

+ 0 - 156
src/views/bnSetting/menusAuth.vue

@@ -1,156 +0,0 @@
-<template>
-  <div>
-    <a-form class="form-box" style="height: 500px;overflow: auto;margin-bottom: 15px;" :form="form" @submit="handleSubmit">
-      <a-tree
-        checkable
-        @check="onCheck"
-        @expand="onExpand"
-        :expandedKeys="expandedKeys"
-        :autoExpandParent="autoExpandParent"
-        v-model="checkedKeys"
-        :treeData="treeData"
-      />
-    </a-form>
-    <a-form-item :wrapper-col="{ offset: 3 }">
-      <a-button id="menusAuth-handleSubmit" type="primary" @click="handleSubmit()">
-        保存
-      </a-button>
-    </a-form-item>
-  </div>
-</template>
-
-<script>
-import { findLsMenu, saveLsMouldMenu, findDdMenu, saveDdMouldMenu } from '@/api/menuSet'
-export default {
-  name: 'MenusAuth',
-  props: {
-    types: {
-      type: String,
-      default: 'dd'
-    }
-  },
-  data () {
-    return {
-      menuIds: '',
-      treeData: [],
-      expandedKeys: [],
-      autoExpandParent: false,
-      checkedKeys: [],
-      checkedData: [],
-      formLayout: 'horizontal',
-      form: this.$form.createForm(this, { name: 'menuModal' })
-    }
-  },
-  methods: {
-    tabChange (v) {
-      console.log(v)
-    },
-    // 初始化树
-    treeInit (dr) {
-      this.treeData = dr.menuList
-      this.menuIds = dr.mould.menuIds
-      if (this.menuIds) {
-        const arr = this.menuIds.split(',')
-        this.checkedData = arr
-        // 找出叶子节点
-        this.findLeaf(this.treeData, arr)
-      }
-    },
-    // 获取连锁树数据
-    getfindLsMenu () {
-      findLsMenu().then(res => {
-        console.log(res, '+++++++++连锁+++++++++')
-        if (res.status == 200) {
-          this.treeInit(res.data)
-        }
-      })
-    },
-    // 获取单店树数据
-    getfindDdMenu () {
-      findDdMenu().then(res => {
-        console.log(res, '+++++++++单店+++++++++')
-        if (res.status == 200) {
-          this.treeInit(res.data)
-        }
-      })
-    },
-    onExpand (expandedKeys) {
-      this.expandedKeys = expandedKeys
-      this.autoExpandParent = false
-    },
-    onCheck (checkedKeys, info) {
-      this.checkedData = [...checkedKeys, ...info.halfCheckedKeys]
-      this.checkedKeys = checkedKeys
-    },
-    // 查找叶子节点
-    findLeaf (data, arr) {
-      for (let i = 0; i < data.length; i++) {
-        const node = data[i]
-        if (node.children) {
-          this.findLeaf(node.children, arr)
-        } else {
-          const hasNode = arr.find(item => {
-            return item == node.id
-          })
-          if (hasNode) {
-            this.expandedKeys.push(node.id)
-            this.checkedKeys.push(node.id)
-          }
-        }
-      }
-    },
-    // 保存提交
-    handleSubmit () {
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          if (this.checkedData.length == 0) {
-            return this.$message.warning('请先选择菜单')
-          }
-          const arr = this.checkedData.join(',')
-          if (this.types == 'dd') {
-            this.ddSave({ menuIds: arr })
-          } else {
-            this.lsSave({ menuIds: arr })
-          }
-        }
-      })
-    },
-    // 保存单店
-    ddSave (pars) {
-      saveDdMouldMenu(pars).then(res => {
-        console.log(res, 'res--save')
-        if (res.status + '' === '200') {
-          this.$message.success(res.message ? res.message : '保存成功')
-        } else {
-          // this.$message.warning(res.message)
-        }
-      })
-    },
-    // 保存连锁
-    lsSave (pars) {
-      saveLsMouldMenu(pars).then(res => {
-        console.log(res, 'res--save')
-        if (res.status + '' === '200') {
-          this.$message.success(res.message ? res.message : '保存成功')
-        } else {
-          // this.$message.warning(res.message)
-        }
-      })
-    }
-  },
-  mounted () {
-    // 单店
-    if (this.types == 'dd') {
-      this.getfindDdMenu()
-    } else {
-      this.getfindLsMenu()
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, { name: 'menu' })
-  }
-}
-</script>
-
-<style>
-</style>

+ 0 - 41
src/views/bnSetting/menusAuthTab.vue

@@ -1,41 +0,0 @@
-<template>
-  <div class="menusAuth-cons">
-    <a-tabs @change="tabChange" type="card">
-      <!-- <a-tab-pane tab="单店菜单设置" key="1">
-        <menusAuth types="dd"></menusAuth>
-      </a-tab-pane> -->
-      <a-tab-pane tab="连锁店菜单设置" key="2">
-        <menusAuth types="ls"></menusAuth>
-      </a-tab-pane>
-    </a-tabs>
-  </div>
-</template>
-
-<script>
-import menusAuth from './menusAuth.vue'
-export default {
-  name: 'MenusAuthTab',
-  components: {
-    menusAuth
-  },
-  data () {
-    return {}
-  },
-  methods: {
-    tabChange (v) {
-      console.log(v)
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-    })
-  }
-}
-</script>
-
-<style>
-  .menusAuth-cons{
-    background: #fff;
-    padding: 10px;
-  }
-</style>

+ 149 - 0
src/views/businessManage/partnerManage/addPartnerModal.vue

@@ -0,0 +1,149 @@
+<template>
+  <div>
+    <!-- 弹窗 -->
+    <a-modal
+      v-model="isShow"
+      @cancle="isShow=false"
+      :footer="null"
+      width="60%"
+      :centered="true"
+      :title="titleText">
+      <a-form id="components-form-demo-validate-other" ref="form" :form="form" v-bind="formItemLayout" @submit="handleSubmit">
+        <a-form-item label="商户名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="addSupplierModal-name"
+            :maxLength="30"
+            v-decorator="['formData.name', { initialValue: formData.name,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入供应商名称(最多30个字符)!' }] }]"
+            placeholder="请输入商户名称(最多30个字符)"
+            allowClear />
+        </a-form-item>
+        <a-form-item label="负责人名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="addSupplierModal-contactName"
+            :maxLength="30"
+            v-decorator="['formData.contactName', { initialValue: formData.contactName,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入联系人!' }] }]"
+            placeholder="请输入联系人"
+            allowClear />
+        </a-form-item>
+        <a-form-item label="负责人电话" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="addSupplierModal-contactPhone"
+            type="number"
+            v-decorator="['formData.contactPhone', { initialValue: formData.contactPhone,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入负责人电话!' }] }]"
+            placeholder="请输入负责人电话"
+            allowClear />
+        </a-form-item>
+        <a-form-item :wrapper-col="{ span: 12, offset: 6}" style="text-align: center;">
+          <a-button type="primary" html-type="submit" id="addSupplierModal-submit" style="margin-right: 15px">保存</a-button>
+          <a-button @click="isShow=false" style="margin-left: 15px" id="addSupplierModal-close">取消</a-button>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import {
+  SellerDetails,
+  saveSeller
+} from '@/api/businessManage.js'
+export default {
+  name: 'AddPartnerModal',
+  props: {
+    openSupplierModal: {
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: String,
+      default: ''
+    },
+    itemData: {
+	  type: Object,
+	  default: function () {
+	    return {}
+	  }
+    }
+  },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 14
+        }
+      },
+	  titleText: '新增',
+      isShow: this.openSupplierModal,
+      form: this.$form.createForm(this, { name: 'AddPartnerModal' }),
+      formData: {
+        name: '', // 名称
+        contactName: '', // 联系人
+        contactPhone: '' // 手机号码
+      }
+    }
+  },
+  methods: {
+    // 查看详情
+    getPageInfo () {
+      SellerDetails({
+        id: this.itemId
+      }).then(res => {
+        if (res.status == 200) {
+          // this.form.setFieldsValue({ 'formData': res.data })
+          this.form.setFieldsValue({ 'formData.name': res.data.name })
+          this.form.setFieldsValue({ 'formData.contactName': res.data.contactName })
+          this.form.setFieldsValue({ 'formData.contactPhone': res.data.contactPhone })
+        }
+      })
+    },
+    // 点击保存;
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const formData = Object.assign({}, this.itemData, this.formData, values.formData)
+          formData.id = _this.itemId
+          saveSeller(formData).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$emit('refresh')
+              setTimeout(function () {
+                _this.isShow = false
+              }, 300)
+            }
+          })
+        }
+      })
+    }
+  },
+  watch: {
+    openSupplierModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (val) {
+      if (!val) {
+        this.$emit('close')
+      } else {
+   	  this.form.resetFields()
+      }
+    },
+    itemId (newValue, oldValue) {
+      console.log(newValue, '----------id')
+      if (newValue && this.isShow) {
+        this.titleText = '编辑'
+        this.getPageInfo(newValue)
+      } else {
+   	  this.titleText = '新增'
+      }
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 287 - 0
src/views/businessManage/partnerManage/partnerManage.vue

@@ -0,0 +1,287 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 搜索框 -->
+    <div class="table-page-search-wrapper" style="margin-bottom: 15px;">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="商户名称"><a-input allowClear v-model.trim="queryParam.name" :maxLength="30" placeholder="请输入" id="OperateJournal-name"/></a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="负责人电话"><a-input allowClear v-model.trim="queryParam.contactPhone" :maxLength="30" placeholder="请输入" id="OperateJournal-name"/></a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="OperateJournal-refreshTable">查询</a-button>
+            <a-button type="" @click="resetForm" id="OperateJournal-resetForm">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="add"><a-button
+      type="primary"
+      icon="plus"
+      class="addBtn"
+      @click="showModal"
+      id="bannerSetting-showModal"
+      v-hasPermission="'B_partnerManage_add'">新增</a-button></div>
+    <!-- table列表 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <span slot="action" slot-scope="text, record">
+        <a-icon
+          v-if="$hasPermissions('B_partnerManage_edit') && record.state==0"
+          type="edit"
+          id="bannerSetting-handleEdit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)" />
+
+        <a-icon type="qrcode" title="查看二维码" @click="getQrCode(record)" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" />
+        <!-- <span v-if="!($hasPermissions('B_partnerManage_edit') && record.state==0) && !$hasPermissions('B_partnerManage_QRcode') ">--</span> -->
+      </span>
+      <span slot="state" slot-scope="text, record">
+        <a-switch
+          v-hasPermission="'B_partnerManage_enable'"
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          id="bannerSetting-changeFlagHandle"
+          :checked="record.state == 1 ? true : false"
+          @change="changeFlagHandle(text, record)"
+        />
+        <span v-if="!$hasPermissions('B_partnerManage_enable')">--</span>
+      </span>
+    </s-table>
+    <!-- 新增编辑弹窗 -->
+    <add-partner-modal :itemId="itemId" :itemData="itemData" :openSupplierModal="openSupplierModal" @refresh="$refs.table.refresh(true)" @close="cancel"></add-partner-modal>
+    <!-- 查看小程序码 -->
+    <a-modal
+      class="qrCodeModal"
+      title="查看二维码"
+      :width="500"
+      :footer="null"
+      :shName="shName"
+      :destroyOnClose="true"
+      @cancel="isQrCodeModal = false"
+      v-model="isQrCodeModal">
+      <img :src="qrCode" width="400" height="400" class="qrCode" />
+      <a-button type="primary" class="downQrCode" @click="downloadCode">下载二维码</a-button>
+      <!-- <a-button type="primary" class="downQrCode" @click="downloadCode">下载小程序码</a-button> -->
+    </a-modal>
+  </a-card>
+</template>
+
+<script>
+import { Upload, STable, VSelect } from '@/components'
+import { getSellerList, changeSellerStatus } from '@/api/businessManage.js'
+import addPartnerModal from './addPartnerModal.vue'
+import QRCode from 'qrcode'
+export default {
+  components: {
+    STable,
+    Upload,
+    VSelect,
+    addPartnerModal
+  },
+  data () {
+    return {
+      queryParam: {
+        name: '',
+        contactPhone: ''
+      },
+	  openSupplierModal: false, // 默认关闭弹窗
+	  isQrCodeModal: false, //  查看小程序码   弹框展示状态
+	  qrCode: '',
+	  itemId: null, // 编辑行id
+	  itemData: {}, // 编辑行数据
+	  shName: '', // 商户名称
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'no',
+          width: 60,
+          align: 'center'
+        },
+        {
+		  title: '创建时间',
+		  width: 200,
+		  dataIndex: 'createDate',
+		  align: 'center'
+        },
+        {
+          title: '商户名称',
+          width: 100,
+          dataIndex: 'name',
+          align: 'center'
+        },
+
+        {
+		  title: '负责人',
+		  width: 100,
+		  dataIndex: 'contactName',
+		  align: 'center'
+        },
+        {
+		  title: '负责人电话',
+		  width: 100,
+		  dataIndex: 'contactPhone',
+		  align: 'center',
+		  scopedSlots: {
+		    customRender: 'position'
+		  }
+        },
+        {
+          title: '状态',
+          width: 100,
+          dataIndex: 'state',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'state'
+          }
+        },
+        {
+          title: '操作',
+          align: 'center',
+          width: 100,
+          scopedSlots: {
+            customRender: 'action'
+          }
+        }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+		  const searchData = Object.assign(parameter, this.queryParam)
+		  console.log(this.queryOrderDate, 'this.queryOrderDate')
+        return getSellerList(
+          searchData
+        ).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+		   if (res.status == 200) {
+            for (let i = 0; i < res.data.list.length; i++) {
+			  const _item = res.data.list[i]
+			   _item.no = no + i + 1
+            }
+            return res.data
+		   }
+        })
+      },
+      formLayout: 'horizontal',
+      hideRequiredMark: false, // 是否显示必填的* 默认显示
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 14
+        }
+      }
+    }
+  },
+  methods: {
+    showModal () {
+      this.itemId = null
+	  this.itemData = {}
+      this.openSupplierModal = true
+    },
+    // 编辑
+    handleEdit (record) {
+	  this.itemId = record.id
+	  this.itemData = record
+	  console.log(this.itemId, '-------编辑')
+	  this.openSupplierModal = true
+    },
+    cancel () {
+	  this.itemId = null
+	  this.openSupplierModal = false
+    },
+    // 重置
+    resetForm () {
+      this.queryParam.name = ''
+	  this.queryParam.contactPhone = ''
+      this.$refs.table.refresh(true)
+    },
+    // 更改启用禁用状态
+    changeFlagHandle (text, record) {
+      console.log(text)
+      const _this = this
+      const _data = {
+    	  id: record.id,
+    	  flag: record.state == 1 ? '0' : '1'
+      }
+      changeSellerStatus(_data).then(res => {
+    	  if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+    	  } else {
+          record.state = !record.state
+    	  }
+      })
+    },
+    // 查看二维码
+    getQrCode (item) {
+      const _this = this
+      const opts = {
+        errorCorrectionLevel: 'H',
+        type: 'image/jpeg',
+        quality: 0.3,
+        margin: 1.5,
+        width: 240,
+        color: {
+          dark: '#000000',
+          light: '#ffffff'
+        }
+      }
+	  const url = 'officialPartnerNo=' + item.officialPartnerNo + '&codeType=hexiao'
+	  _this.shName = item.name
+      if (url) {
+        QRCode.toDataURL(url, opts, function (err, url) {
+          _this.qrCode = url
+		  _this.isQrCodeModal = true
+        })
+      }
+    },
+    // 查看小程序码
+    //  getQrCode (item) {
+	  // sellerQrCode({ officialPartnerNo: item.officialPartnerNo }).then(res => {
+	  //   if (res.status == 200) {
+	  //     this.qrCode = 'data:image/png;base64,' + res.data
+	  //     this.isQrCodeModal = true
+	  //   } else {
+	  //     this.qrCode = ''
+	  //   }
+	  // })
+    //  },
+    //  下载二维码
+    downloadCode (item) {
+	  const link = document.createElement('a')
+	  link.href = this.qrCode
+	  link.download = this.shName + '.png'
+	  link.click()
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.addBtn {
+  margin-bottom: 20px;
+}
+// 查看小程序码  弹框
+.qrCodeModal {
+	.qrCode {
+		display: block;
+		max-width: 100%;
+		margin: 0 auto;
+	}
+	.downQrCode {
+		display: block;
+		margin: 40px auto 30px;
+	}
+}
+</style>

+ 344 - 0
src/views/businessManage/userManage/userManage.vue

@@ -0,0 +1,344 @@
+<template>
+  <a-card :bordered="false">
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="用户名称" :label-col="{ span: 3 }" :wrapper-col="{ span: 12 }">
+              <a-input
+                allowClear
+                v-model.trim="queryParam.name"
+                placeholder="请输入用户名称"
+                id="userList-name"
+                :maxLength="30"
+              />
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="24">
+            <a-form-item label="手机号码" :label-col="{ span: 3 }" :wrapper-col="{ span: 12 }">
+              <a-input
+                allowClear
+                v-model.trim="queryParam.phone"
+                placeholder="请输入手机号码"
+                :maxLength="11"
+                id="userList-phone"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="所属商户" :label-col="{ span:3 }" :wrapper-col="{ span:12}">
+              <a-select
+                placeholder="请选择"
+                allowClear
+                v-model="queryParam.orgCode"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption"
+                @focus="handleFocus"
+                @blur="handleBlur"
+                @change="handleChange">
+                <a-select-option v-for="item in optionData" :key="item.orgCode" :value="item.orgCode">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="userList-handSubmit" style="margin-right: 10px;">查询</a-button>
+            <a-button type="" @click="reset" id="userList-reset">重置</a-button>
+          </a-col>
+
+        </a-row>
+        <a-row :gutter="48" style="margin-top: 25px;">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="用户状态" >
+              <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态" id="userList-check-enable-state"></v-select>
+            </a-form-item>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button type="primary" icon="plus" @click="openModal" id="userList-openModal" v-hasPermission="'B_userManage_add'">新增</a-button>
+    </div>
+
+    <s-table
+      ref="table"
+      size="default"
+      rowKey="id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <span slot="status" slot-scope="text, record">
+        <a-switch
+          v-hasPermission="'B_userManage_enable'"
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          v-model="record.loginFlag"
+          @change="changeFlagHandle(text, record)"
+          id="userList-changeFlagHandle" />
+        <span v-if="!$hasPermissions('B_userManage_enable')">--</span>
+      </span>
+      <span slot="action" slot-scope="text, record">
+        <a-icon
+          v-if="$hasPermissions('B_userManage_resetPwd') && record.loginFlag==1"
+          type="unlock"
+          title="重置密码"
+          class="actionBtn icon-orange"
+          @click="resetPassword(record)" />
+        <a-icon
+          v-if="$hasPermissions('B_userManage_edit')"
+          type="edit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)"
+        />
+        <a-icon
+          v-if="$hasPermissions('B_userManage_del') && record.loginFlag==0"
+          type="delete"
+          title="删除"
+          class="actionBtn icon-red"
+          @click="delect(record)"/>
+        <span v-if="!$hasPermissions('B_userManage_edit') && !($hasPermissions('B_userManage_resetPwd') && record.loginFlag==1) && !($hasPermissions('B_userManage_del') && record.loginFlag==0) ">--</span>
+      </span>
+    </s-table>
+    <userModal :visible="showModal" @refresh="$refs.table.refresh(true)" :itemId="itemId" @close="cancel"></userModal>
+  </a-card>
+</template>
+
+<script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import userModal from './userModal.vue'
+import { sellerList, resetPSD, updateEnableStatus, getPowerUserList, delectUserPower } from '@/api/userManage.js'
+export default {
+  name: 'UserManage',
+  components: {
+    STable,
+    VSelect,
+    userModal
+  },
+  data () {
+    return {
+      // 查询参数
+      queryParam: {
+        name: '',
+        phone: '',
+        loginFlag: '',
+        orgCode: undefined
+      },
+      showModal: false,
+      itemId: null, // 编辑行id
+	  optionData: [],
+      // 表头
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 60,
+        align: 'center'
+      },
+      {
+        title: '创建时间',
+        dataIndex: 'createDate',
+        width: 150,
+        align: 'center'
+      },
+      {
+        title: '用户名称',
+        dataIndex: 'name',
+        width: 100,
+        align: 'center'
+      },
+      {
+        title: '手机号码',
+        dataIndex: 'phone',
+        width: 100,
+        align: 'center'
+      },
+	  {
+	    title: '所属商户',
+	    dataIndex: 'org.name',
+	    width: 100,
+	    align: 'center'
+	  },
+	  // {
+	  //   title: '超级管理员',
+	  //   width: '100',
+	  //   align: 'center',
+	  //   scopedSlots: {
+	  //     customRender: 'status'
+	  //   }
+	  // },
+      // {
+      //   title: '角色',
+      //   width: '100',
+      //   align: 'center',
+      //   dataIndex: 'roleNames'
+      // },
+      {
+        title: '状态',
+        width: 100,
+        align: 'center',
+        scopedSlots: {
+          customRender: 'status'
+        }
+      },
+      {
+        title: '操作',
+        width: 100,
+        align: 'center',
+        scopedSlots: {
+          customRender: 'action'
+        }
+      }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getPowerUserList(Object.assign(parameter, this.queryParam)).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+          for (let i = 0; i < res.data.list.length; i++) {
+            const _item = res.data.list[i]
+            _item.no = no + i + 1
+            _item.loginFlag = _item.loginFlag + '' === '1'
+          }
+          return res.data
+        })
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getSellerList()
+    })
+  },
+  methods: {
+	  handleChange (value) {
+	    console.log(`selected ${value}`)
+	  },
+	  handleBlur () {
+	    console.log('blur')
+	  },
+	  handleFocus () {
+	    console.log('focus')
+	  },
+	  filterOption (input, option) {
+	    return (
+	      option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+	    )
+	  },
+	  cancel () {
+	    this.itemId = null
+	    this.showModal = false
+	  },
+	  // 获取合作商数据
+	  getSellerList () {
+		  sellerList().then(res => {
+			  console.log(res, '-----合作商')
+			  if (res.status == 200) {
+				  this.optionData = res.data || []
+			  }
+		  })
+	  },
+
+    // 刷新列表
+    refreshTable () {
+      this.$refs.table.refresh(true)
+    },
+    // 新建
+    openModal () {
+      this.showModal = true
+      this.itemData = {}
+    },
+    // 重置
+    reset () {
+      this.queryParam.name = ''
+      this.queryParam.phone = '',
+      this.queryParam.loginFlag = ''
+	   this.queryParam.orgCode = undefined
+      this.refreshTable()
+    },
+    // 重置密码
+    resetPassword (row) {
+      resetPSD({
+        id: row.id
+      }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+        }
+      })
+    },
+    // 删除
+    delect (row) {
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        centered: true,
+        content: '删除后无法恢复,确认删除?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          delectUserPower({
+            id: row.id
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    // getBizStr (storeBizList) {
+    //   const str = []
+    //   storeBizList.forEach(item => {
+    //     str.push(item.bizTypeName)
+    //   })
+    //   return str.join(',')
+    // },
+    handleEdit (row) {
+      console.log(row, 'row')
+	  this.itemId = row.id
+      this.showModal = true
+    },
+    // 修改状态
+    changeFlagHandle (text, record) {
+      const _data = {
+        id: record.id,
+        flag: record.loginFlag ? '1' : '0'
+      }
+      updateEnableStatus(_data).then(res => {
+        if (res.status + '' === '200') {
+          this.$message.success(res.message)
+        } else {
+          record.loginFlag = !record.loginFlag
+        }
+      })
+    }
+  }
+}
+</script>
+<style scoped>
+	.table-page-search-wrapper .ant-form-inline .ant-form-item {
+		margin-bottom: 0;
+	}
+
+	.action-button {
+		line-height: 40px;
+		white-space: nowrap;
+		padding: 5px 10px;
+		background-color: #1890ff;
+		border-radius: 4px;
+		color: #fff;
+		margin-right: 5px;
+	}
+
+	.red-text {
+		background-color: red;
+	}
+
+	.reset-text {
+		background-color: #31b50b;
+	}
+</style>

+ 369 - 0
src/views/businessManage/userManage/userModal.vue

@@ -0,0 +1,369 @@
+<template>
+  <div>
+    <a-modal
+      class="modalBox"
+      :title="titleText"
+      v-model="isshow"
+      @cancle="cancel"
+      width="60%"
+      :centered="true">
+      <a-form :form="form" @submit="handleSubmit">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <!-- 用户名称 -->
+            <a-form-item label="用户名称" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <a-input
+                placeholder="请输入用户名称(最多30个字符)"
+                allowClear
+                id="userModal-name"
+                :maxLength="30"
+                v-decorator="['formData.name', {
+                  initialValue: formData.name,getValueFromEvent: $filterEmpty,
+                  rules: [{ required: true, message: '请输入用户名称(最多30个字符)!' },{pattern:'^[^<|>]{1,30}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <!-- 手机号码 -->
+            <a-form-item label="手机号码" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <a-input
+                placeholder="请输入手机号码"
+                allowClear
+                :maxLength="11"
+                id="userModal-phone"
+                v-decorator="['formData.phone', {
+                  initialValue: formData.phone,getValueFromEvent: $filterEmpty,
+                  rules: [{ required: true, message: '请输入手机号码!' },{pattern:/^[1][0-9]{10}$/, message: '请输入正确的手机号码!'}] }]"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+
+        <a-row :gutter="24">
+          <!-- 性别 -->
+          <a-col :span="12">
+            <a-form-item label="性别" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <v-select
+                code="SEX"
+                id="userModal-sex"
+                v-decorator="[
+                  'formData.sex',
+                  {
+                    initialValue: formData.sex,
+                    rules: [{ required: true, message: '请选择性别!' }] },
+                ]"
+                allowClear ></v-select>
+
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="所属商户" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <a-select
+                placeholder="请选择"
+                allowClear
+                v-decorator="[
+                  'formData.orgCode',
+                  {
+                    initialValue: formData.orgCode,
+                    rules: [{ required: true, message: '请选择!' }] },
+                ]"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption"
+                @focus="handleFocus"
+                @blur="handleBlur"
+                @change="handleChange">
+                <a-select-option v-for="item in optionData" :key="item.orgCode" :value="item.orgCode" :disabled="item.state == '0' ? true : false">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <!-- 状态 -->
+          <a-col :span="12">
+            <a-form-item label="状态" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <a-radio-group
+                name="radioGroup"
+                id="userModal-loginFlag"
+                v-decorator="[
+                  'formData.loginFlag',
+                  {
+                    initialValue: formData.loginFlag,
+                    rules: [{ required: true, message: '请选择状态!' }] },
+                ]"
+              >
+                <a-radio :value="1">启用</a-radio>
+                <a-radio :value="0">禁用</a-radio>
+              </a-radio-group>
+
+            </a-form-item>
+          </a-col>
+          <!-- 状态 -->
+          <!-- <a-col :span="12">
+            <a-form-item label="是否为超级管理员" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <a-radio-group
+                name="radioGroup"
+                id="userModal-loginFlag"
+                v-decorator="[
+                  'formData.loginFlag',
+                  {
+                    initialValue: formData.loginFlag,
+                    rules: [{ required: true, message: '请选择!' }] },
+                ]"
+              >
+                <a-radio :value="1">是</a-radio>
+                <a-radio :value="0">否</a-radio>
+              </a-radio-group>
+
+            </a-form-item>
+          </a-col> -->
+        </a-row>
+
+        <!-- <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="角色" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
+              <a-select
+                id="userModal-roleNames"
+                v-decorator="[
+                  'formData.roleNames',
+                  {
+                    initialValue: formData.roleNames,
+                    rules: [{ required: true, message: '请选择角色!' }] },
+                ]"
+                mode="multiple"
+                style="width: 100%"
+                placeholder="请选择角色"
+                allowClear
+              >
+                <a-select-option
+                  v-for="item in roleList"
+                  :key="item.id"
+                  :disabled="item.isEnable == '0' ? true : false"
+                >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-item>
+          </a-col>
+
+        </a-row> -->
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="备注" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
+              <a-textarea
+                id="userModal-remarks"
+                :maxLength="500"
+                v-decorator="[
+                  'formData.remarks',
+                  {
+                    initialValue: formData.remarks,getValueFromEvent: $filterEmpty,
+                    rules: [] },
+                ]"
+                style="min-height: 50px;"
+                placeholder="请输入备注(最多500个字符)"
+                autosize />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-form-item :wrapper-col="{ span: 24, offset: 10}">
+          <a-button type="primary" @click="handleSubmit()" id="userModal-handleSubmit" :style="{ marginRight: '15px' }">
+            保存
+          </a-button>
+          <a-button :style="{ marginLeft: '15px' }" @click="handleCancel()" id="userModal-handleCancel">
+            取消
+          </a-button>
+        </a-form-item>
+      </a-form>
+
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { sellerList, saveUserPower, slelerDetails } from '@/api/userManage.js'
+export default {
+  name: 'UserModal',
+  components: {
+    STable, VSelect
+  },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      titleText: '新增用户',
+      isshow: this.visible,
+      formLayout: 'horizontal',
+      form: this.$form.createForm(this, { name: 'miniForm' }),
+      optionData: [],
+      formData: {
+        // roleNames: undefined, // 角色
+        name: '',
+        loginFlag: '', // 活动状态
+        phone: '',
+        sex: '',
+        remarks: '',
+        orgCode: undefined
+      }
+
+    }
+  },
+  methods: {
+    cancel (e) {
+      this.clear()
+      this.$emit('close')
+    },
+    handleChange (value) {
+	    console.log(`selected ${value}`)
+	  },
+	  handleBlur () {
+	    console.log('blur')
+	  },
+	  handleFocus () {
+	    console.log('focus')
+	  },
+	  filterOption (input, option) {
+	    return (
+	      option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+	    )
+	  },
+	  // 获取合作商数据
+	  getSellerList () {
+		  sellerList().then(res => {
+			  console.log(res, '-----合作商')
+			  if (res.status == 200) {
+				  this.optionData = res.data || []
+			  }
+		  })
+	  },
+	  getPageInfo () {
+	    slelerDetails({
+	      id: this.itemId
+	    }).then(res => {
+	      if (res.status == 200) {
+			  console.log(res, '-------------返回数据')
+	        this.form.setFieldsValue({ 'formData': res.data })
+	        this.form.setFieldsValue({ 'formData.loginFlag': Number(res.data.loginFlag) })
+	        // this.form.setFieldsValue({ 'formData.name': res.data.name })
+	        // this.form.setFieldsValue({ 'formData.phone': res.data.phone })
+	        // this.form.setFieldsValue({ 'formData.sex': res.data.sex })
+	        // this.form.setFieldsValue({ 'formData.org.name': res.data.org.name })
+	        // this.form.setFieldsValue({ 'formData.remarks': res.data.remarks })
+	      }
+	    })
+	  },
+    // 保存提交
+    handleSubmit () {
+      const _this = this
+      this.form.validateFields((err, values) => {
+		  if (!err) {
+		    const formData = Object.assign({}, this.formData, values.formData)
+          formData.id = _this.itemId
+		    saveUserPower(formData).then(res => {
+		      console.log(res, 'rrrrrrrrr')
+		      if (res.status == 200) {
+		        _this.$message.success(res.message)
+              _this.$emit('refresh')
+		        setTimeout(function () {
+		          _this.isshow = false
+		        }, 300)
+		      }
+		    })
+		  }
+      })
+      // const _this = this
+      // this.form.validateFields((err, values) => {
+      //   console.log(values, 'values222')
+      //   if (!err) {
+      //     // values.formData.roleNames = values.formData.roleNames.join(',')
+      //     console.log(values.formData, ' formData.type222222222')
+      //     console.log(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData))
+      //     saveUserPower(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData)).then(res => {
+      //       console.log(res, 'res--save')
+      //       if (res.status + '' === '200') {
+      //         this.$message.success(res.message ? res.message : '保存成功')
+      //         this.$emit('refresh')
+      //         setTimeout(function () {
+      //           _this.cancel()
+      //         }, 300)
+      //       } else {
+      //         // this.$message.error(res.message)
+      //       }
+      //     })
+      //   }
+      // })
+    },
+    // 取消
+    handleCancel () {
+      this.cancel()
+    },
+    clear () {
+      this.form.resetFields()
+      delete this.formData.id
+      // this.formData.roleNames = []
+      this.formData.name = ''
+      this.formData.loginFlag = ''
+      this.formData.phone = ''
+      this.formData.sex = ''
+      this.formData.remarks = ''
+	  this.formData.orgCode = undefined
+    }
+
+    // 获取角色列表接口
+    // getRoleList () {
+    //   getRoleList().then(res => {
+    //     console.log(res, 'res--role')
+    //     if (res.status + '' === '200') {
+    //       this.roleList = res.data
+    //     } else {
+    //       this.$message.warning(res.message)
+    //     }
+    //   })
+    // }
+
+  },
+  mounted () {
+    // this.getRoleList()
+    this.getSellerList()
+  },
+  beforeCreate () {
+    this.form = this.$form.createForm(this, { name: 'miniForm' })
+  },
+  watch: {
+    visible (newValue, oldValue) {
+      this.isshow = newValue
+    },
+    isshow (val) {
+      if (!val) {
+		  this.$emit('close')
+      } else {
+        this.form.resetFields()
+      }
+    },
+    itemId (newValue, oldValue) {
+	  console.log(newValue, '----------id')
+	  if (newValue && this.isshow) {
+	    this.titleText = '编辑'
+	    this.getPageInfo(newValue)
+	  } else {
+	  this.titleText = '新增用户'
+	  }
+    }
+  }
+}
+</script>
+
+<style >
+  .modalBox{
+  }
+  .ant-modal-footer {
+    display: none;
+  }
+</style>

+ 263 - 0
src/views/equipmentManage/boxSetting/AddBoxModal.vue

@@ -0,0 +1,263 @@
+<template>
+  <div>
+    <v-select
+      id="addBoxModal-status"
+      ref="rubbishType"
+      code="RUBBISH_TYPE"
+      placeholder="请选择分类"
+      v-show="false"
+    >
+    </v-select>
+    <a-modal
+      class="modalBox"
+      :title="titleText"
+      v-model="isshow"
+      :footer="null"
+      @cancle="cancel"
+      :width="800"
+      :centered="true">
+      <a-form-model
+        ref="ruleForm"
+        :model="formData"
+        :rules="rules"
+      >
+        <!-- 箱体类型名称 -->
+        <a-form-model-item label="箱体类型名称" ref="name" prop="name" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+          <a-input
+            placeholder="请输入箱体类型名称(最多30个字符)"
+            allowClear
+            :maxLength="30"
+            id="addBoxModal-name"
+            v-model="formData.name"
+          />
+        </a-form-model-item>
+        <!-- 内置箱体数量 -->
+        <a-form-model-item label="内置箱体数量" ref="boxNum" prop="boxNum" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+          <v-select
+            ref="orderStatus"
+            id="addBoxModal-status"
+            code="BOX_NUM"
+            :disabled="id?true:false"
+            @change="handleNumChange"
+            placeholder="请选择"
+            allowClear
+            v-model="formData.boxNum"
+          >
+          </v-select>
+        </a-form-model-item>
+        <!-- 箱体限投 -->
+        <a-row
+          type="flex"
+          align="middle"
+          v-for="(item, index) in formData.deviceTypeBoxList"
+          :key="index"
+          v-if="formData.deviceTypeBoxList.length"
+        >
+          <a-col span="12">
+            <!-- 投放开始时间 -->
+            <a-form-model-item
+              :label=" '内置'+(index+1)+'号箱限投(g)'"
+              :required="true"
+              :label-col=" { span: 10 }"
+              :wrapper-col=" { span: 14 }"
+              :prop="'deviceTypeBoxList.' + index + '.maxWeight'"
+              :rules="{
+                required: true,
+                message: '请输入限投数量',
+                trigger: ['blur','change'],
+              }"
+            >
+              <a-input-number
+                :id="'addBoxModal-maxWeight'+index"
+                :min="1"
+                :max="500000"
+                :precision="0"
+                style="width: 200px;"
+                placeholder="请输入数字(最大500000)"
+                v-model="item.maxWeight"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col span="1"></a-col>
+          <a-col span="9">
+            <!-- 请选择分类 -->
+            <a-form-model-item
+              :label="''"
+              :required="false"
+              :wrapper-col="{ span: 18 }"
+              :prop="'deviceTypeBoxList.' + index + '.rubbishType'"
+              :rules="{
+                required: true,
+                message: '请选择分类',
+                trigger: ['change'],
+              }"
+            >
+              <a-select
+                :id="'addBoxModal-status' + index"
+                placeholder="请选择分类"
+                allowClear
+                v-model="item.rubbishType">
+                <a-select-option v-for="item in $refs.rubbishType.getOptionDatas()" :key="item.code" :value="item.code">{{ item.dispName }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-form-model-item :wrapper-col="{ span: 24, offset: 10 }">
+          <a-button type="primary" @click="handleSubmit()" id="addBoxModal-handleSubmit" :style="{ marginRight: '15px' }">
+            保存
+          </a-button>
+          <a-button :style="{ marginLeft: '15px' }" @click="handleCancel()" id="addBoxModal-handleCancel">
+            取消
+          </a-button>
+        </a-form-model-item>
+      </a-form-model>
+
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  saveBoxSetting,
+  viewBoxSetting
+} from '@/api/boxSetting.js'
+export default {
+  name: 'RoleModal',
+  components: {
+    STable,
+    VSelect
+  },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    id: {
+      type: [String, Number],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      titleText: '新增',
+      isshow: this.visible,
+      formData: {
+        name: '',
+        boxNum: '',
+        deviceTypeBoxList: []
+      },
+      rules: {
+        name: [{ required: true, message: '请输入箱体类型名称', trigger: 'blur' }],
+        boxNum: [{ required: true, message: '请选择内置箱体数量', trigger: 'blur' }]
+      }
+    }
+  },
+  methods: {
+    // 内置箱体选择修改
+    handleNumChange (v) {
+      console.log(v, 'vvvvvvvvvv')
+      this.formData.deviceTypeBoxList = []
+      for (let i = 0; i < v; i++) {
+        this.formData.deviceTypeBoxList.push({
+          maxWeight: '',
+          rubbishType: undefined,
+          boxCode: i + 1
+        })
+      }
+      this.$refs.ruleForm.clearValidate()
+    },
+    // 查详情
+    getDetailData (id) {
+      viewBoxSetting({
+        id: id
+      }).then(res => {
+        if (res.status == 200) {
+          this.formData = Object.assign({}, this.formData, res.data)
+        }
+      })
+    },
+    // 保存提交
+    handleSubmit () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        console.log(valid, this.formData, ' formData.type222222222')
+        if (valid) {
+          const params = JSON.parse(JSON.stringify(this.formData))
+          // 编辑
+          if (this.id) {
+            params.deviceTypeBoxList.map(item => {
+              delete item.id
+            })
+          }
+          console.log(params)
+          saveBoxSetting(params).then(res => {
+            console.log(res, 'res--save')
+            if (res.status == '200') {
+              this.$message.success(res.message)
+              this.$emit('refresh')
+              setTimeout(function () {
+                _this.cancel()
+              }, 300)
+            } else {
+              // this.$message.error(res.message)
+            }
+          })
+        }
+      })
+    },
+    // 取消
+    handleCancel () {
+      this.cancel()
+    },
+    cancel (e) {
+      this.clear()
+      this.$emit('close')
+    },
+    clear () {
+      this.$refs.ruleForm.clearValidate()
+      this.formData.name = ''
+      this.formData.boxNum = ''
+      this.formData.deviceTypeBoxList = []
+      delete this.formData.id
+      delete this.formData.deviceTypeNo
+    }
+  },
+  watch: {
+    visible (newValue, oldValue) {
+      this.isshow = newValue
+    },
+    isshow (newValue, oldValue) {
+      if (newValue) {
+        if (this.id) { // 编辑
+          this.titleText = '编辑'
+          this.getDetailData(this.id)
+        } else {
+          this.titleText = '新增'
+        }
+      } else {
+        this.cancel()
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+	.modalBox {}
+
+	.ant-modal-footer {
+		display: none;
+	}
+
+	.dynamic-delete-button {
+		margin-right: 20px;
+	}
+
+	.linenums {
+		padding: 0 20px;
+	}
+</style>

+ 282 - 0
src/views/equipmentManage/boxSetting/boxSetting.vue

@@ -0,0 +1,282 @@
+<template>
+  <a-card :bordered="false" class="network-table-page-search-wrapper">
+    <div class="network-searchForm">
+      <a-form layout="inline" :form="form" ref="form" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="箱体类型名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="boxSetting-name" allowClear :maxLength="30" v-model="queryParam.name" placeholder="请输入箱体类型名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="boxSetting-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="boxSetting-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button type="primary" icon="plus" @click="openModal" id="boxSetting-add" v-hasPermission="'B_boxSetting_add'">新增</a-button>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-icon
+          type="edit"
+          id="boxSetting-edit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)"
+          v-hasPermission="'B_boxSetting_edit'" />
+        <a-icon
+          type="delete"
+          id="boxSetting-del"
+          title="删除"
+          class="actionBtn icon-red"
+          @click="delect(record)"
+          v-if="$hasPermissions('B_boxSetting_del') && !record.isEnable"/>
+        <span v-if="!$hasPermissions('B_boxSetting_edit') && (!$hasPermissions('B_boxSetting_del') && !record.isEnable)">--</span>
+      </template>
+    </s-table>
+    <!-- 新增/编辑 弹窗 -->
+    <add-box-modal :visible="openBoxModal" :id="itemId" @refresh="refreshTable" @close="openBoxModal = false"></add-box-modal>
+  </a-card>
+</template>
+
+<script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import AddBoxModal from './AddBoxModal.vue'
+import {
+  getBoxList,
+  deleteBoxSetting
+} from '@/api/boxSetting.js'
+export default {
+  name: 'Equipment',
+  components: {
+    STable,
+    VSelect,
+    AddBoxModal
+  },
+  data () {
+    return {
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: {
+          span: 7
+        },
+        wrapperCol: {
+          span: 17
+        }
+      },
+      // 查询参数
+      queryParam: {
+        name: '' // 箱体类型
+      },
+      openBoxModal: false, // 新增/编辑弹窗
+      itemId: '', //  箱体id
+      // 表头
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 70,
+        align: 'center'
+      },
+      {
+        title: '创建时间',
+        dataIndex: 'createDate',
+        width: 180,
+        align: 'center'
+      },
+      {
+        title: '箱体类型名称',
+        dataIndex: 'name',
+        width: 200,
+        align: 'center'
+      },
+      {
+        title: '内置箱体数量(个)',
+        dataIndex: 'boxNum',
+        width: 80,
+        align: 'center'
+      },
+      {
+        title: '内置箱体投放限重(g)/ 对应资源分类',
+        children: [{
+          title: '1号箱',
+          dataIndex: 'one',
+          width: 120,
+          align: 'center',
+		  customRender: (record, text) => {
+		    return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+		  }
+        },
+        {
+          title: '2号箱',
+          dataIndex: 'two',
+          width: 120,
+          align: 'center',
+		  customRender: (record, text) => {
+		    return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+		  }
+        },
+        {
+          title: '3号箱',
+          dataIndex: 'three',
+          width: 120,
+          align: 'center',
+          customRender: (record, text) => {
+            return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+          }
+        },
+        {
+          title: '4号箱',
+          dataIndex: 'four',
+          width: 120,
+          align: 'center',
+          customRender: (record, text) => {
+            return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+          }
+        },
+        {
+          title: '5号箱',
+          dataIndex: 'five',
+          width: 120,
+          align: 'center',
+          customRender: (record, text) => {
+            return record ? (record.maxWeight ? (record.maxWeight + '/' + record.rubbishTypeDictValue) : '--') : '--'
+          }
+        }
+        ]
+      },
+      {
+        title: '操作',
+        scopedSlots: {
+          customRender: 'action'
+        },
+        width: 120,
+        align: 'center'
+      }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getBoxList(Object.assign(parameter, this.queryParam)).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            return res.data
+          }
+        })
+      }
+
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.queryParam.name = ''
+    })
+  },
+  methods: {
+    // 重置
+    handleReset () {
+      console.log('重置', this.queryParam)
+      this.form.resetFields()
+	  this.queryParam.name = ''
+      this.$refs.table.refresh(true)
+    },
+    // 新建
+    openModal () {
+      this.openBoxModal = true
+      this.itemId = ''
+    },
+    // 编辑
+    handleEdit (item) {
+      this.openBoxModal = true
+	    this.itemId = item.id
+    },
+    // 新增/编辑 后刷新列表
+    refreshTable () {
+      if (this.itemId) {
+        this.$refs.table.refresh()
+      } else {
+        this.$refs.table.refresh(true)
+      }
+    },
+    // 删除
+    delect (row) {
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        centered: true,
+        content: '删除后无法恢复,确认删除?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          deleteBoxSetting({
+            id: row.id
+          }).then(res => {
+            console.log(res, 'res1111')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+	.network-table-page-search-wrapper {
+		.network-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+			}
+
+			// 搜索框的下间距
+			.ant-form-item {
+				margin-bottom: 10px;
+			}
+
+			.handle-btn {
+				margin-top: 4px;
+			}
+
+			.serach-btn {
+				margin-right: 10px;
+			}
+		}
+
+		.actionBtn {
+			font-size: 20px;
+			padding: 0 10px;
+		}
+
+		// 合计
+		.total {
+			margin: 15px 0 25px;
+			width: 100%;
+			background-color: #e6f7ff;
+			border: 1px solid #91d5ff;
+			padding: 8px 15px 8px 27px;
+			border-radius: 4px;
+
+			.iconImg {
+				color: #1890FF;
+				margin-right: 10px;
+			}
+		}
+	}
+</style>

+ 172 - 0
src/views/equipmentManage/equipment/equipment.vue

@@ -0,0 +1,172 @@
+<template>
+  <a-card :bordered="false" class="equipment-table-page-search-wrapper">
+    <div class="equipment-searchForm">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="设备编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="equipment-srcDeviceCode" allowClear :maxLength="120" v-model="queryParam.srcDeviceCode" placeholder="请输入设备编号" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="equipment-stationName" allowClear :maxLength="30" v-model="queryParam.stationName" placeholder="请输入网点名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="equipment-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="equipment-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 合计 -->
+    <div class="total">
+      <a-icon type="info-circle" class="iconImg" />
+      <strong>总计:</strong><span v-model="orderTotal">{{ orderTotal || 0 }} 条</span>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 设备状态 -->
+      <template slot="onlineFlag" slot-scope="text, record">
+        <span :class="record.onlineFlag==0 ? 'red' : record.onlineFlag==1 ? 'green' : ''">{{ record.onlineFlag == 0 ? '离线' : record.onlineFlag == 1 ? '在线' : '--' }}</span>
+      </template>
+      <!-- 工作状态 -->
+      <template slot="state" slot-scope="text, record">
+        <span :class="record.state==0 ? 'red' : record.state==1 ? 'green' : ''">{{ record.state == 0 ? '已禁用' : record.state == 1 ? '已启用' : '--' }}</span>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button
+          v-if="$hasPermissions('B_equipment_log')"
+          type="primary"
+          class="btn-edit-s"
+          id="equipment-log-btn"
+          @click="checkLog(record)">掉线日志</a-button>
+        <span v-else>--</span>
+      </template>
+    </s-table>
+    <!-- 掉线日志 -->
+    <equipment-log-modal :openModal="openLogModal" :srcDeviceCode="srcDeviceCode" @close="closeModal" />
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import equipmentLogModal from './logModal.vue'
+import { deviceList } from '@/api/device'
+export default {
+  name: 'Equipment',
+  components: { STable, VSelect, equipmentLogModal },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+      // 查询参数
+      queryParam: {
+        srcDeviceCode: '', // 设备编号
+        stationName: '' //  网点名称
+      },
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center' },
+        { title: '地址', dataIndex: 'stationAddress', width: 200, align: 'center' },
+        { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
+        { title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center' },
+        { title: '内置箱体数', dataIndex: 'boxNum', width: 200, align: 'center' },
+        { title: '版本', dataIndex: 'boxVersion', width: 200, align: 'center' },
+        { title: '设备状态', scopedSlots: { customRender: 'onlineFlag' }, width: 150, align: 'center' },
+        { title: '工作状态', scopedSlots: { customRender: 'state' }, width: 150, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return deviceList(Object.assign(parameter, this.queryParam)).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            this.orderTotal = res.data.count
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            return res.data
+          }
+        })
+      },
+      orderTotal: '', // 合计开单数量
+      openLogModal: false, //  掉线日志 弹框
+      srcDeviceCode: null //  设备编号
+    }
+  },
+  methods: {
+    // 重置
+    handleReset () {
+      this.queryParam.srcDeviceCode = ''
+      this.queryParam.stationName = ''
+      this.$refs.table.refresh(true)
+    },
+    //  查看掉线日志
+    checkLog (row) {
+      this.srcDeviceCode = row ? row.srcDeviceCode : null
+      this.openLogModal = true
+    },
+    closeModal () {
+      this.srcDeviceCode = null
+      this.openLogModal = false
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .equipment-table-page-search-wrapper{
+    .equipment-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+    .actionBtn {
+    	font-size: 20px;
+    	padding: 0 10px;
+    }
+    // 合计
+    .total {
+    	margin: 15px 0 25px;
+    	width: 100%;
+    	background-color: #e6f7ff;
+    	border: 1px solid #91d5ff;
+    	padding: 8px 15px 8px 27px;
+    	border-radius: 4px;
+    	.iconImg {
+    		color: #1890FF;
+    		margin-right: 10px;
+    	}
+    }
+    .blue {
+    	color: #1890FF;
+    }
+    .green {
+    	color: #16b50e;
+    }
+    .red {
+    	color: red;
+    }
+  }
+</style>

+ 165 - 0
src/views/equipmentManage/equipment/logModal.vue

@@ -0,0 +1,165 @@
+<template>
+  <a-modal
+    centered
+    class="equipment-log-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="modalTit"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="1000">
+    <!-- 查询条件 -->
+    <a-form
+      id="logistics-form"
+      :form="form"
+      ref="form"
+      v-bind="formItemLayout">
+      <a-row :gutter="48">
+        <a-col :span="8">
+          <a-form-item label="离线时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+            <a-range-picker
+              id="equipment-log-time"
+              v-model="time"
+              :format="dateFormat"
+              :placeholder="['开始时间','结束时间']"
+              :disabledDate="disabledDate"
+              @change="onChange" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="8">
+          <a-button class="handle-btn serach-btn" id="network-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+        </a-col>
+      </a-row>
+    </a-form>
+    <!-- 掉线记录 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered></s-table>
+  </a-modal>
+</template>
+
+<script>
+import getDate from '@/libs/getDate.js'
+import moment from 'moment'
+import { STable } from '@/components'
+import { deviceLogList } from '@/api/device'
+export default {
+  name: 'EquipmentModal',
+  components: { STable },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    srcDeviceCode: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  computed: {
+    modalTit () {
+      return this.srcDeviceCode + '-掉线日志'
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null // 结束时间
+      },
+      // 将默认当天时间日期回显在时间选择框中
+      time: [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ],
+      dateFormat: 'YYYY-MM-DD',
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '离线时间', dataIndex: 'createDate', width: 200, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const searchData = Object.assign(parameter, this.queryParam)
+        if (this.time && this.time.length) {
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        } else {
+          searchData.beginDate = ''
+          searchData.endDate = ''
+        }
+        searchData.srcDeviceCode = this.srcDeviceCode
+        searchData.onlineFlag = 0
+        return deviceLogList(searchData).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+              _item.status = _item.status + '' === '1'
+            }
+            return res.data
+          }
+        })
+      }
+    }
+  },
+  methods: {
+    moment,
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 离线时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    },
+    srcDeviceCode (newValue, oldValue) {
+      this.queryParam.beginDate = getDate.getRecentday().starttime
+      this.queryParam.endDate = getDate.getRecentday().endtime
+      this.time = [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ]
+      const _this = this
+      setTimeout(() => {
+        _this.$refs.table.refresh(true)
+      }, 100)
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .equipment-log-modal{
+    .serach-btn{
+      margin-top: 4px;
+    }
+  }
+</style>

+ 318 - 0
src/views/equipmentManage/exchangeSetting/AddSetModal.vue

@@ -0,0 +1,318 @@
+<template>
+  <div>
+    <a-modal
+      class="modalBox"
+      :title="titleText"
+      v-model="isshow"
+      :footer="null"
+      @cancle="cancel"
+      :width="800"
+      :centered="true">
+      <a-form :form="form" @submit="handleSubmit">
+        <!-- 规则名称 -->
+        <a-form-item label="规则名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+          <a-input
+            placeholder="请输入规则名称(最多30个字符)"
+            allowClear
+            :maxLength="30"
+            id="addSetModal-name"
+            v-decorator="['formData.name', {
+              initialValue: formData.name,getValueFromEvent: $filterEmpty,
+              rules: [{ required: true, message: '请输入规则名称(最多30个字符)!' }] }]" />
+        </a-form-item>
+        <!-- 规则说明 -->
+        <a-form-item label="规则说明" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+          <a-input
+            placeholder="请输入规则说明(最多500个字符)"
+            allowClear
+            :autoSize="{minRows: 3}"
+            type="textarea"
+            :maxLength="500"
+            id="addSetModal-remarks"
+            v-decorator="['formData.remarks', {
+              initialValue: formData.remarks,getValueFromEvent: $filterEmpty,
+              rules: [] }]" />
+        </a-form-item>
+        <!-- 箱体限投 -->
+        <a-row type="flex" align="middle" v-for="(item, index) in codeList" :key="index">
+          <a-col span="11">
+            <!-- 请输入投放重量 -->
+            <a-form-item :label="item.dispName" :required="true" :label-col=" { span: 11 }" :wrapper-col=" { span: 13 }">
+              <a-input-number
+                :id="'addSetModal-rubbishWeight'+index"
+                :min="0"
+                :max="999999"
+                :precision="0"
+                :disabled="item.state==0"
+                style="width: 150px;"
+                placeholder="请输入投放重量"
+                v-decorator="[
+                  `formData.rubbishWeight[${index}]`,
+                  {
+                    validateTrigger: ['change', 'blur'],
+                    initialValue:formData[`rubbishWeight[${index}]`],
+                    rules: [
+                      {
+                        required: item.state==1?true:false, message: '请输入投放重量(最大999999)!'
+                      },
+                    ],
+                  },
+                ]" />
+              <span>(g)</span>
+            </a-form-item>
+          </a-col>
+          <a-col span="1"></a-col>
+          <a-col span="8">
+            <!-- 请输入可兑乐豆数 -->
+            <a-form-item :label="''" :required="false" :wrapper-col="{ span: 20 }">
+              <a-input-number
+                :id="'addSetModal-goleNum'+index"
+                :min="0"
+                :max="999999"
+                :precision="0"
+                :disabled="item.state==0"
+                style="width: 140px;"
+                placeholder="请输入可兑乐豆数"
+                v-decorator="[
+                  `formData.goleNum[${index}]`,
+                  {
+                    validateTrigger: ['change', 'blur'],
+                    initialValue:formData[`goleNum[${index}]`],
+                    rules: [
+                      {
+                        required: item.state==1?true:false, message: '请输入可兑乐豆数(最大999999)!'
+                      },
+                    ],
+                  },
+                ]" />
+              <span>(个)</span>
+            </a-form-item>
+          </a-col>
+          <a-col span="3">
+            <a-form-item :label="''" :required="false" :wrapper-col="{ span: 24 }">
+              <a-checkbox id="addSetModal-state" :checked="item.state==0" @change="handleStatusChange(item,index)">
+                不兑换
+              </a-checkbox>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
+          <a-button type="primary" @click="handleSubmit()" id="addSetModal-handleSubmit" :style="{ marginRight: '15px' }">
+            保存
+          </a-button>
+          <a-button :style="{ marginLeft: '15px' }" @click="cancel()" id="addSetModal-handleCancel">
+            取消
+          </a-button>
+        </a-form-item>
+      </a-form>
+
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  viewExchangeSetting,
+  saveExchangeSetting
+} from '@/api/exchangeSetting.js'
+import {
+  getLookUpData
+} from '@/api/data'
+export default {
+  name: 'RoleModal',
+  components: {
+    STable,
+    VSelect
+  },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    id: {
+      type: [String, Number],
+      default: function () {
+        return ''
+      }
+    },
+    // 兑换编码
+    goldExRuleNo: {
+      type: [String, Number],
+      default: function () {
+		  return ''
+      }
+    }
+  },
+  data () {
+    return {
+      titleText: '新增',
+      isshow: this.visible,
+      formLayout: 'horizontal',
+      form: this.$form.createForm(this, {
+        name: 'AddBoxModal'
+      }),
+      formData: {
+        name: '',
+        remarks: '',
+        goldExRuleItemList: [],
+        goleNum: [],
+        rubbishWeight: []
+      },
+      codeList: []
+    }
+  },
+  methods: {
+    // 查询分类数据字典
+    getTypeCode () {
+      getLookUpData({
+        pageNo: 1,
+        pageSize: 1000,
+        lookupCode: 'RUBBISH_TYPE'
+      }).then(res => {
+        const list = res.data.list
+        list.map(item => {
+          item.state = item.dispName == '有害垃圾' ? 0 : 1
+        })
+        this.codeList = list
+      })
+    },
+    // 查详情
+    getDetailData (id) {
+      viewExchangeSetting({
+        id: id
+      }).then(res => {
+        if (res.status == 200) {
+          this.formData = Object.assign({}, this.formData, res.data)
+          // 回显数据
+          this.formData.goldExRuleItemList.map((item, index) => {
+            this.formData['goleNum[' + index + ']'] = item.goleNum
+            this.formData['rubbishWeight[' + index + ']'] = item.rubbishWeight
+            this.codeList[index].state = item.state
+          })
+        }
+      })
+    },
+    // 是否兑换切换
+    handleStatusChange (item, index) {
+      item.state = item.state ? 0 : 1
+      this.formData['goleNum[' + index + ']'] = 0
+      this.formData['rubbishWeight[' + index + ']'] = 0
+      this.form.resetFields([`formData.rubbishWeight[${index}]`, `formData.goleNum[${index}]`])
+    },
+    // 保存提交
+    handleSubmit () {
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const params = Object.assign({}, this.formData, values.formData)
+          // 编辑
+          if (this.id) {
+            console.log(0, ' params')
+            params.id = this.id
+            params.goldExRuleNo = this.goldExRuleNo
+            // console.log(params, ' params')
+            // 编辑格式化数据
+            this.codeList.map((item, index) => {
+              params.goldExRuleItemList[index] = Object.assign({}, params.goldExRuleItemList[index], {
+                state: item.state,
+                rubbishType: item.code,
+                goleNum: params.goleNum[index],
+                rubbishWeight: params.rubbishWeight[index]
+              })
+              delete params[`goleNum[${index}]`]
+              delete params[`rubbishWeight[${index}]`]
+              delete params.goldExRuleItemList[index].id
+            })
+          } else {
+            // 新增格式化数据
+            this.codeList.map((item, index) => {
+              params.goldExRuleItemList[index] = {
+                state: item.state,
+                rubbishType: item.code,
+                goleNum: params.goleNum[index],
+                rubbishWeight: params.rubbishWeight[index]
+              }
+            })
+          }
+          console.log(params, ' params')
+          saveExchangeSetting(params).then(res => {
+            console.log(res, 'res--save')
+            if (res.status + '' === '200') {
+              this.$message.success(res.message ? res.message : '保存成功')
+              this.$emit('refresh')
+              setTimeout(function () {
+                _this.cancel()
+              }, 300)
+            } else {
+              // this.$message.error(res.message)
+            }
+          })
+        }
+      })
+    },
+    cancel (e) {
+      this.clear()
+      this.$emit('close')
+    },
+    clear () {
+      this.form.resetFields()
+      this.formData = {
+        name: '',
+        remarks: '',
+        goldExRuleItemList: [],
+        goleNum: [],
+        rubbishWeight: []
+      }
+    }
+  },
+  beforeCreate () {
+    this.form = this.$form.createForm(this, {
+      name: 'AddBoxModal'
+    })
+  },
+  created () {
+    this.getTypeCode()
+  },
+  watch: {
+    visible (newValue, oldValue) {
+      this.isshow = newValue
+    },
+    isshow (newValue, oldValue) {
+      if (newValue) {
+        if (this.id) {
+          this.form.resetFields()
+          this.titleText = '编辑'
+		  this.getDetailData(this.id)
+        } else {
+          this.titleText = '新增'
+          this.codeList.map(item => {
+            item.state = item.dispName == '有害垃圾' ? 0 : 1
+          })
+        }
+      } else {
+        this.cancel()
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+	.modalBox {}
+
+	.ant-modal-footer {
+		display: none;
+	}
+
+	.dynamic-delete-button {
+		margin-right: 20px;
+	}
+
+	.linenums {
+		padding: 0 20px;
+	}
+</style>

+ 310 - 0
src/views/equipmentManage/exchangeSetting/ExchangeSetting.vue

@@ -0,0 +1,310 @@
+<template>
+  <a-card :bordered="false" class="network-table-page-search-wrapper">
+    <div class="network-searchForm">
+      <a-form layout="inline" :form="form" ref="form" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="兑换规则" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="boxSetting-name" allowClear :maxLength="30" v-model="queryParam.name" placeholder="请输入兑换规则名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="boxSetting-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="boxSetting-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button type="primary" icon="plus" @click="openModal" id="boxSetting-add" v-hasPermission="'B_exchangeSetting_add'">新增</a-button>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-icon
+          id="boxSetting-edit"
+          type="edit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)"
+          v-hasPermission="'B_exchangeSetting_edit'"/>
+        <a-icon
+          id="boxSetting-del"
+          type="delete"
+          title="删除"
+          class="actionBtn icon-red"
+          v-if="$hasPermissions('B_exchangeSetting_del') && !record.isEnable"
+          @click="delect(record)" />
+        <span v-if="!$hasPermissions('B_exchangeSetting_edit') && (!$hasPermissions('B_exchangeSetting_del') && !record.isEnable)">--</span>
+      </template>
+    </s-table>
+    <!-- 新增/编辑 弹窗 -->
+    <add-set-modal :visible="openBoxModal" :goldExRuleNo="itemGoldExRuleNo" :id="itemId" @refresh="refreshTable" @close="openBoxModal = false"></add-set-modal>
+  </a-card>
+</template>
+
+<script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import AddSetModal from './AddSetModal.vue'
+import {
+  getList,
+  deleteExchangeSetting
+} from '@/api/exchangeSetting.js'
+export default {
+  name: 'Equipment',
+  components: {
+    STable,
+    VSelect,
+    AddSetModal
+  },
+  data () {
+    return {
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: {
+          span: 7
+        },
+        wrapperCol: {
+          span: 17
+        }
+      },
+      // 查询参数
+      queryParam: {
+        name: '' // 箱体类型
+      },
+      openBoxModal: false, // 新增/编辑弹窗
+      itemId: '', //  新增/编辑id
+	  itemGoldExRuleNo: '', // 兑换编码
+      // 表头
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 80,
+        align: 'center'
+      },
+      {
+        title: '创建时间',
+        dataIndex: 'createDate',
+        width: 200,
+        align: 'center'
+      },
+      {
+        title: '兑换规则名称',
+        dataIndex: 'name',
+        width: 200,
+        align: 'center'
+      },
+      {
+        title: '兑换规则说明',
+        dataIndex: 'remarks',
+        width: 200,
+        align: 'center'
+      },
+      {
+        title: '兑换规则(投放重量(g)/可兑换乐豆数(个))',
+        children: [{
+          title: '废旧衣物',
+          dataIndex: 'clothes',
+          width: 100,
+          align: 'center',
+          customRender: (record, text) => {
+            return record ? (record.rubbishWeight ? (record.rubbishWeight + 'g/' + record.goleNum + '个') : '不兑换') : '不兑换'
+          }
+        },
+        {
+          title: '废旧塑料',
+          dataIndex: 'plastic',
+          width: 100,
+          align: 'center',
+          customRender: (record, text) => {
+            return record ? (record.rubbishWeight ? (record.rubbishWeight + 'g/' + record.goleNum + '个') : '不兑换') : '不兑换'
+          }
+        },
+        {
+          title: '废旧金属',
+          dataIndex: 'metal',
+          width: 100,
+          align: 'center',
+          customRender: (record, text) => {
+            return record ? (record.rubbishWeight ? (record.rubbishWeight + 'g/' + record.goleNum + '个') : '不兑换') : '不兑换'
+          }
+        },
+        {
+          title: '废旧纸张',
+          dataIndex: 'paper',
+          width: 100,
+          align: 'center',
+          customRender: (record, text) => {
+            return record ? (record.rubbishWeight ? (record.rubbishWeight + 'g/' + record.goleNum + '个') : '不兑换') : '不兑换'
+          }
+        },
+        {
+          title: '有害垃圾',
+          dataIndex: 'harm',
+          width: 100,
+          align: 'center',
+          customRender: (record, text) => {
+            return record ? (record.rubbishWeight ? (record.rubbishWeight + 'g/' + record.goleNum + '个') : '不兑换') : '不兑换'
+          }
+        },
+        {
+          title: '废旧金属/塑料',
+          dataIndex: 'metPla',
+          width: 100,
+          align: 'center',
+          customRender: (record, text) => {
+            return record ? (record.rubbishWeight ? (record.rubbishWeight + 'g/' + record.goleNum + '个') : '不兑换') : '不兑换'
+          }
+        },
+		{
+		  title: '废旧玻璃',
+		  dataIndex: 'glass',
+		  width: 100,
+		  align: 'center',
+		  customRender: (record, text) => {
+		    return record ? (record.rubbishWeight ? (record.rubbishWeight + 'g/' + record.goleNum + '个') : '不兑换') : '不兑换'
+		  }
+		},
+		{
+		  title: '可回收物',
+		  dataIndex: 'recycling',
+		  width: 100,
+		  align: 'center',
+		  customRender: (record, text) => {
+		    return record ? (record.rubbishWeight ? (record.rubbishWeight + 'g/' + record.goleNum + '个') : '不兑换') : '不兑换'
+		  }
+		}
+        ]
+      },
+      {
+        title: '操作',
+        scopedSlots: {
+          customRender: 'action'
+        },
+        width: 150,
+        align: 'center'
+      }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getList(Object.assign(parameter, this.queryParam)).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            return res.data
+          }
+        })
+      }
+
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.queryParam.name = ''
+    })
+  },
+  methods: {
+    // 重置
+    handleReset () {
+      this.queryParam.name = ''
+      this.$refs.table.refresh(true)
+    },
+    // 新增/编辑 后刷新列表
+    refreshTable () {
+      if (this.itemId) {
+        this.$refs.table.refresh()
+      } else {
+        this.$refs.table.refresh(true)
+      }
+    },
+    // 新建
+    openModal () {
+      this.openBoxModal = true
+      this.itemId = ''
+	    this.itemGoldExRuleNo = ''
+    },
+    // 编辑
+    handleEdit (item) {
+      this.openBoxModal = true
+      this.itemId = item.id
+	    this.itemGoldExRuleNo = item.goldExRuleNo
+    },
+    // 删除
+    delect (row) {
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        centered: true,
+        content: '删除后无法恢复,确认删除?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          deleteExchangeSetting({
+            id: row.id
+          }).then(res => {
+            console.log(res, 'res1111')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+	.network-table-page-search-wrapper {
+		.network-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+			}
+
+			// 搜索框的下间距
+			.ant-form-item {
+				margin-bottom: 10px;
+			}
+
+			.handle-btn {
+				margin-top: 4px;
+			}
+
+			.serach-btn {
+				margin-right: 10px;
+			}
+		}
+
+		.actionBtn {
+			font-size: 20px;
+			padding: 0 10px;
+		}
+
+		// 合计
+		.total {
+			margin: 15px 0 25px;
+			width: 100%;
+			background-color: #e6f7ff;
+			border: 1px solid #91d5ff;
+			padding: 8px 15px 8px 27px;
+			border-radius: 4px;
+
+			.iconImg {
+				color: #1890FF;
+				margin-right: 10px;
+			}
+		}
+	}
+</style>

+ 212 - 0
src/views/equipmentManage/network/detailsModal.vue

@@ -0,0 +1,212 @@
+<template>
+  <a-modal
+    centered
+    class="detail-network-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="查看详情"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="1000">
+    <!-- 网点信息 -->
+    <div v-if="detailsData">
+      <a-row :gutter="35">
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">网点名称:</p>
+          <p class="item-main">{{ detailsData.name }}</p>
+        </a-col>
+        <a-col :span="16" class="item-cont">
+          <p class="item-label">地址:</p>
+          <p class="item-main">{{ detailsData.provinceName }}{{ detailsData.cityName }}{{ detailsData.districtName }}{{ detailsData.address }}</p>
+        </a-col>
+      </a-row>
+      <a-row :gutter="35">
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">纬度:</p>
+          <p class="item-main">{{ detailsData.lat }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">经度:</p>
+          <p class="item-main">{{ detailsData.lng }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">投递时间段:</p>
+          <p class="item-main">{{ detailsData.timeRuleName ? detailsData.timeRuleName : '--' }}</p>
+        </a-col>
+      </a-row>
+      <a-row :gutter="35">
+        <a-col :span="24" class="item-cont">
+          <p class="item-label">兑换规则:</p>
+          <p class="item-main">{{ detailsData.exRuleName ? detailsData.exRuleName : '--' }}</p>
+        </a-col>
+      </a-row>
+    </div>
+    <a-divider />
+    <!-- 已绑设备 -->
+    <div>
+      <h3>已绑设备:</h3>
+      <a-table
+        ref="table"
+        size="middle"
+        :rowKey="record => record.id"
+        :columns="columns"
+        :dataSource="equipmentData"
+        :pagination="false"
+        bordered>
+        <!-- 设备状态 -->
+        <template slot="onlineFlag" slot-scope="text, record">
+          <span :class="record.onlineFlag==0 ? 'red' : record.onlineFlag==1 ? 'green' : ''">{{ record.onlineFlag == 0 ? '离线' : record.onlineFlag == 1 ? '在线' : '--' }}</span>
+        </template>
+        <!-- 工作状态 -->
+        <template slot="state" slot-scope="text, record">
+          <span :class="record.state==0 ? 'red' : record.state==1 ? 'green' : ''">{{ record.state == 0 ? '已禁用' : record.state == 1 ? '已启用' : '--' }}</span>
+        </template>
+      </a-table>
+    </div>
+    <div class="btn-cont"><a-button id="network-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
+  </a-modal>
+</template>
+
+<script>
+import { stationFind } from '@/api/station'
+import { deviceListQuery } from '@/api/device'
+export default {
+  name: 'DetailsModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    networkId: {
+      type: [Number, String],
+      default: ''
+    },
+    networkNo: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      detailsData: null, //  网点数据
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
+        { title: '设备状态', scopedSlots: { customRender: 'onlineFlag' }, width: 200, align: 'center' },
+        { title: '工作状态', scopedSlots: { customRender: 'state' }, width: 200, align: 'center' },
+        { title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center' }
+      ],
+      equipmentData: []
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetails () {
+      stationFind({ id: this.networkId }).then(res => {
+        if (res.status == 200) {
+          this.detailsData = res.data
+        }
+      })
+    },
+    //  已绑设备
+    getDevice () {
+      deviceListQuery({ stationNo: this.networkNo }).then(res => {
+        console.log(res)
+        if (res.status == 200) {
+          res.data.map((item, index) => {
+            item.no = index + 1
+          })
+          this.equipmentData = res.data
+        } else {
+          this.equipmentData = []
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    },
+    networkId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetails()
+        this.getDevice()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .detail-network-modal{
+    .ant-modal-body {
+    	padding: 40px 40px 24px;
+    }
+    .item-cont {
+    	margin-bottom: 15px;
+    	display: flex;
+    	.item-label {
+    		width: 115px;
+    		font-size: 14px;
+    		color: rgba(0, 0, 0, 0.85);
+    		flex-shrink: 0;
+    	}
+    	.item-main {
+    		flex-grow: 1;
+        word-break: break-all;
+    		.wd-icon {
+    			display: block;
+    		}
+    	}
+    	.guidance-con {
+    		border: 1px dashed #e8e8e8;
+    		border-radius: 6px;
+    		padding: 20px;
+    		img {
+    			max-width: 100%;
+    		}
+    	}
+    	.period-price-con {
+    		border-bottom: 1px solid #e8e8e8;
+    	}
+    	.item-period {
+    		display: flex;
+    		align-items: center;
+    		justify-content: space-evenly;
+    		flex-grow: 1;
+    		border: 1px solid #e8e8e8;
+    		border-width: 1px 1px 0;
+    		text-align: center;
+    		.period,
+    		.period-price {
+    			padding: 5px 0;
+    			border-right: 1px solid #e8e8e8;
+    		}
+    		.period-price:last-child {
+    			border-right: none;
+    		}
+    	}
+    }
+    .btn-cont {
+    	text-align: center;
+    	margin: 35px 0 10px;
+    }
+    .blue {
+    	color: #1890FF;
+    }
+    .green {
+    	color: #16b50e;
+    }
+    .red {
+    	color: red;
+    }
+  }
+</style>

+ 270 - 0
src/views/equipmentManage/network/editModal.vue

@@ -0,0 +1,270 @@
+<template>
+  <a-modal
+    centered
+    class="edit-network-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="modalTit"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="1000">
+    <a-form
+      id="network-edit-form"
+      :form="form"
+      ref="form"
+      v-bind="formItemLayout"
+      @submit="handleSubmit">
+      <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-input
+          id="network-edit-name"
+          :maxLength="30"
+          v-decorator="[
+            'formData.name',
+            { initialValue: formData.name, getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入网点名称' }] }
+          ]"
+          placeholder="请输入网点名称(最多30个字符)"
+          allowClear />
+      </a-form-item>
+      <a-form-item label="地址" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-cascader
+          id="network-edit-areas"
+          v-decorator="[
+            'options',
+            {initialValue: areas,
+             rules: [{ required: true, message: '请选择省市区' }]}
+          ]"
+          :options="options"
+          placeholder="请选择省市区" />
+      </a-form-item>
+      <a-form-item label="详细地址" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-input
+          id="network-edit-address"
+          :maxLength="30"
+          v-decorator="[
+            'formData.address',
+            { initialValue: formData.address, getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入详细地址' }] }
+          ]"
+          placeholder="请输入详细地址(最多30个字符)"
+          allowClear />
+      </a-form-item>
+      <a-row :gutter="30">
+        <a-col :span="10">
+          <a-form-item label="纬度" :label-col="{ span: 10 }" :wrapper-col="{ span: 14 }">
+            <a-input
+              id="network-edit-lat"
+              v-decorator="[
+                'formData.lat',
+                { initialValue: formData.lat, rules: [
+                  { required: true, message: '请输入纬度' },
+                  { pattern: /^[\-\+]?([0-8]?\d{1}\.\d{1,8}|90\.0{1,8})$/, message: '请输入正确的纬度,整数部分为0~90,必须输入1到8位小数' }
+                ] }
+              ]"
+              placeholder="请输入纬度"
+              allowClear />
+          </a-form-item>
+        </a-col>
+        <a-col :span="10">
+          <a-form-item label="经度" :label-col="{ span: 10 }" :wrapper-col="{ span: 14 }">
+            <a-input
+              id="network-edit-lng"
+              v-decorator="[
+                'formData.lng',
+                { initialValue: formData.lng, getValueFromEvent: $filterEmpty, rules: [
+                  { required: true, message: '请输入经度' },
+                  { pattern: /^[\-\+]?(0?\d{1,2}\.\d{1,8}|1[0-7]?\d{1}\.\d{1,8}|180\.0{1,8})$/, message: '请输入正确的经度,整数部分为0~180,必须输入1到8位小数' }
+                ] }
+              ]"
+              placeholder="请输入经度"
+              allowClear />
+          </a-form-item>
+        </a-col>
+        <a-col :span="4">
+          <a href="https://lbs.qq.com/tool/getpoint/" target="_blank">
+            <a-button type="primary" id="network-edit-search-jwd" class="network-edit-search-jwd" size="small">查询坐标</a-button>
+          </a>
+        </a-col>
+      </a-row>
+      <a-form-item label="选择兑换规则" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-select
+          id="network-edit-rules"
+          allowClear
+          v-decorator="[
+            'formData.goldExRuleNo',
+            { initialValue: formData.goldExRuleNo,
+              rules: [{ required: true, message: '请选择兑换规则' }] },
+          ]"
+          placeholder="请选择兑换规则"
+        >
+          <a-select-option v-for="(item,index) in goldExRuleNoList" :key="index" :value="item.goldExRuleNo">
+            {{ item.name }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item label="投递时间段" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-select
+          id="network-edit-times"
+          allowClear
+          v-decorator="[
+            'formData.deliveryTimeRuleNo',
+            { initialValue: formData.deliveryTimeRuleNo,
+              rules: [{ required: true, message: '请选择投递时间段' }] },
+          ]"
+          placeholder="请选择投递时间段"
+        >
+          <a-select-option v-for="(item,index) in deliveryTimeRuleNoList" :key="index" :value="item.deliveryTimeRuleNo">
+            {{ item.name }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+        <a-button type="primary" html-type="submit" id="network-edit-submit" style="margin-right: 15px">保存</a-button>
+        <a-button @click="isShow=false" style="margin-left: 15px" id="network-edit-close">取消</a-button>
+      </a-form-item>
+    </a-form>
+  </a-modal>
+</template>
+
+<script>
+import addrData, { province, city, area } from '@/api/address'
+import { stationSave, stationFind } from '@/api/station'
+import { goldExListQuery } from '@/api/exchangeSetting.js'
+import { deliveryTimeListQuery } from '@/api/openTimeSetting.js'
+export default {
+  name: 'EditModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    networkId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      formData: {
+        name: null, //  网点名称
+        provinceCode: null, //  省
+        cityCode: null, // 市
+        districtCode: null, // 区
+        address: '', //  详细地址
+        lat: '', //  纬度
+        lng: '', //  经度
+        goldExRuleNo: undefined, //  兑换规则
+        deliveryTimeRuleNo: undefined //  投递时间段
+      },
+      options: addrData, //  省市区下拉数据
+      areas: [], //  省市区 值
+      goldExRuleNoList: [], //  兑换规则下拉数据
+      deliveryTimeRuleNoList: [] //  投递时间段下拉数据
+    }
+  },
+  computed: {
+    modalTit () {
+      return this.networkId ? '编辑' : '新增'
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetails () {
+      stationFind({ id: this.networkId }).then(res => {
+        if (res.status == 200) {
+          //  省市区
+          this.areas = [res.data.provinceCode, res.data.cityCode, res.data.districtCode]
+          this.form.setFieldsValue({ 'formData.name': res.data.name })
+          this.form.setFieldsValue({ 'formData.address': res.data.address })
+          this.form.setFieldsValue({ 'formData.lat': res.data.lat })
+          this.form.setFieldsValue({ 'formData.lng': res.data.lng })
+          this.form.setFieldsValue({ 'formData.goldExRuleNo': res.data.goldExRuleNo })
+          this.form.setFieldsValue({ 'formData.deliveryTimeRuleNo': res.data.deliveryTimeRuleNo })
+        }
+      })
+    },
+    //  物流信息  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          if (values.options.length) {
+            values.formData.provinceCode = values.options[0]
+            values.formData.provinceName = _.find(province, ['code', values.options[0]]).name
+            values.formData.cityCode = values.options[1]
+            values.formData.cityName = _.find(city, ['code', values.options[1]]).name
+            values.formData.districtCode = values.options[2]
+            values.formData.districtName = _.find(area, ['code', values.options[2]]).name
+          }
+          const formData = values.formData
+          formData.id = this.networkId || null
+          stationSave(formData).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              setTimeout(() => {
+                _this.$emit('success')
+                _this.isShow = false
+              }, 1000)
+            }
+          })
+        }
+      })
+    },
+    //  投递时间段
+    getdeliveryTimeRule () {
+      deliveryTimeListQuery({}).then(res => {
+        if (res.status == 200) {
+          this.deliveryTimeRuleNoList = res.data
+        } else {
+          this.deliveryTimeRuleNoList = []
+        }
+      })
+    },
+    //  兑换规则
+    getgoldExRule () {
+      goldExListQuery({}).then(res => {
+        if (res.status == 200) {
+          this.goldExRuleNoList = res.data
+        } else {
+          this.goldExRuleNoList = []
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        this.getdeliveryTimeRule() //  投递时间段
+        this.getgoldExRule() //  兑换规则
+        this.areas = []
+        this.form.resetFields()
+      }
+    },
+    networkId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetails()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .edit-network-modal{
+    .network-edit-search-jwd{
+      margin-top: 8px;
+    }
+  }
+</style>

+ 340 - 0
src/views/equipmentManage/network/equipmentModal.vue

@@ -0,0 +1,340 @@
+<template>
+  <a-modal
+    centered
+    class="edit-network-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="绑定箱体设备"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="1000">
+    <!-- 搜索设备 -->
+    <div class="search-con" @blur="isFocus=false">
+      <a-input-search
+        id="equipment-search"
+        class="search-s"
+        allow-clear
+        placeholder="请通过设备编号搜索"
+        enter-button="查询"
+        size="large"
+        v-model="searchVal"
+        @blur="noData=0"
+        @focus="isFocus=true"
+        @search="onSearch"
+      />
+      <a-card class="search-sub" :bordered="false">
+        <div class="noData" v-if="noData==1" style="text-align: center;">未查询到结果</div>
+        <div class="search-sub-item" v-if="resultData && isFocus">
+          <p>{{ resultData.srcDeviceCode }}</p>
+          <a-button
+            id="equipment-unbind"
+            v-if="resultData.bindingFlag == 0"
+            type="primary"
+            ghost
+            size="small"
+            @click="onBundling(resultData)">立即绑定</a-button>
+          <a-button id="equipment-bind" v-else disabled type="link">已绑定</a-button>
+        </div>
+      </a-card>
+    </div>
+    <!-- 已绑设备 -->
+    <div class="eq-tit">已绑设备:</div>
+    <a-spin tip="Loading..." :spinning="isLoading">
+      <a-table
+        class="table"
+        ref="table"
+        bordered
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data-source="equipmentData"
+        :pagination="false">
+        <!-- 设备状态 -->
+        <template slot="onlineFlag" slot-scope="text, record">
+          <span :class="record.onlineFlag==0 ? 'red' : record.onlineFlag==1 ? 'green' : ''">{{ record.onlineFlag == 0 ? '离线' : record.onlineFlag == 1 ? '在线' : '--' }}</span>
+        </template>
+        <!-- 箱体类型 -->
+        <template slot="type" slot-scope="record">
+          <a-select
+            id="equipment-type"
+            placeholder="请选择箱体类型"
+            style="width: 100%;"
+            v-model="record.deviceTypeNo"
+            :disabled="record.state == 1"
+            @change="typeChange($event, record)">
+            <a-select-option v-for="(item,index) in record.deviceTypeList" :key="index" :value="item.deviceTypeNo">
+              {{ item.name }}
+            </a-select-option>
+          </a-select>
+        </template>
+        <!-- 工作状态 -->
+        <template slot="workStatus" slot-scope="record">
+          <a-switch
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            id="equipment-changeFlagHandle"
+            v-model="record.state == 1 ? true : false"
+            @change="changeFlagHandle(record)"
+          />
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="record">
+          <a-button
+            type="primary"
+            ghost
+            size="small"
+            id="equipment-unBind"
+            @click="onUnbundling(record)">解绑</a-button>
+        </template>
+      </a-table>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { deviceEnable, deviceListQuery, deviceFindDevice, deviceUpdateDeviceType } from '@/api/device'
+import { stationBind, stationUnBind } from '@/api/station'
+import { deviceTypeListQuery } from '@/api/boxSetting'
+
+export default {
+  name: 'EquipmentModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    networkId: {
+      type: [Number, String],
+      default: ''
+    },
+    networkNo: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      resultData: null, //  设备搜索结果
+      noData: 0,
+      isFocus: false, //  搜索框是否获取焦点
+      searchVal: '', //  搜索框值
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '设备编号', dataIndex: 'srcDeviceCode', width: 100, align: 'center' },
+        { title: '设备状态', scopedSlots: { customRender: 'onlineFlag' }, width: 150, align: 'center' },
+        { title: '箱体类型', scopedSlots: { customRender: 'type' }, width: 150, align: 'center' },
+        { title: '工作状态', scopedSlots: { customRender: 'workStatus' }, width: 150, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center' }
+      ],
+      equipmentData: [],
+      typeList: [], //  箱体类型
+      isLoading: true //  加载状态
+    }
+  },
+  methods: {
+    //  已绑设备
+    getDevice () {
+      deviceListQuery({ stationNo: this.networkNo }).then(res => {
+        if (res.status == 200) {
+          res.data.map((item, index) => {
+            item.no = index + 1
+          })
+          this.equipmentData = res.data
+          this.equipmentData.map((item, index) => {
+            item.deviceTypeList = this.setDeviceType(item.boxNum)
+          })
+        } else {
+          this.equipmentData = []
+        }
+        this.isLoading = false
+      })
+    },
+    //  箱体类型下拉数据
+    getDeviceType () {
+      deviceTypeListQuery({}).then(res => {
+        if (res.status == 200) {
+          this.typeList = res.data
+        } else {
+          this.typeList = []
+        }
+        this.getDevice()
+      })
+    },
+    //  处理每个设备所对应的箱体类型
+    setDeviceType (boxNum) {
+      const arr = []
+      let j = 0
+      for (const i in this.typeList) {
+        if (this.typeList[i].boxNum == boxNum) {
+          arr[j++] = this.typeList[i]
+        }
+      }
+      return arr
+    },
+    //  搜索设备
+    onSearch (value) {
+      if (value) {
+        deviceFindDevice({ srcDeviceCode: value }).then(res => {
+          if (res.status == 200) {
+            if (res.data) {
+              this.noData = 2
+              this.resultData = res.data
+            } else {
+              this.noData = 1
+              this.resultData = null
+            }
+          }
+        })
+      } else {
+        this.noData = 0
+        this.resultData = null
+        this.isFocus = false
+      }
+    },
+    //  解绑
+    onUnbundling (item) {
+      const _this = this
+      _this.$confirm({
+        title: '提示',
+        centered: true,
+        content: '确定解绑该设备吗?',
+        onOk () {
+          stationUnBind({ srcDeviceCode: item.srcDeviceCode, stationNo: _this.networkNo }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.getDevice()
+            }
+          })
+        }
+      })
+    },
+    //  绑定
+    onBundling (item) {
+      const _this = this
+      _this.$confirm({
+        title: '提示',
+        centered: true,
+        content: '确定要绑定该设备吗?',
+        onOk () {
+          stationBind({ srcDeviceCode: item.srcDeviceCode, stationNo: _this.networkNo }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.resultData = null
+              _this.isFocus = false
+              _this.getDevice()
+            }
+          })
+        }
+      })
+    },
+    //  箱体类型 change
+    typeChange (deviceTypeNo, record) {
+      deviceUpdateDeviceType({ id: record.id, deviceTypeNo: deviceTypeNo }).then(res => {
+        console.log(res)
+        if (res.status == 200) {
+          this.$message.success(res.message)
+        }
+      })
+    },
+    // 更改启用禁用状态
+    changeFlagHandle (record) {
+      const _data = {
+        id: record.id,
+        state: record.state == 1 ? '0' : '1'
+      }
+      deviceEnable(_data).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.getDevice()
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    },
+    networkId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.searchVal = ''
+        this.resultData = null //  设备搜索结果
+        this.noData = 0
+        this.isFocus = false //  搜索框是否获取焦点
+        this.isLoading = true
+        this.equipmentData = []
+        this.getDeviceType()
+      }
+    }
+  }
+}
+</script>
+<style scoped>
+.spin-content {
+  border: 1px solid #91d5ff;
+  background-color: #e6f7ff;
+  padding: 30px;
+}
+</style>
+<style lang="less">
+  .edit-network-modal{
+    .search-con{
+      position: relative;
+      .search-s{
+        .ant-input-group-addon{
+          padding: 0;
+          border: none;
+        }
+      }
+      .search-sub{
+        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+        position: absolute;
+        left: 0;
+        top: 45px;
+        width: 100%;
+        z-index: 1;
+        border-radius: 6px;
+        .ant-card-body{
+          padding: 15px 24px;
+        }
+        .search-sub-item{
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          padding: 8px 0;
+          border-bottom: 1px dashed #f8f8f8;
+          p{
+            margin: 0;
+          }
+          &:last-child{
+            border-bottom: none;
+          }
+        }
+      }
+    }
+    .eq-tit{
+      line-height: 40px;
+      font-size: 16px;
+      margin: 85px 0 5px;
+    }
+    .eq-subTit{
+      margin: 0 0 10px;
+    }
+    .table{
+      padding-bottom: 50px;
+    }
+  }
+  .btn-cont{
+    text-align: center;
+    .cancel{
+      margin-left: 40px;
+    }
+  }
+</style>

+ 248 - 0
src/views/equipmentManage/network/network.vue

@@ -0,0 +1,248 @@
+<template>
+  <a-card :bordered="false" class="network-table-page-search-wrapper">
+    <div class="network-searchForm">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="创建时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="network-time"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="network-queryWord" allowClear :maxLength="30" v-model="queryParam.queryWord" placeholder="请输入网点名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="区域" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-cascader
+                id="network-areas"
+                v-model="areas"
+                :options="options"
+                placeholder="请选择省市区"
+                @change="addrChange"/>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="network-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="network-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button v-if="$hasPermissions('B_network_add')" class="add-btn" id="network-btn-add" type="primary" @click="handleEdit">新增网点</a-button>
+    </div>
+    <!-- 合计 -->
+    <div class="total">
+      <a-icon type="info-circle" class="iconImg" />
+      <strong>总计:</strong><span v-model="orderTotal">{{ orderTotal || 0 }} 条</span>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-icon
+          v-if="$hasPermissions('B_network_look')"
+          type="eye"
+          id="network-handleView"
+          title="详情"
+          class="actionBtn icon-green"
+          @click="handleView(record)" />
+        <a-icon
+          v-if="$hasPermissions('B_network_edit')"
+          type="edit"
+          id="network-handleEdit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)" />
+        <a-badge v-if="$hasPermissions('B_network_bind')" :count="record.deviceNum">
+          <a-icon type="link" id="network-handleLink" title="绑定箱体设备" class="actionBtn icon-orange" @click="handleBind(record)" />
+        </a-badge>
+        <span v-if="!$hasPermissions('B_network_look') && !$hasPermissions('B_network_edit') && !$hasPermissions('B_network_bind')">--</span>
+      </template>
+    </s-table>
+    <!-- 新增编辑 -->
+    <edit-network-modal :openModal="openNetworkModal" :networkId="networkId" @success="handleReset" @close="closeModal" />
+    <!-- 详情 -->
+    <details-network-modal :openModal="openDetailModal" :networkId="networkId" :networkNo="networkNo" @close="closeModal" />
+    <!-- 绑定箱体设备 -->
+    <equipment-modal :openModal="openBindModal" :networkId="networkId" :networkNo="networkNo" @close="closeModal" />
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import addrData from '@/api/address'
+import moment from 'moment'
+import editNetworkModal from './editModal.vue'
+import detailsNetworkModal from './detailsModal.vue'
+import equipmentModal from './equipmentModal.vue'
+import { stationList } from '@/api/station'
+export default {
+  name: 'Network',
+  components: { STable, VSelect, editNetworkModal, detailsNetworkModal, equipmentModal },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        queryWord: '', //  网点名称
+        provinceCode: null, //  省
+        cityCode: null, // 市
+        districtCode: null // 区
+      },
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 200, align: 'center' },
+        { title: '网点名称', dataIndex: 'name', width: 200, align: 'center' },
+        { title: '省', dataIndex: 'provinceName', width: 150, align: 'center' },
+        { title: '市', dataIndex: 'cityName', width: 150, align: 'center' },
+        { title: '区', dataIndex: 'districtName', width: 150, align: 'center' },
+        { title: '详细地址', dataIndex: 'address', width: 200, align: 'center' },
+        { title: '兑换规则', dataIndex: 'exRuleName', width: 200, align: 'center' },
+        { title: '投放时间段名称', dataIndex: 'timeRuleName', width: 200, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return stationList(Object.assign(parameter, this.queryParam)).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            this.orderTotal = res.data.count
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            return res.data
+          }
+        })
+      },
+      // 将默认当天时间日期回显在时间选择框中
+      time: [],
+      dateFormat: 'YYYY-MM-DD',
+      options: addrData, //  省市区下拉数据
+      areas: [], //  省市区 值
+      orderTotal: '', // 合计开单数量
+      openNetworkModal: false, //  新增编辑网点信息
+      networkId: null, //  网点id
+      networkNo: null, //  网点编号
+      openDetailModal: false, //  网点信息详情
+      openBindModal: false //  绑定箱体设备
+    }
+  },
+  methods: {
+    moment,
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+    //  省市区  change
+    addrChange (val) {
+      this.queryParam.provinceCode = val[0]
+      this.queryParam.cityCode = val[1]
+      this.queryParam.districtCode = val[2]
+    },
+    // 重置
+    handleReset () {
+      this.queryParam.beginDate = null
+      this.queryParam.endDate = null
+      this.queryParam.queryWord = ''
+      this.queryParam.provinceCode = null
+      this.queryParam.cityCode = null
+      this.queryParam.districtCode = null
+      this.time = []
+      this.areas = []
+      this.$refs.table.refresh(true)
+      this.networkId = null
+      this.networkNo = null
+    },
+    //  新增、编辑网点
+    handleEdit (row) {
+      this.networkId = row ? row.id : null
+      this.networkNo = row ? row.stationNo : null
+      this.openNetworkModal = true
+    },
+    //  查看详情
+    handleView (row) {
+      this.networkId = row ? row.id : null
+      this.networkNo = row ? row.stationNo : null
+      this.openDetailModal = true
+    },
+    //  关联箱体设备
+    handleBind (row) {
+      this.networkId = row ? row.id : null
+      this.networkNo = row ? row.stationNo : null
+      this.openBindModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.networkId = null
+      this.openNetworkModal = false
+      this.openDetailModal = false
+      this.openBindModal = false
+      this.$refs.table.refresh()
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .network-table-page-search-wrapper{
+    .network-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+    .actionBtn {
+    	font-size: 20px;
+    	padding: 0 10px;
+    }
+    // 合计
+    .total {
+    	margin: 15px 0 25px;
+    	width: 100%;
+    	background-color: #e6f7ff;
+    	border: 1px solid #91d5ff;
+    	padding: 8px 15px 8px 27px;
+    	border-radius: 4px;
+    	.iconImg {
+    		color: #1890FF;
+    		margin-right: 10px;
+    	}
+    }
+  }
+</style>

+ 248 - 0
src/views/equipmentManage/openTimeSetting/AddTimeModal.vue

@@ -0,0 +1,248 @@
+<template>
+  <div>
+    <a-modal
+      class="modalBox"
+      :title="titleText"
+      v-model="isshow"
+      :footer="null"
+      @cancle="cancel"
+      :width="800"
+      :centered="true">
+      <a-form-model
+        ref="ruleForm"
+        class="formCont"
+        :model="formData"
+        :rules="rules"
+      >
+        <div class="timeRow">
+          <!-- 投放时间段名称 -->
+          <a-form-model-item label="投放时间段名称" ref="name" prop="name" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+            <a-input
+              placeholder="请输入投放时间段名称(最多30个字符)"
+              allowClear
+              :maxLength="30"
+              id="addTimeModal-name"
+              v-model="formData.name"
+            />
+          </a-form-model-item>
+          <!-- 投放时间区间 -->
+          <a-row type="flex" align="middle" v-for="(item, index) in formData.deliveryTimeRuleItemList" :key="index">
+            <a-col span="10">
+              <!-- 投放开始时间 -->
+              <a-form-model-item
+                :label="index === 0 ? '投放时间区间' : ''"
+                :label-col="{ span: 12 }"
+                :wrapper-col="index === 0 ? { span: 12 } : { span: 12, offset: 12 }"
+                :prop="'deliveryTimeRuleItemList.' + index + '.openTime'"
+                :rules="{
+                  required: true,
+                  message: '请选择开始时间',
+                  trigger: ['blur','change'],
+                }"
+              >
+                <a-time-picker
+                  :id="'addTimeModal-openTime'+index"
+                  placeholder="开始时间"
+                  v-model="item.openTime"
+                  format="HH:mm"
+                />
+              </a-form-model-item>
+            </a-col>
+            <a-col span="1"><a-form-model-item>至</a-form-model-item></a-col>
+            <a-col span="6">
+              <!-- 投放结束时间 -->
+              <a-form-model-item
+                :label="''"
+                :required="false"
+                :wrapper-col="{ span: 18 }"
+                :prop="'deliveryTimeRuleItemList.' + index + '.closeTime'"
+                :rules="{
+                  required: true,
+                  message: '请选择结束时间',
+                  trigger: ['blur','change'],
+                }"
+              >
+                <a-time-picker
+                  :id="'addTimeModal-closeTime'+index"
+                  placeholder="结束时间"
+                  v-model="item.closeTime"
+                  format="HH:mm"
+                />
+              </a-form-model-item>
+            </a-col>
+            <a-form-model-item>
+              <a-icon
+                :style="{ fontSize: '18px', color: 'red' }"
+                v-if="index > 0"
+                class="dynamic-delete-button"
+                type="minus-circle-o"
+                id="addTimeModal-del"
+                :disabled="formData.deliveryTimeRuleItemList.length === 1"
+                @click="() => remove(index)"
+              />
+              <a-icon
+                id="addTimeModal-add"
+                v-if="index === formData.deliveryTimeRuleItemList.length - 1"
+                :style="{ fontSize: '18px' }"
+                type="plus-circle"
+                @click="add" />
+            </a-form-model-item>
+          </a-row>
+        </div>
+        <a-form-model-item :wrapper-col="{ span: 24, offset: 10 }">
+          <a-button id="addTimeModal-handleSubmit" type="primary" @click="handleSubmit()" :style="{ marginRight: '15px' }">保存</a-button>
+          <a-button :style="{ marginLeft: '15px' }" @click="handleCancel()" id="addTimeModal-handleCancel">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { viewTimeSetting, saveTimeSetting } from '@/api/openTimeSetting.js'
+import moment from 'moment'
+export default {
+  name: 'RoleModal',
+  components: {
+    STable,
+    VSelect
+  },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    id: {
+      type: [String, Number],
+      default: function () {
+        return ''
+      }
+    }
+  },
+  data () {
+    return {
+      index: 0, // 用于增加时间列的全局变量
+      titleText: '新增',
+      isshow: this.visible,
+      formData: {
+        name: '',
+        deliveryTimeRuleItemList: []
+      },
+      rules: {
+        name: [{ required: true, message: '请输入投放时间段名称', trigger: 'blur' }]
+      }
+    }
+  },
+  methods: {
+    moment,
+    cancel (e) {
+      this.clear()
+      this.$emit('close')
+    },
+    // 查详情
+    getDetailData (id) {
+      viewTimeSetting({ id: id }).then(res => {
+        if (res.status == 200) {
+          this.formData = Object.assign({}, this.formData, res.data)
+          this.formData.deliveryTimeRuleItemList.map(item => {
+            item.closeTime = moment(item.closeTime, 'HH:mm')
+            item.openTime = moment(item.openTime, 'HH:mm')
+          })
+        }
+      })
+    },
+    // 删除
+    remove (k) {
+      this.formData.deliveryTimeRuleItemList.splice(k, 1)
+    },
+    // 增加
+    add () {
+      this.formData.deliveryTimeRuleItemList.push({
+        openTime: '',
+        closeTime: ''
+      })
+    },
+    // 保存提交
+    handleSubmit () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = JSON.parse(JSON.stringify(this.formData))
+          params.deliveryTimeRuleItemList.map(item => {
+            item.closeTime = moment(item.closeTime).format('HH:mm')
+            item.openTime = moment(item.openTime).format('HH:mm')
+            // 编辑
+            if (this.id) {
+              delete item.id
+            }
+          })
+          console.log(params)
+          saveTimeSetting(params).then(res => {
+            console.log(res, 'res--save')
+            if (res.status + '' === '200') {
+              this.$message.success(res.message ? res.message : '保存成功')
+              this.$emit('refresh')
+              setTimeout(function () {
+                _this.cancel()
+              }, 300)
+            } else {
+              // this.$message.error(res.message)
+            }
+          })
+        }
+      })
+    },
+    // 取消
+    handleCancel () {
+      this.cancel()
+    },
+    clear () {
+      this.$refs.ruleForm.resetFields()
+      this.formData.name = ''
+      this.formData.deliveryTimeRuleItemList = []
+    }
+  },
+  watch: {
+    visible (newValue, oldValue) {
+      this.isshow = newValue
+    },
+    isshow (newValue, oldValue) {
+      if (newValue) {
+        if (this.id) {
+          // 编辑
+          this.titleText = '编辑'
+          // 查详情
+          this.getDetailData(this.id)
+        } else {
+          this.titleText = '新增'
+          this.add()
+        }
+      } else {
+        this.cancel()
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.modalBox {
+}
+.formCont {
+	max-height: 600px;
+	display: flex;
+	flex-direction: column;
+	overflow-x: hidden;
+}
+.timeRow {
+	flex: 1;
+	overflow-y: scroll;
+}
+.ant-modal-footer {
+  display: none;
+}
+.dynamic-delete-button {
+  margin-right: 20px;
+}
+</style>

+ 202 - 0
src/views/equipmentManage/openTimeSetting/OpenTimeSetting.vue

@@ -0,0 +1,202 @@
+<template>
+  <a-card :bordered="false">
+    <div class="table-operator">
+      <a-button v-hasPermission="'B_openTimeSetting_add'" type="primary" icon="plus" @click="openModal" id="openTimeSetting-add">新增</a-button>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      rowKey="id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 时间段 -->
+      <template slot="deliveryTimeRuleItemList" slot-scope="text, record">
+        <span>{{ filterData(record.deliveryTimeRuleItemList) }}</span>
+      </template>
+      <!-- 操作 -->
+      <span slot="action" slot-scope="text, record">
+        <a-icon
+          id="openTimeSetting-edit"
+          type="edit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)"
+          v-hasPermission="'B_openTimeSetting_edit'"/>
+        <a-icon
+          type="delete"
+          title="删除"
+          id="openTimeSetting-del"
+          class="actionBtn icon-red"
+          v-if="$hasPermissions('B_openTimeSetting_del') && !record.isEnable"
+          @click="delect(record)" />
+        <span v-if="!$hasPermissions('B_openTimeSetting_edit') && (!$hasPermissions('B_openTimeSetting_del') && !record.isEnable)">--</span>
+      </span>
+    </s-table>
+    <!-- 新增/编辑 弹窗 -->
+    <add-time-modal :visible="showModal" :id="itemId" @refresh="refreshTable" @close="showModal = false" v-hasPermission="'B_openTimeSetting_add'"></add-time-modal>
+  </a-card>
+</template>
+
+<script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import AddTimeModal from './AddTimeModal.vue'
+import { getList, deleteTimeSetting } from '@/api/openTimeSetting.js'
+export default {
+  name: 'RoleList',
+  components: {
+    STable,
+    VSelect,
+    AddTimeModal
+  },
+  data () {
+    return {
+      showModal: false, // 是否打开新增时间段弹窗
+      itemId: '', // 编辑行id
+      // 表头
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 60,
+        align: 'center'
+      },
+      {
+        title: '创建时间',
+        dataIndex: 'createDate',
+        width: 150,
+        align: 'center'
+      },
+      {
+        title: '投放时间段名称',
+        dataIndex: 'name',
+        width: 200,
+        align: 'center'
+      },
+	  {
+	    title: '投放时间段',
+	    dataIndex: 'deliveryTimeRuleItemList',
+	    width: 200,
+	    align: 'center',
+        scopedSlots: {
+		  customRender: 'deliveryTimeRuleItemList'
+        }
+	  },
+      {
+        title: '操作',
+        width: 150,
+        align: 'center',
+        scopedSlots: {
+          customRender: 'action'
+        }
+      }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        console.log(parameter, 'parameter')
+        return getList(Object.assign(parameter, this.queryParam)).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+          for (let i = 0; i < res.data.list.length; i++) {
+            const _item = res.data.list[i]
+            _item.no = no + i + 1
+          }
+          return res.data
+        })
+        //     return new Promise((resolve) => {
+		  // const data = [
+		  //   { no: 1, id: '1', createDate: '2020-10-30 09:14', name: '上下班高峰', time: '8:00-9:00,18:00-20:00' },
+		  //   { no: 2, id: '12', createDate: '2020-10-30 09:14', name: '中午', time: '8:00-9:00,18:00-20:00' },
+		  //   { no: 3, id: '13', createDate: '2020-10-30 09:14', name: '下午茶', time: '8:00-9:00,18:00-20:00' },
+		  //   { no: 4, id: '14', createDate: '2020-10-30 09:14', name: '晚高峰', time: '8:00-9:00,18:00-20:00' },
+		  //   { no: 5, id: '15', createDate: '2020-10-30 09:14', name: '早高峰', time: '8:00-9:00,18:00-20:00' },
+		  //   { no: 6, id: '16', createDate: '2020-10-30 09:14', name: '深夜', time: '8:00-9:00,18:00-20:00' }
+		  // ]
+		  // resolve(data)
+        //     })
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      // vm.$refs.table.refresh()
+    })
+  },
+  methods: {
+    // 刷新列表
+    refreshTable () {
+      this.$refs.table.refresh(true)
+    },
+    // 新建
+    openModal () {
+      this.showModal = true
+      this.itemId = ''
+    },
+    // 时间段数据处理
+    filterData (row) {
+	  if (row) {
+		  let str = ''
+		  row.map((item, index) => {
+			  const p = item.openTime + '-' + item.closeTime
+		    str = str + p + ((index == row.length - 1) ? '' : ',')
+		  })
+		  return str
+	  } else {
+		  return '--'
+	  }
+    },
+    // 删除
+    delect (row) {
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        centered: true,
+        content: '删除后无法恢复,确认删除?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          deleteTimeSetting({
+            id: row.id
+          }).then(res => {
+            console.log(res, 'res1111')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    // 编辑
+    handleEdit (row) {
+      console.log(row, 'row')
+      this.showModal = true
+      this.itemId = row.id
+    }
+  }
+}
+</script>
+<style scoped>
+	.table-page-search-wrapper .ant-form-inline .ant-form-item {
+		margin-bottom: 0;
+	}
+
+	.action-button {
+		line-height: 40px;
+		white-space: nowrap;
+		padding: 5px 10px;
+		background-color: #1890ff;
+		border-radius: 4px;
+		color: #fff;
+		margin-right: 5px;
+	}
+
+	.red-text {
+		background-color: red;
+	}
+
+	.menu-text {
+		background-color: #f90;
+	}
+</style>

+ 0 - 173
src/views/evaluation/evaluationItem/AddEvaIndexModal.vue

@@ -1,173 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      :title="titleText"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="600">
-      <a-form :form="form" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评指标名称 -->
-            <a-form-item label="考评指标名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                id="addEvaIndexModal-name"
-                :maxLength="128"
-                v-decorator="[
-                  'formData.name',
-                  { initialValue: formData.name,
-                    getValueFromEvent: $filterEmpty,
-                    rules: [{ required: true, message: '请输入考评指标名称!' }] },
-                ]"
-                placeholder="请输入考评指标名称(最多128个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 15, offset: 9 }">
-          <a-button :loading="loading" id="addEvaIndexModal-submit" type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button id="addEvaIndexModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  itemIndexSave,
-  itemIndexDetail
-} from '@/api/evaluationItem.js'
-export default {
-  name: 'AddEvaIndexModal',
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 关联的考评项id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    },
-    // 要编辑的考评指标id
-    itemIndexId: {
-	  type: [String, Number],
-	  default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-		  // 编辑 查数据
-        if (this.itemIndexId) {
-          this.getData(this.itemIndexId)
-        }
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'AddEvaIndexModal'
-      }),
-      formData: {
-        name: '' // 指标名称
-      },
-	  loading: false // 确定按钮loading
-
-    }
-  },
-  computed: {
-    // 弹框标题
-    titleText () {
-      return this.itemIndexId ? '编辑' : '新增'
-    }
-  },
-  methods: {
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.clear()
-      this.$emit('close')
-    },
-    // 编辑时,获取数据详情
-    getData (id) {
-      itemIndexDetail({ id: id }).then(res => {
-        if (res.status == 200) {
-          // console.log(res, 'rrrrrrrrrr')
-          this.form.setFieldsValue({ 'formData.name': res.data.name })
-        }
-      })
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          this.loading = true
-          const params = this.itemIndexId ? Object.assign({ assessItemId: this.itemId, id: this.itemIndexId }, values.formData) : Object.assign({ assessItemId: this.itemId }, values.formData)
-          // console.log(params, 'ppppppppppppp')
-          itemIndexSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    clear () {
-      this.form.resetFields()
-    }
-
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'AddEvaIndexModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.modalBox {}
-
-	.ant-modal-footer {
-		display: none;
-	}
-
-	.time-text {
-		color: #1890FF;
-		padding: 0px 20px;
-		cursor: pointer;
-	}
-
-	.labelT {
-		position: absolute;
-		left: -135px;
-		top: 20px;
-		color: rgba(0, 0, 0, 0.85);
-	}
-</style>

+ 0 - 213
src/views/evaluation/evaluationItem/AddEvaItemModal.vue

@@ -1,213 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      :title="titleText"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="600">
-      <a-form :form="form" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评项目名称 -->
-            <a-form-item label="考评项目名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                id="addEvaItemModal-name"
-                :maxLength="128"
-                v-decorator="[
-                  'formData.name',
-                  { initialValue: formData.name,
-                    getValueFromEvent: $filterEmpty,
-                    rules: [{ required: true, message: '请输入考评项目名称!' }] },
-                ]"
-                placeholder="请输入考评项目名称(最多128个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评项目说明 -->
-            <a-form-item label="考评项目说明:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-textarea
-                allowClear
-                id="addEvaItemModal-desc"
-                :maxLength="500"
-                Input.TextArea
-                :autoSize="{minRows:5}"
-                v-decorator="[
-                  'formData.desc',
-                  { initialValue: formData.desc,getValueFromEvent: $filterEmpty },
-                ]"
-                placeholder="请输入考评项目说明(最多500个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 15, offset: 9 }">
-          <a-button :loading="loading" id="addEvaItemModal-submit" type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button id="addEvaItemModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  itemDetail,
-  itemSave
-} from '@/api/evaluationItem.js'
-export default {
-  name: 'AddEvaItemModal',
-  components: {
-    STable,
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的项目id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        this.form.resetFields()
-        // 编辑查详情
-        if (this.itemId) {
-          this.getFormData(this.itemId)
-        }
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'AddEvaItemModal'
-      }),
-      formData: {
-        name: '', // 方案名称
-        desc: '' // 方案说明
-      },
-	  loading: false // 确定按钮loading
-    }
-  },
-  computed: {
-    // 弹框标题
-    titleText () {
-      return this.itemId ? '编辑' : '新增'
-    }
-  },
-  methods: {
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.formData.name = ''
-      this.formData.desc = ''
-      this.$emit('close')
-    },
-    // 查详情
-    getFormData (id) {
-      itemDetail({
-        id: id
-      }).then(res => {
-        if (res.status == 200) {
-          // console.log(res, 'rrrrrrrrrr')
-          this.formData = Object.assign(this.formData, res.data)
-          console.log(this.formData, 'this.formData')
-        }
-      })
-    },
-    // 保存提交
-    handleSubmit () {
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          this.loading = true
-          const params = this.itemId ? Object.assign({
-            id: this.itemId
-          }, values.formData) : values.formData
-          // console.log(params, 'ppppppppppppp')
-          itemSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(() => {
-                this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.cancel()
-        }
-      })
-    },
-    clear () {
-      this.form.resetFields()
-    }
-
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'AddEvaItemModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.modalBox {}
-
-	.ant-modal-footer {
-		display: none;
-	}
-
-	.time-text {
-		color: #1890FF;
-		padding: 0px 20px;
-		cursor: pointer;
-	}
-
-	.labelT {
-		position: absolute;
-		left: -135px;
-		top: 20px;
-		color: rgba(0, 0, 0, 0.85);
-	}
-</style>

+ 0 - 265
src/views/evaluation/evaluationItem/EvaluationItem.vue

@@ -1,265 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :span="6">
-            <a-form-item label="考评项目名称">
-              <a-input id="evaluationItem-name" allowClear v-model.trim="queryParam.name" placeholder="请输入考评项目名称" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-item label="启用状态">
-              <v-select
-                id="evaluationItem-status"
-                ref="status"
-                allowClear
-                placeholder="状态"
-                v-model="queryParam.status"
-                code="ENABLE_FLAG"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-button id="evaluationItem-search" type="primary" style="margin-right: 10px;" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button id="evaluationItem-reset" type="" @click="reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <a-divider />
-    <div class="table-operator">
-      <a-button id="evaluationItem-add" type="primary" icon="plus" @click="openModal">新增</a-button>
-    </div>
-    <s-table
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-icon id="evaluationItem-setting" title="设置考评指标" type="setting" class="actionBtn icon-orange" @click="handleSet(record)" />
-        <a-icon
-          id="evaluationItem-edit"
-          type="edit"
-          title="编辑"
-          class="actionBtn icon-blues"
-          v-if="record.status == '0'"
-          @click="openModal(record)" />
-        <a-icon
-          id="evaluationItem-delete"
-          title="删除"
-          type="delete"
-          class="actionBtn icon-red"
-          v-if="record.status == '0'"
-          @click="delect(record)" />
-      </template>
-      <!-- 启用禁用 -->
-      <template slot="enable" slot-scope="text, row">
-        <a-switch id="evaluationItem-enableStatus" checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)" />
-      </template>
-    </s-table>
-    <!-- 新增/编辑 弹窗 -->
-    <add-evaItemModal :itemId="itemId" :visible="openAddModal" @refresh="reset" @close="openAddModal=false"></add-evaItemModal>
-    <!-- 设置弹窗 -->
-    <set-evaItemModal :itemId="itemId" :itemName="itemName" :visible="openSetting" @close="openSetting=false"></set-evaItemModal>
-  </a-card>
-
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  getItemListByPage,
-  itemDelete,
-  itemEnable
-} from '@/api/evaluationItem.js'
-import addEvaItemModal from './AddEvaItemModal.vue'
-import setEvaItemModal from './SetEvaItemModal.vue'
-import moment from 'moment'
-export default {
-  name: 'EvaluationPlanList',
-  components: {
-    STable,
-    VSelect,
-    addEvaItemModal,
-    setEvaItemModal
-  },
-  data () {
-    return {
-      moment,
-      pageNo: 1,
-      pageSize: 10,
-      openAddModal: false, // 打开新增弹窗
-      openSetting: false, // 打开设置弹窗
-      itemId: '', // 要编辑的考评项id
-      itemName: '', // 要编辑的考评项名称
-      // 查询参数
-      queryParam: {
-        name: '', // 项目名称
-        status: '' // 状态
-      },
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 60,
-        align: 'center'
-      },
-      {
-        title: '考评项目名称',
-        dataIndex: 'name',
-        width: 200,
-        align: 'center'
-      },
-      {
-        title: '考评项目说明',
-        dataIndex: 'desc',
-        width: 300,
-        align: 'center',
-        customRender: (text) => {
-		  return text || '--'
-        }
-      },
-      {
-        title: '状态',
-        width: 150,
-        align: 'center',
-        dataIndex: 'status',
-        scopedSlots: {
-          customRender: 'enable'
-        }
-      },
-      {
-        title: '操作',
-        width: 200,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        return getItemListByPage(Object.assign(parameter, this.queryParam)).then(res => {
-          if (res.status == 200) {
-            const no = (res.data.pageNo - 1) * res.data.pageSize
-            for (let i = 0; i < res.data.list.length; i++) {
-              const _item = res.data.list[i]
-              _item.no = no + i + 1
-              _item.status = _item.status + '' === '1'
-            }
-            res.data.count = Number(res.data.count)
-            return res.data
-          }
-        })
-      }
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.reset()
-    })
-  },
-  methods: {
-    // 修改状态
-    changeFlagHandle (record) {
-      // console.log(record, '222222222')
-      const _data = {
-        id: record.id,
-        status: record.status ? '1' : '0'
-      }
-      itemEnable(_data).then(res => {
-        console.log(res.status)
-        if (res.status == '200') {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-        } else {
-          record.status = !record.status
-        }
-      })
-    },
-    // 打开新增弹窗
-    openModal (row) {
-      this.itemId = row ? row.id : ''
-      this.openAddModal = true
-    },
-    // 删除
-    delect (row) {
-      const _this = this
-      this.$confirm({
-        title: '警告',
-        centered: true,
-        content: '删除考评项目时,其关联的考评指标将被同步删除,确认删除吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          itemDelete({
-            id: row.id
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-            }
-          })
-        }
-      })
-    },
-    // 打开设置弹框
-    handleSet (row) {
-      this.openSetting = true
-      this.itemId = row.id
-      this.itemName = row.name
-    },
-    // 重置
-    reset () {
-      this.queryParam = {
-        name: '',
-        status: '' // 状态
-      }
-      this.$refs.table.refresh(true)
-    }
-  }
-}
-</script>
-<style>
-	.table-page-search-wrapper,
-	.addButton {
-		margin-bottom: 0;
-	}
-
-	.table-page-search-wrapper .ant-form-inline .ant-form-item {
-		margin-bottom: 10px;
-	}
-
-	.table-operator {
-		margin-bottom: 10px;
-	}
-
-	.textCount {
-		border: 1px solid #91d5ff;
-		background-color: #e6f7ff;
-		padding: 10px 0;
-		border-radius: 5px;
-		padding-left: 20px;
-		margin: 10px 0;
-	}
-
-	.action-button {
-		line-height: 40px;
-		white-space: nowrap;
-		padding: 5px 10px;
-		background-color: #1890ff;
-		border-radius: 4px;
-		color: #fff;
-		margin-right: 5px;
-	}
-
-	.menu-text {
-		background-color: #f90;
-	}
-</style>

+ 0 - 172
src/views/evaluation/evaluationItem/SetEvaItemModal.vue

@@ -1,172 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      title="设置考评指标"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="'60%'">
-      <a-row :gutter="24" class="header">
-        <div>请给考评项目为【{{ itemName }}】设置考评指标</div>
-        <a-button id="setEvaItemModal-add" type="primary" @click="openModal">新增考评指标</a-button>
-      </a-row>
-      <a-table
-        ref="table"
-        size="default"
-        :pagination="false"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :dataSource="list"
-        bordered>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-icon id="setEvaItemModal-edit" title="编辑" type="edit" class="actionBtn icon-blues" @click="openModal(record)" />
-          <a-icon id="setEvaItemModal-delete" title="删除" type="delete" class="actionBtn icon-red" @click="delect(record)" />
-        </template>
-      </a-table>
-      <!-- 新增/编辑 弹窗 -->
-      <add-evaIndexModal :itemId="itemId" :itemIndexId="itemIndexId" :visible="openAddModal" @refresh="getList" @close="openAddModal=false"></add-evaIndexModal>
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  itemIndexQuery,
-  itemIndexDelete
-} from '@/api/evaluationItem.js'
-import addEvaIndexModal from './AddEvaIndexModal.vue'
-export default {
-  name: 'SetEvaItemModal',
-  components: {
-    addEvaIndexModal
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的考评项id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    },
-    // 要编辑的考评项名称
-    itemName: {
-      type: String,
-      default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        this.getList()
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      openAddModal: false, // 是否打开编辑/新增弹框
-      itemIndexId: '', // 考评指标id
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 60,
-        align: 'center'
-      },
-      {
-        title: '考评指标名称',
-        dataIndex: 'name',
-        width: 300,
-        align: 'center'
-      },
-      {
-        title: '操作',
-        width: 150,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
-      ],
-      list: []
-    }
-  },
-  computed: {},
-  methods: {
-    // 获取列表数据
-    getList () {
-      itemIndexQuery({
-        assessItemId: this.itemId
-      }).then(res => {
-        if (res.status == 200) {
-          res.data.map((item, index) => {
-            item.no = index + 1
-          })
-          this.list = res.data
-        } else {
-          this.list = []
-        }
-      })
-    },
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.$emit('close')
-    },
-    // 打开新增/编辑 弹窗
-    openModal (row) {
-      this.itemIndexId = row ? row.id : ''
-      this.openAddModal = true
-    },
-    // 删除考评指标
-    delect (row) {
-      const _this = this
-      this.$confirm({
-        title: '警告',
-        centered: true,
-        content: '删除后原数据不可恢复,是否删除?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          itemIndexDelete({
-            id: row.id
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.getList()
-            }
-          })
-        }
-      })
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'SetEvaItemModal'
-    })
-  }
-
-}
-</script>
-
-<style lang="less">
-	.modalBox{
-	  .header {
-	  	font-size: 16px;
-	  	font-weight: 600;
-	    padding: 0 15px 20px 15px;
-	  }
-	  .header div {
-	  	margin-bottom: 20px;
-	  }
-	}
-</style>

+ 0 - 253
src/views/evaluation/evaluationPlan/AddEvaModal.vue

@@ -1,253 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      :title="titleText"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="600">
-      <a-form :form="form" :model="formData" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评方案名称 -->
-            <a-form-item label="考评方案名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                id="addEvaModal-name"
-                :maxLength="128"
-                v-decorator="[
-                  'formData.name',
-                  { initialValue: formData.name,
-                    getValueFromEvent: $filterEmpty,
-                    rules: [{ required: true, message: '请输入考评方案名称!' }] },
-                ]"
-                placeholder="请输入考评方案名称(最多128个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 适用模式 -->
-            <a-form-item label="适用模式:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <v-select
-                ref="orgType"
-                id="addEvaModal-scopeType"
-                allowClear
-                mode="multiple"
-                @change="scopeTypeChange"
-                v-decorator="[
-                  'formData.scopeType',
-                  { initialValue: formData.scopeType,
-                    rules: [{ required: true, message: '请选择适用模式!' }] },
-                ]"
-                code="ASSESS_SCHEME_SCOPE_TYPE"></v-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="20">
-            <!-- 考评方案说明 -->
-            <a-form-item label="考评方案说明:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-textarea
-                allowClear
-                id="addEvaModal-desc"
-                :maxLength="500"
-                Input.TextArea
-                :autoSize="{minRows:5}"
-                v-decorator="[
-                  'formData.desc',
-                  { initialValue: formData.desc,getValueFromEvent: $filterEmpty },
-                ]"
-                placeholder="请输入考评方案说明(最多500个字符)" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button :loading="loading" id="addEvaModal-submit" type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button id="addEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  VSelect
-} from '@/components'
-import {
-  planSave,
-  planDetail
-} from '@/api/evaluationPlan.js'
-export default {
-  name: 'AddEvaModal',
-  components: {
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的方案id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        this.form.resetFields()
-        // 编辑查详情
-        if (this.itemId) {
-          this.getFormData(this.itemId)
-        }
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'AddEvaModal'
-      }),
-      formData: {
-        name: '', // 方案名称
-        scopeType: [], // 适用类型
-        desc: '' // 方案说明
-      },
-      loading: false, // 确定按钮loading
-      options: [{
-        code: 'VIDEO_INSPECTION',
-        dispName: '视频巡店',
-        id: 1
-      },
-      {
-        code: 'SPOT_INSPECTION',
-        dispName: '现场巡店',
-        id: 12
-      },
-      {
-        code: 'POINT_INSPECTION',
-        dispName: '点检',
-        id: 13
-      }
-      ]
-    }
-  },
-  computed: {
-    // 弹框标题
-    titleText () {
-      return this.itemId ? '编辑' : '新增'
-    }
-  },
-  methods: {
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.formData = {
-        name: '', // 方案名称
-        scopeType: [], // 适用类型
-        desc: '' // 方案说明
-      }
-      this.$emit('close')
-    },
-    // 查详情
-    getFormData (id) {
-      planDetail({
-        id: id
-      }).then(res => {
-        if (res.status == 200) {
-          // console.log(res, 'rrrrrrrrrr')
-          this.formData = Object.assign(this.formData, res.data)
-          this.formData.scopeType = this.formData.scopeType.split(',')
-        }
-      })
-    },
-    // 使用模式改变
-    scopeTypeChange (v) {
-      this.formData.scopeType = v
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          this.loading = true
-          const params = this.itemId ? Object.assign({
-            id: this.itemId
-          }, values.formData) : values.formData
-          params.scopeType = params.scopeType.join(',')
-          // console.log(params, 'ppppppppppppp')
-          planSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.cancel()
-        }
-      })
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'AddEvaModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.modalBox {}
-
-	.ant-modal-footer {
-		display: none;
-	}
-
-	.time-text {
-		color: #1890FF;
-		padding: 0px 20px;
-		cursor: pointer;
-	}
-
-	.labelT {
-		position: absolute;
-		left: -135px;
-		top: 20px;
-		color: rgba(0, 0, 0, 0.85);
-	}
-</style>

+ 0 - 317
src/views/evaluation/evaluationPlan/EvaluationPlan.vue

@@ -1,317 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :span="6">
-            <a-form-item label="方案名称">
-              <a-input id="evaluationPlan-name" allowClear v-model.trim="queryParam.name" placeholder="请输入方案名称" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-item label="启用状态">
-              <v-select
-                id="evaluationPlan-status"
-                ref="status"
-                allowClear
-                placeholder="状态"
-                v-model="queryParam.status"
-                code="ENABLE_FLAG"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-button id="evaluationPlan-search" type="primary" style="margin-right: 10px;" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button id="evaluationPlan-reset" type="" @click="reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <a-divider />
-    <a-row class="add-btn" type="flex" justify="space-between">
-      <a-button id="evaluationPlan-add" type="primary" icon="plus" @click="openModal">新增</a-button>
-      <!-- 目前版本不要 -->
-      <!-- <a-col id="evaluationPlan-setDefaultPlan" @click="handleDefaultSet">
-        <a-icon type="setting" class="setting-icon" />
-        <span class="setting">默认方案设置</span>
-      </a-col> -->
-    </a-row>
-    <s-table
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-icon id="evaluationPlan-setting" title="选择考评项目" type="setting" class="actionBtn icon-orange" @click="handleSet(record)" />
-        <a-icon
-          id="evaluationPlan-edit"
-          title="编辑"
-          type="edit"
-          class="actionBtn icon-blues"
-          v-if="record.status == '0'"
-          @click="openModal(record)" />
-        <a-icon
-          id="evaluationPlan-delete"
-          title="删除"
-          type="delete"
-          class="actionBtn icon-red"
-          v-if="record.status == '0'"
-          @click="delect(record)" />
-      </template>
-      <!-- 启用禁用 -->
-      <template slot="enable" slot-scope="text, row">
-        <a-switch id="evaluationPlan-enableStatus" checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)" />
-      </template>
-    </s-table>
-    <!-- 新增/编辑 弹窗 -->
-    <add-evaModal :itemId="itemId" :visible="openAddModal" @refresh="reset" @close="openAddModal=false"></add-evaModal>
-    <!-- 选择考评项弹窗 -->
-    <set-evaModal :itemId="itemId" :itemName="itemName" :visible="openSetting" @close="openSetting=false"></set-evaModal>
-    <!-- 设置默认方案弹窗 -->
-    <set-evaDefaultModal :itemId="itemId" :defaultPlanList="defaultPlanList" :visible="openDefaultSetting" @refresh="getDefaultPlan" @close="openDefaultSetting=false"></set-evaDefaultModal>
-  </a-card>
-
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  planQueryByPage,
-  planEnable,
-  planDefaultQuery,
-  planDelete
-} from '@/api/evaluationPlan.js'
-import addEvaModal from './AddEvaModal.vue'
-import setEvaModal from './SetEvaModal.vue'
-import setEvaDefaultModal from './SetEvaDefaultModal.vue'
-export default {
-  name: 'EvaluationPlanList',
-  components: {
-    STable,
-    VSelect,
-    addEvaModal,
-    setEvaModal,
-    setEvaDefaultModal
-  },
-  data () {
-    return {
-      pageNo: 1,
-      pageSize: 10,
-      openAddModal: false, // 打开新增弹窗
-      openSetting: false, // 打开选择考评项弹窗
-      openDefaultSetting: false, // 打开设置默认方案弹窗
-      itemId: '', // 要编辑的方案id
-      itemName: '', // 方案名称
-      defaultPlanList: [], // 默认方案列表
-      // 查询参数
-      queryParam: {
-        name: '',
-        status: '' // 状态
-      },
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 60,
-        align: 'center'
-      },
-      {
-        title: '考评方案名称',
-        dataIndex: 'name',
-        width: 200,
-        align: 'center'
-      },
-      {
-        title: '考评方案说明',
-        dataIndex: 'desc',
-        width: 300,
-        align: 'center',
-        customRender: (text) => {
-          return text || '--'
-        }
-      },
-      {
-        title: '适用模式',
-        width: 200,
-        align: 'center',
-        dataIndex: 'scopeTypeDictValue'
-      },
-      {
-        title: '状态',
-        width: 150,
-        align: 'center',
-        dataIndex: 'status',
-        scopedSlots: {
-          customRender: 'enable'
-        }
-      },
-      {
-        title: '操作',
-        width: 200,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        return planQueryByPage(Object.assign(parameter, this.queryParam)).then(res => {
-          if (res.status == 200) {
-            const no = (res.data.pageNo - 1) * res.data.pageSize
-            for (let i = 0; i < res.data.list.length; i++) {
-              const _item = res.data.list[i]
-              _item.no = no + i + 1
-              _item.status = _item.status + '' === '1'
-            }
-            return res.data
-          }
-        })
-      }
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.reset()
-      vm.getDefaultPlan()
-    })
-  },
-  methods: {
-    // 默认方案查询
-    getDefaultPlan () {
-      planDefaultQuery().then(res => {
-        // console.log(res, 'rrrrrrrr')
-        if (res.status == 200) {
-          this.defaultPlanList = res.data
-        } else {
-          this.defaultPlanList = []
-        }
-      })
-    },
-    // 修改状态
-    changeFlagHandle (record) {
-      const _data = {
-        id: record.id,
-        status: record.status ? '1' : '0'
-      }
-      planEnable(_data).then(res => {
-        console.log(res.status)
-        if (res.status == '200') {
-          this.$message.success('修改成功')
-          this.$refs.table.refresh()
-        } else {
-          record.status = !record.status
-        }
-      })
-    },
-    // 打开新增弹窗
-    openModal (row) {
-      this.itemId = row ? row.id : ''
-      this.openAddModal = true
-    },
-    // 打开默认方案设置弹窗
-    handleDefaultSet () {
-      this.openDefaultSetting = true
-    },
-    // 删除
-    delect (row) {
-      const _this = this
-      // 判断当前方案是否为默认方案
-      const has = this.defaultPlanList.find(item => item.assessId == row.id)
-      if (has) {
-        this.$warning({
-          title: '警告',
-		  centered: true,
-          content: '该考评方案为当前默认考评方案,不能删除,请取消该方案的默认后再进行删除!'
-        })
-      } else {
-        this.$confirm({
-          title: '警告',
-		  centered: true,
-          content: '删除后原数据不可恢复,是否删除?',
-          okText: '确定',
-          cancelText: '取消',
-          onOk () {
-            planDelete({
-              id: row.id
-            }).then(res => {
-              if (res.status == 200) {
-                _this.$message.success(res.message)
-                _this.$refs.table.refresh()
-              }
-            })
-          }
-        })
-      }
-    },
-    // 打开设置弹框
-    handleSet (row) {
-      this.itemId = row.id
-      this.itemName = row.name
-      this.openSetting = true
-      console.log(this.openSetting)
-    },
-    // 重置
-    reset () {
-      this.queryParam = {
-        name: '',
-        status: '' // 状态
-      }
-      this.$refs.table.refresh(true)
-    }
-  }
-}
-</script>
-<style scoped>
-	.table-page-search-wrapper,
-	.addButton {
-		margin-bottom: 0;
-	}
-
-	.table-page-search-wrapper .ant-form-inline .ant-form-item {
-		margin-bottom: 10px;
-	}
-
-	.add-btn {
-		margin-bottom: 10px;
-	}
-
-	.actionBtn {
-		font-size: 20px;
-		padding: 0 10px;
-	}
-
-	.setting-icon {
-		font-size: 20px;
-		margin-right: 5px;
-		color: #1890FF;
-	}
-
-	.setting {
-		font-size: 16px;
-		color: #1890FF;
-		border-bottom: 1px solid #1890FF;
-		cursor: pointer;
-	}
-
-	.blue {
-		color: #1890FF;
-	}
-
-	.green {
-		color: #16b50e;
-	}
-
-	.red {
-		color: red;
-	}
-
-	.orange {
-		color: #ffaa00;
-	}
-</style>

+ 0 - 244
src/views/evaluation/evaluationPlan/SetEvaDefaultModal.vue

@@ -1,244 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      title="默认方案设置"
-	  centered
-      v-model="isshow"
-      @cancle="cancel"
-      :width="600">
-      <a-form :form="form" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <!-- 视频巡店默认方案 -->
-            <a-form-item label="视频巡店默认方案:" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
-              <a-select
-                id="setEvaDefaultModal-videoType"
-                @change="videoTypeChange"
-                v-decorator="[
-                  'formData.videoType',
-                  { initialValue: formData.videoType,
-                    rules: [{ required: true, message: '请选择考评方案(单选)!' }] },
-                ]"
-                placeholder="请选择考评方案(单选)"
-              >
-                <a-select-option v-for="item in planList" :key="item.id" :value="item.id">
-                  {{ item.name }}
-                </a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <!-- 现场巡店默认方案 -->
-            <a-form-item label="现场巡店默认方案:" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
-              <a-select
-                id="setEvaDefaultModal-spotType"
-                placeholder="请选择考评方案(单选)"
-                @change="spotTypeChange"
-                v-decorator="[
-                  'formData.spotType',
-                  { initialValue: formData.spotType,
-                    rules: [{ required: true, message: '请选择考评方案(单选)!' }] },
-                ]">
-                <a-select-option v-for="item in planList" :key="item.id" :value="item.id">
-                  {{ item.name }}
-                </a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row>
-          <a-col :span="22">
-            说明:如果默认方案被删除,系统将自动获取对应类别下最新一条启用的模板作为默认方案模板
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button :loading="loading" id="setEvaDefaultModal-submit" type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button id="setEvaDefaultModal-cancle" :style="{ marginLeft: '8px' }" @click="cancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  planQuery,
-  planDefaultSave
-} from '@/api/evaluationPlan.js'
-export default {
-  name: 'AddEvaModal',
-  components: {
-    STable,
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的方案id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    },
-    // 默认方案
-    defaultPlanList: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        this.form.resetFields()
-        // 默认方案回显
-        this.pageInit()
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'AddEvaModal'
-      }),
-	  // 默认值设为undefined, 解决placeholder不生效问题
-      formData: {
-        videoType: undefined, // 视频巡店默认方案
-        spotType: undefined // 现场巡店默认方案
-      },
-      planList: [], // 考评方案列表
-	  loading: false // 确定按钮loading
-    }
-  },
-  computed: {},
-  mounted () {
-    // 获取方案列表数据
-    this.getPlanList()
-  },
-  methods: {
-    pageInit () {
-      if (this.defaultPlanList.length) {
-        this.formData.videoType = this.defaultPlanList.find(item => item.scopeType == 'VIDEO_INSPECTION').assessId
-        this.formData.spotType = this.defaultPlanList.find(item => item.scopeType == 'SPOT_INSPECTION').assessId
-      }
-    },
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.formData.videoType = undefined
-      this.formData.spotType = undefined
-      this.$emit('close')
-    },
-    // 获取方案列表数据
-    getPlanList () {
-      planQuery().then(res => {
-        if (res.status == 200) {
-          this.planList = res.data
-        } else {
-          this.planList = []
-        }
-      })
-    },
-    // 视频巡店默认方案改变
-    videoTypeChange (v) {
-      this.formData.videoType = v
-    },
-    // 现场巡店默认方案改变
-    spotTypeChange (v) {
-      this.formData.spotType = v
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          this.loading = true
-          const params = [{
-            assessId: values.formData.videoType,
-            scopeType: 'VIDEO_INSPECTION'
-          },
-          {
-            assessId: values.formData.spotType,
-            scopeType: 'SPOT_INSPECTION'
-          }
-          ]
-          planDefaultSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-			  // 保存后更新默认方案
-			  this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.cancel()
-        }
-      })
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'AddEvaModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.modalBox {}
-
-	.ant-modal-footer {
-		display: none;
-	}
-
-	.time-text {
-		color: #1890FF;
-		padding: 0px 20px;
-		cursor: pointer;
-	}
-
-	.labelT {
-		position: absolute;
-		left: -135px;
-		top: 20px;
-		color: rgba(0, 0, 0, 0.85);
-	}
-</style>

+ 0 - 393
src/views/evaluation/evaluationPlan/SetEvaModal.vue

@@ -1,393 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      class="modalBox"
-      :footer="null"
-      centered
-      title="选择考评项"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="'80%'">
-      <a-row :gutter="24">
-        <a-col class="title" :span="20">
-          <!-- 考评方案名称 -->
-          <span>考评方案名称: {{ itemName }}</span>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-form :form="form" ref="form" @submit="handleSubmit">
-          <a-card class="card-content">
-            <a-col :span="15">
-              <p>已选考评项目:</p>
-              <!-- 已选考评项列表 -->
-              <a-table
-                ref="table"
-                size="default"
-                :scroll="{y:400}"
-                :pagination="false"
-                :rowKey="(record) => record.id"
-                :columns="columns"
-                :dataSource="checkedList"
-                bordered>
-                <!-- 操作 -->
-                <template slot="action" slot-scope="text, record, index">
-                  <a-button
-                    id="setEvaModal-moveUp"
-                    type="primary"
-                    ghost
-                    size="small"
-                    class="actionBtn"
-                    @click="moveUp(index)"
-                    v-if="index>0"
-                    icon="arrow-up">上移</a-button>
-                  <a-button
-                    id="setEvaModal-moveDown"
-                    type="primary"
-                    ghost
-                    size="small"
-                    class="actionBtn"
-                    @click="moveDown(index)"
-                    v-if="index < checkedList.length-1"
-                    icon="arrow-down">下移</a-button>
-                  <a-button
-                    id="setEvaModal-moveTop"
-                    type="danger"
-                    ghost
-                    size="small"
-                    class="actionBtn"
-                    @click="moveTop(index)"
-                    v-if="index>0"
-                    icon="up">置顶</a-button>
-                  <a-button
-                    id="setEvaModal-moveBottom"
-                    type="danger"
-                    ghost
-                    size="small"
-                    class="actionBtn"
-                    @click="moveBottom(index)"
-                    v-if="index < checkedList.length-1"
-                    icon="down">置底</a-button>
-                </template>
-              </a-table>
-
-            </a-col>
-            <a-col span="1" class="divider">
-            </a-col>
-            <a-col span="8">
-              <a-row>
-                <p>请选择需要的考评项目:</p>
-              </a-row>
-              <s-table
-                ref="tableItem"
-                size="default"
-                :scroll="{y:400}"
-                :showPagination="false"
-                :row-selection="rowSelection"
-                :rowKey="(record) => record.id"
-                :columns="itemColumns"
-                :data="loadItemData"
-                bordered>
-                <!-- 启用禁用 -->
-                <template slot="enable" slot-scope="text, row">
-                  <span :class="[text==1 ? 'green' : 'grey']">{{ text==1 ? '启用' : '禁用' }}</span>
-                </template>
-              </s-table>
-            </a-col>
-          </a-card>
-          <a-form-item class="footer" :wrapper-col="{ span: 24, offset: 12 }">
-            <a-button :loading="loading" id="setEvaModal-submit" type="primary" @click="handleSubmit()">
-              保存
-            </a-button>
-            <a-button id="setEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
-              取消
-            </a-button>
-          </a-form-item>
-        </a-form>
-      </a-row>
-
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  planItemQuery,
-  planItemSave
-} from '@/api/evaluationPlan.js'
-import { getItemList } from '@/api/evaluationItem.js'
-export default {
-  name: 'AddEvaModal',
-  components: {
-    STable,
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的方案id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    },
-    // 要编辑的方案名字
-    itemName: {
-	  type: String,
-	  default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        // 获取已选列表数据
-        this.getCheckedList()
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      isshow: this.visible, // 弹框显示隐藏
-      form: this.$form.createForm(this, {
-        name: 'SetEvaModal'
-      }),
-      loading: false, // 确定按钮loading
-      // 已选考评项数据
-      checkedList: [], // 已选考评项列表
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 60,
-        align: 'center'
-      },
-      {
-        title: '考评项目名称',
-        dataIndex: 'assessItemName',
-        width: 200,
-        align: 'center'
-      },
-      {
-        title: '操作',
-        width: 200,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
-      ],
-      // 考评项列表数据
-      itemColumns: [{
-        title: '考评项目名称',
-        dataIndex: 'name',
-        width: 200,
-        align: 'center'
-      },
-      {
-        title: '状态',
-        width: 100,
-        dataIndex: 'status',
-        align: 'center',
-        scopedSlots: {
-          customRender: 'enable'
-        }
-      }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadItemData: parameter => {
-        return getItemList().then(res => {
-          if (res.status == 200) {
-            return res.data
-          }
-        })
-      }
-    }
-  },
-  computed: {
-    // 已选择的复选框
-    selectedRowKeys () {
-      const arr = []
-      this.checkedList.map(item => {
-        arr.push(item.assessItemId)
-      })
-      return arr
-    },
-    // 列表项是否可选择的配置
-    rowSelection () {
-      return {
-        columnTitle: '选择', // 选择框标题
-        columnWidth: 80, // 选择框宽度
-        selectedRowKeys: this.selectedRowKeys, // 指定选中项的 key 数组
-        // 选中项发生变化时的回调 selectedRowKeys:指定选中项的 key 数组 selectedRows:已选中的数组数据
-        onChange: (selectedRowKeys, selectedRows) => {
-          const arr = []
-          let index = 0
-  		  // 根据选择项的顺序展示已选列表
-          selectedRowKeys.map(item => {
-            index++
-            const p = selectedRows.find(row => row.id == item)
-            const row = {}
-            if (p) {
-              row.no = index
-			  row.assessItemId = p.id
-			  row.assessItemName = p.name
-			  row.assessSchemeId = this.itemId
-              arr.push(row)
-            }
-          })
-          this.checkedList = arr
-          // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
-        },
-        getCheckboxProps: record => ({
-          props: {
-            disabled: record.status == '0' // 禁用状态不可选
-          }
-        })
-      }
-    }
-  },
-  methods: {
-    // 获取已选列表数据
-    getCheckedList () {
-      planItemQuery({ assessSchemeId: this.itemId }).then(res => {
-        if (res.status == 200) {
-          this.checkedList = res.data
-          this.checkedList.map((item, index) => {
-            item.no = index + 1
-          })
-        } else {
-          this.checkedList = []
-          this.$message.warning(res.message)
-        }
-      })
-    },
-    // 点击弹框x号触发事件
-    cancel (e) {
-      this.clear()
-      this.$emit('close')
-    },
-    // 上移
-    moveUp (index) {
-      this.moveArr(index, index - 1)
-    },
-    // 下移
-    moveDown (index) {
-      this.moveArr(index, index + 1)
-    },
-    // 置顶
-    moveTop (index) {
-      this.goToArr(index, 1)
-    },
-    // 置底
-    moveBottom (index) {
-      this.goToArr(index, 0)
-    },
-    // 置顶和置底
-    goToArr (index, type) {
-      const arr = this.checkedList
-      const row = arr[index]
-      arr.splice(index, 1)
-      if (type) {
-        arr.unshift(row)
-      } else {
-        arr.push(row)
-      }
-      arr.map((item, index) => {
-        item.no = index + 1
-      })
-    },
-    // 移动
-    moveArr (index1, index2) {
-      const arr = this.checkedList
-      arr[index1] = arr.splice(index2, 1, arr[index1])[0]
-      arr.map((item, index) => {
-        item.no = index + 1
-      })
-      this.checkedList = arr
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          if (!this.checkedList.length) {
-            return this.$message.warning('请先选择考评项目')
-          }
-		  this.loading = true
-          planItemSave(this.checkedList).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.warning(res.message)
-            }
-            this.loading = false
-          })
-        }
-      })
-    },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.clear()
-          _this.cancel()
-        }
-      })
-    },
-    clear () {
-      this.form.resetFields()
-    }
-
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'SetEvaModal'
-    })
-  }
-
-}
-</script>
-
-<style scoped>
-	.title {
-		font-size: 16px;
-		color: black;
-		padding-bottom: 30px;
-	}
-
-	.actionBtn {
-		font-size: 12px;
-		margin: 0 5px;
-	}
-
-	.green {
-		color: #16b50e;
-	}
-
-	.grey {
-		color: rgb(153, 153, 153);
-	}
-
-	.footer {
-		margin-top: 20px;
-	}
-</style>

+ 18 - 12
src/views/power/OperateJournal/OperateJournal.vue

@@ -17,7 +17,7 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="操作人"><a-input allowClear v-model.trim="searchData.queryWord" :maxLength="30" placeholder="请输入" id="OperateJournal-queryWord"/></a-form-item>
+              <a-form-item label="操作人"><a-input allowClear v-model.trim="queryParam.queryWord" :maxLength="30" placeholder="请输入" id="OperateJournal-queryWord"/></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="OperateJournal-refreshTable">查询</a-button>
@@ -55,8 +55,8 @@ export default {
       form: this.$form.createForm(this, {
         name: 'OperateJournal'
       }),
-      time: [moment(getDate.getToday().starttime, this.dateFormat), moment(getDate.getToday().endtime, this.dateFormat)],
-      searchData: {
+      time: [moment(moment().startOf('day').valueOf()).format(this.dateFormat), moment(moment().valueOf()).format(this.dateFormat)],
+      queryParam: {
         beginDate: null, // 查询的开始时间
         endDate: null, // 查询的结束时间
         queryWord: '' // 操作人
@@ -92,9 +92,15 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        this.searchData.beginDate == null ? (this.searchData.beginDate = getDate.getToday().starttime) : null
-        this.searchData.endDate == null ? (this.searchData.endDate = getDate.getToday().endtime) : null
-        return journalList(Object.assign(parameter, this.searchData)).then(res => {
+		  const searchData = Object.assign(parameter, this.queryParam)
+		  if (this.time && this.time.length) {
+		    searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD HH:mm:ss')
+		    searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:mm:ss')
+		  } else {
+		    searchData.beginDate = ''
+		    searchData.endDate = ''
+		  }
+        return journalList(searchData).then(res => {
           const no = (res.data.data.pageNo - 1) * res.data.data.pageSize
           for (let i = 0; i < res.data.data.list.length; i++) {
             const _item = res.data.data.list[i]
@@ -109,15 +115,15 @@ export default {
     moment,
     // 操作时间change
     onChange (dates, dateStrings) {
-      this.searchData.beginDate = dateStrings[0]
-      this.searchData.endDate = dateStrings[1]
+      this.queryParam.beginDate = dateStrings[0]
+      this.queryParam.endDate = dateStrings[1]
     },
     // 重置
     resetForm () {
-      this.searchData.beginDate = getDate.getToday().starttime
-      this.searchData.endDate = getDate.getToday().endtime
-      this.time = [moment(getDate.getToday().starttime, this.dateFormat), moment(getDate.getToday().endtime, this.dateFormat)]
-      this.searchData.queryWord = ''
+      this.queryParam.beginDate = getDate.getToday().starttime
+      this.queryParam.endDate = getDate.getToday().endtime
+      this.time = [moment(moment().startOf('day').valueOf()).format(this.dateFormat), moment(moment().valueOf()).format(this.dateFormat)]
+      this.queryParam.queryWord = ''
       this.$refs.table.refresh(true)
     }
   }

+ 25 - 6
src/views/power/menu/menu.vue

@@ -1,9 +1,27 @@
 <template>
   <a-card :bordered="false">
     <a-row :gutter="24">
-      <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addChild" id="menu-addChild">新增子菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: #19be6b;color: #fff;" type="" icon="plus" @click="addTitle" id="menu-addTitle">新增顶部菜单</a-button>
-      <a-button style="margin-right: 10px;background-color: red;color: #fff;" type="" icon="delete" @click="delect()" id="menu-delect">删除</a-button>
+      <a-button
+        v-if="$hasPermissions('B_power_menu_child_add')"
+        style="margin-right: 10px;"
+        type="primary"
+        icon="plus"
+        @click="addChild"
+        id="menu-addChild">新增子菜单</a-button>
+      <a-button
+        v-if="$hasPermissions('B_power_menu_top_add')"
+        style="margin-right: 10px;background-color: #19be6b;color: #fff;"
+        type=""
+        icon="plus"
+        @click="addTitle"
+        id="menu-addTitle">新增顶部菜单</a-button>
+      <a-button
+        v-if="$hasPermissions('B_power_menu_del')"
+        style="margin-right: 10px;background-color: red;color: #fff;"
+        type=""
+        icon="delete"
+        @click="delect()"
+        id="menu-delect">删除</a-button>
 
     </a-row>
     <a-row :gutter="24">
@@ -151,7 +169,7 @@
           <a-form-item label="排序值" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
             <a-input
               type="number"
-			  oninput="if(value.length>6)value=value.slice(0,6);if(value<0)value=0"
+              oninput="if(value.length>6)value=value.slice(0,6);if(value<0)value=0"
               placeholder="请输入(0~999999)之间的排序值"
               allowClear
               id="menu-sort"
@@ -178,7 +196,7 @@
           </a-form-item>
 
           <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-            <a-button type="primary" @click="handleSubmit()" id="menu-handleSubmit">
+            <a-button v-if="$hasPermissions('B_power_menu_edit')" type="primary" @click="handleSubmit()" id="menu-handleSubmit">
               保存
             </a-button>
             <a-button :style="{ marginLeft: '8px' }" @click="clear" id="menu-clear">
@@ -249,6 +267,7 @@ export default {
 
     onSelect (selectedKeys, info) {
       console.log('onSelect', info)
+      this.clear()
       this.selectedKeys = selectedKeys
       if (info.selected) {
         const data = info.selectedNodes[0].data.props
@@ -408,7 +427,7 @@ export default {
             if (res.status + '' === '200') {
               this.$message.success(res.message ? res.message : '保存成功')
               _this.getMenuList()
-              _this.clear()
+              // _this.clear()
             } else {
               // this.$message.warning(res.message)
             }

+ 15 - 7
src/views/power/role/roleList.vue

@@ -27,9 +27,8 @@
         </a-row>
       </a-form>
     </div>
-    <a-divider />
     <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal" id="roleList-openModal">新增</a-button>
+      <a-button type="primary" icon="plus" @click="openModal" id="roleList-openModal" v-hasPermission="'B_power_role_add'" style="margin-top:18px ;">新增</a-button>
     </div>
 
     <s-table
@@ -41,22 +40,31 @@
       bordered>
       <!-- 启用禁用 -->
       <span slot="status" slot-scope="text, record">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" id="roleList-isEnable" v-model="record.isEnable" @change="changeFlagHandle(text, record)" />
+        <a-switch
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          id="roleList-isEnable"
+          v-model="record.isEnable"
+          v-hasPermission="'B_power_role_enable'"
+          @change="changeFlagHandle(text, record)" />
+        <span v-if="!$hasPermissions('B_power_role_enable')">--</span>
       </span>
       <!-- 角色描述 -->
       <template slot="remarks" slot-scope="text, record">
-        <span :title="record.remarks" style="display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{ record.remarks ?record.remarks : '--' }}</span>
+        <span :title="record.remarks" style="display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;max-width: 100%;">{{ record.remarks ?record.remarks : '--' }}</span>
       </template>
       <!-- 操作 -->
       <span slot="action" slot-scope="text, record">
-        <a-icon type="setting" title="菜单权限" class="actionBtn icon-orange" @click="openMenuModal(record)" />
-        <a-icon type="edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)" />
+        <a-icon type="setting" title="菜单权限" class="actionBtn icon-orange" @click="openMenuModal(record)" v-hasPermission="'M_power_role_menu'"/>
+        <a-icon type="edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)" v-hasPermission="'B_power_role_edit'" />
         <a-icon
           type="delete"
           title="删除"
           class="actionBtn icon-red"
-          v-if="!record.isEnable"
+          v-if="$hasPermissions('B_power_role_del') && !record.isEnable"
           @click="delect(record)" />
+        <span v-if="!$hasPermissions('M_power_role_menu') && !$hasPermissions('B_power_role_edit') && (!$hasPermissions('B_power_role_del') && !record.isEnable)">--</span>
+      </span>
       </span>
     </s-table>
     <roleModal :visible="showModal" :data="itemData" @refresh="refreshTable" @close="showModal = false"></roleModal>

+ 18 - 10
src/views/power/user/userList.vue

@@ -39,9 +39,14 @@
         </a-row>
       </a-form>
     </div>
-    <a-divider />
     <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal" id="userList-openModal">新增</a-button>
+      <a-button
+        type="primary"
+        icon="plus"
+        @click="openModal"
+        id="userList-openModal"
+        v-hasPermission="'B_power_user_add'"
+        style="margin-top:18px ;">新增</a-button>
     </div>
 
     <s-table
@@ -53,20 +58,23 @@
       bordered>
       <span slot="status" slot-scope="text, record">
         <a-switch
+          v-hasPermission="'B_power_user_enable'"
           checkedChildren="启用"
           unCheckedChildren="禁用"
           v-model="record.loginFlag"
           @change="changeFlagHandle(text, record)"
           id="userList-changeFlagHandle" />
+        <span v-if="!$hasPermissions('B_power_user_enable')">--</span>
       </span>
       <span slot="action" slot-scope="text, record">
         <a-icon
           type="unlock"
           title="重置密码"
-          v-if="record.loginFlag==1"
+          v-if="$hasPermissions('B_power_user_resetPsd') && record.loginFlag==1"
           class="actionBtn icon-orange"
           @click="resetPassword(record)" />
         <a-icon
+          v-hasPermission="'B_power_user_edit'"
           type="edit"
           title="编辑"
           class="actionBtn icon-blues"
@@ -76,7 +84,7 @@
           type="delete"
           title="删除"
           class="actionBtn icon-red"
-          v-if="record.loginFlag==0"
+          v-if="$hasPermissions('B_power_user_del') && record.loginFlag==0"
           @click="delect(record)"/>
       </span>
     </s-table>
@@ -123,30 +131,30 @@ export default {
       {
         title: '创建时间',
         dataIndex: 'createDate',
-        width: '120',
+        width: 120,
         align: 'center'
       },
       {
         title: '用户名称',
         dataIndex: 'name',
-        width: '100',
+        width: 100,
         align: 'center'
       },
       {
         title: '手机号码',
         dataIndex: 'phone',
-        width: '100',
+        width: 100,
         align: 'center'
       },
       {
         title: '角色',
-        width: '100',
+        width: 100,
         align: 'center',
         dataIndex: 'roleNames'
       },
       {
         title: '状态',
-        width: '100',
+        width: 100,
         align: 'center',
         scopedSlots: {
           customRender: 'status'
@@ -154,7 +162,7 @@ export default {
       },
       {
         title: '操作',
-        width: '100',
+        width: 100,
         align: 'center',
         scopedSlots: {
           customRender: 'action'

+ 312 - 0
src/views/releaseRecord/releaseRecordList.vue

@@ -0,0 +1,312 @@
+<template>
+  <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
+    <div class="shopOrder-searchForm">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="投放时间:" :label-col="{ span: 7 }" :wrapper-col="{ span: 17}">
+              <a-range-picker
+                style="width:100%"
+                id="releaseRecordList-queryOrderDate"
+                :disabledDate="disabledDate"
+                v-model="queryOrderDate"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="设备编号" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-input id="releaseRecordList-srcDeviceCode" allowClear :maxLength="120" v-model=" queryParam.srcDeviceCode " placeholder="请输入设备编号" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="网点名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-select
+                id="releaseRecordList-stationNo"
+                placeholder="请选择"
+                allowClear
+                v-model="queryParam.stationNo"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption"
+                @focus="handleFocus"
+                @blur="handleBlur"
+                @change="handleChange">
+                <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="releaseRecordList-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="releaseRecordList-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="用户账号" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-input id="releaseRecordList-customerMobile" allowClear :maxLength="11" v-model=" queryParam.customerMobile" placeholder="请输入用户账号" />
+            </a-form-item>
+          </a-col>
+          <!-- <a-col :span="6">
+            <a-form-item label="投递方式" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择投递方式" id="releaseRecordList-loginFlag"></v-select>
+            </a-form-item>
+          </a-col> -->
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">共<span> {{ orderTotal }} </span>单,兑换乐豆<span> {{ amountTotal }} </span>个</div>
+    </a-alert>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 订单状态 -->
+      <template slot="one" slot-scope="text, record">
+        <span v-if="record.rubbishType=='CLOTHES'">{{ record.rubbishWeight }}</span>
+        <span v-else>0</span>
+      </template>
+      <template slot="two" slot-scope="text, record">
+        <span v-if="record.rubbishType=='PAPER'">{{ record.rubbishWeight }}</span>
+        <span v-else>0</span>
+        </span></template>
+      <template slot="three" slot-scope="text, record">
+        <span v-if="record.rubbishType=='PLASTIC'">{{ record.rubbishWeight }}</span>
+        <span v-else>0</span>
+      </template>
+      <template slot="four" slot-scope="text, record">
+        <span v-if="record.rubbishType=='METAL'">{{ record.rubbishWeight }}</span>
+        <span v-else>0</span>
+      </template>
+      <template slot="five" slot-scope="text, record">
+        <span v-if="record.rubbishType=='HARM'">{{ record.rubbishWeight }}</span>
+        <span v-else>0</span>
+      </template>
+      <template slot="six" slot-scope="text, record">
+        <span v-if="record.rubbishType=='MET_PLA'">{{ record.rubbishWeight }}</span>
+        <span v-else>0</span>
+      </template>
+	  <template slot="seven" slot-scope="text, record">
+	    <span v-if="record.rubbishType=='GLASS'">{{ record.rubbishWeight }}</span>
+	    <span v-else>0</span>
+	  </template>
+	  <template slot="eight" slot-scope="text, record">
+	    <span v-if="record.rubbishType=='RECYCLING'">{{ record.rubbishWeight }}</span>
+	    <span v-else>0</span>
+	  </template>
+    </s-table>
+  </a-card>
+
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { getDeliveryLogList, getDeliveryLogTotal, stationList } from '@/api/releaseRecord.js'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+	  // 将默认当天时间日期回显在时间选择框中
+	  queryOrderDate: [
+	    moment(getDate.getRecentday().starttime, this.dateFormat),
+	    moment(getDate.getRecentday().endtime, this.dateFormat)
+	  ],
+	  dateFormat: 'YYYY-MM-DD',
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        customerMobile: '', //  用户手机
+        srcDeviceCode: '', //  设备编号
+        stationNo: undefined // 网点名称
+      },
+      optionData: [],
+      orderTotal: 0,	// 总单数
+      amountTotal: 0,	// 总金额
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '投放时间', dataIndex: 'deliveryTime', width: 200, align: 'center' },
+        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center' },
+        { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
+        { title: '用户账号', dataIndex: 'customerMobile', width: 200, align: 'center' },
+        // { title: '投递方式', dataIndex: '', width: 200, align: 'center' },
+        { title: '本次兑换乐豆(个)', dataIndex: 'goldNum', width: 100, align: 'center' },
+        { title: '内置各箱体投放重量(g)',
+				  children: [
+            { title: '废旧衣物', width: 100, align: 'center', scopedSlots: { customRender: 'one' } },
+            { title: '废旧纸张', width: 100, align: 'center', scopedSlots: { customRender: 'two' } },
+            { title: '废旧塑料', width: 100, align: 'center', scopedSlots: { customRender: 'three' } },
+            { title: '废旧金属', width: 100, align: 'center', scopedSlots: { customRender: 'four' } },
+            { title: '有害垃圾', width: 100, align: 'center', scopedSlots: { customRender: 'five' } },
+            { title: '废旧金属/塑料', width: 100, align: 'center', scopedSlots: { customRender: 'six' } },
+			{ title: '废旧玻璃', width: 100, align: 'center', scopedSlots: { customRender: 'seven' } },
+			{ title: '可回收物', width: 100, align: 'center', scopedSlots: { customRender: 'eight' } }
+				  ]
+        }
+
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+		  const searchData = Object.assign(parameter, this.queryParam)
+		  if (this.queryOrderDate && this.queryOrderDate.length) {
+		    searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+		    searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+		  } else {
+		    searchData.beginDate = ''
+		    searchData.endDate = ''
+		  }
+        return getDeliveryLogList(searchData).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            this.getListTotal()
+            return res.data
+          }
+        })
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.handleReset()
+      vm.getStationList()
+    })
+  },
+  methods: {
+    moment,
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+
+    handleChange (value) {
+		  console.log(`selected ${value}`)
+    },
+    handleBlur () {
+		  console.log('blur')
+    },
+    handleFocus () {
+		  console.log('focus')
+    },
+    filterOption (input, option) {
+		  return (
+		    option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+		  )
+    },
+    // 获取合作商数据
+    getStationList () {
+		  stationList().then(res => {
+			  console.log(res, '-----合作商')
+			  if (res.status == 200) {
+				  this.optionData = res.data || []
+			  }
+		  })
+    },
+
+    // 合计
+    getListTotal () {
+      const params = {
+        customerMobile: this.queryParam.customerMobile,
+        beginDate: this.queryParam.beginDate,
+        endDate: this.queryParam.endDate,
+        srcDeviceCode: this.queryParam.srcDeviceCode, //  设备编号
+        stationNo: this.queryParam.stationNo // 网点名称
+      }
+      if (this.queryOrderDate && this.queryOrderDate.length) {
+        params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+        params.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+      } else {
+        params.beginDate = ''
+        params.endDate = ''
+      }
+      getDeliveryLogTotal(params).then(res => {
+        if (res.status == 200) {
+          if (res.data) {
+            this.orderTotal = res.data.totalNum || 0
+            this.amountTotal = res.data.goldNum || 0
+          } else {
+			  this.orderTotal = 0
+			  this.amountTotal = 0
+		  }
+        }
+      })
+    },
+    // 重置
+    handleReset () {
+      // this.queryOrderDate = undefined
+	  this.queryOrderDate = [
+	    moment(getDate.getRecentday().starttime, this.dateFormat),
+	    moment(getDate.getRecentday().endtime, this.dateFormat)
+	  ],
+      this.queryParam.customerMobile = ''
+      this.queryParam.srcDeviceCode = ''
+      this.queryParam.stationNo = undefined
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .shopOrder-table-page-search-wrapper{
+    .shopOrder-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-bottom: 15px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+    .export-btn{
+      background-color: #ff9900;
+      border-color: #ff9900;
+      color: #fff;
+    }
+    .export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
+      color: #fff;
+      border-color: #ff9900;
+    }
+    .actionBtn {
+    	font-size: 20px;
+    	padding: 0 10px;
+    }
+    .blue {
+    	color: #1890FF;
+    }
+    .green {
+    	color: #16b50e;
+    }
+    .red {
+    	color: red;
+    }
+  }
+</style>

+ 121 - 0
src/views/shop/GoodsLogistics.vue

@@ -0,0 +1,121 @@
+<template>
+  <a-modal
+    centered
+    class="modalBox"
+    :footer="null"
+    :maskClosable="false"
+    title="物流信息"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="1000">
+    <a-form
+      id="logistics-form"
+      :form="form"
+      ref="form"
+      v-bind="formItemLayout"
+      @submit="handleSubmit">
+      <a-form-item label="快递公司" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-select
+          id="logistics-expressName"
+          allowClear
+          v-decorator="[
+            'formData.expressName',
+            { initialValue: formData.expressName,
+              rules: [{ required: true, message: '请选择快递公司' }] },
+          ]"
+          placeholder="请选择快递公司"
+        >
+          <a-select-option v-for="(item,index) in expressCompany" :key="index" :value="item.expressName">
+            {{ item.expressName }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item label="运单编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-input
+          id="logistics-expressNum"
+          :maxLength="30"
+          v-decorator="[
+            'formData.expressNum',
+            { initialValue: formData.expressNum, getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入运单编号' }] }
+          ]"
+          placeholder="请输入运单编号(最多30个字符)"
+          allowClear />
+      </a-form-item>
+      <a-form-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+        <a-button type="primary" html-type="submit" id="logistics-submit" style="margin-right: 15px">保存</a-button>
+        <a-button @click="isShow=false" style="margin-left: 15px" id="logistics-close">取消</a-button>
+      </a-form-item>
+    </a-form>
+  </a-modal>
+</template>
+
+<script>
+import { VSelect } from '@/components'
+import { expressCompanyQuery } from '@/api/order'
+export default {
+  name: 'GoodsLogistics',
+  components: { VSelect },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      formData: {
+        expressName: undefined, //  快递公司
+        expressNum: '' //  运单编号
+      },
+      isShow: this.openModal, //  是否填写物流信息
+      expressCompany: [] //  快递公司
+    }
+  },
+  mounted () {
+    this.getExpressCompany()
+  },
+  methods: {
+    //  物流信息  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          this.$emit('submit', values.formData)
+        }
+      })
+    },
+    //  获取快递公司
+    getExpressCompany () {
+      expressCompanyQuery({}).then(res => {
+        if (res.status == 200) {
+          this.expressCompany = res.data
+        } else {
+          this.expressCompany = []
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (val) {
+      if (!val) {
+        this.$emit('close')
+      } else {
+        this.form.resetFields()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+</style>

+ 145 - 0
src/views/shop/GoodsOrder.vue

@@ -0,0 +1,145 @@
+<template>
+  <div class="goods-order-cont">
+    <!-- 标题 -->
+    <div class="goods-order-header">
+      <!-- 待发货 -->
+      <div class="unDelivered" v-if="type == 'orderGoods'">
+        <p class="order-status">待发货</p>
+        <a-button v-if="$hasPermissions('B_order_sendGoods') && (orderState != 'WAIT_PAY') && (orderState != 'CANCEL')" id="goodsOrder-send" type="primary" size="small" @click="sendGoods">立即发货</a-button>
+      </div>
+      <!-- 已发货 -->
+      <div class="delivered" v-if="type == 'express'">
+        <p class="companyInfo">快递公司:<span>{{ orderData.expressName }}</span></p>
+        <div class="orderNoInfo">
+          <p class="orderNo">运单编号:<span>{{ orderData.expressNum }}</span></p>
+          <a-button id="goodsOrder-copy" size="small" v-clipboard:copy="orderData.expressNum" v-clipboard:success="onCopy">复制</a-button>
+        </div>
+      </div>
+    </div>
+    <!-- 表格 -->
+    <a-table
+      v-if="dataSource.length>0"
+      ref="table"
+      size="default"
+      :row-selection="rowSelection"
+      :columns="columns"
+      :rowKey="(record) => record.orderGoodsNo"
+      :data-source="dataSource"
+      :pagination="false"
+      bordered>
+    </a-table>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'GoodsOrder',
+  props: {
+    orderData: {
+      type: [Object, Array],
+      default: () => {
+        return {}
+      }
+    },
+    type: {
+      type: String,
+      default: ''
+    },
+    isReset: {
+      type: Boolean,
+      default: false
+    },
+    orderState: {
+      type: String,
+      default: ''
+    }
+  },
+  computed: {
+    dataSource: function () {
+      if (this.type == 'orderGoods') {
+        return this.orderData
+      } else if (this.type == 'express') {
+        return this.orderData.orderGoodsList
+      } else {
+        return []
+      }
+    },
+    rowSelection: function () {
+      //  订单状态不可为"待支付"、"已取消" 且 "待发货" 且 有立即发货 权限的即可操作表格
+      if (this.orderState != 'CANCEL' && this.orderState != 'WAIT_PAY' && this.type == 'orderGoods' && this.$hasPermissions('B_order_sendGoods')) {
+        return { selectedRowKeys: this.selectedRowKeys, onChange: this.onSelectChange }
+      } else {
+        return null
+      }
+    }
+  },
+  data () {
+    return {
+      selectedRowKeys: [], //  已选项
+      columns: [
+        { title: '商品名称', dataIndex: 'goodsName', width: 200, align: 'center' },
+        { title: '商品单价', dataIndex: 'payGold', width: 200, align: 'center' },
+        { title: '购买数量', dataIndex: 'buyQty', width: 200, align: 'center' }
+      ]
+    }
+  },
+  methods: {
+    //  选择商品
+    onSelectChange (selectedRowKeys) {
+      this.selectedRowKeys = selectedRowKeys
+    },
+    //  立即发货
+    sendGoods () {
+      if (this.selectedRowKeys.length < 1) {
+        this.$message.warning('请勾选需要发货的商品')
+        return
+      }
+      this.$emit('sendGoods', this.selectedRowKeys)
+    },
+    //  复制成功
+    onCopy (e) {
+      this.$message.success('复制成功')
+    }
+  },
+  watch: {
+    //  是否重置表格选中状态
+    isReset (newValue, oldValue) {
+      if (newValue) {
+        this.selectedRowKeys = []
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .goods-order-cont{
+    p{
+      margin: 0;
+    }
+    .goods-order-header{
+      border-left: 5px solid #ff9900;
+      padding-left: 10px;
+      margin: 25px 0 20px;
+      .unDelivered{
+        .order-status{
+          display: inline-block;
+          margin-right: 65px;
+        }
+      }
+      .delivered{
+        .companyInfo{
+          display: inline-block;
+          margin-right: 65px;
+        }
+        .orderNoInfo{
+          display: inline-block;
+          .orderNo{
+            display: inline-block;
+            margin-right: 20px;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 489 - 0
src/views/shop/bannerSetting.vue

@@ -0,0 +1,489 @@
+<template>
+  <a-card :bordered="false" class="bannerSetting-wrap">
+    <div class="add">
+      <a-button
+        type="primary"
+        v-if="$hasPermissions('B_adBanner_new')"
+        icon="plus"
+        class="addBtn"
+        @click="showModal"
+        id="bannerSetting-showModal">新增</a-button>
+    </div>
+    <!-- <v-select ref="position" style="display: none;" code="ADVERT_TYPE"></v-select> -->
+    <v-select ref="jumpType" style="display: none;" code="ADVERT_JUMP_TYPE"></v-select>
+    <v-select ref="location" style="display: none;" code="ADVERT_LOCATION"></v-select>
+    <!-- table列表 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="row => row.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 广告图位置 -->
+      <!-- <template slot="position" slot-scope="text">{{ $refs.position.getNameByCode(text) }}</template> -->
+      <template slot="jumpType" slot-scope="text">{{ $refs.jumpType.getNameByCode(text) }}</template>
+      <template slot="location" slot-scope="text">{{ $refs.location.getNameByCode(text) }}</template>
+      <!-- 操作 -->
+      <template slot="sort" slot-scope="text, record, index">
+        <div v-if="$hasPermissions('B_adBanner_sort')">
+          <a-icon
+            title="下移"
+            v-if="index != list.length-1"
+            :style="{ fontSize: '18px', color: '#e29b29', cursor: 'pointer',padding:'0 10px' }"
+            @click="changeSort(index,record,0)"
+            type="arrow-down" />
+          <a-icon
+            title="上移"
+            v-if="index != 0"
+            :style="{ fontSize: '18px', color: '#e29b29',cursor: 'pointer', padding:'0 10px' }"
+            @click="changeSort(index,record,1)"
+            type="arrow-up" />
+        </div>
+        <div v-else>--</div>
+      </template>
+      <span slot="action" slot-scope="text, record">
+        <a-icon
+          type="eye"
+          v-if="$hasPermissions('B_adBanner_view')"
+          id="bannerSetting-handleView"
+          title="查看"
+          class="actionBtn icon-green"
+          @click="handleEdit(record, 1)" />
+        <a-icon
+          type="edit"
+          id="bannerSetting-handleEdit"
+          v-if="record.state == '0'&&$hasPermissions('B_adBanner_edit')"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record, 0)" />
+        <a-icon
+          type="delete"
+          id="bannerSetting-delect"
+          v-if="record.state == '0'&&$hasPermissions('B_adBanner_del')"
+          title="删除"
+          class="actionBtn icon-red"
+          @click="delect(record)" />
+      </span>
+      <span slot="status" slot-scope="text, record">
+        <a-switch
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          id="bannerSetting-changeFlagHandle"
+          v-if="$hasPermissions('B_adBanner_enable')"
+          v-model="record.state == 1 ? true : false"
+          @change="changeFlagHandle(text, record)"
+        />
+      </span>
+    </s-table>
+    <!-- 弹窗 -->
+    <a-modal
+      :title="title"
+      :visible="visible"
+      :footer="null"
+      :closable="closable"
+      :centered="true"
+      @cancel="close"
+      width="45%">
+      <a-form
+        class="bannerSetting-form"
+        id="components-form-demo-validate-other"
+        :form="form"
+        ref="form"
+        v-bind="formItemLayout"
+        @submit="handleSubmit"
+        :hideRequiredMark="hideRequiredMark">
+        <a-form-item label="名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="bannerSetting-title"
+            :maxLength="30"
+            v-decorator="['formData.title', { initialValue: formData.title,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入轮播图名称(最多30个字符)!' }] }]"
+            :disabled="disabled"
+            placeholder="请输入轮播图名称(最多30个字符)"
+            allowClear
+          />
+        </a-form-item>
+        <!-- <a-form-item label="推广位类型" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <v-select
+            code="ADVERT_TYPE"
+            allowClear
+            id="bannerSetting-type"
+            placeholder="请选择推广位类型"
+            :disabled="disabled"
+            v-decorator="['formData.type', { initialValue: formData.type, rules: [{ required: true, message: '请选择推广位类型!' }] }]"
+          ></v-select>
+        </a-form-item> -->
+        <a-form-item label="显示位置" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <v-select
+            code="ADVERT_LOCATION"
+            allowClear
+            id="bannerSetting-location"
+            placeholder="请选择显示位置"
+            :disabled="disabled"
+            v-decorator="['formData.location', { initialValue: formData.location, rules: [{ required: true, message: '请选择显示位置!' }] }]"
+          ></v-select>
+        </a-form-item>
+        <a-form-item label="跳转类型" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <v-select
+            code="ADVERT_JUMP_TYPE"
+            allowClear
+            id="bannerSetting-jumpType"
+            placeholder="请选择跳转类型"
+            :disabled="disabled"
+            @change="jumpTypeChange"
+            v-decorator="['formData.jumpType', { initialValue: formData.jumpType, rules: [{ required: true, message: '请选择跳转类型!' }] }]"
+          ></v-select>
+        </a-form-item>
+        <a-form-item label="跳转链接" v-if="showJumpUrl" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-textarea
+            :maxLength="300"
+            v-decorator="['formData.jumpUrl', { initialValue: formData.jumpUrl, rules: [{ required: true, message: '请输入跳转链接(最多300字符)!' }] }]"
+            :disabled="disabled"
+            id="bannerSetting-jumpUrl"
+            placeholder="请输入跳转链接(最多300字符)"
+            allowClear
+          />
+        </a-form-item>
+        <a-form-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-radio-group
+            :disabled="disabled"
+            id="bannerSetting-status"
+            v-decorator="['formData.state', { initialValue: formData.state, rules: [{ required: true, message: '请选择状态!' }] }]"
+          >
+            <a-radio value="1">启用</a-radio>
+            <a-radio value="0">禁用</a-radio>
+          </a-radio-group>
+        </a-form-item>
+        <a-form-item label="上传图片" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+
+          <div v-if="title != '查看详情'">
+            <Upload
+              class="upload"
+              id="bannerSetting-photoPath"
+              v-decorator="[ 'formData.image', { initialValue: formData.image, rules: [{ required: true, message: '请上传轮播图!' }] } ]"
+              ref="bannerImage"
+              :fileSize="0.25"
+              :disabled="disabled"
+              @change="getbannerImage"
+              listType="picture-card" ></Upload>
+            <span class="upload-desc">请上传750*250尺寸的图片,大小不超过0.25MB,png、jpg、jpeg格式。</span>
+          </div>
+          <img v-else :src="formData.image" style="max-width:400px ;height: auto;" />
+        </a-form-item>
+        <a-form-item label="备注" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="bannerSetting-remarks"
+            :maxLength="500"
+            v-decorator="['formData.remarks', { initialValue: formData.remarks }]"
+            :disabled="disabled"
+            type="textarea"
+            placeholder="请输入备注(最多500个字符)"
+            allowClear
+          />
+        </a-form-item>
+        <a-form-item :wrapper-col="{ span: 12, offset: 6}" style="text-align: center;">
+          <a-button type="primary" html-type="submit" v-if="!disabled" id="bannerSetting-submit" style="margin-right: 15px">保存</a-button>
+          <a-button @click="close()" v-if="!disabled" style="margin-left: 15px" id="bannerSetting-close">取消</a-button>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </a-card>
+</template>
+
+<script>
+import { Upload, STable, VSelect } from '@/components'
+import { getadvertSettingList, changeStatus, changeSort, deleteItem, saveItem } from '@/api/bannerSetting.js'
+
+export default {
+  components: {
+    STable,
+    Upload,
+    VSelect
+  },
+  data () {
+    return {
+      showJumpUrl: true,
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'no',
+          width: 60,
+          align: 'center'
+        },
+        {
+          title: '名称',
+          width: 150,
+          dataIndex: 'title',
+          align: 'center'
+        },
+        // {
+        //   title: '推广位类型',
+        //   width: 100,
+        //   dataIndex: 'type',
+        //   align: 'center',
+        //   scopedSlots: {
+        //     customRender: 'position'
+        //   }
+        // },
+        {
+          title: '显示位置',
+          width: 120,
+          dataIndex: 'location',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'location'
+          }
+        },
+        {
+          title: '跳转类型',
+          width: 100,
+          dataIndex: 'jumpType',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'jumpType'
+          }
+        },
+        {
+          title: '跳转链接',
+          width: 200,
+          dataIndex: 'jumpUrl',
+          align: 'center',
+          customRender: (text) => {
+            return text || '--'
+          }
+        },
+        {
+          title: '状态',
+          width: 100,
+          dataIndex: 'state',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'status'
+          }
+        },
+        {
+          title: '排序',
+          width: 100,
+          dataIndex: 'sort',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'sort'
+          }
+        },
+        {
+          title: '操作',
+          align: 'center',
+          width: 150,
+          scopedSlots: {
+            customRender: 'action'
+          }
+        }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getadvertSettingList(parameter).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+          for (let i = 0; i < res.data.list.length; i++) {
+            const _item = res.data.list[i]
+            _item.no = no + i + 1
+          }
+          this.list = res.data.list
+          return res.data
+        })
+      },
+      title: '编辑',
+      closable: true,
+      visible: false,
+      confirmLoading: false,
+      formLayout: 'horizontal',
+      hideRequiredMark: false, // 是否显示必填的* 默认显示
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 14
+        }
+      },
+      formData: {
+        title: '', // 标题
+        state: '', // 状态
+        type: 'banner', // 广告图类型
+        location: '', // 显示位置
+        image: '', // banner地址
+        createDate: '', // 创建时间
+        jumpType: '', // 跳转类型
+        jumpUrl: '', // 跳转路径
+        remarks: '' // 备注
+      },
+      disabled: false,
+      value: '',
+      id: '',
+      isShow: true,
+      list: []
+    }
+  },
+  beforeCreate () {
+    this.form = this.$form.createForm(this, {
+      name: 'validate_other'
+    })
+  },
+  methods: {
+    jumpTypeChange (val) {
+      this.showJumpUrl = val != 'NONE'
+    },
+    showModal () {
+      this.disabled = false
+      delete this.formData.id
+      delete this.formData.createDate
+      this.visible = true
+      this.title = '新增'
+      this.hideRequiredMark = false
+    },
+    // 轮播图change
+    getbannerImage (data) {
+      this.formData.photoPath = data
+    },
+    // 点击保存;
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const formData = Object.assign({}, this.formData, values.formData)
+          console.log(formData)
+          saveItem(formData).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh(true)
+              _this.close()
+            }
+          })
+        }
+      })
+    },
+    close () {
+      this.visible = false
+      this.formData.title = ''
+      this.formData.jumpUrl = ''
+      this.formData.state = ''
+      this.formData.location = ''
+      this.formData.image = ''
+      this.formData.jumpType = '' // 跳转类型
+      this.formData.remarks = '' // 备注
+      this.title = '新增'
+      if (this.$refs.bannerImage) {
+        this.$refs.bannerImage.setFileList('')
+      }
+      this.form.resetFields()
+    },
+    // 赋值
+    assignment (row) {
+      this.formData.id = row.id
+      this.formData.title = row.title
+      this.formData.image = row.image
+      this.formData.jumpUrl = row.jumpUrl
+      this.formData.state = row.state
+      this.formData.type = row.type || 'banner'
+      this.formData.location = row.location
+      this.formData.jumpType = row.jumpType
+      this.formData.remarks = row.remarks
+      this.formData.createDate = row.createDate
+      this.jumpTypeChange(this.formData.jumpType)
+    },
+    // 0 修改,1 查看详情
+    handleEdit (row, type) {
+      const _this = this
+      if (type == 1) {
+        this.title = '查看详情'
+        this.hideRequiredMark = true
+      } else if (type == 0) {
+        this.title = '编辑'
+        this.hideRequiredMark = false
+        setTimeout(() => {
+          _this.$refs.bannerImage.setFileList(this.formData.image)
+        }, 500)
+      }
+      this.assignment(row)
+      this.disabled = type == 1
+      this.visible = true
+    },
+    // 删除
+    delect (row) {
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        centered: true,
+        content: '删除后无法恢复,确认删除?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          deleteItem({
+            id: row.id
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    // 更改启用禁用状态
+    changeFlagHandle (text, record) {
+      const _data = {
+        id: record.id,
+        flag: record.state == 1 ? '0' : '1'
+      }
+      changeStatus(_data).then(res => {
+        if (res.status == '200') {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+        } else {
+          record.status = !record.status
+        }
+      })
+    },
+    // 上移 下移 排序 index:下标  item:数据  type:类型 0 下移 1 上移
+    changeSort (index, item, type) {
+      console.log(index, item, type, this.list)
+      const indexThat = type === 0 ? index + 1 : index - 1
+      const params = {
+        id: item.id,
+        sortId: this.list[indexThat].id
+      }
+      changeSort(params).then(res => {
+        if (res.status == 200) {
+          this.$refs.table.refresh()
+        } else {
+          this.$message.error(res.message)
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .bannerSetting-wrap{
+    .addBtn {
+      margin-bottom: 20px;
+    }
+  }
+  .bannerSetting-form{
+    .upload{
+      width: 100%!important;
+      margin-bottom: 10px;
+    }
+    /* 商品图片描述 */
+    .upload-desc{
+      display: block;
+      font-size: 12px;
+      color: #808695;
+      line-height: 1.5em;
+    }
+  }
+</style>

+ 278 - 0
src/views/shop/goodsEdit.vue

@@ -0,0 +1,278 @@
+<template>
+  <a-card :bordered="false" class="goodsEdit-table-page-wrapper">
+    <a-form
+      id="goodsEdit-form"
+      :form="form"
+      ref="form"
+      v-bind="formItemLayout"
+      @submit="handleSubmit">
+      <a-form-item label="首页图" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <Upload
+          class="upload"
+          id="goodsEdit-homeImage"
+          v-decorator="[ 'formData.homeImage', { initialValue: formData.homeImage, rules: [{ required: true, message: '请上传首页图' }] } ]"
+          ref="homeImage"
+          :fileSize="0.25"
+          @change="changeHomeImage"
+          listType="picture-card" ></Upload>
+        <span class="upload-desc">请上传325*250尺寸的图片,大小不超过0.25MB,png、jpg、jpeg格式。</span>
+      </a-form-item>
+      <a-form-item label="商品图片" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <Upload
+          class="upload"
+          id="goodsEdit-images"
+          v-decorator="[ 'formData.images', { initialValue: formData.images, rules: [{ required: true, message: '请上传商品图片' }] } ]"
+          ref="goodsImage"
+          :maxNums="6"
+          :fileSize="0.25"
+          @change="changeImage"
+          listType="picture-card" ></Upload>
+        <span class="upload-desc">请上传750*325尺寸的图片,大小不超过0.25MB,png、jpg、jpeg格式。(最多可上传6张)</span>
+      </a-form-item>
+      <a-form-item label="商品名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-input
+          id="goodsEdit-name"
+          :maxLength="30"
+          v-decorator="[
+            'formData.name',
+            { initialValue: formData.name, getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入商品名称(最多30个字符)' }] }
+          ]"
+          placeholder="请输入商品名称(最多30个字符)"
+          allowClear />
+      </a-form-item>
+      <a-form-item label="商品分类" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-select
+          id="goodsEdit-goodsTypeNo"
+          allowClear
+          v-decorator="[
+            'formData.goodsTypeNo',
+            { initialValue: formData.goodsTypeNo,
+              rules: [{ required: true, message: '请选择商品分类' }] },
+          ]"
+          placeholder="请选择商品分类">
+          <a-select-option v-for="(item,index) in goodsTypeList" :key="index" :value="item.goodsTypeNo" :disabled="item.state==0">{{ item.name }}</a-select-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item label="商品价格" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-input-number
+          id="goodsEdit-sellGold"
+          class="inpNumber-unit"
+          :min="0"
+          :max="999999"
+          :precision="0"
+          v-decorator="[ 'formData.sellGold', { initialValue: formData.sellGold, rules: [{ required: true, message: '请输入商品价格(0~999999)' }] } ]"
+          placeholder="请输入商品价格(0~999999)。10个乐豆等值于1元"
+          allowClear />
+        <span class="inp-unit">乐豆</span>
+      </a-form-item>
+      <a-form-item label="商品状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" v-if="!isEdit">
+        <v-select
+          ref="state"
+          code="GOODS_STATE"
+          allowClear
+          id="goodsEdit-state"
+          placeholder="请选择商品状态"
+          v-decorator="['formData.state', { initialValue: formData.state, rules: [
+            { required: true, message: '请选择商品状态' },
+            { validator: stateValidator }
+          ] }]"
+        ></v-select>
+      </a-form-item>
+      <a-form-item label="库存数量" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-input-number
+          id="goodsEdit-inventoryQty"
+          class="inpNumber"
+          :min="0"
+          :max="999999"
+          :precision="0"
+          v-decorator="['formData.inventoryQty', { initialValue: formData.inventoryQty, rules: [
+            { required: true, message: '请输入库存数量' },
+            { validator: inventoryQtyValidator }
+          ] }]"
+          placeholder="请输入库存数量(0~999999)。当库存数量为0时显示为已售罄且无法下单"
+          allowClear />
+      </a-form-item>
+      <a-form-item label="供货商" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-select
+          id="goodsEdit-officialPartnerNo"
+          allowClear
+          :disabled="isEdit"
+          v-decorator="[
+            'formData.officialPartnerNo',
+            { initialValue: formData.officialPartnerNo,
+              rules: [{ required: true, message: '请选择供货商' }] },
+          ]"
+          placeholder="请选择供货商">
+          <a-select-option v-for="(item,index) in partnerList" :key="index" :value="item.officialPartnerNo" :disabled="item.state==0">{{ item.name }}</a-select-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item label="商品详情" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <editor id="goodsEdit-editor" ref="editor" class="goodsEdit-editor" @on-change="editorChange" :cache="false"></editor>
+      </a-form-item>
+      <a-form-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+        <a-button type="primary" html-type="submit" id="goodsEdit-btn-submit" style="margin-right: 15px">保存</a-button>
+        <a-button @click="close" style="margin-left: 15px" id="goodsEdit-btn-close">取消</a-button>
+      </a-form-item>
+    </a-form>
+  </a-card>
+</template>
+
+<script>
+import { Upload, STable, VSelect } from '@/components'
+import Editor from '@/components/WEeditor'
+import { goodsTypeQueryList } from '@/api/goodsType'
+import { supplierQueryList } from '@/api/supplier'
+import { goodsSave, goodsFind } from '@/api/goods'
+export default {
+  name: 'GoodsEdit',
+  components: { Upload, STable, VSelect, Editor },
+  data () {
+    return {
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      formData: {
+        homeImage: '', //  首页图
+        images: '', //  商品图
+        name: '', // 商品名称
+        goodsTypeNo: undefined, // 商品分类
+        sellGold: '', //  商品价格
+        state: '', //  商品状态
+        inventoryQty: '', // 库存数量
+        officialPartnerNo: undefined, //  供货商
+        desc: null //  商品详情
+      },
+      goodsTypeList: [], //  商品分类下拉数据
+      partnerList: [] //  供应商下拉数据
+    }
+  },
+  computed: {
+    isEdit () {
+      return this.$route.name === 'goodsListEdit'
+    }
+  },
+  methods: {
+    //  商品状态自定义校验
+    stateValidator (rule, value, callback) {
+      if (value == 1 && String(this.form.getFieldValue('formData.inventoryQty')) && this.form.getFieldValue('formData.inventoryQty') == 0) {
+        callback(new Error('库存为0的商品不能上架'))
+      } else {
+        callback()
+      }
+    },
+    //  输入库存数量调起商品状态校验
+    inventoryQtyValidator (rule, value, callback) {
+      this.form.validateFields(['formData.state'], (errors, values) => {
+        if (!errors) {
+          callback()
+        }
+      })
+    },
+    //  获取商品详情
+    getGoodsDetail () {
+      goodsFind({ id: this.$route.params.id }).then(res => {
+        if (res.status == 200) {
+          this.formData = Object.assign(this.formData, res.data)
+          this.$refs.homeImage.setFileList(res.data.homeImage)
+          this.$refs.goodsImage.setFileList(res.data.images)
+          this.$refs.editor.setHtml(this.formData.desc)
+        }
+      })
+    },
+    //  商品分类下拉数据
+    getGoodsType () {
+      goodsTypeQueryList({}).then(res => {
+        if (res.status == 200) {
+          this.goodsTypeList = res.data
+        } else {
+          this.goodsTypeList = []
+        }
+      })
+    },
+    //  供应商下拉数据
+    getPartnerQueryList () {
+      supplierQueryList({}).then(res => {
+        if (res.status == 200) {
+          this.partnerList = res.data
+        } else {
+          this.partnerList = []
+        }
+      })
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const formData = values.formData
+          formData.desc = _this.formData.desc
+          formData.id = this.isEdit ? this.$route.params.id : null
+          goodsSave(formData).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              setTimeout(() => {
+                _this.$router.push({ path: '/shop/goods/list' })
+              }, 1000)
+            }
+          })
+        }
+      })
+    },
+    //  取消
+    close () {
+      this.$router.push({ path: '/shop/goods/list' })
+    },
+    //  商品图上传
+    changeImage (file) {
+      this.formData.images = file
+    },
+    //  首页图上传
+    changeHomeImage (file) {
+      this.formData.homeImage = file
+    },
+    //  商品详情  文本编辑器
+    editorChange (html, text) {
+      this.formData.desc = html
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getGoodsType()
+      vm.getPartnerQueryList()
+      if (vm.isEdit) { //  详情页
+        vm.getGoodsDetail()
+      }
+    })
+  }
+}
+</script>
+
+<style lang="less">
+  .goodsEdit-table-page-wrapper{
+    .upload{
+      width: 100%!important;
+    }
+    //  商品图片描述
+    .upload-desc{
+      font-size: 12px;
+      color: #808695;
+    }
+    //  input-number 框宽度
+    .inpNumber{
+      width: 100%;
+    }
+    .inpNumber-unit{  //  有单位的
+      width: 90%;
+      margin-right: 8px;
+    }
+    //  文本编辑器  工具栏样式换行
+    .goodsEdit-editor{
+      .w-e-toolbar{
+        flex-wrap: wrap;
+      }
+    }
+  }
+</style>

+ 238 - 0
src/views/shop/goodsList.vue

@@ -0,0 +1,238 @@
+<template>
+  <a-card :bordered="false" class="goodsList-table-page-wrapper">
+    <div class="goodsList-searchForm">
+      <a-form layout="inline" ref="form" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="商品名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="goodsList-name" v-model="queryParam.name" allowClear :maxLength="30" placeholder="请输入商品名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="商品分类" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-select id="goodsList-goodsTypeNo" allowClear placeholder="请选择商品分类" v-model="queryParam.goodsTypeNo">
+                <a-select-option v-for="(item,index) in goodsTypeList" :key="index" :value="item.goodsTypeNo">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="供货商" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-select id="goodsList-officialPartnerNo" allowClear placeholder="请选择供货商" v-model="queryParam.officialPartnerNo">
+                <a-select-option v-for="(item,index) in partnerList" :key="index" :value="item.officialPartnerNo">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="商品状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.state"
+                ref="state"
+                id="goodsList-state"
+                code="GOODS_STATE"
+                placeholder="请选择商品状态"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="goodsList-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="goodsList-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button
+        v-if="$hasPermissions('B_goodsManage_add')"
+        id="goodsList-btn-add"
+        type="primary"
+        icon="plus"
+        @click="handleGoods('add')"
+        style="margin-top: 18px;">新增</a-button>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 商品状态 -->
+      <template slot="state" slot-scope="text, record">
+        <span :class="record.state==0 ? 'red' : record.state==1 ? 'green' : ''">{{ record.state==0 ? '下架' : record.state==1 ? '上架' : '--' }}</span>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button v-if="$hasPermissions('B_goodsManage_edit')" id="goodsList-btn-edit" class="icon-blues" type="link" @click="handleGoods('edit', record)">编辑</a-button>
+        <a-button v-if="$hasPermissions('B_goodsManage_shelf') && record.state" id="goodsList-btn-shelves" class="icon-orange" type="link" @click="handleShelves(record)">{{ record.state == 0 ? '上架' : record.state == 1 ? '下架' : '' }}</a-button>
+        <a-button v-if="$hasPermissions('B_goodsManage_del') && record.state==0" id="goodsList-btn-delect" class="icon-red" type="link" @click="handleDel(record)">删除</a-button>
+        <span v-if="!$hasPermissions('B_goodsManage_edit') && !($hasPermissions('B_goodsManage_shelf') && record.state) && !($hasPermissions('B_goodsManage_del') && record.state==0)">--</span>
+      </template>
+    </s-table>
+  </a-card>
+
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { goodsList, goodsDel, goodsState } from '@/api/goods'
+import { goodsTypeQueryList } from '@/api/goodsType'
+import { supplierQueryList } from '@/api/supplier'
+export default {
+  name: 'GoodsList',
+  components: { STable, VSelect },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+      // 查询参数
+      queryParam: {
+        name: '', //  商品名称
+        officialPartnerNo: undefined, //  供货商
+        goodsTypeNo: undefined, //  商品分类
+        state: undefined // 商品状态
+      },
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '商品名称', dataIndex: 'name', width: 200, align: 'center' },
+        { title: '商品分类', dataIndex: 'goodsTypeName', width: 200, align: 'center' },
+        { title: '商品价格(乐豆)', dataIndex: 'sellGold', width: 150, align: 'center' },
+        { title: '供货商简称', dataIndex: 'officialPartnerSimpleName', width: 100, align: 'center' },
+        { title: '商品状态', scopedSlots: { customRender: 'state' }, width: 100, align: 'center' },
+        { title: '库存数量', dataIndex: 'inventoryQty', width: 100, align: 'center' },
+        { title: '已售数量', dataIndex: 'sellQty', width: 100, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return goodsList(Object.assign(parameter, this.queryParam)).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+              _item.status = _item.status + '' === '1'
+            }
+            return res.data
+          }
+        })
+      },
+      goodsTypeList: [], //  商品分类下拉数据
+      partnerList: [] //  供应商下拉数据
+    }
+  },
+  methods: {
+    //  商品分类下拉数据
+    getGoodsType () {
+      goodsTypeQueryList({}).then(res => {
+        if (res.status == 200) {
+          this.goodsTypeList = res.data
+        } else {
+          this.goodsTypeList = []
+        }
+      })
+    },
+    //  供应商下拉数据
+    getPartnerQueryList () {
+      supplierQueryList({}).then(res => {
+        if (res.status == 200) {
+          this.partnerList = res.data
+        } else {
+          this.partnerList = []
+        }
+      })
+    },
+    //  新增、编辑商品
+    handleGoods (type, row) {
+      if (type == 'add') {
+        this.$router.push({ path: '/shop/goods/add' })
+      } else if (type == 'edit') {
+        this.$router.push({ path: `/shop/goods/edit/${row.id}` })
+      }
+    },
+    //  删除商品
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        centered: true,
+        content: '删除后原数据不可恢复,是否删除?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          goodsDel({ id: row.id }).then(res => {
+          	if (res.status == 200) {
+          		_this.$message.success(res.message)
+          		_this.$refs.table.refresh()
+          	}
+          })
+        }
+      })
+    },
+    //  上下架
+    handleShelves (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        centered: true,
+        content: '确认更改商品状态吗?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          const state = row.state == 0 ? 1 : row.state == 1 ? 0 : ''
+          goodsState({ id: row.id, state: state }).then(res => {
+          	if (res.status == 200) {
+          		_this.$message.success(res.message)
+          		_this.$refs.table.refresh()
+          	}
+          })
+        }
+      })
+    },
+    // 重置
+    handleReset () {
+      this.queryParam.name = ''
+      this.queryParam.officialPartnerNo = undefined
+      this.queryParam.goodsTypeNo = undefined
+      this.queryParam.state = undefined
+      this.$refs.table.refresh(true)
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getGoodsType()
+      vm.getPartnerQueryList()
+    })
+  }
+}
+</script>
+<style lang="less" scoped>
+  .goodsList-table-page-wrapper{
+    .goodsList-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+    .blue {
+    	color: #1890FF;
+    }
+    .green {
+    	color: #16b50e;
+    }
+    .red {
+    	color: red;
+    }
+  }
+</style>

+ 189 - 0
src/views/shop/goodsShelves.vue

@@ -0,0 +1,189 @@
+<template>
+  <a-card :bordered="false">
+    <a-row type="flex">
+      <a-col span="4">
+        <a-menu class="menu-cont" :selectedKeys="selectedKeys" mode="inline" @click="handleClick">
+          <a-menu-item v-for="item in menuList" :key="item.goodsTypeNo" :title="item.name">
+            {{ item.name }}
+          </a-menu-item>
+          <a-empty v-if="menuList.length==0" class="noData" />
+        </a-menu>
+      </a-col>
+      <a-col span="1"></a-col>
+      <a-col span="19">
+        <s-table
+          ref="table"
+          size="default"
+          :showPagination="false"
+          :scroll="{y:600}"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record, index">
+            <a-icon
+              title="下移"
+              v-if="index != list.length-1"
+              :style="{ fontSize: '18px', color: '#e29b29', cursor: 'pointer',padding:'0 10px' }"
+              @click="changeSort(index,record,0)"
+              type="arrow-down" />
+            <a-icon
+              title="上移"
+              v-if="index != 0"
+              :style="{ fontSize: '18px', color: '#e29b29',cursor: 'pointer', padding:'0 10px' }"
+              @click="changeSort(index,record,1)"
+              type="arrow-up" />
+            <span v-if="list.length===1">--</span>
+          </template>
+        </s-table>
+      </a-col>
+    </a-row>
+  </a-card>
+
+</template>
+
+<script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  goodsUpdateSort, goodsType, goodsListQuery
+} from '@/api/goods.js'
+export default {
+  name: 'GoodsList',
+  components: {
+    STable,
+    VSelect
+  },
+  data () {
+    return {
+      pageNo: 1,
+      pageSize: 10,
+      menuList: [], // 菜单列表
+	  selectedKeys: [], // 当前选中的菜单key
+      itemId: '', // 要编辑的租户id
+      // 表头
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 70,
+        align: 'center'
+      },
+      {
+        title: '商品名称',
+        dataIndex: 'name',
+        width: 200,
+        align: 'center'
+      },
+      {
+        title: '商品价格(乐豆)',
+        width: 200,
+        dataIndex: 'originalGold',
+        align: 'center'
+      },
+      {
+        title: '库存数量',
+        dataIndex: 'inventoryQty',
+        width: 120,
+        align: 'center',
+        customRender: (text) => {
+          return text || '0'
+        }
+      },
+      {
+        title: '操作',
+        width: 200,
+        align: 'center',
+        scopedSlots: {
+          customRender: 'action'
+        }
+      }
+      ],
+      list: [], // 列表数据
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        console.log(parameter, 'parameter')
+        if (this.selectedKeys.length) {
+          const queryParams = {
+            goodsTypeNo: this.selectedKeys[0],
+            state: 1,
+            orderBy: 'goods.SORT DESC'
+          }
+          return goodsListQuery(queryParams).then(res => {
+			  this.list = res.data || []
+			  for (let i = 0; i < res.data.length; i++) {
+			    const _item = res.data[i]
+			    _item.no = i + 1
+			  }
+			  return res.data
+          })
+        } else {
+          return new Promise((resolve) => {
+            const data = []
+            resolve(data)
+          })
+        }
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getGoodsType()
+    })
+  },
+  methods: {
+    // menu菜单切换
+    handleClick (item) {
+      console.log(item, 'kkkkkkkkkk')
+	  this.selectedKeys = [item.key]
+	  this.$refs.table.refresh(true)
+    },
+    // 获取分类数据
+    getGoodsType () {
+      goodsType({ state: 1 }).then(res => {
+		  console.log(res, 'rrrrrrrrrr')
+        if (res.status == 200) {
+          this.menuList = res.data
+		  this.selectedKeys = [res.data[0].goodsTypeNo]
+		  this.$refs.table.refresh(true)
+        } else {
+          this.menuList = []
+        }
+      })
+    },
+    // 上移 下移 排序 index:下标  item:数据  type:类型 0 下移 1 上移
+    changeSort (index, item, type) {
+      const indexThat = type === 0 ? index + 1 : index - 1
+      const params = [{
+        'id': item.id,
+        'sort': item.sort
+      },
+      {
+        'id': this.list[indexThat].id,
+        'sort': this.list[indexThat].sort
+      }
+      ]
+      goodsUpdateSort(params).then(res => {
+        if (res.status == 200) {
+          this.$refs.table.refresh()
+        } else {
+          this.$message.error(res.message)
+        }
+      })
+    }
+  }
+}
+</script>
+<style scoped="true">
+	.menu-cont {
+		height: 100%;
+	}
+	.noData {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+</style>

+ 177 - 0
src/views/shop/orderDetail.vue

@@ -0,0 +1,177 @@
+<template>
+  <div class="orderDetail-page-wrapper">
+    <a-card :bordered="false" class="orderDetail-goods-info">
+      <!-- 标题 -->
+      <div class="page-header">
+        <h3>订单信息</h3>
+        <a-badge v-if="orderDetail" :count="orderDetail.orderStateDictValue" :number-style="{ border: '1px solid #ff9900', backgroundColor: 'transparent', color: '#ff9900', padding: '1px 10px', height: '24px' }" />
+      </div>
+      <a-divider />
+      <a-row :gutter="48" v-if="orderDetail">
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">下单时间:</p>
+          <p class="item-main">{{ orderDetail.orderTime }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">订单编号:</p>
+          <p class="item-main">{{ orderDetail.orderSn }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">订单总额:</p>
+          <p class="item-main">{{ orderDetail.originalGold }}乐豆</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">用户手机:</p>
+          <p class="item-main">{{ orderDetail.customerMobile }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">收货人姓名:</p>
+          <p class="item-main">{{ orderDetail.receiverName }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">收货人手机:</p>
+          <p class="item-main">{{ orderDetail.receiverPhone }}</p>
+        </a-col>
+        <a-col :span="16" class="item-cont">
+          <p class="item-label">收货地址:</p>
+          <p class="item-main">{{ orderDetail.receiveAddress }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">支付时间:</p>
+          <p class="item-main">{{ orderDetail.payTime ? orderDetail.payTime : '--' }}</p>
+        </a-col>
+      </a-row>
+    </a-card>
+    <a-card :bordered="false" class="orderDetail-goods-main">
+      <!-- 标题 -->
+      <div class="page-header">
+        <h3>商品信息</h3>
+      </div>
+      <a-divider />
+      <div class="goods-info-cont">
+        <!-- 供应商列 -->
+        <a-tabs type="card" @change="handleClick" v-if="orderDetail">
+          <a-tab-pane v-for="item in orderDetail.officialPartnerOrderList" :key="item.officialPartnerNo" :tab="item.officialPartner.name"></a-tab-pane>
+        </a-tabs>
+        <!-- 商品订单 -->
+        <div v-if="orderData && orderData.orderGoodsList">
+          <!-- 待发货 -->
+          <GoodsOrder type="orderGoods" :orderData="orderData.orderGoodsList" :orderState="orderDetail.orderState" :isReset="isReset" @sendGoods="sendGoods" />
+        </div>
+        <div v-if="orderData && orderData.orderExpressList">
+          <!-- 已发货 -->
+          <GoodsOrder v-for="(item, index) in orderData.orderExpressList" :key="index" type="express" :orderData="item" />
+        </div>
+      </div>
+    </a-card>
+    <!-- 物流信息 -->
+    <GoodsLogistics :openModal="openModal" @submit="handleSubmit" @close="openModal=false" />
+  </div>
+</template>
+
+<script>
+import GoodsOrder from './GoodsOrder.vue'
+import GoodsLogistics from './GoodsLogistics.vue'
+import { orderFind, offPartnerOrderFind, orderExpressSend } from '@/api/order'
+export default {
+  name: 'OrderDetail',
+  components: { GoodsOrder, GoodsLogistics },
+  data () {
+    return {
+      orderDetail: null, //  订单详情
+      orderData: null,
+      officialPartnerNo: '', //  供货商编号
+      openModal: false, //  是否填写物流信息
+      orderGoodsNoList: [], //  发货订单号
+      isReset: false //  是否重置数据
+    }
+  },
+  methods: {
+    //  供应商下的订单信息
+    handleClick (officialPartnerNo) {
+      if (officialPartnerNo) {
+        this.officialPartnerNo = officialPartnerNo
+      }
+      offPartnerOrderFind({ orderNo: this.orderDetail.orderNo, officialPartnerNo: officialPartnerNo || this.officialPartnerNo }).then(res => {
+        if (res.status == 200) {
+          this.orderData = res.data
+        } else {
+          this.orderData = null
+        }
+      })
+    },
+    //  立即发货
+    sendGoods (idArr) {
+      this.orderGoodsNoList = idArr
+      this.openModal = true
+    },
+    getOrderDetail () {
+      orderFind({ id: this.$route.params.id }).then(res => {
+        if (res.status == 200) {
+          this.orderDetail = res.data
+          if (this.orderDetail.officialPartnerOrderList && this.orderDetail.officialPartnerOrderList.length > 0) {
+            this.officialPartnerNo = this.orderDetail.officialPartnerOrderList[0].officialPartnerNo
+            this.handleClick()
+          }
+        } else {
+          this.orderDetail = null
+        }
+      })
+    },
+    //  提交物流
+    handleSubmit (form) {
+      this.isReset = false
+      form.orderGoodsNoList = this.orderGoodsNoList
+      form.orderNo = this.orderDetail.orderNo
+      form.officialPartnerNo = this.officialPartnerNo
+      orderExpressSend(form).then(res => {
+        if (res.status == 200) {
+          this.isReset = true
+          this.$message.success(res.message)
+          this.handleClick()
+          this.openModal = false
+        }
+      })
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getOrderDetail()
+    })
+  }
+}
+</script>
+<style lang="less" scoped>
+	.orderDetail-page-wrapper{
+    .orderDetail-goods-info{
+      //  标题
+      .page-header{
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        h3{
+          margin: 0;
+        }
+      }
+      .item-cont{
+        display: flex;
+        justify-content: space-evenly;
+        margin-bottom: 24px;
+        .item-label{
+          display: inline-block;
+          flex-shrink: 0;
+          margin: 0;
+          width: 90px;
+        }
+        .item-main{
+          display: inline-block;
+          flex-grow: 1;
+          margin: 0;
+        }
+      }
+    }
+    .orderDetail-goods-main{
+      margin-top: 15px;
+    }
+  }
+</style>

+ 242 - 0
src/views/shop/shopOrder.vue

@@ -0,0 +1,242 @@
+<template>
+  <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
+    <div class="shopOrder-searchForm">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="下单时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="shopOrder-time"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="shopOrder-customerMobile" allowClear :maxLength="11" v-model="queryParam.customerMobile" placeholder="请输入用户手机" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="订单编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="shopOrder-orderSn" allowClear :maxLength="30" v-model="queryParam.orderSn" placeholder="请输入订单编号" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="订单状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.orderState"
+                ref="orderState"
+                id="shopOrder-status"
+                code="ORDER_STATE"
+                placeholder="请选择订单状态"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="shopOrder-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="shopOrder-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button
+        v-if="$hasPermissions('B_orderManage_export')"
+        class="export-btn"
+        id="shopOrder-btn-export"
+        type=""
+        :loading="loading"
+        @click="handleExport" style="margin-top: 18px;">导出</a-button>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 订单总额 -->
+      <template slot="originalGold" slot-scope="text, record">
+        <span>{{ record.originalGold || 0 }}乐豆</span>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button v-if="$hasPermissions('B_orderManage_detail')" id="shopOrder-handleView" type="link" @click="handleView(record)">详情</a-button>
+        <span v-else>--</span>
+      </template>
+    </s-table>
+  </a-card>
+
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import getDate from '@/libs/getDate.js'
+import moment from 'moment'
+import { orderList, orderExport } from '@/api/order'
+export default {
+  name: 'ShopOrder',
+  components: { STable, VSelect },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        customerMobile: '', //  用户手机
+        orderSn: '', //  订单编号
+        orderState: null // 订单状态
+      },
+      loading: false, // 导出loading
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '下单时间', dataIndex: 'orderTime', width: 200, align: 'center' },
+        { title: '用户手机', dataIndex: 'customerMobile', width: 200, align: 'center' },
+        { title: '订单编号', dataIndex: 'orderSn', width: 200, align: 'center' },
+        { title: '订单状态', dataIndex: 'orderStateDictValue', width: 200, align: 'center' },
+        { title: '订单总额', scopedSlots: { customRender: 'originalGold' }, width: 200, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const searchData = Object.assign(parameter, this.queryParam)
+        if (this.time && this.time.length) {
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        } else {
+          searchData.beginDate = ''
+          searchData.endDate = ''
+        }
+        return orderList(searchData).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+              _item.status = _item.status + '' === '1'
+            }
+            return res.data
+          }
+        })
+      },
+      // 将默认当天时间日期回显在时间选择框中
+      time: [
+        moment(getDate.getToday().starttime, this.dateFormat),
+        moment(getDate.getToday().endtime, this.dateFormat)
+      ],
+      dateFormat: 'YYYY-MM-DD'
+    }
+  },
+  methods: {
+    moment,
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+    //  查看详情
+    handleView (row) {
+      this.$router.push({ path: `/order/orderManage/detail/${row.id}` })
+    },
+    // 重置
+    handleReset () {
+      this.queryParam.beginDate = getDate.getToday().starttime
+      this.queryParam.endDate = getDate.getToday().endtime
+      this.time = [
+        moment(getDate.getToday().starttime, this.dateFormat),
+        moment(getDate.getToday().endtime, this.dateFormat)
+      ]
+      this.queryParam.customerMobile = ''
+      this.queryParam.orderSn = ''
+      this.queryParam.orderState = null
+      this.$refs.table.refresh(true)
+    },
+    // 导出
+    handleExport () {
+      const params = {
+        beginDate: this.queryParam.beginDate == null ? getDate.getToday().starttime : this.queryParam.beginDate,
+        endDate: this.queryParam.endDate == null ? getDate.getToday().endtime : this.queryParam.endDate,
+        customerMobile: this.queryParam.customerMobile,
+        orderSn: this.queryParam.orderSn,
+        orderState: this.queryParam.orderState
+      }
+      if (!params.beginDate && !params.endDate) {
+        this.$message.error('请先选择需要导出的下单时间区间再进行导出!')
+        return
+      }
+      // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
+      if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
+        this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
+      }
+      this.loading = true
+      orderExport(params).then(res => {
+        this.loading = false
+        this.download(res)
+      })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDhhmmss')
+      const fname = '订单记录-' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .shopOrder-table-page-search-wrapper{
+    .shopOrder-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+    .export-btn{
+      background-color: #ff9900;
+      border-color: #ff9900;
+      color: #fff;
+    }
+    .export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
+      color: #fff;
+      border-color: #ff9900;
+    }
+    .blue {
+    	color: #1890FF;
+    }
+    .green {
+    	color: #16b50e;
+    }
+    .red {
+    	color: red;
+    }
+  }
+</style>

+ 183 - 0
src/views/shopSetting/addGoodsClassModal.vue

@@ -0,0 +1,183 @@
+<template>
+  <div>
+    <!-- 新增编辑商品分类弹窗 -->
+    <a-modal
+      v-model="isShow"
+      @cancle="isShow=false"
+      :footer="null"
+      width="60%"
+      :centered="true"
+      :title="titleText">
+      <a-form id="components-form-demo-validate-other" :form="form" ref="form" v-bind="formItemLayout" @submit="handleSubmit">
+        <a-form-item label="商品分类名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="addGoodsClassModal-name"
+            :maxLength="30"
+            v-decorator="['formData.name', { initialValue: formData.name,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入供应商名称(最多30个字符)!' }] }]"
+            placeholder="请输入商品名称(最多30个字符)"
+            allowClear />
+        </a-form-item>
+        <a-form-item label="商城主页显示数量" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input-number
+            id="addGoodsClassModal-popularizeGoodsLimit"
+            class="inpNumber"
+            :min="0"
+            :max="999999"
+            :precision="0"
+            v-decorator="[ 'formData.popularizeGoodsLimit', { initialValue: formData.popularizeGoodsLimit, rules: [{ required: true, message: '请输入商城主页显示数量(0~999999)' }] } ]"
+            placeholder="请输入商城主页显示数量(0~999999)"
+            allowClear />
+        </a-form-item>
+        <a-form-item label="订单起购金额" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input-number
+            id="addGoodsClassModal-goldLimit"
+            class="inpNumber-unit"
+            :min="0"
+            :max="999999"
+            :precision="0"
+            v-decorator="[ 'formData.goldLimit', { initialValue: formData.goldLimit, rules: [{ required: true, message: '请输入订单起购金额(0~999999)' }] } ]"
+            placeholder="请输入订单起购金额(0~999999)"
+            allowClear />
+          <span class="inp-unit">乐豆</span>
+        </a-form-item>
+        <a-form-item label="备注" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-textarea
+            :maxLength="500"
+            v-decorator="['formData.remarks', { initialValue: formData.remarks, rules: [{ required: false, message: '请输入备注内容(最多500个字符)!' }] }]"
+            id="addGoodsClassModal-remarks"
+            placeholder="请输入备注内容(最多500个字符)"
+            allowClear />
+        </a-form-item>
+        <a-form-item :wrapper-col="{ span: 12, offset: 6}" style="text-align: center;">
+          <a-button type="primary" html-type="submit" id="addGoodsClassModal-submit" style="margin-right: 15px">保存</a-button>
+          <a-button @click="isShow=false" style="margin-left: 15px" id="addGoodsClassModal-close">取消</a-button>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import {
+  VSelect
+} from '@/components'
+import {
+  goodsClassDetails,
+  saveGoodsClass
+} from '@/api/shopSetting.js'
+export default {
+  name: 'AddGoodsClassModal',
+  components: {
+    VSelect
+  },
+  props: {
+    openGoodClassModal: {
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: String,
+      default: ''
+    },
+    itemData: {
+      type: Object,
+      default: function () {
+        return {}
+      }
+    }
+  },
+
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 14
+        }
+      },
+      isShow: this.openGoodClassModal,
+      titleText: '新增',
+      formLayout: 'horizontal',
+      form: this.$form.createForm(this, { name: 'addGoodsClassModal' }),
+      formData: {
+        name: '', // 分类名称
+        goldLimit: '', // 限制金额
+        remarks: '', // 备注
+        popularizeGoodsLimit: ''
+      }
+    }
+  },
+  methods: {
+    // 查看详情
+    getPageInfo () {
+      const _this = this
+      goodsClassDetails({
+        id: _this.itemId
+      }).then(res => {
+		  if (res.status == 200) {
+			  this.form.setFieldsValue({ 'formData': res.data })
+		  }
+      })
+    },
+    // 点击保存;
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const formData = Object.assign({}, this.itemData, this.formData, values.formData)
+		  formData.id = _this.itemId
+          saveGoodsClass(formData).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+			  _this.$emit('refresh')
+              setTimeout(function () {
+                _this.isShow = false
+              }, 300)
+            }
+          })
+        }
+      })
+    }
+  },
+  watch: {
+    openGoodClassModal (newValue, oldValue) {
+      this.isShow = newValue
+	  console.log(this.isShow)
+    },
+    isShow (val) {
+	  if (!val) {
+	    this.$emit('close')
+	  } else {
+		  this.form.resetFields()
+	  }
+    },
+    itemId (newValue, oldValue) {
+      console.log(newValue, '----------id')
+      if (newValue && this.isShow) {
+        this.titleText = '编辑'
+        this.getPageInfo(newValue)
+      } else {
+		  this.titleText = '新增'
+	  }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+	.input-number{
+		display: flex;
+		width: 100%;
+	}
+	.inpNumber{
+		width: 100%;
+	}
+	.inpNumber-unit{  //  有单位的
+		width: 90%;
+		margin-right: 8px;
+	}
+</style>

+ 172 - 0
src/views/shopSetting/addSupplierModal.vue

@@ -0,0 +1,172 @@
+<template>
+  <div>
+    <!-- 弹窗 -->
+    <a-modal
+      v-model="isShow"
+      @cancle="isShow=false"
+      :footer="null"
+      width="60%"
+      :centered="true"
+      :title="titleText">
+      <a-form id="components-form-demo-validate-other" ref="form" :form="form" v-bind="formItemLayout" @submit="handleSubmit">
+        <a-form-item label="供应商名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="addSupplierModal-name"
+            :maxLength="30"
+            v-decorator="['formData.name', { initialValue: formData.name,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入供应商名称(最多30个字符)!' }] }]"
+            placeholder="请输入供应商名称(最多30个字符)"
+            allowClear />
+        </a-form-item>
+        <a-form-item label="供应商简称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="addSupplierModal-simpleName"
+            :maxLength="30"
+            v-decorator="['formData.simpleName', { initialValue: formData.simpleName,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入供应商简称(最多30个字符)!' }] }]"
+            placeholder="请输入供应商简称(最多30个字符)"
+            allowClear />
+        </a-form-item>
+        <a-form-item label="联系人" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="addSupplierModal-contactName"
+            :maxLength="30"
+            v-decorator="['formData.contactName', { initialValue: formData.contactName,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入联系人!' }] }]"
+            placeholder="请输入联系人"
+            allowClear />
+        </a-form-item>
+        <a-form-item label="手机号码" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="addSupplierModal-contactPhone"
+            :maxLength="11"
+            v-decorator="[
+              'formData.contactPhone',
+              { initialValue: formData.contactPhone, rules: [{ required: true, message: '请输入负责人手机号!' }, { pattern: /^\d{11}$/, message: '请输入正确的手机号' }] }
+            ]"
+            placeholder="请输入手机号码"
+            allowClear />
+        </a-form-item>
+        <a-form-item label="备注" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-textarea
+            :maxLength="500"
+            v-decorator="['formData.remarks', { initialValue: formData.remarks, rules: [{ required: false, message: '请输入备注内容(最多500个字符)!' }] }]"
+            id="addSupplierModal-remarks"
+            placeholder="请输入备注内容(最多500个字符)"
+            allowClear />
+        </a-form-item>
+        <a-form-item :wrapper-col="{ span: 12, offset: 6}" style="text-align: center;">
+          <a-button type="primary" html-type="submit" id="addSupplierModal-submit" style="margin-right: 15px">保存</a-button>
+          <a-button @click="isShow=false" style="margin-left: 15px" id="addSupplierModal-close">取消</a-button>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import {
+  supplierDetails,
+  saveSupplier
+} from '@/api/shopSetting.js'
+export default {
+  name: 'AddSupplierModal',
+  props: {
+    openSupplierModal: {
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: String,
+      default: ''
+    },
+    itemData: {
+	  type: Object,
+	  default: function () {
+	    return {}
+	  }
+    }
+  },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 14
+        }
+      },
+	  titleText: '新增',
+      isShow: this.openSupplierModal,
+      form: this.$form.createForm(this, { name: 'addSupplierModal' }),
+      formData: {
+        name: '', // 名称
+        simpleName: '', // 简称
+        contactName: '', // 联系人
+        remarks: '', // 备注
+        contactPhone: '' // 手机号码
+      }
+    }
+  },
+  methods: {
+    // 查看详情
+    getPageInfo () {
+      supplierDetails({
+        id: this.itemId
+      }).then(res => {
+        if (res.status == 200) {
+          // this.form.setFieldsValue({ 'formData': res.data })
+          this.form.setFieldsValue({ 'formData.name': res.data.name })
+          this.form.setFieldsValue({ 'formData.contactName': res.data.contactName })
+          this.form.setFieldsValue({ 'formData.simpleName': res.data.simpleName })
+          this.form.setFieldsValue({ 'formData.contactPhone': res.data.contactPhone })
+          this.form.setFieldsValue({ 'formData.remarks': res.data.remarks })
+        }
+      })
+    },
+    // 点击保存;
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const formData = Object.assign({}, this.itemData, this.formData, values.formData)
+          formData.id = _this.itemId
+          saveSupplier(formData).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$emit('refresh')
+              setTimeout(function () {
+                _this.isShow = false
+              }, 300)
+            }
+          })
+        }
+      })
+    }
+  },
+  watch: {
+    openSupplierModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (val) {
+      if (!val) {
+        this.$emit('close')
+      } else {
+   	  this.form.resetFields()
+      }
+    },
+    itemId (newValue, oldValue) {
+      console.log(newValue, '----------id')
+      if (newValue && this.isShow) {
+        this.titleText = '编辑'
+        this.getPageInfo(newValue)
+      } else {
+   	  this.titleText = '新增'
+      }
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 253 - 0
src/views/shopSetting/goodsClass.vue

@@ -0,0 +1,253 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 搜索框 -->
+    <div class="table-page-search-wrapper" style="margin-bottom: 15px;">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="商品分类名称" :label-col="{ span: 3 }" :wrapper-col="{ span: 12 }">
+              <a-input allowClear v-model="searchData.name" :maxLength="30" placeholder="请输入" id="goodsClass-name" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="goodsClass-refresh">查询</a-button>
+            <a-button type="" @click="resetForm" id="goodsClass-resetForm">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="add">
+      <a-button
+        type="primary"
+        icon="plus"
+        class="addBtn"
+        @click="showModal"
+        id="goodsClass-showModal"
+        v-hasPermission="'B_goodsClass_add'">新增</a-button>
+    </div>
+    <!-- table列表 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <span slot="action" slot-scope="text, record">
+        <a-icon
+          v-if="$hasPermissions('B_goodsClass_edit') && record.state==0"
+          type="edit"
+          id="goodsClass-handleEdit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)" />
+        <span v-else>--</span>
+      </span>
+      <span slot="state" slot-scope="text, record">
+        <a-switch
+          v-hasPermission="'B_goodsClass_enable'"
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          id="goodsClass-changeFlagHandle"
+          :checked="record.state == 1 ? true : false"
+          @change="changeFlagHandle(text, record)" />
+        <span v-if="!$hasPermissions('B_goodsClass_enable')">--</span>
+      </span>
+      </span></s-table>
+    <add-goodsClass-modal
+      :itemId="itemId"
+      :itemData="itemData"
+      :openGoodClassModal="openGoodClassModal"
+      @refresh="$refs.table.refresh(true)"
+      @close="cancel"></add-goodsClass-modal>
+  </a-card>
+</template>
+
+<script>
+import {
+  Upload,
+  STable,
+  VSelect
+} from '@/components'
+import addGoodsClassModal from './addGoodsClassModal.vue'
+import {
+  getGoodsClassList,
+  changeGoodsStatus
+} from '@/api/shopSetting.js'
+
+export default {
+  components: {
+    STable,
+    Upload,
+    VSelect,
+    addGoodsClassModal
+  },
+  data () {
+    return {
+      searchData: {
+        name: ''
+      },
+      openGoodClassModal: false, // 默认关闭弹窗
+      itemId: null, // 编辑行id
+	  itemData: {}, // 编辑行数据
+      formLayout: 'horizontal',
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 14
+        }
+      },
+      // 表头
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 60,
+        align: 'center'
+      },
+      {
+        title: '商品分类名称',
+        width: 100,
+        dataIndex: 'name',
+        align: 'center'
+      },
+      {
+        title: '订单起购金额',
+        width: 100,
+        dataIndex: 'goldLimit',
+        align: 'center'
+      },
+	  {
+	    title: '商城主页显示数量',
+	    width: 100,
+	    dataIndex: 'popularizeGoodsLimit',
+	    align: 'center'
+	  },
+      {
+        title: '状态',
+        width: 100,
+        dataIndex: 'state',
+        align: 'center',
+        scopedSlots: {
+          customRender: 'state'
+        }
+      },
+      {
+        title: '备注',
+        width: 100,
+        dataIndex: 'remarks',
+        align: 'center',
+        customRender: (text) => {
+          return text || '--'
+        }
+      },
+      {
+        title: '操作',
+        align: 'center',
+        width: 100,
+        scopedSlots: {
+          customRender: 'action'
+        }
+      }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getGoodsClassList(
+          Object.assign(parameter, this.searchData)
+        ).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+          if (res.status == 200) {
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            return res.data
+          }
+        })
+      }
+    }
+  },
+  beforeCreate () {
+    this.form = this.$form.createForm(this, {
+      name: 'validate_other'
+    })
+  },
+  methods: {
+    showModal () {
+      console.log('---新增')
+      this.itemId = null
+	  this.itemData = {}
+      this.openGoodClassModal = true
+    },
+    // 编辑
+    handleEdit (record) {
+      this.itemId = record.id
+	  this.itemData = record
+      console.log(this.itemId, '-------编辑')
+      this.openGoodClassModal = true
+    },
+    // 重置
+    resetForm () {
+      this.searchData.name = ''
+      this.$refs.table.refresh(true)
+    },
+    //
+    cancel () {
+      this.itemId = null
+      this.openGoodClassModal = false
+    },
+    // 更改启用禁用状态
+    changeFlagHandle (text, record) {
+      console.log(text)
+      const _this = this
+      const _data = {
+        id: record.id,
+        flag: record.state == 1 ? '0' : '1'
+      }
+      if (record.state == 1) {
+        this.$confirm({
+          title: '提示',
+          centered: true,
+          content: '商品分类被禁用后,该分类将不在显示给用户,确定禁用吗?',
+          okText: '确定',
+          cancelText: '取消',
+          onOk () {
+            changeGoodsStatus(_data).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.$refs.table.refresh()
+              }
+            })
+          }
+        })
+      } else {
+        changeGoodsStatus(_data).then(res => {
+          if (res.status == 200) {
+            _this.$message.success(res.message)
+            _this.$refs.table.refresh()
+          } else {
+            record.state = !record.state
+          }
+        })
+      }
+    },
+    beforeRouteEnter (to, from, next) {
+      next(vm => {
+        vm.resetForm()
+      })
+    }
+  }
+}
+</script>
+
+<style>
+	.w-e-toolbar {
+		flex-wrap: wrap;
+	}
+
+	.addBtn {
+		margin-bottom: 20px;
+	}
+</style>

+ 231 - 0
src/views/shopSetting/supplier.vue

@@ -0,0 +1,231 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 搜索框 -->
+    <div class="table-page-search-wrapper" style="margin-bottom: 15px;">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48" >
+          <a-col :md="6" :sm="24">
+            <a-form-item label="供应商名称" :label-col="{ span: 3 }" :wrapper-col="{ span: 12 }"><a-input allowClear v-model.trim="searchData.name" :maxLength="30" placeholder="请输入" id="supplier-name"/></a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="supplier-refreshTable">查询</a-button>
+            <a-button type="" @click="resetForm" id="supplier-resetForm">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="add"><a-button
+      type="primary"
+      icon="plus"
+      class="addBtn"
+      @click="showModal"
+      id="bannerSetting-showModal"
+      v-hasPermission="'B_supplier_add'">新增</a-button></div>
+    <!-- table列表 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <span slot="action" slot-scope="text, record">
+        <a-icon
+          v-if="$hasPermissions('B_supplier_edit') && record.state==0"
+          type="edit"
+          id="supplier-handleEdit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)" />
+        <span v-else>--</span>
+      </span>
+      <span slot="state" slot-scope="text, record">
+        <a-switch
+          v-hasPermission="'B_supplier_enable'"
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          id="supplier-changeFlagHandle"
+          :checked="record.state == 1 ? true : false"
+          @change="changeFlagHandle(text, record)"
+        />
+        <span v-if="!$hasPermissions('B_supplier_enable')">--</span>
+      </span>
+    </s-table>
+    <!-- 新增编辑弹窗 -->
+    <add-supplier-modal :itemId="itemId" :itemData="itemData" :openSupplierModal="openSupplierModal" @refresh="$refs.table.refresh(true)" @close="cancel"></add-supplier-modal>
+  </a-card>
+</template>
+
+<script>
+import { Upload, STable, VSelect } from '@/components'
+import { getSupplierList, changeSupplierStatus } from '@/api/shopSetting.js'
+import addSupplierModal from './addSupplierModal.vue'
+export default {
+  components: {
+    STable,
+    Upload,
+    VSelect,
+    addSupplierModal
+  },
+  data () {
+    return {
+      searchData: { name: '' },
+	  openSupplierModal: false, // 默认关闭弹窗
+	  itemId: null, // 编辑行id
+	  itemData: {}, // 编辑行数据
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'no',
+          width: 60,
+          align: 'center'
+        },
+        {
+          title: '供应商名称',
+          width: 200,
+          dataIndex: 'name',
+          align: 'center'
+        },
+        {
+          title: '供应商简称',
+          width: 100,
+          dataIndex: 'simpleName',
+          align: 'center'
+        },
+        {
+		  title: '联系人',
+		  width: 100,
+		  dataIndex: 'contactName',
+		  align: 'center'
+        },
+        {
+		  title: '手机号码',
+		  width: 100,
+		  dataIndex: 'contactPhone',
+		  align: 'center',
+		  scopedSlots: {
+		    customRender: 'position'
+		  }
+        },
+        {
+          title: '状态',
+          width: 100,
+          dataIndex: 'state',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'state'
+          }
+        },
+        {
+		  title: '备注',
+		  width: 200,
+		  dataIndex: 'remarks',
+		  align: 'center',
+		  customRender: (text) => {
+		    return text || '--'
+		  }
+        },
+        {
+          title: '操作',
+          align: 'center',
+          width: 100,
+          scopedSlots: {
+            customRender: 'action'
+          }
+        }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getSupplierList(
+          Object.assign(parameter, this.searchData)
+        ).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+		   if (res.status == 200) {
+            for (let i = 0; i < res.data.list.length; i++) {
+			  const _item = res.data.list[i]
+			   _item.no = no + i + 1
+            }
+            return res.data
+		   }
+        })
+      },
+      formLayout: 'horizontal',
+      hideRequiredMark: false, // 是否显示必填的* 默认显示
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 14
+        }
+      }
+    }
+  },
+  methods: {
+    showModal () {
+      this.itemId = null
+	  this.itemData = {}
+      this.openSupplierModal = true
+    },
+    // 编辑
+    handleEdit (record) {
+	  this.itemId = record.id
+	  this.itemData = record
+	  console.log(this.itemId, '-------编辑')
+	  this.openSupplierModal = true
+    },
+    cancel () {
+	  this.itemId = null
+	  this.openSupplierModal = false
+    },
+    // 重置
+    resetForm () {
+      this.searchData.name = ''
+      this.$refs.table.refresh(true)
+    },
+    // 更改启用禁用状态
+    changeFlagHandle (text, record) {
+      console.log(text)
+      const _this = this
+      const _data = {
+    	  id: record.id,
+    	  flag: record.state == 1 ? '0' : '1'
+      }
+      if (record.state == 1) {
+    	  this.$confirm({
+    		  title: '提示',
+    		  centered: true,
+    		  content: '确定禁用该供货商吗?',
+    		  okText: '确定',
+    		  cancelText: '取消',
+    		  onOk () {
+    	      changeSupplierStatus(_data).then(res => {
+    			 if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.$refs.table.refresh()
+    			  }
+    	      })
+    	     }
+    	  })
+      } else {
+        changeSupplierStatus(_data).then(res => {
+    	  if (res.status == 200) {
+            _this.$message.success(res.message)
+            _this.$refs.table.refresh()
+    	  } else {
+            record.state = !record.state
+    	  }
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.addBtn {
+  margin-bottom: 20px;
+}
+</style>

+ 0 - 253
src/views/tenants/tenantsList.vue

@@ -1,253 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="48">
-          <a-col :span="6">
-            <a-form-item label="企业名称">
-              <a-input allowClear v-model.trim="queryParam.name" placeholder="请输入企业名称" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-item label="负责人手机">
-              <a-input allowClear v-model.trim="queryParam.contactPhone" placeholder="请输入申请人手机" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-item label="启用状态">
-              <v-select ref="status" allowClear placeholder="状态" v-model="queryParam.status" code="ENABLE_FLAG"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="6">
-            <a-button type="primary" style="margin-right: 10px;" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button type="" @click="reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <a-divider />
-    <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal">新增</a-button>
-    </div>
-    <s-table
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-icon title="编辑" type="edit" class="actionBtn icon-blues" @click="openModal(record)" />
-        <!-- <a-icon title="删除" type="delete" class="actionBtn icon-red" v-if="record.status == '0'" @click="delect(record)" /> -->
-      </template>
-      <!-- 启用禁用 -->
-      <template slot="enable" slot-scope="text, row">
-        <span :class="[text==1 ? 'green' : 'red']">{{ text==1 ? '已启用' : '已禁用' }}</span>
-      </template>
-    </s-table>
-    <!-- 新增/编辑 弹窗 -->
-    <tenantsModal :itemId="itemId" :visible="openTenantsModal" @refresh="reset()" @close="openTenantsModal=false"></tenantsModal>
-  </a-card>
-
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import {
-  getTenantsList,
-  tenantsDelete
-} from '@/api/tenants.js'
-import tenantsModal from './tenantsModal.vue'
-import moment from 'moment'
-export default {
-  name: 'TenantsList',
-  components: {
-    STable,
-    VSelect,
-    tenantsModal
-  },
-  data () {
-    return {
-      moment,
-      pageNo: 1,
-      pageSize: 10,
-      openTenantsModal: false, // 打开授权弹窗
-      itemId: '', // 要编辑的租户id
-      // 查询参数
-      queryParam: {
-        name: '',
-        contactPhone: '',
-        status: '' // 状态
-      },
-      // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: '40',
-        align: 'center'
-      },
-      {
-        title: '创建时间',
-        dataIndex: 'createDate',
-        width: '200',
-        align: 'center'
-      },
-      {
-        title: '企业名称',
-        dataIndex: 'name',
-        align: 'center'
-      },
-      {
-        title: '负责人名称',
-        dataIndex: 'contactName',
-        width: '120',
-        align: 'center',
-        customRender: (text) => {
-		  return text || '--'
-        }
-      },
-      {
-        title: '负责人手机',
-        width: '120',
-        align: 'center',
-        dataIndex: 'contactPhone'
-      },
-      {
-        title: '有效期至',
-        width: '200',
-        align: 'center',
-        dataIndex: 'expireDate'
-      },
-      {
-        title: '启用状态',
-        width: '200',
-        align: 'center',
-        dataIndex: 'status',
-        scopedSlots: {
-          customRender: 'enable'
-        }
-      },
-      {
-        title: '操作',
-        width: '200',
-        align: 'center',
-        scopedSlots: {
-          customRender: 'action'
-        }
-      }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        return getTenantsList(Object.assign(parameter, this.queryParam)).then(res => {
-          console.log(res, 'rrrrrrr')
-          if (res.status == 200) {
-            const no = (res.data.pageNo - 1) * res.data.pageSize
-            for (let i = 0; i < res.data.list.length; i++) {
-              const _item = res.data.list[i]
-              _item.no = no + i + 1
-              _item.status = _item.status + '' === '1'
-            }
-            return res.data
-          }
-        })
-      }
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.reset()
-    })
-  },
-  methods: {
-    // 打开新增/编辑 弹窗
-    openModal (row) {
-      this.itemId = row ? row.id : ''
-      this.openTenantsModal = true
-    },
-    // 删除
-    delect (row) {
-      const _this = this
-      this.$confirm({
-        title: '警告',
-        centered: true,
-        content: '删除后原数据不可恢复,是否删除?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          tenantsDelete({
-          	id: row.id
-          }).then(res => {
-          	if (res.status == 200) {
-          		_this.$message.success('res.message')
-          		_this.$refs.table.refresh()
-          	}
-          })
-        }
-      })
-    },
-    // 重置
-    reset () {
-      this.queryParam = {
-        name: '',
-        contactPhone: '',
-        status: '' // 状态
-      }
-      this.$refs.table.refresh(true)
-    }
-  }
-}
-</script>
-<style>
-	.table-page-search-wrapper,
-	.addButton {
-		margin-bottom: 0;
-	}
-
-	.table-page-search-wrapper .ant-form-inline .ant-form-item {
-		margin-bottom: 10px;
-	}
-
-	.textCount {
-		border: 1px solid #91d5ff;
-		background-color: #e6f7ff;
-		padding: 10px 0;
-		border-radius: 5px;
-		padding-left: 20px;
-		margin: 10px 0;
-	}
-
-	.action-button {
-		line-height: 40px;
-		white-space: nowrap;
-		padding: 5px 10px;
-		background-color: #1890ff;
-		border-radius: 4px;
-		color: #fff;
-		margin-right: 5px;
-	}
-
-	.menu-text {
-		background-color: #f90;
-	}
-
-	.actionBtn {
-		font-size: 20px;
-		padding: 0 10px;
-	}
-
-	.blue {
-		color: #1890FF;
-	}
-
-	.green {
-		color: #16b50e;
-	}
-
-	.red {
-		color: red;
-	}
-</style>

+ 0 - 397
src/views/tenants/tenantsModal.vue

@@ -1,397 +0,0 @@
-<template>
-  <div>
-    <a-modal
-      centered
-      class="modalBox"
-      :footer="null"
-      :title="titleText"
-      v-model="isshow"
-      @cancle="cancel"
-      :width="900">
-      <a-form :form="form" ref="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <!-- 企业名称 -->
-            <a-form-item label="企业名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                :maxLength="30"
-                v-decorator="['formData.name', { initialValue: formData.name,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入企业名称!' }] }]"
-                placeholder="请输入企业名称(最多30个字符)"
-              />
-            </a-form-item>
-          </a-col>
-          <!-- 企业编码 -->
-          <!-- 本次迭代先隐藏 -->
-          <!-- <a-col :span="12">
-            <a-form-item label="企业编码:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input allowClear :maxLength="30" v-decorator="['formData.bizCode', { initialValue: formData.bizCode,getValueFromEvent: $filterEmpty }]" placeholder="请输入企业编码" />
-            </a-form-item>
-          </a-col> -->
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <!-- 负责人名称 -->
-            <a-form-item label="负责人名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input allowClear :maxLength="30" v-decorator="['formData.contactName', { initialValue: formData.contactName,getValueFromEvent: $filterEmpty, rules: [] }]" placeholder="请输入负责人名称(最多30个字符)" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <!-- 负责人手机 -->
-            <a-form-item label="负责人手机:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-input
-                allowClear
-                :disabled="itemId?true:false"
-                :maxLength="11"
-                v-decorator="[
-                  'formData.contactPhone',
-                  { initialValue: formData.contactPhone, rules: [{ required: true, message: '请输入负责人手机号!' }, { pattern: /^\d{11}$/, message: '请输入正确的负责人手机号' }] }
-                ]"
-                placeholder="请输入负责人手机"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <!-- 使用有效期至 -->
-            <a-form-item label="使用有效期至:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-date-picker
-                style="width: 100%;"
-                :disabled-date="disabledDate"
-                @change="expireDateChange"
-                placeholder="年/月/日"
-                v-decorator="['formData.expireDate', { initialValue: formData.expireDate, rules: [{ type: 'object', required: true, message: '请选择使用有效期!' }] }]"
-              />
-              <p>
-                常选:
-                <span class="time-text" @click="timeFilter(3)">3天</span>
-                <span class="time-text" @click="timeFilter(30)">1个月</span>
-                <span class="time-text" @click="timeFilter(365)">1年</span>
-              </p>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <!-- 启用状态 -->
-            <a-form-item label="启用状态:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <a-radio-group @change="onStatusChange" v-decorator="['formData.status', { initialValue: formData.status, rules: [{ required: true, message: '请选择启用状态!' }] }]">
-                <a-radio :value="1">是</a-radio>
-                <a-radio :value="0">否</a-radio>
-              </a-radio-group>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row>
-          <a-col :span="12">
-            <!-- 使用权限 -->
-            <a-form-item label="使用权限:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
-              <v-select
-                ref="orgType"
-                allowClear
-                @change="scopeTypeChange"
-                v-decorator="['formData.scopeType', { initialValue: formData.scopeType, rules: [{ required: true, message: '请选择使用权限!' }] }]"
-                code="STORE_AUTH_TYPE"
-              ></v-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <!-- 地址 -->
-          <a-col span="9">
-            <a-form-item label="地址:" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-select @change="getCityList" v-decorator="['formData.addrProvince', { initialValue: formData.addrProvince, rules: [] }]" placeholder="请选择省">
-                <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col span="7">
-            <a-form-item prop="addrCity">
-              <a-select v-decorator="['formData.addrCity', { initialValue: formData.addrCity, rules: [] }]" @change="getAreaList" placeholder="请选择市">
-                <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col span="7">
-            <a-form-item prop="addrDistrict">
-              <a-select v-decorator="['formData.addrDistrict', { initialValue: formData.addrDistrict, rules: [] }]" @change="areaCharged" placeholder="请选择区/县">
-                <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="17">
-            <!-- 详细地址 -->
-            <a-form-item label="详细地址" :label-col="{ span: 4 }" :wrapper-col="{ span: 18 }">
-              <a-input :maxLength="30" allowClear placeholder="请输入详细地址(最多30个字符)" v-decorator="['formData.addrDetail', { initialValue: formData.addrDetail,getValueFromEvent: $filterEmpty, rules: [] }]" />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-form-item :wrapper-col="{ span: 24, offset: 10 }">
-          <a-button type="primary" @click="handleSubmit()">保存</a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="cancel()">取消</a-button>
-        </a-form-item>
-      </a-form>
-    </a-modal>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import { getProvince, getCityByPro, getDistrictByCity, tenantsDetail, tenantsSave } from '@/api/tenants.js'
-import moment from 'moment'
-export default {
-  name: 'TenantsModal',
-  components: {
-    STable,
-    VSelect
-  },
-  props: {
-    visible: {
-      type: Boolean,
-      default: false
-    },
-    // 要编辑的租户id
-    itemId: {
-      type: [String, Number],
-      default: ''
-    }
-  },
-  watch: {
-    visible (newValue, oldValue) {
-      this.isshow = newValue
-    },
-    isshow (newValue, oldValue) {
-      if (newValue) {
-        if (this.itemId) {
-          this.getDetail(this.itemId)
-        }
-      } else {
-        this.cancel()
-      }
-    }
-  },
-  data () {
-    return {
-      moment,
-      isshow: this.visible,
-      form: this.$form.createForm(this, {
-        name: 'tenantsModal'
-      }),
-      addrProvinceList: [], // 省列表
-      addrCityList: [], // 市列表
-      addrDistrictList: [], // 区列表
-      formData: {
-        name: '', // 企业名称
-        bizCode: '', // 企业编码
-        contactName: '', // 负责人名称
-        contactPhone: '', // 负责人电话
-        expireDate: null, // 使用有效期
-        scopeType: '', // 权限类型
-        status: 1, // 启用状态
-        addrProvince: undefined,
-        addrCity: undefined,
-        addrDistrict: undefined,
-        addrDetail: '' // 详细地址
-      }
-    }
-  },
-  computed: {
-    titleText () {
-      return this.itemId ? '编辑' : '新增'
-    }
-  },
-  mounted () {
-    this.getProvinceList()
-  },
-  methods: {
-    cancel (e) {
-      this.clear()
-      this.$emit('close')
-    },
-    // 不可选日期 今天以前日期不可选
-    disabledDate (current) {
-      return current && current.valueOf() < Date.now() - 86400000
-    },
-    pageInit () {
-      this.formData = {
-        name: '', // 企业名称
-        bizCode: '', // 企业编码
-        contactName: '', // 负责人名称
-        contactPhone: '', // 负责人电话
-        expireDate: null, // 使用有效期
-        scopeType: '', // 权限类型
-        status: 1, // 启用状态
-        addrProvince: undefined,
-        addrCity: undefined,
-        addrDistrict: undefined,
-        addrDetail: '' // 详细地址
-      }
-    },
-    // 查详情
-    getDetail (id) {
-      tenantsDetail({ id: id }).then(res => {
-        // console.log(res, 'rrrrrrr')
-        if (res.status == 200) {
-          // 获取市列表数据
-          this.getCityListRequest(res.data.addrProvince)
-          // 获取区列表数据
-          this.getAreaListRequest(res.data.addrCity)
-          this.formData = Object.assign(this.formData, res.data)
-          const now = moment().add(7, 'day').format('YYYY-MM-DD')
-          const expireDate = moment(now, 'YYYY-MM-DD')
-          this.formData.expireDate = this.formData.expireDate ? moment(this.formData.expireDate, 'YYYY-MM-DD') : expireDate
-          this.form.setFields({ 'formData.expireDate': { value: this.formData.expireDate, errors: '' } })
-          this.formData.status = Number(this.formData.status)
-
-          console.log(this.formData, 'this.formData')
-        }
-      })
-    },
-    // 获取省列表'
-    getProvinceList () {
-      getProvince().then(res => {
-        // console.log(res, 'rrrrrrr')
-        if (res.status == 200) {
-          this.addrProvinceList = res.data || []
-        } else {
-          this.addrProvinceList = []
-        }
-      })
-    },
-    // 获取城市列表
-    getCityList (val) {
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.form.setFields({ 'formData.addrCity': { value: undefined, errors: '' } })
-      this.form.setFields({ 'formData.addrDistrict': { value: undefined, errors: '' } })
-      this.form.setFields({ 'formData.addrDetail': { value: undefined, errors: '' } })
-      this.getCityListRequest(val)
-    },
-    getCityListRequest (val) {
-      getCityByPro({
-        id: val
-      }).then(res => {
-        if (res.status == 200) {
-          this.addrCityList = res.data || []
-        } else {
-          this.addrCityList = []
-        }
-      })
-    },
-    // 获取区县列表
-    getAreaList (val) {
-      this.addrDistrictList = []
-      this.form.setFields({ 'formData.addrDistrict': { value: undefined, errors: '' } })
-      this.form.setFields({ 'formData.addrDetail': { value: undefined, errors: '' } })
-      this.getAreaListRequest(val)
-    },
-    getAreaListRequest (val) {
-      getDistrictByCity({
-        id: val
-      }).then(res => {
-        if (res.status == 200) {
-          this.addrDistrictList = res.data || []
-        } else {
-          this.addrDistrictList = []
-        }
-      })
-    },
-    // 区县变更
-    areaCharged (val) {
-      this.form.setFields({ 'formData.addrDetail': { value: undefined, errors: '' } })
-    },
-    // 有效期改变
-    expireDateChange (v) {
-      console.log(v)
-      this.form.setFields({
-        'formData.expireDate': {
-          value: v,
-          errors: ''
-        }
-      })
-    },
-    // 使用权限改变
-    scopeTypeChange (v) {
-      this.form.setFields({ 'formData.scopeType': { value: v, errors: '' } })
-    },
-    // 启用状态切换
-    onStatusChange (v) {
-      console.log(v, 'vvvvvvvvvv')
-      this.formData.status = v
-    },
-    // 快捷时间处理
-    timeFilter (time) {
-      const now = moment()
-        .add(time, 'day')
-        .format('YYYY-MM-DD')
-      this.form.setFields({
-        'formData.expireDate': {
-          value: moment(now, 'YYYY-MM-DD'),
-          errors: ''
-        }
-      })
-    },
-    // 保存提交
-    handleSubmit () {
-      const _this = this
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          const params = this.itemId
-            ? Object.assign(
-              {
-                id: this.itemId
-              },
-              values.formData
-            )
-            : values.formData
-          params.expireDate = moment(params.expireDate).format('YYYY-MM-DD')
-          tenantsSave(params).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
-              this.$message.success(res.message ? res.message : '保存成功')
-              this.$emit('refresh')
-              setTimeout(function () {
-                _this.cancel()
-              }, 300)
-            } else {
-              // this.$message.error(res.message);
-            }
-          })
-        }
-      })
-    },
-    clear () {
-      this.form.resetFields()
-      this.pageInit()
-    }
-  },
-  beforeCreate () {
-    this.form = this.$form.createForm(this, {
-      name: 'tenantsModal'
-    })
-  }
-}
-</script>
-
-<style>
-.modalBox {
-}
-
-.ant-modal-footer {
-  display: none;
-}
-
-.time-text {
-  color: #1890ff;
-  padding: 0px 20px;
-  cursor: pointer;
-}
-
-.labelT {
-  position: absolute;
-  left: -135px;
-  top: 20px;
-  color: rgba(0, 0, 0, 0.85);
-}
-</style>

+ 8 - 145
src/views/user/ChangePwd.vue

@@ -1,158 +1,21 @@
 <template>
-
   <a-card :bordered="false" class="change-pwd-card">
-    <a-row :gutter="24" class="change-pwd">
-      <a-col span="8" offset="8">
-        <a-form @submit="handleSubmit" :form="form">
-          <!-- 原始密码 -->
-          <a-form-item
-            label="原始密码"
-            prop="oldPwd"
-            :label-col="formLayout.labelCol"
-            :wrapper-col="formLayout.wrapperCol">
-            <a-input
-              type="password"
-              v-decorator="[
-                'formCustom.oldPwd',
-                { initialValue: formCustom.oldPwd,
-                  rules: [
-                    { required: true, message: '请输入原始密码' },
-                  ]
-                },
-              ]">
-            </a-input>
-          </a-form-item>
-          <!-- 新密码 -->
-          <a-form-item
-            label="新密码"
-            prop="passwd"
-            :label-col="formLayout.labelCol"
-            :wrapper-col="formLayout.wrapperCol">
-            <a-input
-              type="password"
-              v-decorator="[
-                'formCustom.passwd',
-                { initialValue: formCustom.passwd,
-                  rules: [
-                    { required: true, message: '请输入新密码' }
-                  ]
-                },
-              ]">
-            </a-input>
-          </a-form-item>
-          <!-- 再次确认 -->
-          <a-form-item
-            label="再次确认"
-            prop="passwdCheck"
-            :label-col="formLayout.labelCol"
-            :wrapper-col="formLayout.wrapperCol">
-            <a-input
-              type="password"
-              v-decorator="[
-                'formCustom.passwdCheck',
-                { initialValue: formCustom.passwdCheck,
-                  rules: [
-                    { required: true, message: '请再次输入密码' },
-                    { validator: compareToFirstPassword }
-                  ]
-                },
-              ]">
-            </a-input>
-          </a-form-item>
-          <a-col span="16" offset="8">
-            <a-form-item>
-              <a-button type="primary" htmlType="submit" :loading="loading">保存</a-button>
-              <a-button @click="handleReset('formCustom')" style="margin-left: 8px">重置</a-button>
-            </a-form-item>
-          </a-col>
-        </a-form>
-      </a-col>
-    </a-row>
+    <ResetPwd />
   </a-card>
-
 </template>
 
 <script>
-import { changePwd } from '@/api/login.js'
-import { mapActions, mapGetters } from 'vuex'
-
+import ResetPwd from '@/views/user/ResetPwd.vue'
 export default {
   name: 'ChangePwd',
-  data () {
-    return {
-      formLayout: {
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 6 }
-        },
-        wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 18 }
-        }
-      },
-      form: this.$form.createForm(this),
-      loading: false,
-      formCustom: {
-        passwd: '',
-        passwdCheck: '',
-        oldPwd: ''
-      }
-    }
-  },
-  methods: {
-    ...mapActions(['Logout']),
-    // 密码校验
-    compareToFirstPassword (rule, value, callback) {
-      const form = this.form
-      if (value && value !== form.getFieldValue('formCustom.passwd')) {
-        callback('两次输入的密码不一致, 请重新输入!')
-      } else {
-        callback()
-      }
-    },
-    handleSubmit (e) {
-      e.preventDefault()
-      const _this = this
-      this.form.validateFields((err, values) => {
-        console.log(values, 'values')
-        if (!err) {
-          changePwd({
-            oldPassword: values.formCustom.oldPwd,
-            password: values.formCustom.passwd
-          }).then(res => {
-            console.log(res, 'res111111')
-            if (res.status === '200') {
-              _this.$message.success('修改成功, 请重新登录')
-              _this.logout()
-            } else {
-              // _this.$message.error(res.message)
-            }
-          })
-        }
-      })
-    },
-    logout () {
-      this.Logout({}).then(() => {
-        setTimeout(() => {
-          this.$router.push({ path: '/user/login' })
-        }, 16)
-      })
-    },
-    handleReset () {
-      this.form.resetFields()
-    }
+  components: {
+    ResetPwd
   }
-
 }
 </script>
 
-<style scoped>
-  .change-pwd {
-    margin-top: 15vh;
-  }
-
-  .change-pwd-card {
-    height: 70vh;
-    /* border-top: 2px solid #FFB01B; */
-  }
+<style lang="less" scoped>
+.change-pwd-card {
+  padding-top: 50px;
+}
 </style>

+ 1 - 1
src/views/user/Login.vue

@@ -158,7 +158,7 @@ export default {
     //   })
     // this.requiredTwoStepCaptcha = true
     const rem = this.$cookies.get('REMEMBER_ME')
-    console.log(rem)
+    // console.log(rem)
     if (rem && rem.rememberMe) {
       this.username = rem.username
       this.password = rem.password

+ 155 - 0
src/views/user/ResetPwd.vue

@@ -0,0 +1,155 @@
+<template>
+  <a-row :gutter="24" class="change-pwd">
+    <a-col span="8" offset="8">
+      <a-form @submit="handleSubmit" :form="form">
+        <!-- 原始密码 -->
+        <a-form-item
+          label="原始密码"
+          prop="oldPwd"
+          :label-col="formLayout.labelCol"
+          :wrapper-col="formLayout.wrapperCol">
+          <a-input
+            type="password"
+            :maxLength="12"
+            placeholder="请输入原始密码(6~12位)"
+            v-decorator="[
+              'formCustom.oldPwd',
+              { initialValue: formCustom.oldPwd,
+                rules: [
+                  { required: true, message: '请输入原始密码' },
+                ]
+              },
+            ]">
+          </a-input>
+        </a-form-item>
+        <!-- 新密码 -->
+        <a-form-item
+          label="新密码"
+          prop="passwd"
+          :label-col="formLayout.labelCol"
+          :wrapper-col="formLayout.wrapperCol">
+          <a-input
+            type="password"
+            :maxLength="12"
+            placeholder="请输入新密码(6~12位)"
+            v-decorator="[
+              'formCustom.passwd',
+              { initialValue: formCustom.passwd,
+                rules: [
+                  { required: true, message: '请输入新密码' },
+                  { validator: passwordValid }
+                ]
+              },
+            ]">
+          </a-input>
+        </a-form-item>
+        <!-- 再次确认 -->
+        <a-form-item
+          label="再次确认"
+          prop="passwdCheck"
+          :label-col="formLayout.labelCol"
+          :wrapper-col="formLayout.wrapperCol">
+          <a-input
+            type="password"
+            :maxLength="12"
+            placeholder="请再次输入新密码(6~12位)"
+            v-decorator="[
+              'formCustom.passwdCheck',
+              { initialValue: formCustom.passwdCheck,
+                rules: [
+                  { required: true, message: '请再次输入密码' },
+                  { validator: compareToFirstPassword }
+                ]
+              },
+            ]">
+          </a-input>
+        </a-form-item>
+        <a-col span="16" offset="8">
+          <a-form-item>
+            <a-button type="primary" htmlType="submit" :loading="loading">保存</a-button>
+            <a-button @click="handleReset('formCustom')" style="margin-left: 8px">重置</a-button>
+          </a-form-item>
+        </a-col>
+      </a-form>
+    </a-col>
+  </a-row>
+</template>
+
+<script>
+import { changePwd } from '@/api/login.js'
+import { mapActions } from 'vuex'
+export default {
+  name: 'ResetPwd',
+  data () {
+    return {
+      formLayout: {
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 6 }
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 18 }
+        }
+      },
+      form: this.$form.createForm(this),
+      loading: false,
+      formCustom: {
+        passwd: '',
+        passwdCheck: '',
+        oldPwd: ''
+      }
+    }
+  },
+  methods: {
+    ...mapActions(['Logout']),
+    //  密码位数校验
+    passwordValid (rule, value, callback) {
+      if (value.length < 6 || value.length > 12) {
+        callback('请输入6-12位密码!')
+      } else {
+        callback()
+      }
+    },
+    // 密码校验
+    compareToFirstPassword (rule, value, callback) {
+      const form = this.form
+      if (value && value !== form.getFieldValue('formCustom.passwd')) {
+        callback('两次输入的密码不一致, 请重新输入!')
+      } else {
+        callback()
+      }
+    },
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          changePwd({
+            oldPassword: values.formCustom.oldPwd,
+            password: values.formCustom.passwd
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success('修改成功, 请重新登录')
+              _this.logout()
+            }
+          })
+        }
+      })
+    },
+    logout () {
+      this.Logout({}).then(() => {
+        setTimeout(() => {
+          this.$router.push({ path: '/user/login' })
+        }, 16)
+      })
+    },
+    handleReset () {
+      this.form.resetFields()
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 177 - 0
src/views/userInfo/LdDetails.vue

@@ -0,0 +1,177 @@
+<template>
+  <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
+    <div class="shopOrder-searchForm">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="创建时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="LdDetails-queryOrderDate"
+                :disabledDate="disabledDate"
+                v-model="queryOrderDate"
+                format="YYYY-MM-DD"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="变动类型" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.changeType"
+                ref="changeType"
+                id="LdDetails-status"
+                code="GOLD_CHANGE_TYPE"
+                placeholder="请选择"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="变动原因" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.operateType"
+                ref="operateType"
+                id="LdDetails-status"
+                code="GOLD_OPERATE_TYPE_ALL"
+                placeholder="请选择"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="LdDetails-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="LdDetails-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { customerGoldLogDetail } from '@/api/userInfo.js'
+import moment from 'moment'
+export default {
+  name: 'ShopOrder',
+  components: { STable, VSelect },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+	  queryOrderDate: undefined,
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        changeType: '', // 类型
+        operateType: '' // 原因
+      },
+      loading: false, // 导出loading
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 200, align: 'center' },
+        { title: '变动类型', dataIndex: 'changeTypeDictValue', width: 200, align: 'center' },
+        { title: '变动原因', dataIndex: 'operateTypeDictValue', width: 200, align: 'center' },
+        { title: '乐豆变动量', dataIndex: 'changeNum', width: 200, align: 'center' },
+        { title: '详情',
+          dataIndex: 'remarks',
+          width: 200,
+          align: 'center',
+          customRender: (text) => {
+            return text || '--'
+          } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+		  console.log(this.customerNo)
+		  const searchData = Object.assign(parameter, this.queryParam)
+		  console.log(this.queryOrderDate, 'this.queryOrderDate')
+		  if (this.queryOrderDate && this.queryOrderDate.length) {
+		    searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+		    searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+		  } else {
+		    searchData.beginDate = ''
+		    searchData.endDate = ''
+		  }
+		  return customerGoldLogDetail(Object.assign(parameter, { customerNo: this.$route.params.id }, searchData)).then(res => {
+		    if (res.status == 200) {
+		      const no = (res.data.pageNo - 1) * res.data.pageSize
+		      for (let i = 0; i < res.data.list.length; i++) {
+		        const _item = res.data.list[i]
+		        _item.no = no + i + 1
+		      }
+		      return res.data
+		    }
+		  })
+      }
+    }
+  },
+  methods: {
+    moment,
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+    // 重置
+    handleReset () {
+      this.queryOrderDate = undefined
+      this.queryParam.changeType = ''
+      this.queryParam.operateType = ''
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .shopOrder-table-page-search-wrapper{
+    .shopOrder-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+    .export-btn{
+      background-color: #ff9900;
+      border-color: #ff9900;
+      color: #fff;
+    }
+    .export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
+      color: #fff;
+      border-color: #ff9900;
+    }
+    .blue {
+    	color: #1890FF;
+    }
+    .green {
+    	color: #16b50e;
+    }
+    .red {
+    	color: red;
+    }
+  }
+</style>

+ 157 - 0
src/views/userInfo/editLdNumModal.vue

@@ -0,0 +1,157 @@
+<template>
+  <div>
+    <!-- 弹窗 -->
+    <a-modal
+      v-model="isShow"
+      @cancle="isShow=false"
+      :footer="null"
+      :centered="true"
+      title="修改乐豆金额">
+      <a-form id="components-form-demo-validate-other" ref="form" :form="form" @submit="handleSubmit">
+        <a-form-item label="乐豆变动类型" :label-col="{ span: 7 }" :wrapper-col="{ span: 17 }">
+          <v-select
+            v-decorator="[
+              'formData.changeType',
+              { initialValue: formData.changeType, rules: [{ required: true, message: '请选择!' },] }
+            ]"
+            id="editLdNumModal-changeType"
+            code="GOLD_CHANGE_TYPE"
+            placeholder="请选择"
+            allowClear></v-select>
+        </a-form-item>
+        <a-form-item label="乐豆变动量" :label-col="{ span: 7 }" :wrapper-col="{ span: 17 }">
+          <a-input-number
+            id="changeNum"
+            class="inpNumber-unit"
+            :min="0"
+            :max="999999"
+            :precision="0"
+            v-decorator="[ 'formData.changeNum', { initialValue: formData.changeNum, rules: [{ required: true, message: '请输入乐豆变动量(0~999999)' }] } ]"
+            placeholder="请输入乐豆变动量(0~999999)"
+            allowClear />
+          <span class="inp-unit">乐豆</span>
+        </a-form-item>
+        <a-form-item label="变动原因" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+          <v-select
+            v-decorator="[
+              'formData.operateType',
+              { initialValue: formData.operateType, rules: [{ required: true, message: '请输入修改原因!' },] }
+            ]"
+            id="editLdNumModal-operateType"
+            code="GOLD_OPERATE_TYPE"
+            placeholder="请选择"
+            allowClear></v-select>
+        </a-form-item>
+        <a-form-item label="详情" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+          <a-textarea
+            id="editLdNumModal-remarks"
+            :maxLength="500"
+            v-decorator="[
+              'formData.remarks',
+              {
+                initialValue: formData.remarks,
+                rules: [] },
+            ]"
+            style="min-height: 50px;"
+            placeholder="请输入详情内容(最多500个字符)"
+            autosize />
+        </a-form-item>
+        <a-form-item :wrapper-col="{ span: 12, offset: 6}" style="text-align: center;">
+          <a-button type="primary" html-type="submit" id="editLdNumModal-submit" style="margin-right: 15px">保存</a-button>
+          <a-button @click="isShow=false" style="margin-left: 15px" id="editLdNumModal-close">取消</a-button>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { VSelect } from '@/components'
+import { updateGold } from '@/api/userInfo.js'
+export default {
+  name: 'EditLdNumModal',
+  components: { VSelect },
+  props: {
+    openLdNumModal: {
+      type: Boolean,
+      default: false
+    },
+    customerNo: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      formItemLayout: {
+			  labelCol: {
+			    span: 6
+			  },
+			  wrapperCol: {
+			    span: 14
+			  }
+      },
+      isShow: this.openLdNumModal,
+      form: this.$form.createForm(this, { name: 'editLdNumModal' }),
+      formData: {
+        operateType: '', // 手机号码
+        changeType: '',
+        changeNum: '',
+        remarks: ''
+      }
+    }
+  },
+  methods: {
+    // 点击保存;
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const formData = Object.assign({}, { customerNo: this.customerNo }, this.formData, values.formData)
+          updateGold(formData).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              // _this.$emit('refresh')
+			  _this.$router.push({ path: `/userInfo/userManageList/list` })
+              setTimeout(function () {
+                _this.isShow = false
+              }, 300)
+            }
+          })
+        }
+      })
+    }
+  },
+  watch: {
+    openLdNumModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (val) {
+      console.log(this.customerNo)
+      if (!val) {
+        this.$emit('close')
+      } else {
+   	  this.form.resetFields()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+	.input-number{
+		display: flex;
+		width: 100%;
+	}
+	//  input-number 框宽度
+	.inpNumber{
+	  width: 100%;
+	}
+	.inpNumber-unit{  //  有单位的
+	  width: 88%;
+	  margin-right: 8px;
+	}
+
+</style>

+ 95 - 0
src/views/userInfo/editUserPhoneModal.vue

@@ -0,0 +1,95 @@
+<template>
+  <div>
+    <!-- 弹窗 -->
+    <a-modal
+      v-model="isShow"
+      @cancle="isShow=false"
+      :footer="null"
+      :centered="true"
+      title="修改手机号码">
+      <a-form id="components-form-demo-validate-other" ref="form" :form="form" @submit="handleSubmit">
+        <a-form-item label="手机号码" :label-col="{ span: 7 }" :wrapper-col="{ span: 12 }">
+          <a-input
+            id="editUserPhoneModal-mobile"
+            :maxLength="11"
+            v-decorator="[
+              'formData.mobile',
+              { initialValue: formData.mobile, rules: [{ required: true, message: '请输入手机号码!' }, { pattern: /^\d{11}$/, message: '请输入正确的手机号' }] }
+            ]"
+            placeholder="请输入手机号码"
+            allowClear />
+        </a-form-item>
+        <a-form-item :wrapper-col="{ span: 12, offset: 6}" style="text-align: center;">
+          <a-button type="primary" html-type="submit" id="editUserPhoneModal-submit" style="margin-right: 15px">保存</a-button>
+          <a-button @click="isShow=false" style="margin-left: 15px" id="editUserPhoneModal-close">取消</a-button>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { updateMobile } from '@/api/userInfo.js'
+export default {
+  name: 'EditUserPhoneModal',
+  props: {
+    openUserPhoneMoadl: {
+      type: Boolean,
+      default: false
+    },
+    userId: {
+      type: String,
+      default: ''
+    }
+
+  },
+  data () {
+    return {
+      isShow: this.openUserPhoneMoadl,
+      form: this.$form.createForm(this, { name: 'editUserPhoneModal' }),
+      formData: {
+        mobile: '' // 手机号码
+      }
+    }
+  },
+  methods: {
+    // 点击保存;
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const formData = Object.assign({}, { id: this.userId }, this.formData, values.formData)
+          updateMobile(formData).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              // _this.$emit('refresh')
+   		  _this.$router.push({ path: `/userInfo/userManageList/list` })
+              setTimeout(function () {
+                _this.isShow = false
+              }, 300)
+            }
+          })
+        }
+      })
+    }
+  },
+  watch: {
+    openUserPhoneMoadl (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (val) {
+      console.log(this.userId)
+      if (!val) {
+        this.$emit('close')
+      } else {
+   	  this.form.resetFields()
+      }
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 132 - 0
src/views/userInfo/userDetails.vue

@@ -0,0 +1,132 @@
+<template>
+	<a-card :bordered="false" class="orderDetail-goods-info">
+		<a-row :gutter="48">
+			<a-col :span="24" class="item-cont item-img">
+				<p class="item-label" style="line-height: 37px;">头像:</p>
+				<img v-if="page.headImageUrl" :src="page.headImageUrl" alt="" class="img">
+				<p class="item-main" style="line-height: 37px;" v-else>--</p>
+			</a-col>
+			<a-col :span="24" class="item-cont">
+				<p class="item-label">手机号码:</p>
+				<p class="item-main">{{ page.mobile ? page.mobile : '--' }}</p>
+				<a-icon type="edit" title="修改手机号码" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="editPhone(page)"
+				 v-hasPermission="'B_user_userdetails_editPhone'" />
+				<!-- <a style="margin-left: 100px; color: #2D8CF0;" @click="editPhone">修改手机号码</a> -->
+			</a-col>
+			<a-col :span="24" class="item-cont">
+				<p class="item-label">收货地址:</p>
+				<p class="item-main">{{ adderss  ? adderss : '--' }}</p>
+			</a-col>
+			<a-col :span="24" class="item-cont">
+				<p class="item-label">乐豆余额:</p>
+				<p class="item-main">{{ page.currentGold ? page.currentGold : 0 }}</p>
+				<a-icon type="edit" title="修改乐豆余额" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="editLd(page)"
+				 v-hasPermission="'B_user_userDetails_editLdNum'" />
+				<!-- <a style="margin-left: 145px; color: #2D8CF0;" @click="editLd(page)">修改乐豆余额</a> -->
+			</a-col>
+			<a-col :span="24" class="item-cont">
+				<p class="item-label">累计乐豆:</p>
+				<p class="item-main">{{ page.totalGold ? page.totalGold :0 }}</p>
+			</a-col>
+			<a-col :span="24" class="item-cont">
+				<p class="item-label">账户状态:</p>
+				<p class="item-main">{{ page.state ==0 ? '禁用' : '启用' }}</p>
+			</a-col>
+			<a-col :span="24" class="item-cont">
+				<p class="item-label">注册时间:</p>
+				<p class="item-main">{{ page.registerTime ? page.registerTime : '--' }}</p>
+			</a-col>
+			<a-col :span="24" class="item-cont">
+				<p class="item-label">最后登录时间:</p>
+				<p class="item-main">{{ page.lastLoginTime ? page.lastLoginTime : '--' }}</p>
+			</a-col>
+			<a-col :span="24" class="item-cont">
+				<p class="item-label">最后投递时间:</p>
+				<p class="item-main">{{ page.lastDeliveryTime ? page.lastDeliveryTime : '--' }}</p>
+			</a-col>
+		</a-row>
+		<div class="page-header" style="margin-top: 50px; color: #2D8CF0; text-align: center;">
+			<a @click="goBack">返回列表</a>
+		</div>
+		<!-- 修改用户手机号码弹窗 -->
+		<edit-user-phone-modal :userId="userId" :openUserPhoneMoadl="openUserPhoneMoadl" @close="openUserPhoneMoadl=false"></edit-user-phone-modal>
+		<!-- 修改乐豆余额弹窗 -->
+		<edit-ldNum-modal :customerNo="customerNo" :openLdNumModal="openLdNumModal" @close="openLdNumModal=false"></edit-ldNum-modal>
+	</a-card>
+</template>
+
+<script>
+	import editUserPhoneModal from './editUserPhoneModal.vue'
+	import editLdNumModal from './editLdNumModal.vue'
+	import {
+		customerDetails
+	} from '@/api/userInfo.js'
+	export default {
+		name: 'UserDetails',
+		components: {
+			editUserPhoneModal,
+			editLdNumModal
+		},
+		data() {
+			return {
+				userId: '', // 用户id
+				openUserPhoneMoadl: false, // 默认关闭手机号码弹窗
+				customerNo: '', // 用户编号
+				openLdNumModal: false, // 默认关闭乐豆余额弹窗
+				page: {}, // 详情数据
+				adderss: ""
+			}
+		},
+		methods: {
+			// 详情
+			editPhone(page) {
+				this.userId = this.page.id
+				this.openUserPhoneMoadl = true
+				console.log(this.userId, '-----------修改手机号码')
+			},
+			editLd(page) {
+				this.customerNo = this.page.customerNo
+				console.log(this.customerNo, '------用户编号')
+				this.openLdNumModal = true
+				console.log('-----修改乐豆余额')
+			},
+			// 返回列表
+			goBack() {
+				this.$router.push({
+					path: `/userInfo/userManageList/list`
+				})
+			}
+		},
+		beforeRouteEnter(to, from, next) {
+			next(vm => {
+				console.log(111)
+				const params = vm.$route.params
+				console.log(params)
+				if (params.id) {
+					customerDetails({
+						id: params.id
+					}).then(res => {
+						if (res.status == 200) {
+							vm.page = res.data
+							if (vm.page.receiveAddressList) {
+								vm.adderss = vm.page.receiveAddressList[0].receiveAreasName.replace(/\,/g, '-') + '-' + vm.page.receiveAddressList[
+									0].receiveAddress
+							}
+						}
+					})
+				}
+			})
+		}
+	}
+</script>
+<style lang="less">
+	.item-cont {
+		display: flex;
+		margin: 10px 10px 10px 50px;
+	}
+
+	.img {
+		width: 50px;
+		border-radius: 50%;
+	}
+</style>

+ 355 - 0
src/views/userInfo/userManageList.vue

@@ -0,0 +1,355 @@
+<template>
+  <a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
+    <div class="shopOrder-searchForm">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="refresh">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="releaseRecordList-mobile" allowClear :maxLength="11" v-model="queryParam.mobile" placeholder="请输入用户手机" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="乐豆余额" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <div class="input-number">
+                <a-input-number id="releaseRecordList-inputNumber" v-model="queryParam.currentGoldMin" :max="999999999" @change="onChange" />-
+                <a-input-number id="inputNumber" v-model="queryParam.currentGoldMax" :max="999999999" @change="onChange" />
+              </div>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="账户状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.state"
+                id="releaseRecordList-state"
+                code="ENABLE_FLAG"
+                placeholder="请选择订单状态"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="releaseRecordList-btn-serach" type="primary" @click="refresh">查询</a-button>
+            <a-button class="handle-btn" type="" id="releaseRecordList-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button
+        class="export-btn"
+        id="releaseRecordList-btn-export"
+        type=""
+        :loading="loading"
+        @click="handleExport"
+        v-hasPermission="'B_user_userManage_export'">导出</a-button>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!--启用禁用 -->
+      <template slot="state" slot-scope="text, record">
+        <a-switch
+          v-hasPermission="'B_user_userManage_enable'"
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          id="releaseRecordList-changeFlagHandle"
+          :checked="record.state == 1 ? true : false"
+          @change="changeFlagHandle(text, record)" />
+        <span v-if="!$hasPermissions('B_user_userManage_enable')">--</span>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button id="releaseRecordList-handleUser" type="link" @click="handleUser(record)" v-hasPermission="'B_user_userManage_userDetails'">用户详情</a-button>
+        <a-button id="releaseRecordList-handleLd" type="link" @click="handleLd(record)" v-hasPermission="'B_user_userManage_LdDetails'">乐豆明细</a-button>
+        <span v-if="!$hasPermissions('B_user_userManage_userDetails') && (!$hasPermissions('B_user_userManage_LdDetails'))">--</span>
+      </template>
+    </s-table>
+  </a-card>
+
+</template>
+
+<script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  customerList,
+  changeStatus,
+  customeExport
+} from '@/api/userInfo.js'
+export default {
+  name: 'UserManageList',
+  components: {
+    STable,
+    VSelect
+  },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: {
+          span: 7
+        },
+        wrapperCol: {
+          span: 17
+        }
+      },
+      // 查询参数
+      queryParam: {
+        mobile: '', //  用户手机
+        state: '', // 账户状态
+        currentGoldMin: '', // 乐豆余额最小值
+        currentGoldMax: '' // 乐豆余额最大值
+      },
+      loading: false, // 导出loading
+      // 表头
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 80,
+        align: 'center'
+      },
+      {
+        title: '用户手机',
+        dataIndex: 'mobile',
+        width: 100,
+        align: 'center'
+      },
+      {
+        title: '乐豆余额',
+        dataIndex: 'currentGold',
+        width: 100,
+        align: 'center',
+        customRender: (text) => {
+          return text || 0
+        }
+      },
+      {
+        title: '累计乐豆',
+        dataIndex: 'totalGold',
+        width: 100,
+        align: 'center',
+        customRender: (text) => {
+          return text || 0
+        }
+      },
+      {
+        title: '注册时间',
+        dataIndex: 'registerTime',
+        width: 200,
+        align: 'center',
+        customRender: (text) => {
+		  return text || '--'
+        }
+      },
+      {
+        title: '最后登录时间',
+        dataIndex: 'lastLoginTime',
+        width: 200,
+        align: 'center',
+        customRender: (text) => {
+		  return text || '--'
+        }
+      },
+      {
+        title: '最后投递时间',
+        dataIndex: 'lastDeliveryTime',
+        width: 200,
+        align: 'center',
+        customRender: (text) => {
+		  return text || '--'
+        }
+      },
+      {
+        title: '状态',
+        width: 100,
+        dataIndex: 'state',
+        align: 'center',
+        scopedSlots: {
+          customRender: 'state'
+        }
+      },
+      {
+        title: '操作',
+        scopedSlots: {
+          customRender: 'action'
+        },
+        width: 100,
+        align: 'center'
+      }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return customerList(Object.assign(parameter, this.queryParam)).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+              _item.status = _item.status + '' === '1'
+            }
+            return res.data
+          }
+        })
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.handleReset()
+    })
+  },
+  methods: {
+    // 查询条件change
+    onChange () {
+
+    },
+    refresh () {
+      const isONull = this.queryParam.currentGoldMin === null
+      const isOEmpty = this.queryParam.currentGoldMin === ''
+      const isOZero = this.queryParam.currentGoldMin === 0
+      const isTNull = this.queryParam.currentGoldMax === null
+      const isTEmpty = this.queryParam.currentGoldMax === ''
+      const isTZero = this.queryParam.currentGoldMax === 0
+      //  第一个为空(可为null可为空字符)第二个不为空
+      //  第一个不为空第二个为空(可为null可为空字符)
+      //  第一个大于第二个
+      if ((isONull || isOEmpty) && (this.queryParam.currentGoldMax || isTZero)) {
+        this.$message.error('请输入正确的查询范围!')
+        return
+      }
+      if ((this.queryParam.currentGoldMin || isOZero) && (isTNull || isTEmpty)) {
+        this.$message.error('请输入正确的查询范围!')
+        return
+      }
+      if (this.queryParam.currentGoldMin > this.queryParam.currentGoldMax) {
+        this.$message.error('请输入正确的查询范围!')
+        return
+      }
+      this.queryParam.currentGoldMin = this.queryParam.currentGoldMin > 999999999 ? 999999999 : this.queryParam.currentGoldMin
+      this.queryParam.currentGoldMax = this.queryParam.currentGoldMax > 999999999 ? 999999999 : this.queryParam.currentGoldMax
+      this.$refs.table.refresh(true)
+    },
+    // 查看用户详情
+    handleUser (row) {
+      this.$router.push({
+        path: `/userInfo/userManageList_user/detail/${row.id}`
+      })
+    },
+    // 查看乐豆详情
+    handleLd (row) {
+      this.$router.push({
+        path: `/userInfo/userManageList_Ld/detail/${row.customerNo}`
+      })
+    },
+    // 启用禁用
+    // 更改启用禁用状态
+    changeFlagHandle (text, record) {
+      console.log(text)
+      const _this = this
+      const _data = {
+        id: record.id,
+        state: record.state == 1 ? '0' : '1'
+      }
+      changeStatus(_data).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+        } else {
+          record.state = !record.state
+        }
+      })
+    },
+    // 重置
+    handleReset () {
+      this.queryParam.mobile = ''
+      this.queryParam.currentGoldMin = ''
+      this.queryParam.currentGoldMax = ''
+      this.queryParam.state = ''
+      this.$refs.table.refresh(true)
+    },
+    // 导出
+    handleExport () {
+      const params = {
+        mobile: this.queryParam.mobile,
+        currentGoldMin: this.queryParam.currentGoldMin,
+        currentGoldMax: this.queryParam.currentGoldMax,
+        state: this.queryParam.state = ''
+      }
+      this.loading = true
+      customeExport(params).then(res => {
+        this.loading = false
+        this.download(res)
+      })
+    },
+    download (data) {
+      if (!data) {
+        return
+      }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      // const a = moment().format('YYYYMMDDhhmmss')
+      const fname = '用户列表'
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+	.shopOrder-table-page-search-wrapper {
+		.shopOrder-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+			}
+
+			// 搜索框的下间距
+			.ant-form-item {
+				margin-bottom: 10px;
+			}
+
+			.input-number {
+				display: flex;
+				margin-top: 3px;
+			}
+
+			.handle-btn {
+				margin-top: 4px;
+			}
+
+			.serach-btn {
+				margin-right: 10px;
+			}
+		}
+
+		.export-btn {
+			background-color: #ff9900;
+			border-color: #ff9900;
+			color: #fff;
+		}
+
+		.export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger),
+		.export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger) {
+			color: #fff;
+			border-color: #ff9900;
+		}
+
+		.blue {
+			color: #1890FF;
+		}
+
+		.green {
+			color: #16b50e;
+		}
+
+		.red {
+			color: red;
+		}
+	}
+</style>

+ 2 - 2
vue.config.js

@@ -108,8 +108,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.100:9102/at-it/',
-        target: 'https://aitour-it.test.zyucgj.com/at-it',
+        // target: 'http://192.168.16.104:8301/gc-admin/',
+        target: 'https://lese.test.sxzxyj.net/gc-admin/',
         ws: false,
         changeOrigin: true,
         pathRewrite: {