|
|
|
@ -63,51 +63,37 @@ class OrderReportPage extends LazyRenderable |
|
|
|
// 订单总额
|
|
|
|
$orderReport = $orderMain->get()->toArray(); |
|
|
|
// 总补贴金额
|
|
|
|
$storeNewUser = $storeNewUser->get(); |
|
|
|
$storeNewUsers = $storeNewUser->get()->toArray(); |
|
|
|
// 总用户
|
|
|
|
$userTotal = $newUser->get(); |
|
|
|
$userTotal = $newUser->get()->toArray(); |
|
|
|
|
|
|
|
$query = [ |
|
|
|
'order_total_num' => $orderReport['total_num'], |
|
|
|
'order_total_money' => $orderReport['total_money'], |
|
|
|
'order_total_num' => !empty($orderReport[0]['total_num'])?$orderReport[0]['total_num']:0, |
|
|
|
'order_total_money' => !empty($orderReport[0]['total_money'])?$orderReport[0]['total_money']:0, |
|
|
|
|
|
|
|
'new_user_total_money' => $storeNewUser['new_user_total'], |
|
|
|
'store_user_total_money' => $storeNewUser['store_total'], |
|
|
|
'new_add_user' => $userTotal['new_add_total'], |
|
|
|
'new_user_total_money' => !empty($storeNewUsers[0]['new_user_total'])?$storeNewUsers[0]['new_user_total']:0, |
|
|
|
'store_user_total_money' => !empty($storeNewUsers[0]['store_total'])?$storeNewUsers[0]['store_total']:0, |
|
|
|
'new_add_user' => !empty($storeNewUsers[0]['new_add_total'])?$storeNewUsers[0]['new_add_total']:0, |
|
|
|
|
|
|
|
'user_total' => $newUser['total'], |
|
|
|
'user_total' => !empty($userTotal[0]['total'])?$userTotal[0]['total']:0, |
|
|
|
]; |
|
|
|
|
|
|
|
if ($query) { |
|
|
|
// $marketList = MarketModel::getMarket();
|
|
|
|
$result = []; |
|
|
|
$orderReport = json_encode($orderReport); |
|
|
|
$showRefund = json_encode($result); |
|
|
|
|
|
|
|
|
|
|
|
Admin::script( |
|
|
|
<<<JS |
|
|
|
var order_report = JSON.stringify($orderReport) |
|
|
|
var show_refund = JSON.stringify($showRefund) |
|
|
|
|
|
|
|
var app = new Vue({ |
|
|
|
el:"#order_report", |
|
|
|
data:{ |
|
|
|
|
|
|
|
show_refund: JSON.parse(show_refund), |
|
|
|
|
|
|
|
order_total_num:$orderReport.total_num, |
|
|
|
order_total_money:$orderReport.total_money, |
|
|
|
dialogFormVisible: false, |
|
|
|
// order_total_money:123,
|
|
|
|
|
|
|
|
refund_2:"退款", |
|
|
|
refund_3:"已同意退款", |
|
|
|
refund_goods_name:"", |
|
|
|
|
|
|
|
order_goods_id:null, |
|
|
|
order_child_id:null, |
|
|
|
show_refund_2:true, |
|
|
|
show_refund_3:false, |
|
|
|
|
|
|
|
order_total_num:"{$query['order_total_num']}", |
|
|
|
order_total_money:"{$query['order_total_money']}", |
|
|
|
new_user_total_money:"{$query['new_user_total_money']}", |
|
|
|
store_user_total_money:"{$query['store_user_total_money']}", |
|
|
|
new_add_user:"{$query['new_add_user']}", |
|
|
|
user_total:"{$query['user_total']}", |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
|