diff --git a/ExportFiles/客户资料导出_20260108143247.xls b/ExportFiles/客户资料导出_20260108143247.xls new file mode 100644 index 0000000..c7a0e27 --- /dev/null +++ b/ExportFiles/客户资料导出_20260108143247.xls diff --git a/ExportFiles/工资导入/主任工资_20260109211907.xlsx b/ExportFiles/工资导入/主任工资_20260109211907.xlsx new file mode 100644 index 0000000..299760b --- /dev/null +++ b/ExportFiles/工资导入/主任工资_20260109211907.xlsx diff --git a/ExportFiles/工资导入/事业部总经理经理工资_20260109212128.xlsx b/ExportFiles/工资导入/事业部总经理经理工资_20260109212128.xlsx new file mode 100644 index 0000000..66d3509 --- /dev/null +++ b/ExportFiles/工资导入/事业部总经理经理工资_20260109212128.xlsx diff --git a/ExportFiles/工资导入/健康师工资_20260109211750.xlsx b/ExportFiles/工资导入/健康师工资_20260109211750.xlsx new file mode 100644 index 0000000..e22a2f3 --- /dev/null +++ b/ExportFiles/工资导入/健康师工资_20260109211750.xlsx diff --git a/ExportFiles/工资导入/健康师工资_临时.xlsx b/ExportFiles/工资导入/健康师工资_临时.xlsx new file mode 100644 index 0000000..200315f --- /dev/null +++ b/ExportFiles/工资导入/健康师工资_临时.xlsx diff --git a/ExportFiles/工资导入/健康师工资_带ID.xlsx b/ExportFiles/工资导入/健康师工资_带ID.xlsx new file mode 100644 index 0000000..a2f5190 --- /dev/null +++ b/ExportFiles/工资导入/健康师工资_带ID.xlsx diff --git a/ExportFiles/工资导入/健康师工资_带ID_待填入.xlsx b/ExportFiles/工资导入/健康师工资_带ID_待填入.xlsx new file mode 100644 index 0000000..a9ba283 --- /dev/null +++ b/ExportFiles/工资导入/健康师工资_带ID_待填入.xlsx diff --git a/ExportFiles/工资导入/健康师工资_带ID_模板.xlsx b/ExportFiles/工资导入/健康师工资_带ID_模板.xlsx new file mode 100644 index 0000000..5d09d24 --- /dev/null +++ b/ExportFiles/工资导入/健康师工资_带ID_模板.xlsx diff --git a/ExportFiles/工资导入/健康师工资_测试_带ID.xlsx b/ExportFiles/工资导入/健康师工资_测试_带ID.xlsx new file mode 100644 index 0000000..5a04331 --- /dev/null +++ b/ExportFiles/工资导入/健康师工资_测试_带ID.xlsx diff --git a/ExportFiles/工资导入/大项目主管工资_20260109212145.xlsx b/ExportFiles/工资导入/大项目主管工资_20260109212145.xlsx new file mode 100644 index 0000000..0a97c67 --- /dev/null +++ b/ExportFiles/工资导入/大项目主管工资_20260109212145.xlsx diff --git a/ExportFiles/工资导入/大项目部老师工资_20260109212108.xlsx b/ExportFiles/工资导入/大项目部老师工资_20260109212108.xlsx new file mode 100644 index 0000000..dc0ab73 --- /dev/null +++ b/ExportFiles/工资导入/大项目部老师工资_20260109212108.xlsx diff --git a/ExportFiles/工资导入/店助工资_20260109211851.xlsx b/ExportFiles/工资导入/店助工资_20260109211851.xlsx new file mode 100644 index 0000000..b51f104 --- /dev/null +++ b/ExportFiles/工资导入/店助工资_20260109211851.xlsx diff --git a/ExportFiles/工资导入/店长工资_20260109212049.xlsx b/ExportFiles/工资导入/店长工资_20260109212049.xlsx new file mode 100644 index 0000000..f6a7f03 --- /dev/null +++ b/ExportFiles/工资导入/店长工资_20260109212049.xlsx diff --git a/ExportFiles/工资导入/科技老师工资_20260109212032.xlsx b/ExportFiles/工资导入/科技老师工资_20260109212032.xlsx new file mode 100644 index 0000000..8a89fce --- /dev/null +++ b/ExportFiles/工资导入/科技老师工资_20260109212032.xlsx diff --git a/ExportFiles/工资导入/科技老师工资_带ID.xlsx b/ExportFiles/工资导入/科技老师工资_带ID.xlsx new file mode 100644 index 0000000..e2eafed --- /dev/null +++ b/ExportFiles/工资导入/科技老师工资_带ID.xlsx diff --git a/ExportFiles/工资导入/科技部总经理工资_20260109212159.xlsx b/ExportFiles/工资导入/科技部总经理工资_20260109212159.xlsx new file mode 100644 index 0000000..a6e9fe0 --- /dev/null +++ b/ExportFiles/工资导入/科技部总经理工资_20260109212159.xlsx diff --git a/antis-ncc-admin/.env.development b/antis-ncc-admin/.env.development index 198955a..6462393 100644 --- a/antis-ncc-admin/.env.development +++ b/antis-ncc-admin/.env.development @@ -2,8 +2,8 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true # VUE_APP_BASE_API = 'https://erp.lvqianmeiye.com' -VUE_APP_BASE_API = 'http://erp_test.lvqianmeiye.com' -# VUE_APP_BASE_API = 'http://localhost:2011' +# VUE_APP_BASE_API = 'http://erp_test.lvqianmeiye.com' +VUE_APP_BASE_API = 'http://localhost:2011' # VUE_APP_BASE_API = 'http://localhost:2011' VUE_APP_IMG_API = '' VUE_APP_BASE_WSS = 'ws://192.168.110.45:2011/websocket' diff --git a/antis-ncc-admin/src/views/LqLaundryFlow/detail-dialog.vue b/antis-ncc-admin/src/views/LqLaundryFlow/detail-dialog.vue index 1e7b299..9db9909 100644 --- a/antis-ncc-admin/src/views/LqLaundryFlow/detail-dialog.vue +++ b/antis-ncc-admin/src/views/LqLaundryFlow/detail-dialog.vue @@ -1,5 +1,5 @@ @@ -238,15 +244,78 @@ export default { diff --git a/antis-ncc-admin/src/views/extend/financialReport/index.vue b/antis-ncc-admin/src/views/extend/financialReport/index.vue index bb7211d..0615c6f 100644 --- a/antis-ncc-admin/src/views/extend/financialReport/index.vue +++ b/antis-ncc-admin/src/views/extend/financialReport/index.vue @@ -3,25 +3,25 @@ - + - + 按日 按月 - + - + 查询 重置 @@ -29,7 +29,7 @@ - +
@@ -89,7 +89,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -157,11 +157,43 @@
- - - + +
+ + + + + + + + + + + + + + + + + + + + +
+
+ + + +
@@ -215,7 +247,21 @@ export default { // 表格数据 activeTab: 'totalIncome', tableData: [], - tableColumns: [] + tableColumns: [], + // 筛选选项 + filterOptions: { + paymentMethods: [], // 付款方式列表 + cooperationNames: [], // 合作机构列表 + hospitalNames: [] // 付款医院列表 + }, + // 当前筛选值 + currentFilters: { + paymentMethod: '', // 付款方式筛选 + cooperationName: '', // 合作机构筛选 + hospitalName: '' // 付款医院筛选 + }, + // 原始表格数据(未筛选) + rawTableData: [] } }, async mounted() { @@ -330,8 +376,9 @@ export default { // 后端接口返回的是 List,直接就是数组 const data = Array.isArray(res.data) ? res.data : [] console.log('总收入数据:', data) - this.totalIncome = data.reduce((sum, item) => sum + (item.totalIncome || 0), 0) - this.totalBillingCount = data.reduce((sum, item) => sum + (item.billingCount || 0), 0) + // 接口返回字段名是 PascalCase:TotalIncome, BillingCount, PeriodDate, StoreId, StoreName + this.totalIncome = data.reduce((sum, item) => sum + (item.TotalIncome || item.totalIncome || 0), 0) + this.totalBillingCount = data.reduce((sum, item) => sum + (item.BillingCount || item.billingCount || 0), 0) this.totalIncomeData = data console.log('总收入汇总:', this.totalIncome, '笔数:', this.totalBillingCount) } else { @@ -354,10 +401,12 @@ export default { let totalChannelIncome = 0 const channelSet = new Set() data.forEach(store => { - totalChannelIncome += store.totalIncome || 0 - if (store.paymentChannels && Array.isArray(store.paymentChannels)) { - store.paymentChannels.forEach(ch => { - channelSet.add(ch.paymentMethod) + totalChannelIncome += (store.TotalIncome || store.totalIncome || 0) + const paymentChannels = store.PaymentChannels || store.paymentChannels + if (paymentChannels && Array.isArray(paymentChannels)) { + paymentChannels.forEach(ch => { + const method = ch.PaymentMethod || ch.paymentMethod + if (method) channelSet.add(method) }) } }) @@ -385,10 +434,12 @@ export default { let totalPayable = 0 const cooperationSet = new Set() data.forEach(store => { - totalPayable += store.totalPayable || 0 - if (store.cooperationItems && Array.isArray(store.cooperationItems)) { - store.cooperationItems.forEach(item => { - cooperationSet.add(item.cooperationId) + totalPayable += (store.TotalPayable || store.totalPayable || 0) + const cooperationItems = store.CooperationItems || store.cooperationItems + if (cooperationItems && Array.isArray(cooperationItems)) { + cooperationItems.forEach(item => { + const id = item.CooperationId || item.cooperationId + if (id) cooperationSet.add(id) }) } }) @@ -416,10 +467,12 @@ export default { let totalReceivable = 0 const hospitalSet = new Set() data.forEach(store => { - totalReceivable += store.totalReceivable || 0 - if (store.hospitalItems && Array.isArray(store.hospitalItems)) { - store.hospitalItems.forEach(item => { - hospitalSet.add(item.hospitalId) + totalReceivable += (store.TotalReceivable || store.totalReceivable || 0) + const hospitalItems = store.HospitalItems || store.hospitalItems + if (hospitalItems && Array.isArray(hospitalItems)) { + hospitalItems.forEach(item => { + const id = item.HospitalId || item.hospitalId + if (id) hospitalSet.add(id) }) } }) @@ -529,8 +582,8 @@ export default { // 按日期聚合数据 const dateMap = new Map() this.totalIncomeData.forEach(item => { - const date = item.periodDate - const income = item.totalIncome || 0 + const date = item.PeriodDate || item.periodDate + const income = item.TotalIncome || item.totalIncome || 0 if (dateMap.has(date)) { dateMap.set(date, dateMap.get(date) + income) } else { @@ -628,10 +681,11 @@ export default { // 按渠道聚合数据 const channelMap = new Map() this.channelData.forEach(store => { - if (store.paymentChannels && Array.isArray(store.paymentChannels)) { - store.paymentChannels.forEach(ch => { - const method = ch.paymentMethod || '未填写' - const amount = ch.amount || 0 + const paymentChannels = store.PaymentChannels || store.paymentChannels + if (paymentChannels && Array.isArray(paymentChannels)) { + paymentChannels.forEach(ch => { + const method = ch.PaymentMethod || ch.paymentMethod || '未填写' + const amount = ch.Amount || ch.amount || 0 if (channelMap.has(method)) { channelMap.set(method, channelMap.get(method) + amount) } else { @@ -728,8 +782,8 @@ export default { const dateMap = new Map() this.payableData.forEach(item => { - const date = item.periodDate - const amount = item.totalPayable || 0 + const date = item.PeriodDate || item.periodDate + const amount = item.TotalPayable || item.totalPayable || 0 if (dateMap.has(date)) { dateMap.set(date, dateMap.get(date) + amount) } else { @@ -814,8 +868,8 @@ export default { const dateMap = new Map() this.receivableData.forEach(item => { - const date = item.periodDate - const amount = item.totalReceivable || 0 + const date = item.PeriodDate || item.periodDate + const amount = item.TotalReceivable || item.totalReceivable || 0 if (dateMap.has(date)) { dateMap.set(date, dateMap.get(date) + amount) } else { @@ -897,8 +951,54 @@ export default { }, // 切换表格Tab handleTabClick(tab) { + // 重置筛选 + this.currentFilters = { + paymentMethod: '', + cooperationName: '', + hospitalName: '' + } this.updateTable() }, + // 计算是否显示筛选器 + get showFilter() { + return this.activeTab === 'channel' || this.activeTab === 'payable' || this.activeTab === 'receivable' + }, + // 筛选变化处理 + handleFilterChange() { + this.applyFilters() + }, + // 应用筛选 + applyFilters() { + if (!this.rawTableData || this.rawTableData.length === 0) { + this.tableData = [] + return + } + + let filteredData = [...this.rawTableData] + + // 根据当前Tab应用不同的筛选 + if (this.activeTab === 'channel') { + if (this.currentFilters.paymentMethod) { + filteredData = filteredData.filter(item => + (item.PaymentMethod || item.paymentMethod) === this.currentFilters.paymentMethod + ) + } + } else if (this.activeTab === 'payable') { + if (this.currentFilters.cooperationName) { + filteredData = filteredData.filter(item => + (item.CooperationName || item.cooperationName) === this.currentFilters.cooperationName + ) + } + } else if (this.activeTab === 'receivable') { + if (this.currentFilters.hospitalName) { + filteredData = filteredData.filter(item => + (item.HospitalName || item.hospitalName) === this.currentFilters.hospitalName + ) + } + } + + this.tableData = filteredData + }, // 更新表格数据 updateTable() { this.tableLoading = true @@ -917,145 +1017,205 @@ export default { this.updateReceivableTable() break } + // 更新筛选选项 + this.updateFilterOptions() + // 应用当前筛选 + this.applyFilters() this.tableLoading = false }, 100) }, + // 更新筛选选项 + updateFilterOptions() { + if (this.activeTab === 'channel') { + // 从原始数据中提取所有付款方式 + const methods = new Set() + this.channelData.forEach(store => { + const paymentChannels = store.PaymentChannels || store.paymentChannels + if (paymentChannels && Array.isArray(paymentChannels)) { + paymentChannels.forEach(ch => { + const method = ch.PaymentMethod || ch.paymentMethod + if (method) methods.add(method) + }) + } + }) + this.filterOptions.paymentMethods = Array.from(methods).sort() + } else if (this.activeTab === 'payable') { + // 从原始数据中提取所有合作机构 + const names = new Set() + this.payableData.forEach(store => { + const cooperationItems = store.CooperationItems || store.cooperationItems + if (cooperationItems && Array.isArray(cooperationItems)) { + cooperationItems.forEach(item => { + const name = item.CooperationName || item.cooperationName + if (name) names.add(name) + }) + } + }) + this.filterOptions.cooperationNames = Array.from(names).sort() + } else if (this.activeTab === 'receivable') { + // 从原始数据中提取所有付款医院 + const names = new Set() + this.receivableData.forEach(store => { + const hospitalItems = store.HospitalItems || store.hospitalItems + if (hospitalItems && Array.isArray(hospitalItems)) { + hospitalItems.forEach(item => { + const name = item.HospitalName || item.hospitalName + if (name) names.add(name) + }) + } + }) + this.filterOptions.hospitalNames = Array.from(names).sort() + } + }, // 更新总收入表格 updateTotalIncomeTable() { if (!this.totalIncomeData) { + this.rawTableData = [] this.tableData = [] return } this.tableColumns = [ - { prop: 'storeName', label: '门店名称', width: 150 }, - { prop: 'periodDate', label: '统计日期', width: 120 }, + { prop: 'StoreName', label: '门店名称', minWidth: 150 }, + { prop: 'PeriodDate', label: '统计日期', minWidth: 120 }, { - prop: 'totalIncome', + prop: 'TotalIncome', label: '总收入', - width: 150, - formatter: (row) => this.formatCurrency(row.totalIncome) + minWidth: 150, + formatter: (row) => this.formatCurrency(row.TotalIncome || row.totalIncome) }, - { prop: 'billingCount', label: '开单笔数', width: 120 }, + { prop: 'BillingCount', label: '开单笔数', minWidth: 120 }, { - prop: 'averageAmount', + prop: 'AverageAmount', label: '平均单笔', - width: 150, - formatter: (row) => this.formatCurrency(row.averageAmount) + minWidth: 150, + formatter: (row) => this.formatCurrency(row.AverageAmount || row.averageAmount) } ] - this.tableData = this.totalIncomeData.map(item => ({ + this.rawTableData = this.totalIncomeData.map(item => ({ ...item, - averageAmount: item.billingCount > 0 ? item.totalIncome / item.billingCount : 0 + AverageAmount: (item.BillingCount || item.billingCount || 0) > 0 + ? (item.TotalIncome || item.totalIncome || 0) / (item.BillingCount || item.billingCount) + : 0 })) + this.tableData = [...this.rawTableData] }, // 更新收款渠道表格 updateChannelTable() { if (!this.channelData) { + this.rawTableData = [] this.tableData = [] return } this.tableColumns = [ - { prop: 'storeName', label: '门店名称', width: 150 }, - { prop: 'periodDate', label: '统计日期', width: 120 }, - { prop: 'paymentMethod', label: '付款方式', width: 120 }, + { prop: 'StoreName', label: '门店名称', minWidth: 150 }, + { prop: 'PeriodDate', label: '统计日期', minWidth: 120 }, + { prop: 'PaymentMethod', label: '付款方式', minWidth: 120 }, { - prop: 'amount', + prop: 'Amount', label: '收款金额', - width: 150, - formatter: (row) => this.formatCurrency(row.amount) + minWidth: 150, + formatter: (row) => this.formatCurrency(row.Amount || row.amount) }, - { prop: 'count', label: '笔数', width: 100 }, + { prop: 'Count', label: '笔数', minWidth: 100 }, { - prop: 'percentage', + prop: 'Percentage', label: '占比', - width: 100, - formatter: (row) => (row.percentage || 0) + '%' + minWidth: 100, + formatter: (row) => (row.Percentage || row.percentage || 0) + '%' } ] const list = [] this.channelData.forEach(store => { - if (store.paymentChannels) { - store.paymentChannels.forEach(ch => { + const paymentChannels = store.PaymentChannels || store.paymentChannels + if (paymentChannels) { + paymentChannels.forEach(ch => { list.push({ - storeName: store.storeName, - periodDate: store.periodDate, - paymentMethod: ch.paymentMethod, - amount: ch.amount, - count: ch.count, - percentage: ch.percentage + StoreName: store.StoreName || store.storeName, + PeriodDate: store.PeriodDate || store.periodDate, + PaymentMethod: ch.PaymentMethod || ch.paymentMethod, + Amount: ch.Amount || ch.amount, + Count: ch.Count || ch.count, + Percentage: ch.Percentage || ch.percentage }) }) } }) - this.tableData = list + this.rawTableData = list + this.tableData = [...this.rawTableData] }, // 更新应付表格 updatePayableTable() { if (!this.payableData) { + this.rawTableData = [] this.tableData = [] return } this.tableColumns = [ - { prop: 'storeName', label: '门店名称', width: 150 }, - { prop: 'periodDate', label: '统计日期', width: 120 }, - { prop: 'cooperationName', label: '合作机构', width: 200 }, + { prop: 'StoreName', label: '门店名称', minWidth: 150 }, + { prop: 'PeriodDate', label: '统计日期', minWidth: 120 }, + { prop: 'CooperationName', label: '合作机构', minWidth: 200 }, { - prop: 'payableAmount', + prop: 'PayableAmount', label: '应付金额', - width: 150, - formatter: (row) => this.formatCurrency(row.payableAmount) + minWidth: 150, + formatter: (row) => this.formatCurrency(row.PayableAmount || row.payableAmount) }, - { prop: 'billingCount', label: '开单笔数', width: 120 } + { prop: 'BillingCount', label: '开单笔数', minWidth: 120 } ] const list = [] this.payableData.forEach(store => { - if (store.cooperationItems) { - store.cooperationItems.forEach(item => { + const cooperationItems = store.CooperationItems || store.cooperationItems + if (cooperationItems) { + cooperationItems.forEach(item => { list.push({ - storeName: store.storeName, - periodDate: store.periodDate, - cooperationName: item.cooperationName, - payableAmount: item.payableAmount, - billingCount: item.billingCount + StoreName: store.StoreName || store.storeName, + PeriodDate: store.PeriodDate || store.periodDate, + CooperationName: item.CooperationName || item.cooperationName, + PayableAmount: item.PayableAmount || item.payableAmount, + BillingCount: item.BillingCount || item.billingCount }) }) } }) - this.tableData = list + this.rawTableData = list + this.tableData = [...this.rawTableData] }, // 更新应收表格 updateReceivableTable() { if (!this.receivableData) { + this.rawTableData = [] this.tableData = [] return } this.tableColumns = [ - { prop: 'storeName', label: '门店名称', width: 150 }, - { prop: 'periodDate', label: '统计日期', width: 120 }, - { prop: 'hospitalName', label: '付款医院', width: 200 }, + { prop: 'StoreName', label: '门店名称', minWidth: 150 }, + { prop: 'PeriodDate', label: '统计日期', minWidth: 120 }, + { prop: 'HospitalName', label: '付款医院', minWidth: 200 }, { - prop: 'receivableAmount', + prop: 'ReceivableAmount', label: '应收金额', - width: 150, - formatter: (row) => this.formatCurrency(row.receivableAmount) + minWidth: 150, + formatter: (row) => this.formatCurrency(row.ReceivableAmount || row.receivableAmount) }, - { prop: 'billingCount', label: '开单笔数', width: 120 } + { prop: 'BillingCount', label: '开单笔数', minWidth: 120 } ] const list = [] this.receivableData.forEach(store => { - if (store.hospitalItems) { - store.hospitalItems.forEach(item => { + const hospitalItems = store.HospitalItems || store.hospitalItems + if (hospitalItems) { + hospitalItems.forEach(item => { list.push({ - storeName: store.storeName, - periodDate: store.periodDate, - hospitalName: item.hospitalName, - receivableAmount: item.receivableAmount, - billingCount: item.billingCount + StoreName: store.StoreName || store.storeName, + PeriodDate: store.PeriodDate || store.periodDate, + HospitalName: item.HospitalName || item.hospitalName, + ReceivableAmount: item.ReceivableAmount || item.receivableAmount, + BillingCount: item.BillingCount || item.billingCount }) }) } }) - this.tableData = list + this.rawTableData = list + this.tableData = [...this.rawTableData] }, // 格式化货币 formatCurrency(value) { @@ -1073,56 +1233,135 @@ export default {