|
@@ -1,6 +1,6 @@
|
|
|
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
|
<div>
|
|
|
- <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method==='view'"
|
|
|
+ <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="formReadOnly"
|
|
|
label-width="220px" @submit.native.prevent>
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 选择合同</el-divider>
|
|
|
<el-row :gutter="15">
|
|
@@ -510,7 +510,7 @@
|
|
|
</el-row>
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
项目直接对接人
|
|
|
- <el-button style="margin-left: 20px" type="primary" :disabled="method==='view'" size="mini" @click="openContactForm('0')" plain>
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="formReadOnly" size="mini" @click="openContactForm('0')" plain>
|
|
|
新增
|
|
|
</el-button>
|
|
|
</el-divider>
|
|
@@ -561,7 +561,7 @@
|
|
|
</el-row>
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
产权持有人联系人
|
|
|
- <el-button style="margin-left: 20px" type="primary" :disabled="method==='view'" size="mini" @click="openContactForm('2')" plain>
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="formReadOnly" size="mini" @click="openContactForm('2')" plain>
|
|
|
新增
|
|
|
</el-button>
|
|
|
</el-divider>
|
|
@@ -613,7 +613,7 @@
|
|
|
<div v-if="false">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
被评估企业对接联系人
|
|
|
- <el-button style="margin-left: 20px" type="primary" :disabled="method==='view'" size="mini" @click="openContactForm('3')" plain>
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="formReadOnly" size="mini" @click="openContactForm('3')" plain>
|
|
|
新增
|
|
|
</el-button>
|
|
|
</el-divider>
|
|
@@ -667,14 +667,16 @@
|
|
|
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
项目组成员
|
|
|
- <el-button style="margin-left: 20px" type="primary" :disabled="method==='view'" size="mini" @click="insertEvent('member')" plain>
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="formReadOnly" size="mini" @click="insertEvent('member')" plain>
|
|
|
新增
|
|
|
</el-button>
|
|
|
</el-divider>
|
|
|
<el-row :gutter="15">
|
|
|
<vxe-table
|
|
|
border
|
|
|
+ show-footer
|
|
|
show-overflow
|
|
|
+ :footer-method="footerMethod"
|
|
|
ref="memberTable"
|
|
|
class="vxe-table-element"
|
|
|
:data="inputForm.members"
|
|
@@ -734,13 +736,9 @@
|
|
|
</el-form>
|
|
|
<!-- 附件-->
|
|
|
<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
|
|
|
- <el-button size="small" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
|
|
|
- </span>
|
|
|
- <ContractForm ref="contractForm" @getContract="getContract"></ContractForm>
|
|
|
- <WorkClientForm ref="workClientForm" @getWorkClient="getWorkClient"></WorkClientForm>
|
|
|
- <ContactForm ref="contactForm" @getContact="getContact"></ContactForm>
|
|
|
+ <ContractForm ref="contractForm" @getContract="getContract"></ContractForm>
|
|
|
+ <WorkClientForm ref="workClientForm" @getWorkClient="getWorkClient"></WorkClientForm>
|
|
|
+ <ContactForm ref="contactForm" @getContact="getContact"></ContactForm>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -752,7 +750,18 @@
|
|
|
import UpLoadComponent from '@/views/common/UpLoadComponent'
|
|
|
import SelectUserTree from '@/views/modules/utils/treeUserSelect'
|
|
|
import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
|
|
|
+ import XEUtils from 'xe-utils'
|
|
|
export default {
|
|
|
+ props: {
|
|
|
+ businessId: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ formReadOnly: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
title: '',
|
|
@@ -826,6 +835,25 @@
|
|
|
created () {
|
|
|
this.programTypeDictService = new ProgramTypeDictService()
|
|
|
this.programProjectListInfoService = new ProgramProjectListInfoService()
|
|
|
+ this.getTypeList()
|
|
|
+ this.inputForm.company = '江苏兴光资产评估有限公司'
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ 'businessId': {
|
|
|
+ handler (newVal) {
|
|
|
+ if (this.businessId) {
|
|
|
+ if (this.businessId !== 'false') {
|
|
|
+ this.init('', this.businessId)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.inputForm.resetFields()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true,
|
|
|
+ deep: false
|
|
|
+ }
|
|
|
},
|
|
|
components: {
|
|
|
ContractForm,
|
|
@@ -836,6 +864,8 @@
|
|
|
},
|
|
|
methods: {
|
|
|
init (method, id) {
|
|
|
+ this.programProjectListInfoService = new ProgramProjectListInfoService()
|
|
|
+ this.programTypeDictService = new ProgramTypeDictService()
|
|
|
this.method = method
|
|
|
this.inputForm = {
|
|
|
id: '', // 主键值(新增不传,修改必传)
|
|
@@ -898,31 +928,26 @@
|
|
|
clientList: [] // 项目直接对接联系人
|
|
|
}
|
|
|
this.getTypeList()
|
|
|
- if (method === 'add') {
|
|
|
- this.title = `项目登记`
|
|
|
- } else if (method === 'edit') {
|
|
|
- this.inputForm.id = id
|
|
|
- this.title = '修改项目数据'
|
|
|
- } else if (method === 'view') {
|
|
|
- this.inputForm.id = id
|
|
|
- this.title = '查看项目数据'
|
|
|
- }
|
|
|
+ this.inputForm.id = id
|
|
|
this.loading = false
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
- if (method === 'edit' || method === 'view') { // 修改或者查看
|
|
|
- this.loading = true
|
|
|
- this.programProjectListInfoService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
- this.inputForm = this.recover(this.inputForm, data)
|
|
|
- this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
- if (!this.commonJS.isEmpty(this.inputForm.workBeginDate) && !this.commonJS.isEmpty(this.inputForm.workEndDate)) {
|
|
|
- this.inputForm.workBeginAndEndDate = []
|
|
|
- this.inputForm.workBeginAndEndDate[0] = this.inputForm.workBeginDate
|
|
|
- this.inputForm.workBeginAndEndDate[1] = this.inputForm.workEndDate
|
|
|
- }
|
|
|
- this.inputForm.clientList = []
|
|
|
- this.inputForm.equityList = []
|
|
|
- this.inputForm.contactList = []
|
|
|
+ this.loading = true
|
|
|
+ this.programProjectListInfoService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ this.inputForm = this.recover(this.inputForm, data)
|
|
|
+ this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
+ if (!this.commonJS.isEmpty(this.inputForm.workBeginDate) && !this.commonJS.isEmpty(this.inputForm.workEndDate)) {
|
|
|
+ this.inputForm.workBeginAndEndDate = []
|
|
|
+ this.inputForm.workBeginAndEndDate[0] = this.inputForm.workBeginDate
|
|
|
+ this.inputForm.workBeginAndEndDate[1] = this.inputForm.workEndDate
|
|
|
+ }
|
|
|
+ this.inputForm.clientList = []
|
|
|
+ this.inputForm.equityList = []
|
|
|
+ this.inputForm.contactList = []
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.members)) {
|
|
|
+ this.inputForm.members = []
|
|
|
+ }
|
|
|
+ if (!this.commonJS.isEmpty(this.inputForm.links)) {
|
|
|
this.inputForm.links.forEach(item => {
|
|
|
if (item.type === '0') {
|
|
|
this.inputForm.clientList.push(item)
|
|
@@ -934,17 +959,69 @@
|
|
|
this.inputForm.contactList.push(item)
|
|
|
}
|
|
|
})
|
|
|
- this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'program')
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
- }
|
|
|
- if (method !== 'edit' && method !== 'view') {
|
|
|
- this.$refs.uploadComponent.newUpload(method, [], 'program')
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (this.formReadOnly === true) {
|
|
|
+ method = 'view'
|
|
|
+ }
|
|
|
+ this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'program')
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
+ saveForm (callback) {
|
|
|
+ this.doSubmit('save', callback)
|
|
|
+ },
|
|
|
+ startForm (callback) {
|
|
|
+ this.doSubmit('start', callback)
|
|
|
+ },
|
|
|
+ agreeForm (callback) {
|
|
|
+ this.doSubmit('agree', callback)
|
|
|
+ },
|
|
|
// 表单提交
|
|
|
- doSubmit () {
|
|
|
+ doSubmit (status, callback) {
|
|
|
+ if (!this.commonJS.isEmpty(this.inputForm.workBeginAndEndDate)) {
|
|
|
+ this.inputForm.workBeginDate = this.inputForm.workBeginAndEndDate[0]
|
|
|
+ this.inputForm.workEndDate = this.inputForm.workBeginAndEndDate[1]
|
|
|
+ }
|
|
|
+ if (this.inputForm.isFirst === '1') {
|
|
|
+ this.inputForm.yearNum = ''
|
|
|
+ }
|
|
|
+ if (status === 'save') {
|
|
|
+ // 暂存
|
|
|
+ this.inputForm.status = '1'
|
|
|
+ this.inputForm.links = []
|
|
|
+ if (!this.commonJS.isEmpty(this.inputForm.clientList)) {
|
|
|
+ this.inputForm.clientList.forEach(item => {
|
|
|
+ item.type = '0'
|
|
|
+ this.inputForm.links.push(item)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (!this.commonJS.isEmpty(this.inputForm.equityList)) {
|
|
|
+ this.inputForm.equityList.forEach(item => {
|
|
|
+ item.type = '2'
|
|
|
+ this.inputForm.links.push(item)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
+ this.loading = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
+ this.programProjectListInfoService.saveForm(this.inputForm).then(({data}) => {
|
|
|
+ callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
+ this.loading = false
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ return
|
|
|
+ } else if (status === 'start') {
|
|
|
+ // 送审 待审核
|
|
|
+ this.inputForm.status = '2'
|
|
|
+ } else if (status === 'agree') {
|
|
|
+ // 审核同意
|
|
|
+ this.inputForm.status = '5'
|
|
|
+ }
|
|
|
this.inputForm.links = []
|
|
|
if (!this.commonJS.isEmpty(this.inputForm.clientList)) {
|
|
|
this.inputForm.clientList.forEach(item => {
|
|
@@ -977,13 +1054,6 @@
|
|
|
this.$message.error('至少填写一条项目组成员信息')
|
|
|
return
|
|
|
}
|
|
|
- if (!this.commonJS.isEmpty(this.inputForm.workBeginAndEndDate)) {
|
|
|
- this.inputForm.workBeginDate = this.inputForm.workBeginAndEndDate[0]
|
|
|
- this.inputForm.workEndDate = this.inputForm.workBeginAndEndDate[1]
|
|
|
- }
|
|
|
- if (this.inputForm.isFirst === '1') {
|
|
|
- this.inputForm.yearNum = ''
|
|
|
- }
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
@@ -992,10 +1062,8 @@
|
|
|
return
|
|
|
}
|
|
|
this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
- this.programProjectListInfoService.save(this.inputForm).then(({data}) => {
|
|
|
- this.close()
|
|
|
- this.$message.success(data)
|
|
|
- this.$emit('refreshDataList')
|
|
|
+ this.programProjectListInfoService.saveForm(this.inputForm).then(({data}) => {
|
|
|
+ callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
this.loading = false
|
|
|
}).catch(() => {
|
|
|
this.loading = false
|
|
@@ -1003,6 +1071,21 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ updateStatusById (type) {
|
|
|
+ if (type === 'agree') {
|
|
|
+ // 同意
|
|
|
+ this.inputForm.status = '5'
|
|
|
+ }
|
|
|
+ if (type === 'reject') {
|
|
|
+ // 驳回
|
|
|
+ this.inputForm.status = '4'
|
|
|
+ }
|
|
|
+ if (type === 'reback') {
|
|
|
+ // 撤回
|
|
|
+ this.inputForm.status = '3'
|
|
|
+ }
|
|
|
+ this.programProjectListInfoService.updateStatusById(this.inputForm)
|
|
|
+ },
|
|
|
openContractForm () {
|
|
|
if (!this.commonJS.isEmpty(this.inputForm.contractId)) {
|
|
|
this.$refs.contractForm.init(this.inputForm.contractId)
|
|
@@ -1076,6 +1159,66 @@
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
close () {
|
|
|
+ this.inputForm = {
|
|
|
+ id: '', // 主键值(新增不传,修改必传)
|
|
|
+ no: '', // 编号(新增不传,修改必传)
|
|
|
+ contractId: '', // 合同id
|
|
|
+ contractName: '', // 合同名称
|
|
|
+ client: '', // 委托方
|
|
|
+ clientName: '', // 委托方名称
|
|
|
+ amount: '', // 合同金额
|
|
|
+ contractType: '', // 合同类型
|
|
|
+ name: '', // 项目名称
|
|
|
+ projectType: '', // 项目类别
|
|
|
+ projectMould: '', // 项目类型
|
|
|
+ company: '', // 执业机构
|
|
|
+ propertyHolder: '', // 产权持有人
|
|
|
+ propertyHolderName: '', // 产权持有人姓名
|
|
|
+ location: '', // 项目所在地
|
|
|
+ isFirst: '', // 是否首次承建
|
|
|
+ yearNum: '', // 承做年数
|
|
|
+ checkYear: '', // 评估费用核算年度
|
|
|
+ projectManager: '', // 项目经理
|
|
|
+ reportType: '', // 报告类型
|
|
|
+ industry: '', // 所属行业
|
|
|
+ enterpriseType: '', // 企业类型
|
|
|
+ riskLevel: '', // 风险等级
|
|
|
+ projectSource: '', // 项目来源
|
|
|
+ estimate: '', // 预估收入(元)
|
|
|
+ planEndTime: '', // 计划完成时间
|
|
|
+ useNum: '', // 计划使用人数
|
|
|
+ appointment: '', // 约定书(份)
|
|
|
+ workHours: '', // 预算工时
|
|
|
+ remarks: '', // 备注
|
|
|
+ assessmentEnterprise: '', // 被评估企业
|
|
|
+ assessmentEnterpriseName: '', // 被评估企业名称
|
|
|
+ linkNum: '', // 联系人及电话
|
|
|
+ relationship: '', // 委托人与被评估单位关系
|
|
|
+ assessmentWay: '', // 评估方式
|
|
|
+ assessmentObjective: '', // 评估目的
|
|
|
+ assessmentDate: '', // 评估基准日
|
|
|
+ num: '', // 评估服务收费总额
|
|
|
+ projectDevelopment: '', // 项目开发人
|
|
|
+ delegateProjectType: '', // 项目类型
|
|
|
+ assessmentObject: '', // 评估对象
|
|
|
+ workBeginAndEndDate: [], // 预计现场工作起止时间
|
|
|
+ workBeginDate: '', // 预计现场工作开始时间
|
|
|
+ workEndDate: '', // 预计现场工作结束时间
|
|
|
+ reportingDate: '', // 预计出报告日期
|
|
|
+ isHave: '', // 本所是否具备承接胜任能力
|
|
|
+ isInfluence: '', // 是否影响本所乘坐人员独立性
|
|
|
+ mode: '', // 项目承接方式
|
|
|
+ status: '', // 状态
|
|
|
+ procInsId: '', // 流程id
|
|
|
+ processDefinitionId: '', // 流程信息
|
|
|
+ links: [], // 联系人列表
|
|
|
+ members: [], // 成员列表
|
|
|
+ files: [], // 附件信息
|
|
|
+
|
|
|
+ contactList: [], // 被评估企业对接联系人
|
|
|
+ equityList: [], // 产权持有人联系人
|
|
|
+ clientList: [] // 项目直接对接联系人
|
|
|
+ }
|
|
|
this.$refs.uploadComponent.clearUpload()
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
},
|
|
@@ -1133,7 +1276,6 @@
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
clearEquityList () {
|
|
|
- console.log('45454545454554545')
|
|
|
// 产权持有人联系人列表清除
|
|
|
this.inputForm.equityList = []
|
|
|
this.$forceUpdate()
|
|
@@ -1142,6 +1284,21 @@
|
|
|
// 项目直接对接联系人列表清除
|
|
|
this.inputForm.clientList = []
|
|
|
this.$forceUpdate()
|
|
|
+ },
|
|
|
+ footerMethod ({ columns, data }) {
|
|
|
+ const footerData = [
|
|
|
+ columns.map((column, columnIndex) => {
|
|
|
+ if (columnIndex === 0) {
|
|
|
+ return '工时总计'
|
|
|
+ }
|
|
|
+ if (['workHours'].includes(column.property)) {
|
|
|
+ // eslint-disable-next-line no-undef
|
|
|
+ return XEUtils.sum(data, column.property)
|
|
|
+ }
|
|
|
+ return null
|
|
|
+ })
|
|
|
+ ]
|
|
|
+ return footerData
|
|
|
}
|
|
|
}
|
|
|
}
|