Commit 579cae31 by 朱继来

fix

parents 04b80607 1d1c0300
Showing with 17 additions and 19 deletions
...@@ -323,21 +323,12 @@ class OrderModel extends Model ...@@ -323,21 +323,12 @@ class OrderModel extends Model
$sales = DB::table('user_info')->where(['userId' => $order[$i]['sale_id']])->select('name')->first(); $sales = DB::table('user_info')->where(['userId' => $order[$i]['sale_id']])->select('name')->first();
} }
$tmp[$i]['order_id'] = $order[$i]['order_id']; $tmp[$i]['order_id'] = $order[$i]['order_id'];
$tmp[$i]['order_sn'] = "\t".$order[$i]['order_sn']."\t"; $tmp[$i]['order_sn'] = "\t".$order[$i]['order_sn']."\t";
if ($order[$i]['order_goods_type'] == 2) {
$tmp[$i]['sale_type'] = $order[$i]['sale_type'] == 1 ? '现卖' : '预售';
$tmp[$i]['business_type'] = $order[$i]['business_type'] ? Config('params.business_type')[$order[$i]['business_type']] : '正常订单'; // 自营其他业务类型
}
$tmp[$i]['user_account'] = $order[$i]['mobile'] ? $order[$i]['mobile'] : $order[$i]['email']; $tmp[$i]['user_account'] = $order[$i]['mobile'] ? $order[$i]['mobile'] : $order[$i]['email'];
// $tmp[$i]['is_new'] = $order[$i]['is_new'] == 1 ? '是' : '否'; // 是否为新用户 // $tmp[$i]['is_new'] = $order[$i]['is_new'] == 1 ? '是' : '否'; // 是否为新用户
if ($order[$i]['order_goods_type'] == 1) {
$tmp[$i]['is_new_order'] = $order[$i]['is_new_order'] == 1 ? '是' : '否'; // 是否为新订单
}
$tmp[$i]['consignee'] = isset($order[$i]['consignee']) ? $order[$i]['consignee'] : ''; $tmp[$i]['consignee'] = isset($order[$i]['consignee']) ? $order[$i]['consignee'] : '';
$tmp[$i]['create_time_date'] = date('Y-m-d', $order[$i]['create_time']); $tmp[$i]['create_time_date'] = date('Y-m-d', $order[$i]['create_time']);
$tmp[$i]['create_time_sec'] = date('H:i:s', $order[$i]['create_time']); $tmp[$i]['create_time_sec'] = date('H:i:s', $order[$i]['create_time']);
...@@ -362,11 +353,11 @@ class OrderModel extends Model ...@@ -362,11 +353,11 @@ class OrderModel extends Model
$tmp[$i]['coupon'] = ''; $tmp[$i]['coupon'] = '';
$tmp[$i]['order_amount'] = ''; $tmp[$i]['order_amount'] = '';
} else { } else {
$tmp[$i]['goods_sum'] = $this->getOrderPrice($order[$i]['order_id'], 1); $tmp[$i]['goods_sum'] = $this->getOrderPrice($order[$i]['order_id'], 1);
$tmp[$i]['shipping_fee'] = $this->getOrderPrice($order[$i]['order_id'], 3); $tmp[$i]['shipping_fee'] = $this->getOrderPrice($order[$i]['order_id'], 3);
$tmp[$i]['extra_fee'] = $this->getOrderPrice($order[$i]['order_id'], 2); $tmp[$i]['extra_fee'] = $this->getOrderPrice($order[$i]['order_id'], 2);
$tmp[$i]['coupon'] = $this->getOrderPrice($order[$i]['order_id'], -4); $tmp[$i]['coupon'] = $this->getOrderPrice($order[$i]['order_id'], -4);
$tmp[$i]['order_amount'] = $order[$i]['order_amount']; $tmp[$i]['order_amount'] = $order[$i]['order_amount'];
} }
$tmp[$i]['order_type'] = !empty($order[$i]['order_pay_type']) ? Config('params.order_pay_type')[$order[$i]['order_pay_type']] : '未知'; $tmp[$i]['order_type'] = !empty($order[$i]['order_pay_type']) ? Config('params.order_pay_type')[$order[$i]['order_pay_type']] : '未知';
...@@ -380,10 +371,10 @@ class OrderModel extends Model ...@@ -380,10 +371,10 @@ class OrderModel extends Model
$tmp[$i]['company_phone'] = $order[$i]['company_phone']; $tmp[$i]['company_phone'] = $order[$i]['company_phone'];
if ($i > 0 && $order[$i]['order_id'] == $order[$i-1]['order_id']) { if ($i > 0 && $order[$i]['order_id'] == $order[$i-1]['order_id']) {
$tmp[$i]['adtags'] = ''; $tmp[$i]['adtags'] = '';
$tmp[$i]['client_source'] = ''; $tmp[$i]['client_source'] = '';
$tmp[$i]['cancel_reason'] = ''; $tmp[$i]['cancel_reason'] =
$tmp[$i]['send_remark'] = ''; $tmp[$i]['send_remark'] = '';
} else { } else {
$tmp[$i]['adtags'] = $order[$i]['order_source']; $tmp[$i]['adtags'] = $order[$i]['order_source'];
$tmp[$i]['client_source'] = $order[$i]['client_source']; $tmp[$i]['client_source'] = $order[$i]['client_source'];
...@@ -393,6 +384,13 @@ class OrderModel extends Model ...@@ -393,6 +384,13 @@ class OrderModel extends Model
$tmp[$i]['is_test'] = $order[$i]['is_test'] == 1 ? '是' : '否'; $tmp[$i]['is_test'] = $order[$i]['is_test'] == 1 ? '是' : '否';
if ($order[$i]['order_goods_type'] == 2) {
$tmp[$i]['sale_type'] = $order[$i]['sale_type'] == 1 ? '现卖' : '预售';
$tmp[$i]['business_type'] = $order[$i]['business_type'] ? Config('params.business_type')[$order[$i]['business_type']] : '正常订单'; // 自营其他业务类型
} else {
$tmp[$i]['is_new_order'] = $order[$i]['is_new_order'] == 1 ? '是' : '否'; // 是否为新订单
}
unset($sales); unset($sales);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment