• 倾蝶后台系统


    此系统为V3.0,全新的设计,代码非常简洁,维护非常简单,扩展性能非常好。

    在此基础上开发了一个crm系统,展示地址为http://temp.qingdie.net

    一、系统特点

    系统拥有10套皮肤,和7套菜单表现方式。

    系统具有9大特点:

    1、框架独立化;2、模块插件化;

    3、数据请求异步化;4、权限分配可视化;

    5、数据库配置,安装,备份自动化;6、设计分层化;

    7、系统错误日志化;8、皮肤个性化;

    9、体验人性化。

    数据存储:Mssql、Oracle、Sqlite、Access自主切换。
    前端框架:jQuery、easyui、knockout、alertify、ueditor
     
     系统框架:系统使用单独设计开发的后台管理系统,其经过测试具有很多优秀性能。
     UI设计:系统UI使用了动态菜单布局功能和主题css切换。
    性能优化:使用了css、js压缩缓存技术,Httphandlers拦截优化技术。
     
    二、系统截图
    用户管理
    菜单维护
     
    产品评价添加
     
     
    授权可视化
     
     
     
    数据库配置。
     
     
    三、系统设计
     
    解决方案结构,这是crm系统,
    么有一个aspx页面,
    下面贴上部分代码:
    $(function () {
        autoResize({ dataGrid: '#datagrid', gridType: 'treegrid', callback: mygrid.databind, height: 5 });
        simpleSearch();
        $('#a_add').click(mygrid.add);
        $('#a_edit').click(mygrid.edit);
        $('#a_delete').click(mygrid.del);
    });
    var mygrid = {
        actionUrl: '/crm/CategoryAction',
        formUrl: '/crm/html/Category.html',
        databind: function (size) {
            $('#datagrid').treegrid({
                toolbar: '#toolbar',
                url: mygrid.actionUrl,
                 size.width,
                height: size.height,
                idField: 'CategoryId',
                treeField: 'Name',
                iconCls: 'icon-nav',
                nowrap: false,
                rownumbers: true,
                animate: true,
                collapsible: false,
                columns: [[
                        { title: '名称', field: 'Name',  200, sortable: true },
                        { title: '排序', field: 'SortNum',  80, sortable: true }
                ]],
                pagination: true,
                pageSize: PAGESIZE,
                pageList: [20, 40, 50]
            });
        },
        reload: function () {
            $('#datagrid').treegrid('reload');
        },
        selectRow: function () {
            return $('#datagrid').treegrid('getSelected');
        },
        Init: function (categoryId) {
            var treeData = $('#datagrid').treegrid('getData');
            treeData = $.toJSON(treeData).replace(/CategoryId/g, 'id').replace(/Name/g, 'text');
            treeData = '[{"id":0,"selected":true,"text":"请选择父级菜单"},' + treeData.substr(1, treeData.length - 1);
            top.$('#txt_ParentId').combotree({
                data: $.evalJSON(treeData),
                panelWidth: '180',
                editable: false,
                lines: true,
                onSelect: function (item) {
                    var nodeId = top.$('#txt_ParentId').combotree('getValue');
                    if (item.id == categoryId) {
                        top.$('#txt_ParentId').combotree('setValue', nodeId);
                        top.$.messager.alert('系统提示', '上级菜单不能与当前菜单相同', 'warning');
                    }
                }
            }).combotree('setValue', 0);
        },
        add: function () {
            var addDialog = top.$.hDialog({
                title: '添加类别',  350, height: 200, href: mygrid.formUrl, ICONCLS: 'icon-add',
                onLoad: function () {
                    mygrid.Init();
                    var row = mygrid.selectRow();
                    if (row) {
                        top.$('#txt_ParentId').combotree('setValue', row.CategoryId);
                    }
                },
                submit: function () {
                    if (top.$('#qingdieform').form('validate')) {
                        $.ajaxjson(mygrid.actionUrl, createParam('add', 0), function (d) {
                            if (d.Success) {
                                msg.ok(d.Message);
                                addDialog.dialog('close');
                                mygrid.reload();
                            }
                            else {
                                MessageOrRedirect(d);
                            }
                        });
                    }
                }
            });
        },
        edit: function () {
            var row = mygrid.selectRow();
            if (row) {
                var addDialog = top.$.hDialog({
                    title: '编辑类别',
                    350,
                    height: 200,
                    href: mygrid.formUrl,
                    ICONCLS: 'icon-add',
                    onLoad: function () {
                        var m = top.ko.mapping.fromJS(row);
                        top.ko.applyBindings(m);
                        mygrid.Init(row.CategoryId);
                        top.$('#txt_ParentId').combotree('setValue', row.ParentId);
                    },
                    submit: function () {
                        if (top.$('#qingdieform').form('validate')) {
                            $.ajaxjson(mygrid.actionUrl, createParam('edit', row.CategoryId), function (d) {
                                if (d.Success) {
                                    msg.ok(d.Message);
                                    addDialog.dialog('close');
                                    mygrid.reload();
                                } else {
                                    MessageOrRedirect(d);
                                }
                            });
                        }
                    }
                });
            } else {
                msg.warning("请选择要编辑的客户");
            }
        },
        del: function () {
            var row = mygrid.selectRow();
            if (row) {
                msg.confirm('您确认要删除此类别吗?', function (r) {
                    if (r) {
                        $.ajaxjson(mygrid.actionUrl, createParamNoEntity('del', row.CategoryId), function (d) {
                            if (d.Success) {
                                msg.ok(d.Message);
                                mygrid.reload();
                            } else {
                                MessageOrRedirect(d);
                            }
                        });
                    }
                });
                return false;
            } else {
                msg.warning("请选择要删除的类别!");
            }
            return false;
        }
    };
    类别管理js
    using System.Web;
    using Qingdie.HTWeb.BLL.Ui;
    using Qingdie.HTWeb.CRM.BLL;
    using Qingdie.HTWeb.CRM.Model;
    using Qingdie.HTWeb.Help;
    
    namespace Qingdie.HTWeb.CRM.Action
    {
        public class CategoryAction:IAction
        {
            public void Action(HttpContext context)
            {
                var json = HttpContext.Current.Request["json"];
                var rpm = new RequestParamModel<Category>(context) { CurrentContext = context };
                if (!string.IsNullOrEmpty(json))
                {
                    rpm = JsonHelper.ConvertToObject<RequestParamModel<Category>>(json);
                    rpm.CurrentContext = context;
                }
                var bllCategory = new BllCategory();
                switch (rpm.Action)
                {
                    case "add": context.Response.Write(bllCategory.Add(rpm.Entity)); break;
                    case "edit":
                        var customer = rpm.Entity;
                        customer.CategoryId = rpm.KeyId;
                        context.Response.Write(bllCategory.Edit(customer));
                        break;
                    case "del": context.Response.Write(bllCategory.Delete(rpm.KeyId)); break;
                    case "catetree": context.Response.Write(bllCategory.GetCategoryTreeJson()); break;
                    default:
                        context.Response.Write(bllCategory.CategoryListJson(rpm.Pageindex, rpm.Pagesize, rpm.Filter, rpm.Sort, rpm.Order));
                        break;
                }
            }
        }
    }
    类别管理Action
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Qingdie.help;
    using Qingdie.HTWeb.BLL;
    using Qingdie.HTWeb.CRM.Model;
    using Qingdie.HTWeb.Help;
    using Qingdie.Log;
    using QingdieDb;
    
    namespace Qingdie.HTWeb.CRM.BLL
    {
        public class BllCategory
        {
            private const string Module = "类别管理";
    
            public string Add(Category category)
            {
                var msg = new JsonMessage { Message = "添加成功" };
                try
                {
                    using (var db = new DbContext())
                    {
                        if (db.Any<Category>(d => d.Name == category.Name))
                        {
                            msg.Message = "该类别名称已经存在";
                        }
                        else
                        {
                            db.Add(category);
                            msg.Success = true;
                        }
    
                    }
                }
                catch (Exception err)
                {
                    msg.Message = err.Message;
                    BllErrLog.ErrLog(err, Module, "类别添加", category);
                }
                return msg.ToString();
            }
    
            public string Edit(Category category)
            {
                var msg = new JsonMessage { Message = "编辑成功" };
                try
                {
                    using (var db = new DbContext())
                    {
                        if (db.Any<Category>(d => d.Name == category.Name && d.CategoryId != category.CategoryId))
                        {
                            msg.Message = "该类别名称已经存在";
                        }
                        else
                        {
                            db.Update(category, d => d.CategoryId == category.CategoryId);
                            msg.Success = true;
                        }
    
                    }
                }
                catch (Exception err)
                {
                    msg.Message = err.Message;
                    BllErrLog.ErrLog(err, Module, "类别编辑", category);
                }
                return msg.ToString();
            }
    
            public string Delete(int categoryId)
            {
                var msg = new JsonMessage { Message = "删除成功" };
                try
                {
                    using (var db = new DbContext())
                    {
                        db.Delete<Category>(d => d.CategoryId == categoryId);
                        msg.Success = true;
                    }
                }
                catch (Exception err)
                {
                    msg.Message = err.Message;
                    BllErrLog.ErrLog(err, Module, "类别删除", categoryId);
                }
                return msg.ToString();
            }
    
            public string CategoryListJson(int pageindex, int pagesize, string filterJson, string sort, string order)
            {
                try
                {
                    var orderType = OrderType.Asc;
                    if (!string.IsNullOrEmpty(order))
                    {
                        if (order == "desc") orderType = OrderType.Desc;
                    }
                    OrderSort<Category> sorts;
                    switch (sort)
                    {
                        case "Name": sorts = new OrderSort<Category>(d => d.Name, orderType); break;
                        default: sorts = new OrderSort<Category>(d => d.SortNum, orderType); break;
                    }
    
                    using (var db = new DbContext())
                    {
                        int pagecount;
                        int datacount;
                        var button = db.SelectPageObject(d => d.ParentId == 0, pageindex, pagesize, out pagecount, out datacount, sorts);
                        return JsonHelper.ToJson(datacount, button);
                    }
                }
                catch (Exception err)
                {
                    BllErrLog.ErrLog(err, Module, "类别类别获取");
                }
                return "[]";
            }
    
            public string GetCategoryTreeJson()
            {
                using (var db = new DbContext())
                {
                    var json = JsonHelper.ToJson(db.Select<Category>(d => d.ParentId == 0));
                    return json.Replace(""CategoryId"", ""id"").Replace(""Name"", ""text"");
                }
            }
        }
    }
    类别管理业务逻辑
    using System.Collections.Generic;
    using QingdieDb;
    
    namespace Qingdie.HTWeb.CRM.Model
    {
        [Entity("CategoryId")]
        public class Category
        {
            [Property(Identity = true)]
            public int? CategoryId { get; set; }
            public string Name { get; set; }
            public int? ParentId { get; set; }
            public int? SortNum { get; set; }
            [Relationship(RelationKey = "ParentId")]
            public List<Category> children { get; set; }
        }
    }
    类别实体

    一个功能仅仅需要这些,即可完美实现

    下面提供crm系统的全部源码,只限于非商业使用,

    如果需要本后台系统框架,请来联系购买!

    下载地址:

     http://blog.qingdie.net/html/20140712232453958.html
     
     
  • 相关阅读:
    Android使用SO库时要注意的一些问题
    android studio 生成引用arr
    android studio 改包名
    P2P通信原理与实现(C++)
    unity3d各种OpenFileDialog操作
    使用ffmpeg编码时,如何设置恒定码率,并控制好关键帧I帧间隔
    ffmpeg h264转h265
    照片人脸建模
    自动减面
    Unity3d 5.3.5使用sqlite3
  • 原文地址:https://www.cnblogs.com/qingdie/p/3840599.html
Copyright © 2020-2023  润新知