jufubao-admin-library 1.1.99 → 1.1.101

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.
@@ -132,6 +132,20 @@ module.exports = {
132
132
  disabled: true,
133
133
  role: ""
134
134
  },
135
+ {
136
+ title: "统计-商品统计-已选商品折扣分布",
137
+ mapFn: "getSelectedProdDiscounts",
138
+ path: '/stat-partner/v1/product-stat/selected-prod-discounts',
139
+ isRule: false,
140
+ params: {
141
+ filter_site_id: ['filter_site_id', 'String', '必填'],
142
+ filter_business_code: ['filter_business_code', 'String', '必填'],
143
+ },
144
+ disabled: true,
145
+ role: "STAT-PARTNER.PRODUCT_STAT_SELECT_PROD_DISCOUNT"
146
+ },
147
+
148
+
135
149
 
136
150
  ]
137
151
  }
@@ -0,0 +1,370 @@
1
+ <template>
2
+ <el-card class="discount-wrap">
3
+ <div class="discount-wrap-header" slot="header">
4
+ <div class="discount-wrap-header-select">
5
+ <div class="mb10 fs18">
6
+ 已选商品折扣分布
7
+ <!-- <el-tooltip
8
+ effect="light"
9
+ content="仅统计可售商品,包含人工添加和接口同步商品。"
10
+ placement="right"
11
+ >
12
+ <i class="xdicon_question-circle xd_admin_iconfont"></i>
13
+ </el-tooltip> -->
14
+ <span class="s_tit">
15
+ <!-- 截止到{{ last_updated_date_time }} -->
16
+ </span>
17
+ </div>
18
+ <div>
19
+ <el-form ref="form" :inline="true" :model="form" label-width="80px">
20
+ <!-- <el-form-item label="折扣类型">
21
+ <el-select
22
+ v-model="discount_type"
23
+ filterable
24
+ clearable
25
+ placeholder="请选择折扣类型"
26
+ style="margin-right: 10px"
27
+ >
28
+ <el-option
29
+ v-for="item in discountTypeList"
30
+ :key="item.value"
31
+ :label="item.label"
32
+ :value="item.value"
33
+ >
34
+ </el-option>
35
+ </el-select>
36
+ </el-form-item> -->
37
+ <el-form-item label="供应商">
38
+ <el-select
39
+ v-model="channel_code"
40
+ filterable
41
+ clearable
42
+ placeholder="请选择供应商类别"
43
+ style="margin-right: 10px"
44
+ >
45
+ <el-option
46
+ v-for="item in channelList"
47
+ :key="item.value"
48
+ :label="item.label"
49
+ :value="item.value"
50
+ >
51
+ </el-option>
52
+ </el-select>
53
+ <el-select
54
+ clearable
55
+ v-if="channel_code && showSupplier === 'Y'"
56
+ v-model="supplier_ids"
57
+ filterable
58
+ remote
59
+ reserve-keyword
60
+ placeholder="请输入供应商"
61
+ :remote-method="remoteMethod"
62
+ >
63
+ <el-option
64
+ v-for="item in supplierList"
65
+ :key="item.value"
66
+ :label="item.label"
67
+ :value="item.value"
68
+ >
69
+ </el-option>
70
+ </el-select>
71
+ </el-form-item>
72
+ <!-- <el-form-item label="时间">
73
+ <xd-stat-trade-date :isRangeMonth="true" v-model="tradeTime"></xd-stat-trade-date>
74
+ </el-form-item> -->
75
+ <el-form-item label="公共分类">
76
+ <el-cascader v-model="category_id" :props="categoryProps" clearable></el-cascader>
77
+ </el-form-item>
78
+ <el-form-item>
79
+ <el-button
80
+ @click="getDataList"
81
+ style="margin-left: 10px"
82
+ type="primary"
83
+ >搜索</el-button
84
+ >
85
+ <el-button @click="doExport" type="primary">条件导出</el-button>
86
+ </el-form-item>
87
+ </el-form>
88
+ </div>
89
+ </div>
90
+ <div>
91
+ {{
92
+ channel_code
93
+ ? channel_code !== "self"
94
+ ? channel_code_text
95
+ : supplier_text
96
+ ? supplier_text
97
+ : "全部"
98
+ : "全部"
99
+ }}已选商品-按折扣统计数量:
100
+ </div>
101
+ </div>
102
+ <xd-stat-table-group
103
+ v-if="upNewParams"
104
+ :params="upNewParams"
105
+ :key="upNewkey"
106
+ :getList="getSelectedProdDiscounts"
107
+ >
108
+ </xd-stat-table-group>
109
+ <div style="margin-top: 20px">注:自有商品折扣取货源进货价/售价折扣;非自有商品折扣取平台进货价/售价折扣。</div>
110
+ </el-card>
111
+ </template>
112
+ <script>
113
+ import { getOptions } from "@/utils/options";
114
+ import { mapActions } from "vuex";
115
+ import XdStatTradeDate from "@/components/XdStatTradeDate";
116
+ import XdStatTableGroup from "@/components/XdStatTableGroup";
117
+ export default {
118
+ components: {
119
+ XdStatTradeDate,
120
+ XdStatTableGroup
121
+ },
122
+ data() {
123
+ return {
124
+ keyList: [],
125
+ rowTitle: [],
126
+ dataList: [],
127
+ channelList: [],
128
+ channel_code: null,
129
+ supplier_ids: null,
130
+ supplierList: [],
131
+ last_updated_date_time: "", //截止时间
132
+ supplier_text: "",
133
+ channel_code_text: "",
134
+ showSupplier: "N",
135
+ discountTypeList:[
136
+ {
137
+ label:'市场价',
138
+ value:'market'
139
+ },
140
+ {
141
+ label:'建议售价',
142
+ value:'sale'
143
+ },
144
+ ],
145
+ discount_type:'',
146
+ tradeTime: null,
147
+ category_id:[],
148
+ categoryProps: {
149
+ checkStrictly: true,
150
+ lazy: true,
151
+ lazyLoad (node, resolve) {
152
+ getOptions({
153
+ server: 'product-partner',
154
+ fn: "categories",
155
+ path: "p4",
156
+ params: {
157
+ value: node.level == 0 ? 0 : node.value,
158
+ },
159
+ }).then((res) => {
160
+ resolve(res["data"]["list"])
161
+ })
162
+ },
163
+ },
164
+ form:{},
165
+ upNewkey:'upNewkey',
166
+ upNewParams:null,
167
+ };
168
+ },
169
+ props: {
170
+ site_id: {
171
+ type: Number|String,
172
+ default: null
173
+ },
174
+ business_code: {
175
+ type: Number|String,
176
+ default: null
177
+ },
178
+ sub_business_code:{
179
+ type: Number|String,
180
+ default: null
181
+ },
182
+ },
183
+ watch: {
184
+ channel_code(n, o) {
185
+ this.channel_code_text = "";
186
+ this.supplier_text = "";
187
+ this.supplier_ids = null;
188
+ if (n && n !== o) {
189
+ this.channel_code_text = this.channelList.find(
190
+ (item) => item.value === n
191
+ ).label;
192
+ this.showSupplier = this.channelList.find(
193
+ (item) => item.value === n
194
+ ).has_supplier;
195
+ }
196
+ },
197
+ supplier_ids(n, o) {
198
+ this.supplier_text = "";
199
+ if (n && n !== o) {
200
+ this.supplier_text = this.supplierList.find(
201
+ (item) => item.value === n
202
+ ).label;
203
+ }
204
+ },
205
+ site_id(n,o) {
206
+ this.getDataList()
207
+ },
208
+ business_code(n,o) {
209
+ this.getDataList()
210
+ },
211
+ sub_business_code(n,o) {
212
+ this.getDataList()
213
+ }
214
+ },
215
+ created() {
216
+ getOptions({
217
+ server: "supplier-partner",
218
+ fn: "supplier-channel",
219
+ path: "p1",
220
+ params:{
221
+ type:'ALL'
222
+ }
223
+ }).then((res) => {
224
+ this.channelList = res.data.list;
225
+ });
226
+
227
+ },
228
+ mounted(){
229
+ this.getDataList();
230
+ },
231
+ methods: {
232
+ ...mapActions("productStat", ["getSelectedProdDiscounts"]),
233
+ // 获取列表数据
234
+ async getDataList(row) {
235
+
236
+ let params = {
237
+ channel_code: this.channel_code,
238
+ supplier_ids: this.supplier_ids,
239
+ channel_code_text: this.channel_code_text,
240
+ supplier_text: this.supplier_text,
241
+ discount_type:this.discount_type,
242
+ filter_site_id: this.site_id?this.site_id:null,
243
+ filter_business_code: this.business_code?this.business_code:null,
244
+ filter_lv2_business_code: this.sub_business_code,
245
+ ...this.tradeTime,
246
+ }
247
+ if (this.category_id && this.category_id.length) {
248
+ params['category_id'] = this.category_id[this.category_id.length - 1]
249
+ }
250
+ this.upNewParams = params;
251
+ this.upNewkey = Date.now();
252
+ },
253
+ doExport() {
254
+ this.$prompt("请输入导出文件名称", "提示", {
255
+ confirmButtonText: "确定",
256
+ cancelButtonText: "取消",
257
+ inputPattern: /[\S]+/,
258
+ inputErrorMessage: "请填写正确的名称",
259
+ }).then(({ value }) => {
260
+ let params = {
261
+ channel_code: this.channel_code,
262
+ supplier_ids: this.supplier_ids,
263
+ export: true,
264
+ file_ext: "xlsx",
265
+ file_name: value,
266
+ channel_code_text: this.channel_code_text,
267
+ supplier_text: this.supplier_text,
268
+ discount_type:this.discount_type,
269
+ filter_site_id: this.site_id?this.site_id:null,
270
+ filter_business_code: this.business_code?this.business_code:null,
271
+ filter_lv2_business_code: this.sub_business_code,
272
+ ...this.tradeTime,
273
+ };
274
+ let loading = this.$loading({});
275
+ this.getSelectedProdDiscounts(params)
276
+ .then((res) => {
277
+ loading.close();
278
+ this.$alert(
279
+ "导出任务已经开始执行,请去任务管理查看下载状态",
280
+ "提示",
281
+ {
282
+ confirmButtonText: "确定",
283
+ }
284
+ );
285
+ })
286
+ .catch((err) => {
287
+ this.$message.error(err.msg);
288
+ loading.close();
289
+ });
290
+ });
291
+ },
292
+ remoteMethod(query) {
293
+ if (query !== "") {
294
+ getOptions({
295
+ server: "supplier-partner",
296
+ fn: "channel-supplier",
297
+ path: "p1",
298
+ params: {
299
+ channel_code: this.channel_code,
300
+ keyword: query,
301
+ },
302
+ })
303
+ .then((res) => {
304
+ this.supplierList = res.data.list;
305
+ })
306
+ .catch((err) => {
307
+ console.log(err, "err");
308
+ });
309
+ } else {
310
+ this.supplierList = [];
311
+ }
312
+ },
313
+ },
314
+ };
315
+ </script>
316
+ <style lang="less" scoped>
317
+ .discount {
318
+ &-wrap {
319
+ margin-top: 20px;
320
+ &-header {
321
+ &-select {
322
+ //display: flex;
323
+ //justify-content: space-between;
324
+ //align-items: center;
325
+ margin-bottom: 10px;
326
+
327
+ & > div:first-child {
328
+ display: flex;
329
+ align-items: center;
330
+ font-size: 20px;
331
+ i {
332
+ cursor: pointer;
333
+ margin-left: 4px;
334
+ color: #a1a7b3;
335
+ }
336
+ }
337
+
338
+ & > div:nth-child(2) {
339
+ display: flex;
340
+ flex-wrap: wrap;
341
+ align-items: center;
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+ .s_tit{
348
+ font-size: 12px;
349
+ color: #A1A7B3;
350
+ margin-left: 10px;
351
+ vertical-align: bottom;
352
+ }
353
+ .empty_data {
354
+ display: flex;
355
+ justify-content: center;
356
+ align-items: center;
357
+ height: 100px;
358
+ color: #a1a7b3;
359
+ font-size: 14px;
360
+ }
361
+ .mb10{
362
+ margin-bottom: 10px;
363
+ }
364
+ .dis_f{
365
+ display: flex;
366
+ }
367
+ .fs18{
368
+ font-size: 18px!important;
369
+ }
370
+ </style>
@@ -36,6 +36,12 @@
36
36
  :sub_business_code="sub_business_code"
37
37
  v-permission="[Role.totalCounts]"
38
38
  ></stat-all>
39
+ <select-discount
40
+ v-if="site_id&&isSelectProdDis"
41
+ :site_id="site_id"
42
+ :business_code="business_code"
43
+ :sub_business_code="sub_business_code"
44
+ ></select-discount>
39
45
  <stat-all-gift
40
46
  v-if="site_id&&business_code==='gift'&&status"
41
47
  :site_id="site_id"
@@ -91,6 +97,7 @@ import tableCategory from "./components/table-category.vue";
91
97
  import XdStatTableGroup from "@/components/XdStatTableGroup.vue"
92
98
  import checkPermission from "@/utils/permission";
93
99
  import Role from "@/constant/modules/supplierStat";
100
+ import selectDiscount from "./components/select-discount.vue";
94
101
  import { getOptions } from "@/utils/options";
95
102
 
96
103
  export default {
@@ -101,7 +108,8 @@ export default {
101
108
  tableProduct,
102
109
  tableCategory,
103
110
  statAllGift,
104
- XdStatTableGroup
111
+ XdStatTableGroup,
112
+ selectDiscount
105
113
  },
106
114
  data() {
107
115
  return {
@@ -148,6 +156,9 @@ export default {
148
156
  has_tab_category() {
149
157
  return checkPermission([Role.productCategoryCycSales]);
150
158
  },
159
+ isSelectProdDis(){
160
+ return checkPermission([Role.getSelectedProdDiscounts]);
161
+ },
151
162
  has_tab() {
152
163
  return checkPermission([
153
164
  Role.supplierCycSales,
@@ -88,8 +88,11 @@ export default {
88
88
  },
89
89
  xAxis: {
90
90
  type: 'category',
91
- boundaryGap: false,
92
91
  smooth: true,
92
+ data: xAxisData,
93
+ axisPointer: {
94
+ type: 'shadow'
95
+ },
93
96
  data: xAxisData
94
97
  },
95
98
  yAxis: [{
@@ -34,9 +34,21 @@ const storeRouter = {
34
34
  meta: {
35
35
  title: '门店集市',
36
36
  icon: 'el-icon-sell',
37
- roles:[store_selection.selectShopMarketList]
37
+ roles:[store_selection.selectShopMarketList],
38
38
  }
39
39
  },
40
+ // #ifdef partner-movie
41
+ // {
42
+ // path: 'mc-market-list',
43
+ // name: 'McMarketList',
44
+ // component: () => import('@/viewStore/market/mc_list'),
45
+ // meta: {
46
+ // title: '在线选座门店集市',
47
+ // icon: 'el-icon-sell',
48
+ // roles:[store_selection.selectShopSeatList]
49
+ // }
50
+ // },
51
+ // #endif
40
52
  {
41
53
  path: 'rule-list',
42
54
  name: 'StoreRuleList',
@@ -85,11 +97,21 @@ const storeRouter = {
85
97
  name: 'TasksList',
86
98
  component: () => import('@/viewStore/task/list'),
87
99
  meta: {
88
- title: '选店任务管理',
100
+ title: '门店更新',
89
101
  icon: 'xdicon_rizhi',
90
102
  roles:[store_selection.selectShopTaskList]
91
103
  }
92
104
  },
105
+ // {
106
+ // path: 'cache-list',
107
+ // name: 'CacheList',
108
+ // component: () => import('@/viewStore/cache/list'),
109
+ // meta: {
110
+ // title: '缓存更新',
111
+ // icon: 'el-icon-files',
112
+ // roles:[store_selection.updateCacheDetail]
113
+ // }
114
+ // },
93
115
  ]
94
116
  }
95
117
 
@@ -372,6 +372,98 @@ module.exports = {
372
372
  },
373
373
  disabled: true,
374
374
  },
375
+ {
376
+ mapFn: 'updateCacheDetail',
377
+ isRule: false,
378
+ title: '已选门店更新缓存详情',
379
+ path: '/supplier-partner/v1/:xsiteid/:xnamespace/select-shop/update-cache-detail',
380
+ params: {
381
+
382
+ },
383
+ disabled: true,
384
+ role: '@@@@.@@@.SELECT_SHOP_CACHE_LIST',
385
+ },
386
+ {
387
+ mapFn: 'updateCache',
388
+ isRule: false,
389
+ title: '已选门店更新缓存',
390
+ path: '/supplier-partner/v1/:xsiteid/:xnamespace/select-shop/update-cache',
391
+ params: {
392
+
393
+ },
394
+ disabled: true,
395
+ role: '@@@@.@@@.SELECT_SHOP_CACHE_UPDATE',
396
+ },
397
+ {
398
+ title: "在线选座门店集市",
399
+ mapFn: "selectShopSeatList",
400
+ path: "/supplier-partner/v1/:xsiteid/:xnamespace/select-shop-market/seatlist",
401
+ isRule: false,
402
+ data: {
403
+ xsiteid: ['站点Id', 'String', '必填'],
404
+ xnamespace: ['命名空间', 'String', '必填'],
405
+ fitler: ['fitler', 'String', '选填'],
406
+ page_token: ['第几页', 'String', '选填'],
407
+ page_size: ['每页展示条数', 'Number', '选填'],
408
+ },
409
+ disabled: true,
410
+ role: '@@@@.@@@.SELECT_SHOP_MARKET_MC_LIST',
411
+ },
412
+
413
+ {
414
+ title: "门店集市批量选用",
415
+ mapFn: "selectShopMarketBatchSelect",
416
+ path: '/supplier-partner/v1/:xsiteid/:xnamespace/select-shop-market/batch-select',
417
+ isRule: false,
418
+ params: {
419
+ xsiteid: ['站点Id', 'String', '必填'],
420
+ xnamespace: ['命名空间', 'String', '必填'],
421
+ resource_shop_ids: ['resource_shop_ids', 'Array', '选填'],
422
+ },
423
+ disabled: true,
424
+ },
425
+ {
426
+ title: "已选门店查看门店服务类型",
427
+ mapFn: "selectShopGetConsumeMode",
428
+ path: '/supplier-partner/v1/:xsiteid/:xnamespace/select-shop/consume-mode',
429
+ isRule: false,
430
+ params: {
431
+ xsiteid: ['站点Id', 'String', '必填'],
432
+ xnamespace: ['命名空间', 'String', '必填'],
433
+ shop_id: ['shop_id', 'Number', '选填'],
434
+ resource_shop_id: ['resource_shop_id', 'Number', '选填'],
435
+ },
436
+ disabled: true,
437
+ },
438
+ {
439
+ title: "已选门店修改门店服务类型",
440
+ mapFn: "selectShopUpdateConsumeMode",
441
+ path: '/supplier-partner/v1/:xsiteid/:xnamespace/select-shop/update-consume-mode',
442
+ isRule: false,
443
+ params: {
444
+ xsiteid: ['站点Id', 'String', '必填'],
445
+ xnamespace: ['命名空间', 'String', '必填'],
446
+ shop_id: ['shop_id', 'Number', '选填'],
447
+ resource_shop_id: ['resource_shop_id', 'Number', '选填'],
448
+ consume_mode: ['consume_mode', 'Array', '必填'],
449
+ },
450
+ disabled: true,
451
+ role: '@@@@.@@@.SELECT_SHOP_UPDATE_CONSUME_MODE',
452
+ },
453
+ {
454
+ title: "查看关联前门店",
455
+ mapFn: "selectShopGetRelatedShops",
456
+ path: '/supplier-partner/v1/:xsiteid/:xnamespace/select-shop/get-related-shops',
457
+ isRule: false,
458
+ params: {
459
+ xsiteid: ['站点Id', 'String', '必填'],
460
+ xnamespace: ['命名空间', 'String', '必填'],
461
+ resource_shop_id: ['resource_shop_id', 'Number', '选填'],
462
+ consume_mode: ['consume_mode', 'String', '必填'],
463
+ },
464
+ disabled: true,
465
+ role: '@@@@.@@@.SELECT_SHOP_GET_RELATED_SHOPS',
466
+ },
375
467
  ],
376
468
  }
377
469