jufubao-admin-library 1.1.213 → 1.1.215

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.
@@ -191,13 +191,10 @@ export default {
191
191
  path: 'p1',
192
192
  },
193
193
  {
194
- server: "supplier-partner",
195
- fn: "supplier-channel",
196
- path: "p1",
197
- params: {
198
- type: 'ALL'
199
- },
200
- }
194
+ server: "supplier-partner",
195
+ fn: "partner-channel",
196
+ path: "p1",
197
+ }
201
198
  ]).then(res => {
202
199
  this.supplierLevel = res[0].data.list;
203
200
  this.channelList = res[1].data.list;
@@ -570,7 +570,7 @@ module.exports = {
570
570
  disabled: true,
571
571
  role: 'ROLE_MARKET_STORE_PRODUCT_RULE_LOG_DETAIL',
572
572
  },
573
- {
573
+ {
574
574
  title: "加盟商后台 复制选店规则条件",
575
575
  mapFn: "selectShopRuleCopy",
576
576
  isPublic: true,
@@ -583,6 +583,64 @@ module.exports = {
583
583
  },
584
584
  disabled: true,
585
585
  },
586
+ {
587
+ title: "按条件隐藏",
588
+ mapFn: "selectShopIsHidden",
589
+ path: "/supplier-partner/v1/:xsiteid/:xnamespace/select-shop/is-hidden",
590
+ isRule: false,
591
+ data: {
592
+ xsiteid: ['站点Id', 'String', '必填'],
593
+ xnamespace: ['命名空间', 'String', '必填'],
594
+ page_token: ['第几页', 'String', '选填'],
595
+ page_size: ['每页展示条数', 'Number', '选填'],
596
+ filters:['filters', 'Array', '选填'],
597
+ tab: ['tab', 'String', '选填'],
598
+ },
599
+ disabled: true,
600
+ role: '@@@@.@@@.SELECT_SHOP_IS_HIDDEN',
601
+ },
602
+ {
603
+ title: "按条件展示",
604
+ mapFn: "selectShopIsShow",
605
+ path: "/supplier-partner/v1/:xsiteid/:xnamespace/select-shop/is-show",
606
+ isRule: false,
607
+ data: {
608
+ xsiteid: ['站点Id', 'String', '必填'],
609
+ xnamespace: ['命名空间', 'String', '必填'],
610
+ page_token: ['第几页', 'String', '选填'],
611
+ page_size: ['每页展示条数', 'Number', '选填'],
612
+ filters:['filters', 'Array', '选填'],
613
+ tab: ['tab', 'String', '选填'],
614
+ },
615
+ disabled: true,
616
+ role: '@@@@.@@@.SELECT_SHOP_IS_SHOW',
617
+ },
618
+ {
619
+ title: "单个门店隐藏",
620
+ mapFn: "selectShopIsHiddenShop",
621
+ path: "/supplier-partner/v1/:xsiteid/:xnamespace/select-shop/is-hidden-shop",
622
+ isRule: false,
623
+ data: {
624
+ xsiteid: ['站点Id', 'String', '必填'],
625
+ xnamespace: ['命名空间', 'String', '必填'],
626
+ resource_shop_id:['resource_shop_id', 'Array', '选填'],
627
+ },
628
+ disabled: true,
629
+ role: '@@@@.@@@.SELECT_SHOP_IS_HIDDEN_SHOP',
630
+ },
631
+ {
632
+ title: "单个门店展示",
633
+ mapFn: "selectShopIsShowShop",
634
+ path: "/supplier-partner/v1/:xsiteid/:xnamespace/select-shop/is-show-shop",
635
+ isRule: false,
636
+ data: {
637
+ xsiteid: ['站点Id', 'String', '必填'],
638
+ xnamespace: ['命名空间', 'String', '必填'],
639
+ resource_shop_id:['resource_shop_id', 'Array', '选填'],
640
+ },
641
+ disabled: true,
642
+ role: '@@@@.@@@.SELECT_SHOP_IS_SHOW_SHOP',
643
+ }
586
644
  ],
587
645
  }
588
646
 
@@ -48,6 +48,8 @@
48
48
  </el-card>
49
49
  <el-card class="app-container__list">
50
50
  <div class="app-container__list-custom" style="text-align: right">
51
+ <el-button v-if="storeType==='AGG'" v-permission="[Role.selectShopIsShow]" type="primary" @click="handleBatchHide(false)">按搜索条件展示</el-button>
52
+ <el-button v-if="storeType==='AGG'" v-permission="[Role.selectShopIsHidden]" type="primary" @click="handleBatchHide(true)">按搜索条件隐藏</el-button>
51
53
  <el-button type="primary" :disabled="batchRowIds.length===0" @click="handleBatchDelete">批量删除</el-button>
52
54
  <el-button type="primary" :disabled="batchRowIds.length===0" @click="handleBatchStatus">批量{{ mainFilterIndex === '0' ? '下架' : '上架' }}</el-button>
53
55
  <el-button type="primary" size="small" icon="el-icon-edit" @click="handleExport" v-if="isExport">条件导出</el-button>
@@ -196,6 +198,7 @@ import XdDialog from "@/components/XdDialog"
196
198
  import { getOptions } from "@/utils/options"
197
199
  import XdPaginationJfb from "@/components/XdPaginationJfb";
198
200
  import XdBaseDynamicField from "@/components/XdBaseDynamicField.vue";
201
+ import Role from "@/constant/modules/store_selection"
199
202
  export default {
200
203
  name: "SelectedList",
201
204
  components: {
@@ -213,6 +216,7 @@ export default {
213
216
 
214
217
  data () {
215
218
  return {
219
+ Role,
216
220
  pageSize: 1,//当前页面数量
217
221
  hasNextPage: true,
218
222
  limit: 20,
@@ -356,6 +360,8 @@ export default {
356
360
  this.storeType!=='AGG'&&this.storeType!=='PRODUCT'&&{ "ui": "text-button", "name": "移除", "type": "text" ,event:'delete'},
357
361
  // { "ui": "text-button", "name": "修改服务类型", "type": "text" ,event:'off_consume'},
358
362
  this.storeType==='AGG'&&this.storeType!=='PRODUCT'&&{ "ui": "text-button", "name": "查看关联前门店", "type": "text" ,event:'look_store'},
363
+ this.storeType==='AGG'&&checkPermission([Role.selectShopIsHiddenShop])&&{ "ui": "text-button", "name": "隐藏门店", "type": "text" ,event:'hide'},
364
+ this.storeType==='AGG'&&checkPermission([Role.selectShopIsShowShop])&&{ "ui": "text-button", "name": "展示门店", "type": "text" ,event:'show'},
359
365
  ].filter(i=>i)
360
366
  }
361
367
  ].filter(i=>i)
@@ -428,6 +434,10 @@ export default {
428
434
  'selectShopGetConsumeMode',
429
435
  'selectShopUpdateConsumeMode',
430
436
  'selectShopGetRelatedShops',
437
+ 'selectShopIsHiddenShop',
438
+ 'selectShopIsShowShop',
439
+ 'selectShopIsHidden',
440
+ 'selectShopIsShow',
431
441
  ]),
432
442
 
433
443
  onJfbTagForReload () {
@@ -477,6 +487,13 @@ export default {
477
487
  }
478
488
  return filters
479
489
  },
490
+ getListParams(){
491
+ return {
492
+ filters:this.getParams(),
493
+ tab:this.channelActive,
494
+ consume_mode:this.storeType,
495
+ }
496
+ },
480
497
  getList (type, action, cb) {
481
498
  console.log(typeof cb,'cccc')
482
499
  if (action === 'reset'||action === 'search') {
@@ -485,9 +502,7 @@ export default {
485
502
  this.currentPage = 'all';
486
503
  }
487
504
  let params = {
488
- filters:this.getParams(),
489
- tab:this.channelActive,
490
- consume_mode:this.storeType,
505
+ ...this.getListParams(),
491
506
  page_token: this.currentPage,
492
507
  page_size: this.limit
493
508
  }
@@ -619,6 +634,17 @@ export default {
619
634
  })
620
635
  }
621
636
  },
637
+ this.storeType==='AGG'&&{
638
+ label: "是否隐藏:",
639
+ ele: "xd-select-list",
640
+ valueKey: "is_hidden",
641
+ value: '',
642
+ multiple:false,
643
+ list: [
644
+ { label: '是', value: 'Y' },
645
+ { label: '否', value: 'N' },
646
+ ],
647
+ },
622
648
  (this.checkEnabled(options,'category_ids')||this.storeType==='AGG')&&{
623
649
  label: "门店分类:", //label
624
650
  ele: "slot", //package 名称
@@ -814,6 +840,16 @@ export default {
814
840
  this.storeTableKey = Date.now()
815
841
  this.dialogStore=true;
816
842
  })
843
+ }else if(value.event==='hide'){
844
+ this.selectShopIsHiddenShop({resource_shop_id: row.resource_shop_id,consume_mode:this.storeType}).then(res => {
845
+ this.$message({ message: '隐藏成功', type: 'success' })
846
+ this.getList('list')
847
+ })
848
+ }else if(value.event==='show'){
849
+ this.selectShopIsShowShop({resource_shop_id: row.resource_shop_id,consume_mode:this.storeType}).then(res => {
850
+ this.$message({ message: '展示成功', type: 'success' })
851
+ this.getList('list')
852
+ })
817
853
  }
818
854
  },
819
855
  initDialogForm(){
@@ -843,6 +879,7 @@ export default {
843
879
  },
844
880
 
845
881
  handleCustom({action,data}){
882
+ let row = data.row;
846
883
  if (action === 'btn') {
847
884
  if (data.btn.event==='on') {
848
885
  if(!this.isOn||this.site_business_status==='Y'){
@@ -874,6 +911,17 @@ export default {
874
911
  return false
875
912
  }
876
913
  }
914
+ if(data.btn.event === 'hide'){
915
+ if(data.row.is_hidden === 'Y'){
916
+ return false
917
+ }
918
+ }
919
+ if(data.btn.event === 'show'){
920
+ if(data.row.is_hidden === 'N'){
921
+ return false
922
+ }
923
+ }
924
+
877
925
  return true
878
926
  }
879
927
  },
@@ -921,6 +969,20 @@ export default {
921
969
  // this.getList('list');
922
970
  })
923
971
  },
972
+ handleBatchHide(isHide){
973
+ let action = isHide ? '隐藏' : '展示'
974
+ this.$confirm(`是否${action}搜索条件门店?`, action, {
975
+ confirmButtonText: '确定',
976
+ cancelButtonText: '取消'
977
+ }).then(() => {
978
+ let api = isHide ? this.selectShopIsHidden : this.selectShopIsShow
979
+ let params = this.getListParams();
980
+ api(params).then(res => {
981
+ this.$message({ message: `${action}成功`, type: 'success' })
982
+ this.getList('list')
983
+ })
984
+ })
985
+ },
924
986
  /**导出售后订单**/
925
987
  handleExport () {
926
988
  this.dialogExport = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.213",
3
+ "version": "1.1.215",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {