许成详 6 years ago
parent
commit
57f6702eed

+ 1
- 1
dist/index.html View File

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><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.83d0c0e7bdb025819eec501edcf8f187.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.3c9a16350e1e47228e4f.js></script><script type=text/javascript src=./static/js/app.33d0b8b0542e24dfdb3d.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.35b4ceb8c9fe8cd21897d028cc0c21e2.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.3c9a16350e1e47228e4f.js></script><script type=text/javascript src=./static/js/app.2b5745f7ebb70dc3b669.js></script></body></html>

+ 127
- 65
src/pages/system/marketingActivities/listOfLotteryActivities/edit.vue View File

17
                 <span>案场:<em>*</em></span>
17
                 <span>案场:<em>*</em></span>
18
                 <div class="flex-item">
18
                 <div class="flex-item">
19
                   <div style="width:50%">
19
                   <div style="width:50%">
20
-                    <el-select :disabled="!editAll" v-model="CaseId" placeholder="请选择案场">
20
+                    <el-select :disabled="!editAll || isread" v-model="CaseId" placeholder="请选择案场">
21
                       <el-option
21
                       <el-option
22
                         v-for="item in cases"
22
                         v-for="item in cases"
23
                         :key="item.CaseId"
23
                         :key="item.CaseId"
33
                 <div class="flex-item">
33
                 <div class="flex-item">
34
                   <div style="width:50%">
34
                   <div style="width:50%">
35
                     <el-input
35
                     <el-input
36
+                      :disabled="isread"
36
                       placeholder="请输入活动标题"
37
                       placeholder="请输入活动标题"
37
                       v-model="postData.Name"
38
                       v-model="postData.Name"
38
                       clearable>
39
                       clearable>
45
                 <div class="flex-item">
46
                 <div class="flex-item">
46
                   <div>
47
                   <div>
47
                     <el-date-picker
48
                     <el-date-picker
48
-                      :disabled="!editAll"
49
+                      :disabled="!editAll || isread"
49
                       value-format="yyyy-MM-ddT00:00:00+08:00"
50
                       value-format="yyyy-MM-ddT00:00:00+08:00"
50
                       v-model="postData.BeginDate"
51
                       v-model="postData.BeginDate"
51
                       type="date"
52
                       type="date"
53
                     </el-date-picker>
54
                     </el-date-picker>
54
                     <span>至</span>
55
                     <span>至</span>
55
                     <el-date-picker
56
                     <el-date-picker
56
-                      :disabled="!editAll"
57
+                      :disabled="!editAll || isread"
57
                       value-format="yyyy-MM-ddT00:00:00+08:00"
58
                       value-format="yyyy-MM-ddT00:00:00+08:00"
58
                       v-model="postData.EndDate"
59
                       v-model="postData.EndDate"
59
                       type="date"
60
                       type="date"
94
                 <span>活动规则说明:<em>*</em></span>
95
                 <span>活动规则说明:<em>*</em></span>
95
                 <div class="flex-item">
96
                 <div class="flex-item">
96
                   <div>
97
                   <div>
97
-                    <quill-editor v-model="postData.LuckdrawRule"
98
+                    <quill-editor
99
+                      :disabled="isread"
100
+                      v-model="postData.LuckdrawRule"
98
                       ref="myQuillEditor"
101
                       ref="myQuillEditor"
99
                       :options="editorOption">
102
                       :options="editorOption">
100
                     </quill-editor>
103
                     </quill-editor>
136
                 width="200">
139
                 width="200">
137
                 <template slot-scope="scope">
140
                 <template slot-scope="scope">
138
                   <el-button
141
                   <el-button
142
+                    :disabled="isread"
139
                     size="mini"
143
                     size="mini"
140
                     type="success"
144
                     type="success"
141
                     @click="editPrizeItem(scope.row, scope.$index)">编辑</el-button>
145
                     @click="editPrizeItem(scope.row, scope.$index)">编辑</el-button>
142
                   <el-button
146
                   <el-button
143
-                    :disabled="!editAll"
147
+                    :disabled="!editAll || isread"
144
                     size="mini"
148
                     size="mini"
145
                     type="warning"
149
                     type="warning"
146
                     @click="deletePrizeItem(scope.$index)">删除</el-button>
150
                     @click="deletePrizeItem(scope.$index)">删除</el-button>
149
             </el-table>
153
             </el-table>
150
             <div style="text-align:center;margin-top:20px;">
154
             <div style="text-align:center;margin-top:20px;">
151
               <el-button
155
               <el-button
152
-                :disabled="!editAll"
156
+                :disabled="!editAll || isread"
153
                 size="mini"
157
                 size="mini"
154
                 type="primary"
158
                 type="primary"
155
                 @click="addPrize">新增奖品</el-button>
159
                 @click="addPrize">新增奖品</el-button>
161
                 <span>参与类型:</span>
165
                 <span>参与类型:</span>
162
                 <div class="flex-item flex-h">
166
                 <div class="flex-item flex-h">
163
                   <el-switch
167
                   <el-switch
164
-                    :disabled="!editAll"
168
+                    :disabled="!editAll || isread"
165
                     v-model="postData.JoinType"
169
                     v-model="postData.JoinType"
166
                     active-value="newuser"
170
                     active-value="newuser"
167
                     inactive-value="no"
171
                     inactive-value="no"
173
                 <span>抽奖次数:</span>
177
                 <span>抽奖次数:</span>
174
                 <div class="flex-item flex-h">
178
                 <div class="flex-item flex-h">
175
                   <el-switch
179
                   <el-switch
176
-                    :disabled="!editAll"
180
+                    :disabled="!editAll || isread"
177
                     v-model="postData.NumType"
181
                     v-model="postData.NumType"
178
                     active-value="repeat"
182
                     active-value="repeat"
