diff --git a/src/api/synthesize-query/sub-count.js b/src/api/synthesize-query/sub-count.js index 53a0427..f06b24a 100644 --- a/src/api/synthesize-query/sub-count.js +++ b/src/api/synthesize-query/sub-count.js @@ -17,3 +17,30 @@ export const getSubCountDetailCardStatisticsAPI = (data) => { params: data, }) } + +// 综合查询 获取分包统计详情 获取分包工程信息 +export const getSubCountDetailSubProjectInfoAPI = (data) => { + return request({ + url: '/bmw/subStatistics/getSubProMsg', + method: 'GET', + params: data, + }) +} + +// 综合查询 获取分包统计详情 获取班组信息 +export const getSubCountDetailTeamInfoAPI = (data) => { + return request({ + url: '/bmw/subStatistics/getSubTeamMsg', + method: 'GET', + params: data, + }) +} + +// 综合查询 获取分包统计详情 获取考勤机列表 +export const getSubCountDetailAttMachineListAPI = (data) => { + return request({ + url: '/bmw/subStatistics/getSubDeviceMsg', + method: 'GET', + params: data, + }) +} diff --git a/src/views/synthesize-query/sub-count/detail/components/attMachine-card.vue b/src/views/synthesize-query/sub-count/detail/components/attMachine-card.vue index e46f9fc..90542a0 100644 --- a/src/views/synthesize-query/sub-count/detail/components/attMachine-card.vue +++ b/src/views/synthesize-query/sub-count/detail/components/attMachine-card.vue @@ -16,57 +16,46 @@
- - diff --git a/src/views/synthesize-query/sub-count/detail/components/card-count.vue b/src/views/synthesize-query/sub-count/detail/components/card-count.vue index 35445e1..6d1b36f 100644 --- a/src/views/synthesize-query/sub-count/detail/components/card-count.vue +++ b/src/views/synthesize-query/sub-count/detail/components/card-count.vue @@ -76,6 +76,10 @@ export default { type: [String, Number], default: null, }, + attMachineCount: { + type: [String, Number], + default: 0, + }, }, data() { return { @@ -84,7 +88,6 @@ export default { { type: 'subcontractor', label: '标段工程/分包合同', - color: '#EF4444', dotColor: '#EF4444', dataKey: 'proNum', @@ -92,7 +95,6 @@ export default { { type: 'team', label: '施工班组', - color: '#3B82F6', dotColor: '#3B82F6', dataKey: 'teamNum', @@ -100,7 +102,6 @@ export default { { type: 'entry', label: '累计入场', - color: '#8B5CF6', dotColor: '#8B5CF6', dataKey: 'einNumHis', @@ -109,7 +110,6 @@ export default { { type: 'attendance', label: '累计考勤', - color: '#06B6D4', dotColor: '#06B6D4', dataKey: 'attNumHis', @@ -117,7 +117,6 @@ export default { { type: 'wage', label: '累计工资', - color: '#EC4899', dotColor: '#EC4899', // 注意:图片中这个点的颜色是绿色 dataKey: 'salaryMoneyNum', @@ -125,10 +124,9 @@ export default { { type: 'machine', label: '考勤机', - color: '#10B981', dotColor: '#10B981', - dataKey: 'salaryMoneyNum', + value: 0, }, ], } @@ -141,6 +139,13 @@ export default { }, immediate: true, }, + attMachineCount: { + handler(newVal) { + this.cardList[5].value = newVal + }, + + immediate: true, + }, }, methods: { /** @@ -162,9 +167,25 @@ export default { einNumHis, attNumHis, salaryMoneyNum, - } = res.data - console.log(res, '卡片统计') + exitNum, + einNum, + exitUploadFile, + noExitUploadFile, + einTime, + exitTime, + yellowNum, + greenNum, + yellowThanSevenDayNum, + + proRepairNum, + repairPersonNum, + repairNumHis, + + payrollNum, + workerSalaryNum, + payrollWorkerTime, + } = res.data // // 模拟API响应数据 const mockData = { @@ -175,8 +196,44 @@ export default { salaryMoneyNum, } + // 出入场信息 + const entryData = { + einNumHis, + einNum, + exitNum, + exitUploadFile, + noExitUploadFile, + einTime, + exitTime, + yellowNum, + greenNum, + yellowThanSevenDayNum, + } + + // 考勤信息 + const attendanceData = { + attNumHis, + proRepairNum, + repairPersonNum, + repairNumHis, + } + + // 工资信息 + const wageData = { + salaryMoneyNum, + payrollNum, + workerSalaryNum, + payrollWorkerTime, + } + // 更新卡片数据 this.updateCardData(mockData) + this.$emit( + 'initPersonData', + entryData, + attendanceData, + wageData, + ) // this.$emit('data-loaded', mockData) } catch (error) { @@ -192,7 +249,7 @@ export default { updateCardData(data) { this.cardList.forEach((card) => { if (data.hasOwnProperty(card.dataKey)) { - card.value = data[card.dataKey] || 0 + card.value = data[card.dataKey] } }) }, diff --git a/src/views/synthesize-query/sub-count/detail/components/personInfo-card.vue b/src/views/synthesize-query/sub-count/detail/components/personInfo-card.vue index 2bc4d67..793599f 100644 --- a/src/views/synthesize-query/sub-count/detail/components/personInfo-card.vue +++ b/src/views/synthesize-query/sub-count/detail/components/personInfo-card.vue @@ -19,15 +19,13 @@
累计入场人数
-
{{ - personData.entry.totalEntryCount - }}
+
+ {{ entryData.einNumHis }} +
累计出场人数
-
{{ - personData.entry.totalExitCount - }}
+
{{ entryData.exitNum }}
离场人员工资结算确认单
@@ -36,68 +34,48 @@ 已上传: - {{ - personData.entry - .salaryConfirmationUploaded - }}
未上传: - {{ - personData.entry - .salaryConfirmationNotUploaded - }}
首次人员入场时间
-
{{ - personData.entry.firstEntryTime - }}
+
{{ entryData.einTime }}
当前在场人数
-
{{ - personData.entry.currentOnsiteCount - }}
+
{{ entryData.einNum }}
在场人数状态
- 黄灯: - {{ - personData.entry.yellowLightCount - }} + 黄灯: {{ entryData.yellowNum }}
- 绿灯: - {{ personData.entry.greenLightCount }} + 绿灯: {{ entryData.greenNum }}
黄灯7天人数
{{ - personData.entry.yellowLight7DaysCount + entryData.yellowThanSevenDayNum }}
末次人员出场时间
-
{{ - personData.entry.lastExitTime - }}
+
{{ entryData.exitTime }}
@@ -117,33 +95,25 @@
累计考勤天数(人次)
{{ - personData.attendance.totalAttendanceDays + attendanceData.attNumHis }}
累计补卡申请次数(次)
- {{ - personData.attendance - .totalCardReplacementApplications - }} - 查看 + {{ attendanceData.repairNumHis }}
累计补卡人数(人)
-
{{ - personData.attendance.totalCardReplacementPersons - }}
+
+ {{ attendanceData.repairPersonNum }} +
累计补卡天数(人次)
{{ - personData.attendance.totalCardReplacementDays + attendanceData.proRepairNum }}
@@ -163,27 +133,26 @@
累计发放工资(元)
-
{{ - formatCurrency(personData.salary.totalSalaryIssued) - }}
+
+ ¥ + {{ wageData.salaryMoneyNum }} +
工资册数量(次)
-
{{ - personData.salary.payrollBookCount - }}
+
{{ wageData.payrollNum }}
累计发放人数
-
{{ - personData.salary.totalIssuedPersons - }}
+
+ {{ wageData.workerSalaryNum }} +
累计发放人次
-
{{ - personData.salary.totalIssuedPersonTimes - }}
+
+ {{ wageData.payrollWorkerTime }} +
@@ -195,132 +164,21 @@ export default { name: 'PersonInfoCard', props: { - // 项目ID,用于获取特定项目的人员信息 - projectId: { - type: [String, Number], - default: null, + entryData: { + type: Object, + default: () => {}, }, - // 是否自动加载数据 - autoLoad: { - type: Boolean, - default: true, - }, - }, - data() { - return { - loading: false, - personData: { - entry: { - totalEntryCount: 1200, - totalExitCount: 800, - salaryConfirmationUploaded: 390, - salaryConfirmationNotUploaded: 10, - firstEntryTime: '2025-09-02 10:12:13', - currentOnsiteCount: 400, - yellowLightCount: 10, - greenLightCount: 390, - yellowLight7DaysCount: 2, - lastExitTime: '2025-10-02 19:12:13', - }, - attendance: { - totalAttendanceDays: 9600, - totalCardReplacementApplications: 10, - totalCardReplacementPersons: 35, - totalCardReplacementDays: 156, - }, - salary: { - totalSalaryIssued: 745635, - payrollBookCount: 10, - totalIssuedPersons: 253, - totalIssuedPersonTimes: 1352, - }, - }, - } - }, - created() { - if (this.autoLoad) { - this.loadData() - } - }, - watch: { - projectId: { - handler() { - if (this.autoLoad) { - this.loadData() - } - }, - immediate: false, + attendanceData: { + type: Object, + default: () => {}, + }, + wageData: { + type: Object, + default: () => {}, }, }, + methods: { - /** - * 加载人员信息数据 - */ - async loadData() { - if (this.loading) return - - this.loading = true - try { - // 这里应该调用实际的API接口 - // const response = await getPersonInfoAPI({ - // projectId: this.projectId - // }) - - // 模拟API响应数据 - const mockData = { - entry: { - totalEntryCount: 1200, - totalExitCount: 800, - salaryConfirmationUploaded: 390, - salaryConfirmationNotUploaded: 10, - firstEntryTime: '2025-09-02 10:12:13', - currentOnsiteCount: 400, - yellowLightCount: 10, - greenLightCount: 390, - yellowLight7DaysCount: 2, - lastExitTime: '2025-10-02 19:12:13', - }, - attendance: { - totalAttendanceDays: 9600, - totalCardReplacementApplications: 10, - totalCardReplacementPersons: 35, - totalCardReplacementDays: 156, - }, - salary: { - totalSalaryIssued: 745635, - payrollBookCount: 10, - totalIssuedPersons: 253, - totalIssuedPersonTimes: 1352, - }, - } - - this.personData = mockData - this.$emit('data-loaded', mockData) - } catch (error) { - console.error('加载人员信息失败:', error) - this.$message.error('加载人员信息失败') - this.$emit('data-error', error) - } finally { - this.loading = false - } - }, - - /** - * 刷新数据 - */ - refresh() { - this.loadData() - }, - - /** - * 格式化货币显示 - * @param {Number} value 金额 - * @returns {String} 格式化后的货币字符串 - */ - formatCurrency(value) { - return `¥${value.toLocaleString()}` - }, - /** * 处理查看补卡申请点击事件 */ diff --git a/src/views/synthesize-query/sub-count/detail/components/subTeam-card.vue b/src/views/synthesize-query/sub-count/detail/components/subTeam-card.vue index 8eae47d..7483d3c 100644 --- a/src/views/synthesize-query/sub-count/detail/components/subTeam-card.vue +++ b/src/views/synthesize-query/sub-count/detail/components/subTeam-card.vue @@ -24,58 +24,66 @@ border > - - - + + + @@ -152,72 +156,82 @@ - - - + + + @@ -241,11 +255,25 @@ @closeDialogOuter="handleCloseDialogOuter" > @@ -253,72 +281,35 @@ diff --git a/src/views/synthesize-query/sub-count/detail/index.vue b/src/views/synthesize-query/sub-count/detail/index.vue index 7e3dc7c..a6e59ad 100644 --- a/src/views/synthesize-query/sub-count/detail/index.vue +++ b/src/views/synthesize-query/sub-count/detail/index.vue @@ -8,10 +8,22 @@ :contractFile="contractFile" :legalPersonPhone="legalPersonPhone" /> - - - - + + + + @@ -39,6 +51,10 @@ export default { subAddress: null, // 从路由参数或其他地方获取分包地址 contractFile: [], // 从路由参数或其他地方获取合同文件 subId: null, // 从路由参数或其他地方获取分包ID + attMachineCount: 0, // 考勤机数量 + entryData: {}, // 出入场信息 + attendanceData: {}, // 考勤信息 + wageData: {}, // 工资信息 } }, created() { @@ -64,6 +80,15 @@ export default { this.scrollToTarget(card.type) // const attMachineCard_1 = document.getElementById('attMachineCard_1') }, + initAttMachineCount(count) { + this.attMachineCount = count + }, + // 初始化人员信息 + initPersonData(entryData, attendanceData, wageData) { + this.entryData = entryData + this.attendanceData = attendanceData + this.wageData = wageData + }, // 平滑滚动到目标组件 scrollToTarget(cardType) {