jufubao-admin-library 1.1.230 → 1.1.232

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -323,5 +323,26 @@ module.exports = {
323
323
  role: '',
324
324
  },
325
325
  // #endif
326
+ {
327
+ title: '健步走:地图 - 修改图片显示状态',
328
+ mapFn: "walkingPointImageStatus",
329
+ // #ifdef admin
330
+ path: '/saas-app-admin/v1/walking/map/point-image-status/:id',
331
+ // #endif
332
+ // #ifdef saas-admin
333
+ path: '/saas-app-company/v1/walking/x_map/point-image-status/:id',
334
+ // #endif
335
+ // #ifdef sms-walking
336
+ path: '/saas-app-partner/v1/walking/x_map/point-image-status/:id',
337
+ // #endif
338
+ isRule: false,
339
+ data: {
340
+ id:['点位ID', 'string', '必填'],
341
+ status:['status', 'string', '必填'],
342
+ },
343
+ disabled: true,
344
+ role: '',
345
+ method:'put'
346
+ },
326
347
  ],
327
348
  }
@@ -38,9 +38,16 @@
38
38
  <el-color-picker v-model="color" size="small" @change="e => handleColorChange(e)"></el-color-picker>
39
39
  </div>
40
40
  <div class="btn-item">
41
- <el-tooltip content="在限制周期内未到达,即未完成也按未达到展示。" placement="top">
41
+ <el-tooltip content="在限制周期内未到达,即未完成也按未达到展示。" placement="top">
42
42
  <span class="el-icon-question"></span>
43
43
  </el-tooltip>
44
+ <span>点位图片:</span>
45
+ <el-switch
46
+ v-model="showImage"
47
+ @change="e => handleShowImageChange(e)"
48
+ active-text="展示"
49
+ inactive-text="隐藏">
50
+ </el-switch>
44
51
  </div>
45
52
  </div>
46
53
  <div class="right">
@@ -102,13 +109,23 @@
102
109
  :step="myStep"
103
110
  :radius-num="radius"
104
111
  :circle-color="color"
112
+ :operate="operate"
105
113
  :site_id="siteId"
106
114
  :typeData="typeData"
107
115
  :is-cycle="form.isCycle"
108
116
  @onDelete="handleItemDelete"
109
117
  @onSubmit="handleItemSubmit"
110
118
  v-model="item.model"
111
- ><span slot="sort">{{sortDataList[item.model.point_total_mileage]}}</span></xd-jbz-item>
119
+ ><span slot="sort">{{sortDataList[item.model.point_total_mileage]}}</span>
120
+ <div slot="content1" v-if="showImage">
121
+ <el-image
122
+ style="width: 100px; height: 100px;border-radius: 5px"
123
+ :src="getImageFullPath(item.model.point_image_url)"
124
+ :preview-src-list="[getImageFullPath(item.model.point_image_url)]">
125
+ </el-image>
126
+ <div class="point_name">{{item['model']['point_name']}}</div>
127
+ </div>
128
+ </xd-jbz-item>
112
129
  </template>
113
130
  </div>
114
131
  <div class="template-status" >
@@ -144,6 +161,7 @@ export default {
144
161
  //页面可编辑数据
145
162
  color:'rgb(52, 152, 219)',
146
163
  noArriveColor:'#999999',
164
+ showImage:false,
147
165
  name:'',
148
166
  status:'Y',
149
167
  backgroundImage:'',
@@ -174,6 +192,7 @@ export default {
174
192
  yHeight: 15.2,
175
193
  siteId:'',
176
194
  typeData: [],
195
+ operate:'',
177
196
  // #ifdef saas-admin sms-walking
178
197
  form:{
179
198
  isCycle:'',
@@ -202,6 +221,7 @@ export default {
202
221
  },
203
222
  },
204
223
  created() {
224
+ this.operate = this.$route.query.operate;
205
225
  getOptions([{
206
226
  // #ifdef sms-walking
207
227
  server:'saas-app-partner',
@@ -249,6 +269,7 @@ export default {
249
269
  'walkingPointColor',//点位颜色
250
270
  'walkingPointSize',//点位大小
251
271
  'walkingPointDelete',//删除点位
272
+ 'walkingPointImageStatus',//图片状态
252
273
  // #ifdef saas-admin sms-walking
253
274
  'walkingPointPeriodLimit',//点位周期限制
254
275
  // #endif
@@ -280,6 +301,7 @@ export default {
280
301
  this.radius = info['map_point_size'] || 43;
281
302
  this.color = info['map_point_color'] || '#3498db';
282
303
  this.noArriveColor = info['map_point_color_for_no_arrived'] || '#999999';
304
+ this.showImage = info['point_image_status'] === 'Y'?true:false;
283
305
  this.name = info['map_name'];
284
306
  this.form.isCycle = info['point_period_limit'];
285
307
  this.backgroundImage = backgroundImage;
@@ -389,18 +411,27 @@ export default {
389
411
  cancelButtonText: '取消'
390
412
  }).then(() => {
391
413
  let loading = Loading.service({});
392
- this.walkingPointDelete({id:data.id})
393
- .then(res=>{
394
- this.$message.success('删除成功')
395
- this.dataList = this.dataList.filter(item =>{
396
- return item.model.id !== data.id
397
- });
398
- this.getInfo()
399
- loading.close()
400
- })
401
- .catch(err=>{
402
- loading.close()
403
- })
414
+ if(!data.id){
415
+ this.dataList = this.dataList.filter(item =>{
416
+ return !item.model.id
417
+ });
418
+ this.$message.success('删除成功')
419
+ this.getInfo()
420
+ loading.close()
421
+ }else{
422
+ this.walkingPointDelete({id:data.id})
423
+ .then(res=>{
424
+ this.$message.success('删除成功')
425
+ this.dataList = this.dataList.filter(item =>{
426
+ return item.model.id !== data.id
427
+ });
428
+ this.getInfo()
429
+ loading.close()
430
+ })
431
+ .catch(err=>{
432
+ loading.close()
433
+ })
434
+ }
404
435
  })
405
436
  .catch(err=>{
406
437
 
@@ -561,6 +592,21 @@ export default {
561
592
  this.$message.error('请选择颜色')
562
593
  }
563
594
  },
595
+ //是否展示图片
596
+ handleShowImageChange(e){
597
+ console.log(e,'eee')
598
+ let params = {
599
+ id:this.map_id,
600
+ status:e?'Y':'N'
601
+ }
602
+ this.walkingPointImageStatus(params)
603
+ .then(res=>{
604
+ this.$message.success('修改点位点位图片显示状态成功')
605
+ })
606
+ .catch(err=>{
607
+ console.log(err,'err')
608
+ })
609
+ },
564
610
  }
565
611
  };
566
612
  </script>
@@ -597,6 +643,7 @@ export default {
597
643
  display: flex;
598
644
  justify-content: flex-start;
599
645
  align-items: center;
646
+ flex-wrap: wrap;
600
647
  & > * {
601
648
  font-size: 14px;
602
649
  flex-shrink: 0;
@@ -609,8 +656,9 @@ export default {
609
656
  display: flex;
610
657
  justify-content: flex-start;
611
658
  align-items: center;
659
+ margin: 2px 40px 2px 0;
612
660
  & > span {
613
- margin-right: 20px;
661
+ margin-right: 10px;
614
662
  }
615
663
  }
616
664
  }
@@ -650,5 +698,10 @@ export default {
650
698
  margin-right: 10px;
651
699
  }
652
700
  }
653
-
701
+ .point_name{
702
+ width:100%;
703
+ text-align:center;
704
+ background-color:#fff;
705
+ border-radius:4px;
706
+ }
654
707
  </style>
@@ -1,4 +1,5 @@
1
1
  <template>
2
+ <div>
2
3
  <div
3
4
  class="xd-jbz-item"
4
5
  v-if="containerDone"
@@ -55,6 +56,10 @@
55
56
  </div>
56
57
  </xd-dialog>
57
58
  </div>
59
+ <div :style="contentStyle" class="content_slot">
60
+ <slot name="content1"></slot>
61
+ </div>
62
+ </div>
58
63
  </template>
59
64
  <script>
60
65
  import XdDialog from "@/components/XdDialog.vue";
@@ -123,6 +128,10 @@ export default {
123
128
  return []
124
129
  }
125
130
  },
131
+ operate:{
132
+ type: String,
133
+ default: ''
134
+ },
126
135
  isCycle: {
127
136
  type: String,
128
137
  default: 'N'
@@ -187,7 +196,8 @@ export default {
187
196
  if(n&&n!==o){
188
197
  this.initForm(Object.assign({},this.orgFormValue,this.formValue))
189
198
  }
190
- }
199
+ },
200
+ immediate: true
191
201
  },
192
202
  'formValue.sms_activity_type':{
193
203
  handler(n,o){
@@ -201,7 +211,8 @@ export default {
201
211
  this.initForm(Object.assign({},this.orgFormValue,this.formValue))
202
212
  }
203
213
  }
204
- }
214
+ },
215
+ immediate: true
205
216
  },
206
217
  // #ifdef saas-admin sms-walking
207
218
  isCycle: {
@@ -221,6 +232,12 @@ export default {
221
232
  width: `${this.width}px`,
222
233
  height: `${this.height}px`,
223
234
  };
235
+ },
236
+ contentStyle() {
237
+ return {
238
+ left: `${this.offsetX+this.radiusNum*2+10}px`,
239
+ top: `${this.offsetY-100}px`,
240
+ };
224
241
  },
225
242
  stepStatus(){
226
243
  if(this.item.step === undefined) return false;
@@ -234,12 +251,19 @@ export default {
234
251
  if(typeof point_position === 'string') point_position = JSON.parse(point_position);
235
252
  let formValue = {
236
253
  ...this.item,
254
+ sms_activity_status: this.item.sms_activity_status || (this.operate === 'STEP_AND_ANSWER' ? 'Y' : 'N'),
255
+ // #ifdef sms-walking
256
+ sms_activity_type: this.item.sms_activity_type || (this.operate === 'STEP_AND_ANSWER' ? 'form' : ''),
257
+ // #endif
258
+ // #ifdef saas-admin
259
+ sms_activity_type: this.item.sms_activity_type || (this.operate === 'STEP_AND_ANSWER' ? 'answer' : ''),
260
+ // #endif
237
261
  point_image_url: {
238
262
  url: this.item.point_image_url
239
263
  },
240
264
  point_position: point_position,
241
265
  // #ifdef sms-walking saas-admin
242
- sms_activity_list:[{label:this.item.sms_activity_name,value:this.item.sms_activity_id}]
266
+ sms_activity_list:this.item.sms_activity_id?[{label:this.item.sms_activity_name,value:this.item.sms_activity_id}]:[]
243
267
  // #endif
244
268
  };
245
269
  // 处理完成周期
@@ -252,6 +276,7 @@ export default {
252
276
  },
253
277
  },
254
278
  created(){
279
+ console.log(this.operate,'operate')
255
280
  this.id = `circle_${this.$xdHelper.randomChar(20)}`;
256
281
  this.init('init');
257
282
  this.$nextTick(() => {
@@ -337,8 +362,9 @@ export default {
337
362
  label: '点位活动:',
338
363
  ele: "xd-radio",
339
364
  valueKey: 'sms_activity_status',
340
- value: params.sms_activity_status || 'N',
365
+ value: params.sms_activity_status?params.sms_activity_status:this.operate==='STEP_AND_ANSWER'?'Y':'N',
341
366
  placeholder: '请选择点位活动',
367
+ disabled: this.operate==='STEP_AND_ANSWER'?true:false,
342
368
  list: [{label:'关闭',value:'N'},{label:'开启',value:'Y'}],
343
369
  rules: [
344
370
  { required: true, message: '请选择点位活动', trigger: ['blur', 'change'] },
@@ -348,7 +374,8 @@ export default {
348
374
  label: '营销工具类型:',
349
375
  ele: 'xd-select-list',
350
376
  valueKey: 'sms_activity_type',
351
- value: params.sms_activity_type||'',
377
+ value: params.sms_activity_type?params.sms_activity_type:this.operate==='STEP_AND_ANSWER'?'form':'',
378
+ disabled: this.operate==='STEP_AND_ANSWER'?true:false,
352
379
  placeholder: '请选择',
353
380
  classNmae:'input40',
354
381
  multiple: false,
@@ -491,8 +518,9 @@ export default {
491
518
  label: '点位活动:',
492
519
  ele: "xd-radio",
493
520
  valueKey: 'sms_activity_status',
494
- value: params.sms_activity_status || 'N',
521
+ value: params.sms_activity_status?params.sms_activity_status:this.operate==='STEP_AND_ANSWER'?'Y':'N',
495
522
  placeholder: '请选择点位活动',
523
+ disabled: this.operate==='STEP_AND_ANSWER'?true:false,
496
524
  list: [{label:'关闭',value:'N'},{label:'开启',value:'Y'}],
497
525
  rules: [
498
526
  { required: true, message: '请选择点位活动', trigger: ['blur', 'change'] },
@@ -502,7 +530,8 @@ export default {
502
530
  label: '营销工具类型:',
503
531
  ele: 'xd-select-list',
504
532
  valueKey: 'sms_activity_type',
505
- value: params.sms_activity_type||'',
533
+ value: params.sms_activity_type?params.sms_activity_type:this.operate==='STEP_AND_ANSWER'?'answer':'',
534
+ disabled: this.operate==='STEP_AND_ANSWER'?true:false,
506
535
  placeholder: '请选择',
507
536
  classNmae:'input40',
508
537
  multiple: false,
@@ -650,8 +679,8 @@ export default {
650
679
  }),
651
680
  // #ifdef sms-walking saas-admin
652
681
  sms_activity_type: type==='normal'?this.formValue.sms_activity_type || this.orgFormValue.sms_activity_type:this.orgFormValue.sms_activity_type,
653
- sms_activity_id: type==='normal'?(this.formValue.sms_activity_list&&this.formValue.sms_activity_list.length)?this.formValue.sms_activity_list[0]['value']:'':this.orgFormValue.sms_activity_list[0]['value'],
654
- sms_activity_name: type==='normal'?(this.formValue.sms_activity_list&&this.formValue.sms_activity_list.length)?this.formValue.sms_activity_list[0]['label']:'':this.orgFormValue.sms_activity_list[0]['label'],
682
+ sms_activity_id: type==='normal'?(this.formValue.sms_activity_list&&this.formValue.sms_activity_list.length)?this.formValue.sms_activity_list[0]['value']:'':(this.orgFormValue.sms_activity_list&&this.orgFormValue.sms_activity_list.length)?this.orgFormValue.sms_activity_list[0]['value']:'',
683
+ sms_activity_name: type==='normal'?(this.formValue.sms_activity_list&&this.formValue.sms_activity_list.length)?this.formValue.sms_activity_list[0]['label']:'':(this.orgFormValue.sms_activity_list&&this.orgFormValue.sms_activity_list.length)?this.orgFormValue.sms_activity_list[0]['label']:'',
655
684
  sms_activity_status: type==='normal'?this.formValue.sms_activity_status || this.orgFormValue.sms_activity_status:this.orgFormValue.sms_activity_status,
656
685
  // #endif
657
686
  // #ifdef sms-walking
@@ -881,4 +910,9 @@ export default {
881
910
  justify-content: flex-end;
882
911
  align-items: center;
883
912
  }
913
+ .content_slot{
914
+ position: absolute;
915
+ width: 100px;
916
+ text-align: center;
917
+ }
884
918
  </style>
@@ -130,6 +130,7 @@ export default {
130
130
  { "type": "normal", "prop": "sub_company_names", "align": "left", "label": "参与企业" },
131
131
  // #endif
132
132
  { "type": "normal", "prop": "activity_sort", "align": "center", "label": "排序" },
133
+ { "type": "normal", "prop": "forward_method_name", "align": "center", "label": "行进方式" },
133
134
  { "type": "normal", "prop": "exchange", "align": "center", "label": "兑换比例" },
134
135
  { "type": "normal", "prop": "activity_status", "align": "center", "label": "状态" },
135
136
  // #ifdef sms-walking
@@ -510,6 +511,18 @@ export default {
510
511
  formatValue: 'timestamp', //输出时间格式
511
512
  placeholder: ['开始时间', '结束时间'],
512
513
  },
514
+ {
515
+ label: '行进方式:',
516
+ ele: 'xd-select-list',
517
+ valueKey: 'forward_method',
518
+ value: '',
519
+ placeholder: '请选择',
520
+ multiple: false,
521
+ list: [
522
+ {label:'步数兑换',value:'STEP_EXCHANGE'},
523
+ {label:'步数+答题',value:'STEP_AND_ANSWER'},
524
+ ]
525
+ },
513
526
  {
514
527
  label: '更新时间:', //label
515
528
  ele: 'xd-date', //package 名称
@@ -14,7 +14,7 @@
14
14
  @onGetParamsAndHeader="handleGetParamsAndHeader"
15
15
  ></xd-base-dynamic-field>
16
16
  <div style="padding-left: 150px">
17
- <el-button @click="goBack" type="primary">返回</el-button>
17
+ <el-button @click="goBack" type="primary">上一步</el-button>
18
18
  <el-button @click="handleGoNext" type="primary">下一步</el-button>
19
19
  </div>
20
20
  </el-card>
@@ -52,6 +52,7 @@ export default {
52
52
  isFirst: false,
53
53
  detailData: null,
54
54
  siteId:'',
55
+ operate:'',
55
56
  }
56
57
  },
57
58
  watch:{
@@ -79,6 +80,7 @@ export default {
79
80
  console.log(this.$route.params,'pppp')
80
81
  this.activity_id = this.$route.params.activity_id
81
82
  this.map_id = this.$route.params.map_id
83
+ this.operate = this.$route.query.operate
82
84
  // #ifdef sms-walking
83
85
  this.siteId = this.$route.params.site_id
84
86
  // #endif
@@ -212,10 +214,22 @@ export default {
212
214
  message: "编辑成功"
213
215
  })
214
216
  // #ifdef sms-walking
215
- this.$router.push(`/walking_config/config/${this.map_id}/${this.activity_id}/${this.siteId}`)
217
+ // this.$router.push(`/walking_config/config/${this.map_id}/${this.activity_id}/${this.siteId}`)
218
+ this.$router.push({
219
+ path: `/walking_config/config/${this.map_id}/${this.activity_id}/${this.siteId}`,
220
+ query: {
221
+ operate: this.operate,
222
+ }
223
+ })
216
224
  // #endif
217
225
  // #ifdef saas-admin
218
- this.$router.push(`/walking_config/config/${this.map_id}/${this.activity_id}`)
226
+ // this.$router.push(`/walking_config/config/${this.map_id}/${this.activity_id}`)
227
+ this.$router.push({
228
+ path: `/walking_config/config/${this.map_id}/${this.activity_id}`,
229
+ query: {
230
+ operate: this.operate,
231
+ }
232
+ })
219
233
  // #endif
220
234
 
221
235
  }).catch(err => {
@@ -230,10 +244,22 @@ export default {
230
244
  // this.$bus.$emit('delTags', this.$route, {}, "partnerAccountList")
231
245
 
232
246
  // #ifdef sms-walking
233
- this.$router.push(`/walking_config/config/${res.data.id}/${this.activity_id}/${this.siteId}`)
247
+ // this.$router.push(`/walking_config/config/${res.data.id}/${this.activity_id}/${this.siteId}`)
248
+ this.$router.push({
249
+ path: `/walking_config/config/${res.data.id}/${this.activity_id}/${this.siteId}`,
250
+ query: {
251
+ operate: this.operate,
252
+ }
253
+ })
234
254
  // #endif
235
255
  // #ifdef saas-admin
236
- this.$router.push(`/walking_config/config/${res.data.id}/${this.activity_id}`)
256
+ // this.$router.push(`/walking_config/config/${res.data.id}/${this.activity_id}`)
257
+ this.$router.push({
258
+ path: `/walking_config/config/${res.data.id}/${this.activity_id}`,
259
+ query: {
260
+ operate: this.operate,
261
+ }
262
+ })
237
263
  // #endif
238
264
  }).catch(err => {
239
265
  console.log(err, 'err')
@@ -38,7 +38,14 @@
38
38
  </el-select>
39
39
  </el-form-item>
40
40
  </div>
41
- <el-form-item label="每日兑换截止时间:" prop="daily_exchange_deadline">
41
+ <el-form-item label="步数兑换方式:" prop="step_exchange_method ">
42
+ <el-radio-group v-model="customForm.step_exchange_method " :disabled="activity_id">
43
+ <el-radio label="DAILY">按日获取并兑换</el-radio>
44
+ <el-radio label="MONTHLY">按月获取并兑换</el-radio>
45
+ </el-radio-group>
46
+ <span style="color:red;margin-left:10px;font-size:12px" v-if="!activity_id">一经选定,将不可修改</span>
47
+ </el-form-item>
48
+ <el-form-item v-if="customForm.step_exchange_method === 'DAILY'" label="每日兑换截止时间:" prop="daily_exchange_deadline">
42
49
  <el-time-picker
43
50
  v-model="customForm.daily_exchange_deadline"
44
51
  :value-format="valueFormat"
@@ -61,6 +68,43 @@
61
68
  </el-form-item>
62
69
  </el-form>
63
70
  </template>
71
+ <template slot-scope="scope" slot="rule">
72
+ <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px">
73
+ <div
74
+ v-for="(item, index) in ruleInfo"
75
+ :key="index"
76
+ style="margin-bottom: 5px;display:flex"
77
+ >
78
+ <div class="m5">
79
+ <el-form-item label="标题" required>
80
+ <el-input
81
+ v-model="ruleInfo[index].title"
82
+ placeholder="请输入标题"
83
+ ></el-input>
84
+ </el-form-item>
85
+ <el-form-item label=" " required>
86
+ <el-input
87
+ type="textarea"
88
+ v-model="ruleInfo[index].content"
89
+ placeholder="请输入规则"
90
+ ></el-input>
91
+ </el-form-item>
92
+ </div>
93
+ <div>
94
+ <i
95
+ v-if="index + 1 === ruleInfo.length"
96
+ class="el-icon-circle-plus pl5 pt5"
97
+ @click="add(item)"
98
+ ></i>
99
+ <i
100
+ v-if="ruleInfo.length > 1"
101
+ class="el-icon-remove pl5 pt5"
102
+ @click="remove(index)"
103
+ ></i>
104
+ </div>
105
+ </div>
106
+ </el-form>
107
+ </template>
64
108
  </xd-base-dynamic-field>
65
109
  <div style="padding-left: 150px">
66
110
  <el-button @click="goBack" type="primary">取消</el-button>
@@ -105,6 +149,7 @@ export default {
105
149
  customForm:{
106
150
  exchange_ratio_step:'',
107
151
  exchange_ratio_mileage:'',
152
+ step_exchange_method:'DAILY',
108
153
  daily_exchange_deadline:'',
109
154
  daily_max_exchange_type:'N',
110
155
  daily_max_exchange_step:''
@@ -135,6 +180,18 @@ export default {
135
180
  siteData:[],
136
181
  siteId:'',
137
182
  companyData:[],
183
+ ruleForm:{},
184
+ ruleInfo:[
185
+ {title:'',content:''},
186
+ ],
187
+ rules:{
188
+ title:[
189
+ { required: true, message: '请输入标题', trigger: ['blur', 'change'] },
190
+ ],
191
+ content:[
192
+ { required: true, message: '请输入规则', trigger: ['blur', 'change'] },
193
+ ]
194
+ }
138
195
  }
139
196
  },
140
197
  watch:{
@@ -146,6 +203,12 @@ export default {
146
203
  if(this.formParams.activity_logo&&this.formParams.activity_logo['url']){
147
204
  copyFormParams.activity_logo = this.formParams.activity_logo['url']
148
205
  }
206
+ if(this.formParams.activity_start_image&&this.formParams.activity_start_image['url']){
207
+ copyFormParams.activity_start_image = this.formParams.activity_start_image['url']
208
+ }
209
+ if(this.formParams.activity_share_image&&this.formParams.activity_share_image['url']){
210
+ copyFormParams.activity_share_image = this.formParams.activity_share_image['url']
211
+ }
149
212
  if(this.activity_id){
150
213
  copyFormParams = Object.assign({},this.detailData,copyFormParams,)
151
214
  }
@@ -161,6 +224,12 @@ export default {
161
224
  if(this.formParams.activity_logo&&this.formParams.activity_logo['url']){
162
225
  copyFormParams.activity_logo = this.formParams.activity_logo['url']
163
226
  }
227
+ if(this.formParams.activity_start_image&&this.formParams.activity_start_image['url']){
228
+ copyFormParams.activity_start_image = this.formParams.activity_start_image['url']
229
+ }
230
+ if(this.formParams.activity_share_image&&this.formParams.activity_share_image['url']){
231
+ copyFormParams.activity_share_image = this.formParams.activity_share_image['url']
232
+ }
164
233
  if(this.activity_id){
165
234
  copyFormParams = Object.assign({},this.detailData,copyFormParams,)
166
235
  }
@@ -175,6 +244,32 @@ export default {
175
244
  if(this.formParams.activity_logo&&this.formParams.activity_logo['url']){
176
245
  copyFormParams.activity_logo = this.formParams.activity_logo['url']
177
246
  }
247
+ if(this.formParams.activity_start_image&&this.formParams.activity_start_image['url']){
248
+ copyFormParams.activity_start_image = this.formParams.activity_start_image['url']
249
+ }
250
+ if(this.formParams.activity_share_image&&this.formParams.activity_share_image['url']){
251
+ copyFormParams.activity_share_image = this.formParams.activity_share_image['url']
252
+ }
253
+ if(this.activity_id){
254
+ copyFormParams = Object.assign({},this.detailData,copyFormParams,)
255
+ }
256
+ this.initFormList(Object.assign({},copyFormParams,this.customForm),this.optionsData)
257
+ }
258
+ }
259
+ },
260
+ 'formParams.activity_registration':{
261
+ handler(n,o){
262
+ if(n&&n!==o){
263
+ let copyFormParams = this.$xdHelper.cloneDeep(this.formParams)
264
+ if(this.formParams.activity_logo&&this.formParams.activity_logo['url']){
265
+ copyFormParams.activity_logo = this.formParams.activity_logo['url']
266
+ }
267
+ if(this.formParams.activity_start_image&&this.formParams.activity_start_image['url']){
268
+ copyFormParams.activity_start_image = this.formParams.activity_start_image['url']
269
+ }
270
+ if(this.formParams.activity_share_image&&this.formParams.activity_share_image['url']){
271
+ copyFormParams.activity_share_image = this.formParams.activity_share_image['url']
272
+ }
178
273
  if(this.activity_id){
179
274
  copyFormParams = Object.assign({},this.detailData,copyFormParams,)
180
275
  }
@@ -236,15 +331,29 @@ export default {
236
331
  this.map_id = res.data.x_map_id
237
332
  this.customForm.exchange_ratio_step = res.data.exchange_ratio_step
238
333
  this.customForm.exchange_ratio_mileage = res.data.exchange_ratio_mileage
334
+ this.customForm.step_exchange_method = res.data.step_exchange_method || 'DAILY'
239
335
  this.customForm.daily_exchange_deadline = res.data.daily_exchange_deadline
240
336
  this.customForm.daily_max_exchange_type = res.data.daily_max_exchange_type
241
337
  if(res.data.daily_max_exchange_step !== undefined) {
242
338
  this.customForm.daily_max_exchange_step = res.data.daily_max_exchange_step
243
339
  }
340
+ if(res.data.company_activity_id){
341
+ res.data.bind_data_list = [{value:res.data.company_activity_id,label:res.data.company_activity_name}]
342
+ }
343
+ if(res.data.activity_desc){
344
+ try{
345
+ this.ruleInfo = JSON.parse(res.data.activity_desc)
346
+ }catch(err){
347
+ console.log(err, 'err')
348
+ }
349
+ }
244
350
  // #ifdef sms-walking
245
351
  if(res.data.activity_url_config){
246
352
  res.data.activity_url_config = JSON.parse(res.data.activity_url_config)
247
353
  }
354
+ if(res.data.activity_start_page_config){
355
+ res.data.activity_start_page_config = JSON.parse(res.data.activity_start_page_config)
356
+ }
248
357
  if(res.data.activity_show_terminals){
249
358
  res.data.activity_show_terminals = JSON.parse(res.data.activity_show_terminals)
250
359
  }
@@ -383,6 +492,36 @@ export default {
383
492
  { required: true, message: "请选择网站地址", trigger: "change" },
384
493
  ],
385
494
  },
495
+ params.site_id&&{
496
+ label: "活动启动页地址:",
497
+ ele: "xd-select-site-path",
498
+ className: "input100",
499
+ valueKey: "activity_start_page_config",
500
+ value: params.activity_start_page_config || null,
501
+ placeholder: "请选择健步走活动启动页面",
502
+ setting:{
503
+ site_id:params.site_id,
504
+ hiddenSite:true
505
+ },
506
+ handleCustom: ({ action, data }) => {
507
+ if (action === "siteList") {
508
+ data.cb(
509
+ this.siteData
510
+ );
511
+ }
512
+ //获取应用列表
513
+ if (action === 'appList') {
514
+ if (data.params && data.params.value) {
515
+ getSiteRouter(this, data.cb, {site_id: data.params.value,isLimit: true});
516
+ } else {
517
+ data.cb([])
518
+ }
519
+ }
520
+ },
521
+ rules: [
522
+ { required: params.activity_registration==='Y', message: "请选择网站地址", trigger: "change" },
523
+ ],
524
+ },
386
525
  {
387
526
  label: '工会ID:', //label
388
527
  ele: "xd-radio",
@@ -422,6 +561,84 @@ export default {
422
561
  ]
423
562
  },
424
563
  // #endif
564
+ {
565
+ label: '活动报名:',
566
+ ele: 'xd-item-notice',
567
+ valueKey: 'activity_registration',
568
+ value: params.activity_registration || 'N',
569
+ setting: {
570
+ inline: false, //true 行内显示 false 换行显示 null: 系统自己判断(默认),
571
+ type: 'radio', //check复选框 //radio 单选
572
+ },
573
+ isKey: true,
574
+ className: 'input100',
575
+ handleCustom ({ action, data }) {
576
+ let list = [
577
+ { value: 'N', label: '关闭' },
578
+ { value: 'Y', label: '开启' , notes: '开启时,必须设置活动启用页,且用户参加活动需填写报名信息'},
579
+ ].filter(i => i);
580
+ data.cb(list)
581
+ },
582
+ rules: [
583
+ { required: true, message: "请选择" },
584
+ ]
585
+ },
586
+ {
587
+ label: '行进方式:',
588
+ ele: 'xd-item-notice',
589
+ valueKey: 'forward_method',
590
+ value: params.forward_method || 'STEP_EXCHANGE',
591
+ setting: {
592
+ inline: false, //true 行内显示 false 换行显示 null: 系统自己判断(默认),
593
+ type: 'radio', //check复选框 //radio 单选
594
+ },
595
+ isKey: true,
596
+ className: 'input100',
597
+ disabled:this.activity_id?true:false,
598
+ handleCustom ({ action, data }) {
599
+ let list = [
600
+ { label: '步数兑换', value: 'STEP_EXCHANGE',},
601
+ { label: '步数+答题解锁', value: 'STEP_AND_ANSWER', notes: '需用户达到步数,并答题后才能解锁下一点位',},
602
+ ].filter(i => i);
603
+ data.cb(list)
604
+ },
605
+ rules: [
606
+ { required: true, message: "请选择处理方式" },
607
+ ]
608
+ },
609
+ {
610
+ label: '关联企业活动:',
611
+ ele: 'xd-remote-select',
612
+ valueKey: 'bind_data_list',
613
+ value: params.bind_data_list || [],
614
+ className: 'input40',
615
+ placeholder: `请选择关联企业活动`,
616
+ multiple: false,
617
+ collapseTags: false,
618
+ remoteSearch: (query, resolve) => {
619
+ getOptions({
620
+ // #ifdef saas-admin
621
+ server: 'saas-app-company',
622
+ // #endif
623
+ // #ifdef sms-walking
624
+ server: 'saas-app-partner',
625
+ // #endif
626
+ fn: 'company-activity',
627
+ path: 'p1',
628
+ params: {
629
+ activity_name: query,
630
+ keyword: query,
631
+ }
632
+ })
633
+ .then(res => {
634
+ resolve(res.data.list)
635
+ })
636
+ .catch()
637
+ },
638
+ rules: [
639
+ { required: false, message: `请选择关联企业活动`, trigger: 'change' },
640
+ ]
641
+ },
425
642
  {
426
643
  ele:'slot',
427
644
  label:'兑换比例:',
@@ -478,7 +695,7 @@ export default {
478
695
  ]
479
696
  },
480
697
  {
481
- label: '活动封面图:',
698
+ label: '活动banner图:',
482
699
  ele: 'xd-upload',
483
700
  valueKey: 'activity_logo',
484
701
  value: {},
@@ -498,7 +715,41 @@ export default {
498
715
  ]
499
716
  },
500
717
  {
501
- label: "活动规则:", //label
718
+ label: '活动启动图:',
719
+ ele: 'xd-upload',
720
+ valueKey: 'activity_start_image',
721
+ value: params['activity_start_image']|| null,
722
+ defaultValue: {url:params.activity_start_image}||null,
723
+ slot: true,
724
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB',
725
+ type: ['jpg', 'png', 'jpeg', 'gif'],
726
+ styleType: 'one',
727
+ uploadType: 'aliyun',
728
+ size: 5, //5M
729
+ action: 'aliyun',
730
+ rules: [
731
+ { required: params.activity_registration==='Y', message: '请上传活动启动图', trigger: ['blur', 'change'] },
732
+ ]
733
+ },
734
+ {
735
+ label: '活动分享图:',
736
+ ele: 'xd-upload',
737
+ valueKey: 'activity_share_image',
738
+ value: params['activity_share_image']|| null,
739
+ defaultValue: {url:params.activity_share_image}||null,
740
+ slot: true,
741
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB',
742
+ type: ['jpg', 'png', 'jpeg', 'gif'],
743
+ styleType: 'one',
744
+ uploadType: 'aliyun',
745
+ size: 5, //5M
746
+ action: 'aliyun',
747
+ rules: [
748
+ { required: false, message: '请上传活动分享图', trigger: ['blur', 'change'] },
749
+ ]
750
+ },
751
+ {
752
+ label: "活动简介:", //label
502
753
  ele: "xd-tinymce", //package 名称
503
754
  valueKey: "activity_rule", //form[valueKey]
504
755
  value: params.activity_rule || "",
@@ -515,9 +766,17 @@ export default {
515
766
  },
516
767
  inline: false,
517
768
  rules: [
518
- { required: true, message: "请添加活动规则", trigger: "change" },
769
+ { required: true, message: "请添加活动简介", trigger: "change" },
519
770
  ],
520
771
  },
772
+ {
773
+ ele: "title",
774
+ label: "活动规则"
775
+ },
776
+ {
777
+ ele:'slot',
778
+ slot:'rule'
779
+ }
521
780
 
522
781
  ]
523
782
  this.formList = formList.filter(i => i)
@@ -530,18 +789,44 @@ export default {
530
789
  if(this.formParams.activity_logo){
531
790
  formParamsCopy.activity_logo = this.formParams.activity_logo.url
532
791
  }
792
+ if(this.formParams.activity_start_image){
793
+ formParamsCopy.activity_start_image = this.formParams.activity_start_image.url
794
+ }else{
795
+ delete formParamsCopy.activity_start_image
796
+ }
797
+ if(this.formParams.activity_share_image){
798
+ formParamsCopy.activity_share_image = this.formParams.activity_share_image.url
799
+ }else{
800
+ delete formParamsCopy.activity_share_image
801
+ }
533
802
  if(this.formParams.activity_start_time){
534
803
  formParamsCopy.activity_start_time = this.formParams.activity_start_time/1000
535
804
  }
536
805
  if(this.formParams.activity_end_time){
537
806
  formParamsCopy.activity_end_time = this.formParams.activity_end_time/1000
538
807
  }
539
-
808
+ if(this.formParams.bind_data_list&&this.formParams.bind_data_list.length){
809
+ formParamsCopy.company_activity_id = this.formParams.bind_data_list[0]['value']
810
+ }
811
+ if(this.ruleInfo&&this.ruleInfo.length){
812
+ for(let i = 0; i < this.ruleInfo.length; i++){
813
+ if(!this.ruleInfo[i].title || !this.ruleInfo[i].content){
814
+ this.$message.error('请填写完整的活动规则')
815
+ return
816
+ }
817
+ }
818
+ formParamsCopy['activity_desc'] = JSON.stringify(this.ruleInfo)
819
+ }
540
820
  // #ifdef sms-walking
541
821
  if(this.formParams.activity_url_config){
542
822
  formParamsCopy['activity_url'] = this.formParams.activity_url_config['app']['frontPath']
543
823
  formParamsCopy['activity_url_config'] = JSON.stringify(this.formParams.activity_url_config)
544
824
  }
825
+ if(this.formParams.activity_start_page_config){
826
+ formParamsCopy['activity_start_page_config'] = JSON.stringify(this.formParams.activity_start_page_config)
827
+ }else{
828
+ delete formParamsCopy['activity_start_page_config']
829
+ }
545
830
  if(this.formParams.activity_show_terminals){
546
831
  formParamsCopy['activity_show_terminals'] = JSON.stringify(this.formParams.activity_show_terminals)
547
832
  }
@@ -555,6 +840,10 @@ export default {
555
840
  if(needFilters.daily_max_exchange_type === 'Y'){
556
841
  needFilters.daily_max_exchange_step = Number(needFilters.daily_max_exchange_step);
557
842
  }
843
+ //按月获取并兑换时删除每日兑换截止时间
844
+ if(needFilters.step_exchange_method === 'MONTHLY') {
845
+ delete needFilters.daily_exchange_deadline;
846
+ }
558
847
 
559
848
  console.log(needFilters,'need')
560
849
  this.$refs.form.submitAll().then(res => {
@@ -569,10 +858,22 @@ export default {
569
858
  message: "编辑成功"
570
859
  })
571
860
  // #ifdef sms-walking
572
- this.$router.push(`/walking_activity/step_background_update/${this.map_id}/${this.activity_id}/${this.siteId}`)
861
+ // this.$router.push(`/walking_activity/step_background_update/${this.map_id}/${this.activity_id}/${this.siteId}`)
862
+ this.$router.push({
863
+ path: `/walking_activity/step_background_update/${this.map_id}/${this.activity_id}/${this.siteId}`,
864
+ query: {
865
+ operate: formParamsCopy.forward_method,
866
+ }
867
+ })
573
868
  // #endif
574
869
  // #ifdef saas-admin
575
- this.$router.push(`/walking_activity/step_background_update/${this.map_id}/${this.activity_id}`)
870
+ // this.$router.push(`/walking_activity/step_background_update/${this.map_id}/${this.activity_id}`)
871
+ this.$router.push({
872
+ path: `/walking_activity/step_background_update/${this.map_id}/${this.activity_id}`,
873
+ query: {
874
+ operate: formParamsCopy.forward_method,
875
+ }
876
+ })
576
877
  // #endif
577
878
  }).catch(err => {
578
879
  console.log(err, 'err')
@@ -584,10 +885,22 @@ export default {
584
885
  message: "添加成功"
585
886
  })
586
887
  // #ifdef sms-walking
587
- this.$router.push(`/walking_activity/step_background/${res.data.id}/${this.siteId}`)
888
+ // this.$router.push(`/walking_activity/step_background/${res.data.id}/${this.siteId}`)
889
+ this.$router.push({
890
+ path: `/walking_activity/step_background/${res.data.id}/${this.siteId}`,
891
+ query: {
892
+ operate: formParamsCopy.forward_method,
893
+ }
894
+ })
588
895
  // #endif
589
896
  // #ifdef saas-admin
590
- this.$router.push(`/walking_activity/step_background/${res.data.id}`)
897
+ // this.$router.push(`/walking_activity/step_background/${res.data.id}`)
898
+ this.$router.push({
899
+ path: `/walking_activity/step_background/${res.data.id}`,
900
+ query: {
901
+ operate: formParamsCopy.forward_method,
902
+ }
903
+ })
591
904
  // #endif
592
905
  }).catch(err => {
593
906
  console.log(err, 'err')
@@ -599,6 +912,20 @@ export default {
599
912
  goBack () {
600
913
  this.$router.replace('/walking_activity/list')
601
914
  },
915
+ add(item) {
916
+ if(!item['title']||!item['content']){
917
+ this.$message.error('请填写完整')
918
+ return
919
+ }
920
+ // if(this.ruleInfo.length>=10){
921
+ // this.$message.error('最多支持十个时间段')
922
+ // return
923
+ // }
924
+ this.ruleInfo.push({title:'',content:''});
925
+ },
926
+ remove(index) {
927
+ this.ruleInfo.splice(index, 1);
928
+ },
602
929
  }
603
930
  }
604
931
 
@@ -646,5 +973,23 @@ export default {
646
973
  margin-left: 0!important;
647
974
  }
648
975
  }
976
+ .el-icon-circle-plus {
977
+ font-size: 22px;
978
+ color: #42B983;
979
+ }
980
+
981
+ .el-icon-remove {
982
+ font-size: 22px;
983
+ color: #F56C6C;
984
+ }
985
+ .pl5{
986
+ padding-left: 5px;
987
+ }
988
+ .pt5{
989
+ padding-top: 5px;
990
+ }
991
+ .m5{
992
+ width: 40%;
993
+ }
649
994
  </style>
650
995
 
@@ -266,6 +266,9 @@ export default {
266
266
  if(res.data.info.x_app_info.x_app_ext_first_path_info){
267
267
  res.data.info.x_app_info.x_app_ext_first_path_info = JSON.parse(res.data.info.x_app_info.x_app_ext_first_path_info)
268
268
  }
269
+ if(res.data.info.x_app_info.x_app_activity_start_page_info){
270
+ res.data.info.x_app_info.x_app_activity_start_page_info = JSON.parse(res.data.info.x_app_info.x_app_activity_start_page_info)
271
+ }
269
272
  let infoData = Object.assign({},res.data.info.app_info,res.data.info.x_app_info)
270
273
  this.initForm(infoData,false);
271
274
  this.dialogShow = true;
@@ -432,6 +435,36 @@ export default {
432
435
  {required: true, message: '请选择网站地址', trigger: 'change'},
433
436
  ],
434
437
  },
438
+ {
439
+ label: '活动启动页:',
440
+ ele: 'xd-select-site-path',
441
+ className: 'input100',
442
+ valueKey: 'x_app_activity_start_page_info',
443
+ value: params.x_app_activity_start_page_info || null,
444
+ setting: {
445
+ site_id: this.site_id,
446
+ hiddenSite:true
447
+ },
448
+ handleCustom: ({action, data}) => {
449
+ if (action === 'siteList') {
450
+ data.cb(
451
+ this.siteData
452
+ );
453
+ }
454
+
455
+ //获取应用列表
456
+ if (action === 'appList') {
457
+ if (data.params && data.params.value) {
458
+ getSiteRouter(this, data.cb, {site_id: data.params.value,isLimit: true});
459
+ } else {
460
+ data.cb([])
461
+ }
462
+ }
463
+ },
464
+ rules: [
465
+ {required: false, message: '请选择网站地址', trigger: 'change'},
466
+ ],
467
+ },
435
468
  {
436
469
  label: '排序:', //label
437
470
  ele: 'el-input', //package 名称
@@ -476,6 +509,10 @@ export default {
476
509
  copyListValue.x_app_detail_path_info = JSON.stringify(this.listValue.x_app_detail_path_info)
477
510
  copyListValue.x_app_detail_path = this.listValue.x_app_detail_path_info.app.frontPath
478
511
  }
512
+ if(this.listValue.x_app_activity_start_page_info&&this.listValue.x_app_activity_start_page_info.app){
513
+ copyListValue.x_app_activity_start_page_info = JSON.stringify(this.listValue.x_app_activity_start_page_info)
514
+ copyListValue.x_app_activity_start_page = this.listValue.x_app_activity_start_page_info.app.frontPath
515
+ }
479
516
  if(this.listValue.x_app_ext_first_path_info&&this.listValue.x_app_ext_first_path_info.app){
480
517
  copyListValue.x_app_ext_first_path_info = JSON.stringify(this.listValue.x_app_ext_first_path_info)
481
518
  copyListValue.x_app_ext_first_path = this.listValue.x_app_ext_first_path_info.app.frontPath
@@ -247,7 +247,7 @@ export default {
247
247
  value: params.activity_type || 'sign_up', //v-model
248
248
  placeholder: '请选择活动类型',
249
249
  disabled:this.id?true:false,
250
- list: [{ value: 'sign_up', label: '企业报名' }, { value: 'activity', label: '企业活动' }],
250
+ list: [{ value: 'sign_up', label: '企业报名' }, { value: 'activity', label: '企业活动' }, { value: 'walking', label: '用于健步走' }],
251
251
  rules: [
252
252
  { required: true, message: '请选择活动类型', trigger: ['blur', 'change'] },
253
253
  ]
@@ -272,17 +272,17 @@ export default {
272
272
  },
273
273
  ],
274
274
  },
275
- {
276
- label: '参与设置:', //label
277
- ele: "xd-radio",
278
- valueKey: 'attend_user_range', //form[valueKey]
279
- value: params.attend_user_range || 'ALL', //v-model
280
- placeholder: '请选择参与设置',
281
- list: [{ value: 'ALL', label: '全部用户' }, { value: 'SPECIFY', label: '指定用户' }],
282
- rules: [
283
- { required: true, message: '请选择参与设置', trigger: ['blur', 'change'] },
284
- ]
285
- },
275
+ // params.activity_type!=='walk'&&{
276
+ // label: '参与设置:', //label
277
+ // ele: "xd-radio",
278
+ // valueKey: 'attend_user_range', //form[valueKey]
279
+ // value: params.attend_user_range || 'ALL', //v-model
280
+ // placeholder: '请选择参与设置',
281
+ // list: [{ value: 'ALL', label: '全部用户' }, { value: 'SPECIFY', label: '指定用户' }],
282
+ // rules: [
283
+ // { required: true, message: '请选择参与设置', trigger: ['blur', 'change'] },
284
+ // ]
285
+ // },
286
286
  // #endif
287
287
  // #ifdef saas-admin
288
288
  {
@@ -590,15 +590,15 @@ export default {
590
590
  { required: true, message: "请输入数值" }
591
591
  ]
592
592
  },
593
- {
594
- ele: "title",
595
- label: "内容设置",
596
- size: "mini", //default/mini/small
597
- },
598
- {
599
- ele:'slot',
600
- slot:'content'
601
- }
593
+ // params.activity_type!=='walk'&&{
594
+ // ele: "title",
595
+ // label: "内容设置",
596
+ // size: "mini", //default/mini/small
597
+ // },
598
+ // params.activity_type!=='walk'&&{
599
+ // ele:'slot',
600
+ // slot:'content'
601
+ // }
602
602
  ].filter(i=>i)
603
603
 
604
604
  this.listForm = form.filter(i => i)
@@ -635,24 +635,24 @@ export default {
635
635
  if(this.listValue.activity_banners&&this.listValue.activity_banners.length){
636
636
  copyFormParams['activity_banners'] = JSON.stringify(this.listValue.activity_banners)
637
637
  }
638
- if(this.contentList&&this.contentList.length){
639
- let isReturn = false
640
- this.contentList.map(i=>{
641
- if(!i.rule){
642
- isReturn = true
643
- return false
644
- }
645
- })
646
- if(isReturn){
647
- this.$message.error('请输入规则')
648
- return false
649
- }else{
650
- copyFormParams['activity_content_config'] = JSON.stringify(this.contentList)
651
- }
652
- }else{
653
- this.$message.error('请进行内容设置')
654
- return false
655
- }
638
+ // if(this.contentList&&this.contentList.length){
639
+ // let isReturn = false
640
+ // this.contentList.map(i=>{
641
+ // if(!i.rule){
642
+ // isReturn = true
643
+ // return false
644
+ // }
645
+ // })
646
+ // if(isReturn){
647
+ // this.$message.error('请输入规则')
648
+ // return false
649
+ // }else{
650
+ // copyFormParams['activity_content_config'] = JSON.stringify(this.contentList)
651
+ // }
652
+ // }else{
653
+ // this.$message.error('请进行内容设置')
654
+ // return false
655
+ // }
656
656
  if (this.listValue['fee_type'] === 'no_free') {
657
657
  copyFormParams['activity_fee'] = this.$xdHelper.multiplyFloatNumber(Number(this.listValue['activity_fee']), 100)
658
658
  }else if(this.listValue['fee_type'] === 'free'){
@@ -39,7 +39,7 @@
39
39
  </div>
40
40
  </template>
41
41
  <template slot="activity_type" slot-scope="scope">
42
- <div>{{scope.row.activity_type==='sign_up'?'企业报名':scope.row.activity_type==='activity'?'企业活动':''}}</div>
42
+ <div>{{scope.row.activity_type==='sign_up'?'企业报名':scope.row.activity_type==='activity'?'企业活动':scope.row.activity_type==='walking'?'用于健步走':''}}</div>
43
43
  </template>
44
44
  <template slot="bucket" slot-scope="scope">
45
45
  <div>{{scope.row.bucket==='COMPANY'?'福利':scope.row.activity_type==='PARTNER'?'自有':''}}</div>
@@ -16,6 +16,7 @@ module.exports = {
16
16
  trade_type: ["交易类型", "string", "必填"],
17
17
  main_order_id: ["主订单ID", "string", "非必填"],
18
18
  business_code: ["业务编码", "string", "非必填"],
19
+ site_id: ["站点ID", "string", "非必填"],
19
20
  supplier_name: ["供应商名称", "string", "非必填"],
20
21
  start_time: ["开始时间", "string", "非必填"],
21
22
  end_time: ["结束时间", "string", "非必填"],
@@ -78,6 +79,7 @@ module.exports = {
78
79
  trade_type: ["交易类型", "string", "必填"],
79
80
  main_order_id: ["主订单ID", "string", "非必填"],
80
81
  business_code: ["业务编码", "string", "非必填"],
82
+ site_id: ["站点ID", "string", "非必填"],
81
83
  supplier_name: ["供应商名称", "string", "非必填"],
82
84
  start_time: ["开始时间", "string", "非必填"],
83
85
  end_time: ["结束时间", "string", "非必填"],
@@ -56,6 +56,28 @@
56
56
  </el-select>
57
57
  </div>
58
58
  </template>
59
+ <template slot="site_id">
60
+ <div>
61
+ <el-select v-model="site_id" filterable clearable placeholder="请选择站点">
62
+ <el-option
63
+ v-for="item in siteList"
64
+ :key="item.value"
65
+ :label="item.label"
66
+ :value="item.value"
67
+ >
68
+ </el-option>
69
+ </el-select>
70
+ <el-select v-if="site_id" v-model="namespace" clearable placeholder="请选择业务线" :key="namespaceKey">
71
+ <el-option
72
+ v-for="item in namespaceList"
73
+ :key="item.value"
74
+ :label="item.label"
75
+ :value="item.value"
76
+ >
77
+ </el-option>
78
+ </el-select>
79
+ </div>
80
+ </template>
59
81
  </xd-search>
60
82
  </el-card>
61
83
  <el-card class="app-container__list">
@@ -181,6 +203,9 @@
181
203
  </template>
182
204
  </div>
183
205
  </template>
206
+ <template slot="site_business_code_name" slot-scope="scope">
207
+ <span v-html="scope.row.site_business_code_name"></span>
208
+ </template>
184
209
  <template slot="amount" slot-scope="scope">
185
210
  <xd-table-price :price="scope.row.amount" :key="rePriceKey"></xd-table-price>
186
211
  <div v-if="isShowDeductDetail(scope.row)" style="display:flex; justify-content: center; align-items: center">
@@ -327,6 +352,13 @@ export default {
327
352
  label: "商品信息",
328
353
  },
329
354
  // { "type": "normal", "prop": "category_name", "align": "center", "minWidth": 200, "label": "公式" },
355
+ {
356
+ type: "normal",
357
+ prop: "site_business_code_name",
358
+ align: "center",
359
+ minWidth: 200,
360
+ label: "站点/业务线",
361
+ },
330
362
  {
331
363
  type: "price",
332
364
  prop: "amount",
@@ -401,6 +433,11 @@ export default {
401
433
  supplier_ids: null,
402
434
  supplierList: [],
403
435
  showSupplier: false,
436
+ siteList: [],
437
+ site_id: null,
438
+ namespaceList: [],
439
+ namespace: null,
440
+ namespaceKey: 'namespaceKey',
404
441
 
405
442
  //查看明细
406
443
  dialogTableVisible:false,
@@ -434,6 +471,24 @@ export default {
434
471
  this.showSupplier = this.channelList.find(item => item.value === val).has_supplier==='Y';
435
472
  }
436
473
  },
474
+ site_id(n, o) {
475
+ if(n && n !== o) {
476
+ this.namespace = null;
477
+ this.namespaceList = [];
478
+ getOptions({
479
+ server: 'partner',
480
+ fn: 'business-line',
481
+ path: 'p1',
482
+ params: {
483
+ select_method: 'ALL-SITE',
484
+ site_id: n === '*' ? 0 : n
485
+ }
486
+ }).then(res => {
487
+ this.namespaceList = res.data.list
488
+ this.namespaceKey = Date.now()
489
+ })
490
+ }
491
+ },
437
492
  },
438
493
  created() {
439
494
  this.initSearchForm();
@@ -547,6 +602,12 @@ export default {
547
602
  if(other.rebate_from_partner_list&&other.rebate_from_partner_list.length){
548
603
  other.rebate_from_partner_id = other.rebate_from_partner_list[0]['value']
549
604
  }
605
+ if(this.site_id){
606
+ other.site_id = this.site_id
607
+ }
608
+ if(this.namespace){
609
+ other.business_code = this.namespace
610
+ }
550
611
  return {
551
612
  ...other,
552
613
  supplier_ids,
@@ -609,6 +670,9 @@ export default {
609
670
  loading.close();
610
671
  this.tables = res.data.list.map((item) => {
611
672
  item["created_time"] = baseJsDateToTime(item["created_time"]);
673
+ item["site_business_code_name"] = item["site_name"] && item["business_code_name"]
674
+ ? `${item["site_name"]}<br/>${item["business_code_name"]}`
675
+ : (item["site_name"] || item["business_code_name"] || '');
612
676
  item["product_list"] = item["product_list"].map((prod) => {
613
677
  prod["product_thumb"] = this.getImageFullPath(
614
678
  prod["product_thumb"]
@@ -635,6 +699,8 @@ export default {
635
699
  if(action === "reset") {
636
700
  this.supplier_ids=null
637
701
  this.channel_code=null
702
+ this.site_id=null
703
+ this.namespace=null
638
704
  }
639
705
  this.page_token = 1;
640
706
  this.getList();
@@ -660,10 +726,16 @@ export default {
660
726
  params: {
661
727
  type: 'partner'
662
728
  }
729
+ },
730
+ {
731
+ server: 'idaas-partner',
732
+ fn: 'sites',
733
+ path: 'p1',
663
734
  }
664
735
  ]
665
736
  ).then(res=>{
666
737
  this.channelList = res[0].data.list;
738
+ this.siteList = res[2].data.list;
667
739
  this.searchForm = [
668
740
  {
669
741
  label: "加盟商",
@@ -672,6 +744,11 @@ export default {
672
744
  value: this.partner_name || this.partner_id,
673
745
  placeholder: "请输入名称",
674
746
  },
747
+ {
748
+ label: "业务线: ",
749
+ ele: "slot",
750
+ slot: "site_id",
751
+ },
675
752
  {
676
753
  label: "账户类型",
677
754
  ele: "xd-select-list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.230",
3
+ "version": "1.1.232",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {
Binary file