Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/admin into dev

wangfei 6 years ago
parent
commit
5b9fe5d262

+ 1
- 1
dist/index.html View File

@@ -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_dwqa9wy3lkh.css><title>城的空间后台管理系统</title><link href=./static/css/app.17827823c93d74dee7e46991e4110b0f.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.20d40803890c09bdb1f5.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.3a28dbe108f6c677184da1640ee30ce6.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.04dcff85bd566e5cd631.js></script></body></html>

+ 1
- 1
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map View File

@@ -1 +1 @@
1
-{"version":3,"sources":["webpack:///webpack/bootstrap 1489349eb84498198675"],"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 1489349eb84498198675"],"sourceRoot":""}
1
+{"version":3,"sources":["webpack:///webpack/bootstrap 93603b774f6cc31b9ae9"],"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 93603b774f6cc31b9ae9"],"sourceRoot":""}

+ 2
- 1
src/pages/login/index.vue View File

@@ -96,7 +96,8 @@ export default {
96 96
           token: token
97 97
         }
98 98
       }).then(res => {
99
-        console.log(res)
99
+        // console.log(res)
100
+        document.onkeydown = function (event) {}
100 101
         this.saveToken(res.token)
101 102
         this.$message({
102 103
           message: '登陆成功',

+ 12
- 13
src/pages/system/cardAndCouponManager/cardManager/edit.vue View File

@@ -120,8 +120,7 @@
120 120
                   type="daterange"
121 121
                   range-separator="至"
122 122
                   start-placeholder="开始日期"
123
-                  end-placeholder="结束日期"
124
-                  :picker-options="pickerOptions">
123
+                  end-placeholder="结束日期">
125 124
                 </el-date-picker>
126 125
               </div>
127 126
             </div>
@@ -285,17 +284,17 @@ export default {
285 284
       defaultCaseId: x => x.app.cases.default,
286 285
       OrgId: x => x.app.user.OrgId,
287 286
     }),
288
-    pickerOptions () {
289
-      const courseId = this.cardInfo.Targets[0].TargetId
290
-      const couse = (this.courseList || []).filter(x => x.CourseId === courseId)[0] || {}
291
-      const beginDate = new Date(couse.BeginDate).getTime()
292
-      const endDate = new Date(couse.EndDate).getTime()
293
-      return {
294
-        disabledDate (time) {
295
-          return time.getTime() < beginDate || time.getTime() > endDate
296
-        }
297
-      }
298
-    },
287
+    // pickerOptions () {
288
+    //   const courseId = this.cardInfo.Targets[0].TargetId
289
+    //   const couse = (this.courseList || []).filter(x => x.CourseId === courseId)[0] || {}
290
+    //   const beginDate = new Date(couse.BeginDate).getTime()
291
+    //   const endDate = new Date(couse.EndDate).getTime()
292
+    //   return {
293
+    //     disabledDate (time) {
294
+    //       return time.getTime() < beginDate || time.getTime() > endDate
295
+    //     }
296
+    //   }
297
+    // },
299 298
     CaseId: {
300 299
       get () {
301 300
         return this.postData.caseid || this.defaultCaseId

+ 1
- 1
src/pages/system/cardAndCouponManager/couponManager/index.vue View File

@@ -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,

+ 17
- 18
src/pages/system/cmsManager/indexMsg/add.vue View File

@@ -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 View File

@@ -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)

+ 33
- 5
src/pages/system/marketingActivities/addActivities/index.vue View File

@@ -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>
@@ -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({

+ 1
- 1
src/pages/system/newOrder/newOrderList/index.vue View File

@@ -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-v2/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)

+ 138
- 13
src/pages/system/verificationManager/qrcodeVerification/verificationList/index.vue View File

@@ -59,19 +59,90 @@
59 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;

+ 10
- 0
src/store/case/device.js View File

@@ -16,6 +16,16 @@ 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
+    },
19 29
     bindKeyByPhone ({ commit }, payload) {
20 30
       return new Promise((resolve, reject) => {
21 31
         ajax(api.caseManager.bindKeyByPhone.url, {

+ 14
- 11
src/store/verification/verification.js View File

@@ -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) {

+ 4
- 0
src/util/api.js View File

@@ -97,6 +97,10 @@ const $api = {
97 97
       method: 'post',
98 98
       url: `${baseUrl}${common}/case/key/:keyid/:customerid/:customername`
99 99
     },
100
+    bindKeyByQrCode: {
101
+      method: 'post',
102
+      url: `${baseUrl}${common}/verify/case/key/:keyid/:customerid`
103
+    },
100 104
     getRolesList: { // 获取角色列表
101 105
       method: 'get',
102 106
       url: `${baseUrl}${common}/role`