增加取货、配送、收货时间
This commit is contained in:
parent
9f038565f2
commit
18d6dfee06
@ -80,6 +80,14 @@ class LogisticsController extends BaseApiController
|
||||
}
|
||||
)->toArray();
|
||||
$item['product_count'] = count( $item['products']);
|
||||
if($item['status'] == 3){
|
||||
$records = Db::name('logistics_record')->field('status,create_time')->where('lst_id', $item['id'])->order('create_time asc')->select()->toArray();
|
||||
foreach($records as $k=>$v){
|
||||
if($v['status'] == 1) $item['qh_time'] = date('Y-m-d H:i:s', $v['create_time']);
|
||||
if($v['status'] == 2) $item['pc_time'] = date('Y-m-d H:i:s', $v['create_time']);
|
||||
if($v['status'] == 3) $item['sh_time'] = date('Y-m-d H:i:s', $v['create_time']);
|
||||
}
|
||||
}
|
||||
return $item;
|
||||
}
|
||||
)->toArray();
|
||||
@ -234,6 +242,7 @@ class LogisticsController extends BaseApiController
|
||||
$record = [
|
||||
'lst_id' => $logistics['id'],
|
||||
'type' => 2,
|
||||
'status' => 1,
|
||||
'user_name' => $courier['real_name']? $courier['real_name'] : $courier['nickname'],
|
||||
'user_phone' => $courier['mobile'],
|
||||
'content' => '已提取商品',
|
||||
@ -269,6 +278,7 @@ class LogisticsController extends BaseApiController
|
||||
$record = [
|
||||
'lst_id' => $logistics['id'],
|
||||
'type' => 2,
|
||||
'status' => 2,
|
||||
'user_name' => $courier['real_name']? $courier['real_name'] : $courier['nickname'],
|
||||
'user_phone' => $courier['mobile'],
|
||||
'content' => '已完成配送',
|
||||
@ -302,6 +312,7 @@ class LogisticsController extends BaseApiController
|
||||
$record = [
|
||||
'lst_id' => $logistics['id'],
|
||||
'type' => 1,
|
||||
'status' => 3,
|
||||
'user_name' => $logistics['user_name'],
|
||||
'user_phone' => $logistics['user_phone'],
|
||||
'content' => '已确认收货',
|
||||
@ -335,6 +346,7 @@ class LogisticsController extends BaseApiController
|
||||
$record = [
|
||||
'lst_id' => $logistics['id'],
|
||||
'type' => 1,
|
||||
'status' => 4,
|
||||
'user_name' => $logistics['user_name'],
|
||||
'user_phone' => $logistics['user_phone'],
|
||||
'content' => '已取消订单',
|
||||
|
Loading…
x
Reference in New Issue
Block a user