panhui před 4 roky
rodič
revize
f9e93afe16

+ 96 - 0
src/main/vue/src/mixins/internationalPatent.js

@@ -0,0 +1,96 @@
+export default {
+    data() {
+        return {
+            statusOptions: [
+                {
+                    label: '申请阶段',
+                    value: 'APPLY_STAGE',
+                    type: '',
+                    workflows: [
+                        { label: '待添加供应商', value: 'ADD_SUPPLIERS' },
+                        { label: '待提交供应商材料', value: 'SUPPLIER_MATERIALS' },
+                        { label: '待维护案件', value: 'MAINTAIN_CASE' },
+                        { label: '待上传答复通知', value: 'REPLY_TO_NOTICE' }
+                    ]
+                },
+                {
+                    label: '实审阶段',
+                    value: 'SUBSTANTIVE_STAGE',
+                    type: 'warning',
+                    workflows: [
+                        { label: '待确定答复意向', value: 'PENDING_REVIEW' },
+                        { label: '不答复终止', value: 'NO_REPLY' },
+                        { label: '上传答复意见书', value: 'REPLY_SUBMISSIONS' }
+                    ]
+                },
+                {
+                    label: '复审阶段',
+                    value: 'REVIEW_STAGE',
+                    type: 'warning',
+                    workflows: [{ label: '待确定答复结果', value: 'REPLY_RESULT' }]
+                },
+                {
+                    label: '授权阶段',
+                    value: 'GRANT_STAGE',
+                    type: 'info',
+                    workflows: [
+                        { label: '待办登', value: 'PENDING_REGISTER' },
+                        { label: '待办登', value: 'PAYMENT_REGISTER' },
+                        { label: '办理登记', value: 'REGISTER' },
+                        { label: '待维护年费信息', value: 'ANNUAL_FEE' }
+                    ]
+                },
+                {
+                    label: '已完成',
+                    value: 'COMPLETED',
+                    type: 'end',
+                    workflows: [{ label: '已完成', value: 'COMPLETED' }]
+                }
+            ],
+            typeOptions: [
+                { label: '发明专利', value: 'INVENTION' },
+                { label: '实用新型专利', value: 'UTILITY_MODEL' },
+                { label: '外观设计专利', value: 'APPEARANCE_DESIGN' }
+            ]
+        };
+    },
+    computed: {
+        workflowOptions() {
+            return [...this.statusOptions]
+                .map(item => {
+                    return item.workflows;
+                })
+                .flat();
+        }
+    },
+    methods: {
+        applyStatusFormatter(row, column, cellValue, index) {
+            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
+            if (selectedOption) {
+                return selectedOption.label;
+            }
+            return '';
+        },
+        typeFormatter(row, column, cellValue, index) {
+            let selectedOption = this.typeOptions.find(i => i.value === cellValue);
+            if (selectedOption) {
+                return selectedOption.label;
+            }
+            return '';
+        },
+        statusFormatter(row, column, cellValue, index) {
+            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
+            if (selectedOption) {
+                return selectedOption.label;
+            }
+            return '';
+        },
+        workflowFormatter(row, column, cellValue, index) {
+            let selectedOption = this.workflowOptions.find(i => i.value === cellValue);
+            if (selectedOption) {
+                return selectedOption.label;
+            }
+            return '';
+        }
+    }
+};

+ 139 - 0
src/main/vue/src/views/InternationalPatentAdd.vue

@@ -0,0 +1,139 @@
+<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="136px"
+                    label-position="right"
+                    size="small"
+                    style="max-width: 500px;"
+                >
+                    <el-form-item prop="workflow" label="流程">
+                        <el-select v-model="formData.workflow" clearable filterable placeholder="请选择">
+                            <el-option
+                                v-for="item in workflowOptions"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item prop="pctApplyNo" label="pct申请号">
+                        <el-input v-model="formData.pctApplyNo"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="pctApplyDate" label="pct申请日">
+                        <el-date-picker
+                            v-model="formData.pctApplyDate"
+                            type="date"
+                            value-format="yyyy-MM-dd"
+                            placeholder="选择日期"
+                        >
+                        </el-date-picker>
+                    </el-form-item>
+                    <el-form-item prop="actualOfficialAmount" label="官费实际金额">
+                        <el-input-number type="number" v-model="formData.actualOfficialAmount"></el-input-number>
+                    </el-form-item>
+                    <el-form-item prop="replyStatus" label="答复意见状态">
+                        <el-input v-model="formData.replyStatus"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="officialCirculation" label="是否继续官文流转">
+                        <el-switch v-model="formData.officialCirculation"></el-switch>
+                    </el-form-item>
+                    <el-form-item class="form-submit">
+                        <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() {
+        if (this.$route.query.id) {
+            this.$http
+                .get('internationalPatent/get/' + this.$route.query.id)
+                .then(res => {
+                    this.formData = res;
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$message.error(e.error);
+                });
+        }
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {},
+            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' }
+            ]
+        };
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            let data = { ...this.formData };
+
+            this.saving = true;
+            this.$http
+                .post('/internationalPatent/save', data, { body: 'json' })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.$message.error(e.error);
+                });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/internationalPatent/del/${this.formData.id}`);
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                })
+                .catch(e => {
+                    if (e !== 'cancel') {
+                        console.log(e);
+                        this.$message.error((e || {}).error || '删除失败');
+                    }
+                });
+        }
+    }
+};
+</script>
+<style lang="less" scoped></style>

+ 145 - 0
src/main/vue/src/views/InternationalPatentEdit1.vue

@@ -0,0 +1,145 @@
+<template>
+    <div class="edit-view">
+        <page-title>
+            <el-button @click="$router.go(-1)">取消</el-button>
+            <el-button @click="del" :loading="$store.state.fetchingData" type="danger" v-if="formData.id">
+                删除
+            </el-button>
+            <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+        </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="136px"
+                    label-position="right"
+                    size="small"
+                    style="max-width: 500px;"
+                >
+                    <el-form-item prop="workflow" label="流程">
+                        <el-select v-model="formData.workflow" clearable filterable placeholder="请选择">
+                            <el-option
+                                v-for="item in workflowOptions"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item prop="pctApplyNo" label="pct申请号">
+                        <el-input v-model="formData.pctApplyNo"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="pctApplyDate" label="pct申请日">
+                        <el-date-picker
+                            v-model="formData.pctApplyDate"
+                            type="date"
+                            value-format="yyyy-MM-dd"
+                            placeholder="选择日期"
+                        >
+                        </el-date-picker>
+                    </el-form-item>
+                    <el-form-item prop="actualOfficialAmount" label="官费实际金额">
+                        <el-input-number type="number" v-model="formData.actualOfficialAmount"></el-input-number>
+                    </el-form-item>
+                    <el-form-item prop="replyStatus" label="答复意见状态">
+                        <el-input v-model="formData.replyStatus"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="officialCirculation" label="是否继续官文流转">
+                        <el-switch v-model="formData.officialCirculation"></el-switch>
+                    </el-form-item>
+                    <el-form-item class="form-submit">
+                        <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() {
+        if (this.$route.query.id) {
+            this.$http
+                .get('internationalPatent/get/' + this.$route.query.id)
+                .then(res => {
+                    this.formData = res;
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$message.error(e.error);
+                });
+        }
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {},
+            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' }
+            ]
+        };
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            let data = { ...this.formData };
+
+            this.saving = true;
+            this.$http
+                .post('/internationalPatent/save', data, { body: 'json' })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.$message.error(e.error);
+                });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/internationalPatent/del/${this.formData.id}`);
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                })
+                .catch(e => {
+                    if (e !== 'cancel') {
+                        console.log(e);
+                        this.$message.error((e || {}).error || '删除失败');
+                    }
+                });
+        }
+    }
+};
+</script>
+<style lang="less" scoped></style>