|
@@ -7,7 +7,7 @@
|
|
|
<el-row :gutter="40">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="企业名称" prop="entName">
|
|
|
- <el-input v-model="form.entName" type="text" auto-complete="off" placeholder="请输入企业名称"></el-input>
|
|
|
+ <el-input v-model="form.entName" type="text" placeholder="请输入企业名称" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
@@ -89,7 +89,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="项目时间段" prop="projectTime">
|
|
|
- <el-date-picker v-model="form.projectTime" placeholder="选择日期" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
+ <el-date-picker v-model="projectTime" placeholder="选择日期" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -116,25 +116,25 @@
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <template v-if="form.techFlag == 1">
|
|
|
+ <!-- <template v-if="techVisible"> -->
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="高新技术企业所属技术领域" prop="techScopeArray">
|
|
|
- <el-checkbox-group v-model="form.techScopeArray">
|
|
|
+ <el-checkbox-group v-model="techScopeArray">
|
|
|
<el-checkbox v-for="(item, index) in techScopeOptions" :label="item.dictLabel" :key="index">{{item.dictLabel}}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="证书有效期限" prop="lisenceTime">
|
|
|
- <el-date-picker v-model="form.lisenceTime" placeholder="选择日期" type="daterange" value-format="yyyy-MM" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
+ <el-date-picker v-model="lisenceTime" placeholder="选择日期" type="daterange" value-format="yyyy-MM" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="高新证书" prop="investFlag">
|
|
|
- <FileUpload :file="{url: form.licensePath, name: form.fileName}" @input="handleSuccess">上传证书</FileUpload>
|
|
|
+ <el-form-item label="高新证书" prop="techLicense">
|
|
|
+ <FileUpload :file="{url: form.techLicense, name: form.fileName}" @input="handleSuccess">上传证书</FileUpload>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </template>
|
|
|
+ <!-- </template> -->
|
|
|
</el-row>
|
|
|
<template v-if="userType == 'ENT_ADMIN'">
|
|
|
<el-row :gutter="40">
|
|
@@ -154,6 +154,7 @@
|
|
|
import { editProjectApi,getProjectInfoApi } from "@/api/enterprise/project/project"
|
|
|
import { techScopeOptions,yesOrNoOptions } from "@/utils/dataFormat"
|
|
|
import FileUpload from '@/components/FileUpload'
|
|
|
+import { listEntUserApi } from "@/api/ent/ent"
|
|
|
|
|
|
export default {
|
|
|
name: "First",
|
|
@@ -170,6 +171,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
activeName: '3',
|
|
|
+ techVisible: false,
|
|
|
serviceDate: [],
|
|
|
provinceName: '',
|
|
|
cityName: '',
|
|
@@ -179,16 +181,18 @@ export default {
|
|
|
yesOrNoOptions: yesOrNoOptions,
|
|
|
provinceDataList: [],
|
|
|
cityDataList: [],
|
|
|
- districtDataList: [],
|
|
|
+ districtDataList: [],
|
|
|
+ techScopeArray: ['电子信息'],
|
|
|
+ lisenceTime: [],
|
|
|
+ projectTime: [],
|
|
|
form: {
|
|
|
- projectOwner: this.projectOwner,
|
|
|
- lisenceTime: [],
|
|
|
+ entName: '',
|
|
|
+ projectOwner: 1,
|
|
|
techStartDate: '',
|
|
|
techEndDate: '',
|
|
|
- projectTime: [],
|
|
|
projectStartDate: '',
|
|
|
projectEndDate: '',
|
|
|
- techScopeArray: ['电子信息'],
|
|
|
+ overYearFlag: 1,
|
|
|
},
|
|
|
rules: {
|
|
|
userName: [
|
|
@@ -210,32 +214,60 @@ export default {
|
|
|
this.form.entId = this.$route.query.entId || undefined;
|
|
|
if(this.form.id) {
|
|
|
this.getData()
|
|
|
- }
|
|
|
+ }
|
|
|
+ setTimeout(() => { // 加延时
|
|
|
+ this.getEntData()
|
|
|
+ }, 500);
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
+ // techFlagChange() {
|
|
|
+ // if(this.form.techFlag == 1) {
|
|
|
+ // this.techVisible = true
|
|
|
+ // this.form.techScopeArray = ['电子信息']
|
|
|
+ // }else {
|
|
|
+ // this.techVisible = false
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ getEntData() {
|
|
|
+ listEntUserApi().then(res => {
|
|
|
+ this.form.entName = res.data.entName
|
|
|
+ })
|
|
|
+ },
|
|
|
getData() {
|
|
|
getProjectInfoApi(this.form.id).then(res => {
|
|
|
let obj = res.data.entProject || {}
|
|
|
+ this.form = obj || {}
|
|
|
+ this.form.fileName = '高新证书'
|
|
|
+ if(obj.techScope) {
|
|
|
+ this.techScopeArray = obj.techScope.split(',')
|
|
|
+ }
|
|
|
+ this.projectTime = []
|
|
|
if(obj.projectStartDate) {
|
|
|
- this.form.projectTime[0] = obj.projectStartDate
|
|
|
- this.form.projectTime[1] = obj.projectEndDate
|
|
|
+ this.projectTime[0] = obj.projectStartDate
|
|
|
+ this.projectTime[1] = obj.projectEndDate
|
|
|
+ }
|
|
|
+ this.lisenceTime = []
|
|
|
+ if(obj.techStartDate) {
|
|
|
+ this.lisenceTime[0] = obj.techStartDate
|
|
|
+ this.lisenceTime[1] = obj.techEndDate
|
|
|
+ }
|
|
|
+ if(obj.techFlag == 1) {
|
|
|
+ this.techVisible = true
|
|
|
}
|
|
|
- this.form = obj || {}
|
|
|
})
|
|
|
},
|
|
|
handleSuccess(file) {
|
|
|
- this.form.licensePath = file.url;
|
|
|
- this.form.fileName = file.name;
|
|
|
- },
|
|
|
- handleSaleSuccess(files) {
|
|
|
- files.forEach(item => {
|
|
|
- this.form.attachIds.push(item.response.data.id)
|
|
|
- });
|
|
|
+ this.form.techLicense = file.url;
|
|
|
+ this.form.fileName = '高新证书';
|
|
|
},
|
|
|
submitForm() {
|
|
|
+ console.log(this.projectTime)
|
|
|
+ return
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if(valid) {
|
|
|
this.loading = true
|
|
|
+ this.form.techScope = this.techScopeArray.join(',')
|
|
|
editProjectApi(this.form).then(res => {
|
|
|
this.loading = false
|
|
|
this.$store.dispatch("tagsView/delView", this.$route);
|
|
@@ -252,19 +284,19 @@ export default {
|
|
|
this.form.entProjectList = this.entProjectList || {}
|
|
|
}
|
|
|
},
|
|
|
- 'form.projectTime'(val) {
|
|
|
- if(this.form.projectTime) {
|
|
|
- this.form.projectStartDate = this.form.projectTime[0]
|
|
|
- this.form.projectEndDate = this.form.projectTime[1]
|
|
|
+ 'projectTime'(val) {
|
|
|
+ if(this.projectTime) {
|
|
|
+ this.form.projectStartDate = this.projectTime[0]
|
|
|
+ this.form.projectEndDate = this.projectTime[1]
|
|
|
}else {
|
|
|
this.form.projectStartDate = ''
|
|
|
this.form.projectEndDate = ''
|
|
|
}
|
|
|
},
|
|
|
- 'form.lisenceTime'(val) {
|
|
|
- if(this.form.lisenceTime) {
|
|
|
- this.form.techEndDate = this.form.lisenceTime[1]
|
|
|
- this.form.techStartDate = this.form.lisenceTime[0]
|
|
|
+ 'lisenceTime'(val) {
|
|
|
+ if(this.lisenceTime) {
|
|
|
+ this.form.techEndDate = this.lisenceTime[1]
|
|
|
+ this.form.techStartDate = this.lisenceTime[0]
|
|
|
}else {
|
|
|
this.form.techStartDate = ''
|
|
|
this.form.techEndDate = ''
|