增加出场人员查询
This commit is contained in:
parent
57101265f7
commit
d7db833a54
|
|
@ -27,6 +27,16 @@ export const getPersonEntryAndExitRecordAPI = (data) => {
|
||||||
params: data,
|
params: data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取已经出场人员列表
|
||||||
|
export const getAlreadyExitPersonListAPI = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/bmw/workerExit/workerProList',
|
||||||
|
method: 'GET',
|
||||||
|
params: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 已出场且未上传工资单 然后单独上传接口
|
// 已出场且未上传工资单 然后单独上传接口
|
||||||
export const uploadExitFileAPI = (data) => {
|
export const uploadExitFileAPI = (data) => {
|
||||||
return requestFormData({
|
return requestFormData({
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,321 @@
|
||||||
|
<template>
|
||||||
|
<!-- 出场人员信息 -->
|
||||||
|
<div>
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
size="small"
|
||||||
|
:model="queryParams"
|
||||||
|
label-width="auto"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="姓名">
|
||||||
|
<el-input
|
||||||
|
clearable
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
v-model.trim="queryParams.name"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
>
|
||||||
|
查询
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
@click="resetQuery"
|
||||||
|
>
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-table :data="entryExitRecordList">
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="序号"
|
||||||
|
type="index"
|
||||||
|
width="50"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="name"
|
||||||
|
label="姓名"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="postName"
|
||||||
|
label="工种"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="proName"
|
||||||
|
label="所属工程"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="subName"
|
||||||
|
label="所属分包"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="teamName"
|
||||||
|
label="所属班组"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="einTime"
|
||||||
|
label="入场时间"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="exitTime"
|
||||||
|
label="出场时间"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
label="离场人员工资结算确认单"
|
||||||
|
>
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<el-tag
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
v-if="row.isUploadFile == 0"
|
||||||
|
>
|
||||||
|
未上传
|
||||||
|
{{
|
||||||
|
row.daysSinceExit * 1 > 0
|
||||||
|
? '(' + row.daysSinceExit + '天)'
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
|
</el-tag>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
style="margin-left: 5px"
|
||||||
|
@click="onHandlePersonExit(row)"
|
||||||
|
v-if="
|
||||||
|
row.isUploadFile == 0 &&
|
||||||
|
row.einStatus === 2 &&
|
||||||
|
row.daysSinceExit * 1 < 31
|
||||||
|
"
|
||||||
|
>
|
||||||
|
点击上传
|
||||||
|
</el-button>
|
||||||
|
<el-tag
|
||||||
|
size="mini"
|
||||||
|
type="success"
|
||||||
|
style="cursor: pointer"
|
||||||
|
v-if="row.isUploadFile == 1"
|
||||||
|
@click="onHandlePreviewFile(row)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
:total="total"
|
||||||
|
@pagination="getPersonEntryAndExitRecordList"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<DialogModel
|
||||||
|
:dialogConfig="dialogConfig"
|
||||||
|
@closeDialogOuter="handleCloseDialogOuter"
|
||||||
|
>
|
||||||
|
<template slot="outerContent">
|
||||||
|
<template v-if="dialogConfig.outerTitle === '人员出场'">
|
||||||
|
<PersonExitForm
|
||||||
|
ref="personExitFormRef"
|
||||||
|
:exitFormData="exitFormData"
|
||||||
|
:isExitUpload="isExitUpload"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-row class="dialog-footer-btn">
|
||||||
|
<el-button
|
||||||
|
size="medium"
|
||||||
|
@click="handleCloseDialogOuter"
|
||||||
|
>
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="medium"
|
||||||
|
type="primary"
|
||||||
|
@click="onHandleConfirmAddOrEdit"
|
||||||
|
>
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-if="dialogConfig.outerTitle === '工资结算确认单'">
|
||||||
|
<el-row
|
||||||
|
:key="item.id"
|
||||||
|
v-for="item in fileList"
|
||||||
|
style="margin-bottom: 10px"
|
||||||
|
>
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-tag>{{ item.originFileName }}</el-tag>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<span
|
||||||
|
class="cursor-blue"
|
||||||
|
@click="onHandleDownload(item)"
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</DialogModel>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import DialogModel from '@/components/DialogModel'
|
||||||
|
import PersonExitForm from './person-exit-form.vue'
|
||||||
|
import {
|
||||||
|
getExitFileAPI,
|
||||||
|
getPersonEntryAndExitRecordAPI,
|
||||||
|
getAlreadyExitPersonListAPI,
|
||||||
|
} from '@/api/construction-person/entry-and-exit-manage/person-exit'
|
||||||
|
export default {
|
||||||
|
name: 'EntryExitRecord',
|
||||||
|
props: {
|
||||||
|
queryDetailsId: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
DialogModel,
|
||||||
|
PersonExitForm,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
total: 0,
|
||||||
|
fileList: [],
|
||||||
|
isExitUpload: 2,
|
||||||
|
exitFormData: {},
|
||||||
|
entryExitRecordList: [],
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: '',
|
||||||
|
},
|
||||||
|
dialogConfig: {
|
||||||
|
outerVisible: false,
|
||||||
|
outerTitle: '人员出场',
|
||||||
|
outerWidth: '',
|
||||||
|
minHeight: '',
|
||||||
|
maxHeight: '',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
// 获取出入场记录列表
|
||||||
|
async getPersonEntryAndExitRecordList() {
|
||||||
|
const res = await getAlreadyExitPersonListAPI(this.queryParams)
|
||||||
|
|
||||||
|
console.log(res, '出场人员列表')
|
||||||
|
this.entryExitRecordList = res.rows
|
||||||
|
this.total = res.total
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查看附件
|
||||||
|
async onHandlePreviewFile(row) {
|
||||||
|
const { data: res } = await getExitFileAPI(row.id)
|
||||||
|
this.fileList = res
|
||||||
|
this.dialogConfig.outerTitle = '工资结算确认单'
|
||||||
|
this.dialogConfig.outerWidth = '30%'
|
||||||
|
this.dialogConfig.outerVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 点击上传
|
||||||
|
onHandlePersonExit(data) {
|
||||||
|
const {
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
proId,
|
||||||
|
proName,
|
||||||
|
subName,
|
||||||
|
idNumber,
|
||||||
|
workerId,
|
||||||
|
teamName,
|
||||||
|
} = data
|
||||||
|
|
||||||
|
this.exitFormData = {
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
proId,
|
||||||
|
proName,
|
||||||
|
subName,
|
||||||
|
teamName,
|
||||||
|
idNumber,
|
||||||
|
workerId,
|
||||||
|
}
|
||||||
|
this.dialogConfig.outerVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 关闭弹框
|
||||||
|
handleCloseDialogOuter() {
|
||||||
|
this.dialogConfig.outerVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
// 确定
|
||||||
|
async onHandleConfirmAddOrEdit() {
|
||||||
|
try {
|
||||||
|
await this.$refs.personExitFormRef.onHandleConfirmAddOrEditFun()
|
||||||
|
this.handleCloseDialogOuter()
|
||||||
|
} catch (error) {
|
||||||
|
// console.log('表单提交失败', error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 下载
|
||||||
|
onHandleDownload(item) {
|
||||||
|
window.open(item.lsUrl, '_blank')
|
||||||
|
},
|
||||||
|
|
||||||
|
// 重置
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: '',
|
||||||
|
}
|
||||||
|
this.getPersonEntryAndExitRecordList()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
handleQuery() {
|
||||||
|
this.getPersonEntryAndExitRecordList()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
|
|
@ -35,6 +35,14 @@
|
||||||
<span class="tip-text">
|
<span class="tip-text">
|
||||||
出场后一个月未上传《离场工资结算确认单》,人员自动进入失信人员
|
出场后一个月未上传《离场工资结算确认单》,人员自动进入失信人员
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<span
|
||||||
|
class="cursor-blue"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
@click="onHandleExitPersonList"
|
||||||
|
>
|
||||||
|
出场人员
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="einStatus" slot-scope="{ data }">
|
<template slot="einStatus" slot-scope="{ data }">
|
||||||
|
|
@ -117,6 +125,11 @@
|
||||||
v-if="dialogConfig.outerTitle === '出入场记录'"
|
v-if="dialogConfig.outerTitle === '出入场记录'"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<ExitPersonList
|
||||||
|
ref="exitPersonListRef"
|
||||||
|
v-if="dialogConfig.outerTitle === '出场人员'"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-row
|
<el-row
|
||||||
class="dialog-footer-btn"
|
class="dialog-footer-btn"
|
||||||
v-if="dialogConfig.outerTitle === '人员出场'"
|
v-if="dialogConfig.outerTitle === '人员出场'"
|
||||||
|
|
@ -142,6 +155,7 @@ import TableModel from '@/components/TableModel'
|
||||||
import DialogModel from '@/components/DialogModel'
|
import DialogModel from '@/components/DialogModel'
|
||||||
import PersonExitForm from './person-exit-form.vue'
|
import PersonExitForm from './person-exit-form.vue'
|
||||||
import EntryExitRecord from './entry-exit-record.vue'
|
import EntryExitRecord from './entry-exit-record.vue'
|
||||||
|
import ExitPersonList from './exit-person-list.vue'
|
||||||
import {
|
import {
|
||||||
getSubSelectListCommonFun,
|
getSubSelectListCommonFun,
|
||||||
getTeamSelectListCommonFun,
|
getTeamSelectListCommonFun,
|
||||||
|
|
@ -162,6 +176,7 @@ export default {
|
||||||
DialogModel,
|
DialogModel,
|
||||||
PersonExitForm,
|
PersonExitForm,
|
||||||
EntryExitRecord,
|
EntryExitRecord,
|
||||||
|
ExitPersonList,
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -283,6 +298,19 @@ export default {
|
||||||
handleCloseDialogOuter() {
|
handleCloseDialogOuter() {
|
||||||
this.dialogConfig.outerVisible = false
|
this.dialogConfig.outerVisible = false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 出场人员
|
||||||
|
onHandleExitPersonList() {
|
||||||
|
this.dialogConfig.outerTitle = '出场人员'
|
||||||
|
this.dialogConfig.outerWidth = '80%'
|
||||||
|
this.dialogConfig.minHeight = '90vh'
|
||||||
|
this.dialogConfig.maxHeight = '90vh'
|
||||||
|
this.dialogConfig.outerVisible = true
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.exitPersonListRef.getPersonEntryAndExitRecordList()
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue