Compare commits
2 Commits
9b7b18881a
...
33577233b3
| Author | SHA1 | Date |
|---|---|---|
|
|
33577233b3 | |
|
|
295019f3c7 |
|
|
@ -65,6 +65,7 @@ export default {
|
|||
left: 50% !important;
|
||||
transform: translate(-50%, -50%) !important;
|
||||
max-height: 100vh !important;
|
||||
// 使用变量
|
||||
min-height: 100vh;
|
||||
.el-dialog__body {
|
||||
flex: 1;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,78 @@
|
|||
<template>
|
||||
<!-- 弹框组件 -->
|
||||
<div>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:title="dialogConfig.outerTitle"
|
||||
:width="dialogConfig.outerWidth"
|
||||
:visible.sync="dialogConfig.outerVisible"
|
||||
v-if="dialogConfig.outerVisible"
|
||||
:before-close="handleCloseOuter"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<!-- 外层弹框内容 -->
|
||||
<slot name="outerContent"></slot>
|
||||
|
||||
<!-- 内层对话框 -->
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:title="dialogConfig.innerTitle"
|
||||
:width="dialogConfig.innerWidth"
|
||||
:visible.sync="dialogConfig.innerVisible"
|
||||
v-if="dialogConfig.innerVisible"
|
||||
:before-close="handleCloseInner"
|
||||
>
|
||||
<!-- 内层弹框内容 -->
|
||||
<slot name="innerContent"></slot>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
/* 配置项 */
|
||||
dialogConfig: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/* 右上角关闭外层 */
|
||||
handleCloseOuter() {
|
||||
/* 通知父组件更改弹框显示值 */
|
||||
this.$emit('closeDialogOuter', false)
|
||||
},
|
||||
/* 右上角关闭内层 */
|
||||
handleCloseInner() {
|
||||
/* 通知父组件更改弹框显示值 */
|
||||
this.$emit('closeDialogInner', false)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-dialog {
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
margin: 0 !important;
|
||||
position: absolute !important;
|
||||
top: 50% !important;
|
||||
left: 50% !important;
|
||||
transform: translate(-50%, -50%) !important;
|
||||
max-height: 75vh !important;
|
||||
// 使用变量
|
||||
min-height: 75vh;
|
||||
.el-dialog__body {
|
||||
flex: 1;
|
||||
overflow-y: scroll !important;
|
||||
}
|
||||
.dialog-content {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -100,9 +100,6 @@ export default {
|
|||
methods: {
|
||||
// 删除
|
||||
async handleRemove(file, fileList) {
|
||||
// const deleteFile = {
|
||||
// filePath: '',
|
||||
// }
|
||||
if (file.response && file.response.data.length > 0) {
|
||||
this.$emit('deleteFile', { filePath: file.response.data[0].filePath, isNew: true })
|
||||
} else {
|
||||
|
|
@ -113,12 +110,6 @@ export default {
|
|||
}
|
||||
}
|
||||
this.$emit('update:fileList', fileList)
|
||||
// const res = await deleteImgAPI(deleteFile)
|
||||
// if (res.code === 200) {
|
||||
// this.$emit('update:fileList', fileList)
|
||||
// } else {
|
||||
// this.$modal.msgError('删除失败')
|
||||
// }
|
||||
},
|
||||
|
||||
// 预览
|
||||
|
|
@ -146,18 +137,31 @@ export default {
|
|||
|
||||
// 上传前
|
||||
handleBeforeUpload(file) {
|
||||
const isFormat = this.fileType.some((e) => file.type.includes(e))
|
||||
// 根据file的name的后缀判断是否符合要求
|
||||
console.log(file, 'file')
|
||||
const isFormat = this.fileType.some((e) => file.name.endsWith(e))
|
||||
if (!isFormat) {
|
||||
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join('、')}格式的文件!`)
|
||||
return false
|
||||
}
|
||||
// const isLt = file.size / 1024 / 1024 < this.fileSize
|
||||
// if (!isLt) {
|
||||
// this.$modal.msgError(`图片大小不能超过 ${this.fileSize} MB`)
|
||||
// 判断文件大小
|
||||
const isLt = file.size / 1024 / 1024 < this.fileSize
|
||||
if (!isLt) {
|
||||
this.$modal.msgError(`图片大小不能超过 ${this.fileSize} MB`)
|
||||
return false
|
||||
}
|
||||
|
||||
// return false
|
||||
// }
|
||||
this.$modal.loading('图片正在上传,请稍候...')
|
||||
// 替换文件路径中的#号
|
||||
const newFileName = file.name.replace(/#/g, '@')
|
||||
const newFile = new File([file], newFileName, { type: file.type })
|
||||
|
||||
// 修改原始文件的name属性
|
||||
Object.defineProperty(file, 'name', {
|
||||
value: newFileName,
|
||||
})
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
// 超出限制
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@
|
|||
<el-form-item prop="diplomaImg">
|
||||
<template #label>
|
||||
<span>上述资格证书照片</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png格式)</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png、jpeg格式)</span>
|
||||
</template>
|
||||
<UploadImg
|
||||
:limit="5"
|
||||
|
|
@ -205,7 +205,7 @@
|
|||
<el-form-item prop="otherImg">
|
||||
<template #label>
|
||||
<span>其他资质照片</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png格式)</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png、jpeg格式)</span>
|
||||
</template>
|
||||
<UploadImg
|
||||
:limit="5"
|
||||
|
|
|
|||
|
|
@ -28,8 +28,14 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="getKeyPersonList">查询</el-button>
|
||||
<el-button @click="resetQueryParams">重置</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增人员</el-button>
|
||||
<el-button @click="handleExport">导出数据</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="onHandleAddOrEdit(null, 1)"
|
||||
v-hasPermi="['company:key:person:add']"
|
||||
>
|
||||
新增人员
|
||||
</el-button>
|
||||
<el-button @click="handleExport" v-hasPermi="['company:key:person:export']">导出数据</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -77,6 +83,7 @@
|
|||
icon="el-icon-edit"
|
||||
style="color: #409eff"
|
||||
@click="onHandleAddOrEdit(row, 3)"
|
||||
v-hasPermi="['company:key:person:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
|
|
@ -86,6 +93,7 @@
|
|||
icon="el-icon-delete"
|
||||
style="color: #f56c6c"
|
||||
@click="onHandleDelete(row)"
|
||||
v-hasPermi="['company:key:person:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@
|
|||
<el-form-item prop="diplomaImg">
|
||||
<template #label>
|
||||
<span>上传资格证照片</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png格式)</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png、jpeg格式)</span>
|
||||
</template>
|
||||
<UploadImg
|
||||
:limit="5"
|
||||
|
|
@ -186,7 +186,7 @@
|
|||
<el-form-item prop="otherImg">
|
||||
<template #label>
|
||||
<span>其他资质照片</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png格式)</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png、jpeg格式)</span>
|
||||
</template>
|
||||
<UploadImg
|
||||
:limit="5"
|
||||
|
|
|
|||
|
|
@ -28,8 +28,16 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="getOtherPersonList">查询</el-button>
|
||||
<el-button @click="resetQueryParams">重置</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增人员</el-button>
|
||||
<el-button @click="handleExport">导出数据</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="onHandleAddOrEdit(null, 1)"
|
||||
v-hasPermi="['company:other:person:add']"
|
||||
>
|
||||
新增人员
|
||||
</el-button>
|
||||
<el-button @click="handleExport" v-hasPermi="['company:other:person:export']">
|
||||
导出数据
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -81,6 +89,7 @@
|
|||
icon="el-icon-edit"
|
||||
style="color: #409eff"
|
||||
@click="onHandleAddOrEdit(row, 3)"
|
||||
v-hasPermi="['company:other:person:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
|
|
@ -90,6 +99,7 @@
|
|||
icon="el-icon-delete"
|
||||
style="color: #f56c6c"
|
||||
@click="onHandleDelete(row)"
|
||||
v-hasPermi="['company:other:person:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -128,13 +128,14 @@
|
|||
<el-table :data="addTableList" stripe style="width: 100%">
|
||||
<el-table-column label="序号" width="55" type="index" />
|
||||
<el-table-column align="center" label="担任职务" show-overflow-tooltip>
|
||||
<template slot-scope="{ row }">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
clearable
|
||||
maxlength="30"
|
||||
show-word-limit
|
||||
v-model="row.title"
|
||||
v-model="scope.row.title"
|
||||
placeholder="请输入职务"
|
||||
:ref="`title_${scope.$index}`"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -143,7 +144,10 @@
|
|||
<el-select
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择人员"
|
||||
v-model="scope.row.keyUser"
|
||||
:ref="`keyUser_${scope.$index}`"
|
||||
:class="{ 'error-border': scope.row.showError }"
|
||||
@change="onHandleChange(scope.$index, $event)"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -157,13 +161,14 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" prop="idCard" label="身份证号" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="工作内容">
|
||||
<template slot-scope="{ row }">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
clearable
|
||||
maxlength="50"
|
||||
show-word-limit
|
||||
v-model="row.workContent"
|
||||
v-model="scope.row.workContent"
|
||||
placeholder="请输入工作内容"
|
||||
:ref="`workContent_${scope.$index}`"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -228,7 +233,7 @@
|
|||
<template #label>
|
||||
<span>合同关键页</span>
|
||||
<span style="color: #999; font-size: 12px">
|
||||
(合同起始页面、关键页面、竣工报告、相关证明等,一个项目最多上传8张仅支持jpg、png格式图片)
|
||||
(合同起始页面、关键页面、竣工报告、相关证明等,一个项目最多上传8张,仅支持jpg、png、jpeg格式图片)
|
||||
</span>
|
||||
</template>
|
||||
<UploadImg
|
||||
|
|
@ -241,6 +246,7 @@
|
|||
:file-type="['jpg', 'png', 'jpeg']"
|
||||
:file-list.sync="addAndEditForm.htKeyFileList"
|
||||
:is-uploaded="addAndEditForm.htKeyFileList.length >= 8"
|
||||
:before-upload="beforeUpload"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -261,7 +267,7 @@
|
|||
>
|
||||
<div class="upload-title">
|
||||
<span> 证明材料 </span>
|
||||
最多上传4张,仅支持JPG、PNG格式图片
|
||||
最多上传4张,仅支持jpg、png、jpeg格式图片
|
||||
</div>
|
||||
<UploadImg
|
||||
:limit="4"
|
||||
|
|
@ -273,6 +279,7 @@
|
|||
:upload-file-url="uploadFileUrl"
|
||||
:file-type="['jpg', 'png', 'jpeg']"
|
||||
:is-uploaded="proveFileList.length >= 4"
|
||||
:before-upload="beforeUpload"
|
||||
/>
|
||||
|
||||
<el-row class="upload-btn-box">
|
||||
|
|
@ -418,6 +425,12 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加文件上传前的处理方法
|
||||
beforeUpload(file) {
|
||||
// 创建新的文件对象,替换文件名中的#为@
|
||||
const newFile = new File([file], file.name.replace(/#/g, '@'), { type: file.type })
|
||||
return newFile
|
||||
},
|
||||
onHandleAdd() {
|
||||
this.addTableList.push({
|
||||
title: '',
|
||||
|
|
@ -440,6 +453,66 @@ export default {
|
|||
onConfirm() {
|
||||
this.$refs.addAndEditFormRef.validate(async (valid) => {
|
||||
if (valid) {
|
||||
// 校验一下人员是否有空项
|
||||
let isError = false
|
||||
if (this.addTableList.length > 0) {
|
||||
for (let index = 0; index < this.addTableList.length; index++) {
|
||||
const item = this.addTableList[index]
|
||||
if (!item.keyUser) {
|
||||
this.$modal.msgError(`项目关键人员第${index + 1}行未选择人员`)
|
||||
|
||||
// 设置错误状态
|
||||
this.$set(item, 'showError', true)
|
||||
this.$nextTick(() => {
|
||||
const selectRef = this.$refs[`keyUser_${index}`]
|
||||
if (selectRef && selectRef.focus) {
|
||||
selectRef.focus()
|
||||
}
|
||||
})
|
||||
|
||||
isError = true
|
||||
break // 找到第一个错误就停止
|
||||
}
|
||||
if (!item.title) {
|
||||
this.$modal.msgError(`项目关键人员第${index + 1}行未输入担任职务`)
|
||||
this.$nextTick(() => {
|
||||
const inputRef = this.$refs[`title_${index}`]
|
||||
|
||||
console.log(inputRef)
|
||||
inputRef.focus()
|
||||
// 添加红框样式
|
||||
inputRef.$el.querySelector('.el-input__inner').style.border = '1px solid red'
|
||||
// 可选:监听 blur 事件移除红框
|
||||
inputRef.$el
|
||||
.querySelector('.el-input__inner')
|
||||
.addEventListener('blur', function () {
|
||||
this.style.border = ''
|
||||
})
|
||||
})
|
||||
isError = true
|
||||
break
|
||||
}
|
||||
if (!item.workContent) {
|
||||
this.$modal.msgError(`项目关键人员第${index + 1}行未输入工作内容`)
|
||||
this.$nextTick(() => {
|
||||
const inputRef = this.$refs[`workContent_${index}`]
|
||||
inputRef.focus()
|
||||
// 添加红框样式
|
||||
inputRef.$el.querySelector('.el-input__inner').style.border = '1px solid red'
|
||||
// 可选:监听 blur 事件移除红框
|
||||
inputRef.$el
|
||||
.querySelector('.el-input__inner')
|
||||
.addEventListener('blur', function () {
|
||||
this.style.border = ''
|
||||
})
|
||||
})
|
||||
isError = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isError) return false
|
||||
// 组装参数
|
||||
const {
|
||||
proName, // 工程名称
|
||||
|
|
@ -566,6 +639,16 @@ export default {
|
|||
},
|
||||
// 人员选择
|
||||
onHandleChange(index, value) {
|
||||
if (!value) {
|
||||
this.addTableList[index].userName = ''
|
||||
this.addTableList[index].idCard = ''
|
||||
this.addTableList[index].keyUser = ''
|
||||
this.addTableList[index].showError = false
|
||||
this.addTableList[index].tbFileSourceVoList = []
|
||||
this.addTableList[index].title = ''
|
||||
this.addTableList[index].workContent = ''
|
||||
return false
|
||||
}
|
||||
// 校验不可重复
|
||||
if (this.addTableList.some((item, currentIndex) => item.keyUser == value && currentIndex !== index)) {
|
||||
this.$modal.msgError('人员不可重复选择')
|
||||
|
|
@ -573,8 +656,9 @@ export default {
|
|||
this.addTableList[index].idCard = ''
|
||||
this.addTableList[index].keyUser = ''
|
||||
} else {
|
||||
this.addTableList[index].userName = this.keyPersonList.find((item) => item.id == value).userName
|
||||
this.addTableList[index].idCard = this.keyPersonList.find((item) => item.id == value).idCard
|
||||
this.addTableList[index].userName = this.keyPersonList.find((item) => item.id == value).userName || ''
|
||||
this.addTableList[index].idCard = this.keyPersonList.find((item) => item.id == value).idCard || ''
|
||||
this.addTableList[index].showError = false
|
||||
}
|
||||
},
|
||||
onCancelInner() {
|
||||
|
|
@ -695,4 +779,8 @@ export default {
|
|||
text-align: right;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
::v-deep .error-border .el-input__inner {
|
||||
border: 1px solid red !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -25,15 +25,23 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="getCompanyPerformanceList">查询</el-button>
|
||||
<el-button @click="resetQueryParams">重置</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增业绩</el-button>
|
||||
<el-button @click="handleExport">导出数据</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="onHandleAddOrEdit(null, 1)"
|
||||
v-hasPermi="['company:performance:manage:add']"
|
||||
>
|
||||
新增业绩
|
||||
</el-button>
|
||||
<el-button @click="handleExport" v-hasPermi="['company:performance:manage:export']">
|
||||
导出数据
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableList" stripe style="width: 100%">
|
||||
<el-table-column label="序号" width="55" type="index" />
|
||||
<el-table-column label="序号" width="55" type="index" align="center" />
|
||||
<el-table-column
|
||||
:key="index"
|
||||
align="center"
|
||||
|
|
@ -58,7 +66,7 @@
|
|||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
0
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
|
|
@ -76,6 +84,7 @@
|
|||
icon="el-icon-edit"
|
||||
style="color: #409eff"
|
||||
@click="onHandleAddOrEdit(row, 3)"
|
||||
v-hasPermi="['company:performance:manage:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
|
|
@ -85,6 +94,7 @@
|
|||
icon="el-icon-delete"
|
||||
style="color: #f56c6c"
|
||||
@click="onHandleDelete(row)"
|
||||
v-hasPermi="['company:performance:manage:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
|
@ -147,7 +157,7 @@ export default {
|
|||
{ label: '电压等级', prop: 'voltage' },
|
||||
{ label: '起止时间', isSlot: true },
|
||||
{ label: '竣工日期', prop: 'stopTime' },
|
||||
{ label: '变电站数量', prop: 'stationNum' },
|
||||
{ label: '变电站座数', prop: 'stationNum' },
|
||||
{ label: '线路建设规模(折单公里)', prop: 'lineScale' },
|
||||
{ label: '承包范围', prop: 'contractRang' },
|
||||
{ label: '业主单位', prop: 'ownerUnit' },
|
||||
|
|
|
|||
|
|
@ -1028,7 +1028,7 @@ export default {
|
|||
},
|
||||
// 选择分包人员
|
||||
async selectSubcontractorPerson(index) {
|
||||
this.subcontractorPersonTableCurrentIndex = index
|
||||
this.subcontractorPersonCurrentIndex = index
|
||||
this.dialogConfig.outerTitle = '分包人员选择'
|
||||
this.otherPersonQueryParams.pageNum = 1
|
||||
this.otherPersonQueryParams.pageSize = 10
|
||||
|
|
|
|||
|
|
@ -27,14 +27,16 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="getEpcTemplateList">查询</el-button>
|
||||
<el-button @click="resetQueryParams">重置</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['epc:template:add']">
|
||||
新增
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableList" stripe style="width: 100%">
|
||||
<el-table-column label="序号" width="55" type="index" />
|
||||
<el-table-column label="序号" width="55" type="index" align="center" />
|
||||
<el-table-column
|
||||
:key="index"
|
||||
align="center"
|
||||
|
|
@ -56,29 +58,32 @@
|
|||
详情
|
||||
</el-button>
|
||||
<el-button
|
||||
style="color: #d140ff"
|
||||
icon="el-icon-download"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-download"
|
||||
style="color: #d140ff"
|
||||
@click="onHandleDownload(row)"
|
||||
v-hasPermi="['epc:template:download']"
|
||||
>
|
||||
下载
|
||||
</el-button>
|
||||
<el-button
|
||||
style="color: #409eff"
|
||||
icon="el-icon-edit"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
style="color: #409eff"
|
||||
@click="onHandleAddOrEdit(row, 3)"
|
||||
v-hasPermi="['epc:template:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
style="color: #f56c6c"
|
||||
icon="el-icon-delete"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
style="color: #f56c6c"
|
||||
@click="onHandleDelete(row)"
|
||||
v-hasPermi="['epc:template:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -27,14 +27,16 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="getGwTemplateList">查询</el-button>
|
||||
<el-button @click="resetQueryParams">重置</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['gw:template:add']">
|
||||
新增
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableList" stripe style="width: 100%">
|
||||
<el-table-column label="序号" width="55" type="index" />
|
||||
<el-table-column label="序号" width="55" type="index" align="center" />
|
||||
<el-table-column
|
||||
:key="index"
|
||||
align="center"
|
||||
|
|
@ -61,6 +63,7 @@
|
|||
type="text"
|
||||
size="mini"
|
||||
@click="onHandleDownload(row)"
|
||||
v-hasPermi="['gw:template:download']"
|
||||
>
|
||||
下载
|
||||
</el-button>
|
||||
|
|
@ -70,6 +73,7 @@
|
|||
type="text"
|
||||
size="mini"
|
||||
@click="onHandleAddOrEdit(row, 3)"
|
||||
v-hasPermi="['gw:template:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
|
|
@ -79,6 +83,7 @@
|
|||
type="text"
|
||||
size="mini"
|
||||
@click="onHandleDelete(row)"
|
||||
v-hasPermi="['gw:template:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -27,14 +27,16 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="getNwTemplateList">查询</el-button>
|
||||
<el-button @click="resetQueryParams">重置</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['nw:template:add']">
|
||||
新增
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableList" stripe style="width: 100%">
|
||||
<el-table-column label="序号" width="55" type="index" />
|
||||
<el-table-column label="序号" width="55" type="index" align="center" />
|
||||
<el-table-column
|
||||
:key="index"
|
||||
align="center"
|
||||
|
|
@ -61,6 +63,7 @@
|
|||
style="color: #d140ff"
|
||||
icon="el-icon-download"
|
||||
@click="onHandleDownload(row)"
|
||||
v-hasPermi="['nw:template:download']"
|
||||
>
|
||||
下载
|
||||
</el-button>
|
||||
|
|
@ -70,6 +73,7 @@
|
|||
icon="el-icon-edit"
|
||||
style="color: #409eff"
|
||||
@click="onHandleAddOrEdit(row, 3)"
|
||||
v-hasPermi="['nw:template:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
|
|
@ -79,6 +83,7 @@
|
|||
icon="el-icon-delete"
|
||||
style="color: #f56c6c"
|
||||
@click="onHandleDelete(row)"
|
||||
v-hasPermi="['nw:template:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
<template #label>
|
||||
<span>公司资质</span>
|
||||
<span style="color: #999; font-size: 12px">
|
||||
(请上传公司营业执照、生产许可证以及其他相关资质证书图片、最多上传20张,仅支持jpg、png格式)
|
||||
(请上传公司营业执照、生产许可证以及其他相关资质证书图片、最多上传20张,仅支持jpg、png、jpeg格式)
|
||||
</span>
|
||||
</template>
|
||||
<UploadImg
|
||||
|
|
|
|||
|
|
@ -13,15 +13,17 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="getSubManageList">查询</el-button>
|
||||
<el-button @click="resetQueryParam">重置</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增分包商</el-button>
|
||||
<el-button @click="handleExport">导出数据</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['sub:manage:add']">
|
||||
新增分包商
|
||||
</el-button>
|
||||
<el-button @click="handleExport" v-hasPermi="['sub:manage:export']">导出数据</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableList" stripe style="width: 100%">
|
||||
<el-table-column label="序号" width="55" type="index" />
|
||||
<el-table-column label="序号" width="55" type="index" align="center" />
|
||||
<el-table-column
|
||||
:key="index"
|
||||
align="center"
|
||||
|
|
@ -47,6 +49,7 @@
|
|||
icon="el-icon-edit"
|
||||
type="text"
|
||||
size="mini"
|
||||
v-hasPermi="['sub:manage:edit']"
|
||||
@click="onHandleAddOrEdit(row, 3)"
|
||||
>
|
||||
编辑
|
||||
|
|
@ -57,6 +60,7 @@
|
|||
type="text"
|
||||
size="mini"
|
||||
@click="onHandleDelete(row)"
|
||||
v-hasPermi="['sub:manage:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
|
@ -84,7 +88,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import DialogModel from '@/components/DialogModel/index'
|
||||
import DialogModel from '@/components/DialogModelNew/index'
|
||||
import AddAndEditForm from './components/addAndEditForm.vue'
|
||||
import { getSubManageListAPI, deleteSubManageAPI } from '@/api/sub-manage/sub-manage'
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -116,13 +116,14 @@
|
|||
<el-table :data="addTableList" stripe style="width: 100%">
|
||||
<el-table-column label="序号" width="55" type="index" />
|
||||
<el-table-column align="center" label="担任职务" show-overflow-tooltip>
|
||||
<template slot-scope="{ row }">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
clearable
|
||||
maxlength="30"
|
||||
show-word-limit
|
||||
v-model="row.title"
|
||||
v-model="scope.row.title"
|
||||
placeholder="请输入职务"
|
||||
:ref="`title_${scope.$index}`"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -132,6 +133,8 @@
|
|||
clearable
|
||||
filterable
|
||||
v-model="scope.row.keyUser"
|
||||
:ref="`keyUser_${scope.$index}`"
|
||||
:class="{ 'error-border': scope.row.showError }"
|
||||
@change="onHandleChange(scope.$index, $event)"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -164,7 +167,7 @@
|
|||
<template #label>
|
||||
<span>合同关键页</span>
|
||||
<span style="color: #999; font-size: 12px">
|
||||
(合同起始页面、关键页面、竣工报告、相关证明等,一个项目最多上传8张仅支持jpg、png格式图片)
|
||||
(合同起始页面、关键页面、竣工报告、相关证明等,一个项目最多上传8张,仅支持jpg、png、jpeg格式图片)
|
||||
</span>
|
||||
</template>
|
||||
<UploadImg
|
||||
|
|
@ -345,6 +348,48 @@ export default {
|
|||
onConfirm() {
|
||||
this.$refs.addAndEditFormRef.validate(async (valid) => {
|
||||
if (valid) {
|
||||
// 校验一下人员是否有空项
|
||||
let isError = false
|
||||
if (this.addTableList.length > 0) {
|
||||
for (let index = 0; index < this.addTableList.length; index++) {
|
||||
const item = this.addTableList[index]
|
||||
if (!item.keyUser) {
|
||||
this.$modal.msgError(`分包人员第${index + 1}行未选择人员`)
|
||||
|
||||
// 设置错误状态
|
||||
this.$set(item, 'showError', true)
|
||||
this.$nextTick(() => {
|
||||
const selectRef = this.$refs[`keyUser_${index}`]
|
||||
if (selectRef && selectRef.focus) {
|
||||
selectRef.focus()
|
||||
}
|
||||
})
|
||||
|
||||
isError = true
|
||||
break // 找到第一个错误就停止
|
||||
}
|
||||
if (!item.title) {
|
||||
this.$modal.msgError(`分包人员第${index + 1}行未输入担任职务`)
|
||||
this.$nextTick(() => {
|
||||
const inputRef = this.$refs[`title_${index}`]
|
||||
console.log(inputRef)
|
||||
inputRef.focus()
|
||||
// 添加红框样式
|
||||
inputRef.$el.querySelector('.el-input__inner').style.border = '1px solid red'
|
||||
// 可选:监听 blur 事件移除红框
|
||||
inputRef.$el
|
||||
.querySelector('.el-input__inner')
|
||||
.addEventListener('blur', function () {
|
||||
this.style.border = ''
|
||||
})
|
||||
})
|
||||
isError = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isError) return false
|
||||
// 组装参数
|
||||
const {
|
||||
subId, // 所属分包商
|
||||
|
|
@ -418,6 +463,13 @@ export default {
|
|||
},
|
||||
|
||||
onHandleChange(index, event) {
|
||||
if (!event) {
|
||||
this.addTableList[index].idCard = ''
|
||||
this.addTableList[index].keyUser = ''
|
||||
this.addTableList[index].showError = false
|
||||
this.addTableList[index].title = ''
|
||||
return false
|
||||
}
|
||||
// 判断除了当前行之外的其他行是否已经选择 如果已经选择提示重复
|
||||
const isRepeat = this.addTableList.some((item, tIndex) => item.keyUser == event && tIndex !== index)
|
||||
if (isRepeat) {
|
||||
|
|
@ -511,4 +563,8 @@ export default {
|
|||
text-align: right;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
::v-deep .error-border .el-input__inner {
|
||||
border: 1px solid red !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -25,15 +25,23 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="getSubPerformanceManageList">查询</el-button>
|
||||
<el-button @click="resetQueryParams">重置</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增业绩</el-button>
|
||||
<el-button @click="handleExport">导出数据</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="onHandleAddOrEdit(null, 1)"
|
||||
v-hasPermi="['sub:performance:manage:add']"
|
||||
>
|
||||
新增业绩
|
||||
</el-button>
|
||||
<el-button @click="handleExport" v-hasPermi="['sub:performance:manage:export']">
|
||||
导出数据
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableList" stripe style="width: 100%">
|
||||
<el-table-column label="序号" width="55" type="index" />
|
||||
<el-table-column label="序号" width="55" type="index" align="center" />
|
||||
<el-table-column
|
||||
:key="index"
|
||||
align="center"
|
||||
|
|
@ -71,20 +79,22 @@
|
|||
详情
|
||||
</el-button>
|
||||
<el-button
|
||||
style="color: #409eff"
|
||||
icon="el-icon-edit"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
style="color: #409eff"
|
||||
@click="onHandleAddOrEdit(row, 3)"
|
||||
v-hasPermi="['sub:performance:manage:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
style="color: #f56c6c"
|
||||
icon="el-icon-delete"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
style="color: #f56c6c"
|
||||
@click="onHandleDelete(row)"
|
||||
v-hasPermi="['sub:performance:manage:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
:disabled="formType === 3"
|
||||
placeholder="请选择所属分包商"
|
||||
v-model="addAndEditForm.subId"
|
||||
>
|
||||
|
|
@ -128,7 +129,7 @@
|
|||
<el-form-item prop="diplomaImg">
|
||||
<template #label>
|
||||
<span>上传资格证照片</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png格式)</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png、jpeg格式)</span>
|
||||
</template>
|
||||
<UploadImg
|
||||
:limit="5"
|
||||
|
|
@ -150,7 +151,7 @@
|
|||
<el-form-item prop="otherImg">
|
||||
<template #label>
|
||||
<span>其他资质照片</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png格式)</span>
|
||||
<span style="color: #999; font-size: 12px">(最多上传5张,仅支持jpg、png、jpeg格式)</span>
|
||||
</template>
|
||||
<UploadImg
|
||||
:limit="5"
|
||||
|
|
|
|||
|
|
@ -23,15 +23,21 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="getSubPersonManageList">查询</el-button>
|
||||
<el-button @click="resetQueryParams">重置</el-button>
|
||||
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增人员</el-button>
|
||||
<el-button @click="handleExport">导出数据</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="onHandleAddOrEdit(null, 1)"
|
||||
v-hasPermi="['sub:person:manage:add']"
|
||||
>
|
||||
新增人员
|
||||
</el-button>
|
||||
<el-button @click="handleExport" v-hasPermi="['sub:person:manage:export']">导出数据</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableList" stripe style="width: 100%">
|
||||
<el-table-column label="序号" width="55" type="index" />
|
||||
<el-table-column label="序号" width="55" type="index" align="center" />
|
||||
<el-table-column
|
||||
:key="index"
|
||||
align="center"
|
||||
|
|
@ -53,20 +59,22 @@
|
|||
详情
|
||||
</el-button>
|
||||
<el-button
|
||||
style="color: #409eff"
|
||||
icon="el-icon-edit"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
style="color: #409eff"
|
||||
@click="onHandleAddOrEdit(row, 3)"
|
||||
v-hasPermi="['sub:person:manage:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
style="color: #f56c6c"
|
||||
icon="el-icon-delete"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
style="color: #f56c6c"
|
||||
@click="onHandleDelete(row)"
|
||||
v-hasPermi="['sub:person:manage:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
|
@ -121,17 +129,7 @@ export default {
|
|||
pageSize: 10,
|
||||
},
|
||||
timeValue: [],
|
||||
tableList: [
|
||||
{
|
||||
projectName: '测试工程1',
|
||||
},
|
||||
{
|
||||
projectName: '测试工程2',
|
||||
},
|
||||
{
|
||||
projectName: '测试工程3',
|
||||
},
|
||||
],
|
||||
tableList: [],
|
||||
tableColumn: [
|
||||
{ label: '所属分包商', prop: 'subName' },
|
||||
{ label: '姓名', prop: 'userName' },
|
||||
|
|
|
|||
Loading…
Reference in New Issue