jufubao-admin-library 1.1.203 → 1.1.205
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.
- package/library/pageComponents/modules/JfbRuleCreate.vue +24 -1
- package/library/pageComponents/modules/lib/JfbRuleCreate.js +5 -1
- package/library/viewModules/viewWalking/schemas/walking.js +20 -0
- package/library/viewModules/viewWalking/viewWalking/config.vue +60 -3
- package/library/viewModules/viewWalking/viewWalking/jbz/XdJbzItemScale.vue +63 -2
- package/package.json +1 -1
|
@@ -78,6 +78,20 @@
|
|
|
78
78
|
</div>
|
|
79
79
|
<div style="color: red;font-size: 12px;line-height: 18px;">设置后将按每周周几对应时间点调价,例如每周星期五17点~22点调价<br/>另所选时间是向后包含的,例如23时即为23:00:00~23:59:59</div>
|
|
80
80
|
</el-form-item>
|
|
81
|
+
</template>
|
|
82
|
+
<template slot="sale_num_rank">
|
|
83
|
+
<el-form-item label="按销量排行:" prop="sale_num_rank">
|
|
84
|
+
<div style="display:flex">
|
|
85
|
+
<div style="margin-right:10px">前 </div>
|
|
86
|
+
<el-input
|
|
87
|
+
style="width: 40%;"
|
|
88
|
+
v-model="rankForm.sale_num_rank"
|
|
89
|
+
type="number"
|
|
90
|
+
placeholder="请输入销量排行"
|
|
91
|
+
></el-input>
|
|
92
|
+
<div style="font-size:12px;color:#999;margin-left:10px">销量排行变更无法自动触发选品</div>
|
|
93
|
+
</div>
|
|
94
|
+
</el-form-item>
|
|
81
95
|
</template>
|
|
82
96
|
</xd-base-dynamic-field>
|
|
83
97
|
<div v-if="!isView" class="adjust-btn" style="margin-left: 140px">
|
|
@@ -130,6 +144,9 @@
|
|
|
130
144
|
{ required: true, message: '请选择标签', trigger: 'change' }
|
|
131
145
|
],
|
|
132
146
|
},
|
|
147
|
+
rankForm:{
|
|
148
|
+
sale_num_rank:'',
|
|
149
|
+
},
|
|
133
150
|
valueFormat: 'HH',
|
|
134
151
|
pickerOptions: { start: '01',end:'00',step:'01' },
|
|
135
152
|
handTimeOptions:[{start:'',end:''}],
|
|
@@ -335,6 +352,10 @@
|
|
|
335
352
|
this.tagForm.zTag = conditions.partner_product_tags['includes']
|
|
336
353
|
// this.tagForm.fTag = conditions.partner_product_tags['excludes']
|
|
337
354
|
}
|
|
355
|
+
//按销量排行
|
|
356
|
+
if (conditions.sale_num_rank !== undefined) {
|
|
357
|
+
this.rankForm.sale_num_rank = conditions.sale_num_rank
|
|
358
|
+
}
|
|
338
359
|
|
|
339
360
|
//设置渠道选择值
|
|
340
361
|
this.channelActiveName = agg_channel_code || this.channelTabList[0]['value'];
|
|
@@ -536,7 +557,9 @@
|
|
|
536
557
|
}
|
|
537
558
|
}
|
|
538
559
|
}
|
|
539
|
-
|
|
560
|
+
if(this.rankForm.sale_num_rank){
|
|
561
|
+
params['item']['conditions']['sale_num_rank'] = this.rankForm.sale_num_rank
|
|
562
|
+
}
|
|
540
563
|
// console.log(params)
|
|
541
564
|
// return;
|
|
542
565
|
|
|
@@ -110,7 +110,7 @@ export default {
|
|
|
110
110
|
validateSaleNum(rule, value, callback){
|
|
111
111
|
console.log(rule, value,'apapapap');
|
|
112
112
|
if(value) {
|
|
113
|
-
if(value.end<value.start) {
|
|
113
|
+
if(Number(value.end)<Number(value.start)) {
|
|
114
114
|
callback(new Error('结束值不能小于起始值'));
|
|
115
115
|
} else {
|
|
116
116
|
callback()
|
|
@@ -508,6 +508,10 @@ export default {
|
|
|
508
508
|
},
|
|
509
509
|
rules: [{ validator: this.validateSaleNum, trigger: 'blur' }],
|
|
510
510
|
},
|
|
511
|
+
this.channelParams.scene === "select" &&{
|
|
512
|
+
ele:'slot',
|
|
513
|
+
slot:'sale_num_rank',
|
|
514
|
+
},
|
|
511
515
|
this.checkConfig('is_push_gift') && {
|
|
512
516
|
label: '是否推送至礼包:',
|
|
513
517
|
ele: 'xd-radio',
|
|
@@ -256,6 +256,26 @@ module.exports = {
|
|
|
256
256
|
role: '',
|
|
257
257
|
method:'put'
|
|
258
258
|
},
|
|
259
|
+
// #ifdef saas-admin sms-walking
|
|
260
|
+
{
|
|
261
|
+
title: '健步走:地图 - 修改点位周期限制',
|
|
262
|
+
mapFn: "walkingPointPeriodLimit",
|
|
263
|
+
// #ifdef saas-admin
|
|
264
|
+
path: '/saas-app-company/v1/walking/x_map/point-period-limit/:id',
|
|
265
|
+
// #endif
|
|
266
|
+
// #ifdef sms-walking
|
|
267
|
+
path: '/saas-app-partner/v1/walking/x_map/point-period-limit/:id',
|
|
268
|
+
// #endif
|
|
269
|
+
isRule: false,
|
|
270
|
+
data: {
|
|
271
|
+
id: ['点位ID', 'string', '必填'],
|
|
272
|
+
point_period_limit: ['点位周期限制', 'string', '必填'],
|
|
273
|
+
},
|
|
274
|
+
disabled: true,
|
|
275
|
+
role: '',
|
|
276
|
+
method: 'put'
|
|
277
|
+
},
|
|
278
|
+
// #endif
|
|
259
279
|
{
|
|
260
280
|
title: '健步走:地图 - 删除点位',
|
|
261
281
|
mapFn: "walkingPointDelete",
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
<span>到达点位颜色:</span>
|
|
38
38
|
<el-color-picker v-model="color" size="small" @change="e => handleColorChange(e)"></el-color-picker>
|
|
39
39
|
</div>
|
|
40
|
+
<div class="btn-item">
|
|
41
|
+
<el-tooltip content="在限制周期内未到达,即未完成也按未达到展示。" placement="top">
|
|
42
|
+
<span class="el-icon-question"></span>
|
|
43
|
+
</el-tooltip>
|
|
44
|
+
</div>
|
|
40
45
|
</div>
|
|
41
46
|
<div class="right">
|
|
42
47
|
<el-button type="primary" round size="mini" @click="add">新增点位</el-button>
|
|
@@ -55,6 +60,19 @@
|
|
|
55
60
|
>关闭辅助线</el-button>
|
|
56
61
|
</div>
|
|
57
62
|
</div>
|
|
63
|
+
<!-- #ifdef saas-admin sms-walking -->
|
|
64
|
+
<div>
|
|
65
|
+
<el-form ref="form" :model="form" label-width="120px">
|
|
66
|
+
<el-form-item label="点位周期限制" required prop="isCycle">
|
|
67
|
+
<el-radio-group v-model="form.isCycle" @input="handleCycleChange">
|
|
68
|
+
<el-radio label="Y">开启</el-radio>
|
|
69
|
+
<el-radio label="N">关闭</el-radio>
|
|
70
|
+
</el-radio-group>
|
|
71
|
+
<div style="color: red;">开启后,将限制在指定周期内到达点位才算完成</div>
|
|
72
|
+
</el-form-item>
|
|
73
|
+
</el-form>
|
|
74
|
+
</div>
|
|
75
|
+
<!-- #endif -->
|
|
58
76
|
<div class="container" :style="containerObjet">
|
|
59
77
|
<div class="content" id="content"></div>
|
|
60
78
|
<div
|
|
@@ -86,6 +104,7 @@
|
|
|
86
104
|
:circle-color="color"
|
|
87
105
|
:site_id="siteId"
|
|
88
106
|
:typeData="typeData"
|
|
107
|
+
:is-cycle="form.isCycle"
|
|
89
108
|
@onDelete="handleItemDelete"
|
|
90
109
|
@onSubmit="handleItemSubmit"
|
|
91
110
|
v-model="item.model"
|
|
@@ -154,8 +173,12 @@ export default {
|
|
|
154
173
|
yLeft:15.2,
|
|
155
174
|
yHeight: 15.2,
|
|
156
175
|
siteId:'',
|
|
157
|
-
typeData:[],
|
|
158
|
-
|
|
176
|
+
typeData: [],
|
|
177
|
+
// #ifdef saas-admin sms-walking
|
|
178
|
+
form:{
|
|
179
|
+
isCycle:'',
|
|
180
|
+
}
|
|
181
|
+
// #endif
|
|
159
182
|
};
|
|
160
183
|
},
|
|
161
184
|
computed:{
|
|
@@ -226,12 +249,16 @@ export default {
|
|
|
226
249
|
'walkingPointColor',//点位颜色
|
|
227
250
|
'walkingPointSize',//点位大小
|
|
228
251
|
'walkingPointDelete',//删除点位
|
|
252
|
+
// #ifdef saas-admin sms-walking
|
|
253
|
+
'walkingPointPeriodLimit',//点位周期限制
|
|
254
|
+
// #endif
|
|
229
255
|
]),
|
|
230
256
|
getInfo(){
|
|
231
257
|
let loading = Loading.service({});
|
|
232
258
|
this.containerDone = false;
|
|
233
259
|
Promise.all([this.getDetail(),this.getPointList()])
|
|
234
|
-
.then(([info, list])=>{
|
|
260
|
+
.then(([info, list]) => {
|
|
261
|
+
|
|
235
262
|
let backgroundImage = this.getImageFullPath(info['map_image_url'])
|
|
236
263
|
let pointList = []
|
|
237
264
|
list.map(item=>{
|
|
@@ -254,6 +281,7 @@ export default {
|
|
|
254
281
|
this.color = info['map_point_color'] || '#3498db';
|
|
255
282
|
this.noArriveColor = info['map_point_color_for_no_arrived'] || '#999999';
|
|
256
283
|
this.name = info['map_name'];
|
|
284
|
+
this.form.isCycle = info['point_period_limit'];
|
|
257
285
|
this.backgroundImage = backgroundImage;
|
|
258
286
|
loading.close()
|
|
259
287
|
|
|
@@ -445,6 +473,22 @@ export default {
|
|
|
445
473
|
this.$message.error('请至少设置一个点位!')
|
|
446
474
|
return
|
|
447
475
|
}
|
|
476
|
+
|
|
477
|
+
// 检查点位周期限制
|
|
478
|
+
if(this.form.isCycle === 'Y') {
|
|
479
|
+
let noPeriodPoints = [];
|
|
480
|
+
this.dataList.forEach(item => {
|
|
481
|
+
if(!item.model.period_start_time || !item.model.period_end_time) {
|
|
482
|
+
noPeriodPoints.push(`点位${item.model.point_total_mileage + 1}`);
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
if(noPeriodPoints.length > 0) {
|
|
487
|
+
this.$message.error(`${noPeriodPoints.join('、')}完成周期需设置`);
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
448
492
|
// let params = this.getDoneParams();
|
|
449
493
|
let params = {
|
|
450
494
|
// #ifdef admin
|
|
@@ -472,6 +516,19 @@ export default {
|
|
|
472
516
|
|
|
473
517
|
//获取完成参数
|
|
474
518
|
getDoneParams(){},
|
|
519
|
+
// #ifdef saas-admin sms-walking
|
|
520
|
+
// 处理周期限制切换
|
|
521
|
+
handleCycleChange(value) {
|
|
522
|
+
this.walkingPointPeriodLimit({
|
|
523
|
+
id: this.map_id,
|
|
524
|
+
point_period_limit: value
|
|
525
|
+
}).then(res => {
|
|
526
|
+
this.$message.success('点位周期限制设置成功')
|
|
527
|
+
}).catch(err => {
|
|
528
|
+
console.log(err, 'err')
|
|
529
|
+
})
|
|
530
|
+
},
|
|
531
|
+
// #endif
|
|
475
532
|
|
|
476
533
|
//半径改变
|
|
477
534
|
handleRadiusChange(e){
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
:show.sync="dialogShow"
|
|
36
36
|
:is-move="true"
|
|
37
37
|
:is-btn="false"
|
|
38
|
+
width="1000px"
|
|
38
39
|
>
|
|
39
40
|
<xd-base-dynamic-field
|
|
40
41
|
:list="formList"
|
|
@@ -122,6 +123,10 @@ export default {
|
|
|
122
123
|
return []
|
|
123
124
|
}
|
|
124
125
|
},
|
|
126
|
+
isCycle: {
|
|
127
|
+
type: String,
|
|
128
|
+
default: 'N'
|
|
129
|
+
},
|
|
125
130
|
},
|
|
126
131
|
data(){
|
|
127
132
|
return {
|
|
@@ -197,7 +202,16 @@ export default {
|
|
|
197
202
|
}
|
|
198
203
|
}
|
|
199
204
|
}
|
|
205
|
+
},
|
|
206
|
+
// #ifdef saas-admin sms-walking
|
|
207
|
+
isCycle: {
|
|
208
|
+
handler(n,o){
|
|
209
|
+
if(n&&n!==o){
|
|
210
|
+
this.initForm(Object.assign({},this.orgFormValue,this.formValue))
|
|
211
|
+
}
|
|
212
|
+
}
|
|
200
213
|
}
|
|
214
|
+
// #endif
|
|
201
215
|
},
|
|
202
216
|
computed: {
|
|
203
217
|
styleObject() {
|
|
@@ -217,8 +231,8 @@ export default {
|
|
|
217
231
|
},
|
|
218
232
|
orgFormValue(){
|
|
219
233
|
let point_position = this.item.point_position;
|
|
220
|
-
if(typeof point_position === 'string') point_position = JSON.parse(
|
|
221
|
-
|
|
234
|
+
if(typeof point_position === 'string') point_position = JSON.parse(point_position);
|
|
235
|
+
let formValue = {
|
|
222
236
|
...this.item,
|
|
223
237
|
point_image_url: {
|
|
224
238
|
url: this.item.point_image_url
|
|
@@ -227,7 +241,14 @@ export default {
|
|
|
227
241
|
// #ifdef sms-walking saas-admin
|
|
228
242
|
sms_activity_list:[{label:this.item.sms_activity_name,value:this.item.sms_activity_id}]
|
|
229
243
|
// #endif
|
|
244
|
+
};
|
|
245
|
+
// 处理完成周期
|
|
246
|
+
if (this.item.period_start_time && this.item.period_end_time) {
|
|
247
|
+
// 反显时将秒转换为毫秒
|
|
248
|
+
formValue.period_start_time = parseInt(this.item.period_start_time) * 1000;
|
|
249
|
+
formValue.period_end_time = parseInt(this.item.period_end_time) * 1000;
|
|
230
250
|
}
|
|
251
|
+
return formValue;
|
|
231
252
|
},
|
|
232
253
|
},
|
|
233
254
|
created(){
|
|
@@ -539,6 +560,22 @@ export default {
|
|
|
539
560
|
notice: '单位:里,2里=1公里',
|
|
540
561
|
inline: true
|
|
541
562
|
},
|
|
563
|
+
// #ifdef saas-admin sms-walking
|
|
564
|
+
this.isCycle === 'Y' && {
|
|
565
|
+
label: '完成周期:',
|
|
566
|
+
ele: 'xd-date-range',
|
|
567
|
+
valueKey: ['period_start_time', 'period_end_time'],
|
|
568
|
+
value: params['period_start_time']?[params['period_start_time'],params['period_end_time']]:[],
|
|
569
|
+
placeholder: ['开始日期', '结束日期'],
|
|
570
|
+
className: 'input40',
|
|
571
|
+
format: 'yyyy/MM/dd HH:mm:ss',//时间显示格式
|
|
572
|
+
formatValue: 'timestamp', //输出时间格式
|
|
573
|
+
notice: '在周期内兑换的步数才算有效兑换,超过结束时间未达到点位,则算未完成',
|
|
574
|
+
rules: [
|
|
575
|
+
{required: true, message: '请选择完成周期', trigger: 'change'},
|
|
576
|
+
]
|
|
577
|
+
},
|
|
578
|
+
// #endif
|
|
542
579
|
{
|
|
543
580
|
label: '点位知识:',
|
|
544
581
|
ele: 'xd-tinymce',
|
|
@@ -581,12 +618,36 @@ export default {
|
|
|
581
618
|
y: this.changeOffsetY || this.defaultValue.y,
|
|
582
619
|
}
|
|
583
620
|
if(isString) point_position = JSON.stringify(point_position);
|
|
621
|
+
let period_start_time = '';
|
|
622
|
+
let period_end_time = '';
|
|
623
|
+
|
|
624
|
+
if (this.formValue.period_start_time) {
|
|
625
|
+
// 提交时将毫秒转换为秒
|
|
626
|
+
period_start_time = Math.floor(this.formValue.period_start_time / 1000);
|
|
627
|
+
} else if (this.orgFormValue.period_start_time) {
|
|
628
|
+
// 提交时将毫秒转换为秒
|
|
629
|
+
period_start_time = Math.floor(this.orgFormValue.period_start_time / 1000);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (this.formValue.period_end_time) {
|
|
633
|
+
// 提交时将毫秒转换为秒
|
|
634
|
+
period_end_time = Math.floor(this.formValue.period_end_time / 1000);
|
|
635
|
+
} else if (this.orgFormValue.period_end_time) {
|
|
636
|
+
// 提交时将毫秒转换为秒
|
|
637
|
+
period_end_time = Math.floor(this.orgFormValue.period_end_time / 1000);
|
|
638
|
+
}
|
|
639
|
+
|
|
584
640
|
let params = {
|
|
585
641
|
point_image_url: type==='normal'?this.formValue.point_image_url.url || this.orgFormValue.point_image_url.url:this.orgFormValue.point_image_url.url,
|
|
586
642
|
point_knowledge: type==='normal'?this.formValue.point_knowledge || this.orgFormValue.point_knowledge:this.orgFormValue.point_knowledge,
|
|
587
643
|
point_name: type==='normal'?this.formValue.point_name || this.orgFormValue.point_name:this.orgFormValue.point_name,
|
|
588
644
|
point_total_mileage: type==='normal'?Number( this.formValue.point_total_mileage || this.orgFormValue.point_total_mileage):Number(this.orgFormValue.point_total_mileage),
|
|
589
645
|
point_position:point_position,
|
|
646
|
+
// 只有当 isCycle 为 Y 时,才提交周期相关字段
|
|
647
|
+
...(this.isCycle === 'Y' && {
|
|
648
|
+
period_start_time: period_start_time,
|
|
649
|
+
period_end_time: period_end_time,
|
|
650
|
+
}),
|
|
590
651
|
// #ifdef sms-walking saas-admin
|
|
591
652
|
sms_activity_type: type==='normal'?this.formValue.sms_activity_type || this.orgFormValue.sms_activity_type:this.orgFormValue.sms_activity_type,
|
|
592
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'],
|