• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

    skuTable: 基于 Layui 的商品规格组件。支持单规格/多规格切换。 ...

    原作者: [db:作者] 来自: 网络 收藏 邀请

    开源软件名称:

    skuTable

    开源软件地址:

    https://gitee.com/cshaptx4869/sku-table

    开源软件介绍:

    SkuTable 组件

    简介

    基于 Layui 的商品规格组件。v1.x版本不再维护,推荐使用v2.x版本。

    主要功能:

    • 支持商品单规格和多规格切换
    • 支持商品属性配置
    • 支持规则/规格值添加、删除
    • 支持规格行拖拽排序
    • 支持SKU表同一列批量赋值
    • 支持SKU表上传图片
    • 支持SKU表相同属性值行合并

    演示

    注意:因示例中调用了本地json数据,需要在服务端预览,本地直接预览会有跨域问题!

    在线演示

    单规格

    多规格

    数据表

    注:表结构参考 RageFrame 项目!

    系统规格表

    CREATE TABLE `shop_base_spec` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `merchant_id` int(10) unsigned DEFAULT '0' COMMENT '商户id', `title` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '规格名称', `sort` int(11) NOT NULL DEFAULT '999' COMMENT '排列次序', `explain` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '规格说明', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:已删除,0:禁用,1:正常)', `created_at` int(10) unsigned DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) unsigned DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`id`), KEY `product_attribute_category_id_name_index` (`title`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统规格表'

    系统规格值表

    CREATE TABLE `shop_base_spec_value` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `merchant_id` int(10) unsigned DEFAULT '0' COMMENT '商户id', `spec_id` int(11) NOT NULL COMMENT '规格id', `title` varchar(125) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '选项名称', `sort` int(11) NOT NULL DEFAULT '999' COMMENT '排序', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:已删除,0:禁用,1:正常)', `created_at` int(10) unsigned DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) unsigned DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`id`), KEY `product_attribute_option_name_attr_id_index` (`title`,`spec_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统规格值表'

    系统商品类型表

    CREATE TABLE `shop_base_product_type` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `merchant_id` int(10) unsigned DEFAULT '0' COMMENT '商户id', `title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '类型名称', `sort` int(11) DEFAULT '999' COMMENT '排序', `spec_ids` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '关联规格ids', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:已删除,0:禁用,1:正常)', `created_at` int(10) unsigned DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) unsigned DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统商品类型表'

    系统商品类型属性表

    CREATE TABLE `shop_base_product_type_attribute` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `merchant_id` int(10) unsigned DEFAULT '0' COMMENT '商户id', `product_type_id` int(11) NOT NULL COMMENT '商品类型id', `title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '属性值名称', `value` varchar(1000) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '属性对应相关选项数据', `type` int(11) NOT NULL DEFAULT '1' COMMENT '属性对应输入类型1.文本2.单选3.多选', `sort` int(11) NOT NULL DEFAULT '999' COMMENT '排序号', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:已删除,0:禁用,1:正常)', `created_at` int(10) unsigned DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) unsigned DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统商品类型属性值'

    商品表

    CREATE TABLE `shop_product` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `merchant_id` int(11) NOT NULL DEFAULT '0' COMMENT '商家编号', `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品标题', `picture` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '商品主图', `cate_id` int(11) unsigned NOT NULL COMMENT '商品分类id', `brand_id` int(11) unsigned DEFAULT '0' COMMENT '品牌id', `sketch` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '简述', `intro` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品描述', `keywords` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '商品关键字', `tags` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '标签', `marque` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '商品型号', `barcode` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '仓库条码', `sales` int(11) NOT NULL DEFAULT '0' COMMENT '虚拟购买量', `real_sales` int(10) NOT NULL DEFAULT '0' COMMENT '实际销量', `total_sales` int(11) DEFAULT '0' COMMENT '总销量', `price` decimal(8,2) NOT NULL COMMENT '商品价格', `market_price` decimal(8,2) DEFAULT '0.00' COMMENT '市场价格', `cost_price` decimal(19,2) DEFAULT '0.00' COMMENT '成本价', `wholesale_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '拼团价格', `stock` int(11) NOT NULL DEFAULT '0' COMMENT '库存量', `warning_stock` int(11) NOT NULL DEFAULT '0' COMMENT '库存警告', `covers` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '幻灯片', `posters` json DEFAULT NULL COMMENT '宣传海报', `state` tinyint(4) NOT NULL DEFAULT '0' COMMENT '审核状态 -1 审核失败 0 未审核 1 审核成功', `is_package` enum('0','1') COLLATE utf8mb4_unicode_ci DEFAULT '0' COMMENT '是否是套餐', `is_attribute` enum('0','1') COLLATE utf8mb4_unicode_ci DEFAULT '0' COMMENT '启用商品规格', `sort` int(11) NOT NULL DEFAULT '999' COMMENT '排序', `product_status` tinyint(4) DEFAULT '1' COMMENT '商品状态 0下架,1正常,10违规(禁售)', `shipping_type` tinyint(2) DEFAULT '1' COMMENT '运费类型 1免邮2买家付邮费', `shipping_fee` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '运费', `shipping_fee_id` int(11) NOT NULL DEFAULT '0' COMMENT '物流模板id', `shipping_fee_type` int(11) NOT NULL DEFAULT '1' COMMENT '计价方式1.计件2.体积3.重量', `product_weight` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '商品重量', `product_volume` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '商品体积', `marketing_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '促销类型', `marketing_id` int(11) NOT NULL DEFAULT '0' COMMENT '促销活动ID', `marketing_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品促销价格', `point_exchange_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '积分兑换类型', `point_exchange` int(11) NOT NULL DEFAULT '0' COMMENT '积分兑换', `max_use_point` int(11) NOT NULL DEFAULT '0' COMMENT '积分抵现最大可用积分数 0为不可使用', `integral_give_type` int(1) NOT NULL DEFAULT '0' COMMENT '积分赠送类型 0固定值 1按比率', `give_point` int(11) NOT NULL DEFAULT '0' COMMENT '购买商品赠送积分', `min_buy` int(11) NOT NULL DEFAULT '1' COMMENT '最少买几件', `max_buy` int(11) NOT NULL DEFAULT '0' COMMENT '限购 0 不限购', `view` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品点击数量', `star` int(10) unsigned NOT NULL DEFAULT '5' COMMENT '好评星级', `collect_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '收藏数量', `comment_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '评价数', `transmit_num` int(11) NOT NULL DEFAULT '0' COMMENT '分享数', `province_id` int(10) unsigned DEFAULT '0' COMMENT '一级地区id', `city_id` int(10) unsigned DEFAULT '0' COMMENT '二级地区id', `area_id` int(10) DEFAULT '0' COMMENT '三级地区', `address_name` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '地址', `is_stock_visible` int(1) NOT NULL DEFAULT '1' COMMENT '库存显示 0不显示1显示', `is_hot` int(1) NOT NULL DEFAULT '0' COMMENT '是否热销商品', `is_recommend` int(1) NOT NULL DEFAULT '0' COMMENT '是否推荐', `is_new` int(1) NOT NULL DEFAULT '0' COMMENT '是否新品', `is_bill` int(1) NOT NULL DEFAULT '0' COMMENT '是否开具增值税发票 1是,0否', `product_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品类型', `spec_data` text COLLATE utf8mb4_unicode_ci COMMENT '商品规格', `match_point` float DEFAULT '5' COMMENT '实物与描述相符(根据评价计算)', `match_ratio` float DEFAULT '100' COMMENT '实物与描述相符(根据评价计算)百分比', `sale_date` int(11) DEFAULT '0' COMMENT '上下架时间', `is_virtual` tinyint(1) DEFAULT '0' COMMENT '是否虚拟商品', `production_date` int(11) DEFAULT '0' COMMENT '生产日期', `shelf_life` int(11) DEFAULT '0' COMMENT '保质期', `is_open_presell` tinyint(4) DEFAULT '0' COMMENT '是否支持预售', `presell_time` int(11) DEFAULT '0' COMMENT '预售发货时间', `presell_day` int(11) DEFAULT '0' COMMENT '预售发货天数', `presell_delivery_type` int(11) DEFAULT '1' COMMENT '预售发货方式1. 按照预售发货时间 2.按照预售发货天数', `presell_price` decimal(10,2) DEFAULT '0.00' COMMENT '预售金额', `unit` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '商品单位', `video_url` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '展示视频', `supplier_id` int(11) DEFAULT '0' COMMENT '供货商id', `is_open_commission` tinyint(4) DEFAULT '0' COMMENT '是否支持分销', `status` tinyint(4) DEFAULT '1' COMMENT '状态', `created_at` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', PRIMARY KEY (`id`), KEY `price` (`price`), KEY `cate_id` (`cate_id`), KEY `brand_id` (`brand_id`), KEY `view` (`view`), KEY `star` (`star`), KEY `comment_num` (`comment_num`), KEY `sort` (`sort`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品表'

    商品属性表

    CREATE TABLE `shop_product_attribute` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `merchant_id` int(10) unsigned DEFAULT '0' COMMENT '商户id', `product_id` int(11) NOT NULL COMMENT '商品id', `product_type_attribute_id` int(11) NOT NULL DEFAULT '0' COMMENT '系统商品类型属性id', `title` varchar(125) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '属性名称', `value` varchar(125) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '属性值', `sort` int(11) NOT NULL DEFAULT '999' COMMENT '排序', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:已删除,0:禁用,1:正常)', `created_at` int(10) unsigned DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) unsigned DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`id`), KEY `product_supplier_attribute_name_product_id_index` (`title`,`product_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品属性表'

    商品规格表

    CREATE TABLE `shop_product_spec` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `merchant_id` int(10) unsigned DEFAULT '0' COMMENT '商户id', `product_id` int(11) NOT NULL COMMENT '商品id', `spec_id` int(11) NOT NULL DEFAULT '0' COMMENT '系统规格id', `title` varchar(125) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '规格名称', `sort` int(11) NOT NULL DEFAULT '999' COMMENT '排序', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:已删除,0:禁用,1:正常)', `created_at` int(10) unsigned DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) unsigned DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`id`), KEY `product_supplier_attribute_name_product_id_index` (`title`,`product_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品规格表'

    商品规格值表

    CREATE TABLE `shop_product_spec_value` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `merchant_id` int(10) DEFAULT '0' COMMENT '商户id', `product_id` int(11) NOT NULL COMMENT '商品id', `spec_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '系统规格id', `spec_value_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '系统规格值id', `title` varchar(125) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '属性标题', `data` varchar(125) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '属性值', `sort` int(11) NOT NULL DEFAULT '999' COMMENT '排序', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(-1:已删除,0:禁用,1:正常)', `created_at` int(10) unsigned DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) unsigned DEFAULT '0' COMMENT '修改时间',
                          

    鲜花

    握手

    雷人

    路过

    鸡蛋
    该文章已有0人参与评论

    请发表评论

    全部评论

    专题导读
    热门推荐
    阅读排行榜

    扫描微信二维码

    查看手机版网站

    随时了解更新最新资讯

    139-2527-9053

    在线客服(服务时间 9:00~18:00)

    在线QQ客服
    地址:深圳市南山区西丽大学城创智工业园
    电邮:jeky_zhao#qq.com
    移动电话:139-2527-9053

    Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap