yuantianjiao 6 vuotta sitten
vanhempi
commit
ae947492e9
29 muutettua tiedostoa jossa 281 lisäystä ja 917 poistoa
  1. 1
    0
      dist/index.html
  2. BIN
      dist/static/fonts/element-icons.6f0a763.ttf
  3. 0
    2
      dist/static/js/manifest.3ad1d5771e9b13dbdad2.js
  4. 1
    1
      dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  5. 11
    1
      src/pages/system/cardAndCouponManager/bodyBuildingCardManager/edit.vue
  6. 11
    3
      src/pages/system/cardAndCouponManager/bodyBuildingCardManager/index.vue
  7. 17
    3
      src/pages/system/cardAndCouponManager/cardManager/edit.vue
  8. 3
    2
      src/pages/system/cardAndCouponManager/cardManager/index.vue
  9. 0
    802
      src/pages/system/cardAndCouponManager/couponManager/edit.vue
  10. 9
    3
      src/pages/system/cardAndCouponManager/couponManager/index.vue
  11. 7
    6
      src/pages/system/cardAndCouponManager/givingRecords.vue
  12. 6
    2
      src/pages/system/cardAndCouponManager/vipManager/index.vue
  13. 1
    1
      src/pages/system/caseManager/signinManager/index.vue
  14. 13
    13
      src/pages/system/cmsManager/majorProjects/edit.vue
  15. 48
    38
      src/pages/system/courseManager/courseList/add.vue
  16. 6
    6
      src/pages/system/courseManager/scheduleManager/index.vue
  17. 73
    16
      src/pages/system/dashboard/index.vue
  18. 36
    0
      src/pages/system/dashboard/page.scss
  19. 2
    2
      src/pages/system/dataStatistics/cardCouponUsedList/index.vue
  20. 2
    2
      src/pages/system/dataStatistics/courseOrderList/index.vue
  21. 2
    2
      src/pages/system/dataStatistics/goodsOrderList/index.vue
  22. 1
    1
      src/pages/system/newOrder/caseRecord/index.vue
  23. 2
    2
      src/pages/system/newOrder/newOrderList/index.vue
  24. 13
    2
      src/pages/system/verificationManager/phoneVerification/index.vue
  25. 1
    0
      src/pages/system/verificationManager/phoneVerification/verificationList/index.vue
  26. 3
    1
      src/store/app.js
  27. 2
    2
      src/store/cms/case.js
  28. 3
    1
      src/util/ajax.js
  29. 7
    3
      src/util/api.js

+ 1
- 0
dist/index.html Näytä tiedosto

@@ -0,0 +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.9da93fc0afa1628cf2ccaf4da55cc10e.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.d18f63f8de3ea0e97eda.js></script></body></html>

BIN
dist/static/fonts/element-icons.6f0a763.ttf Näytä tiedosto


+ 0
- 2
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js Näytä tiedosto

@@ -1,2 +0,0 @@
1
-!function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a<e.length;a++)i=e[a],o[i]&&l.push(o[i][0]),o[i]=0;for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(r[f]=u[f]);for(n&&n(e,u,c);l.length;)l.shift()();if(c)for(a=0;a<c.length;a++)p=t(t.s=c[a]);return p};var e={},o={2:0};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=e,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:e})},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="./",t.oe=function(r){throw console.error(r),r}}([]);
2
-//# sourceMappingURL=manifest.3ad1d5771e9b13dbdad2.js.map

+ 1
- 1
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map Näytä tiedosto

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

+ 11
- 1
src/pages/system/cardAndCouponManager/bodyBuildingCardManager/edit.vue Näytä tiedosto

@@ -121,6 +121,7 @@
121 121
               <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
122 122
                 <el-date-picker
123 123
                   value-format="yyyy-MM-ddT00:00:00Z"
124
+                  :picker-options="pickerOptions"
124 125
                   v-model="cardInfo.StartDate"
125 126
                   type="date"
126 127
                   placeholder="选择起始日期"
@@ -129,6 +130,7 @@
129 130
                 <span style="line-height:40px;">至</span>
130 131
                 <el-date-picker
131 132
                   value-format="yyyy-MM-ddT23:59:59Z"
133
+                  :picker-options="pickerOptions"
132 134
                   v-model="cardInfo.EndDate"
133 135
                   type="date"
134 136
                   placeholder="选择截止日期"
@@ -276,7 +278,15 @@ export default {
276 278
       set (val) {
277 279
         this.postData.caseid = val
278 280
       }
279
-    }
281
+    },
282
+    pickerOptions () {
283
+      var beginDate = Date.now() - 24 * 60 * 60 * 1000
284
+      return {
285
+        disabledDate (time) {
286
+          return time.getTime() < beginDate
287
+        }
288
+      }
289
+    },
280 290
   },
