|
@@ -0,0 +1,313 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="edit-view">
|
|
|
|
|
+ <page-title> </page-title>
|
|
|
|
|
+ <div class="edit-view__content-wrapper">
|
|
|
|
|
+ <div class="edit-view__content-section">
|
|
|
|
|
+ <divider />
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ :model="formData"
|
|
|
|
|
+ :rules="rules"
|
|
|
|
|
+ ref="form"
|
|
|
|
|
+ label-width="116px"
|
|
|
|
|
+ label-position="right"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ style="width: 600px;"
|
|
|
|
|
+ hide-required-asterisk
|
|
|
|
|
+ inline
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form-item prop="name" label="专利名称">
|
|
|
|
|
+ <el-input style="width: 300px;" v-model="formData.name" placeholder="请输入"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="type" label="专利类型">
|
|
|
|
|
+ <el-radio-group v-model="formData.type">
|
|
|
|
|
+ <el-radio :label="item.value" v-for="(item, index) in typeOptions" :key="index">
|
|
|
|
|
+ {{ item.label }}
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item prop="clientPartnerId" label="选择客户">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ style="width: 300px;"
|
|
|
|
|
+ v-model="formData.clientPartnerId"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ filterable
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in clientPartnerIdOptions"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item prop="applicantName" label="申请人名称" class="input-pre-zh">
|
|
|
|
|
+ <el-input style="width: 236px;" v-model="formData.applicantName" placeholder="请输入中文名称">
|
|
|
|
|
+ <template #prepend>中</template></el-input
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="applicantEnName" label=" " label-width="10px" class="input-pre-en">
|
|
|
|
|
+ <el-input style="width: 236px;" v-model="formData.applicantEnName" placeholder="请输入英文名称">
|
|
|
|
|
+ <template #prepend>英</template></el-input
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ style="margin-bottom:10px;"
|
|
|
|
|
+ prop="applicantAddress"
|
|
|
|
|
+ label="申请人地址"
|
|
|
|
|
+ class="input-pre-zh error-end"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input style="width:480px;" v-model="formData.applicantAddress" placeholder="请输入中文地址">
|
|
|
|
|
+ <template #prepend>中</template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="applicantEnAddress" label=" " class="input-pre-en error-end">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ style="width:480px;"
|
|
|
|
|
+ v-model="formData.applicantEnAddress"
|
|
|
|
|
+ placeholder="请输入英文地址"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #prepend>英</template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ style="margin-bottom:10px;"
|
|
|
|
|
+ prop="inventorName"
|
|
|
|
|
+ label="发明人姓名"
|
|
|
|
|
+ class="input-pre-zh error-end"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input style="width:480px;" v-model="formData.inventorName" placeholder="请输入中文名称">
|
|
|
|
|
+ <template #prepend>中</template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="inventorEnName" label=" " class="input-pre-en error-end">
|
|
|
|
|
+ <el-input style="width:480px;" v-model="formData.inventorEnName" placeholder="请输入英文名称">
|
|
|
|
|
+ <template #prepend>英</template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="priorityNo" label="优先权号">
|
|
|
|
|
+ <el-input v-model="formData.priorityNo" placeholder="请输入..."></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item prop="priorityDate" label="优先权日">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="formData.priorityDate"
|
|
|
|
|
+ type="date"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ placeholder="选择日期"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="priorityCountry" label="优先权国别">
|
|
|
|
|
+ <el-input v-model="formData.priorityCountry" placeholder="请输入..."></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="PCT申请信息表单" prop="attachment1">
|
|
|
|
|
+ <attachment-upload
|
|
|
|
|
+ v-model="formData.attachment1"
|
|
|
|
|
+ :fileSize.sync="formData.attachment1.size"
|
|
|
|
|
+ ></attachment-upload>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="总委托书" prop="attachment2">
|
|
|
|
|
+ <attachment-upload
|
|
|
|
|
+ v-model="formData.attachment2"
|
|
|
|
|
+ :fileSize.sync="formData.attachment2.size"
|
|
|
|
|
+ ></attachment-upload>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="申请文稿" prop="attachment3">
|
|
|
|
|
+ <attachment-upload
|
|
|
|
|
+ v-model="formData.attachment3"
|
|
|
|
|
+ :fileSize.sync="formData.attachment3.size"
|
|
|
|
|
+ ></attachment-upload>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="自定义附件" prop="attachment4">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ v-model="formData.attachment4.attachmentName"
|
|
|
|
|
+ placeholder="请输入附件名称"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+
|
|
|
|
|
+ <attachment-upload
|
|
|
|
|
+ v-model="formData.attachment4"
|
|
|
|
|
+ :fileSize.sync="formData.attachment4.size"
|
|
|
|
|
+ ></attachment-upload>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item class="form-submit" label=" ">
|
|
|
|
|
+ <el-button @click="onSave" :loading="saving" size="default" type="primary">保存 </el-button>
|
|
|
|
|
+ <el-button @click="onDelete" :loading="saving" size="default" type="danger" v-if="formData.id"
|
|
|
|
|
+ >删除
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button @click="$router.go(-1)" size="default">取消</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: 'InternationalPatentEdit',
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/partner/all', { size: 1000, query: { del: false, type: 'CLIENT' } }, { body: 'json' })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.content.length > 0) {
|
|
|
|
|
+ res.content.forEach(item => {
|
|
|
|
|
+ this.clientPartnerIdOptions.push({
|
|
|
|
|
+ label: item.name,
|
|
|
|
|
+ value: item.id
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ this.$message.error(e.error);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ saving: false,
|
|
|
|
|
+ formData: {
|
|
|
|
|
+ attachment1: { attachmentName: 'PCT申请信息表单', fileName: '', url: '', remark: '', size: '' },
|
|
|
|
|
+ attachment2: { attachmentName: '总委托书', fileName: '', url: '', remark: '', size: '' },
|
|
|
|
|
+ attachment3: { attachmentName: '申请文稿', fileName: '', url: '', remark: '', size: '' },
|
|
|
|
|
+ attachment4: { attachmentName: '', fileName: '', url: '', remark: '', size: '' }
|
|
|
|
|
+ },
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ name: { required: true, message: '请输入专利名称', trigger: 'blur' },
|
|
|
|
|
+ type: { required: true, message: '请选择专利类型', trigger: 'change' },
|
|
|
|
|
+ clientPartnerId: { required: true, message: '请选择选择客户', trigger: 'change' },
|
|
|
|
|
+ applicantName: { required: true, message: '请输入申请人名称', trigger: 'blur' },
|
|
|
|
|
+ applicantEnName: { required: true, message: '请输入申请人英文名称', trigger: 'blur' },
|
|
|
|
|
+ applicantAddress: { required: true, message: '请输入申请人地址', trigger: 'blur' },
|
|
|
|
|
+ applicantEnAddress: { required: true, message: '请输入申请人英文地址', trigger: 'blur' },
|
|
|
|
|
+ inventorName: { required: true, message: '请输入发明人姓名', trigger: 'blur' },
|
|
|
|
|
+ inventorEnName: { required: true, message: '请输入发明人英文名称', trigger: 'blur' },
|
|
|
|
|
+ priorityNo: { required: true, message: '请输入优先权号', trigger: 'blur' },
|
|
|
|
|
+ priorityDate: { required: true, message: '请选择优先权日', trigger: 'change' },
|
|
|
|
|
+ priorityCountry: { required: true, message: '请输入优先权国别', trigger: 'blur' },
|
|
|
|
|
+ attachment1: {
|
|
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
|
|
+ if (!value.url) {
|
|
|
|
|
+ callback(new Error('请上传PCT申请信息表单'));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ trigger: 'change'
|
|
|
|
|
+ },
|
|
|
|
|
+ attachment2: {
|
|
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
|
|
+ if (!value.url) {
|
|
|
|
|
+ callback(new Error('请上传总委托书'));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ trigger: 'change'
|
|
|
|
|
+ },
|
|
|
|
|
+ attachment3: {
|
|
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
|
|
+ if (!value.url) {
|
|
|
|
|
+ callback(new Error('请上传申请文稿'));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ trigger: 'change'
|
|
|
|
|
+ },
|
|
|
|
|
+ attachment4: {
|
|
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
|
|
+ if (!value.url && value.name) {
|
|
|
|
|
+ callback(new Error('请上传' + value.name));
|
|
|
|
|
+ } else if (value.url && !value.name) {
|
|
|
|
|
+ callback(new Error('请输入附件名称'));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ trigger: 'change'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ workflowOptions: [
|
|
|
|
|
+ { label: '待添加供应商', value: 'ADD_SUPPLIERS' },
|
|
|
|
|
+ { label: '待提交供应商材料', value: 'SUPPLIER_MATERIALS' },
|
|
|
|
|
+ { label: '待维护案件', value: 'MAINTAIN_CASE' },
|
|
|
|
|
+ { label: '待官文流转', value: 'OFFICIAL_CIRCULATION' },
|
|
|
|
|
+ { label: '待补正答复', value: 'SUPPLEMENTARY_REPLY' },
|
|
|
|
|
+ { label: '待上传答复意见书', value: 'REPLY_SUBMISSION' },
|
|
|
|
|
+ { label: '待确认答复状态', value: 'CONFIRM_REPLY' },
|
|
|
|
|
+ { label: '已完成', value: 'COMPLETED' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ typeOptions: [
|
|
|
|
|
+ { label: '发明专利', value: 'INVENTION' },
|
|
|
|
|
+ { label: '实用新型专利', value: 'UTILITY_MODEL' },
|
|
|
|
|
+ { label: '外观设计专利', value: 'APPEARANCE_DESIGN' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ clientPartnerIdOptions: []
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ onSave() {
|
|
|
|
|
+ this.$refs.form.validate(valid => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ this.submit();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ submit() {
|
|
|
|
|
+ let data = { ...this.formData };
|
|
|
|
|
+
|
|
|
|
|
+ delete data.attachment1;
|
|
|
|
|
+ delete data.attachment2;
|
|
|
|
|
+ delete data.attachment3;
|
|
|
|
|
+ delete data.attachment4;
|
|
|
|
|
+
|
|
|
|
|
+ data.applyDate = format(new Date(), 'yyyy-MM-dd');
|
|
|
|
|
+ data.workflow = 'ADD_SUPPLIERS';
|
|
|
|
|
+
|
|
|
|
|
+ this.saving = true;
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/internationalPatent/saveDTO', data, { body: 'json' })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.uploadAttement(this.formData.attachment1, res.patentId);
|
|
|
|
|
+ this.uploadAttement(this.formData.attachment2, res.patentId);
|
|
|
|
|
+ this.uploadAttement(this.formData.attachment3, res.patentId);
|
|
|
|
|
+ if (this.formData.attachment4.url) {
|
|
|
|
|
+ this.uploadAttement(this.formData.attachment4, res.patentId);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.saving = false;
|
|
|
|
|
+ this.$message.success('成功');
|
|
|
|
|
+ this.$router.go(-1);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ this.saving = false;
|
|
|
|
|
+ this.$message.error(e.error);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ uploadAttement(info, patentId) {
|
|
|
|
|
+ let data = { ...info };
|
|
|
|
|
+ if (!data.url) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ data.patentId = patentId;
|
|
|
|
|
+ data.userId = this.$store.state.userInfo.id;
|
|
|
|
|
+ data.version = 1;
|
|
|
|
|
+ if (data.size) {
|
|
|
|
|
+ data.size += 'KB';
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$http.post('/attachment/save', data, { body: 'json' });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+<style lang="less" scoped></style>
|