Authored by cailing

取消订单详情页优化

@@ -226,6 +226,10 @@ class OrderModel @@ -226,6 +226,10 @@ class OrderModel
226 $detail['packages'] = CartModel::getPackageInfo($orderDetail); 226 $detail['packages'] = CartModel::getPackageInfo($orderDetail);
227 //判断是否可以修改地址 227 //判断是否可以修改地址
228 $result['changeable'] = $orderDetail['can_update_delivery_address'] == 'Y' ? 'true' : 'false'; 228 $result['changeable'] = $orderDetail['can_update_delivery_address'] == 'Y' ? 'true' : 'false';
  229 + //判断是否有关联订单
  230 + $result['relation'] = $orderDetail['relate_order_code'] == 'Y' ? 'true' : 'false';
  231 + //修改地址跳转链接
  232 + $result['url'] = Helpers::url('/home/addressModify', array('orderCode' => $orderCode, 'relation' => $result['relation']));
229 } 233 }
230 return $detail; 234 return $detail;
231 } 235 }
@@ -92,6 +92,8 @@ class OrdersController extends WebAction @@ -92,6 +92,8 @@ class OrdersController extends WebAction
92 $orderCode = $this->get('order_code', ''); 92 $orderCode = $this->get('order_code', '');
93 } 93 }
94 $detail = OrderModel::getOrderDetail($uid, $orderCode); 94 $detail = OrderModel::getOrderDetail($uid, $orderCode);
  95 + //取消订单原因列表
  96 + $resons = OrderData::closeReasons();
95 //非当前用户的订单,跳转个首 97 //非当前用户的订单,跳转个首
96 if (isset($detail['code']) && $detail['code'] == 400) { 98 if (isset($detail['code']) && $detail['code'] == 400) {
97 $this->go(Helpers::url('/home')); 99 $this->go(Helpers::url('/home'));
@@ -115,6 +117,7 @@ class OrdersController extends WebAction @@ -115,6 +117,7 @@ class OrdersController extends WebAction
115 'orderBalance' => isset($detail['orderBalance']) ? $detail['orderBalance'] : array(), 117 'orderBalance' => isset($detail['orderBalance']) ? $detail['orderBalance'] : array(),
116 'operation' => $detail['operation'], 118 'operation' => $detail['operation'],
117 'totalYoho' => $detail['yoho_give_coin'], 119 'totalYoho' => $detail['yoho_give_coin'],
  120 + 'cancelReason' => isset($resons['data']) ? $resons['data'] : '',
118 ); 121 );
119 if (isset($detail['noramlPayMode'])) { 122 if (isset($detail['noramlPayMode'])) {
120 $data['orderInfo'] = $detail['orderInfo']; 123 $data['orderInfo'] = $detail['orderInfo'];