179
                     inactive-value="noRepeat"
183
                     inactive-value="noRepeat"
183
                     <span>每个账号</span>
187
                     <span>每个账号</span>
184
                     <div style="width:100px;">
188
                     <div style="width:100px;">
185
                       <el-input
189
                       <el-input
186
-                        :disabled="!editAll"
190
+                        :disabled="!editAll || isread"
187
                         placeholder=""
191
                         placeholder=""
188
                         v-model="postData.LuckdrawNum"
192
                         v-model="postData.LuckdrawNum"
189
                         clearable>
193
                         clearable>
194
                   <div :hidden="postData.NumType !== 'repeat'">
198
                   <div :hidden="postData.NumType !== 'repeat'">
195
                     <span>每</span>
199
                     <span>每</span>
196
                     <div style="width:100px;">
200
                     <div style="width:100px;">
197
-                      <el-select :disabled="!editAll" v-model="postData.NumInterval" placeholder="请选择">
201
+                      <el-select :disabled="!editAll || isread" v-model="postData.NumInterval" placeholder="请选择">
198
                         <el-option
202
                         <el-option
199
                           v-for="item in lotteryTimeUnitOptions"
203
                           v-for="item in lotteryTimeUnitOptions"
200
                           :key="item.id"
204
                           :key="item.id"
205
                     </div>
209
                     </div>
206
                     <div style="width:100px;">
210
                     <div style="width:100px;">
207
                       <el-input
211
                       <el-input
208
-                        :disabled="!editAll"
212
+                        :disabled="!editAll || isread"
209
                         placeholder=""
213
                         placeholder=""
210
                         v-model="postData.LuckdrawNum"
214
                         v-model="postData.LuckdrawNum"
211
                         clearable>
215
                         clearable>
219
                 <span>分享设置:</span>
223
                 <span>分享设置:</span>
220
                 <div class="flex-item flex-h">
224
                 <div class="flex-item flex-h">
221
                   <el-switch
225
                   <el-switch
222
-                    :disabled="!editAll"
226
+                    :disabled="!editAll || isread"
223
                     v-model="postData.ShareType"
227
                     v-model="postData.ShareType"
224
                     active-value="newuser"
228
                     active-value="newuser"
225
                     inactive-value="no"
229
                     inactive-value="no"
229
                     <span>新增</span>
233
                     <span>新增</span>
230
                     <div style="width:100px;">
234
                     <div style="width:100px;">
231
                       <el-input
235
                       <el-input
232
-                        :disabled="!editAll"
236
+                        :disabled="!editAll || isread"
233
                         placeholder=""
237
                         placeholder=""
234
                         v-model="postData.ShareAddNum"
238
                         v-model="postData.ShareAddNum"
235
                         clearable>
239
                         clearable>
243
                 <span>系统用户抽奖:</span>
247
                 <span>系统用户抽奖:</span>
244
                 <div class="flex-item flex-h">
248
                 <div class="flex-item flex-h">
245
                   <el-switch
249
                   <el-switch
246
-                    :disabled="!editAll"
250
+                    :disabled="!editAll || isread"
247
                     v-model="postData.IsSysLuckdraw"
251
                     v-model="postData.IsSysLuckdraw"
248
                     :active-value="1"
252
                     :active-value="1"
249
                     :inactive-value="0"
253
                     :inactive-value="0"
255
                 <span>奖品内定设置:</span>
259
                 <span>奖品内定设置:</span>
256
                 <div class="flex-item flex-h">
260
                 <div class="flex-item flex-h">
257
                   <el-switch
261
                   <el-switch
258
-                    :disabled="!editAll"
262
+                    :disabled="!editAll || isread"
259
                     v-model="postData.IsInternalDefault"
263
                     v-model="postData.IsInternalDefault"
260
                     :active-value="1"
264
                     :active-value="1"
261
                     :inactive-value="0"
265
                     :inactive-value="0"
286
                 width="200">
290
                 width="200">
287
                 <template slot-scope="scope">
291
                 <template slot-scope="scope">
288
                   <el-button
292
                   <el-button
289
-                    :disabled="!editAll"
293
+                    :disabled="!editAll || isread"
290
                     size="mini"
294
                     size="mini"
291
                     type="success"
295
                     type="success"
292
                     @click="addPrizeItemPhone(scope.$index)">编辑</el-button>
296
                     @click="addPrizeItemPhone(scope.$index)">编辑</el-button>
298
       </div>
302
       </div>
299
       <div style="text-align:center">
303
       <div style="text-align:center">
300
         <el-button
304
         <el-button
305
+          :disabled="isread"
301
           size="mini"
306
           size="mini"
302
           type="success"
307
           type="success"
303
           @click="submitLuckdrawData">保存</el-button>
308
           @click="submitLuckdrawData">保存</el-button>
318
           <li class="flex-h" style="width:50%;float:left;">
323
           <li class="flex-h" style="width:50%;float:left;">
319
             <span>奖品类型:<em>*</em></span>
324
             <span>奖品类型:<em>*</em></span>
320
             <div class="flex-item">
325
             <div class="flex-item">
321
-              <el-select :disabled="!editAll" v-model="addPrizeInfo.PrizeType" @change="prizeTypeChange" placeholder="请选择">
326
+              <el-select :disabled="!editAll || isread" v-model="addPrizeInfo.PrizeType" @change="prizeTypeChange" placeholder="请选择">
322
                 <el-option
327
                 <el-option
323
                   v-for="item in prizeOptions"
328
                   v-for="item in prizeOptions"
324
                   :key="item.id"
329
                   :key="item.id"
329
             </div>
334
             </div>
330
           </li>
335
           </li>
331
           <li class="flex-h" style="width:50%;float:left;" v-if="addPrizeInfo.PrizeType === 'third'">
336
           <li class="flex-h" style="width:50%;float:left;" v-if="addPrizeInfo.PrizeType === 'third'">
337
+            <span>是否实物:<em>*</em></span>
338
+            <div class="flex-item">
339
+              <el-switch
340
+                :disabled="isread"
341
+                v-model="addPrizeInfo.IsReality"
342
+                :active-value="1"
343
+                :inactive-value="0"
344
+                @change="checkIsReality"
345
+                :active-text="addPrizeInfo.IsReality ? '是' : '否'">
346
+              </el-switch>
347
+            </div>
348
+          </li>
349
+          <li class="flex-h" style="width:50%;float:left;" v-if="addPrizeInfo.PrizeType === 'third' && addPrizeInfo.IsReality === 1">
332
             <span>奖品名称:<em>*</em></span>
350
             <span>奖品名称:<em>*</em></span>
333
             <div class="flex-item">
351
             <div class="flex-item">
334
               <div style="width: 200px;">
352
               <div style="width: 200px;">
335
                 <el-input
353
                 <el-input
336
-                  :disabled="!editAll"
354
+                  :disabled="!editAll || isread"
337
                   placeholder=""
355
                   placeholder=""
338
                   v-model="addPrizeInfo.PrizeName"
356
                   v-model="addPrizeInfo.PrizeName"
339
                   clearable>
357
                   clearable>
344
           <li class="flex-h" style="width:50%;float:left;" v-if="addPrizeInfo.PrizeType === 'couponcard'">
362
           <li class="flex-h" style="width:50%;float:left;" v-if="addPrizeInfo.PrizeType === 'couponcard'">
345
             <span>卡券类型:<em>*</em></span>
363
             <span>卡券类型:<em>*</em></span>
346
             <div class="flex-item">
364
             <div class="flex-item">
347
-              <el-select :disabled="!editAll" v-model="addPrizeInfo.CouponCardType" @change="cardCouponChange" placeholder="请选择">
365
+              <el-select :disabled="!editAll || isread" v-model="addPrizeInfo.CouponCardType" @change="cardCouponChange" placeholder="请选择">
348
                 <el-option
366
                 <el-option
349
                   v-for="item in cardOrCouponOptions"
367
                   v-for="item in cardOrCouponOptions"
350
                   :key="item.id"
368
                   :key="item.id"
357
           <li class="flex-h" v-if="addPrizeInfo.PrizeType === 'couponcard'">
375
           <li class="flex-h" v-if="addPrizeInfo.PrizeType === 'couponcard'">
358
             <span>选择卡券:<em>*</em></span>
376
             <span>选择卡券:<em>*</em></span>
359
             <div class="flex-item">
377
             <div class="flex-item">
360
-              <el-select :disabled="!editAll" v-if="addPrizeInfo.CouponCardType === 'card'" v-model="addPrizeInfo.CouponCardId" placeholder="请选择">
378
+              <el-select :disabled="!editAll || isread" v-if="addPrizeInfo.CouponCardType === 'card'" @change="cardChange" v-model="addPrizeInfo.CouponCardId" placeholder="请选择">
361
                 <el-option
379
                 <el-option
362
                   v-for="item in cardList"
380
                   v-for="item in cardList"
363
                   :key="item.CardId"
381
                   :key="item.CardId"
365
                   :value="item.CardId">
383
                   :value="item.CardId">
366
                 </el-option>
384
                 </el-option>
367
               </el-select>
385
               </el-select>
368
-              <el-select :disabled="!editAll" v-if="addPrizeInfo.CouponCardType === 'coupon'" v-model="addPrizeInfo.CouponCardId" placeholder="请选择">
386
+              <el-select :disabled="!editAll || isread" v-if="addPrizeInfo.CouponCardType === 'coupon'" @change="couponChange" v-model="addPrizeInfo.CouponCardId" placeholder="请选择">
369
                 <el-option
387
                 <el-option
370
                   v-for="item in couponList"
388
                   v-for="item in couponList"
371
                   :key="item.CouponId"
389
                   :key="item.CouponId"
375
               </el-select>
393
               </el-select>
376
             </div>
394
             </div>
377
           </li>
395
           </li>
378
-          <li class="flex-h">
379
-            <span>奖品图片:<em>*</em></span>
380
-            <div class="flex-item">
381
-              <el-upload
382
-                :disabled="!editAll"
383
-                class="avatar-uploader"
384
-                action='string'
385
-                :http-request="toolClass.upload"
386
-                :show-file-list="false"
387
-                :on-success="handleAvatarSuccess">
388
-                <img v-if="addPrizeInfo.PrizeImg" :src="addPrizeInfo.PrizeImg" class="avatar">
389
-                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
390
-              </el-upload>
391
-            </div>
392
-          </li>
393
           <li class="flex-h" style="width:50%;float:left;">
396
           <li class="flex-h" style="width:50%;float:left;">
394
             <span>中奖概率:<em>*</em></span>
397
             <span>中奖概率:<em>*</em></span>
395
             <div class="flex-item">
398
             <div class="flex-item">
396
               <div style="width: 200px;display:inline-block;">
399
               <div style="width: 200px;display:inline-block;">
397
                 <el-input
400
                 <el-input
398
-                  :disabled="!editAll"
401
+                  :disabled="!editAll || isread"
399
                   placeholder=""
402
                   placeholder=""
400
                   v-model="addPrizeInfo.Probability"
403
                   v-model="addPrizeInfo.Probability"
401
                   clearable>
404
                   clearable>
404
               <span style="line-height:40px;">%</span>
407
               <span style="line-height:40px;">%</span>
405
             </div>
408
             </div>
406
           </li>
409
           </li>
407
-          <li class="flex-h" style="width:50%;float:left;">
410
+          <li class="flex-h" style="width:50%;float:left;" v-if="!(addPrizeInfo.PrizeType === 'third' && addPrizeInfo.IsReality !== 1)">
408
             <span>奖品数量:<em>*</em></span>
411
             <span>奖品数量:<em>*</em></span>
409
             <div class="flex-item">
412
             <div class="flex-item">
410
               <div style="width: 200px;">
413
               <div style="width: 200px;">
411
                 <el-input
414
                 <el-input
412
-                  :disabled="!editAll"
415
+                  :disabled="!editAll || isread || addPrizeInfo.PrizeType === 'couponcard'"
413
                   placeholder=""
416
                   placeholder=""
414
                   v-model="addPrizeInfo.Stock"
417
                   v-model="addPrizeInfo.Stock"
415
                   clearable>
418
                   clearable>
417
               </div>
420
               </div>
418
             </div>
421
             </div>
419
           </li>
422
           </li>
420
-          <li class="flex-h" v-if="addPrizeInfo.PrizeType === 'third'">
423
+          <li class="flex-h" v-if="addPrizeInfo.PrizeType === 'third' && addPrizeInfo.IsReality === 1">
421
             <span>核销时间:<em>*</em></span>
424
             <span>核销时间:<em>*</em></span>
422
             <div class="flex-item">
425
             <div class="flex-item">
423
               <div class="flex-h" style="width: 100%;align-item: center;">
426
               <div class="flex-h" style="width: 100%;align-item: center;">
424
-                <el-radio :disabled="!editAll" v-model="verificationType" :label="1" style="margin-right: 5px;"><em style="color: transparent;display:none;">1</em></el-radio>
427
+                <el-radio :disabled="!editAll || isread" v-model="verificationType" :label="1" style="margin-right: 5px;"><em style="color: transparent;display:none;">1</em></el-radio>
425
                 <span>领取后</span>
428
                 <span>领取后</span>
426
                 <div style="width: 100px;display: inline-block;">
429
                 <div style="width: 100px;display: inline-block;">
427
                   <el-input
430
                   <el-input
428
-                    :disabled="!editAll"
431
+                    :disabled="!editAll || isread"
429
                     placeholder=""
432
                     placeholder=""
430
                     v-model="addPrizeInfo.ValidDays"
433
                     v-model="addPrizeInfo.ValidDays"
431
                     clearable>
434
                     clearable>
434
                 <span>天内有效</span>
437
                 <span>天内有效</span>
435
               </div>
438
               </div>
436
               <div class="flex-h" style="width: 100%;align-item: center;margin-top: 10px;">
439
               <div class="flex-h" style="width: 100%;align-item: center;margin-top: 10px;">
437
-                <el-radio :disabled="!editAll" v-model="verificationType" :label="2" style="margin-right: 5px;"><em style="color: transparent;display:none;">2</em></el-radio>
440
+                <el-radio :disabled="!editAll || isread" v-model="verificationType" :label="2" style="margin-right: 5px;"><em style="color: transparent;display:none;">2</em></el-radio>
438
                 <span>有效期</span>
441
                 <span>有效期</span>
439
                 <div style="display: inline-block;">
442
                 <div style="display: inline-block;">
440
                   <el-date-picker
443
                   <el-date-picker
441
-                    :disabled="!editAll"
444
+                    :disabled="!editAll || isread"
442
                     value-format="yyyy-MM-ddT00:00:00+08:00"
445
                     value-format="yyyy-MM-ddT00:00:00+08:00"
443
                     v-model="addPrizeInfo.VerificationStart"
446
                     v-model="addPrizeInfo.VerificationStart"
444
                     type="date"
447
                     type="date"
448
                 <span>至</span>
451
                 <span>至</span>
449
                 <div style="display: inline-block;">
452
                 <div style="display: inline-block;">
450
                   <el-date-picker
453
                   <el-date-picker
451
-                    :disabled="!editAll"
454
+                    :disabled="!editAll || isread"
452
                     value-format="yyyy-MM-ddT00:00:00+08:00"
455
                     value-format="yyyy-MM-ddT00:00:00+08:00"
453
                     v-model="addPrizeInfo.VerificationEnd"
456
                     v-model="addPrizeInfo.VerificationEnd"
454
                     type="date"
457
                     type="date"
458
               </div>
461
               </div>
459
             </div>
462
             </div>
460
           </li>
463
           </li>
464
+          <li class="flex-h" style="width:50%;float:left;">
465
+            <span>奖品图片:<em>*</em></span>
466
+            <div class="flex-item">
467
+              <el-upload
468
+                :disabled="!editAll || isread"
469
+                class="avatar-uploader"
470
+                action='string'
471
+                :http-request="toolClass.upload"
472
+                :show-file-list="false"
473
+                :on-success="handleAvatarSuccess">
474
+                <img v-if="addPrizeInfo.PrizeImg" :src="addPrizeInfo.PrizeImg" class="avatar">
475
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
476
+              </el-upload>
477
+            </div>
478
+          </li>
461
           <li class="flex-h" v-if="addPrizeInfo.PrizeType === 'third'">
479
           <li class="flex-h" v-if="addPrizeInfo.PrizeType === 'third'">
462
             <span>兑换说明:</span>
480
             <span>兑换说明:</span>
463
             <div class="flex-item">
481
             <div class="flex-item">
464
               <div>
482
               <div>
465
-                <quill-editor v-model="addPrizeInfo.PrizeDesc"
483
+                <quill-editor
484
+                  :disabled="isread"
485
+                  v-model="addPrizeInfo.PrizeDesc"
466
                   ref="myQuillEditor"
486
                   ref="myQuillEditor"
467
                   :options="editorOption">
487
                   :options="editorOption">
468
                 </quill-editor>
488
                 </quill-editor>
473
       </form>
493
       </form>
474
       <div style="text-align:center;margin:20px 0 0;padding-bottom:20px;">
