|
@@ -3,7 +3,7 @@
|
|
<van-row>
|
|
<van-row>
|
|
<van-col span="24" class="main">
|
|
<van-col span="24" class="main">
|
|
<van-col span="24" class="one">
|
|
<van-col span="24" class="one">
|
|
- <van-form @submit="onSubmit" label-width="6em">
|
|
|
|
|
|
+ <van-form @submit="onSubmit" label-width="7em">
|
|
<van-field
|
|
<van-field
|
|
v-model="form.create_number"
|
|
v-model="form.create_number"
|
|
name="create_number"
|
|
name="create_number"
|
|
@@ -34,18 +34,16 @@
|
|
@click="selectDate('success_date')"
|
|
@click="selectDate('success_date')"
|
|
:rules="[{ required: false, message: '公开(公告)日' }]"
|
|
:rules="[{ required: false, message: '公开(公告)日' }]"
|
|
/>
|
|
/>
|
|
- <van-col span="24" class="inventor">
|
|
|
|
- <van-col span="24" class="txt">发明人</van-col>
|
|
|
|
- <van-col span="24" class="btn">
|
|
|
|
- <van-button type="info" size="small" @click.prevent="toSelect('inventor')">选择发明人</van-button>
|
|
|
|
- </van-col>
|
|
|
|
- <van-col span="24" class="list">
|
|
|
|
- <van-col span="12" class="list_1" v-for="(item, index) in form.inventor" :key="index">
|
|
|
|
- <p class="textOver">{{ index + 1 }}-{{ item.name }}</p>
|
|
|
|
- <van-button type="danger" size="mini" @click.prevent="delInv(item, 'inventor')">删除</van-button>
|
|
|
|
- </van-col>
|
|
|
|
- </van-col>
|
|
|
|
- </van-col>
|
|
|
|
|
|
+ <van-field
|
|
|
|
+ v-model="form.inventor"
|
|
|
|
+ name="inventor"
|
|
|
|
+ label="发明人"
|
|
|
|
+ placeholder="请输入发明人"
|
|
|
|
+ type="textarea"
|
|
|
|
+ autosize
|
|
|
|
+ rows="1"
|
|
|
|
+ :rules="[{ required: true, message: '请输入发明人' }]"
|
|
|
|
+ />
|
|
<van-field
|
|
<van-field
|
|
v-model="form.agent"
|
|
v-model="form.agent"
|
|
name="agent"
|
|
name="agent"
|
|
@@ -99,7 +97,6 @@
|
|
<template #input>
|
|
<template #input>
|
|
<van-radio-group v-model="form.type" direction="horizontal">
|
|
<van-radio-group v-model="form.type" direction="horizontal">
|
|
<van-radio name="发明申请">发明申请</van-radio>
|
|
<van-radio name="发明申请">发明申请</van-radio>
|
|
- <van-radio name="发明授权">发明授权</van-radio>
|
|
|
|
<van-radio name="实用新型">实用新型</van-radio>
|
|
<van-radio name="实用新型">实用新型</van-radio>
|
|
<van-radio name="外观设计">外观设计</van-radio>
|
|
<van-radio name="外观设计">外观设计</van-radio>
|
|
<van-radio name="PCT国际申请号">PCT国际申请号</van-radio>
|
|
<van-radio name="PCT国际申请号">PCT国际申请号</van-radio>
|
|
@@ -316,6 +313,18 @@
|
|
/>
|
|
/>
|
|
<!-- 选择日期公用弹框 -->
|
|
<!-- 选择日期公用弹框 -->
|
|
<van-calendar v-model="calendarShow" @confirm="calendarCon" :min-date="minDate" :max-date="maxDate" />
|
|
<van-calendar v-model="calendarShow" @confirm="calendarCon" :min-date="minDate" :max-date="maxDate" />
|
|
|
|
+ <van-col span="24" class="inventor">
|
|
|
|
+ <van-col span="24" class="txt">专利关联用户</van-col>
|
|
|
|
+ <van-col span="24" class="btn">
|
|
|
|
+ <van-button type="info" size="small" @click.prevent="toSelect('user_id')">选择用户</van-button>
|
|
|
|
+ </van-col>
|
|
|
|
+ <van-col span="24" class="list">
|
|
|
|
+ <van-col span="12" class="list_1" v-for="(item, index) in form.user_id" :key="index">
|
|
|
|
+ <p class="textOver">{{ index + 1 }}-{{ item.name }}</p>
|
|
|
|
+ <van-button type="danger" size="mini" @click.prevent="delInv(item, 'user_id')">删除</van-button>
|
|
|
|
+ </van-col>
|
|
|
|
+ </van-col>
|
|
|
|
+ </van-col>
|
|
<van-col span="24" class="btn">
|
|
<van-col span="24" class="btn">
|
|
<van-button type="info" size="small" native-type="submit">提交信息</van-button>
|
|
<van-button type="info" size="small" native-type="submit">提交信息</van-button>
|
|
</van-col>
|
|
</van-col>
|
|
@@ -324,7 +333,7 @@
|
|
</van-col>
|
|
</van-col>
|
|
</van-row>
|
|
</van-row>
|
|
<van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
|
|
<van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
|
|
- <van-col span="24" class="one" v-if="dialog.type == '1'">
|
|
|
|
|
|
+ <van-col span="24" class="one">
|
|
<van-col span="24" class="one_1">
|
|
<van-col span="24" class="one_1">
|
|
<van-search v-model="searchName" show-action placeholder="请输入联系电话" @search="searchUser">
|
|
<van-search v-model="searchName" show-action placeholder="请输入联系电话" @search="searchUser">
|
|
<template #action>
|
|
<template #action>
|
|
@@ -355,8 +364,8 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
-const { mapActions: personal } = createNamespacedHelpers('personal');
|
|
|
|
const { mapActions: upload } = createNamespacedHelpers('upload');
|
|
const { mapActions: upload } = createNamespacedHelpers('upload');
|
|
|
|
+const { mapActions: personal } = createNamespacedHelpers('personal');
|
|
var moment = require('moment');
|
|
var moment = require('moment');
|
|
export default {
|
|
export default {
|
|
name: 'form-1',
|
|
name: 'form-1',
|
|
@@ -370,16 +379,13 @@ export default {
|
|
maxDate: new Date(2050, 10, 1),
|
|
maxDate: new Date(2050, 10, 1),
|
|
calendarShow: false,
|
|
calendarShow: false,
|
|
calendar_type: '',
|
|
calendar_type: '',
|
|
- // 发明人
|
|
|
|
- dialog: { show: false, titla: '查询用户', type: '1' },
|
|
|
|
|
|
+ // 关联用户
|
|
type: '',
|
|
type: '',
|
|
- // 查询
|
|
|
|
searchName: '',
|
|
searchName: '',
|
|
list: [],
|
|
list: [],
|
|
limit: 3,
|
|
limit: 3,
|
|
total: 0,
|
|
total: 0,
|
|
- // 添加发明人
|
|
|
|
- addForm: {},
|
|
|
|
|
|
+ dialog: { show: false, titla: '查询用户' },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
@@ -391,30 +397,6 @@ export default {
|
|
onSubmit(value) {
|
|
onSubmit(value) {
|
|
if (value) this.$emit('onSubmit', { data: this.form });
|
|
if (value) this.$emit('onSubmit', { data: this.form });
|
|
},
|
|
},
|
|
- // 查询用户
|
|
|
|
- async searchUser({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
|
- if (this.searchName) info.phone = this.searchName;
|
|
|
|
- let res = await this.personalQuery({ skip, limit, ...info });
|
|
|
|
- if (this.$checkRes(res)) {
|
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 发明人,技术联系人
|
|
|
|
- toSelect(type) {
|
|
|
|
- this.$set(this, `type`, type);
|
|
|
|
- this.dialog = { show: true, title: '查询用户', type: '1' };
|
|
|
|
- },
|
|
|
|
- // 确认选择
|
|
|
|
- conFirm(data) {
|
|
|
|
- let user = { user_id: data.id, name: data.name };
|
|
|
|
- if (this.type == 'inventor') this.form[this.type].push(user);
|
|
|
|
- this.dialog = { show: false, title: '查询用户', type: '1' };
|
|
|
|
- },
|
|
|
|
- // 删除发明人&技术联系人
|
|
|
|
- delInv(data, type) {
|
|
|
|
- this.form[type].splice(this.form[type].indexOf(data), 1);
|
|
|
|
- },
|
|
|
|
// 打开选择日期弹框
|
|
// 打开选择日期弹框
|
|
selectDate(type) {
|
|
selectDate(type) {
|
|
this.$set(this, `calendar_type`, type);
|
|
this.$set(this, `calendar_type`, type);
|
|
@@ -436,6 +418,30 @@ export default {
|
|
const index = this.form[model].findIndex((f) => _.isEqual(f, file));
|
|
const index = this.form[model].findIndex((f) => _.isEqual(f, file));
|
|
this.form[model].splice(index, 1);
|
|
this.form[model].splice(index, 1);
|
|
},
|
|
},
|
|
|
|
+ // 关联用户
|
|
|
|
+ toSelect(type) {
|
|
|
|
+ this.$set(this, `type`, type);
|
|
|
|
+ this.dialog = { show: true, titla: '查询用户' };
|
|
|
|
+ },
|
|
|
|
+ // 确认选择用户
|
|
|
|
+ conFirm(data) {
|
|
|
|
+ let user = { user_id: data.id, name: data.name };
|
|
|
|
+ if (this.type == 'user_id') this.form[this.type].push(user);
|
|
|
|
+ this.dialog = { show: false, title: '查询用户' };
|
|
|
|
+ },
|
|
|
|
+ // 删除关联用户
|
|
|
|
+ delInv(data, type) {
|
|
|
|
+ this.form[type].splice(this.form[type].indexOf(data), 1);
|
|
|
|
+ },
|
|
|
|
+ // 查询用户
|
|
|
|
+ async searchUser({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
|
+ if (this.searchName) info.phone = this.searchName;
|
|
|
|
+ let res = await this.personalQuery({ skip, limit, ...info });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
@@ -463,7 +469,7 @@ export default {
|
|
.inventor {
|
|
.inventor {
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|
|
.txt {
|
|
.txt {
|
|
- padding: 5px 0px 0 18px;
|
|
|
|
|
|
+ padding: 5px 0px 0 15px;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
color: #666;
|
|
color: #666;
|
|
}
|
|
}
|