|
@@ -0,0 +1,262 @@
|
|
|
+<template>
|
|
|
+ <div id="detail-1">
|
|
|
+ <van-row>
|
|
|
+ <van-col span="24" class="main">
|
|
|
+ <van-form @submit="onSubmit" label-width="6em">
|
|
|
+ <van-field v-model="form.create_number" name="create_number" label="申请号" :rules="[{ required: true, message: '申请号' }]" />
|
|
|
+ <van-field name="create_date" :value="form.create_date" label="申请日" placeholder="点击选择" @click="selectDate('create_date')" />
|
|
|
+ <van-field v-model="form.success_number" name="success_number" label="公开(公告)号" :rules="[{ required: true, message: '公开(公告)号' }]" />
|
|
|
+ <van-field name="success_date" :value="form.success_date" label="公开(公告)日" placeholder="点击选择" @click="selectDate('success_date')" />
|
|
|
+ <van-field v-model="form.name" name="name" label="标题" :rules="[{ required: true, message: '标题' }]" />
|
|
|
+ <van-field v-model="form.apply_personal" name="apply_personal" label="申请人" :rules="[{ required: true, message: '申请人' }]" />
|
|
|
+ <van-field name="type" label="专利类型" :rules="[{ required: true, message: '专利类型' }]">
|
|
|
+ <template #input>
|
|
|
+ <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-group>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <van-field name="term" label="专利有效性" :rules="[{ required: true, message: '专利有效性' }]">
|
|
|
+ <template #input>
|
|
|
+ <van-radio-group v-model="form.term" direction="horizontal">
|
|
|
+ <van-radio name="审中">审中</van-radio>
|
|
|
+ <van-radio name="有效">有效</van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <van-col span="24" class="inventor">
|
|
|
+ <van-col span="24" class="inventor_btn">
|
|
|
+ <van-button size="mini" type="info" @click="selectinventor('inventor')">选择发明人</van-button>
|
|
|
+ <!-- <van-button size="mini" type="info" @click="addinventor('inventor')">添加发明人</van-button> -->
|
|
|
+ </van-col>
|
|
|
+ <van-col span="24" class="inventor_list">
|
|
|
+ <span>发明人:</span>
|
|
|
+ <span v-for="(item, index) in form.inventor" :key="index">
|
|
|
+ {{ index + 1 }}-{{ item.name }}- <span style="color: #ff0000" @click="delInv(item)">删除</span>;
|
|
|
+ </span>
|
|
|
+ </van-col>
|
|
|
+ </van-col>
|
|
|
+ <van-field v-model="form.address" name="address" label="发明人地址" />
|
|
|
+ <van-field v-model="form.agent_personal" name="agent_personal" label="代理人" />
|
|
|
+ <van-field v-model="form.agent" name="agent" label="代理机构" />
|
|
|
+ <van-field v-model="form.abstract" name="abstract" label="摘要" rows="4" autosize type="textarea" />
|
|
|
+ <van-field name="img_url" label="图片">
|
|
|
+ <template #input>
|
|
|
+ <van-uploader
|
|
|
+ :fileList="form.img_url"
|
|
|
+ :max-count="1"
|
|
|
+ :after-read="(file) => toUpload(file, 'img_url')"
|
|
|
+ @delete="(file) => toDelete(file, 'img_url')"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <van-field name="status" label="状态" :rules="[{ required: true, message: '状态' }]">
|
|
|
+ <template #input>
|
|
|
+ <van-radio-group v-model="form.status" direction="horizontal">
|
|
|
+ <van-radio name="0">已授权</van-radio>
|
|
|
+ <van-radio name="1">已受理</van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <!-- 专利信息属性新增201-09-06 -->
|
|
|
+ <van-field v-model="form.nationality" name="nationality" label="公开国别" />
|
|
|
+ <van-field v-model="form.ipc_type" name="ipc_type" label="ipc主分类" />
|
|
|
+ <van-field v-model="form.onlegal_status" name="onlegal_status" label="当前法律状态" />
|
|
|
+ <van-field v-model="form.legal_status" name="legal_status" label="法律状态" />
|
|
|
+ <van-field name="law_date" :value="form.law_date" label="法律文书日期" placeholder="点击选择" @click="selectDate('law_date')" />
|
|
|
+ <van-field v-model="form.on_obligee" name="on_obligee" label="当前权利人" />
|
|
|
+ <van-field v-model="form.apply_address" name="apply_address" label="申请人地址(其他)" />
|
|
|
+ <van-field v-model="form.apply_other" name="apply_other" label="申请人(其他)" />
|
|
|
+ <van-field v-model="form.law_num" name="law_num" label="法律文书编号" />
|
|
|
+ <van-field name="first_opendate" :value="form.first_opendate" label="首次公开日" placeholder="点击选择" @click="selectDate('first_opendate')" />
|
|
|
+ <van-field name="empower_date" :value="form.empower_date" label="授权公告日" placeholder="点击选择" @click="selectDate('empower_date')" />
|
|
|
+ <van-field name="lose_date" :value="form.lose_date" label="失效日" placeholder="点击选择" @click="selectDate('lose_date')" />
|
|
|
+ <van-field name="examine_date" :value="form.examine_date" label="实际审查生效日" placeholder="点击选择" @click="selectDate('examine_date')" />
|
|
|
+ <van-field v-model="form.invention_design" name="invention_design" label="发明人(设计)其他" />
|
|
|
+ <!-- 选择日期公用弹框 -->
|
|
|
+ <van-calendar v-model="calendarShow" @confirm="calendarCon" :min-date="minDate" :max-date="maxDate" />
|
|
|
+ <div style="margin: 16px">
|
|
|
+ <van-button round block type="info" native-type="submit">提交</van-button>
|
|
|
+ </div>
|
|
|
+ </van-form>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-dialog class="dialog" v-model="show" title="查询用户" :show-cancel-button="false" :show-confirm-button="false" :closeOnClickOverlay="true">
|
|
|
+ <van-col span="24" class="two">
|
|
|
+ <van-col span="24" class="two_1">
|
|
|
+ <van-search v-model="searchName" show-action placeholder="请输入联系电话" @search="searchUser">
|
|
|
+ <template #action>
|
|
|
+ <div @click="searchUser">搜索</div>
|
|
|
+ </template>
|
|
|
+ </van-search>
|
|
|
+ </van-col>
|
|
|
+ <van-col span="24" class="two_2">
|
|
|
+ <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <van-col span="24" class="name"> {{ item.name }} </van-col>
|
|
|
+ <van-col span="24" class="other">
|
|
|
+ <van-col span="24" class="otherInfo">
|
|
|
+ 联系电话:<span>{{ item.phone }}</span>
|
|
|
+ </van-col>
|
|
|
+ </van-col>
|
|
|
+ <van-col span="24" class="btn">
|
|
|
+ <van-button type="info" size="mini" @click="conFirm(item)">确认选择</van-button>
|
|
|
+ </van-col>
|
|
|
+ </van-col>
|
|
|
+ <van-col span="24" class="page">
|
|
|
+ <page @search="searchUser" :limit="limit" :total="total"></page>
|
|
|
+ </van-col>
|
|
|
+ </van-col>
|
|
|
+ </van-col>
|
|
|
+ </van-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: upload } = createNamespacedHelpers('upload');
|
|
|
+const { mapActions: personal } = createNamespacedHelpers('personal');
|
|
|
+var moment = require('moment');
|
|
|
+export default {
|
|
|
+ name: 'detail-1',
|
|
|
+ props: {
|
|
|
+ form: { type: Object },
|
|
|
+ },
|
|
|
+ components: {},
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ minDate: new Date(2000, 10, 1),
|
|
|
+ maxDate: new Date(2050, 10, 1),
|
|
|
+ calendarShow: false,
|
|
|
+ calendar_type: '',
|
|
|
+ // 选择发明人&&技术联系人
|
|
|
+ show: false,
|
|
|
+ type: '',
|
|
|
+ // 属于手机号查询用户
|
|
|
+ searchName: '',
|
|
|
+ list: [],
|
|
|
+ limit: 4,
|
|
|
+ total: 0,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.searchUser();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...upload(['upload']),
|
|
|
+ ...personal({ perQuery: 'query' }),
|
|
|
+ onSubmit(values) {
|
|
|
+ this.$emit('onSubmit', values);
|
|
|
+ },
|
|
|
+ // 打开选择日期弹框
|
|
|
+ selectDate(type) {
|
|
|
+ this.$set(this, `calendar_type`, type);
|
|
|
+ this.calendarShow = true;
|
|
|
+ },
|
|
|
+ // 选中日期
|
|
|
+ calendarCon(date) {
|
|
|
+ this.$set(this.form, this.calendar_type, moment(date).format('YYYY-MM-DD'));
|
|
|
+ this.calendarShow = false;
|
|
|
+ },
|
|
|
+ async toUpload({ file }, model) {
|
|
|
+ // 上传,赋值
|
|
|
+ const res = await this.upload({ file, dir: 'file' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this.form, model, [{ name: res.name, url: res.uri }]);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toDelete(file, model) {
|
|
|
+ const index = this.form[model].findIndex((f) => _.isEqual(f, file));
|
|
|
+ this.form[model].splice(index, 1);
|
|
|
+ },
|
|
|
+ // 发明人
|
|
|
+ // 选择发明人&&技术联系人
|
|
|
+ selectinventor(type) {
|
|
|
+ this.$set(this, `type`, type);
|
|
|
+ this.show = true;
|
|
|
+ },
|
|
|
+ // 确认选择
|
|
|
+ conFirm(data) {
|
|
|
+ let user = { user_id: data.id, name: data.name };
|
|
|
+ if (this.type == 'inventor') this.form.inventor.push(user);
|
|
|
+ this.show = false;
|
|
|
+ },
|
|
|
+ // 查询用户
|
|
|
+ async searchUser({ skip = 0, limit = 5, ...info } = {}) {
|
|
|
+ info.code = 'JLKJQYCGD';
|
|
|
+ if (this.searchName) info.phone = this.searchName;
|
|
|
+ let res = await this.perQuery({ skip, limit, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 删除发明用户
|
|
|
+ delInv(data) {
|
|
|
+ this.form.inventor.splice(this.form.inventor.indexOf(data), 1);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ test: {
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {},
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.dialog {
|
|
|
+ /deep/.van-dialog__content {
|
|
|
+ height: 400px;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+ .two {
|
|
|
+ .list {
|
|
|
+ border-bottom: 1px dashed #ccc;
|
|
|
+ margin: 0 0 8px 0;
|
|
|
+ padding: 8px;
|
|
|
+ .name {
|
|
|
+ font-size: 16px;
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ }
|
|
|
+ .other {
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ .otherInfo {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #666;
|
|
|
+ span {
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+/deep/.van-dialog {
|
|
|
+ width: 95%;
|
|
|
+}
|
|
|
+.inventor {
|
|
|
+ padding: 8px 18px;
|
|
|
+ background-color: #fff;
|
|
|
+ .inventor_btn {
|
|
|
+ text-align: center;
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ }
|
|
|
+ .inventor_list {
|
|
|
+ font-size: 15px;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|