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 @@
-
-
-
+
+
+ {{ initIsUpload(data, 1) }}
+
+
+
+
+ {{ initIsUpload(data, 2) }}
+
+
出场
@@ -72,6 +83,7 @@
type="primary"
icon="el-icon-edit"
v-hasPermi="['sub:entry:edit']"
+ v-if="data.subEinStatus == 1"
@click="onHandleAddOrEditSubEntry(2, data)"
>
修改
@@ -81,6 +93,7 @@
type="danger"
icon="el-icon-delete"
v-hasPermi="['sub:entry:delete']"
+ v-if="data.subEinStatus == 1"
@click="onHandleDeleteSubEntry(data)"
>
删除
@@ -89,6 +102,7 @@
size="mini"
type="primary"
icon="el-icon-view"
+ v-if="data.subEinStatus == 2"
@click="onHandleViewEntryDetails(data)"
>
详情
@@ -265,6 +279,17 @@ export default {
this.dialogConfig.outerTitle = '分包入场详情'
this.dialogConfig.outerVisible = true
},
+
+ // 初始化是否上传
+ initIsUpload(data, type) {
+ if (data.contractFile.length > 0) {
+ const isUpload = data.contractFile.some(
+ (item) => item.sourceType == type,
+ )
+ return isUpload ? '已上传' : '未上传'
+ }
+ return '未上传'
+ },
},
async created() {
diff --git a/src/views/basic-manage/team-manage/team-entry-and-exit/config.js b/src/views/basic-manage/team-manage/team-entry-and-exit/config.js
index 4511bb8..47ab195 100644
--- a/src/views/basic-manage/team-manage/team-entry-and-exit/config.js
+++ b/src/views/basic-manage/team-manage/team-entry-and-exit/config.js
@@ -1,7 +1,7 @@
export const formLabel = [
{
- f_label: '分包合同',
- f_model: 'htName',
+ f_label: '班组名称',
+ f_model: 'teamName',
f_type: 'ipt',
isShow: false, // 是否展示label
},
@@ -13,15 +13,25 @@ export const formLabel = [
},
{
f_label: '工程名称',
- f_model: 'projectName',
+ f_model: 'proName',
f_type: 'ipt',
isShow: false, // 是否展示label
},
{
f_label: '状态',
- f_model: 'status',
+ f_model: 'teamEinStatus',
f_type: 'sel',
isShow: false, // 是否展示label
+ f_selList: [
+ {
+ label: '在场',
+ value: 1,
+ },
+ {
+ label: '出场',
+ value: 2,
+ },
+ ],
},
]
@@ -29,14 +39,14 @@ export const columnsList = [
{ t_props: 'subName', t_label: '分包商名称' },
{ t_props: 'teamName', t_label: '班组名称' },
{ t_props: 'proName', t_label: '班组入场工程名称' },
- { t_props: 'teamEinStatus', t_label: '出入场状态' },
+ { t_slot: 'teamEinStatus', t_label: '出入场状态' },
{
t_props: 'teamEinTime',
t_label: '入场时间',
},
{ t_props: 'teamExitTime', t_label: '出场时间' },
{
- t_props: 'contractFile',
+ t_slot: 'contractFile',
t_label: '施工组承诺书',
},
]
diff --git a/src/views/basic-manage/team-manage/team-entry-and-exit/entry-and-exit-form.vue b/src/views/basic-manage/team-manage/team-entry-and-exit/entry-and-exit-form.vue
index 9a2c422..76aff4f 100644
--- a/src/views/basic-manage/team-manage/team-entry-and-exit/entry-and-exit-form.vue
+++ b/src/views/basic-manage/team-manage/team-entry-and-exit/entry-and-exit-form.vue
@@ -8,10 +8,10 @@
检测到分包下存在2个班组,12名施工人员未出场
@@ -20,7 +20,7 @@
style="width: 100%"
@change="onChangeSubIdFun"
v-model="addOrEditForm.subId"
- :disabled="formType === 2"
+ :disabled="formType === 2 || formType === 3"
>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ initContractFile(data) }}
+
+
出场
+
+ 详情
+
@@ -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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 建立连接
-
-
- 断开连接
-
-
- 下载驱动
-
-
-
-
-
-
-
-
- (必须填写,连接身份证读卡器自动填充数据)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (必须填写,自动创建用户账号,手机号为登录账号)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (生产工资册之前必须完善)
-
-
-
-
-
-
-
-
-
-
- {{ item.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (生产工资册之前必须完善)
-
-
-
-
-
-
-
-
-
- {{ item.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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 @@
+
+
+ 在场
+
+
+ 出场
+
+
+
出场
@@ -50,7 +60,7 @@
size="mini"
type="primary"
icon="el-icon-tickets"
- @click="onHandleDeleteAllProject(data)"
+ @click="onHandleEntryAndExitRecord(data)"
>
出入场记录
@@ -62,7 +72,15 @@
@closeDialogOuter="handleCloseDialogOuter"
>
-
+
+
+