diff --git a/src/views/data-create/epc-template-old/components/addAndEditForm.vue b/src/views/data-create/epc-template-old/components/addAndEditForm.vue
new file mode 100644
index 0000000..ae4f7e4
--- /dev/null
+++ b/src/views/data-create/epc-template-old/components/addAndEditForm.vue
@@ -0,0 +1,1194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+ {{ scope.row.userName }}
+
+
+
+
+
+
+
+ {{ row.diploma }}
+
+
+
+ {{ row.idCard }}
+
+
+
+
+
+
+
+ {{ scope.row.postName }}
+
+
+
+
+
+ {{ row.proPerf }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.postName }}
+
+
+
+
+
+
+ 选择
+
+
+ {{ scope.row.userName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.postName }}
+
+
+
+
+
+
+ 选择
+
+
+ {{ scope.row.userName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formType !== 2 ? '取消' : '关闭' }}
+ 确定
+
+
+
+
+
+
+
+ 拟派人员
+
+
+
+
+
+
+
+ 人员业绩选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+ {{ option.proName }}
+
+
+ {{ option.voltage }}
+
+ {{ option.startTime }} 至{{ option.endTime }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data-create/epc-template-old/index.vue b/src/views/data-create/epc-template-old/index.vue
new file mode 100644
index 0000000..696d4d4
--- /dev/null
+++ b/src/views/data-create/epc-template-old/index.vue
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 详情
+
+
+ 下载
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data-create/epc-template/components/addAndEditForm.vue b/src/views/data-create/epc-template/components/addAndEditForm.vue
index ae4f7e4..122c948 100644
--- a/src/views/data-create/epc-template/components/addAndEditForm.vue
+++ b/src/views/data-create/epc-template/components/addAndEditForm.vue
@@ -22,6 +22,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
公司关键人员
@@ -82,6 +123,42 @@
+
+
+
+
+ {{ scope.row.einDate }}
+
+
+
+
+
+
+
+ {{ scope.row.exitDate }}
+
+
+
{{ row.proPerf }}
@@ -116,7 +193,7 @@
-
+
-
+
-
-
-
-
-
-
- {{ scope.row.postName }}
+
+
+
+
+ {{ item.subName }}
-
-
-
-
-
- 选择
-
-
- {{ scope.row.userName }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.startTime }} 至{{ row.endTime }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+ {{ scope.row.userName }}
+
+
+
+
+
+
+
+ {{ row.diploma }}
+
+
+
+ {{ row.idCard }}
+
+
+
+
+
+
+
+ {{ scope.row.postName }}
+
+
+
+
+
+ {{ row.proPerf }}
+
+
+
+
+
+
+
+
+
+
@@ -235,12 +400,14 @@
确定
-
+
-
-
- 拟派人员
+
+
+ 拟派人员
- 人员业绩选择
+ 人员业绩选择
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 拟派人员
+
+
+
+
+
+
+
+ 人员业绩选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
查询
@@ -420,34 +656,28 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ option.proName }}
+
+
+ {{ option.voltage }}
+
+ {{ option.startTime }} 至{{ option.endTime }}
+
+
+
@@ -463,11 +693,20 @@
import moment from 'moment'
import UploadImg from '@/components/UploadImg'
import DialogModel from '@/components/DialogModel/index'
-import { getKeyPersonListAPI } from '@/api/common'
+import { getKeyPersonListAPI, getSubKeyPersonListAPI } from '@/api/common'
+import { getSubManageListAPI } from '@/api/sub-manage/sub-manage'
import { getOtherPersonListAPI } from '@/api/company-manage/other-person'
import { getSubPersonManageListAPI } from '@/api/sub-manage/sub-person-manage'
-import { getCompanyPerformanceListByPersonIdAPI } from '@/api/company-manage/performance-manage'
-import { addEpcTemplateAPI, getEpcTemplateByIdAPI, editEpcTemplateAPI } from '@/api/data-create/epc-template'
+import {
+ getSubPerformanceManageListAPI,
+ getSubPerformanceManageListByPersonIdAPI,
+} from '@/api/sub-manage/sub-performance-manage'
+import {
+ getCompanyPerformanceListAPI,
+ getCompanyPerformanceListByPersonIdAPI,
+} from '@/api/company-manage/performance-manage'
+
+import { addGwTemplateAPI, getGwTemplateByIdAPI, editGwTemplateAPI } from '@/api/data-create/gw-template'
export default {
components: {
@@ -550,19 +789,29 @@ export default {
selectedOtherPerson: null, // 其他人员列表选中项
/**
- * 分包人员需要的数据源-----------------------------------------------------------------------------------------------------------------------------------------------------------------
+ * 分包商模块需要的数据源---------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
- subcontractorPersonList: [], // 分包人员列表
- subcontractorPersonCurrentIndex: 0, // 分包人员当前操作行的索引
- //分包人员列表查询条件
- subcontractorPersonQueryParams: {
- userName: '',
+ subcontractorList: [], // 分包商列表
+ selectSubcontractorData: [], // 穿梭框内分包商已选列表
+ waitSubcontractorSelectData: [], // 穿梭框内分包商待选列表
+ subcontractorPerformanceCurrentIndex: 0, // 分包商业绩当前操作的index
+ // 分包商业绩查询条件
+ personPerformanceForm: {
+ proName: '', //项目名称
+ startTime: '',
+ endTime: '',
pageNum: 1,
- pageSize: 10,
+ pageSize: 10000,
+ timeValue: [],
+ personId: '',
+ age: '3',
+ subId: '',
},
- subPersonList: [], //分包人员列表
- subcontractorPersonTotal: 0, //分包人员列表总条数
- selectedSubcontractorPerson: null, //分包人员列表选中项
+ selectSubcontractorPerformanceData: [], // 分包商业绩已选列表 ---- 内层穿梭框选择后只有ID数据源
+ waitSubcontractorPerformanceData: [], // 分包商业绩待选列表 ---- 内层穿梭框显示的
+ subcontractorPersonCurrentIndex: 0, // 分包商索引
+ subcontractorPersonSelectIndex: 0, // 分包商人员当前操作的index
+ subcontractorPersonSelectList: [], // 分包商人员下拉数据
}
},
methods: {
@@ -580,122 +829,173 @@ export default {
// 组装参数
const params = {
...this.addAndEditForm,
-
+ comPerfList: [], // 公司业绩列表
comCoreList: [], // 关键人员列表
comOtherList: [], // 其他人员列表
- subPersonList: [], // 分包人员列表
+ subList: [], // 分包商列表,
+ type: 2, // type 1. 国网 2. EPC 3. 南网
}
let isError = false
// 添加校验 ---- 公司关键人员
if (this.companyKeyPersonList.length > 0) {
- try {
- this.companyKeyPersonList.forEach((item, index) => {
- if (!item.userId) {
- this.$modal.msgError(`公司关键人员第${index + 1}行未选择人员`)
- // 并使其获得焦点
- isError = true
- throw new Error()
- }
+ this.companyKeyPersonList.forEach((item, index) => {
+ if (!item.userId) {
+ this.$modal.msgError(`公司关键人员第${index + 1}行未选择人员`)
+ // 并使其获得焦点
+ isError = true
+ return false
+ }
- if (!item.postName) {
- this.$modal.msgError(`公司关键人员第${index + 1}行未填写在本施工队伍中的职责分工`)
- const inputRef = this.$refs[`comKeyPostName_${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
- throw new Error()
- }
- })
- } catch (error) {
- return false
- }
+ if (!item.postName) {
+ // this.$modal.msgError(`公司关键人员第${index + 1}行未填写在本施工队伍中的职责分工`)
+ // this.$refs[`comKeyPostName_${index}`].focus()
+ this.$modal.msgError(`公司关键人员第${index + 1}行未填写在本施工队伍中的职责分工`)
+ const inputRef = this.$refs[`comKeyPostName_${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
+ return false
+ }
+
+ if (!item.einDate && item.exitDate) {
+ // this.$modal.msgError(`公司关键人员第${index + 1}行未填写计划入场时间`)
+ // this.$refs[`comKeyEinDate_${index}`].focus()
+ this.$modal.msgError(`公司关键人员第${index + 1}行未填写计划入场时间`)
+ const inputRef = this.$refs[`comKeyEinDate_${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
+ return false
+ }
+
+ if (!item.exitDate && item.einDate) {
+ // this.$modal.msgError(`公司关键人员第${index + 1}行未填写计划退场时间`)
+ // this.$refs[`comKeyExitDate_${index}`].focus()
+ this.$modal.msgError(`公司关键人员第${index + 1}行未填写计划退场时间`)
+ const inputRef = this.$refs[`comKeyExitDate_${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
+ return false
+ }
+ })
}
// 添加校验 ---- 公司其他人员
if (this.companyOtherPersonList.length > 0) {
- try {
- this.companyOtherPersonList.forEach((item, index) => {
- if (!item.userId) {
- this.$modal.msgError(`公司其他人员第${index + 1}行未选择人员`)
- isError = true
- throw new Error()
- }
+ this.companyOtherPersonList.forEach((item, index) => {
+ if (!item.userId) {
+ this.$modal.msgError(`公司其他人员第${index + 1}行未选择人员`)
+ isError = true
+ return false
+ }
- if (!item.postName) {
- this.$modal.msgError(`公司其他人员第${index + 1}行未填写在本次标书中的职务`)
- const inputRef = this.$refs[`comOtherPostName_${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
- throw new Error()
- }
- })
- } catch (error) {
- return false
- }
+ if (!item.postName) {
+ this.$modal.msgError(`公司其他人员第${index + 1}行未填写在本次标书中的职务`)
+ const inputRef = this.$refs[`comOtherPostName_${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
+ return false
+ }
+ })
}
- // 添加校验 ---- 分包人员
- if (this.subcontractorPersonList.length > 0) {
- try {
- this.subcontractorPersonList.forEach((item, index) => {
- if (!item.userId) {
- this.$modal.msgError(`分包人员第${index + 1}行未选择人员`)
- isError = true
- throw new Error()
- }
- if (!item.postName) {
- this.$modal.msgError(`分包人员第${index + 1}行未填写在本次标书中的职务`)
- const inputRef = this.$refs[`subcontractorPostName_${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
- throw new Error()
+ // 添加校验 ---- 分包商
+ if (this.subcontractorList.length > 0) {
+ try {
+ this.subcontractorList.forEach((item, index) => {
+ if (item.subcontractorPersonList.length > 0) {
+ item.subcontractorPersonList.forEach((subcontractorPersonItem, subIndex) => {
+ if (!subcontractorPersonItem.userId) {
+ this.$modal.msgError(
+ `" ${item.subName} "中拟派人员第${subIndex + 1}行未选择人员`,
+ )
+ isError = true
+ throw new Error()
+ }
+
+ if (!subcontractorPersonItem.postName) {
+ this.$modal.msgError(
+ `" ${item.subName} "中拟派人员第${
+ subIndex + 1
+ }行未填写在本次施工队伍中的职责分工`,
+ )
+
+ this.$nextTick(() => {
+ const inputRef =
+ this.$refs[`comSubcontractorPostName_${index}_${subIndex}`][0]
+ 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
+ throw new Error()
+ }
+ })
}
})
} catch (error) {
- return false
+ isError = true
}
}
if (isError) return false
- // 1. 组装关键人员列表
+ // 1. 组装公司业绩列表
+ if (this.companyPerformanceList.length > 0) {
+ this.companyPerformanceList.forEach((item) => {
+ params.comPerfList.push({
+ id: item.perfId,
+ })
+ })
+ }
+
+ // 2. 组装关键人员列表
if (this.companyKeyPersonList.length > 0) {
this.companyKeyPersonList.forEach((item) => {
params.comCoreList.push({
id: item.userId,
postName: item.postName,
proPerf: item.proPerf,
+ einDate: item.einDate || null,
+ exitDate: item.exitDate || null,
perfId: item.perfId,
})
})
}
- // 2. 组装其他人员列表
+ // 3. 组装其他人员列表
if (this.companyOtherPersonList.length > 0) {
this.companyOtherPersonList.forEach((item) => {
params.comOtherList.push({
@@ -704,19 +1004,37 @@ export default {
})
})
}
- // 3. 组装分包人员列表
- if (this.subcontractorPersonList.length > 0) {
- this.subcontractorPersonList.forEach((item) => {
- params.subPersonList.push({
- id: item.userId,
- postName: item.postName,
+
+ // 4. 组装分包商列表
+ if (this.subcontractorList.length > 0) {
+ this.subcontractorList.forEach((item, index) => {
+ params.subList.push({
+ id: item.id,
+ subPerfList: [], // 分包商业绩列表
+ subPersonList: [], // 分包商人员列表
})
+
+ if (item.companyPerformanceList && item.companyPerformanceList.length > 0) {
+ item.companyPerformanceList.forEach((companyPerformanceItem) => {
+ params.subList[index].subPerfList.push({
+ id: companyPerformanceItem.perfId,
+ subId: companyPerformanceItem.subId,
+ })
+ })
+ }
+ if (item.subcontractorPersonList && item.subcontractorPersonList.length > 0) {
+ item.subcontractorPersonList.forEach((subcontractorPersonItem) => {
+ params.subList[index].subPersonList.push({
+ id: subcontractorPersonItem.userId,
+ postName: subcontractorPersonItem.postName,
+ proPerf: subcontractorPersonItem.proPerf,
+ })
+ })
+ }
})
}
- console.log(params)
-
- const API = this.formType === 1 ? addEpcTemplateAPI : editEpcTemplateAPI
+ const API = this.formType === 1 ? addGwTemplateAPI : editGwTemplateAPI
if (this.formType === 3) {
params.id = this.queryId
}
@@ -735,10 +1053,14 @@ export default {
// 公共查询 ---- 公司业绩选择 和 关键人员选择 的查询
async searchPersonPerformance() {
- if (this.companyPerformanceQueryParams.personId) {
- this.getCompanyPerformanceListByPersonIdData()
+ if (this.dialogConfig.outerTitle === '公司业绩选择') {
+ this.getCompanyPerformanceData()
} else {
- this.$modal.msgError('请选择人员')
+ if (this.companyPerformanceQueryParams.personId) {
+ this.getCompanyPerformanceListByPersonIdData()
+ } else {
+ this.$modal.msgError('请选择人员')
+ }
}
},
// 关闭弹窗
@@ -776,7 +1098,7 @@ export default {
.map((item) => item.proName)
.join(',')
this.companyKeyPersonList[this.keyTableCurrentIndex].perfId = keyPersonPerformanceInnerSelectList
- .map((item) => item.perfId)
+ .map((item) => item.id)
.join(',')
} else {
this.$modal.msgError('请选择人员')
@@ -802,28 +1124,137 @@ export default {
})
}
}
- if (this.dialogConfig.outerTitle === '分包人员选择') {
- if (!this.selectedSubcontractorPerson) {
- this.$modal.msgError('请选择分包人员')
- return false
+
+ if (this.dialogConfig.outerTitle === '分包商选择') {
+ if (this.subcontractorList.length < 1) {
+ this.subcontractorList = this.waitSubcontractorSelectData.filter((item) =>
+ this.selectSubcontractorData.includes(item.id),
+ )
} else {
- // 选取需要的数据
- const { id, userName, title, diploma, diplomaNum, major, level } = this.selectedSubcontractorPerson
- Object.assign(this.subcontractorPersonList[this.subcontractorPersonCurrentIndex], {
- userId: id,
- userName,
- title,
- diploma,
- diplomaNum,
- major,
- level,
- })
+ const newSubcontractorList = this.waitSubcontractorSelectData.filter(
+ (item) =>
+ this.selectSubcontractorData.includes(item.id) &&
+ !this.subcontractorList.some((subItem) => subItem.id == item.id),
+ )
+
+ this.subcontractorList.push(...newSubcontractorList)
}
+
+ this.subcontractorList.forEach((item) => {
+ if (!item.companyPerformanceList) {
+ this.$set(item, 'companyPerformanceList', [])
+ }
+
+ if (!item.subcontractorPersonList) {
+ this.$set(item, 'subcontractorPersonList', [])
+ }
+ // if (!item.companyPerformanceList) {
+ // // this.$set(item, 'companyPerformanceList', [])
+ // item.companyPerformanceList = []
+ // }
+
+ // if (!item.subcontractorPersonList) {
+ // // this.$set(item, 'subcontractorPersonList', [])
+ // item.subcontractorPersonList = []
+ // }
+ })
+ }
+
+ if (this.dialogConfig.outerTitle === '分包商业绩选择') {
+ const subcontractorPerformanceInnerList = this.waitSubcontractorPerformanceData.filter((item) =>
+ this.selectSubcontractorPerformanceData.includes(item.perfId),
+ )
+
+ this.subcontractorList[this.subcontractorPerformanceCurrentIndex].companyPerformanceList = JSON.parse(
+ JSON.stringify(subcontractorPerformanceInnerList),
+ )
+ }
+
+ // 添加近年同类工程业绩
+ if (this.dialogConfig.outerTitle === '分包人员选择') {
+ if (this.personPerformanceForm.personId) {
+ const rowInfo = this.subcontractorPersonSelectList.find(
+ (item) => item.id == this.personPerformanceForm.personId,
+ )
+ const index = this.subcontractorPersonCurrentIndex
+ const personIndex = this.subcontractorPersonSelectIndex
+ this.subcontractorList[index].subcontractorPersonList[personIndex].userId = rowInfo.id
+ this.subcontractorList[index].subcontractorPersonList[personIndex].userName = rowInfo.userName
+ this.subcontractorList[index].subcontractorPersonList[personIndex].title = rowInfo.title
+ this.subcontractorList[index].subcontractorPersonList[personIndex].diploma = rowInfo.diploma
+ this.subcontractorList[index].subcontractorPersonList[personIndex].idCard = rowInfo.idCard
+ } else {
+ this.$modal.msgError('请选择人员')
+ return false
+ }
+ const subcontractorPerformanceInnerList = this.waitSubcontractorPerformanceData.filter((item) =>
+ this.selectSubcontractorPerformanceData.includes(item.perfId),
+ )
+
+ this.subcontractorList[this.subcontractorPerformanceCurrentIndex].subcontractorPersonList[
+ this.subcontractorPersonSelectIndex
+ ].proPerf = subcontractorPerformanceInnerList.map((item) => item.proName).join(',')
}
this.dialogConfig.outerVisible = false
},
+ /**
+ * 公司业绩模块方法逻辑----------------------------------------------------------------------------------------------------------------------------------------------------------------
+ */
+
+ // 添加公司业绩
+ async addCompanyPerformance() {
+ this.dialogConfig.outerTitle = '公司业绩选择'
+ this.initQueryForm()
+ this.getCompanyPerformanceData()
+ // 获取已选择过的数据 赋值给穿梭框 作回显
+ },
+ // 获取公司业绩
+ async getCompanyPerformanceData() {
+ const { age, proName, voltage, pageNum, pageSize, timeValue } = this.companyPerformanceQueryParams
+
+ const queryParams = {
+ proName,
+ voltage,
+ pageNum,
+ pageSize,
+ startTime: '',
+ endTime: '',
+ }
+
+ if (age == 3) {
+ queryParams.startTime = moment().subtract(3, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+ if (age == 5) {
+ queryParams.startTime = moment().subtract(5, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+
+ if (timeValue && timeValue.length > 0) {
+ queryParams.startTime = timeValue[0]
+ queryParams.endTime = timeValue[1]
+ }
+ const res = await getCompanyPerformanceListAPI(queryParams)
+
+ this.waitSelectData = res.rows.map((item) => ({
+ ...item,
+ disabled: false,
+ perfId: item.id,
+ }))
+
+ if (this.companyPerformanceList.length > 0) {
+ this.selectData = this.companyPerformanceList.map((item) => item.perfId)
+ } else {
+ // this.selectData = []
+ }
+ this.dialogConfig.outerVisible = true
+ },
+ // 删除公司业绩
+ async deleteCompanyPerformance(index) {
+ this.companyPerformanceList.splice(index, 1)
+ },
/**
* 添加公司关键人员模块方法逻辑----------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
@@ -832,6 +1263,7 @@ export default {
async addCompanyKeyPerson() {
this.companyKeyPersonList.push({
userId: '', // 人员id
+ perfId: '', // 人员业绩id
userName: '', // 人员名称
title: '', // 人员职称
diploma: '', // 执业资格证书
@@ -914,6 +1346,7 @@ export default {
this.selectData = []
return false
} else {
+ // 查询人员信息
this.getCompanyPerformanceListByPersonIdData()
}
},
@@ -957,7 +1390,6 @@ export default {
async addCompanyOtherPerson() {
this.companyOtherPersonList.push({
userId: '', // 人员id
- perfId: '', // 人员业绩id
userName: '', // 人员名称
postName: '', // 本次标书中的职务职责分工
title: '', // 职称
@@ -1010,81 +1442,248 @@ export default {
},
/**
- * 添加分包人员模块方法逻辑----------------------------------------------------------------------------------------------------------------------------------------------------------------
+ * 添加分包商模块方法逻辑----------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
- // 添加分包人员
- async addSubcontractorPerson() {
- this.subcontractorPersonList.push({
- userId: '', // 人员id
- userName: '', // 人员名称
- postName: '', // 本次标书中的职务职责分工
- title: '', // 职称
- diploma: '', // 证书名称
- diplomaNum: '', // 证书编号
- major: '', // 专业
- level: '', // 级别
- })
- },
- // 选择分包人员
- async selectSubcontractorPerson(index) {
- this.subcontractorPersonCurrentIndex = index
- this.dialogConfig.outerTitle = '分包人员选择'
- this.otherPersonQueryParams.pageNum = 1
- this.otherPersonQueryParams.pageSize = 10
- this.otherPersonQueryParams.userName = ''
- this.searchSubcontractorPerson()
+ // 添加分包商
+ async addSubcontractor() {
+ this.dialogConfig.outerTitle = '分包商选择'
+ this.getSubcontractorList()
this.dialogConfig.outerVisible = true
},
- // 查询分包人员
- async searchSubcontractorPerson() {
- const res = await getSubPersonManageListAPI(this.subcontractorPersonQueryParams)
- this.subPersonList = res.rows
- this.otherPersonTotal = res.total
- this.selectedOtherPerson = null
- // 根据已选的人员 将已选人员的数据增加一个标识 让表格复选框禁用
- if (this.subcontractorPersonList.length > 0) {
- this.subPersonList.forEach((item) => {
- if (this.subcontractorPersonList.some((subcontractorItem) => subcontractorItem.userId == item.id)) {
- item.disabled = true
- } else {
- item.disabled = false
- }
- })
+ // 获取分包商列表
+ async getSubcontractorList() {
+ const res = await getSubManageListAPI({ pageNum: 1, pageSize: 10000 })
+ this.waitSubcontractorSelectData = res.rows
+
+ if (this.subcontractorList.length > 0) {
+ this.selectSubcontractorData = this.subcontractorList.map((item) => item.id)
+ } else {
+ this.selectSubcontractorData = []
}
},
- // 分包人员列表复选框
- async onSubcontractorSelectionChange(selection) {
- if (selection.length > 1) {
- const lastSelected = selection[selection.length - 1]
- this.$refs.singleTable.clearSelection() // 清空所有选中
- this.$refs.singleTable.toggleRowSelection(lastSelected, true) // 重新选中最后一个
- }
- this.selectedSubcontractorPerson = selection[0] || null // 存储当前选中项
+
+ // 添加分包商业绩
+ async addSubcontractorPerformance(index, subId) {
+ this.initSubcontractorPerformanceQueryParams()
+ this.subcontractorPerformanceCurrentIndex = index
+ this.subcontractorPersonCurrentIndex = index
+ this.personPerformanceForm.subId = subId
+ this.dialogConfig.outerTitle = '分包商业绩选择'
+ this.getSubcontractorPerformanceData()
+ this.dialogConfig.outerVisible = true
},
- // 删除分包人员
- async deleteSubcontractorPerson(index) {
- this.subcontractorPersonList.splice(index, 1)
+ // 删除分包商
+ async deleteSubcontractor(index) {
+ this.subcontractorList.splice(index, 1)
+ },
+ // 获取分包商业绩数据
+ async getSubcontractorPerformanceData() {
+ const { age, proName, voltage, pageNum, pageSize, timeValue, subId } = this.personPerformanceForm
+ const queryParams = {
+ proName,
+ voltage,
+ pageNum,
+ pageSize,
+ startTime: '',
+ endTime: '',
+ subId,
+ }
+
+ if (age == 3) {
+ queryParams.startTime = moment().subtract(3, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+ if (age == 5) {
+ queryParams.startTime = moment().subtract(5, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+
+ if (timeValue && timeValue.length > 0) {
+ queryParams.startTime = timeValue[0]
+ queryParams.endTime = timeValue[1]
+ }
+ const res = await getSubPerformanceManageListAPI(queryParams)
+
+ if (res.rows.length > 0) {
+ this.waitSubcontractorPerformanceData = res.rows.map((item) => ({
+ ...item,
+ disabled: false,
+ perfId: item.id,
+ }))
+
+ const index = this.subcontractorPerformanceCurrentIndex
+ const companyPerformanceList = this.subcontractorList[index].companyPerformanceList
+
+ if (companyPerformanceList.length > 0) {
+ this.selectSubcontractorPerformanceData = companyPerformanceList.map((item) => item.perfId)
+ }
+ } else {
+ this.waitSubcontractorPerformanceData = []
+ }
+ },
+ // 初始化分包商业绩查询条件
+ async initSubcontractorPerformanceQueryParams() {
+ this.personPerformanceForm = {
+ age: '3',
+ proName: '',
+ voltage: '',
+ pageNum: 1,
+ pageSize: 10000,
+ timeValue: [],
+ personId: '',
+ subId: '',
+ }
+ },
+ // 查询分包商业绩
+ async searchSubcontractorPerformanceData() {
+ if (this.dialogConfig.outerTitle === '分包商业绩选择') {
+ this.getSubcontractorPerformanceData()
+ } else {
+ if (this.personPerformanceForm.personId) {
+ this.getSubcontractorPerformanceDataByPersonId()
+ } else {
+ this.$modal.msgError('请选择人员')
+ return false
+ }
+ }
},
- // 根据id获取EPC模板详情
- async getEpcTemplateById(id) {
- const res = await getEpcTemplateByIdAPI({ id })
+ // 删除分包商业绩
+ async deleteSubcontractorPerformance(index, performanceIndex, id) {
+ this.subcontractorList[index].companyPerformanceList.splice(performanceIndex, 1)
+
+ this.selectSubcontractorPerformanceData = this.selectSubcontractorPerformanceData.filter(
+ (item) => item != id,
+ )
+ },
+
+ // 添加分包商人员
+ async addSubcontractorPerson(index, subId) {
+ this.initSubcontractorPerformanceQueryParams()
+ this.personPerformanceForm.subId = subId
+ this.subcontractorPerformanceCurrentIndex = index
+ this.subcontractorPersonCurrentIndex = index
+ this.subcontractorList[index].subcontractorPersonList.push({
+ userId: '',
+ userName: '',
+ title: '',
+ diploma: '',
+ idCard: '',
+ postName: '',
+ proPerf: '',
+ })
+ },
+
+ // 选择分包商人员
+ async selectSubcontractorPerson(index, personIndex) {
+ this.dialogConfig.outerTitle = '分包人员选择'
+ this.personPerformanceForm.personId = ''
+ this.dialogConfig.outerVisible = true
+ this.getSubcontractorPersonSelectList()
+ this.waitSubcontractorPerformanceData = []
+ this.selectSubcontractorPerformanceData = []
+ this.subcontractorPersonCurrentIndex = index
+ this.subcontractorPersonSelectIndex = personIndex
+ },
+ // 获取分包商人员下拉列表
+ async getSubcontractorPersonSelectList() {
+ const res = await getSubKeyPersonListAPI({ subId: this.personPerformanceForm.subId })
+ this.subcontractorPersonSelectList = res.rows
+ },
+ // 删除分包商人员
+ async deleteSubcontractorPerson(index, personIndex) {
+ this.subcontractorList[index].subcontractorPersonList.splice(personIndex, 1)
+ },
+ // 分包人员下拉选的change事件
+ async onChangeSubcontractorPerson(value) {
+ if (
+ this.subcontractorList[this.subcontractorPersonCurrentIndex].subcontractorPersonList.length > 0 &&
+ this.subcontractorList[this.subcontractorPersonCurrentIndex].subcontractorPersonList.some(
+ (item) => item.userId == value,
+ )
+ ) {
+ this.$modal.msgError('当前人员已选择,不可重复添加')
+ this.personPerformanceForm.personId = ''
+ this.waitSubcontractorPerformanceData = []
+ this.selectSubcontractorPerformanceData = []
+ return false
+ } else {
+ this.getSubcontractorPerformanceDataByPersonId()
+ }
+ },
+
+ // 根据人员id获取分包商业绩数据
+ async getSubcontractorPerformanceDataByPersonId() {
+ const { age, proName, voltage, pageNum, pageSize, timeValue, subId, personId } = this.personPerformanceForm
+ const queryParams = {
+ proName,
+ voltage,
+ pageNum,
+ pageSize,
+ startTime: '',
+ endTime: '',
+ subId,
+ personId,
+ }
+
+ if (age == 3) {
+ queryParams.startTime = moment().subtract(3, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+ if (age == 5) {
+ queryParams.startTime = moment().subtract(5, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+
+ if (timeValue && timeValue.length > 0) {
+ queryParams.startTime = timeValue[0]
+ queryParams.endTime = timeValue[1]
+ }
+ const res = await getSubPerformanceManageListByPersonIdAPI(queryParams)
+
+ if (res.length > 0) {
+ this.waitSubcontractorPerformanceData = res.map((item) => ({
+ ...item,
+ disabled: false,
+ perfId: item.id,
+ }))
+ } else {
+ this.waitSubcontractorPerformanceData = []
+ }
+ },
+
+ // 根据id获取国网模板详情
+ async getGwTemplateById(id) {
+ const res = await getGwTemplateByIdAPI({ id })
if (res.code === 200) {
- const { name, comCoreList, comOtherList, subPersonList } = res.data
+ const { name, comCoreList, comOtherList, comPerfList, subList } = res.data
this.addAndEditForm.name = name
// 根据详情回显数据
-
- // 1. 回显公司关键人员数据
+ // 1. 回显公司业绩数据
+ this.companyPerformanceList = comPerfList
+ // 2. 回显公司关键人员数据
this.companyKeyPersonList = comCoreList
- // 2. 回显公司其他人员数据
+ // 3. 回显公司其他人员数据
this.companyOtherPersonList = comOtherList
- // 3. 回显分包人员数据
- this.subcontractorPersonList = subPersonList
+ // 4. 回显分包商数据
+ if (subList.length > 0) {
+ subList.forEach((item) => {
+ this.subcontractorList.push(
+ JSON.parse(
+ JSON.stringify({
+ ...item,
+ companyPerformanceList: item.subPerfList,
+ subcontractorPersonList: item.subPersonList,
+ }),
+ ),
+ )
+ })
+ }
} else {
- this.$modal.msgError('详情获取失败' + res.message)
this.$modal.closeDialogOuter()
+ this.$modal.msgError('详情获取失败' + res.message)
}
},
},
@@ -1093,7 +1692,7 @@ export default {
queryId: {
handler(newVal) {
if (newVal && newVal != '') {
- this.getEpcTemplateById(newVal)
+ this.getGwTemplateById(newVal)
}
},
immediate: true,
diff --git a/src/views/data-create/epc-template/index.vue b/src/views/data-create/epc-template/index.vue
index 696d4d4..90a55cb 100644
--- a/src/views/data-create/epc-template/index.vue
+++ b/src/views/data-create/epc-template/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -25,9 +25,9 @@
- 查询
+ 查询
重置
-
+
新增
@@ -58,32 +58,32 @@
详情
下载
编辑
删除
@@ -95,7 +95,7 @@
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
- @pagination="getEpcTemplateList"
+ @pagination="getGwTemplateList"
/>
@@ -108,7 +108,7 @@
diff --git a/src/views/data-create/gw-template/components/addAndEditForm.vue b/src/views/data-create/gw-template/components/addAndEditForm.vue
index 8183806..15c7ee1 100644
--- a/src/views/data-create/gw-template/components/addAndEditForm.vue
+++ b/src/views/data-create/gw-template/components/addAndEditForm.vue
@@ -832,7 +832,8 @@ export default {
comPerfList: [], // 公司业绩列表
comCoreList: [], // 关键人员列表
comOtherList: [], // 其他人员列表
- subList: [], // 分包商列表
+ subList: [], // 分包商列表,
+ type: 1, // type 1. 国网 2. EPC 3. 南网
}
let isError = false
diff --git a/src/views/data-create/gw-template/index.vue b/src/views/data-create/gw-template/index.vue
index 0015312..6a196a8 100644
--- a/src/views/data-create/gw-template/index.vue
+++ b/src/views/data-create/gw-template/index.vue
@@ -132,6 +132,7 @@ export default {
endDate: '',
pageNum: 1,
pageSize: 10,
+ type: 1,
},
timeValue: [],
tableList: [],
@@ -185,13 +186,25 @@ export default {
// const res = await downloadGwTemplateByIdAPI({ id: row.id })
// console.log(res, '下载结果')
- this.downloadNew(
- '/stateGrid/downloadStateGridTemp',
- {
- id: row.id,
- },
- `国网模板_${row.name}.doc`,
- )
+ this.$confirm('请选择下载的模板类型?', '温馨提示', {
+ distinguishCancelAndClose: true,
+ confirmButtonText: '表格下载',
+ cancelButtonText: '普通下载',
+ })
+ .then(() => {
+ // 表格下载
+
+ this.downloadNew(
+ '/stateGrid/downloadStateGridTemp',
+ {
+ id: row.id,
+ },
+ `国网模板_${row.name}.doc`,
+ )
+ })
+ .catch((action) => {
+ // 普通下载
+ })
},
// 获取国网模板列表列表
diff --git a/src/views/data-create/nw-template-old/components/addAndEditForm.vue b/src/views/data-create/nw-template-old/components/addAndEditForm.vue
new file mode 100644
index 0000000..1d66148
--- /dev/null
+++ b/src/views/data-create/nw-template-old/components/addAndEditForm.vue
@@ -0,0 +1,1194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+ {{ scope.row.userName }}
+
+
+
+
+
+
+
+ {{ row.diploma }}
+
+
+
+ {{ row.idCard }}
+
+
+
+
+
+
+
+ {{ scope.row.postName }}
+
+
+
+
+
+ {{ row.proPerf }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.postName }}
+
+
+
+
+
+
+ 选择
+
+
+ {{ scope.row.userName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.postName }}
+
+
+
+
+
+
+ 选择
+
+
+ {{ scope.row.userName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formType !== 2 ? '取消' : '关闭' }}
+ 确定
+
+
+
+
+
+
+
+ 拟派人员
+
+
+
+
+
+
+
+ 人员业绩选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+ {{ option.proName }}
+
+
+ {{ option.voltage }}
+
+ {{ option.startTime }} 至{{ option.endTime }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data-create/nw-template-old/index.vue b/src/views/data-create/nw-template-old/index.vue
new file mode 100644
index 0000000..36ba918
--- /dev/null
+++ b/src/views/data-create/nw-template-old/index.vue
@@ -0,0 +1,219 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 详情
+
+
+ 下载
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data-create/nw-template/components/addAndEditForm.vue b/src/views/data-create/nw-template/components/addAndEditForm.vue
index 1d66148..da08357 100644
--- a/src/views/data-create/nw-template/components/addAndEditForm.vue
+++ b/src/views/data-create/nw-template/components/addAndEditForm.vue
@@ -24,12 +24,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
公司关键人员
+
添加
@@ -82,6 +123,42 @@
+
+
+
+
+ {{ scope.row.einDate }}
+
+
+
+
+
+
+
+ {{ scope.row.exitDate }}
+
+
+
{{ row.proPerf }}
@@ -116,7 +193,7 @@
-
+
-
+
-
-
-
-
-
-
- {{ scope.row.postName }}
+
+
+
+
+ {{ item.subName }}
-
-
-
-
-
- 选择
-
-
- {{ scope.row.userName }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.startTime }} 至{{ row.endTime }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+ {{ scope.row.userName }}
+
+
+
+
+
+
+
+ {{ row.diploma }}
+
+
+
+ {{ row.idCard }}
+
+
+
+
+
+
+
+ {{ scope.row.postName }}
+
+
+
+
+
+ {{ row.proPerf }}
+
+
+
+
+
+
+
+
+
+
@@ -235,12 +400,14 @@
确定
-
+
-
-
- 拟派人员
+
+
+ 拟派人员
- 人员业绩选择
+ 人员业绩选择
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 拟派人员
+
+
+
+
+
+
+
+ 人员业绩选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
查询
@@ -420,34 +656,28 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ option.proName }}
+
+
+ {{ option.voltage }}
+
+ {{ option.startTime }} 至{{ option.endTime }}
+
+
+
@@ -463,11 +693,20 @@
import moment from 'moment'
import UploadImg from '@/components/UploadImg'
import DialogModel from '@/components/DialogModel/index'
-import { getKeyPersonListAPI } from '@/api/common'
+import { getKeyPersonListAPI, getSubKeyPersonListAPI } from '@/api/common'
+import { getSubManageListAPI } from '@/api/sub-manage/sub-manage'
import { getOtherPersonListAPI } from '@/api/company-manage/other-person'
import { getSubPersonManageListAPI } from '@/api/sub-manage/sub-person-manage'
-import { getCompanyPerformanceListByPersonIdAPI } from '@/api/company-manage/performance-manage'
-import { addNwTemplateAPI, getNwTemplateByIdAPI, editNwTemplateAPI } from '@/api/data-create/nw-template'
+import {
+ getSubPerformanceManageListAPI,
+ getSubPerformanceManageListByPersonIdAPI,
+} from '@/api/sub-manage/sub-performance-manage'
+import {
+ getCompanyPerformanceListAPI,
+ getCompanyPerformanceListByPersonIdAPI,
+} from '@/api/company-manage/performance-manage'
+
+import { addGwTemplateAPI, getGwTemplateByIdAPI, editGwTemplateAPI } from '@/api/data-create/gw-template'
export default {
components: {
@@ -550,19 +789,29 @@ export default {
selectedOtherPerson: null, // 其他人员列表选中项
/**
- * 分包人员需要的数据源-----------------------------------------------------------------------------------------------------------------------------------------------------------------
+ * 分包商模块需要的数据源---------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
- subcontractorPersonList: [], // 分包人员列表
- subcontractorPersonCurrentIndex: 0, // 分包人员当前操作行的索引
- //分包人员列表查询条件
- subcontractorPersonQueryParams: {
- userName: '',
+ subcontractorList: [], // 分包商列表
+ selectSubcontractorData: [], // 穿梭框内分包商已选列表
+ waitSubcontractorSelectData: [], // 穿梭框内分包商待选列表
+ subcontractorPerformanceCurrentIndex: 0, // 分包商业绩当前操作的index
+ // 分包商业绩查询条件
+ personPerformanceForm: {
+ proName: '', //项目名称
+ startTime: '',
+ endTime: '',
pageNum: 1,
- pageSize: 10,
+ pageSize: 10000,
+ timeValue: [],
+ personId: '',
+ age: '3',
+ subId: '',
},
- subPersonList: [], //分包人员列表
- subcontractorPersonTotal: 0, //分包人员列表总条数
- selectedSubcontractorPerson: null, //分包人员列表选中项
+ selectSubcontractorPerformanceData: [], // 分包商业绩已选列表 ---- 内层穿梭框选择后只有ID数据源
+ waitSubcontractorPerformanceData: [], // 分包商业绩待选列表 ---- 内层穿梭框显示的
+ subcontractorPersonCurrentIndex: 0, // 分包商索引
+ subcontractorPersonSelectIndex: 0, // 分包商人员当前操作的index
+ subcontractorPersonSelectList: [], // 分包商人员下拉数据
}
},
methods: {
@@ -580,122 +829,173 @@ export default {
// 组装参数
const params = {
...this.addAndEditForm,
-
+ comPerfList: [], // 公司业绩列表
comCoreList: [], // 关键人员列表
comOtherList: [], // 其他人员列表
- subPersonList: [], // 分包人员列表
+ subList: [], // 分包商列表,
+ type: 3, // type 1. 国网 2. EPC 3. 南网
}
let isError = false
// 添加校验 ---- 公司关键人员
if (this.companyKeyPersonList.length > 0) {
- try {
- this.companyKeyPersonList.forEach((item, index) => {
- if (!item.userId) {
- this.$modal.msgError(`公司关键人员第${index + 1}行未选择人员`)
- // 并使其获得焦点
- isError = true
- throw new Error()
- }
+ this.companyKeyPersonList.forEach((item, index) => {
+ if (!item.userId) {
+ this.$modal.msgError(`公司关键人员第${index + 1}行未选择人员`)
+ // 并使其获得焦点
+ isError = true
+ return false
+ }
- if (!item.postName) {
- this.$modal.msgError(`公司关键人员第${index + 1}行未填写在本施工队伍中的职责分工`)
- const inputRef = this.$refs[`comKeyPostName_${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
- throw new Error()
- }
- })
- } catch (error) {
- return false
- }
+ if (!item.postName) {
+ // this.$modal.msgError(`公司关键人员第${index + 1}行未填写在本施工队伍中的职责分工`)
+ // this.$refs[`comKeyPostName_${index}`].focus()
+ this.$modal.msgError(`公司关键人员第${index + 1}行未填写在本施工队伍中的职责分工`)
+ const inputRef = this.$refs[`comKeyPostName_${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
+ return false
+ }
+
+ if (!item.einDate && item.exitDate) {
+ // this.$modal.msgError(`公司关键人员第${index + 1}行未填写计划入场时间`)
+ // this.$refs[`comKeyEinDate_${index}`].focus()
+ this.$modal.msgError(`公司关键人员第${index + 1}行未填写计划入场时间`)
+ const inputRef = this.$refs[`comKeyEinDate_${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
+ return false
+ }
+
+ if (!item.exitDate && item.einDate) {
+ // this.$modal.msgError(`公司关键人员第${index + 1}行未填写计划退场时间`)
+ // this.$refs[`comKeyExitDate_${index}`].focus()
+ this.$modal.msgError(`公司关键人员第${index + 1}行未填写计划退场时间`)
+ const inputRef = this.$refs[`comKeyExitDate_${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
+ return false
+ }
+ })
}
// 添加校验 ---- 公司其他人员
if (this.companyOtherPersonList.length > 0) {
- try {
- this.companyOtherPersonList.forEach((item, index) => {
- if (!item.userId) {
- this.$modal.msgError(`公司其他人员第${index + 1}行未选择人员`)
- isError = true
- throw new Error()
- }
+ this.companyOtherPersonList.forEach((item, index) => {
+ if (!item.userId) {
+ this.$modal.msgError(`公司其他人员第${index + 1}行未选择人员`)
+ isError = true
+ return false
+ }
- if (!item.postName) {
- this.$modal.msgError(`公司其他人员第${index + 1}行未填写在本次标书中的职务`)
- const inputRef = this.$refs[`comOtherPostName_${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
- throw new Error()
- }
- })
- } catch (error) {
- return false
- }
+ if (!item.postName) {
+ this.$modal.msgError(`公司其他人员第${index + 1}行未填写在本次标书中的职务`)
+ const inputRef = this.$refs[`comOtherPostName_${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
+ return false
+ }
+ })
}
- // 添加校验 ---- 分包人员
- if (this.subcontractorPersonList.length > 0) {
- try {
- this.subcontractorPersonList.forEach((item, index) => {
- if (!item.userId) {
- this.$modal.msgError(`分包人员第${index + 1}行未选择人员`)
- isError = true
- throw new Error()
- }
- if (!item.postName) {
- this.$modal.msgError(`分包人员第${index + 1}行未填写在本次标书中的职务`)
- const inputRef = this.$refs[`subcontractorPostName_${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
- throw new Error()
+ // 添加校验 ---- 分包商
+ if (this.subcontractorList.length > 0) {
+ try {
+ this.subcontractorList.forEach((item, index) => {
+ if (item.subcontractorPersonList.length > 0) {
+ item.subcontractorPersonList.forEach((subcontractorPersonItem, subIndex) => {
+ if (!subcontractorPersonItem.userId) {
+ this.$modal.msgError(
+ `" ${item.subName} "中拟派人员第${subIndex + 1}行未选择人员`,
+ )
+ isError = true
+ throw new Error()
+ }
+
+ if (!subcontractorPersonItem.postName) {
+ this.$modal.msgError(
+ `" ${item.subName} "中拟派人员第${
+ subIndex + 1
+ }行未填写在本次施工队伍中的职责分工`,
+ )
+
+ this.$nextTick(() => {
+ const inputRef =
+ this.$refs[`comSubcontractorPostName_${index}_${subIndex}`][0]
+ 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
+ throw new Error()
+ }
+ })
}
})
} catch (error) {
- return false
+ isError = true
}
}
if (isError) return false
- // 1. 组装关键人员列表
+ // 1. 组装公司业绩列表
+ if (this.companyPerformanceList.length > 0) {
+ this.companyPerformanceList.forEach((item) => {
+ params.comPerfList.push({
+ id: item.perfId,
+ })
+ })
+ }
+
+ // 2. 组装关键人员列表
if (this.companyKeyPersonList.length > 0) {
this.companyKeyPersonList.forEach((item) => {
params.comCoreList.push({
id: item.userId,
postName: item.postName,
proPerf: item.proPerf,
+ einDate: item.einDate || null,
+ exitDate: item.exitDate || null,
perfId: item.perfId,
})
})
}
- // 2. 组装其他人员列表
+ // 3. 组装其他人员列表
if (this.companyOtherPersonList.length > 0) {
this.companyOtherPersonList.forEach((item) => {
params.comOtherList.push({
@@ -704,19 +1004,37 @@ export default {
})
})
}
- // 3. 组装分包人员列表
- if (this.subcontractorPersonList.length > 0) {
- this.subcontractorPersonList.forEach((item) => {
- params.subPersonList.push({
- id: item.userId,
- postName: item.postName,
+
+ // 4. 组装分包商列表
+ if (this.subcontractorList.length > 0) {
+ this.subcontractorList.forEach((item, index) => {
+ params.subList.push({
+ id: item.id,
+ subPerfList: [], // 分包商业绩列表
+ subPersonList: [], // 分包商人员列表
})
+
+ if (item.companyPerformanceList && item.companyPerformanceList.length > 0) {
+ item.companyPerformanceList.forEach((companyPerformanceItem) => {
+ params.subList[index].subPerfList.push({
+ id: companyPerformanceItem.perfId,
+ subId: companyPerformanceItem.subId,
+ })
+ })
+ }
+ if (item.subcontractorPersonList && item.subcontractorPersonList.length > 0) {
+ item.subcontractorPersonList.forEach((subcontractorPersonItem) => {
+ params.subList[index].subPersonList.push({
+ id: subcontractorPersonItem.userId,
+ postName: subcontractorPersonItem.postName,
+ proPerf: subcontractorPersonItem.proPerf,
+ })
+ })
+ }
})
}
- console.log(params)
-
- const API = this.formType === 1 ? addNwTemplateAPI : editNwTemplateAPI
+ const API = this.formType === 1 ? addGwTemplateAPI : editGwTemplateAPI
if (this.formType === 3) {
params.id = this.queryId
}
@@ -735,10 +1053,14 @@ export default {
// 公共查询 ---- 公司业绩选择 和 关键人员选择 的查询
async searchPersonPerformance() {
- if (this.companyPerformanceQueryParams.personId) {
- this.getCompanyPerformanceListByPersonIdData()
+ if (this.dialogConfig.outerTitle === '公司业绩选择') {
+ this.getCompanyPerformanceData()
} else {
- this.$modal.msgError('请选择人员')
+ if (this.companyPerformanceQueryParams.personId) {
+ this.getCompanyPerformanceListByPersonIdData()
+ } else {
+ this.$modal.msgError('请选择人员')
+ }
}
},
// 关闭弹窗
@@ -776,7 +1098,7 @@ export default {
.map((item) => item.proName)
.join(',')
this.companyKeyPersonList[this.keyTableCurrentIndex].perfId = keyPersonPerformanceInnerSelectList
- .map((item) => item.perfId)
+ .map((item) => item.id)
.join(',')
} else {
this.$modal.msgError('请选择人员')
@@ -802,28 +1124,137 @@ export default {
})
}
}
- if (this.dialogConfig.outerTitle === '分包人员选择') {
- if (!this.selectedSubcontractorPerson) {
- this.$modal.msgError('请选择分包人员')
- return false
+
+ if (this.dialogConfig.outerTitle === '分包商选择') {
+ if (this.subcontractorList.length < 1) {
+ this.subcontractorList = this.waitSubcontractorSelectData.filter((item) =>
+ this.selectSubcontractorData.includes(item.id),
+ )
} else {
- // 选取需要的数据
- const { id, userName, title, diploma, diplomaNum, major, level } = this.selectedSubcontractorPerson
- Object.assign(this.subcontractorPersonList[this.subcontractorPersonCurrentIndex], {
- userId: id,
- userName,
- title,
- diploma,
- diplomaNum,
- major,
- level,
- })
+ const newSubcontractorList = this.waitSubcontractorSelectData.filter(
+ (item) =>
+ this.selectSubcontractorData.includes(item.id) &&
+ !this.subcontractorList.some((subItem) => subItem.id == item.id),
+ )
+
+ this.subcontractorList.push(...newSubcontractorList)
}
+
+ this.subcontractorList.forEach((item) => {
+ if (!item.companyPerformanceList) {
+ this.$set(item, 'companyPerformanceList', [])
+ }
+
+ if (!item.subcontractorPersonList) {
+ this.$set(item, 'subcontractorPersonList', [])
+ }
+ // if (!item.companyPerformanceList) {
+ // // this.$set(item, 'companyPerformanceList', [])
+ // item.companyPerformanceList = []
+ // }
+
+ // if (!item.subcontractorPersonList) {
+ // // this.$set(item, 'subcontractorPersonList', [])
+ // item.subcontractorPersonList = []
+ // }
+ })
+ }
+
+ if (this.dialogConfig.outerTitle === '分包商业绩选择') {
+ const subcontractorPerformanceInnerList = this.waitSubcontractorPerformanceData.filter((item) =>
+ this.selectSubcontractorPerformanceData.includes(item.perfId),
+ )
+
+ this.subcontractorList[this.subcontractorPerformanceCurrentIndex].companyPerformanceList = JSON.parse(
+ JSON.stringify(subcontractorPerformanceInnerList),
+ )
+ }
+
+ // 添加近年同类工程业绩
+ if (this.dialogConfig.outerTitle === '分包人员选择') {
+ if (this.personPerformanceForm.personId) {
+ const rowInfo = this.subcontractorPersonSelectList.find(
+ (item) => item.id == this.personPerformanceForm.personId,
+ )
+ const index = this.subcontractorPersonCurrentIndex
+ const personIndex = this.subcontractorPersonSelectIndex
+ this.subcontractorList[index].subcontractorPersonList[personIndex].userId = rowInfo.id
+ this.subcontractorList[index].subcontractorPersonList[personIndex].userName = rowInfo.userName
+ this.subcontractorList[index].subcontractorPersonList[personIndex].title = rowInfo.title
+ this.subcontractorList[index].subcontractorPersonList[personIndex].diploma = rowInfo.diploma
+ this.subcontractorList[index].subcontractorPersonList[personIndex].idCard = rowInfo.idCard
+ } else {
+ this.$modal.msgError('请选择人员')
+ return false
+ }
+ const subcontractorPerformanceInnerList = this.waitSubcontractorPerformanceData.filter((item) =>
+ this.selectSubcontractorPerformanceData.includes(item.perfId),
+ )
+
+ this.subcontractorList[this.subcontractorPerformanceCurrentIndex].subcontractorPersonList[
+ this.subcontractorPersonSelectIndex
+ ].proPerf = subcontractorPerformanceInnerList.map((item) => item.proName).join(',')
}
this.dialogConfig.outerVisible = false
},
+ /**
+ * 公司业绩模块方法逻辑----------------------------------------------------------------------------------------------------------------------------------------------------------------
+ */
+
+ // 添加公司业绩
+ async addCompanyPerformance() {
+ this.dialogConfig.outerTitle = '公司业绩选择'
+ this.initQueryForm()
+ this.getCompanyPerformanceData()
+ // 获取已选择过的数据 赋值给穿梭框 作回显
+ },
+ // 获取公司业绩
+ async getCompanyPerformanceData() {
+ const { age, proName, voltage, pageNum, pageSize, timeValue } = this.companyPerformanceQueryParams
+
+ const queryParams = {
+ proName,
+ voltage,
+ pageNum,
+ pageSize,
+ startTime: '',
+ endTime: '',
+ }
+
+ if (age == 3) {
+ queryParams.startTime = moment().subtract(3, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+ if (age == 5) {
+ queryParams.startTime = moment().subtract(5, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+
+ if (timeValue && timeValue.length > 0) {
+ queryParams.startTime = timeValue[0]
+ queryParams.endTime = timeValue[1]
+ }
+ const res = await getCompanyPerformanceListAPI(queryParams)
+
+ this.waitSelectData = res.rows.map((item) => ({
+ ...item,
+ disabled: false,
+ perfId: item.id,
+ }))
+
+ if (this.companyPerformanceList.length > 0) {
+ this.selectData = this.companyPerformanceList.map((item) => item.perfId)
+ } else {
+ // this.selectData = []
+ }
+ this.dialogConfig.outerVisible = true
+ },
+ // 删除公司业绩
+ async deleteCompanyPerformance(index) {
+ this.companyPerformanceList.splice(index, 1)
+ },
/**
* 添加公司关键人员模块方法逻辑----------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
@@ -915,6 +1346,7 @@ export default {
this.selectData = []
return false
} else {
+ // 查询人员信息
this.getCompanyPerformanceListByPersonIdData()
}
},
@@ -1010,81 +1442,248 @@ export default {
},
/**
- * 添加分包人员模块方法逻辑----------------------------------------------------------------------------------------------------------------------------------------------------------------
+ * 添加分包商模块方法逻辑----------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
- // 添加分包人员
- async addSubcontractorPerson() {
- this.subcontractorPersonList.push({
- userId: '', // 人员id
- userName: '', // 人员名称
- postName: '', // 本次标书中的职务职责分工
- title: '', // 职称
- diploma: '', // 证书名称
- diplomaNum: '', // 证书编号
- major: '', // 专业
- level: '', // 级别
- })
- },
- // 选择分包人员
- async selectSubcontractorPerson(index) {
- this.subcontractorPersonCurrentIndex = index
- this.dialogConfig.outerTitle = '分包人员选择'
- this.otherPersonQueryParams.pageNum = 1
- this.otherPersonQueryParams.pageSize = 10
- this.otherPersonQueryParams.userName = ''
- this.searchSubcontractorPerson()
+ // 添加分包商
+ async addSubcontractor() {
+ this.dialogConfig.outerTitle = '分包商选择'
+ this.getSubcontractorList()
this.dialogConfig.outerVisible = true
},
- // 查询分包人员
- async searchSubcontractorPerson() {
- const res = await getSubPersonManageListAPI(this.subcontractorPersonQueryParams)
- this.subPersonList = res.rows
- this.otherPersonTotal = res.total
- this.selectedOtherPerson = null
- // 根据已选的人员 将已选人员的数据增加一个标识 让表格复选框禁用
- if (this.subcontractorPersonList.length > 0) {
- this.subPersonList.forEach((item) => {
- if (this.subcontractorPersonList.some((subcontractorItem) => subcontractorItem.userId == item.id)) {
- item.disabled = true
- } else {
- item.disabled = false
- }
- })
+ // 获取分包商列表
+ async getSubcontractorList() {
+ const res = await getSubManageListAPI({ pageNum: 1, pageSize: 10000 })
+ this.waitSubcontractorSelectData = res.rows
+
+ if (this.subcontractorList.length > 0) {
+ this.selectSubcontractorData = this.subcontractorList.map((item) => item.id)
+ } else {
+ this.selectSubcontractorData = []
}
},
- // 分包人员列表复选框
- async onSubcontractorSelectionChange(selection) {
- if (selection.length > 1) {
- const lastSelected = selection[selection.length - 1]
- this.$refs.singleTable.clearSelection() // 清空所有选中
- this.$refs.singleTable.toggleRowSelection(lastSelected, true) // 重新选中最后一个
- }
- this.selectedSubcontractorPerson = selection[0] || null // 存储当前选中项
+
+ // 添加分包商业绩
+ async addSubcontractorPerformance(index, subId) {
+ this.initSubcontractorPerformanceQueryParams()
+ this.subcontractorPerformanceCurrentIndex = index
+ this.subcontractorPersonCurrentIndex = index
+ this.personPerformanceForm.subId = subId
+ this.dialogConfig.outerTitle = '分包商业绩选择'
+ this.getSubcontractorPerformanceData()
+ this.dialogConfig.outerVisible = true
},
- // 删除分包人员
- async deleteSubcontractorPerson(index) {
- this.subcontractorPersonList.splice(index, 1)
+ // 删除分包商
+ async deleteSubcontractor(index) {
+ this.subcontractorList.splice(index, 1)
+ },
+ // 获取分包商业绩数据
+ async getSubcontractorPerformanceData() {
+ const { age, proName, voltage, pageNum, pageSize, timeValue, subId } = this.personPerformanceForm
+ const queryParams = {
+ proName,
+ voltage,
+ pageNum,
+ pageSize,
+ startTime: '',
+ endTime: '',
+ subId,
+ }
+
+ if (age == 3) {
+ queryParams.startTime = moment().subtract(3, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+ if (age == 5) {
+ queryParams.startTime = moment().subtract(5, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+
+ if (timeValue && timeValue.length > 0) {
+ queryParams.startTime = timeValue[0]
+ queryParams.endTime = timeValue[1]
+ }
+ const res = await getSubPerformanceManageListAPI(queryParams)
+
+ if (res.rows.length > 0) {
+ this.waitSubcontractorPerformanceData = res.rows.map((item) => ({
+ ...item,
+ disabled: false,
+ perfId: item.id,
+ }))
+
+ const index = this.subcontractorPerformanceCurrentIndex
+ const companyPerformanceList = this.subcontractorList[index].companyPerformanceList
+
+ if (companyPerformanceList.length > 0) {
+ this.selectSubcontractorPerformanceData = companyPerformanceList.map((item) => item.perfId)
+ }
+ } else {
+ this.waitSubcontractorPerformanceData = []
+ }
+ },
+ // 初始化分包商业绩查询条件
+ async initSubcontractorPerformanceQueryParams() {
+ this.personPerformanceForm = {
+ age: '3',
+ proName: '',
+ voltage: '',
+ pageNum: 1,
+ pageSize: 10000,
+ timeValue: [],
+ personId: '',
+ subId: '',
+ }
+ },
+ // 查询分包商业绩
+ async searchSubcontractorPerformanceData() {
+ if (this.dialogConfig.outerTitle === '分包商业绩选择') {
+ this.getSubcontractorPerformanceData()
+ } else {
+ if (this.personPerformanceForm.personId) {
+ this.getSubcontractorPerformanceDataByPersonId()
+ } else {
+ this.$modal.msgError('请选择人员')
+ return false
+ }
+ }
},
- // 根据id获取南网模板详情
- async getNwTemplateById(id) {
- const res = await getNwTemplateByIdAPI({ id })
+ // 删除分包商业绩
+ async deleteSubcontractorPerformance(index, performanceIndex, id) {
+ this.subcontractorList[index].companyPerformanceList.splice(performanceIndex, 1)
+
+ this.selectSubcontractorPerformanceData = this.selectSubcontractorPerformanceData.filter(
+ (item) => item != id,
+ )
+ },
+
+ // 添加分包商人员
+ async addSubcontractorPerson(index, subId) {
+ this.initSubcontractorPerformanceQueryParams()
+ this.personPerformanceForm.subId = subId
+ this.subcontractorPerformanceCurrentIndex = index
+ this.subcontractorPersonCurrentIndex = index
+ this.subcontractorList[index].subcontractorPersonList.push({
+ userId: '',
+ userName: '',
+ title: '',
+ diploma: '',
+ idCard: '',
+ postName: '',
+ proPerf: '',
+ })
+ },
+
+ // 选择分包商人员
+ async selectSubcontractorPerson(index, personIndex) {
+ this.dialogConfig.outerTitle = '分包人员选择'
+ this.personPerformanceForm.personId = ''
+ this.dialogConfig.outerVisible = true
+ this.getSubcontractorPersonSelectList()
+ this.waitSubcontractorPerformanceData = []
+ this.selectSubcontractorPerformanceData = []
+ this.subcontractorPersonCurrentIndex = index
+ this.subcontractorPersonSelectIndex = personIndex
+ },
+ // 获取分包商人员下拉列表
+ async getSubcontractorPersonSelectList() {
+ const res = await getSubKeyPersonListAPI({ subId: this.personPerformanceForm.subId })
+ this.subcontractorPersonSelectList = res.rows
+ },
+ // 删除分包商人员
+ async deleteSubcontractorPerson(index, personIndex) {
+ this.subcontractorList[index].subcontractorPersonList.splice(personIndex, 1)
+ },
+ // 分包人员下拉选的change事件
+ async onChangeSubcontractorPerson(value) {
+ if (
+ this.subcontractorList[this.subcontractorPersonCurrentIndex].subcontractorPersonList.length > 0 &&
+ this.subcontractorList[this.subcontractorPersonCurrentIndex].subcontractorPersonList.some(
+ (item) => item.userId == value,
+ )
+ ) {
+ this.$modal.msgError('当前人员已选择,不可重复添加')
+ this.personPerformanceForm.personId = ''
+ this.waitSubcontractorPerformanceData = []
+ this.selectSubcontractorPerformanceData = []
+ return false
+ } else {
+ this.getSubcontractorPerformanceDataByPersonId()
+ }
+ },
+
+ // 根据人员id获取分包商业绩数据
+ async getSubcontractorPerformanceDataByPersonId() {
+ const { age, proName, voltage, pageNum, pageSize, timeValue, subId, personId } = this.personPerformanceForm
+ const queryParams = {
+ proName,
+ voltage,
+ pageNum,
+ pageSize,
+ startTime: '',
+ endTime: '',
+ subId,
+ personId,
+ }
+
+ if (age == 3) {
+ queryParams.startTime = moment().subtract(3, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+ if (age == 5) {
+ queryParams.startTime = moment().subtract(5, 'years').format('YYYY-MM-DD')
+ queryParams.endTime = moment().format('YYYY-MM-DD')
+ }
+
+ if (timeValue && timeValue.length > 0) {
+ queryParams.startTime = timeValue[0]
+ queryParams.endTime = timeValue[1]
+ }
+ const res = await getSubPerformanceManageListByPersonIdAPI(queryParams)
+
+ if (res.length > 0) {
+ this.waitSubcontractorPerformanceData = res.map((item) => ({
+ ...item,
+ disabled: false,
+ perfId: item.id,
+ }))
+ } else {
+ this.waitSubcontractorPerformanceData = []
+ }
+ },
+
+ // 根据id获取国网模板详情
+ async getGwTemplateById(id) {
+ const res = await getGwTemplateByIdAPI({ id })
if (res.code === 200) {
- const { name, comCoreList, comOtherList, subPersonList } = res.data
+ const { name, comCoreList, comOtherList, comPerfList, subList } = res.data
this.addAndEditForm.name = name
// 根据详情回显数据
-
- // 1. 回显公司关键人员数据
+ // 1. 回显公司业绩数据
+ this.companyPerformanceList = comPerfList
+ // 2. 回显公司关键人员数据
this.companyKeyPersonList = comCoreList
- // 2. 回显公司其他人员数据
+ // 3. 回显公司其他人员数据
this.companyOtherPersonList = comOtherList
- // 3. 回显分包人员数据
- this.subcontractorPersonList = subPersonList
+ // 4. 回显分包商数据
+ if (subList.length > 0) {
+ subList.forEach((item) => {
+ this.subcontractorList.push(
+ JSON.parse(
+ JSON.stringify({
+ ...item,
+ companyPerformanceList: item.subPerfList,
+ subcontractorPersonList: item.subPersonList,
+ }),
+ ),
+ )
+ })
+ }
} else {
- this.$modal.msgError('详情获取失败' + res.message)
this.$modal.closeDialogOuter()
+ this.$modal.msgError('详情获取失败' + res.message)
}
},
},
@@ -1093,7 +1692,7 @@ export default {
queryId: {
handler(newVal) {
if (newVal && newVal != '') {
- this.getNwTemplateById(newVal)
+ this.getGwTemplateById(newVal)
}
},
immediate: true,
diff --git a/src/views/data-create/nw-template/index.vue b/src/views/data-create/nw-template/index.vue
index 36ba918..7613ff6 100644
--- a/src/views/data-create/nw-template/index.vue
+++ b/src/views/data-create/nw-template/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -25,9 +25,9 @@
- 查询
+ 查询
重置
-
+
新增
@@ -49,41 +49,41 @@
详情
下载
编辑
删除
@@ -93,9 +93,9 @@
@@ -108,7 +108,7 @@