From 10b3e3e1a8d664a7322c9091486fbdf8db26fa9d Mon Sep 17 00:00:00 2001 From: anyv <anyu@bronet.cn> Date: Fri, 5 Jul 2019 09:33:20 +0800 Subject: [PATCH] 25 --- app/admin/controller/BirdController.php | 2 +- app/admin/controller/SalesmanorderController.php | 19 ++++++++++++++----- public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html | 11 ++++++++++- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/admin/controller/BirdController.php b/app/admin/controller/BirdController.php index 0d5c4eb..0693802 100644 --- a/app/admin/controller/BirdController.php +++ b/app/admin/controller/BirdController.php @@ -163,7 +163,7 @@ class BirdController extends AdminBaseController // } //请求url,接口正式地址:http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx 测试环境地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json - defined('ReqURL') or define('ReqURL', 'http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json'); + defined('ReqURL') or define('ReqURL', 'http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx'); $jsonResult = $this->getOrderTracesByJson($indent['order_number'],$indent['logistic_code'],$indent['logistic_name']); $result = json_decode($jsonResult,true); diff --git a/app/admin/controller/SalesmanorderController.php b/app/admin/controller/SalesmanorderController.php index 8361430..23022ea 100644 --- a/app/admin/controller/SalesmanorderController.php +++ b/app/admin/controller/SalesmanorderController.php @@ -89,11 +89,20 @@ class SalesmanorderController extends AdminBaseController{ $address_region = $data['region'].$data['school'].$data['grade'].$data['class']; } //判断订单是统一配送还是快递配送 -// if($data['is_courier'] == 1){ -// -// }else{ -// -// } + if($data['is_courier'] == 1){ + $logistics = $data['start_time']; + $this -> assign('logistics',$logistics); + }else{ + $bird = new BirdController(); + $logistics = $bird -> getOrder($id['id']); + if($logistics['code'] == 40000){ + $this -> assign('logistics',4); + }else{ + $this -> assign('logistics',$logistics['data']['traces']); + } + + } + $data_content = Db::name('indent_goods') -> where('indent_id',$id['id']) -> select(); $this -> assign('data',$data); $this -> assign('address_region',$address_region); diff --git a/public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html b/public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html index 968bf45..b2e7fea 100755 --- a/public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html +++ b/public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html @@ -27,9 +27,18 @@ </h4> <h4> <if condition="$data.is_courier eq 1"> - 预计送达: + 预计送达:{$logistics} <else/> 物流信息: + <if condition="$logistics eq 4"> + 未发货 + <else/> + <ul> + <volist name="logistics" id="vo"> + <li>{$vo.AcceptStation}-{$vo.AcceptTime}</li> + </volist> + </ul> + </if> </if> </h4> <h4>买家留言:{$data.leave_word}</h4> -- libgit2 0.24.0