瀏覽代碼

多个单位章和个人授权单位章功能

ellisran 1 月之前
父節點
當前提交
e963717ac2

+ 8 - 0
app/const/account_permission.js

@@ -56,6 +56,14 @@ const permission = {
             // { title: '修改材料税税率', value: 3, hint: '开启该选项,可在新材差期修改材料税税率', hintIcon: 'fa-question-circle' },
         ],
     },
+    other: {
+        class: 'fa fa-pencil-square-o',
+        title: '其他权限',
+        type: 'checkbox',
+        children: [
+            { title: '授权单位章', value: 1, text_modal: '选择章', modal: 'sign_permission' },
+        ],
+    },
     construction: {
         class: 'fa fa-pencil-square-o',
         title: '施工日志',

+ 36 - 10
app/controller/setting_controller.js

@@ -239,7 +239,7 @@ module.exports = app => {
                 // 获取数据规则
                 const page = ctx.page;
                 const pageSize = ctx.pageSize;
-                const columns = ['id', 'account', 'name', 'company', 'role', 'mobile', 'auth_mobile', 'telephone', 'enable', 'is_admin', 'bind', 'account_group', 'permission', 'cooperation', 'notice_again'];
+                const columns = ['id', 'account', 'name', 'company', 'company_id', 'role', 'mobile', 'auth_mobile', 'telephone', 'enable', 'is_admin', 'bind', 'account_group', 'permission', 'cooperation', 'notice_again', 'unit_sign_path'];
                 // 过滤数据
                 ctx.service.projectAccount.searchFilter(ctx.request.query, projectId, columns);
                 ctx.sort = ['id', 'desc'];
@@ -277,6 +277,7 @@ module.exports = app => {
                     company,
                     noticeAgainConst,
                     noticeSet,
+                    fujianOssPath: ctx.app.config.fujianOssPath,
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.setting.user),
                     // rule: JSON.stringify(frontRule),
                 };
@@ -417,11 +418,26 @@ module.exports = app => {
                         break;
                     case 'del-sign':
                         const info = await ctx.service.constructionUnit.getDataById(data.id);
+                        let path = null;
                         if (info.sign_path) {
                             // 不删除地址,只删除数据库数据,防止已签章的报表丢失
                             // await ctx.app.fujianOss.delete(ctx.app.config.fujianOssFolder + info.sign_path);
+                            const paths = info.sign_path.split('&%&');
+                            const newPath = paths.filter(item => item !== data.path);
+                            path = newPath.length !== 0 ? newPath.join('&%&') : null;
                         }
-                        await ctx.service.constructionUnit.update({sign_path: null}, {id: info.id});
+                        await ctx.service.constructionUnit.update({ sign_path: path }, { id: info.id });
+                        // 用户已选章也要判断,存在也要移除
+                        const userList = await ctx.service.projectAccount.getAllDataByCondition({ where: { company: info.name, project_id: projectData.id } });
+                        if (userList.length > 0) {
+                            for (const user of userList) {
+                                if (user.unit_sign_path && user.unit_sign_path.includes(data.path)) {
+                                    const newSignPath = user.unit_sign_path.split('&%&').filter(item => item !== data.path).join('&%&');
+                                    await ctx.service.projectAccount.update({ unit_sign_path: newSignPath ? newSignPath : null }, { id: user.id });
+                                }
+                            }
+                        }
+                        responseData.data = path;
                         break;
                     case 'import-users':
                         responseData.data = await ctx.service.projectAccount.addUsers(projectData.id, data.users);
@@ -440,16 +456,26 @@ module.exports = app => {
             const responseData = {
                 err: 0, msg: '', data: null,
             };
+            let stream;
             try {
-                const stream = await ctx.getFileStream();
-                const create_time = Date.parse(new Date()) / 1000;
-                const fileInfo = path.parse(stream.filename);
-                const filepath = `app/public/upload/sign/unit/qianzhang_${create_time + fileInfo.ext}`;
-                await ctx.app.fujianOss.put(ctx.app.config.fujianOssFolder + filepath, stream);
-                await sendToWormhole(stream);
-                const result = await ctx.service.constructionUnit.update({sign_path: filepath}, {id: stream.fields.id});
+                const parts = ctx.multipart({ autoFields: true });
+                const paths = [];
+                let index = 0;
+                while ((stream = await parts()) !== undefined) {
+                    const create_time = Date.parse(new Date()) / 1000;
+                    const fileInfo = path.parse(stream.filename);
+                    const filepath = `app/public/upload/sign/unit/qianzhang_${create_time + index.toString() + fileInfo.ext}`;
+                    await ctx.app.fujianOss.put(ctx.app.config.fujianOssFolder + filepath, stream);
+                    await sendToWormhole(stream);
+                    paths.push(filepath);
+                    ++index;
+                }
+                const unit = await ctx.service.constructionUnit.getDataById(parts.field.id);
+                const sign_path = unit.sign_path ? unit.sign_path.split('&%&') : [];
+                sign_path.push(...paths);
+                const result = await ctx.service.constructionUnit.update({ sign_path: sign_path.join('&%&') }, { id: unit.id });
                 if (result) {
-                    responseData.data = {sign_path: filepath};
+                    responseData.data = { sign_path: sign_path.join('&%&') };
                 } else {
                     throw '添加数据库失败';
                 }

+ 189 - 29
app/public/js/setting.js

@@ -138,8 +138,10 @@ $(document).ready(() => {
     $('a[aria-controls="edit-user2"]').on('click', function () {
         $('#edit-user2 input:radio').prop('checked', false);
         $('#edit-user2 input:checkbox').prop('checked', false);
+        $('#sign_permission').hide();
         const account = $(this).data('account');
         $('#edit-user2 input[name="id"]').val(account.id);
+        $('#edit-user2 input[name="unit_sign_path"]').val(account.unit_sign_path);
         // 权限赋值
         if (account.permission !== '') {
             const permission = JSON.parse(account.permission);
@@ -162,6 +164,9 @@ $(document).ready(() => {
                 } else if (allPermission[pm].type === 'radio') {
                     $('#edit-user2 input:radio[id="' + pm + '_' + permission[pm] + '"]').prop('checked', true);
                 }
+                if (pm === 'other' && permission[pm].indexOf('1') !== -1) {
+                    $('#sign_permission').show();
+                }
             }
         }
         // 协作赋值
@@ -185,6 +190,56 @@ $(document).ready(() => {
                 $('#edit-user2 input[name="cooperation"]').attr('disabled', true);
             }
         }
+        if ($(this).attr('id') === 'other_1') {
+            if ($(this).is(':checked')) {
+                $('#sign_permission').show();
+                $('#sign_permission').click();
+            } else {
+                $('#sign_permission').hide();
+            }
+        }
+    });
+
+    $('#sign_permission').on('click', function () {
+        const uid = $('#edit-user2 input[name="id"]').val();
+        if (!uid) {
+            toastr.error('请先选择用户');
+            return;
+        }
+        const user = _.find(accountData, { id: parseInt(uid) });
+        if (!user) {
+            toastr.error('用户不存在');
+            return;
+        }
+        let html = '';
+        if (user.company) {
+            const unit = _.find(unitList, { name: user.company });
+            const unit_sign_path = $('#edit-user2 input[name="unit_sign_path"]').val();
+            if (unit) {
+                const paths = unit.sign_path ? unit.sign_path.split('&%&') : [];
+                if (paths.length > 0) {
+                    console.log(paths);
+                    for (const sp of paths) {
+                        const checked = unit_sign_path && unit_sign_path.indexOf(sp) !== -1 ? 'checked' : '';
+                        html += '<div class="col-3 text-center my-2"><img src="'+ fujianOssPath + sp +'" width="120">' +
+                            '<div class="w-100 mt-2"><input type="checkbox" name="signpath[]" '+ (checked ? 'checked' : '') +' data-path="' + sp + '" />' +
+                            '</div></div>';
+                    }
+                }
+            }
+        }
+        $('#unit-sign').html(html);
+        $('#sign_permission_modal').modal('show');
+    });
+
+    $('#set_unit_sign').on('click', function () {
+        $('#sign_permission_modal').modal('hide');
+        const uid = $('#edit-user2 input[name="id"]').val();
+        const signPaths = [];
+        $('#unit-sign input[name="signpath[]"]:checked').each(function () {
+            signPaths.push($(this).data('path'));
+        });
+        $('#edit-user2 input[name="unit_sign_path"]').val(signPaths.join('&%&'));
     });
 
     // 解绑第三方平台
@@ -297,6 +352,20 @@ $(document).ready(() => {
         }
     });
 
+    $('#unit_user_permission').change(function () {
+        const val_name = 'sign_permission';
+        let val = $(this).is(':checked') ? 1 : 0;
+        if (!oneUnit) {
+            toastr.error('所选单位有误,请重新选择');
+            return false;
+        }
+        if(oneUnit[val_name] !== val) {
+            postData('/setting/user/unit/save', {type: 'update', id: oneUnit.id, val_name, val}, function (result) {
+                oneUnit[val_name] = val;
+            });
+        }
+    });
+
     $('#one_unit textarea').blur(function () {
         const val_name = $(this).data('name');
         let val = _.trim($(this).val()) !== '' ? _.trim($(this).val()) : null;
@@ -354,6 +423,14 @@ $(document).ready(() => {
         }
     });
 
+    $('#mseal').on('shown.bs.modal', function () {
+        if (!oneUnit) {
+            toastr.error('所选单位有误,请重新选择');
+            return false;
+        }
+        makeManageSignHtml(oneUnit.sign_path);
+    });
+
     // 删除单位
     $('#delete-unit').click(function () {
         if (!oneUnit) {
@@ -371,40 +448,82 @@ $(document).ready(() => {
             toastr.error('所选单位有误,请重新选择');
             return false;
         }
-        const file = this.files[0];
-        const ext = file.name.toLowerCase().split('.').splice(-1)[0];
-        const imgStr = /(jpg|jpeg|png|bmp|BMP|JPG|PNG|JPEG)$/;
-        if (!imgStr.test(ext)) {
-            toastr.error('请上传正确的图片格式文件');
-            return
+        const files = Array.from(this.files)
+        const valiData = files.map(v => {
+            const ext = v.name.substring(v.name.lastIndexOf('.') + 1)
+            return {
+                size: v.size,
+                ext
+            }
+        });
+        if (validateFiles(valiData)) {
+            if (files.length) {
+                const formData = new FormData();
+                formData.append('id', oneUnit.id);
+                files.forEach(file => {
+                    formData.append('name', file.name);
+                    formData.append('size', file.size);
+                    formData.append('file', file);
+                });
+                postDataWithFile('/setting/user/unit/upload', formData, function (result) {
+                    oneUnit.sign_path = result.sign_path;
+                    makeSignHtml(oneUnit.sign_path);
+                    $('#sign-upload').val('');
+                    toastr.success('上传成功');
+                });
+            }
         }
-        if ($(this).val()) {
-            const formData = new FormData();
-            formData.append('file', this.files[0]);
-            formData.append('id', oneUnit.id);
-            postDataWithFile('/setting/user/unit/upload', formData, function (result) {
-                const html = '<img src="'+ fujianOssPath + result.sign_path +'" width="120">';
-                $('#sign-show').html(html);
-                $('#sign-upload').val('');
-                oneUnit.sign_path = result.sign_path;
-                $('#upload-sign').hide();
-                $('#delete-sign').show();
-                toastr.success('上传成功');
-            });
+    });
+
+    $('#manage-sign-upload').change(function () {
+        if (!oneUnit) {
+            toastr.error('所选单位有误,请重新选择');
+            return false;
+        }
+        const files = Array.from(this.files)
+        const valiData = files.map(v => {
+            const ext = v.name.substring(v.name.lastIndexOf('.') + 1)
+            return {
+                size: v.size,
+                ext
+            }
+        });
+        if (validateFiles(valiData)) {
+            if (files.length) {
+                const formData = new FormData();
+                formData.append('id', oneUnit.id);
+                files.forEach(file => {
+                    formData.append('name', file.name);
+                    formData.append('size', file.size);
+                    formData.append('file', file);
+                });
+                postDataWithFile('/setting/user/unit/upload', formData, function (result) {
+                    oneUnit.sign_path = result.sign_path;
+                    makeManageSignHtml(oneUnit.sign_path);
+                    makeSignHtml(oneUnit.sign_path);
+                    $('#manage-sign-upload').val('');
+                    toastr.success('上传成功');
+                });
+            }
         }
     });
 
     // 移除签章
-    $('#delete-sign').click(function () {
+    $('body').on('click', '#manage-unit-sign .delete-sign', function () {
         if (!oneUnit) {
             toastr.error('所选单位有误,请重新选择');
             return false;
         }
-        postData('/setting/user/unit/save', { type: 'del-sign', id: oneUnit.id }, function (result) {
-            $('#sign-show').html('');
+        const delPath = $(this).attr('data-path');
+        if (!delPath) {
+            toastr.error('所选签章有误,请重新选择');
+            return false;
+        }
+        postData('/setting/user/unit/save', { type: 'del-sign', id: oneUnit.id, path: delPath }, function (result) {
+            oneUnit.sign_path = result;
+            makeManageSignHtml(oneUnit.sign_path);
+            makeSignHtml(oneUnit.sign_path);
             toastr.warning('已移除');
-            oneUnit.sign_path = null;
-            $('#upload-sign').show();
             $('#delete-sign').hide();
         })
     });
@@ -535,6 +654,29 @@ function checkPasswordForm() {
     }
 }
 
+function makeManageSignHtml(signPath) {
+    const paths = signPath ? signPath.split('&%&') : [];
+    let html = '';
+    if (paths.length > 0) {
+        for (const sp of paths) {
+            html += '<div class="col-3 text-center my-2"><img src="'+ fujianOssPath + sp +'" width="120"><div class="w-100"><button class="btn btn-sm btn-outline-danger delete-sign" data-path="' + sp + '">移除</button></div></div>';
+        }
+    }
+
+    $('#manage-unit-sign').html(html);
+}
+
+function makeSignHtml(signPath) {
+    const paths = signPath ? signPath.split('&%&') : [];
+    let html = '';
+    if (paths.length > 0) {
+        for (const sp of paths.slice(0, 5)) {
+            html += '<img src="' + fujianOssPath + sp + '" width="120" class="mr-1">';
+        }
+    }
+    $('#sign-show').html(html);
+}
+
 function setUnitRightHtml(id) {
     const one = _.find(unitList, { id });
     if (one) {
@@ -548,16 +690,15 @@ function setUnitRightHtml(id) {
         $('#unit_basic').val(one.basic);
         $('#unit_type').val(one.type);
         if(one.sign_path) {
-            $('#sign-show').html('<img src="' + fujianOssPath + one.sign_path + '" width="120">');
-            $('#delete-sign').show();
-            $('#upload-sign').hide();
+            makeSignHtml(one.sign_path);
+            // $('#upload-sign').hide();
         } else {
             $('#sign-show').html('');
-            $('#delete-sign').hide();
-            $('#upload-sign').show();
+            // $('#upload-sign').show();
         }
         oneUnit = one;
         $('#add_user_company').val(one.name);
+        $('#unit_user_permission').prop('checked', !!oneUnit.sign_permission);
     }
 }
 
@@ -626,6 +767,25 @@ function checkUserForm(status) {
     }
 }
 
+function validateFiles(files) {
+    if (files.length > 10) {
+        toastr.error('至多同时上传10个文件');
+        return false
+    }
+    return files.every(file => {
+        if (file.size > 1024 * 1024 * 50) {
+            toastr.error('文件大小限制为50MB');
+            return false
+        }
+        const imgStr = /(jpg|jpeg|png|bmp|BMP|JPG|PNG|JPEG)$/;
+        if (!imgStr.test(file.ext)) {
+            toastr.error('请上传正确的图片格式文件');
+            return false
+        }
+        return true
+    })
+}
+
 /**
  * 表单检测
  */

+ 8 - 0
app/service/project_account.js

@@ -423,6 +423,12 @@ module.exports = app => {
                     const companyInfo = await this.ctx.service.constructionUnit.getDataByCondition({ pid: this.ctx.session.sessionProject.id, name: data.company });
                     if (!companyInfo) throw '单位不存在';
                     data.company_id = companyInfo.id;
+                    if (id > 0) {
+                        const user = await this.getDataById(id);
+                        if (user.company_id !== companyInfo.id) {
+                            data.unit_sign_path = null; // 修改单位时,清除原有的单位印章
+                        }
+                    }
                 }
             }
             if (id > 0) {
@@ -748,7 +754,9 @@ module.exports = app => {
                 // 应该暂对应的重新发送的开关通知,并重新
                 await this.ctx.service.noticeAgain.updateUserNoticeAgain(transaction, id, notice_again);
                 updateData.notice_again = JSON.stringify(notice_again);
+                updateData.unit_sign_path = data.unit_sign_path || null;
                 delete data.id;
+                delete data.unit_sign_path;
                 updateData.permission = JSON.stringify(data);
 
                 const operate = await transaction.update(this.tableName, updateData);

+ 2 - 0
app/view/setting/user_permission.ejs

@@ -96,6 +96,8 @@
     const allPermission = JSON.parse('<%- permissionStr %>');
     const noticeAgainConst = JSON.parse(unescape('<%- escape(JSON.stringify(noticeAgainConst)) %>'));
     const unitList = JSON.parse(unescape('<%- escape(JSON.stringify(unitList)) %>'));
+    const accountData = JSON.parse(unescape('<%- escape(JSON.stringify(accountData)) %>'));
+    const fujianOssPath = JSON.parse(unescape('<%- escape(JSON.stringify(fujianOssPath)) %>'));
 </script>
 <script src="/public/js/bootstrap/drawer.js"></script>
 <script src="/public/js/setting.js"></script>

+ 21 - 1
app/view/setting/user_permission_modal.ejs

@@ -22,7 +22,10 @@
                                     <input class="form-check-input" type="<%= permission[pm].type %>" id="<%= pm %>_<%= ip.value %>" name="<%= pm %><% if (permission[pm].type === 'checkbox') { %>[]<% } %>" value="<%= ip.value %>">
                                     <label class="form-check-label" for="<%= pm %>_<%= ip.value %>"><%= ip.title %></label>
                                     <% if (ip.hint && ip.hintIcon) { %>
-                                        <a href="" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="<%- ip.hint%>"><i class="fa <%- ip.hintIcon%>"></i></a>
+                                        <a href="javascript:void(0);" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="<%- ip.hint%>"><i class="fa <%- ip.hintIcon%>"></i></a>
+                                    <% } %>
+                                    <% if (ip.text_modal && ip.modal) { %>
+                                        <a href="javascript:void(0);" id="<%- ip.modal %>" class="ml-2" ><%- ip.text_modal %></a>
                                     <% } %>
                                 </div>
                             <% } %>
@@ -59,6 +62,7 @@
         </div>
         <div class="modal-footer">
             <input type="hidden" name="id" value="">
+            <input type="hidden" name="unit_sign_path" value="">
             <button type="button" class="btn btn-secondary btn-sm" data-drawer-close="">关闭</button>
             <button type="submit" class="btn btn-primary btn-sm">提交修改</button>
         </div>
@@ -155,6 +159,22 @@
         </div>
     </div>
 </div>
+<div class="modal fade" id="sign_permission_modal" data-backdrop="static">
+    <div class="modal-dialog modal-lg" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">选择章</h5>
+            </div>
+            <div class="modal-body">
+                <div class="row" id="unit-sign"></div>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
+                <button type="button" class="btn btn-primary btn-sm" id="set_unit_sign">确定选择</button>
+            </div>
+        </div>
+    </div>
+</div>
 <script>
     $(function (){
        $('input[name="wx_send_type"]').on('click', function () {

+ 20 - 9
app/view/setting/user_unit.ejs

@@ -25,7 +25,7 @@
                 <div class="tab-content m-3">
                     <div class="tab-pane active">
                         <div class="row">
-                            <div class="col-6">
+                            <div class="col-5">
                                 <table class="table table-hover table-bordered table-sm">
                                     <thead id="unit_header">
                                     <tr>
@@ -51,14 +51,22 @@
                                 </table>
                             </div>
                             <% if (unitList.length > 0) { %>
-                            <div class="col-6">
+                            <div class="col-7">
                                 <div>
                                     <div class="row px-3">
                                         <div>
                                             <legend>单位详情</legend>
                                         </div>
                                         <div class="ml-auto">
+                                            <div class="d-inline-block">
+                                                <div class="form-check form-check-inline">
+                                                    <input class="form-check-input" type="checkbox" id="unit_user_permission" value="1" <% if (unitList[0].sign_permission) { %>checked=""<% } %>>
+                                                    <label class="form-check-label" for="unit_user_permission">授权所有人使用单位章</label>
+                                                </div>
+                                            </div>
+                                            <div class="d-inline-block">
                                             <a href="#del-company" data-toggle="modal" data-target="#del-company" id="del-modal-btn" class="btn btn-outline-danger btn-sm btn-block">删除单位</a>
+                                            </div>
                                         </div>
                                     </div>
                                     <table class="table table-hover table-bordered table-sm" id="one_unit">
@@ -101,20 +109,23 @@
                                         </tr>
                                     </table>
                                 </div>
-                                <div <% if (unitList[0].sign_path) { %>style="display: none" <% } %> id="upload-sign" class="form-group">
-                                    <label for="sign-upload">上传签章</label>
-                                    <input type="file" class="form-control-file" id="sign-upload">
+                                <div id="upload-sign" class="form-group">
+                                    <label for="sign-upload">上传签章(暂时不做个数上限)</label>
+                                    <input type="file" class="form-control-file" id="sign-upload" multiple>
                                     <small class="form-text text-danger">建议签章图片大小为160x160px,四边满版裁切、无留白,格式PNG透明背景(适用于报表打印,签章直径为4.2厘米的情况)</small>
                                 </div>
-                                <button <% if (!unitList[0].sign_path) { %>style="display: none" <% } %> type="button" class="btn btn-sm btn-danger" id="delete-sign">移除签章</button>
+                                <button type="button" data-toggle="modal" data-target="#mseal" class="btn btn-sm btn-primary" id="manage-sign">管理签章</button>
                                 <div class="form-group">
-                                    <label>签章图预览</label>
+                                    <label>签章图预览(最多预览5个,按照上传顺序显示)</label>
                                     <div>
                                         <div class="position-relative">
                                             <img src="/public/images/baobiao3.png">
-                                            <div class="position-absolute fixed-top" id="sign-show" style="left:290px;top:210px">
+                                            <div class="position-absolute fixed-top" id="sign-show" style="left:60px;top:210px">
                                                 <% if (unitList[0].sign_path) { %>
-                                                    <img src="<%- fujianOssPath + unitList[0].sign_path %>" width="120">
+                                                    <% const paths = unitList[0].sign_path.split('&%&') %>
+                                                    <% for (const sp of paths.slice(0, 5)) { %>
+                                                        <img src="<%- fujianOssPath + sp %>" width="120" class="mr-1">
+                                                    <% } %>
                                                 <% } %>
                                             </div>
                                         </div>

+ 21 - 0
app/view/setting/user_unit_modal.ejs

@@ -46,3 +46,24 @@
         </div>
     </div>
 </div>
+<!--管理签章-->
+<div class="modal fade" id="mseal" data-backdrop="static">
+    <div class="modal-dialog modal-lg" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">管理签章</h5>
+            </div>
+            <div class="modal-body">
+                <div id="upload-sign" class="form-group">
+                    <label for="sign-upload">上传签章(暂时不做个数上限)</label>
+                    <input type="file" class="form-control-file" id="manage-sign-upload" multiple>
+                    <small class="form-text text-danger">建议签章图片大小为160x160px,四边满版裁切、无留白,格式PNG透明背景(适用于报表打印,签章直径为4.2厘米的情况)</small>
+                </div>
+                <div class="row" id="manage-unit-sign"></div>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>

+ 5 - 0
sql/update.sql

@@ -6,7 +6,12 @@
 ------------------------------------
 -- 表结构
 ------------------------------------
+ALTER TABLE `zh_construction_unit`
+MODIFY COLUMN `sign_path` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '签章图片地址,以逗号分隔' AFTER `basic`,
+ADD COLUMN `sign_permission` tinyint(1) NULL DEFAULT 1 COMMENT '授权所有人使用单位章' AFTER `sign_path`;
 
+ALTER TABLE `zh_project_account`
+ADD COLUMN `unit_sign_path` mediumtext NULL COMMENT '单位章图片地址' AFTER `stamp_path`;
 
 ------------------------------------
 -- 表数据