forked from kidgrow-microservices-platform

zhaoxiaohao
2021-03-03 f5df017deac69032a31b6f637c3ce80cd1c414cb
kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/company.html
@@ -8,7 +8,7 @@
    </div>
    <div class="layui-card-body">
        <div class="layui-form toolbar">
            <input id="app-edit-search" class="layui-input search-input" type="text" placeholder="请输入公司名称" />&emsp;
            <input id="app-edit-search" class="layui-input search-input" type="text" placeholder="按公司名称" />&emsp;
            <button id="app-btn-search" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
            <button id="user-btn-add" class="layui-btn icon-btn permissions" permissions="syscompany-edit"><i class="layui-icon">&#xe654;</i>添加</button>
        </div>
@@ -31,7 +31,7 @@
</script>
<!-- 表单弹窗 -->
<script type="text/html" id="app-model">
    <form id="app-form" lay-filter="app-form" class="layui-form model-form">
    <form id="app-form" lay-filter="app-form" class="layui-form model-form" autocomplete="off" >
        <input name="id" type="hidden"/>
        <div class="layui-form-item">
            <label class="layui-form-label">租户</label>
@@ -141,7 +141,7 @@
                })
                form.render();
            } else {
                layer.msg(data.msg, { icon: 2, time: 500 });
                layer.msg(data.msg, { icon: 2, time: 2000 });
            }
        }, 'Post');
@@ -174,8 +174,8 @@
                { field: 'createTime', width: 250, title: '时间', templet: "<div>{{layui.util.toDateString(d.createTime, 'yyyy-MM-dd HH:mm')}}</div>" },
                { field: 'id', width: 250, align: 'center', toolbar: '#company-table-bar', title: '操作' },
            ]],
            done:function(){
                permissionsInput();
            done:function(res){
                permissionsInput(res,config);
            }
        });
@@ -188,10 +188,10 @@
            }, function (data) {
                layer.closeAll('loading');
                if (data.code == 0) {
                    layer.msg(data.msg, { icon: 1, time: 500 });
                    layer.msg(data.msg, { icon: 1, time: 2000 });
                    table.reload('table-user', {});
                } else {
                    layer.msg(data.msg, { icon: 2, time: 500 });
                    layer.msg(data.msg, { icon: 2, time: 2000 });
                    $(obj.elem).prop('checked', !obj.elem.checked);
                    form.render('checkbox');
                }
@@ -210,14 +210,9 @@
                    let selected = false;
                    clientsAll = data.data;
                    sheng = data.data;
                    console.log(checkValue);
                    $.each(data.data, function (index, item) {
                        // console.log( item.areaName);
                        if (checkValue == item.areaName) {
                            selected = true;
                            console.log(item.areaName);
                            console.log(selected);
                        } else {
                            selected = false;
                        }
@@ -226,7 +221,7 @@
                    })
                    form.render('select', id);
                } else {
                    layer.msg(data.msg, { icon: 2, time: 500 });
                    layer.msg(data.msg, { icon: 2, time: 2000 });
                }
            }, 'GET');
        }
@@ -286,7 +281,7 @@
                    })
                    form.render();
                } else {
                    layer.msg(data.msg, { icon: 2, time: 500 });
                    layer.msg(data.msg, { icon: 2, time: 2000 });
                }
            }, 'GET');
        }
@@ -312,7 +307,7 @@
                    })
                    form.render();
                } else {
                    layer.msg(data.msg, { icon: 2, time: 500 });
                    layer.msg(data.msg, { icon: 2, time: 2000 });
                }
            }, 'GET');
        }
@@ -335,7 +330,7 @@
                    })
                    form.render();
                } else {
                    layer.msg(data.msg, { icon: 2, time: 500 });
                    layer.msg(data.msg, { icon: 2, time: 2000 });
                }
            }, 'GET');
        }
@@ -354,10 +349,10 @@
                    admin.req('api-user/syscompany/' + obj.data.id, {}, function (data) {
                        layer.closeAll('loading');
                        if (data.code == 0) {
                            layer.msg(data.msg, { icon: 1, time: 500 });
                            layer.msg(data.msg, { icon: 1, time: 2000 });
                            table.reload('app-table', {});
                        } else {
                            layer.msg(data.msg, { icon: 2, time: 500 });
                            layer.msg(data.msg, { icon: 2, time: 2000 });
                        }
                    }, 'delete');
                });
@@ -442,13 +437,11 @@
                        }
                        var shiId = "";
                        console.log(shi_name)
                        $.each(shi_name, function (index, item) {
                            if (data.companyCity === item.areaName) {
                                shiId = item.id;
                            }
                        })
                        console.log(data.companyArea)
                        if (data.companyArea) {
                            getShi_and_xian(shiId, "xian", data.companyArea)
                        }
@@ -468,7 +461,7 @@
                    layer.closeAll();
                    table.reload('app-table', {});
                } else {
                    layer.msg(data.msg, { icon: 2, time: 500 });
                    layer.msg(data.msg, { icon: 2, time: 2000 });
                }
            }, "POST");
            return false;