wangfei 6 år sedan
förälder
incheckning
b0b6b4e9bb

+ 1
- 1
dist/index.html Visa fil

@@ -1 +1 @@
1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_25hulf12ph6.css><title>城的空间后台管理系统</title><link href=./static/css/app.8ec8e762898b99ff819f71f94abc0149.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.bcfa818d96471060c4b4.js></script><script type=text/javascript src=./static/js/app.75b251f5c455872d8a25.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_25hulf12ph6.css><title>城的空间后台管理系统</title><link href=./static/css/app.8ec8e762898b99ff819f71f94abc0149.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.bcfa818d96471060c4b4.js></script><script type=text/javascript src=./static/js/app.75b251f5c455872d8a25.js></script></body></html>

+ 1
- 1
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map Visa fil

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

+ 0
- 16212
package-lock.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
package.json Visa fil

@@ -48,6 +48,7 @@
48 48
     "chalk": "^2.0.1",
49 49
     "chromedriver": "^2.27.2",
50 50
     "copy-webpack-plugin": "^4.0.1",
51
+    "cross-env": "^5.2.0",
51 52
     "cross-spawn": "^5.0.1",
52 53
     "css-loader": "^0.28.11",
53 54
     "eslint": "^4.15.0",

+ 292
- 3
src/pages/system/cardAndCouponManager/cardManager/edit.vue Visa fil

@@ -1,6 +1,260 @@
1 1
 <template>
2 2
   <div class="subPage">
3
-    1
3
+    <form class="mainForm">
4
+      <h1 style="font-size:22px;">{{isEdit === 0 ? '新建' : '编辑'}}{{type === 'course' ? '课程体验卡' : '健身卡'}}</h1>
5
+      <ul>
6
+        <li class="flex-h">
7
+          <span>选择案场:</span>
8
+          <div class="flex-item">
9
+            <div style="width:50%">
10
+              <el-select v-model="postData.CaseId" placeholder="请选择">
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>卡图片:</span>
23
+          <div class="flex-item">
24
+            <div>
25
+              <el-upload
26
+                class="avatar-uploader"
27
+                :action='$api.file.image.url'
28
+                :show-file-list="false"
29
+                :on-success="handleAvatarSuccess">
30
+                <img v-if="postData.Img" :src="postData.Img" class="avatar">
31
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
32
+              </el-upload>
33
+            </div>
34
+          </div>
35
+        </li>
36
+        <li class="flex-h">
37
+          <span>卡名称:</span>
38
+          <div class="flex-item">
39
+            <div style="width:200px;">
40
+              <el-input
41
+                placeholder="请输入"
42
+                v-model="postData.Name"
43
+                clearable>
44
+              </el-input>
45
+            </div>
46
+          </div>
47
+        </li>
48
+        <li class="flex-h">
49
+          <span>卡类型:</span>
50
+          <div class="flex-item">
51
+            <div style="width:50%">
52
+              <el-select v-model="postData.Type" placeholder="请选择">
53
+                <el-option
54
+                  v-for="item in TypeList"
55
+                  :key="item.id"
56
+                  :label="item.name"
57
+                  :value="item.id">
58
+                </el-option>
59
+              </el-select>
60
+            </div>
61
+          </div>
62
+        </li>
63
+        <li class="flex-h">
64
+          <span>卡价格:</span>
65
+          <div class="flex-item">
66
+            <div style="width:200px;">
67
+              <el-input
68
+                placeholder="请输入"
69
+                v-model="postData.Price"
70
+                clearable>
71
+              </el-input>
72
+            </div>
73
+          </div>
74
+        </li>
75
+        <li class="flex-h">
76
+          <span>总张数:</span>
77
+          <div class="flex-item">
78
+            <div style="width:200px;">
79
+              <el-input
80
+                placeholder="请输入"
81
+                v-model="postData.TotalNum"
82
+                clearable>
83
+              </el-input>
84
+            </div>
85
+          </div>
86
+        </li>
87
+        <li class="flex-h">
88
+          <span>发送类型:</span>
89
+          <div class="flex-item">
90
+            <div>
91
+              <el-radio v-model="postData.SendType" label="1">渠道</el-radio>
92
+              <el-radio v-model="postData.SendType" label="3">案场</el-radio>
93
+              <el-radio v-model="postData.SendType" label="2">系统</el-radio>
94
+            </div>
95
+          </div>
96
+        </li>
97
+        <li class="flex-h" v-if="type === 'bodybuilding'">
98
+          <span>选择渠道:</span>
99
+          <div class="flex-item">
100
+            <div style="width:50%">
101
+              <el-select v-model="postData.ChannelId" placeholder="请选择">
102
+                <el-option
103
+                  v-for="item in ChannelList"
104
+                  :key="item.id"
105
+                  :label="item.name"
106
+                  :value="item.id">
107
+                </el-option>
108
+              </el-select>
109
+            </div>
110
+          </div>
111
+        </li>
112
+        <li class="flex-h" v-if="type === 'course'">
113
+          <span>目标商品:</span>
114
+          <div class="flex-item">
115
+            <div>
116
+              <el-select v-model="postData.GoodsId" placeholder="请选择">
117
+                <el-option
118
+                  v-for="item in GoodsList"
119
+                  :key="item.id"
120
+                  :label="item.name"
121
+                  :value="item.id">
122
+                </el-option>
123
+              </el-select>
124
+            </div>
125
+          </div>
126
+        </li>
127
+        <li class="flex-h" v-if="postData.Assign === '2'">
128
+          <div class="flex-item">
129
+            <div style="border: 1px solid #eee;">
130
+              <el-table
131
+                :data="currentList"
132
+                stripe
133
+                style="width: 100%">
134
+                <el-table-column
135
+                  prop="Name"
136
+                  label="商品">
137
+                </el-table-column>
138
+                <el-table-column
139
+                  prop="Type"
140
+                  label="分类">
141
+                </el-table-column>
142
+                <el-table-column label="操作">
143
+                  <template slot-scope="scope">
144
+                    <el-button
145
+                      size="mini"
146
+                      type="warning"
147
+                      @click="deleteGoodsItem(scope.$index, scope.row)">删除</el-button>
148
+                  </template>
149
+                </el-table-column>
150
+              </el-table>
151
+              <div style="text-align:center;padding:10px 0;">
152
+                <el-button type="success" size="mini" @click="addGoods">添加商品</el-button>
153
+              </div>
154
+            </div>
155
+          </div>
156
+        </li>
157
+        <li class="flex-h" v-if="type === 'drink'">
158
+          <span>卡有效时间:</span>
159
+          <div class="flex-item">
160
+            <div>
161
+              <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
162
+                <el-radio v-model="postData.TimeType" label="1">固定时间</el-radio>
163
+                <el-date-picker
164
+                  v-model="postData.StartDate"
165
+                  type="date"
166
+                  placeholder="选择起始日期">
167
+                </el-date-picker>
168
+                <span style="line-height:40px;">至</span>
169
+                <el-date-picker
170
+                  v-model="postData.EndDate"
171
+                  type="date"
172
+                  placeholder="选择截止日期">
173
+                </el-date-picker>
174
+              </div>
175
+              <div class="addLine flex-h" style="align-item:center;">
176
+                <el-radio v-model="postData.TimeType" label="2">领取后</el-radio>
177
+                <span style="width:100px;">
178
+                  <el-input
179
+                    placeholder="请输入"
180
+                    v-model="postData.Days"
181
+                    clearable>
182
+                  </el-input>
183
+                </span>
184
+                <span style="line-height:40px;">天</span>
185
+              </div>
186
+            </div>
187
+          </div>
188
+        </li>
189
+        <li class="flex-h" v-if="type === 'course'">
190
+          <span>卡有效时间:</span>
191
+          <div class="flex-item">
192
+            <div>
193
+              <el-date-picker
194
+                v-model="postData.StartDate"
195
+                type="date"
196
+                placeholder="选择起始日期">
197
+              </el-date-picker>
198
+              <span style="line-height:40px;">至</span>
199
+              <el-date-picker
200
+                v-model="postData.EndDate"
201
+                type="date"
202
+                placeholder="选择截止日期">
203
+              </el-date-picker>
204
+            </div>
205
+          </div>
206
+        </li>
207
+        <li class="flex-h">
208
+          <span>视频:</span>
209
+          <div class="flex-item">
210
+            <div></div>
211
+          </div>
212
+        </li>
213
+        <li class="flex-h">
214
+          <span>分享描述:</span>
215
+          <div class="flex-item">
216
+            <div>
217
+              <el-input
218
+                type="textarea"
219
+                :rows="2"
220
+                placeholder="请输入"
221
+                v-model="postData.ShareDesc">
222
+              </el-input>
223
+            </div>
224
+          </div>
225
+        </li>
226
+        <li class="flex-h">
227
+          <span>规则描述:</span>
228
+          <div class="flex-item">
229
+            <div>
230
+              <el-input
231
+                type="textarea"
232
+                :rows="2"
233
+                placeholder="请输入"
234
+                v-model="postData.RuleDesc">
235
+              </el-input>
236
+            </div>
237
+          </div>
238
+        </li>
239
+        <li class="flex-h">
240
+          <span>使用说明:</span>
241
+          <div class="flex-item">
242
+            <div>
243
+              <el-input
244
+                type="textarea"
245
+                :rows="2"
246
+                placeholder="请输入"
247
+                v-model="postData.UsedDesc">
248
+              </el-input>
249
+            </div>
250
+          </div>
251
+        </li>
252
+        <li style="text-align:center">
253
+          <el-button type="primary" size="mini" @click="submit">保存</el-button>
254
+          <el-button type="danger" size="mini" @click="cancel">取消</el-button>
255
+        </li>
256
+      </ul>
257
+    </form>
4 258
   </div>
5 259
 </template>
6 260
 
@@ -10,10 +264,25 @@ import { mapState } from 'vuex'
10 264
 export default {
11 265
   name: '',
12 266
   data () {
13
-    return {}
267
+    return {
268
+      total: 0,
269
+      type: this.$route.query.type,
270
+      isEdit: this.$route.query.id === undefined ? 0 : 1,
271
+      ChannelList: [], // 渠道列表
272
+      TypeList: [], // 类型列表
273
+      GoodsList: [], // 商品列表
274
+      currentList: [{
275
+        Name: 'ccc',
276
+        Type: 'xxx'
277
+      }], // 指定商品数据
278
+      postData: {
279
+        page: 1,
280
+        pagesize: 10,
281
+      },
282
+    }
14 283
   },
15 284
   mounted () {
16
-    this.$nextTick(function () {})
285
+    this.$nextTick(function () { })
17 286
   },
18 287
   computed: {
19 288
     ...mapState({
@@ -30,10 +299,30 @@ export default {
30 299
     }
31 300
   },
32 301
   methods: {
302
+    addGoods () { // 添加指定商品
303
+      this.centerDialogVisible = true
304
+    },
305
+    submit () { // 保存
306
+      // 1
307
+    },
308
+    cancel () { // 取消
309
+      this.$router.push({ name: 'couponList' })
310
+    },
311
+    deleteGoodsItem () { // 删除指定商品item
312
+      // 1
313
+    },
314
+    handleAvatarSuccess (res, file) {
315
+      this.postData.Img = res.result.url
316
+    },
33 317
   }
34 318
 }
35 319
 </script>
36 320
 
37 321
 <!-- Add "scoped" attribute to limit CSS to this component only -->
38 322
 <style lang="scss" scoped>
323
+.addLine {
324
+  > * {
325
+    margin-right: 10px;
326
+  }
327
+}
39 328
 </style>

+ 175
- 11
src/pages/system/cardAndCouponManager/cardManager/index.vue Visa fil

@@ -3,12 +3,13 @@
3 3
     <div class="system-table-search">
4 4
       <div class="flex-h">
5 5
         <div class="flex-item flex-h">
6
-          <el-button size="mini" type="success" @click='addChannel'>新增渠道</el-button>
6
+          <el-button size="mini" type="success" @click="addCard('course')">新增课程体验卡</el-button>
7
+          <el-button size="mini" type="success" @click="addCard('bodybuilding')">新增健身卡</el-button>
7 8
         </div>
8 9
         <ul>
9 10
           <li>
10 11
             <!-- <span>选择案场:</span> -->
11
-            <el-select v-model="CaseId" placeholder="请选择">
12
+            <el-select v-model="CaseId" placeholder="请选择案场">
12 13
               <el-option
13 14
                 v-for="item in cases"
14 15
                 :key="item.CaseId"
@@ -30,14 +31,42 @@
30 31
         stripe
31 32
         style="width: 100%">
32 33
         <el-table-column
33
-          prop="CaseName"
34
-          label="案场">
34
+          prop="xxx"
35
+          label="卡名称">
35 36
         </el-table-column>
36 37
         <el-table-column
37
-          prop="ChannelName"
38
-          label="渠道名称">
38
+          prop="xxx"
39
+          label="卡类型">
39 40
         </el-table-column>
40
-        <el-table-column label="操作">
41
+        <el-table-column
42
+          prop="xxx"
43
+          label="卡价格">
44
+        </el-table-column>
45
+        <el-table-column
46
+          prop="xxx"
47
+          label="有效期">
48
+        </el-table-column>
49
+        <el-table-column
50
+          prop="xxx"
51
+          label="发放类型">
52
+        </el-table-column>
53
+        <el-table-column
54
+          prop="xxx"
55
+          label="总数量">
56
+        </el-table-column>
57
+        <el-table-column
58
+          prop="xxx"
59
+          label="已发">
60
+        </el-table-column>
61
+        <el-table-column
62
+          prop="xxx"
63
+          label="实际使用">
64
+        </el-table-column>
65
+        <el-table-column
66
+          prop="xxx"
67
+          label="状态">
68
+        </el-table-column>
69
+        <el-table-column label="操作" fixed='right' width="350">
41 70
           <template slot-scope="scope">
42 71
             <el-button
43 72
               size="mini"
@@ -46,7 +75,11 @@
46 75
             <el-button
47 76
               size="mini"
48 77
               type="danger"
49
-              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
78
+              @click="sendCard(scope.$index, scope.row)">赠送客户</el-button>
79
+            <el-button
80
+              size="mini"
81
+              type="success"
82
+              @click="handleDelete(scope.$index, scope.row)">点击复制链接</el-button>
50 83
           </template>
51 84
         </el-table-column>
52 85
       </el-table>
@@ -58,6 +91,99 @@
58 91
       layout="prev, pager, next, jumper"
59 92
       :total="total">
60 93
     </el-pagination>
94
+    <el-dialog
95
+      title="选择赠送客户"
96
+      :visible.sync="centerDialogVisible"
97
+      width="800px"
98
+      center>
99
+      <div>
100
+        <ul class="dialogSearchList flex-h" style="margin-bottom:10px;">
101
+          <li class="flex-item">
102
+            <el-input
103
+              placeholder="请输入用户名"
104
+              v-model="dialogPostData.username"
105
+              clearable>
106
+            </el-input>
107
+          </li>
108
+          <li class="flex-item">
109
+            <el-input
110
+              placeholder="请输入手机号"
111
+              v-model="dialogPostData.phone"
112
+              clearable>
113
+            </el-input>
114
+          </li>
115
+          <li class="flex-item">
116
+            <el-input
117
+              placeholder="请输入推荐人"
118
+              v-model="dialogPostData.referrer"
119
+              clearable>
120
+            </el-input>
121
+          </li>
122
+          <li>
123
+            <el-button type="primary" @click="dialogSearch">搜索</el-button>
124
+          </li>
125
+        </ul>
126
+        <ul class="dialogSearchList flex-h">
127
+          <li class="flex-item">
128
+            <el-date-picker
129
+              v-model="dialogPostData.startdate"
130
+              type="date"
131
+              placeholder="选择起始日期">
132
+            </el-date-picker>
133
+            <el-date-picker
134
+              v-model="dialogPostData.enddate"
135
+              type="date"
136
+              placeholder="选择截止日期">
137
+            </el-date-picker>
138
+          </li>
139
+        </ul>
140
+      </div>
141
+      <div>
142
+        <el-table
143
+          ref="multipleTable"
144
+          :data="customerList"
145
+          tooltip-effect="dark"
146
+          style="width: 100%"
147
+          @selection-change="handleSelectionChange">
148
+          <el-table-column
149
+            type="selection">
150
+          </el-table-column>
151
+          <el-table-column
152
+            prop="Name"
153
+            label="姓名">
154
+          </el-table-column>
155
+          <el-table-column
156
+            prop="NickName"
157
+            label="微信昵称">
158
+          </el-table-column>
159
+          <el-table-column
160
+            prop="Phone"
161
+            label="手机号">
162
+          </el-table-column>
163
+          <el-table-column
164
+            prop="CreatDate"
165
+            label="创建时间">
166
+          </el-table-column>
167
+          <el-table-column
168
+            prop="Referrer"
169
+            label="推荐人">
170
+          </el-table-column>
171
+        </el-table>
172
+      </div>
173
+      <div>
174
+        <el-pagination
175
+          @current-change="handleCurrentChangeDialog"
176
+          :current-page.sync="dialogPostData.page"
177
+          :page-size="dialogPostData.pagesize"
178
+          layout="prev, pager, next, jumper"
179
+          :total="dialogTotal">
180
+        </el-pagination>
181
+      </div>
182
+      <span slot="footer" class="dialog-footer">
183
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
184
+        <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
185
+      </span>
186
+    </el-dialog>
61 187
   </div>
62 188
 </template>
63 189
 
@@ -68,13 +194,23 @@ export default {
68 194
   name: '',
69 195
   data () {
70 196
     return {
197
+      dialogTotal: 0,
198
+      dialogPostData: {
199
+        caseid: '', // 案场id
200
+        page: 1, // 当前页码
201
+        pagesize: 10, // 请求数据量
202
+      },
203
+      customerList: [],
204
+      centerDialogVisible: false,
71 205
       total: 0,
72 206
       postData: { // 表格搜索条件
73 207
         caseid: '', // 案场id
74 208
         page: 1, // 当前页码
75 209
         pagesize: 10, // 请求数据量
76 210
       },
77
-      currentList: []
211
+      currentList: [{
212
+        xxx: 'xxx'
213
+      }]
78 214
     }
79 215
   },
80 216
   mounted () {
@@ -97,6 +233,21 @@ export default {
97 233
     }
98 234
   },
99 235
   methods: {
236
+    toSendHistory () { // 查看赠送记录
237
+      this.$router.push({name: 'givingRecords'})
238
+    },
239
+    dialogSearch () { // 赠送客户搜索
240
+      // 1
241
+    },
242
+    handleCurrentChangeDialog (val) {
243
+      // 1
244
+    },
245
+    handleSelectionChange (val) {
246
+      // 1
247
+    },
248
+    sendCard (index, row) { // 赠送卡
249
+      this.centerDialogVisible = true
250
+    },
100 251
     search () { // 搜索
101 252
       this.postData.page = 1
102 253
       this.currentList = []
@@ -142,8 +293,8 @@ export default {
142 293
         })
143 294
       })
144 295
     },
145
-    addChannel () {
146
-      this.$router.push({ name: 'addChannel' })
296
+    addCard (val) {
297
+      this.$router.push({ name: 'editCard', query: { type: val } })
147 298
     }
148 299
   }
149 300
 }
