jufubao-admin-library 1.1.103 → 1.1.105

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.
@@ -109,6 +109,7 @@ export default {
109
109
  },
110
110
  cookieKey: '',
111
111
  cityData:[],
112
+ marketTagsList:[],
112
113
  }
113
114
  },
114
115
  computed: {
@@ -162,6 +163,10 @@ export default {
162
163
  if (this.JfbParent.market_tag) this.JfbParent.market_tag = market_tag
163
164
  this.productTypeList = product_type
164
165
  this.channelStatus = true
166
+ let tagsOptions = await getOptions({
167
+ server: "product-public", fn: "product", path: "p1", params: { market_tag: 1 },
168
+ })
169
+ this.marketTagsList = tagsOptions.data.market_tag
165
170
  this.initSearchForm()
166
171
  },
167
172
  methods: {
@@ -368,6 +373,24 @@ export default {
368
373
  placeholder: "请选择品牌",
369
374
  multiple: false,
370
375
  },
376
+ this.channelParams&&this.channelParams.scene === 'selected'&&this.$setting.system!=='partner-gift'&&{
377
+ label: "营销标签:", //label
378
+ ele: "xd-select-list", //package 名称
379
+ valueKey: "market_tags", //form[valueKey]
380
+ value: [], //v-model
381
+ placeholder: "请选择",
382
+ multiple: true, //多选
383
+ list: this.marketTagsList,
384
+ },
385
+ this.pagesType === 'special'&&{
386
+ label: "状态:", //label
387
+ ele: "xd-select-list", //package 名称
388
+ valueKey: "site_product_status", //form[valueKey]
389
+ value: [], //v-model
390
+ placeholder: "请选择",
391
+ multiple: false, //多选
392
+ list: [{label:'已上架',value:'Y'},{label:'已下架',value:'N'}],
393
+ },
371
394
  (showSupplierIds && this.channelActiveName !== 'all') && {
372
395
  label: "按供应商:", //label
373
396
  ele: "xd-select-remote", //package 名称
@@ -23,6 +23,10 @@
23
23
  <template slot="volume" slot-scope="inScope">
24
24
  {{$xdHelper.divisionFloatNumber(inScope.row.volume, 100)}}m³
25
25
  </template>
26
+ <template slot="purchase_price" slot-scope="inScope">
27
+ <div v-if="inScope.row.purchase_price!==-1">货源:<span class="red">{{$xdHelper.divisionFloatNumber(inScope.row.purchase_price, 100)}}</span>元</div>
28
+ <div v-if="inScope.row.dist_price!==-1">平台:<span class="red">{{$xdHelper.divisionFloatNumber(inScope.row.dist_price, 100)}}</span>元</div>
29
+ </template>
26
30
  <template slot="jfb_price_ratio" slot-scope="inScope">
27
31
  <div v-if="inScope.row.purchase_div_jfb_discount_ratio">货源:<span class="red">{{$xdHelper.divisionFloatNumber(inScope.row.purchase_div_jfb_discount_ratio, 1000)}}</span>折</div>
28
32
  <div v-if="inScope.row.dist_div_jfb_discount_ratio">平台:<span class="red">{{$xdHelper.divisionFloatNumber(inScope.row.dist_div_jfb_discount_ratio, 1000)}}</span>折</div>
@@ -166,7 +170,7 @@
166
170
  },
167
171
  created(){
168
172
  if(this.productSkuList && this.productSkuList.length && this.productSkuList.length > 0) {
169
- this.isShowPurchasePrice = this.productSkuList[0].specs.purchase_price > 0;
173
+ this.isShowPurchasePrice = (this.productSkuList[0].specs.purchase_price > 0 || this.productSkuList[0].specs.dist_price > 0)?true:false;
170
174
  this.isShowJfbPriceRatio = (this.productSkuList[0].specs.purchase_div_jfb_discount_ratio || this.productSkuList[0].specs.dist_div_jfb_discount_ratio)?true:false;
171
175
  this.isShowMarketPriceRatio = (this.productSkuList[0].specs.purchase_div_market_discount_ratio || this.productSkuList[0].specs.dist_div_market_discount_ratio)?true:false;
172
176
  }
@@ -78,7 +78,7 @@ const storeRouter = {
78
78
  meta: {
79
79
  title: '编辑选店规则',
80
80
  activeMenu: '/store/rule-list',
81
- roles:[store_selection.selectShopRuleUpdate]
81
+ roles:[store_selection.selectShopRuleUpdate,store_selection.selectShopRuleGet]
82
82
  }
83
83
  },
84
84
  {
@@ -30,6 +30,7 @@ module.exports = {
30
30
  rule_id: ['rule_id', 'String', '选填'],
31
31
  },
32
32
  disabled: true,
33
+ role: '@@@@.@@@.SELECT_SHOP_RULE_DETAIL',
33
34
  },
34
35
  {
35
36
  title: "创建选店规则",
@@ -464,6 +465,13 @@ module.exports = {
464
465
  disabled: true,
465
466
  role: '@@@@.@@@.SELECT_SHOP_GET_RELATED_SHOPS',
466
467
  },
468
+ {
469
+ title: "一键更新门店",
470
+ mapFn: "selectShopTaskListUpdate",
471
+ isRule: false,
472
+ disabled: true,
473
+ role: '@@@@.@@@.SELECT_SHOP_TASK_LIST_UPDATE',
474
+ },
467
475
  ],
468
476
  }
469
477
 
@@ -555,14 +555,20 @@ export default {
555
555
  },
556
556
  handleCustom ({ action, data }) {
557
557
  if (action === 'btn') {
558
- if ((data.btn.event==='choose'&&data.row.is_selected!=='can_selected')||!this.isChoose) {
559
- return false
558
+ if (data.btn.event==='choose') {
559
+ if(data.row.is_selected!=='can_selected'||!this.isChoose){
560
+ return false
561
+ }
560
562
  }
561
- if (data.btn.event==='choosed'&&data.row.is_selected==='can_selected') {
562
- return false
563
+ if (data.btn.event==='choosed') {
564
+ if(data.row.is_selected==='can_selected'){
565
+ return false
566
+ }
563
567
  }
564
- if (data.btn.event==='preview'&&!this.isPreview) {
565
- return false
568
+ if (data.btn.event==='preview') {
569
+ if(!this.isPreview){
570
+ return false
571
+ }
566
572
  }
567
573
  return true
568
574
  }
@@ -453,14 +453,20 @@ export default {
453
453
  },
454
454
  handleCustom ({ action, data }) {
455
455
  if (action === 'btn') {
456
- if ((data.btn.event==='choose'&&data.row.is_selected!=='can_selected')||!this.isChoose) {
457
- return false
456
+ if (data.btn.event==='choose') {
457
+ if(data.row.is_selected!=='can_selected'||!this.isChoose){
458
+ return false
459
+ }
458
460
  }
459
- if (data.btn.event==='choosed'&&data.row.is_selected==='can_selected') {
460
- return false
461
+ if (data.btn.event==='choosed') {
462
+ if(data.row.is_selected==='can_selected'){
463
+ return false
464
+ }
461
465
  }
462
- if (data.btn.event==='preview'&&!this.isPreview) {
463
- return false
466
+ if (data.btn.event==='preview') {
467
+ if(!this.isPreview){
468
+ return false
469
+ }
464
470
  }
465
471
  return true
466
472
  }
@@ -18,7 +18,7 @@
18
18
  <div
19
19
  class="app-container__list-table-option"
20
20
  >
21
- <el-button @click="handleTableClick('look',scope.row)" type="text">查看</el-button>
21
+ <el-button v-if="isDetail" @click="handleTableClick('look',scope.row)" type="text">查看</el-button>
22
22
  <el-button v-if="isUpdate&&scope.row.rule_type!=='SY'" @click="handleTableClick('edit',scope.row)" type="text">编辑</el-button>
23
23
  <el-button v-if="isDelete&&scope.row.rule_type!=='SY'" @click="handleTableClick('delete',scope.row)" type="text">删除</el-button>
24
24
  <el-button v-if="isLog" @click="handleTableClick('log',scope.row)" type="text">修改记录</el-button>
@@ -72,6 +72,9 @@ export default {
72
72
  }
73
73
  },
74
74
  computed:{
75
+ isDetail(){
76
+ return checkPermission([permissions.store_selection.selectShopRuleGet])
77
+ },
75
78
  isAdd () {
76
79
  return checkPermission([permissions.store_selection.selectShopRuleAdd])
77
80
  },
@@ -296,6 +296,9 @@ export default {
296
296
  isOffConsume() {
297
297
  return checkPermission([permissions.store_selection.selectShopUpdateConsumeMode])
298
298
  },
299
+ isLookShops(){
300
+ return checkPermission([permissions.store_selection.selectShopGetRelatedShops])
301
+ },
299
302
  headers(){
300
303
  this.tableKey = Date.now()
301
304
  return [
@@ -778,15 +781,17 @@ export default {
778
781
  }
779
782
  }
780
783
  if (data.btn.event==='off') {
781
- if(this.site_business_status==='N'||!this.isDown||(data.row.consume_mode.includes('SELF')||data.row.consume_mode.includes('STOD')||data.row.consume_mode.includes('CODE'))){
784
+ if(this.site_business_status==='N'||!this.isDown){
782
785
  return false
783
786
  }
784
787
  }
785
- if (data.btn.event==='preview'&&!this.isPreview) {
786
- return false
788
+ if (data.btn.event==='preview') {
789
+ if(!this.isPreview){
790
+ return false
791
+ }
787
792
  }
788
793
  if (data.btn.event==='delete') {
789
- if(!this.isDelete||(data.row.consume_mode.includes('SELF')||data.row.consume_mode.includes('STOD')||data.row.consume_mode.includes('CODE'))){
794
+ if(!this.isDelete){
790
795
  return false
791
796
  }
792
797
  }
@@ -795,6 +800,11 @@ export default {
795
800
  return false
796
801
  }
797
802
  }
803
+ if (data.btn.event==='look_store') {
804
+ if(!this.isLookShops){
805
+ return false
806
+ }
807
+ }
798
808
  return true
799
809
  }
800
810
  },
@@ -808,6 +818,8 @@ export default {
808
818
  if (valid) {
809
819
  let params = {
810
820
  filters:this.getParams(),
821
+ tab:this.channelActive,
822
+ consume_mode:this.storeType,
811
823
  export: 1,
812
824
  file_ext: 'xlsx',
813
825
  file_name: this.exportFrom.name,
@@ -4,7 +4,7 @@
4
4
  <div class="app-container__list-pagination">
5
5
  <div></div>
6
6
  <div>
7
- <el-button type="primary" @click="handleExecute">一键更新门店</el-button>
7
+ <el-button type="primary" @click="handleExecute" v-if="isBatchUpdate">一键更新门店</el-button>
8
8
  <el-button type="primary" @click="handleRefresh">刷新</el-button>
9
9
  </div>
10
10
  </div>
@@ -96,6 +96,9 @@ export default {
96
96
  isStop () {
97
97
  return checkPermission([permissions.store_selection.selectShopTaskStop])
98
98
  },
99
+ isBatchUpdate(){
100
+ return checkPermission([permissions.store_selection.selectShopTaskListUpdate])
101
+ },
99
102
  headers(){
100
103
  return [
101
104
  { "type": "normal", "prop": "task_id", "align": "center", "width": 200, "label": "ID" },
@@ -323,7 +323,7 @@ export default {
323
323
  size: "mini", //default/mini/small
324
324
  },
325
325
  {
326
- label: "按号段:", //label
326
+ label: "限制条件:", //label
327
327
  ele: "xd-radio",
328
328
  valueKey: "card_number_type", //form[valueKey]
329
329
  value: params.card_number_type || "ALL", //v-model
@@ -331,6 +331,25 @@ export default {
331
331
  list: [
332
332
  { label: "全部号段", value: "ALL" },
333
333
  { label: "自定义号段", value: "CUSTOMIZE" },
334
+ { label: "卡类型", value: "TYPE" },
335
+ ],
336
+ rules: [
337
+ {
338
+ required: true,
339
+ message: "请选择",
340
+ trigger: ["blur", "change"],
341
+ },
342
+ ],
343
+ },
344
+ params.card_number_type==='TYPE'&&{
345
+ label: "", //label
346
+ ele: "xd-radio",
347
+ valueKey: "card_model", //form[valueKey]
348
+ value: params.card_model || "d", //v-model
349
+ placeholder: "请选择",
350
+ list: [
351
+ { label: "点卡", value: "d" },
352
+ { label: "次卡", value: "c" },
334
353
  ],
335
354
  rules: [
336
355
  {
@@ -342,6 +342,7 @@ export default {
342
342
  : this.openInfoData
343
343
  ? this.openInfoData.pay_url_data
344
344
  : "",
345
+ phone_collect_url_data: copyValue.phone_collect_url_data?phone_collect_url_data:this.openInfoData?this.openInfoData.phone_collect_url_data:"",
345
346
  })
346
347
  );
347
348
  });
@@ -757,6 +758,19 @@ export default {
757
758
  if (res.data.pay_error_url_data) {
758
759
  res.data.pay_error_url_data = JSON.parse(res.data.pay_error_url_data);
759
760
  }
761
+ let keys = Object.keys(res.data);
762
+ this.openDialogForm.map(item=>{
763
+ if(keys.includes(item.valueKey)) {
764
+ if(item.ele==='xd-select-site-path') {
765
+ if(res.data[item.valueKey]) {
766
+ res.data[item.valueKey]= JSON.parse(
767
+ res.data[item.valueKey]
768
+ );
769
+ }
770
+
771
+ }
772
+ }
773
+ })
760
774
  this.initForm(res.data);
761
775
  })
762
776
  .catch((err) => {});
@@ -1248,6 +1262,89 @@ export default {
1248
1262
  // ]
1249
1263
  // },
1250
1264
  ].filter((i) => i);
1265
+ this.openDialogForm = this.openDialogForm.map(item=>{
1266
+ if(item.ele === "xd-select-site-path"){
1267
+ item = {
1268
+ label: item.label,
1269
+ ele: "xd-select-site-path",
1270
+ className: "input100",
1271
+ valueKey: item.valueKey,
1272
+ value: params[item.valueKey] || null,
1273
+ setting: {
1274
+ site_id: this.site_id,
1275
+ },
1276
+ handleCustom: ({ action, data }) => {
1277
+ if (action === "siteList") {
1278
+ this.getEditxSiteListm()
1279
+ .then((res) => {
1280
+ data.cb(
1281
+ res.data.list.map((item) => {
1282
+ return {
1283
+ ...item,
1284
+ label: item["site_name"],
1285
+ value: item["site_id"],
1286
+ };
1287
+ })
1288
+ );
1289
+ })
1290
+ .catch((res) => {
1291
+ console.error(res);
1292
+ data.cb([]);
1293
+ });
1294
+ }
1295
+
1296
+ //获取应用列表
1297
+ if (action === "appList") {
1298
+ if (data.params && data.params.value) {
1299
+ this.getSaasSiteAppListm({ site_id: data.params.value })
1300
+ .then((res) => {
1301
+ if (!res.data.items) {
1302
+ this.$message({
1303
+ message:
1304
+ "您选择的站点无应用数据,请发布应用之后在进行配置!",
1305
+ type: "error",
1306
+ });
1307
+ data.cb([]);
1308
+ return;
1309
+ }
1310
+
1311
+ //有数据
1312
+ let routerData = [];
1313
+ res.data.items.map((item) => {
1314
+ if (item["children"]) {
1315
+ routerData = routerData.concat(
1316
+ getEditPagesTreeToPathArr(
1317
+ item["children"],
1318
+ item["label"],
1319
+ item["value"],
1320
+ item["route"],
1321
+ item["aopen_app_code"]
1322
+ )
1323
+ );
1324
+ }
1325
+ });
1326
+ data.cb(routerData);
1327
+ })
1328
+ .catch((res) => {
1329
+ console.error(res);
1330
+ data.cb([]);
1331
+ });
1332
+ } else {
1333
+ data.cb([]);
1334
+ }
1335
+ }
1336
+ },
1337
+ rules: [
1338
+ {
1339
+ required: true,
1340
+ message: "请选择网站地址",
1341
+ trigger: "change",
1342
+ },
1343
+ ],
1344
+ }
1345
+ }
1346
+ return item;
1347
+ })
1251
1348
  listForm = this.insertArrayAt(listForm, 3, this.openDialogForm);
1252
1349
  listForm.map((item) => {
1253
1350
  if (item.ele === "xd-check") {
@@ -1411,6 +1508,16 @@ export default {
1411
1508
  this.listValue.pay_error_url_data
1412
1509
  );
1413
1510
  }
1511
+ let keys = Object.keys(this.listValue);
1512
+ this.openDialogForm.map(item=>{
1513
+ if(keys.includes(item.valueKey)) {
1514
+ if(item.ele==='xd-select-site-path') {
1515
+ copyListValue[item.valueKey]= JSON.stringify(
1516
+ this.listValue[item.valueKey]
1517
+ );
1518
+ }
1519
+ }
1520
+ })
1414
1521
  return copyListValue;
1415
1522
  },
1416
1523
  handleConfirmSave() {
@@ -1431,7 +1538,7 @@ export default {
1431
1538
  }
1432
1539
  )
1433
1540
  .then(() => {
1434
- this.funOpenAppEdit(copyListValue);
1541
+ this.funOpenAppEdit();
1435
1542
  })
1436
1543
  .catch(() => {
1437
1544
  //todo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.103",
3
+ "version": "1.1.105",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {