jufubao-admin-library 1.1.36 → 1.1.38
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.
- package/.env.settings.saas +230 -0
- package/library/viewModules/viewStat/schemas/supplier.stat.js +19 -1
- package/library/viewModules/viewStat/viewsStat/supplier/components/discount.vue +31 -0
- package/library/viewModules/viewStat/viewsStat/supplier/components/stat-all.vue +15 -0
- package/library/viewModules/viewStat/viewsStat/supplier/components/table-category.vue +4 -0
- package/library/viewModules/viewStat/viewsStat/supplier/components/table-product.vue +41 -2
- package/library/viewModules/viewStat/viewsStat/supplier/components/table-store.vue +442 -0
- package/library/viewModules/viewStat/viewsStat/supplier/components/table-supplier.vue +4 -0
- package/library/viewModules/viewStat/viewsStat/supplier/index.vue +10 -2
- package/package.json +4 -2
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const settings = {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description 阿里云前端监控配置
|
|
7
|
+
*/
|
|
8
|
+
aliPid: 'aa2vphu6tr@f7f6bac23dcef56',
|
|
9
|
+
aliEnvironment: 'daily', //daily测试环境 //prod线上环境
|
|
10
|
+
aliSample: 1, //1表示100%采样,10表示10%采样,100表示1%采样
|
|
11
|
+
aliPvSample: 1, //1表示100%采样,10表示10%采样,100表示1%采样
|
|
12
|
+
aliDisableHook: true, //是否禁用api上报 true=禁用 false=开启
|
|
13
|
+
aliBehavior: true, //是否为了便于排查错误而记录报错的用户行为。
|
|
14
|
+
aliEnableSPA: false, //是否启动单页面上报pv日志
|
|
15
|
+
aliEnableConsole: false, //是否劫持Console
|
|
16
|
+
aliSendResource: true, //静态资源错误上报
|
|
17
|
+
aliAutoSendPerf: true, //性能和api分析日志
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @description routerMode值 hash,history
|
|
22
|
+
*/
|
|
23
|
+
routerMode: 'history',
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @description 项目名称
|
|
28
|
+
*/
|
|
29
|
+
title: '工会福利系统(测试)',
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @description 无返回结构体{code: 200, data: {}, message:'success'},返回格式:{}
|
|
34
|
+
*/
|
|
35
|
+
isOpenNoResultKey: true,
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @description 项目标识
|
|
40
|
+
*/
|
|
41
|
+
system: 'saas-admin',
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @description 图片cdn域名地址
|
|
46
|
+
*/
|
|
47
|
+
cdnBaseUrl: '//sandbox-img.jufubao.cn',
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @type {Array}
|
|
51
|
+
* @description API白名单(不需要token,上报日志)
|
|
52
|
+
*/
|
|
53
|
+
apiWhiteList: [
|
|
54
|
+
'/api/pb/host/get-brand',
|
|
55
|
+
'/api/pb/host/minfo',
|
|
56
|
+
'/api/pb/host/malert',
|
|
57
|
+
],
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @type {Number}
|
|
61
|
+
* @description 接口返回时间超时上报日志(单位:毫秒)
|
|
62
|
+
*/
|
|
63
|
+
apiDelay: 10000,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @description 百度AK
|
|
68
|
+
*/
|
|
69
|
+
baiduAK: 'btKt57MWjMx2P1ds2OjZIttLOOjR2Ndf',
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @type Function
|
|
73
|
+
* @description 页面layout页面路径
|
|
74
|
+
*/
|
|
75
|
+
layout: () => import('@/layout'),
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @type {boolean}
|
|
80
|
+
* @description 是否启用本地演示路由配置
|
|
81
|
+
*/
|
|
82
|
+
isOpenLocalDemoRouter: false,
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @type { Array }
|
|
86
|
+
* @description 不验证登录状态
|
|
87
|
+
*/
|
|
88
|
+
whiteList:[
|
|
89
|
+
'/login'
|
|
90
|
+
],
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @description 用户登录页面
|
|
94
|
+
* @type {String}
|
|
95
|
+
*/
|
|
96
|
+
login: '/login',
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @type {String}
|
|
100
|
+
* @description 入口页面
|
|
101
|
+
*/
|
|
102
|
+
index: '/',
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @type {String}
|
|
106
|
+
* @description 跳转到登录地址
|
|
107
|
+
*/
|
|
108
|
+
superAdminLogin: '/login',
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @type {String}
|
|
112
|
+
* @description 后台请求base域名
|
|
113
|
+
*/
|
|
114
|
+
apiBaseUrl: '//sandbox-fuli-admin.jufubao.cn',
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @type {String}
|
|
118
|
+
* @description 后台管理API地址
|
|
119
|
+
*/
|
|
120
|
+
getBrandHostBaseUrl: 'http://sandbox-c.jufubao.cn',
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @type {string}
|
|
124
|
+
* @description 开发环境api baseurl地址 (开发环境生效)
|
|
125
|
+
*/
|
|
126
|
+
//getBrandHost: 'sandbox-gonghui-admin.jufubao.cn',
|
|
127
|
+
getBrandHost: 'sandbox-c.jufubao.cn',
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @type {String} 聚福宝储存token名字
|
|
132
|
+
* @description cookie token key
|
|
133
|
+
*/
|
|
134
|
+
jufubaoTokenKey: 'jufubao-company-token',
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @type {String} 当前后台系统tokenKey
|
|
139
|
+
* @description cookie token key
|
|
140
|
+
*/
|
|
141
|
+
currentToken: 'jufubao-company-token',
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @type {string}
|
|
146
|
+
* @description 系统版本
|
|
147
|
+
*/
|
|
148
|
+
version: 'v1.0.0',
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @type {boolean}
|
|
152
|
+
* @description 是否关闭eslint语法检测
|
|
153
|
+
*/
|
|
154
|
+
isCloseEslint: false,
|
|
155
|
+
|
|
156
|
+
/***
|
|
157
|
+
* @description 请求列表返回数据条数
|
|
158
|
+
* @type { number }
|
|
159
|
+
*/
|
|
160
|
+
limit: 10,
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @type {boolean} true | false
|
|
165
|
+
* @description 是否开启方法执行逻辑定位位置显示
|
|
166
|
+
*/
|
|
167
|
+
isTimeLog: false,
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @type {boolean} true | false
|
|
172
|
+
* @description 开发环境与生产环境
|
|
173
|
+
*/
|
|
174
|
+
isDebug: false,
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @type {boolean} true | false
|
|
178
|
+
* @description 是否加载模拟数据
|
|
179
|
+
*/
|
|
180
|
+
isTestData: false,
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @type {number}
|
|
184
|
+
* @description 开发环境端口号
|
|
185
|
+
*/
|
|
186
|
+
port: 8099,
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @type {boolean} true | false
|
|
190
|
+
* @description Whether show the settings right-panel
|
|
191
|
+
*/
|
|
192
|
+
showSettings: false,
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @type {boolean} true | false
|
|
196
|
+
* @description Whether need tagsView
|
|
197
|
+
*/
|
|
198
|
+
tagsView: true,
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @type {boolean} true | false
|
|
202
|
+
* @description Whether fix the header
|
|
203
|
+
*/
|
|
204
|
+
fixedHeader: false,
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @type {boolean} true | false
|
|
208
|
+
* @description Whether show the logo in sidebar
|
|
209
|
+
*/
|
|
210
|
+
sidebarLogo: true,
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @type {boolean} true | false
|
|
214
|
+
* @description 启动营销中心导航
|
|
215
|
+
*/
|
|
216
|
+
showTopNavMenu: false,
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @type {string | array} 'production' | ['production', 'development']
|
|
220
|
+
* @description Need show err logs component.
|
|
221
|
+
* The default is only used in the production env
|
|
222
|
+
* If you want to also use it in dev, you can pass ['production', 'development']
|
|
223
|
+
*/
|
|
224
|
+
errorLog: 'production',
|
|
225
|
+
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
module.exports = settings;
|
|
229
|
+
|
|
230
|
+
|
|
@@ -74,6 +74,24 @@ module.exports = {
|
|
|
74
74
|
params: {},
|
|
75
75
|
disabled: true,
|
|
76
76
|
role: "STAT-PARTNER.SUPPLIER_STAT_PRODUCT_DISCOUNTS"
|
|
77
|
-
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: "统计-交易统计-线下门店统计",
|
|
80
|
+
mapFn: "offlineShopSalesSupplier",
|
|
81
|
+
path: '/stat-partner/v1/supplier-stat/offline-shop-cyc-sales',
|
|
82
|
+
isRule: false,
|
|
83
|
+
params: {
|
|
84
|
+
filter_site_id: ['filter_site_id', 'String', '非必填'],
|
|
85
|
+
filter_business_code: ['filter_business_code', 'String', '非必填'],
|
|
86
|
+
time_range_start: ['time_range_start', 'String', '非必填'],
|
|
87
|
+
time_range_end: ['time_range_end', 'String', '非必填'],
|
|
88
|
+
supplier_id: ['supplier_id', 'String', '非必填'],
|
|
89
|
+
shop_id: ['shop_id', 'String', '非必填'],
|
|
90
|
+
brand_id: ['brand_id', 'String', '非必填'],
|
|
91
|
+
settle_source: ['settle_source', 'String', '非必填'],
|
|
92
|
+
},
|
|
93
|
+
disabled: true,
|
|
94
|
+
role: "STAT-PARTNER.TRADE_STAT_OFFLINE_SHOP_SALES"
|
|
95
|
+
},
|
|
78
96
|
]
|
|
79
97
|
}
|
|
@@ -13,6 +13,24 @@
|
|
|
13
13
|
</el-tooltip>
|
|
14
14
|
</div>
|
|
15
15
|
<div>
|
|
16
|
+
<div>
|
|
17
|
+
<span style="margin-right: 10px">折扣类型</span>
|
|
18
|
+
<el-select
|
|
19
|
+
v-model="discount_type"
|
|
20
|
+
filterable
|
|
21
|
+
clearable
|
|
22
|
+
placeholder="请选择折扣类型"
|
|
23
|
+
style="margin-right: 10px"
|
|
24
|
+
>
|
|
25
|
+
<el-option
|
|
26
|
+
v-for="item in discountTypeList"
|
|
27
|
+
:key="item.value"
|
|
28
|
+
:label="item.label"
|
|
29
|
+
:value="item.value"
|
|
30
|
+
>
|
|
31
|
+
</el-option>
|
|
32
|
+
</el-select>
|
|
33
|
+
</div>
|
|
16
34
|
<div>
|
|
17
35
|
<span style="margin-right: 10px">供应商</span>
|
|
18
36
|
<el-select
|
|
@@ -129,6 +147,17 @@ export default {
|
|
|
129
147
|
supplier_text: "",
|
|
130
148
|
channel_code_text: "",
|
|
131
149
|
showSupplier: "N",
|
|
150
|
+
discountTypeList:[
|
|
151
|
+
{
|
|
152
|
+
label:'市场价',
|
|
153
|
+
value:'market'
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
label:'建议售价',
|
|
157
|
+
value:'sale'
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
discount_type:'',
|
|
132
161
|
};
|
|
133
162
|
},
|
|
134
163
|
watch: {
|
|
@@ -174,6 +203,7 @@ export default {
|
|
|
174
203
|
supplier_ids: this.supplier_ids,
|
|
175
204
|
channel_code_text: this.channel_code_text,
|
|
176
205
|
supplier_text: this.supplier_text,
|
|
206
|
+
discount_type:this.discount_type
|
|
177
207
|
}).then((res) => {
|
|
178
208
|
// 获取行标题列表
|
|
179
209
|
this.keyList = res.data.col_title_list;
|
|
@@ -209,6 +239,7 @@ export default {
|
|
|
209
239
|
file_name: value,
|
|
210
240
|
channel_code_text: this.channel_code_text,
|
|
211
241
|
supplier_text: this.supplier_text,
|
|
242
|
+
discount_type:this.discount_type
|
|
212
243
|
};
|
|
213
244
|
let loading = this.$loading({});
|
|
214
245
|
this.getProductDiscount(params)
|
|
@@ -24,6 +24,21 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
|
+
<div class="stat_item">
|
|
28
|
+
<p class="_title">
|
|
29
|
+
门店总数
|
|
30
|
+
<el-tooltip effect="light" content="总共门店数量" placement="right">
|
|
31
|
+
<i class="xdicon_question-circle xd_admin_iconfont"></i>
|
|
32
|
+
</el-tooltip>
|
|
33
|
+
</p>
|
|
34
|
+
<div class="_cont">
|
|
35
|
+
<div class="_left">{{statAll.shop_total_count}}</div>
|
|
36
|
+
<div class="_right one_level">
|
|
37
|
+
<div class="right_i right_top">已关联{{statAll.resource_count}}</div>
|
|
38
|
+
<div class="right_i right_bottom">线下核销{{ statAll.offline_settle_count }}</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
27
42
|
<div class="stat_item">
|
|
28
43
|
<p class="_title">
|
|
29
44
|
商品总数
|
|
@@ -211,6 +211,10 @@ export default {
|
|
|
211
211
|
* @param form 搜索请求参数
|
|
212
212
|
*/
|
|
213
213
|
handleSearch({ action, form }) {
|
|
214
|
+
if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
|
|
215
|
+
this.$message.error('请选择交易时间')
|
|
216
|
+
return
|
|
217
|
+
}
|
|
214
218
|
if (action == "reset") {
|
|
215
219
|
this.searchOtherForm = {}
|
|
216
220
|
}
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
:list="searchForm"
|
|
9
9
|
@onSearch="handleSearch"
|
|
10
10
|
@onDone="getList"
|
|
11
|
-
|
|
11
|
+
>
|
|
12
|
+
<template slot="common_category">
|
|
13
|
+
<el-cascader v-model="searchOtherForm.common_category" :props="categoryProps" clearable></el-cascader>
|
|
14
|
+
</template>
|
|
15
|
+
</xd-search>
|
|
12
16
|
</el-card>
|
|
13
17
|
<el-card class="app-container__list">
|
|
14
18
|
<div class="app-container__list-pagination">
|
|
@@ -78,6 +82,7 @@ export default {
|
|
|
78
82
|
{ "type": "normal", "prop": "product_id", "align": "left", "width": 80, "label": "商品ID" },
|
|
79
83
|
{ "type": "normal", "prop": "product_name", "align": "center", "minWidth": 200, "label": "商品名称" },
|
|
80
84
|
{ "type": "normal", "prop": "product_type", "align": "center", "width": 80, "label": "商品类型" },
|
|
85
|
+
{ "type": "normal", "prop": "common_category", "align": "center", "width": 80, "label": "公共分类" },
|
|
81
86
|
{ "type": "normal", "prop": "supplier_name", "align": "center", "width": 100, "label": "所属供应商" },
|
|
82
87
|
{ "type": "normal", "prop": "total_product_num", "align": "center", "width": 100, "label": "总销量", "sort": "custom" },
|
|
83
88
|
{ "type": "price", "prop": "total_sale_amount", "align": "center", "width": 160, "label": "建议售价金额", "unit": "元", "sort": "custom" },
|
|
@@ -87,7 +92,26 @@ export default {
|
|
|
87
92
|
{ "type": "price", "prop": "total_real_sale_amount", "align": "center", "width": 160, "label": "实际建议售价金额", "unit": "元", "sort": "custom" },
|
|
88
93
|
{ "type": "normal", "prop": "total_aftersale_product_num", "align": "center", "minWidth": 120, "label": "售后次数", "sort": "custom" },
|
|
89
94
|
{ "type": "price", "prop": "total_aftersale_amount", "align": "center", "width": 160, "label": "售后建议售价金额", "unit": "元", "sort": "custom" },
|
|
90
|
-
]
|
|
95
|
+
],
|
|
96
|
+
searchOtherForm:{
|
|
97
|
+
common_category:''
|
|
98
|
+
},
|
|
99
|
+
categoryProps: {
|
|
100
|
+
checkStrictly: true,
|
|
101
|
+
lazy: true,
|
|
102
|
+
lazyLoad (node, resolve) {
|
|
103
|
+
getOptions({
|
|
104
|
+
server: "product-partner",
|
|
105
|
+
fn: "categories",
|
|
106
|
+
path: "p4",
|
|
107
|
+
params: {
|
|
108
|
+
value: node.level == 0 ? 0 : node.value,
|
|
109
|
+
},
|
|
110
|
+
}).then((res) => {
|
|
111
|
+
resolve(res["data"]["list"])
|
|
112
|
+
})
|
|
113
|
+
},
|
|
114
|
+
},
|
|
91
115
|
}
|
|
92
116
|
},
|
|
93
117
|
created() {
|
|
@@ -106,6 +130,9 @@ export default {
|
|
|
106
130
|
if(like_product_id && like_product_id.length > 0){
|
|
107
131
|
other.like_product_id = like_product_id[0].value;
|
|
108
132
|
}
|
|
133
|
+
if (this.searchOtherForm.common_category && this.searchOtherForm.common_category.length) {
|
|
134
|
+
other.common_category = this.searchOtherForm.common_category[this.searchOtherForm.common_category.length - 1]
|
|
135
|
+
}
|
|
109
136
|
return other;
|
|
110
137
|
},
|
|
111
138
|
doExport(){
|
|
@@ -178,6 +205,13 @@ export default {
|
|
|
178
205
|
* @param form 搜索请求参数
|
|
179
206
|
*/
|
|
180
207
|
handleSearch({ action, form }) {
|
|
208
|
+
if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
|
|
209
|
+
this.$message.error('请选择交易时间')
|
|
210
|
+
return
|
|
211
|
+
}
|
|
212
|
+
if(action==='reset'){
|
|
213
|
+
this.searchOtherForm.common_category = '';
|
|
214
|
+
}
|
|
181
215
|
this.page_token = 1;
|
|
182
216
|
this.getList();
|
|
183
217
|
},
|
|
@@ -283,6 +317,11 @@ export default {
|
|
|
283
317
|
})
|
|
284
318
|
}
|
|
285
319
|
},
|
|
320
|
+
{
|
|
321
|
+
label: "公共分类: ",
|
|
322
|
+
ele: "slot",
|
|
323
|
+
slot: "common_category",
|
|
324
|
+
},
|
|
286
325
|
];
|
|
287
326
|
},
|
|
288
327
|
/**
|
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<el-card class="app-container__search">
|
|
4
|
+
<xd-search
|
|
5
|
+
dateFilter
|
|
6
|
+
v-if="searchForm.length > 0"
|
|
7
|
+
v-model="searchParams"
|
|
8
|
+
:list="searchForm"
|
|
9
|
+
@onSearch="handleSearch"
|
|
10
|
+
@onDone="getList"
|
|
11
|
+
>
|
|
12
|
+
<template slot="supplier">
|
|
13
|
+
<div>
|
|
14
|
+
<el-select
|
|
15
|
+
v-model="channel_code"
|
|
16
|
+
filterable
|
|
17
|
+
clearable
|
|
18
|
+
placeholder="请选择供应商类别"
|
|
19
|
+
style="margin-right: 10px"
|
|
20
|
+
>
|
|
21
|
+
<el-option
|
|
22
|
+
v-for="item in channelList"
|
|
23
|
+
:key="item.value"
|
|
24
|
+
:label="item.label"
|
|
25
|
+
:value="item.value"
|
|
26
|
+
>
|
|
27
|
+
</el-option>
|
|
28
|
+
</el-select>
|
|
29
|
+
<el-select
|
|
30
|
+
clearable
|
|
31
|
+
v-if="channel_code && showSupplier === 'Y'"
|
|
32
|
+
v-model="supplier_ids"
|
|
33
|
+
filterable
|
|
34
|
+
remote
|
|
35
|
+
reserve-keyword
|
|
36
|
+
placeholder="请输入供应商"
|
|
37
|
+
:remote-method="remoteMethod"
|
|
38
|
+
>
|
|
39
|
+
<el-option
|
|
40
|
+
v-for="item in supplierList"
|
|
41
|
+
:key="item.value"
|
|
42
|
+
:label="item.label"
|
|
43
|
+
:value="item.value"
|
|
44
|
+
>
|
|
45
|
+
</el-option>
|
|
46
|
+
</el-select>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
</xd-search>
|
|
50
|
+
</el-card>
|
|
51
|
+
<el-card class="app-container__list">
|
|
52
|
+
<div class="app-container__list-pagination">
|
|
53
|
+
<div></div>
|
|
54
|
+
<div class="table-stat">
|
|
55
|
+
<p>共计核销订单<span>{{ totalData.total_order_count }}</span>个,
|
|
56
|
+
核销金额<span>{{totalData.total_settle_amount}}</span>,
|
|
57
|
+
货源结算金额<span>{{totalData.total_purchase_discount_amount}}</span></p>
|
|
58
|
+
<el-button type="primary" @click="doExport">条件导出</el-button>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="app-container__list-table">
|
|
62
|
+
<xd-table
|
|
63
|
+
:headers="headers"
|
|
64
|
+
:list="tables"
|
|
65
|
+
is-border
|
|
66
|
+
@onSortChange="handleSortChange"
|
|
67
|
+
></xd-table>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="app-container__list-pagination">
|
|
70
|
+
<xd-pagination
|
|
71
|
+
:page="page_token"
|
|
72
|
+
:total="total"
|
|
73
|
+
:limit.sync="page_size"
|
|
74
|
+
:autoScroll="false"
|
|
75
|
+
@onPagination="handlePagination"
|
|
76
|
+
></xd-pagination>
|
|
77
|
+
</div>
|
|
78
|
+
</el-card>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<script>
|
|
84
|
+
import XdSearch from "@/components/XdSearch";
|
|
85
|
+
import XdPagination from "@/components/XdPagination.vue";
|
|
86
|
+
import XdTable from "@/components/XdTable";
|
|
87
|
+
import { baseJsDateToTime } from "@/utils/xd.base";
|
|
88
|
+
import { mapActions } from "vuex"
|
|
89
|
+
import { getOptions } from "@/utils/options"
|
|
90
|
+
|
|
91
|
+
export default {
|
|
92
|
+
name: "ComponentTableSupplier",
|
|
93
|
+
components: {
|
|
94
|
+
XdPagination, //翻译插件
|
|
95
|
+
XdSearch, //搜查插件
|
|
96
|
+
XdTable
|
|
97
|
+
},
|
|
98
|
+
data() {
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
//分页参数
|
|
102
|
+
page_token: 1, //当前页面数量
|
|
103
|
+
hasNextPage: true, //是否有下一页
|
|
104
|
+
page_size: 20, //搜索参数
|
|
105
|
+
searchForm: [], //搜索区域模块表单
|
|
106
|
+
searchParams: null, //搜索参数
|
|
107
|
+
searchOtherForm: {},
|
|
108
|
+
totalData: {},
|
|
109
|
+
total: 0,
|
|
110
|
+
categoryList: [],
|
|
111
|
+
sort_by: "", //排序字段
|
|
112
|
+
sort_direct: "", //排序方向 asc递增 desc递减
|
|
113
|
+
|
|
114
|
+
//列表对象
|
|
115
|
+
tables: [],
|
|
116
|
+
headers: [
|
|
117
|
+
//{ "type": "normal", "prop": "suppler_name", "align": "left", "width": 100, "label": "供应商名称" },
|
|
118
|
+
{ "type": "normal", "prop": "shop_id", "align": "center", "minWidth": 200, "label": "门店ID" },
|
|
119
|
+
{ "type": "normal", "prop": "shop_name", "align": "center", "minWidth": 200, "label": "门店名称" },
|
|
120
|
+
//{ "type": "normal", "prop": "brand_name", "align": "center", "minWidth": 200, "label": "品牌名称" },
|
|
121
|
+
{ "type": "normal", "prop": "settle_source", "align": "center", "minWidth": 200, "label": "核销来源" },
|
|
122
|
+
{ "type": "normal", "prop": "total_order_count", "align": "center", "width": 110, "label": "总订单数", "sort": "custom" },
|
|
123
|
+
{ "type": "normal", "prop": "total_settle_amount", "align": "center", "width": 160, "label": "核销金额", "unit": "元", "sort": "custom"},
|
|
124
|
+
{ "type": "normal", "prop": "total_purchase_discount_amount", "align": "center", "width": 160, "label": "货源结算折扣金额", "unit": "元", "sort": "custom"},
|
|
125
|
+
{ "type": "normal", "prop": "total_real_order_count", "align": "center", "minWidth": 120, "label": "实际订单数", "sort": "custom" },
|
|
126
|
+
{ "type": "normal", "prop": "total_real_amount", "align": "center", "width": 160, "label": "实际核销金额", "unit": "元", "sort": "custom"},
|
|
127
|
+
{ "type": "normal", "prop": "total_aftersale_order_count", "align": "center", "minWidth": 120, "label": "售后订单数", "sort": "custom" },
|
|
128
|
+
{ "type": "normal", "prop": "total_aftersale_refund_amount", "align": "center", "width": 160, "label": "售后退款金额", "unit": "元", "sort": "custom"},
|
|
129
|
+
],
|
|
130
|
+
categoryProps: {
|
|
131
|
+
checkStrictly: true,
|
|
132
|
+
lazy: true,
|
|
133
|
+
lazyLoad (node, resolve) {
|
|
134
|
+
getOptions({
|
|
135
|
+
server: 'product-partner',
|
|
136
|
+
fn: "categories",
|
|
137
|
+
path: "p4",
|
|
138
|
+
params: {
|
|
139
|
+
value: node.level == 0 ? 0 : node.value,
|
|
140
|
+
},
|
|
141
|
+
}).then((res) => {
|
|
142
|
+
resolve(res["data"]["list"])
|
|
143
|
+
})
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
channel_code: null,
|
|
147
|
+
supplier_ids: null,
|
|
148
|
+
supplierList: [],
|
|
149
|
+
supplier_text: "",
|
|
150
|
+
channel_code_text: "",
|
|
151
|
+
showSupplier: "N",
|
|
152
|
+
sourceList:[],
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
watch:{
|
|
156
|
+
channel_code(n, o) {
|
|
157
|
+
this.channel_code_text = "";
|
|
158
|
+
this.supplier_text = "";
|
|
159
|
+
this.supplier_ids = null;
|
|
160
|
+
if (n && n !== o) {
|
|
161
|
+
this.channel_code_text = this.channelList.find(
|
|
162
|
+
(item) => item.value === n
|
|
163
|
+
).label;
|
|
164
|
+
this.showSupplier = this.channelList.find(
|
|
165
|
+
(item) => item.value === n
|
|
166
|
+
).has_supplier;
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
supplier_ids(n, o) {
|
|
170
|
+
this.supplier_text = "";
|
|
171
|
+
if (n && n !== o) {
|
|
172
|
+
this.supplier_text = this.supplierList.find(
|
|
173
|
+
(item) => item.value === n
|
|
174
|
+
).label;
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
created() {
|
|
179
|
+
getOptions([{
|
|
180
|
+
server: "supplier-partner",
|
|
181
|
+
fn: "partner-channel",
|
|
182
|
+
path: "p1",
|
|
183
|
+
},{
|
|
184
|
+
server: "stat-partner",
|
|
185
|
+
fn: "trade-stat-offline-settle-source",
|
|
186
|
+
path: "p1",
|
|
187
|
+
}]).then((res) => {
|
|
188
|
+
console.log(res,'ddd')
|
|
189
|
+
this.channelList = res[0].data.list;
|
|
190
|
+
this.sourceList = res[1].data.list;
|
|
191
|
+
this.initSearchForm();
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
methods: {
|
|
195
|
+
...mapActions("supplierStat", ["offlineShopSalesSupplier"]),
|
|
196
|
+
//相除
|
|
197
|
+
divide(price) {
|
|
198
|
+
return this.$xdHelper.divisionFloatNumber(price, 100);
|
|
199
|
+
},
|
|
200
|
+
doExport(){
|
|
201
|
+
this.$prompt('请输入导出文件名称', '提示', {
|
|
202
|
+
confirmButtonText: '确定',
|
|
203
|
+
cancelButtonText: '取消',
|
|
204
|
+
inputPattern: /[\S]+/,
|
|
205
|
+
inputErrorMessage: '请填写正确的名称'
|
|
206
|
+
}).then(({ value }) => {
|
|
207
|
+
let { brand_id,shop_id, ...other } = this.searchParams;
|
|
208
|
+
|
|
209
|
+
if(brand_id && brand_id.length > 0){
|
|
210
|
+
other.brand_id = brand_id[0].value;
|
|
211
|
+
}
|
|
212
|
+
if(shop_id && shop_id.length > 0){
|
|
213
|
+
other.shop_id = shop_id[0].value;
|
|
214
|
+
}
|
|
215
|
+
let params = {
|
|
216
|
+
...other,
|
|
217
|
+
supplier_id:this.supplier_ids,
|
|
218
|
+
channel_code: this.channel_code,
|
|
219
|
+
export: true,
|
|
220
|
+
file_ext: "xlsx",
|
|
221
|
+
file_name: value,
|
|
222
|
+
};
|
|
223
|
+
let loading = this.$loading({});
|
|
224
|
+
this.offlineShopSalesSupplier(params).then(res => {
|
|
225
|
+
loading.close();
|
|
226
|
+
this.$alert('导出任务已经开始执行,请去任务管理查看下载状态', '提示', {
|
|
227
|
+
confirmButtonText: '确定',
|
|
228
|
+
});
|
|
229
|
+
}).catch(err => {
|
|
230
|
+
this.$message.error(err.msg);
|
|
231
|
+
loading.close();
|
|
232
|
+
})
|
|
233
|
+
})
|
|
234
|
+
},
|
|
235
|
+
/**
|
|
236
|
+
* @description 获取数据列表
|
|
237
|
+
*/
|
|
238
|
+
getList() {
|
|
239
|
+
let { brand_id,shop_id, ...other } = this.searchParams;
|
|
240
|
+
if(brand_id && brand_id.length > 0){
|
|
241
|
+
other.brand_id = brand_id[0].value;
|
|
242
|
+
}
|
|
243
|
+
if(shop_id && shop_id.length > 0){
|
|
244
|
+
other.shop_id = shop_id[0].value;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
//请求数据
|
|
248
|
+
let params = {
|
|
249
|
+
...other,
|
|
250
|
+
supplier_id:this.supplier_ids,
|
|
251
|
+
channel_code: this.channel_code,
|
|
252
|
+
page_token: this.page_token,
|
|
253
|
+
page_size: this.page_size,
|
|
254
|
+
sort_by: this.sort_by,
|
|
255
|
+
sort_direct: this.sort_direct,
|
|
256
|
+
};
|
|
257
|
+
console.log(params)
|
|
258
|
+
let loading = this.$loading({});
|
|
259
|
+
this.offlineShopSalesSupplier(params).then(res => {
|
|
260
|
+
console.log(res,'aaaaaa')
|
|
261
|
+
loading.close();
|
|
262
|
+
this.tables = res.data.list;
|
|
263
|
+
this.totalData = res.data.total;
|
|
264
|
+
this.total = res.data.total_page_size;
|
|
265
|
+
}).catch(err => {
|
|
266
|
+
loading.close();
|
|
267
|
+
})
|
|
268
|
+
},
|
|
269
|
+
handleSortChange({ prop, order }) {
|
|
270
|
+
if(order === null){
|
|
271
|
+
this.sort_by = '';
|
|
272
|
+
this.sort_direct = '';
|
|
273
|
+
this.getList();
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
this.sort_by = prop;
|
|
277
|
+
this.sort_direct = order === 'ascending' ? 'asc' : 'desc';
|
|
278
|
+
this.getList();
|
|
279
|
+
},
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @description 点击搜索进行搜索操作
|
|
283
|
+
* @param action 动作
|
|
284
|
+
* @param form 搜索请求参数
|
|
285
|
+
*/
|
|
286
|
+
handleSearch({ action, form }) {
|
|
287
|
+
if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
|
|
288
|
+
this.$message.error('请选择交易时间')
|
|
289
|
+
return
|
|
290
|
+
}
|
|
291
|
+
if (action == "reset") {
|
|
292
|
+
this.supplier_ids = '';
|
|
293
|
+
this.sort_by = '';
|
|
294
|
+
this.sort_direct = '';
|
|
295
|
+
}
|
|
296
|
+
this.page_token = 1;
|
|
297
|
+
this.getList();
|
|
298
|
+
},
|
|
299
|
+
/**
|
|
300
|
+
* @description 初始化搜索模块
|
|
301
|
+
*/
|
|
302
|
+
initSearchForm() {
|
|
303
|
+
let yesterDay = new Date().getTime() - 24 * 60 * 60 * 1000;
|
|
304
|
+
yesterDay = baseJsDateToTime(yesterDay/1000);
|
|
305
|
+
yesterDay = yesterDay.split(' ')[0];
|
|
306
|
+
|
|
307
|
+
this.searchForm = [
|
|
308
|
+
{
|
|
309
|
+
label: '交易时间', //label
|
|
310
|
+
ele: 'xd-date', //package 名称
|
|
311
|
+
valueKey: ['time_range_start', 'time_range_end'], //form[valueKey]
|
|
312
|
+
value: [yesterDay,yesterDay], //v-model
|
|
313
|
+
format: 'yyyy/MM/dd', //时间显示格式
|
|
314
|
+
formatValue: 'yyyy-MM-dd', //输出时间格式
|
|
315
|
+
placeholder: ['开始时间', '结束时间'],
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
label: "供应商: ",
|
|
319
|
+
ele: "slot",
|
|
320
|
+
slot: "supplier",
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
label: "门店名称:", //label
|
|
324
|
+
ele: "xd-remote-select", //package 名称
|
|
325
|
+
valueKey: "shop_id", //form[valueKey]
|
|
326
|
+
value: [], //v-model
|
|
327
|
+
placeholder: "请选择门店名称",
|
|
328
|
+
multiple: false,
|
|
329
|
+
collapseTags: false,
|
|
330
|
+
className: "input40",
|
|
331
|
+
remoteSearch: (query, resolve) => {
|
|
332
|
+
getOptions({
|
|
333
|
+
server: "supplier-partner",
|
|
334
|
+
fn: "shop",
|
|
335
|
+
path: "p1",
|
|
336
|
+
params: {
|
|
337
|
+
keyword: query,
|
|
338
|
+
page_token: 1,
|
|
339
|
+
page_size: 500,
|
|
340
|
+
},
|
|
341
|
+
})
|
|
342
|
+
.then((res) => {
|
|
343
|
+
resolve(res.data.list);
|
|
344
|
+
})
|
|
345
|
+
.catch((err) => {
|
|
346
|
+
console.log(err, "err");
|
|
347
|
+
});
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
label: "核销来源:", //label
|
|
352
|
+
ele: "xd-select-list", //package 名称
|
|
353
|
+
valueKey: "settle_source", //form[valueKey]
|
|
354
|
+
value: "", //v-model
|
|
355
|
+
placeholder: "请选择状态",
|
|
356
|
+
multiple: false,
|
|
357
|
+
list: this.sourceList,
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
label: "品牌名称:", //label
|
|
361
|
+
ele: "xd-remote-select", //package 名称
|
|
362
|
+
valueKey: "brand_id", //form[valueKey]
|
|
363
|
+
value: [], //v-model
|
|
364
|
+
placeholder: "请选择品牌名称",
|
|
365
|
+
multiple: false,
|
|
366
|
+
collapseTags: false,
|
|
367
|
+
className: "input40",
|
|
368
|
+
remoteSearch: (query, resolve) => {
|
|
369
|
+
getOptions({
|
|
370
|
+
server: "supplier-partner",
|
|
371
|
+
fn: "brand",
|
|
372
|
+
path: "p1",
|
|
373
|
+
params: {
|
|
374
|
+
keyword: query,
|
|
375
|
+
page_token: 1,
|
|
376
|
+
page_size: 500,
|
|
377
|
+
},
|
|
378
|
+
})
|
|
379
|
+
.then((res) => {
|
|
380
|
+
resolve(res.data.list);
|
|
381
|
+
})
|
|
382
|
+
.catch((err) => {
|
|
383
|
+
console.log(err, "err");
|
|
384
|
+
});
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
];
|
|
388
|
+
},
|
|
389
|
+
/**
|
|
390
|
+
* @description 翻页处理方法
|
|
391
|
+
* @param page {Number} 访问页面页码数
|
|
392
|
+
*/
|
|
393
|
+
handlePagination(page) {
|
|
394
|
+
this.page_token = page;
|
|
395
|
+
this.getList();
|
|
396
|
+
}, //todo
|
|
397
|
+
remoteMethod(query) {
|
|
398
|
+
if (query !== "") {
|
|
399
|
+
getOptions({
|
|
400
|
+
server: "supplier-partner",
|
|
401
|
+
fn: "channel-supplier",
|
|
402
|
+
path: "p1",
|
|
403
|
+
params: {
|
|
404
|
+
channel_code: this.channel_code,
|
|
405
|
+
keyword: query,
|
|
406
|
+
},
|
|
407
|
+
})
|
|
408
|
+
.then((res) => {
|
|
409
|
+
this.supplierList = res.data.list;
|
|
410
|
+
})
|
|
411
|
+
.catch((err) => {
|
|
412
|
+
console.log(err, "err");
|
|
413
|
+
});
|
|
414
|
+
} else {
|
|
415
|
+
this.supplierList = [];
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
</script>
|
|
421
|
+
|
|
422
|
+
<style scoped lang="scss">
|
|
423
|
+
.app-container{
|
|
424
|
+
margin: 20px 0;
|
|
425
|
+
}
|
|
426
|
+
.table-stat{
|
|
427
|
+
display: flex;
|
|
428
|
+
justify-content: space-between;
|
|
429
|
+
align-items: center;
|
|
430
|
+
p{
|
|
431
|
+
font-size: 14px;
|
|
432
|
+
color: #2E3033;
|
|
433
|
+
span{
|
|
434
|
+
color: #FF6A00;
|
|
435
|
+
font-weight: 600;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
</style>
|
|
442
|
+
|
|
@@ -178,6 +178,10 @@ export default {
|
|
|
178
178
|
* @param form 搜索请求参数
|
|
179
179
|
*/
|
|
180
180
|
handleSearch({ action, form }) {
|
|
181
|
+
if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
|
|
182
|
+
this.$message.error('请选择交易时间')
|
|
183
|
+
return
|
|
184
|
+
}
|
|
181
185
|
this.page_token = 1;
|
|
182
186
|
this.getList();
|
|
183
187
|
},
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
<el-tab-pane v-if="has_tab_category" label="货源商品分类" name="category">
|
|
16
16
|
<table-category v-if="has_tab_category && activeName == 'category'"></table-category>
|
|
17
17
|
</el-tab-pane>
|
|
18
|
+
<el-tab-pane v-if="is_shop" label="线下门店" name="shop">
|
|
19
|
+
<table-store v-if="is_shop&&activeName == 'shop'"></table-store>
|
|
20
|
+
</el-tab-pane>
|
|
18
21
|
</el-tabs>
|
|
19
22
|
</el-card>
|
|
20
23
|
|
|
@@ -29,6 +32,7 @@
|
|
|
29
32
|
import tableSupplier from "./components/table-supplier.vue"
|
|
30
33
|
import tableProduct from "./components/table-product.vue"
|
|
31
34
|
import tableCategory from "./components/table-category.vue"
|
|
35
|
+
import tableStore from "./components/table-store.vue"
|
|
32
36
|
import discount from './components/discount.vue'
|
|
33
37
|
import checkPermission from "@/utils/permission"
|
|
34
38
|
import Role from "@/constant/modules/supplierStat"
|
|
@@ -42,7 +46,8 @@
|
|
|
42
46
|
tableSupplier,
|
|
43
47
|
tableProduct,
|
|
44
48
|
tableCategory,
|
|
45
|
-
discount
|
|
49
|
+
discount,
|
|
50
|
+
tableStore
|
|
46
51
|
},
|
|
47
52
|
data() {
|
|
48
53
|
return {
|
|
@@ -63,12 +68,15 @@
|
|
|
63
68
|
},
|
|
64
69
|
has_tab(){
|
|
65
70
|
return checkPermission([Role.supplierCycSales, Role.productCycSales, Role.productCategoryCycSales])
|
|
71
|
+
},
|
|
72
|
+
is_shop(){
|
|
73
|
+
return checkPermission([Role.offlineShopSalesSupplier])
|
|
66
74
|
}
|
|
67
75
|
},
|
|
68
76
|
|
|
69
77
|
created() {
|
|
70
78
|
if(this.has_tab){
|
|
71
|
-
this.activeName = this.has_tab_supplier ? "supplier" : this.has_tab_product ? "product" : "category"
|
|
79
|
+
this.activeName = this.has_tab_supplier ? "supplier" : this.has_tab_product ? "product" :this.has_tab_category? "category":'shop'
|
|
72
80
|
}
|
|
73
81
|
},
|
|
74
82
|
methods: {
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jufubao-admin-library",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.38",
|
|
4
4
|
"description": "聚福宝福利后台管理系统公共模块",
|
|
5
5
|
"author": "goashiyong <gaoshiyong1272@vip.163.com>",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"serve": "cross-env type=test cover=true service=serve npm run entry bus",
|
|
8
|
+
"serve.saas": "cross-env type=test cover=true service=serve npm run entry bus saas",
|
|
9
|
+
"serve.supplier": "cross-env type=test cover=true service=serve npm run entry bus supplier",
|
|
8
10
|
"serve.domain": "cross-env type=test cover=true service=serve domain=http://sandbox-editx.jufubao.cn npm run entry bus",
|
|
9
11
|
"dev": "cross-env type=dev cover=true service=build npm run entry bus",
|
|
10
12
|
"test": "cross-env type=test cover=true service=build npm run entry bus",
|
|
@@ -27,7 +29,7 @@
|
|
|
27
29
|
"element-ui": "2.13.2",
|
|
28
30
|
"gxd-file-preview": "1.2.1",
|
|
29
31
|
"gxd-helper": "2.0.21",
|
|
30
|
-
"gxd-vue-library": "1.1.
|
|
32
|
+
"gxd-vue-library": "1.1.96",
|
|
31
33
|
"js-base64": "^3.4.5",
|
|
32
34
|
"js-cookie": "2.2.0",
|
|
33
35
|
"md5": "^2.3.0",
|