281 291
   methods: {
282 292
     ...mapGymCardActions([

+ 11
- 3
src/pages/system/cardAndCouponManager/bodyBuildingCardManager/index.vue Näytä tiedosto

@@ -135,13 +135,13 @@
135 135
         <ul class="dialogSearchList flex-h">
136 136
           <li class="flex-item">
137 137
             <el-date-picker
138
-              value-format="yyyy-MM-ddT00:00:00Z"
138
+              value-format="yyyy-MM-dd"
139 139
               v-model="dialogPostData.begindate"
140 140
               type="date"
141 141
               placeholder="选择起始日期">
142 142
             </el-date-picker>
143 143
             <el-date-picker
144
-              value-format="yyyy-MM-ddT23:59:59Z"
144
+              value-format="yyyy-MM-dd"
145 145
               v-model="dialogPostData.enddate"
146 146
               type="date"
147 147
               placeholder="选择截止日期">
@@ -274,7 +274,15 @@ export default {
274 274
       set (val) {
275 275
         this.postData.caseid = val
276 276
       }
277
-    }
277
+    },
278
+    pickerOptions () {
279
+      var beginDate = Date.now() - 24 * 60 * 60 * 1000
280
+      return {
281
+        disabledDate (time) {
282
+          return time.getTime() < beginDate
283
+        }
284
+      }
285
+    },
278 286
   },
279 287
   methods: {
280 288
     ...mapGymCardActions([

+ 17
- 3
src/pages/system/cardAndCouponManager/cardManager/edit.vue Näytä tiedosto

@@ -122,13 +122,14 @@
122 122
                   value-format="yyyy-MM-ddT00:00:00Z"
123 123
                   :disabled="isEdit"
124 124
                   v-model="cardInfo.StartDate"
125
+                  :picker-options="pickerOptions"
125 126
                   type="date"
126 127
                   placeholder="选择起始日期">
127 128
                 </el-date-picker>
128 129
                 <span style="line-height:40px;">至</span>
129 130
                 <el-date-picker
130 131
                   value-format="yyyy-MM-ddT23:59:59Z"
131
-                  :disabled="isEdit"
132
+                  :disabled="true"
132 133
                   v-model="cardInfo.EndDate"
133 134
                   type="date"
134 135
                   placeholder="选择截止日期">
@@ -324,7 +325,16 @@ export default {
324 325
       set (val) {
325 326
         this.postData.caseid = val
326 327
       }
327
-    }
328
+    },
329
+    pickerOptions () {
330
+      var beginDate = Date.now() - 24 * 60 * 60 * 1000
331
+      var endDate = new Date(this.cardInfo.EndDate).getTime()
332
+      return {
333
+        disabledDate (time) {
334
+          return time.getTime() < beginDate || time.getTime() > endDate
335
+        }
336
+      }
337
+    },
328 338
   },
329 339
   methods: {
330 340
     ...mapCardActions([
@@ -339,7 +349,11 @@ export default {
339 349
       'GetChannelListList',
340 350
     ]),
341 351
     courseChange () {
342
-      // 1
352
+      for (var n = 0; n < this.courseList.length; n++) {
353
+        if (this.courseList[n].CourseId === this.cardInfo.Targets[0].TargetId) {
354
+          this.cardInfo.EndDate = this.courseList[n].EndDate
355
+        }
356
+      }
343 357
     },
344 358
     caseChange () { // 选择案场
345 359
       this.GetChannelListList({

+ 3
- 2
src/pages/system/cardAndCouponManager/cardManager/index.vue Näytä tiedosto

@@ -110,6 +110,7 @@
110 110
       title="选择赠送客户"
111 111
       :visible.sync="centerDialogVisible"
112 112
       width="800px"
113
+      @close="dialogPostData.page = 1"
113 114
       center>
114 115
       <div>
115 116
         <ul class="dialogSearchList flex-h" style="margin-bottom:10px;">
@@ -141,13 +142,13 @@
141 142
         <ul class="dialogSearchList flex-h">
142 143
           <li class="flex-item">
143 144
             <el-date-picker
144
-              value-format="yyyy-MM-ddT00:00:00Z"
145
+              value-format="yyyy-MM-dd"
145 146
               v-model="dialogPostData.begindate"
146 147
               type="date"
147 148
               placeholder="选择起始日期">
148 149
             </el-date-picker>
149 150
             <el-date-picker
150
-              value-format="yyyy-MM-ddT23:59:59Z"
151
+              value-format="yyyy-MM-dd"
151 152
               v-model="dialogPostData.enddate"
152 153
               type="date"
153 154
               placeholder="选择截止日期">

+ 0
- 802
src/pages/system/cardAndCouponManager/couponManager/edit.vue Näytä tiedosto

@@ -1,802 +0,0 @@
1
-<template>
2
-  <div class="subPage">
3
-    <form class="mainForm">
4
-      <!-- <h1 style="font-size:22px;">{{isEdit === 0 ? '新建' : '编辑'}}{{couponInfo.CouponType === 'goods' ? '饮品优惠券' : '课程优惠券'}}</h1> -->
5
-      <ul>
6
-        <li class="flex-h">
7
-          <span>选择案场:<em>*</em></span>
8
-          <div class="flex-item">
9
-            <div style="width:50%">
10
-              <el-select v-model="couponInfo.CaseId" placeholder="请选择" @change="caseChange" :disabled="isEdit">
11
-                <el-option
12
-                  v-for="item in cases"
13
-                  :key="item.CaseId"
14
-                  :label="item.CaseName"
15
-                  :value="item.CaseId">
16
-                </el-option>
17
-              </el-select>
18
-            </div>
19
-          </div>
20
-        </li>
21
-        <li class="flex-h">
22
-          <span>券图片:<em>*</em></span>
23
-          <div class="flex-item">
24
-            <div>
25
-              <el-upload
26
-                :disabled="isEdit"
27
-                class="avatar-uploader"
28
-                action='string'
29
-                :http-request="toolClass.upload"
30
-                :show-file-list="false"
31
-                :on-success="handleAvatarSuccess">
32
-                <img v-if="couponInfo.Images[0].CouponImageUrl" :src="couponInfo.Images[0].CouponImageUrl" class="avatar">
33
-                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
34
-              </el-upload>
35
-            </div>
36
-          </div>
37
-        </li>
38
-        <li class="flex-h">
39
-          <span>券名称:<em>*</em></span>
40
-          <div class="flex-item">
41
-            <div style="width:200px;">
42
-              <el-input
43
-                placeholder="请输入"
44
-                v-model="couponInfo.CouponName"
45
-                clearable>
46
-              </el-input>
47
-            </div>
48
-          </div>
49
-        </li>
50
-        <li class="flex-h">
51
-          <span>券类型:<em>*</em></span>
52
-          <div class="flex-item">
53
-            <div style="width:50%">
54
-              <el-select v-model="couponInfo.CouponType" placeholder="请选择" @change="couponTypeChange" :disabled="isEdit">
55
-                <el-option
56
-                  v-for="item in TypeList"
57
-                  :key="item.id"
58
-                  :label="item.value"
59
-                  :value="item.id">
60
-                </el-option>
61
-              </el-select>
62
-            </div>
63
-          </div>
64
-        </li>
65
-        <li class="flex-h">
66
-          <span>券价格:<em>*</em></span>
67
-          <div class="flex-item">
68
-            <div style="width:200px;">
69
-              <el-input
70
-                :disabled="isEdit"
71
-                placeholder="请输入"
72
-                v-model="couponInfo.Price"
73
-                clearable>
74
-              </el-input>
75
-            </div>
76
-          </div>
77
-        </li>
78
-        <li class="flex-h">
79
-          <span>总张数:<em>*</em></span>
80
-          <div class="flex-item">
81
-            <div style="width:200px;">
82
-              <el-input
83
-                :disabled="isEdit"
84
-                placeholder="请输入"
85
-                v-model="couponInfo.TotalCount"
86
-                clearable>
87
-              </el-input>
88
-            </div>
89
-          </div>
90
-        </li>
91
-        <li class="flex-h">
92
-          <span>发送类型:<em>*</em></span>
93
-          <div class="flex-item">
94
-            <div>
95
-              <el-radio v-model="couponInfo.SendType" label="channel" :disabled="isEdit">渠道</el-radio>
96
-              <el-radio v-if="couponInfo.CouponType === 'course'" v-model="couponInfo.SendType" label="case" :disabled="isEdit">案场</el-radio>
97
-              <el-radio v-model="couponInfo.SendType" label="system" :disabled="isEdit">系统</el-radio>
98
-            </div>
99
-          </div>
100
-        </li>
101
-        <li class="flex-h" v-if="couponInfo.SendType === 'channel'">
102
-          <span>选择渠道:<em>*</em></span>
103
-          <div class="flex-item">
104
-            <div style="width:50%">
105
-              <el-select v-model="couponInfo.ChannelId" placeholder="请选择" :disabled="isEdit">
106
-                <el-option
107
-                  v-for="item in channelList"
108
-                  :key="item.ChannelId"
109
-                  :label="item.ChannelName"
110
-                  :value="item.ChannelId">
111
-                </el-option>
112
-              </el-select>
113
-            </div>
114
-          </div>
115
-        </li>
116
-        <li class="flex-h">
117
-          <span>目标商品:<em>*</em></span>
118
-          <div class="flex-item">
119
-            <div>
120
-              <el-radio v-model="couponInfo.IsAll" label="1" :disabled="isEdit">全部商品</el-radio>
121
-              <el-radio v-model="couponInfo.IsAll" label="0" :disabled="isEdit">指定商品</el-radio>
122
-            </div>
123
-          </div>
124
-        </li>
125
-        <li class="flex-h" v-if="couponInfo.IsAll === '0'">
126
-          <div class="flex-item">
127
-            <div style="border: 1px solid #eee;">
128
-              <el-table
129
-                :data="couponInfo.Targets"
130
-                stripe
131
-                style="width: 100%">
132
-                <el-table-column
133
-                  prop="TargetName"
134
-                  label="商品">
135
-                </el-table-column>
136
-                <el-table-column
137
-                  prop="TargetType"
138
-                  label="分类">
139
-                  <template slot-scope="scope">
140
-                    {{returnGoodsType(scope.row.TargetType)}}
141
-                  </template>
142
-                </el-table-column>
143
-                <el-table-column label="操作">
144
-                  <template slot-scope="scope">
145
-                    <el-button
146
-                      size="mini"
147
-                      type="warning"
148
-                      @click="deleteGoodsItem(scope.$index, scope.row)" :disabled="isEdit">删除</el-button>
149
-                  </template>
150
-                </el-table-column>
151
-              </el-table>
152
-              <div style="text-align:center;padding:10px 0;">
153
-                <el-button type="success" size="mini" @click="addGoods" :disabled="isEdit">添加商品</el-button>
154
-              </div>
155
-            </div>
156
-          </div>
157
-        </li>
158
-        <li class="flex-h" v-if="couponInfo.CouponType === 'goods'">
159
-          <span>券有效时间:<em>*</em></span>
160
-          <div class="flex-item">
161
-            <div>
162
-              <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
163
-                <el-radio v-model="postData.TimeType" label="1" :disabled="isEdit">固定时间</el-radio>
164
-                <el-date-picker
165
-                  value-format="yyyy-MM-ddT00:00:00Z"
166
-                  :disabled="isEdit"
167
-                  v-model="couponInfo.StartDate"
168
-                  type="date"
169
-                  placeholder="选择起始日期">
170
-                </el-date-picker>
171
-                <span style="line-height:40px;">至</span>
172
-                <el-date-picker
173
-                  value-format="yyyy-MM-ddT23:59:59Z"
174
-                  :disabled="isEdit"
175
-                  v-model="couponInfo.EndDate"
176
-                  type="date"
177
-                  placeholder="选择截止日期">
178
-                </el-date-picker>
179
-              </div>
180
-              <div class="addLine flex-h" style="align-item:center;">
181
-                <el-radio v-model="postData.TimeType" label="2" :disabled="isEdit">领取后</el-radio>
182
-                <span style="width:100px;">
183
-                  <el-input
184
-                    :disabled="isEdit"
185
-                    placeholder="请输入"
186
-                    v-model="couponInfo.ValidDays"
187
-                    clearable>
188
-                  </el-input>
189
-                </span>
190
-                <span style="line-height:40px;">天</span>
191
-              </div>
192
-            </div>
193
-          </div>
194
-        </li>
195
-        <li class="flex-h" v-if="couponInfo.CouponType === 'course'">
196
-          <span>券有效时间:<em>*</em></span>
197
-          <div class="flex-item">
198
-            <div>
199
-              <el-date-picker
200
-                value-format="yyyy-MM-ddT00:00:00Z"
201
-                :disabled="isEdit"
202
-                v-model="couponInfo.StartDate"
203
-                type="date"
204
-                placeholder="选择起始日期">
205
-              </el-date-picker>
206
-              <span style="line-height:40px;">至</span>
207
-              <el-date-picker
208
-                value-format="yyyy-MM-ddT23:59:59Z"
209
-                :disabled="isEdit"
210
-                v-model="couponInfo.EndDate"
211
-                type="date"
212
-                placeholder="选择截止日期">
213
-              </el-date-picker>
214
-            </div>
215
-          </div>
216
-        </li>
217
-        <li class="flex-h" v-if="couponInfo.SendType !== 'case' && couponInfo.SendType !== 'system'">
218
-          <span>视频:<em>*</em></span>
219
-          <div class="flex-item">
220
-            <div style="vertical-align: middle;">
221
-              <a style="line-height: 40px;" v-if="videoOff" :href="couponInfo.VideoUrl" target="blank">{{couponInfo.VideoUrl}}</a>
222
-              <el-upload
223
-                :disabled="isEdit"
224
-                class="avatar-uploader"
225
-                action='string'
226
-                :http-request="toolClass.upload"
227
-                :show-file-list="false"
228
-                :on-success="videoSuccess">
229
-                <a style="line-height: 40px;padding: 0 10px;" :disabled="isEdit">{{videoOff ? '更换' : '添加'}}视频</a>
230
-              </el-upload>
231
-              <el-button v-if="videoOff" type="danger" @click="deleteVideo" :disabled="isEdit">删除视频</el-button>
232
-            </div>
233
-          </div>
234
-        </li>
235
-        <li class="flex-h">
236
-          <span>分享描述:<em>*</em></span>
237
-          <div class="flex-item">
238
-            <div>
239
-              <el-input
240
-                type="textarea"
241
-                :rows="2"
242
-                placeholder="请输入"
243
-                v-model="couponInfo.Share.CouponShareInfo">
244
-              </el-input>
245
-            </div>
246
-          </div>
247
-        </li>
248
-        <li class="flex-h">
249
-          <span>规则描述:<em>*</em></span>
250
-          <div class="flex-item">
251
-            <div>
252
-              <el-input
253
-                type="textarea"
254
-                :rows="2"
255
-                placeholder="请输入"
256
-                v-model="couponInfo.Share.UseRule">
257
-              </el-input>
258
-            </div>
259
-          </div>
260
-        </li>
261
-        <li class="flex-h">
262
-          <span>使用说明:<em>*</em></span>
263
-          <div class="flex-item">
264
-            <div>
265
-              <el-input
266
-                type="textarea"
267
-                :rows="2"
268
-                placeholder="请输入"
269
-                v-model="couponInfo.Share.UseInstruction">
270
-              </el-input>
271
-            </div>
272
-          </div>
273
-        </li>
274
-        <li style="text-align:center">
275
-          <el-button type="primary" size="mini" @click="submit">保存</el-button>
276
-          <el-button type="danger" size="mini" @click="cancel">取消</el-button>
277
-        </li>
278
-      </ul>
279
-    </form>
280
-    <el-dialog
281
-      title="选择指定商品"
282
-      :visible.sync="centerDialogVisible"
283
-      width="650px"
284
-      center>
285
-      <div>
286
-        <div v-if="couponInfo.CouponType === 'goods'">
287
-          <el-table
288
-            ref="multipleTable"
289
-            :data="goodsList.list"
290
-            tooltip-effect="dark"
291
-            style="width: 100%"
292
-            @selection-change="handleGoodsChange">
293
-            <el-table-column
294
-              type="selection">
295
-            </el-table-column>
296
-            <el-table-column
297
-              prop="GoodsName"
298
-              label="商品名称">
299
-            </el-table-column>
300
-            <el-table-column
301
-              prop="TypeId"
302
-              label="类别">
303
-              <template slot-scope="scope">
304
-                <span>{{returnGoodsType(scope.row.TypeId)}}</span>
305
-              </template>
306
-            </el-table-column>
307
-            <el-table-column
308
-              prop="Price"
309
-              label="价格">
310
-            </el-table-column>
311
-          </el-table>
312
-          <el-pagination
313
-            @current-change="handleCurrentChange"
314
-            :current-page.sync="postData.page"
315
-            :page-size="postData.pagesize"
316
-            layout="prev, pager, next, jumper"
317
-            :total="total">
318
-          </el-pagination>
319
-        </div>
320
-        <div v-if="couponInfo.CouponType === 'course'">
321
-          <el-table
322
-            ref="multipleTable"
323
-            :data="courseList"
324
-            tooltip-effect="dark"
325
-            style="width: 100%"
326
-            @selection-change="handleCourseChange">
327
-            <el-table-column
328
-              type="selection">
329
-            </el-table-column>
330
-            <el-table-column
331
-              prop="CourseName"
332
-              label="课程名称">
333
-            </el-table-column>
334
-            <el-table-column
335
-              prop="BeginDate"
336
-              label="开始时间">
337
-              <template slot-scope="scope">
338
-                <span>{{toolClass.dateFormat(scope.row.BeginDate, 'yyyy-MM-dd')}}</span>
339
-              </template>
340
-            </el-table-column>
341
-            <el-table-column
342
-              prop="EndDate"
343
-              label="结束时间">
344
-              <template slot-scope="scope">
345
-                <span>{{toolClass.dateFormat(scope.row.EndDate, 'yyyy-MM-dd')}}</span>
346
-              </template>
347
-            </el-table-column>
348
-            <el-table-column
349
-              prop="LocationId"
350
-              label="类别">
351
-            </el-table-column>
352
-            <el-table-column
353
-              prop="Price"
354
-              label="价格">
355
-            </el-table-column>
356
-          </el-table>
357
-          <el-pagination
358
-            @current-change="handleCurrentChange"
359
-            :current-page.sync="postData.page"
360
-            :page-size="postData.pagesize"
361
-            layout="prev, pager, next, jumper"
362
-            :total="total">
363
-          </el-pagination>
364
-        </div>
365
-      </div>
366
-      <span slot="footer" class="dialog-footer">
367
-        <el-button @click="centerDialogVisible = false">取 消</el-button>
368
-        <el-button type="primary" @click="sureAddItem">确 定</el-button>
369
-      </span>
370
-    </el-dialog>
371
-  </div>
372
-</template>
373
-
374
-<script>
375
-import { mapState, createNamespacedHelpers } from 'vuex'
376
-const { mapActions: mapCouponActions } = createNamespacedHelpers('coupon')
377
-const { mapState: mapChannelState, mapActions: mapChannelActions } = createNamespacedHelpers('channel')
378
-const { mapState: mapGoodsState, mapActions: mapGoodsActions } = createNamespacedHelpers('goods')
379
-const { mapState: mapCourseState, mapActions: mapCourseActions } = createNamespacedHelpers('course')
380
-
381
-export default {
382
-  name: '',
383
-  data () {
384
-    return {
385
-      videoOff: false,
386
-      total: 0,
387
-      centerDialogVisible: false,
388
-      type: this.$route.query.type || '', // goods、course
389
-      isEdit: !!this.$route.query.id,
390
-      ChannelList: [], // 渠道列表
391
-      TypeList: [{ // 类型列表
392
-        value: '商品券',
393
-        id: 'goods'
394
-      }, {
395
-        value: '课程券',
396
-        id: 'course'
397
-      }],
398
-      currentList: [{
399
-        Name: 'ccc',
400
-        Type: 'xxx'
401
-      }], // 指定商品数据
402
-      couponInfo: {
403
-        CaseId: '',
404
-        CouponName: '',
405
-        CouponType: '',
406
-        Price: '',
407
-        TotalCount: '',
408
-        SendType: '',
409
-        IsAll: '',
410
-        StartDate: '',
411
-        EndDate: '',
412
-        ValidDays: '',
413
-        VideoUrl: '',
414
-        ChannelId: '',
415
-        Images: [{
416
-          CouponImageUrl: ''
417
-        }],
418
-        Share: {
419
-          CouponShareInfo: '',
420
-          UseRule: '',
421
-          UseInstruction: ''
422
-        },
423
-        Targets: []
424
-      },
425
-      postData: {
426
-        page: 1,
427
-        pagesize: 6,
428
-      },
429
-      currentSelectArr: [],
430
-    }
431
-  },
432
-  mounted () {
433
-    this.$nextTick(function () {
434
-      this.GetChannelListList({
435
-        caseid: this.defaultCaseId,
436
-        page: 1,
437
-        pagesize: 10000
438
-      }).then(() => {
439
-        this.GetGoodTypes({ pagesize: 1000, caseid: this.$route.query.caseid }).then(() => {
440
-          if (this.$route.query.id) {
441
-            this.getCouponById({
442
-              id: this.$route.query.id
443
-            }).then((res) => {
444
-              // console.log(JSON.stringify(res))
445
-              if (res.coupon.CaseId !== '') {
446
-                var aRes = res
447
-                this.GetChannelListList({
448
-                  caseid: res.coupon.CaseId,
449
-                  page: 1,
450
-                  pagesize: 10000
451
-                }).then((res) => {
452
-                  aRes.coupon.IsAll = String(aRes.coupon.IsAll)
453
-                  if (aRes.coupon.VideoUrl !== '') {
454
-                    this.videoOff = true
455
-                  }
456
-                  this.couponInfo = aRes.coupon
457
-                })
458
-              } else {
459
-                res.coupon.IsAll = String(res.coupon.IsAll)
460
-                if (res.coupon.VideoUrl !== '') {
461
-                  this.videoOff = true
462
-                }
463
-                this.couponInfo = res.coupon
464
-              }
465
-            })
466
-          }
467
-        })
468
-      })
469
-    })
470
-  },
471
-  computed: {
472
-    ...mapState({
473
-      cases: x => x.app.cases.list,
474
-      defaultCaseId: x => x.app.cases.default
475
-    }),
476
-    ...mapChannelState({
477
-      channelList: x => x.channelList,
478
-    }),
479
-    ...mapGoodsState({
480
-      goodsList: x => x.goodsList,
481
-      goodsTypes: x => x.goodsTypes.list,
482
-    }),
483
-    ...mapCourseState({
484
-      courseList: x => x.courseLister,
485
-    }),
486
-    CaseId: {
487
-      get () {
488
-        return this.couponInfo.caseid || this.defaultCaseId
489
-      },
490
-      set (val) {
491
-        this.couponInfo.caseid = val
492
-      }
493
-    },
494
-  },
495
-  methods: {
496
-    ...mapGoodsActions([
497
-      'GetGoodsList',
498
-      'GetGoodTypes',
499
-    ]),
500
-    ...mapCouponActions([
501
-      'addCoupon',
502
-      'getCouponById',
503
-      'editCoupon',
504
-    ]),
505
-    ...mapChannelActions([
506
-      'GetChannelListList',
507
-    ]),
508
-    ...mapCourseActions([
509
-      'getCourseLister',
510
-    ]),
511
-    returnGoodsType (val) {
512
-      for (var n = 0; n < this.goodsTypes.length; n++) {
513
-        if (this.goodsTypes[n].TypeId === val) {
514
-          return this.goodsTypes[n].TypeName
515
-        }
516
-      }
517
-    },
518
-    deleteVideo () { // 删除视频
519
-      this.couponInfo.VideoUrl = ''
520
-      this.videoOff = false
521
-    },
522
-    caseChange () { // 选择案场
523
-      this.couponInfo.ChannelId = ''
524
-      this.GetChannelListList({
525
-        caseid: this.couponInfo.CaseId,
526
-        page: 1,
527
-        pagesize: 10000
528
-      })
529
-    },
530
-    sureAddItem () { // 确定添加指定商品
531
-      var bool = true
532
-      this.couponInfo.Targets = this.couponInfo.Targets || []
533
-      if (this.couponInfo.CouponType === 'goods') {
534
-        for (var n = 0; n < this.currentSelectArr.length; n++) {
535
-          if (this.couponInfo.Targets.length) {
536
-            bool = true
537
-            for (var a = 0; a < this.couponInfo.Targets.length; a++) {
538
-              if (this.currentSelectArr[n].GoodsId === this.couponInfo.Targets[a].TargetId) {
539
-                bool = false
540
-              }
541
-            }
542
-            if (bool) {
543
-              this.couponInfo.Targets.push({
544
-                TargetName: this.currentSelectArr[n].GoodsName,
545
-                TargetId: this.currentSelectArr[n].GoodsId,
546
-                TargetType: this.currentSelectArr[n].TypeId
547
-              })
548
-            }
549
-          } else {
550
-            this.couponInfo.Targets.push({
551
-              TargetName: this.currentSelectArr[n].GoodsName,
552
-              TargetId: this.currentSelectArr[n].GoodsId,
553
-              TargetType: this.currentSelectArr[n].TypeId
554
-            })
555
-          }
556
-        }
557
-      } else if (this.couponInfo.CouponType === 'course') {
558
-        for (var x = 0; x < this.currentSelectArr.length; x++) {
559
-          if (this.couponInfo.Targets.length) {
560
-            bool = true
561
-            for (var y = 0; y < this.couponInfo.Targets.length; y++) {
562
-              if (this.currentSelectArr[x].CourseId === this.couponInfo.Targets[y].TargetId) {
563
-                bool = false
564
-              }
565
-            }
566
-            if (bool) {
567
-              this.couponInfo.Targets.push({
568
-                TargetName: this.currentSelectArr[x].CourseName,
569
-                TargetId: this.currentSelectArr[x].CourseId,
570
-                TargetType: this.currentSelectArr[x].CourseType
571
-              })
572
-            }
573
-          } else {
574
-            this.couponInfo.Targets.push({
575
-              TargetName: this.currentSelectArr[x].CourseName,
576
-              TargetId: this.currentSelectArr[x].CourseId,
577
-              TargetType: this.currentSelectArr[x].CourseType
578
-            })
579
-          }
580
-        }
581
-      }
582
-      this.centerDialogVisible = false
583
-    },
584
-    handleGoodsChange (val) {
585
-      this.currentSelectArr = val
586
-    },
587
-    handleCourseChange (val) {
588
-      this.currentSelectArr = val
589
-    },
590
-    couponTypeChange () {
591
-      if (this.goodsList.length) {
592
-        this.goodsList = []
593
-      }
594
-      if (this.courseList.length) {
595
-        this.courseList = []
596
-      }
597
-      this.couponInfo.Targets = []
598
-    },
599
-    addGoods () { // 添加指定商品
600
-      if (this.couponInfo.CouponType === 'goods') {
601
-        this.GetGoodsList({
602
-          ...this.postData,
603
-          caseid: this.couponInfo.CaseId
604
-        }).then((res) => {
605
-          this.total = res.pagenum
606
-          this.centerDialogVisible = true
607
-        })
608
-      } else if (this.couponInfo.CouponType === 'course') {
609
-        this.getCourseLister({
610
-          ...this.postData,
611
-          caseid: this.couponInfo.CaseId
612
-        }).then((res) => {
613
-          this.total = res.pagenum
614
-          this.centerDialogVisible = true
615
-          console.log(JSON.stringify(this.courseList))
616
-        })
617
-      }
618
-    },
619
-    checkInfo () { // 校验表单信息
620
-      if (this.couponInfo.CaseId === '') {
621
-        this.$message({
622
-          type: 'error',
623
-          message: '案场不能为空'
624
-        })
625
-        return false
626
-      }
627
-      if (this.couponInfo.Images[0].CouponImageUrl === '') {
628
-        this.$message({
629
-          type: 'error',
630
-          message: '券图片不能为空'
631
-        })
632
-        return false
633
-      }
634
-      if (this.couponInfo.CouponName === '') {
635
-        this.$message({
636
-          type: 'error',
637
-          message: '券名称不能为空'
638
-        })
639
-        return false
640
-      }
641
-      if (this.couponInfo.CouponType === '') {
642
-        this.$message({
643
-          type: 'error',
644
-          message: '券类型不能为空'
645
-        })
646
-        return false
647
-      }
648
-      if (this.couponInfo.Price === '') {
649
-        this.$message({
650
-          type: 'error',
651
-          message: '券价格不能为空'
652
-        })
653
-        return false
654
-      }
655
-      if (this.couponInfo.TotalCount === '') {
656
-        this.$message({
657
-          type: 'error',
658
-          message: '总张数不能为空'
659
-        })
660
-        return false
661
-      }
662
-      if (this.couponInfo.SendType === '') {
663
-        this.$message({
664
-          type: 'error',
665
-          message: '发送类型不能为空'
666
-        })
667
-        return false
668
-      }
669
-      if (this.couponInfo.SendType === 'channel' && this.couponInfo.ChannelId === '') {
670
-        this.$message({
671
-          type: 'error',
672
-          message: '渠道不能为空'
673
-        })
674
-        return false
675
-      }
676
-      if (this.couponInfo.IsAll === 0 && this.couponInfo.Targets[0].TargetId === '') {
677
-        this.$message({
678
-          type: 'error',
679
-          message: '目标商品不能为空'
680
-        })
681
-        return false
682
-      }
683
-      if (this.couponInfo.SendType === 'channel' && this.couponInfo.VideoUrl === '') {
684
-        this.$message({
685
-          type: 'error',
686
-          message: '视频不能为空'
687
-        })
688
-        return false
689
-      }
690
-      if (this.couponInfo.Share.CouponShareInfo === '') {
691
-        this.$message({
692
-          type: 'error',
693
-          message: '分享描述不能为空'
694
-        })
695
-        return false
696
-      }
697
-      if (this.couponInfo.Share.UseRule === '') {
698
-        this.$message({
699
-          type: 'error',
700
-          message: '使用规则不能为空'
701
-        })
702
-        return false
703
-      }
704
-      if (this.couponInfo.Share.UseInstruction === '') {
705
-        this.$message({
706
-          type: 'error',
707
-          message: '使用说明不能为空'
708
-        })
709
-        return false
710
-      }
711
-      return true
712
-    },
713
-    submit () { // 保存
714
-      if (this.$route.query.id) {
715
-        if (this.couponInfo.ValidDays) {
716
-          this.couponInfo.StartDate = undefined
717
-          this.couponInfo.EndDate = undefined
718
-        }
719
-        if (!this.checkInfo()) {
720
-          return false
721
-        }
722
-        this.editCoupon({
723
-          ...this.couponInfo,
724
-          IsAll: this.couponInfo.IsAll - 0,
725
-          TotalCount: this.couponInfo.TotalCount - 0,
726
-          ValidDays: this.couponInfo.ValidDays - 0 || 0
727
-        }).then((res) => {
728
-          this.$alert('操作成功', '提示', {
729
-            confirmButtonText: '确定',
730
-            callback: action => {
731
-              this.$router.push({ name: 'couponList' })
732
-            }
733
-          })
734
-        })
735
-      } else {
736
-        if (this.couponInfo.ValidDays) {
737
-          this.couponInfo.StartDate = undefined
738
-          this.couponInfo.EndDate = undefined
739
-        }
740
-        if (!this.checkInfo()) {
741
-          return false
742
-        }
743
-        this.addCoupon({
744
-          ...this.couponInfo,
745
-          IsAll: this.couponInfo.IsAll - 0,
746
-          TotalCount: this.couponInfo.TotalCount - 0,
747
-          ValidDays: this.couponInfo.ValidDays - 0 || 0
748
-        }).then((res) => {
749
-          this.$message({
750
-            type: 'success',
751
-            message: '操作成功'
752
-          })
753
-          this.$router.push({ name: 'couponList' })
754
-        })
755
-      }
756
-    },
757
-    cancel () { // 取消
758
-      this.$router.push({ name: 'couponList' })
759
-    },
760
-    deleteGoodsItem (index, row) { // 删除指定商品item
761
-      this.couponInfo.Targets.splice(index, 1)
762
-    },
763
-    handleAvatarSuccess (res, file) {
764
-      this.couponInfo.Images[0].CouponImageUrl = res.result.url
765
-    },
766
-    videoSuccess (res, file) {
767
-      this.videoOff = true
768
-      this.couponInfo.VideoUrl = res.result.url
769
-    },
770
-    handleCurrentChange (val) { // 跳转到分页
771
-      this.postData.page = val
772
-      if (this.couponInfo.CouponType === 'goods') {
773
-        this.GetGoodsList({
774
-          ...this.postData,
775
-          caseid: this.couponInfo.CaseId
776
-        }).then((res) => {
777
-          this.total = res.pagenum
778
-        })
779
-      } else if (this.couponInfo.CouponType === 'course') {
780
-        this.getCourseLister({
781
-          ...this.postData,
782
-          caseid: this.couponInfo.CaseId
783
-        }).then((res) => {
784
-          this.total = res.pagenum
785
-        })
786
-      }
787
-    }
788
-  }
789
-}
790
-</script>
791
-
792
-<!-- Add "scoped" attribute to limit CSS to this component only -->
793
-<style lang="scss" scoped>
794
-.addLine {
795
-  > * {
796
-    margin-right: 10px;
797
-  }
798
-}
799
-.mainForm > ul > li > div > div > button {
800
-  margin-top: 0;
801
-}
802
-</style>

+ 9
- 3
src/pages/system/cardAndCouponManager/couponManager/index.vue Näytä tiedosto

@@ -8,6 +8,11 @@
8 8
         <ul>
9 9
           <li>
10 10
             <el-select v-model="CaseId" placeholder="请选择案场">
11
+              <el-option
12
+                key="all"
13
+                label="所有案场"
14
+                value="all">
15
+              </el-option>
11 16
               <el-option
12 17
                 v-for="item in cases"
13 18
                 :key="item.CaseId"
@@ -101,6 +106,7 @@
101 106
       title="选择赠送客户"
102 107
       :visible.sync="centerDialogVisible"
103 108
       width="800px"
109
+      @close="dialogPostData.page = 1"
104 110
       center>
105 111
       <div>
106 112
         <ul class="dialogSearchList flex-h" style="margin-bottom:10px;">
@@ -132,13 +138,13 @@
132 138
         <ul class="dialogSearchList flex-h">
133 139
           <li class="flex-item">
134 140
             <el-date-picker
135
-              value-format="yyyy-MM-ddT00:00:00Z"
141
+              value-format="yyyy-MM-dd"
136 142
               v-model="dialogPostData.begindate"
137 143
               type="date"
138 144
               placeholder="选择起始日期">
139 145
             </el-date-picker>
140 146
             <el-date-picker
141
-              value-format="yyyy-MM-ddT23:59:59Z"
147
+              value-format="yyyy-MM-dd"
142 148
               v-model="dialogPostData.enddate"
143 149
               type="date"
144 150
               placeholder="选择截止日期">
@@ -294,7 +300,7 @@ export default {
294 300
     getList () { // 获取列表
295 301
       this.GetCouponList({
296 302
         ...this.postData,
297
-        caseid: this.CaseId || this.defaultCaseId
303
+        caseid: this.postData.caseid === 'all' || this.postData.caseid === '' ? '' : this.postData.caseid
298 304
       }).then((res) => {
299 305
         this.total = res.pagenum
300 306
         // console.log(JSON.stringify(res))

+ 7
- 6
src/pages/system/cardAndCouponManager/givingRecords.vue Näytä tiedosto

@@ -13,14 +13,14 @@
13 13
           </li>
14 14
           <li>
15 15
             <el-date-picker
16
-              value-format="yyyy-MM-ddT00:00:00Z"
16
+              value-format="yyyy-MM-dd"
17 17
               v-model="postData.startDate"
18 18
               type="date"
19 19
               placeholder="选择起始日期">
20 20
             </el-date-picker>
21 21
             <span>至</span>
22 22
             <el-date-picker
23
-              value-format="yyyy-MM-ddT23:59:59Z"
23
+              value-format="yyyy-MM-dd"
24 24
               v-model="postData.endDate"
25 25
               type="date"
26 26
               placeholder="选择截止日期">
@@ -62,7 +62,7 @@
62 62
           prop="CreateDate"
63 63
           label="赠送时间">
64 64
           <template slot-scope="scope">
65
-            <span>{{FormatDate(scope.row.CreateDate)}}</span>
65
+            <span>{{toolClass.dateFormat(scope.row.CreateDate)}}</span>
66 66
           </template>
67 67
         </el-table-column>
68 68
         <el-table-column
@@ -127,10 +127,11 @@ export default {
127 127
       this.getList()
128 128
     },
129 129
     getList () { // 获取列表
130
-      this.$ajax(this.$api.channelManager.getChannelList.url, {
131
-        method: this.$api.channelManager.getChannelList.method,
130
+      this.$ajax(this.$api.record.getRecordList.url, {
131
+        method: this.$api.record.getRecordList.method,
132 132
         queryData: { ...this.postData, caseid: this.CaseId }
133 133
       }).then(res => {
134
+        // console.log(JSON.stringify(res))
134 135
         this.currentList = res.list
135 136
         this.postData.page = res.page
136 137
         this.total = res.pagenum
@@ -140,7 +141,7 @@ export default {
140 141
       this.getList()
141 142
     },
142 143
     FormatDate (date) {
143
-      return this.toolClass.dateFormat(date, 'yyyy-MM-ddThh:mm:ss')
144
+      return this.toolClass.dateFormat(date, 'yyyy-MM-dd hh:mm:ss')
144 145
     },
145 146
   }
146 147
 }

+ 6
- 2
src/pages/system/cardAndCouponManager/vipManager/index.vue Näytä tiedosto

@@ -53,6 +53,7 @@
53 53
         <div class="flex-item flex-h" style="margin-top: 20px;">
54 54
           <el-button size="mini" type="success" @click='addVIP'>新增VIP</el-button>
55 55
           <el-button size="mini" type="success" @click='activateVip'>激活VIP</el-button>
56
+          <el-button size="mini" type="warning" @click='exportExcel'>导出Excel</el-button>
56 57
         </div>
57 58
       </div>
58 59
     </div>
@@ -92,14 +93,14 @@
92 93
           prop="ActiveDate"
93 94
           label="激活时间">
94 95
           <template slot-scope="scope">
95
-            <span>{{toolClass.dateFormat(scope.row.ActiveDate, 'yyyy-MM-dd')==='1-01-01'?'':toolClass.dateFormat(scope.row.ActiveDate, 'yyyy-MM-ddThh:mm')}}</span>
96
+            <span>{{toolClass.dateFormat(scope.row.ActiveDate, 'yyyy-MM-dd')==='1-01-01'?'':toolClass.dateFormat(scope.row.ActiveDate, 'yyyy-MM-dd hh:mm')}}</span>
96 97
           </template>
97 98
         </el-table-column>
98 99
         <el-table-column
99 100
           prop="CreateDate"
100 101
           label="创建时间">
101 102
           <template slot-scope="scope">
102
-            <span>{{toolClass.dateFormat(scope.row.CreateDate, 'yyyy-MM-ddThh:mm')}}</span>
103
+            <span>{{toolClass.dateFormat(scope.row.CreateDate, 'yyyy-MM-dd hh:mm')}}</span>
103 104
           </template>
104 105
         </el-table-column>
105 106
       </el-table>
@@ -178,6 +179,9 @@ export default {
178 179
     activateVip () {
179 180
       this.$router.push({ name: 'activateVip' })
180 181
     },
182
+    exportExcel () {
183
+      window.open(`${this.toolClass.ReplaceOrg(this.$api.cardManager.vipcardExcel.url)}?token=${localStorage.getItem('JWT')}&cardNo=${this.$data.postData.cardNo}&sellerName=${this.$data.postData.sellerName}&userName=${this.$data.postData.userName}&caseid=${this.CaseId === 'all' ? '' : this.CaseId}`, '_blank')
184
+    }
181 185
   }
182 186
 }
183 187
 </script>

+ 1
- 1
src/pages/system/caseManager/signinManager/index.vue Näytä tiedosto

@@ -177,7 +177,7 @@ export default {
177 177
       this.$data.valueCase = ''
178 178
     },
179 179
     FormatDate (date) {
180
-      return this.toolClass.dateFormat(date, 'yyyy-MM-ddThh:mm:ss')
180
+      return this.toolClass.dateFormat(date, 'yyyy-MM-dd hh:mm:ss')
181 181
     },
182 182
     excelSignin () { // 导出Excel
183 183
       window.open(`${this.toolClass.ReplaceOrg(this.$api.caseManager.getExcelSignin.url)}?token=${localStorage.getItem('JWT')}&selectType=${this.$data.valueTime}&caseid=${this.$data.valueCase}`, '_blank')

+ 13
- 13
src/pages/system/cmsManager/majorProjects/edit.vue Näytä tiedosto

@@ -266,7 +266,7 @@ export default {
266 266
     },
267 267
     checkFn (arr) {
268 268
       for (var n = 0; n < arr.length; n++) {
269
-        if ((arr[n].type === 'isNull' && arr[n].target === '') || (arr[n].type === 'Array' && arr[n].target.length)) {
269
+        if (arr[n].type === 'isNull' && !arr[n].target) {
270 270
           this.$message({
271 271
             message: arr[n].errorMsg,
272 272
             type: 'error'
@@ -278,31 +278,31 @@ export default {
278 278
     },
279 279
     submit () {
280 280
       var checkOff = this.checkFn([{
281
-        target: (this.CaseId || ''),
281
+        target: Boolean(this.CaseId || ''),
282 282
         errorMsg: '对应案场不能为空',
283 283
         type: 'isNull'
284 284
       }, {
285
-        target: (this.detail.Name || ''),
285
+        target: Boolean(this.detail.Name || ''),
286 286
         errorMsg: '名称不能为空',
287 287
         type: 'isNull'
288 288
       }, {
289
-        target: (this.imgShow || ''),
289
+        target: Boolean(this.imgShow || ''),
290 290
         errorMsg: '图片不能为空',
291 291
         type: 'isNull'
292 292
       }, {
293
-        target: (this.detailImgShow || ''),
293
+        target: Boolean(this.detailImgShow || ''),
294 294
         errorMsg: '详细图片不能为空',
295 295
         type: 'isNull'
296 296
       }, {
297
-        target: (this.detail.DetailContent || ''),
297
+        target: Boolean(this.detail.DetailContent || ''),
298 298
         errorMsg: '专题简介不能为空',
299 299
         type: 'isNull'
300 300
       }, {
301
-        target: (this.detail.IsAllCourse || ''),
301
+        target: Boolean(String(this.detail.IsAllCourse) || ''),
302 302
         errorMsg: '展示课程不能为空',
303 303
         type: 'isNull'
304 304
       }, {
305
-        target: (this.detail.Status || ''),
305
+        target: Boolean(String(this.detail.Status) || ''),
306 306
         errorMsg: '是否前台展示不能为空',
307 307
         type: 'isNull'
308 308
       }])
@@ -319,11 +319,13 @@ export default {
319 319
       const courseids = (this.detail.Courses || []).map(x => x.CourseId).join(',')
320 320
       if (this.id === '') {
321 321
         this.detail.OrgId = this.OrgId
322
-        this.AddCaseInfo({ ...this.detail, OrgId: this.OrgId, imgs: this.imgShow, detailimgs: this.detailImgShow, courseids }).then(res => {
322
+        // console.log(JSON.stringify({ ...this.detail, OrgId: this.OrgId, imgs: this.imgShow, detailimgs: this.detailImgShow, courseids }))
323
+        this.AddCaseInfo({ ...this.detail, OrgId: this.OrgId, imgs: this.imgShow, detailimgs: this.detailImgShow, courseids }).then((res) => {
323 324
           this.afterSave()
324 325
         })
325 326
       } else {
326
-        this.AddCaseInfo({ ...this.detail, imgs: this.imgShow, detailimgs: this.detailImgShow, courseids }).then(res => {
327
+        // console.log(JSON.stringify({ ...this.detail, OrgId: this.OrgId, imgs: this.imgShow, detailimgs: this.detailImgShow, courseids }))
328
+        this.AddCaseInfo({ ...this.detail, imgs: this.imgShow, detailimgs: this.detailImgShow, courseids }).then((res) => {
327 329
           this.afterSave()
328 330
         })
329 331
       }
@@ -334,9 +336,7 @@ export default {
334 336
         type: 'success',
335 337
         duration: 1000
336 338
       })
337
-      setTimeout(() => {
338
-        this.$router.push({ name: 'indexCase' })
339
-      }, 1000)
339
+      this.$router.push({ name: 'indexCase' })
340 340
     },
341 341
     cancel () {
342 342
       this.$router.go(-1)

+ 48
- 38
src/pages/system/courseManager/courseList/add.vue Näytä tiedosto

@@ -119,6 +119,7 @@
119 119
             <div>
120 120
               <el-date-picker
121 121
                 value-format="yyyy-MM-ddT00:00:00Z"
122
+                :picker-options="pickerOptions"
122 123
                 v-model="detail.BeginDate"
123 124
                 type="date"
124 125
                 placeholder="选择起始日期">
@@ -126,6 +127,7 @@
126 127
               <span style="line-height:40px;">至</span>
127 128
               <el-date-picker
128 129
                 value-format="yyyy-MM-ddT23:59:59Z"
130
+                :picker-options="pickerOptions"
129 131
                 v-model="detail.EndDate"
130 132
                 type="date"
131 133
                 placeholder="选择截止日期">
@@ -227,33 +229,33 @@ export default {
227 229
   name: '',
228 230
   data () {
229 231
     return {
230
-      pickerOptions: {
231
-        shortcuts: [{
232
-          text: '最近一周',
233
-          onClick (picker) {
234
-            const end = new Date()
235
-            const start = new Date()
236
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
237
-            picker.$emit('pick', [start, end])
238
-          }
239
-        }, {
240
-          text: '最近一个月',
241
-          onClick (picker) {
242
-            const end = new Date()
243
-            const start = new Date()
244
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
245
-            picker.$emit('pick', [start, end])
246
-          }
247
-        }, {
248
-          text: '最近三个月',
249
-          onClick (picker) {
250
-            const end = new Date()
251
-            const start = new Date()
252
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
253
-            picker.$emit('pick', [start, end])
254
-          }
255
-        }]
256
-      },
232
+      // pickerOptions: {
233
+      //   shortcuts: [{
234
+      //     text: '最近一周',
235
+      //     onClick (picker) {
236
+      //       const end = new Date()
237
+      //       const start = new Date()
238
+      //       start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
239
+      //       picker.$emit('pick', [start, end])
240
+      //     }
241
+      //   }, {
242
+      //     text: '最近一个月',
243
+      //     onClick (picker) {
244
+      //       const end = new Date()
245
+      //       const start = new Date()
246
+      //       start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
247
+      //       picker.$emit('pick', [start, end])
248
+      //     }
249
+      //   }, {
250
+      //     text: '最近三个月',
251
+      //     onClick (picker) {
252
+      //       const end = new Date()
253
+      //       const start = new Date()
254
+      //       start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
255
+      //       picker.$emit('pick', [start, end])
256
+      //     }
257
+      //   }]
258
+      // },
257 259
     }
258 260
   },
259 261
   computed: {
@@ -279,6 +281,14 @@ export default {
279 281
         this.UpdateInfo({ ...this.detail, CaseId: val })
280 282
       }
281 283
     },
284
+    pickerOptions () {
285
+      var beginDate = Date.now() - 24 * 60 * 60 * 1000
286
+      return {
287
+        disabledDate (time) {
288
+          return time.getTime() < beginDate
289
+        }
290
+      }
291
+    },
282 292
     courseDate: {
283 293
       get () {
284 294
         return this.detail.BeginDate && this.detail.EndDate ? [this.detail.BeginDate, this.detail.EndDate] : []
@@ -323,7 +333,7 @@ export default {
323 333
     },
324 334
     checkFn (arr) {
325 335
       for (var n = 0; n < arr.length; n++) {
326
-        if ((arr[n].type === 'isNull' && arr[n].target === '') || (arr[n].type === 'Array' && arr[n].target.length)) {
336
+        if (arr[n].type === 'isNull' && !arr[n].target) {
327 337
           this.$message({
328 338
             message: arr[n].errorMsg,
329 339
             type: 'error'
@@ -335,43 +345,43 @@ export default {
335 345
     },
336 346
     submit () { // 提交数据
337 347
       var checkOff = this.checkFn([{
338
-        target: (this.detail.CourseImg || ''),
348
+        target: Boolean(this.detail.CourseImg || ''),
339 349
         errorMsg: '课程主图不能为空',
340 350
         type: 'isNull'
341 351
       }, {
342
-        target: (this.detail.CourseName || ''),
352
+        target: Boolean(this.detail.CourseName || ''),
343 353
         errorMsg: '课程名称不能为空',
344 354
         type: 'isNull'
345 355
       }, {
346
-        target: (this.detail.LocationId || ''),
356
+        target: Boolean(this.detail.LocationId || ''),
347 357
         errorMsg: '课程类型不能为空',
348 358
         type: 'isNull'
349 359
       }, {
350
-        target: (this.detail.Price || ''),
360
+        target: Boolean(this.detail.Price || ''),
351 361
         errorMsg: '课程价格不能为空',
352 362
         type: 'isNull'
353 363
       }, {
354
-        target: (this.detail.MaxNum || ''),
364
+        target: Boolean(this.detail.MaxNum || ''),
355 365
         errorMsg: '开课人数不能为空',
356 366
         type: 'isNull'
357 367
       }, {
358
-        target: (this.detail.MinNum || ''),
368
+        target: Boolean(this.detail.MinNum || ''),
359 369
         errorMsg: '最小开课人数不能为空',
360 370
         type: 'isNull'
361 371
       }, {
362
-        target: (this.detail.CourseNum || ''),
372
+        target: Boolean(this.detail.CourseNum || ''),
363 373
         errorMsg: '课时数不能为空',
364 374
         type: 'isNull'
365 375
       }, {
366
-        target: (this.detail.BeginDate || ''),
376
+        target: Boolean(this.detail.BeginDate || ''),
367 377
         errorMsg: '起始日期不能为空',
368 378
         type: 'isNull'
369 379
       }, {
370
-        target: (this.detail.EndDate || ''),
380
+        target: Boolean(this.detail.EndDate || ''),
371 381
         errorMsg: '截止日期不能为空',
372 382
         type: 'isNull'
373 383
       }, {
374
-        target: (this.detail.IsSelect || ''),
384
+        target: Boolean(String(this.detail.IsSelect) || ''),
375 385
         errorMsg: '是否精选课程不能为空',
376 386
         type: 'isNull'
377 387
       }])

+ 6
- 6
src/pages/system/courseManager/scheduleManager/index.vue Näytä tiedosto

@@ -80,10 +80,10 @@
80 80
                   placeholder="选择开始日期"
81 81
                   >
82 82
                 </el-date-picker>
83
-                <span v-else>{{this.toolClass.dateFormat(currentCourseItem.BeginDate, 'yyyy-MM-ddThh:mm')}}</span>
83
+                <span v-else>{{this.toolClass.dateFormat(currentCourseItem.BeginDate, 'yyyy-MM-dd hh:mm')}}</span>
84 84
               </div>
85 85
             </div> -->
86
-            <span>{{this.toolClass.dateFormat(currentCourseItem.BeginDate, 'yyyy-MM-ddThh:mm')}}</span>
86
+            <span>{{this.toolClass.dateFormat(currentCourseItem.BeginDate, 'yyyy-MM-dd hh:mm:ss')}}</span>
87 87
           </li>
88 88
           <li class="flex-h">
89 89
             <span>结束时间:</span>
@@ -95,10 +95,10 @@
95 95
                   type="datetime"
96 96
                   placeholder="选择结束日期">
97 97
                 </el-date-picker>
98
-                <span v-else>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-ddThh:mm')}}</span>
98
+                <span v-else>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-dd hh:mm')}}</span>
99 99
               </div>
100 100
             </div> -->
101
-            <span>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-ddThh:mm')}}</span>
101
+            <span>{{this.toolClass.dateFormat(currentCourseItem.EndDate, 'yyyy-MM-dd hh:mm:ss')}}</span>
102 102
           </li>
103 103
         </ul>
104 104
       </div>
@@ -202,8 +202,8 @@ export default {
202 202
     },
203 203
     handlUpdateDetail () {
204 204
       this.UpdateDetail({...this.currentCourseItem,
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
+        // BeginDate: this.toolClass.dateFormat(this.currentCourseItem.BeginDate, 'yyyy-MM-dd hh:mm:ss'),
206
+        // EndDate: this.toolClass.dateFormat(this.currentCourseItem.EndDate, 'yyyy-MM-dd hh:mm:ss'),
207 207
         callback: this.AfterAction})
208 208
     },
209 209
     AfterAction () {

+ 73
- 16
src/pages/system/dashboard/index.vue Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="subPage">
3 3
     <div class="selectCase">
4
-      <el-select v-model="postData.caseid" placeholder="请选择">
4
+      <el-select v-model="postData.caseid" placeholder="请选择" @change="caseChange">
5 5
         <el-option
6 6
           v-for="item in cases"
7 7
           :key="item.CaseId"
@@ -15,24 +15,47 @@
15 15
         <div v-if="subItem.type === 'dashboardList'">
16 16
           <dashboardList :data="subItem" :index="subIndex"></dashboardList>
17 17
         </div>
18
-        <!-- <div v-if="subItem.type === 'histogram' && subItem.value.length">
18
+        <div v-if="subItem.type === 'histogram' && typeof(subItem.value) === 'object' && subItem.value.length">
19 19
           <histogram :data="subItem.value" :index="index + '-' + subIndex"></histogram>
20
-        </div> -->
21
-        <!-- <div v-if="subItem.type === 'pieDiagram' && subItem.value.length">
20
+        </div>
21
+        <div v-if="subItem.type === 'pieDiagram' && typeof(subItem.value) === 'object' && subItem.value.length">
22 22
           <pieDiagram :data="subItem" :index="index + '-' + subIndex"></pieDiagram>
23
-        </div> -->
24
-        <!-- <div v-if="subItem.type === 'brokenLineGraph' && subItem.value.length">
25
-          <brokenLineGraph :data="subItem.value" :index="index + '-' + subIndex"></brokenLineGraph>
26 23
         </div>
27
-        <div v-if="subItem.type === 'ringChart' && subItem.value.length">
24
+        <div v-if="subItem.type === 'brokenLineGraph' && typeof(subItem.value) === 'object' && subItem.value.length">
25
+          <brokenLineGraph :data="subItem" :index="index + '-' + subIndex"></brokenLineGraph>
26
+        </div>
27
+        <div v-if="subItem.type === 'ringChart' && typeof(subItem.value) === 'object' && subItem.value.length">
28 28
           <ringChart :data="subItem.value" :index="index + '-' + subIndex"></ringChart>
29 29
         </div>
30
-        <div v-if="subItem.type === 'dashboard' && subItem.value.length">
30
+        <div v-if="subItem.type === 'dashboard' && typeof(subItem.value) === 'object' && subItem.value.length">
31 31
           <dashboard :data="subItem.value" :index="index + '-' + subIndex"></dashboard>
32 32
         </div>
33
-        <div v-if="subItem.type === 'brokenLineGraphGroup' && subItem.value.length">
33
+        <div v-if="subItem.type === 'brokenLineGraphGroup' && typeof(subItem.value) === 'object' && subItem.value.length">
34 34
           <brokenLineGraphGroup :data="subItem.value" :index="index + '-' + subIndex"></brokenLineGraphGroup>
35
-        </div> -->
35
+        </div>
36
+      </div>
37
+    </div>
38
+    <div class="bottomData">
39
+      <div class="flex-h">
40
+        <div class="flex-item">
41
+          <h1>数据统计</h1>
42
+        </div>
43
+        <el-select v-model="bottomSelectValue" placeholder="请选择" @change="bottomChange">
44
+          <el-option
45
+            v-for="item in bottomSelect"
46
+            :key="item.id"
47
+            :label="item.value"
48
+            :value="item.id">
49
+          </el-option>
50
+        </el-select>
51
+      </div>
52
+      <ul>
53
+        <li v-for="(item,index) in bottomNav" :key="index" :class="{'active': bottomActive === index}" @click="bottomActive = index">{{item}}</li>
54
+      </ul>
55
+      <div style="height: 400px;" v-if="bottomData.length">
56
+        <div v-for="(item,index) in bottomData" :key="index" v-if="bottomActive === index && bottomData.length">
57
+          <brokenLineGraph :data="item.data" :index="'bottomData-' + index"></brokenLineGraph>
58
+        </div>
36 59
       </div>
37 60
     </div>
38 61
   </div>
@@ -57,6 +80,17 @@ export default {
57 80
       postData: {
58 81
         caseid: ''
59 82
       },
83
+      bottomSelect: [{
84
+        value: '最近一周',
85
+        id: 'week'
86
+      }, {
87
+        value: '最近一个月',
88
+        id: 'month'
89
+      }],
90
+      bottomSelectValue: 'week',
91
+      bottomActive: 0,
92
+      bottomNav: ['推荐会员新增', '排课数', '课程预约量', '饮品下单量', '到场人次'],
93
+      bottomData: [],
60 94
       pageData: [
61 95
         [
62 96
           { type: 'dashboardList', remark: '列表面板', data: { title: '', list: [{ name: '会员总数', value: '1000', }, { name: '课程预约总量', value: '1000', }, { name: '饮品下单总量', value: '1000', }] } }
@@ -91,7 +125,8 @@ export default {
91 125
   computed: {
92 126
     ...mapState({
93 127
       cases: x => x.app.cases.list,
94
-      defaultCaseId: x => x.app.cases.default
128
+      defaultCaseId: x => x.app.cases.belongCase,
129
+      user: x => x.app.user
95 130
     }),
96 131
     CaseId: {
97 132
       get () {
@@ -108,11 +143,15 @@ export default {
108 143
         this.postData.caseid = val
109 144
       }
110 145
       this.getData(val)
111
-      this.getBottomData(val, 'week')
146
+      this.getBottomData(val, this.bottomSelectValue)
112 147
     },
113 148
   },
114 149
   mounted () {
115 150
     this.$nextTick(function () {
151
+      if (this.defaultCaseId !== null) {
152
+        this.getData(this.defaultCaseId)
153
+        this.getBottomData(this.defaultCaseId, this.bottomSelectValue)
154
+      }
116 155
     })
117 156
   },
118 157
   methods: {
@@ -120,6 +159,13 @@ export default {
120 159
       'getDashboardData',
121 160
       'getDashboardBottomData',
122 161
     ]),
162
+    bottomChange () {
163
+      this.getBottomData(this.postData.caseid, this.bottomSelectValue)
164
+    },
165
+    caseChange () {
166
+      this.getData(this.postData.caseid)
167
+      this.getBottomData(this.postData.caseid, this.bottomSelectValue)
168
+    },
123 169
     getData (id) {
124 170
       this.getDashboardData({
125 171
         caseid: id
@@ -141,7 +187,18 @@ export default {
141 187
         caseid: id,
142 188
         statype: type
143 189
       }).then((res) => {
144
-        // console.log(JSON.stringify(res))
190
+        this.bottomData = []
191
+        for (var n = 0; n < res.length; n++) {
192
+          this.bottomData.push({
193
+            type: 'brokenLineGraph',
194
+            remark: '折线图',
195
+            data: {
196
+              title: '',
197
+              value: res[n]
198
+            }
199
+          })
200
+        }
201
+        console.log(JSON.stringify(this.bottomData))
145 202
       })
146 203
     },
147 204
   }
@@ -151,9 +208,9 @@ export default {
151 208
 <!-- Add "scoped" attribute to limit CSS to this component only -->
152 209
 <style lang="scss" scoped>
153 210
 @import "page.scss";
154
-.listMargin{
211
+.listMargin {
155 212
   margin-left: 20px;
156
-  &:first-child{
213
+  &:first-child {
157 214
     margin-left: 0;
158 215
   }
159 216
 }

+ 36
- 0
src/pages/system/dashboard/page.scss Näytä tiedosto

@@ -22,6 +22,42 @@
22 22
   .top{
23 23
     
24 24
   }
25
+  .bottomData{
26
+    width: calc(100% - 40px);
27
+    margin: 0 auto;
28
+    position: relative;
29
+    overflow: hidden;
30
+    >ul{
31
+      width: 100%;
32
+      position: relative;
33
+      overflow: hidden;
34
+      font-size: 0;
35
+      white-space: nowrap;
36
+      margin: 20px auto 0;
37
+      >li{
38
+        display: inline-block;
39
+        line-height: 40px;
40
+        padding: 0 15px;
41
+        border: 1px solid #ccc;
42
+        border-left: none;
43
+        &:first-child{
44
+          border-left: 1px solid #ccc;
45
+          border-radius: 6px 0 0 6px;
46
+        }
47
+        &:last-child{
48
+          border-radius: 0 6px 6px 0;
49
+        }
50
+        &:hover{
51
+          cursor: pointer;
52
+          background: #f8f8f8;
53
+        }
54
+        &.active{
55
+          background: rgb(64, 158, 255);
56
+          color: #fff;
57
+        }
58
+      }
59
+    }
60
+  }
25 61
 }
26 62
 
27 63
 

+ 2
- 2
src/pages/system/dataStatistics/cardCouponUsedList/index.vue Näytä tiedosto

@@ -50,14 +50,14 @@
50 50
           <li style="white-space: nowrap;">
51 51
             <span>有效期:</span>
52 52
             <el-date-picker
53
-              value-format="yyyy-MM-ddT00:00:00Z"
53
+              value-format="yyyy-MM-dd"
54 54
               v-model="postData.begindate"
55 55
               type="date"
56 56
               placeholder="选择起始日期">
57 57
             </el-date-picker>
58 58
             <span>至</span>
59 59
             <el-date-picker
60
-              value-format="yyyy-MM-ddT23:59:59Z"
60
+              value-format="yyyy-MM-dd"
61 61
               v-model="postData.enddate"
62 62
               type="date"
63 63
               placeholder="选择截止日期">

+ 2
- 2
src/pages/system/dataStatistics/courseOrderList/index.vue Näytä tiedosto

@@ -33,14 +33,14 @@
33 33
           <li style="white-space: nowrap;">
34 34
             <span>下单时间:</span>
35 35
             <el-date-picker
36
-              value-format="yyyy-MM-ddT00:00:00Z"
36
+              value-format="yyyy-MM-dd"
37 37
               v-model="postData.begindate"
38 38
               type="date"
39 39
               placeholder="选择起始日期">
40 40
             </el-date-picker>
41 41
             <span>至</span>
42 42
             <el-date-picker
43
-              value-format="yyyy-MM-ddT23:59:59Z"
43
+              value-format="yyyy-MM-dd"
44 44
               v-model="postData.enddate"
45 45
               type="date"
46 46
               placeholder="选择截止日期">

+ 2
- 2
src/pages/system/dataStatistics/goodsOrderList/index.vue Näytä tiedosto

@@ -36,14 +36,14 @@
36 36
           <li style="white-space: nowrap;">
37 37
             <span>下单时间:</span>
38 38
             <el-date-picker
39
-              value-format="yyyy-MM-ddT00:00:00Z"
39
+              value-format="yyyy-MM-dd"
40 40
               v-model="postData.begindate"
41 41
               type="date"
42 42
               placeholder="选择起始日期">
43 43
             </el-date-picker>
44 44
             <span>至</span>
45 45
             <el-date-picker
46
-              value-format="yyyy-MM-ddT23:59:59Z"
46
+              value-format="yyyy-MM-dd"
47 47
               v-model="postData.enddate"
48 48
               type="date"
49 49
               placeholder="选择截止日期">

+ 1
- 1
src/pages/system/newOrder/caseRecord/index.vue Näytä tiedosto

@@ -88,7 +88,7 @@
88 88
               <div class="flex-item">
89 89
                 <div style="width:50%">
90 90
                   <el-date-picker
91
-                    value-format="yyyy-MM-ddT00:00:00Z"
91
+                    value-format="yyyy-MM-dd"
92 92
                     v-model="detail.Month"
93 93
                     type="month"
94 94
                     placeholder="选择月">

+ 2
- 2
src/pages/system/newOrder/newOrderList/index.vue Näytä tiedosto

@@ -247,9 +247,9 @@ export default {
247 247
       this.websock.onclose = console.log
248 248
     },
249 249
     websocketonmessage (e) {
250
-      let oldList = this.list
250
+      // let oldList = this.list
251 251
       let newList = JSON.parse(e.data).data.refreshOnlineGoodsOrders
252
-      let newinfo = newList.filter(x => oldList.filter(item => item.OrdersId === x.OrdersId).length === 0)
252
+      let newinfo = newList.filter(x => this.list.filter(item => item.OrdersId === x.OrdersId).length === 0)
253 253
       this.updateList({list: newList}).then(() => {
254 254
         for (let i = 0; i < newinfo.length; i++) {
255 255
           this.printPdf(`item_${newinfo[i].OrdersId}`)

+ 13
- 2
src/pages/system/verificationManager/phoneVerification/index.vue Näytä tiedosto

@@ -20,12 +20,13 @@
20 20
       <div class="flex-h">
21 21
         <div class="flex-item">
22 22
           <div>
23
-          <el-input
23
+          <!-- <el-input
24 24
             placeholder="请输入手机号"
25 25
             v-model="phone"
26 26
             @input="phone=phone.replace(/\D/g,'')"
27 27
             clearable>
28
-          </el-input>
28
+          </el-input> -->
29
+          <input class="inputBorder" placeholder="请输入手机号" type="text" v-model="phone" @input="phone=phone.replace(/\D/g,'')">
29 30
           </div>
30 31
         </div>
31 32
         <el-button type="danger" @click="toVerificationList">立即核销</el-button>
@@ -81,5 +82,15 @@ export default {
81 82
       }
82 83
     }
83 84
   }
85
+  .inputBorder{
86
+    width: 100%;
87
+    display: block;
88
+    box-sizing: border-box;
89
+    border: 1px solid #ccc;
90
+    line-height: 20px;
91
+    padding: 10px 0;
92
+    text-indent: 10px;
93
+    border-radius: 6px;
94
+  }
84 95
 }
85 96
 </style>

+ 1
- 0
src/pages/system/verificationManager/phoneVerification/verificationList/index.vue Näytä tiedosto

@@ -215,6 +215,7 @@ export default {
215 215
           this.tel = tel
216 216
           this.getList()
217 217
         } else {
218
+          this.courses = {list: []}
218 219
           this.$message({
219 220
             type: 'error',
220 221
             message: '未查询到用户信息'

+ 3
- 1
src/store/app.js Näytä tiedosto

@@ -54,6 +54,7 @@ export default {
54 54
     cases: {
55 55
       list: [],
56 56
       default: '',
57
+      belongCase: null,
57 58
     },
58 59
     roles: [],
59 60
     user: {},
@@ -75,7 +76,8 @@ export default {
75 76
 
76 77
       state.cases = {
77 78
         list: data.cases,
78
-        default: defaultCase
79
+        default: defaultCase,
80
+        belongCase: defaultCase,
79 81
       }
80 82
     },
81 83
 

+ 2
- 2
src/store/cms/case.js Näytä tiedosto

@@ -28,8 +28,8 @@ export default {
28 28
         this.$ajax(this.$api.cms.addCase.url, {
29 29
           method: this.$api.cms.addCase.method,
30 30
           data: payload
31
-        }).then(res => {
32
-          resolve()
31
+        }).then((res) => {
32
+          resolve(res)
33 33
         })
34 34
       })
35 35
     },

+ 3
- 1
src/util/ajax.js Näytä tiedosto

@@ -47,7 +47,9 @@ Axios.interceptors.request.use((config) => {
47 47
   let fm = new FormData()
48 48
   for (let k in config.data) {
49 49
     if (Array.isArray(config.data[k])) {
50
-      fm.append(k, ...config.data[k].map(v => `${k}=${encodeURIComponent(v)}`))
50
+      config.data[k].forEach((v) => {
51
+        fm.append(k, v)
52
+      })
51 53
     } else {
52 54
       fm.append(k, config.data[k])
53 55
     }

+ 7
- 3
src/util/api.js Näytä tiedosto

@@ -1,5 +1,5 @@
1
-const baseUrl = '/api-v2'
2
-// const baseUrl = '/api'
1
+// const baseUrl = '/api-v2'
2
+const baseUrl = '/api'
3 3
 const common = '/common/:org'
4 4
 const guest = '/guest/:org'
5 5
 
@@ -649,6 +649,10 @@ const $api = {
649 649
       method: 'post',
650 650
       url: `${baseUrl}${common}/card/:id/to/:users`
651 651
     },
652
+    vipcardExcel: {
653
+      method: 'get',
654
+      url: `${baseUrl}${common}/vipcard/excel`
655
+    },
652 656
   },
653 657
   couponManager: {
654 658
     couponList: {
@@ -817,7 +821,7 @@ const $api = {
817 821
   record: {
818 822
     getRecordList: {
819 823
       method: 'get',
820
-      url: `${baseUrl}${common}/card/record`
824
+      url: `${baseUrl}${common}/record`
821 825
     }
822 826
   }
823 827
 }