This commit is contained in:
parent
9a76774199
commit
62fb3f9b73
Binary file not shown.
Binary file not shown.
|
|
@ -51,3 +51,10 @@ export const importEntryPersonAPI = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
// 修改人员的红绿灯状态
|
||||
export const updatePersonLightStatusAPI = (id) => {
|
||||
return request({
|
||||
url: `/bmw/workerWageCard/light/${id}`,
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export const uploadExitFileAPI = (data) => {
|
|||
export const deleteEntryPersonAPI = (data) => {
|
||||
return request({
|
||||
url: `/bmw/worker/delete/${data.id}`,
|
||||
method: 'post',
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -48,14 +48,14 @@ export const deleteEntryPersonAPI = (data) => {
|
|||
export const getEntryPersonDetailAPI = (data) => {
|
||||
return request({
|
||||
url: `/bmw/worker/select/${data.id}`,
|
||||
method: 'post',
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
// 人员出场 修改人员接口
|
||||
export const editEntryPersonAPI = (data) => {
|
||||
return request({
|
||||
url: `/bmw/worker/edit`,
|
||||
method: 'post',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
@ -64,7 +64,15 @@ export const editEntryPersonAPI = (data) => {
|
|||
export const getExitPersonListAPI = (data) => {
|
||||
return request({
|
||||
url: '/bmw/workerExit/list',
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 人员出场后 查看工资结算确认单
|
||||
export const getExitFileAPI = (id) => {
|
||||
return request({
|
||||
url: `/bmw/workerExit/lookFile/${id}`,
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ export default {
|
|||
methods: {
|
||||
// 删除
|
||||
async handleRemove(file, fileList) {
|
||||
this.$emit('onUploadChange', fileList)
|
||||
// if (file.response && file.response.data.length > 0) {
|
||||
// this.$emit('deleteFile', {
|
||||
// filePath: file.response.data[0].filePath,
|
||||
|
|
@ -190,6 +191,7 @@ export default {
|
|||
handleChange(file, fileList) {
|
||||
console.log(file, fileList, 'file, fileList')
|
||||
this.$emit('update:fileList', fileList)
|
||||
this.$emit('onUploadChange', fileList)
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -133,6 +133,10 @@ export default {
|
|||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
workerId: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -203,9 +207,10 @@ export default {
|
|||
this.download(
|
||||
'/bmw/workerLight/attExportByWorkerMsg',
|
||||
{
|
||||
teamId: this.teamId,
|
||||
proId: this.proId,
|
||||
teamId: this.teamId,
|
||||
idNumber: this.idNumber,
|
||||
workerId: this.workerId,
|
||||
startDate: this.timeRange[0],
|
||||
endDate: this.timeRange[1],
|
||||
},
|
||||
|
|
@ -216,9 +221,10 @@ export default {
|
|||
// 获取考勤详情列表
|
||||
async getAttendanceDetailsListData() {
|
||||
const params = {
|
||||
teamId: this.teamId,
|
||||
proId: this.proId,
|
||||
teamId: this.teamId,
|
||||
idNumber: this.idNumber,
|
||||
workerId: this.workerId,
|
||||
startDate: this.timeRange[0],
|
||||
endDate: this.timeRange[1],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
<AttendanceDetails
|
||||
:proId="proId"
|
||||
:teamId="teamId"
|
||||
:workerId="workerId"
|
||||
:idNumber="idNumber"
|
||||
/>
|
||||
</template>
|
||||
|
|
@ -97,7 +98,8 @@ export default {
|
|||
personDialogConfig,
|
||||
getPersonListAPI,
|
||||
idNumber: '',
|
||||
slots: ['attDay', 'notAttNum'],
|
||||
workerId: '',
|
||||
slots: ['attNum', 'notAttNum'],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -120,6 +122,7 @@ export default {
|
|||
// 点击人员姓名 弹出考勤详情
|
||||
onHandleCheckPerson(data) {
|
||||
this.idNumber = data.idNumber
|
||||
this.workerId = data.workerId
|
||||
this.personDialogConfig.outerVisible = true
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,7 +20,14 @@
|
|||
v-model="idCardReaderForm.idCardReaderAddress"
|
||||
/>
|
||||
|
||||
<span class="tip-text">
|
||||
<span
|
||||
class="tip-text"
|
||||
style="
|
||||
width: 10%;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
"
|
||||
>
|
||||
{{ isConnected ? '已连接' : '未连接' }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
|
@ -189,6 +196,7 @@
|
|||
:limit="1"
|
||||
:file-size="10"
|
||||
:multiple="true"
|
||||
@onUploadChange="onUploadChange"
|
||||
:file-type="['jpg', 'png', 'jpeg']"
|
||||
:file-list.sync="idCardInfoForm.faceImg"
|
||||
:is-uploaded="idCardInfoForm.faceImg.length >= 1"
|
||||
|
|
@ -580,6 +588,7 @@ import {
|
|||
addEntryPersonAPI,
|
||||
editEntryPersonAPI,
|
||||
getEntryPersonDetailAPI,
|
||||
updatePersonLightStatusAPI,
|
||||
} from '@/api/construction-person/entry-and-exit-manage/person-entry'
|
||||
import {
|
||||
getSubSelectListByConditionAPI,
|
||||
|
|
@ -1207,6 +1216,19 @@ export default {
|
|||
? '修改人员成功'
|
||||
: '新增人员成功',
|
||||
)
|
||||
|
||||
// 更新一下红绿灯状态
|
||||
const result =
|
||||
await updatePersonLightStatusAPI(
|
||||
this.queryDetailsId
|
||||
? this.workerId
|
||||
: res.data.id,
|
||||
)
|
||||
console.log(
|
||||
result,
|
||||
'result红绿灯状态更新结果',
|
||||
)
|
||||
|
||||
resolve()
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
|
|
@ -1542,9 +1564,13 @@ export default {
|
|||
this.webSocket.close()
|
||||
},
|
||||
|
||||
// 下载身份证读卡器驱动
|
||||
downloadIdCardReaderDriver() {
|
||||
// window.open(this.idCardReaderForm.idCardReaderAddress)
|
||||
// 人脸照片验证
|
||||
onUploadChange(fileList) {
|
||||
console.log('人脸照片验证', fileList)
|
||||
|
||||
if (fileList.length > 0) {
|
||||
// 走验证逻辑
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@
|
|||
>
|
||||
<AddOrEditForm
|
||||
:formType="formType"
|
||||
:workerId="workerId"
|
||||
:einStatus="einStatus"
|
||||
ref="addOrEditFormContentRef"
|
||||
:queryDetailsId="queryDetailsId"
|
||||
|
|
@ -178,11 +179,12 @@ export default {
|
|||
formLabel,
|
||||
columnsList,
|
||||
dialogConfig,
|
||||
getEntryPersonListAPI,
|
||||
queryDetailsId: '', // 查询详情id
|
||||
einStatus: 1, // 在场状态
|
||||
workerId: '', // 人员id
|
||||
formType: 1, // 表单类型
|
||||
einStatus: 1, // 在场状态
|
||||
queryDetailsId: '', // 查询详情id
|
||||
importFileList: [], // 导入文件列表
|
||||
getEntryPersonListAPI,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -207,9 +209,11 @@ export default {
|
|||
this.formType = type
|
||||
if (type === 2) {
|
||||
this.queryDetailsId = data.id
|
||||
this.workerId = data.workerId
|
||||
this.einStatus = data.einStatus
|
||||
this.dialogConfig.outerVisible = true
|
||||
} else {
|
||||
this.workerId = ''
|
||||
this.queryDetailsId = ''
|
||||
this.dialogConfig.outerVisible = true
|
||||
}
|
||||
|
|
@ -265,6 +269,7 @@ export default {
|
|||
|
||||
// 下载模板
|
||||
async onHandleDownloadTemplate() {
|
||||
window.open(window.origin + '/人员入场-模版.xlsx')
|
||||
// this.download(
|
||||
// '/bmw/download/workerEinTemplate',
|
||||
// {},
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="endTime"
|
||||
prop="exitTime"
|
||||
label="出场时间"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
|
@ -57,21 +57,104 @@
|
|||
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)"
|
||||
>
|
||||
3
|
||||
</el-button>
|
||||
查看
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<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 { getPersonEntryAndExitRecordAPI } from '@/api/construction-person/entry-and-exit-manage/person-exit'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import PersonExitForm from './person-exit-form.vue'
|
||||
import {
|
||||
getExitFileAPI,
|
||||
getPersonEntryAndExitRecordAPI,
|
||||
} from '@/api/construction-person/entry-and-exit-manage/person-exit'
|
||||
export default {
|
||||
name: 'EntryExitRecord',
|
||||
props: {
|
||||
|
|
@ -80,9 +163,23 @@ export default {
|
|||
default: '',
|
||||
},
|
||||
},
|
||||
components: {
|
||||
DialogModel,
|
||||
PersonExitForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
isExitUpload: 2,
|
||||
exitFormData: {},
|
||||
entryExitRecordList: [],
|
||||
dialogConfig: {
|
||||
outerVisible: false,
|
||||
outerTitle: '人员出场',
|
||||
outerWidth: '',
|
||||
minHeight: '',
|
||||
maxHeight: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -96,8 +193,58 @@ export default {
|
|||
},
|
||||
|
||||
// 查看附件
|
||||
onHandlePreviewFile(row) {
|
||||
console.log(row, '查看附件')
|
||||
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')
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
<!-- 新增或修改标段工程表单 -->
|
||||
<div>
|
||||
<el-form
|
||||
label-width="140px"
|
||||
ref="addOrEditFormRef"
|
||||
label-width="160px"
|
||||
ref="personExitFormRef"
|
||||
:rules="personExitFormRules"
|
||||
:model="personExitFormData"
|
||||
>
|
||||
<el-row>
|
||||
|
|
@ -56,7 +57,7 @@
|
|||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="离场工资结算确认单">
|
||||
<el-form-item label="离场工资结算确认单" prop="fileList">
|
||||
<UploadFileFormData
|
||||
:limit="3"
|
||||
:file-size="20"
|
||||
|
|
@ -111,6 +112,15 @@ export default {
|
|||
teamName: '',
|
||||
fileList: [],
|
||||
},
|
||||
personExitFormRules: {
|
||||
fileList: [
|
||||
{
|
||||
trigger: 'change,blur',
|
||||
required: this.isExitUpload === 2,
|
||||
message: '请上传离场工资结算确认单',
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -124,6 +134,7 @@ export default {
|
|||
id,
|
||||
proId,
|
||||
workerId,
|
||||
exitWay: '后端',
|
||||
}
|
||||
const fileMsg = []
|
||||
const formData = new FormData()
|
||||
|
|
@ -150,6 +161,8 @@ export default {
|
|||
reject(new Error(res.msg))
|
||||
}
|
||||
} else {
|
||||
this.$refs.personExitFormRef.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const { id, fileList } = this.personExitFormData
|
||||
const params = {
|
||||
id,
|
||||
|
|
@ -179,6 +192,10 @@ export default {
|
|||
this.$modal.msgError(res.msg)
|
||||
reject(new Error(res.msg))
|
||||
}
|
||||
} else {
|
||||
reject(new Error('请上传离场工资结算确认单'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ import {
|
|||
uploadContractAPI,
|
||||
getContractDetailAPI,
|
||||
} from '@/api/construction-person/red-green-light-mange/contract-witness'
|
||||
import { updatePersonLightStatusAPI } from '@/api/construction-person/entry-and-exit-manage/person-entry'
|
||||
export default {
|
||||
name: 'ContractWitnessUpload',
|
||||
props: {
|
||||
|
|
@ -362,6 +363,11 @@ export default {
|
|||
const res = await uploadContractAPI(formData)
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('合同上传成功')
|
||||
// 更新一下红绿灯状态
|
||||
const result = await updatePersonLightStatusAPI(
|
||||
this.workerId,
|
||||
)
|
||||
console.log(result, 'result红绿灯状态更新结果')
|
||||
resolve()
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
|
|
|
|||
|
|
@ -411,6 +411,7 @@ export default {
|
|||
|
||||
// 下载模板
|
||||
async onHandleDownloadTemplate() {
|
||||
window.open(window.origin + '/失信人员-模板.xlsx')
|
||||
// this.download(
|
||||
// '/bmw/download/workerEinTemplate',
|
||||
// {},
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ import {
|
|||
uploadWageCardAPI,
|
||||
getContractDetailAPI,
|
||||
} from '@/api/construction-person/red-green-light-mange/wage-card-witness'
|
||||
import { updatePersonLightStatusAPI } from '@/api/construction-person/entry-and-exit-manage/person-entry'
|
||||
export default {
|
||||
name: 'AddOrEditForm',
|
||||
props: {
|
||||
|
|
@ -320,6 +321,13 @@ export default {
|
|||
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('工资卡信息上传成功')
|
||||
|
||||
// 更新一下红绿灯状态
|
||||
const result = await updatePersonLightStatusAPI(
|
||||
this.workerId,
|
||||
)
|
||||
console.log(result, 'result红绿灯状态更新结果')
|
||||
|
||||
resolve()
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
|
|
|
|||
Loading…
Reference in New Issue