人员统计页面接口调试

This commit is contained in:
BianLzhaoMin 2025-10-13 10:40:21 +08:00
parent 9a7487a2f6
commit 518796643e
12 changed files with 544 additions and 219 deletions

View File

@ -8,3 +8,30 @@ export const getPersonCountListAPI = (data) => {
params: data,
})
}
// 综合查询 获取人员统计详情
export const getPersonCountDetailAPI = (data) => {
return request({
url: '/bmw/workerStatistics/getWorkerDetail',
method: 'GET',
params: data,
})
}
// 综合查询 获取人员统计详情考勤信息
export const getPersonCountDetailAttendanceInfoAPI = (data) => {
return request({
url: '/bmw/workerStatistics/getWorkerEinDayRecordDetail',
method: 'GET',
params: data,
})
}
// 综合查询 获取人员统计详情工资信息
export const getPersonCountDetailWageInfoAPI = (data) => {
return request({
url: '/bmw/workerStatistics/getMonthTableDetail',
method: 'GET',
params: data,
})
}

View File

@ -103,8 +103,8 @@ export const saveThreeAndOneMonthlyWagePaymentAPI = (data) => {
// 综合查询 三表一册 农名工工资支付表 更新操作
export const updateThreeAndOneMonthlyWagePaymentAPI = (data) => {
return request({
url: '/bmw/pmProject/updateSalary',
method: 'POST',
data,
url: '/bmw/pmProject/updateThreeTableOneRoster',
method: 'GET',
params: data,
})
}

View File

@ -18,8 +18,11 @@
>
<el-form-item label="考勤日期">
<el-date-picker
type="date"
v-model="attInfoQueryParams.entryTime"
type="daterange"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
v-model="timeList"
placeholder="请选择考勤日期"
/>
</el-form-item>
@ -63,11 +66,30 @@
<el-table-column
align="center"
:key="item.prop"
:prop="item.prop"
:label="item.label"
show-overflow-tooltip
v-for="item in columnData"
/>
>
<template slot-scope="{ row }">
<template v-if="item.prop === 'attStatus'">
<span
:style="{
color:
row.attStatus == 0
? '#ef4444'
: '#10b981',
}"
>
{{
row.attStatus == 0 ? '未打卡' : '已打卡'
}}
</span>
</template>
<template v-else>{{
row[item.prop] || '/'
}}</template>
</template>
</el-table-column>
</el-table>
<div style="padding-right: 20px">
@ -84,61 +106,67 @@
</template>
<script>
import { getPersonCountDetailAttendanceInfoAPI } from '@/api/synthesize-query/person-count'
export default {
name: 'AttInfo',
props: {},
props: {
workerId: {
type: [Number, String],
default: '',
},
},
data() {
return {
total: 100,
total: 0,
timeList: [],
attInfoQueryParams: {
entryTime: '',
startTime: '',
endTime: '',
pageNum: 1,
pageSize: 10,
workerId: this.workerId,
},
attInfoData: [
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
],
attInfoData: [],
columnData: [
{
label: '考勤日期',
prop: 'entryTime',
prop: 'attDay',
},
{
label: '考勤状态',
prop: 'exitTime',
prop: 'attStatus',
},
{
label: '时间',
prop: 'contractName',
prop: 'attTime',
},
{
label: '工程名称',
prop: 'subcontractorName',
prop: 'proName',
},
{
label: '考勤机名称',
prop: 'totalEntryCount',
prop: 'devName',
},
{
label: '考勤机编号',
prop: 'currentOnsiteCount',
prop: 'deviceCode',
},
],
}
},
created() {},
watch: {},
watch: {
workerId: {
handler(newVal) {
if (newVal) {
this.getAttInfoData()
}
},
immediate: true,
deep: true,
},
},
methods: {
//
tableHeaderStyle() {
@ -155,19 +183,20 @@ export default {
return {
fontSize: '14px',
color: '#606266',
padding: '12px 8px',
padding: '12px 0',
}
},
//
handleQuery() {
// this.getAttInfoData()
this.getAttInfoData()
},
//
resetQuery() {
this.attInfoQueryParams = {
entryTime: '',
}
this.timeList = []
this.attInfoQueryParams.pageNum = 1
this.attInfoQueryParams.pageSize = 10
this.getAttInfoData()
},
//
handleExport() {
@ -180,8 +209,21 @@ export default {
// )
},
//
getAttInfoData() {
async getAttInfoData() {
// this.getAttInfoData()
if (this.timeList.length > 0) {
this.attInfoQueryParams.startTime = this.timeList[0]
this.attInfoQueryParams.endTime = this.timeList[1]
} else {
this.attInfoQueryParams.startTime = ''
this.attInfoQueryParams.endTime = ''
}
const res = await getPersonCountDetailAttendanceInfoAPI(
this.attInfoQueryParams,
)
this.attInfoData = res.rows
this.total = res.total
},
},
}

View File

@ -11,7 +11,7 @@
<div class="table-container">
<el-table
:data="contractData"
:data="bmWorkerContractList"
style="width: 100%"
:header-cell-style="tableHeaderStyle"
:cell-style="tableCellStyle"
@ -20,12 +20,60 @@
>
<el-table-column
:key="item.prop"
:prop="item.prop"
align="center"
:label="item.label"
show-overflow-tooltip
v-for="item in columnData"
/>
>
<template slot-scope="{ row }">
<template v-if="item.prop === 'isActive'">
<!-- <el-tag
size="mini"
type="danger"
v-if="row.isActive == 0"
>
已失效
</el-tag>
<el-tag
size="mini"
type="success"
v-if="row.isActive == 1"
>
生效中
</el-tag> -->
<div class="status-cell">
<span
class="status-dot"
:class="
row.isActive == 1
? 'status-online'
: 'status-offline'
"
></span>
{{
row.isActive == 1 ? '生效中' : '已失效'
}}
</div>
</template>
<template v-else-if="item.prop === 'files_1'">
{{
row.files.filter((j) => j.sourceType == 1)
.length || 0
}}
</template>
<template v-else-if="item.prop === 'files_2'">
{{
row.files.filter((j) => j.sourceType == 6)
.length || 0
}}
</template>
<template v-else>
{{ row[item.prop] || '/' }}
</template>
</template>
</el-table-column>
</el-table>
</div>
</div>
@ -35,65 +83,54 @@
<script>
export default {
name: 'Contract',
props: {},
props: {
bmWorkerContractList: {
type: Array,
default: () => [],
},
},
data() {
return {
contractData: [
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
],
columnData: [
{
label: '合同编号',
prop: 'entryTime',
prop: 'contractCode',
},
{
label: '合同期限类型',
prop: 'exitTime',
prop: 'contractTermType',
},
{
label: '合同状态',
prop: 'contractName',
prop: 'isActive',
},
{
label: '合同签订日期',
prop: 'subcontractorName',
prop: 'contractStartDate',
},
{
label: '合同终止日期',
prop: 'totalEntryCount',
prop: 'contractStopDate',
},
{
label: '工资核定方式',
prop: 'currentOnsiteCount',
prop: 'wageApprovedWay',
},
{
label: '工资核定标准',
prop: 'entryTime',
prop: 'wageCriterion',
},
{
label: '合同见证照片',
prop: 'entryExitStatus',
prop: 'files_1',
},
{
label: '附件',
prop: 'wageCommitment',
prop: 'files_2',
},
{
label: '系统录入时间',
prop: 'wageCommitment',
prop: 'contractUploadDate',
},
],
}
@ -116,7 +153,7 @@ export default {
return {
fontSize: '14px',
color: '#606266',
padding: '12px 8px',
padding: '12px 0',
}
},
},
@ -194,4 +231,26 @@ export default {
}
}
}
.status-cell {
display: flex;
align-items: center;
justify-content: center;
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 6px;
display: inline-block;
&.status-online {
background-color: #10b981;
}
&.status-offline {
background-color: #ef4444;
}
}
}
</style>

View File

@ -11,21 +11,67 @@
<div class="table-container">
<el-table
:data="entryExitData"
style="width: 100%"
:header-cell-style="tableHeaderStyle"
:cell-style="tableCellStyle"
stripe
border
style="width: 100%"
:cell-style="tableCellStyle"
:data="bmWorkerEinProRecordList"
:header-cell-style="tableHeaderStyle"
>
<el-table-column
:key="item.prop"
:prop="item.prop"
align="center"
:label="item.label"
show-overflow-tooltip
v-for="item in columnData"
/>
>
<template slot-scope="{ row }">
<template v-if="item.prop === 'einStatus'">
<!-- <el-tag
size="mini"
type="success"
v-if="row.einStatus == 1"
>
在场
</el-tag>
<el-tag
size="mini"
type="danger"
v-if="row.einStatus == 2"
>
出场
</el-tag> -->
<div class="status-cell">
<span
class="status-dot"
:class="
row.einStatus == 1
? 'status-online'
: 'status-offline'
"
></span>
{{ row.einStatus == 1 ? '在场' : '出场' }}
</div>
</template>
<template v-else-if="item.prop === 'isUploadFile'">
<span
:style="{
color:
row.isUploadFile == 1
? '#10b981'
: '',
}"
>
{{ row.isUploadFile == 1 ? '已上传' : '/' }}
</span>
</template>
<template v-else>
{{ row[item.prop] || '/' }}
</template>
</template>
</el-table-column>
</el-table>
</div>
</div>
@ -35,29 +81,18 @@
<script>
export default {
name: 'EntryExit',
props: {},
props: {
bmWorkerEinProRecordList: {
type: Array,
default: () => [],
},
},
data() {
return {
entryExitData: [
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
],
columnData: [
{
label: '入场时间',
prop: 'entryTime',
prop: 'einTime',
},
{
label: '出场时间',
@ -65,31 +100,31 @@ export default {
},
{
label: '入场工程',
prop: 'contractName',
prop: 'proName',
},
{
label: '入场分包',
prop: 'subcontractorName',
prop: 'subName',
},
{
label: '入场班组',
prop: 'totalEntryCount',
prop: 'teamName',
},
{
label: '工种',
prop: 'currentOnsiteCount',
prop: 'postName',
},
{
label: '手机号码',
prop: 'entryTime',
prop: 'phone',
},
{
label: '出入场状态',
prop: 'entryExitStatus',
prop: 'einStatus',
},
{
label: '离场人员工资结算确认单',
prop: 'wageCommitment',
prop: 'isUploadFile',
},
],
}
@ -190,4 +225,26 @@ export default {
}
}
}
.status-cell {
display: flex;
align-items: center;
justify-content: center;
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 6px;
display: inline-block;
&.status-online {
background-color: #10b981;
}
&.status-offline {
background-color: #ef4444;
}
}
}
</style>

View File

@ -15,7 +15,16 @@
:key="item.valueKey"
>
<div class="data-label">{{ item.label }}</div>
<div class="data-value">{{ item.value }}</div>
<div class="data-value" v-if="item.valueKey === 'files'">
<el-image
fit="cover"
:src="item.value[0].lsUrl"
style="width: 48px; height: 48px"
v-if="item.value && item.value.length > 0"
:preview-src-list="item.value.map((j) => j.lsUrl)"
/>
</div>
<div class="data-value" v-else>{{ item.value }}</div>
</div>
</div>
</div>
@ -23,68 +32,117 @@
</template>
<script>
import { getPersonCountDetailAPI } from '@/api/synthesize-query/person-count'
export default {
name: 'PersonInfoCard',
props: {
workerId: {
type: [Number, String],
default: '',
},
},
data() {
return {
idNumberInfoLabel: [
{
label: '姓名',
value: '姓名',
value: '名',
valueKey: 'name',
},
{
label: '身份证号',
value: '身份证号',
value: '',
valueKey: 'idNumber',
},
{
label: '性别',
value: '性别',
valueKey: 'birthDate',
value: '',
valueKey: 'sex',
},
{
label: '出生日期',
value: '出生日期',
valueKey: 'birthDate',
value: '',
valueKey: 'birthday',
},
{
label: '签发机关',
value: '签发机关',
valueKey: 'birthDate',
value: '',
valueKey: 'issuingAuthority',
},
{
label: '民族',
value: '民族',
valueKey: 'birthDate',
value: '',
valueKey: 'nation',
},
{
label: '生效日期',
value: '生效日期',
valueKey: 'birthDate',
value: '',
valueKey: 'startTime',
},
{
label: '失效日期',
value: '失效日期',
valueKey: 'birthDate',
value: '',
valueKey: 'endTime',
},
{
label: '人脸片',
value: '人脸图片',
valueKey: 'birthDate',
label: '人脸片',
value: '',
valueKey: 'files',
},
{
label: ' 身份证住址',
value: ' 身份证住址',
valueKey: 'birthDate',
value: ' ',
valueKey: 'address',
},
],
}
},
created() {},
watch: {},
methods: {},
watch: {
workerId: {
handler(newVal) {
if (newVal) {
this.getPersonCountDetail()
}
},
deep: true,
immediate: true,
},
},
methods: {
//
async getPersonCountDetail() {
const res = await getPersonCountDetailAPI({
workerId: this.workerId,
})
const personInfo = res.data
if (res.code === 200 && personInfo) {
this.idNumberInfoLabel.forEach((item) => {
for (const key in personInfo) {
if (item.valueKey === key) {
item.value = personInfo[key]
}
}
})
const {
bmWorkerEinProRecordList,
bmWorkerContractList,
bmWorkerWageCard,
} = res.data
this.$emit(
'initPersonDetailsData',
bmWorkerEinProRecordList,
bmWorkerContractList,
[bmWorkerWageCard],
)
}
},
},
}
</script>
@ -164,9 +222,9 @@ export default {
.data-label {
padding: 16px 20px;
font-size: 16px;
color: #6b7280;
font-weight: 500;
font-size: 14px;
color: #352e2e;
font-weight: 600;
background: #f8f9fa;
}

View File

@ -5,12 +5,15 @@
<span>人员信息</span>
</div>
<IdCard />
<EntryExit />
<Contract />
<WageCard />
<AttInfo />
<WageInfo />
<IdCard
:workerId="workerId"
@initPersonDetailsData="initPersonDetailsData"
/>
<EntryExit :bmWorkerEinProRecordList="bmWorkerEinProRecordList" />
<Contract :bmWorkerContractList="bmWorkerContractList" />
<WageCard :bmWorkerWageCard="bmWorkerWageCard" />
<AttInfo :workerId="workerId" />
<WageInfo :workerId="workerId" />
</div>
</template>
@ -31,12 +34,32 @@ export default {
AttInfo,
WageInfo,
},
data() {
return {}
props: {
workerId: {
type: [Number, String],
default: '',
},
},
data() {
return {
bmWorkerEinProRecordList: [],
bmWorkerContractList: [],
bmWorkerWageCard: [],
}
},
methods: {
//
initPersonDetailsData(
bmWorkerEinProRecordList,
bmWorkerContractList,
bmWorkerWageCard,
) {
this.bmWorkerEinProRecordList = bmWorkerEinProRecordList
this.bmWorkerContractList = bmWorkerContractList
this.bmWorkerWageCard = bmWorkerWageCard
},
},
created() {},
watch: {},
methods: {},
}
</script>

View File

@ -11,7 +11,7 @@
<div class="table-container">
<el-table
:data="wageCardData"
:data="bmWorkerWageCard"
style="width: 100%"
:header-cell-style="tableHeaderStyle"
:cell-style="tableCellStyle"
@ -20,12 +20,29 @@
>
<el-table-column
:key="item.prop"
:prop="item.prop"
align="center"
:label="item.label"
show-overflow-tooltip
v-for="item in columnData"
/>
>
<template slot-scope="{ row }">
<template v-if="item.prop === 'files_1'">
{{
row.files.filter((j) => j.sourceType == 1)
.length || 0
}}
</template>
<template v-else-if="item.prop === 'files_2'">
{{
row.files.filter((j) => j.sourceType == 5)
.length || 0
}}
</template>
<template v-else>
{{ row[item.prop] || '/' }}
</template>
</template>
</el-table-column>
</el-table>
</div>
</div>
@ -35,49 +52,38 @@
<script>
export default {
name: 'WageCard',
props: {},
props: {
bmWorkerWageCard: {
type: Array,
default: () => [],
},
},
data() {
return {
wageCardData: [
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
],
columnData: [
{
label: '银行卡号',
prop: 'entryTime',
prop: 'bankCardCode',
},
{
label: '银行名称',
prop: 'exitTime',
prop: 'bankName',
},
{
label: '银行支行名称',
prop: 'contractName',
prop: 'bankBranchName',
},
{
label: '工资卡见证照片',
prop: 'subcontractorName',
prop: 'files_1',
},
{
label: '附件',
prop: 'totalEntryCount',
prop: 'files_2',
},
{
label: '系统录入时间',
prop: 'currentOnsiteCount',
prop: 'updateTime',
},
],
}
@ -100,7 +106,7 @@ export default {
return {
fontSize: '14px',
color: '#606266',
padding: '12px 8px',
padding: '12px 0',
}
},
},

View File

@ -20,66 +20,102 @@
>
<el-table-column
:key="item.prop"
:prop="item.prop"
align="center"
:label="item.label"
show-overflow-tooltip
v-for="item in columnData"
/>
>
<template slot-scope="{ row }">
<template v-if="item.prop === 'refundStatus'">
<span
:style="{
color:
row.refundStatus == 0
? ''
: '#10b981',
}"
>
{{ row.refundStatus == 0 ? '/' : '已上传' }}
</span>
</template>
<template v-else-if="item.prop === 'wageBook'">
{{ `${row.proName}${row.tableMonth}工资册` }}
</template>
<template v-else>{{
row[item.prop] || '/'
}}</template>
</template>
</el-table-column>
</el-table>
<div style="padding-right: 20px">
<pagination
:total="total"
@pagination="getWageInfoData"
:page.sync="wageInfoQueryParams.pageNum"
:limit.sync="wageInfoQueryParams.pageSize"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import { getPersonCountDetailWageInfoAPI } from '@/api/synthesize-query/person-count'
export default {
name: 'WageInfo',
props: {},
props: {
workerId: {
type: [Number, String],
default: '',
},
},
data() {
return {
wageInfoData: [
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
{
entryTime: '2025-01-01',
exitTime: '2025-01-01',
contractName: '工程1',
subcontractorName: '分包1',
totalEntryCount: 10,
},
],
total: 0,
wageInfoData: [],
wageInfoQueryParams: {
pageNum: 1,
pageSize: 10,
workerId: this.workerId,
},
columnData: [
{
label: '工资月份',
prop: 'entryTime',
prop: 'tableMonth',
},
{
label: '工资名称',
prop: 'exitTime',
label: '工资册名称',
prop: 'wageBook',
},
{
label: '工程名称',
prop: 'contractName',
prop: 'proName',
},
{
label: '实发工资',
prop: 'subcontractorName',
prop: 'netSalary',
},
{
label: '银行回单',
prop: 'totalEntryCount',
prop: 'refundStatus',
},
],
}
},
created() {},
watch: {},
watch: {
workerId: {
handler(newVal) {
if (newVal) {
this.getWageInfoData()
}
},
deep: true,
immediate: true,
},
},
methods: {
//
tableHeaderStyle() {
@ -96,9 +132,18 @@ export default {
return {
fontSize: '14px',
color: '#606266',
padding: '12px 8px',
padding: '12px 0',
}
},
//
async getWageInfoData() {
const res = await getPersonCountDetailWageInfoAPI(
this.wageInfoQueryParams,
)
this.wageInfoData = res.rows
this.total = res.total
},
},
}
</script>
@ -136,6 +181,7 @@ export default {
.table-container {
padding: 0;
padding-bottom: 20px;
::v-deep .el-table {
border: none;

View File

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<PersonDetails />
<PersonDetails :workerId="workerId" />
</div>
</template>
@ -11,6 +11,21 @@ export default {
components: {
PersonDetails,
},
data() {
return {
workerId: null,
}
},
watch: {
$route: {
handler(newVal) {
const { workerId } = newVal.query
this.workerId = workerId
},
immediate: true,
deep: true,
},
},
}
</script>

View File

@ -9,13 +9,13 @@
:columnsList="columnsList"
:request-api="getPersonCountListAPI"
>
<template slot="handle" slot-scope="{ queryParams }">
<template slot="handle" slot-scope="{ data }">
<el-button
plain
size="mini"
type="primary"
icon="el-icon-view"
@click="onHandleViewDetail(queryParams)"
@click="onHandleViewDetail(data)"
>
详情
</el-button>
@ -40,32 +40,16 @@ export default {
columnsList,
//
getPersonCountListAPI,
//
testTableList: [
{
mainProName: '分公司1',
volLevel: '工程1',
subNum: 1,
teamNum: 1,
teamNum: 1,
},
{
mainProName: '分公司1',
volLevel: '工程1',
subNum: 1,
teamNum: 1,
teamNum: 1,
},
],
}
},
methods: {
onHandleViewDetail(queryParams) {
console.log(queryParams)
onHandleViewDetail(data) {
this.$router.push({
name: 'PersonCountDetail',
query: {
workerId: data.workerId,
},
})
},
},

View File

@ -186,7 +186,10 @@
<script>
import DialogModel from '@/components/DialogModel/index.vue'
import { getThreeAndOneMonthlyDataAPI } from '@/api/synthesize-query/three-and-one'
import {
getThreeAndOneMonthlyDataAPI,
updateThreeAndOneMonthlyWagePaymentAPI,
} from '@/api/synthesize-query/three-and-one'
export default {
name: 'SubTeamCard',
components: {
@ -338,8 +341,13 @@ export default {
},
//
onHandleUpdateData(row) {
console.log('row', row)
async onHandleUpdateData(row) {
const res = await updateThreeAndOneMonthlyWagePaymentAPI({
proId: this.projectId,
month: row.tableMonth,
})
console.log('res更新结果', res)
},
},
}