From 9447ff6524be2ec3714db3f13ca68e894f9697ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=B8=80=E5=B3=B0?= <1feng.0595@gmail.com> Date: Wed, 4 Jul 2018 10:56:30 +0800 Subject: [PATCH] admin order --- app/Http/Controllers/Admin/OrderController.php | 16 ++++++++-------- resources/views/admin/order/index.blade.php | 2 +- resources/views/admin/tag/index.blade.php | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/Admin/OrderController.php b/app/Http/Controllers/Admin/OrderController.php index ec24c16..3dd4567 100644 --- a/app/Http/Controllers/Admin/OrderController.php +++ b/app/Http/Controllers/Admin/OrderController.php @@ -72,7 +72,7 @@ class OrderController extends CommonController $posts = parent::pageList('order', $where); foreach($posts as $key=>$value) { - $order_status_arr = Order::getOrderStatusText(object_to_array($value, 1)); + $order_status_arr = model('Order')->getOrderStatusAttr($value); $posts[$key]->order_status_text = $order_status_arr?$order_status_arr['text']:''; $posts[$key]->order_status_num = $order_status_arr?$order_status_arr['num']:''; @@ -96,16 +96,16 @@ class OrderController extends CommonController if($data['post']) { - $order_status_arr = Order::getOrderStatusText($data['post']); + $order_status_arr = model('Order')->getOrderStatusAttr($data['post']); $data['post']['order_status_text'] = $order_status_arr?$order_status_arr['text']:''; $data['post']['order_status_num'] = $order_status_arr?$order_status_arr['num']:''; - $data['post']['province_name'] = Region::getRegionName($data['post']['province']); - $data['post']['city_name'] = Region::getRegionName($data['post']['city']); - $data['post']['district_name'] = Region::getRegionName($data['post']['district']); + $data['post']['province_name'] = model('Region')->getRegionName(['id'=>$data['post']->province]); + $data['post']['city_name'] = model('Region')->getRegionName(['id'=>$data['post']->city]); + $data['post']['district_name'] = model('Region')->getRegionName(['id'=>$data['post']->district]); - $data['post']['invoice_text'] = Order::getInvoiceText($data['post']); - $data['post']['place_type_text'] = Order::getPlaceTypeText($data['post']); + $data['post']['invoice_text'] = model('Order')->getInvoiceAttr($data['post']); + $data['post']['place_type_text'] = model('Order')->getPlaceTypeAttr($data['post']); $data['post']['user'] = User::where(array('id'=>$data['post']['user_id']))->first(); //下单人信息 @@ -113,7 +113,7 @@ class OrderController extends CommonController foreach($order_goods as $k=>$v) { - $order_goods[$k]['refund_status_text'] = OrderGoods::getRefundStatusText($v); + $order_goods[$k]['refund_status_text'] = model('OrderGoods')->getRefundStatusAttr($v); } $data['post']['goodslist'] = $order_goods; diff --git a/resources/views/admin/order/index.blade.php b/resources/views/admin/order/index.blade.php index cd1fc09..93119e7 100644 --- a/resources/views/admin/order/index.blade.php +++ b/resources/views/admin/order/index.blade.php @@ -59,7 +59,7 @@ function output_excel() order_sn.'-'.$row->id; ?>, 金额:order_amount; ?>
下单时间:add_time); ?> - pay_money){echo '支付金额:'.$row->pay_money;} ?>out_trade_no){echo ', 流水号:'.$row->out_trade_no;} ?>pay_name){echo '
'.$row->pay_name.', ';} ?>pay_time){echo '支付时间:'.date('Y-m-d H:i:s',$row->pay_time);} ?> + pay_money){echo '支付金额:'.$row->pay_money;} ?>trade_no){echo ', 流水号:'.$row->out_trade_no;} ?>pay_name){echo '
'.$row->pay_name.', ';} ?>pay_time){echo '支付时间:'.date('Y-m-d H:i:s',$row->pay_time);} ?> name.'[TEL:'.$row->mobile.']'; ?>
province_name; ?>city_name; ?>district_name; ?> order_status_text=='待发货'){echo ''.$row->order_status_text.'';}else{echo $row->order_status_text;} ?> place_type==1){echo 'pc';}elseif($row->place_type==2){echo 'weixin';}elseif($row->place_type==3){echo 'app';}elseif($row->place_type==4){echo 'wap';} ?> diff --git a/resources/views/admin/tag/index.blade.php b/resources/views/admin/tag/index.blade.php index 89130d0..bc1074f 100644 --- a/resources/views/admin/tag/index.blade.php +++ b/resources/views/admin/tag/index.blade.php @@ -20,7 +20,7 @@ id; ?> tag; ?>id); ?> pubdate); ?> - "tags","tagid"=>$row->id)); ?>">预览 修改 删除 + 预览 修改 删除