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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -0
  3. package/library/gulpfile.js/const.js +51 -0
  4. package/library/gulpfile.js/index.js +237 -0
  5. package/library/gulpfile.js/util.js +114 -0
  6. package/library/viewModules/config.js +75 -0
  7. package/library/viewModules/viewStat/router/supplierStat.js +33 -0
  8. package/library/viewModules/viewStat/schemas/supplier.stat.js +70 -0
  9. package/library/viewModules/viewStat/schemas.js +18 -0
  10. package/library/viewModules/viewStat/viewsStat/index/components/stat-all.vue +233 -0
  11. package/library/viewModules/viewStat/viewsStat/index/components/stat-product.vue +129 -0
  12. package/library/viewModules/viewStat/viewsStat/index/components/stat-supplier.vue +124 -0
  13. package/library/viewModules/viewStat/viewsStat/index/components/table-category.vue +309 -0
  14. package/library/viewModules/viewStat/viewsStat/index/components/table-product.vue +316 -0
  15. package/library/viewModules/viewStat/viewsStat/index/components/table-supplier.vue +276 -0
  16. package/library/viewModules/viewStat/viewsStat/index/index.vue +117 -0
  17. package/library/viewModules/viewTask/router/tasks.js +34 -0
  18. package/library/viewModules/viewTask/schemas/tasks.js +52 -0
  19. package/library/viewModules/viewTask/viewTask/list.vue +195 -0
  20. package/library/viewModules/viewsEnterpriseBuy/router/enterprise_buy.js +91 -0
  21. package/library/viewModules/viewsEnterpriseBuy/schemas/enterprise_buy.js +420 -0
  22. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/OrderInfoButton.vue +550 -0
  23. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/cardList.vue +119 -0
  24. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/expressCopy.vue +259 -0
  25. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/operateHistory.vue +164 -0
  26. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/send_list.vue +395 -0
  27. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/storeList.vue +100 -0
  28. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/workHistory.vue +163 -0
  29. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/detail.vue +503 -0
  30. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/list.vue +635 -0
  31. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/order_detail.vue +860 -0
  32. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/set_create.vue +219 -0
  33. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/set_list.vue +237 -0
  34. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/table-card.vue +180 -0
  35. package/library/viewModules/viewsFinance/router/balance.js +75 -0
  36. package/library/viewModules/viewsFinance/router/finance.js +30 -0
  37. package/library/viewModules/viewsFinance/schemas/trade.record.js +153 -0
  38. package/library/viewModules/viewsFinance/schemas/wallet.js +116 -0
  39. package/library/viewModules/viewsFinance/viewsFinance/balance/components/listChannel.vue +220 -0
  40. package/library/viewModules/viewsFinance/viewsFinance/balance/components/listOpenapi.vue +260 -0
  41. package/library/viewModules/viewsFinance/viewsFinance/balance/components/listPartner.vue +217 -0
  42. package/library/viewModules/viewsFinance/viewsFinance/balance/components/listSupplier.vue +229 -0
  43. package/library/viewModules/viewsFinance/viewsFinance/balance/detail_channel.vue +401 -0
  44. package/library/viewModules/viewsFinance/viewsFinance/balance/detail_openapi.vue +364 -0
  45. package/library/viewModules/viewsFinance/viewsFinance/balance/detail_partner.vue +633 -0
  46. package/library/viewModules/viewsFinance/viewsFinance/balance/detail_supplier.vue +417 -0
  47. package/library/viewModules/viewsFinance/viewsFinance/balance/list.vue +75 -0
  48. package/library/viewModules/viewsFinance/viewsFinance/index.vue +191 -0
  49. package/library/viewModules/viewsLimit/router/buyLimit/buyLimit.js +31 -0
  50. package/library/viewModules/viewsLimit/schemas/buyLimit.js +22 -0
  51. package/library/viewModules/viewsLimit/viewsLimit/index.vue +211 -0
  52. package/package.json +114 -0
@@ -0,0 +1,633 @@
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">
8
+ <span class="amount_label">总余额:</span
9
+ >{{ divide(totalData.total_amount) }}元
10
+ </p>
11
+ <el-link
12
+ v-permission="[roleWallet.correctPartnerAmount]"
13
+ type="primary"
14
+ @click="dialogShow = true"
15
+ >余额矫正</el-link
16
+ >
17
+ </div>
18
+ </div>
19
+ <xd-search
20
+ dateFilter
21
+ timeType
22
+ v-if="searchForm.length > 0"
23
+ v-model="searchParams"
24
+ :list="searchForm"
25
+ @onSearch="handleSearch"
26
+ @onDone="getList"
27
+ >
28
+ <template slot="time" slot-scope="scope">
29
+ <div>
30
+ <el-select v-model="channel_code" filterable clearable placeholder="请输入加盟商名称">
31
+ <el-option
32
+ v-for="item in channelList"
33
+ :key="item.value"
34
+ :label="item.label"
35
+ :value="item.value"
36
+ >
37
+ </el-option>
38
+ </el-select>
39
+ <el-select
40
+ clearable
41
+ v-if="channel_code&&showSupplier"
42
+ v-model="supplier_ids"
43
+ filterable
44
+ remote
45
+ reserve-keyword
46
+ placeholder="请输入关键词"
47
+ :remote-method="remoteMethod"
48
+ >
49
+ <el-option
50
+ v-for="item in supplierList"
51
+ :key="item.value"
52
+ :label="item.label"
53
+ :value="item.value"
54
+ >
55
+ </el-option>
56
+ </el-select>
57
+ </div>
58
+ </template>
59
+ </xd-search>
60
+ </el-card>
61
+ <el-card class="app-container__list">
62
+ <div class="app-container__list-pagination">
63
+ <div></div>
64
+ <div class="table-stat">
65
+ <p>
66
+ 总充值:<span class="_mo"
67
+ >{{ divide(totalData.total_recharge_amount) }}元</span
68
+ >
69
+ 提现总额:<span class="_mo"
70
+ >{{ divide(totalData.total_withdrawal_amount) }}元</span
71
+ >
72
+ 矫正金额:<span class="_mo"
73
+ >{{ divide(totalData.correct_amount) }}元</span
74
+ >
75
+ 总收入:<span class="_mo"
76
+ >{{ divide(totalData.total_income_amount) }}元</span
77
+ >
78
+ 总消费:<span class="_mo"
79
+ >{{ divide(totalData.total_consume_amount) }}元</span
80
+ >
81
+ 总退款:<span class="_mo"
82
+ >{{ divide(totalData.total_refund_amount) }}元</span
83
+ >
84
+ 结余:<span class="_mo">{{ divide(totalData.cash_amount) }}元</span>
85
+ 实际结算:<span class="_mo"
86
+ >{{ divide(totalData.settlement_amount) }}元</span
87
+ >
88
+ </p>
89
+ <el-button type="primary" @click="doExport">导出</el-button>
90
+ </div>
91
+ </div>
92
+ <div class="app-container__list-table">
93
+ <xd-table :headers="headers" :list="tables" is-border>
94
+ <template slot="products" slot-scope="scope">
95
+ <div
96
+ class="table-product"
97
+ v-for="(prod, i) in scope.row.product_list"
98
+ :key="i"
99
+ >
100
+ <div class="table-product__img">
101
+ <img :src="prod.product_thumb" alt="" />
102
+ </div>
103
+ <div class="table-product__name">
104
+ <p>{{ prod.product_name }}</p>
105
+ <p>{{ prod.product_sku_name }}</p>
106
+ </div>
107
+ <div class="table-product__id">
108
+ <p>{{ prod.product_id }}</p>
109
+ </div>
110
+ <div>
111
+ <p>
112
+ {{
113
+ `单价(${divide(prod.dist_price)})*数量(${
114
+ prod.product_num
115
+ })` +
116
+ (prod.channel_pay_price
117
+ ? `-补差(${divide(prod.channel_pay_price)})`
118
+ : "")
119
+ }}
120
+ </p>
121
+ </div>
122
+ </div>
123
+ </template>
124
+ </xd-table>
125
+ </div>
126
+ <div class="app-container__list-pagination">
127
+ <xd-pagination
128
+ :page="page_token"
129
+ :total="total"
130
+ :limit.sync="page_size"
131
+ :autoScroll="false"
132
+ @onPagination="handlePagination"
133
+ ></xd-pagination>
134
+ </div>
135
+ </el-card>
136
+ <xd-dialog
137
+ :show.sync="dialogShow"
138
+ width="350px"
139
+ title="请输入要调整的平台金额"
140
+ @onConfirm="handleCorrect"
141
+ >
142
+ <el-form :model="correctForm" :inline="true">
143
+ <el-form-item label="">
144
+ <el-select
145
+ style="width: 100px"
146
+ v-model="correctForm.correct_type"
147
+ placeholder="请选择"
148
+ >
149
+ <el-option label="上调" value="A"></el-option>
150
+ <el-option label="下调" value="R"></el-option>
151
+ </el-select>
152
+ </el-form-item>
153
+ <el-form-item label="">
154
+ <el-input
155
+ v-model="correctForm.amount"
156
+ type="number"
157
+ placeholder="请输入调整金额"
158
+ ></el-input>
159
+ </el-form-item>
160
+ </el-form>
161
+ </xd-dialog>
162
+ <xd-dialog
163
+ @onConfirm="handleExport"
164
+ :show.sync="showExport"
165
+ width="350px"
166
+ title="导出文件名称"
167
+ >
168
+ <el-input maxlength="20" v-model="exportName" placeholder=""></el-input>
169
+ </xd-dialog>
170
+ </div>
171
+ </template>
172
+
173
+
174
+ <script>
175
+ import XdSearch from "@/components/XdSearch";
176
+ import XdPagination from "@/components/XdPagination.vue";
177
+ import XdTable from "@/components/XdTable";
178
+ import { mapActions } from "vuex";
179
+ import { getOptions } from "@/utils/options";
180
+ import XdDialog from "@/components/XdDialog";
181
+ import { baseJsDateToTime } from "@/utils/xd.base.js";
182
+ import checkPermission from "@/utils/permission";
183
+ import roleTRecord from "@/constant/modules/tradeRecord.js";
184
+ import roleWallet from "@/constant/modules/wallet.js";
185
+
186
+ export default {
187
+ name: "PagePartnerDetail",
188
+ components: {
189
+ XdPagination, //翻译插件
190
+ XdSearch, //搜查插件
191
+ XdTable,
192
+ XdDialog,
193
+ },
194
+ data() {
195
+ return {
196
+ roleWallet,
197
+
198
+ //分页参数
199
+ page_token: 1, //当前页面数量
200
+ hasNextPage: true, //是否有下一页
201
+ page_size: 20, //搜索参数
202
+ searchForm: [], //搜索区域模块表单
203
+ searchParams: null, //搜索参数
204
+ totalData: {},
205
+ total: 0,
206
+ categoryList: [],
207
+ dialogShow: false,
208
+ correctForm: {},
209
+
210
+ //列表对象
211
+ tables: [],
212
+ headers: [
213
+ {
214
+ type: "normal",
215
+ prop: "main_order_id",
216
+ align: "center",
217
+ width: 200,
218
+ label: "主单号",
219
+ },
220
+ {
221
+ type: "normal",
222
+ prop: "sub_order_id",
223
+ align: "center",
224
+ minWidth: 200,
225
+ label: "拆单号",
226
+ },
227
+ {
228
+ type: "normal",
229
+ prop: "products",
230
+ align: "center",
231
+ minWidth: 420,
232
+ label: "商品图片/名称/ID/公式",
233
+ },
234
+ // { "type": "normal", "prop": "category_name", "align": "center", "minWidth": 200, "label": "公式" },
235
+ {
236
+ type: "price",
237
+ prop: "amount",
238
+ align: "center",
239
+ width: 100,
240
+ label: "总价",
241
+ unit: "元",
242
+ },
243
+ {
244
+ type: "normal",
245
+ prop: "created_time",
246
+ align: "center",
247
+ minWidth: 200,
248
+ label: "下单时间",
249
+ },
250
+ {
251
+ type: "normal",
252
+ prop: "supplier_name",
253
+ align: "center",
254
+ minWidth: 200,
255
+ label: "供货商",
256
+ },
257
+ {
258
+ type: "normal",
259
+ prop: "operate_type_name",
260
+ align: "center",
261
+ minWidth: 100,
262
+ label: "资金方向",
263
+ },
264
+ {
265
+ type: "normal",
266
+ prop: "invoice_name",
267
+ align: "center",
268
+ minWidth: 200,
269
+ label: "发票名称",
270
+ },
271
+ {
272
+ type: "normal",
273
+ prop: "comment",
274
+ align: "center",
275
+ minWidth: 200,
276
+ label: "备注",
277
+ },
278
+ ],
279
+ showExport: false,
280
+ exportName: "加盟商明细",
281
+ channelList: [],
282
+ channel_code: null,
283
+ supplier_ids: null,
284
+ supplierList: [],
285
+ showSupplier: false
286
+ };
287
+ },
288
+ computed: {
289
+ partner_id() {
290
+ return this.$route.params.id;
291
+ },
292
+ wallet_type() {
293
+ return this.$route.query.wallet_type;
294
+ },
295
+ wallet_nnid() {
296
+ return this.$route.query.wallet_nnid;
297
+ },
298
+ partner_name() {
299
+ return this.$route.query.partner_name;
300
+ },
301
+ },
302
+ watch: {
303
+ channel_code(val) {
304
+ if (val) {
305
+ this.supplier_ids=null;
306
+ this.supplierList = []
307
+ this.showSupplier = this.channelList.find(item => item.value === val).has_supplier==='Y';
308
+ }
309
+ },
310
+ },
311
+ created() {
312
+ this.initSearchForm();
313
+ },
314
+ methods: {
315
+ ...mapActions("tradeRecord", [
316
+ "listPartner",
317
+ "countPartner",
318
+ "getSupplierList",
319
+ ]),
320
+ ...mapActions("wallet", ["correctPartnerAmount"]),
321
+ handleCorrect() {
322
+ console.log(this.correctForm);
323
+ const { amount, correct_type } = this.correctForm;
324
+ if (!amount || !correct_type) {
325
+ return this.$message.error("请输入要调整的平台金额数据");
326
+ }
327
+ let postData = {
328
+ amount: this.$xdHelper.multiplyFloatNumber(amount, 100),
329
+ correct_type,
330
+ partner_id: this.partner_id,
331
+ wallet_type: this.wallet_type,
332
+ wallet_nnid: this.wallet_nnid,
333
+ };
334
+ let loading = this.$loading({});
335
+ this.correctPartnerAmount(postData)
336
+ .then((res) => {
337
+ loading.close();
338
+ this.$message.success("调整成功");
339
+ this.dialogShow = false;
340
+ this.getList();
341
+ })
342
+ .catch((err) => {
343
+ loading.close();
344
+ });
345
+ },
346
+ remoteMethod(query) {
347
+ if (query !== "") {
348
+ this.getSupplierList({ value: this.channel_code, keyword: query })
349
+ .then((res) => {
350
+ this.supplierList = res.data.list;
351
+ })
352
+ .catch((err) => {
353
+ console.log(err, "err");
354
+ });
355
+ } else {
356
+ this.supplierList = [];
357
+ }
358
+ },
359
+ //相除
360
+ divide(price) {
361
+ return this.$xdHelper.divisionFloatNumber(price, 100);
362
+ },
363
+ getParams() {
364
+ const { p_id, ...other } = this.searchParams;
365
+ let supplier_ids;
366
+ let channel_codes;
367
+ if (this.supplier_ids) {
368
+ supplier_ids = [];
369
+ supplier_ids.push(this.supplier_ids);
370
+ }
371
+ if(this.channel_code) {
372
+ channel_codes = []
373
+ channel_codes.push(this.channel_code)
374
+ }
375
+ return {
376
+ ...other,
377
+ supplier_ids,
378
+ channel_codes,
379
+ partner_id: this.partner_id,
380
+ };
381
+ },
382
+ doExport() {
383
+ this.exportName= "加盟商明细",
384
+ this.showExport = true;
385
+ },
386
+ handleExport() {
387
+ if(!this.exportName) {
388
+ this.$message.error('请输入导出名称');
389
+ return
390
+ }
391
+ const other = this.getParams();
392
+ let params = {
393
+ ...other,
394
+ export: true,
395
+ file_ext: "xlsx",
396
+ file_name: this.exportName,
397
+ export_data_tag: "ExportPartnerTradeRecordList",
398
+ };
399
+ let loading = this.$loading({});
400
+ this.listPartner(params)
401
+ .then((res) => {
402
+ loading.close();
403
+ this.showExport = false;
404
+ this.$alert(
405
+ "导出任务已经开始执行,请去任务管理查看下载状态",
406
+ "提示",
407
+ {
408
+ confirmButtonText: "确定",
409
+ }
410
+ );
411
+ })
412
+ .catch((err) => {
413
+ this.$message.error(err.msg);
414
+ loading.close();
415
+ });
416
+ },
417
+ /**
418
+ * @description 获取数据列表
419
+ */
420
+ getList() {
421
+ //请求数据
422
+ const other = this.getParams();
423
+ let params = {
424
+ ...other,
425
+ page_token: this.page_token,
426
+ page_size: this.page_size,
427
+ };
428
+ console.log(params);
429
+ let loading = this.$loading({});
430
+ Promise.all([this.listPartner(params), this.countPartner(params)])
431
+ .then(([res, res1]) => {
432
+ loading.close();
433
+ this.tables = res.data.list.map((item) => {
434
+ item["created_time"] = baseJsDateToTime(item["created_time"]);
435
+ item["product_list"] = item["product_list"].map((prod) => {
436
+ prod["product_thumb"] = this.getImageFullPath(
437
+ prod["product_thumb"]
438
+ );
439
+ return prod;
440
+ });
441
+ return item;
442
+ });
443
+ this.total = res.data.total_size;
444
+ this.totalData = res1.data;
445
+ })
446
+ .catch((err) => {
447
+ loading.close();
448
+ });
449
+ },
450
+
451
+ /**
452
+ * @description 点击搜索进行搜索操作
453
+ * @param action 动作
454
+ * @param form 搜索请求参数
455
+ */
456
+ handleSearch({ action, form }) {
457
+ if(action === "reset") {
458
+ this.supplier_ids=null
459
+ this.channel_code=null
460
+ }
461
+ this.page_token = 1;
462
+ this.getList();
463
+ },
464
+ /**
465
+ * @description 初始化搜索模块
466
+ */
467
+ initSearchForm() {
468
+ getOptions(
469
+ [
470
+ {
471
+ server: 'supplier-partner',
472
+ fn: 'supplier-channel',
473
+ path: 'p1',
474
+ params: {
475
+ type: this.wallet_type==='PF'?'MOVIE':'MALL'
476
+ }
477
+ },
478
+ {
479
+ server: 'finance-partner',
480
+ fn: 'wallet',
481
+ path: 'p1',
482
+ params: {
483
+ type: 'partner'
484
+ }
485
+ }
486
+ ]
487
+ ).then(res=>{
488
+ this.channelList = res[0].data.list;
489
+ this.searchForm = [
490
+ {
491
+ label: "加盟商",
492
+ ele: "el-input",
493
+ valueKey: "p_id",
494
+ value: this.partner_name || this.partner_id,
495
+ placeholder: "请输入名称",
496
+ disabled: true,
497
+ },
498
+ {
499
+ label: "账户类型",
500
+ ele: "xd-select-list",
501
+ valueKey: "wallet_type",
502
+ value: this.wallet_type,
503
+ placeholder: "请输入渠道ID",
504
+ disabled: true,
505
+ list: res[1].data.list_wallet_type,
506
+ },
507
+ {
508
+ label: "资金方向",
509
+ ele: "xd-select-list",
510
+ valueKey: "operate_type",
511
+ value: "",
512
+ placeholder: "请输入渠道ID",
513
+ list: [
514
+ { label: "全部", value: "" },
515
+ { label: "支出", value: "R" },
516
+ { label: "收入", value: "A" },
517
+ ]
518
+ },
519
+ {
520
+ label: "主单号",
521
+ ele: "el-input",
522
+ valueKey: "main_order_id",
523
+ value: "",
524
+ placeholder: "请输入主单号",
525
+ },
526
+ {
527
+ label: "订单类型",
528
+ ele: "xd-select-list",
529
+ valueKey: "is_gift",
530
+ value: "",
531
+ placeholder: "请选择订单类型",
532
+ list: [
533
+ { label: "全部", value: "" },
534
+ { label: "礼包", value: "Y" },
535
+ { label: "非礼包", value: "N" },
536
+ ],
537
+ },
538
+ // {
539
+ // label: "供货商",
540
+ // ele: "el-input",
541
+ // valueKey: "supplier_name",
542
+ // value: "",
543
+ // placeholder: "请输入供货商名称",
544
+ // },
545
+ {
546
+ label: "供货商:", //label
547
+ ele: "slot", //package 名称
548
+ slot: "time",
549
+ },
550
+ {
551
+ label: "时间:", //label
552
+ ele: "xd-date", //package 名称
553
+ valueKey: ["start_time", "end_time"], //form[valueKey]
554
+ value: [], //v-model
555
+ format: "yyyy-MM-dd HH:mm:ss", //时间显示格式
556
+ formatValue: "timestamp", //输出时间格式
557
+ placeholder: ["开始时间", "结束时间"],
558
+ },
559
+ ];
560
+ }).catch(err=>{
561
+ console.log(err,'err');
562
+ })
563
+ },
564
+ /**
565
+ * @description 翻页处理方法
566
+ * @param page {Number} 访问页面页码数
567
+ */
568
+ handlePagination(page) {
569
+ this.page_token = page;
570
+ this.getList();
571
+ }, //todo
572
+ },
573
+ };
574
+ </script>
575
+
576
+ <style scoped lang="scss">
577
+ .list_header {
578
+ .total_wrap {
579
+ font-size: 13px;
580
+ margin-left: 30px;
581
+ }
582
+ .amount_wrap {
583
+ margin-right: 20px;
584
+ .amount_label {
585
+ font-size: 14px;
586
+ font-weight: 500;
587
+ }
588
+ }
589
+ }
590
+ .table-stat {
591
+ display: flex;
592
+ justify-content: space-between;
593
+ align-items: center;
594
+ p {
595
+ margin: 0;
596
+ font-weight: 500;
597
+ font-size: 14px;
598
+ ._mo {
599
+ font-weight: 400;
600
+ margin-right: 20px;
601
+ font-size: 12px;
602
+ }
603
+ }
604
+ }
605
+ .flex {
606
+ display: flex;
607
+ align-items: center;
608
+ }
609
+ .table-product {
610
+ display: flex;
611
+ align-items: center;
612
+ .table-product__img {
613
+ width: 50px;
614
+ height: 50px;
615
+ img {
616
+ width: 100%;
617
+ height: 100%;
618
+ }
619
+ }
620
+ .table-product__id,
621
+ .table-product__name {
622
+ width: 120px;
623
+ p {
624
+ width: 100%;
625
+ overflow: hidden;
626
+ text-overflow: ellipsis;
627
+ white-space: nowrap;
628
+ margin: 0;
629
+ }
630
+ }
631
+ }
632
+ </style>
633
+