This commit is contained in:
BianLzhaoMin 2025-08-18 16:51:23 +08:00
parent fd9a72421d
commit dcd781bbe4
25 changed files with 307 additions and 375 deletions

View File

@ -9,10 +9,11 @@ export const addAndEditSubEntryAPI = (data) => {
data, data,
}) })
} }
// 分包出场
export const subExitAPI = (data) => { // 获取分包出场时数量等数据
export const getSubExitDataNumAPI = (data) => {
return request({ return request({
url: '/project/***', url: '/bmw/subContract/getTeamAndPeoNum',
method: 'POST', method: 'POST',
data, data,
}) })

View File

@ -18,3 +18,12 @@ export const getTeamEntryListAPI = (data) => {
params: data, params: data,
}) })
} }
// 获取班组出场时数量等数据
export const getTeamExitDataNumAPI = (data) => {
return request({
url: '/bmw/subTeamContract/getPeoNum',
method: 'POST',
data,
})
}

View File

@ -1,9 +1,9 @@
export const formLabel = [ export const formLabel = [
{ {
isShow: false, // 是否展示label
f_type: 'ipt',
f_label: '关键词', f_label: '关键词',
f_model: 'keyWord', f_model: 'keyWord',
f_type: 'ipt',
isShow: false, // 是否展示label
}, },
] ]
@ -19,9 +19,9 @@ export const columnsList = [
] ]
export const dialogConfig = { export const dialogConfig = {
outerVisible: false,
outerTitle: '', outerTitle: '',
outerWidth: '40%',
minHeight: '', minHeight: '',
maxHeight: '', maxHeight: '',
outerWidth: '40%',
outerVisible: false,
} }

View File

