diff --git a/antis-ncc-admin/src/components/kpi-drill/billing-analysis.vue b/antis-ncc-admin/src/components/kpi-drill/billing-analysis.vue index d0a2d43..c246715 100644 --- a/antis-ncc-admin/src/components/kpi-drill/billing-analysis.vue +++ b/antis-ncc-admin/src/components/kpi-drill/billing-analysis.vue @@ -6,7 +6,7 @@
- 每日开单金额 & 人数 + 日度成交趋势
@@ -15,7 +15,7 @@
- 本月成交明细 + 成交明细清单
- 每日消耗金额 & 人数 + 日度消耗趋势
@@ -15,7 +15,7 @@
- 本月消耗明细 + 消耗明细清单
- 各门店退卡金额分布(不包含转卡) + 门店退卡分布 @@ -18,7 +18,7 @@
- 退卡明细 + 退卡明细清单 显示全部 diff --git a/antis-ncc-admin/src/views/extend/annualSummary/dashboard/index.vue b/antis-ncc-admin/src/views/extend/annualSummary/dashboard/index.vue index 4ae9dc8..f1fa322 100644 --- a/antis-ncc-admin/src/views/extend/annualSummary/dashboard/index.vue +++ b/antis-ncc-admin/src/views/extend/annualSummary/dashboard/index.vue @@ -3,7 +3,7 @@
-

年度经营统计分析

+

年度经营全景报告

@@ -29,31 +29,31 @@ - 月度趋势分析 + 月度经营趋势 - 全年门店业绩表 + 年度业绩总览 - 全年门店消耗表 + 年度消耗总览 - 年度门店人头表 + 年度客流量总览 - 年度门店人次表 + 年度到店频次总览 - 年度门店项目数表 + 年度项目量总览 - 门店五项指标统计 + 门店综合指标 - 事业部五项指标统计 + 事业部综合指标 - 事业部内部汇总 + 事业部经营汇总 @@ -67,7 +67,7 @@
- 业绩走势对比 + 业绩趋势对比
@@ -76,7 +76,7 @@
- 消耗走势对比 + 消耗趋势对比
@@ -87,7 +87,7 @@
- 客头数走势 + 客流量趋势
@@ -96,7 +96,7 @@
- 客次数走势 + 到店频次趋势
@@ -105,7 +105,7 @@
- 项目数走势 + 项目量趋势
@@ -115,7 +115,7 @@
- 月度趋势数据列表 + 月度趋势明细
- 业绩走势图 + 业绩趋势图
@@ -145,7 +145,7 @@
- 业绩数据列表 + 业绩明细表
@@ -168,7 +168,7 @@
- 消耗走势图 + 消耗趋势图
@@ -176,7 +176,7 @@
- 消耗数据列表 + 消耗明细表
- 人头数走势图 + 客流量趋势图
@@ -206,7 +206,7 @@
- 人头数据列表 + 客流量明细表
- 人次走势图 + 到店频次趋势图
@@ -236,7 +236,7 @@
- 人次数据列表 + 到店频次明细表
@@ -259,7 +259,7 @@
- 项目数走势图 + 项目量趋势图
@@ -267,7 +267,7 @@
- 项目数据列表 + 项目量明细表
diff --git a/antis-ncc-admin/src/views/statisticsList/form9.vue b/antis-ncc-admin/src/views/statisticsList/form9.vue index e6ae4a4..ac2d64f 100644 --- a/antis-ncc-admin/src/views/statisticsList/form9.vue +++ b/antis-ncc-admin/src/views/statisticsList/form9.vue @@ -3,7 +3,7 @@
-

集团驾驶舱 本月经营动态监测

+

战略决策指挥中心 实时经营态势感知

