jufubao-admin-library 1.1.171 → 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 }
@@ -56,8 +56,11 @@
56
56
  <span>{{item.name|fitersName}}</span>
57
57
  </div>
58
58
  </draggable>
59
- <div><el-button
59
+ <div>
60
+ <div style="margin-bottom: 10px"><span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
61
+ <el-button
60
62
  type="primary"
63
+ size="small"
61
64
  :disabled="isBtnMaterialMore || disabled"
62
65
  @click="isDialogShow=true"
63
66
  >{{materialBtnName}}</el-button></div>
@@ -249,8 +252,9 @@
249
252
  :limit="limit"
250
253
  multiple
251
254
  >
252
- <div class="xd-upload__list-btn">
255
+ <div class="xd-upload__list-btn" style="text-align: left;">
253
256
  <slot>
257
+ <div style="margin-bottom: 10px"><span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
254
258
  <el-button :disabled="!(showList.length < limit ) || disabled" size="small" type="primary">{{uploadName}}</el-button>
255
259
  </slot>
256
260
  <div class="xd-upload__disabled" v-if="disabled"></div>
@@ -327,7 +331,7 @@
327
331
  * @slot tip插槽:提示文案插槽(one,list,'')
328
332
  *
329
333
  */
330
- import dialogMaterial from "@/viewsMaterial/dialogMaterial.vue";
334
+ // import dialogMaterial from "@/viewsMaterial/dialogMaterial.vue";
331
335
  import XdFontIcon from "@/components/XdFontIcon.vue";
332
336
  import {Loading} from 'element-ui';
333
337
  import draggable from 'vuedraggable';
@@ -341,7 +345,7 @@
341
345
  components: {
342
346
  XdItemImage,
343
347
  draggable,
344
- dialogMaterial,
348
+ // dialogMaterial,
345
349
  XdFontIcon
346
350
  },
347
351
  props: {
@@ -567,6 +571,7 @@
567
571
  url: temp['url'] || temp['file_src'],
568
572
  name: temp['name'] || temp['file_name'],
569
573
  uid: temp['uid'] || temp['file_id'],
574
+ file_id: temp['file_id'] || '',
570
575
  }
571
576
  this.update(this.oneItem);
572
577
  }
@@ -578,6 +583,7 @@
578
583
  url: item['url'] || item['file_src'],
579
584
  name: item['name'] || item['file_name'],
580
585
  uid: item['uid'] || item['file_id'],
586
+ file_id: item['file_id'] || '',
581
587
  }
582
588
  });
583
589
  this.showList = this.$xdHelper.cloneDeep(this.showList).concat(list).map((item)=>{
@@ -3,7 +3,18 @@
3
3
  <div class="form-wrap">
4
4
  <div class="form-input">
5
5
  <div>
6
- <div style="margin-bottom: 10px">添加素材:<span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
6
+ <!-- <div style="margin-bottom: 10px">添加素材:<span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div> -->
7
+ <el-form ref="radioForm" :model="radioForm" label-width="65px">
8
+ <el-form-item label="上传方式">
9
+ <el-radio-group v-model="radioForm.method" @change="handleRaidoMethodChange">
10
+ <el-radio
11
+ v-for="item in radioOptions"
12
+ :key="item.value"
13
+ :label="item.value"
14
+ >{{ item.label }}</el-radio>
15
+ </el-radio-group>
16
+ </el-form-item>
17
+ </el-form>
7
18
  <cus-upload
8
19
  v-model="form.file_info"
9
20
  action="action"
@@ -12,9 +23,11 @@
12
23
  tipsformet="上传文件格式:@imageType@,不超过@size@MB."
13
24
  styleType="list"
14
25
  uploadType="aliyun"
15
- :is-material="false"
26
+ :is-material="radioForm.method==='local'?false:true"
16
27
  :isHideFileName="true"
28
+ :materialBtnName="'上传'"
17
29
  :sort="true"
30
+ :key="cusUploadKey"
18
31
  :showtype="false"
19
32
  listSize="100*100"
20
33
  :maxlen="100"
@@ -66,7 +79,7 @@ import XdUpload from "@/components/XdUpload.vue";
66
79
  import handleUpdate from "@/mixins/handleUpdate";
67
80
  import CusUpload from "./CusUpload.vue";
68
81
  export default {
69
- name: "Form",
82
+ name: "UploadForm",
70
83
  components: {
71
84
  XdUpload,
72
85
  CusUpload,
@@ -100,6 +113,19 @@ export default {
100
113
  status: "",
101
114
  file_info: [],
102
115
  },
116
+ radioForm:{
117
+ method: 'local',
118
+ },
119
+ radioOptions:[
120
+ {
121
+ label:'直接上传',
122
+ value:'local'
123
+ },{
124
+ label:'选择素材',
125
+ value:'material'
126
+ }
127
+ ],
128
+ cusUploadKey:'cusUploadKey',
103
129
  };
104
130
  },
105
131
  created() {
@@ -167,6 +193,9 @@ export default {
167
193
  });
168
194
  }
169
195
  },
196
+ handleRaidoMethodChange(){
197
+ this.cusUploadKey = Date.now();
198
+ },
170
199
  },
171
200
  };
172
201
  </script>
@@ -226,4 +255,11 @@ export default {
226
255
  color: #409eff;
227
256
  background: #ecf5ff;
228
257
  }
258
+ ::v-deep .form-input .el-form-item__label{
259
+ width: 65px !important;
260
+ text-align: left !important;
261
+ padding: 0 !important;
262
+ color: #333333!important;
263
+ font-weight: 400!important;
264
+ }
229
265
  </style>
@@ -75,7 +75,7 @@ import company from "./dialog/component/company.vue";
75
75
  import share from "./dialog/component/share.vue";
76
76
 
77
77
  export default {
78
- name: "XdMaterial",
78
+ name: "DialogMaterial",
79
79
  props: {
80
80
  setting: {
81
81
  type: Object,
@@ -197,6 +197,7 @@ export default {
197
197
  url: item.file_url,
198
198
  name: item.file_name,
199
199
  uid: item.file_uid,
200
+ file_id: item.file_id||'',
200
201
  };
201
202
  })
202
203
 
@@ -125,6 +125,7 @@ import uploadForm from "./components/uploadForm";
125
125
  import { mapActions } from "vuex";
126
126
  import axios from "axios";
127
127
  export default {
128
+ name: "Material",
128
129
  components: {
129
130
  XdPagination,
130
131
  XdDialog,
@@ -361,6 +362,7 @@ export default {
361
362
  this.addMaterial(data)
362
363
  .then((res) => {
363
364
  this.uploadVisible = false;
365
+ this.materialForm = {};
364
366
  this.getList(this.searchParams);
365
367
  })
366
368
  .catch((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.171",
3
+ "version": "1.1.173",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {