crmeb标准版开发同城配送功能,支持达达、UU跑腿、闪送:
提示:需要提前在UU、达达、闪送官方申请帐号
后台截图:
用户端截图:
提示:在微信小程序、H5、APP里的配送展示
MYSQL操作记录:
提示:在PHPMYADMIN等MYSQL操作软件执行以下语句
INSERT INTO `eb_system_menus` (`id`, `pid`, `icon`, `menu_name`, `module`, `controller`, `action`, `api_url`, `methods`, `params`, `sort`, `is_show`, `is_show_path`, `access`, `menu_path`, `path`, `auth_type`, `header`, `is_header`, `unique_auth`, `is_del`, `mark`) VALUES(4520, 1056, '', '同城配送配置', 'admin', '', '', '', '', '[]', 0, 1, 1, 1, '/setting/other_config/city_delivery/2/303', '12/1056', 1, '', 0, 'setting-city-delivery', 0, '同城配送配置');
INSERT INTO `eb_system_menus` (`id`, `pid`, `icon`, `menu_name`, `module`, `controller`, `action`, `api_url`, `methods`, `params`, `sort`, `is_show`, `is_show_path`, `access`, `menu_path`, `path`, `auth_type`, `header`, `is_header`, `unique_auth`, `is_del`, `mark`) VALUES(4521, 4, '', '同城配送订单', 'admin', '', '', '', '', '[]', 8, 1, 1, 1, '/order/city_delivery', '4', 1, '', 0, 'admin-order-cityDelivery-index', 0, '同城配送订单');
INSERT INTO `eb_system_config_tab` (`id`, `pid`, `title`, `eng_title`, `status`, `info`, `icon`, `type`, `sort`) VALUES(303, 65, '同城配送', 'city_delivery', 1, 0, '', 3, 0);
INSERT INTO `eb_system_config_tab` (`id`, `pid`, `title`, `eng_title`, `status`, `info`, `icon`, `type`, `sort`) VALUES(304, 303, '基础配置', 'basic_config', 1, 0, '', 3, 0);
INSERT INTO `eb_system_config_tab` (`id`, `pid`, `title`, `eng_title`, `status`, `info`, `icon`, `type`, `sort`) VALUES(305, 303, 'UU跑腿', 'uu_config', 1, 0, '', 3, 0);
INSERT INTO `eb_system_config_tab` (`id`, `pid`, `title`, `eng_title`, `status`, `info`, `icon`, `type`, `sort`) VALUES(306, 303, '达达配送', 'dd_config', 1, 0, '', 3, 0);
INSERT INTO `eb_system_config_tab` (`id`, `pid`, `title`, `eng_title`, `status`, `info`, `icon`, `type`, `sort`) VALUES(307, 303, '闪送', 'ss_config', 1, 0, '', 3, 0);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(519, 'city_delivery_status', 'switch', 'input', 304, '', 1, '', 0, 0, '\"0\"', '同城配送', '是否开启同城配送', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(520, 'uu_status', 'switch', 'input', 305, '', 1, '', 0, 0, '\"1\"', '是否启用', '官方网址:https://www.uupt.com;回调地址:https://你的网址/api/city_delivery/notify/uupt', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(521, 'uu_mode', 'radio', 'input', 305, '1=>生产环境\n2=>沙箱环境', 1, '', 0, 0, '\"1\"', '环境选择', '沙箱环境仅供发布订单测试使用,正式运营请切换为生产环境。', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(522, 'uu_appid', 'text', 'input', 305, '', 1, '', 100, 0, '\"\"', 'APPID', 'APPID', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(523, 'uu_appkey', 'text', 'input', 305, '', 1, '', 100, 0, '\"\"', 'APPKEY', 'APPKEY', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(524, 'uu_openid', 'text', 'input', 305, '', 1, '', 100, 0, '\"\"', 'OPENID', 'OPENID', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(525, 'dd_status', 'switch', 'input', 306, '', 1, '', 0, 0, '\"1\"', '是否启用', '官方网址:https://www.imdada.cn;回调地址:https://你的网址/api/city_delivery/notify/dada', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(526, 'dd_mode', 'radio', 'input', 306, '1=>生产环境\n2=>沙箱环境', 1, '', 0, 0, '\"1\"', '环境选择', '沙箱环境仅供发布订单测试使用,正式运营请切换为生产环境。', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(527, 'dd_appkey', 'text', 'input', 306, '', 1, '', 100, 0, '\"\"', 'app_key', 'app_key', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(528, 'dd_appsecret', 'text', 'input', 306, '', 1, '', 100, 0, '\"\"', 'app_secret', 'app_secret', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(529, 'dd_sourceid', 'text', 'input', 306, '', 1, '', 100, 0, '\"\"', '商户SourceID', '商户SourceID', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(530, 'ss_status', 'switch', 'input', 307, '', 1, '', 0, 0, '\"1\"', '是否启用', '官方网址:http://www.ishansong.com;回调地址:https://你的网址/api/city_delivery/notify/shansong', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(531, 'ss_mode', 'radio', 'input', 307, '1=>生产环境\n2=>沙箱环境', 1, '', 0, 0, '\"1\"', '环境选择', '沙箱环境仅供发布订单测试使用,正式运营请切换为生产环境。', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(532, 'ss_shopid', 'text', 'input', 307, '', 1, '', 100, 0, '\"\"', 'Shop ID', 'Shop ID', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(533, 'ss_clientid', 'text', 'input', 307, '', 1, '', 100, 0, '\"\"', 'Client ID', 'Client ID', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(534, 'ss_appsecret', 'text', 'input', 307, '', 1, '', 100, 0, '\"\"', 'App_secret', 'App_secret', 0, 1);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES(535, 'baidu_map_ak', 'text', 'input', 124, '', 1, '', 100, 0, '\"\"', '百度地图AK', '百度地图AK,申请地址:https://lbs.baidu.com', 0, 1);
CREATE TABLE `eb_store_delivery_order` (
`id` int(11) UNSIGNED NOT NULL,
`store_id` int(10) NOT NULL DEFAULT '0' COMMENT '提货门店ID',
`oid` int(10) UNSIGNED NOT NULL COMMENT '订单ID',
`uid` int(11) UNSIGNED NOT NULL DEFAULT '0',
`station_type` int(11) UNSIGNED NOT NULL COMMENT '平台类型',
`order_id` varchar(32) NOT NULL DEFAULT '' COMMENT '订单ID',
`delivery_no` varchar(255) NOT NULL DEFAULT '' COMMENT '配送方订单号',
`city_code` varchar(20) NOT NULL DEFAULT '' COMMENT '所属城市',
`cargo_price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '配送订单价格',
`finish_code` varchar(255) NOT NULL DEFAULT '' COMMENT '收货码',
`user_name` varchar(20) NOT NULL DEFAULT '' COMMENT '收货人',
`user_phone` varchar(11) NOT NULL DEFAULT '' COMMENT '收货人电话',
`from_address` varchar(255) NOT NULL DEFAULT '' COMMENT '起始位置',
`to_address` varchar(255) NOT NULL DEFAULT '' COMMENT '结束位置',
`from_lat` varchar(255) NOT NULL DEFAULT '' COMMENT '提货点纬度',
`from_lng` varchar(255) NOT NULL DEFAULT '' COMMENT '提货点经度',
`to_lat` varchar(255) NOT NULL DEFAULT '' COMMENT '用户纬度',
`to_lng` varchar(255) NOT NULL DEFAULT '' COMMENT '用户经度',
`distance` float NOT NULL DEFAULT '0' COMMENT '配送距离',
`fee` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '配送费',
`deduct_fee` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '取消订单违约金',
`mark` varchar(255) NOT NULL DEFAULT '' COMMENT '订单备注',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '状态 取消=-1, 待取货=2,配送中=3,已完成=4,物品返回中=9,物品返回完成=10,骑士到店=100',
`reason` varchar(255) NOT NULL COMMENT '取消原因',
`add_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='模板之家同城配送订单' ROW_FORMAT=COMPACT;
PHP及UNIAPP代码请私信联系提供:
提示:因为PHP和UNIAPP代码较多,不方便在文章展示,可以私信联系提供。