Commit a0ea7fe8 authored by 张伯涛's avatar 张伯涛

修改

parent 33c8d16b
...@@ -12,14 +12,24 @@ export function getDicts(dictType) { ...@@ -12,14 +12,24 @@ export function getDicts(dictType) {
} }
}) })
} }
/** 通过企业名称获取数据*/
export function getListByName(data) { export function getListByName(data) {
return request({ return request({
url: '/policyRecommendation/enterpriseInfo/getEnterpriseByName/' + data, url: '/policyRecommendation/enterpriseInfo/getEnterpriseByName/' + data,
method: 'get' method: 'get'
}) })
} }
/** 点击获取报告提交表单*/
export function submitForm(data) {
return request({
url: '/policyRecommendation/enterpriseInfo/addOrUpdateUserEnterprise ',
method: 'post',
data,
headers: {
'Content-Type': 'application/json'
}
})
}
export function listPolicy(data) { export function listPolicy(data) {
const { pageNum, pageSize } = data const { pageNum, pageSize } = data
return request({ return request({
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
clearable clearable
:append-to-body="false" :append-to-body="false"
class="sortType-class" class="sortType-class"
value-format="yyyy-MM-dd"
style="width: 100%" style="width: 100%"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
...@@ -74,7 +75,7 @@ ...@@ -74,7 +75,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="注册地址" prop="address"> <el-form-item label="注册地址" prop="address">
<el-cascader <el-cascader
v-model="form.address" v-model="address"
:popper-append-to-body="false" :popper-append-to-body="false"
class="sortType-class" class="sortType-class"
style="width: 100%" style="width: 100%"
...@@ -225,10 +226,10 @@ ...@@ -225,10 +226,10 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="营业收入" prop="income" :show-overflow-tooltip="true"> <el-table-column align="center" label="营业收入" prop="operatingIncome" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.trim="scope.row.income" v-model.trim="scope.row.operatingIncome"
clearable clearable
placeholder="请输入营业收入" placeholder="请输入营业收入"
> >
...@@ -236,10 +237,21 @@ ...@@ -236,10 +237,21 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="税收" prop="taxRevenue" :show-overflow-tooltip="true"> <el-table-column align="center" label="主营业务收入" prop="mainBusinessIncome" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.trim="scope.row.taxRevenue" v-model.trim="scope.row.mainBusinessIncome"
clearable
placeholder="请输入营业收入"
>
<span slot="suffix">万元</span>
</el-input>
</template>
</el-table-column>
<el-table-column align="center" label="税收" prop="tax" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input
v-model.trim="scope.row.tax"
clearable clearable
placeholder="请输入税收" placeholder="请输入税收"
> >
...@@ -247,10 +259,10 @@ ...@@ -247,10 +259,10 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="研发投入" prop="investment" :show-overflow-tooltip="true"> <el-table-column align="center" label="研发投入" prop="researchInvestment" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.trim="scope.row.investment" v-model.trim="scope.row.researchInvestment"
clearable clearable
placeholder="请输入研发投入" placeholder="请输入研发投入"
> >
...@@ -316,6 +328,7 @@ ...@@ -316,6 +328,7 @@
clearable clearable
class="sortType-class" class="sortType-class"
style="width: 100%" style="width: 100%"
value-format="yyyy-MM-dd"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
/> />
...@@ -384,7 +397,7 @@ ...@@ -384,7 +397,7 @@
// import YaInputDigit from '@/views/PolicyDirect/components/YaInputDigit' // import YaInputDigit from '@/views/PolicyDirect/components/YaInputDigit'
import { mapActions, mapGetters } from 'vuex' import { mapActions, mapGetters } from 'vuex'
import { stringIsEmpty } from '@/utils/common' import { stringIsEmpty } from '@/utils/common'
import { getAddressByCode, policyTabGetByName, getListByName } from '@/views/PolicyDirect/api' import { getAddressByCode, policyTabGetByName, getListByName, submitForm } from '@/views/PolicyDirect/api'
export default { export default {
name: 'PolicyRecommendation', name: 'PolicyRecommendation',
...@@ -430,6 +443,8 @@ export default { ...@@ -430,6 +443,8 @@ export default {
value: '5' value: '5'
} }
], ],
enterpriseNotExist: false, // 企业是否存在
address: '',
form: { form: {
name: '', name: '',
socialCreditCode: '', socialCreditCode: '',
...@@ -549,7 +564,7 @@ export default { ...@@ -549,7 +564,7 @@ export default {
enterpriseTypeId: [{ enterpriseTypeId: [{
required: true, required: true,
message: '企业类型不能为空', message: '企业类型不能为空',
trigger: 'blur' trigger: 'change'
}] }]
}, },
// 地址信息 // 地址信息
...@@ -596,6 +611,7 @@ export default { ...@@ -596,6 +611,7 @@ export default {
if (name) { if (name) {
getListByName(name).then(res => { getListByName(name).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.enterpriseNotExist = false
this.form = res.data this.form = res.data
this.form.fwEnterpriseOperateRelativeList = [ this.form.fwEnterpriseOperateRelativeList = [
{ {
...@@ -626,12 +642,37 @@ export default { ...@@ -626,12 +642,37 @@ export default {
researchInvestment: '' researchInvestment: ''
} }
] ]
this.form.intellectualPropertyData = [
{
intellectualProperty: '',
patentsNumber: '',
trademarksNumber: '',
softwareWorksNumber: ''
}
]
this.form.projectInformationData = [
{
projectInvestment: '',
implementationTime: '',
projectStatus: ''
} }
]
this.form.carrierInformation = [
{
carrierDominanceArea: '',
incubationCompanies: '',
graduateCompanies: ''
}
]
}
}).catch(() => {
this.enterpriseNotExist = true
}) })
} }
}, },
/** 清空*/ /** 清空*/
handleClearForm() { handleClearForm() {
this.address = ''
this.form = { this.form = {
name: '', name: '',
socialCreditCode: '', socialCreditCode: '',
...@@ -718,29 +759,102 @@ export default { ...@@ -718,29 +759,102 @@ export default {
}, },
/** 获取报告*/ /** 获取报告*/
handleGetReports() { handleGetReports() {
console.log('form.enterpriseTypeId', this.form.enterpriseTypeId)
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
if (this.enterpriseNotExist) {
this.$message({
type: 'error',
message: '当前企业不存在,无法获取报告'
})
} else {
this.arrayToString() // 提交时数组转字符串 this.arrayToString() // 提交时数组转字符串
this.dataProcess() // 把前端放在列表里的字段拿出来
submitForm(this.form).then(res => {
if(res.code === 200) {
this.$message({
type: 'success',
message: '操作成功'
})
}
})
}
} }
}) })
}, },
/** 提交时数组转字符串*/ /** 提交时数组转字符串*/
arrayToString() { arrayToString() {
// 企业性质 // 地址
if (this.form.enterpriseNature) { if (this.address.length > 0) {
this.form.enterpriseNature = this.form.enterpriseNature.toString() this.form.address = this.address.join('')
}
// // 企业性质
// if (this.form.enterpriseNature) {
// this.form.enterpriseNature = this.form.enterpriseNature.toString()
// }
// // 所属领域
// if (this.form.enterpriseField) {
// this.form.enterpriseField = this.form.enterpriseField.toString()
// }
// // 企业资质
// if (this.form.enterpriseQualifications) {
// this.form.enterpriseQualifications = this.form.enterpriseQualifications.toString()
// }
// // 企业技术能力
// if (this.form.enterpriseAblity) {
// this.form.enterpriseAblity = this.form.enterpriseAblity.toString()
// }
},
/** 数据处理,把前端放在列表里的字段拿出来*/
dataProcess() {
// 知识产权table
if (this.form.intellectualPropertyData.length > 0) {
// 知识产权总数
if (this.form.intellectualPropertyData[0].intellectualProperty) {
this.form.intellectualProperty = this.form.intellectualPropertyData[0].intellectualProperty
}
// 专利总数
if (this.form.intellectualPropertyData[0].patentsNumber) {
this.form.patentsNumber = this.form.intellectualPropertyData[0].patentsNumber
}
// 注册商标总数
if (this.form.intellectualPropertyData[0].trademarksNumber) {
this.form.trademarksNumber = this.form.intellectualPropertyData[0].trademarksNumber
}
// 软件著作总数
if (this.form.intellectualPropertyData[0].softwareWorksNumber) {
this.form.softwareWorksNumber = this.form.intellectualPropertyData[0].softwareWorksNumber
}
}
// 项目信息
if (this.form.projectInformationData.length > 0) {
// 项目总投资
if (this.form.projectInformationData[0].projectInvestment) {
this.form.projectInvestment = this.form.projectInformationData[0].projectInvestment
}
// 项目实施时间
if (this.form.projectInformationData[0].implementationTime) {
this.form.implementationTime = this.form.projectInformationData[0].implementationTime
}
// 项目情况
if (this.form.projectInformationData[0].projectStatus) {
this.form.projectStatus = this.form.projectInformationData[0].projectStatus
}
}
// 载体信息
if (this.form.carrierInformation.length > 0) {
// 载体支配面积
if (this.form.carrierInformation[0].carrierDominanceArea) {
this.form.carrierDominanceArea = this.form.carrierInformation[0].carrierDominanceArea
} }
// 所属领域 // 在孵企业数
if (this.form.enterpriseField) { if (this.form.carrierInformation[0].incubationCompanies) {
this.form.enterpriseField = this.form.enterpriseField.toString() this.form.incubationCompanies = this.form.carrierInformation[0].incubationCompanies
} }
// 企业资质 // 毕业企业数
if (this.form.enterpriseQualifications) { if (this.form.carrierInformation[0].graduateCompanies) {
this.form.enterpriseQualifications = this.form.enterpriseQualifications.toString() this.form.graduateCompanies = this.form.carrierInformation[0].graduateCompanies
} }
// 企业技术能力
if (this.form.enterpriseAblity) {
this.form.enterpriseAblity = this.form.enterpriseAblity.toString()
} }
}, },
/** 获取企业类型,企业性质,企业技术能力,企业资质,所属领域的下拉*/ /** 获取企业类型,企业性质,企业技术能力,企业资质,所属领域的下拉*/
......
...@@ -133,16 +133,16 @@ ...@@ -133,16 +133,16 @@
忘记密码 忘记密码
</div> </div>
</div> </div>
<div v-if="loginType === 'password' || loginType === 'phone'"> <!-- <div v-if="loginType === 'password' || loginType === 'phone'">-->
<div class="otherWay"> <!-- <div class="otherWay">-->
<el-divider /> <!-- <el-divider />-->
<div class="otherBtn">其它登录方式</div> <!-- <div class="otherBtn">其它登录方式</div>-->
<el-divider /> <!-- <el-divider />-->
</div> <!-- </div>-->
<div style="text-align: center"> <!-- <div style="text-align: center">-->
<img :src="weixinLogo" class="sc-img"> <!-- <img :src="weixinLogo" class="sc-img">-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> </div>
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment