瀏覽代碼

公章管理

fz 2 年之前
父節點
當前提交
293c5e76d0

+ 24
- 0
src/api/officialSeal/officialSeal.js 查看文件

@@ -41,3 +41,27 @@ export function sealList(data) {
41 41
         params: data
42 42
     })
43 43
 }
44
+// 启用或者禁用公章
45
+export function updateSealLockStatus(data) {
46
+    return request({
47
+        url: '/deptIdentify/updateSealLockStatus',
48
+        method: 'post',
49
+        data: data
50
+    })
51
+}
52
+// 删除未认证的数据
53
+export function deleteSeal(data) {
54
+    return request({
55
+        url: '/deptIdentify/delete',
56
+        method: 'delete',
57
+        params: data
58
+    })
59
+}
60
+// 修改机构信息
61
+export function sealUpdate(data) {
62
+    return request({
63
+        url: '/deptIdentify/update',
64
+        method: 'put',
65
+        data: data
66
+    })
67
+}

+ 18
- 8
src/views/officialSeal/components/addInstitution.vue 查看文件

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
     <div>
3
-        <el-dialog title="新增机构" :visible="operateVisable" @close="cancel" width="600px" center :distroy-on-close="true">
3
+        <el-dialog :title="title" :visible="operateVisable" v-if="operateVisable" @close="cancel" width="600px" center
4
+            :distroy-on-close="true">
4 5
             <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
5 6
                 <el-form-item label="机构名称" prop="identifyName">
6 7
                     <el-input v-model="ruleForm.identifyName"></el-input>
@@ -21,17 +22,17 @@
21 22
 </template>
22 23
 <script>
23 24
 import {
24
-    insert
25
+    insert,
25 26
 } from "@/api/officialSeal/officialSeal.js";
26 27
 export default {
27
-    props: ["operateVisable",],
28
+    props: ["operateVisable"],
28 29
     data() {
29 30
         return {
31
+            title: "新增机构",
30 32
             ruleForm: {},
31 33
             rules: {
32 34
                 identifyName: [
33 35
                     { required: true, message: '请输入机构名称', trigger: 'blur' },
34
-                    // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
35 36
                 ],
36 37
                 operName: [
37 38
                     { required: true, message: '请输入经办人姓名', trigger: 'blur' },
@@ -46,7 +47,7 @@ export default {
46 47
     watch: {
47 48
         operateVisable(val) {
48 49
             if (val) {
49
-
50
+               
50 51
             }
51 52
         }
52 53
     },
@@ -55,20 +56,29 @@ export default {
55 56
     },
56 57
     methods: {
57 58
         // 新增部门
58
-        insertFn(data){
59
-            insert(data).then(res=>{
59
+        insertFn(data) {
60
+            insert(data).then(res => {
60 61
                 this.$modal.msgSuccess("新增成功!");
61 62
                 this.$emit("cancelFilingreview");
62 63
                 this.$emit('getList');
63 64
             })
64 65
         },
66
+        // // 编辑
67
+        // sealUpdateFn(data) {
68
+        //     sealUpdate(data).then(res => {
69
+        //         this.$modal.msgSuccess("修改成功!");
70
+        //         this.$emit("cancelFilingreview");
71
+        //         this.$emit('getList');
72
+        //     })
73
+        // },
65 74
         // 提交form表单
66 75
         submitForm() {
67 76
             this.$refs['ruleForm'].validate((valid) => {
68 77
                 if (valid) {
69 78
                     this.insertFn(this.ruleForm)
70
-                } 
79
+                }
71 80
             });
81
+
72 82
         },
73 83
         cancel() {
74 84
             this.$emit("cancelFilingreview");

+ 96
- 0
src/views/officialSeal/components/eidtInstitution.vue 查看文件

@@ -0,0 +1,96 @@
1
+<template>
2
+    <div>
3
+        <el-dialog :title="title" :visible="editVisable" v-if="editVisable" @close="cancel" width="600px" center
4
+            :distroy-on-close="true">
5
+            <el-form :model="editForm" :rules="rules" ref="editForm" label-width="130px" class="demo-editForm">
6
+                <el-form-item label="机构名称" prop="identifyName">
7
+                    <el-input v-model="editForm.identifyName"></el-input>
8
+                </el-form-item>
9
+                <el-form-item label="经办人姓名" prop="operName">
10
+                    <el-input v-model="editForm.operName"></el-input>
11
+                </el-form-item>
12
+                <el-form-item label="经办人手机号" prop="operPhone">
13
+                    <el-input v-model="editForm.operPhone"></el-input>
14
+                </el-form-item>
15
+            </el-form>
16
+            <div slot="footer" class="dialog-footer">
17
+                <el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
18
+                <el-button type="primary" @click="submitForm" class="endbutton"><span>确认</span></el-button>
19
+            </div>
20
+        </el-dialog>
21
+    </div>
22
+</template>
23
+<script>
24
+import {
25
+    sealUpdate
26
+} from "@/api/officialSeal/officialSeal.js";
27
+export default {
28
+    props: ["editVisable","editData"],
29
+    data() {
30
+        return {
31
+            title: "修改机构",
32
+            editForm: {},
33
+            rules: {
34
+                identifyName: [
35
+                    { required: true, message: '请输入机构名称', trigger: 'blur' },
36
+                ],
37
+                operName: [
38
+                    { required: true, message: '请输入经办人姓名', trigger: 'blur' },
39
+                ],
40
+                operPhone: [
41
+                    { required: true, message: '请输入手机号', trigger: 'blur' },
42
+                    { pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请输入正确的手机号码', trigger: 'blur', },
43
+                ],
44
+            }
45
+        };
46
+    },
47
+    watch: {
48
+        editVisable(val) {
49
+            if (val) {
50
+               this.editForm = this.editData;
51
+            }
52
+        }
53
+    },
54
+    created() {
55
+
56
+    },
57
+    methods: {
58
+        // 编辑
59
+        sealUpdateFn(data) {
60
+            sealUpdate(data).then(res => {
61
+                this.$modal.msgSuccess("修改成功!");
62
+                this.$emit("cancelEdit");
63
+                this.$emit('getList');
64
+            })
65
+        },
66
+        // 提交form表单
67
+        submitForm() {
68
+            this.$refs['editForm'].validate((valid) => {
69
+                if (valid) {
70
+                    this.sealUpdateFn({
71
+                        identifyName:this.editForm.identifyName,
72
+                        operName:this.editForm.operName,
73
+                        operPhone:this.editForm.operPhone,
74
+                        id:this.editForm.id,
75
+                    })
76
+                }
77
+            });
78
+
79
+        },
80
+        cancel() {
81
+            this.$emit("cancelEdit");
82
+        },
83
+    },
84
+};
85
+</script>
86
+  
87
+<style lang="scss" scoped>
88
+.steps {
89
+    display: flex;
90
+    flex-wrap: wrap;
91
+}
92
+
93
+.radiobox {
94
+    margin-top: 30px;
95
+}
96
+</style>

+ 46
- 18
src/views/officialSeal/components/sealManage.vue 查看文件

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
     <div>
3 3
         <el-dialog title="公章列表" :visible="sealVisable" @close="cancel" width="800px" center :distroy-on-close="true">
4
-            <el-table :data="dataList" style="width: 100%">
4
+            <el-table v-loading="loading" :data="dataList" style="width: 100%">
5 5
                 <el-table-column label="序号" type="index" align="center">
6 6
                     <template slot-scope="scope">
7 7
                         <span>{{
@@ -13,55 +13,61 @@
13 13
                     :show-overflow-tooltip="true"></el-table-column>
14 14
                 <el-table-column label="印章图片" align="center" prop="annexPath">
15 15
                     <template slot-scope="scope">
16
-                        <!-- <el-image style="width: 40px; height: 40px;"
17
-                            :src="imgUrl + scope.row.annexPath"
16
+                        <el-image style="width: 40px; height: 40px;" :src="imgUrl + scope.row.annexPath"
18 17
                             :preview-src-list="srcList">
19
-                        </el-image> -->
20
-                        <span>{{ imgUrl + scope.row.annexPath }}</span>
18
+                        </el-image>
19
+                        <!-- <span>{{ imgUrl + scope.row.annexPath }}</span> -->
21 20
                     </template>
22 21
                 </el-table-column>
23 22
                 <el-table-column label="是否启用" align="center" prop="sealStatus">
24 23
                     <template slot-scope="scope">
25 24
                         <el-tag type="success" v-if="scope.row.isUse == 1">已启用</el-tag>
26
-                        <el-tag type="info" v-if="scope.row.isUse == 0">未启用</el-tag>
25
+                        <el-tag type="info"
26
+                            v-if="(scope.row.isUse == 0 || scope.row.isUse == null) && scope.row.sealStatus !== 0">未启用</el-tag>
27
+                        <el-tag type="danger" v-if="scope.row.sealStatus == 0">审核中</el-tag>
27 28
                     </template>
28 29
                 </el-table-column>
29 30
                 <el-table-column label="操作" align="center">
30 31
                     <template slot-scope="scope">
31
-                        <el-button size="mini" @click="DeptIndefiUrl(scope.row)" type="text" icon="el-icon-thumb"
32
-                        v-if="scope.row.isUse == 0">启用</el-button>
33
-                        <el-button size="mini" @click="DeptIndefiUrl(scope.row)" type="text" icon="el-icon-thumb"
34
-                        v-if="scope.row.isUse == 1">禁用</el-button>
32
+                        <el-button size="mini" @click="isUseChange(scope.row.id, 1)" type="text" icon="el-icon-thumb"
33
+                            v-if="(scope.row.isUse == 0 || scope.row.isUse == null) && scope.row.sealStatus !== 0">启用</el-button>
34
+                        <el-button size="mini" @click="isUseChange(scope.row.id, 0)" type="text" icon="el-icon-thumb"
35
+                            v-if="scope.row.isUse == 1">禁用</el-button>
35 36
                     </template>
36 37
                 </el-table-column>
37 38
             </el-table>
39
+            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
40
+                :limit.sync="queryParams.pageSize" @pagination="sealListFn(queryParams)" />
38 41
         </el-dialog>
39 42
     </div>
40 43
 </template>
41 44
 <script>
42 45
 import {
43
-    sealList
46
+    sealList,
47
+    updateSealLockStatus
44 48
 } from "@/api/officialSeal/officialSeal.js";
45 49
 export default {
46
-    props: ["sealVisable","sealData"],
50
+    props: ["sealVisable", "sealData"],
47 51
     data() {
48 52
         return {
53
+            loading: false,
49 54
             srcList: ["https://img2.baidu.com/it/u=1814561676,2470063876&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500"],
50 55
             queryParams: {
51 56
                 pageNum: 1,
52 57
                 pageSize: 10,
53 58
             },
54 59
             dataList: [
55
-                
60
+
56 61
             ],
57
-            imgUrl:""
62
+            total: 0,
63
+            imgUrl: ""
58 64
         };
59 65
     },
60 66
     watch: {
61 67
         sealVisable(val) {
62 68
             if (val) {
63
-                this.sealListFn({id:this.sealData.id})
64
-                // console.log(this.sealData,"LLLLLLLLLLLLLLLLL");
69
+                this.queryParams.id = this.sealData.id;
70
+                this.sealListFn(this.queryParams)
65 71
             }
66 72
         }
67 73
     },
@@ -73,11 +79,33 @@ export default {
73 79
             this.imgUrl = window.location.origin;
74 80
         },
75 81
         // 查询列表数据
76
-        sealListFn(data){
77
-            sealList(data).then(res=>{
82
+        sealListFn(data) {
83
+            this.loading = true;
84
+            sealList(data).then(res => {
78 85
                 this.dataList = res.rows;
86
+                this.total = res.total;
87
+                this.loading = false;
88
+            })
89
+        },
90
+        // 更新公章状态
91
+        updateSealLockStatusFn(data) {
92
+            updateSealLockStatus(data).then(res => {
93
+                this.$message.success('更新状态成功');
94
+                this.sealListFn(this.queryParams);
79 95
             })
80 96
         },
97
+        // 启用或者禁用公章
98
+        isUseChange(id, type) {
99
+            let params = {
100
+                id: id,
101
+                isUse: type
102
+            }
103
+            this.$modal
104
+                .confirm("是否更改状态")
105
+                .then((res) => {
106
+                    this.updateSealLockStatusFn(params);
107
+                })
108
+        },
81 109
         cancel() {
82 110
             this.$emit("cancelSeal");
83 111
         },

+ 25
- 11
src/views/officialSeal/components/uploadSeal.vue 查看文件

@@ -1,9 +1,15 @@
1 1
 <template>
2 2
     <div>
3 3
         <el-dialog title="上传公章" :visible="uploadVisable" v-if="uploadVisable" @close="cancel" width="600px" center>
4
-            <el-upload class="avatar-uploader" :before-upload="beforeUpload" :on-success="handleSuccess" ref="upload" :action="UploadUrl()"
5
-                :headers="headers" :data="filedata" :on-remove="handleRemove" :on-change="handleChange"
6
-                :show-file-list="false" :file-list="fileList" :auto-upload="false">
4
+            <el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
5
+                class="demo-ruleForm">
6
+                <el-form-item label="印章名称" prop="sealName">
7
+                    <el-input v-model="ruleForm.sealName"></el-input>
8
+                </el-form-item>
9
+            </el-form>
10
+            <el-upload class="avatar-uploader" :before-upload="beforeUpload" :on-success="handleSuccess" ref="upload"
11
+                :action="UploadUrl()" :headers="headers" :data="filedata" :on-remove="handleRemove"
12
+                :on-change="handleChange" :show-file-list="false" :file-list="fileList" :auto-upload="false">
7 13
                 <img v-if="imageUrl" :src="imageUrl" class="avatar">
8 14
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
9 15
             </el-upload>
@@ -29,7 +35,13 @@ export default {
29 35
                 id: this.uploadData.id
30 36
             },
31 37
             flagBtn: false,
32
-            imageUrl: ""
38
+            imageUrl: "",
39
+            ruleForm: {},
40
+            rules: {
41
+                sealName: [
42
+                    { required: true, message: '请输入印章名称', trigger: 'blur' },
43
+                ],
44
+            }
33 45
         };
34 46
     },
35 47
     watch: {
@@ -43,10 +55,6 @@ export default {
43 55
 
44 56
     },
45 57
     methods: {
46
-        // 提交
47
-        submitForm() {
48
-
49
-        },
50 58
         cancel() {
51 59
             this.$emit("cancelUpload");
52 60
         },
@@ -57,8 +65,13 @@ export default {
57 65
             return window.location.origin + "/API/deptIdentify/sealUpload";
58 66
         },
59 67
         submitUpload() {
60
-            this.filedata.id = this.uploadData.id
61
-            this.$refs.upload.submit();
68
+            this.$refs['ruleForm'].validate((valid) => {
69
+                if (valid) {
70
+                    this.filedata.id = this.uploadData.id;
71
+                    this.filedata.sealName = this.ruleForm.sealName;
72
+                    this.$refs.upload.submit();
73
+                }
74
+            });
62 75
         },
63 76
         handleRemove(file, fileList) {
64 77
             console.log(file, fileList);
@@ -70,7 +83,7 @@ export default {
70 83
             }
71 84
             return isImg
72 85
         },
73
-        handleSuccess(){
86
+        handleSuccess() {
74 87
             this.$message.success('上传成功')
75 88
         }
76 89
     },
@@ -84,6 +97,7 @@ export default {
84 97
     border: 1px dashed #d9d9d9;
85 98
     border-radius: 6px;
86 99
     cursor: pointer;
100
+    margin-left: 90px;
87 101
 }
88 102
 
89 103
 ::v-deep .avatar-uploader .el-upload:hover {

+ 38
- 6
src/views/officialSeal/officialSealList.vue 查看文件

@@ -28,8 +28,11 @@
28 28
                         v-if="scope.row.isUse == '未启用' && scope.row.identifyStatus == '已认证'">启用</el-button>
29 29
                     <el-button size="mini" @click="uploadSeal(scope.row)" type="text"
30 30
                         v-if="scope.row.identifyStatus == '已认证'" icon="el-icon-upload2">上传公章</el-button>
31
-                        <el-button size="mini" @click="sealManage(scope.row)" type="text"
31
+                    <el-button size="mini" @click="sealManage(scope.row)" type="text"
32 32
                         v-if="scope.row.identifyStatus == '已认证'" icon="el-icon-upload2">公章管理</el-button>
33
+                    <el-button size="mini" @click="sealDelete(scope.row)" type="text" icon="el-icon-delete">删除</el-button>
34
+                    <el-button size="mini" @click="eidtSeal(scope.row)" type="text"
35
+                        v-if="scope.row.identifyStatus == '未认证'" icon="el-icon-edit">修改</el-button>
33 36
                 </template>
34 37
             </el-table-column>
35 38
         </el-table>
@@ -41,6 +44,7 @@
41 44
         </uploadSeal>
42 45
         <sealManage :sealVisable="sealVisable" @cancelSeal="cancelSeal" :sealData="sealData">
43 46
         </sealManage>
47
+        <eidtInstitution :editVisable="editVisable" @cancelEdit="cancelEdit" @getList="getList" :editData="editData"></eidtInstitution>
44 48
     </div>
45 49
 </template>
46 50
   
@@ -49,17 +53,20 @@ import {
49 53
     deptIdentifyList,
50 54
     enableDept,
51 55
     selectDeptIndefiUrl,
56
+    deleteSeal
52 57
 } from "@/api/officialSeal/officialSeal.js";
53 58
 
54 59
 import addInstitution from "./components/addInstitution";
55 60
 import uploadSeal from "./components/uploadSeal";
56 61
 import sealManage from "./components/sealManage";
62
+import eidtInstitution from "./components/eidtInstitution";
57 63
 export default {
58 64
     name: "paymentList",
59 65
     components: {
60 66
         addInstitution,
61 67
         uploadSeal,
62
-        sealManage
68
+        sealManage,
69
+        eidtInstitution
63 70
     },
64 71
     data() {
65 72
         return {
@@ -78,21 +85,38 @@ export default {
78 85
             dataList: [1],
79 86
             operateVisable: false,//新增弹窗
80 87
             uploadVisable: false,//上传弹窗
81
-            sealVisable:false,//公章列表弹窗
88
+            sealVisable: false,//公章列表弹窗
82 89
             uploadData: {},
83
-            sealData:{}
90
+            sealData: {},
91
+            editVisable:false,
92
+            editData:{}
84 93
         };
85 94
     },
86 95
     created() {
87 96
         this.getList(this.queryParams)
88 97
     },
89 98
     methods: {
99
+        // 删除
100
+        sealDelete(row){
101
+            this.$modal
102
+                .confirm("是否更改状态")
103
+                .then((res) => {
104
+                    this.deleteSealFn({id:row.id})
105
+                })
106
+        },
107
+        // 删除接口
108
+        deleteSealFn(data){
109
+            deleteSeal(data).then(res=>{
110
+                this.$modal.msgSuccess("删除成功!");
111
+                this.getList(this.queryParams);
112
+            })
113
+        },
90 114
         // 公章管理
91
-        sealManage(row){
115
+        sealManage(row) {
92 116
             this.sealVisable = true;
93 117
             this.sealData = row;
94 118
         },
95
-        cancelSeal(){
119
+        cancelSeal() {
96 120
             this.sealVisable = false;
97 121
         },
98 122
         // 上传公章
@@ -110,6 +134,14 @@ export default {
110 134
         addInstitution() {
111 135
             this.operateVisable = true;
112 136
         },
137
+        // 编辑
138
+        eidtSeal(row){
139
+            this.editVisable = true;
140
+            this.editData = row;
141
+        },
142
+        cancelEdit(){
143
+            this.editVisable = false;
144
+        },
113 145
         // 启用认证按钮
114 146
         changeStatus(row) {
115 147
             this.$modal.confirm('是否进行启用?')