494
       <div style="text-align:center;margin:20px 0 0;padding-bottom:20px;">
475
         <el-button
495
         <el-button
496
+          :disabled="isread"
476
           size="mini"
497
           size="mini"
477
-          type="primary" @click="savePrizeItem">保存</el-button>
498
+          type="primary"
499
+          @click="savePrizeItem">保存</el-button>
478
         <el-button
500
         <el-button
479
           size="mini"
501
           size="mini"
480
           type="danger"
502
           type="danger"
490
       <div style="text-align:center;font-size:0;">
512
       <div style="text-align:center;font-size:0;">
491
         <div style="width:300px;display:inline-block;margin-right:20px;">
513
         <div style="width:300px;display:inline-block;margin-right:20px;">
492
           <el-input
514
           <el-input
515
+            :disabled="isread"
493
             placeholder="请输入正确手机号"
516
             placeholder="请输入正确手机号"
494
             v-model="addPhoneNum"
517
             v-model="addPhoneNum"
495
             clearable>
518
             clearable>
496
           </el-input>
519
           </el-input>
497
         </div>
520
         </div>
498
         <el-button
521
         <el-button
522
+          :disabled="isread"
499
           type="primary"
523
           type="primary"
500
           @click="addPhoneInPrize">确定</el-button>
524
           @click="addPhoneInPrize">确定</el-button>
501
       </div>
525
       </div>
512
             label="操作">
536
             label="操作">
513
             <template slot-scope="scope">
537
             <template slot-scope="scope">
514
               <el-button
538
               <el-button
539
+                :disabled="isread"
515
                 size="mini"
540
                 size="mini"
516
                 type="warning"
541
                 type="warning"
517
                 @click="deletePrizeItemPhone(scope.$index)">删除</el-button>
542
                 @click="deletePrizeItemPhone(scope.$index)">删除</el-button>
