jufubao-admin-library 1.1.18 → 1.1.19-beta2

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.
Files changed (18) hide show
  1. package/library/viewModules/viewStat/router/productStat.js +33 -0
  2. package/library/viewModules/viewStat/router/supplierStat.js +3 -3
  3. package/library/viewModules/viewStat/schemas/product.stat.js +102 -0
  4. package/library/viewModules/viewStat/schemas/supplier.stat.js +9 -0
  5. package/library/viewModules/viewStat/viewsStat/product/components/stat-all.vue +265 -0
  6. package/library/viewModules/viewStat/viewsStat/product/components/table-brand.vue +437 -0
  7. package/library/viewModules/viewStat/viewsStat/product/components/table-category.vue +446 -0
  8. package/library/viewModules/viewStat/viewsStat/product/components/table-product.vue +490 -0
  9. package/library/viewModules/viewStat/viewsStat/product/index.vue +251 -0
  10. package/library/viewModules/viewStat/viewsStat/supplier/components/discount.vue +274 -0
  11. package/library/viewModules/viewStat/viewsStat/{index → supplier}/components/table-category.vue +3 -3
  12. package/library/viewModules/viewStat/viewsStat/{index → supplier}/components/table-product.vue +1 -1
  13. package/library/viewModules/viewStat/viewsStat/{index → supplier}/components/table-supplier.vue +1 -1
  14. package/library/viewModules/viewStat/viewsStat/{index → supplier}/index.vue +4 -1
  15. package/package.json +5 -3
  16. /package/library/viewModules/viewStat/viewsStat/{index → supplier}/components/stat-all.vue +0 -0
  17. /package/library/viewModules/viewStat/viewsStat/{index → supplier}/components/stat-product.vue +0 -0
  18. /package/library/viewModules/viewStat/viewsStat/{index → supplier}/components/stat-supplier.vue +0 -0
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ import Layout from '@/layout'
4
+ import roles from '@/constant/permissions' //引用权限值
5
+ const role = roles.productStat;
6
+
7
+ const productStatRouter = {
8
+ path: '/stat',
9
+ sort: 95,
10
+ component: Layout,
11
+ name: '商品统计',
12
+ redirect: '/stat/product',
13
+ meta: {
14
+ title: '商品统计',
15
+ icon: 'xdicon_rizhi',
16
+ iconSize: 22,
17
+ },
18
+ children: [
19
+ {
20
+ path: 'product',
21
+ name: '商品统计',
22
+ component: () => import ('@/viewsStat/product/index'),
23
+ meta: {
24
+ title: '商品统计',
25
+ icon: 'xdicon_rizhi',
26
+ iconSize: 22,
27
+ role: []
28
+ }
29
+ }
30
+ ]
31
+ }
32
+
33
+ export default productStatRouter
@@ -9,7 +9,7 @@ const supplierStatRouter = {
9
9
  sort: 95,
10
10
  component: Layout,
11
11
  name: '供货商统计',
12
- redirect: '/stat/index',
12
+ redirect: '/stat/supplier',
13
13
  meta: {
14
14
  title: '供货商统计',
15
15
  icon: 'xdicon_rizhi',
@@ -17,9 +17,9 @@ const supplierStatRouter = {
17
17
  },
18
18
  children: [
19
19
  {
20
- path: 'index',
20
+ path: 'supplier',
21
21
  name: '供货商统计',
22
- component: () => import ('@/viewsStat/index/index'),
22
+ component: () => import ('@/viewsStat/supplier/index'),
23
23
  meta: {
24
24
  title: '供货商统计',
25
25
  icon: 'xdicon_rizhi',
@@ -0,0 +1,102 @@
1
+ 'use strict';
2
+ module.exports = {
3
+ name: "productStat",
4
+ title: "商品统计",
5
+ vuex: true,
6
+ model: [
7
+ {
8
+ title: "统计-商品统计-累计统计",
9
+ mapFn: "totalProductCounts",
10
+ path: "/stat-partner/v1/product-stat/total-counts",
11
+ isRule: false,
12
+ params: {
13
+ site_id: ['站点id', 'String', '必填'],
14
+ business_code: ['业务线code', 'String', '必填'],
15
+ },
16
+ disabled: true,
17
+ role: ""
18
+ },
19
+ {
20
+ title: "统计-商品统计-商品销售数据",
21
+ mapFn: "productSalesCyc",
22
+ path: "/stat-partner/v1/product-stat/product-cyc-sales",
23
+ isRule: false,
24
+ params: {
25
+ time_range_start:['周期起始时间', 'String', '非必填'],
26
+ time_range_end:['周期结束时间', 'String', '非必填'],
27
+ product_id:['商品id', 'String', '非必填'],
28
+ like_product_id:['模糊商品搜索', 'String', '非必填'],
29
+ product_type:['商品类型', 'String', '非必填'],
30
+ channel_code:['渠道code', 'String', '非必填'],
31
+ supplier_ids:['供应商id', 'String', '非必填'],
32
+ export: ['是否导出', 'String', '非必填'],
33
+ file_name: ['导出文件名称', 'String', '非必填'],
34
+ file_ext: ['导出文件类型 xls,xlsx,csv,html', 'String', '非必填'],
35
+ export_data_tag: ['导出的模版标识', 'String', '非必填'],
36
+ },
37
+ disabled: true,
38
+ role: ""
39
+ },
40
+ {
41
+ title: "统计-商品统计-商品分类销售数据",
42
+ mapFn: "categoryCycSales",
43
+ path: "/stat-partner/v1/product-stat/prod-cate-cyc-sales",
44
+ isRule: false,
45
+ params: {
46
+ time_range_start:['周期起始时间', 'String', '非必填'],
47
+ time_range_end:['周期结束时间', 'String', '非必填'],
48
+ common_category:['公共类目', 'String', '非必填'],
49
+ channel_code:['渠道code', 'String', '非必填'],
50
+ supplier_ids:['供应商id', 'String', '非必填'],
51
+ export: ['是否导出', 'String', '非必填'],
52
+ file_name: ['导出文件名称', 'String', '非必填'],
53
+ file_ext: ['导出文件类型 xls,xlsx,csv,html', 'String', '非必填'],
54
+ export_data_tag: ['导出的模版标识', 'String', '非必填'],
55
+ },
56
+ disabled: true,
57
+ role: ""
58
+ },
59
+ {
60
+ title: "统计-商品统计-品牌销售数据",
61
+ mapFn: "brandCycSales",
62
+ path: "/stat-partner/v1/product-stat/brand-cyc-sales",
63
+ isRule: false,
64
+ params: {
65
+ time_range_start:['周期起始时间', 'String', '非必填'],
66
+ time_range_end:['周期结束时间', 'String', '非必填'],
67
+ brand_id:['品牌id', 'String', '非必填'],
68
+ channel_code:['渠道code', 'String', '非必填'],
69
+ supplier_ids:['供应商id', 'String', '非必填'],
70
+ export: ['是否导出', 'String', '非必填'],
71
+ file_name: ['导出文件名称', 'String', '非必填'],
72
+ file_ext: ['导出文件类型 xls,xlsx,csv,html', 'String', '非必填'],
73
+ export_data_tag: ['导出的模版标识', 'String', '非必填'],
74
+ },
75
+ disabled: true,
76
+ role: ""
77
+ },
78
+ {
79
+ title: "统计-商品统计-加盟商可选业务线",
80
+ mapFn: "getBusinessList",
81
+ path: "/stat-partner/v1/product-stat/biz-lines",
82
+ isRule: false,
83
+ params: {
84
+ site_id: ['站点id', 'String', '必填'],
85
+ },
86
+ disabled: true,
87
+ role: ""
88
+ },
89
+ {
90
+ title: "统计-商品统计-加盟商可选业务线Lv2",
91
+ mapFn: "getBusinessChildrenList",
92
+ path: "/stat-partner/v1/product-stat/biz-lines-lv2",
93
+ isRule: false,
94
+ params: {
95
+ site_id: ['站点id', 'String', '必填'],
96
+ business_code: ['业务线code', 'String', '必填'],
97
+ },
98
+ disabled: true,
99
+ role: ""
100
+ },
101
+ ]
102
+ }
@@ -65,6 +65,15 @@ module.exports = {
65
65
  params: {},
66
66
  disabled: true,
67
67
  role: "STAT-PARTNER.SUPPLIER_STAT_PRODUCT_CATEGORY_CYC_SALES"
68
+ },
69
+ {
70
+ title: "统计-供应商统计-在售商品折扣分布数据",
71
+ mapFn: "getProductDiscount",
72
+ path: "/stat-partner/v1/supplier-stat/product-discounts",
73
+ isRule: false,
74
+ params: {},
75
+ disabled: true,
76
+ role: ""
68
77
  }
69
78
  ]
70
79
  }
@@ -0,0 +1,265 @@
1
+
2
+ <template>
3
+ <el-card class="stat_all_card">
4
+ <div slot="header" class="card_header">
5
+ <div>
6
+ <span class="b_tit">累计商品统计</span>
7
+ <span class="s_tit">数据截止:{{ statAll.last_updated_date_time }}</span>
8
+ </div>
9
+ <!-- <i class="el-icon-refresh" @click="toRefresh"></i> -->
10
+ </div>
11
+ <div class="stat_list">
12
+ <div class="stat_item">
13
+ <p class="_title">
14
+ 商品总数
15
+ <el-tooltip effect="light" content="总共商品数量,多规格商品计1个" placement="right">
16
+ <i class="xdicon_question-circle xd_admin_iconfont"></i>
17
+ </el-tooltip>
18
+ </p>
19
+ <div class="_cont">
20
+ <div class="_left">{{ statAll.product_total_count }}</div>
21
+ <div class="_right">
22
+ <div class="right_i right_top">
23
+ <div class="one_line">
24
+ {{statAll.product_self_manual_count}} (自营-人工)
25
+ </div>
26
+ <div class="two_line">
27
+ <div>上架{{statAll.product_self_manual_online_count}}</div>
28
+ <div>下架{{ statAll.product_self_manual_offline_count }}</div>
29
+ </div>
30
+ </div>
31
+ <div class="right_i right_middle">
32
+ <div class="one_line">
33
+ {{statAll.product_self_channel_count}} (自营-接口)
34
+ </div>
35
+ <div class="two_line">
36
+ <div>上架{{statAll.product_self_channel_online_count}}</div>
37
+ <div>下架{{ statAll.product_self_channel_offline_count }}</div>
38
+ </div>
39
+ </div>
40
+ <div class="right_i right_bottom">
41
+ <div class="one_line">
42
+ {{statAll.product_other_count}}(非自营)
43
+ </div>
44
+ <div class="two_line">
45
+ <div>上架{{statAll.product_other_online_count}}</div>
46
+ <div>下架{{statAll.product_other_offline_count}}</div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <div class="stat_item">
53
+ <p class="_title">
54
+ SKU总数
55
+ <el-tooltip effect="light" content="总共商品规格数量,多规格商品计多个" placement="right">
56
+ <i class="xdicon_question-circle xd_admin_iconfont"></i>
57
+ </el-tooltip>
58
+ </p>
59
+ <div class="_cont">
60
+ <div class="_left">{{statAll.sku_total_count}}</div>
61
+ <div class="_right">
62
+ <div class="right_i right_top">
63
+ <div class="one_line">
64
+ {{statAll.sku_self_manual_count}} (自营-人工)
65
+ </div>
66
+ <div class="two_line">
67
+ <div>上架{{statAll.sku_self_manual_online_count}}</div>
68
+ <div>下架{{statAll.sku_self_manual_offline_count}}</div>
69
+ </div>
70
+ </div>
71
+ <div class="right_i right_middle">
72
+ <div class="one_line">
73
+ {{statAll.sku_self_channel_count}} (自营-接口)
74
+ </div>
75
+ <div class="two_line">
76
+ <div>上架{{statAll.sku_self_channel_online_count}}</div>
77
+ <div>下架{{statAll.sku_self_channel_offline_count}}</div>
78
+ </div>
79
+ </div>
80
+ <div class="right_i right_bottom">
81
+ <div class="one_line">
82
+ {{statAll.sku_other_count}}(非自营)
83
+ </div>
84
+ <div class="two_line">
85
+ <div>上架{{statAll.sku_other_online_count}}</div>
86
+ <div>下架{{statAll.sku_other_offline_count}}</div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ </div>
93
+
94
+ </el-card>
95
+ </template>
96
+ <script>
97
+
98
+ import {mapActions} from 'vuex';
99
+
100
+ export default {
101
+ data(){
102
+ return {
103
+ statAll: {}
104
+ }
105
+ },
106
+ props: {
107
+ site_id: {
108
+ type: Number|String,
109
+ default: null
110
+ },
111
+ business_code: {
112
+ type: Number|String,
113
+ default: null
114
+ },
115
+ sub_business_code:{
116
+ type: Number|String,
117
+ default: null
118
+ },
119
+ },
120
+ watch: {
121
+ site_id(n,o) {
122
+ console.log(n,o,'askjdkasjdaksl');
123
+ this.p_totalCounts()
124
+ },
125
+ business_code(n,o) {
126
+ console.log(n,o,'askjdkasjdaksl');
127
+ this.p_totalCounts()
128
+ },
129
+ sub_business_code(n,o) {
130
+ console.log(n,o,'askjdkasjdaksl');
131
+ this.p_totalCounts()
132
+ }
133
+ },
134
+ created(){
135
+ console.log('sub_business_codeStat',this.sub_business_code)
136
+ this.p_totalCounts();
137
+ },
138
+ methods: {
139
+ ...mapActions("productStat", ["totalProductCounts"]),
140
+ toRefresh(){
141
+ this.p_totalCounts();
142
+ },
143
+ p_totalCounts(){
144
+ let loading = this.$loading({});
145
+ this.totalProductCounts({
146
+ filter_site_id: this.site_id?this.site_id:null,
147
+ filter_business_code: this.business_code?this.business_code:null,
148
+ filter_lv2_business_code: this.sub_business_code?this.sub_business_code:null
149
+ }).then(res => {
150
+ this.statAll = res.data;
151
+ loading.close();
152
+ }).catch(err => {
153
+ loading.close();
154
+ })
155
+ }
156
+ }
157
+ }
158
+ </script>
159
+
160
+ <style lang="less" scoped>
161
+
162
+ .stat_all_card{
163
+ /deep/ .el-card__body{
164
+ overflow: auto;
165
+ }
166
+ }
167
+ .card_header{
168
+ display: flex;
169
+ align-items: center;
170
+ justify-content: space-between;
171
+ & > i{
172
+ font-size: 24px;
173
+ cursor: pointer;
174
+ }
175
+ }
176
+ .b_tit{
177
+ font-size: 18px;
178
+ font-weight: 400;
179
+ color:#2E3033;
180
+ }
181
+ .s_tit{
182
+ font-size: 12px;
183
+ color: #A1A7B3;
184
+ margin-left: 10px;
185
+ vertical-align: bottom;
186
+ }
187
+ .stat_list{
188
+ display: flex;
189
+ justify-content: space-around;
190
+ min-width: 800px;
191
+ .stat_item{
192
+ margin-right: 30px;
193
+ ._title{
194
+ margin: 0;
195
+ font-size: 14px;
196
+ font-weight: 400;
197
+ color: #2E3033;
198
+ display: flex;
199
+ margin-bottom: 10px;
200
+
201
+ i{
202
+ cursor: pointer;
203
+ margin-left: 4px;
204
+ color: #A1A7B3;
205
+ }
206
+ }
207
+ ._cont{
208
+ display: flex;
209
+ align-items: center;
210
+ color: #1A66FF;
211
+ font-weight: 500;
212
+ }
213
+ ._left{
214
+ font-size: 32px;
215
+ font-weight: 500;
216
+ }
217
+ ._right{
218
+ display: flex;
219
+ flex-direction: column;
220
+ &.one_level{
221
+ .right_i{
222
+ background: none !important;
223
+ padding-bottom: 0 !important;
224
+ padding-top: 0 !important;
225
+ }
226
+ }
227
+
228
+ .right_i{
229
+ display: flex;
230
+ align-items: center;
231
+ height: 50px;
232
+ font-size: 18px;
233
+ padding-left: 30px;
234
+
235
+ &.right_top{
236
+ background: url("https://sandbox-img.jufubao.cn/uploads/20231031/2739c34c5d2d19d7d4aae2e26070817d.png") no-repeat;
237
+ background-position: left 60%;
238
+ background-size: 28px auto;
239
+ padding-bottom: 10px;
240
+ }
241
+ &.right_middle {
242
+ background: url("https://sandbox-img.jufubao.cn/uploads/20231031/2739c34c5d2d19d7d4aae2e26070817d.png") no-repeat;
243
+ background-position: left 60%;
244
+ background-size: 28px auto;
245
+ }
246
+ &.right_bottom{
247
+ background: url("https://sandbox-img.jufubao.cn/uploads/20231031/90c4c51e0621d876e6126d8696aa8966.png") no-repeat;
248
+ background-position: left 40%;
249
+ background-size: 28px auto;
250
+ padding-top: 10px;
251
+ }
252
+
253
+
254
+ .two_line{
255
+ margin-left: 30px;
256
+ & > div{
257
+ margin: 2px 0;
258
+ font-size: 12px;
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+ </style>