jufubao-admin-library 1.1.201 → 1.1.204

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.
@@ -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',
@@ -1322,18 +1326,27 @@ export default {
1322
1326
  handleRemoteCategorySearch ({ node, resolve }) {
1323
1327
  let value = 0
1324
1328
  if (node.level !== 0) value = node.value
1325
- this.getChildrenAndProfitRate({
1326
- value,
1327
- agg_channel_code: this.channelActiveName
1328
- }).then(res => {
1329
- console.log(res,'res')
1330
- if(this.channelActiveName === 'jufubao') {
1331
- res.data.list.map(item=>{
1332
- item.profit_rate_string = '('+item.profit_rate/100+'%)'
1333
- })
1334
- }
1335
- resolve(res.data.list)
1336
- }) .catch((err) => { console.error(err) })
1329
+ if(this.channelParams.scene&&this.channelParams.scene==='select'){
1330
+ this.getChildrenAndProfitRate({
1331
+ value,
1332
+ agg_channel_code: this.channelActiveName
1333
+ }).then(res => {
1334
+ console.log(res,'res')
1335
+ if(this.channelActiveName === 'jufubao') {
1336
+ res.data.list.map(item=>{
1337
+ item.profit_rate_string = '('+item.profit_rate/100+'%)'
1338
+ })
1339
+ }
1340
+ resolve(res.data.list)
1341
+ }) .catch((err) => { console.error(err) })
1342
+ }else{
1343
+ getOptions({ server: "product-partner", fn: "categories", path: "p4", params: { value } })
1344
+ .then(res => {
1345
+ resolve(res.data.list)
1346
+ })
1347
+ .catch((err) => { console.error(err) })
1348
+ }
1349
+
1337
1350
  },
1338
1351
 
1339
1352
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.201",
3
+ "version": "1.1.204",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {