jufubao-admin-library 1.1.182 → 1.1.184
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/library/viewModules/viewStat/schemas/supplier.stat.js +9 -0
- package/library/viewModules/viewStat/viewsStat/product/components/table-product.vue +17 -1
- package/library/viewModules/viewStat/viewsStat/supplier/components/table-store.vue +342 -3
- package/library/viewModules/viewsThird/viewsThird/create.vue +1 -1
- package/package.json +1 -1
|
@@ -102,5 +102,14 @@ module.exports = {
|
|
|
102
102
|
disabled: true,
|
|
103
103
|
role: "STAT-PARTNER.SUPPLIER_STAT_NEW_ON"
|
|
104
104
|
},
|
|
105
|
+
{
|
|
106
|
+
title: "统计-供应商统计-线下门店-无订单线下门店",
|
|
107
|
+
mapFn: "getNoOrderOfflineShop",
|
|
108
|
+
path: '/stat-partner/v1/supplier-stat/no-order-offline-shop',
|
|
109
|
+
isRule: false,
|
|
110
|
+
params: {},
|
|
111
|
+
disabled: true,
|
|
112
|
+
role: "STAT-PARTNER.TRADE_STAT_NO_ORDER_LINE_SHOP"
|
|
113
|
+
},
|
|
105
114
|
]
|
|
106
115
|
}
|
|
@@ -76,7 +76,11 @@
|
|
|
76
76
|
:defaultSort="{ prop: 'total_product_num', order: 'descending' }"
|
|
77
77
|
is-border
|
|
78
78
|
@onSortChange="handleSortChange"
|
|
79
|
-
|
|
79
|
+
>
|
|
80
|
+
<template slot="discount" slot-scope="scope">
|
|
81
|
+
<div v-if="scope.row.discount">{{ scope.row.discount }}折</div>
|
|
82
|
+
</template>
|
|
83
|
+
</xd-table>
|
|
80
84
|
</div>
|
|
81
85
|
<div class="app-container__list-pagination">
|
|
82
86
|
<xd-pagination
|
|
@@ -192,6 +196,18 @@ export default {
|
|
|
192
196
|
data: ["按支付时间统计已支付客户订单进货价金额","包含商品进货价","自有商品按货源进货价","非自有商品按平台进货价计"],
|
|
193
197
|
},
|
|
194
198
|
},
|
|
199
|
+
{
|
|
200
|
+
type: "normal",
|
|
201
|
+
prop: "discount",
|
|
202
|
+
align: "center",
|
|
203
|
+
minWidth: 200,
|
|
204
|
+
label: "折扣",
|
|
205
|
+
unit: "元",
|
|
206
|
+
sort: "custom",
|
|
207
|
+
notice: {
|
|
208
|
+
data: ["折扣=查询结果按商品汇总的进货价金额/销售金额;","四舍五入并保留两位小数展示;","注:此数据仅供参考,不代表商品实际利润。"],
|
|
209
|
+
},
|
|
210
|
+
},
|
|
195
211
|
{
|
|
196
212
|
type: "normal",
|
|
197
213
|
prop: "total_real_product_num",
|
|
@@ -58,7 +58,10 @@
|
|
|
58
58
|
<p>共计核销订单<span>{{ totalData.total_order_count }}</span>个,
|
|
59
59
|
核销金额<span>{{totalData.total_settle_amount}}</span>,
|
|
60
60
|
货源结算金额<span>{{totalData.total_purchase_discount_amount}}</span></p>
|
|
61
|
-
<
|
|
61
|
+
<div>
|
|
62
|
+
<el-button type="primary" v-if="isShowViewStore" @click="viewStore">查看无核销门店</el-button>
|
|
63
|
+
<el-button type="primary" @click="doExport">条件导出</el-button>
|
|
64
|
+
</div>
|
|
62
65
|
</div>
|
|
63
66
|
</div>
|
|
64
67
|
<div class="app-container__list-table">
|
|
@@ -79,6 +82,94 @@
|
|
|
79
82
|
></xd-pagination>
|
|
80
83
|
</div>
|
|
81
84
|
</el-card>
|
|
85
|
+
<XdDialog
|
|
86
|
+
v-if="showViewStore"
|
|
87
|
+
:show.sync="showViewStore"
|
|
88
|
+
:isBtn="false"
|
|
89
|
+
@onClose="handleCloseView"
|
|
90
|
+
title="查看无核销门店"
|
|
91
|
+
>
|
|
92
|
+
<el-card class="app-container__search">
|
|
93
|
+
<xd-search
|
|
94
|
+
dateFilter
|
|
95
|
+
v-if="viewSearchForm.length > 0"
|
|
96
|
+
v-model="viewSearchParams"
|
|
97
|
+
:list="viewSearchForm"
|
|
98
|
+
@onSearch="handleViewSearch"
|
|
99
|
+
@onDone="getViewStoreList"
|
|
100
|
+
>
|
|
101
|
+
<template slot="trade-date">
|
|
102
|
+
<xd-stat-trade-date :typeOptions="typeOptions" :isRangeMonth="true" v-model="viewTradeTime"></xd-stat-trade-date>
|
|
103
|
+
</template>
|
|
104
|
+
<template slot="supplier">
|
|
105
|
+
<div>
|
|
106
|
+
<el-select
|
|
107
|
+
v-model="view_channel_code"
|
|
108
|
+
filterable
|
|
109
|
+
clearable
|
|
110
|
+
placeholder="请选择供应商类别"
|
|
111
|
+
style="margin-right: 10px"
|
|
112
|
+
>
|
|
113
|
+
<el-option
|
|
114
|
+
v-for="item in channelList"
|
|
115
|
+
:key="item.value"
|
|
116
|
+
:label="item.label"
|
|
117
|
+
:value="item.value"
|
|
118
|
+
>
|
|
119
|
+
</el-option>
|
|
120
|
+
</el-select>
|
|
121
|
+
<el-select
|
|
122
|
+
clearable
|
|
123
|
+
v-if="view_channel_code && showViewSupplier === 'Y'"
|
|
124
|
+
v-model="view_supplier_ids"
|
|
125
|
+
filterable
|
|
126
|
+
remote
|
|
127
|
+
reserve-keyword
|
|
128
|
+
placeholder="请输入供应商"
|
|
129
|
+
:remote-method="remoteViewMethod"
|
|
130
|
+
>
|
|
131
|
+
<el-option
|
|
132
|
+
v-for="item in supplierList"
|
|
133
|
+
:key="item.value"
|
|
134
|
+
:label="item.label"
|
|
135
|
+
:value="item.value"
|
|
136
|
+
>
|
|
137
|
+
</el-option>
|
|
138
|
+
</el-select>
|
|
139
|
+
</div>
|
|
140
|
+
</template>
|
|
141
|
+
</xd-search>
|
|
142
|
+
</el-card>
|
|
143
|
+
<el-card class="app-container__list">
|
|
144
|
+
<div class="app-container__list-pagination">
|
|
145
|
+
<div></div>
|
|
146
|
+
<div class="table-stat">
|
|
147
|
+
<div>
|
|
148
|
+
<el-button type="primary" @click="doViewExport">条件导出</el-button>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="app-container__list-table">
|
|
153
|
+
<xd-table
|
|
154
|
+
:headers="viewStoreHeaders"
|
|
155
|
+
:list="viewStoreTables"
|
|
156
|
+
ref="myTable"
|
|
157
|
+
is-border
|
|
158
|
+
>
|
|
159
|
+
</xd-table>
|
|
160
|
+
</div>
|
|
161
|
+
<div class="app-container__list-pagination">
|
|
162
|
+
<xd-pagination
|
|
163
|
+
:page="view_page_token"
|
|
164
|
+
:total="view_total"
|
|
165
|
+
:limit.sync="view_page_size"
|
|
166
|
+
:autoScroll="false"
|
|
167
|
+
@onPagination="handleViewPagination"
|
|
168
|
+
></xd-pagination>
|
|
169
|
+
</div>
|
|
170
|
+
</el-card>
|
|
171
|
+
|
|
172
|
+
</XdDialog>
|
|
82
173
|
</div>
|
|
83
174
|
</template>
|
|
84
175
|
|
|
@@ -88,9 +179,12 @@ import XdSearch from "@/components/XdSearch";
|
|
|
88
179
|
import XdPagination from "@/components/XdPagination.vue";
|
|
89
180
|
import XdTable from "@/components/XdTable";
|
|
90
181
|
import XdStatTradeDate from "@/components/XdStatTradeDate";
|
|
182
|
+
import XdDialog from "@/components/XdDialog";
|
|
91
183
|
import { baseJsDateToTime } from "@/utils/xd.base";
|
|
92
184
|
import { mapActions } from "vuex"
|
|
93
185
|
import { getOptions } from "@/utils/options"
|
|
186
|
+
import checkPermission from "@/utils/permission"
|
|
187
|
+
import Role from "@/constant/modules/supplierStat"
|
|
94
188
|
|
|
95
189
|
export default {
|
|
96
190
|
name: "ComponentTableSupplier",
|
|
@@ -99,6 +193,7 @@ export default {
|
|
|
99
193
|
XdSearch, //搜查插件
|
|
100
194
|
XdTable,
|
|
101
195
|
XdStatTradeDate,
|
|
196
|
+
XdDialog
|
|
102
197
|
},
|
|
103
198
|
data() {
|
|
104
199
|
return {
|
|
@@ -173,7 +268,38 @@ export default {
|
|
|
173
268
|
supplier_text: "",
|
|
174
269
|
channel_code_text: "",
|
|
175
270
|
showSupplier: "N",
|
|
176
|
-
sourceList:[],
|
|
271
|
+
sourceList: [],
|
|
272
|
+
showViewStore: false,
|
|
273
|
+
viewSearchForm: [],
|
|
274
|
+
viewSearchParams: null, //搜索参数
|
|
275
|
+
viewTradeTime: null,
|
|
276
|
+
view_channel_code: null,
|
|
277
|
+
view_supplier_ids: null,
|
|
278
|
+
view_supplier_text: "",
|
|
279
|
+
view_channel_code_text: "",
|
|
280
|
+
showViewSupplier: 'N',
|
|
281
|
+
viewStoreTables: [],
|
|
282
|
+
viewStoreHeaders: [
|
|
283
|
+
{ "type": "normal", "prop": "shop_id", "align": "center", "width": 100, "label": "门店ID" },
|
|
284
|
+
{ "type": "normal", "prop": "shop_name", "align": "center", "minWidth": 200, "label": "门店名称" },
|
|
285
|
+
{ "type": "normal", "prop": "brand_name", "align": "center", "width": 100, "label": "门店品牌" },
|
|
286
|
+
{ "type": "normal", "prop": "supplier_name", "align": "center", "minWidth": 200, "label": "供应商" },
|
|
287
|
+
],
|
|
288
|
+
//分页参数
|
|
289
|
+
view_page_token: 1, //当前页面数量
|
|
290
|
+
view_page_size: 20, //搜索参数
|
|
291
|
+
view_total: 0,
|
|
292
|
+
typeOptions: [
|
|
293
|
+
{
|
|
294
|
+
label: "按月",
|
|
295
|
+
value: "month"
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
computed: {
|
|
301
|
+
isShowViewStore() {
|
|
302
|
+
return checkPermission(Role.getNoOrderOfflineShop)
|
|
177
303
|
}
|
|
178
304
|
},
|
|
179
305
|
watch:{
|
|
@@ -198,6 +324,27 @@ export default {
|
|
|
198
324
|
).label;
|
|
199
325
|
}
|
|
200
326
|
},
|
|
327
|
+
view_channel_code(n, o) {
|
|
328
|
+
this.view_channel_code_text = "";
|
|
329
|
+
this.view_supplier_text = "";
|
|
330
|
+
this.view_supplier_ids = null;
|
|
331
|
+
if (n && n !== o) {
|
|
332
|
+
this.view_channel_code_text = this.channelList.find(
|
|
333
|
+
(item) => item.value === n
|
|
334
|
+
).label;
|
|
335
|
+
this.showViewSupplier = this.channelList.find(
|
|
336
|
+
(item) => item.value === n
|
|
337
|
+
).has_supplier;
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
view_supplier_ids(n, o) {
|
|
341
|
+
this.view_supplier_text = "";
|
|
342
|
+
if (n && n !== o) {
|
|
343
|
+
this.view_supplier_text = this.supplierList.find(
|
|
344
|
+
(item) => item.value === n
|
|
345
|
+
).label;
|
|
346
|
+
}
|
|
347
|
+
},
|
|
201
348
|
},
|
|
202
349
|
created() {
|
|
203
350
|
getOptions([{
|
|
@@ -216,7 +363,7 @@ export default {
|
|
|
216
363
|
});
|
|
217
364
|
},
|
|
218
365
|
methods: {
|
|
219
|
-
...mapActions("supplierStat", ["offlineShopSalesSupplier"]),
|
|
366
|
+
...mapActions("supplierStat", ["offlineShopSalesSupplier",'getNoOrderOfflineShop']),
|
|
220
367
|
//相除
|
|
221
368
|
divide(price) {
|
|
222
369
|
return this.$xdHelper.divisionFloatNumber(price, 100);
|
|
@@ -238,6 +385,23 @@ export default {
|
|
|
238
385
|
}
|
|
239
386
|
return params;
|
|
240
387
|
},
|
|
388
|
+
getViewParams() {
|
|
389
|
+
let { brand_id,shop_id, ...other } = this.viewSearchParams;
|
|
390
|
+
|
|
391
|
+
if(brand_id && brand_id.length > 0){
|
|
392
|
+
other.brand_id = brand_id[0].value;
|
|
393
|
+
}
|
|
394
|
+
if(shop_id && shop_id.length > 0){
|
|
395
|
+
other.shop_id = shop_id[0].value;
|
|
396
|
+
}
|
|
397
|
+
let params = {
|
|
398
|
+
...other,
|
|
399
|
+
...this.viewTradeTime,
|
|
400
|
+
supplier_id:this.view_supplier_ids,
|
|
401
|
+
channel_code: this.view_channel_code,
|
|
402
|
+
}
|
|
403
|
+
return params;
|
|
404
|
+
},
|
|
241
405
|
doExport(){
|
|
242
406
|
this.$prompt('请输入导出文件名称', '提示', {
|
|
243
407
|
confirmButtonText: '确定',
|
|
@@ -264,6 +428,37 @@ export default {
|
|
|
264
428
|
})
|
|
265
429
|
})
|
|
266
430
|
},
|
|
431
|
+
doViewExport() {
|
|
432
|
+
this.$prompt("请输入导出文件名称", "提示", {
|
|
433
|
+
confirmButtonText: "确定",
|
|
434
|
+
cancelButtonText: "取消",
|
|
435
|
+
inputPattern: /[\S]+/,
|
|
436
|
+
inputErrorMessage: "请填写正确的名称",
|
|
437
|
+
}).then(({ value }) => {
|
|
438
|
+
let params = {
|
|
439
|
+
...this.getViewParams(),
|
|
440
|
+
export: true,
|
|
441
|
+
file_ext: "xlsx",
|
|
442
|
+
file_name: value,
|
|
443
|
+
};
|
|
444
|
+
let loading = this.$loading({});
|
|
445
|
+
this.getNoOrderOfflineShop(params)
|
|
446
|
+
.then((res) => {
|
|
447
|
+
loading.close();
|
|
448
|
+
this.$alert(
|
|
449
|
+
"导出任务已经开始执行,请去任务管理查看下载状态",
|
|
450
|
+
"提示",
|
|
451
|
+
{
|
|
452
|
+
confirmButtonText: "确定",
|
|
453
|
+
}
|
|
454
|
+
);
|
|
455
|
+
})
|
|
456
|
+
.catch((err) => {
|
|
457
|
+
this.$message.error(err.msg);
|
|
458
|
+
loading.close();
|
|
459
|
+
});
|
|
460
|
+
});
|
|
461
|
+
},
|
|
267
462
|
/**
|
|
268
463
|
* @description 获取数据列表
|
|
269
464
|
*/
|
|
@@ -294,6 +489,31 @@ export default {
|
|
|
294
489
|
loading.close();
|
|
295
490
|
})
|
|
296
491
|
},
|
|
492
|
+
/**
|
|
493
|
+
* @description 获取数据列表
|
|
494
|
+
*/
|
|
495
|
+
getViewStoreList() {
|
|
496
|
+
//请求数据
|
|
497
|
+
let params = {
|
|
498
|
+
...this.getViewParams(),
|
|
499
|
+
page_token: this.view_page_token,
|
|
500
|
+
page_size: this.view_page_size,
|
|
501
|
+
};
|
|
502
|
+
if(!this.viewTradeTime || !this.viewTradeTime.time_range_start){
|
|
503
|
+
this.$message.error('请选择交易时间')
|
|
504
|
+
return
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
console.log(params)
|
|
508
|
+
let loading = this.$loading({});
|
|
509
|
+
this.getNoOrderOfflineShop(params).then(res => {
|
|
510
|
+
loading.close();
|
|
511
|
+
this.viewStoreTables = res.data.list;
|
|
512
|
+
this.view_total = res.data.total_size;
|
|
513
|
+
}).catch(err => {
|
|
514
|
+
loading.close();
|
|
515
|
+
})
|
|
516
|
+
},
|
|
297
517
|
handleSortChange({ prop, order }) {
|
|
298
518
|
if(order === null){
|
|
299
519
|
this.sort_by = '';
|
|
@@ -324,6 +544,18 @@ export default {
|
|
|
324
544
|
this.page_token = 1;
|
|
325
545
|
this.getList();
|
|
326
546
|
},
|
|
547
|
+
handleViewSearch({ action, form }) {
|
|
548
|
+
if(!this.viewTradeTime || !this.viewTradeTime.time_range_start){
|
|
549
|
+
this.$message.error('请选择交易时间')
|
|
550
|
+
return
|
|
551
|
+
}
|
|
552
|
+
if (action == "reset") {
|
|
553
|
+
this.view_channel_code = '';
|
|
554
|
+
this.view_supplier_ids = '';
|
|
555
|
+
}
|
|
556
|
+
this.view_page_token = 1;
|
|
557
|
+
this.getViewStoreList();
|
|
558
|
+
},
|
|
327
559
|
/**
|
|
328
560
|
* @description 初始化搜索模块
|
|
329
561
|
*/
|
|
@@ -410,6 +642,79 @@ export default {
|
|
|
410
642
|
},
|
|
411
643
|
];
|
|
412
644
|
},
|
|
645
|
+
initViewSearchForm() {
|
|
646
|
+
let yesterDay = new Date().getTime() - 24 * 60 * 60 * 1000;
|
|
647
|
+
yesterDay = baseJsDateToTime(yesterDay/1000);
|
|
648
|
+
yesterDay = yesterDay.split(' ')[0];
|
|
649
|
+
this.viewSearchForm = [
|
|
650
|
+
{
|
|
651
|
+
label: "交易时间:",
|
|
652
|
+
ele: "slot",
|
|
653
|
+
slot: "trade-date",
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
label: "供应商: ",
|
|
657
|
+
ele: "slot",
|
|
658
|
+
slot: "supplier",
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
label: "门店名称:", //label
|
|
662
|
+
ele: "xd-remote-select", //package 名称
|
|
663
|
+
valueKey: "shop_id", //form[valueKey]
|
|
664
|
+
value: [], //v-model
|
|
665
|
+
placeholder: "请选择门店名称",
|
|
666
|
+
multiple: false,
|
|
667
|
+
collapseTags: false,
|
|
668
|
+
className: "input40",
|
|
669
|
+
remoteSearch: (query, resolve) => {
|
|
670
|
+
getOptions({
|
|
671
|
+
server: "supplier-partner",
|
|
672
|
+
fn: "shop",
|
|
673
|
+
path: "p1",
|
|
674
|
+
params: {
|
|
675
|
+
keyword: query,
|
|
676
|
+
page_token: 1,
|
|
677
|
+
page_size: 500,
|
|
678
|
+
},
|
|
679
|
+
})
|
|
680
|
+
.then((res) => {
|
|
681
|
+
resolve(res.data.list);
|
|
682
|
+
})
|
|
683
|
+
.catch((err) => {
|
|
684
|
+
console.log(err, "err");
|
|
685
|
+
});
|
|
686
|
+
},
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
label: "品牌名称:", //label
|
|
690
|
+
ele: "xd-remote-select", //package 名称
|
|
691
|
+
valueKey: "brand_id", //form[valueKey]
|
|
692
|
+
value: [], //v-model
|
|
693
|
+
placeholder: "请选择品牌名称",
|
|
694
|
+
multiple: false,
|
|
695
|
+
collapseTags: false,
|
|
696
|
+
className: "input40",
|
|
697
|
+
remoteSearch: (query, resolve) => {
|
|
698
|
+
getOptions({
|
|
699
|
+
server: "supplier-partner",
|
|
700
|
+
fn: "brand",
|
|
701
|
+
path: "p1",
|
|
702
|
+
params: {
|
|
703
|
+
keyword: query,
|
|
704
|
+
page_token: 1,
|
|
705
|
+
page_size: 500,
|
|
706
|
+
},
|
|
707
|
+
})
|
|
708
|
+
.then((res) => {
|
|
709
|
+
resolve(res.data.list);
|
|
710
|
+
})
|
|
711
|
+
.catch((err) => {
|
|
712
|
+
console.log(err, "err");
|
|
713
|
+
});
|
|
714
|
+
},
|
|
715
|
+
},
|
|
716
|
+
];
|
|
717
|
+
},
|
|
413
718
|
/**
|
|
414
719
|
* @description 翻页处理方法
|
|
415
720
|
* @param page {Number} 访问页面页码数
|
|
@@ -418,6 +723,10 @@ export default {
|
|
|
418
723
|
this.page_token = page;
|
|
419
724
|
this.getList();
|
|
420
725
|
}, //todo
|
|
726
|
+
handleViewPagination(page) {
|
|
727
|
+
this.view_page_token = page;
|
|
728
|
+
this.getViewStoreList();
|
|
729
|
+
},
|
|
421
730
|
remoteMethod(query) {
|
|
422
731
|
if (query !== "") {
|
|
423
732
|
getOptions({
|
|
@@ -439,6 +748,36 @@ export default {
|
|
|
439
748
|
this.supplierList = [];
|
|
440
749
|
}
|
|
441
750
|
},
|
|
751
|
+
remoteViewMethod(query) {
|
|
752
|
+
if (query !== "") {
|
|
753
|
+
getOptions({
|
|
754
|
+
server: "supplier-partner",
|
|
755
|
+
fn: "channel-supplier",
|
|
756
|
+
path: "p1",
|
|
757
|
+
params: {
|
|
758
|
+
channel_code: this.view_channel_code,
|
|
759
|
+
keyword: query,
|
|
760
|
+
},
|
|
761
|
+
})
|
|
762
|
+
.then((res) => {
|
|
763
|
+
this.supplierList = res.data.list;
|
|
764
|
+
})
|
|
765
|
+
.catch((err) => {
|
|
766
|
+
console.log(err, "err");
|
|
767
|
+
});
|
|
768
|
+
} else {
|
|
769
|
+
this.supplierList = [];
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
viewStore() {
|
|
773
|
+
this.initViewSearchForm()
|
|
774
|
+
this.showViewStore = true;
|
|
775
|
+
},
|
|
776
|
+
handleCloseView() {
|
|
777
|
+
this.showViewStore = false;
|
|
778
|
+
this.view_channel_code = "";
|
|
779
|
+
this.view_supplier_ids = [];
|
|
780
|
+
}
|
|
442
781
|
}
|
|
443
782
|
}
|
|
444
783
|
</script>
|