Commit 4c5280bb by 朱继来

调整订单来源

parent c6c2ac82
...@@ -707,10 +707,6 @@ Class AddOrderController extends Controller ...@@ -707,10 +707,6 @@ Class AddOrderController extends Controller
$data['k1'] = time(); $data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi'); $data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$report_ids = $request->input('report_ids', '');
if ($report_ids) $data['pf'] = 8;
$url = Config('website.api_domain').'order/create'; $url = Config('website.api_domain').'order/create';
// dd(curlApi($url, $data)); // dd(curlApi($url, $data));
$response = json_decode(curlApi($url, $data), true); $response = json_decode(curlApi($url, $data), true);
...@@ -718,6 +714,8 @@ Class AddOrderController extends Controller ...@@ -718,6 +714,8 @@ Class AddOrderController extends Controller
if ($response['err_code'] != 0) return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']]; if ($response['err_code'] != 0) return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']];
// 若存在销售报价明细ID,则修改对应报价单状态为已成单 // 若存在销售报价明细ID,则修改对应报价单状态为已成单
$report_ids = $request->input('report_ids', '');
if ($report_ids) { if ($report_ids) {
$ids = explode(',', $report_ids); $ids = explode(',', $report_ids);
......
...@@ -710,6 +710,7 @@ class ApiController extends Controller ...@@ -710,6 +710,7 @@ class ApiController extends Controller
$data['type'] = 4; // 批量导入销售报价 $data['type'] = 4; // 批量导入销售报价
$data['uid'] = $user_id; $data['uid'] = $user_id;
$data['delivery_place'] = $delivery_place; $data['delivery_place'] = $delivery_place;
$data['pf'] = 8; // 询价系统标记
$url = Config('website.api_domain').'cart/addBatchByOrderSystem'; $url = Config('website.api_domain').'cart/addBatchByOrderSystem';
......
...@@ -184,33 +184,33 @@ function getGoodsName($goods_id) ...@@ -184,33 +184,33 @@ function getGoodsName($goods_id)
function getOrderSource($order_id, $order_type=1, $order_goods_type=1) function getOrderSource($order_id, $order_type=1, $order_goods_type=1)
{ {
if ($order_type == 1) { if ($order_type == 1) {
$order = DB::connection('order')->table('lie_order_extend')->where('order_id', $order_id)->select('order_type')->first(); $order_source = DB::connection('order')->table('lie_order')->where('order_id', $order_id)->value('order_source');
if ($order) { if (preg_match('/pf=1/', $order_source)) {
switch ($order->order_type) {
case 1:
case 2:
case 3:
return '后台';
}
}
$order_source = DB::connection('order')->table('lie_order')->where('order_id', $order_id)->select('order_source')->first();
if (preg_match('/pf=1/', $order_source->order_source)) {
$source = 'PC端'; $source = 'PC端';
} else if (preg_match('/pf=2/', $order_source->order_source)) { } else if (preg_match('/pf=2/', $order_source)) {
$source = '移动端'; $source = '移动端';
} else if (preg_match('/pf=6/', $order_source->order_source)) { } else if (preg_match('/pf=6/', $order_source)) {
$source = '小程序'; $source = '小程序';
} else if (preg_match('/pf=8/', $order_source->order_source)) { } else if (preg_match('/pf=8/', $order_source)) {
$source = '询报价平台'; $source = '询报价平台';
} else if (preg_match('/pf=9/', $order_source->order_source)) { } else if (preg_match('/pf=9/', $order_source)) {
$source = '云芯平台'; $source = '云芯平台';
} else { } else {
$source = '台'; $source = '台';
} }
// $order = DB::connection('order')->table('lie_order_extend')->where('order_id', $order_id)->select('order_type')->first();
// if ($order) {
// switch ($order->order_type) {
// case 1:
// case 2:
// case 3:
// return '后台';
// }
// }
return $source; return $source;
} else if ($order_type == 2) { } else if ($order_type == 2) {
return 'ERP'; return 'ERP';
......
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