jufubao-admin-library 1.1.98 → 1.1.100

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.
@@ -132,6 +132,20 @@ module.exports = {
132
132
  disabled: true,
133
133
  role: ""
134
134
  },
135
+ {
136
+ title: "统计-商品统计-已选商品折扣分布",
137
+ mapFn: "getSelectedProdDiscounts",
138
+ path: '/stat-partner/v1/product-stat/selected-prod-discounts',
139
+ isRule: false,
140
+ params: {
141
+ filter_site_id: ['filter_site_id', 'String', '必填'],
142
+ filter_business_code: ['filter_business_code', 'String', '必填'],
143
+ },
144
+ disabled: true,
145
+ role: "STAT-PARTNER.PRODUCT_STAT_SELECT_PROD_DISCOUNT"
146
+ },
147
+
148
+
135
149
 
136
150
  ]
137
151
  }
@@ -0,0 +1,370 @@
1
+ <template>
2
+ <el-card class="discount-wrap">
3
+ <div class="discount-wrap-header" slot="header">
4
+ <div class="discount-wrap-header-select">
5
+ <div class="mb10 fs18">
6
+ 已选商品折扣分布
7
+ <!-- <el-tooltip
8
+ effect="light"
9
+ content="仅统计可售商品,包含人工添加和接口同步商品。"
10
+ placement="right"
11
+ >
12
+ <i class="xdicon_question-circle xd_admin_iconfont"></i>
13
+ </el-tooltip> -->
14
+ <span class="s_tit">
15
+ <!-- 截止到{{ last_updated_date_time }} -->
16
+ </span>
17
+ </div>
18
+ <div>
19
+ <el-form ref="form" :inline="true" :model="form" label-width="80px">
20
+ <!-- <el-form-item label="折扣类型">
21
+ <el-select
22
+ v-model="discount_type"
23
+ filterable
24
+ clearable
25
+ placeholder="请选择折扣类型"
26
+ style="margin-right: 10px"
27
+ >
28
+ <el-option
29
+ v-for="item in discountTypeList"
30
+ :key="item.value"
31
+ :label="item.label"
32
+ :value="item.value"
33
+ >
34
+ </el-option>
35
+ </el-select>
36
+ </el-form-item> -->
37
+ <el-form-item label="供应商">
38
+ <el-select
39
+ v-model="channel_code"
40
+ filterable
41
+ clearable
42
+ placeholder="请选择供应商类别"
43
+ style="margin-right: 10px"
44
+ >
45
+ <el-option
46
+ v-for="item in channelList"
47
+ :key="item.value"
48
+ :label="item.label"
49
+ :value="item.value"
50
+ >
51
+ </el-option>
52
+ </el-select>
53
+ <el-select
54
+ clearable
55
+ v-if="channel_code && showSupplier === 'Y'"
56
+ v-model="supplier_ids"
57
+ filterable
58
+ remote
59
+ reserve-keyword
60
+ placeholder="请输入供应商"
61
+ :remote-method="remoteMethod"
62
+ >
63
+ <el-option
64
+ v-for="item in supplierList"
65
+ :key="item.value"
66
+ :label="item.label"
67
+ :value="item.value"
68
+ >
69
+ </el-option>
70
+ </el-select>
71
+ </el-form-item>
72
+ <!-- <el-form-item label="时间">
73
+ <xd-stat-trade-date :isRangeMonth="true" v-model="tradeTime"></xd-stat-trade-date>
74
+ </el-form-item> -->
75
+ <el-form-item label="公共分类">
76
+ <el-cascader v-model="category_id" :props="categoryProps" clearable></el-cascader>
77
+ </el-form-item>
78
+ <el-form-item>
79
+ <el-button
80
+ @click="getDataList"
81
+ style="margin-left: 10px"
82
+ type="primary"
83
+ >搜索</el-button
84
+ >
85
+ <el-button @click="doExport" type="primary">条件导出</el-button>
86
+ </el-form-item>
87
+ </el-form>
88
+ </div>
89
+ </div>
90
+ <div>
91
+ {{
92
+ channel_code
93
+ ? channel_code !== "self"
94
+ ? channel_code_text
95
+ : supplier_text
96
+ ? supplier_text
97
+ : "全部"
98
+ : "全部"
99
+ }}已选商品-按折扣统计数量:
100
+ </div>
101
+ </div>
102
+ <xd-stat-table-group
103
+ v-if="upNewParams"
104
+ :params="upNewParams"
105
+ :key="upNewkey"
106
+ :getList="getSelectedProdDiscounts"
107
+ >
108
+ </xd-stat-table-group>
109
+ <div style="margin-top: 20px">注:自有商品折扣取货源进货价/售价折扣;非自有商品折扣取平台进货价/售价折扣。</div>
110
+ </el-card>
111
+ </template>
112
+ <script>
113
+ import { getOptions } from "@/utils/options";
114
+ import { mapActions } from "vuex";
115
+ import XdStatTradeDate from "@/components/XdStatTradeDate";
116
+ import XdStatTableGroup from "@/components/XdStatTableGroup";
117
+ export default {
118
+ components: {
119
+ XdStatTradeDate,
120
+ XdStatTableGroup
121
+ },
122
+ data() {
123
+ return {
124
+ keyList: [],
125
+ rowTitle: [],
126
+ dataList: [],
127
+ channelList: [],
128
+ channel_code: null,
129
+ supplier_ids: null,
130
+ supplierList: [],
131
+ last_updated_date_time: "", //截止时间
132
+ supplier_text: "",
133
+ channel_code_text: "",
134
+ showSupplier: "N",
135
+ discountTypeList:[
136
+ {
137
+ label:'市场价',
138
+ value:'market'
139
+ },
140
+ {
141
+ label:'建议售价',
142
+ value:'sale'
143
+ },
144
+ ],
145
+ discount_type:'',
146
+ tradeTime: null,
147
+ category_id:[],
148
+ categoryProps: {
149
+ checkStrictly: true,
150
+ lazy: true,
151
+ lazyLoad (node, resolve) {
152
+ getOptions({
153
+ server: 'product-partner',
154
+ fn: "categories",
155
+ path: "p4",
156
+ params: {
157
+ value: node.level == 0 ? 0 : node.value,
158
+ },
159
+ }).then((res) => {
160
+ resolve(res["data"]["list"])
161
+ })
162
+ },
163
+ },
164
+ form:{},
165
+ upNewkey:'upNewkey',
166
+ upNewParams:null,
167
+ };
168
+ },
169
+ props: {
170
+ site_id: {
171
+ type: Number|String,
172
+ default: null
173
+ },
174
+ business_code: {
175
+ type: Number|String,
176
+ default: null
177
+ },
178
+ sub_business_code:{
179
+ type: Number|String,
180
+ default: null
181
+ },
182
+ },
183
+ watch: {
184
+ channel_code(n, o) {
185
+ this.channel_code_text = "";
186
+ this.supplier_text = "";
187
+ this.supplier_ids = null;
188
+ if (n && n !== o) {
189
+ this.channel_code_text = this.channelList.find(
190
+ (item) => item.value === n
191
+ ).label;
192
+ this.showSupplier = this.channelList.find(
193
+ (item) => item.value === n
194
+ ).has_supplier;
195
+ }
196
+ },
197
+ supplier_ids(n, o) {
198
+ this.supplier_text = "";
199
+ if (n && n !== o) {
200
+ this.supplier_text = this.supplierList.find(
201
+ (item) => item.value === n
202
+ ).label;
203
+ }
204
+ },
205
+ site_id(n,o) {
206
+ this.getDataList()
207
+ },
208
+ business_code(n,o) {
209
+ this.getDataList()
210
+ },
211
+ sub_business_code(n,o) {
212
+ this.getDataList()
213
+ }
214
+ },
215
+ created() {
216
+ getOptions({
217
+ server: "supplier-partner",
218
+ fn: "supplier-channel",
219
+ path: "p1",
220
+ params:{
221
+ type:'ALL'
222
+ }
223
+ }).then((res) => {
224
+ this.channelList = res.data.list;
225
+ });
226
+
227
+ },
228
+ mounted(){
229
+ this.getDataList();
230
+ },
231
+ methods: {
232
+ ...mapActions("productStat", ["getSelectedProdDiscounts"]),
233
+ // 获取列表数据
234
+ async getDataList(row) {
235
+
236
+ let params = {
237
+ channel_code: this.channel_code,
238
+ supplier_ids: this.supplier_ids,
239
+ channel_code_text: this.channel_code_text,
240
+ supplier_text: this.supplier_text,
241
+ discount_type:this.discount_type,
242
+ filter_site_id: this.site_id?this.site_id:null,
243
+ filter_business_code: this.business_code?this.business_code:null,
244
+ filter_lv2_business_code: this.sub_business_code,
245
+ ...this.tradeTime,
246
+ }
247
+ if (this.category_id && this.category_id.length) {
248
+ params['category_id'] = this.category_id[this.category_id.length - 1]
249
+ }
250
+ this.upNewParams = params;
251
+ this.upNewkey = Date.now();
252
+ },
253
+ doExport() {
254
+ this.$prompt("请输入导出文件名称", "提示", {
255
+ confirmButtonText: "确定",
256
+ cancelButtonText: "取消",
257
+ inputPattern: /[\S]+/,
258
+ inputErrorMessage: "请填写正确的名称",
259
+ }).then(({ value }) => {
260
+ let params = {
261
+ channel_code: this.channel_code,
262
+ supplier_ids: this.supplier_ids,
263
+ export: true,
264
+ file_ext: "xlsx",
265
+ file_name: value,
266
+ channel_code_text: this.channel_code_text,
267
+ supplier_text: this.supplier_text,
268
+ discount_type:this.discount_type,
269
+ filter_site_id: this.site_id?this.site_id:null,
270
+ filter_business_code: this.business_code?this.business_code:null,
271
+ filter_lv2_business_code: this.sub_business_code,
272
+ ...this.tradeTime,
273
+ };
274
+ let loading = this.$loading({});
275
+ this.getSelectedProdDiscounts(params)
276
+ .then((res) => {
277
+ loading.close();
278
+ this.$alert(
279
+ "导出任务已经开始执行,请去任务管理查看下载状态",
280
+ "提示",
281
+ {
282
+ confirmButtonText: "确定",
283
+ }
284
+ );
285
+ })
286
+ .catch((err) => {
287
+ this.$message.error(err.msg);
288
+ loading.close();
289
+ });
290
+ });
291
+ },
292
+ remoteMethod(query) {
293
+ if (query !== "") {
294
+ getOptions({
295
+ server: "supplier-partner",
296
+ fn: "channel-supplier",
297
+ path: "p1",
298
+ params: {
299
+ channel_code: this.channel_code,
300
+ keyword: query,
301
+ },
302
+ })
303
+ .then((res) => {
304
+ this.supplierList = res.data.list;
305
+ })
306
+ .catch((err) => {
307
+ console.log(err, "err");
308
+ });
309
+ } else {
310
+ this.supplierList = [];
311
+ }
312
+ },
313
+ },
314
+ };
315
+ </script>
316
+ <style lang="less" scoped>
317
+ .discount {
318
+ &-wrap {
319
+ margin-top: 20px;
320
+ &-header {
321
+ &-select {
322
+ //display: flex;
323
+ //justify-content: space-between;
324
+ //align-items: center;
325
+ margin-bottom: 10px;
326
+
327
+ & > div:first-child {
328
+ display: flex;
329
+ align-items: center;
330
+ font-size: 20px;
331
+ i {
332
+ cursor: pointer;
333
+ margin-left: 4px;
334
+ color: #a1a7b3;
335
+ }
336
+ }
337
+
338
+ & > div:nth-child(2) {
339
+ display: flex;
340
+ flex-wrap: wrap;
341
+ align-items: center;
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+ .s_tit{
348
+ font-size: 12px;
349
+ color: #A1A7B3;
350
+ margin-left: 10px;
351
+ vertical-align: bottom;
352
+ }
353
+ .empty_data {
354
+ display: flex;
355
+ justify-content: center;
356
+ align-items: center;
357
+ height: 100px;
358
+ color: #a1a7b3;
359
+ font-size: 14px;
360
+ }
361
+ .mb10{
362
+ margin-bottom: 10px;
363
+ }
364
+ .dis_f{
365
+ display: flex;
366
+ }
367
+ .fs18{
368
+ font-size: 18px!important;
369
+ }
370
+ </style>
@@ -36,6 +36,12 @@
36
36
  :sub_business_code="sub_business_code"
37
37
  v-permission="[Role.totalCounts]"
38
38
  ></stat-all>
39
+ <select-discount
40
+ v-if="site_id&&isSelectProdDis"
41
+ :site_id="site_id"
42
+ :business_code="business_code"
43
+ :sub_business_code="sub_business_code"
44
+ ></select-discount>
39
45
  <stat-all-gift
40
46
  v-if="site_id&&business_code==='gift'&&status"
41
47
  :site_id="site_id"
@@ -91,6 +97,7 @@ import tableCategory from "./components/table-category.vue";
91
97
  import XdStatTableGroup from "@/components/XdStatTableGroup.vue"
92
98
  import checkPermission from "@/utils/permission";
93
99
  import Role from "@/constant/modules/supplierStat";
100
+ import selectDiscount from "./components/select-discount.vue";
94
101
  import { getOptions } from "@/utils/options";
95
102
 
96
103
  export default {
@@ -101,7 +108,8 @@ export default {
101
108
  tableProduct,
102
109
  tableCategory,
103
110
  statAllGift,
104
- XdStatTableGroup
111
+ XdStatTableGroup,
112
+ selectDiscount
105
113
  },
106
114
  data() {
107
115
  return {
@@ -148,6 +156,9 @@ export default {
148
156
  has_tab_category() {
149
157
  return checkPermission([Role.productCategoryCycSales]);
150
158
  },
159
+ isSelectProdDis(){
160
+ return checkPermission([Role.getSelectedProdDiscounts]);
161
+ },
151
162
  has_tab() {
152
163
  return checkPermission([
153
164
  Role.supplierCycSales,
@@ -88,8 +88,11 @@ export default {
88
88
  },
89
89
  xAxis: {
90
90
  type: 'category',
91
- boundaryGap: false,
92
91
  smooth: true,
92
+ data: xAxisData,
93
+ axisPointer: {
94
+ type: 'shadow'
95
+ },
93
96
  data: xAxisData
94
97
  },
95
98
  yAxis: [{
@@ -414,7 +414,7 @@ export default {
414
414
  let temp = {};
415
415
  if(row.trade_type === 'card_fee_a'){
416
416
  temp['trade_nnid'] = row['trade_nnid'];
417
- temp['partner_id'] = row['partner_id'];
417
+ temp['partner_id'] = this.partner_id;
418
418
  temp['wallet_type'] = this.wallet_type
419
419
  }
420
420
  return temp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.98",
3
+ "version": "1.1.100",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {