diff --git a/app/data/controller/ShopOrder.php b/app/data/controller/ShopOrder.php index 3aab30c48..b38980cc1 100644 --- a/app/data/controller/ShopOrder.php +++ b/app/data/controller/ShopOrder.php @@ -42,16 +42,17 @@ class ShopOrder extends Controller $query->equal('status,payment_type,payment_status'); $query->dateBetween('create_at,payment_datetime,cancel_datetime,truck_datetime,truck_send_datetime'); $query->like('order_no,truck_name,truck_phone,truck_province|truck_area|truck_address#address,truck_send_no,truck_send_name'); + // 发货信息搜索 + $db = $this->_query('ShopOrderSend')->like('address_name#truck_address_name,address_phone#truck_address_phone,address_province|address_city|address_area|address_content#truck_address_content')->db(); + if ($db->getOptions('where')) $query->whereRaw("order_no in {$db->field('order_no')->buildSql()}"); // 会员搜索查询 $db = $this->_query('DataMember')->like('phone#member_phone,nickname#member_nickname')->db(); - if ($db->getOptions('where')) $query->whereRaw("mid in {$db->fieldRaw('id')->buildSql()}"); + if ($db->getOptions('where')) $query->whereRaw("mid in {$db->field('id')->buildSql()}"); // 推荐人搜索查询 $db = $this->_query('DataMember')->like('phone#from_phone,nickname#from_nickname')->db(); - if ($db->getOptions('where')) $query->whereRaw("from in {$db->fieldRaw('id')->buildSql()}"); + if ($db->getOptions('where')) $query->whereRaw("from in {$db->field('id')->buildSql()}"); // 列表选项卡 - if (is_numeric($this->type = trim(input('type', 'ta'), 't'))) { - $query->where(['status' => $this->type]); - } + if (is_numeric($this->type = trim(input('type', 'ta'), 't'))) $query->where(['status' => $this->type]); // 分页排序处理 if (input('output') === 'json') { $result = $query->order('id desc')->page(true, false); @@ -87,7 +88,7 @@ class ShopOrder extends Controller $query = $this->app->db->name('ShopTruckCompany')->where($map); $this->items = $query->order('sort desc,id desc')->select()->toArray(); } - $this->_form($this->table, '', 'order_no'); + $this->_form('ShopOrderSend', '', 'order_no'); } /** @@ -101,15 +102,20 @@ class ShopOrder extends Controller { if ($this->request->isPost()) { $map = ['order_no' => $vo['order_no']]; - $order = $this->app->db->name($this->table)->where($map)->find(); + $order = $this->app->db->name('ShopOrder')->where($map)->find(); if (empty($order)) $this->error('订单查询异常,请稍候再试!'); // 配送快递公司信息填写 - $map = ['code_1|code_2|code_3' => $vo['truck_send_code']]; + $map = ['code_1|code_2|code_3' => $vo['company_code']]; $company = $this->app->db->name('ShopTruckCompany')->where($map)->find(); if (empty($company)) $this->error('配送快递公司异常,请重新选择快递公司!'); - $vo['status'] = 4; - $vo['truck_send_name'] = $company['name']; - $vo['truck_send_datetime'] = $order['truck_send_datetime'] ?: date('Y-m-d H:i:s'); + $vo['status'] = 2; + $vo['company_name'] = $company['name']; + $vo['send_datetime'] = $vo['send_datetime'] ?? date('Y-m-d H:i:s'); + // 更新订单发货状态 + if ($order['status'] === 3) { + $map = ['order_no' => $vo['order_no']]; + $this->app->db->name('ShopOrder')->where($map)->update(['status' => 4]); + } } } diff --git a/app/data/controller/ShopOrderSend.php b/app/data/controller/ShopOrderSend.php index 8c5fa6f58..d95064636 100644 --- a/app/data/controller/ShopOrderSend.php +++ b/app/data/controller/ShopOrderSend.php @@ -2,7 +2,6 @@ namespace app\data\controller; -use app\data\service\OrderService; use think\admin\Controller; /** @@ -16,10 +15,10 @@ class ShopOrderSend extends Controller * 绑定数据表 * @var string */ - private $table = 'ShopOrder'; + private $table = 'ShopOrderSend'; /** - * 订单数据管理 + * 订单发货管理 * @auth true * @menu true * @throws \think\db\exception\DataNotFoundException @@ -28,47 +27,42 @@ class ShopOrderSend extends Controller */ public function index() { - $this->title = '订单数据管理'; + $this->title = '订单发货管理'; // 状态数据统计 - $this->total = ['t0' => 0, 't1' => 0, 't2' => 0, 't3' => 0, 't4' => 0, 't5' => 0, 'ta' => 0]; + $this->total = ['t0' => 0, 't1' => 0, 't2' => 0, 'ta' => 0]; $this->app->db->name($this->table)->fieldRaw('status,count(1) total')->group('status')->select()->map(function ($vo) { $this->total["t{$vo['status']}"] = $vo['total']; $this->total["ta"] += $vo['total']; }); // 订单列表查询 - $query = $this->_query($this->table); - $query->equal('status,payment_type,payment_status'); - $query->dateBetween('create_at,payment_datetime,cancel_datetime,truck_datetime,truck_send_datetime'); - $query->like('order_no,truck_name,truck_phone,truck_province|truck_area|truck_address#address,truck_send_no,truck_send_name'); + $query = $this->_query($this->table)->order('id desc'); + $query->dateBetween('address_datetime,send_datetime')->equal('status')->like('send_number#truck_number'); + $query->like('address_phone,address_name,address_province|address_city|address_area|address_content#address_content'); // 会员搜索查询 $db = $this->_query('DataMember')->like('phone#member_phone,nickname#member_nickname')->db(); if ($db->getOptions('where')) $query->whereRaw("mid in {$db->fieldRaw('id')->buildSql()}"); - // 推荐人搜索查询 - $db = $this->_query('DataMember')->like('phone#from_phone,nickname#from_nickname')->db(); - if ($db->getOptions('where')) $query->whereRaw("from in {$db->fieldRaw('id')->buildSql()}"); // 列表选项卡 if (is_numeric($this->type = trim(input('type', 'ta'), 't'))) { $query->where(['status' => $this->type]); } // 分页排序处理 if (input('output') === 'json') { - $result = $query->order('id desc')->page(true, false); + $result = $query->page(true, false); $this->success('获取数据列表成功', $result); } else { - $query->order('id desc')->page(); + $query->page(); } } /** * 订单列表处理 * @param array $data - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException */ protected function _index_page_filter(array &$data) { - OrderService::instance()->buildItemData($data); + $mids = array_unique(array_column($data, 'mid')); + $members = $this->app->db->name('DataMember')->whereIn('id', $mids)->column('*', 'id'); + foreach ($data as &$vo) $vo['member'] = $members[$vo['mid']] ?? []; } } \ No newline at end of file diff --git a/app/data/data.sql b/app/data/data.sql index b6c7fc010..b335150fd 100644 --- a/app/data/data.sql +++ b/app/data/data.sql @@ -11,7 +11,7 @@ Target Server Version : 50562 File Encoding : 65001 - Date: 18/09/2020 13:09:36 + Date: 18/09/2020 14:43:04 */ SET NAMES utf8mb4; @@ -451,52 +451,14 @@ CREATE TABLE `shop_order` ( INDEX `idx_shop_order_orderno`(`order_no`) USING BTREE, INDEX `idx_shop_order_cancel_status`(`cancel_status`) USING BTREE, INDEX `idx_shop_order_payment_status`(`payment_status`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 42 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-内容' ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-内容' ROW_FORMAT = Compact; -- ---------------------------- -- Records of shop_order -- ---------------------------- -INSERT INTO `shop_order` VALUES (1, 1, 0, 'N20200911492814559', 0.00, 0.00, 0.83, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 02:22:26'); -INSERT INTO `shop_order` VALUES (2, 1, 0, 'N20200911495512556', 0.00, 0.00, 0.59, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 02:22:53'); -INSERT INTO `shop_order` VALUES (3, 1, 0, 'N20200911502330258', 0.00, 0.00, 0.80, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 02:23:21'); -INSERT INTO `shop_order` VALUES (4, 1, 0, 'N20200911504473628', 0.00, 0.00, 0.02, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 02:23:43'); -INSERT INTO `shop_order` VALUES (5, 1, 0, 'N20200911514242495', 0.00, 0.00, 0.06, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 02:24:40'); -INSERT INTO `shop_order` VALUES (6, 1, 0, 'N20200911520162975', 0.00, 0.00, 0.59, 0.00, 0.00, '', '', 0, 0.00, '', '', 1, '会员主动取消订单!', '2020-09-11 14:04:50', 0, 4, 0, '2020-09-11 02:24:59'); -INSERT INTO `shop_order` VALUES (7, 1, 0, 'N20200911600130903', 0.00, 0.00, 0.29, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:26:59'); -INSERT INTO `shop_order` VALUES (8, 1, 0, 'N20200911600295232', 0.00, 0.00, 0.46, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:00'); -INSERT INTO `shop_order` VALUES (9, 1, 0, 'N20200911600233650', 0.00, 0.00, 0.29, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:00'); -INSERT INTO `shop_order` VALUES (10, 1, 0, 'N20200911600385421', 0.00, 0.00, 0.01, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:00'); -INSERT INTO `shop_order` VALUES (11, 1, 0, 'N20200911600369549', 0.00, 0.00, 0.09, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:00'); -INSERT INTO `shop_order` VALUES (12, 1, 0, 'N20200911600333848', 0.00, 0.00, 0.38, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:01'); -INSERT INTO `shop_order` VALUES (13, 1, 0, 'N20200911600324237', 0.00, 0.00, 0.91, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:01'); -INSERT INTO `shop_order` VALUES (14, 1, 0, 'N20200911600356390', 0.00, 0.00, 0.51, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:01'); -INSERT INTO `shop_order` VALUES (15, 1, 0, 'N20200911600426190', 0.00, 0.00, 0.93, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:01'); -INSERT INTO `shop_order` VALUES (16, 1, 0, 'N20200911600477029', 0.00, 0.00, 0.91, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:01'); -INSERT INTO `shop_order` VALUES (17, 1, 0, 'N20200911600436272', 0.00, 0.00, 0.40, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order` VALUES (18, 1, 0, 'N20200911600506447', 0.00, 0.00, 0.24, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order` VALUES (19, 1, 0, 'N20200911600568070', 0.00, 0.00, 0.76, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order` VALUES (20, 1, 0, 'N20200911600544913', 0.00, 0.00, 0.81, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order` VALUES (21, 1, 0, 'N20200911600573331', 0.00, 0.00, 0.76, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order` VALUES (22, 1, 0, 'N20200911600550149', 0.00, 0.00, 0.23, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order` VALUES (23, 1, 0, 'N20200911600528187', 0.00, 0.00, 0.07, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order` VALUES (24, 1, 0, 'N20200911600517358', 0.00, 0.00, 0.35, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order` VALUES (25, 1, 0, 'N20200911600699478', 0.00, 0.00, 0.91, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order` VALUES (26, 1, 0, 'N20200911600665999', 0.00, 0.00, 0.06, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order` VALUES (27, 1, 0, 'N20200911600621891', 0.00, 0.00, 0.70, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order` VALUES (28, 1, 0, 'N20200911600692056', 0.00, 0.00, 0.64, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order` VALUES (29, 1, 0, 'N20200911600615563', 0.00, 0.00, 0.49, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order` VALUES (30, 1, 0, 'N20200911600608048', 0.00, 0.00, 0.85, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order` VALUES (31, 1, 0, 'N20200911600614123', 0.00, 0.00, 0.19, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order` VALUES (32, 1, 0, 'N20200911600726554', 0.00, 0.00, 0.46, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order` VALUES (33, 1, 0, 'N20200911600770479', 0.00, 0.00, 0.18, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order` VALUES (34, 1, 0, 'N20200911600786906', 0.00, 0.00, 1.00, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order` VALUES (35, 1, 0, 'N20200911600733630', 0.00, 0.00, 0.49, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order` VALUES (36, 1, 0, 'N20200911600795096', 0.00, 0.00, 0.74, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order` VALUES (37, 1, 0, 'N20200911600705206', 0.00, 0.00, 0.50, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order` VALUES (38, 1, 0, 'N20200911600719700', 0.00, 0.00, 0.99, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order` VALUES (39, 1, 0, 'N20200911600895782', 0.00, 0.00, 0.61, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order` VALUES (40, 1, 0, 'N20200911600894046', 0.00, 0.00, 0.94, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order` VALUES (41, 1, 0, 'N20200911600847364', 0.00, 0.00, 0.14, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 0, 1, 0, '2020-09-11 08:27:05'); +INSERT INTO `shop_order` VALUES (1, 1, 0, 'N20200918302856917', 43.40, 44.00, 0.60, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 1, 4, 0, '2020-09-18 05:00:12'); +INSERT INTO `shop_order` VALUES (2, 1, 0, 'N20200918312265361', 44.00, 44.00, 0.27, 0.00, 0.00, '', '', 0, 0.00, '', '', 1, '后台未支付的取消', '2020-09-18 13:50:29', 1, 0, 0, '2020-09-18 05:01:06'); +INSERT INTO `shop_order` VALUES (3, 1, 0, 'N20200918312862491', 44.00, 44.00, 1.00, 0.00, 0.00, '', '', 0, 0.00, '', '', 0, '', '', 1, 1, 0, '2020-09-18 05:01:12'); -- ---------------------------- -- Table structure for shop_order_item @@ -528,52 +490,14 @@ CREATE TABLE `shop_order_item` ( INDEX `idx_shop_order_item_goods_sku`(`goods_sku`) USING BTREE, INDEX `idx_shop_order_item_goods_code`(`goods_code`) USING BTREE, INDEX `idx_shop_order_item_goods_spec`(`goods_spec`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 42 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-商品' ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-商品' ROW_FORMAT = Compact; -- ---------------------------- -- Records of shop_order_item -- ---------------------------- -INSERT INTO `shop_order_item` VALUES (1, 1, 'N20200911492814559', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 02:22:26'); -INSERT INTO `shop_order_item` VALUES (2, 1, 'N20200911495512556', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 02:22:53'); -INSERT INTO `shop_order_item` VALUES (3, 1, 'N20200911502330258', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 02:23:21'); -INSERT INTO `shop_order_item` VALUES (4, 1, 'N20200911504473628', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 02:23:43'); -INSERT INTO `shop_order_item` VALUES (5, 1, 'N20200911514242495', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 02:24:40'); -INSERT INTO `shop_order_item` VALUES (6, 1, 'N20200911520162975', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 02:24:59'); -INSERT INTO `shop_order_item` VALUES (7, 1, 'N20200911600130903', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:26:59'); -INSERT INTO `shop_order_item` VALUES (8, 1, 'N20200911600295232', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:00'); -INSERT INTO `shop_order_item` VALUES (9, 1, 'N20200911600233650', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:00'); -INSERT INTO `shop_order_item` VALUES (10, 1, 'N20200911600385421', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:00'); -INSERT INTO `shop_order_item` VALUES (11, 1, 'N20200911600369549', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:00'); -INSERT INTO `shop_order_item` VALUES (12, 1, 'N20200911600333848', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:01'); -INSERT INTO `shop_order_item` VALUES (13, 1, 'N20200911600324237', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:01'); -INSERT INTO `shop_order_item` VALUES (14, 1, 'N20200911600356390', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:01'); -INSERT INTO `shop_order_item` VALUES (15, 1, 'N20200911600426190', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:01'); -INSERT INTO `shop_order_item` VALUES (16, 1, 'N20200911600477029', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order_item` VALUES (17, 1, 'N20200911600436272', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order_item` VALUES (18, 1, 'N20200911600506447', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order_item` VALUES (19, 1, 'N20200911600568070', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order_item` VALUES (20, 1, 'N20200911600544913', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order_item` VALUES (21, 1, 'N20200911600573331', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:02'); -INSERT INTO `shop_order_item` VALUES (22, 1, 'N20200911600550149', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order_item` VALUES (23, 1, 'N20200911600528187', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order_item` VALUES (24, 1, 'N20200911600517358', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order_item` VALUES (25, 1, 'N20200911600699478', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order_item` VALUES (26, 1, 'N20200911600665999', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order_item` VALUES (27, 1, 'N20200911600621891', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order_item` VALUES (28, 1, 'N20200911600692056', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:03'); -INSERT INTO `shop_order_item` VALUES (29, 1, 'N20200911600615563', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order_item` VALUES (30, 1, 'N20200911600608048', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order_item` VALUES (31, 1, 'N20200911600614123', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order_item` VALUES (32, 1, 'N20200911600726554', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order_item` VALUES (33, 1, 'N20200911600770479', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order_item` VALUES (34, 1, 'N20200911600786906', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order_item` VALUES (35, 1, 'N20200911600733630', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:04'); -INSERT INTO `shop_order_item` VALUES (36, 1, 'N20200911600795096', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order_item` VALUES (37, 1, 'N20200911600705206', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order_item` VALUES (38, 1, 'N20200911600719700', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order_item` VALUES (39, 1, 'N20200911600895782', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order_item` VALUES (40, 1, 'N20200911600894046', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:05'); -INSERT INTO `shop_order_item` VALUES (41, 1, 'N20200911600847364', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 0.00, 0.00, 0.00, 0.00, 1, 1, '', 1, 0, '2020-09-11 08:27:05'); +INSERT INTO `shop_order_item` VALUES (1, 1, 'N20200918302856917', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 111.00, 44.00, 111.00, 44.00, 1, 1, '', 1, 0, '2020-09-18 05:00:12'); +INSERT INTO `shop_order_item` VALUES (2, 1, 'N20200918312265361', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 111.00, 44.00, 111.00, 44.00, 1, 1, '', 1, 0, '2020-09-18 05:01:06'); +INSERT INTO `shop_order_item` VALUES (3, 1, 'N20200918312862491', '36152365213', 'http://127.0.0.1:8000/upload/25/e9c92266d3b7ab86d3221b0c9305fe.jpg', 'S159962280311732', 'G69962280234', '默认分组::默认规格', 111.00, 44.00, 111.00, 44.00, 1, 1, '', 1, 0, '2020-09-18 05:01:12'); -- ---------------------------- -- Table structure for shop_order_send @@ -596,9 +520,9 @@ CREATE TABLE `shop_order_send` ( `template_amount` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '配送计算金额', `company_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递公司编码', `company_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递公司名称', - `company_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递运送单号', - `send_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '发送时间', - `send_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '发送备注', + `send_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递运送单号', + `send_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递发送时间', + `send_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递发送备注', `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '商品状态(1使用,0禁用)', `deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)', `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', @@ -607,11 +531,12 @@ CREATE TABLE `shop_order_send` ( INDEX `idx_shop_order_send_status`(`status`) USING BTREE, INDEX `idx_shop_order_send_deleted`(`deleted`) USING BTREE, INDEX `idx_shop_order_send_order_no`(`order_no`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-配送' ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-配送' ROW_FORMAT = Compact; -- ---------------------------- -- Records of shop_order_send -- ---------------------------- +INSERT INTO `shop_order_send` VALUES (1, 1, 'N20200918302856917', 'A2020091128300', '小小邹', '13617343811', '广东省', '广州市', '天河区', '体育中心11号', '2020-09-18 13:20:22', '', '邮费模板编码无效!', 0.00, 'ZTO', '中通快递', '75341484568973', '2020-09-18 13:36:22', '1235123', 2, 0, '2020-09-18 05:03:06'); -- ---------------------------- -- Table structure for shop_order_service diff --git a/app/data/service/OrderService.php b/app/data/service/OrderService.php index c54565d83..cdf9b253d 100644 --- a/app/data/service/OrderService.php +++ b/app/data/service/OrderService.php @@ -57,15 +57,19 @@ class OrderService extends Service */ public function buildItemData(array &$data = []): array { + $nos = array_unique(array_column($data, 'order_no')); $mids = array_unique(array_merge(array_column($data, 'mid'), array_column($data, 'from'))); $members = $this->app->db->name('DataMember')->whereIn('id', $mids)->column('*', 'id'); - // 商品详情管理 - $query = $this->app->db->name('ShopOrderItem')->where(['status' => 1, 'deleted' => 0]); - $items = $query->whereIn('order_no', array_unique(array_column($data, 'order_no')))->select()->toArray(); + // 关联商品详情 + $map = ['status' => 1, 'deleted' => 0]; + $items = $this->app->db->name('ShopOrderItem')->where($map)->whereIn('order_no', $nos)->select()->toArray(); + // 关联发货信息 + $trucks = $this->app->db->name('ShopOrderSend')->whereIn('order_no', $nos)->column('*', 'order_no'); foreach ($data as &$vo) { - [$vo['count'], $vo['items']] = [0, []]; + $vo['truck'] = $trucks[$vo['order_no']] ?? []; $vo['member'] = $members[$vo['mid']] ?? []; $vo['fromer'] = $members[$vo['from']] ?? []; + [$vo['count'], $vo['items']] = [0, []]; foreach ($items as $item) { if ($vo['order_no'] === $item['order_no']) { $vo['count'] += $item['stock_sales']; diff --git a/app/data/view/shop_order/index.html b/app/data/view/shop_order/index.html index cb389ec09..771bd0d6d 100644 --- a/app/data/view/shop_order/index.html +++ b/app/data/view/shop_order/index.html @@ -19,8 +19,8 @@ - 会员信息 - 订单信息 + 会员信息 + 订单信息 发货信息 商品信息 @@ -65,26 +65,24 @@ - 收货信息:{$vo.truck_name|default='--'}{$vo.truck_phone}
- 收货地址:{$vo.truck_province|default='--'}{$vo.truck_city}{$vo.truck_area}{$vo.truck_address}
- 发货状态:{if empty($vo.truck_send_code)} - 未发货 - {else} - {$vo.truck_send_name|default='--'} - {$vo.truck_send_no|default='--'} + 收货信息:{$vo.truck.address_name|default='--'}{$vo.truck.address_phone|default=''}
+ 收货地址:{$vo.truck.address_province|default='--'}{$vo.truck.address_city|default=''}{$vo.truck.address_area|default=''}{$vo.truck.address_content|default=''}
+ 发货状态:{if empty($vo.truck.company_code)}未发货{else} + {$vo.truck.company_name|default='--'} + {$vo.truck.send_number|default='--'} {/if} - {if $vo.status eq 3} + {if auth('truck') and $vo.status eq 3} 填写发货 - {elseif $vo.status eq 4} + {elseif auth('truck') and $vo.status eq 4} 修改发货 {/if} 取消订单
- 发货时间:{$vo.truck_send_datetime|format_datetime}
+ 发货时间:{$vo.truck.send_datetime|default='--'}
{foreach $vo.items as $item} diff --git a/app/data/view/shop_order/index_search.html b/app/data/view/shop_order/index_search.html index 24e5ff78e..b396c95a8 100644 --- a/app/data/view/shop_order/index_search.html +++ b/app/data/view/shop_order/index_search.html @@ -34,7 +34,7 @@
- +
@@ -79,19 +79,19 @@
- +
- +
- +
diff --git a/app/data/view/shop_order/truck.html b/app/data/view/shop_order/truck.html index 82bcdcb86..3e9c88d6d 100644 --- a/app/data/view/shop_order/truck.html +++ b/app/data/view/shop_order/truck.html @@ -6,16 +6,16 @@
收货所在区域 - (原区域: {$vo.truck_province|default='--'} {$vo.truck_city|default=''} {$vo.truck_area|default=''} ) + (原区域: {$vo.address_province|default='--'} {$vo.address_city|default=''} {$vo.address_area|default=''} )
@@ -24,8 +24,8 @@
@@ -34,9 +34,9 @@
{notempty name='vo.order_no'}{/notempty} + {notempty name='vo.send_datetime'}{/notempty}
@@ -67,7 +68,7 @@ (function (province, city, area) { new PCAS("form_province", "form_city", "form_area", province, city, area); window.form.render(); - })('{$vo.truck_province|default=""}', '{$vo.truck_city|default=""}', '{$vo.truck_area|default=""}'); + })('{$vo.address_province|default=""}', '{$vo.address_city|default=""}', '{$vo.address_area|default=""}'); }); $('[data-express-query]').on('click', function () { (function (code, number) { diff --git a/app/data/view/shop_order_send/index.html b/app/data/view/shop_order_send/index.html index b2001cc0d..b8e8bbdc8 100644 --- a/app/data/view/shop_order_send/index.html +++ b/app/data/view/shop_order_send/index.html @@ -3,7 +3,7 @@ {block name="content"}
    - {foreach ['ta'=>'全部订单','t2'=>'待支付的订单','t3'=>'待发货的订单','t4'=>'待收货的订单','t5'=>'已完成的订单','t0'=>'已取消的订单'] as $k=>$v} + {foreach ['ta'=>'全部订单','t1'=>'待发货的订单','t2'=>'已发货的订单','t0'=>'已取消的订单'] as $k => $v} {if isset($type) and 't'.$type eq $k}
  • {$v} {$total[$k]??0}
  • {else} @@ -11,7 +11,7 @@ {/if}{/foreach}
- {include file='shop_order/index_search'} + {include file='shop_order_send/index_search'} {notempty name='list'} @@ -19,10 +19,10 @@ - - - - + + + + {/notempty} @@ -33,68 +33,35 @@ - + + - {/foreach} diff --git a/app/data/view/shop_order_send/index_search.html b/app/data/view/shop_order_send/index_search.html index fe6c708b7..6f046a4e4 100644 --- a/app/data/view/shop_order_send/index_search.html +++ b/app/data/view/shop_order_send/index_search.html @@ -13,18 +13,6 @@ -
- -
- -
-
-
- -
- -
-
@@ -34,102 +22,79 @@
- +
- +
- +
- +
- +
- -
-
-
- -
- +
- +
- +
- +
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- +
{if auth('export')} - + {/if}
- {if auth('export')} - - {/if} \ No newline at end of file diff --git a/config/view.php b/config/view.php index c2ab7e9fc..b9a20bdef 100644 --- a/config/view.php +++ b/config/view.php @@ -23,7 +23,7 @@ return [ // 模板后缀 'view_suffix' => 'html', // 去除HTML空格换行 - 'strip_space' => true, + 'strip_space' => false, // 模板文件名分隔符 'view_depr' => DIRECTORY_SEPARATOR, // 模板缓存配置
会员信息订单信息发货信息商品信息会员信息收货信息发货状态
-
- img -
- 推荐会员:{$vo.fromer.nickname|default='--'}
- 推荐手机:{$vo.fromer.phone|default='--'}{notempty name='vo.fromer.vip_level'} [ VIP{$vo.fromer.vip_level} ] {$vo.fromer.vip_title}{/notempty}
-
-
-
- img -
- 会员昵称:{$vo.member.nickname|default='--'}
- 会员手机:{$vo.member.phone|default='--'}{notempty name='vo.member.vip_level'} [ VIP{$vo.member.vip_level} ] {$vo.member.vip_title}{/notempty}
-
-
-
-
- {eq name='vo.status' value='0'}已取消{/eq} - {eq name='vo.status' value='1'}预订单{/eq} - {eq name='vo.status' value='2'}待付款{/eq} - {eq name='vo.status' value='3'}待发货{/eq} - {eq name='vo.status' value='4'}已发货{/eq} - {eq name='vo.status' value='5'}已完成{/eq} -
-
- 订单单号:{$vo.order_no|default=''}
- 订单金额:{$vo.amount_total+0}{if $vo.amount_express>0}(含{$vo.amount_express+0}元){else}(包邮){/if}已支付 {$vo.payment_amount+0}
- 下单时间:{$vo.create_at|format_datetime}
- 支付时间:{$vo.payment_datetime|format_datetime}{if $vo.payment_datetime} ({$vo.pay_type|default='-'}){/if}
+ img +
+ 会员昵称:{$vo.member.nickname|default='--'}
+ 会员手机:{$vo.member.phone|default='--'}
+ 订单单号:{$vo.order_no|default='--'}
- 收货信息:{$vo.truck_name|default='--'}{$vo.truck_phone}
- 收货地址:{$vo.truck_province|default='--'}{$vo.truck_city}{$vo.truck_area}{$vo.truck_address}
- 发货状态:{if empty($vo.truck_send_code)} + 收货姓名:{$vo.address_name|default='--'}{$vo.address_phone}
+ 收货地址:{$vo.address_province|default='--'}{$vo.address_city}{$vo.address_area}{$vo.address_content}
+ 提交时间:{$vo.address_datetime|format_datetime}
+
+ {if empty($vo.send_datetime)} 未发货 {else} - {$vo.truck_send_name|default='--'} - {$vo.truck_send_no|default='--'} + {$vo.company_name|default='--'} + {$vo.send_number|default='--'} +
于 {$vo.send_datetime|format_datetime} 发货!
{/if} - {if $vo.status eq 3} +
+ {if $vo.status eq 1} 填写发货 - {elseif $vo.status eq 4} + {elseif $vo.status eq 2} 修改发货 {/if} - - 取消订单 - -
- 发货时间:{$vo.truck_send_datetime|format_datetime}
-
- {foreach $vo.items as $item} -
- {$item.stock_sales|default=0}件 - x - {$item.price_market+0}元 - {$item.goods_name|default=''} ( {$item.goods_spec|think_show_goods_spec}) -
- {/foreach}