@ -136,15 +136,15 @@
<template v-else> <template v-else>
<el-table :data="lotProjectList"> <el-table :data="lotProjectList">
<el-table-column <el-table-column
type="index"
width="50" width="50"
type="index"
label="序号" label="序号"
align="center" align="center"
/> />
<el-table-column <el-table-column
align="center" align="center"
label="子项目名称"
prop="proName" prop="proName"
label="子项目名称"
/> />
<el-table-column label="工程类型" align="center"> <el-table-column label="工程类型" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
@ -164,8 +164,8 @@
prop="volLevel" prop="volLevel"
/> />
<el-table-column <el-table-column
label="工程地址"
align="center" align="center"
label="工程地址"
prop="proAddress" prop="proAddress"
/> />
<el-table-column <el-table-column
@ -209,13 +209,14 @@ export default {
columnsList, columnsList,
dialogConfig, dialogConfig,
getAllProjectListAPI, getAllProjectListAPI,
lotProjectList: [], // ()
// //
addOrEditForm: { addOrEditForm: {
mainProName: '', //
volLevel: '', //
id: '', // id id: '', // id
volLevel: '', //
mainProName: '', //
}, },
// //
addOrEditFormRules: { addOrEditFormRules: {
mainProName: [ mainProName: [
@ -233,14 +234,9 @@ export default {
}, },
], ],
}, },
// ()
lotProjectList: [],
} }
}, },
created() {},
methods: { methods: {
// //
onHandleExportAllProject(queryParams) { onHandleExportAllProject(queryParams) {
@ -261,9 +257,9 @@ export default {
if (type === 2) { if (type === 2) {
const { mainProName, volLevel, id } = data const { mainProName, volLevel, id } = data
this.addOrEditForm = { this.addOrEditForm = {
mainProName,
volLevel,
id, id,
volLevel,
mainProName,
} }
} }
@ -275,7 +271,7 @@ export default {
// //
onHandleDeleteAllProject(data) { onHandleDeleteAllProject(data) {
this.$confirm('确定删除该工程吗?', '温馨提示', { this.$confirm('确定删除该总包工程吗?', '温馨提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@ -285,8 +281,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess('删除成功')
this.$refs.allProjectTableRef.getTableList() // this.$refs.allProjectTableRef.getTableList() //
// store this.$store.dispatch('getMainProjectList') // store
this.$store.dispatch('getMainProjectList')
} }
}) })
.catch(() => { .catch(() => {
@ -345,9 +340,9 @@ export default {
if (this.dialogConfig.outerTitle !== '子项目(标段工程)概况') { if (this.dialogConfig.outerTitle !== '子项目(标段工程)概况') {
this.$refs.addOrEditFormRef.resetFields() this.$refs.addOrEditFormRef.resetFields()
this.addOrEditForm = { this.addOrEditForm = {
mainProName: '',
volLevel: '',
id: '', id: '',
volLevel: '',
mainProName: '',
} }
} }
this.dialogConfig.outerVisible = false this.dialogConfig.outerVisible = false

View File

@ -1,9 +1,9 @@
export const formLabel = [ export const formLabel = [
{ {
f_label: '关键词',
f_model: 'keyWord',
f_type: 'ipt', f_type: 'ipt',
isShow: false, // 是否展示label isShow: false, // 是否展示label
f_label: '关键词',
f_model: 'keyWord',
}, },
] ]
@ -19,9 +19,9 @@ export const columnsList = [
] ]
export const dialogConfig = { export const dialogConfig = {
outerVisible: false,
outerTitle: '',
outerWidth: '40%',
minHeight: '', minHeight: '',
maxHeight: '', maxHeight: '',
outerTitle: '',
outerWidth: '40%',
outerVisible: false,
} }

View File

@ -26,7 +26,7 @@
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
v-hasPermi="['dept:project:add']" v-hasPermi="['dept:project:add']"
@click="onHandleAddOrEditDeptProject(1, null)" @click="onHandleAddOrEditDeptProject(1, null, '新增')"
> >
新增 新增
</el-button> </el-button>
@ -34,11 +34,15 @@
<!-- 标段工程数量 --> <!-- 标段工程数量 -->
<template slot="count" slot-scope="{ data }"> <template slot="count" slot-scope="{ data }">
<span class="cursor-blue" @click="onHandleViewLotProject(data)"> <span
class="cursor-blue"
@click="onHandleViewDeptProject(data)"
>
{{ data.pmProjectVoList.length }} {{ data.pmProjectVoList.length }}
</span> </span>
</template> </template>
<!-- 项目部状态 -->
<template slot="isEnable" slot-scope="{ data }"> <template slot="isEnable" slot-scope="{ data }">
<el-tag <el-tag
size="mini" size="mini"
@ -55,7 +59,7 @@
type="primary" type="primary"
icon="el-icon-edit" icon="el-icon-edit"
v-hasPermi="['dept:project:edit']" v-hasPermi="['dept:project:edit']"
@click="onHandleAddOrEditDeptProject(2, data)" @click="onHandleAddOrEditDeptProject(2, data, '修改')"
> >
修改 修改
</el-button> </el-button>
@ -205,14 +209,14 @@ import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel' import DialogModel from '@/components/DialogModel'
import { formLabel, columnsList, dialogConfig } from './config' import { formLabel, columnsList, dialogConfig } from './config'
import { import {
addAndEditDeptProjectAPI,
deleteDeptProjectAPI, deleteDeptProjectAPI,
getDeptProjectListAPI, getDeptProjectListAPI,
addAndEditDeptProjectAPI,
} from '@/api/basic-manage/project-manage/dept-project' } from '@/api/basic-manage/project-manage/dept-project'
import { getSubCompanySelectListCommonFun } from '@/utils/getCommonData' import { getSubCompanySelectListCommonFun } from '@/utils/getCommonData'
export default { export default {
name: 'DeptProject', name: 'DeptProject',
dicts: ['project_type', 'project_status'], dicts: ['project_type', 'project_status'], //
components: { components: {
TableModel, TableModel,
DialogModel, DialogModel,
@ -223,8 +227,9 @@ export default {
formLabel, formLabel,
columnsList, columnsList,
dialogConfig, dialogConfig,
getDeptProjectListAPI, getDeptProjectListAPI,
lotProjectList: [], // ()
branchCompanyOptions: [], //
// //
addOrEditForm: { addOrEditForm: {
@ -232,7 +237,6 @@ export default {
orgName: '', // orgName: '', //
isEnable: 1, // isEnable: 1, //
}, },
// //
addOrEditFormRules: { addOrEditFormRules: {
subComId: [ subComId: [
@ -257,19 +261,9 @@ export default {
}, },
], ],
}, },
//
branchCompanyOptions: [],
// ()
lotProjectList: [],
} }
}, },
async created() {
this.branchCompanyOptions = await getSubCompanySelectListCommonFun()
},
methods: { methods: {
// //
onHandleExportDeptProject(queryParams) { onHandleExportDeptProject(queryParams) {
@ -283,16 +277,15 @@ export default {
}, },
// //
onHandleAddOrEditDeptProject(type, data) { onHandleAddOrEditDeptProject(type, data, title) {
this.dialogConfig.outerTitle = this.dialogConfig.outerTitle = `${title}项目部`
type === 1 ? '新增项目部' : '修改项目部'
if (type === 2) { if (type === 2) {
const { subComId, orgName, isEnable, id } = data const { id, orgName, isEnable, subComId } = data
this.addOrEditForm = { this.addOrEditForm = {
subComId, id, // id
orgName, orgName, //
isEnable, isEnable, //
id, subComId, // id
} }
} }
this.dialogConfig.outerWidth = '' this.dialogConfig.outerWidth = ''
@ -310,16 +303,14 @@ export default {
}) })
.then(async () => { .then(async () => {
const res = await deleteDeptProjectAPI({ id: data.id }) const res = await deleteDeptProjectAPI({ id: data.id })
console.log(res, '删除结果')
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess('删除成功')
this.$refs.deptProjectTableRef.getTableList() // this.$refs.deptProjectTableRef.getTableList() //
// store this.$store.dispatch('getSubCompanySelectList') // store
this.$store.dispatch('getSubCompanySelectList')
} }
}) })
.catch(() => { .catch(() => {
console.log('取消') // console.log('')
}) })
}, },
@ -336,7 +327,6 @@ export default {
} }
const res = await addAndEditDeptProjectAPI(params) const res = await addAndEditDeptProjectAPI(params)
console.log(res, '新增或修改结果')
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess( this.$modal.msgSuccess(
this.dialogConfig.outerTitle === '新增项目部' this.dialogConfig.outerTitle === '新增项目部'
@ -345,38 +335,39 @@ export default {
) )
this.handleCloseDialogOuter() this.handleCloseDialogOuter()
this.$refs.deptProjectTableRef.getTableList() // this.$refs.deptProjectTableRef.getTableList() //
this.$store.dispatch('getSubCompanySelectList') // store
// store
this.$store.dispatch('getSubCompanySelectList')
} }
} }
}) })
}, },
// //
onHandleViewLotProject(data) { onHandleViewDeptProject(data) {
// console.log(data, '')
if (data.pmProjectVoList.length === 0) { if (data.pmProjectVoList.length === 0) {
this.$modal.msgError('暂无标段工程') this.$modal.msgError('暂无标段工程')
return return
} }
this.dialogConfig.outerTitle = '子项目(标段工程)概况'
this.lotProjectList = data.pmProjectVoList
this.dialogConfig.outerWidth = '80%' this.dialogConfig.outerWidth = '80%'
this.dialogConfig.minHeight = '90vh' this.dialogConfig.minHeight = '90vh'
this.dialogConfig.maxHeight = '90vh' this.dialogConfig.maxHeight = '90vh'
this.lotProjectList = data.pmProjectVoList
this.dialogConfig.outerTitle = '子项目(标段工程)概况'
this.dialogConfig.outerVisible = true this.dialogConfig.outerVisible = true
}, },
// //
handleCloseDialogOuter() { handleCloseDialogOuter() {
if (this.dialogConfig.outerTitle !== '子项目(标段工程)概况') { if (this.dialogConfig.outerTitle !== '子项目(标段工程)概况') {
this.$refs.addOrEditFormRef.resetFields() this.addOrEditForm = {
subComId: '',
orgName: '',
isEnable: 1,
}
} }
this.dialogConfig.outerVisible = false this.dialogConfig.outerVisible = false
}, },
//
initProType(data) { initProType(data) {
if (typeof data === 'string') { if (typeof data === 'string') {
return this.dict.type.project_type.find( return this.dict.type.project_type.find(
@ -387,6 +378,7 @@ export default {
return data || '' return data || ''
}, },
//
initProStatus(data) { initProStatus(data) {
if (typeof data === 'string') { if (typeof data === 'string') {
return this.dict.type.project_status.find( return this.dict.type.project_status.find(
@ -397,5 +389,9 @@ export default {
return data || '' return data || ''
}, },
}, },
async created() {
this.branchCompanyOptions = await getSubCompanySelectListCommonFun() //
},
} }
</script> </script>

View File

@ -20,8 +20,8 @@
> >
<el-option <el-option
:key="item.id" :key="item.id"
:label="item.mainProName"
:value="item.id" :value="item.id"
:label="item.mainProName"
v-for="item in allProjectOptions" v-for="item in allProjectOptions"
/> />
</el-select> </el-select>
@ -29,21 +29,6 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属项目部" prop="orgId"> <el-form-item label="所属项目部" prop="orgId">
<!-- <el-select
clearable
filterable
style="width: 100%"
placeholder="请选择"
v-model="addOrEditForm.orgId"
>
<el-option
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in xmbOptions"
/>
</el-select> -->
<treeselect <treeselect
:flat="true" :flat="true"
:searchable="false" :searchable="false"
@ -248,64 +233,65 @@ export default {
} }
return { return {
allProjectOptions: [], //
subCompanyOptions: [], //
addOrEditForm: { addOrEditForm: {
mainProId: '', // id lat: '', //
subComId: '', // id lon: '', //
orgId: undefined, // id orgId: undefined, // id
proName: '', // proName: '', //
simpleName: '', //
proType: '', // proType: '', //
volLevel: '', //
isShanghai: 0,
proStatus: '0', // 0
proAddress: '', //
startTime: null, //
endTime: null, // endTime: null, //
lon: '', // volLevel: '', //
lat: '', // subComId: '', // id
proStatus: '0', // 0
mainProId: '', // id
startTime: null, //
proAddress: '', //
isShanghai: 0, //
simpleName: '', //
}, },
addOrEditFormRules: { addOrEditFormRules: {
mainProId: [ mainProId: [
{ {
required: true, required: true,
message: '请选择所属总包工程',
trigger: 'change', trigger: 'change',
message: '请选择所属总包工程',
}, },
], ],
orgId: [ orgId: [
{ {
required: true, required: true,
message: '请选择所属项目部',
trigger: 'change', trigger: 'change',
message: '请选择所属项目部',
}, },
], ],
proName: [ proName: [
{ {
required: true, required: true,
message: '请输入标段工程名称',
trigger: 'blur', trigger: 'blur',
message: '请输入标段工程名称',
}, },
], ],
simpleName: [ simpleName: [
{ {
required: true, required: true,
message: '请输入标段工程简称',
trigger: 'blur', trigger: 'blur',
message: '请输入标段工程简称',
}, },
], ],
proType: [ proType: [
{ {
required: true, required: true,
message: '请选择工程类型',
trigger: 'change', trigger: 'change',
message: '请选择工程类型',
}, },
], ],
volLevel: [ volLevel: [
{ {
required: true, required: true,
message: '请选择电压等级',
trigger: 'change', trigger: 'change',
message: '请选择电压等级',
}, },
], ],
isShanghai: [ isShanghai: [
@ -321,15 +307,15 @@ export default {
proAddress: [ proAddress: [
{ {
required: true, required: true,
message: '请输入工程地址',
trigger: 'blur', trigger: 'blur',
message: '请输入工程地址',
}, },
], ],
startTime: [ startTime: [
{ {
required: false, required: false,
message: '请选择计划开工时间',
trigger: 'change', trigger: 'change',
message: '请选择计划开工时间',
}, },
{ {
validator: validatePlanStartTime, validator: validatePlanStartTime,
@ -338,8 +324,8 @@ export default {
endTime: [ endTime: [
{ {
required: false, required: false,
message: '请选择计划竣工时间',
trigger: 'change', trigger: 'change',
message: '请选择计划竣工时间',
}, },
{ {
validator: validatePlanEndTime, validator: validatePlanEndTime,
@ -351,11 +337,11 @@ export default {
required: false, required: false,
}, },
{ {
pattern: trigger: 'blur',
/^-?((180(\.0{1,6})?)|((1[0-7]\d)|([1-9]?\d))(\.\d{1,6})?)$/,
message: message:
'请输入正确的经度(范围:-180 至 180最多6位小数', '请输入正确的经度(范围:-180 至 180最多6位小数',
trigger: 'blur', pattern:
/^-?((180(\.0{1,6})?)|((1[0-7]\d)|([1-9]?\d))(\.\d{1,6})?)$/,
}, },
], ],
lat: [ lat: [
@ -363,35 +349,20 @@ export default {
required: false, required: false,
}, },
{ {
pattern: trigger: 'blur',
/^-?((90(\.0{1,6})?)|(([1-8]\d)|(\d))(\.\d{1,6})?)$/,
message: message:
'请输入正确的纬度(范围:-90 至 90最多6位小数', '请输入正确的纬度(范围:-90 至 90最多6位小数',
trigger: 'blur', pattern:
/^-?((90(\.0{1,6})?)|(([1-8]\d)|(\d))(\.\d{1,6})?)$/,
}, },
], ],
}, },
allProjectOptions: [],
xmbOptions: [
{
value: '1',
label: '项目部1',
},
{
value: '2',
label: '项目部2',
},
],
subCompanyOptions: [],
} }
}, },
async created() { async created() {
// //
this.allProjectOptions = await getMainProjectListCommonFun() this.allProjectOptions = await getMainProjectListCommonFun()
// //
const res = await getSubCompanySelectListCommonFun() const res = await getSubCompanySelectListCommonFun()
@ -411,8 +382,8 @@ export default {
} else { } else {
return { return {
id: item.id, id: item.id,
label: item.subCompanyName,
children: [], children: [],
label: item.subCompanyName,
} }
} }
}) })
@ -431,7 +402,6 @@ export default {
if (this.formType === 1) { if (this.formType === 1) {
delete params.id delete params.id
} }
const res = await addAndEditLotLotProjectAPI(params) const res = await addAndEditLotLotProjectAPI(params)
if (res.code === 200) { if (res.code === 200) {
resolve() resolve()
@ -439,8 +409,7 @@ export default {
this.formType === 1 ? '新增成功' : '修改成功', this.formType === 1 ? '新增成功' : '修改成功',
) )
// store this.$store.dispatch('getLotProjectSelectList') // store
this.$store.dispatch('getLotProjectSelectList')
} else { } else {
reject(new Error(res.msg)) reject(new Error(res.msg))
this.$modal.msgError(res.msg) this.$modal.msgError(res.msg)
@ -457,6 +426,7 @@ export default {
this.$refs.addOrEditFormRef.resetFields() this.$refs.addOrEditFormRef.resetFields()
}, },
//
onHandleSelectOrgId(node) { onHandleSelectOrgId(node) {
this.addOrEditForm.subComId = node.parentId this.addOrEditForm.subComId = node.parentId
this.addOrEditForm.orgId = node.id this.addOrEditForm.orgId = node.id
@ -468,39 +438,39 @@ export default {
handler(newVal) { handler(newVal) {
if (Object.keys(newVal).length > 0) { if (Object.keys(newVal).length > 0) {
const { const {
mainProId, id,
subComId,
orgId,
proName,
simpleName,
proType,
volLevel,
isShanghai,
proStatus,
proAddress,
startTime,
endTime,
lon, lon,
lat, lat,
id, orgId,
proName,
endTime,
proType,
volLevel,
subComId,
proStatus,
startTime,
mainProId,
proAddress,
isShanghai,
simpleName,
} = newVal } = newVal
this.addOrEditForm = { this.addOrEditForm = {
mainProId, id,
orgId,
subComId,
proName,
simpleName,
proType,
volLevel,
isShanghai,
proStatus,
proAddress,
startTime,
endTime,
lon, lon,
lat, lat,
id, orgId,
proName,
endTime,
proType,
volLevel,
subComId,
proStatus,
startTime,
mainProId,
proAddress,
isShanghai,
simpleName,
} }
} }
}, },

View File

@ -1,38 +1,37 @@
export const formLabel = [ export const formLabel = [
{ {
isShow: false, // 是否展示label
f_type: 'sel',
f_selList: [],
f_label: '分公司', f_label: '分公司',
f_model: 'subComId', f_model: 'subComId',
f_type: 'sel',
isShow: false, // 是否展示label
f_selList: [],
}, },
{ {
f_selList: [],
f_type: 'sel',
isShow: false, // 是否展示label
f_label: '总包工程', f_label: '总包工程',
f_model: 'mainProId', f_model: 'mainProId',
},
{
f_type: 'sel', f_type: 'sel',
isShow: false, // 是否展示label isShow: false, // 是否展示label
f_selList: [], f_selList: [],
},
{
f_label: '标段工程',
f_model: 'proName', f_model: 'proName',
f_label: '标段工程',
},
{
f_type: 'sel', f_type: 'sel',
isShow: false, // 是否展示label isShow: false, // 是否展示label
f_selList: [], f_selList: [],
},
{
f_label: '工程状态', f_label: '工程状态',
f_model: 'proStatus', f_model: 'proStatus',
f_type: 'sel',
isShow: false, // 是否展示label
f_selList: [],
}, },
{ {
f_label: '是否上海外项目',
f_model: 'isShanghai',
f_type: 'sel',
isShow: false, // 是否展示label isShow: false, // 是否展示label
f_type: 'sel',
f_model: 'isShanghai',
f_label: '是否上海外项目',
f_selList: [ f_selList: [
{ {
label: '是', label: '是',
@ -42,7 +41,7 @@ export const formLabel = [
label: '否', label: '否',
value: 0, value: 0,
}, },
], // 状态列表 ],
}, },
] ]
@ -57,9 +56,9 @@ export const columnsList = [
] ]
export const dialogConfig = { export const dialogConfig = {
outerVisible: false,
outerTitle: '',
outerWidth: '70%',
minHeight: '', minHeight: '',
maxHeight: '', maxHeight: '',
outerTitle: '',
outerWidth: '70%',
outerVisible: false,
} }

View File

@ -26,7 +26,7 @@
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
v-hasPermi="['lot:project:add']" v-hasPermi="['lot:project:add']"
@click="onHandleAddOrEditAllProject(1, null)" @click="onHandleAddOrEditLotProject(1, null, '新增')"
> >
新增 新增
</el-button> </el-button>
@ -62,7 +62,7 @@
type="primary" type="primary"
icon="el-icon-edit" icon="el-icon-edit"
v-hasPermi="['lot:project:edit']" v-hasPermi="['lot:project:edit']"
@click="onHandleAddOrEditAllProject(2, data)" @click="onHandleAddOrEditLotProject(2, data, '修改')"
> >
修改 修改
</el-button> </el-button>
@ -71,7 +71,7 @@
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
v-hasPermi="['lot:project:delete']" v-hasPermi="['lot:project:delete']"
@click="onHandleDeleteAllProject(data)" @click="onHandleDeleteLotProject(data)"
> >
删除 删除
</el-button> </el-button>
@ -118,8 +118,8 @@ import {
} from '@/api/basic-manage/project-manage/lot-project' } from '@/api/basic-manage/project-manage/lot-project'
import { import {
getSubCompanySelectListCommonFun,
getMainProjectListCommonFun, getMainProjectListCommonFun,
getSubCompanySelectListCommonFun,
getLotProjectSelectListCommonFun, getLotProjectSelectListCommonFun,
} from '@/utils/getCommonData' } from '@/utils/getCommonData'
export default { export default {
@ -137,8 +137,8 @@ export default {
formLabel, formLabel,
columnsList, columnsList,
dialogConfig, dialogConfig,
editFormData: {}, editFormData: {}, //
getLotLotProjectListAPI, getLotLotProjectListAPI, //
} }
}, },
methods: { methods: {
@ -154,44 +154,11 @@ export default {
}, },
// //
onHandleAddOrEditAllProject(type, data) { onHandleAddOrEditLotProject(type, data, title) {
this.formType = type this.formType = type
this.dialogConfig.outerTitle = this.dialogConfig.outerTitle = `${title}标段工程`
type === 1 ? '新增标段工程' : '修改标段工程'
if (type === 2) { if (type === 2) {
const { Object.assign(this.editFormData, data)
mainProId,
orgId,
proName,
simpleName,
proType,
volLevel,
isShanghai,
proStatus,
proAddress,
startTime,
endTime,
lon,
lat,
id,
} = data
this.editFormData = {
mainProId,
orgId,
proName,
simpleName,
proType,
volLevel,
isShanghai,
proStatus,
proAddress,
startTime,
endTime,
lon,
lat,
id,
}
} else { } else {
this.editFormData = {} this.editFormData = {}
} }
@ -199,8 +166,8 @@ export default {
}, },
// //
onHandleDeleteAllProject(data) { onHandleDeleteLotProject(data) {
this.$confirm('确定删除该工程吗?', '温馨提示', { this.$confirm('确定删除该标段工程吗?', '温馨提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@ -212,8 +179,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess('删除成功')
this.$refs.lotProjectTableRef.getTableList() // this.$refs.lotProjectTableRef.getTableList() //
// store this.$store.dispatch('getLotProjectSelectList') // store
this.$store.dispatch('getLotProjectSelectList')
} }
}) })
.catch(() => { .catch(() => {
@ -265,6 +231,7 @@ export default {
}) })
}, },
//
initProType(data) { initProType(data) {
if (typeof data === 'string') { if (typeof data === 'string') {
return this.dict.type.project_type.find( return this.dict.type.project_type.find(
@ -275,6 +242,7 @@ export default {
return data || '' return data || ''
}, },
//
initProStatus(data) { initProStatus(data) {
if (typeof data === 'string') { if (typeof data === 'string') {
return this.dict.type.project_status.find( return this.dict.type.project_status.find(
@ -287,14 +255,12 @@ export default {
// //
async onHandleConfirmAddOrEdit() { async onHandleConfirmAddOrEdit() {
// this.$refs.addOrEditLotProjectFormRef.formType =
// this.dialogConfig.outerTitle === '' ? 1 : 2
try { try {
await this.$refs.addOrEditLotProjectFormRef.onHandleConfirmAddOrEditFun() await this.$refs.addOrEditLotProjectFormRef.onHandleConfirmAddOrEditFun()
this.handleCloseDialogOuter() this.handleCloseDialogOuter()
this.$refs.lotProjectTableRef.getTableList() // this.$refs.lotProjectTableRef.getTableList() //
} catch (error) { } catch (error) {
console.log('表单提交失败', error) // console.log('', error)
} }
}, },

View File

@ -1,5 +1,5 @@
<template> <template>
<!-- 新增或修改标段工程表单 --> <!-- 新增或修改分包商表单 -->
<div> <div>
<el-form <el-form
label-width="140px" label-width="140px"
@ -136,11 +136,12 @@ export default {
}, },
data() { data() {
return { return {
editUploadFileList: [], //
addOrEditForm: { addOrEditForm: {
id: null, // id id: null, // id
subName: '', // subName: '', //
legalPerson: '', //
subAddress: '', // subAddress: '', //
legalPerson: '', //
legalPersonPhone: '', // legalPersonPhone: '', //
idCard: [], // idCard: [], //
@ -202,8 +203,6 @@ export default {
}, },
], ],
}, },
editUploadFileList: [], //
} }
}, },
methods: { methods: {
@ -312,9 +311,7 @@ export default {
this.$modal.msgSuccess( this.$modal.msgSuccess(
this.formType === 1 ? '新增成功' : '修改成功', this.formType === 1 ? '新增成功' : '修改成功',
) )
this.$store.dispatch('getSubSelectList') // store
// store
this.$store.dispatch('getSubSelectList')
resolve() resolve()
} else { } else {
this.$modal.msgError(res.meg) this.$modal.msgError(res.meg)

View File

@ -26,7 +26,7 @@
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
v-hasPermi="['sub:base:add']" v-hasPermi="['sub:base:add']"
@click="onHandleAddOrEditSubBaseInfo(1, null)" @click="onHandleAddOrEditSubBaseInfo(1, null, '新增')"
> >
新增 新增
</el-button> </el-button>
@ -58,7 +58,7 @@
type="primary" type="primary"
icon="el-icon-edit" icon="el-icon-edit"
v-hasPermi="['sub:base:edit']" v-hasPermi="['sub:base:edit']"
@click="onHandleAddOrEditSubBaseInfo(2, data)" @click="onHandleAddOrEditSubBaseInfo(2, data, '修改')"
> >
修改 修改
</el-button> </el-button>
@ -159,28 +159,11 @@ export default {
}, },
// //
onHandleAddOrEditSubBaseInfo(type, data) { onHandleAddOrEditSubBaseInfo(type, data, title) {
this.dialogConfig.outerTitle = this.dialogConfig.outerTitle = `${title}分包商`
type === 1 ? '新增分包商' : '修改分包商'
if (type === 2) { if (type === 2) {
const { Object.assign(this.editFormData, data)
id,
subName,
subAddress,
legalPerson,
contractFile,
legalPersonPhone,
} = data
this.editFormData = {
id,
subName,
subAddress,
legalPerson,
contractFile,
legalPersonPhone,
}
} else { } else {
this.editFormData = {} this.editFormData = {}
} }
@ -201,8 +184,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess('删除成功')
this.$refs.subBaseInfoTableRef.getTableList() // this.$refs.subBaseInfoTableRef.getTableList() //
// store this.$store.dispatch('getSubSelectList') // store
this.$store.dispatch('getSubSelectList')
} }
}) })
.catch(() => { .catch(() => {

View File

@ -5,7 +5,9 @@
说明分包商出场需此分包合同下的班组全部出场后操作 说明分包商出场需此分包合同下的班组全部出场后操作
<br /> <br />
<br /> <br />
检测到分包下存在2个班组12名施工人员未出场 检测到分包下存在{{ addOrEditForm.teamNum }}个班组
{{ addOrEditForm.perNum }}
名施工人员未出场
</div> </div>
<el-form <el-form
label-width="240px" label-width="240px"
@ -111,7 +113,10 @@
<script> <script>
import UploadImg from '@/components/UploadImg' import UploadImg from '@/components/UploadImg'
import UploadFileFormData from '@/components/UploadFileFormData' import UploadFileFormData from '@/components/UploadFileFormData'
import { addAndEditSubEntryAPI } from '@/api/basic-manage/sub-manage/sub-entry-and-exit' import {
getSubExitDataNumAPI,
addAndEditSubEntryAPI,
} from '@/api/basic-manage/sub-manage/sub-entry-and-exit'
import { import {
getSubSelectListCommonFun, getSubSelectListCommonFun,
getLotProjectSelectListCommonFun, getLotProjectSelectListCommonFun,
@ -131,6 +136,8 @@ export default {
data() { data() {
return { return {
addOrEditForm: { addOrEditForm: {
teamNum: 0, //
perNum: 0, //
proId: '', // id proId: '', // id
subId: '', // id subId: '', // id
subContractCode: '', // subContractCode: '', //
@ -185,8 +192,6 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$refs.addOrEditFormRef.validate(async (valid) => { this.$refs.addOrEditFormRef.validate(async (valid) => {
if (valid) { if (valid) {
console.log(this.addOrEditForm)
const { const {
id, id,
subId, subId,
@ -234,6 +239,23 @@ export default {
}) })
}, },
//
async getSubExitDataNum() {
const { data: res } = await getSubExitDataNumAPI({
subId: this.addOrEditForm.subId,
})
const { teamNum, perNum } = res
if (teamNum > 0) {
this.addOrEditForm.teamNum = teamNum
}
if (perNum > 0) {
this.addOrEditForm.perNum = perNum
}
},
// //
resetForm() { resetForm() {
this.$refs.addOrEditFormRef.resetFields() this.$refs.addOrEditFormRef.resetFields()
@ -241,34 +263,27 @@ export default {
}, },
async created() { async created() {
// this.subSelectList = await getSubSelectListCommonFun()
const sub = await getSubSelectListCommonFun() const sub = await getSubSelectListCommonFun()
this.subSelectList = sub.map((item) => { this.subSelectList = sub.map((item) => {
return { return {
value: item.id, value: item.id,
label: item.subName, label: item.subName,
} }
}) })
const pro = await getLotProjectSelectListCommonFun() const pro = await getLotProjectSelectListCommonFun()
this.lotProjectSelectList = pro.map((item) => { this.lotProjectSelectList = pro.map((item) => {
return { return {
value: item.id, value: item.id,
label: item.proName, label: item.proName,
} }
}) })
// console.log(subSelectList, '')
// this.lotProjectSelectList = await getLotProjectSelectListCommonFun() this.getSubExitDataNum()
// console.log(lotProjectSelectList, '')
}, },
watch: { watch: {
exitFormData: { exitFormData: {
handler(newVal) { handler(newVal) {
// console.log(newVal, 'exitFormData')
if (Object.keys(newVal).length > 0) { if (Object.keys(newVal).length > 0) {
Object.assign(this.addOrEditForm, newVal) Object.assign(this.addOrEditForm, newVal)
} }

View File

@ -157,18 +157,16 @@
</template> </template>
<script> <script>
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import ExitForm from './exit-form' import ExitForm from './exit-form'
import EntryForm from './entry-form' import EntryForm from './entry-form'
import EntryDetails from './entry-details' import EntryDetails from './entry-details'
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import { formLabel, columnsList, dialogConfig } from './config' import { formLabel, columnsList, dialogConfig } from './config'
import { import {
deleteSubEntryAPI, deleteSubEntryAPI,
getSubEntryListAPI, getSubEntryListAPI,
} from '@/api/basic-manage/sub-manage/sub-entry-and-exit' } from '@/api/basic-manage/sub-manage/sub-entry-and-exit'
import { getLotProjectSelectListCommonFun } from '@/utils/getCommonData' import { getLotProjectSelectListCommonFun } from '@/utils/getCommonData'
export default { export default {
name: 'SubEntryAndExit', name: 'SubEntryAndExit',
@ -186,17 +184,20 @@ export default {
columnsList, columnsList,
dialogConfig, dialogConfig,
getSubEntryListAPI, getSubEntryListAPI,
exitFormData: {}, exitFormData: {}, //
queryDetailId: '', queryDetailId: '', // id
slots: {
idCard: 'idCard',
},
} }
}, },
methods: { methods: {
// //
onHandleExportAllProject(queryParams) { onHandleExportSubEntry(queryParams) {
console.log(queryParams, '导出') this.download(
'/bmw/subContract/export',
{
...queryParams,
},
`分包出入场列表.xlsx`,
)
}, },
// //

View File

@ -1,5 +1,5 @@
<template> <template>
<!-- 新增或修改标段工程表单 --> <!-- 新增或修改班组表单 -->
<div> <div>
<el-form <el-form
label-width="140px" label-width="140px"

View File

@ -25,6 +25,7 @@
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
v-hasPermi="['team:base:add']"
@click="onHandleAddOrEditSubBaseInfo(1, null)" @click="onHandleAddOrEditSubBaseInfo(1, null)"
> >
新增 新增
@ -37,6 +38,7 @@
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-edit" icon="el-icon-edit"
v-hasPermi="['team:base:edit']"
@click="onHandleAddOrEditSubBaseInfo(2, data)" @click="onHandleAddOrEditSubBaseInfo(2, data)"
> >
修改 修改
@ -46,6 +48,7 @@
size="mini" size="mini"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
v-hasPermi="['team:base:delete']"
@click="onHandleDeleteSubBaseInfo(data)" @click="onHandleDeleteSubBaseInfo(data)"
> >
删除 删除

View File

@ -2,10 +2,10 @@
<!-- 班组出入场表单 --> <!-- 班组出入场表单 -->
<div> <div>
<div class="tip-text" style="margin-bottom: 20px" v-if="formType === 2"> <div class="tip-text" style="margin-bottom: 20px" v-if="formType === 2">
说明分包商出场需此分包合同下的班组全部出场后操作 说明班组出场需此班组下的施工人员全部出场后操作
<br /> <br />
<br /> <br />
检测到分包下存在2个班组12名施工人员未出场 检测到班组下存在{{ addOrEditForm.perNum }}名施工人员未出场
</div> </div>
<el-form <el-form
ref="addOrEditFormRef" ref="addOrEditFormRef"
@ -134,7 +134,10 @@
<script> <script>
import UploadImg from '@/components/UploadImg' import UploadImg from '@/components/UploadImg'
import UploadFileFormData from '@/components/UploadFileFormData' import UploadFileFormData from '@/components/UploadFileFormData'
import { teamEntryAndExitAPI } from '@/api/basic-manage/team-manage/team-entry-and-exit' import {
teamEntryAndExitAPI,
getTeamExitDataNumAPI,
} from '@/api/basic-manage/team-manage/team-entry-and-exit'
import { import {
getLotProjectSelectListCommonFun, getLotProjectSelectListCommonFun,
getSubSelectListCommonFun, getSubSelectListCommonFun,
@ -163,35 +166,35 @@ export default {
subId: '', subId: '',
proId: '', proId: '',
teamId: '', teamId: '',
perNum: 0, //
subName: '', subName: '',
proName: '', proName: '',
teamName: '', teamName: '',
teamEinStatus: '',
teamEinTime: '', teamEinTime: '',
teamExitTime: '', teamExitTime: '',
teamEinStatus: '',
businessLicense: [], businessLicense: [],
}, },
addOrEditFormRules: { addOrEditFormRules: {
subId: [ subId: [
{ {
required: true, required: true,
message: '请输入分包名称',
trigger: 'blur', trigger: 'blur',
message: '请输入分包名称',
}, },
], ],
teamId: [ teamId: [
{ {
required: true, required: true,
message: '请输入分包商名称',
trigger: 'blur', trigger: 'blur',
message: '请输入分包商名称',
}, },
], ],
proId: [ proId: [
{ {
required: true, required: true,
message: '请输入工程名称',
trigger: 'blur', trigger: 'blur',
message: '请输入工程名称',
}, },
], ],
businessLicense: [ businessLicense: [
@ -222,7 +225,6 @@ export default {
subName, subName,
proName, proName,
teamName, teamName,
teamEinStatus,
businessLicense, businessLicense,
} = this.addOrEditForm } = this.addOrEditForm
@ -236,13 +238,13 @@ export default {
teamEinStatus: this.formType, teamEinStatus: this.formType,
} }
const formData = new FormData()
const fileMsg = []
if (id) { if (id) {
params.id = id params.id = id
} }
const formData = new FormData()
const fileMsg = []
businessLicense.forEach((e) => { businessLicense.forEach((e) => {
fileMsg.push({ fileMsg.push({
type: 1, type: 1,
@ -270,6 +272,17 @@ export default {
}) })
}, },
//
async getTeamExitDataNum() {
const { data: res } = await getTeamExitDataNumAPI({
teamId: this.addOrEditForm.teamId,
})
const { perNum } = res
if (perNum > 0) {
this.addOrEditForm.perNum = perNum
}
},
// //
resetForm() { resetForm() {
this.$refs.addOrEditFormRef.resetFields() this.$refs.addOrEditFormRef.resetFields()
@ -317,6 +330,8 @@ export default {
label: item.proName, label: item.proName,
} }
}) })
this.getTeamExitDataNum()
}, },
watch: { watch: {
@ -324,7 +339,6 @@ export default {
handler(newVal) { handler(newVal) {
if (Object.keys(newVal).length > 0) { if (Object.keys(newVal).length > 0) {
Object.assign(this.addOrEditForm, newVal) Object.assign(this.addOrEditForm, newVal)
if (newVal.contractFile && newVal.contractFile.length > 0) { if (newVal.contractFile && newVal.contractFile.length > 0) {
this.addOrEditForm.businessLicense = this.addOrEditForm.businessLicense =
newVal.contractFile.map((e) => { newVal.contractFile.map((e) => {

View File

@ -15,7 +15,7 @@
size="mini" size="mini"
type="success" type="success"
icon="el-icon-download" icon="el-icon-download"
@click="onHandleExportAllProject(queryParams)" @click="onHandleExportTeamEntry(queryParams)"
> >
导出 导出
</el-button> </el-button>
@ -25,6 +25,7 @@
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
v-hasPermi="['team:entry:add']"
@click="onHandleEntryAndExit(1, null)" @click="onHandleEntryAndExit(1, null)"
> >
新增 新增
@ -53,6 +54,7 @@
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
v-if="data.teamEinStatus == 1" v-if="data.teamEinStatus == 1"
v-hasPermi="['team:entry:exit']"
@click="onHandleEntryAndExit(2, data)" @click="onHandleEntryAndExit(2, data)"
> >
出场 出场
@ -102,7 +104,6 @@
import TableModel from '@/components/TableModel' import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel' import DialogModel from '@/components/DialogModel'
import EntryAndExitForm from './entry-and-exit-form' import EntryAndExitForm from './entry-and-exit-form'
import { formLabel, columnsList, dialogConfig } from './config' import { formLabel, columnsList, dialogConfig } from './config'
import { getTeamEntryListAPI } from '@/api/basic-manage/team-manage/team-entry-and-exit' import { getTeamEntryListAPI } from '@/api/basic-manage/team-manage/team-entry-and-exit'
@ -126,8 +127,7 @@ export default {
}, },
methods: { methods: {
// //
onHandleExportAllProject(queryParams) { onHandleExportTeamEntry(queryParams) {
console.log(queryParams, '导出')
this.download( this.download(
'/bmw/subTeamContract/export', '/bmw/subTeamContract/export',
{ {
@ -156,10 +156,10 @@ export default {
if (type === 2 || type === 3) { if (type === 2 || type === 3) {
const { const {
id,
subId, subId,
proId, proId,
teamId, teamId,
id,
subName, subName,
proName, proName,
teamName, teamName,
@ -190,7 +190,7 @@ export default {
this.handleCloseDialogOuter() this.handleCloseDialogOuter()
this.$refs.teamEntryTableRef.getTableList() this.$refs.teamEntryTableRef.getTableList()
} catch (error) { } catch (error) {
console.log('表单提交失败', error) // console.log('', error)
} }
}, },

View File

@ -132,12 +132,11 @@ export default {
const API = isUpdate const API = isUpdate
? editAttendanceMachineAPI ? editAttendanceMachineAPI
: addAttendanceMachineAPI : addAttendanceMachineAPI
const res = await API(params) const res = await API(params)
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess( this.$modal.msgSuccess(
this.formType === 1 ? '新增成功' : '修改成功', this.formType === 1 ? '新增成功' : '绑定成功',
) )
resolve() resolve()
} else { } else {

View File

@ -5,8 +5,8 @@
:formLabel="formLabel" :formLabel="formLabel"
:showOperation="true" :showOperation="true"
:showRightTools="true" :showRightTools="true"
ref="attendanceMachineTableRef"
:columnsList="columnsList" :columnsList="columnsList"
ref="attendanceMachineTableRef"
:request-api="getAttendanceMachineListAPI" :request-api="getAttendanceMachineListAPI"
> >
<template slot="btn" slot-scope="{ queryParams }"> <template slot="btn" slot-scope="{ queryParams }">
@ -25,8 +25,8 @@
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
v-hasPermi="['attendance:machine:add']" v-hasPermi="['att:machine:add']"
@click="onHandleAddOrBindAttendanceMachine(1, null)" @click="onHandleAddOrBindAttendanceMachine(1, null, '新增')"
> >
新增 新增
</el-button> </el-button>
@ -75,8 +75,8 @@
type="primary" type="primary"
icon="el-icon-edit" icon="el-icon-edit"
v-if="!data.proId" v-if="!data.proId"
v-hasPermi="['attendance:machine:bind']" v-hasPermi="['att:machine:bind']"
@click="onHandleAddOrBindAttendanceMachine(2, data)" @click="onHandleAddOrBindAttendanceMachine(2, data, '绑定')"
> >
绑定 绑定
</el-button> </el-button>
@ -86,7 +86,7 @@
type="warning" type="warning"
icon="el-icon-edit" icon="el-icon-edit"
v-if="data.proId" v-if="data.proId"
v-hasPermi="['attendance:machine:unbind']" v-hasPermi="['att:machine:unbind']"
@click="onHandleUnBindAttendanceMachine(data)" @click="onHandleUnBindAttendanceMachine(data)"
> >
解绑 解绑
@ -95,7 +95,7 @@
size="mini" size="mini"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
v-hasPermi="['attendance:machine:delete']" v-hasPermi="['att:machine:delete']"
@click="onHandleDeleteSubBaseInfo(data)" @click="onHandleDeleteSubBaseInfo(data)"
> >
删除 删除
@ -135,9 +135,9 @@ import DialogModel from '@/components/DialogModel'
import AddAndBindForm from './add-and-bind.form.vue' import AddAndBindForm from './add-and-bind.form.vue'
import { formLabel, columnsList, dialogConfig } from './config' import { formLabel, columnsList, dialogConfig } from './config'
import { import {
editAttendanceMachineAPI,
deleteAttendanceMachineAPI, deleteAttendanceMachineAPI,
getAttendanceMachineListAPI, getAttendanceMachineListAPI,
editAttendanceMachineAPI,
} from '@/api/construction-person/attendance-manage/attendance-machine' } from '@/api/construction-person/attendance-manage/attendance-machine'
export default { export default {
name: 'SubBaseInfo', name: 'SubBaseInfo',
@ -154,26 +154,6 @@ export default {
dialogConfig, dialogConfig,
editFormData: {}, // editFormData: {}, //
getAttendanceMachineListAPI, // API getAttendanceMachineListAPI, // API
//
slots: [
{
type: 1,
name: 'businessLicense',
},
{
type: 2,
name: 'idCard',
},
{
type: 3,
name: 'electronicSeal',
},
{
type: 4,
name: 'corporateSeal',
},
],
} }
}, },
methods: { methods: {
@ -189,18 +169,16 @@ export default {
}, },
// //
onHandleAddOrBindAttendanceMachine(type, data) { onHandleAddOrBindAttendanceMachine(type, data, title) {
this.dialogConfig.outerTitle = this.dialogConfig.outerTitle = `${title}考勤机`
type === 1 ? '新增考勤机' : '绑定考勤机'
if (type === 2) { if (type === 2) {
const { proId, deviceCode, deviceName } = data const { proId, deviceCode, deviceName } = data
this.editFormData = { this.editFormData = {
isUpdate: true,
proId, proId,
deviceCode, deviceCode,
deviceName, deviceName,
isUpdate: true,
} }
} else { } else {
this.editFormData = {} this.editFormData = {}

View File

@ -1,5 +1,5 @@
<template> <template>
<!-- 新增或修改标段工程表单 --> <!-- 新增或修改人员入场表单 -->
<div> <div>
<el-form <el-form
label-width="140px" label-width="140px"
@ -62,6 +62,8 @@
<el-form-item label="姓名" prop="name"> <el-form-item label="姓名" prop="name">
<el-input <el-input
clearable clearable
maxlength="20"
show-word-limit
placeholder="请输入姓名" placeholder="请输入姓名"
v-model="idCardInfoForm.name" v-model="idCardInfoForm.name"
/> />
@ -71,6 +73,8 @@
<el-form-item label="身份证号" prop="idNumber"> <el-form-item label="身份证号" prop="idNumber">
<el-input <el-input
clearable clearable
maxlength="18"
show-word-limit
@blur="onBlurIdNumber" @blur="onBlurIdNumber"
placeholder="请输入身份证号" placeholder="请输入身份证号"
v-model="idCardInfoForm.idNumber" v-model="idCardInfoForm.idNumber"
@ -83,8 +87,8 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="性别" prop="sex"> <el-form-item label="性别" prop="sex">
<el-radio-group <el-radio-group
size="mini"
disabled disabled
size="mini"
v-model="idCardInfoForm.sex" v-model="idCardInfoForm.sex"
> >
<el-radio-button label="男" /> <el-radio-button label="男" />
@ -98,8 +102,8 @@
disabled disabled
type="date" type="date"
style="width: 100%" style="width: 100%"
placeholder="请选择出生日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="请选择出生日期"
v-model="idCardInfoForm.birthday" v-model="idCardInfoForm.birthday"
/> />
</el-form-item> </el-form-item>
@ -110,6 +114,8 @@
<el-form-item label="民族" prop="nation"> <el-form-item label="民族" prop="nation">
<el-input <el-input
clearable clearable
maxlength="20"
show-word-limit
placeholder="请输入民族" placeholder="请输入民族"
v-model="idCardInfoForm.nation" v-model="idCardInfoForm.nation"
/> />
@ -119,6 +125,8 @@
<el-form-item label="签发机关" prop="issuingAuthority"> <el-form-item label="签发机关" prop="issuingAuthority">
<el-input <el-input
clearable clearable
maxlength="20"
show-word-limit
placeholder="请输入签发机关" placeholder="请输入签发机关"
v-model="idCardInfoForm.issuingAuthority" v-model="idCardInfoForm.issuingAuthority"
/> />
@ -155,6 +163,8 @@
<el-form-item label="身份证住址" prop="address"> <el-form-item label="身份证住址" prop="address">
<el-input <el-input
clearable clearable
maxlength="50"
show-word-limit
placeholder="请输入身份证住址" placeholder="请输入身份证住址"
v-model="idCardInfoForm.address" v-model="idCardInfoForm.address"
/> />
@ -184,10 +194,10 @@
> >
<TitleTip <TitleTip
titleText="关键信息" titleText="关键信息"
justifyContent="flex-start"
borderBottom="none" borderBottom="none"
backgroundColor="#f8fafc"
padding="24px 10px" padding="24px 10px"
backgroundColor="#f8fafc"
justifyContent="flex-start"
> >
<template> <template>
<span class="tip-text"> <span class="tip-text">
@ -579,16 +589,17 @@ export default {
}, },
// //
idCardInfoForm: { idCardInfoForm: {
name: '', // age: '',
idNumber: '', //
sex: '', // sex: '', //
birthday: '', // name: '', //
nation: '', // nation: '', //
issuingAuthority: '', //
startTime: '', // startTime: '', //
endTime: '', // endTime: '', //
address: '', // address: '', //
faceImg: [], // faceImg: [], //
idNumber: '', //
birthday: '', //
issuingAuthority: '', //
}, },
// //
@ -1140,6 +1151,7 @@ export default {
// //
const { const {
age,
sex, sex,
name, name,
proId, proId,
@ -1160,6 +1172,7 @@ export default {
} = res } = res
this.idCardInfoForm = { this.idCardInfoForm = {
age,
sex, sex,
name, name,
nation, nation,
@ -1294,6 +1307,10 @@ export default {
'-' + '-' +
birthday.slice(6, 8) birthday.slice(6, 8)
this.idCardInfoForm.sex = sex % 2 === 0 ? '女' : '男' this.idCardInfoForm.sex = sex % 2 === 0 ? '女' : '男'
//
const age = new Date().getFullYear() - birthday.slice(0, 4)
this.idCardInfoForm.age = age
}, },
}, },

View File

@ -103,10 +103,10 @@ import {
} from '@/api/construction-person/entry-and-exit-manage/person-entry' } from '@/api/construction-person/entry-and-exit-manage/person-entry'
import { import {
getLotProjectSelectListCommonFun,
getSubSelectListCommonFun, getSubSelectListCommonFun,
getTeamSelectListCommonFun, getTeamSelectListCommonFun,
getPostTypeSelectListCommonFun, getPostTypeSelectListCommonFun,
getLotProjectSelectListCommonFun,
} from '@/utils/getCommonData' } from '@/utils/getCommonData'
export default { export default {
name: 'PersonEntry', name: 'PersonEntry',
@ -125,13 +125,6 @@ export default {
queryDetailsId: '', // id queryDetailsId: '', // id
einStatus: 1, // einStatus: 1, //
formType: 1, // formType: 1, //
slots: {
businessLicense: 'businessLicense',
idCard: 'idCard',
electronicStamp: 'electronicStamp',
electronicSignature: 'electronicSignature',
},
} }
}, },
methods: { methods: {
@ -155,9 +148,6 @@ export default {
this.queryDetailsId = data.id this.queryDetailsId = data.id
this.einStatus = data.einStatus this.einStatus = data.einStatus
this.dialogConfig.outerVisible = true this.dialogConfig.outerVisible = true
// this.$nextTick(() => {
// this.$refs.addOrEditFormContentRef.getEntryPersonDetail()
// })
} else { } else {
this.queryDetailsId = '' this.queryDetailsId = ''
this.dialogConfig.outerVisible = true this.dialogConfig.outerVisible = true
@ -166,10 +156,6 @@ export default {
// //
onHandleDeletePersonEntry(data) { onHandleDeletePersonEntry(data) {
// if (data.einStatus === 1) {
// this.$modal.msgError('')
// return
// }
this.$confirm('确定删除该人员吗?', '温馨提示', { this.$confirm('确定删除该人员吗?', '温馨提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -197,7 +183,7 @@ export default {
this.$refs.personEntryTableRef.getTableList() this.$refs.personEntryTableRef.getTableList()
this.handleCloseDialogOuter() this.handleCloseDialogOuter()
} catch (error) { } catch (error) {
console.log('表单提交失败', error) // console.log('', error)
} }
}, },

View File

@ -96,7 +96,6 @@ export default {
}, },
// //
onHandlePreviewFile(row) { onHandlePreviewFile(row) {
console.log(row, '查看附件') console.log(row, '查看附件')
}, },

View File

@ -141,10 +141,10 @@ 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 { import {
getLotProjectSelectListCommonFun,
getSubSelectListCommonFun, getSubSelectListCommonFun,
getTeamSelectListCommonFun, getTeamSelectListCommonFun,
getPostTypeSelectListCommonFun, getPostTypeSelectListCommonFun,
getLotProjectSelectListCommonFun,
} from '@/utils/getCommonData' } from '@/utils/getCommonData'
import { formLabel, columnsList, dialogConfig } from './config' import { formLabel, columnsList, dialogConfig } from './config'
@ -169,7 +169,7 @@ export default {
dialogConfig, dialogConfig,
exitFormData: {}, exitFormData: {},
queryDetailsId: '', queryDetailsId: '',
isExitUpload: 1, // isExitUpload: 1, // 1: 2:
getExitPersonListAPI, getExitPersonListAPI,
slots: { slots: {
@ -188,8 +188,6 @@ export default {
// //
async onHandleBatchExit() { async onHandleBatchExit() {
console.log(this.$refs.personExitTableRef.selectedData, '批量出场')
const selectedData = this.$refs.personExitTableRef.selectedData const selectedData = this.$refs.personExitTableRef.selectedData
if (selectedData.length === 0) { if (selectedData.length === 0) {
@ -200,13 +198,11 @@ export default {
const params = selectedData.map((item) => { const params = selectedData.map((item) => {
return { return {
id: item.id, id: item.id,
proId: item.proId,
workerId: item.workerId, workerId: item.workerId,
} }
}) })
const res = await batchExitPersonAPI(params) const res = await batchExitPersonAPI(params)
console.log(res, '批量出场结果')
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('批量出场成功') this.$modal.msgSuccess('批量出场成功')
this.$refs.personExitTableRef.getTableList() this.$refs.personExitTableRef.getTableList()
@ -215,14 +211,24 @@ export default {
} }
}, },
//
onHandlePersonExit(data, type) { onHandlePersonExit(data, type) {
this.isExitUpload = type this.isExitUpload = type
const { name, idNumber, proName, subName, teamName, id, workerId } = const {
data name,
idNumber,
proName,
subName,
teamName,
id,
workerId,
proId,
} = data
this.exitFormData = { this.exitFormData = {
id, id,
name, name,
proId,
proName, proName,
subName, subName,
teamName, teamName,

View File

@ -121,11 +121,11 @@ export default {
const { id, workerId, fileList } = this.personExitFormData const { id, workerId, fileList } = this.personExitFormData
const params = { const params = {
id, id,
proId,
workerId, workerId,
} }
const formData = new FormData()
const fileMsg = [] const fileMsg = []
const formData = new FormData()
if (fileList.length > 0) { if (fileList.length > 0) {
fileList.forEach((e) => { fileList.forEach((e) => {
@ -154,8 +154,8 @@ export default {
id, id,
} }
const formData = new FormData()
const fileMsg = [] const fileMsg = []
const formData = new FormData()
if (fileList.length > 0) { if (fileList.length > 0) {
fileList.forEach((e) => { fileList.forEach((e) => {

View File

@ -221,6 +221,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess('删除成功')
this.$refs.divideCompanyManageTableRef.getTableList() this.$refs.divideCompanyManageTableRef.getTableList()
this.$store.dispatch('getSubCompanySelectList') // store
} else { } else {
this.$modal.msgError(res.msg) this.$modal.msgError(res.msg)
} }
@ -254,9 +255,7 @@ export default {
) )
this.handleCloseDialogOuter() this.handleCloseDialogOuter()
this.$refs.divideCompanyManageTableRef.getTableList() this.$refs.divideCompanyManageTableRef.getTableList()
this.$store.dispatch('getSubCompanySelectList') // store
// store
this.$store.dispatch('common/getSubCompanySelectList')
} else { } else {
this.$modal.msgError(res.msg) this.$modal.msgError(res.msg)
} }