|
@@ -9,8 +9,8 @@
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <el-form-item v-if="form.reportType == 3" label="标的产品" prop="signProjectId">
|
|
|
|
- <el-autocomplete v-model="form.signProjectId" value-key="name" v-SelectLazyLoading="productLoad"
|
|
|
|
|
|
+ <el-form-item v-if="form.reportType == 3" label="标的产品" prop="signProjectIds">
|
|
|
|
+ <el-autocomplete v-model="form.signProjectIds" value-key="name" v-SelectLazyLoading="productLoad"
|
|
:fetch-suggestions="querySearchProduct" placeholder="请输入标的产品" :trigger-on-focus="false"
|
|
:fetch-suggestions="querySearchProduct" placeholder="请输入标的产品" :trigger-on-focus="false"
|
|
@select="handleSelectProduct" @change="handleChangeProduct"
|
|
@select="handleSelectProduct" @change="handleChangeProduct"
|
|
style="width: 100%;"></el-autocomplete>
|
|
style="width: 100%;"></el-autocomplete>
|
|
@@ -256,11 +256,10 @@ export default {
|
|
props: {},
|
|
props: {},
|
|
data() {
|
|
data() {
|
|
const isExist = (rule, value, callback) => {
|
|
const isExist = (rule, value, callback) => {
|
|
- if (!this.form.signPatentNo && !this.form.signProjectId) {//没有专利号进入报错提示
|
|
|
|
|
|
+ if (!this.form.signPatentNo && !this.form.signProjectIds) {//没有专利号进入报错提示
|
|
if ([3].includes(Number(this.form.reportType))) {
|
|
if ([3].includes(Number(this.form.reportType))) {
|
|
var text = '请输入标的产品'
|
|
var text = '请输入标的产品'
|
|
} else {
|
|
} else {
|
|
- console.log(this.form.signProjectId);
|
|
|
|
var text = '请输入标的专利号'
|
|
var text = '请输入标的专利号'
|
|
}
|
|
}
|
|
callback(new Error(text))
|
|
callback(new Error(text))
|
|
@@ -298,7 +297,7 @@ export default {
|
|
//表单规则
|
|
//表单规则
|
|
rules: {
|
|
rules: {
|
|
name: [{ required: true, message: '请输入报告名称', trigger: 'blur' },],
|
|
name: [{ required: true, message: '请输入报告名称', trigger: 'blur' },],
|
|
- signProjectId: [{ required: true, validator: isExist, trigger: 'blur' },],//产品
|
|
|
|
|
|
+ signProjectIds: [{ required: true, validator: isExist, trigger: 'blur' },],//产品
|
|
signPatentNo: [{ required: true, validator: isExist, trigger: 'blur' },],//专利
|
|
signPatentNo: [{ required: true, validator: isExist, trigger: 'blur' },],//专利
|
|
headId: [{ required: true, message: '请选择负责人', trigger: 'change' },],
|
|
headId: [{ required: true, message: '请选择负责人', trigger: 'change' },],
|
|
entrustId: [{ required: true, message: '请选择委托方', trigger: 'change' },],
|
|
entrustId: [{ required: true, message: '请选择委托方', trigger: 'change' },],
|
|
@@ -589,6 +588,7 @@ export default {
|
|
var a = ''
|
|
var a = ''
|
|
this.form = JSON.parse(JSON.stringify(form))
|
|
this.form = JSON.parse(JSON.stringify(form))
|
|
if (this.form.id) {
|
|
if (this.form.id) {
|
|
|
|
+ this.$set(this.form,'signProjectIds',this.form.signPatentNo || this.form.signProjectId)
|
|
if (this.$reportPermission(this.form.id, [0, 1])) {
|
|
if (this.$reportPermission(this.form.id, [0, 1])) {
|
|
a = '编辑'
|
|
a = '编辑'
|
|
} else {
|
|
} else {
|
|
@@ -641,12 +641,12 @@ export default {
|
|
async queryProduct() {
|
|
async queryProduct() {
|
|
let params = {
|
|
let params = {
|
|
...this.productList.queryParams,
|
|
...this.productList.queryParams,
|
|
- name:this.productList.name
|
|
|
|
|
|
+ searchQuery:`name=${this.productList.name}`,
|
|
}
|
|
}
|
|
await this.$api.queryProduct(params).then(res => {
|
|
await this.$api.queryProduct(params).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
- this.productList.data.push(...res.data)
|
|
|
|
- this.productList.queryParams.total = res.pageColumn.total
|
|
|
|
|
|
+ this.productList.data.push(...res.data.data)
|
|
|
|
+ this.productList.queryParams.total = res.data.total
|
|
this.productList.cb(this.productList.data);
|
|
this.productList.cb(this.productList.data);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -659,13 +659,20 @@ export default {
|
|
this.productList.cb = cb
|
|
this.productList.cb = cb
|
|
await this.queryProduct()
|
|
await this.queryProduct()
|
|
},
|
|
},
|
|
- // 产品输入框
|
|
|
|
|
|
+ // 产品输入框输入
|
|
handleChangeProduct(val) {
|
|
handleChangeProduct(val) {
|
|
- this.$set(this.form,'signProjectId',val)
|
|
|
|
|
|
+ this.$set(this.form, 'signPatentNo', val)
|
|
|
|
+ if (this.form.signProjectId) {
|
|
|
|
+ this.form.signProjectId=''
|
|
|
|
+ }
|
|
this.$set(this.form, 'name', val + 'FTO调查')
|
|
this.$set(this.form, 'name', val + 'FTO调查')
|
|
},
|
|
},
|
|
// 产品输入框选择
|
|
// 产品输入框选择
|
|
handleSelectProduct(val) {
|
|
handleSelectProduct(val) {
|
|
|
|
+ this.$set(this.form, 'signProjectId', val.id)
|
|
|
|
+ if (this.form.signProjectId) {
|
|
|
|
+ this.form.signPatentNo=''
|
|
|
|
+ }
|
|
this.$set(this.form, 'name', val.name + 'FTO调查')
|
|
this.$set(this.form, 'name', val.name + 'FTO调查')
|
|
},
|
|
},
|
|
|
|
|
|
@@ -814,10 +821,8 @@ export default {
|
|
|
|
|
|
//提交填写的信息
|
|
//提交填写的信息
|
|
submit() {
|
|
submit() {
|
|
- console.log();
|
|
|
|
this.$refs.reportForm.validate((valid) => {
|
|
this.$refs.reportForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log(2);
|
|
|
|
this.form.type = 2//项目类型(1专利数据库 2报告 3专利挖掘项目)
|
|
this.form.type = 2//项目类型(1专利数据库 2报告 3专利挖掘项目)
|
|
// 判断文件是否都上传完毕
|
|
// 判断文件是否都上传完毕
|
|
this.$commonJS.allUploadFile(this.form)
|
|
this.$commonJS.allUploadFile(this.form)
|
|
@@ -861,7 +866,6 @@ export default {
|
|
this.showTask = true
|
|
this.showTask = true
|
|
this.$set(this.taskForm, 'name', this.form.name + '审核')
|
|
this.$set(this.taskForm, 'name', this.form.name + '审核')
|
|
}).catch(action => {//不审核直接创建报告
|
|
}).catch(action => {//不审核直接创建报告
|
|
- console.log(3);
|
|
|
|
// 直接完成传true
|
|
// 直接完成传true
|
|
// formData.ifFinish = true
|
|
// formData.ifFinish = true
|
|
// 调用创建报告公用,接口
|
|
// 调用创建报告公用,接口
|