人员统计页面接口调试

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, 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) => { export const updateThreeAndOneMonthlyWagePaymentAPI = (data) => {
return request({ return request({
url: '/bmw/pmProject/updateSalary', url: '/bmw/pmProject/updateThreeTableOneRoster',
method: 'POST', method: 'GET',
data, params: data,
}) })
} }

View File

@ -18,8 +18,11 @@
> >
<el-form-item label="考勤日期"> <el-form-item label="考勤日期">
<el-date-picker <el-date-picker
type="date" type="daterange"
v-model="attInfoQueryParams.entryTime" value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
v-model="timeList"
placeholder="请选择考勤日期" placeholder="请选择考勤日期"
/> />
</el-form-item> </el-form-item>
@ -63,11 +66,30 @@
<el-table-column <el-table-column
align="center" align="center"
:key="item.prop" :key="item.prop"
:prop="item.prop"
:label="item.label" :label="item.label"
show-overflow-tooltip show-overflow-tooltip
v-for="item in columnData" 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> </el-table>
<div style="padding-right: 20px"> <div style="padding-right: 20px">
@ -84,61 +106,67 @@
</template> </template>
<script> <script>
import { getPersonCountDetailAttendanceInfoAPI } from '@/api/synthesize-query/person-count'
export default { export default {
name: 'AttInfo', name: 'AttInfo',
props: {}, props: {
workerId: {
type: [Number, String],
default: '',
},
},
data() { data() {
return { return {
total: 100, total: 0,
timeList: [],
attInfoQueryParams: { attInfoQueryParams: {
entryTime: '', startTime: '',
endTime: '',
pageNum: 1,
pageSize: 10,
workerId: this.workerId,
}, },
attInfoData: [ 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,
},
],
columnData: [ columnData: [
{ {
label: '考勤日期', label: '考勤日期',
prop: 'entryTime', prop: 'attDay',
}, },
{ {
label: '考勤状态', label: '考勤状态',
prop: 'exitTime', prop: 'attStatus',
}, },
{ {
label: '时间', label: '时间',
prop: 'contractName', prop: 'attTime',
}, },
{ {
label: '工程名称', label: '工程名称',
prop: 'subcontractorName', prop: 'proName',
}, },
{ {
label: '考勤机名称', label: '考勤机名称',
prop: 'totalEntryCount', prop: 'devName',
}, },
{ {
label: '考勤机编号', label: '考勤机编号',
prop: 'currentOnsiteCount', prop: 'deviceCode',
}, },
], ],
} }
}, },
created() {},
watch: {}, watch: {
workerId: {
handler(newVal) {
if (newVal) {
this.getAttInfoData()
}
},
immediate: true,
deep: true,
},
},
methods: { methods: {
// //
tableHeaderStyle() { tableHeaderStyle() {
@ -155,19 +183,20 @@ export default {
return { return {
fontSize: '14px', fontSize: '14px',
color: '#606266', color: '#606266',
padding: '12px 8px', padding: '12px 0',
} }
}, },
// //
handleQuery() { handleQuery() {
// this.getAttInfoData() this.getAttInfoData()
}, },
// //
resetQuery() { resetQuery() {
this.attInfoQueryParams = { this.timeList = []
entryTime: '', this.attInfoQueryParams.pageNum = 1
} this.attInfoQueryParams.pageSize = 10
this.getAttInfoData()
}, },
// //
handleExport() { handleExport() {
@ -180,8 +209,21 @@ export default {
// ) // )
}, },
// //
getAttInfoData() { async getAttInfoData() {
// this.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"> <div class="table-container">
<el-table <el-table
:data="contractData" :data="bmWorkerContractList"
style="width: 100%" style="width: 100%"
:header-cell-style="tableHeaderStyle" :header-cell-style="tableHeaderStyle"
:cell-style="tableCellStyle" :cell-style="tableCellStyle"
@ -20,12 +20,60 @@
> >
<el-table-column <el-table-column
:key="item.prop" :key="item.prop"
:prop="item.prop"
align="center" align="center"
:label="item.label" :label="item.label"
show-overflow-tooltip show-overflow-tooltip
v-for="item in columnData" 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> </el-table>
</div> </div>
</div> </div>
@ -35,65 +83,54 @@
<script> <script>
export default { export default {
name: 'Contract', name: 'Contract',
props: {}, props: {
bmWorkerContractList: {
type: Array,
default: () => [],
},
},
data() { data() {
return { 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: [ columnData: [
{ {
label: '合同编号', label: '合同编号',
prop: 'entryTime', prop: 'contractCode',
}, },
{ {
label: '合同期限类型', label: '合同期限类型',
prop: 'exitTime', prop: 'contractTermType',
}, },
{ {
label: '合同状态', label: '合同状态',
prop: 'contractName', prop: 'isActive',
}, },
{ {
label: '合同签订日期', label: '合同签订日期',
prop: 'subcontractorName', prop: 'contractStartDate',
}, },
{ {
label: '合同终止日期', label: '合同终止日期',
prop: 'totalEntryCount', prop: 'contractStopDate',
}, },
{ {
label: '工资核定方式', label: '工资核定方式',
prop: 'currentOnsiteCount', prop: 'wageApprovedWay',
}, },
{ {
label: '工资核定标准', label: '工资核定标准',
prop: 'entryTime', prop: 'wageCriterion',
}, },
{ {
label: '合同见证照片', label: '合同见证照片',
prop: 'entryExitStatus', prop: 'files_1',
}, },
{ {
label: '附件', label: '附件',
prop: 'wageCommitment', prop: 'files_2',
}, },
{ {
label: '系统录入时间', label: '系统录入时间',
prop: 'wageCommitment', prop: 'contractUploadDate',
}, },
], ],
} }
@ -116,7 +153,7 @@ export default {
return { return {
fontSize: '14px', fontSize: '14px',
color: '#606266', 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> </style>

View File

@ -11,21 +11,67 @@
<div class="table-container"> <div class="table-container">
<el-table <el-table
:data="entryExitData"
style="width: 100%"
:header-cell-style="tableHeaderStyle"
:cell-style="tableCellStyle"
stripe stripe
border border
style="width: 100%"
:cell-style="tableCellStyle"
:data="bmWorkerEinProRecordList"
:header-cell-style="tableHeaderStyle"
> >
<el-table-column <el-table-column
:key="item.prop" :key="item.prop"
:prop="item.prop"
align="center" align="center"
:label="item.label" :label="item.label"
show-overflow-tooltip show-overflow-tooltip
v-for="item in columnData" 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> </el-table>
</div> </div>
</div> </div>
@ -35,29 +81,18 @@
<script> <script>
export default { export default {
name: 'EntryExit', name: 'EntryExit',
props: {}, props: {
bmWorkerEinProRecordList: {
type: Array,
default: () => [],
},
},
data() { data() {
return { 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: [ columnData: [
{ {
label: '入场时间', label: '入场时间',
prop: 'entryTime', prop: 'einTime',
}, },
{ {
label: '出场时间', label: '出场时间',
@ -65,31 +100,31 @@ export default {
}, },
{ {
label: '入场工程', label: '入场工程',
prop: 'contractName', prop: 'proName',
}, },
{ {
label: '入场分包', label: '入场分包',
prop: 'subcontractorName', prop: 'subName',
}, },
{ {
label: '入场班组', label: '入场班组',
prop: 'totalEntryCount', prop: 'teamName',
}, },
{ {
label: '工种', label: '工种',
prop: 'currentOnsiteCount', prop: 'postName',
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'entryTime', prop: 'phone',
}, },
{ {
label: '出入场状态', label: '出入场状态',
prop: 'entryExitStatus', prop: 'einStatus',
}, },
{ {
label: '离场人员工资结算确认单', 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> </style>

View File

@ -15,7 +15,16 @@
:key="item.valueKey" :key="item.valueKey"
> >
<div class="data-label">{{ item.label }}</div> <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> </div>
</div> </div>
@ -23,68 +32,117 @@
</template> </template>
<script> <script>
import { getPersonCountDetailAPI } from '@/api/synthesize-query/person-count'
export default { export default {
name: 'PersonInfoCard', name: 'PersonInfoCard',
props: {
workerId: {
type: [Number, String],
default: '',
},
},
data() { data() {
return { return {
idNumberInfoLabel: [ idNumberInfoLabel: [
{ {
label: '姓名', label: '姓名',
value: '姓名', value: '名',
valueKey: 'name', valueKey: 'name',
}, },
{ {
label: '身份证号', label: '身份证号',
value: '身份证号', value: '',
valueKey: 'idNumber', valueKey: 'idNumber',
}, },
{ {
label: '性别', label: '性别',
value: '性别', value: '',
valueKey: 'birthDate', valueKey: 'sex',
}, },
{ {
label: '出生日期', label: '出生日期',
value: '出生日期', value: '',
valueKey: 'birthDate', valueKey: 'birthday',
}, },
{ {
label: '签发机关', label: '签发机关',
value: '签发机关', value: '',
valueKey: 'birthDate', valueKey: 'issuingAuthority',
}, },
{ {
label: '民族', label: '民族',
value: '民族', value: '',
valueKey: 'birthDate', valueKey: 'nation',
}, },
{ {
label: '生效日期', label: '生效日期',
value: '生效日期', value: '',
valueKey: 'birthDate', valueKey: 'startTime',
}, },
{ {
label: '失效日期', label: '失效日期',
value: '失效日期', value: '',
valueKey: 'birthDate', valueKey: 'endTime',
}, },
{ {
label: '人脸片', label: '人脸片',
value: '人脸图片', value: '',
valueKey: 'birthDate', valueKey: 'files',
}, },
{ {
label: ' 身份证住址', label: ' 身份证住址',
value: ' 身份证住址', value: ' ',
valueKey: 'birthDate', valueKey: 'address',
}, },
], ],
} }
}, },
created() {}, created() {},
watch: {}, watch: {
methods: {}, 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> </script>
@ -164,9 +222,9 @@ export default {
.data-label { .data-label {
padding: 16px 20px; padding: 16px 20px;
font-size: 16px; font-size: 14px;
color: #6b7280; color: #352e2e;
font-weight: 500; font-weight: 600;
background: #f8f9fa; background: #f8f9fa;
} }

View File

@ -5,12 +5,15 @@
<span>人员信息</span> <span>人员信息</span>
</div> </div>
<IdCard /> <IdCard
<EntryExit /> :workerId="workerId"
<Contract /> @initPersonDetailsData="initPersonDetailsData"
<WageCard /> />
<AttInfo /> <EntryExit :bmWorkerEinProRecordList="bmWorkerEinProRecordList" />
<WageInfo /> <Contract :bmWorkerContractList="bmWorkerContractList" />
<WageCard :bmWorkerWageCard="bmWorkerWageCard" />
<AttInfo :workerId="workerId" />
<WageInfo :workerId="workerId" />
</div> </div>
</template> </template>
@ -31,12 +34,32 @@ export default {
AttInfo, AttInfo,
WageInfo, WageInfo,
}, },
data() { props: {
return {} 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> </script>

View File

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

View File

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

View File

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

View File

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

View File

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