534
 export default {
559
 export default {
535
   data () {
560
   data () {
536
     return {
561
     return {
562
+      isread: false, // 是否预览模式
537
       editAll: true, // 是否全部能编辑
563
       editAll: true, // 是否全部能编辑
538
       editPrizePhoneIndex: '', // 编辑奖品内定手机号索引值
564
       editPrizePhoneIndex: '', // 编辑奖品内定手机号索引值
539
       addPhoneTableData: [], // 添加手机号数据
565
       addPhoneTableData: [], // 添加手机号数据
566
         VerificationEnd: '', // 有效期截止时间
592
         VerificationEnd: '', // 有效期截止时间
567
         PrizeDesc: '', // 兑换说明
593
         PrizeDesc: '', // 兑换说明
568
         Probability: '', // 中奖概率
594
         Probability: '', // 中奖概率
595
+        IsReality: 1, // 是否实物
569
       },
596
       },
570
       verificationType: 1, // 核销类型
597
       verificationType: 1, // 核销类型
571
       centerDialogVisible: false,
598
       centerDialogVisible: false,
587
         BeginDate: '', // 开始日期
614
         BeginDate: '', // 开始日期
588
         EndDate: '', // 截止日期
615
         EndDate: '', // 截止日期
589
         LuckdrawRule: '', // 编辑内容
616
         LuckdrawRule: '', // 编辑内容
590
-        JoinType: 'newuser', // 参与类型
617
+        JoinType: 'no', // 参与类型
591
         NumType: 'repeat', // 抽奖次数类型
618
         NumType: 'repeat', // 抽奖次数类型
592
         NumInterval: 'day', // 抽奖周期单位
619
         NumInterval: 'day', // 抽奖周期单位
593
         LuckdrawNum: '', // 抽奖次数
620
         LuckdrawNum: '', // 抽奖次数
626
     quillEditor,
653
     quillEditor,
627
   },
654
   },
628
   created () {
655
   created () {
656
+    if (this.$route.query.isread) {
657
+      this.isread = true
658
+    }
629
     this.GetCardList({ // 获取卡列表
659
     this.GetCardList({ // 获取卡列表
630
       page: 1,
660
       page: 1,
631
       pagesize: 100000,
661
       pagesize: 100000,
689
     ...mapCouponActions([
719
     ...mapCouponActions([
690
       'GetCouponList',
720
       'GetCouponList',
691
     ]),
721
     ]),
722
+    cardChange () {
723
+      for (var n = 0; n < this.cardList.length; n++) {
724
+        if (this.cardList[n].CardId === this.addPrizeInfo.CouponCardId) {
725
+          this.addPrizeInfo.Stock = this.cardList[n].TotalCount - this.cardList[n].UsedCount
726
+          break
727
+        }
728
+      }
729
+    },
730
+    couponChange () {
731
+      for (var n = 0; n < this.couponList.length; n++) {
732
+        if (this.couponList[n].CouponId === this.addPrizeInfo.CouponCardId) {
733
+          this.addPrizeInfo.Stock = this.couponList[n].TotalCount - this.couponList[n].UsedCount
734
+          break
735
+        }
736
+      }
737
+    },
738
+    checkIsReality () {
739
+      if (!this.addPrizeInfo.IsReality) {
740
+        for (var n in this.addPrizeInfo) {
741
+          if (n !== 'PrizeType' && n !== 'PrizeImg' && n !== 'PrizeDesc' && n !== 'IsReality' && n !== 'Probability') {
742
+            this.addPrizeInfo[n] = ''
743
+          }
744
+        }
745
+      }
746
+    },
692
     checkData () { // 校验活动信息
747
     checkData () { // 校验活动信息
693
       if (this.postData.CaseId === '') {
748
       if (this.postData.CaseId === '') {
694
         this.$message({
749
         this.$message({
868
     },
923
     },
869
     prizeTypeChange () { // 新增奖品类型切换
924
     prizeTypeChange () { // 新增奖品类型切换
870
       for (var n in this.addPrizeInfo) {
925
       for (var n in this.addPrizeInfo) {
871
-        if (n !== 'PrizeType') {
926
+        if (n !== 'PrizeType' && n !== 'IsReality') {
872
           this.addPrizeInfo[n] = ''
927
           this.addPrizeInfo[n] = ''
873
         }
928
         }
874
       }
929
       }
930
+      this.addPrizeInfo.IsReality = 1
875
     },
931
     },
876
     savePrizeItem () { // 保存新增奖品信息
932
     savePrizeItem () { // 保存新增奖品信息
877
       if (this.addPrizeInfo.PrizeType === 'couponcard') { // 卡券
933
       if (this.addPrizeInfo.PrizeType === 'couponcard') { // 卡券
924
           }
980
           }
925
         }
981
         }
926
       } else if (this.addPrizeInfo.PrizeType === 'third') { // 第三方
982
       } else if (this.addPrizeInfo.PrizeType === 'third') { // 第三方
927
-        if (this.addPrizeInfo.PrizeName === '') {
983
+        if (this.addPrizeInfo.PrizeName === '' && this.addPrizeInfo.IsReality) {
928
           this.$message({
984
           this.$message({
929
             type: 'error',
985
             type: 'error',
930
             message: '奖品名称不能为空'
986
             message: '奖品名称不能为空'
931
           })
987
           })
932
           return false
988
           return false
933
         }
989
         }
934
-        if (this.addPrizeInfo.PrizeImg === '') {
935
-          this.$message({
936
-            type: 'error',
937
-            message: '奖品图片不能为空'
938
-          })
939
-          return false
940
-        }
941
         if (this.addPrizeInfo.Probability === '' || (this.addPrizeInfo.Probability - 0) <= 0 || (this.addPrizeInfo.Probability - 0) > 100) {
990
         if (this.addPrizeInfo.Probability === '' || (this.addPrizeInfo.Probability - 0) <= 0 || (this.addPrizeInfo.Probability - 0) > 100) {
942
           this.$message({
991
           this.$message({
943
             type: 'error',
992
             type: 'error',
945
           })
994
           })
946
           return false
995
           return false
947
         }
996
         }
948
-        if (this.addPrizeInfo.Stock === '' || (this.addPrizeInfo.Stock - 0) % 1 !== 0 || (this.addPrizeInfo.Stock - 0) <= 0) {
997
+        if ((this.addPrizeInfo.Stock === '' || (this.addPrizeInfo.Stock - 0) % 1 !== 0 || (this.addPrizeInfo.Stock - 0) <= 0) && this.addPrizeInfo.IsReality) {
949
           this.$message({
998
           this.$message({
950
             type: 'error',
999
             type: 'error',
951
             message: '奖品数量须为大于0正整数'
1000
             message: '奖品数量须为大于0正整数'
952
           })
1001
           })
953
           return false
1002
           return false
954
         }
1003
         }
955
-        if (this.verificationType === 1) {
1004
+        if (this.verificationType === 1 && this.addPrizeInfo.IsReality) {
956
           if (this.addPrizeInfo.ValidDays === '' || (this.addPrizeInfo.ValidDays - 0) % 1 !== 0 || (this.addPrizeInfo.ValidDays - 0) <= 0) {
1005
           if (this.addPrizeInfo.ValidDays === '' || (this.addPrizeInfo.ValidDays - 0) % 1 !== 0 || (this.addPrizeInfo.ValidDays - 0) <= 0) {
957
             this.$message({
1006
             this.$message({
958
               type: 'error',
1007
               type: 'error',
962
           }
1011
           }
963
           this.addPrizeInfo.VerificationStart = ''
1012
           this.addPrizeInfo.VerificationStart = ''
964
           this.addPrizeInfo.VerificationEnd = ''
1013
           this.addPrizeInfo.VerificationEnd = ''
965
-        } else {
1014
+        } else if (this.addPrizeInfo.IsReality) {
966
           if (this.addPrizeInfo.VerificationStart === '') {
1015
           if (this.addPrizeInfo.VerificationStart === '') {
967
             this.$message({
1016
             this.$message({
968
               type: 'error',
1017
               type: 'error',
979
           }
1028
           }
980
           this.addPrizeInfo.ValidDays = ''
1029
           this.addPrizeInfo.ValidDays = ''
981
         }
1030
         }
1031
+        if (this.addPrizeInfo.PrizeImg === '') {
1032
+          this.$message({
1033
+            type: 'error',
1034
+            message: '奖品图片不能为空'
1035
+          })
1036
+          return false
1037
+        }
982
       }
1038
       }
983
       this.addPrizeInfo.Stock = this.addPrizeInfo.Stock - 0
1039
       this.addPrizeInfo.Stock = this.addPrizeInfo.Stock - 0
984
       this.addPrizeInfo.Probability = this.addPrizeInfo.Probability - 0
1040
       this.addPrizeInfo.Probability = this.addPrizeInfo.Probability - 0
1007
       this.addPrizeInfo.CouponCardId = ''
1063
       this.addPrizeInfo.CouponCardId = ''
1008
     },
1064
     },
1009
     cutTemplate (index) { // 切换模板
1065
     cutTemplate (index) { // 切换模板
1010
-      this.templateActiveIndex = index
1011
-      this.postData.TplId = this.templateList[index].TplId
1066
+      if (!this.isread) {
1067
+        this.templateActiveIndex = index
1068
+        this.postData.TplId = this.templateList[index].TplId
1069
+      }
1012
     },
1070
     },
1013
     dbTemplateClick (index) { // 更换背景图
1071
     dbTemplateClick (index) { // 更换背景图
1014
-      this.$refs['templateImg' + index][0].click()
1072
+      if (!this.isread) {
1073
+        this.$refs['templateImg' + index][0].click()
1074
+      }
1015
     },
1075
     },
1016
     templateImgChange (item, e) { // 图片更换
1076
     templateImgChange (item, e) { // 图片更换
1017
       if (e.target.files[0]) {
1077
       if (e.target.files[0]) {
1026
       }
1086
       }
1027
     },
1087
     },
1028
     resetCurrentImg (item, index) { // 重置背景图
1088
     resetCurrentImg (item, index) { // 重置背景图
1029
-      item.currentImg = ''
1030
-      if (this.templateActiveIndex === index) this.postData.Imgs = []
1089
+      if (!this.isread) {
1090
+        item.currentImg = ''
1091
+        if (this.templateActiveIndex === index) this.postData.Imgs = []
1092
+      }
1031
     },
1093
     },
1032
     addPrize () { // 新增奖品
1094
     addPrize () { // 新增奖品
1033
       this.centerDialogVisible = true
1095
       this.centerDialogVisible = true

+ 3
- 0
src/pages/system/marketingActivities/listOfLotteryActivities/index.vue View File

61
           <el-table-column
61
           <el-table-column
62
             prop="Name"
62
             prop="Name"
63
             label="活动名称">
63
             label="活动名称">
64
+            <template slot-scope="scope">
65
+              <router-link style="color:#333;" :to="{name: 'editLotteryActivities', query: {id: scope.row.Id, isread: 1}}">{{scope.row.Name}}</router-link>
66
+            </template>
64
           </el-table-column>
67
           </el-table-column>
65
           <el-table-column
68
           <el-table-column
66
             prop="BeginDate"
69
             prop="BeginDate"

+ 22
- 13
src/pages/system/marketingActivities/snapUpList/edit.vue View File

12
                 <span>案场:<em>*</em></span>
12
                 <span>案场:<em>*</em></span>
13
                 <div class="flex-item">
13
                 <div class="flex-item">
14
                   <div style="width:50%">
14
                   <div style="width:50%">
15
-                    <el-select :disabled="editOff" v-model="CaseId" placeholder="请选择案场">
15
+                    <el-select :disabled="editOff || isread" v-model="CaseId" placeholder="请选择案场">
16
                       <el-option
16
                       <el-option
17
                         v-for="item in cases"
17
                         v-for="item in cases"
18
                         :key="item.CaseId"
18
                         :key="item.CaseId"
28
                 <div class="flex-item">
28
                 <div class="flex-item">
29
                   <div style="width:50%">
29
                   <div style="width:50%">
30
                     <el-input
30
                     <el-input
31
+                      :disabled="isread"
31
                       placeholder="请输入活动名称"
32
                       placeholder="请输入活动名称"
32
                       v-model="postData.FlashBuyName"
33
                       v-model="postData.FlashBuyName"
33
                       clearable>
34
                       clearable>
40
                 <div class="flex-item">
41
                 <div class="flex-item">
41
                   <div style="width:50%">
42
                   <div style="width:50%">
42
                     <el-input
43
                     <el-input
43
-                      :disabled="editOff"
44
+                      :disabled="editOff || isread"
44
                       placeholder="请输入活动名额"
45
                       placeholder="请输入活动名额"
45
                       v-model="postData.FlashBuyMaxAttendant"
46
                       v-model="postData.FlashBuyMaxAttendant"
46
                       clearable>
47
                       clearable>
65
                 <div class="flex-item">
66
                 <div class="flex-item">
66
                   <div>
67
                   <div>
67
                     <el-date-picker
68
                     <el-date-picker
68
-                      :disabled="editOff"
69
+                      :disabled="editOff || isread"
69
                       value-format="yyyy-MM-ddT00:00:00+08:00"
70
                       value-format="yyyy-MM-ddT00:00:00+08:00"
70
                       v-model="postData.StartDate"
71
                       v-model="postData.StartDate"
71
                       type="date"
72
                       type="date"
73
                     </el-date-picker>
74
                     </el-date-picker>
74
                     <span>至</span>
75
                     <span>至</span>
75
                     <el-date-picker
76
                     <el-date-picker
76
-                      :disabled="editOff"
77
+                      :disabled="editOff || isread"
77
                       value-format="yyyy-MM-ddT00:00:00+08:00"
78
                       value-format="yyyy-MM-ddT00:00:00+08:00"
78
                       v-model="postData.EndDate"
79
                       v-model="postData.EndDate"
79
                       type="date"
80
                       type="date"
86
                 <span>活动说明:</span>
87
                 <span>活动说明:</span>
87
                 <div class="flex-item">
88
                 <div class="flex-item">
88
                   <div>
89
                   <div>
89
-                    <quill-editor v-model="postData.FlashBuyInfo"
90
+                    <quill-editor
91
+                      :disabled="isread"
92
+                      v-model="postData.FlashBuyInfo"
90
                       ref="myQuillEditor"
93
                       ref="myQuillEditor"
91
                       :options="editorOption">
94
                       :options="editorOption">
92
                     </quill-editor>
95
                     </quill-editor>
97
                 <span>参与类型:<em>*</em></span>
100
                 <span>参与类型:<em>*</em></span>
98
                 <div class="flex-item">
101
                 <div class="flex-item">
99
                   <div>
102
                   <div>
100
-                    <el-radio :disabled="editOff" v-model="postData.AttendantType" label="no">不限</el-radio>
101
-                    <el-radio :disabled="editOff" v-model="postData.AttendantType" label="newuser">新用户</el-radio>
103
+                    <el-radio :disabled="editOff || isread" v-model="postData.AttendantType" label="no">不限</el-radio>
104
+                    <el-radio :disabled="editOff || isread" v-model="postData.AttendantType" label="newuser">新用户</el-radio>
102
                   </div>
105
                   </div>
103
                 </div>
106
                 </div>
104
               </li>
107
               </li>
106
                 <span>核销时间:<em>*</em></span>
109
                 <span>核销时间:<em>*</em></span>
107
                 <div class="flex-item">
110
                 <div class="flex-item">
108
                   <div class="flex-h" style="width: 100%;align-item: center;">
111
                   <div class="flex-h" style="width: 100%;align-item: center;">
109
-                    <el-radio :disabled="editOff" v-model="postData.ValidateType" label="days" style="margin-right: 5px;"><em style="color: transparent;display:none;">1</em></el-radio>
112
+                    <el-radio :disabled="editOff || isread" v-model="postData.ValidateType" label="days" style="margin-right: 5px;"><em style="color: transparent;display:none;">1</em></el-radio>
110
                     <span>领取后</span>
113
                     <span>领取后</span>
111
                     <div style="width: 100px;display: inline-block;">
114
                     <div style="width: 100px;display: inline-block;">
112
                       <el-input
115
                       <el-input
113
-                        :disabled="editOff"
116
+                        :disabled="editOff || isread"
114
                         placeholder=""
117
                         placeholder=""
115
                         v-model="postData.ValidateDays"
118
                         v-model="postData.ValidateDays"
116
                         clearable>
119
                         clearable>
119
                     <span>天内有效</span>
122
                     <span>天内有效</span>
120
                   </div>
123
                   </div>
121
                   <div class="flex-h" style="width: 100%;align-item: center;margin-top: 10px;">
124
                   <div class="flex-h" style="width: 100%;align-item: center;margin-top: 10px;">
122
-                    <el-radio :disabled="editOff" v-model="postData.ValidateType" label="date" style="margin-right: 5px;"><em style="color: transparent;display:none;">2</em></el-radio>
125
+                    <el-radio :disabled="editOff || isread" v-model="postData.ValidateType" label="date" style="margin-right: 5px;"><em style="color: transparent;display:none;">2</em></el-radio>
123
                     <span>有效期</span>
126
                     <span>有效期</span>
124
                     <div style="display: inline-block;">
127
                     <div style="display: inline-block;">
125
                       <el-date-picker
128
                       <el-date-picker
126
-                        :disabled="editOff"
129
+                        :disabled="editOff || isread"
127
                         value-format="yyyy-MM-ddT00:00:00+08:00"
130
                         value-format="yyyy-MM-ddT00:00:00+08:00"
128
                         v-model="postData.ValidateStart"
131
                         v-model="postData.ValidateStart"
129
                         type="date"
132
                         type="date"
131
                       </el-date-picker>
134
                       </el-date-picker>
132
                       <span>至</span>
135
                       <span>至</span>
133
                       <el-date-picker
136
                       <el-date-picker
134
-                        :disabled="editOff"
137
+                        :disabled="editOff || isread"
135
                         value-format="yyyy-MM-ddT00:00:00+08:00"
138
                         value-format="yyyy-MM-ddT00:00:00+08:00"
136
                         v-model="postData.ValidateEnd"
139
                         v-model="postData.ValidateEnd"
137
                         type="date"
140
                         type="date"
143
               </li>
146
               </li>
144
               <li>
147
               <li>
145
                 <el-button
148
                 <el-button
149
+                  :disabled="isread"
146
                   size="mini"
150
                   size="mini"
147
                   type="primary"
151
                   type="primary"
148
                   @click="submitFlashbuy">保存</el-button>
152
                   @click="submitFlashbuy">保存</el-button>
163
 export default {
167
 export default {
164
   data () {
168
   data () {
165
     return {
169
     return {
170
+      isread: false,
166
       editOff: false,
171
       editOff: false,
167
       templateActiveIndex: 0, // 当前选择模板索引值
172
       templateActiveIndex: 0, // 当前选择模板索引值
168
       templateList: [], // 模板列表
173
       templateList: [], // 模板列表
203
     }
208
     }
204
   },
209
   },
205
   created () {
210
   created () {
211
+    if (this.$route.query.isread) {
212
+      this.isread = true
213
+    }
206
     if (this.$route.query.id) {
214
     if (this.$route.query.id) {
207
       this.editOff = true
215
       this.editOff = true
208
     }
216
     }
209
     this.getFlashbuyTemplateList().then((res) => {
217
     this.getFlashbuyTemplateList().then((res) => {
210
       // console.log(JSON.stringify(res))
218
       // console.log(JSON.stringify(res))
219
+      res = res || []
211
       for (var n = 0; n < res.length; n++) {
220
       for (var n = 0; n < res.length; n++) {
212
         res[n].currentImg = ''
221
         res[n].currentImg = ''
213
       }
222
       }
329
       return true
338
       return true
330
     },
339
     },
331
     cutTemplate (index) { // 切换模板
340
     cutTemplate (index) { // 切换模板
332
-      if (!this.editOff) {
341
+      if (!this.editOff && !this.isread) {
333
         this.templateActiveIndex = index
342
         this.templateActiveIndex = index
334
         this.postData.ModelId = this.templateList[index].ModelId
343
         this.postData.ModelId = this.templateList[index].ModelId
335
       }
344
       }

+ 3
- 0
src/pages/system/marketingActivities/snapUpList/index.vue View File

58
           <el-table-column
58
           <el-table-column
59
             prop="FlashBuyName"
59
             prop="FlashBuyName"
60
             label="活动名称">
60
             label="活动名称">
61
+            <template slot-scope="scope">
62
+              <router-link style="color:#333;" :to="{name: 'editSnapUpList', query: {id: scope.row.FlashBuyId, isread: 1}}">{{scope.row.FlashBuyName}}</router-link>
63
+            </template>
61
           </el-table-column>
64
           </el-table-column>
62
           <el-table-column
65
           <el-table-column
63
             prop="FlashBuyStatus"
66
             prop="FlashBuyStatus"