@@ -60,7 +60,7 @@
- 会员核心指标 + 会员资产全景
@@ -246,7 +246,7 @@
- 会员类型分布 + 会员结构洞察
@@ -256,7 +256,7 @@
- 会员分类统计 + 会员价值分层
@@ -294,7 +294,7 @@
- 营收与服务产出趋势分析 + 经营效能趋势 按月 按天 @@ -308,7 +308,7 @@
- 拓客全链路转化漏斗 + 客户获取转化链
@@ -324,7 +324,7 @@ -
门店业绩琅琊榜
+
门店卓越榜
@@ -339,7 +339,7 @@
- 核心员效贡献矩阵 + 团队效能矩阵 开单榜 @@ -367,7 +367,7 @@ -
金三角战队协同榜
+
协同作战榜
{{ idx + 1 }} @@ -384,14 +384,14 @@ -
会员到店频次分布
+
客户活跃度分析
-
消耗品项 TOP 10
+
热门服务品项
{{ idx + 1 }} @@ -406,7 +406,7 @@ -
开单品项 TOP 10
+
热销产品品项
{{ idx + 1 }} @@ -617,12 +617,12 @@ export default { const d = this.kpiData || {} const tkCount = (this.tkStatisticsData && this.tkStatisticsData.TkCount) ? this.tkStatisticsData.TkCount : 0 return [ - { tooltip: '本月现金业绩,不包含退款业绩', key: 'billing', label: '本月成交总额', value: this.formatMoney(d.TotalBillingAmount), raw: d.TotalBillingAmount || 0, icon: 'el-icon-wallet', type: 'primary', isMoney: true }, - { tooltip: '', key: 'consume', label: '本月消耗金额', value: this.formatMoney(d.TotalConsumeAmount), raw: d.TotalConsumeAmount || 0, icon: 'el-icon-medal', type: 'success', isMoney: true }, - { tooltip: '成交总额-退款业绩', key: 'net', label: '完成业绩(净额)', value: this.formatMoney(d.CompletedBillingAmount), raw: d.CompletedBillingAmount || 0, icon: 'el-icon-trophy', type: 'warning', isMoney: true }, - { tooltip: '完成业绩(净额)/目标值', key: 'target', label: '开单目标达成', value: d.BillingCompletionRate || 0, raw: d.BillingCompletionRate || 0, icon: 'el-icon-pie-chart', type: 'info', isPercent: true, target: this.formatMoney(d.TargetBillingAmount), targetRaw: d.TargetBillingAmount || 0, status: (d.BillingCompletionRate >= 100) ? 'up' : 'down' }, - { tooltip: '', key: 'tk', label: '本月拓客人数', value: tkCount, raw: tkCount, icon: 'el-icon-user-solid', type: 'danger', isPercent: false, target: null, status: null }, - { tooltip: '实际退卡金额', key: 'refund', label: '退卡总计', value: this.formatMoney(d.TotalRefundAmount), raw: d.TotalRefundAmount || 0, icon: 'el-icon-warning-outline', type: 'error', isMoney: true } + { tooltip: '本月现金业绩,不包含退款业绩', key: 'billing', label: '营收核心指标', value: this.formatMoney(d.TotalBillingAmount), raw: d.TotalBillingAmount || 0, icon: 'el-icon-wallet', type: 'primary', isMoney: true }, + { tooltip: '', key: 'consume', label: '服务产出价值', value: this.formatMoney(d.TotalConsumeAmount), raw: d.TotalConsumeAmount || 0, icon: 'el-icon-medal', type: 'success', isMoney: true }, + { tooltip: '成交总额-退款业绩', key: 'net', label: '净收益达成', value: this.formatMoney(d.CompletedBillingAmount), raw: d.CompletedBillingAmount || 0, icon: 'el-icon-trophy', type: 'warning', isMoney: true }, + { tooltip: '完成业绩(净额)/目标值', key: 'target', label: '目标完成度', value: d.BillingCompletionRate || 0, raw: d.BillingCompletionRate || 0, icon: 'el-icon-pie-chart', type: 'info', isPercent: true, target: this.formatMoney(d.TargetBillingAmount), targetRaw: d.TargetBillingAmount || 0, status: (d.BillingCompletionRate >= 100) ? 'up' : 'down' }, + { tooltip: '', key: 'tk', label: '新客增长量', value: tkCount, raw: tkCount, icon: 'el-icon-user-solid', type: 'danger', isPercent: false, target: null, status: null }, + { tooltip: '实际退卡金额', key: 'refund', label: '风险管控指标', value: this.formatMoney(d.TotalRefundAmount), raw: d.TotalRefundAmount || 0, icon: 'el-icon-warning-outline', type: 'error', isMoney: true } ] }, // 健康师排行榜数据切换 @@ -713,12 +713,12 @@ export default { } // 根据类型设置专业的标题名称 const titleMap = { - billing: '成交数据深度分析', - consume: '消耗数据深度分析', - net: '净业绩完成度分析', - target: '开单目标达成度分析', - tk: '拓客数据深度分析', - refund: '退卡数据深度分析' + billing: '营收洞察报告', + consume: '服务价值分析', + net: '净收益达成分析', + target: '目标达成诊断', + tk: '客户增长分析', + refund: '风险预警分析' } this.drillDialog = { diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqOrderRecords/LqOrderRecordsInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqOrderRecords/LqOrderRecordsInfoOutput.cs new file mode 100644 index 0000000..ba3b978 --- /dev/null +++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqOrderRecords/LqOrderRecordsInfoOutput.cs @@ -0,0 +1,56 @@ +using System; + +namespace NCC.Extend.Entitys.Dto.LqOrderRecords +{ + /// + /// 历史开单记录详情输出 + /// + public class LqOrderRecordsInfoOutput + { + /// + /// 主键ID + /// + public int id { get; set; } + + /// + /// 开单号 + /// + public string orderNo { get; set; } + + /// + /// 图片名称 + /// + public string imageName { get; set; } + + /// + /// 会员编号 + /// + public string memberNo { get; set; } + + /// + /// 会员手机号 + /// + public string memberPhone { get; set; } + + /// + /// 会员名称 + /// + public string memberName { get; set; } + + /// + /// 备注 + /// + public string remarks { get; set; } + + /// + /// 创建时间 + /// + public DateTime? createdAt { get; set; } + + /// + /// 更新时间 + /// + public DateTime? updatedAt { get; set; } + } +} + diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqOrderRecords/LqOrderRecordsListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqOrderRecords/LqOrderRecordsListOutput.cs new file mode 100644 index 0000000..0cb7ce0 --- /dev/null +++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqOrderRecords/LqOrderRecordsListOutput.cs @@ -0,0 +1,56 @@ +using System; + +namespace NCC.Extend.Entitys.Dto.LqOrderRecords +{ + /// + /// 历史开单记录列表输出 + /// + public class LqOrderRecordsListOutput + { + /// + /// 主键ID + /// + public int id { get; set; } + + /// + /// 开单号 + /// + public string orderNo { get; set; } + + /// + /// 图片名称 + /// + public string imageName { get; set; } + + /// + /// 会员编号 + /// + public string memberNo { get; set; } + + /// + /// 会员手机号 + /// + public string memberPhone { get; set; } + + /// + /// 会员名称 + /// + public string memberName { get; set; } + + /// + /// 备注 + /// + public string remarks { get; set; } + + /// + /// 创建时间 + /// + public DateTime? createdAt { get; set; } + + /// + /// 更新时间 + /// + public DateTime? updatedAt { get; set; } + } +} + diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqOrderRecords/LqOrderRecordsListQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqOrderRecords/LqOrderRecordsListQueryInput.cs new file mode 100644 index 0000000..52763d5 --- /dev/null +++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqOrderRecords/LqOrderRecordsListQueryInput.cs @@ -0,0 +1,21 @@ +using NCC.Common.Filter; + +namespace NCC.Extend.Entitys.Dto.LqOrderRecords +{ + /// + /// 历史开单记录列表查询输入 + /// + public class LqOrderRecordsListQueryInput : PageInputBase + { + /// + /// 会员编号 + /// + public string memberNo { get; set; } + + /// + /// 会员手机号 + /// + public string memberPhone { get; set; } + } +} + diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_order_records/LqOrderRecordsEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_order_records/LqOrderRecordsEntity.cs new file mode 100644 index 0000000..36b378a --- /dev/null +++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_order_records/LqOrderRecordsEntity.cs @@ -0,0 +1,69 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Extend.Entitys.lq_order_records +{ + /// + /// 历史开单记录(从老系统迁移) + /// + [SugarTable("lq_order_records")] + [Tenant(ClaimConst.TENANT_ID)] + public class LqOrderRecordsEntity + { + /// + /// 主键ID + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 开单号 + /// + [SugarColumn(ColumnName = "order_no")] + public string OrderNo { get; set; } + + /// + /// 图片名称 + /// + [SugarColumn(ColumnName = "image_name")] + public string ImageName { get; set; } + + /// + /// 会员编号 + /// + [SugarColumn(ColumnName = "member_no")] + public string MemberNo { get; set; } + + /// + /// 会员手机号 + /// + [SugarColumn(ColumnName = "member_phone")] + public string MemberPhone { get; set; } + + /// + /// 会员名称 + /// + [SugarColumn(ColumnName = "member_name")] + public string MemberName { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "remarks")] + public string Remarks { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "created_at")] + public DateTime? CreatedAt { get; set; } + + /// + /// 更新时间 + /// + [SugarColumn(ColumnName = "updated_at")] + public DateTime? UpdatedAt { get; set; } + } +} + diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs index a8e9a82..d5032a1 100644 --- a/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs +++ b/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs @@ -1192,11 +1192,11 @@ namespace NCC.Extend.LqKdKdjlb var isMedicalProject = hasMedicalItemInCurrentBilling && await _db.Queryable().Where(x => x.MemberId == entity.Kdhy && x.IsEffective == StatusEnum.有效.GetHashCode() && x.ItemCategory == "医美" && x.ActualPrice > 0 && x.Px != "61" && x.Glkdbh != id).AnyAsync(); if (isMedicalProject && MedicalItemInCurrentBillingAmount >= 1000) { - entity.UpgradeLifeBeauty = "是"; + entity.UpgradeMedicalBeauty = "是"; } else { - entity.UpgradeLifeBeauty = "否"; + entity.UpgradeMedicalBeauty = "否"; } //获取该会员之前开单品项里面是否有科美项目 var isTechProject = hasTechItemInCurrentBilling && await _db.Queryable().Where(x => x.MemberId == entity.Kdhy && x.IsEffective == StatusEnum.有效.GetHashCode() && x.ItemCategory == "科美" && x.ActualPrice > 0 && x.Px != "61" && x.Glkdbh != id).AnyAsync(); @@ -1212,11 +1212,11 @@ namespace NCC.Extend.LqKdKdjlb var isLifeProject = hasLifeItemInCurrentBilling && await _db.Queryable().Where(x => x.MemberId == entity.Kdhy && x.IsEffective == StatusEnum.有效.GetHashCode() && x.ItemCategory == "生美" && x.ActualPrice > 0 && x.Px != "61" && x.Glkdbh != id).AnyAsync(); if (isLifeProject) { - entity.UpgradeMedicalBeauty = "是"; + entity.UpgradeLifeBeauty = "是"; } else { - entity.UpgradeMedicalBeauty = "否"; + entity.UpgradeLifeBeauty = "否"; } //计算储扣总金额 entity.DeductAmount = input.lqKdKdjlbDeductList.Sum(x => x.Amount ?? 0); diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqOrderRecordsService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqOrderRecordsService.cs new file mode 100644 index 0000000..19d8ab6 --- /dev/null +++ b/netcore/src/Modularity/Extend/NCC.Extend/LqOrderRecordsService.cs @@ -0,0 +1,89 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System.Threading.Tasks; +using NCC.Extend.Entitys.lq_order_records; +using NCC.Extend.Entitys.Dto.LqOrderRecords; + +namespace NCC.Extend +{ + /// + /// 历史开单记录服务(从老系统迁移) + /// + [ApiDescriptionSettings(Tag = "Extend", Name = "LqOrderRecords", Order = 200)] + [Route("api/Extend/[controller]")] + public class LqOrderRecordsService : IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _lqOrderRecordsRepository; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public LqOrderRecordsService( + ISqlSugarRepository lqOrderRecordsRepository, + IUserManager userManager) + { + _lqOrderRecordsRepository = lqOrderRecordsRepository; + _db = _lqOrderRecordsRepository.Context; + _userManager = userManager; + } + + /// + /// 获取历史开单记录详情 + /// + /// 主键ID + /// + [HttpGet("{id}")] + public async Task GetInfo(int id) + { + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + if (entity == null) + { + throw NCCException.Oh("未找到该历史开单记录"); + } + var output = entity.Adapt(); + return output; + } + + /// + /// 获取历史开单记录列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] LqOrderRecordsListQueryInput input) + { + var sidx = input.sidx == null ? "id" : input.sidx; + var sort = input.sort == null ? "desc" : input.sort; + + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.memberNo), p => p.MemberNo.Contains(input.memberNo)) + .WhereIF(!string.IsNullOrEmpty(input.memberPhone), p => p.MemberPhone.Contains(input.memberPhone)) + .Select(it => new LqOrderRecordsListOutput + { + id = it.Id, + orderNo = it.OrderNo, + imageName = it.ImageName, + memberNo = it.MemberNo, + memberPhone = it.MemberPhone, + memberName = it.MemberName, + remarks = it.Remarks, + createdAt = it.CreatedAt, + updatedAt = it.UpdatedAt + }) + .MergeTable() + .OrderBy($"{sidx} {sort}") + .ToPagedListAsync(input.currentPage, input.pageSize); + + return PageResult.SqlSugarPageResult(data); + } + } +} +