瀏覽代碼

完成 签到管理

keyman1995 6 年之前
父節點
當前提交
918f556f14
共有 60 個檔案被更改,包括 895 行新增487 行删除
  1. 1
    0
      .gitignore
  2. 3
    3
      config/index.js
  3. 2
    1
      config/prod.env.js
  4. 1
    1
      dist/index.html
  5. 2
    0
      dist/static/css/app.50bef55cf5218719e68b5e53c341984a.css
  6. 1
    0
      dist/static/css/app.50bef55cf5218719e68b5e53c341984a.css.map
  7. 0
    2
      dist/static/css/app.9a8721a89ee6a280033371ac1a4cd30e.css
  8. 0
    1
      dist/static/css/app.9a8721a89ee6a280033371ac1a4cd30e.css.map
  9. 2
    0
      dist/static/css/app.de5c24aec59d7e1bf34ed6e01ddec500.css
  10. 1
    0
      dist/static/css/app.de5c24aec59d7e1bf34ed6e01ddec500.css.map
  11. 2
    0
      dist/static/js/app.611bcec97c1df93a0e1c.js
  12. 1
    0
      dist/static/js/app.611bcec97c1df93a0e1c.js.map
  13. 2
    0
      dist/static/js/app.ce3b6b4ac1ddaa161d53.js
  14. 1
    0
      dist/static/js/app.ce3b6b4ac1ddaa161d53.js.map
  15. 0
    2
      dist/static/js/app.f3f484966c7795e437dd.js
  16. 0
    1
      dist/static/js/app.f3f484966c7795e437dd.js.map
  17. 1
    1
      dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  18. 77
    0
      dist/static/js/vendor.2eefbe459a955945ef62.js
  19. 1
    0
      dist/static/js/vendor.2eefbe459a955945ef62.js.map
  20. 70
    0
      dist/static/js/vendor.88cbbf5123a71bf0def0.js
  21. 1
    0
      dist/static/js/vendor.88cbbf5123a71bf0def0.js.map
  22. 0
    71
      dist/static/js/vendor.9ceafbb898c5feb95a34.js
  23. 0
    1
      dist/static/js/vendor.9ceafbb898c5feb95a34.js.map
  24. 2
    1
      package.json
  25. 124
    39
      src/pages/system/cardAndCouponManager/vipManager/activateVip.vue
  26. 33
    11
      src/pages/system/cardAndCouponManager/vipManager/edit.vue
  27. 28
    19
      src/pages/system/cardAndCouponManager/vipManager/index.vue
  28. 1
    1
      src/pages/system/channelManager/channelList/add.vue
  29. 1
    1
      src/pages/system/channelManager/channelList/edit.vue
  30. 1
    1
      src/pages/system/cmsManager/indexMsg/add.vue
  31. 1
    1
      src/pages/system/cmsManager/indexMsg/edit.vue
  32. 2
    2
      src/pages/system/cmsManager/majorProjects/edit.vue
  33. 1
    1
      src/pages/system/cmsManager/majorProjects/index.vue
  34. 1
    1
      src/pages/system/cmsManager/newsManager/add.vue
  35. 1
    1
      src/pages/system/cmsManager/newsManager/edit.vue
  36. 4
    2
      src/pages/system/courseManager/courseList/add.vue
  37. 5
    1
      src/pages/system/courseManager/courseList/index.vue
  38. 1
    1
      src/pages/system/courseManager/fiveA/add.vue
  39. 1
    1
      src/pages/system/courseManager/fiveA/edit.vue
  40. 12
    3
      src/pages/system/courseManager/scheduleManager/edit.vue
  41. 18
    7
      src/pages/system/courseManager/scheduleManager/index.vue
  42. 1
    1
      src/pages/system/goodsManager/goodsSpecManager/add.vue
  43. 1
    1
      src/pages/system/goodsManager/goodsSpecManager/edit.vue
  44. 0
    216
      src/pages/system/newOrder/monthOrder/index.vue
  45. 181
    63
      src/pages/system/newOrder/newOrderList/index.vue
  46. 0
    2
      src/pages/system/newOrder/newOrderList/page.scss
  47. 6
    8
      src/pages/system/systemSet/roleManager/index.vue
  48. 5
    5
      src/pages/system/systemSet/userManager/add.vue
  49. 11
    10
      src/pages/system/systemSet/userManager/edit.vue
  50. 1
    1
      src/pages/system/systemSet/userManager/index.vue
  51. 1
    1
      src/pages/system/verificationManager/phoneVerification/verificationList/index.vue
  52. 1
    1
      src/pages/system/verificationManager/qrcodeVerification/verificationList/index.vue
  53. 76
    0
      src/store/card/vip.js
  54. 3
    0
      src/store/course/schedule.js
  55. 32
    0
      src/store/customer/customer.js
  56. 80
    0
      src/store/goods/order.js
  57. 3
    0
      src/store/index.js
  58. 29
    0
      src/store/system/user.js
  59. 48
    0
      src/util/api.js
  60. 10
    0
      src/util/util.js

+ 1
- 0
.gitignore 查看文件

@@ -1,5 +1,6 @@
1 1
 .DS_Store
2 2
 node_modules/
3
+dist/
3 4
 npm-debug.log*
4 5
 yarn-debug.log*
5 6
 yarn-error.log*

+ 3
- 3
config/index.js 查看文件

@@ -12,9 +12,9 @@ module.exports = {
12 12
     proxyTable: {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15
-        // target: 'http://192.168.0.62:8080', //wf
16
-        // target: 'http://192.168.0.11:8088', //zys
17
-        target: 'http://localhost:8080',
15
+        target: 'http://192.168.0.62:8080', //wf
16
+        // target: 'http://192.168.0.11', //ys
17
+        // target: 'http://dev.ycjcjy.com/', //frp
18 18
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
19 19
         // pathRewrite: {
20 20
         //   '^/api': 'api'

+ 2
- 1
config/prod.env.js 查看文件

@@ -1,4 +1,5 @@
1 1
 'use strict'
2 2
 module.exports = {
3
-  NODE_ENV: '"production"'
3
+  NODE_ENV: '"production"',
4
+  TEST_ENV: '"' + process.env.TEST_ENV + '"'
4 5
 }

+ 1
- 1
dist/index.html 查看文件

@@ -1 +1 @@
1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_c8w80pqou5c.css><title>城的空间后台管理系统</title><link href=./static/css/app.9a8721a89ee6a280033371ac1a4cd30e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.9ceafbb898c5feb95a34.js></script><script type=text/javascript src=./static/js/app.f3f484966c7795e437dd.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_25hulf12ph6.css><title>城的空间后台管理系统</title><link href=./static/css/app.50bef55cf5218719e68b5e53c341984a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.88cbbf5123a71bf0def0.js></script><script type=text/javascript src=./static/js/app.ce3b6b4ac1ddaa161d53.js></script></body></html>

+ 2
- 0
dist/static/css/app.50bef55cf5218719e68b5e53c341984a.css
文件差異過大導致無法顯示
查看文件


+ 1
- 0
dist/static/css/app.50bef55cf5218719e68b5e53c341984a.css.map
文件差異過大導致無法顯示
查看文件


+ 0
- 2
dist/static/css/app.9a8721a89ee6a280033371ac1a4cd30e.css
文件差異過大導致無法顯示
查看文件


+ 0
- 1
dist/static/css/app.9a8721a89ee6a280033371ac1a4cd30e.css.map
文件差異過大導致無法顯示
查看文件


+ 2
- 0
dist/static/css/app.de5c24aec59d7e1bf34ed6e01ddec500.css
文件差異過大導致無法顯示
查看文件


+ 1
- 0
dist/static/css/app.de5c24aec59d7e1bf34ed6e01ddec500.css.map
文件差異過大導致無法顯示
查看文件


+ 2
- 0
dist/static/js/app.611bcec97c1df93a0e1c.js
文件差異過大導致無法顯示
查看文件


+ 1
- 0
dist/static/js/app.611bcec97c1df93a0e1c.js.map
文件差異過大導致無法顯示
查看文件


+ 2
- 0
dist/static/js/app.ce3b6b4ac1ddaa161d53.js
文件差異過大導致無法顯示
查看文件


+ 1
- 0
dist/static/js/app.ce3b6b4ac1ddaa161d53.js.map
文件差異過大導致無法顯示
查看文件


+ 0
- 2
dist/static/js/app.f3f484966c7795e437dd.js
文件差異過大導致無法顯示
查看文件


+ 0
- 1
dist/static/js/app.f3f484966c7795e437dd.js.map
文件差異過大導致無法顯示
查看文件


+ 1
- 1
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map 查看文件

@@ -1 +1 @@
1
-{"version":3,"sources":["webpack:///webpack/bootstrap 67f48e46710049e36669"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 67f48e46710049e36669"],"sourceRoot":""}
1
+{"version":3,"sources":["webpack:///webpack/bootstrap 2f50910dc153de1c6765"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2f50910dc153de1c6765"],"sourceRoot":""}

+ 77
- 0
dist/static/js/vendor.2eefbe459a955945ef62.js
文件差異過大導致無法顯示
查看文件


+ 1
- 0
dist/static/js/vendor.2eefbe459a955945ef62.js.map
文件差異過大導致無法顯示
查看文件


+ 70
- 0
dist/static/js/vendor.88cbbf5123a71bf0def0.js
文件差異過大導致無法顯示
查看文件


+ 1
- 0
dist/static/js/vendor.88cbbf5123a71bf0def0.js.map
文件差異過大導致無法顯示
查看文件


+ 0
- 71
dist/static/js/vendor.9ceafbb898c5feb95a34.js
文件差異過大導致無法顯示
查看文件


+ 0
- 1
dist/static/js/vendor.9ceafbb898c5feb95a34.js.map
文件差異過大導致無法顯示
查看文件


+ 2
- 1
package.json 查看文件

@@ -11,7 +11,8 @@
11 11
     "e2e": "node test/e2e/runner.js",
12 12
     "test": "npm run unit && npm run e2e",
13 13
     "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
14
-    "build": "node build/build.js"
14
+    "build": "cross-env TEST_ENV=production node build/build.js",
15
+    "buildtest": "cross-env TEST_ENV=test node build/build.js"
15 16
   },
16 17
   "dependencies": {
17 18
     "@antv/g2": "^3.2.7",

+ 124
- 39
src/pages/system/cardAndCouponManager/vipManager/activateVip.vue 查看文件

@@ -5,7 +5,7 @@
5 5
         <div>
6 6
           <el-input
7 7
             placeholder="请输入VIP卡号"
8
-            v-model="postData.CardNo"
8
+            v-model="CardNo"
9 9
             clearable>
10 10
           </el-input>
11 11
         </div>
@@ -23,7 +23,7 @@
23 23
             <span>卡号:</span>
24 24
             <div class="flex-item">
25 25
               <div>
26
-                <span>{{activateData.CardNo}}</span>
26
+                <span>{{vip.VipCardChildCode}}</span>
27 27
               </div>
28 28
             </div>
29 29
           </li>
@@ -31,52 +31,49 @@
31 31
             <span>金额:</span>
32 32
             <div class="flex-item">
33 33
               <div>
34
-                <span>{{activateData.Price}}</span>
34
+                <span>{{vip.Amount}}</span>
35 35
               </div>
36 36
             </div>
37 37
           </li>
38 38
           <li class="flex-h">
39
-            <span>销售:</span>
39
+            <span>绑定用户:</span>
40 40
             <div class="flex-item" style="margin-right:10px;">
41 41
               <div>
42 42
                 <el-input
43
-                  placeholder="请输入销售手机号"
44
-                  v-model="sellerPhone"
43
+                  placeholder="请输入手机号"
44
+                  v-model="customerPhone"
45 45
                   clearable>
46 46
                 </el-input>
47 47
               </div>
48 48
             </div>
49
-            <el-button type="success" @click='searchSeller'>查询</el-button>
49
+            <el-button type="success" @click='searchCustomer'>查询</el-button>
50 50
           </li>
51 51
           <li class="flex-h">
52
-            <span>销售姓名:</span>
52
+            <span>用户姓名:</span>
53 53
             <div class="flex-item">
54 54
               <div>
55
-                <span>{{activateData.SellerName}}</span>
55
+                <span>{{customer.CustomerName}}</span>
56 56
               </div>
57 57
             </div>
58 58
           </li>
59 59
           <li class="flex-h">
60
-            <span>绑定用户:</span>
61
-            <div class="flex-item">
60
+            <span>销售:</span>
61
+            <div class="flex-item" style="margin-right:10px;">
62 62
               <div>
63 63
                 <el-input
64
-                  placeholder="请输入手机号"
65
-                  v-model="activateData.UserPhone"
64
+                  placeholder="请输入销售手机号"
65
+                  v-model="salesPhone"
66 66
                   clearable>
67 67
                 </el-input>
68 68
               </div>
69 69
             </div>
70
+            <el-button type="success" @click='searchSeller'>查询</el-button>
70 71
           </li>
71 72
           <li class="flex-h">
72
-            <span>用户姓名:</span>
73
+            <span>销售姓名:</span>
73 74
             <div class="flex-item">
74 75
               <div>
75
-                <el-input
76
-                  placeholder="请输入真实姓名"
77
-                  v-model="activateData.UserName"
78
-                  clearable>
79
-                </el-input>
76
+                <span>{{sales.RealName}}</span>
80 77
               </div>
81 78
             </div>
82 79
           </li>
@@ -84,31 +81,26 @@
84 81
       </div>
85 82
       <span slot="footer" class="dialog-footer">
86 83
         <el-button @click="centerDialogVisible = false">取 消</el-button>
87
-        <el-button type="primary" @click="centerDialogVisible = false">激 活</el-button>
84
+        <el-button type="primary" @click="vipCharge">激 活</el-button>
88 85
       </span>
89 86
     </el-dialog>
90 87
   </div>
91 88
 </template>
92 89
 
93 90
 <script>
94
-import { mapState } from 'vuex'
91
+import { createNamespacedHelpers, mapState } from 'vuex'
92
+
93
+const { mapState: mapVipState, mapActions: mapVipActions } = createNamespacedHelpers('vip')
94
+const { mapState: mapCustomerState, mapActions: mapCustomerActions } = createNamespacedHelpers('customer')
95
+const { mapState: mapUserState, mapActions: mapUserActions } = createNamespacedHelpers('user')
95 96
 export default {
96 97
   name: '',
97 98
   data () {
98 99
     return {
99
-      centerDialogVisible: true,
100
-      postData: {
101
-        CardNo: '', // 卡号
102
-      },
103
-      activateData: {
104
-        CardNo: '111111111', // 卡号
105
-        Price: '1000', // 金额
106
-        SellerName: '', // 销售姓名
107
-        CaseName: 'xxx', // 案场名称
108
-        UserPhone: '', // 用户手机号
109
-        UserName: '', // 用户姓名
110
-      },
111
-      sellerPhone: '', // 销售手机号
100
+      centerDialogVisible: false,
101
+      CardNo: '',
102
+      salesPhone: '',
103
+      customerPhone: ''
112 104
     }
113 105
   },
114 106
   computed: {
@@ -117,6 +109,15 @@ export default {
117 109
       defaultCaseId: x => x.app.cases.default,
118 110
       OrgId: x => x.app.user.OrgId,
119 111
     }),
112
+    ...mapCustomerState({
113
+      customer: x => x.customer,
114
+    }),
115
+    ...mapVipState({
116
+      vip: x => x.vipinfo,
117
+    }),
118
+    ...mapUserState({
119
+      sales: x => x.userinfo,
120
+    }),
120 121
     CaseId: {
121 122
       get () {
122 123
         return this.postData.CaseId === '' ? this.defaultCaseId || '' : this.postData.CaseId
@@ -126,13 +127,97 @@ export default {
126 127
       }
127 128
     }
128 129
   },
129
-  created () { },
130
-  components: {},
131 130
   methods: {
132
-    searchSeller () { // 查询销售
131
+    ...mapCustomerActions([
132
+      'GetCustomerByTel',
133
+      'SetCustomerInfoNull',
134
+    ]),
135
+    ...mapVipActions([
136
+      'VipCharge',
137
+      'GetVipByCode',
138
+      'SetVipInfoNull',
139
+    ]),
140
+    ...mapUserActions([
141
+      'GetUserByTel',
142
+      'SetUserInfoNull',
143
+    ]),
144
+    searchCustomer () {
145
+      if (this.customerPhone === '') {
146
+        this.$message({
147
+          type: 'error',
148
+          message: '请先输入电话!',
149
+        })
150
+        return
151
+      }
152
+      this.GetCustomerByTel({tel: this.customerPhone})
153
+    },
154
+    searchSeller () {
155
+      if (this.salesPhone === '') {
156
+        this.$message({
157
+          type: 'error',
158
+          message: '请先输入销售电话!',
159
+        })
160
+        return
161
+      }
162
+      this.GetUserByTel({tel: this.salesPhone})
133 163
     },
134
-    activateVip () { // 激活vip
135
-      this.centerDialogVisible = true
164
+    setNull () {
165
+      this.salesPhone = ''
166
+      this.customerPhone = ''
167
+      this.SetUserInfoNull()
168
+      this.SetCustomerInfoNull()
169
+    },
170
+    activateVip () {
171
+      this.GetVipByCode({ code: this.CardNo }).then((res) => {
172
+        if (res) {
173
+          if (res.Status !== 0) {
174
+            this.$message({
175
+              type: 'error',
176
+              message: 'VIP卡已被激活!',
177
+            })
178
+            return
179
+          }
180
+          this.setNull()
181
+          this.centerDialogVisible = true
182
+        } else {
183
+          this.$message({
184
+            type: 'error',
185
+            message: '没有查询到VIP卡信息!',
186
+          })
187
+        }
188
+      })
189
+    },
190
+    vipCharge () {
191
+      if (this.vip.VipCardChildCode === '') {
192
+        this.$message({
193
+          type: 'error',
194
+          message: '没有需要激活的卡信息!',
195
+        })
196
+        return
197
+      }
198
+      if (this.customer.Phone === '') {
199
+        this.$message({
200
+          type: 'error',
201
+          message: '没有绑定的用户信息!',
202
+        })
203
+        return
204
+      }
205
+      var that = this
206
+      this.VipCharge({
207
+        code: this.vip.VipCardChildCode,
208
+        tel: this.customer.Phone,
209
+        salesid: this.sales.UserId || '',
210
+        salesname: this.sales.RealName || '',
211
+      }).then(() => {
212
+        this.$message({
213
+          type: 'success',
214
+          message: '激活成功!',
215
+        })
216
+        setTimeout(() => {
217
+          that.setNull()
218
+          that.centerDialogVisible = false
219
+        }, 1000)
220
+      })
136 221
     },
137 222
   },
138 223
   mounted () { }

+ 33
- 11
src/pages/system/cardAndCouponManager/vipManager/edit.vue 查看文件

@@ -23,7 +23,7 @@
23 23
             <div style="width:50%">
24 24
               <el-input
25 25
                 placeholder="请输入VIP卡数量"
26
-                v-model="postData.CardNum"
26
+                v-model="postData.TotalCount"
27 27
                 clearable>
28 28
               </el-input>
29 29
             </div>
@@ -35,7 +35,7 @@
35 35
             <div style="width:50%">
36 36
               <el-input
37 37
                 placeholder="请输入价格"
38
-                v-model="postData.Price"
38
+                v-model="postData.CardAmount"
39 39
                 clearable>
40 40
               </el-input>
41 41
             </div>
@@ -51,15 +51,19 @@
51 51
 </template>
52 52
 
53 53
 <script>
54
-import { mapState } from 'vuex'
54
+import { createNamespacedHelpers, mapState } from 'vuex'
55
+
56
+const { mapActions: mapVipActions } = createNamespacedHelpers('vip')
57
+
55 58
 export default {
56 59
   name: '',
57 60
   data () {
58 61
     return {
59 62
       postData: {
60
-        CardNum: '', // 卡数量
61
-        Price: '', // 价格
63
+        TotalCount: '', // 卡数量
64
+        CardAmount: '', // 价格
62 65
         CaseId: '', // 案场id
66
+        OrgId: '',
63 67
       }
64 68
     }
65 69
   },
@@ -83,15 +87,33 @@ export default {
83 87
   },
84 88
   components: {},
85 89
   methods: {
90
+    ...mapVipActions([
91
+      'AddVip',
92
+    ]),
86 93
     initData () { // 数据初始化
87
-      // this.$ajax(this.$api.channelManager.getChannelInfo.url, {
88
-      //   method: this.$api.channelManager.getChannelInfo.method,
89
-      //   urlData: { channelId: this.$route.query.id }
90
-      // }).then(res => {
91
-      //   this.postData = res
92
-      // })
93 94
     },
94 95
     submit () { // 提交数据
96
+      if (this.postData.TotalCount === '') {
97
+        this.$message({
98
+          type: 'error',
99
+          message: '请输入VIP卡数量!'
100
+        })
101
+        return
102
+      }
103
+      if (this.postData.CardAmount === 0) {
104
+        this.$message({
105
+          type: 'error',
106
+          message: '请输入价格!'
107
+        })
108
+        return
109
+      }
110
+      this.AddVip({...this.postData, CaseId: this.CaseId, OrgId: this.OrgId}).then(x => {
111
+        this.$message({
112
+          type: 'success',
113
+          message: '保存成功!'
114
+        })
115
+        this.$router.push({ name: 'vipList' })
116
+      })
95 117
     },
96 118
     cancel () {
97 119
       this.$router.push({ name: 'vipList' })

+ 28
- 19
src/pages/system/cardAndCouponManager/vipManager/index.vue 查看文件

@@ -53,23 +53,26 @@
53 53
     </div>
54 54
     <div class="system-table-box">
55 55
       <el-table
56
-        :data="currentList"
56
+        :data="vips.list"
57 57
         stripe
58 58
         style="width: 100%">
59 59
         <el-table-column
60
-          prop="CardNo"
60
+          prop="VipCardChildCode"
61 61
           label="卡号">
62 62
         </el-table-column>
63 63
         <el-table-column
64
-          prop="Price"
64
+          prop="Amount"
65 65
           label="价格">
66 66
         </el-table-column>
67 67
         <el-table-column
68 68
           prop="Status"
69 69
           label="状态">
70
+          <template slot-scope="scope">
71
+            <span>{{scope.row.Status===1?'已激活':'未激活'}}</span>
72
+          </template>
70 73
         </el-table-column>
71 74
         <el-table-column
72
-          prop="SellerName"
75
+          prop="SalesName"
73 76
           label="销售">
74 77
         </el-table-column>
75 78
         <el-table-column
@@ -77,16 +80,22 @@
77 80
           label="案场">
78 81
         </el-table-column>
79 82
         <el-table-column
80
-          prop="UserName"
83
+          prop="CustomerName"
81 84
           label="用户">
82 85
         </el-table-column>
83 86
         <el-table-column
84
-          prop="ActivationTime"
87
+          prop="ActiveDate"
85 88
           label="激活时间">
89
+          <template slot-scope="scope">
90
+            <span>{{toolClass.dateFormat(scope.row.ActiveDate, 'yyyy-MM-dd')==='1-01-01'?'':toolClass.dateFormat(scope.row.ActiveDate, 'yyyy-MM-dd hh:mm')}}</span>
91
+          </template>
86 92
         </el-table-column>
87 93
         <el-table-column
88
-          prop="CreatTime"
94
+          prop="CreateDate"
89 95
           label="创建时间">
96
+          <template slot-scope="scope">
97
+            <span>{{toolClass.dateFormat(scope.row.CreateDate, 'yyyy-MM-dd hh:mm')}}</span>
98
+          </template>
90 99
         </el-table-column>
91 100
       </el-table>
92 101
     </div>
@@ -95,13 +104,15 @@
95 104
       :current-page.sync="postData.page"
96 105
       :page-size="postData.pagesize"
97 106
       layout="prev, pager, next, jumper"
98
-      :total="total">
107
+      :total="vips.pagenum">
99 108
     </el-pagination>
100 109
   </div>
101 110
 </template>
102 111
 
103 112
 <script>
104
-import { mapState } from 'vuex'
113
+import { createNamespacedHelpers, mapState } from 'vuex'
114
+
115
+const { mapState: mapVipState, mapActions: mapVipActions } = createNamespacedHelpers('vip')
105 116
 
106 117
 export default {
107 118
   name: '',
@@ -116,16 +127,6 @@ export default {
116 127
         sellerName: '', // 销售姓名
117 128
         userName: '', // 用户名
118 129
       },
119
-      currentList: [{
120
-        CardNo: 'xxx',
121
-        Price: 'xxx',
122
-        Status: 'xxx',
123
-        SellerName: 'xxx',
124
-        CaseName: 'xxx',
125
-        UserName: 'xxx',
126
-        ActivationTime: 'xxx',
127
-        CreatTime: 'xxx',
128
-      }]
129 130
     }
130 131
   },
131 132
   mounted () {
@@ -134,6 +135,9 @@ export default {
134 135
     })
135 136
   },
136 137
   computed: {
138
+    ...mapVipState({
139
+      vips: x => x.vipList,
140
+    }),
137 141
     ...mapState({
138 142
       cases: x => x.app.cases.list,
139 143
       defaultCaseId: x => x.app.cases.default
@@ -148,14 +152,19 @@ export default {
148 152
     }
149 153
   },
150 154
   methods: {
155
+    ...mapVipActions([
156
+      'GetVipList',
157
+    ]),
151 158
     search () { // 搜索
152 159
       this.postData.page = 1
153 160
       this.currentList = []
154 161
       this.getList()
155 162
     },
156 163
     getList () { // 获取列表
164
+      this.GetVipList({...this.postData, caseid: this.CaseId})
157 165
     },
158 166
     handleCurrentChange (val) { // 跳转到分页
167
+      this.postData.page = val
159 168
       this.getList()
160 169
     },
161 170
     addVIP () {

+ 1
- 1
src/pages/system/channelManager/channelList/add.vue 查看文件

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <!-- <span>选择案场:</span> -->
6
+          <span>选择案场:</span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-select v-model="CaseId" placeholder="请选择">

+ 1
- 1
src/pages/system/channelManager/channelList/edit.vue 查看文件

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <!-- <span>选择案场:</span> -->
6
+          <span>选择案场:</span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-select v-model="CaseId" placeholder="请选择">

+ 1
- 1
src/pages/system/cmsManager/indexMsg/add.vue 查看文件

@@ -77,7 +77,7 @@ export default {
77 77
         InfoUrl: '',
78 78
         OrgId: '',
79 79
         CaseId: '',
80
-        LocationId: '1'
80
+        LocationId: 'index'
81 81
       }
82 82
     }
83 83
   },

+ 1
- 1
src/pages/system/cmsManager/indexMsg/edit.vue 查看文件

@@ -77,7 +77,7 @@ export default {
77 77
         InfoUrl: '',
78 78
         OrgId: '',
79 79
         CaseId: '',
80
-        LocationId: '1'
80
+        LocationId: 'index'
81 81
       }
82 82
     }
83 83
   },

+ 2
- 2
src/pages/system/cmsManager/majorProjects/edit.vue 查看文件

@@ -286,10 +286,10 @@ export default {
286 286
     submit () {
287 287
       const imgs = this.imgsArr.map(x => x.response.result.url).join(',')
288 288
       const detailimgs = this.detailimgsArr.map(x => x.response.result.url).join(',')
289
-      const courseids = this.detail.Courses.map(x => x.CourseId).join(',')
289
+      const courseids = (this.detail.Courses || []).map(x => x.CourseId).join(',')
290 290
       if (this.id === '') {
291 291
         this.detail.OrgId = this.OrgId
292
-        this.AddCaseInfo({...this.detail, imgs, detailimgs, courseids}).then(res => {
292
+        this.AddCaseInfo({...this.detail, OrgId: this.OrgId, imgs, detailimgs, courseids}).then(res => {
293 293
           this.afterSave()
294 294
         })
295 295
       } else {

+ 1
- 1
src/pages/system/cmsManager/majorProjects/index.vue 查看文件

@@ -168,7 +168,7 @@ export default {
168 168
       this.getList()
169 169
     },
170 170
     addMajorProjects () {
171
-      this.$router.push({ name: 'addIndexCase' })
171
+      this.$router.push({ name: 'editIndexCase' })
172 172
     },
173 173
     getList () {
174 174
       this.tableData = []

+ 1
- 1
src/pages/system/cmsManager/newsManager/add.vue 查看文件

@@ -36,7 +36,7 @@
36 36
           <span>图片位置:</span>
37 37
           <div class="flex-item">
38 38
             <div style="width:50%">
39
-              <el-select v-model="postData.LocationIds" multiple placeholder="请选择">
39
+              <el-select style="width:100%" v-model="postData.LocationIds" multiple placeholder="请选择">
40 40
                 <el-option
41 41
                   v-for="item in positionList"
42 42
                   :key="item.LocationId"

+ 1
- 1
src/pages/system/cmsManager/newsManager/edit.vue 查看文件

@@ -36,7 +36,7 @@
36 36
           <span>图片位置:</span>
37 37
           <div class="flex-item">
38 38
             <div style="width:50%">
39
-              <el-select v-model="postData.LocationIds" multiple placeholder="请选择">
39
+              <el-select style="width:100%" v-model="postData.LocationIds" multiple placeholder="请选择">
40 40
                 <el-option
41 41
                   v-for="item in positionList"
42 42
                   :key="item.LocationId"

+ 4
- 2
src/pages/system/courseManager/courseList/add.vue 查看文件

@@ -323,10 +323,12 @@ export default {
323 323
         if (!this.detail.CaseId || this.detail.CaseId === '') {
324 324
           this.detail.CaseId = this.caseid
325 325
         }
326
-        this.AddCourse(this.detail)
326
+        this.AddCourse({...this.detail, callback: _that.afterSave})
327 327
       } else {
328
-        this.UpdateCourse(this.detail)
328
+        this.UpdateCourse({...this.detail, callback: _that.afterSave})
329 329
       }
330
+    },
331
+    afterSave () {
330 332
       this.$message({
331 333
         type: 'success',
332 334
         message: '操作成功'

+ 5
- 1
src/pages/system/courseManager/courseList/index.vue 查看文件

@@ -119,6 +119,7 @@
119 119
               size="mini"
120 120
               type="warning"
121 121
               v-if="scope.row.Status===0"
122
+              @click="toSchedule(scope.row)"
122 123
               >排课</el-button>
123 124
             <el-button
124 125
               size="mini"
@@ -421,7 +422,10 @@ export default {
421 422
     handleCopy (row) {
422 423
       this.GetCourseByID({ id: row.CourseId })
423 424
       this.$router.push({ name: 'addCourse' })
424
-    }
425
+    },
426
+    toSchedule (row) {
427
+      this.$router.push({ name: 'scheduleManager', query: { id: row.CourseId } })
428
+    },
425 429
   }
426 430
 }
427 431
 </script>

+ 1
- 1
src/pages/system/courseManager/fiveA/add.vue 查看文件

@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>课程图片:</span>
42
+          <span>图片:</span>
43 43
           <div class="flex-item">
44 44
             <el-upload
45 45
               :action="$api.file.image.url"

+ 1
- 1
src/pages/system/courseManager/fiveA/edit.vue 查看文件

@@ -51,7 +51,7 @@
51 51
           </div>
52 52
         </li> -->
53 53
         <li class="flex-h">
54
-          <span>课程图片:</span>
54
+          <span>图片:</span>
55 55
           <div class="flex-item">
56 56
             <el-upload
57 57
               :action="$api.file.image.url"

+ 12
- 3
src/pages/system/courseManager/scheduleManager/edit.vue 查看文件

@@ -161,20 +161,29 @@ export default {
161 161
         pagesize: 10, // 请求数据量
162 162
         name: '', // 课程名称
163 163
         date: '',
164
+        courseid: '',
164 165
       },
165 166
     }
166 167
   },
167 168
   mounted () {
168
-    const { date, caseid } = this.$route.query
169
-    if (!date || date === '' || !caseid || caseid === '') {
169
+    const { date, caseid, courseid } = this.$route.query
170
+    if (!date || date === '') {
170 171
       this.$message({
171 172
         type: 'error',
172
-        message: '请先选择排课时间与案场'
173
+        message: '请先选择排课时间'
174
+      })
175
+      this.$router.push({ name: 'scheduleManager', query: { courseid: courseid } })
176
+    }
177
+    if ((!courseid && courseid === '') && (!caseid || caseid === '')) {
178
+      this.$message({
179
+        type: 'error',
180
+        message: '请先选择排课案场'
173 181
       })
174 182
       this.$router.push({ name: 'scheduleManager' })
175 183
     }
176 184
     this.postData.date = date
177 185
     this.postData.caseid = caseid
186
+    this.postData.courseid = courseid
178 187
     this.updateLocationInfo()
179 188
     this.$nextTick(function () {
180 189
       this.getList()

+ 18
- 7
src/pages/system/courseManager/scheduleManager/index.vue 查看文件

@@ -5,7 +5,7 @@
5 5
         <div class="flex-item flex-h">
6 6
           <!-- <el-button size="mini" type="success" @click="addSchedule">新增排课</el-button> -->
7 7
         </div>
8
-        <ul>
8
+        <ul v-if="courseid===''">
9 9
           <li>
10 10
             <el-select v-model="CaseId" placeholder="请选择案场">
11 11
               <el-option
@@ -116,6 +116,7 @@ export default {
116 116
     return {
117 117
       caseid: '',
118 118
       seldate: '',
119
+      courseid: '',
119 120
       currentCourseItem: {},
120 121
       centerDialogVisible: false,
121 122
     }
@@ -165,10 +166,11 @@ export default {
165 166
     ...mapScheduleActions([
166 167
       'GetDetailList',
167 168
       'UpdateDetail',
168
-      'DelDetail'
169
+      'DelDetail',
170
+      'SetListNull',
169 171
     ]),
170 172
     dayClick (day, jsEvent) { // 点击某天进入排课
171
-      this.$router.push({ name: 'editSchedule', query: {caseid: this.CaseId, date: this.toolClass.dateFormat(day, 'yyyy-MM-dd')} })
173
+      this.$router.push({ name: 'editSchedule', query: {caseid: this.CaseId, courseid: this.courseid, date: this.toolClass.dateFormat(day, 'yyyy-MM-dd')} })
172 174
     },
173 175
     eventClick (event, jsEvent, pos) { // 点击日历
174 176
       this.currentCourseItem = {...event.detail}
@@ -182,10 +184,15 @@ export default {
182 184
       this.getList()
183 185
     },
184 186
     getList () {
185
-      this.GetDetailList({
186
-        caseid: this.CaseId,
187
-        date: this.CurrentMonth,
188
-      })
187
+      if (this.CaseId !== '' || this.courseid !== '') {
188
+        this.GetDetailList({
189
+          caseid: this.CaseId,
190
+          date: this.CurrentMonth,
191
+          courseid: this.courseid,
192
+        })
193
+      } else {
194
+        this.SetListNull()
195
+      }
189 196
     },
190 197
     handlUpdateDetail () {
191 198
       this.UpdateDetail({...this.currentCourseItem,
@@ -214,6 +221,10 @@ export default {
214 221
   },
215 222
   mounted () {
216 223
     this.$nextTick(function () {
224
+      const { id } = this.$route.query
225
+      if (id && id !== '') {
226
+        this.courseid = id
227
+      }
217 228
       this.getList()
218 229
     })
219 230
   }

+ 1
- 1
src/pages/system/goodsManager/goodsSpecManager/add.vue 查看文件

@@ -15,7 +15,7 @@
15 15
           </div>
16 16
         </li>
17 17
         <li class="flex-h">
18
-          <!-- <span>选择案场:</span> -->
18
+          <span>选择案场:</span>
19 19
           <div class="flex-item">
20 20
             <div style="width:50%">
21 21
               <el-select v-model="CaseId" placeholder="请选择">

+ 1
- 1
src/pages/system/goodsManager/goodsSpecManager/edit.vue 查看文件

@@ -15,7 +15,7 @@
15 15
           </div>
16 16
         </li>
17 17
         <li class="flex-h">
18
-          <!-- <span>选择案场:</span> -->
18
+          <span>选择案场:</span>
19 19
           <div class="flex-item">
20 20
             <div style="width:50%">
21 21
               <el-select v-model="CaseId" placeholder="请选择">

+ 0
- 216
src/pages/system/newOrder/monthOrder/index.vue 查看文件

@@ -1,216 +0,0 @@
1
-<template>
2
-  <div class="subPage">
3
-    <div class="system-table-search">
4
-      <div class="flex-h">
5
-        <div class="flex-item flex-h">
6
-          <el-button size="mini" type="success" @click='addMajorProjects'>新增</el-button>
7
-        </div>
8
-        <ul>
9
-          <li>
10
-            <span>选择案场:</span>
11
-            <el-select v-model="tableSearch.caseId" placeholder="请选择">
12
-              <el-option
13
-              value=""
14
-              >
15
-              </el-option>
16
-              <el-option
17
-                v-for="item in caseList"
18
-                :key="item.CaseId"
19
-                :label="item.CaseName"
20
-                :value="item.CaseId">
21
-              </el-option>
22
-            </el-select>
23
-          </li>
24
-        </ul>
25
-        <el-button
26
-          size="mini"
27
-          type="primary" @click="search">搜索</el-button>
28
-      </div>
29
-      <div class="moreFilter"></div>
30
-    </div>
31
-    <div class="system-table-box">
32
-      <el-table
33
-        :data="tableData"
34
-        stripe
35
-        style="width: 100%">
36
-        <el-table-column
37
-          prop="Name"
38
-          label="案场">
39
-        </el-table-column>
40
-        <el-table-column
41
-          prop="Title"
42
-          label="月份">
43
-        </el-table-column>
44
-        <el-table-column
45
-          prop="CaseName"
46
-          label="规定次数">
47
-        </el-table-column>
48
-        <el-table-column
49
-          prop="CreateDate"
50
-          label="实际次数">
51
-        </el-table-column>
52
-        <el-table-column
53
-          prop="CreateDate"
54
-          label="超出次数">
55
-        </el-table-column>
56
-        <el-table-column
57
-          prop="CreateDate"
58
-          label="剩余次数">
59
-        </el-table-column>
60
-        <el-table-column label="操作" width="450">
61
-          <template slot-scope="scope">
62
-            <el-button
63
-              size="mini"
64
-              type="primary"
65
-              @click="deleteItem(scope.$index, scope.row)">导出Excel</el-button>
66
-          </template>
67
-        </el-table-column>
68
-      </el-table>
69
-    </div>
70
-    <el-pagination
71
-      @current-change="handleCurrentChange"
72
-      :current-page.sync="postData.currentPage"
73
-      :page-size="postData.pageSize"
74
-      layout="prev, pager, next, jumper"
75
-      :total="postData.total">
76
-    </el-pagination>
77
-  </div>
78
-</template>
79
-
80
-<script>
81
-import { mapState, mapActions } from 'vuex'
82
-
83
-export default {
84
-  name: '',
85
-  data () {
86
-    return {
87
-      postData: {
88
-        currentPage: 1, // 当前页码
89
-        pageSize: 10,
90
-        total: 0,
91
-      },
92
-      tableSearch: { // 表格搜索条件
93
-        key: '', // 搜索关键字
94
-        caseId: '', // 案场id
95
-      },
96
-      tableData: []
97
-    }
98
-  },
99
-  computed: {
100
-    ...mapState({
101
-      OrgId: x => x.app.user.OrgId,
102
-      caseList: x => x.app.cases.list,
103
-      defaultCaseId: x => x.app.cases.default
104
-    })
105
-  },
106
-  components: {
107
-    // tableSearch,
108
-  },
109
-  created () {
110
-    this.updateSystemInfo().then(() => {
111
-      // this.tableSearch.caseId = this.defaultCaseId
112
-      this.getList()
113
-    })
114
-  },
115
-  methods: {
116
-    ...mapActions(['updateSystemInfo']),
117
-    handleCurrentChange (val) {
118
-      this.postData.currentPage = val
119
-      this.getList()
120
-    },
121
-    showItem (index, row) { // 前台显示
122
-      this.editIsAllCourse(row)
123
-    },
124
-    editItem (index, row) { // 编辑
125
-      console.log(index, row)
126
-      this.$router.push({ name: 'editIndexCase', query: { id: row.CmsCaseId } })
127
-    },
128
-    // copyItemUrl (index, row) { // 复制专题链接
129
-    //   console.log(index, row)
130
-    //   window.clipboardData.setData('Text', row.Title)
131
-    // },
132
-    deleteItem (index, row) { // 删除
133
-      console.log(index, row)
134
-      this.$confirm('确认删除此项目专题?', '提示', {
135
-        confirmButtonText: '确定',
136
-        cancelButtonText: '取消',
137
-        type: 'warning'
138
-      }).then(() => {
139
-        this.deleteInfo(row.CmsCaseId)
140
-      }).catch(() => {
141
-        this.$message({
142
-          type: 'info',
143
-          message: '已取消删除'
144
-        })
145
-      })
146
-    },
147
-    searchList (key) { // 搜索列表
148
-      this.tableSearch.key = key
149
-      this.getList()
150
-    },
151
-    addMajorProjects () {
152
-      this.$router.push({ name: 'addIndexCase' })
153
-    },
154
-    getList () {
155
-      this.tableData = []
156
-      this.$ajax(this.$api.cms.case.url, {
157
-        method: this.$api.cms.case.method,
158
-        queryData: {
159
-          page: this.postData.currentPage,
160
-          pagesize: this.postData.pageSize,
161
-          caseid: this.tableSearch.caseId,
162
-          name: this.tableSearch.key
163
-        }
164
-      }).then(res => {
165
-        for (let i = 0; i < res.list.length; i++) {
166
-          res.list[i].CreateDate = this.toolClass.dateFormat(res.list[i].CreateDate)
167
-        }
168
-        this.tableData = res.list
169
-        this.postData.total = res.pagenum
170
-        this.postData.currentPage = res.page
171
-      }).catch(msg => {
172
-
173
-      })
174
-    },
175
-    deleteInfo (id) {
176
-      this.$ajax(this.$api.cms.deleteCase.url, {
177
-        method: this.$api.cms.deleteCase.method,
178
-        urlData: {
179
-          id: id
180
-        }
181
-      }).then(res => {
182
-        this.$message({
183
-          type: 'success',
184
-          message: '删除成功!'
185
-        })
186
-        this.getList()
187
-      }).catch(msg => {
188
-
189
-      })
190
-    },
191
-    editIsAllCourse (data) {
192
-      console.log(data)
193
-      let api = data.Status === 1 ? this.$api.cms.caseHide : this.$api.cms.caseShow
194
-      this.$ajax(api.url, {
195
-        method: api.method,
196
-        urlData: {
197
-          id: data.CmsCaseId
198
-        }
199
-      }).then(res => {
200
-        this.$message({
201
-          message: '编辑成功',
202
-          type: 'success',
203
-          duration: 1000
204
-        })
205
-        this.getList()
206
-      }).catch(msg => {
207
-
208
-      })
209
-    },
210
-  }
211
-}
212
-</script>
213
-
214
-<!-- Add "scoped" attribute to limit CSS to this component only -->
215
-<style lang="scss" scoped>
216
-</style>

+ 181
- 63
src/pages/system/newOrder/newOrderList/index.vue 查看文件

@@ -3,8 +3,24 @@
3 3
     <div class="system-table-search">
4 4
       <div class="flex-h">
5 5
         <div class="flex-item flex-h">
6
-          <el-button size="mini" type="danger">营业</el-button>
6
+          <el-button size="mini" v-if="!businessStatus" type="danger" @click="open">营业</el-button>
7
+          <el-button size="mini" v-else type="submit" @click="close">歇业</el-button>
7 8
         </div>
9
+        <ul>
10
+          <li>
11
+            <el-select v-model="caseid" placeholder="请选择案场">
12
+              <el-option
13
+                v-for="item in cases"
14
+                :key="item.CaseId"
15
+                :label="item.CaseName"
16
+                :value="item.CaseId">
17
+              </el-option>
18
+            </el-select>
19
+          </li>
20
+        </ul>
21
+        <el-button
22
+          size="mini"
23
+          type="primary" @click="init">搜索</el-button>
8 24
       </div>
9 25
       <div class="moreFilter"></div>
10 26
     </div>
@@ -14,51 +30,46 @@
14 30
           <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
15 31
             <i class="iconfont icon-yinchenglogo" style="font-size:70px;color:red;position: relative;bottom: 20px;margin-right:10px;"></i>
16 32
             <div style="display:inline-block;">
17
-              <span style="display:block;font-size:20px;font-weight:700;">A区域1号桌</span>
18
-              <span style="display:block;margin-top:10px">下单时间:21:30:39</span>
19
-              <span style="display:block;margin-top:10px">已等待:<span style="color:red;font-weight:700;">30:29</span></span>
33
+              <span style="display:block;font-size:20px;font-weight:700;">{{item.AreaName}}</span>
34
+              <span style="display:block;margin-top:10px">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</span>
35
+              <span style="display:block;margin-top:10px">已等待:<span style="color:red;font-weight:700;">{{leftTimes[item.OrdersId]}}</span></span>
20 36
             </div>
21 37
           </div>
22
-          <div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;">
23
-            <div>卡布奇诺</div>
24
-            <div style="margin-top:8px;">
25
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">热</span>
26
-              <span style="display:inline-block;width:20%;text-align:right">x 1</span>
27
-            </div>
28
-            <div style="margin-top:8px;">
29
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">冷</span>
30
-              <span style="display:inline-block;width:20%;text-align:right">x 2</span>
38
+          <div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;" v-for='(item1,index1) in item.Goods' :key='index1'>
39
+            <div style="display:flex;justify-content: space-between;align-items: center;"><span>{{item1.GoodsName}}</span><span style="display:inline-block;width:20%;text-align:right" v-if='!item1.SpecName'>x {{item1.Number}}</span></div>
40
+            <div style="margin-top:8px;" v-if='item1.SpecName'>
41
+              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">{{item1.SpecName}}</span>
42
+              <span style="display:inline-block;width:20%;text-align:right">× {{item1.Number}}</span>
31 43
             </div>
32 44
           </div>
33
-          <div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:请赶快制作</div>
34
-          <div style="padding:10px 20px;">下单人:xxxxx</div>
45
+          <div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:{{item.Remark}}</div>
46
+          <div style="padding:10px 20px;" @click="printPdf(`item${index}`)">下单人:{{item.UserName}}</div>
35 47
         </div>
36 48
         <div class="print-area" :class="'item' + index" style="width:180px;">
37
-          <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
49
+          <div style="padding:0px 10px 5px;border-bottom:2px solid #cccccc;">
38 50
             <div style="display:inline-block;">
39
-              <img class="topIcon" style="display:block;width:60%;margin:0 0 20px 10px;" src="http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/111101940020.png" alt="">
40
-              <span style="display:block;font-size:20px;font-weight:700;"> <img width='25px' height="25px" src="http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/111101940020.png" alt=""> A区域1号桌</span>
41
-              <span style="display:block;margin-top:10px;font-size:12px;">下单时间:21:30:39</span>
42
-              <span style="display:block;margin-top:10px;font-size:12px;">已等待:<span style="color:red;font-weight:700;">30:29</span></span>
51
+              <img class="topIcon" style="display:block;width:60%;margin:0 0 20px 0px;" src="http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/111101940020.png" alt="">
52
+              <span style="display:block;font-size:20px;font-weight:700;text-align: center;"> <img width='25px' height="25px" :src='item.AreaIconWhite' alt=""> {{item.AreaName}}</span>
43 53
             </div>
44 54
           </div>
45
-          <div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;">
46
-            <div>卡布奇诺</div>
47
-            <div style="margin-top:8px;">
48
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc;font-size:12px;">热</span>
49
-              <span style="display:inline-block;width:20%;text-align:right;font-size:12px;">x 1</span>
50
-            </div>
51
-            <div style="margin-top:8px;">
52
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc;font-size:12px;">冷</span>
53
-              <span style="display:inline-block;width:20%;text-align:right;font-size:12px;">x 2</span>
55
+          <div style="padding:10px 10px 5px;border-bottom:1px solid #cccccc;" v-for='(item1,index1) in item.Goods' :key='index1'>
56
+            <div style="display:flex;justify-content: space-between;align-items: center;font-size:12px;"><span>{{item1.GoodsName}}</span><span style="display:inline-block;width:20%;text-align:right;font-size:12px;" v-if='!item1.SpecName'>x {{item1.Number}}</span></div>
57
+            <div style="margin-top:8px;" v-if='item1.SpecName'>
58
+              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc;font-size:12px;">{{item1.SpecName}}</span>
59
+              <span style="display:inline-block;width:20%;text-align:right;font-size:12px;">× {{item1.Number}}</span>
54 60
             </div>
55 61
           </div>
56
-          <div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:请赶快制作</div>
57
-          <div style="padding:10px 20px;">下单人:xxxxx</div>
62
+          <div style="padding:10px 10px 5px;border-bottom:1px solid #cccccc;">
63
+            <div style="font-size:12px;">下单人:{{item.UserName}}</div>
64
+            <span style="display:block;margin-top:10px;font-size:12px;">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</span>
65
+          </div>
66
+          <div style="padding:10px 10px;font-size:12px;">备注:{{item.Remark}}</div>
67
+          <div style="text-align: right;font-size: 12px;">城的空间.诚咖啡</div>
68
+          <div style="height:10px"></div>
58 69
         </div>
59 70
         <div class="btns">
60
-          <span @click="cancel">取消</span>
61
-          <span @click="submit(`item${index}`)">确定</span>
71
+          <span @click="cancel(item.OrdersId)">取消</span>
72
+          <span @click="submit(item.OrdersId)">确定</span>
62 73
         </div>
63 74
       </div>
64 75
     </div>
@@ -66,13 +77,14 @@
66 77
 </template>
67 78
 
68 79
 <script>
69
-import { createNamespacedHelpers, mapState } from 'vuex'
80
+import { createNamespacedHelpers, mapState, mapActions } from 'vuex'
70 81
 
71 82
 import { getLodop } from '@/util/LodopFuncs'
72 83
 
84
+import { formatTimeBySeconds } from '@/util/util'
85
+
73 86
 const { mapState: mapOrderState, mapActions: mapOrderActions } = createNamespacedHelpers('goodsorder')
74 87
 
75
-const baseUrl = process.env.NODE_ENV === 'development' ? 'ws://192.168.0.148:8078/admin' : 'ws://cdkj.ycjcjy.com/admin' // 'ws://cdkj.ycjcjy.com/admin'
76 88
 var LODOP
77 89
 export default {
78 90
   name: '',
@@ -85,76 +97,182 @@ export default {
85 97
         pagesize: 10, // 请求数据量
86 98
       },
87 99
       currentList: [],
88
-      list: [1]
100
+      leftTimes: {},
101
+      business: false,
102
+      caseid: '',
103
+      interval: () => { }
89 104
     }
90 105
   },
91
-  components: {
106
+  computed: {
92 107
     ...mapOrderState({
93
-      orders: x => x.ordersList
108
+      list: x => (x.ordersList || {}).list || [],
109
+      businessStatus: x => x.businessStatus
94 110
     }),
95 111
     ...mapState({
96 112
       cases: x => x.app.cases.list,
97
-      defaultCaseId: x => x.app.cases.default
98
-    })
113
+      defaultCaseId: x => x.app.cases.default,
114
+      userInfo: x => x.app.user
115
+    }),
116
+    CaseId: {
117
+      get () {
118
+        return this.caseid || this.defaultCaseId
119
+      },
120
+      set (val) {
121
+        this.caseid = val
122
+      }
123
+    }
99 124
   },
100
-  mounted () {
101
-    this.GetOrdersList()
125
+  created () {
126
+    this.updateSystemInfo().then(() => {
127
+      if (this.caseid) {
128
+        this.init()
129
+      }
130
+    })
102 131
   },
103 132
   methods: {
133
+    init () {
134
+      if (!this.caseid) {
135
+        this.$message({
136
+          type: 'info',
137
+          message: '请先选择案场'
138
+        })
139
+        return
140
+      }
141
+      this.getBusinessStatus(this.caseid)
142
+      clearInterval(this.interval)
143
+      this.GetOrdersList({ caseid: this.caseid }).then(() => {
144
+        if (this.business) {
145
+          this.initWebSocket()
146
+        }
147
+        this.interval = setInterval(() => {
148
+          const now = (new Date()).valueOf()
149
+          this.leftTimes = this.list.reduce((acc, it) => {
150
+            const showDT = now - ((new Date(it.CreateDate)).valueOf())
151
+            return { ...acc, [`${it.OrdersId}`]: formatTimeBySeconds(showDT) }
152
+          }, {})
153
+        }, 1000)
154
+      })
155
+    },
156
+    timeOut (c) {
157
+      let cTime = new Date(c).valueOf()
158
+      let time = new Date().valueOf()
159
+      let s = parseInt((time - cTime) / 1000)
160
+      let m = parseInt(s / 60)
161
+      s = s - m * 60
162
+      m = m < 10 ? '0' + m : m
163
+      s = s < 10 ? '0' + s : s
164
+      return `${m} : ${s}`
165
+    },
104 166
     ...mapOrderActions([
105 167
       'GetOrdersList',
168
+      'openBusiness',
169
+      'closeBusiness',
170
+      'checkOrder',
171
+      'cancelOrder',
172
+      'getBusinessStatus',
173
+      'updateList'
174
+    ]),
175
+    ...mapActions([
176
+      'updateSystemInfo'
106 177
     ]),
107
-    submit (cl) {
178
+    submit (id) {
179
+      console.log(id)
108 180
       this.$confirm('确定完成此饮品?', '提示', {
109 181
         confirmButtonText: '确定',
110 182
         cancelButtonText: '取消',
111 183
         type: 'warning'
112 184
       }).then((res) => {
113
-        // this.printPdf(cl)
185
+        this.checkOrder({ id: id }).then(() => {
186
+          this.$message({
187
+            type: 'success',
188
+            message: '确认订单成功'
189
+          })
190
+          this.init()
191
+        })
114 192
       }).catch((res) => {
115 193
         this.$message({
116 194
           type: 'info',
117
-          message: '已取消'
195
+          message: '已取消操作'
118 196
         })
119 197
       })
120 198
     },
121
-    printPdf (cl) {
122
-      this.CreateOneFormPage(cl)
123
-      LODOP.PRINT()
124
-      // LODOP.PREVIEW()
125
-    },
126
-    CreateOneFormPage (cl) {
127
-      LODOP = getLodop()
128
-      LODOP.PRINT_INIT('订单')
129
-      LODOP.SET_PRINT_PAGESIZE(3, 480, 40, '')
130
-      LODOP.ADD_PRINT_HTM(0, 0, document.getElementsByClassName(cl)[0].offsetWidth, document.getElementsByClassName(cl)[0].offsetHeight, document.getElementsByClassName(cl)[0].innerHTML)
131
-    },
132
-    cancel () {
199
+    cancel (id) {
133 200
       this.$confirm('确定取消此饮品?', '提示', {
134 201
         confirmButtonText: '确定',
135 202
         cancelButtonText: '取消',
136 203
         type: 'warning'
137 204
       }).then((res) => {
138
-        // this.cancel()
205
+        this.cancelOrder({ id: id }).then(() => {
206
+          this.$message({
207
+            type: 'success',
208
+            message: '取消订单成功'
209
+          })
210
+          this.init()
211
+        })
139 212
       }).catch((res) => {
140 213
         this.$message({
141 214
           type: 'info',
142
-          message: '已取消'
215
+          message: '已取消操作'
143 216
         })
144 217
       })
145 218
     },
146
-    initWebSocket (code) {
147
-      const wsuri = `${baseUrl}/websocket/${code}`
219
+    printPdf (cl) {
220
+      this.CreateOneFormPage(cl)
221
+      LODOP.PRINT()
222
+      // LODOP.PREVIEW()
223
+    },
224
+    CreateOneFormPage (cl) {
225
+      LODOP = getLodop()
226
+      LODOP.PRINT_INIT('订单')
227
+      LODOP.SET_PRINT_PAGESIZE(3, 480, 40, '')
228
+      LODOP.ADD_PRINT_HTM(0, 0, document.getElementsByClassName(cl)[0].offsetWidth, document.getElementsByClassName(cl)[0].offsetHeight, document.getElementsByClassName(cl)[0].innerHTML)
229
+    },
230
+    initWebSocket () {
231
+      console.log(this.user)
232
+      let caseid = this.caseid
233
+      let id = this.userInfo.UserId
234
+      const wsuri = `${window.location.origin.replace('http', 'ws')}/api/common/MQ/websocket/${caseid}/${id}`
235
+      // const wsuri = `ws://192.168.0.11/api/guest/MQ/websocket/${caseid}/${id}`
148 236
       try {
149 237
         this.websock = new WebSocket(wsuri)
150 238
       } catch (e) {
151 239
         console.log(e)
152 240
       }
241
+      this.websock.onopen = console.log
153 242
       this.websock.onmessage = this.websocketonmessage
154
-      this.websock.onclose = this.websocketclose
243
+      this.websock.onclose = console.log
155 244
     },
156 245
     websocketonmessage (e) {
157
-      // const redata = JSON.parse(e.data)
246
+      console.log(e)
247
+      let lengthOld = this.list.length
248
+      let lengthNew = JSON.parse(e.data).data.refreshOnlineGoodsOrders.length
249
+      let newData = JSON.parse(e.data).data.refreshOnlineGoodsOrders.slice(lengthOld - lengthNew)
250
+      this.updateList(JSON.parse(e.data).data.refreshOnlineGoodsOrders).then(() => {
251
+        for (let i = 0; i < newData.length; i++) {
252
+          let index = newData[i].indexOf(this.list)
253
+          this.printPdf(`item${index}`)
254
+        }
255
+      })
256
+    },
257
+    open () {
258
+      if (!this.caseid) {
259
+        this.$message({
260
+          type: 'info',
261
+          message: '请先选择案场'
262
+        })
263
+        return
264
+      }
265
+      this.openBusiness(this.caseid)
266
+    },
267
+    close () {
268
+      if (!this.caseid) {
269
+        this.$message({
270
+          type: 'info',
271
+          message: '请先选择案场'
272
+        })
273
+        return
274
+      }
275
+      this.closeBusiness(this.caseid)
158 276
     }
159 277
   }
160 278
 }

+ 0
- 2
src/pages/system/newOrder/newOrderList/page.scss 查看文件

@@ -4,8 +4,6 @@
4 4
   overflow: scroll;
5 5
   width: auto;
6 6
   height: 600px;
7
-  display: flex;
8
-  flex-flow: column wrap;
9 7
   margin-top: 10px;
10 8
   >div{
11 9
     display: inline-block;

+ 6
- 8
src/pages/system/systemSet/roleManager/index.vue 查看文件

@@ -79,9 +79,11 @@ export default {
79 79
     }),
80 80
     defaultChecked: {
81 81
       get () {
82
-        const sels = (this.roleMenus || []).map(x => x.MenuId)
83
-        console.log(sels)
84
-        return sels
82
+        if (this.roleMenus.length && this.roleMenus.length > 0) {
83
+          const sels = (this.roleMenus || []).map(x => x.MenuId)
84
+          return sels
85
+        }
86
+        return []
85 87
       },
86 88
     },
87 89
   },
@@ -99,11 +101,9 @@ export default {
99 101
       return this.toolClass.dateFormat(date)
100 102
     },
101 103
     handleSizeChange (val) {
102
-      console.log(`每页 ${val} 条`)
103 104
     },
104 105
     handleCurrentChange (val) {
105 106
       this.GetRolesList({ page: val })
106
-      console.log(`当前页: ${val}`)
107 107
     },
108 108
     handleEdit (index, row) {
109 109
       // 编辑
@@ -140,7 +140,6 @@ export default {
140 140
       this.dialogTableVisible = true
141 141
     },
142 142
     handleNodeClick (node) {
143
-      console.log(node)
144 143
     },
145 144
     searchList (key) {
146 145
       this.key = key
@@ -150,8 +149,7 @@ export default {
150 149
       this.$router.push({ name: 'editRole' })
151 150
     },
152 151
     getCheckedNodes () { // 获取选中的节点
153
-      const menuids = this.$refs.tree.getCheckedNodes().map(x => x.id).join(',')
154
-      console.log(menuids)
152
+      const menuids = (this.$refs.tree.getCheckedNodes() || []).map(x => x.id).join(',')
155 153
       this.SaveRoleMenus({
156 154
         id: this.selid,
157 155
         menuids: menuids,

+ 5
- 5
src/pages/system/systemSet/userManager/add.vue 查看文件

@@ -23,7 +23,7 @@
23 23
                 :action='$api.file.image.url'
24 24
                 :show-file-list="false"
25 25
                 :on-success="handleAvatarSuccess">
26
-                <img v-if="postData.HeadImgUrl" :src="postData.HeadImgUrl" class="avatar">
26
+                <img v-if="postData.Headimgurl" :src="postData.Headimgurl" class="avatar">
27 27
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
28 28
               </el-upload>
29 29
             </div>
@@ -59,7 +59,7 @@
59 59
             <div style="width:50%">
60 60
               <el-input
61 61
                 placeholder="请输入工号"
62
-                v-model="postData.workNo"
62
+                v-model="postData.WorkNo"
63 63
                 clearable>
64 64
               </el-input>
65 65
             </div>
@@ -103,7 +103,7 @@
103 103
           </div>
104 104
         </li>
105 105
         <li class="flex-h">
106
-          <!-- <span>选择案场:</span> -->
106
+          <span>选择案场:</span>
107 107
           <div class="flex-item">
108 108
             <el-select v-model="CaseId" placeholder="请选择">
109 109
               <el-option
@@ -145,7 +145,7 @@ export default {
145 145
         WorkNo: '', // 工号
146 146
         Email: '', // 邮箱
147 147
         Phone: '', // 手机号
148
-        HeadImgUrl: '', // 头像
148
+        Headimgurl: '', // 头像
149 149
         TypeId: '', // 用户类型id
150 150
         TagIds: '', // 用户标签
151 151
         BelongCaseId: '', // 所属案场id
@@ -192,7 +192,7 @@ export default {
192 192
       this.postData.TagIds = val.join(',')
193 193
     },
194 194
     handleAvatarSuccess (res, file) {
195
-      this.postData.HeadImgUrl = res.result.url
195
+      this.postData.Headimgurl = res.result.url
196 196
     },
197 197
     submit () { // 提交数据
198 198
       if (this.postData.UserName === '') {

+ 11
- 10
src/pages/system/systemSet/userManager/edit.vue 查看文件

@@ -23,7 +23,7 @@
23 23
                 :action='$api.file.image.url'
24 24
                 :show-file-list="false"
25 25
                 :on-success="handleAvatarSuccess">
26
-                <img v-if="postData.HeadImgUrl" :src="postData.HeadImgUrl" class="avatar">
26
+                <img v-if="postData.Headimgurl" :src="postData.Headimgurl" class="avatar">
27 27
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
28 28
               </el-upload>
29 29
             </div>
@@ -59,7 +59,7 @@
59 59
             <div style="width:50%">
60 60
               <el-input
61 61
                 placeholder="请输入工号"
62
-                v-model="postData.workNo"
62
+                v-model="postData.WorkNo"
63 63
                 clearable>
64 64
               </el-input>
65 65
             </div>
@@ -103,9 +103,9 @@
103 103
           </div>
104 104
         </li>
105 105
         <li class="flex-h">
106
-          <!-- <span>选择案场:</span> -->
106
+          <span>选择案场:</span>
107 107
           <div class="flex-item">
108
-            <el-select v-model="CaseId" placeholder="请选择">
108
+            <el-select v-model="BelongCaseId" placeholder="请选择">
109 109
               <el-option
110 110
                 v-for="item in cases"
111 111
                 :key="item.CaseId"
@@ -145,10 +145,11 @@ export default {
145 145
         WorkNo: '', // 工号
146 146
         Email: '', // 邮箱
147 147
         Phone: '', // 手机号
148
-        HeadImgUrl: '', // 头像
148
+        Headimgurl: '', // 头像
149 149
         TypeId: '', // 用户类型id
150 150
         TagIds: '', // 用户标签
151
-        BelongCaseId: '', // 所属案场id
151
+        BelongCaseId: '',
152
+        UserCase: [],
152 153
       }
153 154
     }
154 155
   },
@@ -158,9 +159,9 @@ export default {
158 159
       cases: x => x.app.cases.list,
159 160
       defaultCaseId: x => x.app.cases.default,
160 161
     }),
161
-    CaseId: {
162
+    BelongCaseId: {
162 163
       get () {
163
-        return this.postData.BelongCaseId || this.defaultCaseId
164
+        return ((this.postData.UserCase || []).filter(x => x.IsBelong === 1)[0] || {}).CaseId
164 165
       },
165 166
       set (val) {
166 167
         this.postData.BelongCaseId = val
@@ -209,7 +210,7 @@ export default {
209 210
       this.postData.TagIds = val.join(',')
210 211
     },
211 212
     handleAvatarSuccess (res, file) {
212
-      this.postData.HeadImgUrl = res.result.url
213
+      this.postData.Headimgurl = res.result.url
213 214
     },
214 215
     submit () { // 提交数据
215 216
       if (this.postData.UserName === '') {
@@ -234,7 +235,7 @@ export default {
234 235
         })
235 236
         return false
236 237
       }
237
-      if (this.postData.BelongCaseId === '') this.postData.BelongCaseId = this.CaseId
238
+      if (this.postData.BelongCaseId === '') this.postData.BelongCaseId = this.BelongCaseId
238 239
       if (this.postData.TagIds === '') this.postData.TagIds = this.TagIds.join(',')
239 240
       this.$ajax(this.$api.systemSet.editUser.url, {
240 241
         method: this.$api.systemSet.editUser.method,

+ 1
- 1
src/pages/system/systemSet/userManager/index.vue 查看文件

@@ -290,7 +290,7 @@ export default {
290 290
         method: this.$api.systemSet.getUserList.method,
291 291
         queryData: { ...this.postData, caseid: this.CaseId, typeid: this.usertype, username: this.name }
292 292
       }).then(res => {
293
-        for (var n = 0; n < res.list.length; n++) {
293
+        for (var n = 0; n < (res.list || []).length; n++) {
294 294
           res.list[n].CreateDate = this.returnTime(res.list[n].CreateDate)
295 295
         }
296 296
         this.currentList = res.list

+ 1
- 1
src/pages/system/verificationManager/phoneVerification/verificationList/index.vue 查看文件

@@ -59,7 +59,7 @@
59 59
                     type="success"
60 60
                     v-if="scope.row.VerifyStatus!=='used'"
61 61
                     @click="check(scope.row)">核销</el-button>
62
-                  <span>已完成</span>
62
+                  <span v-else>已完成</span>
63 63
                 </template>
64 64
               </el-table-column>
65 65
             </el-table>

+ 1
- 1
src/pages/system/verificationManager/qrcodeVerification/verificationList/index.vue 查看文件

@@ -51,7 +51,7 @@
51 51
                     type="success"
52 52
                     v-if="scope.row.VerifyStatus!=='used'"
53 53
                     @click="check(scope.row)">核销</el-button>
54
-                  <span>已完成</span>
54
+                  <span v-else>已完成</span>
55 55
                 </template>
56 56
               </el-table-column>
57 57
             </el-table>

+ 76
- 0
src/store/card/vip.js 查看文件

@@ -0,0 +1,76 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    vipList: [],
8
+    vipinfo: {},
9
+  },
10
+  mutations: {
11
+    updateList (state, payload) {
12
+      state.vipList = payload || []
13
+    },
14
+    updateInfo (state, payload) {
15
+      state.vipinfo = payload || {}
16
+    },
17
+  },
18
+  actions: {
19
+    GetVipList ({ commit }, payload) {
20
+      return new Promise((resolve, reject) => {
21
+        ajax(api.cardManager.viplist.url, {
22
+          method: api.cardManager.viplist.method,
23
+          queryData: {
24
+            ...payload,
25
+          }
26
+        }).then(res => {
27
+          commit('updateList', res)
28
+          resolve(res)
29
+        }).catch(reject)
30
+      })
31
+    },
32
+    AddVip ({ commit }, payload) {
33
+      return new Promise((resolve, reject) => {
34
+        ajax(api.cardManager.vipadd.url, {
35
+          method: api.cardManager.vipadd.method,
36
+          data: {
37
+            ...payload,
38
+          }
39
+        }).then(res => {
40
+          resolve(res)
41
+        }).catch(reject)
42
+      })
43
+    },
44
+    GetVipByCode ({ commit }, { code }) {
45
+      return new Promise((resolve, reject) => {
46
+        ajax(api.cardManager.vipbycode.url, {
47
+          method: api.cardManager.vipbycode.method,
48
+          urlData: {
49
+            code,
50
+          }
51
+        }).then(res => {
52
+          commit('updateInfo', res)
53
+          resolve(res)
54
+        }).catch(reject)
55
+      })
56
+    },
57
+    VipCharge ({ commit }, payload) {
58
+      return new Promise((resolve, reject) => {
59
+        ajax(api.cardManager.vipcharge.url, {
60
+          method: api.cardManager.vipcharge.method,
61
+          urlData: {
62
+            code: payload.code
63
+          },
64
+          data: {
65
+            ...payload,
66
+          }
67
+        }).then(res => {
68
+          resolve(res)
69
+        }).catch(reject)
70
+      })
71
+    },
72
+    SetVipInfoNull ({ commit }) {
73
+      commit('updateInfo', {})
74
+    }
75
+  }
76
+}

+ 3
- 0
src/store/course/schedule.js 查看文件

@@ -89,5 +89,8 @@ export default {
89 89
         }
90 90
       })
91 91
     },
92
+    SetListNull ({ commit }) {
93
+      commit('updatesSheduleList', [])
94
+    }
92 95
   }
93 96
 }

+ 32
- 0
src/store/customer/customer.js 查看文件

@@ -0,0 +1,32 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    customer: {},
8
+  },
9
+  mutations: {
10
+    updateInfo (state, payload) {
11
+      state.customer = payload || {}
12
+    },
13
+  },
14
+  actions: {
15
+    GetCustomerByTel ({ commit }, { tel }) {
16
+      return new Promise((resolve, reject) => {
17
+        ajax(api.customerManager.getByTel.url, {
18
+          method: api.customerManager.getByTel.method,
19
+          urlData: {
20
+            tel
21
+          }
22
+        }).then(res => {
23
+          commit('updateInfo', res)
24
+          resolve(res)
25
+        }).catch(reject)
26
+      })
27
+    },
28
+    SetCustomerInfoNull ({ commit }) {
29
+      commit('updateInfo', {})
30
+    }
31
+  }
32
+}

+ 80
- 0
src/store/goods/order.js 查看文件

@@ -6,6 +6,8 @@ export default {
6 6
   state: {
7 7
     ordersList: [],
8 8
     recordOrders: [],
9
+    business: false,
10
+    businessStatus: false
9 11
   },
10 12
   mutations: {
11 13
     updateList (state, payload) {
@@ -14,6 +16,9 @@ export default {
14 16
     updateRecordList (state, payload) {
15 17
       state.recordOrders = payload || []
16 18
     },
19
+    updateBusiness (state, data) {
20
+      state.businessStatus = data
21
+    }
17 22
   },
18 23
   actions: {
19 24
     GetOrdersList ({ commit }, payload) {
@@ -38,6 +43,81 @@ export default {
38 43
           callback()
39 44
         }
40 45
       })
46
+    },
47
+    updateList ({ commit }, data) {
48
+      return new Promise((resolve) => {
49
+        commit('updateList', data)
50
+        resolve()
51
+      })
52
+    },
53
+    openBusiness ({ commit }, caseid) {
54
+      return new Promise((resolve) => {
55
+        ajax(api.goodsOrder.openBusiness.url, {
56
+          method: api.goodsOrder.openBusiness.method,
57
+          urlData: {
58
+            caseid
59
+          }
60
+        }).then(res => {
61
+          commit('updateBusiness', true)
62
+          resolve(res)
63
+        })
64
+      })
65
+    },
66
+    closeBusiness ({ commit }, caseid) {
67
+      return new Promise((resolve) => {
68
+        ajax(api.goodsOrder.closeBusiness.url, {
69
+          method: api.goodsOrder.closeBusiness.method,
70
+          urlData: {
71
+            caseid
72
+          }
73
+        }).then(res => {
74
+          commit('updateBusiness', false)
75
+          resolve(res)
76
+        })
77
+      })
78
+    },
79
+    getBusinessStatus ({ commit }, caseid) {
80
+      return new Promise((resolve) => {
81
+        ajax(api.goodsOrder.getBusinessStatus.url, {
82
+          method: api.goodsOrder.getBusinessStatus.method,
83
+          urlData: {
84
+            id: caseid
85
+          }
86
+        }).then(res => {
87
+          let status
88
+          if (res.Status === 1) {
89
+            status = true
90
+          } else {
91
+            status = false
92
+          }
93
+          commit('updateBusiness', status)
94
+          resolve(res)
95
+        })
96
+      })
97
+    },
98
+    checkOrder ({ commit }, data) {
99
+      return new Promise((resolve) => {
100
+        ajax(api.goodsOrder.checkOrder.url, {
101
+          method: api.goodsOrder.checkOrder.method,
102
+          urlData: {
103
+            id: data.id
104
+          }
105
+        }).then(res => {
106
+          resolve(res)
107
+        })
108
+      })
109
+    },
110
+    cancelOrder ({ commit }, data) {
111
+      return new Promise((resolve) => {
112
+        ajax(api.goodsOrder.cancelOrder.url, {
113
+          method: api.goodsOrder.cancelOrder.method,
114
+          urlData: {
115
+            id: data.id
116
+          }
117
+        }).then(res => {
118
+          resolve(res)
119
+        })
120
+      })
41 121
     }
42 122
   }
43 123
 }

+ 3
- 0
src/store/index.js 查看文件

@@ -25,6 +25,9 @@ export const modules = {
25 25
   goodsorder: () => require('./goods/order').default,
26 26
   cmscase: () => require('./cms/case').default,
27 27
   caserecord: () => require('./case/record').default,
28
+  vip: () => require('./card/vip').default,
29
+  customer: () => require('./customer/customer').default,
30
+  user: () => require('./system/user').default,
28 31
 }
29 32
 
30 33
 Object.keys(modules).forEach((modKey) => {

+ 29
- 0
src/store/system/user.js 查看文件

@@ -0,0 +1,29 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    userinfo: {},
8
+  },
9
+  mutations: {
10
+    updateInfo (state, payload) {
11
+      state.userinfo = payload || {}
12
+    },
13
+  },
14
+  actions: {
15
+    GetUserByTel ({ commit }, { tel }) {
16
+      ajax(api.systemSet.getUserByTel.url, {
17
+        method: api.systemSet.getUserByTel.method,
18
+        urlData: {
19
+          tel,
20
+        }
21
+      }).then(res => {
22
+        commit('updateInfo', res)
23
+      })
24
+    },
25
+    SetUserInfoNull ({ commit }) {
26
+      commit('updateInfo', {})
27
+    }
28
+  }
29
+}

+ 48
- 0
src/util/api.js 查看文件

@@ -56,6 +56,10 @@ const $api = {
56 56
       method: 'get',
57 57
       url: `${baseUrl}${common}/userrole`
58 58
     },
59
+    getUserByTel: {
60
+      method: 'get',
61
+      url: `${baseUrl}${common}/user/tel/:tel`
62
+    },
59 63
   },
60 64
   channelManager: {
61 65
     getChannelList: { // 渠道列表
@@ -546,6 +550,50 @@ const $api = {
546 550
       method: 'get',
547 551
       url: `${baseUrl}${common}/order/goods/record/:id`
548 552
     },
553
+    openBusiness: {
554
+      method: 'put',
555
+      url: `${baseUrl}${common}/case/open/:caseid`
556
+    },
557
+    closeBusiness: {
558
+      method: 'put',
559
+      url: `${baseUrl}${common}/case/close/:caseid`
560
+    },
561
+    getBusinessStatus: {
562
+      method: 'get',
563
+      url: `${baseUrl}${common}/case/conf/:id`
564
+    },
565
+    checkOrder: {
566
+      method: 'put',
567
+      url: `${baseUrl}${common}/order/goods/finish/:id`
568
+    },
569
+    cancelOrder: {
570
+      method: 'put',
571
+      url: `${baseUrl}${common}/order/goods/cancel/:id`
572
+    }
573
+  },
574
+  cardManager: {
575
+    viplist: {
576
+      method: 'get',
577
+      url: `${baseUrl}${common}/vipcard`
578
+    },
579
+    vipadd: {
580
+      method: 'post',
581
+      url: `${baseUrl}${common}/vipcard`
582
+    },
583
+    vipcharge: {
584
+      method: 'put',
585
+      url: `${baseUrl}${common}/vipcard/:code`
586
+    },
587
+    vipbycode: {
588
+      method: 'get',
589
+      url: `${baseUrl}${common}/vipcard/:code`
590
+    }
591
+  },
592
+  customerManager: {
593
+    getByTel: {
594
+      method: 'get',
595
+      url: `${baseUrl}${common}/customer/tel/:tel`
596
+    }
549 597
   },
550 598
 }
551 599
 export default $api

+ 10
- 0
src/util/util.js 查看文件

@@ -27,4 +27,14 @@ const toolClass = {
27 27
 
28 28
 }
29 29
 
30
+export function formatTimeBySeconds (ms) {
31
+  let hs = ms / 3600000 | 0
32
+  let min = (ms - (hs * 3600000)) / 60000 | 0
33
+  let sec = (ms - (hs * 3600000) - (min * 60000)) / 1000 | 0
34
+  hs = hs < 10 ? '0' + hs : hs
35
+  min = min < 10 ? '0' + min : min
36
+  sec = sec < 10 ? '0' + sec : sec
37
+  return hs > 0 ? `${hs}:${min}:${sec}` : `${min}:${sec}`
38
+}
39
+
30 40
 export default toolClass