@@ -152,4 +303,17 @@ export default {
152 303
 <!-- Add "scoped" attribute to limit CSS to this component only -->
153 304
 <style lang="scss" scoped>
154 305
 @import "page.scss";
306
+.dialogSearchList {
307
+  align-items: center;
308
+  > li {
309
+    font-size: 0;
310
+    margin-left: 10px;
311
+    &:first-child {
312
+      margin-left: 0;
313
+    }
314
+    > *:nth-child(2) {
315
+      margin-left: 10px;
316
+    }
317
+  }
318
+}
155 319
 </style>

+ 376
- 3
src/pages/system/cardAndCouponManager/couponManager/edit.vue Visa fil

@@ -1,6 +1,336 @@
1 1
 <template>
2 2
   <div class="subPage">
3
-    1
3
+    <form class="mainForm">
4
+      <h1 style="font-size:22px;">{{isEdit === 0 ? '新建' : '编辑'}}{{type === 'drink' ? '饮品优惠券' : '课程优惠券'}}</h1>
5
+      <ul>
6
+        <li class="flex-h">
7
+          <span>选择案场:</span>
8
+          <div class="flex-item">
9
+            <div style="width:50%">
10
+              <el-select v-model="postData.CaseId" placeholder="请选择">
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>券图片:</span>
23
+          <div class="flex-item">
24
+            <div>
25
+              <el-upload
26
+                class="avatar-uploader"
27
+                :action='$api.file.image.url'
28
+                :show-file-list="false"
29
+                :on-success="handleAvatarSuccess">
30
+                <img v-if="postData.Img" :src="postData.Img" class="avatar">
31
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
32
+              </el-upload>
33
+            </div>
34
+          </div>
35
+        </li>
36
+        <li class="flex-h">
37
+          <span>券名称:</span>
38
+          <div class="flex-item">
39
+            <div style="width:200px;">
40
+              <el-input
41
+                placeholder="请输入"
42
+                v-model="postData.Name"
43
+                clearable>
44
+              </el-input>
45
+            </div>
46
+          </div>
47
+        </li>
48
+        <li class="flex-h">
49
+          <span>券类型:</span>
50
+          <div class="flex-item">
51
+            <div style="width:50%">
52
+              <el-select v-model="postData.Type" placeholder="请选择">
53
+                <el-option
54
+                  v-for="item in TypeList"
55
+                  :key="item.id"
56
+                  :label="item.name"
57
+                  :value="item.id">
58
+                </el-option>
59
+              </el-select>
60
+            </div>
61
+          </div>
62
+        </li>
63
+        <li class="flex-h">
64
+          <span>券价格:</span>
65
+          <div class="flex-item">
66
+            <div style="width:200px;">
67
+              <el-input
68
+                placeholder="请输入"
69
+                v-model="postData.Price"
70
+                clearable>
71
+              </el-input>
72
+            </div>
73
+          </div>
74
+        </li>
75
+        <li class="flex-h">
76
+          <span>总张数:</span>
77
+          <div class="flex-item">
78
+            <div style="width:200px;">
79
+              <el-input
80
+                placeholder="请输入"
81
+                v-model="postData.TotalNum"
82
+                clearable>
83
+              </el-input>
84
+            </div>
85
+          </div>
86
+        </li>
87
+        <li class="flex-h">
88
+          <span>发送类型:</span>
89
+          <div class="flex-item">
90
+            <div>
91
+              <el-radio v-model="postData.SendType" label="1">渠道</el-radio>
92
+              <el-radio v-if="type === 'course'" v-model="postData.SendType" label="3">案场</el-radio>
93
+              <el-radio v-model="postData.SendType" label="2">系统</el-radio>
94
+            </div>
95
+          </div>
96
+        </li>
97
+        <li class="flex-h">
98
+          <span>选择渠道:</span>
99
+          <div class="flex-item">
100
+            <div style="width:50%">
101
+              <el-select v-model="postData.ChannelId" placeholder="请选择">
102
+                <el-option
103
+                  v-for="item in ChannelList"
104
+                  :key="item.id"
105
+                  :label="item.name"
106
+                  :value="item.id">
107
+                </el-option>
108
+              </el-select>
109
+            </div>
110
+          </div>
111
+        </li>
112
+        <li class="flex-h">
113
+          <span>目标商品:</span>
114
+          <div class="flex-item">
115
+            <div>
116
+              <el-radio v-model="postData.Assign" label="1">全部商品</el-radio>
117
+              <el-radio v-model="postData.Assign" label="2">指定商品</el-radio>
118
+            </div>
119
+          </div>
120
+        </li>
121
+        <li class="flex-h" v-if="postData.Assign === '2'">
122
+          <div class="flex-item">
123
+            <div style="border: 1px solid #eee;">
124
+              <el-table
125
+                :data="currentList"
126
+                stripe
127
+                style="width: 100%">
128
+                <el-table-column
129
+                  prop="Name"
130
+                  label="商品">
131
+                </el-table-column>
132
+                <el-table-column
133
+                  prop="Type"
134
+                  label="分类">
135
+                </el-table-column>
136
+                <el-table-column label="操作">
137
+                  <template slot-scope="scope">
138
+                    <el-button
139
+                      size="mini"
140
+                      type="warning"
141
+                      @click="deleteGoodsItem(scope.$index, scope.row)">删除</el-button>
142
+                  </template>
143
+                </el-table-column>
144
+              </el-table>
145
+              <div style="text-align:center;padding:10px 0;">
146
+                <el-button type="success" size="mini" @click="addGoods">添加商品</el-button>
147
+              </div>
148
+            </div>
149
+          </div>
150
+        </li>
151
+        <li class="flex-h" v-if="type === 'drink'">
152
+          <span>券有效时间:</span>
153
+          <div class="flex-item">
154
+            <div>
155
+              <div class="addLine flex-h" style="align-item:center;margin-bottom:20px;">
156
+                <el-radio v-model="postData.TimeType" label="1">固定时间</el-radio>
157
+                <el-date-picker
158
+                  v-model="postData.StartDate"
159
+                  type="date"
160
+                  placeholder="选择起始日期">
161
+                </el-date-picker>
162
+                <span style="line-height:40px;">至</span>
163
+                <el-date-picker
164
+                  v-model="postData.EndDate"
165
+                  type="date"
166
+                  placeholder="选择截止日期">
167
+                </el-date-picker>
168
+              </div>
169
+              <div class="addLine flex-h" style="align-item:center;">
170
+                <el-radio v-model="postData.TimeType" label="2">领取后</el-radio>
171
+                <span style="width:100px;">
172
+                  <el-input
173
+                    placeholder="请输入"
174
+                    v-model="postData.Days"
175
+                    clearable>
176
+                  </el-input>
177
+                </span>
178
+                <span style="line-height:40px;">天</span>
179
+              </div>
180
+            </div>
181
+          </div>
182
+        </li>
183
+        <li class="flex-h" v-if="type === 'course'">
184
+          <span>券有效时间:</span>
185
+          <div class="flex-item">
186
+            <div>
187
+              <el-date-picker
188
+                v-model="postData.StartDate"
189
+                type="date"
190
+                placeholder="选择起始日期">
191
+              </el-date-picker>
192
+              <span style="line-height:40px;">至</span>
193
+              <el-date-picker
194
+                v-model="postData.EndDate"
195
+                type="date"
196
+                placeholder="选择截止日期">
197
+              </el-date-picker>
198
+            </div>
199
+          </div>
200
+        </li>
201
+        <li class="flex-h">
202
+          <span>视频:</span>
203
+          <div class="flex-item">
204
+            <div></div>
205
+          </div>
206
+        </li>
207
+        <li class="flex-h">
208
+          <span>分享描述:</span>
209
+          <div class="flex-item">
210
+            <div>
211
+              <el-input
212
+                type="textarea"
213
+                :rows="2"
214
+                placeholder="请输入"
215
+                v-model="postData.ShareDesc">
216
+              </el-input>
217
+            </div>
218
+          </div>
219
+        </li>
220
+        <li class="flex-h">
221
+          <span>规则描述:</span>
222
+          <div class="flex-item">
223
+            <div>
224
+              <el-input
225
+                type="textarea"
226
+                :rows="2"
227
+                placeholder="请输入"
228
+                v-model="postData.RuleDesc">
229
+              </el-input>
230
+            </div>
231
+          </div>
232
+        </li>
233
+        <li class="flex-h">
234
+          <span>使用说明:</span>
235
+          <div class="flex-item">
236
+            <div>
237
+              <el-input
238
+                type="textarea"
239
+                :rows="2"
240
+                placeholder="请输入"
241
+                v-model="postData.UsedDesc">
242
+              </el-input>
243
+            </div>
244
+          </div>
245
+        </li>
246
+        <li style="text-align:center">
247
+          <el-button type="primary" size="mini" @click="submit">保存</el-button>
248
+          <el-button type="danger" size="mini" @click="cancel">取消</el-button>
249
+        </li>
250
+      </ul>
251
+    </form>
252
+    <el-dialog
253
+      title="选择指定商品"
254
+      :visible.sync="centerDialogVisible"
255
+      width="650px"
256
+      center>
257
+      <div>
258
+        <div v-if="type === 'drink'">
259
+          <el-table
260
+            ref="multipleTable"
261
+            :data="drinkList"
262
+            tooltip-effect="dark"
263
+            style="width: 100%"
264
+            @selection-change="handleSelectionChange">
265
+            <el-table-column
266
+              type="selection">
267
+            </el-table-column>
268
+            <el-table-column
269
+              prop="Name"
270
+              label="商品名称">
271
+            </el-table-column>
272
+            <el-table-column
273
+              prop="Type"
274
+              label="类别">
275
+            </el-table-column>
276
+            <el-table-column
277
+              prop="Price"
278
+              label="价格">
279
+            </el-table-column>
280
+          </el-table>
281
+          <el-pagination
282
+            @current-change="handleCurrentChange"
283
+            :current-page.sync="postData.page"
284
+            :page-size="postData.pagesize"
285
+            layout="prev, pager, next, jumper"
286
+            :total="total">
287
+          </el-pagination>
288
+        </div>
289
+        <div v-if="type === 'course'">
290
+          <el-table
291
+            ref="multipleTable"
292
+            :data="courseList"
293
+            tooltip-effect="dark"
294
+            style="width: 100%"
295
+            @selection-change="handleSelectionChange">
296
+            <el-table-column
297
+              type="selection">
298
+            </el-table-column>
299
+            <el-table-column
300
+              prop="Name"
301
+              label="商品名称">
302
+            </el-table-column>
303
+            <el-table-column
304
+              prop="StartDate"
305
+              label="开始时间">
306
+            </el-table-column>
307
+            <el-table-column
308
+              prop="EndDate"
309
+              label="结束时间">
310
+            </el-table-column>
311
+            <el-table-column
312
+              prop="Type"
313
+              label="类别">
314
+            </el-table-column>
315
+            <el-table-column
316
+              prop="Price"
317
+              label="价格">
318
+            </el-table-column>
319
+          </el-table>
320
+          <el-pagination
321
+            @current-change="handleCurrentChange"
322
+            :current-page.sync="postData.page"
323
+            :page-size="postData.pagesize"
324
+            layout="prev, pager, next, jumper"
325
+            :total="total">
326
+          </el-pagination>
327
+        </div>
328
+      </div>
329
+      <span slot="footer" class="dialog-footer">
330
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
331
+        <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
332
+      </span>
333
+    </el-dialog>
4 334
   </div>
5 335
 </template>
6 336
 
@@ -10,10 +340,27 @@ import { mapState } from 'vuex'
10 340
 export default {
11 341
   name: '',
12 342
   data () {
13
-    return {}
343
+    return {
344
+      total: 0,
345
+      drinkList: [], // 饮品列表
346
+      courseList: [], // 课程列表
347
+      centerDialogVisible: false,
348
+      type: this.$route.query.type,
349
+      isEdit: this.$route.query.id === undefined ? 0 : 1,
350
+      ChannelList: [], // 渠道列表
351
+      TypeList: [], // 类型列表
352
+      currentList: [{
353
+        Name: 'ccc',
354
+        Type: 'xxx'
355
+      }], // 指定商品数据
356
+      postData: {
357
+        page: 1,
358
+        pagesize: 10,
359
+      },
360
+    }
14 361
   },
15 362
   mounted () {
16
-    this.$nextTick(function () {})
363
+    this.$nextTick(function () { })
17 364
   },
18 365
   computed: {
19 366
     ...mapState({
@@ -30,10 +377,36 @@ export default {
30 377
     }
31 378
   },
32 379
   methods: {
380
+    handleSelectionChange (val) {
381
+      // this.multipleSelection = val;
382
+    },
383
+    addGoods () { // 添加指定商品
384
+      this.centerDialogVisible = true
385
+    },
386
+    submit () { // 保存
387
+      // 1
388
+    },
389
+    cancel () { // 取消
390
+      this.$router.push({ name: 'couponList' })
391
+    },
392
+    deleteGoodsItem () { // 删除指定商品item
393
+      // 1
394
+    },
395
+    handleAvatarSuccess (res, file) {
396
+      this.postData.Img = res.result.url
397
+    },
398
+    handleCurrentChange (val) { // 跳转到分页
399
+      // this.getList()
400
+    },
33 401
   }
34 402
 }
35 403
 </script>
36 404
 
37 405
 <!-- Add "scoped" attribute to limit CSS to this component only -->
38 406
 <style lang="scss" scoped>
407
+.addLine {
408
+  > * {
409
+    margin-right: 10px;
410
+  }
411
+}
39 412
 </style>

+ 172
- 12
src/pages/system/cardAndCouponManager/couponManager/index.vue Visa fil

@@ -3,13 +3,13 @@
3 3
     <div class="system-table-search">
4 4
       <div class="flex-h">
5 5
         <div class="flex-item flex-h">
6
-          <el-button size="mini" type="success" @click='addChannel'>新增饮品优惠券</el-button>
7
-          <el-button size="mini" type="success" @click='addChannel'>新增课程优惠券</el-button>
6
+          <el-button size="mini" type="success" @click="addCoupon('drink')">新增饮品优惠券</el-button>
7
+          <el-button size="mini" type="success" @click="addCoupon('course')">新增课程优惠券</el-button>
8 8
         </div>
9 9
         <ul>
10 10
           <li>
11 11
             <!-- <span>选择案场:</span> -->
12
-            <el-select v-model="CaseId" placeholder="请选择">
12
+            <el-select v-model="CaseId" placeholder="请选择案场">
13 13
               <el-option
14 14
                 v-for="item in cases"
15 15
                 :key="item.CaseId"
@@ -31,14 +31,42 @@
31 31
         stripe
32 32
         style="width: 100%">
33 33
         <el-table-column
34
-          prop="CaseName"
35
-          label="案场">
34
+          prop="xxx"
35
+          label="券名称">
36 36
         </el-table-column>
37 37
         <el-table-column
38
-          prop="ChannelName"
39
-          label="渠道名称">
38
+          prop="xxx"
39
+          label="券类型">
40 40
         </el-table-column>
41
-        <el-table-column label="操作">
41
+        <el-table-column
42
+          prop="xxx"
43
+          label="券价格">
44
+        </el-table-column>
45
+        <el-table-column
46
+          prop="xxx"
47
+          label="有效期">
48
+        </el-table-column>
49
+        <el-table-column
50
+          prop="xxx"
51
+          label="发放类型">
52
+        </el-table-column>
53
+        <el-table-column
54
+          prop="xxx"
55
+          label="总数量">
56
+        </el-table-column>
57
+        <el-table-column
58
+          prop="xxx"
59
+          label="已发">
60
+        </el-table-column>
61
+        <el-table-column
62
+          prop="xxx"
63
+          label="实际使用">
64
+        </el-table-column>
65
+        <el-table-column
66
+          prop="xxx"
67
+          label="状态">
68
+        </el-table-column>
69
+        <el-table-column label="操作" fixed='right' width="350">
42 70
           <template slot-scope="scope">
43 71
             <el-button
44 72
               size="mini"
@@ -47,7 +75,11 @@
47 75
             <el-button
48 76
               size="mini"
49 77
               type="danger"
50
-              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
78
+              @click="sendCoupon(scope.$index, scope.row)">赠送客户</el-button>
79
+            <el-button
80
+              size="mini"
81
+              type="success"
82
+              @click="handleDelete(scope.$index, scope.row)">点击复制链接</el-button>
51 83
           </template>
52 84
         </el-table-column>
53 85
       </el-table>
@@ -59,6 +91,99 @@
59 91
       layout="prev, pager, next, jumper"
60 92
       :total="total">
61 93
     </el-pagination>
94
+    <el-dialog
95
+      title="选择赠送客户"
96
+      :visible.sync="centerDialogVisible"
97
+      width="800px"
98
+      center>
99
+      <div>
100
+        <ul class="dialogSearchList flex-h" style="margin-bottom:10px;">
101
+          <li class="flex-item">
102
+            <el-input
103
+              placeholder="请输入用户名"
104
+              v-model="dialogPostData.username"
105
+              clearable>
106
+            </el-input>
107
+          </li>
108
+          <li class="flex-item">
109
+            <el-input
110
+              placeholder="请输入手机号"
111
+              v-model="dialogPostData.phone"
112
+              clearable>
113
+            </el-input>
114
+          </li>
115
+          <li class="flex-item">
116
+            <el-input
117
+              placeholder="请输入推荐人"
118
+              v-model="dialogPostData.referrer"
119
+              clearable>
120
+            </el-input>
121
+          </li>
122
+          <li>
123
+            <el-button type="primary" @click="dialogSearch">搜索</el-button>
124
+          </li>
125
+        </ul>
126
+        <ul class="dialogSearchList flex-h">
127
+          <li class="flex-item">
128
+            <el-date-picker
129
+              v-model="dialogPostData.startdate"
130
+              type="date"
131
+              placeholder="选择起始日期">
132
+            </el-date-picker>
133
+            <el-date-picker
134
+              v-model="dialogPostData.enddate"
135
+              type="date"
136
+              placeholder="选择截止日期">
137
+            </el-date-picker>
138
+          </li>
139
+        </ul>
140
+      </div>
141
+      <div>
142
+        <el-table
143
+          ref="multipleTable"
144
+          :data="customerList"
145
+          tooltip-effect="dark"
146
+          style="width: 100%"
147
+          @selection-change="handleSelectionChange">
148
+          <el-table-column
149
+            type="selection">
150
+          </el-table-column>
151
+          <el-table-column
152
+            prop="Name"
153
+            label="姓名">
154
+          </el-table-column>
155
+          <el-table-column
156
+            prop="NickName"
157
+            label="微信昵称">
158
+          </el-table-column>
159
+          <el-table-column
160
+            prop="Phone"
161
+            label="手机号">
162
+          </el-table-column>
163
+          <el-table-column
164
+            prop="CreatDate"
165
+            label="创建时间">
166
+          </el-table-column>
167
+          <el-table-column
168
+            prop="Referrer"
169
+            label="推荐人">
170
+          </el-table-column>
171
+        </el-table>
172
+      </div>
173
+      <div>
174
+        <el-pagination
175
+          @current-change="handleCurrentChangeDialog"
176
+          :current-page.sync="dialogPostData.page"
177
+          :page-size="dialogPostData.pagesize"
178
+          layout="prev, pager, next, jumper"
179
+          :total="dialogTotal">
180
+        </el-pagination>
181
+      </div>
182
+      <span slot="footer" class="dialog-footer">
183
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
184
+        <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
185
+      </span>
186
+    </el-dialog>
62 187
   </div>
63 188
 </template>
64 189
 
@@ -69,13 +194,23 @@ export default {
69 194
   name: '',
70 195
   data () {
71 196
     return {
197
+      dialogTotal: 0,
198
+      dialogPostData: {
199
+        caseid: '', // 案场id
200
+        page: 1, // 当前页码
201
+        pagesize: 10, // 请求数据量
202
+      },
203
+      customerList: [],
204
+      centerDialogVisible: false,
72 205
       total: 0,
73 206
       postData: { // 表格搜索条件
74 207
         caseid: '', // 案场id
75 208
         page: 1, // 当前页码
76 209
         pagesize: 10, // 请求数据量
77 210
       },
78
-      currentList: []
211
+      currentList: [{
212
+        xxx: 'xxx'
213
+      }]
79 214
     }
80 215
   },
81 216
   mounted () {
@@ -98,6 +233,18 @@ export default {
98 233
     }
99 234
   },
100 235
   methods: {
236
+    dialogSearch () { // 赠送客户搜索
237
+      // 1
238
+    },
239
+    handleCurrentChangeDialog (val) {
240
+      // 1
241
+    },
242
+    handleSelectionChange (val) {
243
+      // 1
244
+    },
245
+    sendCoupon (index, row) { // 赠送优惠券
246
+      this.centerDialogVisible = true
247
+    },
101 248
     search () { // 搜索
102 249
       this.postData.page = 1
103 250
       this.currentList = []
@@ -143,8 +290,8 @@ export default {
143 290
         })
144 291
       })
145 292
     },
146
-    addChannel () {
147
-      this.$router.push({ name: 'addChannel' })
293
+    addCoupon (val) {
294
+      this.$router.push({ name: 'editCoupon', query: { type: val } })
148 295
     }
149 296
   }
150 297
 }
@@ -153,4 +300,17 @@ export default {
153 300
 <!-- Add "scoped" attribute to limit CSS to this component only -->
154 301
 <style lang="scss" scoped>
155 302
 @import "page.scss";
303
+.dialogSearchList {
304
+  align-items: center;
305
+  > li {
306
+    font-size: 0;
307
+    margin-left: 10px;
308
+    &:first-child {
309
+      margin-left: 0;
310
+    }
311
+    > *:nth-child(2) {
312
+      margin-left: 10px;
313
+    }
314
+  }
315
+}
156 316
 </style>

+ 143
- 0
src/pages/system/cardAndCouponManager/givingRecords.vue Visa fil

@@ -0,0 +1,143 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h"></div>
6
+        <ul>
7
+          <li>
8
+            <el-input
9
+              placeholder="请输入推荐人"
10
+              v-model="postData.referrer"
11
+              clearable>
12
+            </el-input>
13
+          </li>
14
+          <li>
15
+            <el-date-picker
16
+              v-model="postData.startDate"
17
+              type="date"
18
+              placeholder="选择起始日期">
19
+            </el-date-picker>
20
+            <span>至</span>
21
+            <el-date-picker
22
+              v-model="postData.endDate"
23
+              type="date"
24
+              placeholder="选择截止日期">
25
+            </el-date-picker>
26
+          </li>
27
+        </ul>
28
+        <el-button
29
+          size="mini"
30
+          type="primary" @click="search">搜索</el-button>
31
+      </div>
32
+      <div class="moreFilter"></div>
33
+    </div>
34
+    <div class="system-table-box">
35
+      <el-table
36
+        :data="currentList"
37
+        stripe
38
+        style="width: 100%">
39
+        <el-table-column
40
+          prop="xxx"
41
+          label="卡券名称">
42
+        </el-table-column>
43
+        <el-table-column
44
+          prop="xxx"
45
+          label="姓名">
46
+        </el-table-column>
47
+        <el-table-column
48
+          prop="xxx"
49
+          label="微信昵称">
50
+        </el-table-column>
51
+        <el-table-column
52
+          prop="xxx"
53
+          label="手机号">
54
+        </el-table-column>
55
+        <el-table-column
56
+          prop="xxx"
57
+          label="推荐人">
58
+        </el-table-column>
59
+        <el-table-column
60
+          prop="xxx"
61
+          label="赠送时间">
62
+        </el-table-column>
63
+        <el-table-column
64
+          prop="xxx"
65
+          label="操作人">
66
+        </el-table-column>
67
+      </el-table>
68
+    </div>
69
+    <el-pagination
70
+      @current-change="handleCurrentChange"
71
+      :current-page.sync="postData.page"
72
+      :page-size="postData.pagesize"
73
+      layout="prev, pager, next, jumper"
74
+      :total="total">
75
+    </el-pagination>
76
+  </div>
77
+</template>
78
+
79
+<script>
80
+import { mapState } from 'vuex'
81
+
82
+export default {
83
+  name: '',
84
+  data () {
85
+    return {
86
+      customerList: [],
87
+      centerDialogVisible: false,
88
+      total: 0,
89
+      postData: { // 表格搜索条件
90
+        caseid: '', // 案场id
91
+        page: 1, // 当前页码
92
+        pagesize: 10, // 请求数据量
93
+      },
94
+      currentList: [{
95
+        xxx: 'xxx'
96
+      }]
97
+    }
98
+  },
99
+  mounted () {
100
+    this.$nextTick(function () {
101
+      // this.getList()
102
+    })
103
+  },
104
+  computed: {
105
+    ...mapState({
106
+      cases: x => x.app.cases.list,
107
+      defaultCaseId: x => x.app.cases.default
108
+    }),
109
+    CaseId: {
110
+      get () {
111
+        return this.postData.caseid || this.defaultCaseId
112
+      },
113
+      set (val) {
114
+        this.postData.caseid = val
115
+      }
116
+    }
117
+  },
118
+  methods: {
119
+    search () { // 搜索
120
+      this.postData.page = 1
121
+      this.currentList = []
122
+      this.getList()
123
+    },
124
+    getList () { // 获取列表
125
+      // this.$ajax(this.$api.channelManager.getChannelList.url, {
126
+      //   method: this.$api.channelManager.getChannelList.method,
127
+      //   queryData: { ...this.postData, caseid: this.CaseId }
128
+      // }).then(res => {
129
+      //   this.currentList = res.list
130
+      //   this.postData.page = res.page
131
+      //   this.total = res.pagenum
132
+      // })
133
+    },
134
+    handleCurrentChange (val) { // 跳转到分页
135
+      this.getList()
136
+    },
137
+  }
138
+}
139
+</script>
140
+
141
+<!-- Add "scoped" attribute to limit CSS to this component only -->
142
+<style lang="scss" scoped>
143
+</style>

+ 159
- 1
src/pages/system/dataStatistics/goodsOrderList/index.vue Visa fil

@@ -1,16 +1,163 @@
1 1
 <template>
2 2
   <div class="subPage">
3
-    1
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <ul class="searchFilterLine" style="white-space: normal;">
6
+          <li>
7
+            <el-select v-model="CaseId" placeholder="请选择案场">
8
+              <el-option
9
+                v-for="item in cases"
10
+                :key="item.CaseId"
11
+                :label="item.CaseName"
12
+                :value="item.CaseId">
13
+              </el-option>
14
+            </el-select>
15
+          </li>
16
+          <li>
17
+            <el-select v-model="postData.type" placeholder="请选择下单用户类型">
18
+              <el-option
19
+                v-for="item in typeList"
20
+                :key="item.CaseId"
21
+                :label="item.CaseName"
22
+                :value="item.CaseId">
23
+              </el-option>
24
+            </el-select>
25
+          </li>
26
+          <li>
27
+            <el-select v-model="postData.status" placeholder="请选择订单状态">
28
+              <el-option
29
+                v-for="item in statusList"
30
+                :key="item.CaseId"
31
+                :label="item.CaseName"
32
+                :value="item.CaseId">
33
+              </el-option>
34
+            </el-select>
35
+          </li>
36
+          <li style="white-space: nowrap;">
37
+            <span>有下单时间:</span>
38
+            <el-date-picker
39
+              v-model="postData.startDate"
40
+              type="date"
41
+              placeholder="选择起始日期">
42
+            </el-date-picker>
43
+            <span>至</span>
44
+            <el-date-picker
45
+              v-model="postData.endDate"
46
+              type="date"
47
+              placeholder="选择截止日期">
48
+            </el-date-picker>
49
+          </li>
50
+        </ul>
51
+      </div>
52
+      <div class="flex-h">
53
+        <div class="flex-item flex-h"></div>
54
+        <el-button
55
+          size="mini"
56
+          type="primary" @click="search">搜索</el-button>
57
+        <el-button
58
+          size="mini"
59
+          type="success" @click="search">导出Excel</el-button>
60
+      </div>
61
+      <div class="moreFilter"></div>
62
+    </div>
63
+    <div class="system-table-box">
64
+      <el-table
65
+        :data="currentList"
66
+        stripe
67
+        style="width: 100%">
68
+        <el-table-column
69
+          prop="CaseName"
70
+          label="所属案场">
71
+        </el-table-column>
72
+        <el-table-column
73
+          prop="Name"
74
+          label="卡券名称">
75
+        </el-table-column>
76
+        <el-table-column
77
+          prop="GoodsList"
78
+          label="使用商品">
79
+        </el-table-column>
80
+        <el-table-column
81
+          prop="GetType"
82
+          label="获取方式">
83
+        </el-table-column>
84
+        <el-table-column
85
+          prop="NickName"
86
+          label="微信昵称">
87
+        </el-table-column>
88
+        <el-table-column
89
+          prop="Phone"
90
+          label="手机号">
91
+        </el-table-column>
92
+        <el-table-column
93
+          prop="SalerName"
94
+          label="销售">
95
+        </el-table-column>
96
+        <el-table-column
97
+          prop="EndDate"
98
+          label="有效期">
99
+        </el-table-column>
100
+        <el-table-column
101
+          prop="GetDate"
102
+          label="获取时间">
103
+        </el-table-column>
104
+        <el-table-column
105
+          prop="CheckDate"
106
+          label="核销时间">
107
+        </el-table-column>
108
+        <el-table-column
109
+          prop="Status"
110
+          label="状态">
111
+        </el-table-column>
112
+      </el-table>
113
+    </div>
114
+    <el-pagination
115
+      @current-change="handleCurrentChange"
116
+      :current-page.sync="postData.page"
117
+      :page-size="postData.pagesize"
118
+      layout="prev, pager, next, jumper"
119
+      :total="total">
120
+    </el-pagination>
4 121
   </div>
5 122
 </template>
6 123
 
7 124
 <script>
125
+import { mapState } from 'vuex'
8 126
 import tableSearch from '@/components/tableSearch/index'
9 127
 
10 128
 export default {
11 129
   name: '',
12 130
   data () {
13 131
     return {
132
+      total: 0,
133
+      postData: { // 表格搜索条件
134
+        phone: '', // 手机号
135
+        status: '', // 状态
136
+        caseid: '', // 案场id
137
+        type: '', // 获取方式
138
+        startDate: '', // 起始日期
139
+        endDate: '', // 截止日期
140
+        name: '', // 卡券名称
141
+        page: 1, // 当前页码
142
+        pagesize: 10, // 请求数据量
143
+      },
144
+      currentList: [],
145
+      typeList: [],
146
+      statusList: [],
147
+    }
148
+  },
149
+  computed: {
150
+    ...mapState({
151
+      cases: x => x.app.cases.list,
152
+      defaultCaseId: x => x.app.cases.default
153
+    }),
154
+    CaseId: {
155
+      get () {
156
+        return this.postData.caseid || this.defaultCaseId
157
+      },
158
+      set (val) {
159
+        this.postData.caseid = val
160
+      }
14 161
     }
15 162
   },
16 163
   components: {
@@ -21,6 +168,12 @@ export default {
21 168
     })
22 169
   },
23 170
   methods: {
171
+    search () { // 搜索
172
+      // 1
173
+    },
174
+    handleCurrentChange (val) { // 跳转到分页
175
+      // this.getList()
176
+    },
24 177
   }
25 178
 }
26 179
 </script>
@@ -28,4 +181,9 @@ export default {
28 181
 <!-- Add "scoped" attribute to limit CSS to this component only -->
29 182
 <style lang="scss" scoped>
30 183
 @import "page.scss";
184
+.searchFilterLine{
185
+  >li{
186
+    margin-bottom: 20px;
187
+  }
188
+}
31 189
 </style>

+ 6
- 0
src/pages/system/page.js Visa fil

@@ -92,6 +92,7 @@ import cardList from './cardAndCouponManager/cardManager/index' // 卡列表
92 92
 import editCard from './cardAndCouponManager/cardManager/edit' // 编辑卡
93 93
 import couponList from './cardAndCouponManager/couponManager/index' // 券列表
94 94
 import editCoupon from './cardAndCouponManager/couponManager/edit' // 编辑券
95
+import givingRecords from './cardAndCouponManager/givingRecords' // 赠送记录
95 96
 import vipList from './cardAndCouponManager/vipManager/index' // vip列表
96 97
 import editVip from './cardAndCouponManager/vipManager/edit' // 编辑vip
97 98
 import activateVip from './cardAndCouponManager/vipManager/activateVip' // 激活vip
@@ -513,6 +514,11 @@ export default {
513 514
             component: editCoupon,
514 515
             children: []
515 516
           }]
517
+        }, { // 赠送记录
518
+          path: 'givingRecords',
519
+          name: 'givingRecords',
520
+          component: givingRecords,
521
+          children: []
516 522
         }, { // vip列表
517 523
           path: 'vipList',
518 524
           name: 'vipList',

+ 1
- 0
src/util/api.js Visa fil

@@ -1,3 +1,4 @@
1
+// const baseUrl = '/api-v2'
1 2
 const baseUrl = '/api'
2 3
 const common = '/common/:org'
3 4
 const guest = '/guest/:org'