From 8815c8f5f2d51e8fc6a13834134e4a0064bbb70a Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Sat, 16 Aug 2025 16:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=87=BA=E5=9C=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry-and-exit-manage/person-exit.js | 6 +- .../sub-manage/sub-entry-and-exit/config.js | 4 +- .../sub-entry-and-exit/entry-form.vue | 58 +- .../sub-manage/sub-entry-and-exit/index.vue | 53 +- .../team-manage/team-entry-and-exit/config.js | 22 +- .../entry-and-exit-form.vue | 58 +- .../team-manage/team-entry-and-exit/index.vue | 71 ++- .../person-exit/add-or-edit-form.vue | 591 ------------------ .../person-exit/config.js | 22 +- .../person-exit/entry-exit-record.vue | 28 + .../person-exit/index.vue | 90 ++- .../person-exit/person-exit-form.vue | 173 +++++ 12 files changed, 493 insertions(+), 683 deletions(-) delete mode 100644 src/views/construction-person/entry-and-exit-manage/person-exit/add-or-edit-form.vue create mode 100644 src/views/construction-person/entry-and-exit-manage/person-exit/entry-exit-record.vue create mode 100644 src/views/construction-person/entry-and-exit-manage/person-exit/person-exit-form.vue diff --git a/src/api/construction-person/entry-and-exit-manage/person-exit.js b/src/api/construction-person/entry-and-exit-manage/person-exit.js index ce50462..4bd7098 100644 --- a/src/api/construction-person/entry-and-exit-manage/person-exit.js +++ b/src/api/construction-person/entry-and-exit-manage/person-exit.js @@ -1,11 +1,11 @@ import request from '@/utils/request' import requestFormData from '@/utils/request_formdata' -// 人员出场 新增人员接口 +// 人员出场 新增人员出场接口 export const addEntryPersonAPI = (data) => { return requestFormData({ - url: '/bmw/worker/insert', - method: 'post', + url: '/bmw/workerExit/exit', + method: 'POST', data, }) } diff --git a/src/views/basic-manage/sub-manage/sub-entry-and-exit/config.js b/src/views/basic-manage/sub-manage/sub-entry-and-exit/config.js index 83f71b2..fc32b52 100644 --- a/src/views/basic-manage/sub-manage/sub-entry-and-exit/config.js +++ b/src/views/basic-manage/sub-manage/sub-entry-and-exit/config.js @@ -52,13 +52,13 @@ export const columnsList = [ t_props: 'subEinTime', t_label: '分包入场时间', }, - { t_props: 'idCard', t_label: '授权委托书', t_slot: 'idCard' }, + { t_label: '授权委托书', t_slot: 'file-1' }, { t_props: 'subExitTime', t_label: '分包出场时间', }, { - t_props: 'electronicSignature', + t_slot: 'file-2', t_label: '工资已支付完成承诺书', }, ] diff --git a/src/views/basic-manage/sub-manage/sub-entry-and-exit/entry-form.vue b/src/views/basic-manage/sub-manage/sub-entry-and-exit/entry-form.vue index 39328da..e6ae35a 100644 --- a/src/views/basic-manage/sub-manage/sub-entry-and-exit/entry-form.vue +++ b/src/views/basic-manage/sub-manage/sub-entry-and-exit/entry-form.vue @@ -173,6 +173,7 @@ export default { subSelectList: [], // 分包商下拉列表 lotProjectSelectList: [], // 标段工程下拉列表 + editUploadFileList: [], } }, methods: { @@ -205,14 +206,35 @@ export default { if (id) { params.id = id + let reserveFileList = [] + businessLicense.forEach((item) => { + if (item.id) { + reserveFileList.push(item.id) + } + }) + + if (reserveFileList.length > 0) { + fileIdList = this.editUploadFileList + .filter( + (item) => + !reserveFileList.includes(item.id), + ) + .map((j) => j.id) + + if (fileIdList.length > 0) { + params.delIds = fileIdList.join(',') + } + } } businessLicense.forEach((item) => { - formData.append('files', item.raw) - fileMsg.push({ - type: 1, - name: '法定代表人授权书', - }) + if (!item.id) { + formData.append('files', item.raw) + fileMsg.push({ + type: 1, + name: '法定代表人授权书', + }) + } }) formData.append('fileMsg', JSON.stringify(fileMsg)) @@ -247,7 +269,14 @@ export default { const { data: res } = await getSubEntryDetailAPI({ id: this.queryDetailId, }) - const { id, subId, proId, subContractName, subContractCode } = res + const { + id, + subId, + proId, + subContractName, + subContractCode, + contractFile, + } = res this.addOrEditForm = { id, @@ -255,7 +284,22 @@ export default { proId, subContractName, subContractCode, - businessLicense: [], + } + + if (contractFile && contractFile.length > 0) { + this.addOrEditForm.businessLicense = contractFile + .filter((item) => item.sourceType == 1) + .map((item) => { + return { + id: item.id, + url: item.lsUl, + name: item.fileName, + } + }) + + this.editUploadFileList = contractFile.filter( + (item) => item.sourceType == 1, + ) } }, }, diff --git a/src/views/basic-manage/sub-manage/sub-entry-and-exit/index.vue b/src/views/basic-manage/sub-manage/sub-entry-and-exit/index.vue index 23a4669..da43d21 100644 --- a/src/views/basic-manage/sub-manage/sub-entry-and-exit/index.vue +++ b/src/views/basic-manage/sub-manage/sub-entry-and-exit/index.vue @@ -32,20 +32,6 @@ - - - + + + @@ -88,10 +104,7 @@ import DialogModel from '@/components/DialogModel' import EntryAndExitForm from './entry-and-exit-form' import { formLabel, columnsList, dialogConfig } from './config' -import { - deleteTeamEntryAPI, - getTeamEntryListAPI, -} from '@/api/basic-manage/team-manage/team-entry-and-exit' +import { getTeamEntryListAPI } from '@/api/basic-manage/team-manage/team-entry-and-exit' export default { name: 'TeamEntryAndExit', @@ -115,16 +128,45 @@ export default { // 导出按钮 onHandleExportAllProject(queryParams) { console.log(queryParams, '导出') + this.download( + '/bmw/subTeamContract/export', + { + ...queryParams, + }, + `班组出入场列表.xlsx`, + ) }, - // 入场或出场 + // 入场或出场 详情 onHandleEntryAndExit(type, data) { this.formType = type this.dialogConfig.outerTitle = type === 1 ? '班组入场' : '班组出场' + if (type === 1) { + this.dialogConfig.outerTitle = '班组入场' + this.editFormData = {} + } if (type === 2) { - const { subId, proId, teamId, id, subName, proName, teamName } = - data + this.dialogConfig.outerTitle = '班组出场' + } + + if (type === 3) { + this.dialogConfig.outerTitle = '详情' + } + + if (type === 2 || type === 3) { + const { + subId, + proId, + teamId, + id, + subName, + proName, + teamName, + teamEinTime, + teamExitTime, + contractFile, + } = data this.editFormData = { id, subId, @@ -133,10 +175,12 @@ export default { subName, proName, teamName, + teamEinTime, + teamExitTime, + contractFile, } - } else { - this.editFormData = {} } + this.dialogConfig.outerVisible = true }, // 确定按钮 @@ -154,6 +198,15 @@ export default { handleCloseDialogOuter() { this.dialogConfig.outerVisible = false }, + + // 初始化施工承诺书 + initContractFile(data) { + if (data.contractFile && data.contractFile.length > 0) { + return '已上传' + } else { + return '-' + } + }, }, } diff --git a/src/views/construction-person/entry-and-exit-manage/person-exit/add-or-edit-form.vue b/src/views/construction-person/entry-and-exit-manage/person-exit/add-or-edit-form.vue deleted file mode 100644 index 9b97a80..0000000 --- a/src/views/construction-person/entry-and-exit-manage/person-exit/add-or-edit-form.vue +++ /dev/null @@ -1,591 +0,0 @@ - - - - - diff --git a/src/views/construction-person/entry-and-exit-manage/person-exit/config.js b/src/views/construction-person/entry-and-exit-manage/person-exit/config.js index ed6710c..ec25900 100644 --- a/src/views/construction-person/entry-and-exit-manage/person-exit/config.js +++ b/src/views/construction-person/entry-and-exit-manage/person-exit/config.js @@ -56,17 +56,17 @@ export const formLabel = [ ] export const columnsList = [ - { t_props: 'projectName', t_label: '姓名' }, - { t_props: 'xmb', t_label: '身份证' }, - { t_props: 'name', t_label: '所属工程' }, - { t_props: 'type', t_label: '所属班组' }, + { t_props: 'name', t_label: '姓名' }, + { t_props: 'idNumber', t_label: '身份证' }, + { t_props: 'proName', t_label: '所属工程' }, + { t_props: 'teamName', t_label: '所属班组' }, { - t_props: 'businessLicense', + t_slot: 'einStatus', t_label: '出入场状态', }, - { t_props: 'idCard', t_label: '入场时间' }, + { t_props: 'einTime', t_label: '入场时间' }, { - t_props: 'electronicStamp', + t_props: 'exitTime', t_label: '出场时间', }, { @@ -74,7 +74,7 @@ export const columnsList = [ t_label: '离场人员工资结算确认单', }, { - t_props: 'electronicSignature', + t_props: 'subName', t_label: '所属分包', }, ] @@ -82,7 +82,7 @@ export const columnsList = [ export const dialogConfig = { outerVisible: false, outerTitle: '', - outerWidth: '90%', - minHeight: '98vh', - maxHeight: '98vh', + outerWidth: '50%', + minHeight: '', + maxHeight: '', } diff --git a/src/views/construction-person/entry-and-exit-manage/person-exit/entry-exit-record.vue b/src/views/construction-person/entry-and-exit-manage/person-exit/entry-exit-record.vue new file mode 100644 index 0000000..12b685f --- /dev/null +++ b/src/views/construction-person/entry-and-exit-manage/person-exit/entry-exit-record.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/views/construction-person/entry-and-exit-manage/person-exit/index.vue b/src/views/construction-person/entry-and-exit-manage/person-exit/index.vue index cb443e0..218572c 100644 --- a/src/views/construction-person/entry-and-exit-manage/person-exit/index.vue +++ b/src/views/construction-person/entry-and-exit-manage/person-exit/index.vue @@ -35,13 +35,23 @@ + +