Commit 4c5280bb by 朱继来

调整订单来源

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