jufubao-admin-library 1.0.0-beta1
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/LICENSE +21 -0
- package/README.md +90 -0
- package/library/gulpfile.js/const.js +51 -0
- package/library/gulpfile.js/index.js +237 -0
- package/library/gulpfile.js/util.js +114 -0
- package/library/viewModules/config.js +75 -0
- package/library/viewModules/viewStat/router/supplierStat.js +33 -0
- package/library/viewModules/viewStat/schemas/supplier.stat.js +70 -0
- package/library/viewModules/viewStat/schemas.js +18 -0
- package/library/viewModules/viewStat/viewsStat/index/components/stat-all.vue +233 -0
- package/library/viewModules/viewStat/viewsStat/index/components/stat-product.vue +129 -0
- package/library/viewModules/viewStat/viewsStat/index/components/stat-supplier.vue +124 -0
- package/library/viewModules/viewStat/viewsStat/index/components/table-category.vue +309 -0
- package/library/viewModules/viewStat/viewsStat/index/components/table-product.vue +316 -0
- package/library/viewModules/viewStat/viewsStat/index/components/table-supplier.vue +276 -0
- package/library/viewModules/viewStat/viewsStat/index/index.vue +117 -0
- package/library/viewModules/viewTask/router/tasks.js +34 -0
- package/library/viewModules/viewTask/schemas/tasks.js +52 -0
- package/library/viewModules/viewTask/viewTask/list.vue +195 -0
- package/library/viewModules/viewsEnterpriseBuy/router/enterprise_buy.js +91 -0
- package/library/viewModules/viewsEnterpriseBuy/schemas/enterprise_buy.js +420 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/OrderInfoButton.vue +550 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/cardList.vue +119 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/expressCopy.vue +259 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/operateHistory.vue +164 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/send_list.vue +395 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/storeList.vue +100 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/workHistory.vue +163 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/detail.vue +503 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/list.vue +635 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/order_detail.vue +860 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/set_create.vue +219 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/set_list.vue +237 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/table-card.vue +180 -0
- package/library/viewModules/viewsFinance/router/balance.js +75 -0
- package/library/viewModules/viewsFinance/router/finance.js +30 -0
- package/library/viewModules/viewsFinance/schemas/trade.record.js +153 -0
- package/library/viewModules/viewsFinance/schemas/wallet.js +116 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/components/listChannel.vue +220 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/components/listOpenapi.vue +260 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/components/listPartner.vue +217 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/components/listSupplier.vue +229 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/detail_channel.vue +401 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/detail_openapi.vue +364 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/detail_partner.vue +633 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/detail_supplier.vue +417 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/list.vue +75 -0
- package/library/viewModules/viewsFinance/viewsFinance/index.vue +191 -0
- package/library/viewModules/viewsLimit/router/buyLimit/buyLimit.js +31 -0
- package/library/viewModules/viewsLimit/schemas/buyLimit.js +22 -0
- package/library/viewModules/viewsLimit/viewsLimit/index.vue +211 -0
- package/package.json +114 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Layout from '@/layout'
|
|
2
|
+
import wallet from "@/constant/modules/wallet.js"
|
|
3
|
+
|
|
4
|
+
const financeRouter = {
|
|
5
|
+
path: '/finance',
|
|
6
|
+
component: Layout,
|
|
7
|
+
sort: 105,
|
|
8
|
+
name: '我的账号',
|
|
9
|
+
redirect: '/finance/index',
|
|
10
|
+
meta: {
|
|
11
|
+
title: '我的账号',
|
|
12
|
+
icon: 'xdicon_huijikemuguanli',
|
|
13
|
+
iconSize: 20,
|
|
14
|
+
roles: [wallet.listHomeWallet]
|
|
15
|
+
},
|
|
16
|
+
children: [
|
|
17
|
+
{
|
|
18
|
+
path: 'index',
|
|
19
|
+
name: 'PageFinanceIndex',
|
|
20
|
+
component: () => import('@/viewsFinance/index'),
|
|
21
|
+
meta: {
|
|
22
|
+
title: '我的账号',
|
|
23
|
+
icon: 'xdicon_huijikemuguanli',
|
|
24
|
+
roles: [wallet.listHomeWallet]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default financeRouter
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
name: "tradeRecord",
|
|
4
|
+
title: "对账中心",
|
|
5
|
+
vuex: true,
|
|
6
|
+
model: [
|
|
7
|
+
{
|
|
8
|
+
title: "加盟商账户明细统计",
|
|
9
|
+
mapFn: "countPartner",
|
|
10
|
+
path: "/finance-partner/v1/trade-record/count-partner",
|
|
11
|
+
isRule: false,
|
|
12
|
+
params: {
|
|
13
|
+
partner_id: ["加盟商ID", "string", "必填"],
|
|
14
|
+
wallet_type: ["账户类型", "string", "必填"],
|
|
15
|
+
operate_type: ["资金方向", "A:应付; R:应收", "必填"],
|
|
16
|
+
trade_type: ["交易类型", "string", "必填"],
|
|
17
|
+
main_order_id: ["主订单ID", "string", "非必填"],
|
|
18
|
+
business_code: ["业务编码", "string", "非必填"],
|
|
19
|
+
supplier_name: ["供应商名称", "string", "非必填"],
|
|
20
|
+
start_time: ["开始时间", "string", "非必填"],
|
|
21
|
+
end_time: ["结束时间", "string", "非必填"],
|
|
22
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
23
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
24
|
+
},
|
|
25
|
+
disabled: true,
|
|
26
|
+
"role": "FINANCE-PARTNER.TRADE_RECORD_COUNT_PARTNER"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: "供货商(渠道)账户明细统计",
|
|
30
|
+
mapFn: "countSupplier",
|
|
31
|
+
path: "/finance-partner/v1/trade-record/count-supplier",
|
|
32
|
+
isRule: false,
|
|
33
|
+
params: {
|
|
34
|
+
supplier_id: ["供货商ID", "string", "必填"],
|
|
35
|
+
wallet_type: ["账户类型", "string", "必填"],
|
|
36
|
+
channel_code: ["渠道编码", "string", "必填"],
|
|
37
|
+
operate_type: ["资金方向", "A:应付; R:应收", "必填"],
|
|
38
|
+
trade_type: ["交易类型", "string", "必填"],
|
|
39
|
+
main_order_id: ["主订单ID", "string", "非必填"],
|
|
40
|
+
business_code: ["业务编码", "string", "非必填"],
|
|
41
|
+
start_time: ["开始时间", "string", "非必填"],
|
|
42
|
+
end_time: ["结束时间", "string", "非必填"],
|
|
43
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
44
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
45
|
+
},
|
|
46
|
+
disabled: true,
|
|
47
|
+
"role": "FINANCE-PARTNER.TRADE_RECORD_COUNT_SUPPLIER"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: "openApi账户明细统计",
|
|
51
|
+
mapFn: "countOpenApi",
|
|
52
|
+
path: "/finance-partner/v1/trade-record/count-open-api",
|
|
53
|
+
isRule: false,
|
|
54
|
+
params: {
|
|
55
|
+
open_user_id: ["open api 用户ID", "string", "必填"],
|
|
56
|
+
wallet_type: ["账户类型", "string", "必填"],
|
|
57
|
+
operate_type: ["资金方向", "A:应付; R:应收", "必填"],
|
|
58
|
+
trade_type: ["交易类型", "string", "必填"],
|
|
59
|
+
main_order_id: ["主订单ID", "string", "非必填"],
|
|
60
|
+
business_code: ["业务编码", "string", "非必填"],
|
|
61
|
+
start_time: ["开始时间", "string", "非必填"],
|
|
62
|
+
end_time: ["结束时间", "string", "非必填"],
|
|
63
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
64
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
65
|
+
},
|
|
66
|
+
disabled: true,
|
|
67
|
+
"role": "FINANCE-PARTNER.RECORD_COUNT_OPENAPI"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: "加盟商账户明细列表",
|
|
71
|
+
mapFn: "listPartner",
|
|
72
|
+
path: "/finance-partner/v1/trade-record/list-partner",
|
|
73
|
+
isRule: false,
|
|
74
|
+
params: {
|
|
75
|
+
partner_id: ["加盟商ID", "string", "必填"],
|
|
76
|
+
wallet_type: ["账户类型", "string", "必填"],
|
|
77
|
+
operate_type: ["资金方向", "A:应付; R:应收", "必填"],
|
|
78
|
+
trade_type: ["交易类型", "string", "必填"],
|
|
79
|
+
main_order_id: ["主订单ID", "string", "非必填"],
|
|
80
|
+
business_code: ["业务编码", "string", "非必填"],
|
|
81
|
+
supplier_name: ["供应商名称", "string", "非必填"],
|
|
82
|
+
start_time: ["开始时间", "string", "非必填"],
|
|
83
|
+
end_time: ["结束时间", "string", "非必填"],
|
|
84
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
85
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
86
|
+
},
|
|
87
|
+
disabled: true,
|
|
88
|
+
"role": "FINANCE-PARTNER.TRADE_RECORD_LIST_PARTNER"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: "供货商(渠道)账户明细列表",
|
|
92
|
+
mapFn: "listSupplier",
|
|
93
|
+
path: "/finance-partner/v1/trade-record/list-supplier",
|
|
94
|
+
isRule: false,
|
|
95
|
+
params: {
|
|
96
|
+
supplier_id: ["供货商ID", "string", "必填"],
|
|
97
|
+
wallet_type: ["账户类型", "string", "必填"],
|
|
98
|
+
channel_code: ["渠道编码", "string", "必填"],
|
|
99
|
+
operate_type: ["资金方向", "A:应付; R:应收", "必填"],
|
|
100
|
+
trade_type: ["交易类型", "string", "必填"],
|
|
101
|
+
main_order_id: ["主订单ID", "string", "非必填"],
|
|
102
|
+
business_code: ["业务编码", "string", "非必填"],
|
|
103
|
+
start_time: ["开始时间", "string", "非必填"],
|
|
104
|
+
end_time: ["结束时间", "string", "非必填"],
|
|
105
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
106
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
107
|
+
},
|
|
108
|
+
disabled: true,
|
|
109
|
+
"role": "FINANCE-PARTNER.TRADE_RECORD_LIST_SUPPLIER"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
title: "openApi账户明细列表",
|
|
113
|
+
mapFn: "listOpenApi",
|
|
114
|
+
path: "/finance-partner/v1/trade-record/list-open-api",
|
|
115
|
+
isRule: false,
|
|
116
|
+
params: {
|
|
117
|
+
open_user_id: ["open api 用户ID", "string", "必填"],
|
|
118
|
+
wallet_type: ["账户类型", "string", "必填"],
|
|
119
|
+
operate_type: ["资金方向", "A:应付; R:应收", "必填"],
|
|
120
|
+
trade_type: ["交易类型", "string", "必填"],
|
|
121
|
+
main_order_id: ["主订单ID", "string", "非必填"],
|
|
122
|
+
business_code: ["业务编码", "string", "非必填"],
|
|
123
|
+
start_time: ["开始时间", "string", "非必填"],
|
|
124
|
+
end_time: ["结束时间", "string", "非必填"],
|
|
125
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
126
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
127
|
+
},
|
|
128
|
+
disabled: true,
|
|
129
|
+
"role": "FINANCE-PARTNER.RECORD_LIST_OPENAPI"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
title: "加盟商明细-页面参数",
|
|
133
|
+
mapFn: "getChannelList",
|
|
134
|
+
path: "/finance-partner/v1/trade-record/list-partner-options",
|
|
135
|
+
isRule: false,
|
|
136
|
+
params: {},
|
|
137
|
+
disabled: true,
|
|
138
|
+
"role": "FINANCE-PARTNER.WALLET_LIST_PARTNER_OPTIONS"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
title: "加盟商明细-渠道下供货商列表",
|
|
142
|
+
mapFn: "getSupplierList",
|
|
143
|
+
path: "/finance-partner/v1/trade-record/list-channel-suppliers",
|
|
144
|
+
isRule: false,
|
|
145
|
+
params: {
|
|
146
|
+
value: ["渠道编号", "", "必填"],
|
|
147
|
+
keyword: ["搜索", "", "必填"],
|
|
148
|
+
},
|
|
149
|
+
disabled: true,
|
|
150
|
+
"role": "FINANCE-PARTNER.WALLET_LIST_PARTNER_CHANNEL_SUPPLIERS"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
name: "wallet",
|
|
4
|
+
title: "加盟商余额",
|
|
5
|
+
vuex: true,
|
|
6
|
+
model: [
|
|
7
|
+
{
|
|
8
|
+
title: "加盟商余额调整",
|
|
9
|
+
mapFn: "correctPartnerAmount",
|
|
10
|
+
path: "/finance-partner/v1/wallet/correct-partner-amount",
|
|
11
|
+
isRule: false,
|
|
12
|
+
data: {
|
|
13
|
+
partner_id: ["加盟商ID", "string", "必填"],
|
|
14
|
+
amount: ["调整金额", "单位分", "必填"],
|
|
15
|
+
correct_type: ["调整类型", "correct_a:上调;correct_r:下调", "必填"],
|
|
16
|
+
wallet_nnid: ["钱包唯一标识", "string", "必填"],
|
|
17
|
+
},
|
|
18
|
+
disabled: true,
|
|
19
|
+
"role": "FINANCE-PARTNER.WALLET_CORRECT_PARTNER_AMOUNT"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
title: "平台(供货商)余额调整",
|
|
23
|
+
mapFn: "correctSupplierAmount",
|
|
24
|
+
path: "/finance-partner/v1/wallet/correct-supplier-amount",
|
|
25
|
+
isRule: false,
|
|
26
|
+
data: {
|
|
27
|
+
supplier_id: ["供货商ID", "string", "必填"],
|
|
28
|
+
amount: ["调整金额", "单位分", "必填"],
|
|
29
|
+
correct_type: ["调整类型", "correct_a:上调;correct_r:下调", "必填"],
|
|
30
|
+
wallet_nnid: ["钱包唯一标识", "string", "必填"],
|
|
31
|
+
},
|
|
32
|
+
disabled: true,
|
|
33
|
+
"role": "FINANCE-PARTNER.WALLET_CORRECT_SUPPLIER_AMOUNT"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: "获取渠道余额",
|
|
37
|
+
mapFn: "getChannelAmount",
|
|
38
|
+
path: "/finance-partner/v1/wallet/get-channel-amount",
|
|
39
|
+
isRule: false,
|
|
40
|
+
params: {
|
|
41
|
+
supplier_id: ["供货商ID", "string", "必填"],
|
|
42
|
+
channel_code: ["渠道编码", "string", "必填"],
|
|
43
|
+
},
|
|
44
|
+
disabled: true,
|
|
45
|
+
"role": "FINANCE-PARTNER.WALLET_GET_CHANNEL_AMOUNT"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: "渠道账户余额列表",
|
|
49
|
+
mapFn: "listChannelWallet",
|
|
50
|
+
path: "/finance-partner/v1/wallet/list-channel-wallet",
|
|
51
|
+
isRule: false,
|
|
52
|
+
params: {
|
|
53
|
+
supplier_id: ["供货商ID", "string", "必填"],
|
|
54
|
+
supplier_name: ["供货商名称", "string", "非必填"],
|
|
55
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
56
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
57
|
+
},
|
|
58
|
+
disabled: true,
|
|
59
|
+
"role": "FINANCE-PARTNER.WALLET_LIST_CHANNEL_WALLET"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: "加盟商账户余额列表",
|
|
63
|
+
mapFn: "listPartnerWallet",
|
|
64
|
+
path: "/finance-partner/v1/wallet/list-partner-wallet",
|
|
65
|
+
isRule: false,
|
|
66
|
+
params: {
|
|
67
|
+
partner_id: ["加盟商ID", "string", "必填"],
|
|
68
|
+
partner_name: ["加盟商名称", "string", "非必填"],
|
|
69
|
+
wallet_type: ["钱包类型", "string", "非必填"],
|
|
70
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
71
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
72
|
+
},
|
|
73
|
+
disabled: true,
|
|
74
|
+
"role": "FINANCE-PARTNER.WALLET_LIST_PARTNER_WALLET"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
title: "加盟商首页余额列表",
|
|
78
|
+
mapFn: "listHomeWallet",
|
|
79
|
+
path: "/finance-partner/v1/wallet/list-home-wallet",
|
|
80
|
+
isRule: false,
|
|
81
|
+
params: {},
|
|
82
|
+
disabled: true,
|
|
83
|
+
"role": "FINANCE-PARTNER.WALLET_LIST_HOME_WALLET"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
title: "供货商账户余额列表",
|
|
87
|
+
mapFn: "listSupplierWallet",
|
|
88
|
+
path: "/finance-partner/v1/wallet/list-supplier-wallet",
|
|
89
|
+
isRule: false,
|
|
90
|
+
params: {
|
|
91
|
+
supplier_id: ["供货商ID", "string", "必填"],
|
|
92
|
+
supplier_name: ["供货商名称", "string", "非必填"],
|
|
93
|
+
settlement_method: ["结算方式", "string", "非必填"],
|
|
94
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
95
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
96
|
+
},
|
|
97
|
+
disabled: true,
|
|
98
|
+
"role": "FINANCE-PARTNER.WALLET_LIST_SUPPLIER_WALLET"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: "open API余额列表",
|
|
102
|
+
mapFn: "listOpenApiWallet",
|
|
103
|
+
path: "/finance-partner/v1/wallet/list-openapi-wallet",
|
|
104
|
+
isRule: false,
|
|
105
|
+
params: {
|
|
106
|
+
open_user_id: ["渠道用户ID", "string", "必填"],
|
|
107
|
+
open_user_name: ["用户名", "string", "非必填"],
|
|
108
|
+
settlement_method: ["结算方式", "string", "非必填"],
|
|
109
|
+
page_size: ["每页条数", "number", "非必填"],
|
|
110
|
+
page_token: ["翻页标识", "string", "非必填"],
|
|
111
|
+
},
|
|
112
|
+
disabled: true,
|
|
113
|
+
"role": "FINANCE-PARTNER.WALLET_LIST_OPENAPI_WALLET"
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
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
|
+
</xd-search>
|
|
13
|
+
</el-card>
|
|
14
|
+
<el-card class="app-container__list">
|
|
15
|
+
<div class="app-container__list-table">
|
|
16
|
+
<xd-table
|
|
17
|
+
:headers="headers"
|
|
18
|
+
:list="tables"
|
|
19
|
+
is-border
|
|
20
|
+
@onClick="handleTableClick"
|
|
21
|
+
>
|
|
22
|
+
<template slot="api_amount" slot-scope="scope">
|
|
23
|
+
<span v-if="scope.row.channel_amount !== undefined"><span style="color: red;">{{ scope.row.channel_amount }}</span>元</span>
|
|
24
|
+
<div v-else class="flex-center">
|
|
25
|
+
<el-button type="primary" size="small" @click="getRemain(scope.row)">查看余额</el-button>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
</xd-table>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="app-container__list-pagination">
|
|
32
|
+
<xd-pagination
|
|
33
|
+
:page="page_token"
|
|
34
|
+
:total="total"
|
|
35
|
+
:limit.sync="page_size"
|
|
36
|
+
:autoScroll="false"
|
|
37
|
+
@onPagination="handlePagination"
|
|
38
|
+
></xd-pagination>
|
|
39
|
+
</div>
|
|
40
|
+
</el-card>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
import XdSearch from "@/components/XdSearch";
|
|
47
|
+
import XdPagination from "@/components/XdPagination.vue";
|
|
48
|
+
import XdTable from "@/components/XdTable";
|
|
49
|
+
import { mapActions } from "vuex"
|
|
50
|
+
import { getOptions } from "@/utils/options"
|
|
51
|
+
import { baseJsDateToTime } from "@/utils/xd.base.js"
|
|
52
|
+
import checkPermission from "@/utils/permission"
|
|
53
|
+
import roleTRecord from "@/constant/modules/tradeRecord.js"
|
|
54
|
+
import roleWallet from "@/constant/modules/wallet.js"
|
|
55
|
+
|
|
56
|
+
export default {
|
|
57
|
+
name: "ComponentListPartner",
|
|
58
|
+
components: {
|
|
59
|
+
XdPagination, //翻译插件
|
|
60
|
+
XdSearch, //搜查插件
|
|
61
|
+
XdTable
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
//分页参数
|
|
67
|
+
page_token: 1, //当前页面数量
|
|
68
|
+
hasNextPage: true, //是否有下一页
|
|
69
|
+
page_size: 20, //搜索参数
|
|
70
|
+
searchForm: [], //搜索区域模块表单
|
|
71
|
+
searchParams: null, //搜索参数
|
|
72
|
+
total: 0,
|
|
73
|
+
categoryList: [],
|
|
74
|
+
|
|
75
|
+
//列表对象
|
|
76
|
+
tables: [],
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
computed: {
|
|
80
|
+
headers(){
|
|
81
|
+
return [
|
|
82
|
+
{ "type": "normal", "prop": "supplier_id", "align": "center", "label": "接口ID" },
|
|
83
|
+
{ "type": "normal", "prop": "supplier_name", "align": "center", "minWidth": 200, "label": "接口名称" },
|
|
84
|
+
checkPermission([roleWallet.getChannelAmount]) && { "type": "normal", "prop": "api_amount", "align": "center", "label": "接口余额" },
|
|
85
|
+
{ "type": "price", "prop": "amount", "align": "center", "width": 100, "label": "平台余额", "unit": "元"},
|
|
86
|
+
{ "type": "normal", "prop": "updated_time", "align": "center", "minWidth": 200, "label": "更新时间" },
|
|
87
|
+
checkPermission([roleTRecord.listSupplier]) && {
|
|
88
|
+
"type": "operate", "align": "center", "label": "操作",
|
|
89
|
+
"values": [
|
|
90
|
+
{ "ui": "text-button", "name": "对账", "type": "text", "event": "detail" },
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
].filter(i=>i)
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
created() {
|
|
97
|
+
this.initSearchForm();
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
...mapActions("wallet", ["listChannelWallet", "getChannelAmount"]),
|
|
101
|
+
//相除
|
|
102
|
+
divide(price) {
|
|
103
|
+
return this.$xdHelper.divisionFloatNumber(price, 100);
|
|
104
|
+
},
|
|
105
|
+
doExport(){
|
|
106
|
+
let params = {
|
|
107
|
+
...this.searchParams,
|
|
108
|
+
export: true,
|
|
109
|
+
file_ext: "xlsx",
|
|
110
|
+
file_name: "商品分类销售统计"
|
|
111
|
+
};
|
|
112
|
+
let loading = this.$loading({});
|
|
113
|
+
this.listChannelWallet(params).then(res => {
|
|
114
|
+
loading.close();
|
|
115
|
+
this.$alert('导出任务已经开始执行,请去任务管理查看下载状态', '提示', {
|
|
116
|
+
confirmButtonText: '确定',
|
|
117
|
+
});
|
|
118
|
+
}).catch(err => {
|
|
119
|
+
this.$message.error(err.msg);
|
|
120
|
+
loading.close();
|
|
121
|
+
})
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* @description 获取数据列表
|
|
125
|
+
*/
|
|
126
|
+
getList() {
|
|
127
|
+
//请求数据
|
|
128
|
+
let params = {
|
|
129
|
+
...this.searchParams,
|
|
130
|
+
page_token: this.page_token,
|
|
131
|
+
page_size: this.page_size
|
|
132
|
+
};
|
|
133
|
+
console.log(params)
|
|
134
|
+
let loading = this.$loading({});
|
|
135
|
+
this.listChannelWallet(params).then(res => {
|
|
136
|
+
loading.close();
|
|
137
|
+
this.tables = res.data.list.map(item => {
|
|
138
|
+
item['updated_time'] = item['updated_time'] ? baseJsDateToTime(item['updated_time']) : "";
|
|
139
|
+
return item;
|
|
140
|
+
});
|
|
141
|
+
this.total = res.data.total_size;
|
|
142
|
+
}).catch(err => {
|
|
143
|
+
console.log(err)
|
|
144
|
+
loading.close();
|
|
145
|
+
})
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
handleTableClick({value, row}){
|
|
149
|
+
if(value.event === "detail"){
|
|
150
|
+
if(!row.wallet_type) return this.$message.error("该渠道没有钱包");
|
|
151
|
+
this.$router.push({
|
|
152
|
+
path: "/balance/detail_channel/" + row.supplier_id,
|
|
153
|
+
query: {
|
|
154
|
+
channel_code: row.channel_code,
|
|
155
|
+
wallet_type: row.wallet_type,
|
|
156
|
+
wallet_nnid: row.wallet_nnid,
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
getRemain(row){
|
|
162
|
+
console.log(row)
|
|
163
|
+
this.getChannelAmount({
|
|
164
|
+
supplier_id: row.supplier_id,
|
|
165
|
+
channel_code: row.channel_code
|
|
166
|
+
}).then(res => {
|
|
167
|
+
this.$set(row, "channel_amount", this.divide(res.data.channel_amount))
|
|
168
|
+
})
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @description 点击搜索进行搜索操作
|
|
173
|
+
* @param action 动作
|
|
174
|
+
* @param form 搜索请求参数
|
|
175
|
+
*/
|
|
176
|
+
handleSearch({ action, form }) {
|
|
177
|
+
this.page_token = 1;
|
|
178
|
+
this.getList();
|
|
179
|
+
},
|
|
180
|
+
/**
|
|
181
|
+
* @description 初始化搜索模块
|
|
182
|
+
*/
|
|
183
|
+
initSearchForm() {
|
|
184
|
+
this.searchForm = [
|
|
185
|
+
{
|
|
186
|
+
label: "渠道名称",
|
|
187
|
+
ele: "el-input",
|
|
188
|
+
valueKey: "supplier_name",
|
|
189
|
+
value: "",
|
|
190
|
+
placeholder: "请输入渠道名称"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
label: "渠道ID",
|
|
194
|
+
ele: "el-input",
|
|
195
|
+
valueKey: "supplier_id",
|
|
196
|
+
value: "",
|
|
197
|
+
placeholder: "请输入渠道ID"
|
|
198
|
+
},
|
|
199
|
+
];
|
|
200
|
+
},
|
|
201
|
+
/**
|
|
202
|
+
* @description 翻页处理方法
|
|
203
|
+
* @param page {Number} 访问页面页码数
|
|
204
|
+
*/
|
|
205
|
+
handlePagination(page) {
|
|
206
|
+
this.page_token = page;
|
|
207
|
+
this.getList();
|
|
208
|
+
}, //todo
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
</script>
|
|
212
|
+
|
|
213
|
+
<style scoped lang="scss">
|
|
214
|
+
.flex-center{
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
justify-content: center;
|
|
218
|
+
}
|
|
219
|
+
</style>
|
|
220
|
+
|