浏览代码

完成 赠送记录 对接

keyman1995 6 年前
父节点
当前提交
3b102826d8
共有 56 个文件被更改,包括 1441 次插入604 次删除
  1. 4
    4
      config/index.js
  2. 1
    1
      dist/index.html
  3. 1
    1
      dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  4. 31
    0
      package-lock.json
  5. 10
    1
      src/pages/login/index.vue
  6. 139
    53
      src/pages/system/cardAndCouponManager/cardManager/edit.vue
  7. 2
    2
      src/pages/system/cardAndCouponManager/cardManager/index.vue
  8. 138
    28
      src/pages/system/cardAndCouponManager/couponManager/edit.vue
  9. 5
    5
      src/pages/system/cardAndCouponManager/couponManager/index.vue
  10. 4
    6
      src/pages/system/cardAndCouponManager/givingRecords.vue
  11. 23
    16
      src/pages/system/cardAndCouponManager/vipManager/activateVip.vue
  12. 11
    4
      src/pages/system/caseManager/caseAreaManager/add.vue
  13. 32
    4
      src/pages/system/caseManager/deviceManager/add.vue
  14. 1
    1
      src/pages/system/caseManager/keyManager/add.vue
  15. 30
    5
      src/pages/system/caseManager/keyManager/index.vue
  16. 29
    41
      src/pages/system/cmsManager/bannerManager/add.vue
  17. 35
    79
      src/pages/system/cmsManager/bannerManager/edit.vue
  18. 3
    8
      src/pages/system/cmsManager/bannerManager/index.vue
  19. 17
    18
      src/pages/system/cmsManager/indexMsg/add.vue
  20. 46
    43
      src/pages/system/cmsManager/indexMsg/edit.vue
  21. 3
    3
      src/pages/system/cmsManager/majorProjects/edit.vue
  22. 43
    26
      src/pages/system/cmsManager/newsManager/add.vue
  23. 65
    62
      src/pages/system/cmsManager/newsManager/edit.vue
  24. 33
    5
      src/pages/system/courseManager/fiveA/add.vue
  25. 32
    16
      src/pages/system/courseManager/fiveA/edit.vue
  26. 20
    3
      src/pages/system/courseManager/scheduleManager/edit.vue
  27. 8
    6
      src/pages/system/courseManager/scheduleManager/index.vue
  28. 10
    0
      src/pages/system/dashboard/index.vue
  29. 2
    2
      src/pages/system/dataStatistics/cardCouponUsedList/index.vue
  30. 1
    1
      src/pages/system/dataStatistics/courseVerifyList/index.vue
  31. 3
    3
      src/pages/system/dataStatistics/goodsOrderList/index.vue
  32. 59
    47
      src/pages/system/goodsManager/goodManager/edit.vue
  33. 9
    2
      src/pages/system/goodsManager/goodsSpecManager/add.vue
  34. 2
    2
      src/pages/system/goodsManager/goodsSpecManager/edit.vue
  35. 18
    4
      src/pages/system/goodsManager/goodsTypeManager/add.vue
  36. 12
    5
      src/pages/system/goodsManager/goodsTypeManager/edit.vue
  37. 2
    2
      src/pages/system/marketingActivities/activitiesList/index.vue
  38. 38
    9
      src/pages/system/marketingActivities/addActivities/index.vue
  39. 3
    3
      src/pages/system/newOrder/newOrderList/index.vue
  40. 2
    0
      src/pages/system/systemSet/roleManager/index.vue
  41. 19
    13
      src/pages/system/systemSet/userManager/add.vue
  42. 15
    9
      src/pages/system/systemSet/userManager/edit.vue
  43. 5
    1
      src/pages/system/systemSet/userManager/index.vue
  44. 5
    0
      src/pages/system/verificationManager/drawVerification/index.vue
  45. 1
    1
      src/pages/system/verificationManager/drawVerification/verificationList/index.vue
  46. 8
    1
      src/pages/system/verificationManager/phoneVerification/index.vue
  47. 174
    25
      src/pages/system/verificationManager/phoneVerification/verificationList/index.vue
  48. 8
    1
      src/pages/system/verificationManager/qrcodeVerification/index.vue
  49. 139
    14
      src/pages/system/verificationManager/qrcodeVerification/verificationList/index.vue
  50. 40
    0
      src/store/case/device.js
  51. 1
    1
      src/store/case/index.js
  52. 17
    0
      src/store/course/course.js
  53. 14
    2
      src/store/sta/sta.js
  54. 26
    11
      src/store/verification/verification.js
  55. 8
    0
      src/style/main.css
  56. 34
    4
      src/util/api.js

+ 4
- 4
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://127.0.0.1:8080', 
17
-        //target: 'http://192.168.0.62:8080', //wf
15
+        target: 'http://192.168.0.62:8080', //wf
16
+        // target: 'http://127.0.0.1:8080', 
17
+        // target: 'http://localhost:8080', //wf
18 18
         // target: 'http://192.168.0.11', //ys
19 19
         // target: 'http://192.168.0.125:8080', //hyq
20 20
         // target: 'http://dev.ycjcjy.com/', //frp
@@ -33,7 +33,7 @@ module.exports = {
33 33
     poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
34 34
 
35 35
     // Use Eslint Loader?
36
-    // If true, your code will be linted during bundling and
36
+    // If true, your code will be linted during bundling aynd
37 37
     // linting errors and warnings will be shown in the console.
38 38
     useEslint: true,
39 39
     // If true, eslint errors and warnings will also be shown in the error overlay

+ 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_25hulf12ph6.css><title>城的空间后台管理系统</title><link href=./static/css/app.8d9257cdf3036eec0434d40e02dd8bb5.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.7e921535e20f729cf046.js></script><script type=text/javascript src=./static/js/app.fb70b4505d8b5473f866.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_dwqa9wy3lkh.css><title>城的空间后台管理系统</title><link href=./static/css/app.a850e1bbc151e0cbebd3056e3c62c6e5.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.992319e39e0ff64940a3.js></script><script type=text/javascript src=./static/js/app.796889f82dfcb1df1494.js></script></body></html>

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

@@ -1 +1 @@
1
-{"version":3,"sources":["webpack:///webpack/bootstrap 3848669c23aacae56823"],"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 3848669c23aacae56823"],"sourceRoot":""}
1
+{"version":3,"sources":["webpack:///webpack/bootstrap 54812fbeda491d145170"],"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 54812fbeda491d145170"],"sourceRoot":""}

+ 31
- 0
package-lock.json 查看文件

@@ -2969,6 +2969,31 @@
2969 2969
         "sha.js": "2.4.11"
2970 2970
       }
2971 2971
     },
2972
+    "cross-env": {
2973
+      "version": "5.2.0",
2974
+      "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz",
2975
+      "integrity": "sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==",
2976
+      "dev": true,
2977
+      "requires": {
2978
+        "cross-spawn": "6.0.5",
2979
+        "is-windows": "1.0.2"
2980
+      },
2981
+      "dependencies": {
2982
+        "cross-spawn": {
2983
+          "version": "6.0.5",
2984
+          "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
2985
+          "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
2986
+          "dev": true,
2987
+          "requires": {
2988
+            "nice-try": "1.0.5",
2989
+            "path-key": "2.0.1",
2990
+            "semver": "5.5.0",
2991
+            "shebang-command": "1.2.0",
2992
+            "which": "1.3.1"
2993
+          }
2994
+        }
2995
+      }
2996
+    },
2972 2997
     "cross-spawn": {
2973 2998
       "version": "5.1.0",
2974 2999
       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
@@ -9413,6 +9438,12 @@
9413 9438
       "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
9414 9439
       "dev": true
9415 9440
     },
9441
+    "nice-try": {
9442
+      "version": "1.0.5",
9443
+      "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
9444
+      "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
9445
+      "dev": true
9446
+    },
9416 9447
     "nightwatch": {
9417 9448
       "version": "0.9.21",
9418 9449
       "resolved": "https://registry.npmjs.org/nightwatch/-/nightwatch-0.9.21.tgz",

+ 10
- 1
src/pages/login/index.vue 查看文件

@@ -58,7 +58,15 @@ export default {
58 58
   },
59 59
   mounted () {
60 60
     this.$nextTick(function () {
61
+      var _that = this
61 62
       this.initLogin()
63
+      document.onkeydown = function (event) {
64
+        var e = event || window.event
65
+        var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode
66
+        if (keyCode === 13) {
67
+          _that.toLogin()
68
+        }
69
+      }
62 70
     })
63 71
   },
64 72
   methods: {
@@ -88,7 +96,8 @@ export default {
88 96
           token: token
89 97
         }
90 98
       }).then(res => {
91
-        console.log(res)
99
+        // console.log(res)
100
+        document.onkeydown = function (event) {}
92 101
         this.saveToken(res.token)
93 102
         this.$message({
94 103
           message: '登陆成功',

+ 139
- 53
src/pages/system/cardAndCouponManager/cardManager/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>选择案场:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-select v-model="cardInfo.CaseId" placeholder="请选择" @change="caseChange">
@@ -18,7 +18,7 @@
18 18
           </div>
19 19
         </li>
20 20
         <li class="flex-h">
21
-          <span>卡图片:</span>
21
+          <span>卡图片:<em>*</em></span>
22 22
           <div class="flex-item">
23 23
             <div>
24 24
               <el-upload
@@ -34,7 +34,7 @@
34 34
           </div>
35 35
         </li>
36 36
         <li class="flex-h">
37
-          <span>卡名称:</span>
37
+          <span>卡名称:<em>*</em></span>
38 38
           <div class="flex-item">
39 39
             <div style="width:200px;">
40 40
               <el-input
@@ -46,7 +46,7 @@
46 46
           </div>
47 47
         </li>
48 48
         <li class="flex-h">
49
-          <span>卡价格:</span>
49
+          <span>卡价格:<em>*</em></span>
50 50
           <div class="flex-item">
51 51
             <div style="width:200px;">
52 52
               <el-input
@@ -58,7 +58,7 @@
58 58
           </div>
59 59
         </li>
60 60
         <li class="flex-h">
61
-          <span>总张数:</span>
61
+          <span>总张数:<em>*</em></span>
62 62
           <div class="flex-item">
63 63
             <div style="width:200px;">
64 64
               <el-input
@@ -70,7 +70,7 @@
70 70
           </div>
71 71
         </li>
72 72
         <li class="flex-h">
73
-          <span>发送类型:</span>
73
+          <span>发送类型:<em>*</em></span>
74 74
           <div class="flex-item">
75 75
             <div>
76 76
               <el-radio v-model="cardInfo.SendType" label="channel">渠道</el-radio>
@@ -80,7 +80,7 @@
80 80
           </div>
81 81
         </li>
82 82
         <li class="flex-h" v-if="cardInfo.SendType === 'channel'">
83
-          <span>选择渠道:</span>
83
+          <span>选择渠道:<em>*</em></span>
84 84
           <div class="flex-item">
85 85
             <div style="width:50%">
86 86
               <el-select v-model="cardInfo.ChannelId" placeholder="请选择">
@@ -95,7 +95,7 @@
95 95
           </div>
96 96
         </li>
97 97
         <li class="flex-h">
98
-          <span>目标课程:</span>
98
+          <span>目标课程:<em>*</em></span>
99 99
           <div class="flex-item">
100 100
             <div>
101 101
               <el-select v-model="cardInfo.Targets[0].TargetId" placeholder="请选择">
@@ -111,35 +111,23 @@
111 111
           </div>
112 112
         </li>
113 113
         <li class="flex-h">
114
-          <span>卡有效时间:</span>
114
+          <span>卡有效时间:<em>*</em></span>
115 115
           <div class="flex-item">
116 116
             <div>
117 117
               <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
118
-                <!-- <el-date-picker
119
-                  v-model="cardInfo.StartDate"
120
-                  type="date"
121
-                  placeholder="选择起始日期">
122
-                </el-date-picker>
123
-                <span style="line-height:40px;">至</span>
124
-                <el-date-picker
125
-                  v-model="cardInfo.EndDate"
126
-                  type="date"
127
-                  placeholder="选择截止日期">
128
-                </el-date-picker> -->
129 118
                 <el-date-picker
130 119
                   v-model="date"
131 120
                   type="daterange"
132 121
                   range-separator="至"
133 122
                   start-placeholder="开始日期"
134
-                  end-placeholder="结束日期"
135
-                  :picker-options="pickerOptions">
123
+                  end-placeholder="结束日期">
136 124
                 </el-date-picker>
137 125
               </div>
138 126
             </div>
139 127
           </div>
140 128
         </li>
141 129
         <li class="flex-h" v-if="cardInfo.SendType !== 'case' && cardInfo.SendType !== 'system'">
142
-          <span>视频:</span>
130
+          <span>视频:<em>*</em></span>
143 131
           <div class="flex-item">
144 132
             <div style="vertical-align: middle;">
145 133
               <a style="line-height: 40px;" v-if="videoOff" :href="cardInfo.VideoUrl" target="blank">{{cardInfo.VideoUrl}}</a>
@@ -156,7 +144,7 @@
156 144
           </div>
157 145
         </li>
158 146
         <li class="flex-h">
159
-          <span>分享描述:</span>
147
+          <span>分享描述:<em>*</em></span>
160 148
           <div class="flex-item">
161 149
             <div>
162 150
               <el-input
@@ -169,7 +157,7 @@
169 157
           </div>
170 158
         </li>
171 159
         <li class="flex-h">
172
-          <span>规则描述:</span>
160
+          <span>规则描述:<em>*</em></span>
173 161
           <div class="flex-item">
174 162
             <div>
175 163
               <el-input
@@ -182,7 +170,7 @@
182 170
           </div>
183 171
         </li>
184 172
         <li class="flex-h">
185
-          <span>使用说明:</span>
173
+          <span>使用说明:<em>*</em></span>
186 174
           <div class="flex-item">
187 175
             <div>
188 176
               <el-input
@@ -236,7 +224,11 @@ export default {
236 224
         TotalCount: '',
237 225
         CaseId: '',
238 226
         OrgId: '',
239
-        Share: {},
227
+        Share: {
228
+          CardShareInfo: '',
229
+          CardUseRule: '',
230
+          CardUseInstruction: '',
231
+        },
240 232
         Images: null,
241 233
         Targets: [{}],
242 234
         ChannelId: ''
@@ -292,17 +284,6 @@ export default {
292 284
       defaultCaseId: x => x.app.cases.default,
293 285
       OrgId: x => x.app.user.OrgId,
294 286
     }),
295
-    pickerOptions () {
296
-      const courseId = this.cardInfo.Targets[0].TargetId
297
-      const couse = (this.courseList || []).filter(x => x.CourseId === courseId)[0] || {}
298
-      const beginDate = new Date(couse.BeginDate).getTime()
299
-      const endDate = new Date(couse.EndDate).getTime()
300
-      return {
301
-        disabledDate (time) {
302
-          return time.getTime() < beginDate || time.getTime() > endDate
303
-        }
304
-      }
305
-    },
306 287
     CaseId: {
307 288
       get () {
308 289
         return this.postData.caseid || this.defaultCaseId
@@ -319,7 +300,7 @@ export default {
319 300
       'editCard',
320 301
     ]),
321 302
     ...mapCourseActions([
322
-      'GetCourseList',
303
+      'getCourseLister',
323 304
     ]),
324 305
     ...mapChannelActions([
325 306
       'GetChannelListList',
@@ -330,7 +311,7 @@ export default {
330 311
         page: 1,
331 312
         pagesize: 10000
332 313
       })
333
-      this.GetCourseList({
314
+      this.getCourseLister({
334 315
         caseid: this.cardInfo.CaseId,
335 316
         page: 1,
336 317
         pagesize: 10000
@@ -355,12 +336,114 @@ export default {
355 336
     addGoods () { // 添加指定商品
356 337
       this.centerDialogVisible = true
357 338
     },
339
+    checkInfo () { // 校验表单信息
340
+      if (this.cardInfo.CaseId === '') {
341
+        this.$message({
342
+          type: 'error',
343
+          message: '案场不能为空'
344
+        })
345
+        return false
346
+      }
347
+      if (this.cardInfo.Images === '') {
348
+        this.$message({
349
+          type: 'error',
350
+          message: '卡图片不能为空'
351
+        })
352
+        return false
353
+      }
354
+      if (this.cardInfo.CardName === '') {
355
+        this.$message({
356
+          type: 'error',
357
+          message: '卡名称不能为空'
358
+        })
359
+        return false
360
+      }
361
+      if (this.cardInfo.Price === '') {
362
+        this.$message({
363
+          type: 'error',
364
+          message: '卡价格不能为空'
365
+        })
366
+        return false
367
+      }
368
+      if (this.cardInfo.TotalCount === '') {
369
+        this.$message({
370
+          type: 'error',
371
+          message: '总张数不能为空'
372
+        })
373
+        return false
374
+      }
375
+      if (this.cardInfo.SendType === '') {
376
+        this.$message({
377
+          type: 'error',
378
+          message: '发送类型不能为空'
379
+        })
380
+        return false
381
+      }
382
+      if (this.cardInfo.SendType === 'channel' && this.cardInfo.ChannelId === '') {
383
+        this.$message({
384
+          type: 'error',
385
+          message: '渠道不能为空'
386
+        })
387
+        return false
388
+      }
389
+      if (this.cardInfo.Targets[0].TargetId === '') {
390
+        this.$message({
391
+          type: 'error',
392
+          message: '目标课程不能为空'
393
+        })
394
+        return false
395
+      }
396
+      if (this.cardInfo.StartDate === '') {
397
+        this.$message({
398
+          type: 'error',
399
+          message: '开始时间不能为空'
400
+        })
401
+        return false
402
+      }
403
+      if (this.cardInfo.EndDate === '') {
404
+        this.$message({
405
+          type: 'error',
406
+          message: '截止时间不能为空'
407
+        })
408
+        return false
409
+      }
410
+      if (this.cardInfo.SendType === 'channel' && this.cardInfo.VideoUrl === '') {
411
+        this.$message({
412
+          type: 'error',
413
+          message: '视频不能为空'
414
+        })
415
+        return false
416
+      }
417
+      if (this.cardInfo.Share.CardShareInfo === '') {
418
+        this.$message({
419
+          type: 'error',
420
+          message: '分享描述不能为空'
421
+        })
422
+        return false
423
+      }
424
+      if (this.cardInfo.Share.CardUseRule === '') {
425
+        this.$message({
426
+          type: 'error',
427
+          message: '使用规则不能为空'
428
+        })
429
+        return false
430
+      }
431
+      if (this.cardInfo.Share.CardUseInstruction === '') {
432
+        this.$message({
433
+          type: 'error',
434
+          message: '使用说明不能为空'
435
+        })
436
+        return false
437
+      }
438
+      return true
439
+    },
358 440
     submit () { // 保存
359 441
       if (this.$route.query.id) {
360 442
         if (this.date !== '') {
361 443
           this.cardInfo.StartDate = this.date[0]
362 444
           this.cardInfo.EndDate = this.date[1]
363 445
         }
446
+        this.courseList = this.courseList || []
364 447
         for (var x = 0; x < this.courseList.length; x++) {
365 448
           if (this.courseList[x].CourseId === this.cardInfo.Targets[0].TargetId) {
366 449
             this.cardInfo.Targets[0].TargetType = this.courseList[x].CourseType
@@ -368,14 +451,15 @@ export default {
368 451
           }
369 452
         }
370 453
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
371
-        console.log(JSON.stringify(this.cardInfo))
454
+        if (!this.checkInfo()) {
455
+          return false
456
+        }
372 457
         this.editCard(this.cardInfo).then((res) => {
373
-          this.$alert('操作成功', '提示', {
374
-            confirmButtonText: '确定',
375
-            callback: action => {
376
-              this.$router.push({ name: 'cardList' })
377
-            }
458
+          this.$message({
459
+            type: 'success',
460
+            message: '操作成功'
378 461
           })
462
+          this.$router.push({ name: 'cardList' })
379 463
         })
380 464
       } else {
381 465
         this.cardInfo.OrgId = this.OrgId
@@ -383,6 +467,7 @@ export default {
383 467
           this.cardInfo.StartDate = this.date[0]
384 468
           this.cardInfo.EndDate = this.date[1]
385 469
         }
470
+        this.courseList = this.courseList || []
386 471
         for (var n = 0; n < this.courseList.length; n++) {
387 472
           if (this.courseList[n].CourseId === this.cardInfo.Targets[0].TargetId) {
388 473
             this.cardInfo.Targets[0].TargetType = this.courseList[n].CourseType
@@ -390,19 +475,20 @@ export default {
390 475
           }
391 476
         }
392 477
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
393
-        console.log(JSON.stringify(this.cardInfo))
478
+        if (!this.checkInfo()) {
479
+          return false
480
+        }
394 481
         this.addCard(this.cardInfo).then((res) => {
395
-          this.$alert('操作成功', '提示', {
396
-            confirmButtonText: '确定',
397
-            callback: action => {
398
-              this.$router.push({ name: 'cardList' })
399
-            }
482
+          this.$message({
483
+            type: 'success',
484
+            message: '操作成功'
400 485
           })
486
+          this.$router.push({ name: 'cardList' })
401 487
         })
402 488
       }
403 489
     },
404 490
     cancel () { // 取消
405
-      this.$router.push({ name: 'couponList' })
491
+      this.$router.push({ name: 'cardList' })
406 492
     },
407 493
     handleAvatarSuccess (res, file) {
408 494
       if ((this.cardInfo.Images || []).length > 0) {

+ 2
- 2
src/pages/system/cardAndCouponManager/cardManager/index.vue 查看文件

@@ -62,14 +62,14 @@
62 62
           prop="TotalCount"
63 63
           label="总数量">
64 64
         </el-table-column>
65
-        <el-table-column
65
+        <!-- <el-table-column
66 66
           prop="SentCount"
67 67
           label="已发">
68 68
         </el-table-column>
69 69
         <el-table-column
70 70
           prop="UsedCount"
71 71
           label="实际使用">
72
-        </el-table-column>
72
+        </el-table-column> -->
73 73
         <el-table-column
74 74
           prop="Status"
75 75
           label="状态">

+ 138
- 28
src/pages/system/cardAndCouponManager/couponManager/edit.vue 查看文件

@@ -4,7 +4,7 @@
4 4
       <!-- <h1 style="font-size:22px;">{{isEdit === 0 ? '新建' : '编辑'}}{{couponInfo.CouponType === 'goods' ? '饮品优惠券' : '课程优惠券'}}</h1> -->
5 5
       <ul>
6 6
         <li class="flex-h">
7
-          <span>选择案场:</span>
7
+          <span>选择案场:<em>*</em></span>
8 8
           <div class="flex-item">
9 9
             <div style="width:50%">
10 10
               <el-select v-model="couponInfo.CaseId" placeholder="请选择" @change="caseChange">
@@ -19,7 +19,7 @@
19 19
           </div>
20 20
         </li>
21 21
         <li class="flex-h">
22
-          <span>券图片:</span>
22
+          <span>券图片:<em>*</em></span>
23 23
           <div class="flex-item">
24 24
             <div>
25 25
               <el-upload
@@ -35,7 +35,7 @@
35 35
           </div>
36 36
         </li>
37 37
         <li class="flex-h">
38
-          <span>券名称:</span>
38
+          <span>券名称:<em>*</em></span>
39 39
           <div class="flex-item">
40 40
             <div style="width:200px;">
41 41
               <el-input
@@ -47,7 +47,7 @@
47 47
           </div>
48 48
         </li>
49 49
         <li class="flex-h">
50
-          <span>券类型:</span>
50
+          <span>券类型:<em>*</em></span>
51 51
           <div class="flex-item">
52 52
             <div style="width:50%">
53 53
               <el-select v-model="couponInfo.CouponType" placeholder="请选择" @change="couponTypeChange">
@@ -62,7 +62,7 @@
62 62
           </div>
63 63
         </li>
64 64
         <li class="flex-h">
65
-          <span>券价格:</span>
65
+          <span>券价格:<em>*</em></span>
66 66
           <div class="flex-item">
67 67
             <div style="width:200px;">
68 68
               <el-input
@@ -74,7 +74,7 @@
74 74
           </div>
75 75
         </li>
76 76
         <li class="flex-h">
77
-          <span>总张数:</span>
77
+          <span>总张数:<em>*</em></span>
78 78
           <div class="flex-item">
79 79
             <div style="width:200px;">
80 80
               <el-input
@@ -86,7 +86,7 @@
86 86
           </div>
87 87
         </li>
88 88
         <li class="flex-h">
89
-          <span>发送类型:</span>
89
+          <span>发送类型:<em>*</em></span>
90 90
           <div class="flex-item">
91 91
             <div>
92 92
               <el-radio v-model="couponInfo.SendType" label="channel">渠道</el-radio>
@@ -96,7 +96,7 @@
96 96
           </div>
97 97
         </li>
98 98
         <li class="flex-h" v-if="couponInfo.SendType === 'channel'">
99
-          <span>选择渠道:</span>
99
+          <span>选择渠道:<em>*</em></span>
100 100
           <div class="flex-item">
101 101
             <div style="width:50%">
102 102
               <el-select v-model="couponInfo.ChannelId" placeholder="请选择">
@@ -111,7 +111,7 @@
111 111
           </div>
112 112
         </li>
113 113
         <li class="flex-h">
114
-          <span>目标商品:</span>
114
+          <span>目标商品:<em>*</em></span>
115 115
           <div class="flex-item">
116 116
             <div>
117 117
               <el-radio v-model="couponInfo.IsAll" label="1">全部商品</el-radio>
@@ -153,7 +153,7 @@
153 153
           </div>
154 154
         </li>
155 155
         <li class="flex-h" v-if="couponInfo.CouponType === 'goods'">
156
-          <span>券有效时间:</span>
156
+          <span>券有效时间:<em>*</em></span>
157 157
           <div class="flex-item">
158 158
             <div>
159 159
               <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
@@ -185,7 +185,7 @@
185 185
           </div>
186 186
         </li>
187 187
         <li class="flex-h" v-if="couponInfo.CouponType === 'course'">
188
-          <span>券有效时间:</span>
188
+          <span>券有效时间:<em>*</em></span>
189 189
           <div class="flex-item">
190 190
             <div>
191 191
               <el-date-picker
@@ -203,7 +203,7 @@
203 203
           </div>
204 204
         </li>
205 205
         <li class="flex-h" v-if="couponInfo.SendType !== 'case' && couponInfo.SendType !== 'system'">
206
-          <span>视频:</span>
206
+          <span>视频:<em>*</em></span>
207 207
           <div class="flex-item">
208 208
             <div style="vertical-align: middle;">
209 209
               <a style="line-height: 40px;" v-if="videoOff" :href="couponInfo.VideoUrl" target="blank">{{couponInfo.VideoUrl}}</a>
@@ -220,7 +220,7 @@
220 220
           </div>
221 221
         </li>
222 222
         <li class="flex-h">
223
-          <span>分享描述:</span>
223
+          <span>分享描述:<em>*</em></span>
224 224
           <div class="flex-item">
225 225
             <div>
226 226
               <el-input
@@ -233,7 +233,7 @@
233 233
           </div>
234 234
         </li>
235 235
         <li class="flex-h">
236
-          <span>规则描述:</span>
236
+          <span>规则描述:<em>*</em></span>
237 237
           <div class="flex-item">
238 238
             <div>
239 239
               <el-input
@@ -246,7 +246,7 @@
246 246
           </div>
247 247
         </li>
248 248
         <li class="flex-h">
249
-          <span>使用说明:</span>
249
+          <span>使用说明:<em>*</em></span>
250 250
           <div class="flex-item">
251 251
             <div>
252 252
               <el-input
@@ -287,6 +287,9 @@
287 287
             <el-table-column
288 288
               prop="TypeId"
289 289
               label="类别">
290
+              <template slot-scope="scope">
291
+                <span>{{returnGoodsType(scope.row.TypeId)}}</span>
292
+              </template>
290 293
             </el-table-column>
291 294
             <el-table-column
292 295
               prop="Price"
@@ -304,7 +307,7 @@
304 307
         <div v-if="couponInfo.CouponType === 'course'">
305 308
           <el-table
306 309
             ref="multipleTable"
307
-            :data="courseList.list"
310
+            :data="courseList"
308 311
             tooltip-effect="dark"
309 312
             style="width: 100%"
310 313
             @selection-change="handleCourseChange">
@@ -313,18 +316,24 @@
313 316
             </el-table-column>
314 317
             <el-table-column
315 318
               prop="CourseName"
316
-              label="商品名称">
319
+              label="课程名称">
317 320
             </el-table-column>
318 321
             <el-table-column
319 322
               prop="BeginDate"
320 323
               label="开始时间">
324
+              <template slot-scope="scope">
325
+                <span>{{toolClass.dateFormat(scope.row.BeginDate, 'yyyy-MM-dd')}}</span>
326
+              </template>
321 327
             </el-table-column>
322 328
             <el-table-column
323 329
               prop="EndDate"
324 330
               label="结束时间">
331
+              <template slot-scope="scope">
332
+                <span>{{toolClass.dateFormat(scope.row.EndDate, 'yyyy-MM-dd')}}</span>
333
+              </template>
325 334
             </el-table-column>
326 335
             <el-table-column
327
-              prop="CourseType"
336
+              prop="LocationId"
328 337
               label="类别">
329 338
             </el-table-column>
330 339
             <el-table-column
@@ -444,7 +453,7 @@ export default {
444 453
       goodsTypes: x => x.goodsTypes.list,
445 454
     }),
446 455
     ...mapCourseState({
447
-      courseList: x => x.courseList,
456
+      courseList: x => x.courseLister,
448 457
     }),
449 458
     CaseId: {
450 459
       get () {
@@ -453,7 +462,7 @@ export default {
453 462
       set (val) {
454 463
         this.couponInfo.caseid = val
455 464
       }
456
-    }
465
+    },
457 466
   },
458 467
   methods: {
459 468
     ...mapGoodsActions([
@@ -469,7 +478,7 @@ export default {
469 478
       'GetChannelListList',
470 479
     ]),
471 480
     ...mapCourseActions([
472
-      'GetCourseList',
481
+      'getCourseLister',
473 482
     ]),
474 483
     returnGoodsType (val) {
475 484
       for (var n = 0; n < this.goodsTypes.length; n++) {
@@ -492,6 +501,7 @@ export default {
492 501
     },
493 502
     sureAddItem () { // 确定添加指定商品
494 503
       var bool = true
504
+      this.couponInfo.Targets = this.couponInfo.Targets || []
495 505
       if (this.couponInfo.CouponType === 'goods') {
496 506
         for (var n = 0; n < this.currentSelectArr.length; n++) {
497 507
           if (this.couponInfo.Targets.length) {
@@ -568,21 +578,119 @@ export default {
568 578
           this.centerDialogVisible = true
569 579
         })
570 580
       } else if (this.couponInfo.CouponType === 'course') {
571
-        this.GetCourseList({
581
+        this.getCourseLister({
572 582
           ...this.postData,
573 583
           caseid: this.couponInfo.CaseId
574 584
         }).then((res) => {
575 585
           this.total = res.pagenum
576 586
           this.centerDialogVisible = true
587
+          console.log(JSON.stringify(this.courseList))
577 588
         })
578 589
       }
579 590
     },
591
+    checkInfo () { // 校验表单信息
592
+      if (this.couponInfo.CaseId === '') {
593
+        this.$message({
594
+          type: 'error',
595
+          message: '案场不能为空'
596
+        })
597
+        return false
598
+      }
599
+      if (this.couponInfo.Images[0].CouponImageUrl === '') {
600
+        this.$message({
601
+          type: 'error',
602
+          message: '券图片不能为空'
603
+        })
604
+        return false
605
+      }
606
+      if (this.couponInfo.CouponName === '') {
607
+        this.$message({
608
+          type: 'error',
609
+          message: '券名称不能为空'
610
+        })
611
+        return false
612
+      }
613
+      if (this.couponInfo.CouponType === '') {
614
+        this.$message({
615
+          type: 'error',
616
+          message: '券类型不能为空'
617
+        })
618
+        return false
619
+      }
620
+      if (this.couponInfo.Price === '') {
621
+        this.$message({
622
+          type: 'error',
623
+          message: '券价格不能为空'
624
+        })
625
+        return false
626
+      }
627
+      if (this.couponInfo.TotalCount === '') {
628
+        this.$message({
629
+          type: 'error',
630
+          message: '总张数不能为空'
631
+        })
632
+        return false
633
+      }
634
+      if (this.couponInfo.SendType === '') {
635
+        this.$message({
636
+          type: 'error',
637
+          message: '发送类型不能为空'
638
+        })
639
+        return false
640
+      }
641
+      if (this.couponInfo.SendType === 'channel' && this.couponInfo.ChannelId === '') {
642
+        this.$message({
643
+          type: 'error',
644
+          message: '渠道不能为空'
645
+        })
646
+        return false
647
+      }
648
+      if (this.couponInfo.IsAll === 0 && this.couponInfo.Targets[0].TargetId === '') {
649
+        this.$message({
650
+          type: 'error',
651
+          message: '目标商品不能为空'
652
+        })
653
+        return false
654
+      }
655
+      if (this.couponInfo.SendType === 'channel' && this.couponInfo.VideoUrl === '') {
656
+        this.$message({
657
+          type: 'error',
658
+          message: '视频不能为空'
659
+        })
660
+        return false
661
+      }
662
+      if (this.couponInfo.Share.CouponShareInfo === '') {
663
+        this.$message({
664
+          type: 'error',
665
+          message: '分享描述不能为空'
666
+        })
667
+        return false
668
+      }
669
+      if (this.couponInfo.Share.UseRule === '') {
670
+        this.$message({
671
+          type: 'error',
672
+          message: '使用规则不能为空'
673
+        })
674
+        return false
675
+      }
676
+      if (this.couponInfo.Share.UseInstruction === '') {
677
+        this.$message({
678
+          type: 'error',
679
+          message: '使用说明不能为空'
680
+        })
681
+        return false
682
+      }
683
+      return true
684
+    },
580 685
     submit () { // 保存
581 686
       if (this.$route.query.id) {
582 687
         if (this.couponInfo.ValidDays) {
583 688
           this.couponInfo.StartDate = undefined
584 689
           this.couponInfo.EndDate = undefined
585 690
         }
691
+        if (!this.checkInfo()) {
692
+          return false
693
+        }
586 694
         this.editCoupon({
587 695
           ...this.couponInfo,
588 696
           IsAll: this.couponInfo.IsAll - 0,
@@ -601,18 +709,20 @@ export default {
601 709
           this.couponInfo.StartDate = undefined
602 710
           this.couponInfo.EndDate = undefined
603 711
         }
712
+        if (!this.checkInfo()) {
713
+          return false
714
+        }
604 715
         this.addCoupon({
605 716
           ...this.couponInfo,
606 717
           IsAll: this.couponInfo.IsAll - 0,
607 718
           TotalCount: this.couponInfo.TotalCount - 0,
608 719
           ValidDays: this.couponInfo.ValidDays - 0 || 0
609 720
         }).then((res) => {
610
-          this.$alert('操作成功', '提示', {
611
-            confirmButtonText: '确定',
612
-            callback: action => {
613
-              this.$router.push({ name: 'couponList' })
614
-            }
721
+          this.$message({
722
+            type: 'success',
723
+            message: '操作成功'
615 724
           })
725
+          this.$router.push({ name: 'couponList' })
616 726
         })
617 727
       }
618 728
     },
@@ -639,7 +749,7 @@ export default {
639 749
           this.total = res.pagenum
640 750
         })
641 751
       } else if (this.couponInfo.CouponType === 'course') {
642
-        this.GetCourseList({
752
+        this.getCourseLister({
643 753
           ...this.postData,
644 754
           caseid: this.couponInfo.CaseId
645 755
         }).then((res) => {

+ 5
- 5
src/pages/system/cardAndCouponManager/couponManager/index.vue 查看文件

@@ -49,9 +49,9 @@
49 49
           label="有效期"
50 50
           width="150">
51 51
           <template slot-scope="scope">
52
-            <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.StartDate)}}</span>
52
+            <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.StartDate, 'yyyy-MM-dd')}}</span>
53 53
             <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">至</span>
54
-            <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.EndDate)}}</span>
54
+            <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.EndDate, 'yyyy-MM-dd')}}</span>
55 55
             <span v-else>-</span>
56 56
           </template>
57 57
         </el-table-column>
@@ -64,14 +64,14 @@
64 64
           prop="TotalCount"
65 65
           label="总数量">
66 66
         </el-table-column>
67
-        <el-table-column
67
+        <!-- <el-table-column
68 68
           prop="SentCount"
69 69
           label="已发">
70 70
         </el-table-column>
71 71
         <el-table-column
72 72
           prop="UsedCount"
73 73
           label="实际使用">
74
-        </el-table-column>
74
+        </el-table-column> -->
75 75
         <el-table-column
76 76
           prop="Status"
77 77
           label="状态">
@@ -224,7 +224,7 @@ export default {
224 224
         begindate: '',
225 225
         enddate: '',
226 226
         page: 1, // 当前页码
227
-        pagesize: 10, // 请求数据量
227
+        pagesize: 6, // 请求数据量
228 228
       },
229 229
       centerDialogVisible: false,
230 230
       total: 0,

+ 4
- 6
src/pages/system/cardAndCouponManager/givingRecords.vue 查看文件

@@ -98,9 +98,7 @@ export default {
98 98
         endDate: '',
99 99
         referrer: '', // 搜索框
100 100
       },
101
-      currentList: [{
102
-        xxx: 'xxx'
103
-      }]
101
+      currentList: []
104 102
     }
105 103
   },
106 104
   mounted () {
@@ -129,9 +127,9 @@ export default {
129 127
       this.getList()
130 128
     },
131 129
     getList () { // 获取列表
132
-      this.$ajax(this.$api.record.getRecordList.url, {
133
-        method: this.$api.record.getRecordList.method,
134
-        queryData: { ...this.postData }
130
+      this.$ajax(this.$api.channelManager.getChannelList.url, {
131
+        method: this.$api.channelManager.getChannelList.method,
132
+        queryData: { ...this.postData, caseid: this.CaseId }
135 133
       }).then(res => {
136 134
         this.currentList = res.list
137 135
         this.postData.page = res.page

+ 23
- 16
src/pages/system/cardAndCouponManager/vipManager/activateVip.vue 查看文件

@@ -149,7 +149,7 @@ export default {
149 149
         })
150 150
         return
151 151
       }
152
-      this.GetCustomerByTel({tel: this.customerPhone})
152
+      this.GetCustomerByTel({ tel: this.customerPhone })
153 153
     },
154 154
     searchSeller () {
155 155
       if (this.salesPhone === '') {
@@ -159,7 +159,7 @@ export default {
159 159
         })
160 160
         return
161 161
       }
162
-      this.GetUserByTel({tel: this.salesPhone})
162
+      this.GetUserByTel({ tel: this.salesPhone })
163 163
     },
164 164
     setNull () {
165 165
       this.salesPhone = ''
@@ -168,24 +168,31 @@ export default {
168 168
       this.SetCustomerInfoNull()
169 169
     },
170 170
     activateVip () {
171
-      this.GetVipByCode({ code: this.CardNo }).then((res) => {
172
-        if (res) {
173
-          if (res.Status !== 0) {
171
+      if (this.CardNo !== '') {
172
+        this.GetVipByCode({ code: this.CardNo }).then((res) => {
173
+          if (res) {
174
+            if (res.Status !== 0) {
175
+              this.$message({
176
+                type: 'error',
177
+                message: 'VIP卡已被激活!',
178
+              })
179
+              return
180
+            }
181
+            this.setNull()
182
+            this.centerDialogVisible = true
183
+          } else {
174 184
             this.$message({
175 185
               type: 'error',
176
-              message: 'VIP卡已被激活!',
186
+              message: '没有查询到VIP卡信息!',
177 187
             })
178
-            return
179 188
           }
180
-          this.setNull()
181
-          this.centerDialogVisible = true
182
-        } else {
183
-          this.$message({
184
-            type: 'error',
185
-            message: '没有查询到VIP卡信息!',
186
-          })
187
-        }
188
-      })
189
+        })
190
+      } else {
191
+        this.$message({
192
+          type: 'error',
193
+          message: '请输入VIP卡号!',
194
+        })
195
+      }
189 196
     },
190 197
     vipCharge () {
191 198
       if (this.vip.VipCardChildCode === '') {

+ 11
- 4
src/pages/system/caseManager/caseAreaManager/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>区域名:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -17,7 +17,7 @@
17 17
           </div>
18 18
         </li>
19 19
         <li class="flex-h">
20
-          <span>案场:</span>
20
+          <span>案场:<em>*</em></span>
21 21
           <div class="flex-item">
22 22
             <div style="width:50%">
23 23
               <el-select v-model="CaseId" placeholder="请选择">
@@ -32,7 +32,7 @@
32 32
           </div>
33 33
         </li>
34 34
         <li class="flex-h">
35
-          <span>图片:</span>
35
+          <span>图片:<em>*</em></span>
36 36
           <div class="flex-item">
37 37
             <div>
38 38
               <el-upload
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>黑白图片:</span>
51
+          <span>黑白图片:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div>
54 54
               <el-upload
@@ -120,6 +120,13 @@ export default {
120 120
         })
121 121
         return false
122 122
       }
123
+      if (this.postData.CaseId === '') {
124
+        this.$message({
125
+          type: 'error',
126
+          message: '案场不能为空'
127
+        })
128
+        return false
129
+      }
123 130
       if (this.postData.AreaIcon === '') {
124 131
         this.$message({
125 132
           type: 'error',

+ 32
- 4
src/pages/system/caseManager/deviceManager/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>选择案场:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-select v-model="Case" placeholder="请选择">
@@ -18,7 +18,7 @@
18 18
           </div>
19 19
         </li>
20 20
         <li class="flex-h">
21
-          <span>设备名称:</span>
21
+          <span>设备名称:<em>*</em></span>
22 22
           <div class="flex-item">
23 23
             <div style="width:50%">
24 24
               <el-input
@@ -30,7 +30,7 @@
30 30
           </div>
31 31
         </li>
32 32
         <li class="flex-h">
33
-          <span>设备Code:</span>
33
+          <span>设备Code:<em>*</em></span>
34 34
           <div class="flex-item">
35 35
             <div style="width:50%">
36 36
               <el-input
@@ -74,7 +74,7 @@ export default {
74 74
         return this.detail.CaseId || this.caseid
75 75
       },
76 76
       set (val) {
77
-        this.UpdateInfo({...this.detail, CaseId: val})
77
+        this.UpdateInfo({ ...this.detail, CaseId: val })
78 78
       }
79 79
     }
80 80
   },
@@ -88,6 +88,20 @@ export default {
88 88
     ]),
89 89
     submit () {
90 90
       if ((this.detail.EquipmentId || '') === '') {
91
+        if ((this.detail.Name || '') === '') {
92
+          this.$message({
93
+            message: '设备名称不能为空',
94
+            type: 'error'
95
+          })
96
+          return false
97
+        }
98
+        if ((this.detail.EquipmentCode || '') === '') {
99
+          this.$message({
100
+            message: '设备Code不能为空',
101
+            type: 'error'
102
+          })
103
+          return false
104
+        }
91 105
         this.detail.OrgId = this.orgid
92 106
         if (!this.detail.CaseId || this.detail.CaseId === '') {
93 107
           this.detail.CaseId = this.caseid
@@ -100,6 +114,20 @@ export default {
100 114
           this.$router.push({ name: 'deviceManager' })
101 115
         })
102 116
       } else {
117
+        if ((this.detail.Name || '') === '') {
118
+          this.$message({
119
+            message: '设备名称不能为空',
120
+            type: 'error'
121
+          })
122
+          return false
123
+        }
124
+        if ((this.detail.EquipmentCode || '') === '') {
125
+          this.$message({
126
+            message: '设备Code不能为空',
127
+            type: 'error'
128
+          })
129
+          return false
130
+        }
103 131
         this.UpdateDevice(this.detail).then(() => {
104 132
           this.$message({
105 133
             type: 'success',

+ 1
- 1
src/pages/system/caseManager/keyManager/add.vue 查看文件

@@ -101,6 +101,7 @@ export default {
101 101
       this.postData.AreaIcon = res.result.url
102 102
     },
103 103
     submit () { // 提交数据
104
+      console.log('柜子编号:' + this.postData.beginnum + ' ' + this.postData.endnum)
104 105
       if (this.postData.beginnum === '') {
105 106
         this.$message({
106 107
           type: 'error',
@@ -115,7 +116,6 @@ export default {
115 116
         })
116 117
         return false
117 118
       }
118
-      console.log('柜子编号:' + this.postData.beginnum + ' ' + this.postData.endnum)
119 119
       this.postData.orgid = this.OrgId
120 120
       this.$ajax(this.$api.caseManager.addKey.url, {
121 121
         method: this.$api.caseManager.addKey.method,

+ 30
- 5
src/pages/system/caseManager/keyManager/index.vue 查看文件

@@ -78,11 +78,11 @@
78 78
     </el-pagination>
79 79
     <el-dialog title="钥匙绑定" :visible.sync="dialogTableVisible">
80 80
       <ul class="cutBindType">
81
-        <li :class="{'active':cutBindType==0}" @click="showCardList = false; bindPhone = ''; cutBindType = 0">扫码绑定</li>
81
+        <!-- <li :class="{'active':cutBindType==0}" @click="showCardList = false; bindPhone = ''; cutBindType = 0">扫码绑定</li> -->
82 82
         <li :class="{'active':cutBindType==1}" @click="showCardList = false; bindPhone = ''; cutBindType = 1">手机号绑定</li>
83 83
       </ul>
84 84
       <ul class="cutBody">
85
-        <li :hidden="cutBindType==1">
85
+        <!-- <li :hidden="cutBindType==1">
86 86
           <div class="flex-h" v-if="!showCardList">
87 87
             <div class="flex-item">
88 88
               <el-input
@@ -93,7 +93,7 @@
93 93
             </div>
94 94
             <el-button type="success" size="mini">确定</el-button>
95 95
           </div>
96
-        </li>
96
+        </li> -->
97 97
         <li :hidden="cutBindType==0">
98 98
           <div class="flex-h" v-if="!showCardList">
99 99
             <div class="flex-item">
@@ -117,12 +117,14 @@
117 117
 </template>
118 118
 
119 119
 <script>
120
-import { mapState } from 'vuex'
120
+import { createNamespacedHelpers, mapState } from 'vuex'
121
+const { mapActions: mapDeviceActions } = createNamespacedHelpers('device')
121 122
 
122 123
 export default {
123 124
   name: '',
124 125
   data () {
125 126
     return {
127
+      currentItem: {},
126 128
       gridData: [],
127 129
       showCardList: false, // 显隐卡列表
128 130
       bindPhone: '', // 绑定手机号
@@ -158,11 +160,32 @@ export default {
158 160
     }
159 161
   },
160 162
   methods: {
163
+    ...mapDeviceActions([
164
+      'bindKeyByPhone',
165
+    ]),
161 166
     addKey () {
162 167
       this.$router.push({ name: 'addKey' })
163 168
     },
164 169
     sureBindPhone () { // 确认绑定手机号
165
-      this.showCardList = true
170
+      if (this.bindPhone !== '') {
171
+        this.bindKeyByPhone({
172
+          phone: this.bindPhone,
173
+          keyid: this.currentItem.KeyId
174
+        }).then((res) => {
175
+          this.$message({
176
+            message: '操作成功',
177
+            type: 'success'
178
+          })
179
+          this.dialogTableVisible = false
180
+          this.bindPhone = ''
181
+          this.getList()
182
+        })
183
+      } else {
184
+        this.$message({
185
+          type: 'error',
186
+          message: '请输入手机号'
187
+        })
188
+      }
166 189
     },
167 190
     search () { // 搜索
168 191
       this.postData.page = 1
@@ -186,6 +209,7 @@ export default {
186 209
       this.getList()
187 210
     },
188 211
     bindItem (index, row) { // 绑定
212
+      this.currentItem = row
189 213
       this.dialogTableVisible = true
190 214
     },
191 215
     unBindItem (index, row) { // 解绑
@@ -202,6 +226,7 @@ export default {
202 226
             type: 'success',
203 227
             message: '解绑成功!'
204 228
           })
229
+          this.bindPhone = ''
205 230
           this.getList()
206 231
         })
207 232
       }).catch(() => {

+ 29
- 41
src/pages/system/cmsManager/bannerManager/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>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9 9
                 <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
@@ -12,7 +12,7 @@
12 12
           </div>
13 13
         </li>
14 14
         <li class="flex-h" v-if="postData.ForwardType==='url'">
15
-          <span>链接:</span>
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -24,7 +24,7 @@
24 24
           </div>
25 25
         </li>
26 26
         <li class="flex-h" v-else>
27
-          <span>课程:</span>
27
+          <span>课程:<em>*</em></span>
28 28
           <div class="flex-item">
29 29
             <div style="width:50%">
30 30
               <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%" class="radio">
45 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div style="width:50%">
54 54
               <el-select v-model="postData.LocationId" placeholder="请选择">
@@ -75,22 +75,8 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
79 79
           <div class="flex-item">
80
-            <!-- <el-upload
81
-              action='string'
82
-              :http-request="toolClass.upload"
83
-              :limit='limit'
84
-              list-type="picture-card"
85
-              :file-list='imgsArr'
86
-              :on-success="handlePictureCardPreview"
87
-              :on-remove="handleRemove"
88
-              :on-exceed="exceed">
89
-              <i class="el-icon-plus"></i>
90
-            </el-upload>
91
-            <el-dialog :visible.sync="dialogVisible">
92
-              <img width="100%" :src="imgs" alt="">
93
-            </el-dialog> -->
94 80
             <el-upload
95 81
               class="avatar-uploader"
96 82
               action='string'
@@ -100,26 +86,8 @@
100 86
               <img v-if="postData.ImageUrl" :src="postData.ImageUrl" class="avatar">
101 87
               <i v-else class="el-icon-plus avatar-uploader-icon"></i>
102 88
             </el-upload>
103
-            <!-- <div>
104
-              <image-uploader :upload="uploader" v-model="postData.ImageUrl" />
105
-            </div> -->
106 89
           </div>
107 90
         </li>
108
-        <!-- <li class="flex-h">
109
-          <span>对应案场:</span>
110
-          <div class="flex-item">
111
-            <div style="width:50%">
112
-              <el-select v-model="postData.CaseId" placeholder="请选择">
113
-                <el-option
114
-                  v-for="item in caseList"
115
-                  :key="item.CaseId"
116
-                  :label="item.CaseName"
117
-                  :value="item.CaseId">
118
-                </el-option>
119
-              </el-select>
120
-            </div>
121
-          </div>
122
-        </li> -->
123 91
         <li style="text-align:center">
124 92
           <el-button type="primary" size="mini" @click="submit">保存</el-button>
125 93
           <el-button type="danger" size="mini" @click="cancel">取消</el-button>
@@ -187,7 +155,7 @@ export default {
187 155
     ...mapCmsActions(['updateLocationAllInfo']),
188 156
     ...mapActions(['updateSystemInfo']),
189 157
     submit () {
190
-      if (this.postData.ForwardType === '1') {
158
+      if (this.postData.ForwardType === 'url') {
191 159
         this.postData.ForwardResourceId = ''
192 160
         if (this.postData.ForwardUrl === '') {
193 161
           this.$message({
@@ -196,8 +164,7 @@ export default {
196 164
           })
197 165
           return false
198 166
         } else {
199
-          // var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
200
-          var reg = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/  // eslint-disable-line
167
+          var reg = /[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$/  // eslint-disable-line
201 168
           if (!reg.test(this.postData.ForwardUrl)) {
202 169
             this.$message({
203 170
               message: '链接地址格式不正确',
@@ -208,6 +175,27 @@ export default {
208 175
         }
209 176
       } else {
210 177
         this.postData.ForwardUrl = ''
178
+        if (this.postData.ForwardResourceId === '') {
179
+          this.$message({
180
+            message: '课程不能为空',
181
+            type: 'error',
182
+          })
183
+          return false
184
+        }
185
+      }
186
+      if (this.postData.LocationId === '') {
187
+        this.$message({
188
+          message: '图片位置不能为空',
189
+          type: 'error',
190
+        })
191
+        return false
192
+      }
193
+      if (this.postData.ImageUrl === '') {
194
+        this.$message({
195
+          message: '图片不能为空',
196
+          type: 'error',
197
+        })
198
+        return false
211 199
       }
212 200
       this.postData.OrgId = this.OrgId
213 201
       // this.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'

+ 35
- 79
src/pages/system/cmsManager/bannerManager/edit.vue 查看文件

@@ -3,16 +3,16 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9
-                <el-radio v-model="postData.ForwardType" label='1' >链接</el-radio>
10
-                <el-radio v-model="postData.ForwardType" label='0' >课程</el-radio>
9
+                <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
10
+                <el-radio v-model="postData.ForwardType" label='course' >课程</el-radio>
11 11
             </div>
12 12
           </div>
13 13
         </li>
14
-        <li class="flex-h" v-if="postData.ForwardType==='1'">
15
-          <span>链接:</span>
14
+        <li class="flex-h" v-if="postData.ForwardType==='url'">
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -24,7 +24,7 @@
24 24
           </div>
25 25
         </li>
26 26
         <li class="flex-h" v-else>
27
-          <span>课程:</span>
27
+          <span>课程:<em>*</em></span>
28 28
           <div class="flex-item">
29 29
             <div style="width:50%">
30 30
               <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%" class="radio">
45 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div style="width:50%">
54 54
               <el-select v-model="postData.LocationId" placeholder="请选择">
@@ -75,22 +75,8 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
79 79
           <div class="flex-item">
80
-            <!-- <el-upload
81
-              action='string'
82
-              :http-request="toolClass.upload"
83
-              :limit='limit'
84
-              list-type="picture-card"
85
-              :file-list='imgsArr'
86
-              :on-success="handlePictureCardPreview"
87
-              :on-remove="handleRemove"
88
-              :on-exceed="exceed">
89
-              <i class="el-icon-plus"></i>
90
-            </el-upload>
91
-            <el-dialog :visible.sync="dialogVisible">
92
-              <img width="100%" :src="imgs" alt="">
93
-            </el-dialog> -->
94 80
             <el-upload
95 81
               class="avatar-uploader"
96 82
               action='string'
@@ -102,21 +88,6 @@
102 88
             </el-upload>
103 89
           </div>
104 90
         </li>
105
-        <!-- <li class="flex-h">
106
-          <span>对应案场:</span>
107
-          <div class="flex-item">
108
-            <div style="width:50%">
109
-              <el-select v-model="postData.CaseId" placeholder="请选择">
110
-                <el-option
111
-                  v-for="item in caseList"
112
-                  :key="item.CaseId"
113
-                  :label="item.CaseName"
114
-                  :value="item.CaseId">
115
-                </el-option>
116
-              </el-select>
117
-            </div>
118
-          </div>
119
-        </li> -->
120 91
         <li style="text-align:center">
121 92
           <el-button type="primary" size="mini" @click="submit">保存</el-button>
122 93
           <el-button type="danger" size="mini" @click="cancel">取消</el-button>
@@ -155,11 +126,11 @@ export default {
155 126
   components: {},
156 127
   created () {
157 128
     this.GetCourseList({page: 1, pagesize: 100, callback: this.getDetail})
158
-    this.updateLocationInfo()
129
+    this.updateLocationAllInfo()
159 130
   },
160 131
   computed: {
161 132
     ...mapState({
162
-      positionList: x => x.cms.location,
133
+      positionList: x => x.cms.locationAll,
163 134
       OrgId: x => x.app.user.OrgId,
164 135
       caseList: x => x.app.cases.list
165 136
     }),
@@ -171,9 +142,9 @@ export default {
171 142
     ...mapCourseActions([
172 143
       'GetCourseList',
173 144
     ]),
174
-    ...mapCmsActions(['updateLocationInfo']),
145
+    ...mapCmsActions(['updateLocationAllInfo']),
175 146
     submit () {
176
-      if (this.postData.ForwardType === '1') {
147
+      if (this.postData.ForwardType === 'url') {
177 148
         this.postData.ForwardResourceId = ''
178 149
         if (this.postData.ForwardUrl === '') {
179 150
           this.$message({
@@ -182,7 +153,7 @@ export default {
182 153
           })
183 154
           return false
184 155
         } else {
185
-          var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
156
+          var reg = /[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$/  // eslint-disable-line
186 157
           if (!reg.test(this.postData.ForwardUrl)) {
187 158
             this.$message({
188 159
               message: '链接地址格式不正确',
@@ -193,17 +164,30 @@ export default {
193 164
         }
194 165
       } else {
195 166
         this.postData.ForwardUrl = ''
167
+        if (this.postData.ForwardResourceId === '') {
168
+          this.$message({
169
+            message: '课程不能为空',
170
+            type: 'error',
171
+          })
172
+          return false
173
+        }
174
+      }
175
+      if (this.postData.LocationId === '') {
176
+        this.$message({
177
+          message: '图片位置不能为空',
178
+          type: 'error',
179
+        })
180
+        return false
181
+      }
182
+      if (this.postData.ImageUrl === '') {
183
+        this.$message({
184
+          message: '图片不能为空',
185
+          type: 'error',
186
+        })
187
+        return false
196 188
       }
197 189
       this.postData.OrgId = this.OrgId
198 190
       this.postData.CaseId = this.CaseId
199
-      this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
200
-      // this.postData.ImageUrl = ''
201
-      // for (let i = 0; i < this.imgsArr.length; i++) {
202
-      //   this.postData.ImageUrl += this.imgsArr[i].response.result.url + ','
203
-      // }
204
-      // if (this.postData.ImageUrl) {
205
-      //   this.postData.ImageUrl = this.postData.ImageUrl.substr(0, this.postData.ImageUrl.length - 1)
206
-      // }
207 191
       this.$ajax(this.$api.cms.editImage.url, {
208 192
         method: this.$api.cms.editImage.method,
209 193
         data: this.postData,
@@ -233,40 +217,12 @@ export default {
233 217
           id: this.$route.query.id
234 218
         }
235 219
       }).then(res => {
236
-        console.log(res)
237 220
         res.Status = res.Status + ''
238
-        res.ForwardType === 'url' ? res.ForwardType = '1' : res.ForwardType = '0'
239
-        // let imgsArr = []
240
-        // let item = {
241
-        //   url: res.ImageUrl,
242
-        //   response: {
243
-        //     result: {
244
-        //       url: res.ImageUrl
245
-        //     }
246
-        //   }
247
-        // }
248
-        // imgsArr.push(item)
249
-        // this.imgsArr = imgsArr
250 221
         this.postData = res
251 222
       }).catch(msg => {
252 223
 
253 224
       })
254 225
     },
255
-    // handlePictureCardPreview (res, file, fileList) {
256
-    //   this.imgs = res.result.url
257
-    //   this.dialogVisible = false
258
-    //   this.imgsArr = fileList
259
-    // },
260
-    // handleRemove (file, fileList) {
261
-    //   this.imgsArr = fileList
262
-    // },
263
-    // exceed () {
264
-    //   this.$message({
265
-    //     message: '超过可传的图片上限',
266
-    //     type: 'info',
267
-    //     duration: 1000
268
-    //   })
269
-    // }
270 226
     handleAvatarSuccess (res, file) {
271 227
       this.postData.ImageUrl = res.result.url
272 228
     }

+ 3
- 8
src/pages/system/cmsManager/bannerManager/index.vue 查看文件

@@ -73,7 +73,7 @@ export default {
73 73
   },
74 74
   computed: {
75 75
     ...mapState({
76
-      positionList: x => x.cms.location
76
+      positionList: x => x.cms.locationAll,
77 77
     })
78 78
   },
79 79
   components: {
@@ -83,10 +83,10 @@ export default {
83 83
     this.updateSystemInfo().then(() => {
84 84
       this.getList()
85 85
     })
86
-    this.updateLocationInfo()
86
+    this.updateLocationAllInfo()
87 87
   },
88 88
   methods: {
89
-    ...mapCmsActions(['updateLocationInfo']),
89
+    ...mapCmsActions(['updateLocationAllInfo']),
90 90
     ...mapActions(['updateSystemInfo']),
91 91
     handleCurrentChange (val) {
92 92
       this.postData.currentPage = val
@@ -109,9 +109,6 @@ export default {
109 109
         })
110 110
       })
111 111
     },
112
-    // searchList (key) { // 搜索列表
113
-    //   console.log(key)
114
-    // },
115 112
     addBanner () {
116 113
       this.$router.push({ name: 'addBanner' })
117 114
     },
@@ -124,7 +121,6 @@ export default {
124 121
           pagesize: this.postData.pageSize
125 122
         }
126 123
       }).then(res => {
127
-        console.log(res)
128 124
         let length = res.list.length
129 125
         for (let i = 0; i < length; i++) {
130 126
           if (res.list[i].Status === 1) {
@@ -152,7 +148,6 @@ export default {
152 148
           id: id
153 149
         }
154 150
       }).then(res => {
155
-        console.log(res)
156 151
         this.$message({
157 152
           type: 'success',
158 153
           message: '删除成功!'

+ 17
- 18
src/pages/system/cmsManager/indexMsg/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>标题:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -15,7 +15,7 @@
15 15
           </div>
16 16
         </li>
17 17
         <li class="flex-h">
18
-          <span>跳转链接:</span>
18
+          <span>跳转链接:<em>*</em></span>
19 19
           <div class="flex-item">
20 20
             <div style="width:50%">
21 21
               <el-input
@@ -27,7 +27,7 @@
27 27
           </div>
28 28
         </li>
29 29
         <li class="flex-h">
30
-          <span>对应案场:</span>
30
+          <span>对应案场:<em>*</em></span>
31 31
           <div class="flex-item">
32 32
             <div style="width:50%">
33 33
               <el-select v-model="postData.CaseId" placeholder="请选择">
@@ -41,21 +41,6 @@
41 41
             </div>
42 42
           </div>
43 43
         </li>
44
-        <!-- <li class="flex-h">
45
-          <span>位置:</span>
46
-          <div class="flex-item">
47
-            <div style="width:50%">
48
-              <el-select v-model="postData.LocationId" placeholder="请选择">
49
-                <el-option
50
-                  v-for="item in positionList"
51
-                  :key="item.LocationId"
52
-                  :label="item.LocationName"
53
-                  :value="item.LocationId">
54
-                </el-option>
55
-              </el-select>
56
-            </div>
57
-          </div>
58
-        </li> -->
59 44
         <li style="text-align:center">
60 45
           <el-button type="primary" size="mini" @click="submit">保存</el-button>
61 46
           <el-button type="danger" size="mini" @click="cancel">取消</el-button>
@@ -102,6 +87,20 @@ export default {
102 87
     ...mapActions(['updateSystemInfo']),
103 88
     submit () {
104 89
       if (this.ajaxOff) {
90
+        if (this.postData.InfoName === '') {
91
+          this.$message({
92
+            message: '标题不能为空',
93
+            type: 'error',
94
+          })
95
+          return false
96
+        }
97
+        if (this.postData.InfoUrl === '') {
98
+          this.$message({
99
+            message: '链接地址不能为空',
100
+            type: 'error',
101
+          })
102
+          return false
103
+        }
105 104
         var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
106 105
         if (!reg.test(this.postData.InfoUrl)) {
107 106
           this.$message({

+ 46
- 43
src/pages/system/cmsManager/indexMsg/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>标题:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -15,7 +15,7 @@
15 15
           </div>
16 16
         </li>
17 17
         <li class="flex-h">
18
-          <span>跳转链接:</span>
18
+          <span>跳转链接:<em>*</em></span>
19 19
           <div class="flex-item">
20 20
             <div style="width:50%">
21 21
               <el-input
@@ -27,7 +27,7 @@
27 27
           </div>
28 28
         </li>
29 29
         <li class="flex-h">
30
-          <span>对应案场:</span>
30
+          <span>对应案场:<em>*</em></span>
31 31
           <div class="flex-item">
32 32
             <div style="width:50%">
33 33
               <el-select v-model="postData.CaseId" placeholder="请选择">
@@ -41,21 +41,6 @@
41 41
             </div>
42 42
           </div>
43 43
         </li>
44
-        <!-- <li class="flex-h">
45
-          <span>位置:</span>
46
-          <div class="flex-item">
47
-            <div style="width:50%">
48
-              <el-select v-model="postData.LocationId" placeholder="请选择">
49
-                <el-option
50
-                  v-for="item in positionList"
51
-                  :key="item.LocationId"
52
-                  :label="item.LocationName"
53
-                  :value="item.LocationId">
54
-                </el-option>
55
-              </el-select>
56
-            </div>
57
-          </div>
58
-        </li> -->
59 44
         <li style="text-align:center">
60 45
           <el-button type="primary" size="mini" @click="submit">保存</el-button>
61 46
           <el-button type="danger" size="mini" @click="cancel">取消</el-button>
@@ -72,6 +57,7 @@ export default {
72 57
   name: '',
73 58
   data () {
74 59
     return {
60
+      ajaxOff: true,
75 61
       postData: {
76 62
         InfoName: '',
77 63
         InfoUrl: '',
@@ -96,33 +82,50 @@ export default {
96 82
   methods: {
97 83
     ...mapCmsActions(['updateLocationInfo']),
98 84
     submit () {
99
-      var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
100
-      if (!reg.test(this.postData.InfoUrl)) {
101
-        this.$message({
102
-          message: '链接地址格式不正确',
103
-          type: 'error',
85
+      if (this.ajaxOff) {
86
+        if (this.postData.InfoName === '') {
87
+          this.$message({
88
+            message: '标题不能为空',
89
+            type: 'error',
90
+          })
91
+          return false
92
+        }
93
+        if (this.postData.InfoUrl === '') {
94
+          this.$message({
95
+            message: '链接地址不能为空',
96
+            type: 'error',
97
+          })
98
+          return false
99
+        }
100
+        var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
101
+        if (!reg.test(this.postData.InfoUrl)) {
102
+          this.$message({
103
+            message: '链接地址格式不正确',
104
+            type: 'error',
105
+          })
106
+          return false
107
+        }
108
+        this.postData.OrgId = this.OrgId
109
+        this.$ajax(this.$api.cms.editInfo.url, {
110
+          method: this.$api.cms.editInfo.method,
111
+          urlData: {
112
+            id: this.$route.query.id
113
+          },
114
+          data: this.postData
115
+        }).then(res => {
116
+          this.ajaxOff = true
117
+          this.$message({
118
+            message: '编辑成功',
119
+            type: 'success',
120
+            duration: 1000
121
+          })
122
+          setTimeout(() => {
123
+            this.$router.push({ name: 'indexMsg' })
124
+          }, 1000)
125
+        }).catch(msg => {
126
+
104 127
         })
105
-        return false
106 128
       }
107
-      this.postData.OrgId = this.OrgId
108
-      this.$ajax(this.$api.cms.editInfo.url, {
109
-        method: this.$api.cms.editInfo.method,
110
-        urlData: {
111
-          id: this.$route.query.id
112
-        },
113
-        data: this.postData
114
-      }).then(res => {
115
-        this.$message({
116
-          message: '编辑成功',
117
-          type: 'success',
118
-          duration: 1000
119
-        })
120
-        setTimeout(() => {
121
-          this.$router.push({ name: 'indexMsg' })
122
-        }, 1000)
123
-      }).catch(msg => {
124
-
125
-      })
126 129
     },
127 130
     cancel () {
128 131
       this.$router.go(-1)

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

@@ -287,11 +287,11 @@ export default {
287 287
       const courseids = (this.detail.Courses || []).map(x => x.CourseId).join(',')
288 288
       if (this.id === '') {
289 289
         this.detail.OrgId = this.OrgId
290
-        this.AddCaseInfo({ ...this.detail, OrgId: this.OrgId, imgs: this.img, detailimgs: this.detailimg, courseids }).then(res => {
290
+        this.AddCaseInfo({...this.detail, OrgId: this.OrgId, imgs: this.imgShow, detailimgs: this.detailImgShow, courseids}).then(res => {
291 291
           this.afterSave()
292 292
         })
293 293
       } else {
294
-        this.AddCaseInfo({ ...this.detail, imgs: this.img, detailimgs: this.detailimg, courseids }).then(res => {
294
+        this.AddCaseInfo({...this.detail, imgs: this.imgShow, detailimgs: this.detailImgShow, courseids}).then(res => {
295 295
           this.afterSave()
296 296
         })
297 297
       }
@@ -313,7 +313,7 @@ export default {
313 313
       this.GetCaseInfo({ id: this.id })
314 314
     },
315 315
     getCourse () {
316
-      this.GetCourseList({ caseid: this.CaseId, page: 1, pagesize: 100 })
316
+      this.GetCourseList({caseid: this.CaseId, page: 1, pagesize: 100, status: 1})
317 317
     },
318 318
     toggleSelection (rows) {
319 319
       if (rows) {

+ 43
- 26
src/pages/system/cmsManager/newsManager/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>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9 9
                 <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
@@ -12,7 +12,7 @@
12 12
           </div>
13 13
         </li>
14 14
         <li class="flex-h" v-if="postData.ForwardType==='url'">
15
-          <span>链接:</span>
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -24,10 +24,10 @@
24 24
           </div>
25 25
         </li>
26 26
         <li class="flex-h" v-else>
27
-          <span>课程:</span>
27
+          <span>课程:<em>*</em></span>
28 28
           <div class="flex-item">
29 29
             <div style="width:50%">
30
-              <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
30
+              <el-select v-model="postData.ForwardCourseId" placeholder="请选择课程">
31 31
                 <el-option
32 32
                   v-for="item in courses.list"
33 33
                   :key="item.CourseId"
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%" class="radio">
45 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div style="width:50%">
54 54
               <el-select style="width:100%" v-model="postData.LocationIds" multiple placeholder="请选择">
@@ -63,7 +63,7 @@
63 63
           </div>
64 64
         </li>
65 65
         <li class="flex-h">
66
-          <span>标题:</span>
66
+          <span>标题:<em>*</em></span>
67 67
           <div class="flex-item">
68 68
             <div style="width:50%">
69 69
               <el-input
@@ -75,23 +75,8 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
79 79
           <div class="flex-item">
80
-            <!-- <el-upload
81
-              action='string'
82
-              :http-request="toolClass.upload"
83
-              :limit='limit'
84
-              list-type="picture-card"
85
-              :file-list='imgsArr'
86
-              :on-success="handlePictureCardPreview"
87
-              :on-remove="handleRemove"
88
-              :on-exceed="exceed">
89
-              <i class="el-icon-plus"></i>
90
-            </el-upload>
91
-            <el-dialog :visible.sync="dialogVisible">
92
-              <img width="100%" :src="imgs" alt="">
93
-            </el-dialog> -->
94
-            <!-- 单选 -->
95 80
             <el-upload
96 81
               class="avatar-uploader"
97 82
               action='string'
@@ -152,6 +137,7 @@ export default {
152 137
       positionList: x => x.cms.locationAll,
153 138
       OrgId: x => x.app.user.OrgId,
154 139
       CaseId: x => x.app.cases.default,
140
+      defaultCaseId: x => x.app.cases.default,
155 141
     }),
156 142
     ...mapCourseState({
157 143
       courses: x => x.courseList,
@@ -166,7 +152,8 @@ export default {
166 152
       'updateLocationAllInfo',
167 153
     ]),
168 154
     submit () {
169
-      if (this.postData.ForwardType === '1') {
155
+      if (this.postData.ForwardType === 'url') {
156
+        this.postData.ForwardResourceId = ''
170 157
         if (this.postData.ForwardUrl === '') {
171 158
           this.$message({
172 159
             message: '链接地址不能为空',
@@ -183,8 +170,38 @@ export default {
183 170
             return false
184 171
           }
185 172
         }
173
+      } else {
174
+        this.postData.ForwardUrl = ''
175
+        if (this.postData.ForwardCourseId === '') {
176
+          this.$message({
177
+            message: '课程不能为空',
178
+            type: 'error',
179
+          })
180
+          return false
181
+        }
182
+      }
183
+      if (!this.postData.LocationIds.length) {
184
+        this.$message({
185
+          message: '图片位置不能为空',
186
+          type: 'error',
187
+        })
188
+        return false
189
+      }
190
+      if (this.postData.Title === '') {
191
+        this.$message({
192
+          message: '标题不能为空',
193
+          type: 'error',
194
+        })
195
+        return false
186 196
       }
187
-      this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
197
+      if (this.postData.ImageUrl === '') {
198
+        this.$message({
199
+          message: '图片不能为空',
200
+          type: 'error',
201
+        })
202
+        return false
203
+      }
204
+      this.postData.CaseId = this.defaultCaseId
188 205
       this.postData.locationids = this.postData.LocationIds.join(',')
189 206
       this.$ajax(this.$api.cms.addNews.url, {
190 207
         method: this.$api.cms.addNews.method,
@@ -199,7 +216,7 @@ export default {
199 216
           this.$router.push({ name: 'newsManager' })
200 217
         }, 1000)
201 218
       }).catch(msg => {
202
-
219
+        console.log(msg)
203 220
       })
204 221
     },
205 222
     cancel () {

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

@@ -3,16 +3,16 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9
-                <el-radio v-model="postData.ForwardType" label='1' >链接</el-radio>
10
-                <el-radio v-model="postData.ForwardType" label='0' >课程</el-radio>
9
+                <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
10
+                <el-radio v-model="postData.ForwardType" label='course' >课程</el-radio>
11 11
             </div>
12 12
           </div>
13 13
         </li>
14
-        <li class="flex-h">
15
-          <span>链接:</span>
14
+        <li class="flex-h" v-if="postData.ForwardType==='url'">
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -23,8 +23,23 @@
23 23
             </div>
24 24
           </div>
25 25
         </li>
26
+        <li class="flex-h" v-else>
27
+          <span>课程:<em>*</em></span>
28
+          <div class="flex-item">
29
+            <div style="width:50%">
30
+              <el-select v-model="postData.ForwardCourseId" placeholder="请选择课程">
31
+                <el-option
32
+                  v-for="item in courses.list"
33
+                  :key="item.CourseId"
34
+                  :label="item.CourseName"
35
+                  :value="item.CourseId">
36
+                </el-option>
37
+              </el-select>
38
+            </div>
39
+          </div>
40
+        </li>
26 41
         <li class="flex-h">
27
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
28 43
           <div class="flex-item">
29 44
             <div style="width:50%" class="radio">
30 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -33,7 +48,7 @@
33 48
           </div>
34 49
         </li>
35 50
         <li class="flex-h">
36
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
37 52
           <div class="flex-item">
38 53
             <div style="width:50%">
39 54
               <el-select style="width:100%" v-model="postData.LocationIds" multiple placeholder="请选择">
@@ -48,7 +63,7 @@
48 63
           </div>
49 64
         </li>
50 65
         <li class="flex-h">
51
-          <span>标题:</span>
66
+          <span>标题:<em>*</em></span>
52 67
           <div class="flex-item">
53 68
             <div style="width:50%">
54 69
               <el-input
@@ -60,22 +75,8 @@
60 75
           </div>
61 76
         </li>
62 77
         <li class="flex-h">
63
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
64 79
           <div class="flex-item">
65
-            <!-- <el-upload
66
-              action='string'
67
-              :http-request="toolClass.upload"
68
-              :limit='limit'
69
-              list-type="picture-card"
70
-              :file-list='imgsArr'
71
-              :on-success="handlePictureCardPreview"
72
-              :on-remove="handleRemove"
73
-              :on-exceed="exceed">
74
-              <i class="el-icon-plus"></i>
75
-            </el-upload>
76
-            <el-dialog :visible.sync="dialogVisible">
77
-              <img width="100%" :src="imgs" alt="">
78
-            </el-dialog> -->
79 80
             <el-upload
80 81
               class="avatar-uploader"
81 82
               action='string'
@@ -99,12 +100,13 @@
99 100
 <script>
100 101
 import { mapState, createNamespacedHelpers } from 'vuex'
101 102
 const { mapActions: mapCmsActions } = createNamespacedHelpers('cms')
103
+const { mapState: mapCourseState, mapActions: mapCourseActions } = createNamespacedHelpers('course')
102 104
 export default {
103 105
   name: '',
104 106
   data () {
105 107
     return {
106 108
       postData: {
107
-        ForwardType: '1',
109
+        ForwardType: 'url',
108 110
         ForwardUrl: '',
109 111
         ForwardResourceId: '',
110 112
         Status: '1',
@@ -124,17 +126,25 @@ export default {
124 126
   created () {
125 127
     this.updateLocationInfo().then(() => {
126 128
       this.getDetail()
129
+      this.GetCourseList({ page: 1, pagesize: 10000 })
127 130
     })
128 131
   },
129 132
   computed: {
130 133
     ...mapState({
131 134
       positionList: x => x.cms.location
135
+    }),
136
+    ...mapCourseState({
137
+      courses: x => x.courseList,
132 138
     })
133 139
   },
134 140
   methods: {
141
+    ...mapCourseActions([
142
+      'GetCourseList',
143
+    ]),
135 144
     ...mapCmsActions(['updateLocationInfo']),
136 145
     submit () {
137
-      if (this.postData.ForwardType === '1') {
146
+      if (this.postData.ForwardType === 'url') {
147
+        this.postData.ForwardResourceId = ''
138 148
         if (this.postData.ForwardUrl === '') {
139 149
           this.$message({
140 150
             message: '链接地址不能为空',
@@ -151,16 +161,38 @@ export default {
151 161
             return false
152 162
           }
153 163
         }
164
+      } else {
165
+        this.postData.ForwardUrl = ''
166
+        if (this.postData.ForwardCourseId === '') {
167
+          this.$message({
168
+            message: '课程不能为空',
169
+            type: 'error',
170
+          })
171
+          return false
172
+        }
173
+      }
174
+      if (!this.postData.LocationIds.length) {
175
+        this.$message({
176
+          message: '图片位置不能为空',
177
+          type: 'error',
178
+        })
179
+        return false
180
+      }
181
+      if (this.postData.Title === '') {
182
+        this.$message({
183
+          message: '标题不能为空',
184
+          type: 'error',
185
+        })
186
+        return false
187
+      }
188
+      if (this.postData.ImageUrl === '') {
189
+        this.$message({
190
+          message: '图片不能为空',
191
+          type: 'error',
192
+        })
193
+        return false
154 194
       }
155
-      this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
156 195
       this.postData.locationids = this.postData.LocationIds.join(',')
157
-      // this.postData.ImageUrl = ''
158
-      // for (let i = 0; i < this.imgsArr.length; i++) {
159
-      //   this.postData.ImageUrl += this.imgsArr[i].response.result.url + ','
160
-      // }
161
-      // if (this.postData.ImageUrl) {
162
-      //   this.postData.ImageUrl = this.postData.ImageUrl.substr(0, this.postData.ImageUrl.length - 1)
163
-      // }
164 196
       this.$ajax(this.$api.cms.editNews.url, {
165 197
         method: this.$api.cms.editNews.method,
166 198
         urlData: {
@@ -183,21 +215,6 @@ export default {
183 215
     cancel () {
184 216
       this.$router.go(-1)
185 217
     },
186
-    // handlePictureCardPreview (res, file, fileList) {
187
-    //   this.imgs = res.result.url
188
-    //   this.dialogVisible = false
189
-    //   this.imgsArr = fileList
190
-    // },
191
-    // handleRemove (file, fileList) {
192
-    //   this.imgsArr = fileList
193
-    // },
194
-    // exceed () {
195
-    //   this.$message({
196
-    //     message: '超过可传的图片上限',
197
-    //     type: 'info',
198
-    //     duration: 1000
199
-    //   })
200
-    // },
201 218
     getDetail () {
202 219
       this.$ajax(this.$api.cms.newsDetail.url, {
203 220
         method: this.$api.cms.newsDetail.method,
@@ -205,25 +222,11 @@ export default {
205 222
           id: this.$route.query.id
206 223
         }
207 224
       }).then(res => {
208
-        res.ForwardType === 'url' ? res.ForwardType = '1' : res.ForwardType = '0'
209 225
         res.Status += ''
210 226
         res.LocationIds = res.NewsLocations.reduce((previousValue, currentValue, index, array) => {
211
-          console.log(previousValue)
212 227
           previousValue.push(currentValue.LocationId)
213 228
           return previousValue
214 229
         }, [])
215
-        console.log(res.LocationIds)
216
-        // let imgsArr = []
217
-        // let item = {
218
-        //   url: res.ImageUrl,
219
-        //   response: {
220
-        //     result: {
221
-        //       url: res.ImageUrl
222
-        //     }
223
-        //   }
224
-        // }
225
-        // imgsArr.push(item)
226
-        // this.imgsArr = imgsArr
227 230
         this.postData = res
228 231
       }).catch(msg => {
229 232
 

+ 33
- 5
src/pages/system/courseManager/fiveA/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>名称:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -15,7 +15,7 @@
15 15
           </div>
16 16
         </li>
17 17
         <li class="flex-h">
18
-          <span>标题:</span>
18
+          <span>标题:<em>*</em></span>
19 19
           <div class="flex-item">
20 20
             <div style="width:50%">
21 21
               <el-input
@@ -27,7 +27,7 @@
27 27
           </div>
28 28
         </li>
29 29
         <li class="flex-h">
30
-          <span>资讯分类:</span>
30
+          <span>资讯分类:<em>*</em></span>
31 31
           <div class="flex-item">
32 32
             <div style="width:50%">
33 33
               <el-input
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>图片:</span>
42
+          <span>图片:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <el-upload
45 45
               action='string'
@@ -103,6 +103,34 @@ export default {
103 103
   methods: {
104 104
     ...mapActions(['updateSystemInfo']),
105 105
     submit () {
106
+      if (this.postData.LocationName === '') {
107
+        this.$message({
108
+          type: 'error',
109
+          message: '名称不能为空'
110
+        })
111
+        return false
112
+      }
113
+      if (this.postData.Title === '') {
114
+        this.$message({
115
+          type: 'error',
116
+          message: '标题不能为空'
117
+        })
118
+        return false
119
+      }
120
+      if (this.postData.Consult === '') {
121
+        this.$message({
122
+          type: 'error',
123
+          message: '资讯分类不能为空'
124
+        })
125
+        return false
126
+      }
127
+      if (!this.imgsArr.length) {
128
+        this.$message({
129
+          type: 'error',
130
+          message: '图片不能为空'
131
+        })
132
+        return false
133
+      }
106 134
       this.postData.OrgId = this.OrgId
107 135
       this.postData.TypeImg = ''
108 136
       for (let i = 0; i < this.imgsArr.length; i++) {
@@ -111,7 +139,7 @@ export default {
111 139
       if (this.postData.TypeImg) {
112 140
         this.postData.TypeImg = this.postData.TypeImg.substr(0, this.postData.TypeImg.length - 1)
113 141
       }
114
-      console.log(this.postData)
142
+      // console.log(this.postData)
115 143
       this.$ajax(this.$api.cms.addLocation.url, {
116 144
         method: this.$api.cms.addLocation.method,
117 145
         data: this.postData

+ 32
- 16
src/pages/system/courseManager/fiveA/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>名称:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -15,7 +15,7 @@
15 15
           </div>
16 16
         </li>
17 17
         <li class="flex-h">
18
-          <span>标题:</span>
18
+          <span>标题:<em>*</em></span>
19 19
           <div class="flex-item">
20 20
             <div style="width:50%">
21 21
               <el-input
@@ -27,7 +27,7 @@
27 27
           </div>
28 28
         </li>
29 29
         <li class="flex-h">
30
-          <span>资讯分类:</span>
30
+          <span>资讯分类:<em>*</em></span>
31 31
           <div class="flex-item">
32 32
             <div style="width:50%">
33 33
               <el-input
@@ -38,20 +38,8 @@
38 38
             </div>
39 39
           </div>
40 40
         </li>
41
-        <!-- <li class="flex-h">
42
-          <span>编码:</span>
43
-          <div class="flex-item">
44
-            <div style="width:50%">
45
-              <el-input
46
-                placeholder="请输入编码"
47
-                v-model="postData.LocationCode"
48
-                clearable>
49
-              </el-input>
50
-            </div>
51
-          </div>
52
-        </li> -->
53 41
         <li class="flex-h">
54
-          <span>图片:</span>
42
+          <span>图片:<em>*</em></span>
55 43
           <div class="flex-item">
56 44
             <el-upload
57 45
               action='string'
@@ -116,6 +104,34 @@ export default {
116 104
   methods: {
117 105
     ...mapActions(['updateSystemInfo']),
118 106
     submit () {
107
+      if (this.postData.LocationName === '') {
108
+        this.$message({
109
+          type: 'error',
110
+          message: '名称不能为空'
111
+        })
112
+        return false
113
+      }
114
+      if (this.postData.Title === '') {
115
+        this.$message({
116
+          type: 'error',
117
+          message: '标题不能为空'
118
+        })
119
+        return false
120
+      }
121
+      if (this.postData.Consult === '') {
122
+        this.$message({
123
+          type: 'error',
124
+          message: '资讯分类不能为空'
125
+        })
126
+        return false
127
+      }
128
+      if (!this.imgsArr.length) {
129
+        this.$message({
130
+          type: 'error',
131
+          message: '图片不能为空'
132
+        })
133
+        return false
134
+      }
119 135
       this.postData.OrgId = this.OrgId
120 136
       this.postData.TypeImg = ''
121 137
       for (let i = 0; i < this.imgsArr.length; i++) {

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

@@ -5,7 +5,7 @@
5 5
         <div class="flex-item flex-h">
6 6
           <el-button
7 7
           size="mini"
8
-          type="primary" @click="goLast">继续排课</el-button>
8
+          type="primary" @click="goLast">排课月表</el-button>
9 9
         </div>
10 10
         <ul>
11 11
           <li>
@@ -223,8 +223,8 @@ export default {
223 223
       this.currentCourseItem.CourseId = row.CourseId
224 224
       this.currentCourseItem.BeginDate = null
225 225
       this.currentCourseItem.EndDate = null
226
-      this.currentCourseItem.DetailName = null
227
-      this.currentCourseItem.DetailDesc = null
226
+      this.currentCourseItem.DetailName = ''
227
+      this.currentCourseItem.DetailDesc = ''
228 228
       this.centerDialogVisible = true
229 229
     },
230 230
     search () { // 搜索
@@ -238,6 +238,22 @@ export default {
238 238
       this.getList()
239 239
     },
240 240
     handleDetailSave () {
241
+      if (this.currentCourseItem.DetailName === '') {
242
+        this.$message({
243
+          type: 'error',
244
+          message: '课程名称必填!'
245
+        })
246
+        return false
247
+      }
248
+
249
+      if (this.currentCourseItem.BeginDate === '' || this.currentCourseItem.EndDate === '' || this.currentCourseItem.BeginDate === null || this.currentCourseItem.EndDate === null) {
250
+        this.$message({
251
+          type: 'error',
252
+          message: '课程时间必填!'
253
+        })
254
+        return false
255
+      }
256
+
241 257
       const item = {...this.currentCourseItem,
242 258
         OrgId: this.orgid,
243 259
         CaseId: this.postData.caseid,
@@ -254,6 +270,7 @@ export default {
254 270
       })
255 271
       this.search()
256 272
       this.centerDialogVisible = false
273
+      this.goLast()
257 274
     },
258 275
     goLast () {
259 276
       const { courseid } = this.$route.query

+ 8
- 6
src/pages/system/courseManager/scheduleManager/index.vue 查看文件

@@ -71,7 +71,7 @@
71 71
           </li>
72 72
           <li class="flex-h">
73 73
             <span>开始时间:</span>
74
-            <div class="flex-item">
74
+            <!-- <div class="flex-item" v-if="currentCourseItem.CourseStatus===0">
75 75
               <div>
76 76
                 <el-date-picker
77 77
                   v-if="currentCourseItem.CourseStatus===0"
@@ -82,11 +82,12 @@
82 82
                 </el-date-picker>
83 83
                 <span v-else>{{this.toolClass.dateFormat(currentCourseItem.BeginDate, 'yyyy-MM-dd hh:mm')}}</span>
84 84
               </div>
85
-            </div>
85
+            </div> -->
86
+            <span>{{this.toolClass.dateFormat(currentCourseItem.BeginDate, 'yyyy-MM-dd hh:mm')}}</span>
86 87
           </li>
87 88
           <li class="flex-h">
88 89
             <span>结束时间:</span>
89
-            <div class="flex-item">
90
+            <!-- <div class="flex-item" v-if="currentCourseItem.CourseStatus===0">
90 91
               <div>
91 92
                 <el-date-picker
92 93
                   v-if="currentCourseItem.CourseStatus===0"
@@ -96,7 +97,8 @@
96 97
                 </el-date-picker>
97 98
                 <span v-else>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-dd hh:mm')}}</span>
98 99
               </div>
99
-            </div>
100
+            </div> -->
101
+            <span>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-dd hh:mm')}}</span>
100 102
           </li>
101 103
         </ul>
102 104
       </div>
@@ -200,8 +202,8 @@ export default {
200 202
     },
201 203
     handlUpdateDetail () {
202 204
       this.UpdateDetail({...this.currentCourseItem,
203
-        BeginDate: this.toolClass.dateFormat(this.currentCourseItem.BeginDate, 'yyyy-MM-ddThh:mm:ss'),
204
-        EndDate: this.toolClass.dateFormat(this.currentCourseItem.EndDate, 'yyyy-MM-ddThh:mm:ss'),
205
+        // BeginDate: this.toolClass.dateFormat(this.currentCourseItem.BeginDate, 'yyyy-MM-ddThh:mm:ss'),
206
+        // EndDate: this.toolClass.dateFormat(this.currentCourseItem.EndDate, 'yyyy-MM-ddThh:mm:ss'),
205 207
         callback: this.AfterAction})
206 208
     },
207 209
     AfterAction () {

+ 10
- 0
src/pages/system/dashboard/index.vue 查看文件

@@ -103,16 +103,26 @@ export default {
103 103
   },
104 104
   mounted () {
105 105
     this.$nextTick(function () {
106
+      console.log(this.defaultCaseId)
107
+      console.log(JSON.stringify(this.cases))
108
+      this.postData.caseid = this.postData.caseid || this.cases[0].CaseId
106 109
       this.getDashboardData({
107 110
         caseid: this.postData.caseid
108 111
       }).then((res) => {
109 112
         console.log(JSON.stringify(res))
110 113
       })
114
+      this.getDashboardBottomData({
115
+        caseid: this.postData.caseid,
116
+        statype: 'week'
117
+      }).then((res) => {
118
+        console.log(JSON.stringify(res))
119
+      })
111 120
     })
112 121
   },
113 122
   methods: {
114 123
     ...mapStaActions([
115 124
       'getDashboardData',
125
+      'getDashboardBottomData',
116 126
     ]),
117 127
   }
118 128
 }

+ 2
- 2
src/pages/system/dataStatistics/cardCouponUsedList/index.vue 查看文件

@@ -176,7 +176,7 @@ export default {
176 176
       },
177 177
       currentList: [],
178 178
       typeList: [{
179
-        value: '不限',
179
+        value: '',
180 180
         id: ''
181 181
       }, {
182 182
         value: '案场',
@@ -192,7 +192,7 @@ export default {
192 192
         id: 'give'
193 193
       }],
194 194
       statusList: [{
195
-        value: '不限',
195
+        value: '',
196 196
         id: ''
197 197
       }, {
198 198
         value: '未使用',

+ 1
- 1
src/pages/system/dataStatistics/courseVerifyList/index.vue 查看文件

@@ -139,7 +139,7 @@ export default {
139 139
         pagesize: 10, // 请求数据量
140 140
       },
141 141
       statusList: [{
142
-        value: '不限',
142
+        value: '',
143 143
         id: ''
144 144
       }, {
145 145
         value: '未使用',

+ 3
- 3
src/pages/system/dataStatistics/goodsOrderList/index.vue 查看文件

@@ -111,7 +111,7 @@
111 111
             <div style="font-size:12px;">下单人:{{returnListItem(goodsOrderList, index).CustomerName}}</div>
112 112
             <span style="display:block;margin-top:10px;font-size:12px;">下单时间:{{toolClass.dateFormat(returnListItem(goodsOrderList, index).CreateDate)}}</span>
113 113
           </div>
114
-          <!-- <div style="padding:10px 10px;font-size:12px;">备注:{{returnListItem(goodsOrderList, index).Remark}}</div> -->
114
+          <div style="padding:10px 10px;font-size:12px;"></div>
115 115
           <div style="text-align: right;font-size: 12px;">城的空间.诚咖啡</div>
116 116
           <div style="height:10px"></div>
117 117
         </div>
@@ -148,7 +148,7 @@ export default {
148 148
         pagesize: 10, // 请求数据量
149 149
       },
150 150
       typeList: [{
151
-        value: '不限',
151
+        value: '',
152 152
         id: ''
153 153
       }, {
154 154
         value: '销售',
@@ -161,7 +161,7 @@ export default {
161 161
         id: 'customer'
162 162
       }],
163 163
       statusList: [{
164
-        value: '不限',
164
+        value: '',
165 165
         id: ''
166 166
       }, {
167 167
         value: '已下单',

+ 59
- 47
src/pages/system/goodsManager/goodManager/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>选择案场:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-select v-model="Case" placeholder="请选择">
@@ -18,7 +18,7 @@
18 18
           </div>
19 19
         </li>
20 20
         <li class="flex-h">
21
-          <span>商品名称:</span>
21
+          <span>商品名称:<em>*</em></span>
22 22
           <div class="flex-item">
23 23
             <div style="width:50%">
24 24
               <el-input
@@ -30,22 +30,9 @@
30 30
           </div>
31 31
         </li>
32 32
         <li class="flex-h">
33
-          <span>商品图片:</span>
33
+          <span>商品图片:<em>*</em></span>
34 34
           <div class="flex-item">
35 35
             <div style="width:50%">
36
-              <!-- 多选 -->
37
-              <!-- <el-upload
38
-                action='string'
39
-                :http-request="toolClass.upload"
40
-                :limit='limit'
41
-                list-type="picture-card"
42
-                :file-list='imgsArr'
43
-                :on-success="handlePictureCardPreview"
44
-                :on-remove="handleRemove"
45
-                :on-exceed="exceed">
46
-                <i class="el-icon-plus"></i>
47
-              </el-upload> -->
48
-              <!-- 单选 -->
49 36
               <el-upload
50 37
                 class="avatar-uploader"
51 38
                 action='string'
@@ -59,7 +46,7 @@
59 46
           </div>
60 47
         </li>
61 48
         <li class="flex-h">
62
-          <span>商品价格:</span>
49
+          <span>商品价格:<em>*</em></span>
63 50
           <div class="flex-item">
64 51
             <div style="width:50%">
65 52
               <el-input
@@ -76,7 +63,7 @@
76 63
             <div style="width:50%">
77 64
               <el-select v-model="detailSpecs" multiple placeholder="请选择" style="width:100%;">
78 65
                 <el-option
79
-                  v-for="item in specs.list"
66
+                  v-for="item in (Case === '' ? [] : specs.list)"
80 67
                   :key="item.SpecId"
81 68
                   :label="item.SpecName"
82 69
                   :value="item.SpecId">
@@ -86,12 +73,12 @@
86 73
           </div>
87 74
         </li>
88 75
         <li class="flex-h">
89
-          <span>商品类别:</span>
76
+          <span>商品类别:<em>*</em></span>
90 77
           <div class="flex-item">
91 78
             <div style="width:50%">
92
-              <el-select v-model="detail.TypeId" placeholder="请选择商品类型">
79
+              <el-select v-model="TypeId" placeholder="请选择商品类型">
93 80
                 <el-option
94
-                  v-for="item in types.list"
81
+                  v-for="item in (Case === '' ? [] : types.list)"
95 82
                   :key="item.TypeId"
96 83
                   :label="item.TypeName"
97 84
                   :value="item.TypeId">
@@ -139,7 +126,7 @@ export default {
139 126
         return this.detail.CaseId || this.caseid
140 127
       },
141 128
       set (val) {
142
-        this.UpdateInfo({...this.detail, CaseId: val})
129
+        this.UpdateInfo({ ...this.detail, CaseId: val })
143 130
         this.detail.TypeId = ''
144 131
         this.GetGoodTypes({ pagesize: 1000, caseid: this.Case })
145 132
         this.GetGoodSpecs({ pagesize: 1000, caseid: this.Case })
@@ -147,21 +134,24 @@ export default {
147 134
     },
148 135
     detailSpecs: {
149 136
       get () {
150
-        console.log(this.infoSpecs || (this.detail.Specs || []).map(x => x.SpecId))
137
+        // console.log(this.infoSpecs || (this.detail.Specs || []).map(x => x.SpecId))
151 138
         return this.infoSpecs || (this.detail.Specs || []).map(x => x.SpecId)
152 139
       },
153 140
       set (val) {
154 141
         this.infoSpecs = val
155 142
       },
156 143
     },
157
-    // imgsArr () {
158
-    //   return (this.detail.Images || []).map(x => {
159
-    //     return {...x, url: x.url || x.ImgUrl}
160
-    //   })
161
-    // },
162 144
     Image () {
163 145
       return ((this.detail.Images || [])[0] || {}).ImgUrl
164
-    }
146
+    },
147
+    TypeId: {
148
+      get () {
149
+        return this.detail.TypeId
150
+      },
151
+      set (val) {
152
+        this.UpdateInfo({ ...this.detail, TypeId: val })
153
+      },
154
+    },
165 155
   },
166 156
   methods: {
167 157
     ...mapGoodsActions([
@@ -174,14 +164,49 @@ export default {
174 164
       'GetGoodSpecs',
175 165
     ]),
176 166
     submit () {
177
-      this.detail.specs = JSON.stringify(this.detailSpecs.map(x => ({SpecId: x, GoodsPrice: this.detail.Price})))
178
-      this.detail.images = this.detail.Images.map(x => {
167
+      this.detail.specs = JSON.stringify(this.detailSpecs.map(x => ({ SpecId: x, GoodsPrice: this.detail.Price })))
168
+      this.detail.images = (this.detail.Images || []).map(x => {
179 169
         if (x.response) {
180 170
           return x.response.result.url
181 171
         } else {
182 172
           return x.ImgUrl
183 173
         }
184 174
       }).join(',')
175
+      if ((this.detail.CaseId || '') === '') {
176
+        this.$message({
177
+          type: 'error',
178
+          message: '案场不能为空'
179
+        })
180
+        return false
181
+      }
182
+      if ((this.detail.GoodsName || '') === '') {
183
+        this.$message({
184
+          type: 'error',
185
+          message: '商品名称不能为空'
186
+        })
187
+        return false
188
+      }
189
+      if ((this.detail.Images || '') === '') {
190
+        this.$message({
191
+          type: 'error',
192
+          message: '图片不能为空'
193
+        })
194
+        return false
195
+      }
196
+      if ((this.detail.Price || '') === '') {
197
+        this.$message({
198
+          type: 'error',
199
+          message: '价格不能为空'
200
+        })
201
+        return false
202
+      }
203
+      if ((this.detail.TypeId || '') === '') {
204
+        this.$message({
205
+          type: 'error',
206
+          message: '类别不能为空'
207
+        })
208
+        return false
209
+      }
185 210
       if ((this.detail.GoodsId || '') === '') {
186 211
         this.detail.OrgId = this.orgid
187 212
         if (!this.detail.CaseId || this.detail.CaseId === '') {
@@ -200,28 +225,15 @@ export default {
200 225
     cancel () {
201 226
       this.$router.go(-1)
202 227
     },
203
-    // handlePictureCardPreview (res, file, fileList) {
204
-    //   this.detail.Images = fileList
205
-    // },
206
-    // handleRemove (file, fileList) {
207
-    //   this.detail.Images = fileList
208
-    // },
209
-    // exceed () {
210
-    //   this.$message({
211
-    //     message: '超过可传的图片上限',
212
-    //     type: 'info',
213
-    //     duration: 1000
214
-    //   })
215
-    // },
216 228
     handleAvatarSuccess (res, file) {
217
-      this.UpdateInfo({...this.detail, Images: [{ImgUrl: res.result.url}]})
229
+      this.UpdateInfo({ ...this.detail, Images: [{ ImgUrl: res.result.url }] })
218 230
     },
219 231
   },
220 232
   created () {
221
-    this.GetGoodTypes({ pagesize: 1000, caseid: this.Case })
222
-    this.GetGoodSpecs({ pagesize: 1000, caseid: this.Case })
223 233
     const { id } = this.$route.query
224 234
     if (id && id !== '') {
235
+      this.GetGoodTypes({ pagesize: 1000, caseid: this.Case })
236
+      this.GetGoodSpecs({ pagesize: 1000, caseid: this.Case })
225 237
       this.GetGoodsByID({ id: id })
226 238
     }
227 239
   }

+ 9
- 2
src/pages/system/goodsManager/goodsSpecManager/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>规格名:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -15,7 +15,7 @@
15 15
           </div>
16 16
         </li>
17 17
         <li class="flex-h">
18
-          <span>选择案场:</span>
18
+          <span>选择案场:<em>*</em></span>
19 19
           <div class="flex-item">
20 20
             <div style="width:50%">
21 21
               <el-select v-model="CaseId" placeholder="请选择">
@@ -72,6 +72,13 @@ export default {
72 72
   components: {},
73 73
   methods: {
74 74
     submit () { // 提交数据
75
+      if (this.postData.SpecName === '') {
76
+        this.$message({
77
+          message: '规格名不能为空',
78
+          type: 'error'
79
+        })
80
+        return false
81
+      }
75 82
       this.postData.OrgId = this.OrgId
76 83
       if (this.postData.CaseId === '') this.postData.CaseId = this.CaseId
77 84
       this.$ajax(this.$api.goodsManager.addGoodsSpec.url, {

+ 2
- 2
src/pages/system/goodsManager/goodsSpecManager/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>规格名:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -15,7 +15,7 @@
15 15
           </div>
16 16
         </li>
17 17
         <li class="flex-h">
18
-          <span>选择案场:</span>
18
+          <span>选择案场:<em>*</em></span>
19 19
           <div class="flex-item">
20 20
             <div style="width:50%">
21 21
               <el-select v-model="CaseId" placeholder="请选择">

+ 18
- 4
src/pages/system/goodsManager/goodsTypeManager/add.vue 查看文件

@@ -3,20 +3,20 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>商品种类:</span>
6
+          <span>商品种类:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
10 10
                 placeholder="请输入商品种类"
11 11
                 v-model="postData.TypeName"
12
-                maxlength="10"
12
+                maxlength="6"
13 13
                 clearable>
14 14
               </el-input>
15 15
             </div>
16 16
           </div>
17 17
         </li>
18 18
         <li class="flex-h">
19
-          <span>种类英文:</span>
19
+          <span>种类英文:<em>*</em></span>
20 20
           <div class="flex-item">
21 21
             <div style="width:50%">
22 22
               <el-input
@@ -29,7 +29,7 @@
29 29
           </div>
30 30
         </li>
31 31
         <li class="flex-h">
32
-          <span>选择案场:</span>
32
+          <span>选择案场:<em>*</em></span>
33 33
           <div class="flex-item">
34 34
             <div style="width:50%">
35 35
               <el-select v-model="CaseId" placeholder="请选择">
@@ -94,6 +94,20 @@ export default {
94 94
   components: {},
95 95
   methods: {
96 96
     submit () {
97
+      if (this.postData.TypeName === '') {
98
+        this.$message({
99
+          type: 'error',
100
+          message: '种类名称不能为空'
101
+        })
102
+        return false
103
+      }
104
+      if (this.postData.EnglishName === '') {
105
+        this.$message({
106
+          type: 'error',
107
+          message: '种类英文不能为空'
108
+        })
109
+        return false
110
+      }
97 111
       this.postData.OrgId = this.OrgId
98 112
       if (this.postData.CaseId === '') this.postData.CaseId = this.CaseId
99 113
       this.$ajax(this.$api.goodsManager.addGoodsType.url, {

+ 12
- 5
src/pages/system/goodsManager/goodsTypeManager/edit.vue 查看文件

@@ -3,20 +3,20 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>商品种类:</span>
6
+          <span>商品种类:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
10 10
                 placeholder="请输入商品种类"
11 11
                 v-model="postData.TypeName"
12
-                maxlength="10"
12
+                maxlength="6"
13 13
                 clearable>
14 14
               </el-input>
15 15
             </div>
16 16
           </div>
17 17
         </li>
18 18
         <li class="flex-h">
19
-          <span>种类英文:</span>
19
+          <span>种类英文:<em>*</em></span>
20 20
           <div class="flex-item">
21 21
             <div style="width:50%">
22 22
               <el-input
@@ -29,7 +29,7 @@
29 29
           </div>
30 30
         </li>
31 31
         <li class="flex-h">
32
-          <span>选择案场:</span>
32
+          <span>选择案场:<em>*</em></span>
33 33
           <div class="flex-item">
34 34
             <div style="width:50%">
35 35
               <el-select v-model="CaseId" placeholder="请选择">
@@ -93,7 +93,7 @@ export default {
93 93
         method: this.$api.goodsManager.getGoodsTypeById.method,
94 94
         urlData: {id: this.$route.query.id}
95 95
       }).then(res => {
96
-        console.log(res)
96
+        // console.log(res)
97 97
         this.postData = res
98 98
       })
99 99
     },
@@ -105,6 +105,13 @@ export default {
105 105
         })
106 106
         return false
107 107
       }
108
+      if (this.postData.EnglishName === '') {
109
+        this.$message({
110
+          type: 'error',
111
+          message: '种类英文不能为空'
112
+        })
113
+        return false
114
+      }
108 115
       this.$ajax(this.$api.goodsManager.editGoodsType.url, {
109 116
         method: this.$api.goodsManager.editGoodsType.method,
110 117
         data: this.postData,

+ 2
- 2
src/pages/system/marketingActivities/activitiesList/index.vue 查看文件

@@ -66,7 +66,7 @@
66 66
             prop="Status"
67 67
             label="状态">
68 68
             <template slot-scope="scope">
69
-              <span>{{scope.row.Status === 0 ? '启用' : '停用'}}</span>
69
+              <span>{{scope.row.Status === 1 ? '启用' : '停用'}}</span>
70 70
             </template>
71 71
           </el-table-column>
72 72
           <el-table-column
@@ -80,7 +80,7 @@
80 80
                 type="danger"
81 81
                 @click="delet(scope.row.ActivityId)">删除</el-button>
82 82
               <el-button
83
-                v-if="scope.row.Status === 0"
83
+                v-if="scope.row.Status === 1"
84 84
                 size="mini"
85 85
                 type="warning"
86 86
                 @click="disable(scope.row.ActivityId)">停用</el-button>

+ 38
- 9
src/pages/system/marketingActivities/addActivities/index.vue 查看文件

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>活动名称:</span>
6
+          <span>活动名称:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input v-model="activityName" placeholder="请输入内容"></el-input>
@@ -11,7 +11,7 @@
11 11
           </div>
12 12
         </li>
13 13
         <li class="flex-h">
14
-          <span>活动类型:</span>
14
+          <span>活动类型:<em>*</em></span>
15 15
           <div class="flex-item">
16 16
             <div>
17 17
               <el-select v-model="regValue" placeholder="请选择">
@@ -26,7 +26,7 @@
26 26
           </div>
27 27
         </li>
28 28
         <li class="flex-h">
29
-          <span>赠券卡券:</span>
29
+          <span>赠券卡券:<em>*</em></span>
30 30
           <div class="flex-item">
31 31
             <div>
32 32
               <el-select v-model="giftValue" placeholder="请选择">
@@ -41,7 +41,7 @@
41 41
           </div>
42 42
         </li>
43 43
         <li class="flex-h">
44
-          <span>赠券数量:</span>
44
+          <span>赠券数量:<em>*</em></span>
45 45
           <div class="flex-item">
46 46
             <div style="width:50%">
47 47
               <el-input v-model="giftNum" placeholder="请输入内容"></el-input>
@@ -62,8 +62,8 @@
62 62
           </div>
63 63
         </li>
64 64
         <li style="text-align:center">
65
-          <el-button type="warning" size="mini" @click="redirection('activitiesList')">返回</el-button>
66 65
           <el-button type="primary" size="mini" @click="submitData">提交</el-button>
66
+          <el-button type="warning" size="mini" @click="redirection('activitiesList')">返回</el-button>
67 67
         </li>
68 68
       </ul>
69 69
     </form>
@@ -128,6 +128,34 @@ export default {
128 128
     submitData () { // 提交数据
129 129
       // 判断是否提交成功
130 130
       // 提交成功,跳转页面
131
+      if (this.activityName === '') {
132
+        this.$message({
133
+          type: 'error',
134
+          message: '活动名称不能为空'
135
+        })
136
+        return false
137
+      }
138
+      if (this.regValue === '') {
139
+        this.$message({
140
+          type: 'error',
141
+          message: '活动类型不能为空'
142
+        })
143
+        return false
144
+      }
145
+      if (this.giftValue === '') {
146
+        this.$message({
147
+          type: 'error',
148
+          message: '赠券卡券不能为空'
149
+        })
150
+        return false
151
+      }
152
+      if (this.giftNum === 0) {
153
+        this.$message({
154
+          type: 'error',
155
+          message: '赠券数量不能为0'
156
+        })
157
+        return false
158
+      }
131 159
       let tempGiftOptions = this.$data.giftOptions
132 160
       let tempGiftValue = this.$data.giftValue
133 161
       for (let i = 0; i < tempGiftOptions.length; i++) {
@@ -139,7 +167,7 @@ export default {
139 167
       let jsonString = '{"giftValue":"' + this.$data.giftValue + '","giftLabel":"' + this.$data.giftLabel + '","giftNum":"' + this.$data.giftNum + '","desc":"' + this.$data.desc + '"}'
140 168
       this.$ajax(this.$api.marketingActivities.addMarketing.url, {
141 169
         method: this.$api.marketingActivities.addMarketing.method,
142
-        queryData: {activityName: this.$data.activityName, activityType: this.$data.regValue, resourceDesc: jsonString, CaseId: this.defaultCaseId}
170
+        queryData: { activityName: this.$data.activityName, activityType: this.$data.regValue, resourceDesc: jsonString, CaseId: this.defaultCaseId }
143 171
       }).then(res => {
144 172
         // console.log(res)
145 173
         this.$message({
@@ -153,10 +181,11 @@ export default {
153 181
     getCouponList () {
154 182
       this.$ajax(this.$api.marketingActivities.getCouponList.url, {
155 183
         method: this.$api.marketingActivities.getCouponList.method,
156
-        queryData: {}
184
+        urlData: {
185
+          type: 'system',
186
+        },
157 187
       }).then(res => {
158
-        // console.log(res)
159
-        this.giftList = res.list
188
+        this.giftList = res
160 189
         this.giftOptions = this.giftData
161 190
       })
162 191
     },

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

@@ -30,7 +30,7 @@
30 30
           <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
31 31
             <i class="iconfont icon-yinchenglogo" style="font-size:70px;color:red;position: relative;bottom: 20px;margin-right:10px;"></i>
32 32
             <div style="display:inline-block;">
33
-              <span style="display:block;font-size:20px;font-weight:700;">{{item.AreaName + item.TableNo}}</span>
33
+              <span style="display:block;font-size:20px;font-weight:700;width:180px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{item.AreaName + item.TableNo}}</span>
34 34
               <span style="display:block;margin-top:10px">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</span>
35 35
               <span style="display:block;margin-top:10px">已等待:<span style="color:red;font-weight:700;">{{leftTimes[item.OrdersId]}}</span></span>
36 36
             </div>
@@ -63,7 +63,7 @@
63 63
             <div style="font-size:12px;">下单人:{{item.UserName}}</div>
64 64
             <span style="display:block;margin-top:10px;font-size:12px;">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</span>
65 65
           </div>
66
-          <!-- <div style="padding:10px 10px;font-size:12px;">备注:{{item.Remark}}</div> -->
66
+          <div style="padding:10px 10px;font-size:12px;"></div>
67 67
           <div style="text-align: right;font-size: 12px;">城的空间.诚咖啡</div>
68 68
           <div style="height:10px"></div>
69 69
         </div>
@@ -231,7 +231,7 @@ export default {
231 231
       console.log(this.user)
232 232
       let caseid = this.caseid
233 233
       let id = this.userInfo.UserId
234
-      const wsuri = `${window.location.origin.replace('http', 'ws')}/api/common/MQ/websocket/${caseid}/${id}`
234
+      const wsuri = `${window.location.origin.replace('http', 'ws')}/api-v2/common/MQ/websocket/${caseid}/${id}?token=${localStorage.getItem('JWT')}`
235 235
       // const wsuri = `ws://192.168.0.11/api/guest/MQ/websocket/${caseid}/${id}`
236 236
       try {
237 237
         this.websock = new WebSocket(wsuri)

+ 2
- 0
src/pages/system/systemSet/roleManager/index.vue 查看文件

@@ -137,9 +137,11 @@ export default {
137 137
     handlePermission (index, row) {
138 138
       this.selid = row.RoleId
139 139
       this.GetRoleMenu({id: this.selid})
140
+      console.log(this.roleMenus)
140 141
       this.dialogTableVisible = true
141 142
     },
142 143
     handleNodeClick (node) {
144
+      console.log(node)
143 145
     },
144 146
     searchList (key) {
145 147
       this.key = key

+ 19
- 13
src/pages/system/systemSet/userManager/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>帐户名称:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>真实姓名:</span>
42
+          <span>真实姓名:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%">
45 45
               <el-input
@@ -51,7 +51,7 @@
51 51
           </div>
52 52
         </li>
53 53
         <li class="flex-h">
54
-          <span>邮箱:</span>
54
+          <span>邮箱:<em>*</em></span>
55 55
           <div class="flex-item">
56 56
             <div style="width:50%">
57 57
               <el-input
@@ -75,7 +75,7 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>手机号:</span>
78
+          <span>手机号:<em>*</em></span>
79 79
           <div class="flex-item">
80 80
             <div style="width:50%">
81 81
               <el-input
@@ -219,21 +219,27 @@ export default {
219 219
         })
220 220
         return false
221 221
       }
222
+      if (this.postData.RealName === '') {
223
+        this.$message({
224
+          type: 'error',
225
+          message: '真实姓名不能为空'
226
+        })
227
+        return false
228
+      }
222 229
       if (this.postData.Phone === '') {
223 230
         this.$message({
224 231
           type: 'error',
225 232
           message: '手机号不能为空'
226 233
         })
227 234
         return false
228
-      } else {
229
-        var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
230
-        if (!myreg.test(this.postData.Phone)) {
231
-          this.$message({
232
-            type: 'error',
233
-            message: '请输入正确的手机号!'
234
-          })
235
-          return false
236
-        }
235
+      }
236
+      var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
237
+      if (!myreg.test(this.postData.Phone)) {
238
+        this.$message({
239
+          type: 'error',
240
+          message: '请输入正确的手机号!'
241
+        })
242
+        return false
237 243
       }
238 244
       if (this.postData.Email !== '') {
239 245
         var emailreg = new RegExp('^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$')

+ 15
- 9
src/pages/system/systemSet/userManager/edit.vue 查看文件

@@ -237,21 +237,27 @@ export default {
237 237
         })
238 238
         return false
239 239
       }
240
+      if (this.postData.RealName === '') {
241
+        this.$message({
242
+          type: 'error',
243
+          message: '真实姓名不能为空'
244
+        })
245
+        return false
246
+      }
240 247
       if (this.postData.Phone === '') {
241 248
         this.$message({
242 249
           type: 'error',
243 250
           message: '手机号不能为空'
244 251
         })
245 252
         return false
246
-      } else {
247
-        var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
248
-        if (!myreg.test(this.postData.Phone)) {
249
-          this.$message({
250
-            type: 'error',
251
-            message: '请输入正确的手机号!'
252
-          })
253
-          return false
254
-        }
253
+      }
254
+      var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
255
+      if (!myreg.test(this.postData.Phone)) {
256
+        this.$message({
257
+          type: 'error',
258
+          message: '请输入正确的手机号!'
259
+        })
260
+        return false
255 261
       }
256 262
       if (this.postData.Email !== '') {
257 263
         var emailreg = new RegExp('^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$')

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

@@ -344,7 +344,11 @@ export default {
344 344
         method: this.$api.systemSet.getUserRoles.method,
345 345
         queryData: { userid: row.UserId }
346 346
       }).then(res => {
347
-        if (res !== null) this.tags = res
347
+        if (res !== null) {
348
+          this.tags = res
349
+        } else {
350
+          this.tags = []
351
+        }
348 352
         this.currentEditItem = row
349 353
         this.getRole()
350 354
         this.dialogTableVisible = true

+ 5
- 0
src/pages/system/verificationManager/drawVerification/index.vue 查看文件

@@ -79,6 +79,11 @@ export default {
79 79
           this.centerDialogVisible = false
80 80
           this.verificationCode = ''
81 81
         })
82
+      } else {
83
+        this.$message({
84
+          message: '核销码为空!',
85
+          type: 'error'
86
+        })
82 87
       }
83 88
     },
84 89
     toVerificationList () { // 定向到核销列表

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

@@ -65,7 +65,7 @@
65 65
               </el-table-column>
66 66
             </el-table>
67 67
         </div>
68
-        <span class="noData" v-if="!info.length && ajaxOff">今日暂无可核销的课程</span>
68
+        <span class="noData" v-if="!info.length && ajaxOff">查不到当前信息,请核对二维码或详情</span>
69 69
       </div>
70 70
     </div>
71 71
   </div>

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

@@ -31,7 +31,14 @@ export default {
31 31
   },
32 32
   methods: {
33 33
     toVerificationList () { // 前往核销列表
34
-      this.$router.push({name: 'phoneVerificationList', query: {tel: this.phone}})
34
+      if (this.phone !== '') {
35
+        this.$router.push({name: 'phoneVerificationList', query: {tel: this.phone}})
36
+      } else {
37
+        this.$message({
38
+          message: '手机号为空!',
39
+          type: 'error'
40
+        })
41
+      }
35 42
     },
36 43
   }
37 44
 }

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

@@ -6,9 +6,9 @@
6 6
           <div class="flex-item">
7 7
             <div class="userInfo">
8 8
               <span>用户名:</span>
9
-              <b>{{(courses.customerInfo || {}).Name || (courses.customerInfo || {}).CustomerName }}</b>
9
+              <b>{{customerName}}</b>
10 10
               <span>手机号:</span>
11
-              <b>{{(courses.customerInfo || {}).Phone}}</b>
11
+              <b>{{phone}}</b>
12 12
             </div>
13 13
           </div>
14 14
           <el-button
@@ -52,14 +52,18 @@
52 52
                 </template>
53 53
               </el-table-column>
54 54
               <el-table-column
55
-                label="操作">
55
+                label="操作"
56
+                width="200">
56 57
                 <template slot-scope="scope">
57 58
                   <el-button
58 59
                     size="mini"
59 60
                     type="success"
60 61
                     v-if="scope.row.VerifyStatus!=='used'"
61 62
                     @click="check(scope.row)">核销</el-button>
62
-                  <span v-else>已完成</span>
63
+                  <el-button
64
+                    size="mini"
65
+                    type="info"
66
+                    v-else>已完成</el-button>
63 67
                 </template>
64 68
               </el-table-column>
65 69
             </el-table>
@@ -71,62 +75,179 @@
71 75
             :total="courses.pagenum">
72 76
           </el-pagination>
73 77
         </div>
74
-        <span class="noData" v-else>今日暂无可核销的课程</span>
78
+        <span class="noData" v-else>查不到当前课程信息,请核对手机号或课程详情</span>
75 79
       </div>
76 80
     </div>
81
+    <el-dialog
82
+      title="选择绑定钥匙"
83
+      :visible.sync="centerDialogVisible"
84
+      width="400"
85
+      center>
86
+      <div>
87
+        <el-table
88
+          :data="dialogList"
89
+          stripe
90
+          style="width: 100%">
91
+          <el-table-column
92
+            prop="CustomerName"
93
+            label="当前用户">
94
+          </el-table-column>
95
+          <el-table-column
96
+            prop="LockNo"
97
+            label="锁柜号">
98
+          </el-table-column>
99
+          <el-table-column
100
+            prop="Status"
101
+            label="状态">
102
+            <template slot-scope="scope">
103
+              {{scope.row.Status === 1 ? '有人' : '无人'}}
104
+            </template>
105
+          </el-table-column>
106
+          <el-table-column
107
+            label="操作"
108
+            width="200">
109
+            <template slot-scope="scope">
110
+              <el-button
111
+                v-if="scope.row.Status === 0"
112
+                size="mini"
113
+                type="success"
114
+                @click="toBindKey(scope.row)">绑定</el-button>
115
+            </template>
116
+          </el-table-column>
117
+        </el-table>
118
+        <el-pagination
119
+          @current-change="handleCurrentChangeDialog"
120
+          :current-page.sync="postData.page"
121
+          :page-size="postData.pagesize"
122
+          layout="prev, pager, next, jumper"
123
+          :total="dialogTotal">
124
+        </el-pagination>
125
+      </div>
126
+      <span slot="footer" class="dialog-footer">
127
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
128
+        <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
129
+      </span>
130
+    </el-dialog>
131
+    <el-dialog
132
+      title="提示"
133
+      :visible.sync="dialogVisible"
134
+      width="200">
135
+      <span>确认核销此课程</span>
136
+      <span slot="footer" class="dialog-footer">
137
+        <el-button @click="sureVerify">确 定</el-button>
138
+        <el-button type="primary" @click="sureAndBind">确定并绑定钥匙</el-button>
139
+      </span>
140
+    </el-dialog>
77 141
   </div>
78 142
 </template>
79 143
 
80 144
 <script>
81
-import { createNamespacedHelpers } from 'vuex'
145
+import { mapState, createNamespacedHelpers } from 'vuex'
82 146
 
83 147
 const { mapState: mapVerifState, mapActions: mapVerifActions } = createNamespacedHelpers('verification')
148
+const { mapActions: mapDeviceActions } = createNamespacedHelpers('device')
84 149
 
85 150
 export default {
86 151
   name: '',
87 152
   data () {
88 153
     return {
154
+      dialogVisible: false,
155
+      dialogList: [],
156
+      centerDialogVisible: false,
157
+      customerId: '',
158
+      customerName: '',
159
+      phone: this.$route.query.tel,
89 160
       code: '',
90 161
       tel: '',
91 162
       page: 1,
92 163
       pagesize: 10,
164
+      postData: {
165
+        caseid: '',
166
+        page: 1,
167
+        pagesize: 6,
168
+      },
169
+      dialogTotal: 0,
93 170
     }
94 171
   },
95 172
   mounted () {
96
-    const { code, tel } = this.$route.query
97
-    this.code = code
98
-    this.tel = tel
99 173
     this.$nextTick(function () {
100
-      this.getList()
174
+      this.init()
101 175
     })
102 176
   },
103 177
   computed: {
178
+    ...mapState({
179
+      cases: x => x.app.cases.list,
180
+      defaultCaseId: x => x.app.cases.default,
181
+      OrgId: x => x.app.user.OrgId,
182
+    }),
183
+    CaseId: {
184
+      get () {
185
+        return this.postData.caseid || this.defaultCaseId
186
+      },
187
+      set (val) {
188
+        this.postData.caseid = val
189
+      }
190
+    },
104 191
     ...mapVerifState({
105 192
       courses: x => x.courseVerifs
106
-    })
193
+    }),
107 194
   },
108 195
   methods: {
109 196
     ...mapVerifActions([
110 197
       'GetCourseVerList',
111 198
       'CourseVerifs',
112 199
       'GetCourseVerListByTel',
200
+      'getCustomerName'
113 201
     ]),
202
+    ...mapDeviceActions([
203
+      'getKeyList',
204
+      'bindKeyer',
205
+    ]),
206
+    init () {
207
+      this.getCustomerName({
208
+        id: this.phone
209
+      }).then((res) => {
210
+        if (res !== null) {
211
+          this.customerId = res.CustomerId
212
+          this.customerName = res.CustomerName
213
+          const { code, tel } = this.$route.query
214
+          this.code = code
215
+          this.tel = tel
216
+          this.getList()
217
+        } else {
218
+          this.$message({
219
+            type: 'error',
220
+            message: '未查询到用户信息'
221
+          })
222
+        }
223
+      })
224
+    },
114 225
     check (item) { // 核销
115
-      this.$confirm('确认核销此课程?', '提示', {
116
-        confirmButtonText: '确定',
117
-        cancelButtonText: '取消',
118
-        type: 'warning'
226
+      this.currentItem = item
227
+      this.dialogVisible = true
228
+    },
229
+    sureVerify () {
230
+      this.CourseVerifs({ id: this.currentItem.CustomerDetailId, callback: this.afterCheck })
231
+      this.dialogVisible = false
232
+    },
233
+    sureAndBind () {
234
+      this.dialogVisible = false
235
+      this.getKeyList({
236
+        ...this.postData,
237
+        caseid: this.CaseId,
238
+      }).then((res) => {
239
+        // console.log(JSON.stringify(res))
240
+        this.dialogTotal = res.pagenum
241
+        this.dialogList = res.list
242
+        this.centerDialogVisible = true
119 243
       })
120
-        .then(() => {
121
-          this.CourseVerifs({id: item.CustomerDetailId, callback: this.afterCheck})
122
-        })
123 244
     },
124 245
     getList () {
125 246
       if (this.code && this.code !== '') {
126
-        this.GetCourseVerList({id: this.code, page: this.page, pagesize: this.pagesize})
247
+        this.GetCourseVerList({ id: this.code, page: this.page, pagesize: this.pagesize })
127 248
       } else {
128 249
         if (this.tel && this.tel !== '') {
129
-          this.GetCourseVerListByTel({tel: this.tel, page: this.page, pagesize: this.pagesize})
250
+          this.GetCourseVerListByTel({ tel: this.tel, page: this.page, pagesize: this.pagesize })
130 251
         }
131 252
       }
132 253
     },
@@ -142,7 +263,35 @@ export default {
142 263
       this.getList()
143 264
     },
144 265
     reback () { // 返回
145
-      this.$router.push({name: 'phoneVerification'})
266
+      this.$router.push({ name: 'phoneVerification' })
267
+    },
268
+    bindKey (item) { // 绑定钥匙
269
+    },
270
+    handleCurrentChangeDialog (val) {
271
+      this.postData.page = val
272
+      this.getKeyList({
273
+        ...this.postData,
274
+        caseid: this.CaseId,
275
+      }).then((res) => {
276
+        // console.log(JSON.stringify(res))
277
+        this.dialogTotal = res.pagenum
278
+        this.dialogList = res.list
279
+        this.centerDialogVisible = true
280
+      })
281
+    },
282
+    toBindKey (item) {
283
+      this.bindKeyer({
284
+        keyid: item.KeyId,
285
+        customerid: this.customerId,
286
+        customername: this.customerName
287
+      }).then((res) => {
288
+        // console.log(JSON.stringify(res))
289
+        this.CourseVerifs({ id: this.currentItem.CustomerDetailId, callback: this.afterCheck })
290
+        this.centerDialogVisible = false
291
+        this.postData.page = 1
292
+        this.dialogList = []
293
+        this.init()
294
+      })
146 295
     },
147 296
   }
148 297
 }
@@ -151,14 +300,14 @@ export default {
151 300
 <!-- Add "scoped" attribute to limit CSS to this component only -->
152 301
 <style lang="scss" scoped>
153 302
 .subPage {
154
-  .userInfo{
303
+  .userInfo {
155 304
     white-space: nowrap;
156 305
     font-size: 0;
157
-    >*{
306
+    > * {
158 307
       display: inline-block;
159 308
       margin-right: 10px;
160 309
     }
161
-    >b{
310
+    > b {
162 311
       font-weight: bolder;
163 312
       font-size: 15px;
164 313
       margin-right: 30px;
@@ -178,7 +327,7 @@ export default {
178 327
       }
179 328
     }
180 329
   }
181
-  .noData{
330
+  .noData {
182 331
     width: 100%;
183 332
     display: block;
184 333
     line-height: 40px;

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

@@ -62,7 +62,14 @@ export default {
62 62
   },
63 63
   methods: {
64 64
     toVerificationList () { // 定向到核销列表
65
-      this.$router.push({name: 'qrcodeVerificationList', query: {code: this.verificationCode}})
65
+      if (this.verificationCode !== '') {
66
+        this.$router.push({ name: 'qrcodeVerificationList', query: { code: this.verificationCode } })
67
+      } else {
68
+        this.$message({
69
+          message: '核销码为空!',
70
+          type: 'error'
71
+        })
72
+      }
66 73
     },
67 74
   }
68 75
 }

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

@@ -56,22 +56,93 @@
56 56
               </el-table-column>
57 57
             </el-table>
58 58
         </div>
59
-        <span class="noData" v-else>今日暂无可核销的课程</span>
59
+        <span class="noData" v-else>查不到当前课程信息,请核对二维码或课程详情</span>
60 60
       </div>
61 61
     </div>
62
+    <el-dialog
63
+      title="选择绑定钥匙"
64
+      :visible.sync="centerDialogVisible"
65
+      width="400"
66
+      center>
67
+      <div>
68
+        <el-table
69
+          :data="dialogList"
70
+          stripe
71
+          style="width: 100%">
72
+          <el-table-column
73
+            prop="CustomerName"
74
+            label="当前用户">
75
+          </el-table-column>
76
+          <el-table-column
77
+            prop="LockNo"
78
+            label="锁柜号">
79
+          </el-table-column>
80
+          <el-table-column
81
+            prop="Status"
82
+            label="状态">
83
+            <template slot-scope="scope">
84
+              {{scope.row.Status === 1 ? '有人' : '无人'}}
85
+            </template>
86
+          </el-table-column>
87
+          <el-table-column
88
+            label="操作"
89
+            width="200">
90
+            <template slot-scope="scope">
91
+              <el-button
92
+                v-if="scope.row.Status === 0"
93
+                size="mini"
94
+                type="success"
95
+                @click="toBindKey(scope.row)">绑定</el-button>
96
+            </template>
97
+          </el-table-column>
98
+        </el-table>
99
+        <el-pagination
100
+          @current-change="handleCurrentChangeDialog"
101
+          :current-page.sync="postData.page"
102
+          :page-size="postData.pagesize"
103
+          layout="prev, pager, next, jumper"
104
+          :total="dialogTotal">
105
+        </el-pagination>
106
+      </div>
107
+      <span slot="footer" class="dialog-footer">
108
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
109
+        <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
110
+      </span>
111
+    </el-dialog>
112
+    <el-dialog
113
+      title="提示"
114
+      :visible.sync="dialogVisible"
115
+      width="200">
116
+      <span>确认核销此课程</span>
117
+      <span slot="footer" class="dialog-footer">
118
+        <el-button @click="sureVerify">确 定</el-button>
119
+        <el-button type="primary" @click="sureAndBind">确定并绑定钥匙</el-button>
120
+      </span>
121
+    </el-dialog>
62 122
   </div>
63 123
 </template>
64 124
 
65 125
 <script>
66
-import { createNamespacedHelpers } from 'vuex'
126
+import { mapState, createNamespacedHelpers } from 'vuex'
67 127
 
68 128
 const { mapState: mapVerifState, mapActions: mapVerifActions } = createNamespacedHelpers('verification')
129
+const { mapActions: mapDeviceActions } = createNamespacedHelpers('device')
69 130
 
70 131
 export default {
71 132
   name: '',
72 133
   data () {
73 134
     return {
135
+      centerDialogVisible: false,
74 136
       code: '',
137
+      dialogVisible: false,
138
+      currentItem: {},
139
+      postData: {
140
+        caseid: '',
141
+        page: 1,
142
+        pagesize: 6,
143
+      },
144
+      dialogTotal: 0,
145
+      dialogList: [],
75 146
     }
76 147
   },
77 148
   mounted () {
@@ -84,35 +155,89 @@ export default {
84 155
   computed: {
85 156
     ...mapVerifState({
86 157
       courses: x => x.courseVerifs
87
-    })
158
+    }),
159
+    ...mapState({
160
+      cases: x => x.app.cases.list,
161
+      defaultCaseId: x => x.app.cases.default,
162
+      OrgId: x => x.app.user.OrgId,
163
+    }),
164
+    CaseId: {
165
+      get () {
166
+        return this.postData.caseid || this.defaultCaseId
167
+      },
168
+      set (val) {
169
+        this.postData.caseid = val
170
+      }
171
+    }
88 172
   },
89 173
   methods: {
90 174
     ...mapVerifActions([
91 175
       'GetCourseVerList',
92 176
       'CourseVerifs',
93 177
     ]),
94
-    check (item) { // 核销
95
-      this.$confirm('确认核销此课程?', '提示', {
96
-        confirmButtonText: '确定',
97
-        cancelButtonText: '取消',
98
-        type: 'warning'
178
+    ...mapDeviceActions([
179
+      'getKeyList',
180
+      'bindKeyByQrCode',
181
+    ]),
182
+    toBindKey (item) {
183
+      this.bindKeyByQrCode({
184
+        keyid: item.KeyId,
185
+        customerid: this.customerId,
186
+      }).then((res) => {
187
+        // console.log(JSON.stringify(res))
188
+        this.CourseVerifs({ id: this.currentItem.CustomerDetailId, callback: this.afterCheck })
189
+        this.centerDialogVisible = false
190
+        this.postData.page = 1
191
+        this.dialogList = []
192
+        this.getList()
193
+      })
194
+    },
195
+    sureVerify () {
196
+      this.CourseVerifs({ id: this.currentItem.CustomerDetailId, callback: this.afterCheck })
197
+    },
198
+    sureAndBind () {
199
+      this.dialogVisible = false
200
+      this.getKeyList({
201
+        ...this.postData,
202
+        caseid: this.CaseId,
203
+      }).then((res) => {
204
+        // console.log(JSON.stringify(res))
205
+        this.dialogTotal = res.pagenum
206
+        this.dialogList = res.list
207
+        this.centerDialogVisible = true
99 208
       })
100
-        .then(() => {
101
-          this.CourseVerifs({id: item.CustomerDetailId, callback: this.afterCheck})
102
-        })
209
+    },
210
+    check (item) { // 核销
211
+      this.currentItem = item
212
+      this.dialogVisible = true
103 213
     },
104 214
     getList () {
105
-      this.GetCourseVerList({id: this.code})
215
+      this.GetCourseVerList({ id: this.code }).then((res) => {
216
+        this.customerId = res.customerInfo.CustomerId
217
+      })
106 218
     },
107 219
     afterCheck () {
108 220
       this.$message({
109 221
         type: 'success',
110 222
         message: '操作成功!'
111 223
       })
224
+      this.dialogVisible = false
112 225
       this.getList()
113 226
     },
114 227
     reback () { // 返回
115
-      this.$router.push({name: 'qrcodeVerification'})
228
+      this.$router.push({ name: 'qrcodeVerification' })
229
+    },
230
+    handleCurrentChangeDialog (val) {
231
+      this.postData.page = val
232
+      this.getKeyList({
233
+        ...this.postData,
234
+        caseid: this.CaseId,
235
+      }).then((res) => {
236
+        // console.log(JSON.stringify(res))
237
+        this.dialogTotal = res.pagenum
238
+        this.dialogList = res.list
239
+        this.centerDialogVisible = true
240
+      })
116 241
     },
117 242
   }
118 243
 }
@@ -135,7 +260,7 @@ export default {
135 260
       }
136 261
     }
137 262
   }
138
-  .noData{
263
+  .noData {
139 264
     width: 100%;
140 265
     display: block;
141 266
     line-height: 40px;

+ 40
- 0
src/store/case/device.js 查看文件

@@ -16,6 +16,46 @@ export default {
16 16
     },
17 17
   },
18 18
   actions: {
19
+    bindKeyByQrCode ({ commit }, payload) {
20
+      return new Promise((resolve, reject) => {
21
+        ajax(api.caseManager.bindKeyByQrCode.url, {
22
+          method: api.caseManager.bindKeyByQrCode.method,
23
+          urlData: { ...payload },
24
+        }).then(res => {
25
+          resolve(res)
26
+        }).catch(reject)
27
+      })
28
+    },
29
+    bindKeyByPhone ({ commit }, payload) {
30
+      return new Promise((resolve, reject) => {
31
+        ajax(api.caseManager.bindKeyByPhone.url, {
32
+          method: api.caseManager.bindKeyByPhone.method,
33
+          urlData: { ...payload },
34
+        }).then(res => {
35
+          resolve(res)
36
+        }).catch(reject)
37
+      })
38
+    },
39
+    bindKeyer ({ commit }, payload) {
40
+      return new Promise((resolve, reject) => {
41
+        ajax(api.caseManager.bindKey.url, {
42
+          method: api.caseManager.bindKey.method,
43
+          urlData: { ...payload },
44
+        }).then(res => {
45
+          resolve(res)
46
+        }).catch(reject)
47
+      })
48
+    },
49
+    getKeyList ({ commit }, payload) {
50
+      return new Promise((resolve, reject) => {
51
+        ajax(api.caseManager.getKeyListById.url, {
52
+          method: api.caseManager.getKeyListById.method,
53
+          queryData: { ...payload },
54
+        }).then(res => {
55
+          resolve(res)
56
+        }).catch(reject)
57
+      })
58
+    },
19 59
     GetDeviceList ({ commit }, payload) {
20 60
       return new Promise((resolve, reject) => {
21 61
         ajax(api.device.list.url, {

+ 1
- 1
src/store/case/index.js 查看文件

@@ -12,7 +12,7 @@ export default {
12 12
       label: '案场3'
13 13
     }, {
14 14
       value: '',
15
-      label: '不限'
15
+      label: ''
16 16
     }],
17 17
   },
18 18
   mutations: {},

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

@@ -5,6 +5,7 @@ export default {
5 5
   namespaced: true,
6 6
   state: {
7 7
     courseList: [],
8
+    courseLister: [],
8 9
     courseInfo: {},
9 10
     courseImgs: [],
10 11
   },
@@ -12,6 +13,9 @@ export default {
12 13
     updateList (state, payload) {
13 14
       state.courseList = payload || []
14 15
     },
16
+    updateLister (state, payload) {
17
+      state.courseLister = payload.list || []
18
+    },
15 19
     updateInfo (state, payload) {
16 20
       state.courseInfo = payload || {}
17 21
     },
@@ -20,6 +24,19 @@ export default {
20 24
     }
21 25
   },
22 26
   actions: {
27
+    getCourseLister ({ commit }, payload) {
28
+      return new Promise((resolve, reject) => {
29
+        ajax(api.course.getCourseList.url, {
30
+          method: api.course.getCourseList.method,
31
+          queryData: {
32
+            ...payload,
33
+          }
34
+        }).then(res => {
35
+          commit('updateLister', res)
36
+          resolve(res)
37
+        }).catch(reject)
38
+      })
39
+    },
23 40
     GetCourseList ({ commit }, payload) {
24 41
       return new Promise((resolve, reject) => {
25 42
         ajax(api.course.list.url, {

+ 14
- 2
src/store/sta/sta.js 查看文件

@@ -158,8 +158,20 @@ export default {
158 158
     },
159 159
     getDashboardData ({ commit }, payload) {
160 160
       return new Promise((resolve, reject) => {
161
-        ajax(api.statistics.dashboardData.url, {
162
-          method: api.statistics.dashboardData.method,
161
+        ajax(api.dashboard.dashboardData.url, {
162
+          method: api.dashboard.dashboardData.method,
163
+          queryData: {
164
+            ...payload,
165
+          }
166
+        }).then(res => {
167
+          resolve(res)
168
+        }).catch(reject)
169
+      })
170
+    },
171
+    getDashboardBottomData ({ commit }, payload) {
172
+      return new Promise((resolve, reject) => {
173
+        ajax(api.dashboard.dashboardBottomData.url, {
174
+          method: api.dashboard.dashboardBottomData.method,
163 175
           queryData: {
164 176
             ...payload,
165 177
           }

+ 26
- 11
src/store/verification/verification.js 查看文件

@@ -12,17 +12,20 @@ export default {
12 12
     },
13 13
   },
14 14
   actions: {
15
-    GetCourseVerList ({ commit }, payload) {
16
-      ajax(api.verification.coursebycode.url, {
17
-        method: api.verification.coursebycode.method,
18
-        urlData: {
19
-          id: payload.id
20
-        },
21
-        queryData: {
22
-          ...payload
23
-        }
24
-      }).then(res => {
25
-        commit('updateCourseList', res)
15
+    GetCourseVerList ({ commit }, {id, payload}) {
16
+      return new Promise((resolve, reject) => {
17
+        ajax(api.verification.coursebycode.url, {
18
+          method: api.verification.coursebycode.method,
19
+          urlData: {
20
+            id,
21
+          },
22
+          queryData: {
23
+            ...payload
24
+          }
25
+        }).then(res => {
26
+          commit('updateCourseList', res)
27
+          resolve(res)
28
+        }).catch(reject)
26 29
       })
27 30
     },
28 31
     GetCourseVerListByTel ({ commit }, payload) {
@@ -74,5 +77,17 @@ export default {
74 77
         }).catch(reject)
75 78
       })
76 79
     },
80
+    getCustomerName ({ commit }, { id }) {
81
+      return new Promise((resolve, reject) => {
82
+        ajax(api.verification.getCustomerName.url, {
83
+          method: api.verification.getCustomerName.method,
84
+          urlData: {
85
+            id,
86
+          }
87
+        }).then(res => {
88
+          resolve(res)
89
+        }).catch(reject)
90
+      })
91
+    },
77 92
   },
78 93
 }

+ 8
- 0
src/style/main.css 查看文件

@@ -251,6 +251,10 @@ select:focus {
251 251
   min-width: 110px;
252 252
 }
253 253
 
254
+.mainForm>ul>li>span:first-child>em{
255
+  color: red;
256
+}
257
+
254 258
 .mainForm>ul>li>div>div{
255 259
   min-height: 40px;
256 260
   vertical-align: top;
@@ -395,6 +399,10 @@ select:focus {
395 399
   height: 100%;
396 400
 }
397 401
 
402
+.el-table th>.cell,
403
+.el-table .cell{
404
+  text-overflow: initial !important;
405
+}
398 406
 
399 407
 
400 408
 

+ 34
- 4
src/util/api.js 查看文件

@@ -85,6 +85,22 @@ const $api = {
85 85
     },
86 86
   },
87 87
   caseManager: {
88
+    getKeyListById: {
89
+      method: 'get',
90
+      url: `${baseUrl}${common}/case/key`
91
+    },
92
+    bindKeyByPhone: {
93
+      method: 'post',
94
+      url: `${baseUrl}${common}/case/key/:phone/:keyid`
95
+    },
96
+    bindKey: {
97
+      method: 'post',
98
+      url: `${baseUrl}${common}/case/key/:keyid/:customerid/:customername`
99
+    },
100
+    bindKeyByQrCode: {
101
+      method: 'post',
102
+      url: `${baseUrl}${common}/verify/case/key/:keyid/:customerid`
103
+    },
88 104
     getRolesList: { // 获取角色列表
89 105
       method: 'get',
90 106
       url: `${baseUrl}${common}/role`
@@ -463,6 +479,10 @@ const $api = {
463 479
     },
464 480
   },
465 481
   course: {
482
+    getCourseList: {
483
+      method: 'get',
484
+      url: `${baseUrl}${common}/courseues`
485
+    },
466 486
     list: {
467 487
       method: 'get',
468 488
       url: `${baseUrl}${common}/course`
@@ -557,6 +577,10 @@ const $api = {
557 577
       method: 'get',
558 578
       url: `${baseUrl}${common}/luckdrawlist/verify/:id`
559 579
     },
580
+    getCustomerName: {
581
+      method: 'get',
582
+      url: `${baseUrl}${common}/customer/tel/:id`
583
+    },
560 584
   },
561 585
   goodsOrder: {
562 586
     getOnlineOrder: {
@@ -703,7 +727,7 @@ const $api = {
703 727
     },
704 728
     getCouponList: { // 获取赠券卡券类型
705 729
       method: 'get',
706
-      url: `${baseUrl}${common}/coupon`
730
+      url: `${baseUrl}${common}/coupon/type/:type`
707 731
     }
708 732
   },
709 733
   statistics: {
@@ -764,9 +788,15 @@ const $api = {
764 788
       url: `${baseUrl}${common}/statistics/cardcouponverify/excel`
765 789
     },
766 790
   },
767
-  dashboardData: {
768
-    method: 'get',
769
-    url: `${baseUrl}${common}/dashboard`
791
+  dashboard: {
792
+    dashboardData: {
793
+      method: 'get',
794
+      url: `${baseUrl}${common}/dashboard`
795
+    },
796
+    dashboardBottomData: {
797
+      method: 'get',
798
+      url: `${baseUrl}${common}/dashboard/charts`
799
+    },
770 800
   },
771 801
   health: {
772 802
     healthList: {