|
@@ -1,333 +1,139 @@
|
|
|
-<template>
|
|
|
- <div class="app-container" v-loading="loading">
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="180px">
|
|
|
- <h3 class="toolbar">
|
|
|
- <span class="title">项目基本信息</span>
|
|
|
- </h3>
|
|
|
- <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-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="通讯地址" prop="address">
|
|
|
- <el-input v-model="form.address" placeholder="请输入通讯地址"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="企业联系人" prop="linkName">
|
|
|
- <el-input v-model="form.linkName" placeholder="请输入企业联系人"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="联系电话(座机)" prop="mobile">
|
|
|
- <el-input v-model="form.mobile" type="text" auto-complete="off" placeholder="请输入联系电话(座机)">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="联系电话(手机)" prop="linkMobile">
|
|
|
- <el-input v-model="form.linkMobile" type="text" auto-complete="off" placeholder="请输入联系电话(手机)">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="职工总人数(人)" prop="totoalPersons">
|
|
|
- <el-input v-model="form.totoalPersons" type="text" auto-complete="off" placeholder="请输入职工总人数">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="年度企业销售收入(万元)" prop="sales">
|
|
|
- <el-input v-model="form.sales" type="text" auto-complete="off" placeholder="请输入年度企业销售收入(万元)">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="研发人数" prop="techPersons">
|
|
|
- <el-input v-model="form.techPersons" type="text" auto-complete="off" placeholder="请输入研发人数">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="年度研发投入(万元)" prop="techInvest">
|
|
|
- <el-input v-model="form.techInvest" type="text" auto-complete="off" placeholder="请输入年度研发投入(万元)">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="占销售收入比例(%)" prop="techRate">
|
|
|
- <el-input v-model="form.techRate" type="text" auto-complete="off" placeholder="请输入占销售收入比例(%)">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="企业所属行业" prop="industry">
|
|
|
- <el-input v-model="form.industry" type="text" auto-complete="off" placeholder="请输入企业所属行业">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="国家自主创新示范区企业" prop="innovateFlag">
|
|
|
- <el-radio-group v-model="form.innovateFlag">
|
|
|
- <el-radio v-for="(item, index) in yesOrNoOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <h3 class="toolbar">
|
|
|
- <span class="title">项目是否跨年</span>
|
|
|
- </h3>
|
|
|
- <el-row :gutter="40">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="是否跨年" prop="overYearFlag">
|
|
|
- <el-radio-group v-model="form.overYearFlag">
|
|
|
- <el-radio v-for="(item, index) in yesOrNoOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </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-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <h3 class="toolbar">
|
|
|
- <span class="title">科技型中小企业信息</span>
|
|
|
- </h3>
|
|
|
- <el-row :gutter="40">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="是否科技型中小企业" prop="investFlag">
|
|
|
- <el-radio-group v-model="form.investFlag">
|
|
|
- <el-radio v-for="(item, index) in yesOrNoOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <h3 class="toolbar">
|
|
|
- <span class="title">高新技术企业信息</span>
|
|
|
- </h3>
|
|
|
- <el-row :gutter="40">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="是否高新技术企业" prop="techFlag">
|
|
|
- <el-radio-group v-model="form.techFlag">
|
|
|
- <el-radio v-for="(item, index) in yesOrNoOptions" :key="index" :label="item.dictValue">{{item.dictLabel}}</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <template v-if="form.techFlag == 1">
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="高新技术企业所属技术领域" prop="techScopeArray">
|
|
|
- <el-checkbox-group v-model="form.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-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>
|
|
|
- </el-col>
|
|
|
- </template>
|
|
|
- </el-row>
|
|
|
- <template v-if="entOwnVisible">
|
|
|
- <el-row :gutter="40">
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item style="width:100%;text-align: center;" label-width="0px">
|
|
|
- <el-button :loading="loading" size="medium" type="primary" @click.native.prevent="submitForm" style="width: 100px;">自填保存</el-button>
|
|
|
- <el-button size="medium" type="primary" style="width: 100px;">取消</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
- <template v-if="entFinVisible">
|
|
|
- <el-row :gutter="40">
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item style="width:100%;text-align: center;" label-width="0px">
|
|
|
- <el-button :loading="loading" size="medium" type="primary" @click.native.prevent="submitForm" style="width: 100px;">财务保存</el-button>
|
|
|
- <el-button size="medium" type="primary" style="width: 100px;">取消</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
- <template v-if="entTechVisible">
|
|
|
- <el-row :gutter="40">
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item style="width:100%;text-align: center;" label-width="0px">
|
|
|
- <el-button :loading="loading" size="medium" type="primary" @click.native.prevent="submitForm" style="width: 100px;">技术保存</el-button>
|
|
|
- <el-button size="medium" type="primary" style="width: 100px;">取消</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
+<template>
|
|
|
+ <div class="app-container" v-loading="loading">
|
|
|
+ <h3 class="toolbar">
|
|
|
+ <span class="title">项目基本信息</span>
|
|
|
+ </h3>
|
|
|
+ <table class="table_view">
|
|
|
+ <tr>
|
|
|
+ <th>企业名称</th>
|
|
|
+ <td>{{info.entName}}</td>
|
|
|
+ <th>通讯地址</th>
|
|
|
+ <td>{{info.address}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>企业联系人</th>
|
|
|
+ <td>{{info.linkName}}</td>
|
|
|
+ <th>联系人(座机)</th>
|
|
|
+ <td>{{info.linkPhone}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>联系电话(手机)</th>
|
|
|
+ <td>{{info.linkMobile}}</td>
|
|
|
+ <th>职工总人数(人)</th>
|
|
|
+ <td>{{info.totoalPersons}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>年度企业销售收入(万元)</th>
|
|
|
+ <td>{{info.sales}}</td>
|
|
|
+ <th>占销售收入比例(%)</th>
|
|
|
+ <td>{{info.techRate}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>研发人数</th>
|
|
|
+ <td>{{info.techPersons}}</td>
|
|
|
+ <th>年度研发投入(万元)</th>
|
|
|
+ <td>{{info.techInvest}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>企业所属行业</th>
|
|
|
+ <td>{{info.industry}}</td>
|
|
|
+ <th>国家自主创新示范区企业</th>
|
|
|
+ <td>{{info.innovateFlag}}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <h3 class="toolbar mt20">
|
|
|
+ <span class="title">项目是否跨年</span>
|
|
|
+ </h3>
|
|
|
+ <table class="table_view">
|
|
|
+ <tr>
|
|
|
+ <th>是否跨年</th>
|
|
|
+ <td>{{info.overYearFlag}}</td>
|
|
|
+ <th>项目期限</th>
|
|
|
+ <td>{{info.projectTime}}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <h3 class="toolbar mt20">
|
|
|
+ <span class="title">科技型中小企业信息</span>
|
|
|
+ </h3>
|
|
|
+ <table class="table_view">
|
|
|
+ <tr>
|
|
|
+ <th>是否科技型中小企业</th>
|
|
|
+ <td>{{info.smallFlag}}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <h3 class="toolbar mt20">
|
|
|
+ <span class="title">高新技术企业信息</span>
|
|
|
+ </h3>
|
|
|
+ <table class="table_view">
|
|
|
+ <tr>
|
|
|
+ <th>企业是否高新技术</th>
|
|
|
+ <td>{{info.techFlag}}</td>
|
|
|
+ <th>高新技术企业所属技术领域</th>
|
|
|
+ <td>{{info.techScope}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>证书有限期限</th>
|
|
|
+ <td>{{info.lisenceTime}}</td>
|
|
|
+ <th>高新证书</th>
|
|
|
+ <td>{{info.listingCode}}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
<script>
|
|
|
-import { editProjectApi,getProjectInfoApi } from "@/api/enterprise/project/project"
|
|
|
-import { techScopeOptions,yesOrNoOptions } from "@/utils/dataFormat"
|
|
|
-import FileUpload from '@/components/FileUpload'
|
|
|
-
|
|
|
-export default {
|
|
|
- name: "First",
|
|
|
- components: {
|
|
|
- FileUpload
|
|
|
- },
|
|
|
- props: {
|
|
|
- projectOwner: {
|
|
|
- type: String
|
|
|
- },
|
|
|
- entOwnVisible: {
|
|
|
- type: Boolean
|
|
|
- },
|
|
|
- entTechVisible: {
|
|
|
- type: Boolean
|
|
|
- },
|
|
|
- entFinVisible: {
|
|
|
- type: Boolean
|
|
|
- }
|
|
|
- },
|
|
|
- data() {
|
|
|
- const equalToPassword = (rule, value, callback) => {
|
|
|
- if (this.form.password !== value) {
|
|
|
- callback(new Error("两次输入的密码不一致"));
|
|
|
- } else {
|
|
|
- callback();
|
|
|
- }
|
|
|
- };
|
|
|
- return {
|
|
|
- activeName: '3',
|
|
|
- serviceDate: [],
|
|
|
- provinceName: '',
|
|
|
- cityName: '',
|
|
|
- districtName: '',
|
|
|
- codeUrl: "",
|
|
|
- techScopeOptions: techScopeOptions,
|
|
|
- yesOrNoOptions: yesOrNoOptions,
|
|
|
- provinceDataList: [],
|
|
|
- cityDataList: [],
|
|
|
- districtDataList: [],
|
|
|
- form: {
|
|
|
- projectOwner: this.projectOwner,
|
|
|
- lisenceTime: [],
|
|
|
- techStartDate: '',
|
|
|
- techEndDate: '',
|
|
|
- projectTime: [],
|
|
|
- projectStartDate: '',
|
|
|
- projectEndDate: '',
|
|
|
- techScopeArray: [],
|
|
|
- },
|
|
|
- rules: {
|
|
|
- userName: [
|
|
|
- { required: true, trigger: "blur", message: "请输入您的账号" },
|
|
|
- { min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' }
|
|
|
- ],
|
|
|
- password: [
|
|
|
- { required: true, trigger: "blur", message: "请输入您的密码" },
|
|
|
- { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
|
|
|
- ],
|
|
|
- confirmPassword: [
|
|
|
- { required: true, trigger: "blur", message: "请再次输入您的密码" },
|
|
|
- { required: true, validator: equalToPassword, trigger: "blur" }
|
|
|
- ],
|
|
|
- code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
|
|
- },
|
|
|
- loading: false,
|
|
|
- captchaOnOff: true
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.form.id = this.$route.query.id || undefined;
|
|
|
- this.form.entId = this.$route.query.entId || undefined;
|
|
|
- if(this.form.id) {
|
|
|
- this.getData()
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getData() {
|
|
|
- getProjectInfoApi(this.form.id).then(res => {
|
|
|
- if(this.projectOwner == '1') {
|
|
|
- let obj = res.data.entProject || {}
|
|
|
- if(obj.projectStartDate) {
|
|
|
- this.form.projectTime[0] = obj.projectStartDate
|
|
|
- this.form.projectTime[1] = obj.projectEndDate
|
|
|
- }
|
|
|
- this.form = obj || {}
|
|
|
- }else if(this.projectOwner == '2') {
|
|
|
- let obj = res.data.entProject || {}
|
|
|
- if(obj.projectStartDate) {
|
|
|
- this.form.projectTime[0] = obj.projectStartDate
|
|
|
- this.form.projectTime[1] = obj.projectEndDate
|
|
|
- }
|
|
|
- this.form = obj || {}
|
|
|
- }else if(this.projectOwner == '3') {
|
|
|
- let obj = res.data.entProject || {}
|
|
|
- if(obj.projectStartDate) {
|
|
|
- this.form.projectTime[0] = obj.projectStartDate
|
|
|
- this.form.projectTime[1] = obj.projectEndDate
|
|
|
- }
|
|
|
- this.form = obj || {}
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- handleSuccess(file) {
|
|
|
- this.form.licensePath = file.url;
|
|
|
- this.form.fileName = file.name;
|
|
|
+ import { getProjectInfoApi,getProjectInfoAdminApi,getProjectInfoCommonApi } from "@/api/enterprise/project/project"
|
|
|
+ export default {
|
|
|
+ name: 'projectInfo',
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ loading: false,
|
|
|
+ id: undefined,
|
|
|
+ roleType: '',
|
|
|
+ info: {
|
|
|
+ },
|
|
|
+ }
|
|
|
},
|
|
|
- handleSaleSuccess(files) {
|
|
|
- files.forEach(item => {
|
|
|
- this.form.attachIds.push(item.response.data.id)
|
|
|
- });
|
|
|
+ props: {
|
|
|
+ projectOwner: {
|
|
|
+ type: String
|
|
|
+ },
|
|
|
},
|
|
|
- submitForm() {
|
|
|
- this.$refs.form.validate(valid => {
|
|
|
- if(valid) {
|
|
|
- this.loading = true
|
|
|
- editProjectApi(this.form).then(res => {
|
|
|
- this.loading = false
|
|
|
- this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
- this.$router.go(-1);
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- watch: {
|
|
|
- 'entProjectList': {
|
|
|
- immediate: true,
|
|
|
- handler (val) {
|
|
|
- this.form.entProjectList = this.entProjectList || {}
|
|
|
+ computed: {
|
|
|
+ scopeId() {
|
|
|
+ return this.$store.state.user.scopeId
|
|
|
+ },
|
|
|
+ roles() {
|
|
|
+ return this.$store.state.user.roles
|
|
|
}
|
|
|
},
|
|
|
- 'form.projectTime'(val) {
|
|
|
- if(this.form.projectTime) {
|
|
|
- this.form.projectStartDate = this.form.projectTime[0]
|
|
|
- this.form.projectEndDate = this.form.projectTime[1]
|
|
|
- }else {
|
|
|
- this.form.projectStartDate = ''
|
|
|
- this.form.projectEndDate = ''
|
|
|
+ created () {
|
|
|
+ this.id = this.$route.params.id || undefined;
|
|
|
+ this.roleType = this.roles.join(',')
|
|
|
+ if(this.id) {
|
|
|
+ this.getData()
|
|
|
}
|
|
|
},
|
|
|
- 'form.lisenceTime'(val) {
|
|
|
- if(this.form.lisenceTime) {
|
|
|
- this.form.techEndDate = this.form.lisenceTime[1]
|
|
|
- this.form.techStartDate = this.form.lisenceTime[0]
|
|
|
- }else {
|
|
|
- this.form.techStartDate = ''
|
|
|
- this.form.techEndDate = ''
|
|
|
+ methods: {
|
|
|
+ //判断是科德管理员 还是企业角色
|
|
|
+ getData() {
|
|
|
+ getProjectInfoCommonApi(this.id).then(res => {
|
|
|
+ if(this.projectOwner == '1') {
|
|
|
+ this.info = res.data.entProject || {}
|
|
|
+ }else if(this.projectOwner == '2') {
|
|
|
+ this.info = res.data.techProject || {}
|
|
|
+ }else if(this.projectOwner == '3') {
|
|
|
+ this.info = res.data.finProject || {}
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route); // 关闭当前tab
|
|
|
+ this.$router.go(-1);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style rel="stylesheet/scss" lang="scss">
|
|
|
-
|
|
|
-</style>
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+</style>
|