jufubao-admin-library 1.1.63 → 1.1.64

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.
@@ -9,6 +9,9 @@
9
9
  @onSearch="handleSearch"
10
10
  @onDone="getList"
11
11
  >
12
+ <template slot="trade-date">
13
+ <xd-stat-trade-date :isRangeMonth="true" v-model="tradeTime"></xd-stat-trade-date>
14
+ </template>
12
15
  <template slot="time" slot-scope="scope">
13
16
  <div>
14
17
  <el-select
@@ -87,6 +90,7 @@
87
90
  import XdSearch from "@/components/XdSearch";
88
91
  import XdPagination from "@/components/XdPagination.vue";
89
92
  import XdTable from "@/components/XdTable";
93
+ import XdStatTradeDate from "@/components/XdStatTradeDate";
90
94
  import { baseJsDateToTime } from "@/utils/xd.base";
91
95
  import { getOptions } from "@/utils/options";
92
96
  import { mapActions } from "vuex";
@@ -97,6 +101,7 @@ export default {
97
101
  XdPagination, //翻译插件
98
102
  XdSearch, //搜查插件
99
103
  XdTable,
104
+ XdStatTradeDate,
100
105
  },
101
106
  data() {
102
107
  return {
@@ -109,6 +114,7 @@ export default {
109
114
  sort_by: "", //排序字段
110
115
  sort_direct: "", //排序方向 asc递增 desc递减
111
116
  totalData: {},
117
+ tradeTime: null,
112
118
 
113
119
  //列表对象
114
120
  tables: [],
@@ -150,7 +156,7 @@ export default {
150
156
  unit: "元",
151
157
  sort: "custom",
152
158
  notice: {
153
- data: ["按支付时间统计已支付客户订单总金额 包含商品售价和运费"],
159
+ data: ["按支付时间统计已支付客户订单总金额 包含商品售价"],
154
160
  },
155
161
  },
156
162
  {
@@ -162,7 +168,7 @@ export default {
162
168
  unit: "元",
163
169
  sort: "custom",
164
170
  notice: {
165
- data: ["按支付时间统计已支付客户订单进货价金额 包含商品进货价和运费 自有商品按货源进货价,非自有商品按平台进货价计"],
171
+ data: ["按支付时间统计已支付客户订单进货价金额 包含商品进货价 自有商品按货源进货价,非自有商品按平台进货价计"],
166
172
  },
167
173
  },
168
174
  {
@@ -287,6 +293,7 @@ export default {
287
293
  }
288
294
  let params = {
289
295
  ...other,
296
+ ...this.tradeTime,
290
297
  page_token: this.page_token,
291
298
  page_size: this.page_size,
292
299
  channel_code: this.channel_code,
@@ -342,10 +349,11 @@ export default {
342
349
  let params = {
343
350
  ...this.getParams(),
344
351
  };
345
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
352
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
346
353
  this.$message.error('请选择交易时间')
347
354
  return
348
355
  }
356
+
349
357
  console.log(params);
350
358
  let loading = this.$loading({});
351
359
  this.brandCycSales(params)
@@ -398,13 +406,9 @@ export default {
398
406
  // this.channelList = res.data.list;
399
407
  this.searchForm = [
400
408
  {
401
- label: "交易时间:", //label
402
- ele: "xd-date", //package 名称
403
- valueKey: ["time_range_start", "time_range_end"], //form[valueKey]
404
- value: [yesterDay, yesterDay], //v-model
405
- format: "yyyy-MM-dd", //时间显示格式
406
- formatValue: "yyyy-MM-dd", //输出时间格式
407
- placeholder: ["开始时间", "结束时间"],
409
+ label: "交易时间:",
410
+ ele: "slot",
411
+ slot: "trade-date",
408
412
  },
409
413
  {
410
414
  label: "商品品牌:", //label
@@ -9,7 +9,10 @@
9
9
  @onSearch="handleSearch"
10
10
  @onDone="getList"
11
11
  >
12
- <template slot="time" slot-scope="scope">
12
+ <template slot="trade-date">
13
+ <xd-stat-trade-date :isRangeMonth="true" v-model="tradeTime"></xd-stat-trade-date>
14
+ </template>
15
+ <template slot="time" slot-scope="scope">
13
16
  <div>
14
17
  <el-select
15
18
  v-model="channel_code"
@@ -90,6 +93,7 @@
90
93
  import XdSearch from "@/components/XdSearch";
91
94
  import XdPagination from "@/components/XdPagination.vue";
92
95
  import XdTable from "@/components/XdTable";
96
+ import XdStatTradeDate from "@/components/XdStatTradeDate";
93
97
  import { baseJsDateToTime } from "@/utils/xd.base";
94
98
  import { mapActions } from "vuex"
95
99
  import { getOptions } from "@/utils/options"
@@ -99,7 +103,8 @@ export default {
99
103
  components: {
100
104
  XdPagination, //翻译插件
101
105
  XdSearch, //搜查插件
102
- XdTable
106
+ XdTable,
107
+ XdStatTradeDate,
103
108
  },
104
109
  data() {
105
110
  return {
@@ -117,6 +122,8 @@ export default {
117
122
  sort_by: "", //排序字段
118
123
  sort_direct: "", //排序方向 asc递增 desc递减
119
124
 
125
+ tradeTime: null,
126
+
120
127
  //列表对象
121
128
  tables: [],
122
129
  headers: [
@@ -145,7 +152,7 @@ export default {
145
152
  unit: "元",
146
153
  sort: "custom",
147
154
  notice: {
148
- data: ["按支付时间统计已支付客户订单总金额 包含商品售价和运费"],
155
+ data: ["按支付时间统计已支付客户订单总金额 包含商品售价"],
149
156
  },
150
157
  },
151
158
  {
@@ -157,7 +164,7 @@ export default {
157
164
  unit: "元",
158
165
  sort: "custom",
159
166
  notice: {
160
- data: ["按支付时间统计已支付客户订单进货价金额 包含商品进货价和运费 自有商品按货源进货价,非自有商品按平台进货价计"],
167
+ data: ["按支付时间统计已支付客户订单进货价金额 包含商品进货价 自有商品按货源进货价,非自有商品按平台进货价计"],
161
168
  },
162
169
  },
163
170
  {
@@ -212,7 +219,7 @@ export default {
212
219
  lazy: true,
213
220
  lazyLoad (node, resolve) {
214
221
  getOptions({
215
- server: 'product-admin',
222
+ server: 'product-partner',
216
223
  fn: "categories",
217
224
  path: "p4",
218
225
  params: {
@@ -285,7 +292,7 @@ export default {
285
292
  },
286
293
  created() {
287
294
  getOptions({
288
- server: 'product-admin',
295
+ server: 'product-partner',
289
296
  fn: "categories",
290
297
  path: "p4",
291
298
  params: { value: 0 },
@@ -309,6 +316,7 @@ export default {
309
316
  }
310
317
  let params = {
311
318
  ...other,
319
+ ...this.tradeTime,
312
320
  page_token: this.page_token,
313
321
  page_size: this.page_size,
314
322
  channel_code: this.channel_code,
@@ -358,10 +366,11 @@ export default {
358
366
  let params = {
359
367
  ...this.getParams(),
360
368
  };
361
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
369
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
362
370
  this.$message.error('请选择交易时间')
363
371
  return
364
372
  }
373
+
365
374
  console.log(params)
366
375
  let loading = this.$loading({});
367
376
  this.categoryCycSales(params).then(res => {
@@ -414,13 +423,9 @@ export default {
414
423
  // this.channelList = res.data.list
415
424
  this.searchForm = [
416
425
  {
417
- label: '交易时间:', //label
418
- ele: 'xd-date', //package 名称
419
- valueKey: ['time_range_start', 'time_range_end'], //form[valueKey]
420
- value: [yesterDay, yesterDay], //v-model
421
- format: 'yyyy-MM-dd', //时间显示格式
422
- formatValue: 'yyyy-MM-dd', //输出时间格式
423
- placeholder: ['开始时间', '结束时间'],
426
+ label: "交易时间:",
427
+ ele: "slot",
428
+ slot: "trade-date",
424
429
  },
425
430
  // {
426
431
  // label: "分类ID",
@@ -10,6 +10,9 @@
10
10
  @onDone="getList"
11
11
  :key="renderFormKey"
12
12
  >
13
+ <template slot="trade-date">
14
+ <xd-stat-trade-date :isRangeMonth="false" v-model="tradeTime"></xd-stat-trade-date>
15
+ </template>
13
16
  <template slot="time" slot-scope="scope">
14
17
  <div>
15
18
  <el-select
@@ -93,6 +96,7 @@
93
96
  import XdSearch from "@/components/XdSearch";
94
97
  import XdPagination from "@/components/XdPagination.vue";
95
98
  import XdTable from "@/components/XdTable";
99
+ import XdStatTradeDate from "@/components/XdStatTradeDate";
96
100
  import { baseJsDateToTime } from "@/utils/xd.base";
97
101
  import { getOptions } from "@/utils/options";
98
102
  import { mapActions } from "vuex";
@@ -103,6 +107,7 @@ export default {
103
107
  XdPagination, //翻译插件
104
108
  XdSearch, //搜查插件
105
109
  XdTable,
110
+ XdStatTradeDate,
106
111
  },
107
112
  data() {
108
113
  return {
@@ -116,6 +121,8 @@ export default {
116
121
  sort_by: "", //排序字段
117
122
  sort_direct: "", //排序方向 asc递增 desc递减
118
123
 
124
+ tradeTime: null,
125
+
119
126
  //列表对象
120
127
  tables: [],
121
128
  headers: [
@@ -170,7 +177,7 @@ export default {
170
177
  unit: "元",
171
178
  sort: "custom",
172
179
  notice: {
173
- data: ["按支付时间统计已支付客户订单总金额 包含商品售价和运费"],
180
+ data: ["按支付时间统计已支付客户订单总金额 包含商品售价"],
174
181
  },
175
182
  },
176
183
  {
@@ -182,7 +189,7 @@ export default {
182
189
  unit: "元",
183
190
  sort: "custom",
184
191
  notice: {
185
- data: ["按支付时间统计已支付客户订单进货价金额 包含商品进货价和运费 自有商品按货源进货价,非自有商品按平台进货价计"],
192
+ data: ["按支付时间统计已支付客户订单进货价金额 包含商品进货价 自有商品按货源进货价,非自有商品按平台进货价计"],
186
193
  },
187
194
  },
188
195
  {
@@ -310,6 +317,7 @@ export default {
310
317
  }
311
318
  let params = {
312
319
  ...other,
320
+ ...this.tradeTime,
313
321
  page_token: this.page_token,
314
322
  page_size: this.page_size,
315
323
  channel_code: this.channel_code,
@@ -365,10 +373,11 @@ export default {
365
373
  let params = {
366
374
  ...this.getParams(),
367
375
  };
368
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
376
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
369
377
  this.$message.error('请选择交易时间')
370
378
  return
371
379
  }
380
+
372
381
  console.log(params);
373
382
  let loading = this.$loading({});
374
383
 
@@ -450,13 +459,9 @@ export default {
450
459
  this.channelList = res.data.list;
451
460
  this.searchForm = [
452
461
  {
453
- label: "交易时间:", //label
454
- ele: "xd-date", //package 名称
455
- valueKey: ["time_range_start", "time_range_end"], //form[valueKey]
456
- value: [yesterDay, yesterDay], //v-model
457
- format: "yyyy-MM-dd", //时间显示格式
458
- formatValue: "yyyy-MM-dd", //输出时间格式
459
- placeholder: ["开始时间", "结束时间"],
462
+ label: "交易时间:",
463
+ ele: "slot",
464
+ slot: "trade-date",
460
465
  },
461
466
  {
462
467
  label: "商品ID",
@@ -130,7 +130,7 @@
130
130
  </el-table-column>
131
131
  </el-table>
132
132
  <div class="empty_data" v-else>暂无数据</div>
133
- <div style="margin-top: 20px">注:折扣=货源进货价/市场价</div>
133
+ <div style="margin-top: 20px">注:折扣=货源进货价/所选折扣类型</div>
134
134
  </el-card>
135
135
  </template>
136
136
  <script>
@@ -10,6 +10,9 @@
10
10
  @onSearch="handleSearch"
11
11
  @onDone="getList"
12
12
  >
13
+ <template slot="trade-date">
14
+ <xd-stat-trade-date :isRangeMonth="true" v-model="tradeTime"></xd-stat-trade-date>
15
+ </template>
13
16
  <template slot="category_id">
14
17
  <el-cascader v-model="searchOtherForm.category_id" :props="categoryProps" clearable></el-cascader>
15
18
  </template>
@@ -89,6 +92,7 @@
89
92
  import XdSearch from "@/components/XdSearch";
90
93
  import XdPagination from "@/components/XdPagination.vue";
91
94
  import XdTable from "@/components/XdTable";
95
+ import XdStatTradeDate from "@/components/XdStatTradeDate";
92
96
  import { baseJsDateToTime } from "@/utils/xd.base";
93
97
  import { mapActions } from "vuex"
94
98
  import { getOptions } from "@/utils/options"
@@ -98,7 +102,8 @@ export default {
98
102
  components: {
99
103
  XdPagination, //翻译插件
100
104
  XdSearch, //搜查插件
101
- XdTable
105
+ XdTable,
106
+ XdStatTradeDate,
102
107
  },
103
108
  data() {
104
109
  return {
@@ -116,6 +121,8 @@ export default {
116
121
  sort_by: "", //排序字段
117
122
  sort_direct: "", //排序方向 asc递增 desc递减
118
123
 
124
+ tradeTime: null,
125
+
119
126
  //列表对象
120
127
  tables: [],
121
128
  headers: [
@@ -154,7 +161,7 @@ export default {
154
161
  lazy: true,
155
162
  lazyLoad (node, resolve) {
156
163
  getOptions({
157
- server: 'product-admin',
164
+ server: 'product-partner',
158
165
  fn: "categories",
159
166
  path: "p4",
160
167
  params: {
@@ -200,7 +207,7 @@ export default {
200
207
  },
201
208
  created() {
202
209
  getOptions([{
203
- server: 'product-admin',
210
+ server: 'product-partner',
204
211
  fn: "categories",
205
212
  path: "p4",
206
213
  params: { value: 0 },
@@ -226,6 +233,21 @@ export default {
226
233
  divide(price) {
227
234
  return this.$xdHelper.divisionFloatNumber(price, 100);
228
235
  },
236
+ getParams(){
237
+ let { supplier_id, ...other } = this.searchParams;
238
+
239
+ let { category_id } = this.searchOtherForm
240
+ if (category_id && category_id.length) {
241
+ other['category_id'] = category_id[category_id.length - 1]
242
+ }
243
+ let params = {
244
+ ...other,
245
+ ...this.tradeTime,
246
+ supplier_id:this.supplier_ids,
247
+ channel_code: this.channel_code,
248
+ }
249
+ return params;
250
+ },
229
251
  doExport(){
230
252
  this.$prompt('请输入导出文件名称', '提示', {
231
253
  confirmButtonText: '确定',
@@ -233,19 +255,10 @@ export default {
233
255
  inputPattern: /[\S]+/,
234
256
  inputErrorMessage: '请填写正确的名称'
235
257
  }).then(({ value }) => {
236
- let { supplier_id, ...other } = this.searchParams;
237
- if(supplier_id && supplier_id.length > 0){
238
- other.supplier_id = supplier_id[0].value;
239
- }
240
- let { category_id } = this.searchOtherForm
241
- if (category_id && category_id.length) {
242
- other['category_id'] = category_id[category_id.length - 1]
243
- }
258
+
244
259
  let params = {
245
- ...other,
260
+ ...this.getParams(),
246
261
  export: true,
247
- supplier_id:this.supplier_ids,
248
- channel_code: this.channel_code,
249
262
  channel_code_text: this.channel_code_text,
250
263
  supplier_text: this.supplier_text,
251
264
  file_ext: "xlsx",
@@ -267,26 +280,19 @@ export default {
267
280
  * @description 获取数据列表
268
281
  */
269
282
  getList() {
270
- let { ...other } = this.searchParams;
271
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
283
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
272
284
  this.$message.error('请选择交易时间')
273
285
  return
274
286
  }
275
- let { category_id } = this.searchOtherForm
276
- if (category_id && category_id.length) {
277
- other['category_id'] = category_id[category_id.length - 1]
278
- }
279
-
280
287
  //请求数据
281
288
  let params = {
282
- ...other,
289
+ ...this.getParams(),
283
290
  page_token: this.page_token,
284
291
  page_size: this.page_size,
285
- channel_code: this.channel_code,
286
- supplier_id: this.supplier_ids,
287
292
  sort_by: this.sort_by,
288
293
  sort_direct: this.sort_direct,
289
294
  };
295
+
290
296
  console.log(params)
291
297
  let loading = this.$loading({});
292
298
  this.productCategoryCycSales(params).then(res => {
@@ -316,7 +322,7 @@ export default {
316
322
  * @param form 搜索请求参数
317
323
  */
318
324
  handleSearch({ action, form }) {
319
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
325
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
320
326
  this.$message.error('请选择交易时间')
321
327
  return
322
328
  }
@@ -359,13 +365,9 @@ export default {
359
365
 
360
366
  this.searchForm = [
361
367
  {
362
- label: '交易时间:', //label
363
- ele: 'xd-date', //package 名称
364
- valueKey: ['time_range_start', 'time_range_end'], //form[valueKey]
365
- value: [yesterDay, yesterDay], //v-model
366
- format: 'yyyy-MM-dd', //时间显示格式
367
- formatValue: 'yyyy-MM-dd', //输出时间格式
368
- placeholder: ['开始时间', '结束时间'],
368
+ label: "交易时间:",
369
+ ele: "slot",
370
+ slot: "trade-date",
369
371
  },
370
372
  // {
371
373
  // label: "分类ID",
@@ -10,6 +10,9 @@
10
10
  @onSearch="handleSearch"
11
11
  @onDone="getList"
12
12
  >
13
+ <template slot="trade-date">
14
+ <xd-stat-trade-date :isRangeMonth="false" v-model="tradeTime"></xd-stat-trade-date>
15
+ </template>
13
16
  <template slot="common_category">
14
17
  <el-cascader v-model="searchOtherForm.common_category" :props="categoryProps" clearable></el-cascader>
15
18
  </template>
@@ -90,6 +93,7 @@
90
93
  import XdSearch from "@/components/XdSearch";
91
94
  import XdPagination from "@/components/XdPagination.vue";
92
95
  import XdTable from "@/components/XdTable";
96
+ import XdStatTradeDate from "@/components/XdStatTradeDate";
93
97
  import { baseJsDateToTime } from "@/utils/xd.base";
94
98
  import { getOptions } from "@/utils/options"
95
99
  import { mapActions } from "vuex"
@@ -99,7 +103,8 @@ export default {
99
103
  components: {
100
104
  XdPagination, //翻译插件
101
105
  XdSearch, //搜查插件
102
- XdTable
106
+ XdTable,
107
+ XdStatTradeDate,
103
108
  },
104
109
  data() {
105
110
  return {
@@ -114,6 +119,8 @@ export default {
114
119
  sort_by: "total_product_num", //排序字段
115
120
  sort_direct: "desc", //排序方向 asc递增 desc递减
116
121
 
122
+ tradeTime: null,
123
+
117
124
  //列表对象
118
125
  tables: [],
119
126
  headers: [
@@ -158,7 +165,7 @@ export default {
158
165
  lazy: true,
159
166
  lazyLoad (node, resolve) {
160
167
  getOptions({
161
- server: "product-partner",
168
+ server: 'product-partner',
162
169
  fn: "categories",
163
170
  path: "p4",
164
171
  params: {
@@ -218,7 +225,11 @@ export default {
218
225
  if (this.searchOtherForm.common_category && this.searchOtherForm.common_category.length) {
219
226
  other.common_category = this.searchOtherForm.common_category[this.searchOtherForm.common_category.length - 1]
220
227
  }
221
- return other;
228
+ let params = {
229
+ ...other,
230
+ ...this.tradeTime,
231
+ }
232
+ return params;
222
233
  },
223
234
  doExport(){
224
235
  this.$prompt('请输入导出文件名称', '提示', {
@@ -286,10 +297,11 @@ export default {
286
297
  sort_by: this.sort_by,
287
298
  sort_direct: this.sort_direct,
288
299
  };
289
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
300
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
290
301
  this.$message.error('请选择交易时间')
291
302
  return
292
303
  }
304
+
293
305
  console.log(params)
294
306
  let loading = this.$loading({});
295
307
 
@@ -321,7 +333,7 @@ export default {
321
333
  * @param form 搜索请求参数
322
334
  */
323
335
  handleSearch({ action, form }) {
324
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
336
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
325
337
  this.$message.error('请选择交易时间')
326
338
  return
327
339
  }
@@ -350,82 +362,78 @@ export default {
350
362
  }).then(res=>{
351
363
  this.channelList = res.data.list;
352
364
  this.searchForm = [
353
- {
354
- label: '交易时间:', //label
355
- ele: 'xd-date', //package 名称
356
- valueKey: ['time_range_start', 'time_range_end'], //form[valueKey]
357
- value: [yesterDay, yesterDay], //v-model
358
- format: 'yyyy-MM-dd', //时间显示格式
359
- formatValue: 'yyyy-MM-dd', //输出时间格式
360
- placeholder: ['开始时间', '结束时间'],
361
- },
362
- {
363
- label: "商品ID",
364
- ele: "el-input",
365
- valueKey: "product_id",
366
- value: "",
367
- placeholder: "请输入商品ID"
368
- },
369
- // {
370
- // label: "商品名称",
371
- // ele: "el-input",
372
- // valueKey: "product_name",
373
- // value: "",
374
- // placeholder: "请输入商品名称"
375
- // },
376
- {
377
- label: "商品名称:", //label
378
- ele: "xd-remote-select", //package 名称
379
- valueKey: "like_product_id", //form[valueKey]s
380
- value: [], //v-model
381
- placeholder: "请选择商品名称",
382
- multiple: false,
383
- collapseTags: false,
384
- className: 'input40',
385
- remoteSearch: (query, resolve) => {
386
- getOptions({
387
- server: 'product-partner',
388
- fn: 'released-products',
389
- path: 'p1',
390
- params: {
391
- keyword: query,
392
- page_token: 1,
393
- page_size: 500,
394
- }
395
- })
396
- .then(res => {
397
- resolve(res.data.items)
398
- })
399
- .catch(err => {
400
- console.log(err, 'err')
365
+ {
366
+ label: "交易时间:",
367
+ ele: "slot",
368
+ slot: "trade-date",
369
+ },
370
+ {
371
+ label: "商品ID",
372
+ ele: "el-input",
373
+ valueKey: "product_id",
374
+ value: "",
375
+ placeholder: "请输入商品ID"
376
+ },
377
+ // {
378
+ // label: "商品名称",
379
+ // ele: "el-input",
380
+ // valueKey: "product_name",
381
+ // value: "",
382
+ // placeholder: "请输入商品名称"
383
+ // },
384
+ {
385
+ label: "商品名称:", //label
386
+ ele: "xd-remote-select", //package 名称
387
+ valueKey: "like_product_id", //form[valueKey]s
388
+ value: [], //v-model
389
+ placeholder: "请选择商品名称",
390
+ multiple: false,
391
+ collapseTags: false,
392
+ className: 'input40',
393
+ remoteSearch: (query, resolve) => {
394
+ getOptions({
395
+ server: 'product-partner',
396
+ fn: 'released-products',
397
+ path: 'p1',
398
+ params: {
399
+ keyword: query,
400
+ page_token: 1,
401
+ page_size: 500,
402
+ }
401
403
  })
402
- }
403
- },
404
- {
405
- label: "商品类型",
406
- ele: "xd-select-list",
407
- valueKey: "product_type",
408
- value: "",
409
- placeholder: "请选择商品类型",
410
- list: [
411
- { label: "全部", value: "" },
412
- { label: "实物商品", value: "good" },
413
- { label: "电子票券", value: "card" },
414
- { label: "生活服务", value: "network" },
415
- { label: "线上显示", value: "show" },
416
- ]
417
- },
418
- {
419
- label: "供应商:", //label
420
- ele: "slot", //package 名称
421
- slot: "time",
422
- },
423
- {
424
- label: "公共分类: ",
425
- ele: "slot",
426
- slot: "common_category",
427
- },
428
- ];
404
+ .then(res => {
405
+ resolve(res.data.items)
406
+ })
407
+ .catch(err => {
408
+ console.log(err, 'err')
409
+ })
410
+ }
411
+ },
412
+ {
413
+ label: "商品类型",
414
+ ele: "xd-select-list",
415
+ valueKey: "product_type",
416
+ value: "",
417
+ placeholder: "请选择商品类型",
418
+ list: [
419
+ { label: "全部", value: "" },
420
+ { label: "实物商品", value: "good" },
421
+ { label: "电子票券", value: "card" },
422
+ { label: "生活服务", value: "network" },
423
+ { label: "线上显示", value: "show" },
424
+ ]
425
+ },
426
+ {
427
+ label: "供应商:", //label
428
+ ele: "slot", //package 名称
429
+ slot: "time",
430
+ },
431
+ {
432
+ label: "公共分类: ",
433
+ ele: "slot",
434
+ slot: "common_category",
435
+ },
436
+ ];
429
437
  })
430
438
 
431
439
  },
@@ -9,6 +9,9 @@
9
9
  @onSearch="handleSearch"
10
10
  @onDone="getList"
11
11
  >
12
+ <template slot="trade-date">
13
+ <xd-stat-trade-date :isRangeMonth="true" v-model="tradeTime"></xd-stat-trade-date>
14
+ </template>
12
15
  <template slot="supplier">
13
16
  <div>
14
17
  <el-select
@@ -84,6 +87,7 @@
84
87
  import XdSearch from "@/components/XdSearch";
85
88
  import XdPagination from "@/components/XdPagination.vue";
86
89
  import XdTable from "@/components/XdTable";
90
+ import XdStatTradeDate from "@/components/XdStatTradeDate";
87
91
  import { baseJsDateToTime } from "@/utils/xd.base";
88
92
  import { mapActions } from "vuex"
89
93
  import { getOptions } from "@/utils/options"
@@ -93,7 +97,8 @@ export default {
93
97
  components: {
94
98
  XdPagination, //翻译插件
95
99
  XdSearch, //搜查插件
96
- XdTable
100
+ XdTable,
101
+ XdStatTradeDate,
97
102
  },
98
103
  data() {
99
104
  return {
@@ -111,6 +116,8 @@ export default {
111
116
  sort_by: "", //排序字段
112
117
  sort_direct: "", //排序方向 asc递增 desc递减
113
118
 
119
+ tradeTime: null,
120
+
114
121
  //列表对象
115
122
  tables: [],
116
123
  headers: [
@@ -214,6 +221,23 @@ export default {
214
221
  divide(price) {
215
222
  return this.$xdHelper.divisionFloatNumber(price, 100);
216
223
  },
224
+ getParams(){
225
+ let { brand_id,shop_id, ...other } = this.searchParams;
226
+
227
+ if(brand_id && brand_id.length > 0){
228
+ other.brand_id = brand_id[0].value;
229
+ }
230
+ if(shop_id && shop_id.length > 0){
231
+ other.shop_id = shop_id[0].value;
232
+ }
233
+ let params = {
234
+ ...other,
235
+ ...this.tradeTime,
236
+ supplier_id:this.supplier_ids,
237
+ channel_code: this.channel_code,
238
+ }
239
+ return params;
240
+ },
217
241
  doExport(){
218
242
  this.$prompt('请输入导出文件名称', '提示', {
219
243
  confirmButtonText: '确定',
@@ -221,18 +245,9 @@ export default {
221
245
  inputPattern: /[\S]+/,
222
246
  inputErrorMessage: '请填写正确的名称'
223
247
  }).then(({ value }) => {
224
- let { brand_id,shop_id, ...other } = this.searchParams;
225
-
226
- if(brand_id && brand_id.length > 0){
227
- other.brand_id = brand_id[0].value;
228
- }
229
- if(shop_id && shop_id.length > 0){
230
- other.shop_id = shop_id[0].value;
231
- }
248
+
232
249
  let params = {
233
- ...other,
234
- supplier_id:this.supplier_ids,
235
- channel_code: this.channel_code,
250
+ ...this.getParams(),
236
251
  export: true,
237
252
  file_ext: "xlsx",
238
253
  file_name: value,
@@ -253,28 +268,20 @@ export default {
253
268
  * @description 获取数据列表
254
269
  */
255
270
  getList() {
256
- let { brand_id,shop_id, ...other } = this.searchParams;
257
- if(brand_id && brand_id.length > 0){
258
- other.brand_id = brand_id[0].value;
259
- }
260
- if(shop_id && shop_id.length > 0){
261
- other.shop_id = shop_id[0].value;
262
- }
263
271
 
264
272
  //请求数据
265
273
  let params = {
266
- ...other,
267
- supplier_id:this.supplier_ids,
268
- channel_code: this.channel_code,
274
+ ...this.getParams(),
269
275
  page_token: this.page_token,
270
276
  page_size: this.page_size,
271
277
  sort_by: this.sort_by,
272
278
  sort_direct: this.sort_direct,
273
279
  };
274
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
280
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
275
281
  this.$message.error('请选择交易时间')
276
282
  return
277
283
  }
284
+
278
285
  console.log(params)
279
286
  let loading = this.$loading({});
280
287
  this.offlineShopSalesSupplier(params).then(res => {
@@ -305,7 +312,7 @@ export default {
305
312
  * @param form 搜索请求参数
306
313
  */
307
314
  handleSearch({ action, form }) {
308
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
315
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
309
316
  this.$message.error('请选择交易时间')
310
317
  return
311
318
  }
@@ -326,14 +333,10 @@ export default {
326
333
  yesterDay = yesterDay.split(' ')[0];
327
334
 
328
335
  this.searchForm = [
329
- {
330
- label: '交易时间', //label
331
- ele: 'xd-date', //package 名称
332
- valueKey: ['time_range_start', 'time_range_end'], //form[valueKey]
333
- value: [yesterDay,yesterDay], //v-model
334
- format: 'yyyy/MM/dd', //时间显示格式
335
- formatValue: 'yyyy-MM-dd', //输出时间格式
336
- placeholder: ['开始时间', '结束时间'],
336
+ {
337
+ label: "交易时间:",
338
+ ele: "slot",
339
+ slot: "trade-date",
337
340
  },
338
341
  {
339
342
  label: "供应商: ",
@@ -10,6 +10,9 @@
10
10
  @onSearch="handleSearch"
11
11
  @onDone="getList"
12
12
  >
13
+ <template slot="trade-date" slot-scope="scope">
14
+ <xd-stat-trade-date :isRangeMonth="true" v-model="tradeTime"></xd-stat-trade-date>
15
+ </template>
13
16
  <template slot="time" slot-scope="scope">
14
17
  <div>
15
18
  <el-select
@@ -86,6 +89,7 @@
86
89
  import XdSearch from "@/components/XdSearch";
87
90
  import XdPagination from "@/components/XdPagination.vue";
88
91
  import XdTable from "@/components/XdTable";
92
+ import XdStatTradeDate from "@/components/XdStatTradeDate";
89
93
  import { baseJsDateToTime } from "@/utils/xd.base";
90
94
  import { getOptions } from "@/utils/options"
91
95
  import { mapActions } from "vuex"
@@ -95,7 +99,8 @@ export default {
95
99
  components: {
96
100
  XdPagination, //翻译插件
97
101
  XdSearch, //搜查插件
98
- XdTable
102
+ XdTable,
103
+ XdStatTradeDate
99
104
  },
100
105
  data() {
101
106
  return {
@@ -110,6 +115,7 @@ export default {
110
115
  sort_direct: "", //排序方向 asc递增 desc递减
111
116
  totalData: {},
112
117
  supplierLevel: [],
118
+ tradeTime: null,
113
119
 
114
120
  //列表对象
115
121
  tables: [],
@@ -204,6 +210,15 @@ export default {
204
210
  divide(price) {
205
211
  return this.$xdHelper.divisionFloatNumber(price, 100);
206
212
  },
213
+ getParams(){
214
+ let params = {
215
+ ...this.searchParams,
216
+ ...this.tradeTime,
217
+ channel_code: this.channel_code,
218
+ supplier_id: this.supplier_ids
219
+ };
220
+ return params;
221
+ },
207
222
  doExport(){
208
223
  this.$prompt('请输入导出文件名称', '提示', {
209
224
  confirmButtonText: '确定',
@@ -211,14 +226,8 @@ export default {
211
226
  inputPattern: /[\S]+/,
212
227
  inputErrorMessage: '请填写正确的名称'
213
228
  }).then(({ value }) => {
214
- let { supplier_id, ...other } = this.searchParams;
215
- if(supplier_id && supplier_id.length > 0){
216
- other.supplier_id = supplier_id[0].value;
217
- }
218
229
  let params = {
219
- ...other,
220
- supplier_id:this.supplier_ids,
221
- channel_code: this.channel_code,
230
+ ...this.getParams(),
222
231
  export: true,
223
232
  file_ext: "xlsx",
224
233
  channel_code_text: this.channel_code_text,
@@ -241,24 +250,19 @@ export default {
241
250
  * @description 获取数据列表
242
251
  */
243
252
  getList() {
244
- let { supplier_id, ...other } = this.searchParams;
245
- // if(supplier_id && supplier_id.length > 0){
246
- // other.supplier_id = supplier_id[0].value;
247
- // }
248
- //请求数据
253
+
249
254
  let params = {
250
- ...other,
251
- channel_code: this.channel_code,
252
- supplier_id: this.supplier_ids,
255
+ ...this.getParams(),
253
256
  page_token: this.page_token,
254
257
  page_size: this.page_size,
255
258
  sort_by: this.sort_by,
256
259
  sort_direct: this.sort_direct,
257
260
  };
258
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
261
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
259
262
  this.$message.error('请选择交易时间')
260
263
  return
261
264
  }
265
+
262
266
  console.log(params)
263
267
  let loading = this.$loading({});
264
268
  this.supplierCycSales(params).then(res => {
@@ -308,11 +312,12 @@ export default {
308
312
  * @param form 搜索请求参数
309
313
  */
310
314
  handleSearch({ action, form }) {
315
+ console.log(this.tradeTime);
311
316
  if (action === "reset") {
312
317
  this.channel_code = "";
313
318
  this.supplier_ids = "";
314
319
  }
315
- if(!this.searchParams.time_range_start||!this.searchParams.time_range_end){
320
+ if(!this.tradeTime || !this.tradeTime.time_range_start){
316
321
  this.$message.error('请选择交易时间')
317
322
  return
318
323
  }
@@ -328,13 +333,9 @@ export default {
328
333
  yesterDay = yesterDay.split(' ')[0];
329
334
  this.searchForm = [
330
335
  {
331
- label: '交易时间:', //label
332
- ele: 'xd-date', //package 名称
333
- valueKey: ['time_range_start', 'time_range_end'], //form[valueKey]
334
- value: [yesterDay, yesterDay], //v-model
335
- format: 'yyyy-MM-dd', //时间显示格式
336
- formatValue: 'yyyy-MM-dd', //输出时间格式
337
- placeholder: ['开始时间', '结束时间'],
336
+ label: "交易时间:",
337
+ ele: "slot",
338
+ slot: "trade-date",
338
339
  },
339
340
  {
340
341
  label: "供应商:", //label
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.63",
3
+ "version": "1.1.64",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {