jufubao-admin-library 1.1.48 → 1.1.50

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.
@@ -108,5 +108,30 @@ module.exports = {
108
108
  isPublic: true,
109
109
  role: ""
110
110
  },
111
+ {
112
+ title: "统计-礼包统计-累计统计",
113
+ mapFn: "getGiftTotalCounts",
114
+ path: "/stat-partner/v1/gift-stat/gift-total-counts",
115
+ isRule: false,
116
+ params: {
117
+ filter_site_id: ['filter_site_id', 'String', '必填'],
118
+ filter_business_code: ['filter_business_code', 'String', '必填'],
119
+ },
120
+ disabled: true,
121
+ role: ""
122
+ },
123
+ {
124
+ title: "统计-礼包统计-礼包利润率分布",
125
+ mapFn: "getGiftProfitRatios",
126
+ path: '/stat-partner/v1/gift-stat/gift-profit-ratios',
127
+ isRule: false,
128
+ params: {
129
+ filter_site_id: ['filter_site_id', 'String', '必填'],
130
+ filter_business_code: ['filter_business_code', 'String', '必填'],
131
+ },
132
+ disabled: true,
133
+ role: ""
134
+ },
135
+
111
136
  ]
112
137
  }
@@ -0,0 +1,264 @@
1
+
2
+ <template>
3
+ <el-card class="stat_all_card">
4
+ <div slot="header" class="card_header">
5
+ <div>
6
+ <span class="b_tit">累计商品统计</span>
7
+ <span class="s_tit">数据更新:{{ statAll.last_updated_date_time }}</span>
8
+ </div>
9
+ <!-- <i class="el-icon-refresh" @click="toRefresh"></i> -->
10
+ </div>
11
+ <div class="stat_list">
12
+ <div class="stat_item">
13
+ <p class="_title">
14
+ 礼包总数
15
+ <el-tooltip effect="light" content="礼包表中总的礼包数量" placement="right">
16
+ <i class="xdicon_question-circle xd_admin_iconfont"></i>
17
+ </el-tooltip>
18
+ </p>
19
+ <div class="_cont">
20
+ <div class="_left">{{ statAll.total_count }}</div>
21
+ <div class="_right">
22
+ <div class="right_i right_top">
23
+ <div class="one_line">
24
+ {{statAll.self_total_count}} (自组礼包 )
25
+ </div>
26
+ <div class="two_line">
27
+ <div>上架{{statAll.self_online_count}}</div>
28
+ <div>下架{{ statAll.self_offline_count }}</div>
29
+ </div>
30
+ </div>
31
+ <!-- <div class="right_i right_middle">
32
+ <div class="one_line">
33
+ {{statAll.product_self_channel_count}} (自营-接口)
34
+ </div>
35
+ <div class="two_line">
36
+ <div>上架{{statAll.product_self_channel_online_count}}</div>
37
+ <div>下架{{ statAll.product_self_channel_offline_count }}</div>
38
+ </div>
39
+ </div> -->
40
+ <div class="right_i right_bottom">
41
+ <div class="one_line">
42
+ {{statAll.other_total_count}}(非自组礼包)
43
+ </div>
44
+ <div class="two_line">
45
+ <div>上架{{statAll.other_online_count}}</div>
46
+ <div>下架{{statAll.other_offline_count}}</div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <div class="stat_item">
53
+ <p class="_title">
54
+ 单品总数
55
+ <el-tooltip effect="light" content="总共商品数量,多规格商品计一个" placement="right">
56
+ <i class="xdicon_question-circle xd_admin_iconfont"></i>
57
+ </el-tooltip>
58
+ </p>
59
+ <div class="_cont">
60
+ <div class="_left">{{statAll.single_total_count}}</div>
61
+ <div class="_right">
62
+ <div class="right_i right_top">
63
+ <div class="one_line">
64
+ {{statAll.single_self_manual_total_count}} (自营-人工)
65
+ </div>
66
+ <div class="two_line">
67
+ <div>上架{{statAll.single_self_manual_on_count}}</div>
68
+ <div>下架{{statAll.single_self_manual_off_count}}</div>
69
+ </div>
70
+ </div>
71
+ <div class="right_i right_middle">
72
+ <div class="one_line">
73
+ {{statAll.single_self_channel_total_count}} (自营-接口)
74
+ </div>
75
+ <div class="two_line">
76
+ <div>上架{{statAll.single_self_channel_on_count}}</div>
77
+ <div>下架{{statAll.single_self_channel_off_count}}</div>
78
+ </div>
79
+ </div>
80
+ <div class="right_i right_bottom">
81
+ <div class="one_line">
82
+ {{statAll.single_other_total_count}}(非自营)
83
+ </div>
84
+ <div class="two_line">
85
+ <div>上架{{statAll.single_other_on_count}}</div>
86
+ <div>下架{{statAll.single_other_off_count}}</div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ </div>
93
+
94
+ </el-card>
95
+ </template>
96
+ <script>
97
+
98
+ import {mapActions} from 'vuex';
99
+
100
+ export default {
101
+ data(){
102
+ return {
103
+ statAll: {}
104
+ }
105
+ },
106
+ props: {
107
+ site_id: {
108
+ type: Number|String,
109
+ default: null
110
+ },
111
+ business_code: {
112
+ type: Number|String,
113
+ default: null
114
+ },
115
+ sub_business_code:{
116
+ type: Number|String,
117
+ default: null
118
+ },
119
+ },
120
+ watch: {
121
+ site_id(n,o) {
122
+ console.log(n,o,'askjdkasjdaksl');
123
+ this.p_totalCounts()
124
+ },
125
+ business_code(n,o) {
126
+ console.log(n,o,'askjdkasjdaksl');
127
+ this.p_totalCounts()
128
+ },
129
+ },
130
+ created(){
131
+ console.log('sub_business_codeStat',this.sub_business_code)
132
+ this.p_totalCounts();
133
+ },
134
+ methods: {
135
+ ...mapActions("productStat", ["getGiftTotalCounts","totalProductCounts"]),
136
+ toRefresh(){
137
+ this.p_totalCounts();
138
+ },
139
+ p_totalCounts(){
140
+ let loading = this.$loading({});
141
+ this.getGiftTotalCounts({
142
+ filter_site_id: this.site_id?this.site_id:null,
143
+ filter_business_code: this.business_code?this.business_code:null,
144
+ }).then(res => {
145
+ this.statAll = res.data
146
+ loading.close();
147
+ }).catch(err => {
148
+ loading.close();
149
+ })
150
+ }
151
+ }
152
+ }
153
+ </script>
154
+
155
+ <style lang="less" scoped>
156
+
157
+ .stat_all_card{
158
+ /deep/ .el-card__body{
159
+ overflow: auto;
160
+ }
161
+ }
162
+ .card_header{
163
+ display: flex;
164
+ align-items: center;
165
+ justify-content: space-between;
166
+ & > i{
167
+ font-size: 24px;
168
+ cursor: pointer;
169
+ }
170
+ }
171
+ .b_tit{
172
+ font-size: 18px;
173
+ font-weight: 400;
174
+ color:#2E3033;
175
+ }
176
+ .s_tit{
177
+ font-size: 12px;
178
+ color: #A1A7B3;
179
+ margin-left: 10px;
180
+ vertical-align: bottom;
181
+ }
182
+ .stat_list{
183
+ display: flex;
184
+ justify-content: space-around;
185
+ min-width: 800px;
186
+ .stat_item{
187
+ margin-right: 30px;
188
+ ._title{
189
+ margin: 0;
190
+ font-size: 14px;
191
+ font-weight: 400;
192
+ color: #2E3033;
193
+ display: flex;
194
+ margin-bottom: 10px;
195
+
196
+ i{
197
+ cursor: pointer;
198
+ margin-left: 4px;
199
+ color: #A1A7B3;
200
+ }
201
+ }
202
+ ._cont{
203
+ display: flex;
204
+ align-items: center;
205
+ color: #1A66FF;
206
+ font-weight: 500;
207
+ }
208
+ ._left{
209
+ font-size: 32px;
210
+ font-weight: 500;
211
+ }
212
+ ._right{
213
+ display: flex;
214
+ flex-direction: column;
215
+ &.one_level{
216
+ .right_i{
217
+ background: none !important;
218
+ padding-bottom: 0 !important;
219
+ padding-top: 0 !important;
220
+ }
221
+ }
222
+
223
+ .right_i{
224
+ display: flex;
225
+ align-items: center;
226
+ justify-content: space-between;
227
+ height: 50px;
228
+ font-size: 18px;
229
+ padding-left: 30px;
230
+ width: 280px;
231
+
232
+ &.right_top{
233
+ background: url("https://img5.jufubao.cn/uploads/20240125/7e6795baf598ae77ed7e03d06a8fe745.png?ver=1706170701199") no-repeat;
234
+ background-position: left 50%;
235
+ background-size: 28px auto;
236
+ padding-bottom: 10px;
237
+
238
+ }
239
+ &.right_middle {
240
+ background: url("https://img3.jufubao.cn/uploads/20240125/330e2d776b3bb9372cfaf4143b0e93d4.png?ver=1706170701199") no-repeat;
241
+ background-position: left 50%;
242
+ background-size: 30px auto;
243
+ }
244
+ &.right_bottom{
245
+ background: url("https://img.jufubao.cn/uploads/20240125/f68ca65ddff3a29522a7fecf180ed0e7.png?ver=1706170701199") no-repeat;
246
+ background-position: left 50%;
247
+ background-size: 28px auto;
248
+ padding-top: 10px;
249
+ }
250
+
251
+
252
+ .two_line{
253
+ width: 80px;
254
+ & > div{
255
+ margin: 2px 0;
256
+ font-size: 12px;
257
+ text-align: left;
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ </style>
@@ -19,7 +19,7 @@
19
19
  >
20
20
  </el-option>
21
21
  </el-select>
22
- <el-select v-model="sub_business_code" placeholder="请选择子业务线">
22
+ <el-select v-if="business_code!=='gift'" v-model="sub_business_code" placeholder="请选择子业务线">
23
23
  <el-option
24
24
  v-for="item in subBusinessList"
25
25
  :key="item.value"
@@ -30,13 +30,19 @@
30
30
  </el-select>
31
31
  </div>
32
32
  <stat-all
33
- v-if="site_id&&business_code&&status"
33
+ v-if="site_id&&business_code==='mall'&&status"
34
34
  :site_id="site_id"
35
35
  :business_code="business_code"
36
36
  :sub_business_code="sub_business_code"
37
37
  v-permission="[Role.totalCounts]"
38
38
  ></stat-all>
39
- <el-card v-if="has_tab&&site_id&&business_code&&status" style="margin-top: 20px">
39
+ <stat-all-gift
40
+ v-if="site_id&&business_code==='gift'&&status"
41
+ :site_id="site_id"
42
+ :business_code="business_code"
43
+ :sub_business_code="sub_business_code"
44
+ ></stat-all-gift>
45
+ <el-card v-if="has_tab&&site_id&&business_code==='mall'&&status" style="margin-top: 20px">
40
46
  <el-tabs v-model="activeName">
41
47
  <el-tab-pane v-if="has_tab_supplier" label="商品(线上客户订单)" name="supplier">
42
48
  <table-product
@@ -64,15 +70,25 @@
64
70
  </el-tab-pane>
65
71
  </el-tabs>
66
72
  </el-card>
73
+ <xd-stat-table-group
74
+ v-if="has_tab&&site_id&&business_code==='gift'&&status" style="margin-top: 20px"
75
+ title="礼包利润率分布"
76
+ title_tip="取礼包列表数据统计"
77
+ :getList="getGiftProfitRatios"
78
+ :params="{filter_site_id:site_id}"
79
+ >
80
+ </xd-stat-table-group>
67
81
  </div>
68
82
  </template>
69
83
 
70
84
  <script>
71
85
  import { mapActions } from "vuex";
72
86
  import statAll from "./components/stat-all.vue";
87
+ import statAllGift from "./components/stat-all-gift.vue";
73
88
  import tableBrand from "./components/table-brand.vue";
74
89
  import tableProduct from "./components/table-product.vue";
75
90
  import tableCategory from "./components/table-category.vue";
91
+ import XdStatTableGroup from "@/components/XdStatTableGroup.vue"
76
92
  import checkPermission from "@/utils/permission";
77
93
  import Role from "@/constant/modules/supplierStat";
78
94
  import { getOptions } from "@/utils/options";
@@ -84,6 +100,8 @@ export default {
84
100
  tableBrand,
85
101
  tableProduct,
86
102
  tableCategory,
103
+ statAllGift,
104
+ XdStatTableGroup
87
105
  },
88
106
  data() {
89
107
  return {
@@ -166,7 +184,8 @@ export default {
166
184
  ...mapActions("productStat", [
167
185
  "getBusinessList",
168
186
  "getBusinessChildrenList",
169
- "getSitesList"
187
+ "getSitesList",
188
+ "getGiftProfitRatios"
170
189
  ]),
171
190
  getBusiness() {
172
191
  this.getBusinessList({
@@ -42,7 +42,7 @@
42
42
  <div class="stat_item">
43
43
  <p class="_title">
44
44
  货源商品总数
45
- <el-tooltip effect="light" content="新增供应商按创建时间统计;关闭供应商按最近关闭时间统计,周期内多次关闭按1次计;" placement="right">
45
+ <el-tooltip effect="light" content="全部自有供应商的商品数量,多规格商品计1" placement="right">
46
46
  <i class="xdicon_question-circle xd_admin_iconfont"></i>
47
47
  </el-tooltip>
48
48
  </p>
@@ -9,7 +9,7 @@ module.exports = {
9
9
  mapFn: 'getAsyncList',
10
10
  isRule: false,
11
11
  title: '获取任务列表',
12
- // #ifdef admin partner partner-stat oa-finance supplier saas-admin saas-admin partner-saas
12
+ // #ifdef admin partner partner-stat oa-finance supplier saas-admin saas-admin partner-saas partner-wholesale
13
13
  path: '/@@@@/v1/async/list',
14
14
  // #endif
15
15
  //#ifdef partner-gift partner-mall partner-movie partner-market
@@ -33,7 +33,7 @@ module.exports = {
33
33
  mapFn: 'asyncRetry',
34
34
  isRule: false,
35
35
  title: '任务query',
36
- // #ifdef admin partner partner-stat oa-finance supplier saas-admin partner-saas
36
+ // #ifdef admin partner partner-stat oa-finance supplier saas-admin partner-saas partner-wholesale
37
37
  path: '/@@@@/v1/async/retry',
38
38
  // #endif
39
39
  // #ifdef partner-gift partner-mall partner-movie partner-market
@@ -235,7 +235,12 @@ export default {
235
235
  params = {from:'partner'}
236
236
  // #endif
237
237
  getOptions({
238
+ // #ifndef partner-wholesale
238
239
  server:'export-public',
240
+ // #endif
241
+ // #ifdef partner-wholesale
242
+ server:'wholesale-public',
243
+ // #endif
239
244
  fn:'data-tags',
240
245
  path: 'p1',
241
246
  params
@@ -49,6 +49,14 @@ module.exports = {
49
49
  disabled: true,
50
50
  role: '@@@.@@@.PURCHASE_MAIN_ORDER_GET',
51
51
  },
52
+ {
53
+ title: '集采主单详情商品导出',
54
+ mapFn: "purchaseMainOrderInfoExport",
55
+ isRule: false,
56
+ resultKey: "data",
57
+ disabled: true,
58
+ role: '@@@.@@@.PURCHASE_MAIN_ORDER_PRODUCT_EXPORT',
59
+ },
52
60
  {
53
61
  title: '订单主单详情',
54
62
  mapFn: "mainOrderDetail",
@@ -19,7 +19,10 @@
19
19
  </el-card>
20
20
  <el-card class="app-container__list">
21
21
  <div class="mb-10">商品({{product_num}}个)</div>
22
- <div class="mb-10">配送至 <i class="el-icon-location-information"></i>{{baseData.main_order.receipt_province_name}}{{baseData.main_order.receipt_city_name}}{{baseData.main_order.receipt_area_name}}{{baseData.main_order.receipt_street_name}}{{baseData.main_order.receipt_address_detail}}</div>
22
+ <div class="export_box">
23
+ <div class="mb-10">配送至 <i class="el-icon-location-information"></i>{{baseData.main_order.receipt_province_name}}{{baseData.main_order.receipt_city_name}}{{baseData.main_order.receipt_area_name}}{{baseData.main_order.receipt_street_name}}{{baseData.main_order.receipt_address_detail}}</div>
24
+ <el-button v-if="isExport" type="primary" size="small" @click="handleExport">导出</el-button>
25
+ </div>
23
26
  <div class="app-container__list-table">
24
27
  <xd-table
25
28
  :default-select="['12987122','12987126']"
@@ -91,6 +94,25 @@
91
94
  label-width="140px"
92
95
  ></xd-base-dynamic-field>
93
96
  </xd-dialog>
97
+ <xd-dialog :show.sync="dialogExport" title="请输入文件名称" width="500px">
98
+ <el-form
99
+ @submit.native.prevent
100
+ :model="exportFrom"
101
+ :rules="exportRules"
102
+ ref="exportRuleForm"
103
+ label-width="80px">
104
+ <el-form-item label="文件名称" prop="name">
105
+ <el-input
106
+ v-model="exportFrom.name"
107
+ @keyup.enter.native="saveExportForm"
108
+ placeholder="请输入文件名称" />
109
+ </el-form-item>
110
+ </el-form>
111
+ <div slot="btn">
112
+ <el-button type="primary" @click="saveExportForm">确定</el-button>
113
+ <el-button type="default" @click="cancelExportForm">返回</el-button>
114
+ </div>
115
+ </xd-dialog>
94
116
  </div>
95
117
  </template>
96
118
 
@@ -213,12 +235,30 @@ export default {
213
235
  changeIndex:'',
214
236
  changeRow:null,
215
237
  product_num:0,
238
+ //文件名称
239
+ dialogExport:false,
240
+ exportFrom:{
241
+ name:'',
242
+ },
243
+ exportRules: {
244
+ name: [
245
+ {
246
+ required: true,
247
+ message: "请输入文件名称",
248
+ trigger: "blur",
249
+ },
250
+ { min: 0, max: 20, message: '文件名称长度不能超过20', trigger: 'blur' }
251
+ ],
252
+ },
216
253
  }
217
254
  },
218
255
  computed: {
219
256
  isOperate(){
220
257
  return checkPermission([permissions.enterprise_buy.purchaseDetailOperate])
221
258
  },
259
+ isExport(){
260
+ return checkPermission([permissions.enterprise_buy.purchaseMainOrderInfoExport])
261
+ },
222
262
  },
223
263
  created () {
224
264
  this.id = this.$route.params.id
@@ -442,6 +482,43 @@ export default {
442
482
  handeleRefresh(){
443
483
  this.getOrderDetail();
444
484
  },
485
+ /**导出售后订单**/
486
+ handleExport () {
487
+ this.dialogExport = true
488
+ },
489
+ //导出确定
490
+ saveExportForm(){
491
+ this.$refs['exportRuleForm'].validate((valid) => {
492
+ if (valid) {
493
+ let params = {
494
+ purchase_main_order_id: this.id,
495
+ export: 1,
496
+ file_ext: 'xlsx',
497
+ file_name: this.exportFrom.name,
498
+ }
499
+ let loading = Loading.service({})
500
+ this.purchaseMainOrderInfo(params).then(res => {
501
+ console.log(res, 'asdasda')
502
+ this.$message.success('导出任务已经开始执行,请去任务管理查看下载状态')
503
+ this.exportFrom.name = ''
504
+ this.dialogExport = false
505
+ loading.close()
506
+ }).catch(err => {
507
+ console.log(err, 'err')
508
+ loading.close()
509
+ })
510
+ } else {
511
+ console.log('error submit!!');
512
+ return false;
513
+ }
514
+ });
515
+ },
516
+ //导出取消
517
+ cancelExportForm(){
518
+ this.dialogExport = false
519
+ this.exportFrom.name = ''
520
+ this.$refs['exportRuleForm'].clearValidate()
521
+ },
445
522
  }
446
523
  }
447
524
 
@@ -497,5 +574,9 @@ export default {
497
574
  .red{
498
575
  color: red!important;
499
576
  }
577
+ .export_box{
578
+ display: flex;
579
+ justify-content: space-between;
580
+ }
500
581
  </style>
501
582
 
@@ -0,0 +1,90 @@
1
+ import Layout from '@/layout'
2
+ import roles from '@/constant/permissions' //引用权限值
3
+ // #ifdef partner
4
+ const service = roles.service
5
+ // #endif
6
+ const applyRouter = {
7
+ path: '/apply',
8
+ component: Layout,
9
+ sort: 95,
10
+ // #ifdef partner
11
+ name: '核销号段调价管理',
12
+ alwaysShow: false,
13
+ // #endif
14
+ // #ifndef partner
15
+ name: '应用管理',
16
+ alwaysShow: true,
17
+ // #endif
18
+ meta: {
19
+ // #ifdef partner
20
+ title: '核销号段调价管理',
21
+ // #endif
22
+ // #ifndef partner
23
+ title: '应用管理',
24
+ // #endif
25
+ icon: 'el-icon-s-release',
26
+ iconSize: 20,
27
+ // #ifdef partner
28
+ roles: [service.getServiceFeeRuleList]
29
+ // #endif
30
+ },
31
+ children: [
32
+ {
33
+ path: 'list',
34
+ name: 'thirdList',
35
+ component: () => import('@/viewsThird/list'),
36
+ meta: {
37
+ // #ifdef partner
38
+ title: '核销号段调价管理',
39
+ // #endif
40
+ // #ifndef partner
41
+ title: '应用管理列表',
42
+ // #endif
43
+ icon: 'el-icon-s-release',
44
+ // #ifdef partner
45
+ roles: [service.getServiceFeeRuleList]
46
+ // #endif
47
+ }
48
+ },
49
+ {
50
+ path: 'add',
51
+ name: 'addServiceFee',
52
+ component: () => import('@/viewsThird/create'),
53
+ hidden: true,
54
+ meta: {
55
+ // #ifdef partner
56
+ title: '创建核销号段调价',
57
+ // #endif
58
+ // #ifndef partner
59
+ title: '创建服务费',
60
+ // #endif
61
+ icon: 'el-icon-s-release',
62
+ activeMenu: '/apply/list',
63
+ // #ifdef partner
64
+ roles: [service.addServiceFeeRule]
65
+ // #endif
66
+ }
67
+ },
68
+ {
69
+ path: 'edit/:id',
70
+ name: 'editServiceFee',
71
+ component: () => import('@/viewsThird/create'),
72
+ hidden: true,
73
+ meta: {
74
+ // #ifdef partner
75
+ title: '编辑核销号段调价',
76
+ // #endif
77
+ // #ifndef partner
78
+ title: '编辑服务费',
79
+ // #endif
80
+ icon: 'el-icon-s-release',
81
+ activeMenu: '/apply/list',
82
+ // #ifdef partner
83
+ roles: [service.editServiceFeeRule]
84
+ // #endif
85
+ }
86
+ },
87
+ ]
88
+ }
89
+
90
+ export default applyRouter