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,417 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<el-card class="app-container__search">
|
|
4
|
+
<div slot="header" class="flex list_header">
|
|
5
|
+
<div>供货商明细对账</div>
|
|
6
|
+
<div class="flex total_wrap">
|
|
7
|
+
<p class="amount_wrap"><span class="amount_label">总余额:</span>{{divide(totalData.total_amount)}}元</p>
|
|
8
|
+
<el-link v-permission="[roleWallet.correctSupplierAmount]" type="primary" @click="dialogShow=true">余额矫正</el-link>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<xd-search
|
|
12
|
+
dateFilter
|
|
13
|
+
timeType
|
|
14
|
+
v-if="searchForm.length > 0"
|
|
15
|
+
v-model="searchParams"
|
|
16
|
+
:list="searchForm"
|
|
17
|
+
@onSearch="handleSearch"
|
|
18
|
+
@onDone="getList"
|
|
19
|
+
>
|
|
20
|
+
</xd-search>
|
|
21
|
+
</el-card>
|
|
22
|
+
<el-card class="app-container__list">
|
|
23
|
+
<div class="app-container__list-pagination">
|
|
24
|
+
<div></div>
|
|
25
|
+
<div class="table-stat">
|
|
26
|
+
<p>
|
|
27
|
+
总充值:<span class="_mo">{{divide(totalData.total_recharge_amount)}}元</span>
|
|
28
|
+
提现总额:<span class="_mo">{{divide(totalData.total_withdrawal_amount)}}元</span>
|
|
29
|
+
矫正金额:<span class="_mo">{{divide(totalData.correct_amount)}}元</span>
|
|
30
|
+
总收入:<span class="_mo">{{divide(totalData.total_income_amount)}}元</span>
|
|
31
|
+
总消费:<span class="_mo">{{divide(totalData.total_consume_amount)}}元</span>
|
|
32
|
+
总退款:<span class="_mo">{{divide(totalData.total_refund_amount)}}元</span>
|
|
33
|
+
结余:<span class="_mo">{{divide(totalData.cash_amount)}}元</span>
|
|
34
|
+
实际结算:<span class="_mo">{{ divide(totalData.settlement_amount) }}元</span>
|
|
35
|
+
</p>
|
|
36
|
+
<el-button type="primary" @click="doExport">导出</el-button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="app-container__list-table">
|
|
40
|
+
<xd-table
|
|
41
|
+
:headers="headers"
|
|
42
|
+
:list="tables"
|
|
43
|
+
is-border
|
|
44
|
+
>
|
|
45
|
+
<template slot="address" slot-scope="scope">
|
|
46
|
+
<p style="text-align: left;">姓名:{{ scope.row.receipt_username }}</p>
|
|
47
|
+
<p style="text-align: left;">收货地址:{{ scope.row.receipt_address_detail }}</p>
|
|
48
|
+
</template>
|
|
49
|
+
<template slot="products" slot-scope="scope">
|
|
50
|
+
<div class="table-product" v-for="(prod, i) in scope.row.product_list" :key="i">
|
|
51
|
+
<div class="table-product__img">
|
|
52
|
+
<img :src="prod.product_thumb" alt="">
|
|
53
|
+
</div>
|
|
54
|
+
<div class="table-product__name">
|
|
55
|
+
<p>{{ prod.product_name}}</p>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="table-product__id">
|
|
58
|
+
<p>{{ prod.product_id}}</p>
|
|
59
|
+
</div>
|
|
60
|
+
<div>
|
|
61
|
+
<p>金额:{{ divide(prod.dist_price) }} <br/>数量:{{ prod.product_num }}</p>
|
|
62
|
+
<!-- <p>{{ `金额:${prod.dist_price} 数量:${prod.product_num}` }}</p> -->
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
</xd-table>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="app-container__list-pagination">
|
|
69
|
+
<xd-pagination
|
|
70
|
+
:page="page_token"
|
|
71
|
+
:total="total"
|
|
72
|
+
:limit.sync="page_size"
|
|
73
|
+
:autoScroll="false"
|
|
74
|
+
@onPagination="handlePagination"
|
|
75
|
+
></xd-pagination>
|
|
76
|
+
</div>
|
|
77
|
+
</el-card>
|
|
78
|
+
<xd-dialog :show.sync="dialogShow" width="350px" title="请输入要调整的平台金额"
|
|
79
|
+
@onConfirm="handleCorrect">
|
|
80
|
+
<el-form :model="correctForm" :inline="true" >
|
|
81
|
+
<el-form-item label="">
|
|
82
|
+
<el-select style="width:100px" v-model="correctForm.correct_type" placeholder="请选择">
|
|
83
|
+
<el-option label="上调" value="A"></el-option>
|
|
84
|
+
<el-option label="下调" value="R"></el-option>
|
|
85
|
+
</el-select>
|
|
86
|
+
</el-form-item>
|
|
87
|
+
<el-form-item label="">
|
|
88
|
+
<el-input v-model="correctForm.amount" type="number" placeholder="请输入调整金额"></el-input>
|
|
89
|
+
</el-form-item>
|
|
90
|
+
</el-form>
|
|
91
|
+
</xd-dialog>
|
|
92
|
+
<xd-dialog @onConfirm="handleExport" :show.sync="showExport" width="350px" title="导出文件名称">
|
|
93
|
+
<el-input maxlength="20" v-model="exportName" placeholder=""></el-input>
|
|
94
|
+
</xd-dialog>
|
|
95
|
+
</div>
|
|
96
|
+
</template>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<script>
|
|
100
|
+
import XdSearch from "@/components/XdSearch";
|
|
101
|
+
import XdPagination from "@/components/XdPagination.vue";
|
|
102
|
+
import XdTable from "@/components/XdTable";
|
|
103
|
+
import { mapActions } from "vuex"
|
|
104
|
+
import { getOptions } from "@/utils/options"
|
|
105
|
+
import XdDialog from "@/components/XdDialog"
|
|
106
|
+
import { baseJsDateToTime } from "@/utils/xd.base.js"
|
|
107
|
+
import checkPermission from "@/utils/permission"
|
|
108
|
+
import roleTRecord from "@/constant/modules/tradeRecord.js"
|
|
109
|
+
import roleWallet from "@/constant/modules/wallet.js"
|
|
110
|
+
|
|
111
|
+
export default {
|
|
112
|
+
name: "PageSupplierDetail",
|
|
113
|
+
components: {
|
|
114
|
+
XdPagination, //翻译插件
|
|
115
|
+
XdSearch, //搜查插件
|
|
116
|
+
XdTable,
|
|
117
|
+
XdDialog
|
|
118
|
+
},
|
|
119
|
+
data() {
|
|
120
|
+
return {
|
|
121
|
+
roleWallet,
|
|
122
|
+
|
|
123
|
+
//分页参数
|
|
124
|
+
page_token: 1, //当前页面数量
|
|
125
|
+
hasNextPage: true, //是否有下一页
|
|
126
|
+
page_size: 20, //搜索参数
|
|
127
|
+
searchForm: [], //搜索区域模块表单
|
|
128
|
+
searchParams: null, //搜索参数
|
|
129
|
+
totalData: {},
|
|
130
|
+
total: 0,
|
|
131
|
+
categoryList: [],
|
|
132
|
+
dialogShow: false,
|
|
133
|
+
correctForm: {},
|
|
134
|
+
|
|
135
|
+
//列表对象
|
|
136
|
+
tables: [],
|
|
137
|
+
headers: [
|
|
138
|
+
{ "type": "normal", "prop": "main_order_id", "align": "center", "width": 200, "label": "主单号" },
|
|
139
|
+
{ "type": "normal", "prop": "sub_order_id", "align": "center", "minWidth": 200, "label": "拆单号" },
|
|
140
|
+
{ "type": "normal", "prop": "address", "align": "center", "minWidth": 200, "label": "收货信息" },
|
|
141
|
+
{ "type": "normal", "prop": "products", "align": "center", "minWidth": 400, "label": "商品图片/名称/ID/金额&数量" },
|
|
142
|
+
// { "type": "normal", "prop": "category_name", "align": "center", "minWidth": 200, "label": "公式" },
|
|
143
|
+
{ "type": "price", "prop": "amount", "align": "center", "width": 100, "label": "总价", "unit": "元"},
|
|
144
|
+
{ "type": "normal", "prop": "created_time", "align": "center", "minWidth": 200, "label": "下单时间" },
|
|
145
|
+
{ "type": "normal", "prop": "receipt_send_time", "align": "center", "minWidth": 200, "label": "收货时间" },
|
|
146
|
+
{ "type": "normal", "prop": "order_partner_name", "align": "center", "minWidth": 200, "label": "加盟商" },
|
|
147
|
+
{ "type": "normal", "prop": "supplier_name", "align": "center", "minWidth": 200, "label": "供货商" },
|
|
148
|
+
{ "type": "normal", "prop": "operate_type_name", "align": "center", "minWidth": 200, "label": "资金方向" },
|
|
149
|
+
{ "type": "normal", "prop": "invoice_name", "align": "center", "minWidth": 200, "label": "发票名称" },
|
|
150
|
+
{ "type": "normal", "prop": "comment", "align": "center", "minWidth": 200, "label": "备注" },
|
|
151
|
+
],
|
|
152
|
+
showExport: false,
|
|
153
|
+
exportName: '供货商明细对账'
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
computed: {
|
|
157
|
+
supplier_id(){
|
|
158
|
+
return this.$route.params.id;
|
|
159
|
+
},
|
|
160
|
+
wallet_type(){
|
|
161
|
+
return this.$route.query.wallet_type;
|
|
162
|
+
},
|
|
163
|
+
wallet_nnid(){
|
|
164
|
+
return this.$route.query.wallet_nnid;
|
|
165
|
+
},
|
|
166
|
+
supplier_name(){
|
|
167
|
+
return this.$route.query.supplier_name;
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
created() {
|
|
171
|
+
this.initSearchForm();
|
|
172
|
+
},
|
|
173
|
+
methods: {
|
|
174
|
+
...mapActions("tradeRecord", ["listSupplier", "countSupplier"]),
|
|
175
|
+
...mapActions("wallet", ["correctSupplierAmount"]),
|
|
176
|
+
handleCorrect(){
|
|
177
|
+
console.log(this.correctForm)
|
|
178
|
+
const { amount, correct_type } = this.correctForm;
|
|
179
|
+
if(!amount || !correct_type){
|
|
180
|
+
return this.$message.error('请输入要调整的平台金额数据');
|
|
181
|
+
}
|
|
182
|
+
let postData = {
|
|
183
|
+
amount: this.$xdHelper.multiplyFloatNumber(amount, 100),
|
|
184
|
+
correct_type: correct_type,
|
|
185
|
+
supplier_id: this.supplier_id,
|
|
186
|
+
wallet_nnid: this.wallet_nnid,
|
|
187
|
+
}
|
|
188
|
+
let loading = this.$loading({});
|
|
189
|
+
this.correctSupplierAmount(postData).then(res => {
|
|
190
|
+
loading.close();
|
|
191
|
+
this.$message.success('调整成功');
|
|
192
|
+
this.dialogShow = false;
|
|
193
|
+
this.getList();
|
|
194
|
+
}).catch(err => {
|
|
195
|
+
loading.close();
|
|
196
|
+
})
|
|
197
|
+
},
|
|
198
|
+
//相除
|
|
199
|
+
divide(price) {
|
|
200
|
+
return this.$xdHelper.divisionFloatNumber(price, 100);
|
|
201
|
+
},
|
|
202
|
+
getParams(){
|
|
203
|
+
const { s_name, ...other } = this.searchParams;
|
|
204
|
+
return {
|
|
205
|
+
...other,
|
|
206
|
+
wallet_type: this.wallet_type,
|
|
207
|
+
supplier_id: this.supplier_id,
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
doExport(){
|
|
211
|
+
this.exportName= '供货商明细对账'
|
|
212
|
+
this.showExport=true;
|
|
213
|
+
},
|
|
214
|
+
handleExport(){
|
|
215
|
+
if(!this.exportName) {
|
|
216
|
+
this.$message.error('请输入导出名称');
|
|
217
|
+
return
|
|
218
|
+
}
|
|
219
|
+
const other = this.getParams();
|
|
220
|
+
let params = {
|
|
221
|
+
...other,
|
|
222
|
+
export: true,
|
|
223
|
+
file_ext: "xlsx",
|
|
224
|
+
file_name: this.exportName,
|
|
225
|
+
export_data_tag: "ExportSupplierTradeRecordList"
|
|
226
|
+
};
|
|
227
|
+
let loading = this.$loading({});
|
|
228
|
+
this.listSupplier(params).then(res => {
|
|
229
|
+
loading.close();
|
|
230
|
+
this.showExport=false
|
|
231
|
+
this.$alert('导出任务已经开始执行,请去任务管理查看下载状态', '提示', {
|
|
232
|
+
confirmButtonText: '确定',
|
|
233
|
+
});
|
|
234
|
+
}).catch(err => {
|
|
235
|
+
this.$message.error(err.msg);
|
|
236
|
+
loading.close();
|
|
237
|
+
})
|
|
238
|
+
},
|
|
239
|
+
/**
|
|
240
|
+
* @description 获取数据列表
|
|
241
|
+
*/
|
|
242
|
+
getList() {
|
|
243
|
+
//请求数据
|
|
244
|
+
const other = this.getParams();
|
|
245
|
+
let params = {
|
|
246
|
+
...other,
|
|
247
|
+
page_token: this.page_token,
|
|
248
|
+
page_size: this.page_size
|
|
249
|
+
};
|
|
250
|
+
console.log(params)
|
|
251
|
+
let loading = this.$loading({});
|
|
252
|
+
Promise.all([
|
|
253
|
+
this.listSupplier(params),
|
|
254
|
+
this.countSupplier(params)
|
|
255
|
+
]).then(([res, res1]) => {
|
|
256
|
+
loading.close();
|
|
257
|
+
this.tables = res.data.list.map(item => {
|
|
258
|
+
item['created_time'] = baseJsDateToTime(item['created_time']);
|
|
259
|
+
item['receipt_send_time'] = item['receipt_send_time'] ? baseJsDateToTime(item['receipt_send_time']) :''
|
|
260
|
+
item['product_list'] = item['product_list'].map(prod => {
|
|
261
|
+
prod['product_thumb'] = this.getImageFullPath(prod['product_thumb'])
|
|
262
|
+
return prod;
|
|
263
|
+
})
|
|
264
|
+
return item;
|
|
265
|
+
});
|
|
266
|
+
this.total = res.data.total_size;
|
|
267
|
+
this.totalData = res1.data;
|
|
268
|
+
})
|
|
269
|
+
.catch(err => {
|
|
270
|
+
loading.close();
|
|
271
|
+
})
|
|
272
|
+
},
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* @description 点击搜索进行搜索操作
|
|
276
|
+
* @param action 动作
|
|
277
|
+
* @param form 搜索请求参数
|
|
278
|
+
*/
|
|
279
|
+
handleSearch({ action, form }) {
|
|
280
|
+
this.page_token = 1;
|
|
281
|
+
this.getList();
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* @description 初始化搜索模块
|
|
285
|
+
*/
|
|
286
|
+
initSearchForm() {
|
|
287
|
+
this.searchForm = [
|
|
288
|
+
{
|
|
289
|
+
label: "供应商",
|
|
290
|
+
ele: "el-input",
|
|
291
|
+
valueKey: "s_name",
|
|
292
|
+
value: this.supplier_name,
|
|
293
|
+
placeholder: "请输入名称",
|
|
294
|
+
disabled: true,
|
|
295
|
+
},
|
|
296
|
+
// {
|
|
297
|
+
// label: "账户类型",
|
|
298
|
+
// ele: "xd-select-list",
|
|
299
|
+
// valueKey: "wallet_type",
|
|
300
|
+
// value: this.wallet_type,
|
|
301
|
+
// placeholder: "请输入渠道ID",
|
|
302
|
+
// disabled: true,
|
|
303
|
+
// list: [
|
|
304
|
+
// { label: "供货商账户", value: "PP" },
|
|
305
|
+
// ]
|
|
306
|
+
// },
|
|
307
|
+
{
|
|
308
|
+
label: "资金方向",
|
|
309
|
+
ele: "xd-select-list",
|
|
310
|
+
valueKey: "operate_type",
|
|
311
|
+
value: "",
|
|
312
|
+
placeholder: "请输入渠道ID",
|
|
313
|
+
list: [
|
|
314
|
+
{ label: "全部", value: "" },
|
|
315
|
+
{ label: "支出", value: "R" },
|
|
316
|
+
{ label: "收入", value: "A" },
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
label: "主单号",
|
|
321
|
+
ele: "el-input",
|
|
322
|
+
valueKey: "main_order_id",
|
|
323
|
+
value: "",
|
|
324
|
+
placeholder: "请输入主单号"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
label: "订单类型",
|
|
328
|
+
ele: "xd-select-list",
|
|
329
|
+
valueKey: "is_gift",
|
|
330
|
+
value: "",
|
|
331
|
+
placeholder: "请选择订单类型",
|
|
332
|
+
list: [
|
|
333
|
+
{ label: "全部", value: "" },
|
|
334
|
+
{ label: "礼包", value: "Y" },
|
|
335
|
+
{ label: "非礼包", value: "N" },
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
label: '时间:', //label
|
|
340
|
+
ele: 'xd-date', //package 名称
|
|
341
|
+
valueKey: ['start_time', 'end_time'], //form[valueKey]
|
|
342
|
+
value: [], //v-model
|
|
343
|
+
format: 'yyyy-MM-dd HH:mm:ss', //时间显示格式
|
|
344
|
+
formatValue: 'timestamp', //输出时间格式
|
|
345
|
+
placeholder: ['开始时间', '结束时间'],
|
|
346
|
+
},
|
|
347
|
+
];
|
|
348
|
+
},
|
|
349
|
+
/**
|
|
350
|
+
* @description 翻页处理方法
|
|
351
|
+
* @param page {Number} 访问页面页码数
|
|
352
|
+
*/
|
|
353
|
+
handlePagination(page) {
|
|
354
|
+
this.page_token = page;
|
|
355
|
+
this.getList();
|
|
356
|
+
}, //todo
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
</script>
|
|
360
|
+
|
|
361
|
+
<style scoped lang="scss">
|
|
362
|
+
.list_header{
|
|
363
|
+
.total_wrap{
|
|
364
|
+
font-size: 13px;
|
|
365
|
+
margin-left: 30px;
|
|
366
|
+
}
|
|
367
|
+
.amount_wrap{
|
|
368
|
+
margin-right: 20px;
|
|
369
|
+
.amount_label{
|
|
370
|
+
font-size: 14px;
|
|
371
|
+
font-weight: 500;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
.table-stat{
|
|
376
|
+
display: flex;
|
|
377
|
+
justify-content: space-between;
|
|
378
|
+
align-items: center;
|
|
379
|
+
p{
|
|
380
|
+
margin: 0;
|
|
381
|
+
font-weight: 500;
|
|
382
|
+
font-size: 14px;
|
|
383
|
+
._mo{
|
|
384
|
+
font-weight: 400;
|
|
385
|
+
margin-right: 20px;
|
|
386
|
+
font-size: 12px;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
.flex{
|
|
391
|
+
display: flex;
|
|
392
|
+
align-items: center;
|
|
393
|
+
}
|
|
394
|
+
.table-product{
|
|
395
|
+
display: flex;
|
|
396
|
+
align-items: center;
|
|
397
|
+
.table-product__img{
|
|
398
|
+
width: 50px;
|
|
399
|
+
height: 50px;
|
|
400
|
+
img{
|
|
401
|
+
width: 100%;
|
|
402
|
+
height: 100%;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
.table-product__id,
|
|
406
|
+
.table-product__name{
|
|
407
|
+
width: 100px;
|
|
408
|
+
p{
|
|
409
|
+
width: 100%;
|
|
410
|
+
overflow: hidden;
|
|
411
|
+
text-overflow: ellipsis;
|
|
412
|
+
white-space: nowrap;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
</style>
|
|
417
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<el-card style="margin-top: 20px;">
|
|
4
|
+
<el-tabs v-model="activeName" >
|
|
5
|
+
<el-tab-pane v-if="has_partner_wallet" label="加盟商账户余额" name="partner">
|
|
6
|
+
<list-partner v-if="activeName==='partner'"></list-partner>
|
|
7
|
+
</el-tab-pane>
|
|
8
|
+
<el-tab-pane v-if="has_channel_wallet" label="渠道账号余额" name="channel">
|
|
9
|
+
<list-channel v-if="activeName==='channel'"></list-channel>
|
|
10
|
+
</el-tab-pane>
|
|
11
|
+
<el-tab-pane v-if="has_supplier_wallet" label="供货商账号余额" name="supplier">
|
|
12
|
+
<list-supplier v-if="activeName==='supplier'"></list-supplier>
|
|
13
|
+
</el-tab-pane>
|
|
14
|
+
<el-tab-pane v-if="has_openapi_wallet" label="open API余额" name="openapi">
|
|
15
|
+
<listOpenapi v-if="activeName==='openapi'"></listOpenapi>
|
|
16
|
+
</el-tab-pane>
|
|
17
|
+
</el-tabs>
|
|
18
|
+
</el-card>
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import listPartner from "./components/listPartner.vue"
|
|
26
|
+
import listChannel from "./components/listChannel.vue"
|
|
27
|
+
import listSupplier from "./components/listSupplier.vue"
|
|
28
|
+
import listOpenapi from './components/listOpenapi.vue'
|
|
29
|
+
import checkPermission from "@/utils/permission"
|
|
30
|
+
import roleTRecord from "@/constant/modules/tradeRecord.js"
|
|
31
|
+
import roleWallet from "@/constant/modules/wallet.js"
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: "PageBalanceList",
|
|
35
|
+
components: {
|
|
36
|
+
listChannel,
|
|
37
|
+
listPartner,
|
|
38
|
+
listSupplier,
|
|
39
|
+
listOpenapi
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
data () {
|
|
43
|
+
return {
|
|
44
|
+
roleTRecord,
|
|
45
|
+
roleWallet,
|
|
46
|
+
activeName: "partner"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
computed: {
|
|
50
|
+
has_partner_wallet () {
|
|
51
|
+
return checkPermission([roleWallet.listPartnerWallet])
|
|
52
|
+
},
|
|
53
|
+
has_channel_wallet () {
|
|
54
|
+
return checkPermission([roleWallet.listChannelWallet])
|
|
55
|
+
},
|
|
56
|
+
has_supplier_wallet () {
|
|
57
|
+
return checkPermission([roleWallet.listSupplierWallet])
|
|
58
|
+
},
|
|
59
|
+
has_openapi_wallet() {
|
|
60
|
+
return checkPermission([roleWallet.listOpenApiWallet])
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
created () {
|
|
64
|
+
this.activeName = this.has_partner_wallet ? "partner" : this.has_channel_wallet ? "channel" : this.has_openapi_wallet?'openapi': "supplier"
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style scoped lang="scss">
|
|
74
|
+
</style>
|
|
75
|
+
|
|
@@ -0,0 +1,191 @@
|
|
|
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: "PageFinanceIndex",
|
|
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": "wallet_type_name", "align": "center", "minWidth": 200, "label": "账户类型" },
|
|
75
|
+
{ "type": "price", "prop": "amount", "align": "center", "width": 100, "label": "账户余额", "unit": "元"},
|
|
76
|
+
{ "type": "normal", "prop": "updated_time", "align": "center", "minWidth": 200, "label": "更新时间" },
|
|
77
|
+
checkPermission([roleTRecord.listPartner]) && {
|
|
78
|
+
"type": "operate", "align": "center", "label": "操作",
|
|
79
|
+
"values": [
|
|
80
|
+
{ "ui": "text-button", "name": "对账", "type": "text", "event": "detail" },
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
].filter(i=>i)
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
created() {
|
|
87
|
+
// this.initSearchForm();
|
|
88
|
+
this.getList();
|
|
89
|
+
},
|
|
90
|
+
methods: {
|
|
91
|
+
...mapActions("wallet", ["listHomeWallet"]),
|
|
92
|
+
//相除
|
|
93
|
+
divide(price) {
|
|
94
|
+
return this.$xdHelper.divisionFloatNumber(price, 100);
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* @description 获取数据列表
|
|
98
|
+
*/
|
|
99
|
+
getList() {
|
|
100
|
+
//请求数据
|
|
101
|
+
let params = {
|
|
102
|
+
...this.searchParams,
|
|
103
|
+
page_token: this.page_token,
|
|
104
|
+
page_size: this.page_size
|
|
105
|
+
};
|
|
106
|
+
console.log(params)
|
|
107
|
+
let loading = this.$loading({});
|
|
108
|
+
this.listHomeWallet(params).then(res => {
|
|
109
|
+
loading.close();
|
|
110
|
+
this.tables = res.data.list.map(item => {
|
|
111
|
+
item['updated_time'] = item['updated_time'] ? baseJsDateToTime(item['updated_time']) : "";
|
|
112
|
+
return item;
|
|
113
|
+
});
|
|
114
|
+
this.total = res.data.total_size;
|
|
115
|
+
}).catch(err => {
|
|
116
|
+
loading.close();
|
|
117
|
+
})
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
handleTableClick({value, row}){
|
|
121
|
+
console.log("handleTableClick", value, row);
|
|
122
|
+
if(value.event === "detail"){
|
|
123
|
+
this.$router.push({
|
|
124
|
+
path: "/balance/detail_partner/" + row.partner_id,
|
|
125
|
+
query: {
|
|
126
|
+
wallet_type: row.wallet_type,
|
|
127
|
+
wallet_nnid: row.wallet_nnid,
|
|
128
|
+
partner_name: row.partner_name
|
|
129
|
+
}
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @description 点击搜索进行搜索操作
|
|
136
|
+
* @param action 动作
|
|
137
|
+
* @param form 搜索请求参数
|
|
138
|
+
*/
|
|
139
|
+
handleSearch({ action, form }) {
|
|
140
|
+
this.page_token = 1;
|
|
141
|
+
this.getList();
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* @description 初始化搜索模块
|
|
145
|
+
*/
|
|
146
|
+
initSearchForm() {
|
|
147
|
+
this.searchForm = [
|
|
148
|
+
{
|
|
149
|
+
label: "加盟商",
|
|
150
|
+
ele: "el-input",
|
|
151
|
+
valueKey: "partner_name",
|
|
152
|
+
value: "",
|
|
153
|
+
placeholder: "请输入分类ID"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
label: "加盟商ID",
|
|
157
|
+
ele: "el-input",
|
|
158
|
+
valueKey: "partner_id",
|
|
159
|
+
value: "",
|
|
160
|
+
placeholder: "请输入分类ID"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: "对账类型",
|
|
164
|
+
ele: "xd-select-list",
|
|
165
|
+
valueKey: "wallet_type",
|
|
166
|
+
value: "",
|
|
167
|
+
placeholder: "请选择对账类型",
|
|
168
|
+
list: [
|
|
169
|
+
{ label: "全部", value: "" },
|
|
170
|
+
{ label: "加盟商", value: "partner" },
|
|
171
|
+
{ label: "供应商", value: "supplier" },
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
];
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
* @description 翻页处理方法
|
|
178
|
+
* @param page {Number} 访问页面页码数
|
|
179
|
+
*/
|
|
180
|
+
handlePagination(page) {
|
|
181
|
+
this.page_token = page;
|
|
182
|
+
this.getList();
|
|
183
|
+
}, //todo
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
</script>
|
|
187
|
+
|
|
188
|
+
<style scoped lang="scss">
|
|
189
|
+
|
|
190
|
+
</style>
|
|
191
|
+
|