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,260 @@
|
|
|
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
|
+
></xd-table>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="app-container__list-pagination">
|
|
24
|
+
<xd-pagination
|
|
25
|
+
:page="page_token"
|
|
26
|
+
:total="total"
|
|
27
|
+
:limit.sync="page_size"
|
|
28
|
+
:autoScroll="false"
|
|
29
|
+
@onPagination="handlePagination"
|
|
30
|
+
></xd-pagination>
|
|
31
|
+
</div>
|
|
32
|
+
</el-card>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import XdSearch from "@/components/XdSearch";
|
|
39
|
+
import XdPagination from "@/components/XdPagination.vue";
|
|
40
|
+
import XdTable from "@/components/XdTable";
|
|
41
|
+
import { mapActions } from "vuex";
|
|
42
|
+
import { getOptions } from "@/utils/options";
|
|
43
|
+
import { baseJsDateToTime } from "@/utils/xd.base.js";
|
|
44
|
+
import checkPermission from "@/utils/permission";
|
|
45
|
+
import roleTRecord from "@/constant/modules/tradeRecord.js";
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
name: "listOpenapi",
|
|
49
|
+
components: {
|
|
50
|
+
XdPagination, //翻译插件
|
|
51
|
+
XdSearch, //搜查插件
|
|
52
|
+
XdTable,
|
|
53
|
+
},
|
|
54
|
+
data() {
|
|
55
|
+
return {
|
|
56
|
+
//分页参数
|
|
57
|
+
page_token: 1, //当前页面数量
|
|
58
|
+
hasNextPage: true, //是否有下一页
|
|
59
|
+
page_size: 20, //搜索参数
|
|
60
|
+
searchForm: [], //搜索区域模块表单
|
|
61
|
+
searchParams: null, //搜索参数
|
|
62
|
+
totalData: {},
|
|
63
|
+
total: 0,
|
|
64
|
+
categoryList: [],
|
|
65
|
+
|
|
66
|
+
//列表对象
|
|
67
|
+
tables: [],
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
headers() {
|
|
72
|
+
return [
|
|
73
|
+
{
|
|
74
|
+
type: "normal",
|
|
75
|
+
prop: "open_user_id",
|
|
76
|
+
align: "center",
|
|
77
|
+
label: "账户ID",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "normal",
|
|
81
|
+
prop: "open_user_name",
|
|
82
|
+
align: "center",
|
|
83
|
+
minWidth: 200,
|
|
84
|
+
label: "账户名称",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: "normal",
|
|
88
|
+
prop: "settlement_method_name",
|
|
89
|
+
align: "center",
|
|
90
|
+
minWidth: 200,
|
|
91
|
+
label: "结算方式",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: "price",
|
|
95
|
+
prop: "amount",
|
|
96
|
+
align: "center",
|
|
97
|
+
width: 100,
|
|
98
|
+
label: "平台余额",
|
|
99
|
+
unit: "元",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: "normal",
|
|
103
|
+
prop: "updated_time",
|
|
104
|
+
align: "center",
|
|
105
|
+
minWidth: 200,
|
|
106
|
+
label: "更新时间",
|
|
107
|
+
},
|
|
108
|
+
checkPermission([roleTRecord.listSupplier]) && {
|
|
109
|
+
type: "operate",
|
|
110
|
+
align: "center",
|
|
111
|
+
label: "操作",
|
|
112
|
+
values: [
|
|
113
|
+
{ ui: "text-button", name: "对账", type: "text", event: "detail" },
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
].filter((item) => item);
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
created() {
|
|
120
|
+
this.initSearchForm();
|
|
121
|
+
},
|
|
122
|
+
methods: {
|
|
123
|
+
...mapActions("wallet", ["listOpenApiWallet"]),
|
|
124
|
+
//相除
|
|
125
|
+
divide(price) {
|
|
126
|
+
return this.$xdHelper.divisionFloatNumber(price, 100);
|
|
127
|
+
},
|
|
128
|
+
doExport() {
|
|
129
|
+
let params = {
|
|
130
|
+
...this.searchParams,
|
|
131
|
+
export: true,
|
|
132
|
+
file_ext: "xlsx",
|
|
133
|
+
file_name: "商品分类销售统计",
|
|
134
|
+
};
|
|
135
|
+
let loading = this.$loading({});
|
|
136
|
+
this.listSupplierWallet(params)
|
|
137
|
+
.then((res) => {
|
|
138
|
+
loading.close();
|
|
139
|
+
this.$alert(
|
|
140
|
+
"导出任务已经开始执行,请去任务管理查看下载状态",
|
|
141
|
+
"提示",
|
|
142
|
+
{
|
|
143
|
+
confirmButtonText: "确定",
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
})
|
|
147
|
+
.catch((err) => {
|
|
148
|
+
this.$message.error(err.msg);
|
|
149
|
+
loading.close();
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
/**
|
|
153
|
+
* @description 获取数据列表
|
|
154
|
+
*/
|
|
155
|
+
getList() {
|
|
156
|
+
//请求数据
|
|
157
|
+
let params = {
|
|
158
|
+
...this.searchParams,
|
|
159
|
+
page_token: this.page_token,
|
|
160
|
+
page_size: this.page_size,
|
|
161
|
+
};
|
|
162
|
+
console.log(params);
|
|
163
|
+
let loading = this.$loading({});
|
|
164
|
+
this.listOpenApiWallet(params)
|
|
165
|
+
.then((res) => {
|
|
166
|
+
loading.close();
|
|
167
|
+
this.tables = res.data.list.map((item) => {
|
|
168
|
+
item["updated_time"] = item["updated_time"]
|
|
169
|
+
? baseJsDateToTime(item["updated_time"])
|
|
170
|
+
: "";
|
|
171
|
+
return item;
|
|
172
|
+
});
|
|
173
|
+
this.total = res.data.total_size;
|
|
174
|
+
})
|
|
175
|
+
.catch((err) => {
|
|
176
|
+
loading.close();
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @description 点击搜索进行搜索操作
|
|
182
|
+
* @param action 动作
|
|
183
|
+
* @param form 搜索请求参数
|
|
184
|
+
*/
|
|
185
|
+
handleSearch({ action, form }) {
|
|
186
|
+
this.page_token = 1;
|
|
187
|
+
this.getList();
|
|
188
|
+
},
|
|
189
|
+
handleTableClick({ value, row }) {
|
|
190
|
+
if (value.event === "detail") {
|
|
191
|
+
if (!row.wallet_type) return this.$message.error("该openapi没有钱包");
|
|
192
|
+
this.$router.push({
|
|
193
|
+
path: "/balance/detail_openapi/" + row.open_user_id,
|
|
194
|
+
query: {
|
|
195
|
+
open_user_id: row.open_user_id,
|
|
196
|
+
wallet_type: row.wallet_type,
|
|
197
|
+
wallet_nnid: row.wallet_nnid,
|
|
198
|
+
open_user_name: row.open_user_name,
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
/**
|
|
204
|
+
* @description 初始化搜索模块
|
|
205
|
+
*/
|
|
206
|
+
initSearchForm() {
|
|
207
|
+
getOptions({
|
|
208
|
+
server: "finance-partner",
|
|
209
|
+
fn: "wallet",
|
|
210
|
+
path: "p1",
|
|
211
|
+
params: {
|
|
212
|
+
type: "openapi",
|
|
213
|
+
},
|
|
214
|
+
}).then((res) => {
|
|
215
|
+
let { list_settlement_method } = res.data;
|
|
216
|
+
list_settlement_method.unshift({
|
|
217
|
+
label: "全部",
|
|
218
|
+
value: "",
|
|
219
|
+
});
|
|
220
|
+
this.searchForm = [
|
|
221
|
+
{
|
|
222
|
+
label: "名称",
|
|
223
|
+
ele: "el-input",
|
|
224
|
+
valueKey: "open_user_name",
|
|
225
|
+
value: "",
|
|
226
|
+
placeholder: "请输入openAPI名称",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
label: "ID",
|
|
230
|
+
ele: "el-input",
|
|
231
|
+
valueKey: "open_user_id",
|
|
232
|
+
value: "",
|
|
233
|
+
placeholder: "请输入openAPIID",
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
label: "结算方式",
|
|
237
|
+
ele: "xd-select-list",
|
|
238
|
+
valueKey: "settlement_method",
|
|
239
|
+
value: "",
|
|
240
|
+
placeholder: "请选择结算方式",
|
|
241
|
+
list: list_settlement_method,
|
|
242
|
+
},
|
|
243
|
+
];
|
|
244
|
+
});
|
|
245
|
+
},
|
|
246
|
+
/**
|
|
247
|
+
* @description 翻页处理方法
|
|
248
|
+
* @param page {Number} 访问页面页码数
|
|
249
|
+
*/
|
|
250
|
+
handlePagination(page) {
|
|
251
|
+
this.page_token = page;
|
|
252
|
+
this.getList();
|
|
253
|
+
}, //todo
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
</script>
|
|
257
|
+
|
|
258
|
+
<style scoped lang="scss">
|
|
259
|
+
</style>
|
|
260
|
+
|
|
@@ -0,0 +1,217 @@
|
|
|
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
|
+
></xd-table>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="app-container__list-pagination">
|
|
24
|
+
<xd-pagination
|
|
25
|
+
:page="page_token"
|
|
26
|
+
:total="total"
|
|
27
|
+
:limit.sync="page_size"
|
|
28
|
+
:autoScroll="false"
|
|
29
|
+
@onPagination="handlePagination"
|
|
30
|
+
></xd-pagination>
|
|
31
|
+
</div>
|
|
32
|
+
</el-card>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import XdSearch from "@/components/XdSearch";
|
|
39
|
+
import XdPagination from "@/components/XdPagination.vue";
|
|
40
|
+
import XdTable from "@/components/XdTable";
|
|
41
|
+
import { mapActions } from "vuex"
|
|
42
|
+
import { getOptions } from "@/utils/options"
|
|
43
|
+
import { baseJsDateToTime } from "@/utils/xd.base.js"
|
|
44
|
+
import checkPermission from "@/utils/permission"
|
|
45
|
+
import roleTRecord from "@/constant/modules/tradeRecord.js"
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
name: "ComponentListPartner",
|
|
49
|
+
components: {
|
|
50
|
+
XdPagination, //翻译插件
|
|
51
|
+
XdSearch, //搜查插件
|
|
52
|
+
XdTable
|
|
53
|
+
},
|
|
54
|
+
data() {
|
|
55
|
+
return {
|
|
56
|
+
|
|
57
|
+
//分页参数
|
|
58
|
+
page_token: 1, //当前页面数量
|
|
59
|
+
hasNextPage: true, //是否有下一页
|
|
60
|
+
page_size: 20, //搜索参数
|
|
61
|
+
searchForm: [], //搜索区域模块表单
|
|
62
|
+
searchParams: null, //搜索参数
|
|
63
|
+
total: 0,
|
|
64
|
+
categoryList: [],
|
|
65
|
+
|
|
66
|
+
//列表对象
|
|
67
|
+
tables: [],
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
headers(){
|
|
72
|
+
return [
|
|
73
|
+
{ "type": "normal", "prop": "partner_id", "align": "center", "label": "加盟商ID" },
|
|
74
|
+
{ "type": "normal", "prop": "partner_name", "align": "center", "minWidth": 200, "label": "加盟商名称" },
|
|
75
|
+
{ "type": "normal", "prop": "wallet_type_name", "align": "center", "minWidth": 200, "label": "账户类型" },
|
|
76
|
+
{ "type": "price", "prop": "amount", "align": "center", "width": 100, "label": "账户余额", "unit": "元"},
|
|
77
|
+
{ "type": "normal", "prop": "updated_time", "align": "center", "minWidth": 200, "label": "更新时间" },
|
|
78
|
+
checkPermission([roleTRecord.listPartner]) && {
|
|
79
|
+
"type": "operate", "align": "center", "label": "操作",
|
|
80
|
+
"values": [
|
|
81
|
+
{ "ui": "text-button", "name": "对账", "type": "text", "event": "detail" },
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
].filter(i=>i)
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
created() {
|
|
88
|
+
this.initSearchForm();
|
|
89
|
+
},
|
|
90
|
+
methods: {
|
|
91
|
+
...mapActions("wallet", ["listPartnerWallet"]),
|
|
92
|
+
//相除
|
|
93
|
+
divide(price) {
|
|
94
|
+
return this.$xdHelper.divisionFloatNumber(price, 100);
|
|
95
|
+
},
|
|
96
|
+
doExport(){
|
|
97
|
+
let params = {
|
|
98
|
+
...this.searchParams,
|
|
99
|
+
export: true,
|
|
100
|
+
file_ext: "xlsx",
|
|
101
|
+
file_name: "商品分类销售统计"
|
|
102
|
+
};
|
|
103
|
+
let loading = this.$loading({});
|
|
104
|
+
this.listPartnerWallet(params).then(res => {
|
|
105
|
+
loading.close();
|
|
106
|
+
this.$alert('导出任务已经开始执行,请去任务管理查看下载状态', '提示', {
|
|
107
|
+
confirmButtonText: '确定',
|
|
108
|
+
});
|
|
109
|
+
}).catch(err => {
|
|
110
|
+
this.$message.error(err.msg);
|
|
111
|
+
loading.close();
|
|
112
|
+
})
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* @description 获取数据列表
|
|
116
|
+
*/
|
|
117
|
+
getList() {
|
|
118
|
+
//请求数据
|
|
119
|
+
let params = {
|
|
120
|
+
...this.searchParams,
|
|
121
|
+
page_token: this.page_token,
|
|
122
|
+
page_size: this.page_size
|
|
123
|
+
};
|
|
124
|
+
console.log(params)
|
|
125
|
+
let loading = this.$loading({});
|
|
126
|
+
this.listPartnerWallet(params).then(res => {
|
|
127
|
+
loading.close();
|
|
128
|
+
this.tables = res.data.list.map(item => {
|
|
129
|
+
item['updated_time'] = item['updated_time'] ? baseJsDateToTime(item['updated_time']) : "";
|
|
130
|
+
return item;
|
|
131
|
+
});
|
|
132
|
+
this.total = res.data.total_size;
|
|
133
|
+
}).catch(err => {
|
|
134
|
+
loading.close();
|
|
135
|
+
})
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
handleTableClick({value, row}){
|
|
139
|
+
console.log("handleTableClick", value, row);
|
|
140
|
+
if(value.event === "detail"){
|
|
141
|
+
if(!row.wallet_type) return this.$message.error("该加盟商没有钱包")
|
|
142
|
+
this.$router.push({
|
|
143
|
+
path: "/balance/detail_partner/" + row.partner_id,
|
|
144
|
+
query: {
|
|
145
|
+
wallet_type: row.wallet_type,
|
|
146
|
+
wallet_nnid: row.wallet_nnid,
|
|
147
|
+
partner_name: row.partner_name,
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @description 点击搜索进行搜索操作
|
|
155
|
+
* @param action 动作
|
|
156
|
+
* @param form 搜索请求参数
|
|
157
|
+
*/
|
|
158
|
+
handleSearch({ action, form }) {
|
|
159
|
+
this.page_token = 1;
|
|
160
|
+
this.getList();
|
|
161
|
+
},
|
|
162
|
+
/**
|
|
163
|
+
* @description 初始化搜索模块
|
|
164
|
+
*/
|
|
165
|
+
initSearchForm() {
|
|
166
|
+
//finance-partner/v1/wallet/list-options
|
|
167
|
+
getOptions({
|
|
168
|
+
server: 'finance-partner',
|
|
169
|
+
fn: 'wallet',
|
|
170
|
+
path: 'p1',
|
|
171
|
+
params: {
|
|
172
|
+
type: 'partner'
|
|
173
|
+
}
|
|
174
|
+
}).then(res=>{
|
|
175
|
+
console.log(res,'resresres');
|
|
176
|
+
this.searchForm = [
|
|
177
|
+
{
|
|
178
|
+
label: "加盟商",
|
|
179
|
+
ele: "el-input",
|
|
180
|
+
valueKey: "partner_name",
|
|
181
|
+
value: "",
|
|
182
|
+
placeholder: "请输入加盟商名称"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
label: "加盟商ID",
|
|
186
|
+
ele: "el-input",
|
|
187
|
+
valueKey: "partner_id",
|
|
188
|
+
value: "",
|
|
189
|
+
placeholder: "请输入加盟商ID"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
label: "账户类型",
|
|
193
|
+
ele: "xd-select-list",
|
|
194
|
+
valueKey: "wallet_type",
|
|
195
|
+
value: "",
|
|
196
|
+
placeholder: "请选择对账类型",
|
|
197
|
+
list: res.data.list_wallet_type
|
|
198
|
+
}
|
|
199
|
+
];
|
|
200
|
+
})
|
|
201
|
+
},
|
|
202
|
+
/**
|
|
203
|
+
* @description 翻页处理方法
|
|
204
|
+
* @param page {Number} 访问页面页码数
|
|
205
|
+
*/
|
|
206
|
+
handlePagination(page) {
|
|
207
|
+
this.page_token = page;
|
|
208
|
+
this.getList();
|
|
209
|
+
}, //todo
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
</script>
|
|
213
|
+
|
|
214
|
+
<style scoped lang="scss">
|
|
215
|
+
|
|
216
|
+
</style>
|
|
217
|
+
|
|
@@ -0,0 +1,229 @@
|
|
|
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
|
+
></xd-table>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="app-container__list-pagination">
|
|
24
|
+
<xd-pagination
|
|
25
|
+
:page="page_token"
|
|
26
|
+
:total="total"
|
|
27
|
+
:limit.sync="page_size"
|
|
28
|
+
:autoScroll="false"
|
|
29
|
+
@onPagination="handlePagination"
|
|
30
|
+
></xd-pagination>
|
|
31
|
+
</div>
|
|
32
|
+
</el-card>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import XdSearch from "@/components/XdSearch";
|
|
39
|
+
import XdPagination from "@/components/XdPagination.vue";
|
|
40
|
+
import XdTable from "@/components/XdTable";
|
|
41
|
+
import { mapActions } from "vuex"
|
|
42
|
+
import { getOptions } from "@/utils/options"
|
|
43
|
+
import { baseJsDateToTime } from "@/utils/xd.base.js"
|
|
44
|
+
import checkPermission from "@/utils/permission"
|
|
45
|
+
import roleTRecord from "@/constant/modules/tradeRecord.js"
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
name: "ComponentListPartner",
|
|
49
|
+
components: {
|
|
50
|
+
XdPagination, //翻译插件
|
|
51
|
+
XdSearch, //搜查插件
|
|
52
|
+
XdTable
|
|
53
|
+
},
|
|
54
|
+
data() {
|
|
55
|
+
return {
|
|
56
|
+
|
|
57
|
+
//分页参数
|
|
58
|
+
page_token: 1, //当前页面数量
|
|
59
|
+
hasNextPage: true, //是否有下一页
|
|
60
|
+
page_size: 20, //搜索参数
|
|
61
|
+
searchForm: [], //搜索区域模块表单
|
|
62
|
+
searchParams: null, //搜索参数
|
|
63
|
+
totalData: {},
|
|
64
|
+
total: 0,
|
|
65
|
+
categoryList: [],
|
|
66
|
+
|
|
67
|
+
//列表对象
|
|
68
|
+
tables: [],
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
computed: {
|
|
72
|
+
headers(){
|
|
73
|
+
return [
|
|
74
|
+
{ "type": "normal", "prop": "supplier_id", "align": "center", "label": "供货商ID" },
|
|
75
|
+
{ "type": "normal", "prop": "supplier_name", "align": "center", "minWidth": 200, "label": "供货商名称" },
|
|
76
|
+
{ "type": "normal", "prop": "settlement_method_name", "align": "center", "minWidth": 200, "label": "结算方式" },
|
|
77
|
+
{ "type": "normal", "prop": "wallet_type_name", "align": "center", "minWidth": 200, "label": "账户类型" },
|
|
78
|
+
{ "type": "price", "prop": "amount", "align": "center", "width": 100, "label": "供货商余额", "unit": "元"},
|
|
79
|
+
{ "type": "normal", "prop": "updated_time", "align": "center", "minWidth": 200, "label": "更新时间" },
|
|
80
|
+
checkPermission([roleTRecord.listSupplier]) && {
|
|
81
|
+
"type": "operate", "align": "center", "label": "操作",
|
|
82
|
+
"values": [
|
|
83
|
+
{ "ui": "text-button", "name": "对账", "type": "text", "event": "detail" },
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
].filter(item => item);
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
created() {
|
|
90
|
+
this.initSearchForm();
|
|
91
|
+
},
|
|
92
|
+
methods: {
|
|
93
|
+
...mapActions("wallet", ["listSupplierWallet"]),
|
|
94
|
+
//相除
|
|
95
|
+
divide(price) {
|
|
96
|
+
return this.$xdHelper.divisionFloatNumber(price, 100);
|
|
97
|
+
},
|
|
98
|
+
doExport(){
|
|
99
|
+
let params = {
|
|
100
|
+
...this.searchParams,
|
|
101
|
+
export: true,
|
|
102
|
+
file_ext: "xlsx",
|
|
103
|
+
file_name: "商品分类销售统计"
|
|
104
|
+
};
|
|
105
|
+
let loading = this.$loading({});
|
|
106
|
+
this.listSupplierWallet(params).then(res => {
|
|
107
|
+
loading.close();
|
|
108
|
+
this.$alert('导出任务已经开始执行,请去任务管理查看下载状态', '提示', {
|
|
109
|
+
confirmButtonText: '确定',
|
|
110
|
+
});
|
|
111
|
+
}).catch(err => {
|
|
112
|
+
this.$message.error(err.msg);
|
|
113
|
+
loading.close();
|
|
114
|
+
})
|
|
115
|
+
},
|
|
116
|
+
/**
|
|
117
|
+
* @description 获取数据列表
|
|
118
|
+
*/
|
|
119
|
+
getList() {
|
|
120
|
+
//请求数据
|
|
121
|
+
let params = {
|
|
122
|
+
...this.searchParams,
|
|
123
|
+
page_token: this.page_token,
|
|
124
|
+
page_size: this.page_size
|
|
125
|
+
};
|
|
126
|
+
console.log(params)
|
|
127
|
+
let loading = this.$loading({});
|
|
128
|
+
this.listSupplierWallet(params).then(res => {
|
|
129
|
+
loading.close();
|
|
130
|
+
this.tables = res.data.list.map(item => {
|
|
131
|
+
item['updated_time'] = item['updated_time'] ? baseJsDateToTime(item['updated_time']) : "";
|
|
132
|
+
return item;
|
|
133
|
+
});
|
|
134
|
+
this.total = res.data.total_size;
|
|
135
|
+
}).catch(err => {
|
|
136
|
+
loading.close();
|
|
137
|
+
})
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @description 点击搜索进行搜索操作
|
|
142
|
+
* @param action 动作
|
|
143
|
+
* @param form 搜索请求参数
|
|
144
|
+
*/
|
|
145
|
+
handleSearch({ action, form }) {
|
|
146
|
+
this.page_token = 1;
|
|
147
|
+
this.getList();
|
|
148
|
+
},
|
|
149
|
+
handleTableClick({value, row}){
|
|
150
|
+
if(value.event === "detail"){
|
|
151
|
+
if(!row.wallet_type) return this.$message.error("该供货商没有钱包");
|
|
152
|
+
this.$router.push({
|
|
153
|
+
path: "/balance/detail_supplier/" + row.supplier_id,
|
|
154
|
+
query: {
|
|
155
|
+
supplier_id: row.supplier_id,
|
|
156
|
+
wallet_type: row.wallet_type,
|
|
157
|
+
wallet_nnid: row.wallet_nnid,
|
|
158
|
+
supplier_name: row.supplier_name,
|
|
159
|
+
}
|
|
160
|
+
})
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
/**
|
|
164
|
+
* @description 初始化搜索模块
|
|
165
|
+
*/
|
|
166
|
+
initSearchForm() {
|
|
167
|
+
getOptions({
|
|
168
|
+
server: 'finance-partner',
|
|
169
|
+
fn: 'wallet',
|
|
170
|
+
path: 'p1',
|
|
171
|
+
params: {
|
|
172
|
+
type: 'supplier'
|
|
173
|
+
}
|
|
174
|
+
}).then(res=>{
|
|
175
|
+
let {list_settlement_method} = res.data
|
|
176
|
+
list_settlement_method.unshift({
|
|
177
|
+
label: "全部",
|
|
178
|
+
value: ""
|
|
179
|
+
})
|
|
180
|
+
this.searchForm = [
|
|
181
|
+
{
|
|
182
|
+
label: "供货商名称",
|
|
183
|
+
ele: "el-input",
|
|
184
|
+
valueKey: "supplier_name",
|
|
185
|
+
value: "",
|
|
186
|
+
placeholder: "请输入供货商名称"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: "供货商ID",
|
|
190
|
+
ele: "el-input",
|
|
191
|
+
valueKey: "supplier_id",
|
|
192
|
+
value: "",
|
|
193
|
+
placeholder: "请输入供货商ID"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: "结算方式",
|
|
197
|
+
ele: "xd-select-list",
|
|
198
|
+
valueKey: "settlement_method",
|
|
199
|
+
value: "",
|
|
200
|
+
placeholder: "请选择结算方式",
|
|
201
|
+
list:list_settlement_method
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
label: "账户类型",
|
|
205
|
+
ele: "xd-select-list",
|
|
206
|
+
valueKey: "wallet_type",
|
|
207
|
+
value: "",
|
|
208
|
+
placeholder: "请选择对账类型",
|
|
209
|
+
list: res.data.list_wallet_type
|
|
210
|
+
}
|
|
211
|
+
];
|
|
212
|
+
})
|
|
213
|
+
},
|
|
214
|
+
/**
|
|
215
|
+
* @description 翻页处理方法
|
|
216
|
+
* @param page {Number} 访问页面页码数
|
|
217
|
+
*/
|
|
218
|
+
handlePagination(page) {
|
|
219
|
+
this.page_token = page;
|
|
220
|
+
this.getList();
|
|
221
|
+
}, //todo
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
</script>
|
|
225
|
+
|
|
226
|
+
<style scoped lang="scss">
|
|
227
|
+
|
|
228
|
+
</style>
|
|
229
|
+
|