jufubao-admin-library 1.1.172 → 1.1.173

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.
@@ -526,6 +526,22 @@ export default {
526
526
  multiple: true, //多选
527
527
  list: setting.data?.delivery_methods?.options || [],
528
528
  },
529
+ this.$setting.system==='partner-mall'&&{
530
+ label: "是否展示:", //label
531
+ ele: "xd-select-list", //package 名称
532
+ valueKey: "show_status", //form[valueKey]
533
+ value: [], //v-model
534
+ placeholder: "请选择配送方式",
535
+ multiple: false, //多选
536
+ className:'input40',
537
+ list: [{
538
+ value:'Y',
539
+ label:'展示'
540
+ },{
541
+ value:'N',
542
+ label:'隐藏'
543
+ }],
544
+ },
529
545
  setting.data?.delivery_logistics_company?.enabled&&{
530
546
  label: "配送公司:", //label
531
547
  ele: "xd-select-list", //package 名称
@@ -208,7 +208,9 @@
208
208
  label:'23时',
209
209
  value:'23',
210
210
  },
211
- ]
211
+ ],
212
+ is_has_formula:true,
213
+ adjust_price_type:'',
212
214
  }
213
215
  },
214
216
  computed: {
@@ -217,7 +219,11 @@
217
219
  return this.$route.params.id;
218
220
  },
219
221
  btnName(){
220
- return this.select_policy_id ? '更新': '提交';
222
+ if(this.select_policy_id&&!this.isCopy){
223
+ return '更新'
224
+ }else{
225
+ return '提交'
226
+ }
221
227
  },
222
228
 
223
229
  isMovie(){
@@ -281,7 +287,7 @@
281
287
 
282
288
  //非电影初始化
283
289
  else{
284
- let {conditions, options, agg_channel_code,formula, ...other} = res.data;
290
+ let {conditions, options, agg_channel_code,formula,is_has_formula, ...other} = res.data;
285
291
 
286
292
  //按价格设置
287
293
  if (conditions.price !== undefined) {
@@ -332,6 +338,17 @@
332
338
 
333
339
  //设置渠道选择值
334
340
  this.channelActiveName = agg_channel_code || this.channelTabList[0]['value'];
341
+ //调价方式
342
+
343
+ if(this.channelParams.scene === 'select'){
344
+ this.is_has_formula = is_has_formula;
345
+ if(!is_has_formula){
346
+ this.adjust_price_type = 'old';
347
+ }
348
+ }else {
349
+ this.is_has_formula = true;
350
+ }
351
+ console.log(this.channelParams.scene,this.is_has_formula,'this.is_has_formula')
335
352
  formData = {...other, ...conditions, ...options, city_codes: conditions.city_codes, ...formulaData};
336
353
  console.log('conditions', formData)
337
354
  }
@@ -362,7 +379,7 @@
362
379
 
363
380
  //设置公共参数
364
381
  let commonConfig = {sort: {"enabled": true}};
365
- if(this.channelParams.scene === 'modifyprice') {
382
+ if(this.channelParams.scene === 'modifyprice'||this.channelParams.scene === 'select') {
366
383
  commonConfig = {...commonConfig, ...{
367
384
  sale_price_base: {
368
385
  "enabled": true,
@@ -487,7 +504,7 @@
487
504
  let params = {
488
505
  item: postData,
489
506
  };
490
- if (select_policy_id) {
507
+ if (select_policy_id&&!this.isCopy) {
491
508
  fn = 'updateRole';
492
509
  params[this.keyword.role] = select_policy_id
493
510
  }
@@ -52,6 +52,12 @@ export default {
52
52
  }
53
53
  }
54
54
  },
55
+ 'listValue.adjust_price_type' (n, o) {
56
+ if (n && n !== o) {
57
+ this.adjust_price_type = n
58
+ this.initForm(this.listValue)
59
+ }
60
+ },
55
61
  },
56
62
  data () {
57
63
  return {
@@ -498,12 +504,23 @@ export default {
498
504
  ],
499
505
  inline: false,
500
506
  },
501
- this.checkConfig('sale_price_base') && {
507
+ !this.is_has_formula && {
508
+ label: '调价方式:',
509
+ ele: 'xd-radio',
510
+ valueKey: 'adjust_price_type',
511
+ value: params.adjust_price_type||'old',
512
+ list: [
513
+ { "label": "使用原有调价规则(可在调价-调价规则管理查看)", "value": 'old' },
514
+ { "label": "新建调价规则", "value": 'new' }
515
+ ],
516
+ inline: false,
517
+ },
518
+ this.checkConfig('sale_price_base')&&(this.is_has_formula||this.adjust_price_type==='new') && {
502
519
  label: '售价调整',
503
520
  ele: 'title',
504
521
  size: 'small',
505
522
  },
506
- this.checkConfig('sale_price_base') && {
523
+ this.checkConfig('sale_price_base')&&(this.is_has_formula||this.adjust_price_type==='new') && {
507
524
  label: '基于:',
508
525
  ele: 'xd-select-list',
509
526
  valueKey: 'sale_price_base',
@@ -520,7 +537,7 @@ export default {
520
537
  notice: '<span style="color:#000; font-size: 14px;">调整</span><span style="color:#f00; font-size: 14px;">售价</span>',
521
538
  inline: true
522
539
  },
523
- this.checkConfig('sale_price_unit') && {
540
+ this.checkConfig('sale_price_unit')&&(this.is_has_formula||this.adjust_price_type==='new') && {
524
541
  label: " ",
525
542
  ele: "xd-radio",
526
543
  valueKey: "sale_price_unit",
@@ -529,7 +546,7 @@ export default {
529
546
  disabled: this.getSalePriceUnitDisabled('sale_price_unit', false),
530
547
  rules: [{ required: true, message: '请选择', trigger: 'blur' }],
531
548
  },
532
- this.checkConfig('sale_price_value') && {
549
+ this.checkConfig('sale_price_value')&&(this.is_has_formula||this.adjust_price_type==='new') && {
533
550
  label: '上调/下调',
534
551
  ele: 'xd-input-unit',
535
552
  valueKey: 'sale_price_value',
@@ -548,7 +565,7 @@ export default {
548
565
  notice: '可设置正负值,负值时为下调',
549
566
  inline: false
550
567
  },
551
- this.channelParams.scene === "modifyprice" && {
568
+ (this.is_has_formula||this.adjust_price_type==='new')&&{
552
569
  label: '不高于市场价:',
553
570
  ele: 'xd-radio',
554
571
  valueKey: 'no_high_market_price',
@@ -560,7 +577,7 @@ export default {
560
577
  inline: false,
561
578
  notice: '若调价后大于市场价则使用市场价为售价'
562
579
  },
563
- this.channelParams.scene === "modifyprice" && {
580
+ (this.is_has_formula||this.adjust_price_type==='new')&&{
564
581
  label: '小数点保留位数:',
565
582
  ele: 'xd-select-list',
566
583
  valueKey: 'decimal',
@@ -578,12 +595,12 @@ export default {
578
595
  trigger: 'blur'
579
596
  }],
580
597
  },
581
- this.isShowVipSet && this.channelParams.scene === "modifyprice" &&{
598
+ this.isShowVipSet&&(this.is_has_formula||this.adjust_price_type==='new') &&{
582
599
  label: 'PLUS售价',
583
600
  ele: 'title',
584
601
  size: 'small',
585
602
  },
586
- this.isShowVipSet && this.channelParams.scene === "modifyprice" &&{
603
+ this.isShowVipSet&&(this.is_has_formula||this.adjust_price_type==='new') &&{
587
604
  label: '基于:',
588
605
  ele: 'xd-select-list',
589
606
  valueKey: 'vip_price_base',
@@ -600,7 +617,7 @@ export default {
600
617
  notice: '<span style="color:#000; font-size: 14px;">调整</span><span style="color:#f00; font-size: 14px;">售价</span>',
601
618
  inline: true
602
619
  },
603
- this.isShowVipSet && this.channelParams.scene === "modifyprice" &&{
620
+ this.isShowVipSet&&(this.is_has_formula||this.adjust_price_type==='new') &&{
604
621
  label: " ",
605
622
  ele: "xd-radio",
606
623
  valueKey: "vip_price_unit",
@@ -609,7 +626,7 @@ export default {
609
626
  disabled: this.getSalePriceUnitDisabled('vip_price_unit', false),
610
627
  rules: [{ required: true, message: '请选择', trigger: 'blur' }],
611
628
  },
612
- this.isShowVipSet && this.channelParams.scene === "modifyprice" &&{
629
+ this.isShowVipSet&&(this.is_has_formula||this.adjust_price_type==='new') &&{
613
630
  label: '上调/下调',
614
631
  ele: 'xd-input-unit',
615
632
  valueKey: 'vip_price_value',
@@ -628,7 +645,7 @@ export default {
628
645
  notice: '可设置正负值,负值时为下调',
629
646
  inline: false
630
647
  },
631
- this.isShowVipSet && this.channelParams.scene === "modifyprice" && {
648
+ this.isShowVipSet&&(this.is_has_formula||this.adjust_price_type==='new') &&{
632
649
  label: '不高于市场价:',
633
650
  ele: 'xd-radio',
634
651
  valueKey: 'vip_price_no_high_market_price',
@@ -640,7 +657,7 @@ export default {
640
657
  inline: false,
641
658
  notice: '若调价后大于市场价则使用市场价为售价'
642
659
  },
643
- this.isShowVipSet && this.channelParams.scene === "modifyprice" && {
660
+ this.isShowVipSet&&(this.is_has_formula||this.adjust_price_type==='new') &&{
644
661
  label: '小数点保留位数:',
645
662
  ele: 'xd-select-list',
646
663
  valueKey: 'vip_price_decimal',
@@ -658,15 +675,15 @@ export default {
658
675
  trigger: 'blur'
659
676
  }],
660
677
  },
661
- this.channelParams.scene === "select" && {
662
- label: '关联调价规则:',
663
- ele: 'xd-select-list',
664
- valueKey: 'modifyprice_policy_id',
665
- value: params.modifyprice_policy_id || '',
666
- placeholder: '请选择关联调价规则',
667
- multiple: false,
668
- list: this.modifypriceList,
669
- },
678
+ // this.channelParams.scene === "select" && {
679
+ // label: '关联调价规则:',
680
+ // ele: 'xd-select-list',
681
+ // valueKey: 'modifyprice_policy_id',
682
+ // value: params.modifyprice_policy_id || '',
683
+ // placeholder: '请选择关联调价规则',
684
+ // multiple: false,
685
+ // list: this.modifypriceList,
686
+ // },
670
687
  this.channelParams.scene === "select" && this.checkConfig('delivery_logistics_company') && {
671
688
  label: "配送公司:", //label
672
689
  ele: "xd-select-list", //package 名称
@@ -1448,7 +1465,9 @@ export default {
1448
1465
  if (!this.checkVarEmpty(discount_ratio.max)) postData.conditions.discount_ratio.max = this.$xdHelper.multiplyFloatNumber(discount_ratio.max, 100)
1449
1466
  if (!this.checkVarEmpty(discount_ratio.min)) postData.conditions.discount_ratio.min = this.$xdHelper.multiplyFloatNumber(discount_ratio.min, 100)
1450
1467
  }
1451
-
1468
+ if(postData.conditions.sale_num&&!postData.conditions.sale_num.start&&!postData.conditions.sale_num.end){
1469
+ delete postData.conditions.sale_num
1470
+ }
1452
1471
  postData['formula'] = {
1453
1472
  sale_price: { unit: '', base: '', value: '', decimal: 0 },
1454
1473
  vip_price: { unit: '', base: '', value: '', decimal: 0 }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.172",
3
+ "version": "1.1.173",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {